|
From: <ji...@us...> - 2008-12-28 10:51:01
|
Update of /cvsroot/phpicalendar/phpicalendar/admin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25222/admin Modified Files: index.php Log Message: kill admin.php; misc other changes; bump rc num Index: index.php =================================================================== RCS file: /cvsroot/phpicalendar/phpicalendar/admin/index.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** index.php 11 Dec 2008 21:54:52 -0000 1.8 --- index.php 28 Dec 2008 10:50:57 -0000 1.9 *************** *** 1,8 **** <?php define('BASE', '../'); require_once(BASE.'functions/admin_functions.php'); - require_once(BASE.'functions/ical_parser.php'); require_once(BASE.'functions/template.php'); ! header("Content-Type: text/html; charset=$charset"); if (empty($phpiCal_config->default_path)) { --- 1,10 ---- <?php define('BASE', '../'); + $current_view = 'admin'; + require_once(BASE.'functions/init.inc.php'); require_once(BASE.'functions/admin_functions.php'); require_once(BASE.'functions/template.php'); ! ! #echo "<pre>";print_r($_REQUEST); if (empty($phpiCal_config->default_path)) { *************** *** 13,23 **** } } ! if ($phpiCal_config->allow_admin != 'yes') { ! exit(error('The administration menu has been turned off.', $cal, '../')); ! } ! ! // Load variables from forms and query strings into local scope ! if($_POST) {extract($_POST, EXTR_PREFIX_SAME, "post_");} ! if($_GET) {extract($_GET, EXTR_PREFIX_SAME, "get_");} // Logout by clearing session variables --- 15,21 ---- } } ! #if ($phpiCal_config->allow_admin != 'yes') { ! exit(error('The administration menu has been turned off.', '', '/..')); ! #} // Logout by clearing session variables *************** *** 28,37 **** } - // if $auth_method == 'server', don't do any authentication ! $username = $_POST['username']; ! $password = $_POST['password']; ! if ($auth_method == 'server') { $is_loged_in = TRUE; } else { --- 26,34 ---- } // if $auth_method == 'server', don't do any authentication ! $username = @$_POST['username']; ! $password = @$_POST['password']; ! if ($phpiCal_config->auth_method == 'server') { $is_loged_in = TRUE; } else { *************** *** 42,46 **** } ! if (isset($username) && $_GET['action'] != 'logout') { $is_loged_in = login ($username, $password); } --- 39,43 ---- } ! if (isset($username) && @$_GET['action'] != 'logout') { $is_loged_in = login ($username, $password); } *************** *** 48,58 **** $login_good = ($is_loged_in) ? '' : 'oops'; ! $login_bad = ((!$is_loged_in) && ($_GET['action'] == 'login')) ? 'oops' : ''; if(is_loggedin()){ // Delete a calendar // Not at all secure - need to strip out path info if used by users besides admin in the future ! $delete_msg = ''; ! if ($_POST['action'] == 'delete') { ! foreach ($delete_calendar as $filename) { if (!delete_cal(urldecode($filename))) { $delete_msg = $delete_msg . '<font color="red">' . $lang['l_delete_error'] . ' ' . urldecode(substr($filename,0,-4)) . '</font><br />'; --- 45,56 ---- $login_good = ($is_loged_in) ? '' : 'oops'; ! $login_bad = ((!$is_loged_in) && (@$_GET['action'] == 'login')) ? 'oops' : ''; ! $delete_msg = ''; ! $addupdate_msg = ''; if(is_loggedin()){ // Delete a calendar // Not at all secure - need to strip out path info if used by users besides admin in the future ! if (isset($_POST['action']) && $_POST['action'] == 'delete') { ! foreach ($_POST['delete_calendar'] as $filename) { if (!delete_cal(urldecode($filename))) { $delete_msg = $delete_msg . '<font color="red">' . $lang['l_delete_error'] . ' ' . urldecode(substr($filename,0,-4)) . '</font><br />'; *************** *** 64,69 **** // Add or Update a calendar ! $addupdate_msg = ''; ! if ((isset($_POST['action'])) && ($_POST['action'] == 'addupdate')) { for ($filenumber = 1; $filenumber < 6; $filenumber++) { $file = $_FILES['calfile']; --- 62,66 ---- // Add or Update a calendar ! if (isset($_POST['action']) && $_POST['action'] == 'addupdate') { for ($filenumber = 1; $filenumber < 6; $filenumber++) { $file = $_FILES['calfile']; *************** *** 102,114 **** 'event_js' => '', 'charset' => $phpiCal_config->charset, ! 'default_path' => "../".$phpiCal_config->default_path, 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, 'calendar_name' => $calendar_name, ! 'display_date' => $display_date, 'current_view' => $current_view, ! 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $phpiCal_config->rss_powered, 'rss_available' => '', 'rss_valid' => '', --- 99,111 ---- 'event_js' => '', 'charset' => $phpiCal_config->charset, ! 'default_path' => $phpiCal_config->default_path."/..", 'template' => $phpiCal_config->template, 'cal' => $cal, 'getdate' => $getdate, 'calendar_name' => $calendar_name, ! 'display_date' => '', 'current_view' => $current_view, ! # 'sidebar_date' => $sidebar_date, ! 'rss_powered' => $rss_powered, 'rss_available' => '', 'rss_valid' => '', |