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");
$m = GetModuleArray();
foreach($m as $key=>$value)
{
$path = $pathtoroot. $value."admin/include/parser.php";
if(file_exists($path))
{
include_once($path);
}
}
unset($objEditItems);
$objEditItems = new clsPhraseList();
$objEditItems->SourceTable = $objSession->GetEditTable("Language");
//Multiedit init
$en = (int)$_GET["en"];
$objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable);
$itemcount=$objEditItems->NumItems();
//$c = $objEditItems->GetItemByIndex($en);
$LangId = $objSession->GetVariable("Missing_LangId");
$c = $objLanguages->GetItem($LangId);
$name = $c->Get("PackName");
if($itemcount>1)
{
if ($en+1 == $itemcount)
$en_next = -1;
else
$en_next = $en+1;
if ($en == 0)
$en_prev = -1;
else
$en_prev = $en-1;
}
$action = "m_phrase_edit";
$envar = "env=" . BuildEnv() . "&en=$en";
$section = 'in-portal:missing_lang_labels';
//echo $envar."
\n";
$objListToolBar = new clsToolBar();
$objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","save_labels();","tool_select.gif");
$objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","window.close();",$imagesURL."/toolbar/tool_cancel.gif");
$objListToolBar->Set("section",$section);
$objListToolBar->Set("load_menu_func","");
$objListToolBar->Set("CheckClass","LangChecks");
//Display header
$sec = $objSections->GetSection($section);
if ( isset($en_prev) || isset($en_next) )
{
$objListToolBar->Add("divider");
if($en_prev>-1)
{
$MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');";
$MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');";
$onClick= $sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_prev";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_prev.gif");
}
else
{
$MouseOver="";
$MouseOut="";
$onClick="";
$link="#";
$objListToolBar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Theme"),"#","","","","tool_prev_f3.gif");
}
if($en_next>-1)
{
$MouseOver="swap('moveright','toolbar/tool_next_f2.gif');";
$MouseOut="swap('moveright', 'toolbar/tool_next.gif');";
$onClick=$sec->Get("onclick");
$var="?env=".BuildEnv()."&en=$en_next";
$link=$_SERVER["PHP_SELF"].$var;
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next.gif");
}
else
{
$objListToolBar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Theme"),$link,$MouseOver,$MouseOut,"","tool_next_f3.gif");
}
}
$CurrentLangId = $c->Get("LanguageId");
$title = prompt_language("la_Text_Configuration")." - '".$name."' ".prompt_language("la_Text_Pack")." - ".prompt_language("la_tab_MissingLabels");
int_header($objListToolBar,NULL, $title);
$ThemeId = $objSession->GetVariable("Missing_ThemeId");
$table = $objSession->GetSessionTable("_".$ThemeId."_labels");
$objPhrases = new clsPhraseList();
$objPhrases->SourceTable = $table;
$order = trim($objConfig->Get("Phrase_LV_Sortfield")." ".$objConfig->Get("Phrase_LV_Sortorder"));
$primary = $objLanguages->GetPrimary();
$ptable = GetTablePrefix()."Phrase";
$sql = "SELECT distinct(e.Phrase) as Phrase, ";
$sql .= "concat('') as Translation, ";
$sql .="p.Translation as PrimaryValue, e.PhraseId as PhraseId ";
$sql .= "FROM $table as e LEFT JOIN $ptable as p ON (e.Phrase=p.Phrase AND p.LanguageId=$primary) WHERE e.LanguageId=".$c->Get("LanguageId")." ";
if(strlen($where))
$sql .= "AND ".$where." ";
if(strlen($order))
$sql .= "ORDER BY ".$order." ";
if(isset($_GET["lpn"]))
$objSession->SetVariable("m_Page_Phrase",$_GET["lpn"]);
$sql .= GetLimitSQL($objSession->GetVariable("m_Page_Phrase"),$objConfig->Get("Perpage_Phrase"));
$objPhrases->Query_Item($sql);
$itemcount = TableCount($table, $where,0);
if($objSession->HasSystemPermission("DEBUG.LIST"))
echo htmlentities($sql,ENT_NOQUOTES)."
\n";
$objListView = new clsListView($objListToolBar, $objPhrases);
$objListView->IdField = "PhraseId";
$order = $objConfig->Get("Phrase_LV_Sortfield");
$objListView->ColumnHeaders->Add("Phrase",admin_language("la_prompt_Label"),1,0,$order,"width=\"30%\"","Phrase_LV_Sortfield","Phrase_LV_Sortorder","Phrase");
$objListView->ColumnHeaders->Add("Translation",admin_language("la_prompt_Value"),1,0,$order,"width=\"40%\"","Phrase_LV_Sortfield","Phrase_LV_Sortorder","Translation");
$objListView->ColumnHeaders->Add("PrimaryValue",admin_language("la_prompt_PrimaryValue"),1,0,$order,"width=\"30%\"","Phrase_LV_Sortfield","Phrase_LV_Sortorder","PrimaryValue");
$objListView->ColumnHeaders->SetSort($objConfig->Get("Phrase_LV_Sortfield"), $objConfig->Get("Phrase_LV_Sortorder"));
$objListView->PrintToolBar = FALSE;
$objListView->checkboxes = FALSE;
$objListView->CurrentPageVar = "m_Page_Phrase";
$objListView->PerPageVar = "Perpage_Phrase";
$objListView->PageURL = "javascript:setPage({TargetPage});";
$objListView->CheckboxName = "itemlist[]";
$objListView->SearchBar = FALSE;
$objListView->SearchAction="";
$objListView->TotalItemCount = $itemcount;
for($i=0;$iItems);$i++)
{
$objListView->RowIcons[] = $objPhrases->Items[$i]->AdminIcon();
}
?>