PDA

View Full Version : Problem on send mails & Banner on Categories



Loren
01-12-2008, 04:38 PM
1. I have tried to register with some test a/c, but no confirmation emails had receive, and when I try to resend the email, it also nothing received, please advise where to fix this, Thanks!

2. I have added few categories in the database, it do show up on the front page, but it does not show up at the banner admin page for selection, please advise where can I fix this, Thanks!

renlok
01-12-2008, 05:11 PM
1. I have tried to register with some test a/c, but no confirmation emails had receive, and when I try to resend the email, it also nothing received, please advise where to fix this, Thanks!
yes that was a problem with 0.6.4 it shows the wrong message you have to activate the user in the admin panel
but replace your register.php page with this to fix it.

<?php
/************************************************** *************************
* copyright : (C) 2008 WeBid
* site : http://www.webidsupport.com/
************************************************** *************************/

/************************************************** *************************
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version. Although none of the code may be
* sold. If you have been sold this script, get a refund.
************************************************** *************************/

include "includes/config.inc.php";
include $include_path."countries.inc.php";
include $include_path."checkage.inc.php";
include $include_path."banemails.inc.php";

$TIME = mktime(date("H")+$system->SETTINGS['timecorrection'],date("i"),date("s"),date("m"), date("d"),date("Y"));
$NOW = date("YmdHis",$TIME);
$NOWB = date("YmdHis",$TIME);

if (!isset($_POST['auction_id']) && !isset($_GET['auction_id'])) {
$auction_id = $_SESSION["CURRENT_ITEM"];
} else {
$_SESSION["CURRENT_ITEM"]=intval($auction_id);
}
if (empty($_POST['action'])) {
$action = "first";
}
#// Retrieve users signup settings
$query = "SELECT * FROM ".$DBPrefix."usersettings";
$res_s = mysql_query($query);
$system->check_mysql($res_s, $query, __LINE__, __FILE__);
$REQUESTED_FIELDS = unserialize(mysql_result($res_s,0,"requested_fields"));
$MANDATORY_FIELDS = unserialize(mysql_result($res_s,0,"mandatory_fields"));

if ($_POST['action'] == "first") {

if (empty($_POST['accounttype']) && $system->SETTINGS['accounttype'] == 'sellerbuyer') {
$TPL_err = 1;
$TPL_errmsg = $MSG_25_0137;
} elseif (empty($_POST['TPL_name'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5029;
} elseif (empty($_POST['TPL_nick'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5030;
} elseif (empty($_POST['TPL_password'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5031;
} elseif (empty($_POST['TPL_repeat_password'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5032;
} elseif (empty($_POST['TPL_email'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5033;
} elseif (empty($_POST['TPL_address'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5034;
} elseif (empty($_POST['TPL_city'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5035;
} elseif (empty($_POST['TPL_prov'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5036;
} elseif (empty($_POST['TPL_country'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5037;
} elseif (empty($_POST['TPL_zip'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5038;
} elseif (empty($_POST['TPL_phone'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5039;
} elseif (empty($_POST['TPL_birthdate'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_5040;
} else {
// -- Explode birthdate into DAY MONTH YEAR
if(!empty($_POST['TPL_birthdate'])){
$DATE = explode("/", $_POST['TPL_birthdate']);
if($system->SETTINGS[datesformat] == "USA") {
$birth_day = $DATE[1];
$birth_month = $DATE[0];
$birth_year = $DATE[2];
} else {
$birth_day = $DATE[0];
$birth_month = $DATE[1];
$birth_year = $DATE[2];
}
$DATE = "$birth_year$birth_month$birth_day";
}else{
$DATE = 0;
}

if (strlen($_POST['TPL_nick']) < 6) {
$TPL_err = 1;
$TPL_errmsg = $ERR_107;
} else if (strlen ($_POST['TPL_password']) < 6) {
$TPL_err = 1;
$TPL_errmsg = $ERR_108;
} else if ($_POST['TPL_password'] != $_POST['TPL_repeat_password']) {
$TPL_err = 1;
$TPL_errmsg = $ERR_109;
} else if (strlen($_POST['TPL_email']) < 5) { // Primitive mail check
$TPL_err = 1;
$TPL_errmsg = $ERR_110;
} else if (!ereg("^[0-9]{2}/[0-9]{2}/[0-9]{4}$", $_POST['TPL_birthdate']) && $MANDATORY_FIELDS['birthdate']=='y') { // Birthdate check
$TPL_err = 1;
$TPL_errmsg = $ERR_043;
} elseif (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$", $_POST['TPL_email'])) {
$TPL_err = 1;
$TPL_errmsg = $ERR_008;
} else if (!CheckAge($birth_day, $birth_month, $birth_year) && $MANDATORY_FIELDS['birthdate']=='y') {
$TPL_err = 1;
$TPL_errmsg = $ERR_113;
}elseif(BannedEmail($_POST['TPL_email'],$BANNEDDOMAINS)){
$TPL_err = 1;
$TPL_errmsg = $MSG_30_0054;
} else {
$sql = "SELECT nick FROM ".$DBPrefix."users WHERE nick=\"" .$system->cleanvars($_POST['TPL_nick']) . "\"";
$res = mysql_query ($sql);
$system->check_mysql($res, $sql, __LINE__, __FILE__);
if (mysql_num_rows($res) > 0) {
$TPL_err = 1;
$TPL_errmsg = $ERR_111; // Selected user already exists
}
$sql = "SELECT email FROM ".$DBPrefix."users WHERE email=\"" . $system->cleanvars($_POST['TPL_email']) . "\"";
$res = mysql_query ($sql);
$system->check_mysql($res, $sql, __LINE__, __FILE__);
if (mysql_num_rows($res) > 0) {
$TPL_err = 1;
$TPL_errmsg = $ERR_115; // E-mail already used
}

if ($TPL_err == 0) {
$id = md5(uniqid(rand()));
$TPL_id_hidden = $id;
$TPL_nick_hidden = $_POST['TPL_nick'];
$TPL_password_hidden = $_POST['TPL_password'];
$TPL_name_hidden = $_POST['TPL_name'];
$TPL_email_hidden = $_POST['TPL_email'];
$TODAY = $NOWB;
# // Users suspended field
# // VALUES:
# // 9 - sign up fee due
# // 8 - no fee due, waiting for user's confirmation
# // 1 - suspended by the administrator via admin utility
$SUSPENDED = 8;
if($system->SETTINGS['accounttype'] == 'sellerbuyer') {
$selected_accounttype = $_POST['accounttype'];
} else {
$selected_accounttype = 'unique';
}
$sql = "INSERT INTO ".$DBPrefix."users (id,
nick, password, name, address, city, prov,
country, zip, phone, nletter,email, reg_date,
rate_sum, rate_num, birthdate,suspended,accounttype)
VALUES (NULL, \"" . $system->cleanvars($TPL_nick_hidden) . "\", \""
. md5($MD5_PREFIX . $TPL_password_hidden) . "\", \""
. $system->cleanvars($TPL_name_hidden) . "\", \""
. $system->cleanvars($_POST['TPL_address']) . "\", \""
. $system->cleanvars($_POST['TPL_city']) . "\", \""
. $system->cleanvars($_POST['TPL_prov']) . "\", \""
. $system->cleanvars($_POST['TPL_country']) . "\", \""
. $system->cleanvars($_POST['TPL_zip']) . "\", \""
. $system->cleanvars($_POST['TPL_phone']) . "\", \""
. $system->cleanvars($_POST['TPL_nletter']) . "\", \""
. $system->cleanvars($_POST['TPL_email']) . "\",
'$TODAY',
0,
0,
'$DATE',
'$SUSPENDED','$selected_accounttype')";
$res = mysql_query ($sql);
$system->check_mysql($res, $sql, __LINE__, __FILE__);
$TPL_id_hidden = mysql_insert_id();
# // ================================================== =========
# // Store user IP address in the database
# // ================================================== =========
$query = "INSERT INTO ".$DBPrefix."usersips VALUES(
NULL,
".intval($TPL_id_hidden).",
'".$_SERVER["REMOTE_ADDR"]."',
'first','accept')";
$res___ = mysql_query($query);
$system->check_mysql($res___, query, __LINE__, __FILE__);
# // ================================================== =========
/**
* Update column users in table ".$DBPrefix."counters
*/
$query = "UPDATE ".$DBPrefix."counters SET inactiveusers=inactiveusers+1";
$counteruser = mysql_query($query);
$system->check_mysql($counteruser, query, __LINE__, __FILE__);
# // ================================================== =========
/**
* Set up the language of this user in table ".$DBPrefix."userslanguage
*/
$language = $system->SETTINGS['defaultlanguage'];
$_SESSION['language'] = $language;
$userlanguage = mysql_query("INSERT INTO ".$DBPrefix."userslanguage VALUES(
'".$TPL_id_hidden."',
'$language')");
$system->check_mysql($userlanguage, query, __LINE__, __FILE__);
} // if($TPL_err == 0)
}
}
}

include "header.php";
if (($action == "first" && count($_POST) == 0) || ($_POST['action'] == "first" && $TPL_err)) {
$country = "";
foreach ($countries as $key=>$name) {
$country .= "<option value=\"$name\"";
if ($name == $_POST['TPL_country']) {
$country .= " selected";
} elseif ($system->SETTINGS['defaultcountry'] == $name && !isset($TPL_err)) {
$country .= " selected";
}
$country .= ">$name</option>\n";
}
include phpa_include("template_register_php.html");
}

if (isset($_POST['action']) && $_POST['action'] == "first" && !$TPL_err) {
include $include_path."user_confirmation.inc.php";
//$TPL_message = sprintf($MSG_016, $TPL_email_hidden);
$TPL_message = $MSG_016;
include phpa_include("template_registered_php.html");
}
include "footer.php";
$TPL_err = 0;
$TPL_errmsg = "";
?>


2. I have added few categories in the database, it do show up on the front page, but it does not show up at the banner admin page for selection, please advise where can I fix this, Thanks!

go to the categories page in the admin panel and click process change

Loren
01-12-2008, 05:45 PM
1. Hi, Thanks for your prompt reply, but I have tried to replace the file, it cames a HTTP 500 error, no page can be displayed, so that I return back, and also I find that it cannot receive auction confirmation email, too.

2. I have made process save, but it still not show up in the banner admin page.