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


PHP Schedule::add方法代碼示例

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


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

示例1: onReceive

 public function onReceive($server, $fd, $fromId, $data)
 {
     //echo "receive \n";
     $tttt = new Schedule();
     $test = new TestController($server, $fd, $fromId, array());
     $tttt->add($test->test());
 }
開發者ID:learsu,項目名稱:php-swoole-framework,代碼行數:7,代碼來源:testTcpServ.php

示例2: onReceive

 public function onReceive($server, $fd, $fromId, $data)
 {
     $tttt = new Schedule();
     $test = new TestController($server, $fd, array());
     $tttt->add($test->test());
     $tttt->run();
     $this->server->send($fd, $data);
 }
開發者ID:learsu,項目名稱:php-swoole-framework,代碼行數:8,代碼來源:testUdpServ.php

示例3: postNewshedule

 public function postNewshedule()
 {
     $data = Input::only('name', 'desc', 'start_date', 'end_date', 'updatedby');
     $scObj = new Schedule();
     $update = $scObj->add($data['name'], $data['desc'], Carbon::createFromFormat('d-m-Y', $data['start_date']), Carbon::createFromFormat('d-m-Y', $data['end_date']), $data['updatedby']);
     if ($update) {
         return Redirect::to('admin/schedules');
         //return Response::json(array('status' => '1',$data));
     } else {
         return Response::json(array('status' => '0', $data));
     }
 }
開發者ID:arizawan,項目名稱:livetvwithyoutube,代碼行數:12,代碼來源:RainTvController.php

示例4: isset

 * @author George Skarlatos
 * @since 9/19/2014
 */
require __DIR__ . '/../app/init.php';
$general->loggedOutProtect();
try {
    $tutors = TutorFetcher::retrieveActive();
    $currentTerms = TermFetcher::retrieveCurrTerm();
    $schedules = ScheduleFetcher::retrieveTutorsOnCurrentTerms();
    if (isUrlRequestingAllSchedules($user)) {
        $pageTitle = "All Schedules";
    } else {
        if (isBtnAddSchedulePrsd()) {
            $pageTitle = "Add schedule";
            $days = isset($_POST['day']) ? $_POST['day'] : null;
            Schedule::add($_POST['tutorId'], $_POST['termId'], $days, $_POST['startsAt'], $_POST['endsAt']);
            header('Location: ' . BASE_URL . 'staff/schedules/success');
            exit;
        } else {
            if (isBtnDeletePrsd()) {
                Schedule::delete($_POST['delScheduleIdModal']);
                header('Location: ' . BASE_URL . 'staff/schedules/success');
                exit;
            } else {
                if (isModificationSuccessful()) {
                    $pageTitle = "Schedule added - Success";
                } else {
                    header('Location: ' . BASE_URL . 'error-404');
                    exit;
                }
            }
開發者ID:sass-team,項目名稱:sass-app,代碼行數:31,代碼來源:schedules.php

示例5: header

<?php

require_once 'core/init.php';
$member_role = $_SESSION['roles'];
if (in_array("Laboratory Administrator", $member_role)) {
} else {
    header('location:restricted_page.php');
}
$start_date = $_POST["sem_start_date"];
$end_date = $_POST["sem_end_date"];
if (strtotime($start_date) < strtotime($end_date)) {
    $data = array("schedule_id" => null, "semester_no" => $_POST["semester"], "academic_year" => $_POST["academic_year"], "schedule_start_date" => $_POST["sem_start_date"], "schedule_end_date" => $_POST["sem_end_date"]);
    $newSchedule = new Schedule();
    $newSchedule->create($data);
    if ($newSchedule->add()) {
        echo "You have successfully added a schedule !";
    } else {
        echo "Schedule creation was unsuccessful !";
    }
} else {
    echo "Schedule start date must be less than schedule end date !!";
}
開發者ID:NalindaHemanga,項目名稱:ELMS,代碼行數:22,代碼來源:add_schedule.php


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