|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:58
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4201/modules/mx_calsnails Modified Files: mx_calendar_events.php mx_calendar_mini.php mx_calendar_query.php Log Message: security Index: mx_calendar_mini.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_mini.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_calendar_mini.php 29 May 2006 15:38:05 -0000 1.10 --- mx_calendar_mini.php 17 Jun 2006 20:45:55 -0000 1.11 *************** *** 17,20 **** include( $module_root_path . 'calendar.' . $phpEx ); $cal_mode_mini = false; - ?> \ No newline at end of file --- 17,19 ---- Index: mx_calendar_events.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_events.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mx_calendar_events.php 2 May 2006 23:25:58 -0000 1.18 --- mx_calendar_events.php 17 Jun 2006 20:45:55 -0000 1.19 *************** *** 14,19 **** } // Common Includes and Read Calendar Lite Settings ! include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); --- 14,20 ---- } + // // Common Includes and Read Calendar Lite Settings ! // include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); *************** *** 93,100 **** { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_events.tpl' ) ); ! // Compute date range depending on block parameters. ! switch ( $events_range ) { --- 94,101 ---- { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_events.tpl' ) ); ! // Compute date range depending on block parameters. ! switch ( $events_range ) { *************** *** 136,143 **** } list( $ini_yy, $ini_mm, $ini_dd ) = explode( '-', create_date( 'Y-m-j', $ini_time, $cal_timezone ) ); ! list( $end_yy, $end_mm, $end_dd ) = explode( '-', create_date( 'Y-m-j', $end_time, $cal_timezone ) ); ! // Build the query (note use of fixed condition: valid = 'yes'). ! $sql = "SELECT * FROM " . CALLITE_EVENTS_TABLE . " WHERE valid = 'yes' AND "; --- 137,144 ---- } list( $ini_yy, $ini_mm, $ini_dd ) = explode( '-', create_date( 'Y-m-j', $ini_time, $cal_timezone ) ); ! list( $end_yy, $end_mm, $end_dd ) = explode( '-', create_date( 'Y-m-j', $end_time, $cal_timezone ) ); ! // Build the query (note use of fixed condition: valid = 'yes'). ! $sql = "SELECT * FROM " . CALLITE_EVENTS_TABLE . " WHERE valid = 'yes' AND "; *************** *** 153,160 **** { mx_message_die( GENERAL_ERROR, 'Could not select Event data', '', __LINE__, __FILE__, $sql ); ! } ! // Loop through Calendar Events... ! $today = create_date( 'Y-m-d', time(), $cal_timezone ); $check = 0; --- 154,161 ---- { mx_message_die( GENERAL_ERROR, 'Could not select Event data', '', __LINE__, __FILE__, $sql ); ! } ! // Loop through Calendar Events... ! $today = create_date( 'Y-m-d', time(), $cal_timezone ); $check = 0; *************** *** 182,186 **** $u_end_date = append_sid( $mx_root_path . 'index.' . $phpEx . "?page=" . $cal_page_id . "&day=" . $dd . "&month=" . $mm . "&year=" . $yy . "&mode=display" ); ! $template->assign_block_vars( 'event_row', array( 'SUBJECT' => $subject, 'ROW_CLASS' => ( $today >= substr( $row['stamp'], 0, 10 ) && $today <= $row['eventspan'] ? 'row1' : 'row1' ), --- 183,187 ---- $u_end_date = append_sid( $mx_root_path . 'index.' . $phpEx . "?page=" . $cal_page_id . "&day=" . $dd . "&month=" . $mm . "&year=" . $yy . "&mode=display" ); ! $template->assign_block_vars( 'event_row', array( 'SUBJECT' => $subject, 'ROW_CLASS' => ( $today >= substr( $row['stamp'], 0, 10 ) && $today <= $row['eventspan'] ? 'row1' : 'row1' ), *************** *** 193,197 **** 'AUTHOR' => stripslashes( $row['username'] ), 'DESC' => $zdesc, ! 'U_MORE_INFO' => $u_ini_date . "&id=" . $id ) ); --- 194,198 ---- 'AUTHOR' => stripslashes( $row['username'] ), 'DESC' => $zdesc, ! 'U_MORE_INFO' => $u_ini_date . "&id=" . $id ) ); *************** *** 211,219 **** $lastdate = $ini_date; $check++; ! } $db->sql_freeresult($result); ! // Do we get any event? Do we need to enable scrollbars? ! if ( $check == 0 ) { --- 212,220 ---- $lastdate = $ini_date; $check++; ! } $db->sql_freeresult($result); ! // Do we get any event? Do we need to enable scrollbars? ! if ( $check == 0 ) { *************** *** 230,234 **** $cdd = create_date( "j", time(), $userdata['calsnails_timezone'] ); $cmm = create_date( "m", time(), $userdata['calsnails_timezone'] ); ! $cyy = create_date( "Y", time(), $userdata['calsnails_timezone'] ); // Added Week $currentweek = week_of_year( $cdd, $cmm, $cyy ); --- 231,235 ---- $cdd = create_date( "j", time(), $userdata['calsnails_timezone'] ); $cmm = create_date( "m", time(), $userdata['calsnails_timezone'] ); ! $cyy = create_date( "Y", time(), $userdata['calsnails_timezone'] ); // Added Week $currentweek = week_of_year( $cdd, $cmm, $cyy ); *************** *** 241,246 **** $nextmonthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $mm_tmp, 1, $yy_tmp ) )]; ! $curdayname = $lang['datetime'][gmdate( "D", gmmktime( 0, 0, 0, $cmm, $cdd, $cyy ) )]; ! // Compute top label. switch ( $events_range ) --- 242,247 ---- $nextmonthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $mm_tmp, 1, $yy_tmp ) )]; ! $curdayname = $lang['datetime'][gmdate( "D", gmmktime( 0, 0, 0, $cmm, $cdd, $cyy ) )]; ! // Compute top label. switch ( $events_range ) *************** *** 263,270 **** default: break; ! } ! // Setup common template vars and display the block. ! $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, 'EVENTS_LABEL' => $events_label, --- 264,271 ---- default: break; ! } ! // Setup common template vars and display the block. ! $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, 'EVENTS_LABEL' => $events_label, *************** *** 272,276 **** 'BLOCK_VSIZE' => $block_vsize, 'L_TITLE' => $block_title, ! 'L_MORE_INFO' => $lang['More_Info'] ) ); --- 273,277 ---- 'BLOCK_VSIZE' => $block_vsize, 'L_TITLE' => $block_title, ! 'L_MORE_INFO' => $lang['More_Info'] ) ); Index: mx_calendar_query.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_query.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_calendar_query.php 2 May 2006 23:25:58 -0000 1.12 --- mx_calendar_query.php 17 Jun 2006 20:45:55 -0000 1.13 *************** *** 14,19 **** } // Common Includes and Read Calendar Lite Settings ! include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); --- 14,20 ---- } + // // Common Includes and Read Calendar Lite Settings ! // include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); *************** *** 54,58 **** { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_query.tpl' ) ); --- 55,59 ---- { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_query.tpl' ) ); *************** *** 82,86 **** 'DESC' => '<b>DESCRIPTION</b>', 'BBTEXT' => '', ! 'AUTHOR' => '<b>USERNAME</b>' ) ); } --- 83,87 ---- 'DESC' => '<b>DESCRIPTION</b>', 'BBTEXT' => '', ! 'AUTHOR' => '<b>USERNAME</b>' ) ); } *************** *** 92,101 **** 'DESC' => stripslashes( $row['description'] ), 'BBTEXT' => my_decode_bbtext( $row['description'], $row['bbcode_uid'] ), ! 'AUTHOR' => stripslashes( $row['username'] ) ) ); $check++; } $db->sql_freeresult($result); ! if ( $check == 0 ) { --- 93,102 ---- 'DESC' => stripslashes( $row['description'] ), 'BBTEXT' => my_decode_bbtext( $row['description'], $row['bbcode_uid'] ), ! 'AUTHOR' => stripslashes( $row['username'] ) ) ); $check++; } $db->sql_freeresult($result); ! if ( $check == 0 ) { *************** *** 103,107 **** } $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, ! 'L_TITLE' => ( $block_title == '' ? $lang['Calendar_Events'] : $block_title ) ) ); $template->pparse( 'body' ); --- 104,108 ---- } $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, ! 'L_TITLE' => ( $block_title == '' ? $lang['Calendar_Events'] : $block_title ) ) ); $template->pparse( 'body' ); |