当前位置: 首页>>代码示例>>PHP>>正文


PHP Admin::get方法代码示例

本文整理汇总了PHP中Admin::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin::get方法的具体用法?PHP Admin::get怎么用?PHP Admin::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Admin的用法示例。


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

示例1: loginControl

 public function loginControl()
 {
     $email = Input::get('email');
     $pw = Input::get('password');
     $members = Members::get();
     $admins = Admin::get();
     foreach ($admins as $admin) {
         if ($email == $admin->email && Hash::check($pw, $admin->password)) {
             Session::put('adminLoggedIn', true);
             return Redirect::to('admin');
         }
     }
     foreach ($members as $m) {
         if ($m->email == $email && Hash::check($pw, $m->password)) {
             Session::put('key', $m->memberID);
             return Redirect::to('homepage');
         }
     }
     return View::make('login', array('message' => 'Kullanıcı adı veya Şifre Yanlış!'));
 }
开发者ID:mitap45,项目名称:Daily,代码行数:20,代码来源:HomeController.php

示例2: routes

 public static function routes($app = false)
 {
     foreach (Admin::get() as $model) {
         if (!empty($model->middleware)) {
             if ($app) {
                 $app->group(['middleware' => $model->middleware], function () use($model, $app) {
                     Admin::resource($app, 'admin/' . strtolower($model->model), 'CRUDController');
                 });
             } else {
                 Route::group(['middleware' => $model->middleware], function () use($model) {
                     Route::resource('admin/' . strtolower($model->model), 'CRUDController');
                 });
             }
         } else {
             if ($app) {
                 Admin::resource($app, 'admin/' . strtolower($model->model), 'CRUDController');
             } else {
                 Route::resource('admin/' . strtolower($model->model), 'CRUDController');
             }
         }
     }
 }
开发者ID:hugofabricio,项目名称:laravel-crud,代码行数:22,代码来源:Admin.php

示例3:

            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="home.php">Site Admin</a> 
            </div>
            <div style="color: white;
padding: 15px 50px 5px 50px;
float: right;
font-size: 16px;">                 
      <?php 
/**********************************************************************/
$admin = Admin::get($_SESSION['admin_id']);
echo "Last login: " . $admin->admin_last_login;
/************************************************************************/
?>
      
       &nbsp; 
       
      <a href="logout.php" class="btn btn-danger square-btn-adjust">Izloguj se <i class="fa fa-sign-out"></i></a></div>
        </nav>
           <!-- /. NAV TOP  -->
                <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="main-menu">
		<li class="text-center">
                    <img src="assets/img/gaga.jpg" class="user-image img-responsive"/>
		</li>
开发者ID:savicdragan15,项目名称:gaga,代码行数:31,代码来源:home.php

示例4: DateTime

<?php

require 'config.php';
$admins = Admin::get("1");
//print_r($admins);
foreach ($admins as $a) {
    $a[0];
}
$curdate = new DateTime('l');
$curdate = $curdate->format('d M Y H:i');
$admin = new Admin();
//$admin->admin_id = $a[0];
//$admin->admin_last_login = $curdate;
//$admin->save();
Admin::logout();
header("location: index.php");
开发者ID:veradjedovic,项目名称:news,代码行数:16,代码来源:logout.php

示例5: session_start

require_once "uploadImages.class.php";
session_start();
if (isset($_REQUEST['deconnexion'])) {
    session_unset();
    session_destroy();
}
$conn = Connection::get();
//Vérification identifiant et mdp avec BdD. si oui accueil admin et ouverture session
if (!empty($_POST['login']) && !empty($_POST['password']) or isset($_SESSION['connecte'])) {
    if (!empty($_POST['login']) && !empty($_POST['password'])) {
        $listeAdmin = Admin::getAdmin();
        $data = array();
        foreach ($listeAdmin as $value) {
            if ($value['identifiant_admin'] == $_POST['login'] && crypt($_POST['password'], $value['mdp_admin']) == $value['mdp_admin']) {
                header("Cache-Control: private");
                $_SESSION['admin'] = Admin::get($value['identifiant_admin']);
                $_SESSION['connecte'] = true;
                $data[0] = 'yes';
                $data[1] = $_SESSION['connecte'];
                break;
            } else {
                $data[0] = 'no';
            }
        }
        echo json_encode($data);
    } else {
        //accueil admin (liste evt)
        if (isset($_REQUEST['consulter_evenement'])) {
            $event = Evenement::getEventArray();
            $event[] = $_SESSION['connecte'];
            echo json_encode($event);
开发者ID:ThierryHund,项目名称:projet_conf,代码行数:31,代码来源:controler_admin.php


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