コード例 #1
0
 function generateCode()
 {
     require_once DIR_FS_INC . 'xtc_random_charcode.inc.php';
     $this->vlCode = xtc_random_charcode(32);
 }
コード例 #2
0
   ---------------------------------------------------------------------------------------*/
require 'includes/application_top.php';
// create smarty elements
$smarty = new Smarty();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'xtc_random_charcode.inc.php';
require_once DIR_FS_INC . 'xtc_encrypt_password.inc.php';
require_once DIR_FS_INC . 'xtc_validate_password.inc.php';
require_once DIR_FS_INC . 'xtc_validate_email.inc.php';
$inp = 'true';
$del = '';
$info_message = '';
if (isset($_GET['action']) && $_GET['action'] == 'process') {
    $vlcode = xtc_random_charcode(32);
    $link = xtc_href_link(FILENAME_NEWSLETTER, 'action=activate&email=' . xtc_db_input($_POST['email']) . '&key=' . $vlcode, 'SSL');
    // web28 - 2010-09-21 - change NONSSL -> SSL
    // assign language to template for caching
    $smarty->assign('language', $_SESSION['language']);
    $smarty->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
    $smarty->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
    // assign vars
    $smarty->assign('EMAIL', xtc_db_input($_POST['email']));
    $smarty->assign('LINK', $link);
    // dont allow cache
    $smarty->caching = false;
    // create mails
    $html_mail = $smarty->fetch('db:newsletter_mail.html');
    $txt_mail = $smarty->fetch('db:newsletter_mail.txt');
    // Check if email exists