Get("Site_Path"); $admin = $objConfig->Get("AdminDirectory"); if(!strlen($admin)) $admin = "admin"; $localURL=$rootURL."kernel/"; $adminURL = $rootURL.$admin; $imagesURL = $adminURL."/images"; require_once ($pathtoroot.$admin."/include/elements.php"); require_once ($pathtoroot."kernel/admin/include/navmenu.php"); require_once($pathtoroot.$admin."/toolbar.php"); require_once($pathtoroot.$admin."/listview/listview.php"); if(count($_POST)>0 && !$_GET['PhraseId'] && $add_error == '') { echo ""; die(); } $section = "in-portal:phrase_editor"; $ids = GetVar('PhraseId'); if( strlen($ids) ) { // useless code: begin $ids = str_replace("[","",$ids); $ids = str_replace("]","",$ids); $ids = str_replace("\"","",$ids); $ids = str_replace("\\","",$ids); // useless code: end $PhraseIds = explode(",",$ids); } else { $LangId = $_GET["LanguageId"]; } $EditDirect = GetVar('direct'); if($EditDirect) { $NewLabel = GetVar('label'); if(!$LangId) { $LangId = $objSession->Get("Language"); } } unset($objEditItems); if ( isset($PhraseIds) && count($PhraseIds) > 1) { $print_list = true; } else { $ado = GetADODBConnection(); $sql = "SELECT PhraseId FROM ".$objSession->GetEditTable("Phrase"); if ( isset($LangId) && $LangId > 0 ) { $sql .= " WHERE LanguageId = $LangId"; } $rs = $ado->Execute($sql); if ( GetVar('en') === false ) { $selected_id = $PhraseIds[0]; } else { $selected_id = GetVar('PhraseId'); } $PhraseIdList = ''; while ($rs && !$rs->EOF) { $PhraseIdList .= $rs->fields['PhraseId'].","; $rs->MoveNext(); } $PhraseIdList = substr($PhraseIdList, 0, strlen($PhraseIdList)); $PhraseIdArr = explode(",", $PhraseIdList); $print_list = false; } $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","ThemeChecks"); $objListToolBar->Add("select", "la_ToolTip_Select","#","swap('select','toolbar/tool_select_f2.gif');", "swap('select', 'toolbar/tool_select.gif');", "LangSubmit();", "tool_select.gif"); $objListToolBar->Add("cancel", "la_ToolTip_Stop","#","swap('cancel','toolbar/tool_stop_f2.gif');", "swap('cancel', 'toolbar/tool_stop.gif');","window.close();","tool_stop.gif"); if (!$print_list) { $x = -1; foreach ($PhraseIdArr as $key => $value) { if ($value == $selected_id) { $x = $key; } } if ($x <= 0) { $en_next = $PhraseIdArr[$x+1]; $en_prev = false; } else if ($x >= count($PhraseIdArr) - 1) { $en_next = false; $en_prev = $PhraseIdArr[$x - 1]; } else { $en_next = $PhraseIdArr[$x+1]; $en_prev = $PhraseIdArr[$x-1]; } $url = "edit_label.php?$envar&en=0"; $form = "frmPhrase"; MultiEditButtons($objListToolBar,$en_next,$en_prev,$form,1,$url, "LangSubmitMove"); } $title = admin_language("la_Text_Editing")." ".admin_language("la_Text_Label"); int_header($objListToolBar,NULL,$title); ?>
" method=POST> SourceTable = $objSession->GetEditTable("Phrase"); $count_ids = 1; if ($print_list) { $count_ids = count($PhraseIds); $selected_id = $PhraseIds[0]; } else { foreach($PhraseIdArr as $key => $value) { if ($value == $selected_id) { $PhraseIds[0] = $value; } } } for($x = 0; $x < $count_ids; $x++) { $p = $objPhraseList->GetItem($PhraseIds[$x]); if( !isset($LangId) ) $LangId = $p->Get("LanguageId"); if(is_object($p) && isset($selected_id) ) { echo int_subsection_title_ret(admin_language("la_tab_General").": ".GetPrimaryTranslation($p->Get("Phrase"))); if($p->Get('PhraseId') > 0) { echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; } echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n"; unset($p); } } $PriTrans = isset($NewLabel) ? GetPrimaryTranslation($NewLabel) : ''; ?> > > >
".admin_language("la_prompt_PhraseId")."".$p->Get("PhraseId")."
".admin_language("la_prompt_Label")."Get("PhraseId")."]\" VALUE=\"".$p->Get("Phrase")."\">
".admin_language("la_prompt_Value")."Get("PhraseId")."]\" VALUE=\"".$p->Get("Translation")."\">
".admin_language("la_prompt_PhraseType")."\n"; echo " Get("PhraseId")."]\" VALUE=\"0\""; if($p->Get("PhraseType")==0) echo "CHECKED"; echo ">"; echo admin_language("la_Text_Front"); echo " Get("PhraseId")."]\" VALUE=\"1\""; if($p->Get("PhraseType")==1) echo "CHECKED"; echo ">"; echo admin_language("la_Text_Admin"); echo " Get("PhraseId")."]\" VALUE=\"2\""; if($p->Get("PhraseType")==2) echo "CHECKED"; echo ">"; echo admin_language("la_Text_Both"); echo "