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


PHP Schedule::get方法代碼示例

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


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

示例1: scheduleformAction

 public function scheduleformAction()
 {
     try {
         $this->checkLogin();
         $schedule = new Schedule();
         $this->view->assign('regist_schedule', $schedule->get('regist'));
         $this->view->assign('impression_schedule', $schedule->get('impre'));
         $this->view->assign('root_url', ROOT_URL);
         $this->view->display('admin/admin_scheduleform.tpl');
     } catch (Exception $e) {
         $this->displayErrorView($e->getMessage());
     }
 }
開發者ID:ktanifuji,項目名稱:gr3,代碼行數:13,代碼來源:AdminController.php

示例2: schedule_controller

function schedule_controller()
{
    global $session, $route, $mysqli, $user;
    $result = false;
    require "Modules/schedule/schedule_model.php";
    $schedule = new Schedule($mysqli, $user->get_timezone($session['userid']));
    if ($route->format == 'html') {
        if ($route->action == "view" && $session['write']) {
            $result = view("Modules/schedule/Views/schedule_view.php", array());
        }
        if ($route->action == 'api') {
            $result = view("Modules/schedule/Views/schedule_api.php", array());
        }
    }
    if ($route->format == 'json') {
        if ($route->action == 'list') {
            if ($session['userid'] > 0 && $session['userid'] && $session['read']) {
                $result = $schedule->get_list($session['userid']);
            }
        } elseif ($route->action == "create") {
            if ($session['userid'] > 0 && $session['write']) {
                $result = $schedule->create($session['userid']);
            }
        } else {
            $scheduleid = (int) get('id');
            if ($schedule->exist($scheduleid)) {
                $scheduleget = $schedule->get($scheduleid);
                // if public or belongs to user
                if ($session['read'] && ($scheduleget['public'] || $session['userid'] > 0 && $scheduleget['userid'] == $session['userid'])) {
                    if ($route->action == "get") {
                        $result = $scheduleget;
                    }
                    if ($route->action == "expression") {
                        $result = $schedule->get_expression($scheduleid);
                    }
                    if ($route->action == "test") {
                        $result = $schedule->test_expression($scheduleid);
                    }
                }
                // if public
                if (isset($session['write']) && $session['write'] && $session['userid'] > 0 && $scheduleget['userid'] == $session['userid']) {
                    if ($route->action == "delete") {
                        $result = $schedule->delete($scheduleid);
                    }
                    if ($route->action == 'set') {
                        $result = $schedule->set_fields($scheduleid, get('fields'));
                    }
                }
            } else {
                $result = array('success' => false, 'message' => 'Schedule does not exist');
            }
        }
    }
    return array('content' => $result);
}
開發者ID:alj56,項目名稱:emoncms,代碼行數:55,代碼來源:schedule_controller.php

示例3: function

 # Admin Schedules
 Route::get('/', function () {
     $schedules = Schedule::get();
     return View::make('backend.schedules')->with('schedules', $schedules);
 });
 # Admin Add Schedules;
 Route::get('/add', function () {
     $user = Sentry::getUser();
     return View::make('backend.addschedules')->with('user', $user);
 });
 # Admin Status Change Schedules;
 Route::get('/status/{status}/{id}', function ($status, $id) {
     $user = Sentry::getUser();
     $scObj = new Schedule();
     $update = $scObj->changeStatus($id, $status, $user->id);
     $schedules = Schedule::get();
     return View::make('backend.schedules')->with('schedules', $schedules);
 });
 # Admin Delete Schedules;
 Route::get('/delete/{id}', function ($id) {
     $scObj = Schedule::find($id);
     //dd($scObj);
     $delobj = $scObj->delete();
     if ($delobj) {
         echo 1;
     } else {
         echo 0;
     }
 });
 Route::post('/add', array('uses' => 'RainTvController@postNewshedule'));
 # Admin edit Schedules
開發者ID:arizawan,項目名稱:chaity.com,代碼行數:31,代碼來源:routes.php


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