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