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


PHP calendar::display_calendar方法代码示例

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


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

示例1: _consult_schedule

 function _consult_schedule() {
 //
 // appointments for today
 //
     if (func_num_args()>0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
     }
     if ($post_vars["submitsked"]) {
         appointment::process_appointment_record($menu_id, $post_vars, $get_vars);
     }
     print "<span class='patient'>".FTITLE_APPOINTMENTS_TODAY."</span><br/><br/>";
     $base_url = $_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=".$get_vars["menu_id"];
     if ($get_vars["year"] && $get_vars["month"] && $get_vars["day"]) {
         $date = $get_vars["year"]."-".$get_vars["month"]."-".$get_vars["day"];
     } else {
         $date = date("Y-m-d");
     }
     print "<table><tr valign='top'><td>";
     calendar::display_calendar($menu_id, $post_vars, $get_vars, $validuser, $isadmin, $base_url);
     print "</td><td>";
     print "<span class='tinylight'>";
     print "<ol><b>APPOINTMENT HOWTO:</b></ol>";
     print "<ol>";
     print "<li>THIS PAGE SHOWS THE APPOINTMENTS FOR TODAY.</li>";
     print "<li>TO SEE APPOINTMENTS OTHER THAN TODAY CLICK ON DESIRED CALENDAR DATE.</li>";
     print "<li>YOU CAN ALSO USE THE CALENDAR NAVIGATION BUTTONS TO GO TO A DIFFERENT MONTH OR YEAR.</li>";
     print "<li>CLICK ON PATIENT NAME TO SEE APPOINTMENT RECORD. HIGHLIGHTED NAME MEANS THE PATIENT FOLLOWED UP ALREADY.</li>";
     print "</ol>";
     print "</span>";
     print "</td></tr></table>";
     $sql = "select a.schedule_id, a.patient_id, p.patient_lastname, p.patient_firstname, ".
            "p.patient_dob, p.patient_gender, l.appointment_name, ".
            "round((to_days(now())-to_days(p.patient_dob))/365 , 1) computed_age, actual_date ".
            "from m_patient p, m_consult_appointments a, m_lib_appointment l ".
            "where p.patient_id = a.patient_id and ".
            "a.appointment_id = l.appointment_id and ".
            "to_days(a.visit_date) = to_days('$date') ".
            "order by p.patient_lastname, p.patient_firstname";
     if ($result = mysql_query($sql)) {
         print "<br/><table width=600 bgcolor='#FFFFFF' cellpadding='3' cellspacing='0' style='border: 2px solid black'>";
         print "<tr><td>";
         print "<span class='tinylight'><b>".LBL_EXPECTED_TO_ARRIVE_TODAY." ".$date.":</b></span><br/><br/>";
         if (mysql_num_rows($result)) {
             $i=0;
             while (list($sid, $pid, $plast, $pfirst, $pdob, $pgender, $appname, $p_age, $actual_date) = mysql_fetch_array($result)) {
                 if ($prev_app<>$appname) {
                     $patient_array[$i] .= "<span class='boxtitle'><font color='red'>".strtoupper($appname)."</font></span><br/>";
                 }
                 $patient_array[$i] .= "<a href='".$_SERVER["PHP_SELF"]."?page=CONSULTS&menu_id=$menu_id&patient_id=$pid&schedule_id=$sid&year=".$get_vars["year"]."&month=".$get_vars["month"]."&day=".$get_vars["day"]."&s=0#detail' style='".($actual_date<>"0000-00-00"?"background-color: #FFFF00":"")."'><b>$plast, $pfirst</b></a> [$p_age/$pgender] $pdob";
                 if (class_exists("family")) {
                     // show family icon if patient has a family
                     $family_id = family::get_family_id($pid);
                     if ($family_id<>0) {
                         $family_menu_id = module::get_menu_id("_family");
                         $patient_array[$i] .= " <a href='".$_SERVER["PHP_SELF"]."?page=PATIENTS&menu_id=$family_menu_id&family_id=$family_id' title='GO TO FAMILY'><img src='../images/family.gif' border='0'/></a>";
                     }
                 }
                 if (class_exists("healthcenter")) {
                     $consult_menu_id = module::get_menu_id("_consult");
                     // show link only if today
                     if ($date == date("Y-m-d")) {
                         $patient_array[$i] .= " <a href='".$_SERVER["PHP_SELF"]."?page=".$get_vars["page"]."&menu_id=$consult_menu_id&enter_consult=$pid&appt_date=$date&sked_id=$sid' title='LOAD PATIENT RECORD'><img src='../images/records.gif' border='0'/></a>";
                     }
                 }
                 $i++;
                 $prev_app = $appname;
             }
             print $this->columnize_list($patient_array);
         } else {
             print "<font color='red'>No patients scheduled today.</font><br/>";
         }
         print "</td></tr>";
         print "</table><br/>";
         if ($get_vars["schedule_id"]) {
             appointment::display_appointment_details($menu_id, $post_vars, $get_vars);
         }
         // consult patient list based on appointment date
         appointment::consult_info($menu_id, $post_vars, $get_vars);
         // consult patient list today
         healthcenter::consult_info($menu_id, $post_vars, $get_vars);
     }
 }
开发者ID:jvtolentino,项目名称:chits,代码行数:87,代码来源:class.appointment.php

示例2: array

    $CorePage = $_GET['p'];
}
$CoreModulesMap = array(1 => 'alter_view.php', 2 => 'comments_view.php', 3 => 'comments_add.php', 4 => 'category_view.php', 5 => 'pages_view.php', 6 => 'articles_view.php', 7 => 'newsletter.php', 8 => 'search.php', 9 => 'date_view.php');
require_once pathjoin(PATH_TO_MODULES_USER, array_key_exists($CorePage, $CoreModulesMap) ? $CoreModulesMap[$CorePage] : 'main_view.php');
// wyznaczamy szablon jaki ma byc parsowany, sprawdzajac
// czy faktycznie znajduje sie on w katalogu z szablonami
if (!isset($assigned_tpl) || !file_exists(pathjoin(ROOT, 'templates', $lang, $theme, 'tpl', $assigned_tpl . '_page.tpl'))) {
    $assigned_tpl = 'main_page';
}
$ft->define_dynamic('alternate_design_row', $assigned_tpl);
while ($d = $read_dir->read()) {
    if ($d[0] != '.') {
        $ft->assign(array('ALTERNATE_TEMPLATE' => $d, 'TEMPLATE_LINK' => $CoreRewrite->template_switch($d, $rewrite)));
        $ft->parse('ALTERNATE_DESIGN_ROW', '.alternate_design_row');
    }
}
// tablica includowanych modulow
$modules = array('category_list', 'pages_list', 'links_list');
while (list($m) = each($modules)) {
    require_once PATH_TO_MODULES_USER . $modules[$m] . '.php';
}
if ((bool) $show_calendar) {
    $ft->assign(array('LINKED' => false, 'SHOW_CALENDAR' => true));
    $calendar = new calendar();
    $calendar->display_calendar();
} else {
    $ft->assign(array('LINKED' => false, 'SHOW_CALENDAR' => false));
}
$ft->parse('MAIN', $assigned_tpl);
$ft->FastPrint();
exit;
开发者ID:BackupTheBerlios,项目名称:core-svn,代码行数:31,代码来源:index.php

示例3: _consult_ntp_followup

 function _consult_ntp_followup()
 {
     //
     // main submodule for listing patients who
     // failed to followup by the day
     //
     // always check dependencies
     if ($exitinfo = $this->missing_dependencies('ntp')) {
         return print $exitinfo;
     }
     if (func_num_args() > 0) {
         $arg_list = func_get_args();
         $menu_id = $arg_list[0];
         $post_vars = $arg_list[1];
         $get_vars = $arg_list[2];
         $validuser = $arg_list[3];
         $isadmin = $arg_list[4];
         //print_r($arg_list);
     }
     print "<span class='patient'>" . FTITLE_NTP_FOLLOWUP_RECORD . "</span><br/><br/>";
     $base_url = $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id=" . $get_vars["menu_id"];
     if ($get_vars["year"] && $get_vars["month"] && $get_vars["day"]) {
         $date = $get_vars["year"] . "-" . $get_vars["month"] . "-" . $get_vars["day"];
     } else {
         $date = date("Y-m-d");
     }
     print "<table><tr valign='top'><td>";
     calendar::display_calendar($menu_id, $post_vars, $get_vars, $validuser, $isadmin, $base_url);
     print "</td><td>";
     print "<span class='tinylight'>";
     print "<ol><b>NTP FOLLOWUP HOWTO:</b></ol>";
     print "<ol>";
     print "<li>THIS PAGE SHOWS PATIENTS ENROLLED IN THE NTP PROGRAM WHO FAILED TO APPEAR ON THE SELECTED DATE.</li>";
     print "<li>TO SEE FAILED APPOINTMENTS OTHER THAN TODAY CLICK ON DESIRED CALENDAR DATE.</li>";
     print "<li>YOU CAN ALSO USE THE CALENDAR NAVIGATION BUTTONS TO GO TO A DIFFERENT MONTH OR YEAR.</li>";
     print "</ol>";
     print "</span>";
     print "</td></tr></table>";
     $sql = "select a.schedule_id, a.patient_id, p.patient_lastname, p.patient_firstname, " . "p.patient_dob, p.patient_gender, l.appointment_name, " . "round((to_days(now())-to_days(p.patient_dob))/365 , 1) computed_age " . "from m_patient p, m_consult_appointments a, m_lib_appointment l " . "where p.patient_id = a.patient_id and " . "a.appointment_id = l.appointment_id and " . "to_days(a.visit_date) = to_days('{$date}') and " . "actual_date = '0000-00-00' " . "order by p.patient_lastname, p.patient_firstname";
     if ($result = mysql_query($sql)) {
         print "<br/><table width=600 bgcolor='#FFFFFF' cellpadding='3' cellspacing='0' style='border: 2px solid black'>";
         print "<tr><td>";
         print "<span class='tinylight'><b>" . LBL_EXPECTED_TO_ARRIVE_TODAY . " " . $date . ":</b></span><br/><br/>";
         if (mysql_num_rows($result)) {
             $i = 0;
             while (list($sid, $pid, $plast, $pfirst, $pdob, $pgender, $appname, $p_age) = mysql_fetch_array($result)) {
                 if ($prev_app != $appname) {
                     $patient_array[$i] .= "<span class='boxtitle'><font color='red'>" . strtoupper($appname) . "</font></span><br/>";
                 }
                 $patient_array[$i] .= "<a href='" . $_SERVER["PHP_SELF"] . "?page=PATIENTS&menu_id={$menu_id}&patient_id={$pid}'><b>{$plast}, {$pfirst}</b></a> [{$p_age}/{$pgender}] {$pdob}";
                 if (class_exists("family")) {
                     // show family icon if patient has a family
                     $family_id = family::get_family_id($pid);
                     if ($family_id != 0) {
                         $family_menu_id = module::get_menu_id("_family");
                         $patient_array[$i] .= " <a href='" . $_SERVER["PHP_SELF"] . "?page=PATIENTS&menu_id={$family_menu_id}&family_id={$family_id}' title='GO TO FAMILY'><img src='../images/family.gif' border='0'/></a>";
                     }
                 }
                 if (class_exists("healthcenter")) {
                     $consult_menu_id = module::get_menu_id("_consult");
                     $patient_array[$i] .= " <a href='" . $_SERVER["PHP_SELF"] . "?page=" . $get_vars["page"] . "&menu_id={$consult_menu_id}&enter_consult={$pid}&appt_date={$date}&sked_id={$sid}' title='LOAD PATIENT RECORD'><img src='../images/records.gif' border='0'/></a>";
                 }
                 $i++;
                 $prev_app = $appname;
             }
             print $this->columnize_list($patient_array);
         } else {
             print "<font color='red'>No patients scheduled today.</font><br/>";
         }
         print "</td></tr>";
         print "</table>";
     }
 }
开发者ID:wahgithub,项目名称:chits_wah_emr,代码行数:73,代码来源:class.ntp.php


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