Esempio n. 1
0
        if (!$temp['password']) {
            $error = true;
            $msg .= "<li>{$gXpLang['error_password_empty']}</li>";
        } else {
            if ($tmp['password'] != $tmp['password2']) {
                $error = true;
                $msg .= "<li>{$gXpLang['error_password_match']}</li>";
            }
        }
        if (!$error) {
            $temp['password'] = md5($_POST['password']);
            $temp['password2'] = addslashes(htmlentities($_POST['password']));
            //new functional for registering tier affiliate
            $temp['parent'] = $gXpDb->getTierAffIdByCookie($_COOKIE['txp']);
            $gXpDb->registerAffiliate($temp);
            aff_login($temp['username'], $tmp['password']);
        }
        $msgstyle = $error ? 'error' : 'notify';
        $msg = "<ul class=\"{$msgstyle}\">{$msg}</ul>";
    }
    if ($_POST && !$error) {
        $tpl = 'success.tpl';
        $msg = $gXpLang['account_created'];
    } else {
        $tpl = 'register.tpl';
        $gXpSmarty->assign_by_ref('form', $tmp);
    }
} else {
    $msg = "<h3 class=\"ch4\">" . $gXpLang['logout_first'] . "</h3>";
    $tpl = 'success.tpl';
}
Esempio n. 2
0
 * @Author: NDOT
 * @URL : http://www.ndot.in
 ********************************************/
require_once 'header.php';
if (isset($_COOKIE['aff_id']) && isset($_COOKIE['aff_pwd'])) {
    url_redirect(DOCROOT);
}
if ($_POST['authorize']) {
    $valid = true;
    if (!$_POST['username']) {
        $valid = false;
        $msg .= "<li>{$gXpLang['editor_incorrect']}</li>";
    }
    if (!$_POST['password']) {
        $valid = false;
        $msg .= "<li>{$gXpLang['editorpsw_incorrect']}</li>";
    }
    if ($valid) {
        aff_login($_POST['username'], $_POST['password']);
    }
    //if($msg)
    //echo "<script>alert('Incorrect Username and Password, please try again'); document.location.href='login.php';</script>\n";
}
$title = 'Affiliate Program - Login';
$description = $gXpLang['desc_login'];
$keywords = $gXpLang['keyword_login'];
$gXpSmarty->assign_by_ref('description', $description);
$gXpSmarty->assign_by_ref('keywords', $keywords);
$gXpSmarty->assign_by_ref('msg', $msg);
$gXpSmarty->assign_by_ref('title', $title);
$gXpSmarty->display("login.tpl");