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


PHP Dashboard::index方法代码示例

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


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

示例1: isset

 function __construct()
 {
     global $url;
     $url = isset($_GET['url']) ? $_GET['url'] : null;
     $url = rtrim($url, '/');
     $url = explode('/', $url);
     $this->db = new Database();
     if (!isset($_SESSION['x_equi']) && $url[0] != 'login') {
         header("location:" . _EQROOT_ . 'login');
     }
     if (empty($url[0])) {
         require 'controllers/dashboard.php';
         $controller = new Dashboard();
         $controller->index();
         return false;
     }
     $file = 'controllers/' . $url[0] . '.php';
     if (file_exists($file)) {
         require $file;
         $controller = new $url[0]();
         $controller->loadModel($url[0]);
         // calling methods
         if (isset($url[2])) {
             if (method_exists($controller, $url[1])) {
                 $controller->{$url[1]}($url[2]);
             } else {
                 $this->error();
             }
         } else {
             if (isset($url[1])) {
                 if (method_exists($controller, $url[1])) {
                     $controller->{$url[1]}();
                 } else {
                     $this->error();
                 }
             } else {
                 $controller->index();
             }
         }
     } else {
         $this->error();
     }
 }
开发者ID:eddythemeddy,项目名称:Equinox-CMS,代码行数:43,代码来源:Bootstrap.php

示例2: explode

 function __construct()
 {
     //parent::_construct();
     global $database;
     $vari = $_SERVER['REQUEST_URI'];
     $vari = explode("/", $vari);
     if (isset($_GET['url'])) {
         $url = $_GET['url'];
         $url = rtrim($url);
         $url = explode('/', $_GET['url']);
     } else {
         $url = null;
     }
     if (empty($url[0])) {
         require "controllers/dashboard.php";
         $controller = new Dashboard();
         $controller->index();
         exit;
     }
     $file = "controllers/" . $url[0] . ".php";
     if (file_exists($file)) {
         require $file;
     } elseif ($vari[1] == 'scratch' && count($vari) === 3) {
         require "controllers/pages.php";
         $controller = new Pages();
         $controller->index();
         exit;
     } else {
         require "controllers/error.php";
         $controller = new Error();
         return false;
     }
     $controller = new $url[0]();
     if (isset($url[2]) && !empty($url[2])) {
         $controller->{$url[1]}($url[2]);
     } else {
         if (isset($url[1])) {
             $controller->{$url[1]}();
         }
     }
 }
开发者ID:runningjack,项目名称:RobertJohnson,代码行数:41,代码来源:bootstrap.php

示例3: function

});
$route->respond('POST', '/store', function ($request, $response) use($home) {
    return $home->store($request, $response);
});
$route->respond('GET', '/login', function () use($home) {
    echo $home->getLogin();
    unset($_SESSION['flash']);
});
$route->respond('POST', '/login', function ($request, $response, $service) use($home) {
    return $home->postLogin($request, $response, $service);
});
$route->respond('GET', '/logout', function ($request, $response, $service) use($home) {
    return $home->logout($request, $response, $service);
});
$route->respond('GET', '/dashboard/index', function ($request, $response) use($dashboard) {
    return $dashboard->index($request, $response);
});
$route->respond('GET', '/dashboard/show', function ($request, $response) use($dashboard) {
    return $dashboard->show($request, $response);
});
$route->respond('GET', '/dashboard/delete/[i:id]', function ($request, $response) use($dashboard) {
    return $dashboard->delete($request, $response);
});
$route->respond('GET', '/dashboard/edit/[i:id]', function ($request, $response) use($dashboard) {
    return $dashboard->edit($request, $response);
});
$route->respond('POST', '/dashboard/edit/[i:id]', function ($request, $response) use($dashboard) {
    return $dashboard->update($request, $response);
});
$route->respond('GET', '/dashboard/leave/index', function ($request, $response) use($leave) {
    return $leave->index($request, $response);
开发者ID:nahidex,项目名称:Employee-Leave-Management-,代码行数:31,代码来源:routes.php


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