Update of /cvsroot/phpicalendar/phpicalendar/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8197/admin
Modified Files:
index.php
Log Message:
More error messages. Fixed default paths everywhere.
Index: index.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/admin/index.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** index.php 2 Oct 2004 01:23:52 -0000 1.1
--- index.php 25 Oct 2004 17:16:08 -0000 1.2
***************
*** 6,15 ****
header("Content-Type: text/html; charset=$charset");
! $default_path = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/admin/'));
!
! // Redirect if administration is not allowed
! if ($allow_admin != "yes") {
! header("Location: index.php");
! die();
}
--- 6,18 ----
header("Content-Type: text/html; charset=$charset");
! if (empty($default_path)) {
! if (isset($_SERVER['HTTPS']) || strtolower($_SERVER['HTTPS']) == 'on' ) {
! $default_path = 'https://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/admin/'));
! } else {
! $default_path = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].substr($_SERVER['PHP_SELF'],0,strpos($_SERVER['PHP_SELF'],'/admin/'));
! }
! }
! if ($allow_admin != 'yes') {
! exit(error('The administration menu has been turned off.', $cal, '../'));
}
|