17 require_once SQ_CORE_PACKAGE_PATH.
'/designs/design_area/design_area.inc';
49 $res = parent::_getAllowedLinks();
50 $res[SQ_LINK_NOTICE][
'page_calendar'] = Array(
'card' =>
'M',
'exclusive' => FALSE);
65 $page_links = $GLOBALS[
'SQ_SYSTEM']->am->getLinks($this->
id, SQ_LINK_NOTICE,
'page_calendar', FALSE);
67 foreach ($page_links as $link) {
68 $page_ids[substr($link[
'value'], 0, -5)] = $link[
'minorid'];
71 $open_php =
'<'.
'?'.
'php';
75 <?php echo $open_php; ?>
76 $<?php echo $this->
attr(
'id_name'); ?>_target_pages = <?php var_export($page_ids); ?>;
77 $<?php echo $this->
attr(
'id_name'); ?>_target_urls = $GLOBALS[
'SQ_SYSTEM']->am->getAssetURL(array_values($<?php echo $this->
attr(
'id_name'); ?>_target_pages));
78 <?php echo $close_php; ?>
80 <script
type=
"text/javascript">
83 foreach (Array(
'day',
'week',
'month',
'year') as $unit) {
86 function on<?php echo ucfirst($unit); ?>Click(day, mon, year)
88 <?php echo $open_php; ?>
89 if (!empty($<?php echo $this->
attr(
'id_name'); ?>_target_pages[
'<?php echo $unit; ?>'])) {
90 $cal_page_id = $<?php echo $this->
attr(
'id_name'); ?>_target_pages[
'<?php echo $unit; ?>'];
91 if (!empty($<?php echo $this->
attr(
'id_name'); ?>_target_urls[$cal_page_id])) {
92 <?php echo $close_php; ?>
93 frameRedirect(
"<?php echo $open_php; ?> echo $<?php echo $this->attr('id_name'); ?>_target_urls[$cal_page_id]; <?php echo $close_php; ?>?SQ_CALENDAR_VIEW=<?php echo $unit; ?>&SQ_CALENDAR_DATE=" + DateConvert2MySQL(day, mon, year));
94 <?php echo $open_php; ?>
97 <?php echo $close_php; ?>
106 <?php echo $open_php; ?>
107 if (!empty($<?php echo $this->
attr(
'id_name'); ?>_target_urls)) {
108 require_once SQ_LIB_PATH.
"/js_calendar/js_calendar.inc";
110 $calendar->changeSetting(
"onDayClick",
"onDayClick");
111 $calendar->changeSetting(
"onWeekClick",
"onWeekClick");
112 $calendar->changeSetting(
"onMonthClick",
"onMonthClick");
113 $calendar->changeSetting(
"onYearClick",
"onYearClick");
114 $calendar->changeSetting(
"height",
"100%");
115 $calendar->changeSetting(
"width",
"100%");
116 if (isset($_GET[
"SQ_CALENDAR_DATE"])) {
117 $calendar->changeSetting(
"currentDate", $_GET[
"SQ_CALENDAR_DATE"]);
120 $custom_style_assetid =
'<?php echo $this->attr('style_assetid
'); ?>';
121 if (!empty($custom_style_assetid)) {
122 $style_file = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($custom_style_assetid);
123 $calendar->changeSetting(
"cssURL", $style_file->getURL());
126 $calendar->paint(
"js_calendar",
'<?php echo str_replace("'", "\\
'", $this->attr('element_id
')); ?>');
128 <?php echo $close_php; ?>