本文整理汇总了PHP中Schedule::setIdDoctor方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::setIdDoctor方法的具体用法?PHP Schedule::setIdDoctor怎么用?PHP Schedule::setIdDoctor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule::setIdDoctor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Error
$block->setNote($_POST['infos']);
$block->setRecursion('7');
$block->setIdDoctor($_SESSION['user']->getIdMember());
$errors['blocage-horaires'] = SchedulesManager::instance()->addBlock($block);
}
}
} else {
$errors['blocage-horaires'] = new Error("Veuillez indiquer le nombre de semaines pour la récursivité");
}
} else {
$block = new Schedule();
$block->setDateStart(strtotime($_POST['ddebut'] . " " . $_POST['hdebut'] . ":0"));
$block->setDateStop(strtotime($_POST['dfin'] . " " . $_POST['hfin'] . ":0"));
$block->setNote($_POST['infos']);
$block->setRecursion('0');
$block->setIdDoctor($_SESSION['user']->getIdMember());
$errors['blocage-horaires'] = SchedulesManager::instance()->addBlock($block);
}
} else {
$errors['blocage-horaires'] = new Error("Veuillez remplir tous les champs correctement");
}
} else {
$errors['blocage-horaires'] = new Error("Veuillez remplir tous les champs correctement");
}
}
//Suppresion d'un blocage
if (isset($_GET['del']) and isset($_GET['id'])) {
if ($_GET['del'] == "delete") {
//SchedulesManager::instance()->deleteBlock($_GET['id']);
SchedulesManager::instance()->deleteBlock($_SESSION['user']->getIdMember(), $_GET['id']);
}
示例2: DateTime
}
}
if (!isset($_GET['start']) or !isset($dateStart)) {
$dateStart = new DateTime(date("Y-m-d H:i:s"));
}
} else {
Tools::redirect("home");
}
} else {
Tools::redirect("home");
}
//PRISE D'UN RENDEZ-VOUS
if (isset($_POST['date-rdv']) and isset($_POST['time-rdv']) and isset($_POST['tk']) and $_POST['tk'] == $_SESSION['token2'] and $_SESSION['user']->getIdMember() != $_GET['doctor']) {
if (Tools::checkDate($_POST['date-rdv']) and Tools::checkTime($_POST['time-rdv']) and isset($_POST['valid-rdv'])) {
$sc = new Schedule();
$sc->setIdDoctor($doctor->getIdMember());
$sc->setIdMember($_SESSION['user']->getIdMember());
$sc->setDateStart(strtotime($_POST['date-rdv'] . " " . $_POST['time-rdv'] . ":00"));
$sc->setDateStop($sc->getDateStart() + $doctor->getRdvDuration() * 60);
if ($doctor->getRdvConfirm() == 0) {
$sc->setValidate(1);
}
if (isset($_POST['note'])) {
$sc->setNote(Tools::secure($_POST['note']));
}
$dayStartHour = strtotime($_POST['date-rdv'] . " " . $doctor->getStartHour('h') . ":" . $doctor->getStartHour('m') . ":00");
$result = SchedulesManager::instance()->getLastBlockedBlockHour($doctor->getIdMember(), $dayStartHour, $sc->getDateStart());
$calage = abs($sc->getDateStart() - $result);
$calage = $calage % ($doctor->getRdvDuration() * 60);
if ($calage != 0) {
$errors['rdv'] = new Error("Vous ne pouvez pas prendre un rendez-vous en dehors des heures fixées par le calendrier.");