Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 1, 11:50 PM

in-portal

Index: trunk/kernel/admin/include/toolbar/browse.php
===================================================================
--- trunk/kernel/admin/include/toolbar/browse.php (revision 250)
+++ trunk/kernel/admin/include/toolbar/browse.php (revision 251)
@@ -1,778 +1,777 @@
<?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( isset($_GET['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="";
$Cat_Paste = "false";
if($objCatList->ItemsOnClipboard()>0)
$Cat_Paste = "true";
$CurrentCat = $objCatList->CurrentCategoryID();
if($CurrentCat>0)
{
$c = $objCatList->GetItem($CurrentCat);
$CurrentRes = (int)$c->Get("ResourceId");
}
else
$CurrentRes =0;
$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");
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";
var Categories_Paste = $Cat_Paste;
var CurrentCat = $CurrentCat;
var CurrentRes = $CurrentRes;
PasteButton = PasteButton || Categories_Paste;
//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";
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('new_cat',"get_to_server('$adminURL/category/addcategory.php',env+'&new=1');"); //new cat
AddButtonAction('editcat',"edit_current(); "); //edit current
AddButtonAction('edit',"check_submit('','edit');"); //edit
AddButtonAction('delete',"check_submit('$admin/browse','delete');"); //delete
AddButtonAction('approve',"check_submit('$admin/browse','approve');"); //approve
AddButtonAction('decline',"check_submit('$admin/browse','decline');"); //decline
AddButtonAction('cut',"check_submit('$admin/browse','cut');"); //cut
AddButtonAction('copy',"check_submit('$admin/browse','copy');"); //copy
AddButtonAction('paste',"get_to_server('$adminURL/browse.php',env+'&Action=m_paste');"); //paste
AddButtonAction('move_up',"check_submit('$admin/browse','move_up');"); //up
AddButtonAction('move_down',"check_submit('$admin/browse','move_down');"); //down
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 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;
window.location.href=path;
return true;
}
function check_submit(page,actionValue)
{
if (actionValue.match(/delete$/)) {
if (!theMainScript.Confirm(lang_DeleteConfirm)) return;
}
var formname = '';
var action_prefix ='';
if ((activeTab) && (!isAnyChecked('categories')))
{
form_name = activeTab.id;
action_prefix = activeTab.getAttribute("ActionPrefix");
if(page.length==0)
page = activeTab.getAttribute("EditURL");
}
else
{
form_name = 'categories';
action_prefix = 'm_cat_';
if(page.length==0)
page="$admin" + '/category/addcategory';
}
var f = document.getElementsByName(form_name+'_form')[0];
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 edit_current()
{
if(CurrentCat==0)
{
get_to_server('$adminURL/category/addcategory_permissions.php',env+'&item=0');
}
else
get_to_server('$adminURL/category/addcategory.php',env+'&item=$CurrentRes');
}
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:selectAllC('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:selectAllC('"+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:selectAllC('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
} // && Select
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, instant)
{
var categories = document.getElementById('categories');
if (!categories) return;
toggleCategories(instant);
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 toggleCategoriesB(tabHeader, instant)
{
var categories = document.getElementById('categories');
if (!categories) return;
toggleCategories(instant);
document.getElementById('l_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active_l" : "tab_inactive_l") + ".gif"
document.getElementById('m_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif"
document.getElementById('m1_cat').background = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "tab_active" : "tab_inactive") + ".gif"
document.getElementById('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";
}
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";
}
}
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;
// process all module tabs
var active_str = '';
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;
active_str = (tab.active) ? "tab_active" : "tab_inactive";
if (TDs[j].getAttribute("tabHeaderOf") == tabId) {
// module tab is selected
SetBackground('l_' + tabId, "$imagesURL/itemtabs/" + active_str + "_l.gif");
SetBackground('m_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('m1_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('r_' + tabId, "$imagesURL/itemtabs/" + active_str + "_r.gif");
}
else
{
// module tab is not selected
SetBackground('l_' +tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_l.gif");
SetBackground('m_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('m1_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
SetBackground('r_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_r.gif");
}
var images = tabHeader.getElementsByTagName("IMG");
if (images.length < 1) continue;
images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif";
}
}
-
+
function SetBackground(element_id, img_url)
{
// set background image of element specified by id
var el = document.getElementById(element_id);
el.style.backgroundImage = 'url('+img_url+')';
}
-
</script>
END;
?>
Property changes on: trunk/kernel/admin/include/toolbar/browse.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.2
\ No newline at end of property
+1.3
\ No newline at end of property
Index: trunk/admin/relation_select.php
===================================================================
--- trunk/admin/relation_select.php (revision 250)
+++ trunk/admin/relation_select.php (revision 251)
@@ -1,402 +1,401 @@
<?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_topmargin = "0";
$hideSelectAll = true;
$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;
}
//echo $pathtoroot;
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;
$imagesURL = $adminURL."/images";
$browseURL = $adminURL."/browse";
$cssURL = $adminURL."/include";
$m_var_list_update["cat"] = 0;
$homeURL = $_SERVER["PHP_SELF"]."?env=".BuildEnv();
unset($m_var_list_update["cat"]);
$envar = "env=" . BuildEnv();
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:editcategory_relationselect';
$Selector = GetVar('Selector');
if(!$Selector) $Selector = 'checkbox';
//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">
<script language="JavaScript">
imagesPath='$imagesURL'+'/';
</script>
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
load_module_styles();
print <<<END
- <script src="$browseURL/toolbar.js"></script>
- <script src="$browseURL/checkboxes_new.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"
- }
-
+<script src="$browseURL/toolbar.js"></script>
+<script src="$browseURL/checkboxes_new.js"></script>
+<script language="JavaScript1.2">
+ var enableContextMenus= true;
+ var doubleClickAction = 'select';
+
+ function toggleTabB(tabId, atm)
+ {
+ var hl = document.getElementById("hidden_line");
+ var activeTabId;
-// tabHeader.setAttribute("background", "$imagesURL/itemtabs/" + ((tab.active) ? "tab_active" : "tab_inactive") + ".gif")
+ 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;
+
+ // process all module tabs
+ var active_str = '';
+ 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;
+ active_str = (tab.active) ? "tab_active" : "tab_inactive";
+
+ if (TDs[j].getAttribute("tabHeaderOf") == tabId) {
+ // module tab is selected
+ SetBackground('l_' + tabId, "$imagesURL/itemtabs/" + active_str + "_l.gif");
+ SetBackground('m_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('m1_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('r_' + tabId, "$imagesURL/itemtabs/" + active_str + "_r.gif");
+ }
+ else
+ {
+ // module tab is not selected
+ SetBackground('l_' +tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_l.gif");
+ SetBackground('m_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('m1_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('r_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_r.gif");
+ }
- var images = tabHeader.getElementsByTagName("IMG");
- if (images.length < 1) continue;
+ var images = tabHeader.getElementsByTagName("IMG");
+ if (images.length < 1) continue;
- images[0].src = "$imagesURL/itemtabs/" + ((tab.active) ? "divider_up" : "divider_empty") + ".gif";
- }
-}
+ 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);
+ function toggleCategoriesB(tabHeader, instant)
+ {
+ var categories = document.getElementById('categories');
+ if (!categories) return;
+ toggleCategories(instant);
+
+ var active_str = '$imagesURL'+'/itemtabs/' + (categories.active ? 'tab_active' : 'tab_inactive');
+ SetBackground('l_cat', active_str + '_l.gif');
+ SetBackground('m_cat', active_str + '.gif');
+ SetBackground('m1_cat', active_str + '.gif');
+ SetBackground('r_cat', active_str + '_r.gif');
- 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>
- <script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script>
+ var images = tabHeader.getElementsByTagName("IMG");
+ if (images.length < 1) return;
+ images[0].src = '$imagesURL'+'/itemtabs/' + ((categories.active) ? "divider_up" : "divider_dn") + ".gif";
+ }
+</script>
+<script language="JavaScript1.2" src="$browseURL/fw_menu.js"></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_Stop"); ?>" 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">
<input type="hidden" name="Selector" value="<?php echo $Selector; ?>">
<table cellspacing="0" cellpadding="0"><tr>
<td><?php echo admin_language($SearchLabel); ?>&nbsp;</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">&nbsp;
</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
$objCatList->Clear();
$OrderBy = $objCatList->QueryOrderByClause(TRUE,TRUE,TRUE);
if($SearchType=="categories" || $SearchType="all")
{
$list = $objSession->GetVariable("SearchWord");
$SearchQuery = $objCatList->AdminSearchWhereClause($list);
if(strlen($SearchQuery))
{
$SearchQuery = " (".$SearchQuery.") ";
$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>&nbsp;</td>
- <td id="r_cat" width="21" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_r.gif">&nbsp;&nbsp;&nbsp;</td>
- </tr></table>
- </td>
- <td>&nbsp;</td>
- </tr>
- </tbody>
+ <tbody>
+ <tr>
+ <td width="138" height="20" nowrap="nowrap" class="active_tab" onclick="toggleCategoriesB(this)" id="cats_tab">
+ <table cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tr>
+ <td id="l_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_l.gif" class="left_tab">
+ <img src="<?php echo $imagesURL; ?>/itemtabs/divider_up.gif" width="20" height="20" border="0" align="absmiddle">
+ </td>
+ <td id="m_cat" nowrap background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif" class="tab_class">
+ <?php echo admin_language("la_ItemTab_Categories"); ?>:&nbsp;
+ </td>
+ <td id="m1_cat" align="right" valign="top" background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif" class="tab_class">
+ <span class="cats_stats">(<?php echo $objCatList->QueryItemCount; ?>)</span>&nbsp;
+ </td>
+ <td id="r_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_r.gif" class="right_tab">
+ <img src="<?php echo $imagesURL; ?>/spacer.gif" width="21" height="20">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;</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>
<!-- CATEGORY OUTPUT END -->
<br>
<?php
print $ItemTabs->TabRow();
?>
<div class="divider" id="tabsDevider"><img width=1 height=1 src="images/spacer.gif"></div>
</DIV>
<?php
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/relation_select.php";
if(file_exists($path))
{
echo "\n<!-- $path -->\n";
include_once($path);
}
}
?>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" 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( GetVar('Selector') == 'radio' )
echo " var single_select = true;";
?>
InitPage();
//toggleTabB(start_tab, true);
</script>
<?php int_footer(); ?>
Property changes on: trunk/admin/relation_select.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/include/tabs.js
===================================================================
--- trunk/admin/include/tabs.js (revision 250)
+++ trunk/admin/include/tabs.js (revision 251)
@@ -1,267 +1,274 @@
//parses input tags looking for validation attributes
function DataIsValid(f)
{
var ValType = '';
var span_id = '';
var form_result = true;
var field_result = true;
var j = 0;
for (var i = 0; i < f.elements.length; i++)
{
ValType = '';
Field = f.elements[i];
ValType = Field.getAttribute('ValidationType');
if(ValType)
{
ValType = TransformValidationType(ValType); // for capability with old forms
span_id = 'prompt_' + Field.name;
span = document.getElementById(span_id);
if(span)
{
field_result = true;
ValType = ValType.split(',');
j = 0;
while(j < ValType.length)
{
//alert('Validating ['+Field.name+'] as ['+ValType[j]+']');
if(ValType[j] == 'password')
{
var repasswd = document.getElementById(Field.name + '_verify');
if(repasswd)
{
field_result &= ValidateField(Field.value, ValType[j], repasswd.value);
document.getElementById('prompt_' + Field.name + '_verify').className = field_result ? 'text' : 'validation_error';
}
}
else
field_result &= ValidateField(Field.value, ValType[j]);
j++;
}
span.className = field_result ? 'text' : 'validation_error';
form_result &= field_result;
}
}
}
return form_result;
}
function TransformValidationType(OldType)
{
// replace old validation types with new
// on the fly in case if we have some forms
// that still use old validation types
var NewType = '';
switch(OldType)
{
case 'optional_date':
NewType = 'date';
break;
default:
NewType = OldType;
break;
}
return NewType;
}
function ValidateField(FieldValue, ValidateAs, RePasswdValue)
{
// validate FieldValue based on ValidateAs rule specified;
// in case if password field compare it with RePasswdValue
var result = true;
switch(ValidateAs)
{
case 'exists': // field is required
if(FieldValue.length == 0) result = false;
break;
case 'integer': // field must be integer number
result = ValidateNumber(FieldValue, ValidateAs);
break;
case 'password': // validate as password field
result = (FieldValue == RePasswdValue) || (FieldValue.length == 0);
break;
case 'date': // text must be a formatted date
result = ValidDate(FieldValue);
break;
case 'time': // text must be a formatted time
result = ValidTime(FieldValue);
break;
}
return result;
}
function MarkAsRequired(f)
{
var ValType = '';
var span_id = '';
var result = true;
for (var i = 0; i < f.elements.length; i++)
{
ValType = '';
Field = f.elements[i];
ValType = Field.getAttribute('ValidationType');
if(ValType)
{
ValType = ValType.split(',');
if( InArray(ValType,'exists') !== false )
{
span_id = 'prompt_' + Field.name;
span = document.getElementById(span_id);
span.innerHTML = span.innerHTML + '<span class="error">*</span>';
}
}
}
}
function InArray(aArray, aValue)
{
// checks if element in array
var k = 0;
while(k < aArray.length)
{
if(aArray[k] == aValue) return k;
k++;
}
return false;
}
//Used to submit the form when a tab is clicked on
function edit_submit(formname, status_field, targetURL, save_value, env_str, new_target)
{
var full_env = env;
if( HasParam(env_str) ) full_env += env_str;
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
f = document.getElementById(formname);
if(f)
{
var valid = false;
if(save_value != 2 && save_value !=-1)
{
valid = DataIsValid(f);
}
else
{
var a = f.Action;
if(a)
{
a.value='';
}
}
if(valid || save_value==2 || save_value==-1)
{
f.action = rootURL + targetURL + '?' + full_env;
if(status_field.length>0)
{
f.elements[status_field].value = save_value; //0= stay in temp, 1=save to perm, 2 = purge no save
}
if(new_target != null && typeof(new_target) != 'undefined') f.target = new_target;
f.submit();
}
else
if(!valid)
alert(ErrorMsg);
}
else
alert('Form '+formname+' was not found.');
}
//Used when the save or cancel buttin is hit
function do_edit_save(formname, status_field, targetURL, save_value, env_str)
{
var full_env = env;
if( HasParam(env_str) ) full_env += env_str;
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
f = document.getElementById(formname);
if(f)
{
f.action = rootURL + targetURL + '?' + full_env;
//alert(f.action);
if(status_field.length>0)
{
f.elements[status_field].value = save_value; //0= stay in temp, 1=save to perm, 2 = purge no save
}
f.submit();
}
else
alert('Form '+formname+' was not found.');
}
function jump_to_url(targetURL, env_str)
{
var full_env = env;
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)
{
// by Alex, submits form.
var full_env = env;
if( HasParam(env_str) ) full_env += env_str;
if(full_env.substr(0,3)!="env")
full_env = 'env='+full_env;
f = document.getElementById(formname);
if(f)
{
var valid = false;
if(save_value != 2 && save_value !=-1)
{
valid = DataIsValid(f);
}
else
{
var a = f.Action;
if(a)
{
a.value='';
}
}
if(valid || save_value==2 || save_value==-1)
{
f.action = rootURL + targetURL + '?' + full_env;
if(status_field.length>0)
{
f.elements[status_field].value = save_value; //0= stay in temp, 1=save to perm, 2 = purge no save
}
f.submit();
}
else
if(!valid)
alert(ErrorMsg);
}
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;
+}
+
+function SetBackground(element_id, img_url)
+{
+ // set background image of element specified by id
+ var el = document.getElementById(element_id);
+ el.style.backgroundImage = 'url('+img_url+')';
}
\ No newline at end of file
Property changes on: trunk/admin/include/tabs.js
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.4
\ No newline at end of property
+1.5
\ No newline at end of property
Index: trunk/admin/cat_select.php
===================================================================
--- trunk/admin/cat_select.php (revision 250)
+++ trunk/admin/cat_select.php (revision 251)
@@ -1,387 +1,386 @@
<?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 = "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);
+<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';
- 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>
+ 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;
+
+ // process all module tabs
+ var active_str = '';
+ 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;
+ active_str = (tab.active) ? "tab_active" : "tab_inactive";
+
+ if (TDs[j].getAttribute("tabHeaderOf") == tabId) {
+ // module tab is selected
+ SetBackground('l_' + tabId, "$imagesURL/itemtabs/" + active_str + "_l.gif");
+ SetBackground('m_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('m1_' + tabId, "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('r_' + tabId, "$imagesURL/itemtabs/" + active_str + "_r.gif");
+ }
+ else
+ {
+ // module tab is not selected
+ SetBackground('l_' +tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_l.gif");
+ SetBackground('m_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('m1_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + ".gif");
+ SetBackground('r_' + tabIDs[i], "$imagesURL/itemtabs/" + active_str + "_r.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);
+
+ var active_str = '$imagesURL'+'/itemtabs/' + (categories.active ? 'tab_active' : 'tab_inactive');
+ SetBackground('l_cat', active_str + '_l.gif');
+ SetBackground('m_cat', active_str + '.gif');
+ SetBackground('m1_cat', active_str + '.gif');
+ SetBackground('r_cat', active_str + '_r.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); ?>&nbsp;</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">&nbsp;
</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>&nbsp;</td>
- <td id="r_cat" width="21" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_r.gif">&nbsp;&nbsp;&nbsp;</td>
- </tr></table>
- </td>
- <td>&nbsp;</td>
- </tr>
- </tbody>
+ <tbody>
+ <tr>
+ <td width="138" height="20" nowrap="nowrap" class="active_tab" onclick="toggleCategoriesB(this)" id="cats_tab">
+ <table cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tr>
+ <td id="l_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_l.gif" class="left_tab">
+ <img src="<?php echo $imagesURL; ?>/itemtabs/divider_up.gif" width="20" height="20" border="0" align="absmiddle">
+ </td>
+ <td id="m_cat" nowrap background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif" class="tab_class">
+ <?php echo admin_language("la_ItemTab_Categories"); ?>:&nbsp;
+ </td>
+ <td id="m1_cat" align="right" valign="top" background="<?php echo $imagesURL; ?>/itemtabs/tab_active.gif" class="tab_class">
+ <span class="cats_stats">(<?php echo $objCatList->QueryItemCount; ?>)</span>&nbsp;
+ </td>
+ <td id="r_cat" background="<?php echo $imagesURL; ?>/itemtabs/tab_active_r.gif" class="right_tab">
+ <img src="<?php echo $imagesURL; ?>/spacer.gif" width="21" height="20">
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;</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.2
\ No newline at end of property
+1.3
\ No newline at end of property

Event Timeline