当前位置: 首页>>代码示例>>PHP>>正文


PHP Appointment::cancelAppointment方法代码示例

本文整理汇总了PHP中Appointment::cancelAppointment方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::cancelAppointment方法的具体用法?PHP Appointment::cancelAppointment怎么用?PHP Appointment::cancelAppointment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Appointment的用法示例。


在下文中一共展示了Appointment::cancelAppointment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: date

    $currMonth = date('m');
}
if (!isset($currYear) || !$currYear) {
    $currYear = date('Y');
}
if (isset($_SESSION['sess_parent_mod'])) {
    $_SESSION['sess_parent_mod'] = '';
}
$thisfile = basename(__FILE__);
$editorfile = $root_path . 'modules/registration_admission/show_appointment.php';
require_once $root_path . 'include/care_api_classes/class_appointment.php';
$appt_obj = new Appointment();
if (!isset($mode)) {
    $mode = 'show';
} elseif ($mode == 'appt_cancel' && !empty($nr)) {
    if ($appt_obj->cancelAppointment($nr, $reason, $_SESSION['sess_user_name'])) {
        header("location:{$thisfile}" . URL_REDIRECT_APPEND . "&currYear={$currYear}&currMonth={$currMonth}&currDay={$currDay}");
        exit;
    } else {
        echo "{$appt_obj->sql}<br>{$LDDbNoUpdate}";
    }
}
if ($mode == 'show') {
    # Clean doc
    if (isset($aux)) {
        $aux = trim($aux);
    }
    # Get the appointments basing on some conditions
    if (isset($dept_nr) && $dept_nr) {
        # Get by department
        $result =& $appt_obj->getAllByDeptObj($currYear, $currMonth, $currDay, $dept_nr);
开发者ID:patmark,项目名称:care2x-tz,代码行数:31,代码来源:appt_show.php

示例2: Appointment

<?php

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['app_id']) && !empty($_POST['app_id'])) {
        include_once "class/Appointment.class.php";
        include_once "class/Database.class.php";
        $appointment = new Appointment();
        $app_id = $_POST['app_id'];
        $ss = $appointment->cancelAppointment($app_id);
        if ($ss) {
            include_once "class/User.class.php";
            include_once "class/Captain.class.php";
            $captain = new Captain();
            $user = new User();
            //Send email notification
            $app = $appointment->retrieveAppointmentFromAppId($app_id);
            $user_id = $app[0]->getUserId();
            $captain_id = $app[0]->getCaptainId();
            $captainList = $captain->retrieveCaptainFromId($captain_id);
            $userList = $user->retrieveUserFromId($user_id);
            $captainEmail = $captainList[0]->getEmail();
            $userEmail = $userList[0]->getEmail();
            $to = $captainEmail . ', ';
            $to .= $userEmail;
            $subject = 'Appointment Cancellation';
            $message = "Your appointment has been cancelled";
            $headers = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
            // Additional headers
            $headers .= 'From: Captains Hub <bryan_augusli@hotmail.com>';
            mail($to, $subject, $message, $headers);
开发者ID:poliang13,项目名称:Captains-Hubs,代码行数:31,代码来源:cancel-appointment.php


注:本文中的Appointment::cancelAppointment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。