• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP generateToken函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中generateToken函数的典型用法代码示例。如果您正苦于以下问题:PHP generateToken函数的具体用法?PHP generateToken怎么用?PHP generateToken使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了generateToken函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getUploadToken

 function getUploadToken()
 {
     requireRequestMethod("POST");
     /* FIXME: token should expire, based on server request? */
     /* FIXME: what if upload size is not known in time? transcode web service for example... */
     $absPath = $this->validatePath(getRequest('relativePath', TRUE), FTS_PARENT);
     /* make sure the uploaded file name is unique */
     $absPath = $this->getUniqueName($absPath);
     /* verify fileSize
      *
      * NOTE: fileSize *is* required, but 0 is a valid file size, but also
      * seen as "empty" by PHP, so we work around it like this...
      */
     $fileSize = (int) getRequest('fileSize', FALSE, 0);
     if ($fileSize < 0) {
         throw new Exception("invalid filesize");
     }
     $token = generateToken();
     try {
         $stmt = $this->dbh->prepare("INSERT INTO uploadTokens (token, filePath, fileSize) VALUES (:token, :filePath, :fileSize)");
         $stmt->bindParam(':token', $token);
         $stmt->bindParam(':filePath', $absPath);
         $stmt->bindParam(':fileSize', $fileSize);
         $stmt->execute();
         $uploadLocation = getProtocol() . getServerName() . $_SERVER['PHP_SELF'] . "?action=uploadFile&token={$token}";
         return array("uploadLocation" => $uploadLocation, "absPath" => $absPath);
     } catch (Exception $e) {
         throw new Exception("database query failed");
     }
 }
开发者ID:kaichuang1992,项目名称:filetrader,代码行数:30,代码来源:Files.class.php


示例2: DoQuery

function DoQuery($n, $c, $p1, $p2, $p3, $p4, $p5) {
	$str = "{\"result\":1}";
	date_default_timezone_set("Asia/Hong_Kong");
	$t_str = date("YmdHis");
	$commit_date = date("Y-m-d H:i:s");
	$pname = generateToken().".${t_str}.";
	$path1 = "./files/${pname}1";
	$path2 = "./files/${pname}2";
	$path3 = "./files/${pname}3";
	$path4 = "./files/${pname}4";
	$path5 = "./files/${pname}5";
	$dbp1 = "";
	$dbp2 = "";
	$dbp3 = "";
	$dbp4 = "";
	$dbp5 = "";
	if (isset($p1)) { move_uploaded_file($p1["tmp_name"], $path1); $dbp1 = "${pname}1"; }
	if (isset($p2)) { move_uploaded_file($p2["tmp_name"], $path2); $dbp2 = "${pname}2"; }
	if (isset($p3)) { move_uploaded_file($p3["tmp_name"], $path3); $dbp3 = "${pname}3"; }
	if (isset($p4)) { move_uploaded_file($p4["tmp_name"], $path4); $dbp4 = "${pname}4"; }
	if (isset($p5)) { move_uploaded_file($p5["tmp_name"], $path5); $dbp5 = "${pname}5"; }
	$db = openConnection();
	$stmt = $db->prepare("insert into feedback(nickname, comment, photo1, photo2, photo3, photo4, photo5, commit_date) values (?, ?, ?, ?, ?, ?, ?, ?)");
	$stmt->bind_param("ssssssss", $n, $c, $dbp1, $dbp2, $dbp3, $dbp4, $dbp5, $commit_date);
	$stmt->execute();
	$rows = intval($stmt->affected_rows);
	$stmt->close();
	closeConnection($db);
	if ($rows != 0) {
		$str = "{\"result\":0}";
	}
	return $str;	
}
开发者ID:rarnu,项目名称:root-tools,代码行数:33,代码来源:feedback.php


示例3: checkToken

function checkToken()
{
    /*****************************************************************************************
     * Check the posted token for correctness
     ******************************************************************************************/
    $oldToken = "";
    $testToken = "";
    $tokenStr = "";
    $page = basename($_SERVER['PHP_SELF']);
    $oldToken = $_POST["token"];
    $tokenStr = "IP:" . $_SESSION["ip"] . ",SESSIONID:" . session_id() . ",GUID:" . $_SESSION["guid"];
    $testToken = sha1($tokenStr . $_SESSION["salt"] . $_SESSION["salt"]);
    $checkToken = False;
    if ($oldToken === $testToken) {
        $diff = time() - $_SESSION["time"];
        if ($diff <= 300) {
            // Five minutes max
            if ($_SESSION["usecookie"]) {
                if ($_COOKIE["token"] === $oldToken) {
                    /*****************************************************************************************
                     * Destroy the old form token, then
                     * generate a new token for the form, which may or may not be needed. We want to do this
                     * before headers are written. When writeToken() or writeTokenH() is called we are only 
                     * writing the pre-generated token to the form. The cookie will have already been written.
                     ******************************************************************************************/
                    setcookie("token", '', time() - 42000);
                    generateToken();
                    return true;
                } else {
                    $_SESSION = array();
                    if (isset($_COOKIE[session_name()])) {
                        setcookie(session_name(), '', time() - 42000);
                    }
                    session_destroy();
                    header("Location: http://" . lg_domain . lg_form_error . "?p=" . $page . "&t=ec");
                }
            } else {
                return True;
            }
        } else {
            $_SESSION = array();
            if (isset($_COOKIE[session_name()])) {
                setcookie(session_name(), '', time() - 42000);
            }
            session_destroy();
            header("Location: http://" . lg_domain . lg_form_error . "?p=" . $page . "&t=et");
        }
    } else {
        $_SESSION = array();
        if (isset($_COOKIE[session_name()])) {
            setcookie(session_name(), '', time() - 42000);
        }
        session_destroy();
        header("Location: http://" . lg_domain . lg_form_error . "?p=" . $page . "&t=e");
    }
}
开发者ID:jeffreyhi1,项目名称:loginsystem-rd,代码行数:56,代码来源:form_token.php


示例4: generateToken

/**
 * A function that generates a hash that is not already 
 * in use. Adds letters to username and password until 
 * something unique is created.
 */
function generateToken($pdo, $username, $password)
{
    $hash = hash('ripemd160', $username . $password);
    $sql = "SELECT COUNT(*) FROM calendars WHERE token = :hash";
    $result = $pdo->prepare($sql);
    $result->execute(array('hash' => $hash));
    if ($result->fetchColumn() > 0) {
        return generateToken($pdo, $username . 'a', $password . 'b');
    }
    return $hash;
}
开发者ID:jonasdahl,项目名称:fogis-calendar-export,代码行数:16,代码来源:handleSubmit.php


示例5: run

 public function run()
 {
     parent::run();
     $this->getInputJson();
     $userId = login($this->input['username'], $this->input['password']);
     if (!$userId) {
         throw new \Exception("Invalid username or password.");
     }
     $token = generateToken($userId);
     $this->return['token'] = $token;
 }
开发者ID:kolesar-andras,项目名称:miserend.hu,代码行数:11,代码来源:Login.php


示例6: sendTokenChange

function sendTokenChange($email, $username, $old_email)
{
    require_once MODELES . 'membres/token.php';
    if ($token = generateToken($email, $username, $old_email)) {
        $tokenlink = 'http://' . $_SERVER['HTTP_HOST'] . getLink(['membres', 'confirm', $token]);
    } else {
        return False;
    }
    if (mail($email, 'Confirmer votre nouvelle adresse e-mail', "Bonjour !\n" . "Merci de cliquer sur le lien ci-dessous pour confirmer votre nouvelle adresse e-mail :\n" . $tokenlink . "\n" . "Si le lien ne fonctionne pas, copiez-collez l'adresse dans votre navigateur.\n\n" . "Merci et à bientôt !\n" . "-- L'équipe EventEase", 'From: [email protected]')) {
        return True;
    } else {
        return False;
    }
}
开发者ID:aurelienshz,项目名称:g1a,代码行数:14,代码来源:sendToken.php


示例7: firstUse

 public function firstUse($stunum)
 {
     $url = 'http://hongyan.cqupt.edu.cn/RedCenter/Api/Handle/index';
     //        $tmpArr = array('cyxbs',"$stunum",'firstUse');
     //        sort($tmpArr, SORT_STRING);
     //        $t = md5( sha1( implode( $tmpArr, '|' ) ) );
     $token = generateToken('cyxbs', $stunum, 'firstUse');
     $ch = curl_init($url);
     curl_setopt($ch, CURLOPT_HEADER, false);
     curl_setopt($ch, CURLOPT_POST, 1);
     curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
     curl_setopt($ch, CURLOPT_POSTFIELDS, "type=firstUse&stu={$stunum}&id=cyxbs&token=" . $token);
     curl_exec($ch);
     //$output = json_decode(curl_exec($ch),TRUE);
 }
开发者ID:RedrockTeam,项目名称:redcenter,代码行数:15,代码来源:PhoneController.class.php


示例8: post_login

 function post_login($data)
 {
     if ($_SESSION["login_id"] != null) {
         $response["success"] = "true";
         $response["code"] = "1";
         $response["message"] = "você esta logado";
         return json_encode($response);
         #throw new Exception("você esta logado");
     } else {
         if (empty($data->username) or empty($data->password)) {
             throw new Exception("Login ou senha precisam ser preenchidos");
         }
         #verifica usario no banco
         $db_user = User::find('all', array('conditions' => array('username = ? AND password = ? ', $data->username, hashpassword($data->password))));
         #->to_json() $data->id
         #fim
         if ($db_user != null) {
             //array push result
             $result = array();
             foreach ($db_user as $data) {
                 //update ip e login
                 $sql = User::find($data->id);
                 $sql->update_attributes(array('last_ip' => $_SERVER['REMOTE_ADDR'], 'last_login' => date("Y-m-d  H:i:s")));
                 $sql->save();
                 array_push($result, $data->to_array());
                 //using to_array instead of to_json
             }
             $token = generateToken($db_user);
             #fazer o login so add apikey e session
             $this->doLogin($db_user);
             unset($result->password);
             unset($result->password_salt);
             unset($result->last_ip);
             $response["success"] = "true";
             $response["code"] = "1";
             $response["message"] = "Sucesso - Bem vindo ";
             //para enviar dados atuais
             $newresult = $this->getPerfile();
             $response["result"] = $newresult;
             return json_encode($response);
         } else {
             throw new Exception("Erro ao efetuar login. Usuário/Senha incorretos");
         }
         return false;
     }
 }
开发者ID:joeymetal,项目名称:restful-sdti,代码行数:46,代码来源:AuthenticateController.php


示例9: register

function register($conn)
{
    $username = $_POST['username'];
    $password = sha1($_POST['password']);
    $email = $_POST['email'];
    $token = generateToken();
    $sql = 'INSERT INTO users (username, password, email, token) VALUES (?, ?, ?, ?)';
    $stmt = $conn->prepare($sql);
    try {
        if ($stmt->execute(array($username, $password, $email, $token))) {
            setcookie('token', $token, 0, "/");
            echo 'Account Registered';
        }
    } catch (PDOException $e) {
        echo $e->getMessage();
        //echo 'Username or Email Already Registered';
    }
}
开发者ID:gonzalez-jose-wm,项目名称:Shopping-Cart-Project,代码行数:18,代码来源:trial.php


示例10: register

function register($conn)
{
    $password = sha1($_POST['password']);
    $email = $_POST['email'];
    $token = generateToken();
    $sql = 'INSERT INTO users (password, email, token) VALUES (?, ?, ?)';
    $stmt = $conn->prepare($sql);
    try {
        if ($stmt->execute(array($password, $email, $token))) {
            setcookie('token', $token, 0, "/");
            $sql = 'INSERT INTO orders (users_id, status) (SELECT u.id, "new" FROM users u WHERE u.token = ?)';
            $stmt1 = $conn->prepare($sql);
            if ($stmt1->execute(array($token))) {
                echo 'Account Registered';
            }
        }
    } catch (PDOException $e) {
        echo $e->getMessage();
    }
}
开发者ID:chu-christopher-wm,项目名称:Shopping-Cart-Project,代码行数:20,代码来源:index.php


示例11: create

 public function create($options = array())
 {
     if (!isValid($options['email'], 'email')) {
         return formatErrors(604);
     }
     if (!isValid($options['password'], 'password')) {
         return formatErrors(602);
     }
     // Make sure email does not exist already
     $total = $this->count("email = '" . $options['email'] . "'");
     if ($total > 0) {
         return formatErrors(603);
     }
     // If you made it this far, we need to add the record to the DB
     $options['password'] = generateHash($options['password']);
     $options['created_on'] = date("Y-m-d H:i:s");
     // Create user token
     do {
         $options['user_token'] = generateToken(30) . md5(time());
         $total = $this->count("user_token = '" . $options['user_token'] . "'");
         // If by some freak chance there is a collision
         // Report it
         if ($total > 0) {
             log_message('debug', 'User token collision detected on key of `' . $options['user_token'] . '`');
         }
     } while ($total > 0);
     // Add record
     $q = $this->db->insert_string('users', $options);
     $res = $this->db->query($q);
     // Check for errors
     $this->sendException();
     if ($res === true) {
         $user_id = $this->db->insert_id();
         return $this->read($user_id);
     } else {
         return formatErrors(500);
     }
 }
开发者ID:iweave,项目名称:unmark,代码行数:38,代码来源:users_model.php


示例12: login

function login($conn)
{
    setcookie('token', "", 0, "/");
    $username = $_POST['username'];
    $password = sha1($_POST['password']);
    $sql = 'SELECT * FROM users WHERE username = ? AND password = ?';
    $stmt = $conn->prepare($sql);
    if ($stmt->execute(array($username, $password))) {
        $valid = false;
        while ($row = $stmt->fetch()) {
            $valid = true;
            $token = generateToken();
            $sql = 'UPDATE users SET token = ? WHERE username = ?';
            $stmt1 = $conn->prepare($sql);
            if ($stmt1->execute(array($token, $username))) {
                echo 'Login Successful';
            }
        }
        if (!$valid) {
            echo 'Username or Password Incorrect';
        }
    }
}
开发者ID:shumway-kyle-wm,项目名称:SimpleCart,代码行数:23,代码来源:index.php


示例13: register

function register($conn)
{
    $password = sha1($_POST['password']);
    $email = $_POST['email'];
    $name_first = $_POST['name_first'];
    $name_last = $_POST['name_last'];
    $address = $_POST['address'];
    $realtor = $_POST['realtor'];
    $token = generateToken();
    $sql = 'INSERT INTO users (password, email, name_first, name_last, address, realtor, token) VALUES (?, ?, ?, ?, ?, ?, ?)';
    $stmt = $conn->prepare($sql);
    try {
        if ($stmt->execute(array($password, $email, $name_first, $name_last, $address, $realtor, $token))) {
            setcookie('token', $token, 0, "/");
            $sql = 'INSERT INTO orders (users_id, status) (SELECT u.id, "new" FROM users u WHERE u.token = ?)';
            $stmt1 = $conn->prepare($sql);
            if ($stmt1->execute(array($token))) {
                echo 'Account Registered';
            }
        }
    } catch (PDOException $e) {
        echo 'Email already registered.';
    }
}
开发者ID:Tucker-Cole-wm,项目名称:Shopping-Cart-Project,代码行数:24,代码来源:register.php


示例14: generateHash

function generateHash($str)
{
    $salt = generateToken(50);
    if (CRYPT_SHA512 == 1) {
        return crypt($str, '$6$rounds=5000$' . $salt . '$');
    }
    if (CRYPT_SHA256 == 1) {
        return crypt($str, '$5$rounds=5000$' . $salt . '$');
    }
    if (CRYPT_BLOWFISH == 1) {
        return crypt($str, '$2a$07$' . $salt . '$');
    }
    if (CRYPT_MD5 == 1) {
        return crypt($str, '$1$' . $salt . '$');
    }
    if (CRYPT_EXT_DES == 1) {
        return crypt($str, '_J9' . $salt);
    }
    if (CRYPT_STD_DES == 1) {
        return crypt($str, $salt);
    }
    return false;
    // Throw exception once everything is hooked up
}
开发者ID:iweave,项目名称:unmark,代码行数:24,代码来源:hash_helper.php


示例15: connect

?>



    <!-- Test, Bild -->
    <img class="img-responsive" src="coverphoto.jpg" alt="Coverphoto">


    <!-- Visa produkter -->
    <?php 
$con = connect();
// to prevent undefined index notice
$action = isset($_GET['action']) ? $_GET['action'] : "";
$product_id = isset($_GET['product_id']) ? $_GET['product_id'] : "1";
$productName = isset($_GET['productName']) ? $_GET['productName'] : "";
$token = generateToken();
if ($action == 'added') {
    echo "<div class='alert alert-info'>";
    echo "<strong>{$productName}</strong> tillagt i varukorgen!";
    echo "</div>";
}
if ($action == 'exists') {
    echo "<div class='alert alert-info'>";
    echo "<strong>{$productName}</strong> finns redan i varukorgen!";
    echo "</div>";
}
$query = "SELECT id, productName, price FROM Products ORDER BY productName";
$stmt = $con->prepare($query);
$stmt->execute();
$num = $stmt->rowCount();
if ($num > 0) {
开发者ID:johanmansson,项目名称:EITF05-Webbsakerhet,代码行数:31,代码来源:webbshop.php


示例16: foreach

			<tbody>
	<?php 
            $i = 1;
            foreach ($set as $row) {
                //Country  Repayment Instructions
                if (!isset($row['name'])) {
                    $row['name'] = 'All Active Countries';
                }
                $country = $row['name'];
                $description = nl2br($row['description']);
                $id = $row['id'];
                $editurl = SITE_URL . "index.php?p=11&a=13&ac=edit&id=" . $id;
                $delurl = SITE_URL . "index.php?p=11&a=13&ac=del&id=" . $id;
                echo "<form enctype='multipart/form-data' method='post' action='updateprocess.php' id='del_repayment_instruction{$id}'>";
                echo "<input type='hidden' name='ac' value='del'>";
                echo "<input type='hidden' name='del-repayment_instruction'>";
                echo "<input type='hidden' name='user_guess' value='" . generateToken('del-repayment_instruction') . "'>";
                echo "<input type='hidden' name='id' value='{$id}'></form>";
                echo "<tr align='center'>";
                echo "<td>{$i}</td><td>{$country}</a></td><td>{$description}</td>";
                echo "<td>\n\t\t\t\t\t\t\t<a href='{$editurl}'>\n\t\t\t\t\t\t\t\t<img alt='Edit' title='Edit' src='images/layout/icons/edit.png'/>\n\t\t\t\t\t\t\t</a>&nbsp;&nbsp;\n\t\t\t\t\t\t\t<a href='javascript:void(0)' onClick='javascript:myDelete(\"{$id}\")'>\n\t\t\t\t\t\t\t\t<img alt='Delete' title='Delete' src='images/layout/icons/x.png'/>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</td>";
                echo "</tr>";
                $i++;
            }
            ?>
			</tbody>
		</table>
	<?php 
        }
    }
}
开发者ID:mickdane,项目名称:zidisha,代码行数:31,代码来源:manage_r_instruction.php


示例17: generateToken

</div>
													</td>
												</tr>
												<tr>
													<td>&nbsp;</td>
													<td style="padding-top:10px;">
														<div>
															<div class="left">
																<div class="left"><input name="sendme" type="checkbox" /></div>
																<div class="right" style="font-family:Arial;margin-top:3px;">Send me a copy</div>
																<div class="clear"></div>
															</div>
															<div class="right" style="margin-right:5px;">
																<input type="hidden" id="sendJoinEmail" name="sendJoinEmail" />
																<input type="hidden" name="user_guess" value="<?php 
echo generateToken('sendJoinEmail');
?>
"/>
																<input type="hidden" name="formbidpos" value="<?php 
echo $showShareBox;
?>
" />
																<input type="hidden" name="email_sub" value="<?php 
echo $share_msg;
?>
" />
																<?php 
unset($_SESSION['shareEmailValidate']);
?>
																<input type="image" src="images/layout/popup/send_button.png" name="Send"/>
															</div>
开发者ID:narvee,项目名称:nripl.org,代码行数:31,代码来源:additional_verification.php


示例18: wifidog_login

function wifidog_login($error = null)
{
    $sock = new sockets();
    session_start();
    $ipClass = new IP();
    $tpl = new templates();
    $USE_TERMS_ACCEPTED = false;
    header('Content-Type: text/html; charset=iso-8859-1');
    $gateway_addr = $_REQUEST["gw_address"];
    $gw_port = $_REQUEST["gw_port"];
    $gw_id = $_REQUEST["gw_id"];
    $ARP = $_REQUEST["mac"];
    $url = $_REQUEST["url"];
    if (isset($_POST["wifidog-terms"])) {
        $_SESSION["USE_TERMS_ACCEPTED"] = true;
        $USE_TERMS_ACCEPTED = true;
    }
    if (isset($_SESSION["USE_TERMS_ACCEPTED"])) {
        $USE_TERMS_ACCEPTED = true;
    }
    if (!$ipClass->IsvalidMAC($ARP)) {
        $text_form = $tpl->_ENGINE_parse_body(FATAL_ERROR_SHOW_128("{hostspot_network_incompatible}"));
    }
    if (!isset($_REQUEST["token"])) {
        $_REQUEST["token"] = generateToken($ARP);
    }
    $wifidog_build_uri = wifidog_build_uri();
    $uriext = $wifidog_build_uri[0];
    $HiddenFields = $wifidog_build_uri[1];
    $ArticaHotSpotSMTP = SMTP_SETTINGS();
    if ($ArticaHotSpotSMTP["USE_TERMS"] == 1) {
        if (!$USE_TERMS_ACCEPTED) {
            return wifidog_terms();
        }
    }
    $fontsize = $ArticaHotSpotSMTP["SKIN_FONT_SIZE"];
    $ArticaSplashHotSpotTitle = $sock->GET_INFO("ArticaSplashHotSpotTitle");
    if ($ArticaSplashHotSpotTitle == null) {
        $ArticaSplashHotSpotTitle = "HotSpot system";
    }
    $tpl = new templates();
    $username = $tpl->_ENGINE_parse_body("{username}");
    $password = $tpl->_ENGINE_parse_body("{password}");
    $please_sign_in = $tpl->_ENGINE_parse_body("{please_sign_in}");
    $page = CurrentPageName();
    $ArticaSplashHotSpotTitle = $sock->GET_INFO("ArticaSplashHotSpotTitle");
    if ($ArticaSplashHotSpotTitle == null) {
        $ArticaSplashHotSpotTitle = "HotSpot system";
    }
    $lost_password_text = $tpl->_ENGINE_parse_body("{lost_password}");
    if (!isset($ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"])) {
        $ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"] = 0;
    }
    if (!isset($ArticaHotSpotSMTP["ENABLED_SMTP"])) {
        $ArticaHotSpotSMTP["ENABLED_SMTP"] = 0;
    }
    $t = time();
    unset($_SESSION["HOTSPOT_AUTO_RECOVER"]);
    $_SESSION["HOTSPOT_REDIRECT_URL"] = $url;
    $url_encoded = urlencode($url);
    $Connexion = $tpl->_ENGINE_parse_body("{connection}");
    $page = CurrentPageName();
    $f[] = "";
    $f[] = "    <div id='content'>";
    $f[] = "    ";
    $f[] = "\t\t\t<form id='wifidogform' action=\"{$page}\" method=\"post\">";
    $f[] = "{$HiddenFields}";
    $f[] = "\t\t\t\t<div class=\"f\">";
    $f[] = "\t\t\t\t\t<div class=\"field\">";
    $f[] = "\t\t\t\t\t\t<label for=\"username\" style='font-size:{$ArticaHotSpotSMTP["SKIN_LABEL_FONT_SIZE"]}'>{$username}:</label> <input type=\"text\" \n\t\tname=\"username\" \n\t\tid=\"username\"\n\t\tvalue=\"{$_REQUEST["username"]}\" \n\t\tonfocus=\"this.setAttribute('class','active');RemoveLogonCSS();\" \n\t\tonblur=\"this.removeAttribute('class');\" \n\t\tOnKeyPress=\"javascript:SendLogon{$t}(event)\">";
    $f[] = "\t\t";
    $f[] = "</div>";
    $f[] = "\t<div class=\"field\">";
    $f[] = "\t\t<label for=\"password\" style='font-size:{$ArticaHotSpotSMTP["SKIN_LABEL_FONT_SIZE"]}'>{$password}:</label> <input type=\"password\" name=\"password\" \n\t\t\t\tvalue=\"{$_REQUEST["password"]}\"\n\t\t\t\tid=\"password\" onfocus=\"this.setAttribute('class','active');RemoveLogonCSS();\" \n\t\t\t\tonblur=\"this.removeAttribute('class');\" OnKeyPress=\"javascript:SendLogon{$t}(event)\">";
    if ($ArticaHotSpotSMTP["ENABLED_SMTP"] == 1) {
        $f[] = "<div style='text-align:right'><a href=\"{$page}?wifidog-recover=yes&email={$_REQUEST["username"]}&{$uriext}\">{$lost_password_text}</a></div>";
    }
    $f[] = "\t\t\t\t\t</div>";
    $f[] = "\t\t\t\t\t<div class=\"field button\">";
    if ($ArticaHotSpotSMTP["ENABLED_AUTO_LOGIN"] == 1) {
        $register = $tpl->_ENGINE_parse_body("{register}");
        $f[] = "\t\t\t\t\t\t<a data-loading-text=\"Chargement...\"\n\t\tstyle=\"font-size:{$fontsize};text-transform:capitalize\"\n\t\tclass=\"Button2014 Button2014-success Button2014-lg\"\n\t\tid=\"fb92ae5e1f7bbea3b5044cbcdd40f088\"\n\t\thref=\"{$page}?wifidog-register=yes&{$uriext}\">&laquo;&nbsp;{$register}&nbsp;&raquo;</a>";
    }
    $f[] = "<a data-loading-text=\"Chargement...\" \n\t\t\tstyle=\"font-size:{$fontsize};text-transform:capitalize\" \n\t\t\tclass=\"Button2014 Button2014-success Button2014-lg\" \n\t\t\tid=\"fb92ae5e1f7bbea3b5044cbcdd40f088\" \n\t\t\tonclick=\"javascript:document.forms['wifidogform'].submit();\" \n\t\t\thref=\"javascript:Blurz()\">&laquo;&nbsp;{$Connexion}&nbsp;&raquo;</a>";
    $f[] = "\t\t\t\t\t</div>";
    if ($ArticaHotSpotSMTP["SKIN_TEXT_LOGON"] != null) {
        $f[] = "<p style='font-size:{$ArticaHotSpotSMTP["SKIN_FONT_SIZE"]};padding:8px'>{$ArticaHotSpotSMTP["SKIN_TEXT_LOGON"]}</p>";
    }
    $f[] = "\t\t\t\t</div>";
    $f[] = "\t\t";
    $f[] = "\t\t\t</form>\t";
    $f[] = "</div>\n\t<script>\n\t\tfunction SendLogon{$t}(e){\n\t\t\tif(!checkEnter(e)){return;}\n\t\t\tdocument.forms['wifidogform'].submit();\n\t\t}\n\t</script>\n\t\n";
    $text_form = @implode("\n", $f);
    echo BuildFullPage($text_form, $error);
}
开发者ID:brucewu16899,项目名称:1.6.x,代码行数:95,代码来源:hotspot.php


示例19: confirm

    ?>
</td>
                    <td>
                        <?php 
    if ($deletable) {
        ?>
                            <form action="updateprocess.php" method="post" onsubmit="return confirm('<?php 
        echo $lang['invite']['delete_confirm'];
        ?>
')">
                                <input type="hidden" name="id" value="<?php 
        echo $rows['id'];
        ?>
"/>
                                <input type='hidden' name='user_guess' value="<?php 
        echo generateToken('bdelete_invitee');
        ?>
"/>
                                <input type="hidden" name="bdelete_invitee" value="bdelete_invitee"/>
                                <input type="submit" value="<?php 
        echo $lang['invite']['delete'];
        ?>
"/>
                            </form>
                        <?php 
    }
    ?>
                    </td>
				</tr>
	<?php 
}
开发者ID:narvee,项目名称:nripl.org,代码行数:31,代码来源:brwrinvited_member.php


示例20: unset

}
if (isset($_SESSION['not_athorized'])) {
    ?>
<div style="color:red">You are not authorized to do this.</div>
<?php 
    unset($_SESSION['not_athorized']);
}
?>
	<form method="post" action="process.php">
	<table class='detail'>
	<tr>
		<td>Enter payment id</td>
		<td>
			<input type='text' name='payment_id'/>
			<input type="hidden" name="remove_payment">
			<input type="hidden" name="user_guess" value="<?php 
echo generateToken('remove_payment');
?>
"/>
		</td>
	</tr>
	<tr>
		<td></td>
		<td>
			<input type="submit" class='btn' value='Remove'>
		</td>
	</tr>
	</table>
		
	</form>
</div>
开发者ID:mickdane,项目名称:zidisha,代码行数:31,代码来源:repay_revert.php



注:本文中的generateToken函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP generateURL函数代码示例发布时间:2022-05-15
下一篇:
PHP generateSystemid函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap