parent
fc9a875042
commit
b9cf6373c7
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,451 @@ |
||||
<?php // $id: $
|
||||
/* |
||||
============================================================================== |
||||
Dokeos - elearning and course management software |
||||
|
||||
Copyright (c) 2008 Dokeos S.A. |
||||
|
||||
For a full list of contributors, see "credits.txt". |
||||
The full license can be read in "license.txt". |
||||
|
||||
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. |
||||
|
||||
See the GNU General Public License for more details. |
||||
|
||||
Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com |
||||
============================================================================== |
||||
*/ |
||||
/** |
||||
============================================================================== |
||||
* @package dokeos.admin |
||||
* @author Carlos Vargas |
||||
* This file is the calendar/agenda.php |
||||
============================================================================== |
||||
*/ |
||||
|
||||
// name of the language file that needs to be included |
||||
$language_file[] = 'admin'; |
||||
$language_file[] = 'agenda'; |
||||
$language_file[] = 'resourcelinker'; |
||||
// resetting the course id |
||||
$cidReset=true; |
||||
// including some necessary dokeos files |
||||
require('../inc/global.inc.php'); |
||||
require_once ('../inc/lib/xajax/xajax.inc.php'); |
||||
$xajax = new xajax(); |
||||
$xajax->debugOn(); |
||||
$xajax -> registerFunction ('search_courses'); |
||||
|
||||
// setting the section (for the tabs) |
||||
$this_section = SECTION_PLATFORM_ADMIN; |
||||
|
||||
// Access restrictions |
||||
api_protect_admin_script(true); |
||||
|
||||
// setting breadcrumbs |
||||
$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
||||
//$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
||||
|
||||
// Database Table Definitions |
||||
// $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
||||
// $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
||||
// $tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER); |
||||
// $tbl_session_rel_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE); |
||||
// $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE); |
||||
|
||||
// setting the name of the tool |
||||
$tool_name= get_lang('SubscribeCoursesToSession'); |
||||
|
||||
$id_session=intval($_GET['id_session']); |
||||
|
||||
if(!api_is_platform_admin()) |
||||
{ |
||||
$sql = 'SELECT session_admin_id FROM '.Database :: get_main_table(TABLE_MAIN_SESSION).' WHERE id='.$id_session; |
||||
$rs = api_sql_query($sql,__FILE__,__LINE__); |
||||
if(mysql_result($rs,0,0)!=$_user['user_id']) |
||||
{ |
||||
api_not_allowed(true); |
||||
} |
||||
} |
||||
/* |
||||
----------------------------------------------------------- |
||||
Libraries |
||||
----------------------------------------------------------- |
||||
*/ |
||||
// containing the functions for the agenda tool |
||||
include "calendar.lib.php"; |
||||
// some debug functions |
||||
include($includePath."/lib/debug.lib.inc.php"); |
||||
|
||||
|
||||
/*============================================================================== |
||||
TREATING THE PARAMETERS |
||||
1. viewing month only or everything |
||||
2. sort ascending or descending |
||||
3. showing or hiding the send-to-specific-groups-or-users form |
||||
4. filter user or group |
||||
============================================================================== */ |
||||
// 1. show all or show current month? |
||||
if (!$_SESSION['show']) |
||||
{ |
||||
$_SESSION['show']="showall"; |
||||
} |
||||
if (!empty($_GET['action']) and $_GET['action']=="showcurrent") |
||||
{ |
||||
$_SESSION['show']="showcurrent"; |
||||
} |
||||
if (!empty($_GET['action']) and $_GET['action']=="showall") |
||||
{ |
||||
$_SESSION['show']="showall"; |
||||
} |
||||
//echo $_SESSION['show']; |
||||
|
||||
// 2. sorting order (ASC or DESC) |
||||
if (empty($_GET['sort']) and empty($_SESSION['sort'])) |
||||
{ |
||||
$_SESSION['sort']="DESC"; |
||||
} |
||||
if (!empty($_GET['sort']) and $_GET['sort']=="asc") |
||||
{ |
||||
$_SESSION['sort']="ASC"; |
||||
} |
||||
if (!empty($_GET['sort']) and $_GET['sort']=="desc") |
||||
{ |
||||
$_SESSION['sort']="DESC"; |
||||
} |
||||
if (!empty($_GET['view'])) |
||||
{ |
||||
$_SESSION['view'] = $_GET['view']; |
||||
} |
||||
|
||||
// 3. showing or hiding the send-to-specific-groups-or-users form |
||||
$setting_allow_individual_calendar=true; |
||||
if (empty($_POST['To']) and empty($_SESSION['allow_individual_calendar'])) |
||||
{ |
||||
$_SESSION['allow_individual_calendar']="hide"; |
||||
} |
||||
$allow_individual_calendar_status=$_SESSION['allow_individual_calendar']; |
||||
if (!empty($_POST['To']) and ($allow_individual_calendar_status=="hide")) |
||||
{ |
||||
$_SESSION['allow_individual_calendar']="show"; |
||||
} |
||||
if (!empty($_GET['sort']) and ($allow_individual_calendar_status=="show")) |
||||
{ |
||||
$_SESSION['allow_individual_calendar']="hide"; |
||||
} |
||||
|
||||
// 4. filter user or group |
||||
if (!empty($_GET['user']) or !empty($_GET['group'])) |
||||
{ |
||||
$_SESSION['user']=(int)$_GET['user']; |
||||
$_SESSION['group']=(int)$_GET['group']; |
||||
}if ((!empty($_GET['user']) and $_GET['user']=="none") or (!empty($_GET['group']) and $_GET['group']=="none")) |
||||
{ |
||||
api_session_unregister("user"); |
||||
api_session_unregister("group"); |
||||
} |
||||
if (!$is_courseAdmin){ |
||||
if (!empty($_GET['toolgroup'])){ |
||||
$_SESSION['toolgroup']=$_GET['toolgroup']; |
||||
$toolgroup=$_GET['toolgroup']; |
||||
api_session_register('toolgroup'); |
||||
} |
||||
} |
||||
//It comes from the group tools. If it's define it overwrites $_SESSION['group'] |
||||
if (!empty($_GET['isStudentView']) and $_GET['isStudentView']=="false") |
||||
{ |
||||
api_session_unregister("user"); |
||||
api_session_unregister("group"); |
||||
} |
||||
|
||||
$htmlHeadXtra[] = to_javascript(); |
||||
|
||||
$htmlHeadXtra[] = user_group_filter_javascript(); |
||||
// this loads the javascript that is needed for the date popup selection |
||||
$htmlHeadXtra[] = "<script src=\"calendar_tbl_change.js\" type=\"text/javascript\" language=\"javascript\"></script>"; |
||||
|
||||
// setting the name of the tool |
||||
$nameTools = get_lang('Agenda'); // language variable in trad4all.inc.php |
||||
|
||||
// showing the header if we are not in the learning path, if we are in |
||||
// the learning path, we do not include the banner so we have to explicitly |
||||
// include the stylesheet, which is normally done in the header |
||||
if (empty($_GET['origin']) or $_GET['origin'] != 'learnpath') |
||||
{ |
||||
Display::display_header($nameTools,'Agenda'); |
||||
} |
||||
else |
||||
{ |
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$clarolineRepositoryWeb."css/default.css\"/>"; |
||||
} |
||||
|
||||
/* ============================================================================== |
||||
TRACKING |
||||
============================================================================== */ |
||||
include('../inc/lib/events.lib.inc.php'); |
||||
//event_access_tool(TOOL_CALENDAR_EVENT); |
||||
|
||||
/* ============================================================================== |
||||
SETTING SOME VARIABLES |
||||
============================================================================== */ |
||||
// Variable definitions |
||||
$dateNow = format_locale_date($dateTimeFormatLong); |
||||
// Defining the shorts for the days. We use camelcase because these are arrays of language variables |
||||
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort")); |
||||
// Defining the days of the week to allow translation of the days. We use camelcase because these are arrays of language variables |
||||
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong")); |
||||
// Defining the months of the year to allow translation of the months. We use camelcase because these are arrays of language variables |
||||
$MonthsLong = array (get_lang("JanuaryLong"), get_lang("FebruaryLong"), get_lang("MarchLong"), get_lang("AprilLong"), get_lang("MayLong"), get_lang("JuneLong"), get_lang("JulyLong"), get_lang("AugustLong"), get_lang("SeptemberLong"), get_lang("OctoberLong"), get_lang("NovemberLong"), get_lang("DecemberLong")); |
||||
|
||||
// Database table definitions |
||||
$TABLEAGENDA = Database::get_main_table(TABLE_MAIN_SYSTEM_CALENDAR); |
||||
$TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY); |
||||
$tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
||||
$tbl_courseUser = Database::get_main_table(TABLE_MAIN_COURSE_USER); |
||||
$tbl_group = Database::get_course_table(TABLE_GROUP); |
||||
$tbl_groupUser = Database::get_course_table(TABLE_GROUP_USER); |
||||
$tbl_session_course_user= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
||||
|
||||
|
||||
|
||||
/* ============================================================================== |
||||
ACCESS RIGHTS |
||||
============================================================================== */ |
||||
// permission stuff - also used by loading from global in agenda.inc.php |
||||
$is_allowed_to_edit = is_allowed_to_edit() OR (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous()); |
||||
|
||||
/* ============================================================================== |
||||
TITLE |
||||
============================================================================== */ |
||||
// Displaying the title of the tool |
||||
api_display_tool_title($nameTools); |
||||
|
||||
// tool introduction |
||||
//Display::display_introduction_section(TOOL_CALENDAR_EVENT); |
||||
|
||||
// insert an anchor (top) so one can jump back to the top of the page |
||||
echo "<a name=\"top\"></a>"; |
||||
|
||||
/* |
||||
============================================================================== |
||||
MAIN SECTION |
||||
============================================================================== |
||||
*/ |
||||
|
||||
//setting the default year and month |
||||
$select_year = ''; |
||||
$select_month = ''; |
||||
if(!empty($_GET['year'])) |
||||
{ |
||||
$select_year = (int)$_GET['year']; |
||||
} |
||||
if(!empty($_GET['month'])) |
||||
{ |
||||
$select_month = (int)$_GET['month']; |
||||
} |
||||
if (empty($select_year) && empty($select_month)) |
||||
{ |
||||
$today = getdate(); |
||||
$select_year = $today['year']; |
||||
$select_month = $today['mon']; |
||||
} |
||||
|
||||
echo '<div class="actions" style="float:right">'; |
||||
if (api_is_allowed_to_edit(false,true) OR (api_get_course_setting('allow_user_edit_agenda') && !api_is_anonymous())) |
||||
{ |
||||
display_courseadmin_links(); |
||||
} |
||||
echo '</div><br /><br />'; |
||||
|
||||
|
||||
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">' |
||||
. '<tr>'; |
||||
|
||||
|
||||
// THE LEFT PART |
||||
if (empty($_GET['origin']) or $_GET['origin']!='learnpath') |
||||
{ |
||||
echo '<td width="220" height="19" valign="top">'; |
||||
// the small calendar |
||||
$MonthName = $MonthsLong[$select_month -1]; |
||||
$agenda_items=get_calendar_items($select_month,$select_year); |
||||
if (api_get_setting('display_mini_month_calendar') == 'true') |
||||
{ |
||||
display_minimonthcalendar($agenda_items, $select_month,$select_year, $MonthName); |
||||
} |
||||
/*if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
}*/ |
||||
echo '</td>'; |
||||
echo '<td width="20" background="../img/verticalruler.gif"> </td>'; |
||||
} |
||||
|
||||
|
||||
$fck_attribute['Width'] = '600'; |
||||
$fck_attribute['Height'] = '400'; |
||||
$fck_attribute['ToolbarSet'] = 'Middle'; |
||||
|
||||
|
||||
// THE RIGHT PART |
||||
echo '<td valign="top">'; |
||||
echo '<div class="sort" style="float:right">'; |
||||
display_student_links(); |
||||
echo '</div>'; |
||||
if (api_is_allowed_to_edit(false,true)) |
||||
{ |
||||
switch ($_GET['action']) |
||||
{ |
||||
case "add": |
||||
if(!empty($_POST['ical_submit'])) { |
||||
$course_info = api_get_course_info(); |
||||
agenda_import_ical($course_info,$_FILES['ical_import']); |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
} elseif ($_POST['submit_event']) { |
||||
|
||||
$course_info = api_get_course_info(); |
||||
$event_start = (int) $_POST['fyear'].'-'.(int) $_POST['fmonth'].'-'.(int) $_POST['fday'].' '.(int) $_POST['fhour'].':'.(int) $_POST['fminute'].':00'; |
||||
$event_stop = (int) $_POST['end_fyear'].'-'.(int) $_POST['end_fmonth'].'-'.(int) $_POST['end_fday'].' '.(int) $_POST['end_fhour'].':'.(int) $_POST['end_fminute'].':00'; |
||||
|
||||
$id = agenda_add_item($course_info,$_POST['title'],$_POST['content'],$event_start,$event_stop,$_POST['selectedform'],false,$_POST['file_comment']); |
||||
|
||||
if(!empty($_POST['repeat'])) { |
||||
$end_y = intval($_POST['repeat_end_year']); |
||||
$end_m = intval($_POST['repeat_end_month']); |
||||
$end_d = intval($_POST['repeat_end_day']); |
||||
$end = mktime(23, 59, 59, $end_m, $end_d, $end_y); |
||||
$res = agenda_add_repeat_item($course_info,$id,$_POST['repeat_type'],$end,null,$_POST['file_comment']); |
||||
} |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
} else { |
||||
show_add_form(); |
||||
} |
||||
break; |
||||
|
||||
case "edit": |
||||
if( ! (api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, intval($_REQUEST['id']) ) ) ) |
||||
{ // a coach can only delete an element belonging to his session |
||||
if ($_POST['submit_event']) |
||||
{ $my_id_attach = (int)$_REQUEST['id_attach']; |
||||
$my_file_comment = Database::escape_string($_REQUEST['file_comment']); |
||||
store_edited_agenda_item($my_id_attach,$my_file_comment); |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
} |
||||
else |
||||
{ |
||||
$id=(int)$_GET['id']; |
||||
show_add_form($id); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
} |
||||
break; |
||||
|
||||
case "delete": |
||||
$id=(int)$_GET['id']; |
||||
if( ! (api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $id ) ) ) |
||||
{ // a coach can only delete an element belonging to his session |
||||
delete_agenda_item($id); |
||||
} |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
break; |
||||
|
||||
case "showhide": |
||||
$id=(int)$_GET['id']; |
||||
if( ! (api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $id ) ) ) |
||||
{ // a coach can only delete an element belonging to his session |
||||
showhide_agenda_item($id); |
||||
} |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
break; |
||||
case "announce": //copying the agenda item into an announcement |
||||
$id=(int)$_GET['id']; |
||||
if( ! (api_is_course_coach() && !api_is_element_in_the_session(TOOL_AGENDA, $id ) ) ) |
||||
{ // a coach can only delete an element belonging to his session |
||||
$ann_id = store_agenda_item_as_announcement($id); |
||||
$tool_group_link = (isset($_SESSION['toolgroup'])?'&toolgroup='.$_SESSION['toolgroup']:''); |
||||
echo '<br />'; |
||||
Display::display_normal_message(get_lang('CopiedAsAnnouncement').'<a href="../announcements/announcements.php?id='.$ann_id.$tool_group_link.'">'.get_lang('NewAnnouncement').'</a>', false); |
||||
} |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
break; |
||||
case "delete_attach": //delete attachment file |
||||
$id_attach = (int)$_GET['id_attach']; |
||||
if (!empty($id_attach)) { |
||||
delete_attachment_file($id_attach); |
||||
} |
||||
if (api_get_setting('display_upcoming_events') == 'true') { |
||||
display_upcoming_events(); |
||||
} |
||||
display_agenda_items(); |
||||
break; |
||||
|
||||
} |
||||
} |
||||
|
||||
// this is for students and whenever the courseaministrator has not chosen any action. It is in fact the default behaviour |
||||
if (!$_GET['action'] OR $_GET['action']=="showall" OR $_GET['action']=="showcurrent" OR $_GET['action']=="view") |
||||
{ |
||||
if ($_GET['origin'] != 'learnpath') |
||||
{ |
||||
if (!$_SESSION['view'] OR $_SESSION['view'] <> 'month') |
||||
{ |
||||
if(!empty($_GET['agenda_id'])) |
||||
{ |
||||
display_one_agenda_item((int)$_GET['agenda_id']); |
||||
} |
||||
else |
||||
{ |
||||
display_agenda_items(); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
display_monthcalendar($select_month, $select_year); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
display_one_agenda_item((int)$_GET['agenda_id']); |
||||
} |
||||
} |
||||
echo " </td></tr></table>"; |
||||
|
||||
/* |
||||
============================================================================== |
||||
FOOTER |
||||
============================================================================== |
||||
*/ |
||||
// The footer is displayed only if we are not in the learnpath |
||||
if ($_GET['origin'] != 'learnpath') |
||||
{ |
||||
|
||||
Display::display_footer(); |
||||
|
||||
} |
||||
?> |
||||
@ -0,0 +1,164 @@ |
||||
<?php // $id: $
|
||||
/* |
||||
============================================================================== |
||||
Dokeos - elearning and course management software |
||||
|
||||
Copyright (c) 2008 Dokeos S.A. |
||||
|
||||
For a full list of contributors, see "credits.txt". |
||||
The full license can be read in "license.txt". |
||||
|
||||
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. |
||||
|
||||
See the GNU General Public License for more details. |
||||
|
||||
Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com |
||||
============================================================================== |
||||
*/ |
||||
/** |
||||
============================================================================== |
||||
* @package dokeos.admin |
||||
* @author Carlos Vargas |
||||
* This file is the calendar/ical_export.php |
||||
============================================================================== |
||||
*/ |
||||
/** |
||||
* Initialisation |
||||
*/ |
||||
// name of the language file that needs to be included |
||||
$language_file = 'agenda'; |
||||
// we are not inside a course, so we reset the course id |
||||
$cidReset = true; |
||||
// setting the global file that gets the general configuration, the databases, the languages, ... |
||||
require_once ('../inc/global.inc.php'); |
||||
$this_section = SECTION_MYAGENDA; |
||||
api_block_anonymous_users(); |
||||
require_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php'); |
||||
require_once (api_get_path(LIBRARY_PATH).'icalcreator/iCalcreator.class.php'); |
||||
// setting the name of the tool |
||||
$nameTools = get_lang('MyAgenda'); |
||||
|
||||
// setting the database variables |
||||
//$TABLECOURS = Database :: get_main_table(TABLE_MAIN_COURSE); |
||||
//$TABLECOURSUSER = Database :: get_main_table(TABLE_MAIN_COURSE_USER); |
||||
//$TABLEAGENDA =Database::get_main_table(TABLE_MAIN_SYSTEM_CALENDAR); |
||||
//$TABLE_ITEMPROPERTY = Database :: get_course_table(TABLE_ITEM_PROPERTY); |
||||
//$tbl_personal_agenda = Database :: get_user_personal_table(TABLE_PERSONAL_AGENDA); |
||||
|
||||
// the variables for the days and the months |
||||
// Defining the shorts for the days |
||||
$DaysShort = array (get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort")); |
||||
// Defining the days of the week to allow translation of the days |
||||
$DaysLong = array (get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong")); |
||||
// Defining the months of the year to allow translation of the months |
||||
$MonthsLong = array (get_lang("JanuaryLong"), get_lang("FebruaryLong"), get_lang("MarchLong"), get_lang("AprilLong"), get_lang("MayLong"), get_lang("JuneLong"), get_lang("JulyLong"), get_lang("AugustLong"), get_lang("SeptemberLong"), get_lang("OctoberLong"), get_lang("NovemberLong"), get_lang("DecemberLong")); |
||||
|
||||
if(!empty($_GET['id']) && $_GET['id']==strval(intval($_GET['id']))) |
||||
{ |
||||
define('ICAL_LANG',api_get_language_isocode()); |
||||
if(!empty($_GET['type'])) |
||||
{ |
||||
$ical = new vcalendar(); |
||||
$ical->setConfig('unique_id',api_get_path(WEB_PATH)); |
||||
$ical->setProperty( 'method', 'PUBLISH' ); |
||||
$ical->setConfig('url',api_get_path(WEB_PATH)); |
||||
$vevent = new vevent(); |
||||
switch($_GET['class']) |
||||
{ |
||||
case 'public': |
||||
$vevent->setClass('PUBLIC'); |
||||
break; |
||||
case 'private': |
||||
$vevent->setClass('PRIVATE'); |
||||
break; |
||||
case 'confidential': |
||||
$vevent->setClass('CONFIDENTIAL'); |
||||
break; |
||||
default: |
||||
$vevent->setClass('PRIVATE'); |
||||
break; |
||||
} |
||||
|
||||
switch($_GET['type']) |
||||
{ |
||||
case 'personal': |
||||
//require_once (api_get_path(SYS_CODE_PATH).'calendar/myagenda.inc.php'); |
||||
$ai = get_personal_agenda_item($_GET['id']); |
||||
$vevent->setProperty( 'summary', mb_convert_encoding($ai['title'],'UTF-8',$charset)); |
||||
if(empty($ai['date'])){header('location:'.$_SERVER['REFERER_URI']);} |
||||
list($y,$m,$d,$h,$M,$s) = preg_split('/[\s:-]/',$ai['date']); |
||||
$vevent->setProperty('dtstart',array('year'=>$y,'month'=>$m,'day'=>$d,'hour'=>$h,'min'=>$M,'sec'=>$s)); |
||||
if(empty($ai['enddate'])) |
||||
{ |
||||
$y2=$y;$m2=$m;$d2=$d;$h2=$h;$M2=$M+15;$s2=$s; |
||||
if($M2>60){$M2=$M2-60;$h2+=1;} |
||||
} |
||||
else |
||||
{ |
||||
list($y2,$m2,$d2,$h2,$M2,$s2) = preg_split('/[\s:-]/',$ai['enddate']); |
||||
} |
||||
$vevent->setProperty('dtend',array('year'=>$y2,'month'=>$m2,'day'=>$d2,'hour'=>$h2,'min'=>$M2,'sec'=>$s2)); |
||||
//$vevent->setProperty( 'LOCATION', get_lang('Unknown') ); // property name - case independent |
||||
$vevent->setProperty( 'description', mb_convert_encoding($ai['text'],'UTF-8',$charset)); |
||||
//$vevent->setProperty( 'comment', 'This is a comment' ); |
||||
$user = api_get_user_info($ai['user']); |
||||
$vevent->setProperty('organizer',$user['mail']); |
||||
$vevent->setProperty('attendee',$user['mail']); |
||||
//$vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));// occurs also four next weeks |
||||
$ical->setConfig('filename',$y.$m.$d.$h.$M.$s.'-'.rand(1,1000).'.ics'); |
||||
$ical->setComponent ($vevent); // add event to calendar |
||||
$ical->returnCalendar(); |
||||
break; |
||||
case 'course': |
||||
$TABLEAGENDA =Database::get_main_table(TABLE_MAIN_SYSTEM_CALENDAR); |
||||
//$TABLE_ITEM_PROPERTY = Database::get_course_table(TABLE_ITEM_PROPERTY); |
||||
require_once (api_get_path(SYS_CODE_PATH).'admin/calendar.lib.php'); |
||||
$ai = get_agenda_item($_GET['id']); |
||||
$vevent->setProperty( 'summary', mb_convert_encoding($ai['title'],'UTF-8',$charset)); |
||||
if(empty($ai['start_date'])){header('location:'.$_SERVER['REFERER_URI']);} |
||||
list($y,$m,$d,$h,$M,$s) = preg_split('/[\s:-]/',$ai['start_date']); |
||||
$vevent->setProperty('dtstart',array('year'=>$y,'month'=>$m,'day'=>$d,'hour'=>$h,'min'=>$M,'sec'=>$s)); |
||||
if(empty($ai['end_date'])) |
||||
{ |
||||
$y2=$y;$m2=$m;$d2=$d;$h2=$h;$M2=$M+15;$s2=$s; |
||||
if($M2>60){$M2=$M2-60;$h2+=1;} |
||||
} |
||||
else |
||||
{ |
||||
list($y2,$m2,$d2,$h2,$M2,$s2) = preg_split('/[\s:-]/',$ai['end_date']); |
||||
} |
||||
$vevent->setProperty('dtend',array('year'=>$y2,'month'=>$m2,'day'=>$d2,'hour'=>$h2,'min'=>$M2,'sec'=>$s2)); |
||||
$vevent->setProperty( 'description', mb_convert_encoding($ai['content'],'UTF-8',$charset)); |
||||
//$vevent->setProperty( 'comment', 'This is a comment' ); |
||||
$user = api_get_user_info($ai['user']); |
||||
$vevent->setProperty('organizer',$user['mail']); |
||||
//$vevent->setProperty('attendee',$user['mail']); |
||||
$course = api_get_course_info(); |
||||
$vevent->setProperty('location', $course['name']); // property name - case independent |
||||
if($ai['repeat']) |
||||
{ |
||||
$trans = array('daily'=>'DAILY','weekly'=>'WEEKLY','monthlyByDate'=>'MONTHLY','yearly'=>'YEARLY'); |
||||
$freq = $trans[$ai['repeat_type']]; |
||||
list($e_y,$e_m,$e_d) = split('/',date('Y/m/d',$ai['repeat_end'])); |
||||
$vevent->setProperty('rrule',array('FREQ'=>$freq,'UNTIL'=>array('year'=>$e_y,'month'=>$e_m,'day'=>$e_d),'INTERVAL'=>'1')); |
||||
} |
||||
//$vevent->setProperty( 'rrule', array( 'FREQ' => 'WEEKLY', 'count' => 4));// occurs also four next weeks |
||||
$ical->setConfig('filename',$y.$m.$d.$h.$M.$s.'-'.rand(1,1000).'.ics'); |
||||
$ical->setComponent ($vevent); // add event to calendar |
||||
$ical->returnCalendar(); |
||||
break; |
||||
default: |
||||
header('location:'.$_SERVER['REFERER_URI']); |
||||
die(); |
||||
} |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
header('location:'.$_SERVER['REFERER_URI']); |
||||
die(); |
||||
} |
||||
?> |
||||
@ -0,0 +1,239 @@ |
||||
var day; |
||||
var month; |
||||
var year; |
||||
var hour; |
||||
var minute; |
||||
var second; |
||||
var clock_set = 0; |
||||
|
||||
/** |
||||
* Opens calendar window. |
||||
* |
||||
* @param string form name |
||||
* @param string field name |
||||
*/ |
||||
function openCalendar(form, field) { |
||||
window.open("./calendar_view.php", "calendar", "width=220,height=200,status=no"); |
||||
day = eval("document." + form + "." + field + "day.options["+ "document." + form + "." + field + "day.selectedIndex].value"); |
||||
month = eval("document." + form + "." + field + "month.options["+ "document." + form + "." + field + "month.selectedIndex].value"); |
||||
month = month-1; |
||||
year = eval("document." + form + "." + field + "year.options["+ "document." + form + "." + field + "year.selectedIndex].value"); |
||||
formName = form; |
||||
fieldName =field; |
||||
} |
||||
|
||||
/** |
||||
* Formats number to two digits. |
||||
* |
||||
* @param int number to format. |
||||
*/ |
||||
function formatNum2(i, valtype) { |
||||
f = (i < 10 ? '0' : '') + i; |
||||
if (valtype && valtype != '') { |
||||
switch(valtype) { |
||||
case 'month': |
||||
f = (f > 12 ? 12 : f); |
||||
break; |
||||
|
||||
case 'day': |
||||
f = (f > 31 ? 31 : f); |
||||
break; |
||||
} |
||||
} |
||||
|
||||
return f; |
||||
} |
||||
|
||||
/** |
||||
* Formats number to four digits. |
||||
* |
||||
* @param int number to format. |
||||
*/ |
||||
function formatNum4(i) { |
||||
return (i < 1000 ? i < 100 ? i < 10 ? '000' : '00' : '0' : '') + i; |
||||
} |
||||
|
||||
/** |
||||
* Initializes calendar window. |
||||
*/ |
||||
function initCalendar() { |
||||
if (!year && !month && !day) { |
||||
day = window.opener.day; |
||||
month = window.opener.month; |
||||
year = window.opener.year;
|
||||
if (isNaN(year) || isNaN(month) || isNaN(day) || day == 0) { |
||||
dt = new Date(); |
||||
year = dt.getFullYear(); |
||||
month = dt.getMonth(); |
||||
day = dt.getDate(); |
||||
} |
||||
} else { |
||||
/* Moving in calendar */ |
||||
if (month > 11) { |
||||
month = 0; |
||||
year++; |
||||
} |
||||
if (month < 0) { |
||||
month = 11; |
||||
year--; |
||||
} |
||||
} |
||||
|
||||
if (document.getElementById) { |
||||
cnt = document.getElementById("calendar_data"); |
||||
} else if (document.all) { |
||||
cnt = document.all["calendar_data"]; |
||||
} |
||||
|
||||
cnt.innerHTML = ""; |
||||
|
||||
str = "" |
||||
|
||||
//heading table
|
||||
str += '<table class="calendar"><tr><th class="monthyear" width="50%">'; |
||||
str += '<a href="javascript:month--; initCalendar();">«</a> '; |
||||
str += month_names[month]; |
||||
str += ' <a href="javascript:month++; initCalendar();">»</a>'; |
||||
str += '</th><th class="monthyear" width="50%">'; |
||||
str += '<a href="javascript:year--; initCalendar();">«</a> '; |
||||
str += year; |
||||
str += ' <a href="javascript:year++; initCalendar();">»</a>'; |
||||
str += '</th></tr></table>'; |
||||
|
||||
str += '<table class="calendar"><tr>'; |
||||
for (i = 0; i < 7; i++) { |
||||
str += "<th class='daynames'>" + day_names[i] + "</th>"; |
||||
} |
||||
str += "</tr>"; |
||||
|
||||
var firstDay = new Date(year, month, 1).getDay(); |
||||
var lastDay = new Date(year, month + 1, 0).getDate(); |
||||
|
||||
str += "<tr>"; |
||||
|
||||
dayInWeek = 0; |
||||
for (i = 0; i < firstDay; i++) { |
||||
str += "<td> </td>"; |
||||
dayInWeek++; |
||||
} |
||||
for (i = 1; i <= lastDay; i++) { |
||||
if (dayInWeek == 7) { |
||||
str += "</tr><tr>"; |
||||
dayInWeek = 0; |
||||
} |
||||
|
||||
dispmonth = 1 + month; |
||||
actVal = formatNum4(year) + "-" + formatNum2(dispmonth, 'month') + "-" + formatNum2(i, 'day'); |
||||
if (i == day) { |
||||
style = ' class="selected"'; |
||||
} else { |
||||
style = ''; |
||||
} |
||||
str += "<td" + style + "><a href=\"javascript:returnDate(" + i +","+month+","+year + ");\">" + i + "</a></td>" |
||||
dayInWeek++; |
||||
} |
||||
for (i = dayInWeek; i < 7; i++) { |
||||
str += "<td> </td>"; |
||||
} |
||||
|
||||
str += "</tr></table>"; |
||||
|
||||
cnt.innerHTML = str; |
||||
} |
||||
|
||||
/** |
||||
* Returns date from calendar. |
||||
* |
||||
* @param string date text |
||||
*/ |
||||
function returnDate(d,m,y) { |
||||
cmd = "window.opener.document."+window.opener.formName+"."+window.opener.fieldName+"day.selectedIndex = "+(d-1); |
||||
eval(cmd); |
||||
cmd = "window.opener.document."+window.opener.formName+"."+window.opener.fieldName+"month.selectedIndex = "+m; |
||||
eval(cmd); |
||||
date = new Date(); |
||||
year = date.getFullYear()-1; |
||||
cmd = "window.opener.document."+window.opener.formName+"."+window.opener.fieldName+"year.selectedIndex = "+(y-year); |
||||
eval(cmd); |
||||
window.close(); |
||||
} |
||||
|
||||
|
||||
|
||||
|
||||
function mktime() { |
||||
|
||||
var no, ma = 0, mb = 0, i = 0, d = new Date(), argv = arguments, argc = argv.length; |
||||
d.setHours(0,0,0); d.setDate(1); d.setMonth(1); d.setYear(1972); |
||||
|
||||
var dateManip = { |
||||
0: function(tt){ return d.setHours(tt); }, |
||||
1: function(tt){ return d.setMinutes(tt); }, |
||||
2: function(tt){ set = d.setSeconds(tt); mb = d.getDate() - 1; return set; }, |
||||
3: function(tt){ set = d.setMonth(parseInt(tt)-1); ma = d.getFullYear() - 1972; return set; }, |
||||
4: function(tt){ return d.setDate(tt+mb); }, |
||||
5: function(tt){ return d.setYear(tt+ma); } |
||||
}; |
||||
|
||||
for( i = 0; i < argc; i++ ){ |
||||
no = parseInt(argv[i]*1); |
||||
if (isNaN(no)) { |
||||
return false; |
||||
} else { |
||||
// arg is number, lets manipulate date object
|
||||
if(!dateManip[i](no)){ |
||||
// failed
|
||||
return false; |
||||
} |
||||
} |
||||
} |
||||
|
||||
return Math.floor(d.getTime()/1000); |
||||
}
|
||||
|
||||
function validate_date(){ |
||||
|
||||
var fday = document.new_calendar_item.fday.value; |
||||
var fmonth = document.new_calendar_item.fmonth.value; |
||||
var fyear = document.new_calendar_item.fyear.value;
|
||||
var fhour = document.new_calendar_item.fhour.value;
|
||||
var fminute = document.new_calendar_item.fminute.value; |
||||
var fdate = mktime(fhour,fminute,0,fmonth,fday,fyear) |
||||
|
||||
var end_fday = document.new_calendar_item.end_fday.value; |
||||
var end_fmonth = document.new_calendar_item.end_fmonth.value; |
||||
var end_fyear = document.new_calendar_item.end_fyear.value;
|
||||
var end_fhour = document.new_calendar_item.end_fhour.value;
|
||||
var end_fminute = document.new_calendar_item.end_fminute.value; |
||||
var end_fdate = mktime(end_fhour,end_fminute,0,end_fmonth,end_fday,end_fyear)
|
||||
|
||||
var title = document.new_calendar_item.title.value; |
||||
|
||||
msg_id1 = document.getElementById(\"msg_error1\"); |
||||
msg_id2 = document.getElementById(\"msg_error2\");
|
||||
msg_id3 = document.getElementById(\"msg_error3\"); |
||||
|
||||
|
||||
|
||||
if(title==\"\"){ |
||||
|
||||
msg_id1.style.display =\"block\"; |
||||
msg_id1.innerHTML=".get_lang('FieldRequired')."; |
||||
msg_id2.innerHTML=\"\"; msg_id3.innerHTML=\"\";
|
||||
} |
||||
else if(fdate > end_fdate) |
||||
{ |
||||
|
||||
msg_id2.style.display =\"block\"; |
||||
msg_id2.innerHTML=".get_lang('DateExpiredNotBeLessDeadLine')."; |
||||
msg_id1.innerHTML=\"\"; msg_id3.innerHTML=\"\";
|
||||
} |
||||
else if (checkDate(ends_month,ends_day,ends_year) == false) |
||||
{ |
||||
msg_id3.style.display =\"block\"; |
||||
msg_id3.innerHTML="'.get_lang('InvalidDate').'"; |
||||
msg_id1.innerHTML=""; msg_id2.innerHTML="";
|
||||
}
|
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,159 @@ |
||||
<?php // $id: $
|
||||
/* |
||||
============================================================================== |
||||
Dokeos - elearning and course management software |
||||
|
||||
Copyright (c) 2008 Dokeos S.A. |
||||
|
||||
For a full list of contributors, see "credits.txt". |
||||
The full license can be read in "license.txt". |
||||
|
||||
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. |
||||
|
||||
See the GNU General Public License for more details. |
||||
|
||||
Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com |
||||
============================================================================== |
||||
*/ |
||||
/** |
||||
============================================================================== |
||||
* @package dokeos.admin |
||||
* @author Carlos Vargas |
||||
* This file is the calendar/calendar.php |
||||
============================================================================== |
||||
*/ |
||||
// name of the language file that needs to be included |
||||
$language_file = 'agenda'; |
||||
// including the claroline global |
||||
include('../inc/global.inc.php'); |
||||
|
||||
//session |
||||
if(isset($_GET['id_session'])) |
||||
$_SESSION['id_session'] = $_GET['id_session']; |
||||
|
||||
// the variables for the days and the months |
||||
// Defining the shorts for the days |
||||
$DaysShort = array(get_lang("SundayShort"), get_lang("MondayShort"), get_lang("TuesdayShort"), get_lang("WednesdayShort"), get_lang("ThursdayShort"), get_lang("FridayShort"), get_lang("SaturdayShort")); |
||||
// Defining the days of the week to allow translation of the days |
||||
$DaysLong = array(get_lang("SundayLong"), get_lang("MondayLong"), get_lang("TuesdayLong"), get_lang("WednesdayLong"), get_lang("ThursdayLong"), get_lang("FridayLong"), get_lang("SaturdayLong")); |
||||
// Defining the months of the year to allow translation of the months |
||||
$MonthsLong = array(get_lang("JanuaryLong"), get_lang("FebruaryLong"), get_lang("MarchLong"), get_lang("AprilLong"), get_lang("MayLong"), get_lang("JuneLong"), get_lang("JulyLong"), get_lang("AugustLong"), get_lang("SeptemberLong"), get_lang("OctoberLong"), get_lang("NovemberLong"), get_lang("DecemberLong")); |
||||
|
||||
?> |
||||
<html> |
||||
<head> |
||||
<title>Calendar</title> |
||||
<style type="text/css"> |
||||
table.calendar |
||||
{ |
||||
width: 100%; |
||||
font-size: 11px; |
||||
font-family: verdana, arial, helvetica, sans-serif; |
||||
} |
||||
table.calendar .monthyear |
||||
{ |
||||
background-color: #4171B5; |
||||
text-align: center; |
||||
color: #ffffff; |
||||
} |
||||
table.calendar .daynames |
||||
{ |
||||
background-color: #D3DFF1; |
||||
text-align: center; |
||||
} |
||||
table.calendar td |
||||
{ |
||||
width: 25px; |
||||
height: 25px; |
||||
background-color: #f5f5f5; |
||||
text-align: center; |
||||
} |
||||
table.calendar td.selected |
||||
{ |
||||
border: 1px solid #ff0000; |
||||
background-color: #FFCECE; |
||||
} |
||||
table.calendar td a |
||||
{ |
||||
width: 25px; |
||||
height: 25px; |
||||
text-decoration: none; |
||||
} |
||||
table.calendar td a:hover |
||||
{ |
||||
background-color: #ffff00; |
||||
} |
||||
table.calendar .monthyear a |
||||
{ |
||||
text-align: center; |
||||
color: #ffffff; |
||||
} |
||||
table.calendar .monthyear a:hover |
||||
{ |
||||
text-align: center; |
||||
color: #ff0000; |
||||
background-color: #ffff00; |
||||
} |
||||
</style> |
||||
<script language="JavaScript" type="text/javascript"> |
||||
<!-- |
||||
/* added 2004-06-10 by Michael Keck |
||||
* we need this for Backwards-Compatibility and resolving problems |
||||
* with non DOM browsers, which may have problems with css 2 (like NC 4) |
||||
*/ |
||||
var isDOM = (typeof(document.getElementsByTagName) != 'undefined' |
||||
&& typeof(document.createElement) != 'undefined') |
||||
? 1 : 0; |
||||
var isIE4 = (typeof(document.all) != 'undefined' |
||||
&& parseInt(navigator.appVersion) >= 4) |
||||
? 1 : 0; |
||||
var isNS4 = (typeof(document.layers) != 'undefined') |
||||
? 1 : 0; |
||||
var capable = (isDOM || isIE4 || isNS4) |
||||
? 1 : 0; |
||||
// Uggly fix for Opera and Konqueror 2.2 that are half DOM compliant |
||||
if (capable) { |
||||
if (typeof(window.opera) != 'undefined') { |
||||
var browserName = ' ' + navigator.userAgent.toLowerCase(); |
||||
if ((browserName.indexOf('konqueror 7') == 0)) { |
||||
capable = 0; |
||||
} |
||||
} else if (typeof(navigator.userAgent) != 'undefined') { |
||||
var browserName = ' ' + navigator.userAgent.toLowerCase(); |
||||
if ((browserName.indexOf('konqueror') > 0) && (browserName.indexOf('konqueror/3') == 0)) { |
||||
capable = 0; |
||||
} |
||||
} // end if... else if... |
||||
} // end if |
||||
//--> |
||||
</script> |
||||
<script type="text/javascript" src="calendar_tbl_change.js"></script> |
||||
<script type="text/javascript"> |
||||
<!-- |
||||
var month_names = new Array( |
||||
<?php |
||||
foreach($MonthsLong as $index => $month) |
||||
{ |
||||
echo '"'.$month.'",'; |
||||
} |
||||
?> |
||||
""); |
||||
var day_names = new Array( |
||||
<?php |
||||
foreach($DaysShort as $index => $day) |
||||
{ |
||||
echo '"'.$day.'",'; |
||||
} |
||||
?> |
||||
""); |
||||
//--> |
||||
</script> |
||||
</head> |
||||
<body onLoad="initCalendar();"> |
||||
<div id="calendar_data"></div> |
||||
<div id="clock_data"></div> |
||||
</body> |
||||
</html> |
||||
@ -0,0 +1,107 @@ |
||||
<?php // $id: $
|
||||
/* |
||||
============================================================================== |
||||
Dokeos - elearning and course management software |
||||
|
||||
Copyright (c) 2008 Dokeos S.A. |
||||
|
||||
For a full list of contributors, see "credits.txt". |
||||
The full license can be read in "license.txt". |
||||
|
||||
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. |
||||
|
||||
See the GNU General Public License for more details. |
||||
|
||||
Contact: Dokeos, 181 rue Royale, B-1000 Brussels, Belgium, info@dokeos.com |
||||
============================================================================== |
||||
*/ |
||||
/** |
||||
============================================================================== |
||||
* @package dokeos.admin |
||||
* @author Carlos Vargas |
||||
* This file is the calendar/print.php |
||||
============================================================================== |
||||
*/ |
||||
// name of the language file that needs to be included |
||||
$language_file = 'agenda'; |
||||
$id=$_GET['id']; |
||||
|
||||
if(strstr($id,',')) |
||||
{ |
||||
$id=explode(',',$id); |
||||
$id=array_map('intval',$id); |
||||
$id=implode(',',$id); |
||||
} |
||||
else |
||||
{ |
||||
$id=intval($id); |
||||
} |
||||
|
||||
// setting the global file that gets the general configuration, the databases, the languages, ... |
||||
require('../inc/global.inc.php'); |
||||
|
||||
|
||||
|
||||
$TABLEAGENDA = Database::get_main_table(TABLE_MAIN_SYSTEM_CALENDAR); |
||||
|
||||
$sql = "SELECT * FROM $TABLEAGENDA WHERE id IN($id) ORDER BY start_date DESC"; |
||||
$result = api_sql_query($sql,__FILE__,__LINE__); |
||||
?> |
||||
|
||||
<html> |
||||
<head> |
||||
<title><?php echo get_lang('Print'); ?></title>
|
||||
<style type="text/css" media="screen, projection"> |
||||
/*<![CDATA[*/ |
||||
@import "../css/<?php echo api_get_setting('stylesheets'); ?>/default.css";
|
||||
/*]]>*/ |
||||
</style> |
||||
</head> |
||||
<body style="margin: 15px; padding: 0px;"> |
||||
|
||||
<center> |
||||
<input type="button" value="<?php echo htmlentities(get_lang('Print'),ENT_QUOTES,$charset); ?>" onClick="javascript:window.print();" />
|
||||
</center> |
||||
<br /><br /> |
||||
|
||||
<?php |
||||
while($row=Database::fetch_array($result)) |
||||
{ |
||||
$row['content'] = $row['content']; |
||||
$row['content'] = make_clickable($row['content']); |
||||
$row['content'] = text_filter($row['content']); |
||||
$row['content'] = str_replace('<a ','<a target="_blank" ',$row['content']); |
||||
|
||||
if(!empty($row['title'])) |
||||
{ |
||||
echo '<b>'.$row['title'].'</b><br /><br />'; |
||||
} |
||||
|
||||
echo get_lang('StartTime').' : '; |
||||
|
||||
echo ucfirst(format_locale_date($dateFormatLong,strtotime($row["start_date"])))." "; |
||||
echo ucfirst(strftime($timeNoSecFormat,strtotime($row["start_date"]))).""; |
||||
|
||||
echo '<br />'; |
||||
|
||||
echo get_lang('EndTime').' : '; |
||||
|
||||
echo ucfirst(format_locale_date($dateFormatLong,strtotime($row["end_date"])))." "; |
||||
echo ucfirst(strftime($timeNoSecFormat,strtotime($row["end_date"]))).""; |
||||
|
||||
echo '<br /><br />'; |
||||
|
||||
echo $row['content'].'<hr size="1" noshade="noshade" />'; |
||||
} |
||||
?> |
||||
|
||||
<br /><br /> |
||||
<center> |
||||
<input type="button" value="<?php echo htmlentities(get_lang('Print'),ENT_QUOTES,$charset); ?>" onClick="javascript:window.print();" />
|
||||
</center> |
||||
|
||||
</body> |
||||
</html> |
||||
Loading…
Reference in new issue