当前位置: 首页>>代码示例>>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;未经允许,请勿转载。