Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F772780
in-portal
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Feb 1, 6:38 PM
Size
38 KB
Mime Type
text/x-diff
Expires
Mon, Feb 3, 6:38 PM (1 d, 9 h)
Engine
blob
Format
Raw Data
Handle
556076
Attached To
rINP In-Portal
in-portal
View Options
Index: trunk/kernel/admin/include/toolbar/catselect.php
===================================================================
--- trunk/kernel/admin/include/toolbar/catselect.php (revision 100)
+++ trunk/kernel/admin/include/toolbar/catselect.php (revision 101)
@@ -1,685 +1,685 @@
<?php
global $objConfig,$objSections,$section, $rootURL,$adminURL, $admin, $imagesURL,$envar,
$m_var_list_update,$objCatList, $homeURL, $upURL, $objSession,$CatScopeClause,$DefaultTab;
global $CategoryFilter,$TotalItemCount;
global $Bit_All,$Bit_Pending,$Bit_Disabled,$Bit_New,$Bit_Pop,$Bit_Hot,$Bit_Ed;
global $hideSelectAll;
/* bit place holders for category view menu */
$Bit_Active=64;
$Bit_Pending=32;
$Bit_Disabled=16;
$Bit_New=8;
$Bit_Pop=4;
$Bit_Hot=2;
$Bit_Ed=1;
if( GetVar('SetTab') )
{
if($_GET["SetTab"] != "categories")
{
$m_tab_CatTab_Hide = 1;
$DefaultTab = $_GET["SetTab"];
}
else
{
$DefaultTab="categories";
$m_tab_CatTab_Hide = 0;
}
}
else
$m_tab_CatTab_Hide = (int)$objConfig->Get("CatTab_Hide");
$CategoryView = $objConfig->Get("Category_View");
if(!is_numeric($CategoryView))
{
$CategoryView = 127;
}
$Category_Sortfield = $objConfig->Get("Category_Sortfield");
if(!strlen($Category_Sortfield))
$Category_Sortfield = "Name";
$Category_Sortorder = $objConfig->Get("Category_Sortorder");
if(!strlen($Category_Sortorder))
$Category_Sortorder = "desc";
$Perpage_Category = (int)$objConfig->Get("Perpage_Category");
if(!$Perpage_Category)
$Perpage_Category="'all'";
if($CategoryView == 127)
{
$Category_ShowAll = 1;
}
else
{
$Category_ShowAll=0;
$Status = array();
$Mod = array();
if($CategoryView & $Bit_Pending)
$Status[] = STATUS_PENDING;
if($CategoryView & $Bit_Active)
$Status[] = STATUS_ACTIVE;
if($CategoryView & $Bit_Disabled)
$Status[] = STATUS_DISABLED;
if(count($Status))
{
$CategoryFilter .= " AND (Status IN (".implode(",",$Status).") ";
}
else
$CategoryFilter .= " AND ((Status=-1) ";
if($CategoryView & $Bit_Ed)
{
$CategoryFilter .= " OR (EditorsPick=1) ";
}
if($CategoryView & $Bit_New)
{
$cutoff = adodb_date("U") - ($objConfig->Get("Category_DaysNew") * 86400);
$CategoryFilter .= " OR (CreatedOn > ".$cutoff.") ";
}
$CategoryFilter .= ")";
}
$list = $objSession->GetVariable("SearchWord");
if(strlen($list))
{
$CatScope = $objSession->GetVariable("SearchScope");
switch($CatScope)
{
case 0 :
$CatScopeClause = "";
break;
case 1:
$cat = $objCatList->CurrentCategoryID();
if($cat>0)
{
$allcats = $objCatList->AllSubCats($cat);
if(count($allcats)>0)
{
$catlist = implode(",",$allcats);
$CatScopeClause = " CategoryId IN ($catlist) ";
}
}
break;
case 2:
$CatScopeClause = "CategoryId=".$objCatList->CurrentCategoryID();
break;
}
}
else
$CatScopeClause="";
$mnuClearSearch = language("la_SearchMenu_Clear");
$mnuNewSearch = language("la_SearchMenu_New");
$mnuSearchCategory = language("la_SearchMenu_Categories");
$lang_New = language("la_Text_New");
$lang_Hot = language("la_Text_Hot");
$lang_EdPick = language("la_prompt_EditorsPick");
$lang_Pop = language("la_Text_Pop");
$lang_Rating = language("la_prompt_Rating");
$lang_Hits = language("la_prompt_Hits");
$lang_Votes = language("la_prompt_Votes");
$lang_Name = language("la_prompt_Name");
$lang_Categories = language("la_ItemTab_Categories");
$lang_Description = language("la_prompt_Description");
$lang_MetaKeywords = language("la_prompt_MetaKeywords");
$lang_SubSearch = language("la_prompt_SubSearch");
$lang_Within = language("la_Text_Within");
$lang_Current = language("la_Text_Current");
$lang_Active = language("la_Text_Active");
$lang_SubCats = language("la_Text_SubCats");
$lang_SubItems = language("la_Text_Subitems");
$destform = $_GET["destform"];
$destfield = $_GET["destfield"];
print <<<END
<script language="JavaScript">
var Category_Sortfield = '$Category_Sortfield';
var Category_Sortorder = '$Category_Sortorder';
var Category_Perpage = $Perpage_Category;
var Category_ShowAll = $Category_ShowAll;
var CategoryView = $CategoryView;
var default_tab = "$DefaultTab";
//JS Language variables
var lang_New = "$lang_New";
var lang_Hot = "$lang_Hot";
var lang_EdPick = "$lang_EdPick";
var lang_Pop = "$lang_Pop";
var lang_Rating = "$lang_Rating";
var lang_Hits = "$lang_Hits";
var lang_Votes = "$lang_Votes";
var lang_Name = "$lang_Name";
var lang_Categories = "$lang_Categories";
var lang_Description = "$lang_Description";
var lang_MetaKeywords = "$lang_MetaKeywords";
var lang_SubSearch = "$lang_SubSearch";
var lang_Within="$lang_Within";
var lang_Current = "$lang_Current";
var lang_Active = "$lang_Active";
var lang_SubCats = "$lang_SubCats";
var lang_SubItems = "$lang_SubItems";
var m_tab_CatTab_hide = $m_tab_CatTab_Hide;
var hostname = '$rootURL';
var env = '$envar';
var actionlist = new Array();
var homeURL = "$homeURL";
var upURL = "$upURL";
var Categories_Paste = false;
function InitPage()
{
addCommonActions();
initToolbar('mainToolBar', actionHandler);
initCheckBoxes();
toggleMenu();
}
function AddButtonAction(actionname,actionval)
{
var item = new Array(actionname,actionval);
actionlist[actionlist.length] = item;
}
function actionHandler(button)
{
//alert('a button has been pressed!');
for(i=0; i<actionlist.length;i++)
{
a = actionlist[i];
if(button.action==a[0])
{
//alert('Button action '+a[0]+' is '+a[1]);
eval(a[1]);
break;
}
}
}
function addCommonActions()
{
AddButtonAction('upcat',"get_to_server(upURL,'');");// UP
AddButtonAction('homecat',"get_to_server(homeURL,'');"); //home
AddButtonAction('select',"select_check_submit();"); //edit
AddButtonAction('stop',"window.close();"); //delete
AddButtonAction('print',"window.print();"); //print ?
AddButtonAction('view',"toggleMenu(); window.FW_showMenu(window.cat_menu,getRealLeft(button) - ((document.all) ? 6 : -2),getRealTop(button)+32);");
AddButtonAction('search_a',"setSearchMenu(); window.FW_showMenu(window.SearchMenu,getRealLeft(button)-134 - ((document.all) ? 8 : -1),getRealTop(button)+22);");
AddButtonAction('search_b',"search_submit();");
AddButtonAction('search_c',"new_search_submit();");
}
function AdminCatNav(url)
{
f = document.getElementById("admin_search");
if(f)
{
f.action = url;
new_search_submit();
}
}
function CheckList(tabId)
{
var result="";
if(toolbar)
{
var tab = document.getElementById(tabId);
if (!tab) return;
var inputs = tab.getElementsByTagName("INPUT");
for (var j = 0; j < inputs.length; j++)
if (((inputs[j].type == "checkbox") || (inputs[j].type == "radio")) && (inputs[j].inportalType))
{
if(inputs[j].checked)
result = result + inputs[j].value+',';
}
return result;
}
}
function select_check_submit()
{
var formname = '';
//var f = document.getElementById('categories_name_form');
var f = document.getElementById('categories_form');
var bf = window.opener.document.getElementById('$destform');
if(bf)
{
try{
item_id = LastCheckedItem.value;
item_type = LastCheckedItem.getAttribute('ItemType');
}
catch(err)
{
}
bf.$destfield.value = CheckList('categories');
bf.submit();
window.close();
}
} // check submit
function search_submit()
{
f = document.getElementById("admin_search");
if(f)
{
//alert('Setting SearchWord to ' + f.value);
f.Action.value = "m_SearchWord";
f.submit();
}
}
function new_search_submit()
{
var newSearchInput = document.getElementById("NewSearch");
if (newSearchInput) newSearchInput.value = 1;
search_submit();
}
function ClearSearch()
{
//alert('Clearing Search');
f = document.getElementById("admin_search");
if(f)
{
f.Action.value = "m_ClearSearch";
f.submit();
}
}
function SetSearchType(value)
{
f = document.getElementById("admin_search");
if(f)
{
f.SearchType.value = value;
}
}
function SetSearchScope(value)
{
f = document.getElementById("admin_search");
if(f)
{
f.SearchScope.value = value;
}
}
function ToggleNewSearch()
{
f = document.getElementById("admin_search");
if(f)
{
value = f.NewSearch.value;
if(value==1)
{
f.NewSearch.value=0;
}
else
f.NewSearch.value=1;
}
}
function isNewSearch()
{
f = document.getElementById("admin_search");
if(f)
{
return f.NewSearch.value;
} else return 0;
}
function get_to_server(path,attr)
{
if(attr.length>0)
path = path + '?'+attr;
- alert(path);
+ //alert(path);
window.location.href=path;
return true;
}
function check_submit(page,actionValue)
{
if (actionValue.match(/delete$/)) {
if (!theMainScript.Confirm(lang_DeleteConfirm)) return;
}
var formname = '';
if ((activeTab) && (!isAnyChecked('categories')))
{
form_name = activeTab.id;
action_prefix = activeTab.ActionPrefix;
if(page.length==0)
page = activeTab.EditURL;
}
else
{
form_name = 'categories';
action_prefix = 'm_cat_';
if(page.length==0)
page="$admin" + '/category/addcategory';
}
var f = document.getElementById(form_name+'_form');
if(f)
{
f.Action.value = action_prefix + actionValue;
f.action = '$rootURL' + page + '.php?'+ env;
//alert(f.name+ ' is submitting to '+ f.action + ' action=' + f.Action.value);
f.submit();
}
} // check submit
function flip_current(field_suffix)
{
if(activeTab)
{
field = activeTab.getAttribute("tabTitle")+field_suffix;
return flip(eval(field));
}
}
function config_current(field_suffix,value)
{
if(activeTab)
{
field = activeTab.getAttribute("tabTitle")+field_suffix;
config_val(field,value);
}
}
function getSType(type,value)
{
f = document.getElementById("admin_search");
if(f)
{
if (f.SearchType.value == type) return 2; else return 0;
} else return 0;
}
function getSScope(scope)
{
f = document.getElementById("admin_search");
if(f)
{
if (f.SearchScope.value == scope) return 2; else return 0;
} else return 0;
}
function setSearchMenu()
{
window.SearchMenu = new Menu("search");
SearchMenu.addMenuItem(lang_All,"SetSearchType('all');",getSType('all'));
SearchMenu.addMenuSeparator()
SearchMenu.addMenuItem(lang_Categories, "SetSearchType('categories');",getSType('categories'));
param = "";
for (var i = 0; i < tabIDs.length; i++)
{
d = document.getElementById(tabIDs[i]);
if(d)
{
tabname = d.getAttribute("tabTitle");
param = "SetSearchType('"+tabname+"');";
SearchMenu.addMenuItem(tabname,param,getSType(tabname));
}
}
SearchMenu.addMenuSeparator();
SearchMenu.addMenuItem(lang_All+' '+lang_Categories,"SetSearchScope('0');",getSScope(0));
SearchMenu.addMenuItem(lang_SubSearch,"ToggleNewSearch();",isNewSearch());
SearchMenu.addMenuItem(lang_Current+' '+lang_Categories,"SetSearchScope('2');",getSScope(2));
SearchMenu.addMenuItem(lang_Within+' '+lang_Categories,"SetSearchScope('1');",getSScope(1));
SearchMenu.addMenuSeparator();
window.SearchMenu.addMenuItem('$mnuClearSearch',"ClearSearch();","");
window.triedToWriteMenus = false;
window.SearchMenu.writeMenus();
}
function Category_SortMenu(caption)
{
menu_sorting = new Menu(caption);
menu_sorting.addMenuItem(lang_Asc,"config_val('Category_Sortorder','asc');",RadioIsSelected(Category_Sortorder,'asc'));
menu_sorting.addMenuItem(lang_Desc,"config_val('Category_Sortorder','desc');",RadioIsSelected(Category_Sortorder,'desc'));
menu_sorting.addMenuSeparator();
menu_sorting.addMenuItem(lang_Default,"config_val('Category_Sortfield','Name');","");
menu_sorting.addMenuItem(lang_Name,"config_val('Category_Sortfield','Name');",RadioIsSelected(Category_Sortfield,'Name'));
menu_sorting.addMenuItem(lang_Description,"config_val('Category_Sortfield','Description');",RadioIsSelected(Category_Sortfield,'Description'));
menu_sorting.addMenuItem(lang_CreatedOn,"config_val('Category_Sortfield','CreatedOn');",RadioIsSelected(Category_Sortfield,'CreatedOn'));
menu_sorting.addMenuItem(lang_SubCats,"config_val('Category_Sortfield','CachedDescendantCatsQty');",RadioIsSelected(Category_Sortfield,'CachedDescendantCatsQty'));
menu_sorting.addMenuItem(lang_SubItems,"config_val('Category_Sortfield','SubItems');",RadioIsSelected(Category_Sortfield,'SubItems'));
return menu_sorting;
}
function Category_FilterMenu(caption)
{
menu_filter = new Menu(caption);
menu_filter.addMenuItem(lang_All,"config_val('Category_View', 127);",CategoryView==127);
menu_filter.addMenuSeparator();
menu_filter.addMenuItem(lang_Active,"FlipBit('Category_View',CategoryView,6);",BitStatus(CategoryView,6));
menu_filter.addMenuItem(lang_Pending,"FlipBit('Category_View',CategoryView,5);", BitStatus(CategoryView,5));
menu_filter.addMenuItem(lang_Disabled,"FlipBit('Category_View',CategoryView,4);",BitStatus(CategoryView,4));
menu_filter.addMenuSeparator();
menu_filter.addMenuItem(lang_New,"FlipBit('Category_View',CategoryView,3);",BitStatus(CategoryView,3));
menu_filter.addMenuItem(lang_EdPick,"FlipBit('Category_View',CategoryView,0);",BitStatus(CategoryView,0));
return menu_filter;
}
function toggleMenu()
{
//var tab_title = GetTabTitle(activeTab.id);
//alert(tab_title);
if ((document.getElementById('categories').active) && (activeTab))
{
filterfunc = activeTab.getAttribute("tabTitle")+'_FilterMenu();';
window.cat_menu_filter_sub = Category_FilterMenu(lang_Categories);
window.sub_menu_filter_sub = eval(filterfunc);
window.cat_menu_filter = new Menu(lang_View);
cat_menu_filter.addMenuItem(cat_menu_filter_sub);
cat_menu_filter.addMenuItem(sub_menu_filter_sub);
}
else
{
if (document.getElementById('categories').active)
{
window.cat_menu_filter = Category_FilterMenu(lang_View);
}
if (activeTab)
{
filterfunc = activeTab.getAttribute("tabTitle")+'_FilterMenu();';
window.cat_menu_filter = eval(filterfunc);
}
} // Filter
//Sorting
if ((document.getElementById('categories').active) && (activeTab))
{
//Sort->Categories
sortfunc = activeTab.getAttribute("tabTitle")+'_SortMenu();';
window.cat_menu_sorting_sub = Category_SortMenu(lang_Categories);
window.sub_menu_sorting_sub = eval(sortfunc);
window.cat_menu_sorting = new Menu(lang_Sort);
cat_menu_sorting.addMenuItem(cat_menu_sorting_sub);
cat_menu_sorting.addMenuItem(sub_menu_sorting_sub);
}
else
{
if (document.getElementById('categories').active)
{
window.cat_menu_sorting = Category_SortMenu(lang_Sort);
} // categories
if (activeTab)
{
window.cat_menu_sorting = Category_SortMenu(lang_Sort);
}
} // && Sorting
if ((document.getElementById('categories').active) && (activeTab))
{
window.cat_menu_select_sub = new Menu(lang_Categories);
cat_menu_select_sub.addMenuItem(lang_All,"javascript:selectAll('categories');","");
cat_menu_select_sub.addMenuItem(lang_Unselect,"javascript:unselectAll('categories');","");
cat_menu_select_sub.addMenuItem(lang_Invert,"javascript:invert('categories');","");
selectfunc = activeTab.getAttribute("tabTitle")+"_SelectMenu();";
window.sub_menu_select_sub = eval(selectfunc);
// sub_menu_select_sub.addMenuItem(lang_All,"javascript:selectAll('"+activeTab.id+"');","");
// sub_menu_select_sub.addMenuItem(lang_Unselect,"javascript:unselectAll('"+activeTab.id+"');","");
// sub_menu_select_sub.addMenuItem(lang_Invert,"javascript:invert('"+activeTab.id+"');","");
END;
if (!$hideSelectAll) {
echo "
window.cat_menu_select = new Menu(lang_Select);
cat_menu_select.addMenuItem(cat_menu_select_sub);
cat_menu_select.addMenuItem(sub_menu_select_sub);";
}
print <<<END
}
else
{
if (document.getElementById('categories').active)
{
window.cat_menu_select = new Menu(lang_Select);
cat_menu_select.addMenuItem(lang_All,"javascript:selectAll('categories');","");
cat_menu_select.addMenuItem(lang_Unselect,"javascript:unselectAll('categories');","");
cat_menu_select.addMenuItem(lang_Invert,"javascript:invert('categories');","");
}
END;
if (!$hideSelectAll) {
echo ' if (activeTab)
{
window.cat_menu_select = new Menu(lang_Select);
cat_menu_select.addMenuItem(lang_All,"javascript:selectAllC(\'"+activeTab.id+"\');","");
cat_menu_select.addMenuItem(lang_Unselect,"javascript:unselectAll(\'"+activeTab.id+"\');","");
cat_menu_select.addMenuItem(lang_Invert,"javascript:invert(\'"+activeTab.id+"\');","");
} ';
}
print <<<END
}
if(activeTab)
{
pagefunc = activeTab.getAttribute("tabTitle")+"_PerPageMenu();";
window.PerPageMenu = eval(pagefunc);
}
window.cat_menu = new Menu("root");
if ((document.getElementById('categories').active) || (activeTab)) window.cat_menu.addMenuItem(cat_menu_filter);
if ((document.getElementById('categories').active) || (activeTab)) window.cat_menu.addMenuItem(cat_menu_sorting);
if(activeTab) window.cat_menu.addMenuItem(PerPageMenu);
if ((document.getElementById('categories').active) || (activeTab)) window.cat_menu.addMenuItem(cat_menu_select);
window.triedToWriteMenus = false;
window.cat_menu.writeMenus();
}
function toggleCategoriesA(tabHeader)
{
var categories = document.getElementById('categories');
if (!categories) return;
toggleCategories();
tabHeader.setAttribute("background", '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif")
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) return;
images[0].src = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "divider_up" : "divider_dn") + ".gif";
}
function toggleTabA(tabId, atm)
{
var hl = document.getElementById("hidden_line");
var activeTabId;
if (activeTab) activeTabId = activeTab.id;
if (activeTabId == tabId)
{
var devider = document.getElementById("tabsDevider");
devider.style.display = "";
unselectAll(tabId);
var tab = document.getElementById(tabId);
tab.active = false;
activeTab = null;
collapseTab = tab;
toolbar.setTab(null);
showTab();
}
else
{
if (activeTab) toggleTab(tabId, true)
else toggleTab(tabId, atm)
if (hl) hl.style.display = "none";
}
tab_hdr = document.getElementById('tab_headers');
if (!tab_hdr) return;
for (var i = 0; i < tabIDs.length; i++)
{
var tabHeader;
TDs = tab_hdr.getElementsByTagName("TD");
for (var j = 0; j < TDs.length; j++)
if (TDs[j].getAttribute("tabHeaderOf") == tabIDs[i])
{
tabHeader = TDs[j];
break;
}
if (!tabHeader) continue;
var tab = document.getElementById(tabIDs[i]);
if (!tab) continue;
tabHeader.setAttribute("background", "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif")
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) continue;
images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif";
}
}
</script>
END;
?>
\ No newline at end of file
Property changes on: trunk/kernel/admin/include/toolbar/catselect.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Index: trunk/admin/cat_select.php
===================================================================
--- trunk/admin/cat_select.php (revision 100)
+++ trunk/admin/cat_select.php (revision 101)
@@ -1,385 +1,387 @@
<?php
##############################################################
##In-portal ##
##############################################################
## In-portal ##
## Intechnic Corporation ##
## All Rights Reserved, 1998-2002 ##
## ##
## No portion of this code may be copied, reproduced or ##
## otherwise redistributed without proper written ##
## consent of Intechnic Corporation. Violation will ##
## result in revocation of the license and support ##
## privileges along maximum prosecution allowed by law. ##
##############################################################
$b_header_addon = "<DIV style='position:relative; z-Index: 1; background-color: #ffffff; padding-top:1px;'><div style='z-Index:1; position:relative'>";
$pathtoroot="";
if(!strlen($pathtoroot))
{
$path=dirname(realpath($_SERVER['SCRIPT_FILENAME']));
if(strlen($path))
{
/* determine the OS type for path parsing */
$pos = strpos($path,":");
if ($pos === false)
{
$gOS_TYPE="unix";
$pathchar = "/";
}
else
{
$gOS_TYPE="win";
$pathchar="\\";
}
$p = $path.$pathchar;
/*Start looking for the root flag file */
while(!strlen($pathtoroot) && strlen($p))
{
$sub = substr($p,strlen($pathchar)*-1);
if($sub==$pathchar)
{
$filename = $p."root.flg";
}
else
$filename = $p.$pathchar."root.flg";
if(file_exists($filename))
{
$pathtoroot = $p;
}
else
{
$parent = realpath($p.$pathchar."..".$pathchar);
if($parent!=$p)
{
$p = $parent;
}
else
$p = "";
}
}
if(!strlen($pathtoroot))
$pathtoroot = ".".$pathchar;
}
else
{
$pathtoroot = ".".$pathchar;
}
}
$sub = substr($pathtoroot,strlen($pathchar)*-1);
if($sub!=$pathchar)
{
$pathtoroot = $pathtoroot.$pathchar;
}
require_once($pathtoroot."kernel/startup.php");
$rootURL="http://".ThisDomain().$objConfig->Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$cssURL = $adminURL."/include";
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$destform = $_GET["destform"];
$destfield = $_GET["destfield"];
RegisterEnv("destform",$destform);
RegisterEnv("destfield",$destfield);
RegisterEnv("source",$_GET["source"]);
$envar = "env=" . BuildEnv();
$m_var_list_update["cat"] = 0;
-$homeURL = $_SERVER["PHP_SELF"]."?".$envar;
+//$homeURL = $_SERVER["PHP_SELF"]."?".$envar;
+$homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');";
+
if((int)$_GLOBALS["debuglevel"])
echo $homeURL."<br>\n";
unset($m_var_list_update["cat"]);
if($objCatList->CurrentCategoryID()>0)
{
$c = $objCatList->CurrentCat();
$upURL = $c->Admin_Parent_Link();
}
else
$upURL = $_SERVER["PHP_SELF"]."?".$envar;
//admin only util
$pathtolocal = $pathtoroot."kernel/";
require_once ($pathtoroot.$admin."/include/elements.php");
//require_once ($pathtoroot."kernel/admin/include/navmenu.php");
require_once ($pathtolocal."admin/include/navmenu.php");
require_once($pathtoroot.$admin."/browse/toolbar.php");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/include/parser.php";
if(file_exists($path))
{
//echo "<!-- $path -->";
@include_once($path);
}
}
//Set Section
$section = 'in-portal:catselect';
//Set Environment Variable
//echo $objCatList->ItemsOnClipboard()." Categories on the clipboard<br>\n";
//echo $objTopicList->ItemsOnClipboard()." Topics on the clipboard<br>\n";
//echo $objLinkList->ItemsOnClipboard()." Links on the clipboard<br>\n";
//echo $objArticleList->ItemsOnClipboard()." Articles on the clipboard<br>\n";
$SearchType = $objSession->GetVariable("SearchType");
if(!strlen($SearchType))
$SearchType = "Categories";
$SearchLabel = "la_SearchLabel";
/* page header */
print <<<END
<html>
<head>
<title>In-portal</title>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<meta http-equiv="Pragma" content="no-cache">
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
print <<<END
<script src="$browseURL/toolbar.js"></script>
<script src="$browseURL/checkboxes_new.js"></script>
<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
<script language="JavaScript1.2">
var enableContextMenus= true;
var doubleClickAction = 'select';
function toggleTabB(tabId, atm)
{
var hl = document.getElementById("hidden_line");
var activeTabId;
if (activeTab) activeTabId = activeTab.id;
if (activeTabId == tabId)
{
var devider = document.getElementById("tabsDevider");
devider.style.display = "";
unselectAll(tabId);
var tab = document.getElementById(tabId);
tab.active = false;
activeTab = null;
collapseTab = tab;
toolbar.setTab(null);
showTab();
}
else
{
if (activeTab) toggleTab(tabId, true)
else toggleTab(tabId, atm)
if (hl) hl.style.display = "none";
}
tab_hdr = document.getElementById('tab_headers');
if (!tab_hdr) return;
for (var i = 0; i < tabIDs.length; i++)
{
var tabHeader;
TDs = tab_hdr.getElementsByTagName("TD");
for (var j = 0; j < TDs.length; j++)
if (TDs[j].getAttribute("tabHeaderOf") == tabIDs[i])
{
tabHeader = TDs[j];
break;
}
if (!tabHeader) continue;
var tab = document.getElementById(tabIDs[i]);
if (!tab) continue;
if (TDs[j].getAttribute("tabHeaderOf") == tabId) {
cell = document.getElementById('l_' + tabId);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active_l" : "tab_inactive_l") + ".gif"
cell = document.getElementById('m_' + tabId);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif"
cell = document.getElementById('m1_' + tabId);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif"
cell = document.getElementById('r_' + tabId);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active_r" : "tab_inactive_r") + ".gif"
}
else {
cell = document.getElementById('l_' + tabIDs[i]);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active_l" : "tab_inactive_l") + ".gif"
cell = document.getElementById('m_' + tabIDs[i]);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif"
cell = document.getElementById('m1_' + tabIDs[i]);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif"
cell = document.getElementById('r_' + tabIDs[i]);
cell.background = "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active_r" : "tab_inactive_r") + ".gif"
}
// tabHeader.setAttribute("background", "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif")
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) continue;
images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif";
}
}
function toggleCategoriesB(tabHeader, instant)
{
var categories = document.getElementById('categories');
if (!categories) return;
toggleCategories(instant);
document.all.l_cat.background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active_l" : "tab_inactive_l") + ".gif"
document.all.m_cat.background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif"
document.all.m1_cat.background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif"
document.all.r_cat.background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active_r" : "tab_inactive_r") + ".gif"
//tabHeader.setAttribute("background", '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif")
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) return;
images[0].src = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "divider_up" : "divider_dn") + ".gif";
}
</script>
<link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css">
<link rel="stylesheet" type="text/css" href="$cssURL/style.css">
<link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css">
END;
int_SectionHeader();
?>
</div>
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<div name="toolBar" id="mainToolBar">
<tb:button action="select" alt="<?php echo admin_language("la_ToolTip_Select"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="stop" alt="<?php echo admin_language("la_ToolTip_Cancel"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="upcat" alt="<?php echo admin_language("la_ToolTip_Up"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="homecat" alt="<?php echo admin_language("la_ToolTip_Home"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:separator ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="view" alt="<?php echo admin_language("la_ToolTip_View"); ?>" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
</div>
</td>
</tr>
</tbody>
</table>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#e0e0da" border="0" class="tableborder_full_a">
<tbody>
<tr>
<td><img height="15" src="<?php echo $imagesURL; ?>/arrow.gif" width="15" align="middle" border="0">
<span class="navbar"><?php print m_navbar(1); ?></span>
</td>
<td align="right">
<FORM METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" NAME="admin_search" ID="admin_search"><INPUT ID="SearchScope" NAME="SearchScope" type="hidden" VALUE="<?php echo $objSession->GetVariable("SearchScope"); ?>"><INPUT ID="SearchType" NAME="SearchType" TYPE="hidden" VALUE="<?php echo $objSession->GetVariable("SearchType"); ?>"><INPUT ID="NewSearch" NAME="NewSearch" TYPE="hidden" VALUE="0"><INPUT TYPE="HIDDEN" NAME="Action" value="m_Exec_Search">
<table cellspacing="0" cellpadding="0"><tr>
<td><?php echo admin_language($SearchLabel); ?> </td>
<td><input ID="SearchWord" type="text" name="SearchWord" size="10" style="border-width: 1; border-style: solid; border-color: #999999"></td>
<td><img action="search_b" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="<?php echo $imagesURL."/toolbar/";?>/arrow16.gif" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search.gif'" style="cursor:hand" width="22" width="22"><img action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" src="<?php echo $imagesURL."/toolbar/";?>/arrow16.gif" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/arrow16_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/arrow16.gif'" style="cursor:hand">
<img action="search_c" src="<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset.gif" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="absMiddle" onclick="this.action = this.getAttribute('action'); actionHandler(this);" onmouseover="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset_f2.gif'" onmouseout="this.src='<?php echo $imagesURL."/toolbar/";?>/icon16_search_reset.gif'" style="cursor:hand" width="22" width="22">
</td>
</tr></table>
</FORM>
<!--tb:button action="search_b" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>">
<tb:button action="search_a" alt="<?php echo admin_language("la_ToolTip_Search"); ?>" align="right" ImagePath="<?php echo $imagesURL."/toolbar/";?>"-->
</td>
</tr>
</tbody>
</table>
<br>
<!-- CATEGORY DIVIDER -->
<?php
$OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE);
$objCatList->Clear();
if($SearchType=="categories" || $SearchType="all")
{
$list = $objSession->GetVariable("SearchWord");
$SearchQuery = $objCatList->AdminSearchWhereClause($list);
if(strlen($SearchQuery))
{
$SearchQuery = " (".$SearchQuery.") ";
if(strlen($CatScopeClause))
$SearchQuery .= " AND ".$CatScopeClause;
$objCatList->LoadCategories($SearchQuery.$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
?>
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="138" height="20" nowrap="nowrap"
class="active_tab" onclick="toggleCategoriesB(this)" style="" id="cats_tab">
<table cellspacing="0" cellpadding="0" width="100%"><tr>
<td id="l_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_l.gif"><img height="20" src="<?php echo $imagesURL; ?>/itemtabs/divider_up.gif" width="20" border="0" align="absmiddle"></td>
<td id="m_cat" nowrap background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif">
<?php echo admin_language("la_ItemTab_Categories"); ?>: </td>
<td id="m1_cat" align="right" valign="top" background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif"><span class="cats_stats">(<?php echo $objCatList->QueryItemCount; ?>)</span> </td>
<td id="r_cat" width="21" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_r.gif"> </td>
</tr></table>
</td>
<td> </td>
</tr>
</tbody>
</table>
<div class="divider" style="" id="categoriesDevider"><img width=1 height=1 src="images/spacer.gif"></div>
</DIV>
<DIV style="background-color: #ffffff; position: relative; padding-top: 1px; top: -1px; z-Index:0" id="firstContainer">
<DIV style="background-color: #ffffff; position: relative; padding-top: 1px; top: -1px; z-Index: 2" id="secondContainer">
<!-- CATEGORY OUTPUT START -->
<div id="categories" tabtitle="Categories">
<form id="categories_form" name="categories_form" action="" method="post">
<input type="hidden" name="Action">
<?php print adListSubCats($objCatList->CurrentCategoryID(),"cat_select_element.tpl"); ?>
</form>
</div>
<BR>
<!-- CATEGORY OUTPUT END -->
</DIV>
<form method="post" action="cat_select.php?env=<?php echo BuildEnv(); ?>" name="viewmenu">
<input type="hidden" name="fieldname" value="">
<input type="hidden" name="varvalue" value="">
<input type="hidden" name="varvalue2" value="">
<input type="hidden" name="Action" value="">
</form>
</DIV>
<!-- END CODE-->
<script language="JavaScript">
<?php
//if($_GET["Selector"]=="radio")
echo " var single_select = true;";
?>
InitPage();
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/cat_select.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1
\ No newline at end of property
+1.2
\ No newline at end of property
Event Timeline
Log In to Comment