本文整理汇总了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());
}
示例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);
}
示例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));
}
}
示例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;
}
}
示例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 !!";
}