/admin/mspr?section=mspr-options&year=<?php 
            echo $year;
            ?>
" method="post">
		<table class="mspr_form">
			<colgroup>
				<col width="3%"></col>
				<col width="25%"></col>
				<col width="72%"></col>
			</colgroup>
			<tfoot>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="3" style="border-top: 2px #CCCCCC solid; padding-top: 5px; text-align: right">
						<input type="submit" class="btn btn-primary" name="action" value="Update Options" />
					</td>
				</tr>
			</tfoot>
			<tbody>
				<?php 
            $current_time = $class_close ? $class_close : 0;
            echo generate_calendar("close_datetime", "Submission Deadline:", true, $current_time, true, false, false, false, false);
            ?>
			</tbody>
		</table>	
	</form>
	<?php 
    }
}
Esempio n. 2
0
                        }
                    }
                </script>
				<form action="<?php 
                echo html_encode(ENTRADA_URL);
                ?>
/logbook?section=<?php 
                echo isset($entry_id) ? "edit&entry_id=" . html_encode($entry_id) : "add";
                ?>
&step=2" method="POST" id="entry-form">
					<div class="row-fluid">
                        <h2>Encounter Details</h2>
                    </div>
                    <table>
                    <?php 
                echo generate_calendar("encounter", "Encounter Date", true, $entry->getEncounterDate() ? $entry->getEncounterDate() : time(), true);
                ?>
                    </table>
                    <br />
                    <div class="control-group row-fluid">
                        <label for="course_id" class="form-required span3">Rotation</label>
                        <span class="controls span8">
                            <?php 
                $courses = $logbook->getLoggingCourses();
                ?>
                            <select id="course_id" name="course_id" style="width: 100%" onchange="loadObjectivesList()">
                            <option value="0">-- Select Rotation --</option>
                            <?php 
                if ($courses) {
                    $found_enrolled = false;
                    $enrolled_course_ids = groups_get_explicitly_enrolled_course_ids($ENTRADA_USER->getID(), true);
            echo $event_id;
            ?>
" />
			<input type="hidden" value="<?php 
            echo isset($PROCESSED["event_title"]) && $PROCESSED["event_title"] ? $PROCESSED["event_title"] : "Session " . $session_count;
            ?>
" id="session_title" name="session_title" />
			<table style="width: 100%" cellspacing="0" cellpadding="0" border="0" summary="Event Session Information">
				<colgroup>
					<col style="width: 5%" />
					<col style="width: 20%" />
					<col style="width: 75%" />
				</colgroup>
				<?php 
            if ($ENTRADA_ACL->amIAllowed(new EventResource($PROCESSED["event_id"], $PROCESSED["course_id"], $_SESSION["permissions"][$ENTRADA_USER->getAccessId()]["organisation_id"]), 'update')) {
                echo generate_calendar("event_start", "Date and Time", true, $PROCESSED["event_start"]);
                ?>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td></td>
					<td><label for="event_location" class="form-nrequired">Session Location</label></td>
					<td><input type="text" id="event_location" name="event_location" value="<?php 
                echo $PROCESSED["event_location"];
                ?>
" maxlength="255" style="width: 203px" /></td>
				</tr>
				<?php 
            } else {
                ?>
Esempio n. 4
0
        $nxt = $_SERVER['PHP_SELF'] . '?pn=next&month=' . ($month + 1) . '&year=' . $year;
        $prv = $_SERVER['PHP_SELF'] . '?pn=prev&month=' . ($month - 1) . '&year=' . $year;
    }
    if ($month == 12) {
        $nxt = $_SERVER['PHP_SELF'] . '?pn=next&month=1&year=' . ($year + 1);
        $prv = $_SERVER['PHP_SELF'] . '?pn=prev&month=11&year=' . $year;
    }
    if ($month == 1) {
        $nxt = $_SERVER['PHP_SELF'] . '?pn=next&month=2&year=' . $year;
        $prv = $_SERVER['PHP_SELF'] . '?pn=prev&month=12&year=' . ($year - 1);
    }
}
// array for our previous and next links
$pn = array('<' => $prv, '>' => $nxt);
// actually generating the calendar
echo generate_calendar($year, $month, get_xml_events($month, $year), 3, NULL, 0, $pn);
# Generate Calendar Function
# PHP Calendar (version 2.3), written by Keith Devens
# http://keithdevens.com/software/php_calendar
# see example at http://keithdevens.com/weblog
# License: http://keithdevens.com/software/license
function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array())
{
    $first_of_month = gmmktime(0, 0, 0, $month, 1, $year);
    #remember that mktime will automatically correct if invalid dates are entered
    # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
    # this provides a built in "rounding" feature to generate_calendar()
    $day_names = array();
    #generate all the day names according to the current locale
    for ($n = 0, $t = (3 + $first_day) * 86400; $n < 7; $n++, $t += 86400) {
        #January 4, 1970 was a Sunday
Esempio n. 5
0
                    <a name="event-objectives-section"></a>
                    <h1 class="collapsable" title="Event Objectives Section">Event Objectives</h1>
                    <div id="event-objectives-section">
                        <div class="row-fluid">
                            <label class="checkbox">
                                <input type="checkbox" id="delay_release" name="delay_release" value="1" <?php 
                echo $event_info["objectives_release_date"] != 0 || isset($PROCESSED["delay_release"]) ? " checked=\"checked\"" : "";
                ?>
 />
                                Delay the release of all objectives
                            </label>
                            <div id="delay_release_controls" class="space-below">
                                <table>
                                    <?php 
                echo generate_calendar("delay_release_option", "Delay release until", true, $PROCESSED["objectives_release_date"], true, false, false, false, false);
                ?>
                                </table>
                            </div>
                        </div>

                        <h2 title="Freetext Objectives Section">Free-Text Objectives</h2>
                        <div id="freetext-objectives-section">
                            <textarea id="event_objectives" name="event_objectives" style="width: 100%; height: 100px" cols="70" rows="10"><?php 
                echo html_encode(trim(strip_selected_tags($event_info["event_objectives"], array("font"))));
                ?>
</textarea>
                        </div>

                        <?php 
                $query = "\tSELECT a.* FROM `global_lu_objectives` a\n                                    JOIN `objective_audience` b\n                                    ON a.`objective_id` = b.`objective_id`\n                                    AND b.`organisation_id` = " . $db->qstr($ENTRADA_USER->getActiveOrganisation()) . "\n                                    WHERE (\n                                            (b.`audience_value` = 'all')\n                                            OR\n                                            (b.`audience_type` = 'course' AND b.`audience_value` = " . $db->qstr($COURSE_ID) . ")\n                                            OR\n                                            (b.`audience_type` = 'event' AND b.`audience_value` = " . $db->qstr($EVENT_ID) . ")\n                                        )\n                                    AND a.`objective_parent` = '0'\n                                    AND a.`objective_active` = '1'";
Esempio n. 6
0
        } else {
            if ($arr_attendance[$day] == 'A') {
                $class_att = 'attendance-absent';
            } else {
                $class_att = 'attendance-present';
            }
            $calendar .= "<td><span id='day'>{$day}</span><span id='{$class_att}'>" . $arr_attendance[$day] . "</span></td>";
        }
    }
    if ($weekday != 7) {
        $calendar .= '<td colspan="' . (7 - $weekday) . '">&nbsp;</td>';
    }
    #remaining "empty" days
    return $calendar . "</tr>\n</table>\n";
}
$time = time();
//$oldlocale = setlocale(LC_TIME, NULL); #save current locale
//setlocale(LC_TIME, 'es_ES'); #Spanish
foreach ($rs_attd as $k => $v) {
    $arr_attendance[$v['date_day']] = $v['attendance_check'];
}
$attendance_calander = generate_calendar($year, $month, NULL, 3, NULL, 1, array(), $arr_attendance);
/*---- attendance calander end -----*/
$objTpl->assign('attendance_calander', $attendance_calander);
$objTpl->assign('login_error', $login_error);
$objTpl->assign('sess', $sess);
$objTpl->assign('month', $month);
$objTpl->assign('year', (int) $year);
$objTpl->assign('cyear', (int) date("Y", time()));
$objTpl->assign('attd_records', $rs_attd);
$objTpl->display('student/student_attendance.tpl');
Esempio n. 7
0
    }
    #initial 'empty' days
    for ($day = 1, $days_in_month = gmdate('t', $first_of_month); $day <= $days_in_month; $day++, $weekday++) {
        if ($weekday == 7) {
            $weekday = 0;
            #start a new week
            $calendar .= "</tr>\n<tr>";
        }
        if (isset($days[$day]) and is_array($days[$day])) {
            @(list($link, $classes, $content) = $days[$day]);
            if (is_null($content)) {
                $content = $day;
            }
            $calendar .= '<td' . ($classes ? ' class="' . htmlspecialchars($classes) . '">' : '>') . ($link ? '<a href="' . htmlspecialchars($link) . '">' . $content . '</a>' : $content) . '</td>';
        } else {
            $calendar .= "<td><span id='day'>{$day}</span><span id='attendance'>P</span></td>";
        }
    }
    if ($weekday != 7) {
        $calendar .= '<td colspan="' . (7 - $weekday) . '">&nbsp;</td>';
    }
    #remaining "empty" days
    return $calendar . "</tr>\n</table>\n";
}
$time = time();
//$oldlocale = setlocale(LC_TIME, NULL); #save current locale
//setlocale(LC_TIME, 'es_ES'); #Spanish
echo generate_calendar(date('Y'), date('m'), NULL, 3, NULL, 1);
//setlocale(LC_TIME, $oldlocale);
?>
 
<center>
<ul class="Calendar">
<?php 
// @version $Id$
if (isset(Yii::app()->params['calendarLocale']) && Yii::app()->params['calendarLocale'] == 'Japan') {
    include_once 'generate_calendar_Japan.php';
} else {
    include_once 'generate_calendar.php';
}
echo generate_calendar($year, $month, $days, $len, $url, 0, $pnc);
?>
</ul>
</center>
Esempio n. 9
0
function plugin_calendar_widget()
{
    global $fp_params;
    $y = isset($fp_params['y']) ? $fp_params['y'] : date('y');
    $m = isset($fp_params['m']) ? $fp_params['m'] : date('m');
    global $fpdb;
    $q =& new FPDB_Query(array('fullparse' => false, 'y' => $y, 'm' => $m, 'count' => -1), null);
    $days = array();
    while ($q->hasmore($queryId)) {
        list($id, $entry) = $q->getEntry($queryId);
        $date = date_from_id($id);
        $d = (int) $date['d'];
        $days[$d] = array(get_day_link($y, $m, str_pad($d, 2, '0', STR_PAD_LEFT)), 'linked-day');
        $count++;
    }
    // load plugin strings
    // they're located under plugin.PLUGINNAME/lang/LANGID/
    $lang = lang_load('plugin:calendar');
    $widget = array();
    $widget['subject'] = $lang['plugin']['calendar']['subject'];
    $widget['content'] = '<ul id="widget_calendar"><li>' . generate_calendar($y, $m, $days) . '</li></ul>';
    return $widget;
}
Esempio n. 10
0
            $day++;
        } else {
            break;
        }
    }
}
//Month Names
$first_of_month = gmmktime(0, 0, 0, $prev_month, 1, $year);
list($tmp, $year, $prev_month, $weekday) = explode(',', gmstrftime('%m,%Y,%b,%w', $first_of_month));
$first_of_month = gmmktime(0, 0, 0, $next_month, 1, $year);
list($tmp, $year, $next_month, $weekday) = explode(',', gmstrftime('%m,%Y,%b,%w', $first_of_month));
//Creating switching links
$pn = array($prev_month => $prev_link, $next_month => $next_link);
//Output
echo "<div align=center>";
echo generate_calendar($req_year, $req_month, $days, $day_name_length, NULL, $first_day, $pn, $todayback, $todayfontcolor, $Year_length, $Month_length);
echo "</div>";
// calendar function
function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array(), $todayback, $todayfontcolor, $Year_length, $Month_length)
{
    $first_of_month = gmmktime(0, 0, 0, $month, 1, $year);
    #remember that mktime will automatically correct if invalid dates are entered
    # for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
    # this provides a built in "rounding" feature to generate_calendar()
    $day_names = array();
    #generate all the day names according to the current locale
    for ($n = 0, $t = (3 + $first_day) * 24 * 60 * 60; $n < 7; ++$n, $t += 24 * 60 * 60) {
        #January 4, 1970 was a Sunday
        $day_names[$n] = ucfirst(gmstrftime('%A', $t));
    }
    #%A means full textual day name
Esempio n. 11
0
}
?>
		
	</ul>
					
</div>

<div id="secondary">

	<!-- Advertisement block if free account -->
	<?php 
if ($user->paid == 0) {
    require_once INCLUDES . DS . 'adverts.inc.php';
}
?>
	
	<?php 
$time = time();
$today = date('j', $time);
$days = array($today => array(NULL, NULL, '<span class="today" title="Today">' . $today . '</span>'));
echo generate_calendar(date('Y', $time), date('n', $time), $days, 3, NULL, $week_start);
$time = strtotime("+1 month");
echo generate_calendar(date('Y', $time), date('n', $time), NULL, 3, NULL, $week_start);
$time = strtotime("+2 month");
echo generate_calendar(date('Y', $time), date('n', $time), NULL, 3, NULL, $week_start);
?>

</div>

<?php 
require_once INCLUDES . DS . 'footer.inc.php';
Esempio n. 12
0
<?php

// used to get a calendar
if (strpos($content["all"], '{CALENDAR') !== false) {
    include_once PHPWCMS_ROOT . '/include/inc_ext/php_calendar.php';
    include_once PHPWCMS_ROOT . '/include/inc_front/calendar.func.inc.php';
    $_baseCalVal = initializeCalendar(PHPWCMS_TEMPLATE . 'calendar/calendar.ini');
    $content['all'] = str_replace('{CALENDAR}', generate_calendar(array('locale' => 'de_DE', 'day_name_length' => 2, 'weekNrTitle' => 'KW', 'days' => $_baseCalVal['days'], 'pn' => array('&laquo;' => $_baseCalVal['prev_link'], '&raquo;' => $_baseCalVal['next_link']))), $content['all']);
}
            <tr>
                <td></td>
                <td><label id="other_label" for="other_medical_school" class="form-required" style="display: none">Other</label></td>
                <td>
                <input type="text" id="other_medical_school" name="other_medical_school" value="<?php 
            echo html_encode(isset($PROCESSED["other_medical_school"]) && $PROCESSED["other_medical_school"] ? $PROCESSED["other_medical_school"] : "");
            ?>
" maxlength="64" style="width: 250px; display: none" />
                <span id="other_span" class="content-small" style="display: none">(<strong>Example:</strong> Stanford University School of Medicine)</span>
                </td>
            </tr>
            <tr>
                <td colspan="3">&nbsp;</td>
            </tr>
                <?php 
            echo generate_calendar("event", "Start Date", true, isset($PROCESSED["event_start"]) ? $PROCESSED["event_start"] : 0, false, false, true);
            ?>
            <tr>
                <td></td>
                <td><label for="event_finish" class="form-required">Elective Weeks</label></td>
                <td>
                <?php 
            $duration = ceil(isset($PROCESSED["event_finish"]) && $PROCESSED["event_finish"] && isset($PROCESSED["event_start"]) && $PROCESSED["event_start"] ? ($PROCESSED["event_finish"] - $PROCESSED["event_start"]) / 604800 : 0);
            echo "<select id=\"event_finish\" name=\"event_finish_name\" style=\"width: 10%\" onchange=\"changeDurationMessage();\">\n";
            for ($i = 1; $i <= 4; $i++) {
                echo "<option value=\"" . $i . "\"" . ($i == $duration ? " selected=\"selected\"" : "") . ">" . $i . "</option>\n";
            }
            echo "</select>\n<div id=\"auto_end_date\" class=\"content-small\" style=\"display: none\"></div>";
            ?>
                </td>
            </tr>
Esempio n. 14
0
    lionwiki_show($conf, false);
    $form_search = ob_get_clean();
    echo $form_search;
    echo "</ul>";
    echo "</div>";
}
// EXTENSIONS
extensions_print_side_menu_subsection($sec, $sec2);
// Calendar box
$month = get_parameter("month", date('n'));
$year = get_parameter("year", date('y'));
echo '<div class="portlet" style="padding: 0px; margin: 0px;">';
// echo '<a href="javascript:;" onclick="$(\'#calendar_div\').slideToggle (); return false">';
echo '<h3>' . __('Calendar') . '</h3>';
echo '<div id="calendar_div">';
echo generate_calendar($year, $month, array(), 1, NULL, $config["first_day_week"]);
echo '</div>';
echo "<ul class='sidemenu'>";
echo "<li>";
echo '<a href="index.php?sec=agenda&sec2=operation/agenda/agenda">';
echo "<img style='vertical-align:middle' width='20px' src='images/calendar_orange.png'>&nbsp;" . __('Full calendar');
echo '</a>';
echo "</li>";
echo "<li>";
if ($sec == 'agenda') {
    echo "<a href='javascript:;' onClick='show_agenda_entry(0, \"\", 0, true)'>\n\t\t<img src='images/add.png'>&nbsp;" . __('Add entry') . "</a>";
} else {
    echo "<a href='javascript:;' onClick='show_agenda_entry(0, \"\", 0, false)'>\n\t\t<img style='vertical-align:middle' src='images/add.png'>&nbsp;" . __('Add entry') . "</a>";
}
echo "</li>";
echo "</ul>";
Esempio n. 15
0
<div id="menu">
<img src="/wp-content/plugins/wp-stattraq/images/nav_logo.gif" alt="StatTraq" />
<ul class="inline">
<?php 
echo ($view == 'summary' ? '<li class="selected">Summary</li>' : "<li><a href=\"{$wpst_url}&view=summary&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">Summary</a></li>") . ($view == 'hit_counter' ? '<li class="selected">Hit Counter</li>' : "<li><a href=\"{$wpst_url}&view=hit_counter&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">Hit Counter</a></li>") . ($view == 'user_counter' ? '<li class="selected">User Counter</li>' : "<li><a href=\"{$wpst_url}&view=user_counter&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">User Counter</a></li>") . ($view == 'page_views' ? '<li class="selected">Page Views</li>' : "<li><a href=\"{$wpst_url}&view=page_views&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">Page Views</a></li>") . ($view == "user_agent" ? "<li class=\"selected\">Browser</li>" : "<li><a href=\"{$wpst_url}&view=user_agent&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">Browser</a></li>") . ($view == "referrer" ? "<li class=\"selected\">Referrer</li>" : "<li><a href=\"{$wpst_url}&view=referrer&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">Referrer</a></li>") . ($view == "query_strings" ? "<li class=\"selected\">Search Terms</li>" : "<li><a href=\"{$wpst_url}&view=query_strings&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">Search Terms</a></li>") . ($view == "search_engine_stats" ? "<li class=\"selected\"><acronym title=\"Search Engine\">SE</acronym> Saturation</li>" : "<li><a href=\"{$wpst_url}&view=search_engine_stats&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\"><acronym title=\"Search Engine\">SE</acronym> Saturation</a></li>") . ($view == "ip_address" ? "<li class=\"selected\">IP Addresses</li>" : "<li><a href=\"{$wpst_url}&view=ip_address&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber={$limitNumber}\">IP addresses</a></li>");
if ($user_level >= 5) {
    echo $view == 'options' ? '<li class="selected">Options</li>' : '<li><a href="' . $wpst_url . '&view=options">Options</a></li>';
}
?>
</ul>
</div>
<div id="rightSide">
	<h5>Number of results per Page</h5>
	<ul class="inline">
<?php 
echo '<li>' . ($limitNumber == 10 ? "10" : "<a href=\"{$wpst_url}&view={$view}&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber=10\">10</a>") . '</li>' . '<li>' . ($limitNumber == 20 ? "20" : "<a href=\"{$wpst_url}&view={$view}&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber=20\">20</a>") . '</li>' . '<li>' . ($limitNumber == 50 ? "50" : "<a href=\"{$wpst_url}&view={$view}&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber=50\">50</a>") . '</li>' . '<li>' . ($limitNumber == 100 ? "100" : "<a href=\"{$wpst_url}&view={$view}&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber=100\">100</a>") . '</li>' . '<li>' . ($limitNumber == 500 ? "500" : "<a href=\"{$wpst_url}&view={$view}&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber=500\">500</a>") . '</li>' . '<li>' . ($limitNumber == 1000 ? "1000" : "<a href=\"{$wpst_url}&view={$view}&amp;time_frame={$time_frame}&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;hour={$hour}&amp;limitNumber=1000\">1000</a>") . '</li>';
?>
</ul>
<h5>Select a Time Period</h5>
<ol id="timeframe">
<?php 
echo ($time_frame == 6 ? '<li class="selected">Year</li>' : "<li><a href=\"{$wpst_url}&view={$view}&amp;time_frame=6&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;orderBy={$orderBy}&amp;session_id={$session_id}&amp;showReferrerType={$showReferrerType}&amp;limitNumber={$limitNumber}\">Year</a></li>") . ($time_frame == 8 ? '<li class="selected">Month</li>' : "<li><a href=\"{$wpst_url}&view={$view}&amp;time_frame=8&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;orderBy={$orderBy}&amp;session_id={$session_id}&amp;showReferrerType={$showReferrerType}&amp;limitNumber={$limitNumber}\">Month</a></li>") . ($time_frame == 10 ? '<li class="selected">Day</li>' : "<li><a href=\"{$wpst_url}&view={$view}&amp;time_frame=10&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;orderBy={$orderBy}&amp;session_id={$session_id}&amp;showReferrerType={$showReferrerType}&amp;limitNumber={$limitNumber}\">Day</a></li>") . ($time_frame == 12 ? '<li class=\\"selected\\">Hour</li>' : "<li><a href=\"{$wpst_url}&view={$view}&amp;time_frame=12&amp;year={$year}&amp;month={$month}&amp;day={$day}&amp;orderBy={$orderBy}&amp;session_id={$session_id}&amp;showReferrerType={$showReferrerType}&amp;limitNumber={$limitNumber}\">Hour</a></li>") . '</ol>';
require_once "calendar.php";
echo generate_calendar();
// if the view has more data - output it here on the right side.
if (function_exists('getRightSide')) {
    getRightSide();
}
?>
</div>
Esempio n. 16
0
    }
    if ($weekday != 7) {
        $calendar .= '<td colspan="' . (7 - $weekday) . '">&nbsp;</td>';
    }
    #remaining "empty" days
    return $calendar . "</tr>\n</table>\n";
}
echo 'Maybe put this in an iframe or css layer popup.<p>';
//$days = array(
//    2=>array('#','linked-day'),
//    3=>array('/weblog/archive/2004/Jan/03','linked-day'),
//    8=>array('/weblog/archive/2004/Jan/08','linked-day'),
//    22=>array('/weblog/archive/2004/Jan/22','linked-day'),
//);
$pn = array('&laquo;' => "index.php?load=calendar&type=fs&calmonth={$prevmonth}&calyear={$calyear}", '&raquo;' => "index.php?load=calendar&type=fs&calmonth={$nextmonth}&calyear={$calyear}");
echo generate_calendar($calyear, $calmonth, NULL, 3, NULL, 0, $pn);
?>
<script language=javascript>
function Pad(str,intPlaces) {
	var intLength = str.length;
	var intDifference = intPlaces-intLength;
	while (intDifference>0) {
		str = "0"+str;
		intDifference--;
	}
	return str;
}

function filldate(year,month,day) {
	var mymonth = String(month);
	var myday = String(day);
Esempio n. 17
0
File: rpc.php Progetto: robotii/pim
    for ($day = 1, $days_in_month = gmdate('t', $first_of_month); $day <= $days_in_month; $day++, $weekday++) {
        if ($weekday == 7) {
            $weekday = 0;
            #start a new week
            $calendar .= "</tr>\n<tr class=\"b2calendarrow\">";
        }
        if (isset($days[$day]) and is_array($days[$day])) {
            @(list($link, $classes, $content) = $days[$day]);
            if (is_null($content)) {
                $content = $day;
            }
            $calendar .= '<td' . ($classes ? ' class="' . htmlspecialchars($classes) . '">' : '>') . ($link ? '<a href="' . htmlspecialchars($link) . '">' . $content . '</a>' : $content) . '</td>';
        } else {
            $calendar .= "<td" . ($day == date("d") && $month == date("m") ? " class=\"b2calendartoday\"" : " class=\"b2calendarcell\"") . "><a href=\"javascript:sndReq('view','test&day={$day}&month={$month}&year={$year}','contents');\">{$day}</a></td>";
        }
    }
    if ($weekday != 7) {
        $calendar .= '<td colspan="' . (7 - $weekday) . '">&nbsp;</td>';
    }
    #remaining "empty" days
    return $calendar . "</tr>\n</table>\n";
}
?>
<h4>Calendar</h4><?php 
if ($_REQUEST[year] && $_REQUEST[month]) {
    echo generate_calendar($_REQUEST[year], $_REQUEST[month]);
} else {
    echo generate_calendar(date("Y"), date("n"));
}
?>
 
Esempio n. 18
0
                        </span>
                    </div>
                    <form id="addEncounterForm" action="<?php 
                    echo ENTRADA_URL;
                    ?>
/clerkship/logbook?<?php 
                    echo replace_query(array("step" => 2));
                    ?>
" method="post">
                        <input type="hidden" value="1" name="allow_save" id="allow_save" />
                        <div class="row-fluid">
                            <h2>Encounter Details</h2>
                        </div>
                        <table>
                        <?php 
                    echo generate_calendar("encounter", "Encounter Date", true, isset($PROCESSED["encounter_date"]) ? $PROCESSED["encounter_date"] : time(), true, true);
                    ?>
                        </table>
                        <br />
                        <div class="control-group row-fluid">
                            <label for="rotation_id" class="form-required span3">Rotation</label>
                            <span class="controls span8 offset1">
                                <?php 
                    $query = "SELECT a.* FROM `" . CLERKSHIP_DATABASE . "`.`events` AS a \n                                            LEFT JOIN `" . CLERKSHIP_DATABASE . "`.`event_contacts` AS b \n                                            ON a.`event_id` = b.`event_id` \n                                            WHERE b.`etype_id` = " . $db->qstr($ENTRADA_USER->getID()) . " \n                                            AND a.`event_id` = " . $db->qstr((int) $PROCESSED["rotation_id"]) . " \n                                            AND a.`event_type` = 'clinical'";
                    $found = $db->GetRow($query) ? true : false;
                    ?>
                                <select id="rotation_id" name="event_id" style="width: 100%<?php 
                    echo $found ? "; display: none" : "";
                    ?>
" onchange="$('allow_save').value = '0';$('addEncounterForm').submit();">
                                <option value="0">-- Select Rotation --</option>
        <th>Saturday</th>
    </tr>
    
</table>-->


<!--I used a template from the internet (see source) to build a calendar.-->

<?php 
//http://keithdevens.com/software/php_calendar
date_default_timezone_set('America/Chicago');
$time = time();
$today = date('j', $time);
$days = array($today => array(null, null, '<div id="today">' . $today . '</div>'));
$pn = array('&laquo;' => date('n', $time) - 1, '&raquo;' => date('n', $time) + 1);
echo generate_calendar(date('Y', $time), date('n', $time), $days, 3, null, 0);
echo date('n', $time) + 1;
// PHP Calendar (version 2 . 3), written by Keith Devens
// http://keithdevens . com/software/php_calendar
//  see example at http://keithdevens . com/weblog
// License: http://keithdevens . com/software/license
function generate_calendar($year, $month, $days = array(), $day_name_length = 3, $month_href = NULL, $first_day = 0, $pn = array())
{
    $first_of_month = gmmktime(0, 0, 0, $month, 1, $year);
    // remember that mktime will automatically correct if invalid dates are entered
    // for instance, mktime(0,0,0,12,32,1997) will be the date for Jan 1, 1998
    // this provides a built in "rounding" feature to generate_calendar()
    $day_names = array();
    //generate all the day names according to the current locale
    for ($n = 0, $t = (3 + $first_day) * 86400; $n < 7; $n++, $t += 86400) {
        //January 4, 1970 was a Sunday
Esempio n. 20
0
    for ($day = 1, $days_in_month = gmdate('t', $first_of_month); $day <= $days_in_month; $day++, $weekday++) {
        if ($weekday == 7) {
            $weekday = 0;
            #start a new week
            $calendar .= "</tr>\n<tr>";
        }
        if (isset($days[$day]) and is_array($days[$day])) {
            @(list($link, $classes, $content) = $days[$day]);
            if (is_null($content)) {
                $content = $day;
            }
            $calendar .= '<td' . ($classes ? ' class="' . htmlspecialchars($classes) . '">' : '>') . ($link ? '<a href="' . htmlspecialchars($link) . '">' . $content . '</a>' : $content) . '</td>';
        } else {
            $calendar .= "<td>{$day}</td>";
        }
    }
    if ($weekday != 7) {
        $calendar .= '<td colspan="' . (7 - $weekday) . '">&nbsp;</td>';
    }
    #remaining "empty" days
    return $calendar . "</tr>\n</table>\n";
}
$time = time();
$oldlocale = setlocale(LC_TIME, NULL);
#save current locale
setlocale(LC_TIME, 'es_ES');
#Spanish
echo generate_calendar(date('Y', $time), date('n', $time), NULL, 3, NULL, 1);
setlocale(LC_TIME, $oldlocale);
?>
 
Esempio n. 21
0
					</thead>
					<tfoot>
						<tr id="tSubmit" style="visibility: hidden"  >
							<td></td>
							<td colspan="3" style="padding-top: 10px">
								<input class="btn" type="button" name="Cancel" value="Cancel" onclick="history.go(-1)" />
							</td>
							<td style="padding-top: 10px; text-align: right">
								<input class="btn btn-primary" type="submit" value="Copy Events" />
							</td>
						</tr>
					</tfoot>
					<tbody>
						<?php 
                    echo "<tr id=\"dateRow\" style=\"background-color:#ffd;display:none\">";
                    echo "<td /><td colspan=5><table><tr><td style=\"border: 0\"><table>" . generate_calendar("cEvent", "Set Copy's Date & Time", true) . "</table></td>";
                    echo "<td style=\"border: 0\"><input type=\"button\" class=\"btn\" onclick=\"javascript:acceptEvent()\" value=\"Add\" style=\"vertical-align: middle\" /></td>";
                    echo "</tr></table></td></tr>";
                    foreach ($results as $result) {
                        $url = "";
                        $accessible = true;
                        $administrator = false;
                        if ($ENTRADA_ACL->amIAllowed(new EventResource($result["event_id"], $result["course_id"], $result["organisation_id"]), 'update')) {
                            $administrator = true;
                        } else {
                            $accessible = false;
                        }
                        if ($administrator) {
                            //Escape event title by replacing double quotes with &quot; and single quotes with \'
                            $event_title_escaped = str_replace(array('"', "'"), array('&quot;', "\\'"), $result["event_title"]);
                            $url = "javascript:newEventDate(" . $result["event_id"] . ", '" . $event_title_escaped . "', '" . date('Y-m-d', $result["event_start"]) . "', '" . date('H', $result["event_start"]) . "', '" . date('i', $result["event_start"]) . "')";
function pc_settings_page()
{
    $days_of_week = pc_get_days_of_the_week();
    $days_in_month = pc_get_days_in_month();
    $week = 0;
    global $wp_locale;
    ?>
<div id="icon-table"></div>
<div class="drop-zone" id="calendar">

<?php 
    echo generate_calendar(date('Y'), date('n'), pc_get_days_in_month(), 3, NULL, 0, 15, $first_of_month, $day_names, $day_names[$n]);
    ?>
</div>
<?php 
}
Esempio n. 23
0
/**
 * This function is used to generate the standard start / finish calendars
 * within forms.
 *
 * @param string $fieldname
 * @param string $display_name
 * @param bool $show_start
 * @param int $current_start
 * @param bool $show_finish
 * @param int $current_finish
 * @return string
 */
function generate_calendars($fieldname, $display_name = "", $show_start = false, $start_required = false, $current_start = 0, $show_finish = false, $finish_required = false, $current_finish = 0, $use_times = true, $add_line_break = false, $display_name_start_suffix = " Start", $display_name_finish_suffix = " Finish")
{
    global $HEAD, $ONLOAD;
    if (!$display_name) {
        $display_name = ucwords(strtolower($fieldname));
    }
    $output = "";
    if ($show_start) {
        $output .= generate_calendar($fieldname . "_start", $display_name . $display_name_start_suffix, $start_required, $current_start, $use_times, $add_line_break);
    }
    if ($show_finish) {
        $output .= generate_calendar($fieldname . "_finish", $display_name . $display_name_finish_suffix, $finish_required, $current_finish, $use_times, $add_line_break);
    }
    return $output;
}
Esempio n. 24
0
        if (date("d", $display_date) == $i) {
            $days[$i] = array(NULL, NULL, '<span style="color: red;">' . $i . '</span>');
        } else {
            $days[$i] = array($link, "linked-day");
        }
    }
    echo generate_calendar(date("Y", $display_date), date("m", $display_date), $days, 1);
    echo "\n</td><td bgcolor={$table_bgcolour} valign=top align=right>";
    $tempdate = mktime(0, 0, 0, date("m", $display_date) + 1, 1, date("Y", $display_date));
    $initdate = $tempdate;
    for ($i = 1; date("m", $tempdate) == date("m", $initdate); $i++) {
        $tempdate = mktime(0, 0, 0, date("m", $initdate), $i, date("Y", $initdate));
        $link = "{$PHP_SELF}?display_date={$tempdate}&username={$username}&password={$password}";
        $days[$i] = array($link, "linked-day");
    }
    echo generate_calendar(date("Y", $initdate), date("m", $initdate), $days, 1);
    echo "\n</td>";
}
echo "</tr></table>";
if (authenticate($username, $password)) {
    sendNavBar(array("previous", "logout", "home", "create_notice", "add_event", "edit", "next"), $username, $password, $display_date);
}
echo "\n<table width=100%><tr><td width=75% bgcolor={$table_bgcolour} valign=top>";
if (!authenticate($username, $password)) {
    echo "\n<form method=\"POST\" action=\"{$PHP_SELF}\">";
    echo "\n<table>";
    echo "\n<tr><td><h2>Please Login</h2></td><td></td></tr>";
    echo "\n<tr><td>Username:</td><td><input type=\"text\" name=\"txtusername\"></td><td rowspan=2><img src=\"images/password.png\"></td></tr>";
    echo "\n<tr><td>Password:</td><td><input type=\"password\" name=\"txtpassword\"></td></tr>";
    echo "\n<tr><td><input type=\"submit\" value=\"Login\" name=\"B1\"></td><td></td></tr>";
    echo "\n</table>";
        </script>
        <div id="msg"></div>
        <h1>My Teachers</h1>
        <h2>Teacher Search Options</h2>
        <form method="post" id="teacher_list_form" action="<?php 
        echo ENTRADA_URL . "/admin/courses/reports?section=my-teachers&id=" . $COURSE_ID . replace_query(array("step" => 2));
        ?>
">
            <div class="row-fluid">
                <div class="control-group span6">
                    <table>
                        <?php 
        echo generate_calendar("start", "Start Date", true, isset($PROCESSED["start_date"]) ? $PROCESSED["start_date"] : strtotime("1 September"), false, false, false, false, false);
        ?>
                        <?php 
        echo generate_calendar("finish", "Finish Date", true, isset($PROCESSED["finish_date"]) ? $PROCESSED["finish_date"] : strtotime("31 August +1 year"), false, false, false, false, false);
        ?>
                    </table>
                </div>
                <div class="span6">
                    <input type="submit" value="Generate Teacher List" class="btn btn-primary pull-right" />
                </div>
            </div>
            <table class="table table-striped table-bordered" id="notice-list">
                <thead>
                    <tr>
                        <th width="5%"></th>
                        <th width="30%">First Name</th>
                        <th width="30%">Last Name</th>
                        <th width="35%">Email Address</th>
                    </tr>