From: Lo?c C. <lo...@us...> - 2001-11-26 20:23:43
|
Update of /cvsroot/phpmychat/phpMyChat-0.15/chat In directory usw-pr-cvs1:/tmp/cvs-serv12503/chat Modified Files: profile_reg.php3 Log Message: beautified the script Index: profile_reg.php3 =================================================================== RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/profile_reg.php3,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** profile_reg.php3 2001/09/17 09:32:11 1.18 --- profile_reg.php3 2001/11/26 20:23:40 1.19 *************** *** 185,189 **** $ip = pmcGetIp(); ! // Defines the password if (C_EMAIL_PASWD) { --- 185,190 ---- $ip = pmcGetIp(); ! // Defines the password and sends it to the e-mail address if ! // required if (C_EMAIL_PASWD) { *************** *** 191,195 **** $pmcProfPassword = pmcGenPassword(); - // Sends the password to the e-mail address if required $recipient = array($pmcProfEmail => array($pmcProfNick, L_CHARSET)); $subject = '[' . APP_NAME . '] ' . L_EMAIL_VAL_1; --- 192,195 ---- *************** *** 223,231 **** { $slashedPswd = pmcSlashSingleQuotes(str_replace('\\', '\\\\', $pmcProfPassword)); ! $regQuery = 'INSERT INTO ' . C_REG_TBL . ' ' ! . '(username, charset, password, firstname, lastname, country, website, email, showemail, reg_time, ip, gender) ' ! . 'VALUES (' ! . "'$slashedNick', '" . L_CHARSET . "', '$slashedPswd', '" . pmcSlashSingleQuotes($pmcProfFirstName) . "', '" . pmcSlashSingleQuotes($pmcProfLastName) . "', '" . pmcSlashSingleQuotes($pmcProfSpokenLang) . "', '$pmcProfWebSite', '$pmcProfEmail', $pmcProfShowEmail, " . time() . ", '$ip', $pmcProfGender" ! . ')'; $dbLink->query($regQuery); $success = L_REG_9; --- 223,231 ---- { $slashedPswd = pmcSlashSingleQuotes(str_replace('\\', '\\\\', $pmcProfPassword)); ! $regQuery = 'INSERT INTO ' . C_REG_TBL . ' ' ! . '(username, charset, password, firstname, lastname, country, website, email, showemail, reg_time, ip, gender) ' ! . 'VALUES (' ! . "'$slashedNick', '" . L_CHARSET . "', '$slashedPswd', '" . pmcSlashSingleQuotes($pmcProfFirstName) . "', '" . pmcSlashSingleQuotes($pmcProfLastName) . "', '" . pmcSlashSingleQuotes($pmcProfSpokenLang) . "', '$pmcProfWebSite', '$pmcProfEmail', $pmcProfShowEmail, " . time() . ", '$ip', $pmcProfGender" ! . ')'; $dbLink->query($regQuery); $success = L_REG_9; *************** *** 233,238 **** $dbSessionVars['nick'] = $pmcProfNick; ! $dbSessionVars['password'] = (C_EMAIL_PASWD) ? "" : $pmcProfPassword; ! dbSessionSave(); // The db link should be closed but this can't be done under Apache because --- 233,239 ---- $dbSessionVars['nick'] = $pmcProfNick; ! // sigo: Add pmcProfPassword to session data only when don't ! // used "send password by email". ! $dbSessionVars['password'] = (C_EMAIL_PASWD) ? '' : $pmcProfPassword; dbSessionSave(); // The db link should be closed but this can't be done under Apache because |