Index: trunk/themes/default/incs/inportal_main.css =================================================================== diff -u -N -r249 -r289 --- trunk/themes/default/incs/inportal_main.css (.../inportal_main.css) (revision 249) +++ trunk/themes/default/incs/inportal_main.css (.../inportal_main.css) (revision 289) @@ -792,4 +792,12 @@ border: 1px solid green; border-width: 1 1 0 0; +} + +.debug_layer { + position: relative; + overflow: auto; + + height: 300px; + width: 600px; } \ No newline at end of file Index: trunk/kernel/include/config.php =================================================================== diff -u -N -r259 -r289 --- trunk/kernel/include/config.php (.../config.php) (revision 259) +++ trunk/kernel/include/config.php (.../config.php) (revision 289) @@ -417,8 +417,7 @@ $sql = "SELECT * FROM ".GetTablePrefix()."ConfigurationAdmin INNER JOIN ".GetTablePrefix()."ConfigurationValues Using(VariableName) WHERE ModuleOwner='".$this->module."' AND Section='".$this->section."' AND Install=1 ORDER BY DisplayOrder ASC"; } - if((int)$_GLOBALS["debuglevel"]) - echo $sql."
\n"; + if( $GLOBALS['debuglevel'] ) echo $sql."
\n"; $adodbConnection = GetADODBConnection(); $rs = $adodbConnection->Execute($sql); while($rs && !$rs->EOF) Index: trunk/kernel/include/image.php =================================================================== diff -u -N -r271 -r289 --- trunk/kernel/include/image.php (.../image.php) (revision 271) +++ trunk/kernel/include/image.php (.../image.php) (revision 289) @@ -201,8 +201,7 @@ $parts = pathinfo($file["name"]); $ext = strtolower($parts["extension"]); - if((int)$_GLOBALS["debuglevel"]) - echo "Processing ".$file["tmp_name"]."
\n"; + if( $GLOBALS['debuglevel'] ) echo "Processing ".$file["tmp_name"]."
\n"; if($rewrite_name==1) { @@ -216,8 +215,7 @@ $filename = $file["name"]; } $destination = $pathtoroot.$Dest_Dir.$filename; - if((int)$_GLOBALS["debuglevel"]) - echo $file["tmp_name"]."=>".$destination."
\n"; + if( $GLOBALS['debuglevel'] ) echo $file["tmp_name"]."=>".$destination."
\n"; if(IsUpload==TRUE) { $result = @move_uploaded_file($file["tmp_name"],$destination); Index: trunk/kernel/include/usersession.php =================================================================== diff -u -N -r271 -r289 --- trunk/kernel/include/usersession.php (.../usersession.php) (revision 271) +++ trunk/kernel/include/usersession.php (.../usersession.php) (revision 289) @@ -1029,6 +1029,7 @@ function SessionEnabled() { + //trace(); $res = FALSE; $key = $this->GetSessionKey(); if(strlen($key)>0) Index: trunk/admin/cat_select.php =================================================================== diff -u -N -r251 -r289 --- trunk/admin/cat_select.php (.../cat_select.php) (revision 251) +++ trunk/admin/cat_select.php (.../cat_select.php) (revision 289) @@ -102,8 +102,7 @@ $homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');"; -if((int)$_GLOBALS["debuglevel"]) - echo $homeURL."
\n"; +if( $GLOBALS['debuglevel'] ) echo $homeURL."
\n"; unset($m_var_list_update["cat"]); if($objCatList->CurrentCategoryID()>0) Index: trunk/globals.php =================================================================== diff -u -N -r284 -r289 --- trunk/globals.php (.../globals.php) (revision 284) +++ trunk/globals.php (.../globals.php) (revision 289) @@ -16,8 +16,8 @@ $KeywordIgnore = array(); global $debuglevel; -$debuglevel=0; -$_GLOBALS["debuglevel"]=0; +$debuglevel = 0; +//$GLOBALS['debuglevel'] = 0; /*New, Hot, Pop field values */ define('NEVER', 0); @@ -655,7 +655,7 @@ if (($r == "dob_day") || ($r == "dob_month") || ($r == "dob_year")) $r = "dob"; - $tag = $_POST["errors"][$r]; + $tag = isset($_POST["errors"]) ? $_POST["errors"][$r] : ''; if(!strlen($tag)) $tag = "lu_ferror_".$f."_".$r; $FormError[$f][$r] = language($tag); @@ -1172,9 +1172,12 @@ if($prev_cat != $last_cat) $GLOBALS[$module_prefix.'_var_list'][$page_variable] = 1; } -function GetVar($name) +function GetVar($name, $post_priority = false) { - return isset($_REQUEST[$name]) ? $_REQUEST[$name] : false; + if(!$post_priority) // follow gpc_order in php.ini + return isset($_REQUEST[$name]) ? $_REQUEST[$name] : false; + else // get variable from post 1stly if not found then from get + return isset($_POST[$name]) && $_POST[$name] ? $_POST[$name] : isset($_GET[$name]) && $_GET[$name] ? $_GET[$name] : false; } function PassVar(&$source) @@ -1349,5 +1352,14 @@ $scripts = GetImportScripts(); return isset($scripts[$id]) ? $scripts[$id] : false; } +function GetNextTemplate($current_template) +{ + // used on front, returns next template to make + // redirect to + $dest = GetVar('dest', true); + if(!$dest) $dest = GetVar('DestTemplate', true); + return $dest ? $dest : $current_template; +} + ?> Index: trunk/kernel/include/portaluser.php =================================================================== diff -u -N -r288 -r289 --- trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 288) +++ trunk/kernel/include/portaluser.php (.../portaluser.php) (revision 289) @@ -695,7 +695,7 @@ { $this->clsItemCollection(); // clsItemList() // need to use this, but double limit clause being created (normal+default 0,100) $this->classname = "clsPortalUser"; - $this->SourceTable = GetTablePrefix()."PortalUser"; + $this->SetTable('live', GetTablePrefix().'PortalUser'); $this->Page = isset($_GET['lpn']) ? $_GET['lpn'] : 1; $this->EnablePaging = true; $this->PerPageVar = "Perpage_User"; Index: trunk/kernel/include/language.php =================================================================== diff -u -N -r283 -r289 --- trunk/kernel/include/language.php (.../language.php) (revision 283) +++ trunk/kernel/include/language.php (.../language.php) (revision 289) @@ -108,8 +108,7 @@ function DeleteLanguage($LangId) { $sql = "DELETE FROM ".$this->SourceTable." WHERE LanguageId=$LangId"; - if((int)$_GLOBALS["debuglevel"]) - echo $sql."
\n"; + if( $GLOBALS['debuglevel'] ) echo $sql."
\n"; $this->adodbConnection->Execute($sql); } @@ -122,7 +121,8 @@ //$idlist = array(); $sql = "SELECT * FROM $edit_table"; - + echo "performing mass create/update
"; + flush(); $this->Clear(); $rs = $this->adodbConnection->Execute($sql); while($rs && !$rs->EOF) @@ -149,8 +149,7 @@ $sql = "DELETE FROM ".$this->SourceTable." WHERE LanguageId = 0"; $this->adodbConnection->Execute($sql); - if((int)$_GLOBALS["debuglevel"]) - echo $sql."
\n"; + if( $GLOBALS['debuglevel'] ) echo $sql."
\n"; $this->adodbConnection->Execute($sql); } Index: trunk/kernel/parser.php =================================================================== diff -u -N -r260 -r289 --- trunk/kernel/parser.php (.../parser.php) (revision 260) +++ trunk/kernel/parser.php (.../parser.php) (revision 289) @@ -3365,5 +3365,11 @@ return $ret; } + +function m_debug_mode($attribs = array()) +{ + $const_name = $attribs['_debugconst']; + return defined($const_name) && (constant($const_name) == 1) ? 'yes' : ''; +} ?> Index: trunk/kernel/include/itemreview.php =================================================================== diff -u -N -r271 -r289 --- trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 271) +++ trunk/kernel/include/itemreview.php (.../itemreview.php) (revision 289) @@ -85,8 +85,7 @@ } $sql = sprintf("SELECT * FROM ".$this->tablename." WHERE ReviewId = '%s'",$Id); - if((int)$_GLOBALS["debuglevel"]) - echo $sql."
"; + if( $GLOBALS['debuglevel'] ) echo $sql."
"; $result = $this->adodbConnection->Execute($sql); if ($result === false) { Index: trunk/admin/users/addgroup_permissions.php =================================================================== diff -u -N -r13 -r289 --- trunk/admin/users/addgroup_permissions.php (.../addgroup_permissions.php) (revision 13) +++ trunk/admin/users/addgroup_permissions.php (.../addgroup_permissions.php) (revision 289) @@ -174,7 +174,7 @@ ?> "> -"> + Index: trunk/kernel/frontaction.php =================================================================== diff -u -N -r288 -r289 --- trunk/kernel/frontaction.php (.../frontaction.php) (revision 288) +++ trunk/kernel/frontaction.php (.../frontaction.php) (revision 289) @@ -12,6 +12,9 @@ echo '
'; echo "
ScriptName: $script (".dirname($_SERVER['PHP_SELF']).")

"; + $div_height = (count($_REQUEST)+1)*26; + if($div_height > 300) $div_height = 300; + echo '
'; echo ''; echo ''; @@ -21,25 +24,29 @@ $src = isset($_GET[$key]) ? 'GE' : (isset($_POST[$key]) ? 'PO' : (isset($_COOKIE[$key]) ? 'CO' : '?') ); echo ''; } - echo '
SrcNameValue
'.$src.''.$key.''.print_r($value, true).'
'; + echo '
'; echo ''; unset($script); +// echo "SID: ".$objSession->GetSessionKey().'
'; } switch($Action) { case "m_login": // if($objSession->ValidSession()) $objSession->Logout(); + //echo $objSession->GetSessionKey()."
\n"; if ($objConfig->Get("CookieSessions") == 1 && $_COOKIE["CookiesTest"] != "1") { $FormError["login"]["login_user"] = language("lu_cookies_error"); } - else { + else + { $MissingCount = SetMissingDataErrors("login"); if($MissingCount==2) { $FormError["login"]["login_user"]= language("lu_ferror_loginboth"); unset($FormError["login"]["login_password"]); } + if($MissingCount==0) { if($_POST["login_user"]=="root") @@ -54,37 +61,28 @@ } else { - - if(!headers_sent() && ($_POST["usercookie"]==1 || $_GET["usercookie"]==1)) + if( !headers_sent() && GetVar('usercookie') == 1 ) { $c = $_POST["login_user"]."|"; $pw = $_POST["login_password"]; - if(strlen($pw)<31) - $pw = md5($pw); - + if(strlen($pw) < 31) $pw = md5($pw); $c .= $pw; setcookie("login",$c,time()+2592000); } - $dest = $_POST["dest"]; - if(!strlen($dest)) - $dest = $_GET["dest"]; - if(!strlen($dest)) - $dest = $_POST["DestTemplate"]; - if(!strlen($dest)) - $dest = $_GET["DestTemplate"]; - if(strlen($dest)) - { - $var_list["t"] = $dest; - //header("Location: ../../index.php?env=" . BuildEnv()); - } + - // echo "DEST: ".$t; die(); - } - } - } - } - break; + // set new destination template if passed + $dest = GetVar('dest', true); + if(!$dest) $dest = GetVar('DestTemplate', true); + if($dest) $var_list['t'] = $dest; + echo "DEST: $dest
"; + } + } + } + } + break; + case "m_forgotpw": $MissingCount = SetMissingDataErrors("forgotpw"); if($MissingCount==0)