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