diff --git a/common.inc.bootstrap.php b/common.inc.bootstrap.php index 5c034da..e35e5e4 100644 --- a/common.inc.bootstrap.php +++ b/common.inc.bootstrap.php @@ -34,15 +34,17 @@ header("Content-Type: text/html; charset=UTF-8"); define('REQUIREDFIELD','*'); //figure out the directory to prepend to directoroy names, depending on if we are in a subdirectory or not -if(substr(getcwd(),-6)=="/admin") +// Dennis Fix so works in windows servers. +// Windows based servers use '\' in directories. This code works for WIN servers and or *nix servers. +if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-6)=="\\admin") $prependdir="../"; -else if(substr(getcwd(),-6)=="/super") +else if(substr(getcwd(),-6)=="/super" || substr(getcwd(),-6)=="\\super") $prependdir="../"; -else if(substr(getcwd(),-7)=="/config") +else if(substr(getcwd(),-7)=="/config" || substr(getcwd(),-7)=="\\config") $prependdir="../"; -else if(substr(getcwd(),-3)=="/db") +else if(substr(getcwd(),-3)=="/db" || substr(getcwd(),-3)=="\\db") $prependdir="../"; -else if(substr(getcwd(),-8)=="/scripts") +else if(substr(getcwd(),-8)=="/scripts" || substr(getcwd(),-8)=="\\scripts") $prependdir="../"; else $prependdir=""; diff --git a/common.inc.php b/common.inc.php index 13fed9a..4ba79ad 100644 --- a/common.inc.php +++ b/common.inc.php @@ -72,7 +72,9 @@ var config=;
@@ -234,6 +236,7 @@ if(!is_array($_SESSION['roles'])) { if(is_array($_SESSION['roles'])) { foreach($_SESSION['roles'] AS $roletype) { + // Dennis 2011-02-18 get a warning Illegal offset type in next line if php.ini shows warnings $roleid=$roles[$roletype]['id']; $q=mysql_query("SELECT * FROM rolestasks WHERE roles_id='$roleid' AND pid=0 AND conferencetype='{$conference['type']}' ORDER BY ord,task"); $cl=""; @@ -411,7 +414,11 @@ if($icon && theme_icon($icon)) { } //if we're under /admin or /config then we want to show the ? help icon -if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config" || substr(getcwd(),-6)=="/super") { +// Dennis 2011-02-18 Required for *nix and Windows servers +if ((substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config" || substr(getcwd(),-6)=="/super") || + (substr(getcwd(),-6)=="\\admin" || substr(getcwd(),-7)=="\\config" || substr(getcwd(),-6)=="\\super") ) + +{ if($_SERVER['REDIRECT_SCRIPT_URL']) $fname=substr($_SERVER['REDIRECT_SCRIPT_URL'],strlen($config['SFIABDIRECTORY'])+1); else @@ -446,6 +453,7 @@ global $config; //we only show the debug session variables if we have an ODD numbered version. if(substr($config['version'], -1) % 2 != 0) { + // Dennis 2011-02-18 Just Info Next line does not work in Windows (no grep etc.) $revision=exec("svn info |grep Revision"); $extra=" (Development $revision)"; if($_SESSION['debug']=="true") diff --git a/config_editor.inc.php b/config_editor.inc.php index 7fadec3..35107c6 100644 --- a/config_editor.inc.php +++ b/config_editor.inc.php @@ -334,7 +334,13 @@ function config_editor($category, $conference_id, $array_name, $self) print(""; diff --git a/super/conferences.php b/super/conferences.php index 4aafa03..5536493 100644 --- a/super/conferences.php +++ b/super/conferences.php @@ -640,8 +640,9 @@ function create_conference($params){ if($errorMessage){ return "SQL Error:
$errorMessage"; } - $conferences_id = mysql_insert_id(); - + // Dennis mysql_insert_id returns 0 because it follows an update query (no auto increment done) + //$conferences_id = mysql_insert_id(); + $conferences_id = $id; //copy over the award_types defaults $q=mysql_query("SELECT * FROM award_types WHERE conferences_id='-1'"); while($r=mysql_fetch_object($q)) {