Init();
$application->ProcessRequest();
if($application->GetVar('Action') == 'm_paste') define('REDIRECT_REQUIRED',1); // this script can issue redirect header
//KERNEL4 END
define('REQUIRE_LAYER_HEADER', 1);
$b_topmargin = "0";
//$b_header_addon = "
![](images/logo_bg.gif)
![](images/spacer.gif)
";
require_once FULL_PATH.'/kernel/startup.php';
require_login();
$indexURL = $rootURL."index.php";
$homeURL = "javascript:AdminCatNav('".$_SERVER["PHP_SELF"]."?env=".BuildEnv()."');";
$m_var_list_update["cat"] = 0;
unset($m_var_list_update["cat"]);
$envar = "env=" . BuildEnv();
if($objCatList->CurrentCategoryID()>0)
{
$c = $objCatList->CurrentCat();
$upURL = "javascript:AdminCatNav('".$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 "";
@include_once($path);
}
}
$application->InitParser();
$cat_templates = $objModules->ExecuteFunction('GetModuleInfo', 'catalog_template');
foreach ($cat_templates as $a_mod => $a_template) {
if (!$a_template) continue;
$a_var = $a_mod.'_TAB_HTML';
$$a_var = $application->ParseBlock(Array('name'=>$a_template), 0, true);
}
//$application->SetVar('t', 'in-commerce/products/products_catalog');
if( !defined('IS_INSTALL') ) define('IS_INSTALL', 0);
if( !IS_INSTALL ) require_login();
//Set Section
$section = 'in-portal:browse';
//Set Environment Variable
//echo $objCatList->ItemsOnClipboard()." Categories on the clipboard
\n";
//echo $objTopicList->ItemsOnClipboard()." Topics on the clipboard
\n";
//echo $objLinkList->ItemsOnClipboard()." Links on the clipboard
\n";
//echo $objArticleList->ItemsOnClipboard()." Articles on the clipboard
\n";
// save last category visited
$objSession->SetVariable('prev_category', $objSession->GetVariable('last_category') );
$objSession->SetVariable('last_category', $objCatList->CurrentCategoryID() );
/* // for testing
$last_cat = $objSession->GetVariable('last_category');
$prev_cat = $objSession->GetVariable('prev_category');
echo "Last CAT: [$last_cat]
";
echo "Prev CAT: [$prev_cat]
";
*/
$SearchType = $objSession->GetVariable("SearchType");
if(!strlen($SearchType))
$SearchType = "all";
$SearchLabel = "la_SearchLabel";
if( GetVar('SearchWord') !== false ) $objSession->SetVariable('admin_seach_words', GetVar('SearchWord') );
$SearchWord = $objSession->GetVariable('admin_seach_words');
// where should all edit popups submit changes
$objSession->SetVariable("ReturnScript", basename($_SERVER['PHP_SELF']) );
$charset = GetRegionalOption('Charset');
$m_tag_processor =& $application->recallObject('m_TagProcessor');
$base_href = $m_tag_processor->Base_Ref();
/* page header */
print <<
In-portal
$base_href
END;
require_once($pathtoroot.$admin."/include/mainscript.php");
print <<
if (window.opener != null) {
theMainScript.CloseAndRefreshParent();
}
END;
print <<
END;
load_module_styles();
if( !isset($list) ) $list = '';
if(($SearchType=="categories" || $SearchType="all") && strlen($list))
{
int_SectionHeader(NULL,NULL,NULL,admin_language("la_Title_SearchResults"));
}
else
int_SectionHeader();
$filter = false; // always initialize variables before use
if($objSession->GetVariable("SearchWord") != '') {
$filter = true;
}
else {
$bit_combo = $objModules->ExecuteFunction('GetModuleInfo', 'all_bitmask');
$bit_combo = $objModules->MergeReturn($bit_combo);
foreach($bit_combo['VarName'] as $mod_name => $VarName)
{
//echo "VarName: [$VarName] = [".$objConfig->Get($VarName)."], ALL = [".$bit_combo['Bits'][$mod_name]."]
";
if( $objConfig->Get($VarName) )
if( $objConfig->Get($VarName) != $bit_combo['Bits'][$mod_name] )
{
$filter = true;
break;
}
}
}
?>
|
|
QueryOrderByClause(TRUE,TRUE,TRUE);
$objCatList->Clear();
$IsSearch = FALSE;
if($SearchType == 'categories' || $SearchType == 'all')
{
$list = $objSession->GetVariable("SearchWord");
$SearchQuery = $objCatList->AdminSearchWhereClause($list);
if(strlen($SearchQuery))
{
$SearchQuery = " (".$SearchQuery.") ";
if( strlen($CatScopeClause) ) {
$SearchQuery .= " AND ParentId = ".$objCatList->CurrentCategoryID();//" AND ".$CatScopeClause;
}
$objCatList->LoadCategories($SearchQuery.$CategoryFilter,$OrderBy);
$IsSearch = TRUE;
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter,$OrderBy);
}
else
$objCatList->LoadCategories("ParentId=".$objCatList->CurrentCategoryID()." ".$CategoryFilter, $OrderBy);
$TotalItemCount += $objCatList->QueryItemCount;
?>
GetAdminUserErrors();
if(count($e)>0)
{
echo "
";
for($ex = 0; $ex".prompt_language($e[$ex])." | ";
}
echo "
";
}
?>
|
:
|
(QueryItemCount; ?>)
|
|
|
|
TabRow();
if(count($ItemTabs->Tabs))
{
?>
ParseBlock(Array('name'=>'kernel_form_start'), 0, true);
$m = GetModuleArray("admin");
foreach($m as $key=>$value)
{
$path = $pathtoroot.$value."admin/browse.php";
if(file_exists($path))
{
//echo "\n\n";
include_once($path);
}
}
//echo $application->ParseBlock(Array('name'=>'kernel_form_end'), 0, true);
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin)) $admin = "admin";
?>
SetVariable("HasChanges", 0);
int_footer();
?>