Get("Site_Path");
$admin = $objConfig->Get("AdminDirectory");
if(!strlen($admin))
$admin = "admin";
$localURL=$rootURL."kernel/";
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL."/images";
//$pathtolocal = $pathtoroot."in-news/";
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."/toolbar.php");
require_once($pathtoroot.$admin."/listview/listview.php");
$section = "in-portal:configure_lang";
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$envar = "env=".BuildEnv();
$formaction = $_SERVER["PHP_SELF"]."?".$envar;
$sec = $objSections->GetSection($section);
$objListToolBar = new clsToolBar();
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","LangChecks");
$objListToolBar->Set("CheckForm","languages");
$listImages = array();
//$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick
$objListToolBar->Add("new_lang", "la_ToolTip_New_LangPack",$adminURL."/config/addlang.php?$envar&new=1","swap('new_lang','toolbar/tool_new_language_f2.gif');",
"swap('new_lang', 'toolbar/tool_new_language.gif');","",$imagesURL."/toolbar/tool_new_language.gif");
$objListToolBar->Add("import_lang", "la_ToolTip_Import_LangPack",$adminURL."/config/importlang.php?$envar","swap('import_lang','toolbar/tool_import_language_f2.gif');",
"swap('import_lang', 'toolbar/tool_import_language.gif');","",$imagesURL."/toolbar/tool_import_language.gif");
$objListToolBar->Add("lang_edit","la_ToolTip_Edit","#", "if (LangChecks.itemChecked()) swap('lang_edit','toolbar/tool_edit_f2.gif');",
"if (LangChecks.itemChecked()) swap('lang_edit', 'toolbar/tool_edit.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('addlang', '');",
"tool_edit.gif",TRUE,TRUE);
$listImages[] = "LangChecks.addImage('lang_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); ";
$objListToolBar->Add("lang_del","la_ToolTip_Delete","#", "if (LangChecks.itemChecked()) swap('lang_del','toolbar/tool_delete_f2.gif');",
"if (LangChecks.itemChecked()) swap('lang_del', 'toolbar/tool_delete.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('config_lang', 'm_lang_delete');",
"tool_delete.gif",FALSE,TRUE);
$listImages[] = "LangChecks.addImage('lang_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); ";
$objListToolBar->Add("lang_export","la_ToolTip_Export","#", "if (LangChecks.itemChecked()) swap('lang_export','toolbar/tool_export_language_f2.gif');",
"if (LangChecks.itemChecked()) swap('lang_export', 'toolbar/tool_export_language.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('addlang_export', '');",
"tool_export_language.gif");
$listImages[] = "LangChecks.addImage('lang_export','$imagesURL/toolbar/tool_export_language.gif','$imagesURL/toolbar/tool_export_language_f3.gif',1); ";
$objListToolBar->AddToInitScript($listImages);
$objListToolBar->AddToInitScript("fwLoadMenus(); \n");
$objLang = new clsLanguageList();
$SearchWords = $objSession->GetVariable("LangSearchWord");
if(strlen($SearchWords))
{
$where = $objLang->AdminSearchWhereClause($SearchWords);
}
else
$where = "";
$order = trim($objConfig->Get("Lang_LV_Sortfield")." ".$objConfig->Get("Lang_LV_Sortorder"));
$sql = "SELECT l.*,ELT(l.Enabled+1,'".admin_language("la_Text_Disabled")."','".admin_language("la_Text_Enabled")."') as Status ";
$sql .= "FROM ".GetTablePrefix()."Language as l ";
if(strlen($where))
$sql .= "WHERE ".$where." ";
if(strlen($order))
$sql .= "ORDER BY ".$order;
$sql .= GetLimitSQL($objSession->GetVariable("Page_LV_Lang"),$objConfig->Get("Perpage_LV_Lang"));
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."
\n";
$objLanguages->Query_Item($sql);
$itemcount = TableCount(GetTablePrefix()."Language", $where,0);
$objListView = new clsListView($objListToolBar,$objLanguages);
$objListView->IdField = "LanguageId";
$order = $objConfig->Get("Lang_LV_Sortfield");
$objListView->ColumnHeaders->Add("PackName",admin_language("la_prompt_PackName"),1,0,$order,"width=\"30%\"","Lang_LV_Sortfield","Lang_LV_Sortorder","PackName");
$objListView->ColumnHeaders->Add("LocalName",admin_language("la_prompt_Name"),1,0,$order,"width=\"30%\"","Lang_LV_Sortfield","Lang_LV_Sortorder","LocalName");
$objListView->ColumnHeaders->Add("Status",admin_language("la_ColHeader_Status"),1,0,$order,"width=\"30%\"","Lang_LV_Sortfield","Lang_LV_Sortorder","Status");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Lang_LV_Sortfield"), $objConfig->Get("Lang_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = TRUE;
$objListView->CurrentPageVar = "Page_LV_Lang";
$objListView->PerPageVar = "Perpage_LV_lang";
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = TRUE;
$objListView->SearchKeywords = $SearchWords;
$objListView->SearchAction="m_lang_search";
$objListView->TotalItemCount = $itemcount;
for($i=0;$iItems);$i++)
{
$objListView->RowIcons[] = $objLanguages->Items[$i]->AdminIcon();
}
if ($_GET['action'] == "cancel") {
$ado = &GetADODBConnection();
$PhraseTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportPhrases";
$EventTable = "ses_".$objSession->GetSessionKey()."_".GetTablePrefix()."ImportEvents";
$ado->Execute("DROP TABLE IF EXISTS $PhraseTable");
$ado->Execute("DROP TABLE IF EXISTS $EventTable");
}
$objSession->SetVariable("HasChanges", 0);
$filter = false;
if ($SearchWords != '') {
$filter = true;
}
$objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField,"","",0);
$title = prompt_language("la_Text_Configuration")." - ".prompt_language("la_tab_Regional")." ".prompt_language("la_Text_Settings");
$h = "\n\n\n";
int_header($objListToolBar,NULL,$title, NULL, $h);
if ($filter) { ?>