當前位置: 首頁>>代碼示例>>PHP>>正文


PHP admin::setPassword方法代碼示例

本文整理匯總了PHP中admin::setPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin::setPassword方法的具體用法?PHP admin::setPassword怎麽用?PHP admin::setPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在admin的用法示例。


在下文中一共展示了admin::setPassword方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: admin

<?php

session_start();
require_once '../classes/connection.class.php';
require_once '../classes/admin.class.php';
$objValidate = new admin();
$username = mysqli_real_escape_string($objValidate->conxn, $_POST['username']);
$password = mysqli_real_escape_string($objValidate->conxn, $_POST['password']);
//$password=crypt($password);
$objValidate->setUsername($username);
$objValidate->setPassword($password);
$flag = $objValidate->validateAdmin();
/*echo $objValidate->sql;
exit;*/
// echo '<pre>';
// print_r ($objValidate);
// echo '</pre>';
// exit;
if ($flag) {
    $_SESSION['username'] = $username;
    //$_SESSION['adminid']=$user_id;
    header('location:../index.php?homepage');
} else {
    header('location:../login.php?err=.base64_decode("invalid username and password")');
    $_SESSION['msg'] = $adduserobj->msg = "Sorry incorrect username and password";
}
開發者ID:Ukesh2010,項目名稱:aila,代碼行數:26,代碼來源:process_login.php

示例2: creaAdminDaArray

 /**
  * Crea un addetto ordini da una riga del db
  * @param type $row
  * @return \admin
  */
 public function creaAdminDaArray($row)
 {
     $admin = new admin();
     $admin->setId($row['admin_id']);
     $admin->setNome($row['admin_nome']);
     $admin->setCognome($row['admin_cognome']);
     $admin->setVia($row['admin_via']);
     $admin->setCivico($row['admin_civico']);
     $admin->setCitta($row['admin_citta']);
     $admin->setCap($row['admin_cap']);
     $admin->setTelefono($row['admin_telefono']);
     $admin->setRuolo(User::admin);
     $admin->setUsername($row['admin_username']);
     $admin->setPassword($row['admin_password']);
     return $admin;
 }
開發者ID:headlessdoll,項目名稱:Amm2015,代碼行數:21,代碼來源:UserFactory.php

示例3: header

include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
    header("Location: /admin/login.php");
}
if (!empty($_POST)) {
    $authToken = isset($_POST['authenticity_token']) ? $_POST['authenticity_token'] : '';
    $current_passw = isset($_POST['current_passw']) ? $_POST['current_passw'] : '';
    $new_passw = isset($_POST['new_passw']) ? $_POST['new_passw'] : '';
    $current_passw = helper::clearText($current_passw);
    $current_passw = helper::escapeText($current_passw);
    $new_passw = helper::clearText($new_passw);
    $new_passw = helper::escapeText($new_passw);
    if ($authToken === helper::getAuthenticityToken() && !APP_DEMO) {
        $admin = new admin($dbo);
        $admin->setId(admin::getCurrentAdminId());
        $result = $admin->setPassword($current_passw, $new_passw);
        if ($result['error'] === false) {
            header("Location: /admin/settings.php/?result=success");
            exit;
        } else {
            header("Location: /admin/settings.php/?result=error");
            exit;
        }
    }
    header("Location: /admin/settings.php");
    exit;
}
$stats = new stats($dbo);
$page_id = "settings";
$error = false;
$error_message = '';
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:31,代碼來源:settings.php


注:本文中的admin::setPassword方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。