Oto send_activation_emails.php
Kod
<?
#################################################################
## PHP Pro Bid v6.00 ##
##-------------------------------------------------------------##
## Copyright ©2007 PHP Pro Software LTD. All rights reserved. ##
##-------------------------------------------------------------##
#################################################################
session_start();
define ('IN_ADMIN', 1);
define ('IN_SITE', 1);
include_once ('../includes/global.php');
include_once ('../includes/class_fees.php');
if ($session->value('adminarea')!='Active')
{
header_redirect('login.php');
}
else
{
include_once ('header.php');## PHP Pro Bid v6.00 add signup fee procedure here.
$signup_fee = new fees();
$signup_fee->setts = &$setts;
$signup_fee->set_fees(0);
$can_send = false;## PHP Pro Bid v6.00 can send activation emails
if ($setts['signup_settings'] == 1 && $signup_fee->fee['signup_fee'] <= 0)
{
$can_send = true;
}
if ($can_send)
{
if (isset($_POST['form_proceed']))
{
$sql_select_users = $db->query("SELECT u.user_id, u.name, u.username, u.email FROM " . DB_PREFIX . "users u WHERE
u.active=0 AND u.mail_activated=0");
while ($row_details = $db->fetch_array($sql_select_users))
{
include('../language/' . $setts['site_lang'] . '/mails/register_confirm_user_notification.php');
}
$can_send = false;
$send_emails_msg = AMSG_ACT_EMAILS_SENT_MSG;
}
else
{
$send_emails_msg = AMSG_ACT_EMAILS_MSG;
}
}
else
{
$send_emails_msg = AMSG_ACT_EMAILS_IMPOSSIBLE_MSG;
}
$template->set('can_send', $can_send);
$template->set('send_emails_msg', $send_emails_msg);
$template->set('header_section', AMSG_USERS_MANAGEMENT);
$template->set('subpage_title', AMSG_REG_ACTIVATION_EMAILS);
$template_output .= $template->process('send_activation_emails.tpl.php');
include_once ('footer.php');
echo $template_output;
}
?>
#################################################################
## PHP Pro Bid v6.00 ##
##-------------------------------------------------------------##
## Copyright ©2007 PHP Pro Software LTD. All rights reserved. ##
##-------------------------------------------------------------##
#################################################################
session_start();
define ('IN_ADMIN', 1);
define ('IN_SITE', 1);
include_once ('../includes/global.php');
include_once ('../includes/class_fees.php');
if ($session->value('adminarea')!='Active')
{
header_redirect('login.php');
}
else
{
include_once ('header.php');## PHP Pro Bid v6.00 add signup fee procedure here.
$signup_fee = new fees();
$signup_fee->setts = &$setts;
$signup_fee->set_fees(0);
$can_send = false;## PHP Pro Bid v6.00 can send activation emails
if ($setts['signup_settings'] == 1 && $signup_fee->fee['signup_fee'] <= 0)
{
$can_send = true;
}
if ($can_send)
{
if (isset($_POST['form_proceed']))
{
$sql_select_users = $db->query("SELECT u.user_id, u.name, u.username, u.email FROM " . DB_PREFIX . "users u WHERE
u.active=0 AND u.mail_activated=0");
while ($row_details = $db->fetch_array($sql_select_users))
{
include('../language/' . $setts['site_lang'] . '/mails/register_confirm_user_notification.php');
}
$can_send = false;
$send_emails_msg = AMSG_ACT_EMAILS_SENT_MSG;
}
else
{
$send_emails_msg = AMSG_ACT_EMAILS_MSG;
}
}
else
{
$send_emails_msg = AMSG_ACT_EMAILS_IMPOSSIBLE_MSG;
}
$template->set('can_send', $can_send);
$template->set('send_emails_msg', $send_emails_msg);
$template->set('header_section', AMSG_USERS_MANAGEMENT);
$template->set('subpage_title', AMSG_REG_ACTIVATION_EMAILS);
$template_output .= $template->process('send_activation_emails.tpl.php');
include_once ('footer.php');
echo $template_output;
}
?>
A tutaj send_activation_emails.tpl.php
Kod
<?
#################################################################
## PHP Pro Bid v6.00 ##
##-------------------------------------------------------------##
## Copyright ©2007 PHP Pro Software LTD. All rights reserved. ##
##-------------------------------------------------------------##
#################################################################
if ( !defined('INCLUDED') ) { die("Access Denied"); }
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="2"><img src="images/i_tables.gif" border="0"></td>
<td width="100%"><img src="images/pixel.gif" height="24" width="1"></td>
<td> </td>
</tr>
<tr>
<td width="100%" align="right" background="images/bg_part.gif" class="head"><?=$header_section;?>
/
<?=$subpage_title;?></td>
<td><img src="images/end_part.gif"></td>
</tr>
</table>
<?=$msg_changes_saved;?>
<table width="100%" border="0" cellspacing="3" cellpadding="3" class="border">
<form action="send_activation_emails.php" method="post">
<tr class="c3">
<td align="center"><b>
<?=$subpage_title;?>
</b></td>
</tr>
<tr align="center" class="c1">
<td><?=$send_emails_msg;?></td>
</tr>
<? if ($can_send) { ?>
<tr class="c3">
<td align="center"><input name="form_proceed" type="submit" id="form_proceed" value="<?=GMSG_PROCEED;?>"></td>
</tr>
<? } ?>
</form>
</table>