本文整理汇总了PHP中Schedule::setNote方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::setNote方法的具体用法?PHP Schedule::setNote怎么用?PHP Schedule::setNote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule::setNote方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Error
//Ajout de i semaine (i x 7 jours x 24 heures x 3600 secondes) à la date de fin
$block->setDateStop($datefin + 24 * 3600 * 7 * $i);
$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']);
示例2: Schedule
} 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.");
} else {
$result = SchedulesManager::instance()->add($sc);
if (Tools::getClass($result) == "Error") {
$errors["rdv"] = $result;
} else {
$errors['rdv'] = new Error("Le rendez-vous a bien été pris auprès de votre médecin", "info");
}
}