Index: trunk/admin/backup/backup1.php =================================================================== diff -u -N -r13 -r203 --- trunk/admin/backup/backup1.php (.../backup1.php) (revision 13) +++ trunk/admin/backup/backup1.php (.../backup1.php) (revision 203) @@ -79,6 +79,12 @@ $section = "in-portal:backup"; //Set Environment Variable $envar = "env=" . BuildEnv(); + + +$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY"); + + + global $tables; unset($tables); @@ -141,7 +147,7 @@ $MouseOver=""; $MouseOut=""; $onClick=""; - $link="#"; + $link = "#"; $objCatToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Step"),"#","","","","tool_prev_f3.gif"); } @@ -150,7 +156,8 @@ $MouseOver="swap('moveright','toolbar/tool_next_f2.gif');"; $MouseOut="swap('moveright', 'toolbar/tool_next.gif');"; $var="?env=".BuildEnv()."&en=$en_next"; - $link2=$rootURL."admin/backup/backup2.php".$var; + $script_name = $ro_perm ? 'backup1' : 'backup2'; + $link2 = $rootURL."admin/backup/".$script_name.".php".$var; $onClick="document.location= '$link2';"; $link="#"; Index: trunk/admin/import/inlinkimport2.php =================================================================== diff -u -N -r13 -r203 --- trunk/admin/import/inlinkimport2.php (.../inlinkimport2.php) (revision 13) +++ trunk/admin/import/inlinkimport2.php (.../inlinkimport2.php) (revision 203) @@ -105,7 +105,9 @@ $var="?env=".BuildEnv()."&en=$en_next"; - $link2=$adminURL."/import/inlinkimport3.php".$var; + $ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY"); + $script_name = $ro_perm ? 'inlinkimport1' : 'inlinkimport3'; + $link2=$adminURL."/import/".$script_name.".php".$var; $onClick="if (document.inlinkimport2.choose[0].checked) document.location= '$link2'; "; Index: trunk/admin/import/import.php =================================================================== diff -u -N -r155 -r203 --- trunk/admin/import/import.php (.../import.php) (revision 155) +++ trunk/admin/import/import.php (.../import.php) (revision 203) @@ -1,6 +1,8 @@ PConnect($inlink_server, $inlink_user, $inlink_pass, $inlink_db); +$linkconn->debug = 1; if(!$linkconn) { echo "Database connection failed. DB Type: $sql_type, DB Server: $inlink_server, DB User: $inlink_user, DB Name: $inlink_db"; //fatal; echo $linkconn->ErrorMsg(); Index: trunk/kernel/admin/include/navmenu.php =================================================================== diff -u -N -r177 -r203 --- trunk/kernel/admin/include/navmenu.php (.../navmenu.php) (revision 177) +++ trunk/kernel/admin/include/navmenu.php (.../navmenu.php) (revision 203) @@ -67,6 +67,7 @@ $admin."/icons/icon46_tool_backup.gif",$admin."/icons/icon24_tool_backup.gif", NULL,NULL,NULL,NULL,0,"",1, NULL,NULL,NULL,NULL); + $objSections->AddSection("in-portal:restore_toolbar",NULL,NULL,NULL,NULL, NULL,NULL, NULL,NULL,NULL,NULL,0,"",1, @@ -83,8 +84,8 @@ NULL,"in-portal:tools","in-portal:restore","in-portal:inlink_inport",0,"",1, NULL,"in-portal:tools",NULL,$admin."/icons/icon46_list_tool_export.gif","la_performing_export"); -if( !$objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY") ) -{ +//if( !$objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY") ) +//{ $objSections->AddSection("in-portal:inlink_inport","la_tab_ImportData","la_tab_ImportData",$admin."/import/","inlinkimport1.php", $admin."/icons/icon46_tool_import.gif",$admin."/icons/icon24_tool_import.gif", NULL,"in-portal:tools","in-portal:export","in-portal:sql_query",1,"",1, @@ -94,7 +95,7 @@ $admin."/icons/icon46_tool_import.gif",$admin."/icons/icon24_tool_import.gif", NULL,"in-portal:tools","in-portal:inlink_inport",NULL,0,"",1, NULL,"in-portal:tools",NULL,$admin."/icons/icon46_list_tool_import.gif","la_running_query"); -} +//} $objSections->AddSection("in-portal:system","la_tab_Sys_Config","la_title_Sys_Config",$admin."/","subitems.php", $admin."/icons/icon46_conf.gif",$admin."/icons/icon24_conf.gif",NULL, Index: trunk/admin/tools/sql_query.php =================================================================== diff -u -N -r13 -r203 --- trunk/admin/tools/sql_query.php (.../sql_query.php) (revision 13) +++ trunk/admin/tools/sql_query.php (.../sql_query.php) (revision 203) @@ -96,8 +96,10 @@ //$title = admin_language("la_tab_QueryDB"); -//$saveURL = $admin."/browse.php"; -$saveURL = $admin."/tools/sql_result.php"; +$ro_perm = $objSession->HasSystemPermission("SYSTEM_ACCESS.READONLY"); +$script_name = $ro_perm ? 'sql_query' : 'sql_result'; + +$saveURL = $admin."/tools/".$script_name.".php"; $ParentUrl = $parent->URL(); if(strlen($ParentUrl)>0) Index: trunk/admin/include/style.css =================================================================== diff -u -N -r36 -r203 --- trunk/admin/include/style.css (.../style.css) (revision 36) +++ trunk/admin/include/style.css (.../style.css) (revision 203) @@ -433,4 +433,17 @@ { padding: 5px 10px 5px 10px; +} + +/* debug output styles */ + + +.debug_table { + border: 1px solid green; + border-width: 0 0 1 1; +} + +.debug_table TD { + border: 1px solid green; + border-width: 1 1 0 0; } \ No newline at end of file Index: trunk/admin/include/tabs.js =================================================================== diff -u -N -r104 -r203 --- trunk/admin/include/tabs.js (.../tabs.js) (revision 104) +++ trunk/admin/include/tabs.js (.../tabs.js) (revision 203) @@ -137,7 +137,7 @@ function edit_submit(formname, status_field, targetURL, save_value, env_str, new_target) { var full_env = env; - if(env_str != null) full_env += env_str; + if( HasParam(env_str) ) full_env += env_str; if(full_env.substr(0,3)!="env") full_env = 'env='+full_env; @@ -181,10 +181,10 @@ } //Used when the save or cancel buttin is hit -function do_edit_save(formname, status_field, targetURL, save_value,env_str) +function do_edit_save(formname, status_field, targetURL, save_value, env_str) { var full_env = env; - if(env_str != null) full_env += env_str; + if( HasParam(env_str) ) full_env += env_str; if(full_env.substr(0,3)!="env") full_env = 'env='+full_env; @@ -203,23 +203,23 @@ alert('Form '+formname+' was not found.'); } -function jump_to_url(targetURL,env_str) +function jump_to_url(targetURL, env_str) { var full_env = env; - if(env_str != null) full_env += env_str; + if( HasParam(env_str) ) full_env += env_str; if(full_env.substr(0,3)!="env") full_env = 'env='+full_env; document.location = rootURL + targetURL + '?' + full_env; } // ------------------------------------------------------------------------------------------------------------- -function submit_form(formname, status_field, targetURL, save_value,env_str) +function submit_form(formname, status_field, targetURL, save_value, env_str) { // by Alex, submits form. var full_env = env; - if(env_str != null) full_env += env_str; + if( HasParam(env_str) ) full_env += env_str; if(full_env.substr(0,3)!="env") full_env = 'env='+full_env; @@ -258,4 +258,10 @@ } else alert('Form '+formname+' was not found.'); +} + +function HasParam(param) +{ + // checks of parameter is passed to function (cross-browser) + return typeof(param) == 'undefined' ? false : true; } \ No newline at end of file Index: trunk/admin/listview/listview.js =================================================================== diff -u -N -r34 -r203 --- trunk/admin/listview/listview.js (.../listview.js) (revision 34) +++ trunk/admin/listview/listview.js (.../listview.js) (revision 203) @@ -196,9 +196,8 @@ //This overrides the function in tabs.js for use in lists function edit_submit(formname, status_field, targetURL, save_value,env_str) { - var full_env = env - if(env_str != null) full_env += env_str; + if( !((env_str == null) && typeof(env_str) == 'undefined') ) full_env += env_str; if(full_env.substr(0,3)!="env") full_env = 'env='+full_env; Index: trunk/kernel/action.php =================================================================== diff -u -N -r189 -r203 --- trunk/kernel/action.php (.../action.php) (revision 189) +++ trunk/kernel/action.php (.../action.php) (revision 203) @@ -4,11 +4,31 @@ if( defined('DEBUG_ACTIONS') && (DEBUG_ACTIONS & KERNEL_ACTIONS) == KERNEL_ACTIONS ) { - echo "Kernel Action $Action
\n"; - echo 'REQUEST:'; - print_pre($_REQUEST); + if($Action) echo "Kernel Action [$Action]
\n"; } +if( defined('DEBUG_ACTIONS') && (DEBUG_ACTIONS & SHOW_REQUEST) == SHOW_REQUEST ) +{ + // don't show debug output in tree & header of admin & while logging in + $script = basename($_SERVER['PHP_SELF']); + $skip_debug = Array('index.php','tree.php','head.php'); + if( !in_array($script, $skip_debug) ) + { + echo "ScriptName: $script (".dirname($_SERVER['PHP_SELF']).")

"; + echo ''; + echo ''; + + foreach($_REQUEST as $key => $value) + { + if( trim($value) == '' ) $value = ' '; + $src = isset($_GET[$key]) ? 'GE' : (isset($_POST[$key]) ? 'PO' : (isset($_COOKIE[$key]) ? 'CO' : '?') ); + echo ''; + } + echo '
SrcNameValue
'.$src.''.$key.''.$value.'
'; + } + unset($script, $skip_debug); +} + switch($Action) { case "m_add_user": @@ -279,6 +299,7 @@ if($_POST["CatEditStatus"] != -1) { + $objSession->SetVariable('PermCache_UpdateRequired', 1); $GroupId = $_POST["GroupId"]; $CatId = $_POST["CategoryId"]; $Module = $_POST["Module"]; Index: trunk/admin/install/inportal_data.sql =================================================================== diff -u -N -r103 -r203 --- trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 103) +++ trunk/admin/install/inportal_data.sql (.../inportal_data.sql) (revision 203) @@ -138,16 +138,16 @@ INSERT INTO ConfigurationValues VALUES ('SearchLog_SortField', 'Keyword', 'In-Portal', ''); INSERT INTO ConfigurationValues VALUES ('Perpage_StatItem', '10', 'inportal', ''); -INSERT INTO Events VALUES (30, 'USER.ADD', 1, 19, 'In-Portal:Users', 'la_event_user.add', 0) +INSERT INTO Events VALUES (30, 'USER.ADD', 1, 0, 'In-Portal:Users', 'la_event_user.add', 0) INSERT INTO Events VALUES (32, 'USER.ADD', 2, 0, 'In-Portal:Users', 'la_event_user.add', 1) INSERT INTO Events VALUES (31, 'USER.APPROVE', 1, 0, 'In-Portal:Users', 'la_event_user.approve', 0) INSERT INTO Events VALUES (33, 'USER.APPROVE', 2, 0, 'In-Portal:Users', 'la_event_user.approve', 1) INSERT INTO Events VALUES (34, 'USER.VALIDATE', 1, 0, 'In-Portal:Users', 'la_event_user.validate', 0) INSERT INTO Events VALUES (35, 'USER.VALIDATE', 2, 0, 'In-Portal:Users', 'la_event_user.validate', 1) INSERT INTO Events VALUES (36, 'USER.DENY', 1, 0, 'In-Portal:Users', 'la_event_user.deny', 0) INSERT INTO Events VALUES (37, 'USER.DENY', 2, 0, 'In-Portal:Users', 'la_event_user.deny', 1) -INSERT INTO Events VALUES (38, 'USER.PSWD', 2, 19, 'In-Portal:Users', 'la_event_user.forgotpw', 1) -INSERT INTO Events VALUES (39, 'USER.PSWD', 1, 19, 'In-Portal:Users', 'la_event_user.forgotpw', 0) +INSERT INTO Events VALUES (38, 'USER.PSWD', 2, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 1) +INSERT INTO Events VALUES (39, 'USER.PSWD', 1, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 0) INSERT INTO Events VALUES (45, 'USER.ADD.PENDING', 1, 0, 'In-Portal:Users', 'la_event_user.add.pending', 0) INSERT INTO Events VALUES (47, 'CATEGORY.ADD', 1, 0, 'In-Portal:Category', 'la_event_category.add', 0) INSERT INTO Events VALUES (48, 'CATEGORY.ADD.PENDING', 1, 0, 'In-Portal:Category', 'la_event_category.add.pending', 0) @@ -161,9 +161,9 @@ INSERT INTO Events VALUES (57, 'CATEGORY.APPROVE', 2, 0, 'In-Portal:Category', 'la_event_category.approve', 1) INSERT INTO Events VALUES (58, 'CATEGORY.DENY', 1, 0, 'In-Portal:Category', 'la_event_category.deny', 0) INSERT INTO Events VALUES (59, 'CATEGORY.DENY', 2, 0, 'In-Portal:Category', 'la_event_category.deny', 1) -INSERT INTO Events VALUES (60, 'USER.SUBSCRIBE', 1, 19, 'In-Portal:Users', 'la_event_user.subscribe', 0); +INSERT INTO Events VALUES (60, 'USER.SUBSCRIBE', 1, 0, 'In-Portal:Users', 'la_event_user.subscribe', 0); INSERT INTO Events VALUES (61, 'USER.SUBSCRIBE', 2, 0, 'In-Portal:Users', 'la_event_user.subscribe', 1); -INSERT INTO Events VALUES (62, 'USER.UNSUBSCRIBE', 1, 19, 'In-Portal:Users', 'la_event_user.unsubscribe', 0); +INSERT INTO Events VALUES (62, 'USER.UNSUBSCRIBE', 1, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 0); INSERT INTO Events VALUES (63, 'USER.UNSUBSCRIBE', 2, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 1); INSERT INTO Events VALUES (64,'USER.SUGGEST', '1', '0', 'In-Portal:Users', 'la_event_user.suggest', '0'); INSERT INTO Events VALUES (65,'USER.SUGGEST', '2', '0', 'In-Portal:Users', 'la_event_user.suggest', '1');