|
From: Jon O. <jon...@us...> - 2007-09-09 19:48:47
|
Update of /cvsroot/mxbb/mx_calsnails/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9084/includes Modified Files: cal_functions.php Log Message: for 2.9.x Index: cal_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/includes/cal_functions.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** cal_functions.php 5 May 2007 20:19:22 -0000 1.10 --- cal_functions.php 9 Sep 2007 19:48:44 -0000 1.11 *************** *** 87,91 **** } $message = $lang['Cal_event_validated']; ! $url = append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); $message .= "</br></br><a href='" . $url . "'>" . $lang['Cal_back2cal'] . "</a>"; mx_message_die( GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, '' ); --- 87,91 ---- } $message = $lang['Cal_event_validated']; ! $url = mx_append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); $message .= "</br></br><a href='" . $url . "'>" . $lang['Cal_back2cal'] . "</a>"; mx_message_die( GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, '' ); *************** *** 103,107 **** } ! $url = append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); $template->set_filenames( array( 'body' => 'cal_validate_events_lite.tpl' ) ); --- 103,107 ---- } ! $url = mx_append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); $template->set_filenames( array( 'body' => 'cal_validate_events_lite.tpl' ) ); *************** *** 127,131 **** 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) --- 127,131 ---- 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => mx_append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) *************** *** 208,212 **** else { ! $url = append_sid( this_mxurl() ); $message = $lang['Cal_event_delete'] . "<br><br><a href='" . $url . "'>" . $lang['Cal_back2cal'] . "</a>"; mx_message_die( GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, $sql ); --- 208,212 ---- else { ! $url = mx_append_sid( this_mxurl() ); $message = $lang['Cal_event_delete'] . "<br><br><a href='" . $url . "'>" . $lang['Cal_back2cal'] . "</a>"; mx_message_die( GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, $sql ); *************** *** 233,239 **** $id, $day, $month, $year, $userdata, $lang, $config_footer, $footer, $caluser, $cal_version, $block_size, // MX001 ! $endday, $endmonth, $endyear, $bbcode_uid, $homeurl, $db, $template; ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); if ( $caluser >= 4 ) --- 233,242 ---- $id, $day, $month, $year, $userdata, $lang, $config_footer, $footer, $caluser, $cal_version, $block_size, // MX001 ! $endday, $endmonth, $endyear, $bbcode_uid, $homeurl, $db, $template, $mx_page; ! if( !function_exists('generate_smilies') ) ! { ! mx_page::load_file('functions_post', 'phpbb2'); ! } if ( $caluser >= 4 ) *************** *** 274,278 **** generate_smilies( 'inline', PAGE_POSTING ); $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars( array( 'U_MORE_SMILIES' => append_sid( PHPBB_URL . "posting.$phpEx?mode=smilies" ) ) ); $template->set_filenames( array( 'body' => 'cal_posting_body_lite.tpl' ) ); --- 277,281 ---- generate_smilies( 'inline', PAGE_POSTING ); $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars( array( 'U_MORE_SMILIES' => mx_append_sid( PHPBB_URL . "posting.$phpEx?mode=smilies" ) ) ); $template->set_filenames( array( 'body' => 'cal_posting_body_lite.tpl' ) ); *************** *** 289,293 **** 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_mod_marked'], ! 'U_INDEX' => append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) --- 292,296 ---- 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_mod_marked'], ! 'U_INDEX' => mx_append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) *************** *** 344,348 **** 'L_STYLES_TIP' => $lang['Styles_tip'], ! 'S_POST_ACTION' => append_sid( this_mxurl( "action=Addsucker" ) ), 'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields ) ); --- 347,351 ---- 'L_STYLES_TIP' => $lang['Styles_tip'], ! 'S_POST_ACTION' => mx_append_sid( this_mxurl( "action=Addsucker" ) ), 'S_HIDDEN_FORM_FIELDS' => $hidden_form_fields ) ); *************** *** 361,365 **** $end_year = create_year_drop( $row['theendyear'] ); // TIMEZONE FIX ! $currentmonth = create_date( "m", time(), $userdata['calsnails_timezone'] ); $the_time = ( $row['thetime'] != '00:00' ) ? $row['thetime'] : ''; --- 364,368 ---- $end_year = create_year_drop( $row['theendyear'] ); // TIMEZONE FIX ! $currentmonth = phpBB2::create_date( "m", time(), $userdata['calsnails_timezone'] ); $the_time = ( $row['thetime'] != '00:00' ) ? $row['thetime'] : ''; *************** *** 400,409 **** $id, $day, $month, $year, $userdata, $lang, $caluser, $lastday, $phpbbheaders, $block_size, ! $endday, $endmonth, $endyear, $bbcode_uid, $db, $template, $homeurl, $HTTP_POST_VARS; if ( $caluser >= 2 ) { // TIMEZONE FIX ! $currentday = create_date( "j", time(), $userdata['calsnails_timezone'] ); if ( $day ) { --- 403,412 ---- $id, $day, $month, $year, $userdata, $lang, $caluser, $lastday, $phpbbheaders, $block_size, ! $endday, $endmonth, $endyear, $bbcode_uid, $db, $template, $homeurl, $HTTP_POST_VARS, $mx_page; if ( $caluser >= 2 ) { // TIMEZONE FIX ! $currentday = phpBB2::create_date( "j", time(), $userdata['calsnails_timezone'] ); if ( $day ) { *************** *** 411,415 **** } ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); $smilies_path = $board_config['smilies_path']; --- 414,421 ---- } ! if( !function_exists('generate_smilies') ) ! { ! mx_page::load_file('functions_post', 'phpbb2'); ! } $smilies_path = $board_config['smilies_path']; *************** *** 417,421 **** generate_smilies( 'inline', PAGE_POSTING ); $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars( array( 'U_MORE_SMILIES' => append_sid( PHPBB_URL . "posting.$phpEx?mode=smilies" ) ) ); $template->set_filenames( array( 'body' => 'cal_posting_body_lite.tpl' ) ); --- 423,427 ---- generate_smilies( 'inline', PAGE_POSTING ); $board_config['smilies_path'] = $smilies_path; ! $template->assign_vars( array( 'U_MORE_SMILIES' => mx_append_sid( PHPBB_URL . "posting.$phpEx?mode=smilies" ) ) ); $template->set_filenames( array( 'body' => 'cal_posting_body_lite.tpl' ) ); *************** *** 432,436 **** 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) --- 438,442 ---- 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => mx_append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) *************** *** 487,491 **** 'L_STYLES_TIP' => $lang['Styles_tip'], ! 'S_POST_ACTION' => append_sid( this_mxurl( "action=Addsucker" ) ), 'S_HIDDEN_FORM_FIELDS' => '' ) ); --- 493,497 ---- 'L_STYLES_TIP' => $lang['Styles_tip'], ! 'S_POST_ACTION' => mx_append_sid( this_mxurl( "action=Addsucker" ) ), 'S_HIDDEN_FORM_FIELDS' => '' ) ); *************** *** 504,508 **** $end_year = create_year_drop( $year ); // TIMEZONE FIX ! $currentmonth = create_date( "m", time(), $userdata[calsnails_timezone] ); // Set the rest of the Calendar fields --- 510,514 ---- $end_year = create_year_drop( $year ); // TIMEZONE FIX ! $currentmonth = phpBB2::create_date( "m", time(), $userdata[calsnails_timezone] ); // Set the rest of the Calendar fields *************** *** 534,538 **** global $thisscript, $phpbb_root_path, $mx_root_path, $phpEx, $db, $template, $action, $phpbbheaders, $board_config, $cal_config, $id, $day, $month, $year, $time, $userdata, $modify, $lang, $event_desc, $subject, $caluser, ! $endday, $endmonth, $endyear, $bbcode_uid, $homeurl, $block_id; if ( ( $subject == '' ) || ( $event_desc == '' ) ) --- 540,544 ---- global $thisscript, $phpbb_root_path, $mx_root_path, $phpEx, $db, $template, $action, $phpbbheaders, $board_config, $cal_config, $id, $day, $month, $year, $time, $userdata, $modify, $lang, $event_desc, $subject, $caluser, ! $endday, $endmonth, $endyear, $bbcode_uid, $homeurl, $block_id, $mx_page; if ( ( $subject == '' ) || ( $event_desc == '' ) ) *************** *** 595,600 **** } ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/bbcode.' . $phpEx ); if ( !$bbcode_uid ) --- 601,613 ---- } ! if( !function_exists('prepare_message') ) ! { ! mx_page::load_file('functions_post', 'phpbb2'); ! } ! ! if( !function_exists('make_bbcode_uid') ) ! { ! mx_page::load_file('bbcode', 'phpbb2'); ! } if ( !$bbcode_uid ) *************** *** 641,645 **** $l_add = ( $valid != 'no' ) ? $lang['Cal_event_add'] : $lang['Cal_add4valid']; ! $url = append_sid( this_mxurl() ); $message = $l_add . "</br></br><a href='" . $url . "'>" . $lang['Cal_back2cal'] . "</a>"; mx_message_die( GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, $sql ); --- 654,658 ---- $l_add = ( $valid != 'no' ) ? $lang['Cal_event_add'] : $lang['Cal_add4valid']; ! $url = mx_append_sid( this_mxurl() ); $message = $l_add . "</br></br><a href='" . $url . "'>" . $lang['Cal_back2cal'] . "</a>"; mx_message_die( GENERAL_MESSAGE, $message, '', __LINE__, __FILE__, $sql ); *************** *** 657,661 **** // TIMEZONE FIX ! $currentmonth = create_date( "m", time(), $userdata['calsnails_timezone'] ); $template->set_filenames( array( 'body' => 'cal_day_events_lite.tpl' ) ); --- 670,674 ---- // TIMEZONE FIX ! $currentmonth = phpBB2::create_date( "m", time(), $userdata['calsnails_timezone'] ); $template->set_filenames( array( 'body' => 'cal_day_events_lite.tpl' ) ); *************** *** 736,753 **** // Previous Month button ! $url = append_sid( this_mxurl( "day=" . $lastday . "&month=" . $lastmonth . "&year=" . $lastyear . "&mode=display" ) ); $button_prev = button_prev( $url ); // Viewed month link $monthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $month, 1, $year ) )]; ! $select_month_url = append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); // Home Button $curmonthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $currentmonth, 1, $year ) )]; ! $url = append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); $button_home = button_main( $url, $lang['Cal_back2cal'], 'center' ); // Next Month button. ! $url = append_sid( this_mxurl( "day=" . $nextday . "&month=" . $nextmonth . "&year=" . $nextyear . "&mode=display" ) ); $button_next = button_next( $url ); --- 749,766 ---- // Previous Month button ! $url = mx_append_sid( this_mxurl( "day=" . $lastday . "&month=" . $lastmonth . "&year=" . $lastyear . "&mode=display" ) ); $button_prev = button_prev( $url ); // Viewed month link $monthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $month, 1, $year ) )]; ! $select_month_url = mx_append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); // Home Button $curmonthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $currentmonth, 1, $year ) )]; ! $url = mx_append_sid( this_mxurl( "month=" . $month . "&year=" . $year ) ); $button_home = button_main( $url, $lang['Cal_back2cal'], 'center' ); // Next Month button. ! $url = mx_append_sid( this_mxurl( "day=" . $nextday . "&month=" . $nextmonth . "&year=" . $nextyear . "&mode=display" ) ); $button_next = button_next( $url ); *************** *** 755,762 **** { // Add button ! $url = append_sid( this_mxurl( "day=" . $day . "&month=" . $month . "&year=" . $year . "&action=Cal_add_event" ) ); $button_add = button_add( $url ); // Validate button ! $url = append_sid( this_mxurl( "mode=validate&action=getlist" ) ); $button_val = button_validate( $url ); } --- 768,775 ---- { // Add button ! $url = mx_append_sid( this_mxurl( "day=" . $day . "&month=" . $month . "&year=" . $year . "&action=Cal_add_event" ) ); $button_add = button_add( $url ); // Validate button ! $url = mx_append_sid( this_mxurl( "mode=validate&action=getlist" ) ); $button_val = button_validate( $url ); } *************** *** 773,777 **** 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) --- 786,790 ---- 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => mx_append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) *************** *** 811,830 **** if ($userdata && $userdata['user_id'] != '-1') { ! $currentday = create_date("j", time(), $userdata['user_timezone']); ! $currentmonth = create_date("m", time(), $userdata['user_timezone']); ! $currentyear = create_date("Y", time(), $userdata['user_timezone']); } else { ! $currentday = create_date("j", time(), $board_config['board_timezone']); ! $currentmonth = create_date("m", time(), $board_config['board_timezone']); ! $currentyear = create_date("Y", time(), $board_config['board_timezone']); } */ // Timezone fix ! $currentday = create_date( "j", time(), $userdata['calsnails_timezone'] ); ! $currentmonth = create_date( "m", time(), $userdata['calsnails_timezone'] ); ! $currentyear = create_date( "Y", time(), $userdata['calsnails_timezone'] ); $lastday = 1; --- 824,843 ---- if ($userdata && $userdata['user_id'] != '-1') { ! $currentday = phpBB2::create_date("j", time(), $userdata['user_timezone']); ! $currentmonth = phpBB2::create_date("m", time(), $userdata['user_timezone']); ! $currentyear = phpBB2::create_date("Y", time(), $userdata['user_timezone']); } else { ! $currentday = phpBB2::create_date("j", time(), $board_config['board_timezone']); ! $currentmonth = phpBB2::create_date("m", time(), $board_config['board_timezone']); ! $currentyear = phpBB2::create_date("Y", time(), $board_config['board_timezone']); } */ // Timezone fix ! $currentday = phpBB2::create_date( "j", time(), $userdata['calsnails_timezone'] ); ! $currentmonth = phpBB2::create_date( "m", time(), $userdata['calsnails_timezone'] ); ! $currentyear = phpBB2::create_date( "Y", time(), $userdata['calsnails_timezone'] ); $lastday = 1; *************** *** 869,874 **** } $template->assign_vars( array( ! 'S_ACTION' => append_sid( this_mxurl( '', 0, $cal_page_id ) ), ! 'U_CAL_MONTH' => append_sid( this_mxurl( "month=" . $month . "&year=" . $year, 0, $cal_page_id ) ), )); } --- 882,887 ---- } $template->assign_vars( array( ! 'S_ACTION' => mx_append_sid( this_mxurl( '', 0, $cal_page_id ) ), ! 'U_CAL_MONTH' => mx_append_sid( this_mxurl( "month=" . $month . "&year=" . $year, 0, $cal_page_id ) ), )); } *************** *** 987,991 **** // End UKRag.net function ! $url = append_sid( this_mxurl( 'id=' . $results['event_id'] . '&mode=display&day=' . $thisday . '&month=' . $today_month . '&year=' . $today_year ) ); // Need to keep the size down --- 1000,1004 ---- // End UKRag.net function ! $url = mx_append_sid( this_mxurl( 'id=' . $results['event_id'] . '&mode=display&day=' . $thisday . '&month=' . $today_month . '&year=' . $today_year ) ); // Need to keep the size down *************** *** 1046,1050 **** } ! $url_day = !empty( $thisday ) ? append_sid( this_mxurl( "day=" . $thisday . "&month=" . $month . "&year=" . $year . "&mode=display", 0, $cal_page_id ) ) : ''; if ( $cal_mode_mini && $thisday != '' ) --- 1059,1063 ---- } ! $url_day = !empty( $thisday ) ? mx_append_sid( this_mxurl( "day=" . $thisday . "&month=" . $month . "&year=" . $year . "&mode=display", 0, $cal_page_id ) ) : ''; if ( $cal_mode_mini && $thisday != '' ) *************** *** 1081,1085 **** 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) --- 1094,1098 ---- 'CALENDAR' => $lang['Calendar'], 'L_CAL_NEW' => $lang['Cal_add_event'], ! 'U_INDEX' => mx_append_sid( "index.$phpEx" ), 'L_INDEX' => sprintf( $lang['Forum_Index'], $board_config['sitename'] ), 'U_CAL_HOME' => $homeurl ) *************** *** 1089,1102 **** { // Previous Month button ! $url = append_sid( this_mxurl( "month=" . $lastmonth . "&year=" . $lastyear ) ); $button_prev = button_prev( $url ); // Add Event button ! $url = append_sid( this_mxurl( "month=" . $month . "&year=" . $year . "&action=Cal_add_event" ) ); $button_add = button_add( $url ); // Admin Validate button ! $url = append_sid( this_mxurl( "mode=validate&action=getlist" ) ); $button_validate = button_validate( $url ); // Next Month button ! $url = append_sid( this_mxurl( "month=" . $nextmonth . "&year=" . $nextyear ) ); $button_next = button_next( $url ); } --- 1102,1115 ---- { // Previous Month button ! $url = mx_append_sid( this_mxurl( "month=" . $lastmonth . "&year=" . $lastyear ) ); $button_prev = button_prev( $url ); // Add Event button ! $url = mx_append_sid( this_mxurl( "month=" . $month . "&year=" . $year . "&action=Cal_add_event" ) ); $button_add = button_add( $url ); // Admin Validate button ! $url = mx_append_sid( this_mxurl( "mode=validate&action=getlist" ) ); $button_validate = button_validate( $url ); // Next Month button ! $url = mx_append_sid( this_mxurl( "month=" . $nextmonth . "&year=" . $nextyear ) ); $button_next = button_next( $url ); } *************** *** 1104,1111 **** { // Previous Month button ! $url = append_sid( this_mxurl( "month=" . $lastmonth . "&year=" . $lastyear ) ); $button_prev = button_prev( $url ); // Next Month button ! $url = append_sid( this_mxurl( "month=" . $nextmonth . "&year=" . $nextyear ) ); $button_next = button_next( $url ); } --- 1117,1124 ---- { // Previous Month button ! $url = mx_append_sid( this_mxurl( "month=" . $lastmonth . "&year=" . $lastyear ) ); $button_prev = button_prev( $url ); // Next Month button ! $url = mx_append_sid( this_mxurl( "month=" . $nextmonth . "&year=" . $nextyear ) ); $button_next = button_next( $url ); } *************** *** 1271,1275 **** { // Validate button ! // $url = append_sid(this_mxurl("mode=validate&action=getlist")); $button_validate = "<form method=post action='$url'><td>"; $button_validate .= "<input type=submit value='" . $lang['Validate'] . "' class=mainoption>"; --- 1284,1288 ---- { // Validate button ! // $url = mx_append_sid(this_mxurl("mode=validate&action=getlist")); $button_validate = "<form method=post action='$url'><td>"; $button_validate .= "<input type=submit value='" . $lang['Validate'] . "' class=mainoption>"; *************** *** 1290,1294 **** { // Delete/Modify Button ! // $url = append_sid(this_mxurl("day=".$day."&month=".$month."&year=".$year."&mode=modify")); $button_mod_del = "<form method=post action=$url><td>"; $button_mod_del .= "<input type=submit value=\""; --- 1303,1307 ---- { // Delete/Modify Button ! // $url = mx_append_sid(this_mxurl("day=".$day."&month=".$month."&year=".$year."&mode=modify")); $button_mod_del = "<form method=post action=$url><td>"; $button_mod_del .= "<input type=submit value=\""; |