:::

5-3 verifyuser.php

<?php
require_once 'header.php';
require 'includes/functions.php';
include 'config.php';
$page_title = '啟用帳戶';
$op         = "";

//Pulls variables from url. Can pass 1 (verified) or 0 (unverified/blocked) into url
$uid    = $_GET['uid'];
$verify = $_GET['v'];

$e       = new SelectEmail;
$eresult = $e->emailPull($uid);

$email    = $eresult['email'];
$username = $eresult['username'];

$v = new Verify;

if (isset($uid) && !empty(str_replace(' ', '', $uid)) && isset($verify) && !empty(str_replace(' ', '', $verify))) {

    //Updates the verify column on user
    $vresponse = $v->verifyUser($uid, $verify);

    //Success
    if ($vresponse == 'true') {
        $smarty->assign('msg', $activemsg);

        //Send verification email
        $m = new MailSender;
        $m->sendMail($email, $username, $uid, 'Active');
    } else {
        //Echoes error from MySQL
        $smarty->assign('msg', $vresponse);
    }
} else {
    //Validation error from empty form variables

    $smarty->assign('msg', 'An error occurred... click <a href="index.php">here</a> to go back.');
}

require_once 'footer.php';

 


:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.cp27.secserverpros.com%2Fmodules%2Ftad_book3%2Fpage.php%3Ftbdsn%3D1367%26tbsn%3D43

書籍目錄

展開 | 闔起

線上使用者

360人線上 (155人在瀏覽線上書籍)

會員: 0

訪客: 360

更多…