📄 select_calendar.php
字号:
<?php/** * @copyright Intermesh 2006 * @author Merijn Schering <mschering@intermesh.nl> * @version $Revision: 1.3 $ $Date: 2006/03/29 15:25:41 $ * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ require_once("../../Group-Office.php");$GO_SECURITY->authenticate();$GO_MODULES->authenticate('calendar');require_once($GO_LANGUAGE->get_language_file('calendar'));require_once($GO_MODULES->class_path.'calendar.class.inc');$cal = new calendar();require_once($GO_THEME->theme_path."header.inc");$form = new form('select_form');$form->add_html_element(new html_element('h1', $cal_select_calendar));$h2=new html_element('h3', $cal_my_cals);$form->add_html_element($h2);$cal->get_user_calendars($GO_SECURITY->user_id);while($cal->next_record()){ $link = new hyperlink('javascript:select_calendar('.$cal->f('id').');', $cal->f('name')); $link->set_attribute('style','display:block'); $link->set_attribute('class','normal'); $form->add_html_element($link);}if($cal->get_authorized_views($GO_SECURITY->user_id)){ $h2 =new html_element('h3', $cal_views); $h2->set_attribute('style', 'margin-top:15px;'); $form->add_html_element($h2); while($cal->next_record()) { $link = new hyperlink('javascript:select_view('.$cal->f('id').');', $cal->f('name')); $link->set_attribute('style','display:block'); $link->set_attribute('class','normal'); $form->add_html_element($link); } }$cal2 = new calendar();$cal2->get_groups();while($cal2->next_record()){ $has_shared=false; if($cal->get_authorized_calendars($GO_SECURITY->user_id, $cal2->f('id'))) { if($cal2->f('id') == '1') { $h2=new html_element('h3', $cal_shared_calendars); }else { $h2=new html_element('h3', $cal2->f('name')); } $h2->set_attribute('style', 'margin-top:15px;'); $shared = $h2->get_html(); while($cal->next_record()) { if($cal2->f('id') !='1' || $cal->f('user_id') != $GO_SECURITY->user_id) { $has_shared=true; $link = new hyperlink('javascript:select_calendar('.$cal->f('id').');', $cal->f('name')); $link->set_attribute('style','display:block'); $link->set_attribute('class','normal'); $shared .= $link->get_html(); } } if($has_shared) { $form->innerHTML .= $shared; } }}echo $form->get_html();?><script type="text/javascript">function select_calendar(calendar_id){ opener.document.forms[0].view_id.value=0; opener.document.forms[0].calendar_id.value=calendar_id; opener.document.forms[0].submit(); window.close();}function select_view(view_id){ opener.document.forms[0].calendar_id.value=0; opener.document.forms[0].view_id.value=view_id; opener.document.forms[0].submit(); window.close();}</script><?phprequire_once($GO_THEME->theme_path."footer.inc");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -