0 && !$_GET['PhraseId'] && $add_error == '') { echo ""; $application =& kApplication::Instance(); $application->ApplicationDie(); } $section = "in-portal:phrase_editor"; $ids = GetVar('PhraseId'); if(strlen($ids)) { $ids = str_replace("[","",$ids); $ids = str_replace("]","",$ids); $ids = str_replace("\"","",$ids); $ids = str_replace("\\","",$ids); $PhraseIds = explode(",",$ids); $LangId = 0; } else { $LangId = GetVar('LanguageId'); $PhraseIds = Array(); } $EditDirect = (int)GetVar('direct'); if($EditDirect) { $NewLabel = GetVar('label'); if(!$LangId) { $LangId = $objSession->Get("Language"); } SetVar( 'name', Array($NewLabel) ); } else { $NewLabel = ''; } unset($objEditItems); if (count($PhraseIds) > 1) { $print_list = true; } else { $ado = &GetADODBConnection(); $table=$EditDirect?GetTablePrefix().'Phrase':$objSession->GetEditTable("Phrase"); $sql = "SELECT PhraseId FROM ".$table; if ($LangId) { $sql .= " WHERE LanguageId = $LangId"; } $rs = $ado->Execute($sql); $selected_id = !GetVar('en') ? $PhraseIds[0] : $_GET['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"); // substitute charset to match the ones from phrase: begin $tmp_id=GetVar('PhraseId'); if($tmp_id) { $tmp_id=explode(',',$tmp_id); $db=&GetADODBConnection(); $LangId=$db->GetOne('SELECT LanguageId FROM '.GetTablePrefix().'Phrase WHERE PhraseId='.$tmp_id[0]); $c = $objLanguages->GetItem($LangId); define('FORCE_CHARSET', $c->Get("Charset") ); } // substitute charset to match the ones from phrase: end int_header($objListToolBar,NULL,$title); ?>
" method=POST> SourceTable = $objSession->GetEditTable("Phrase"); } $count_ids = 1; if ($print_list) { $count_ids = count($PhraseIds); } 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]); //echo "
"; print_r($p); echo "
"; if(!$LangId) $LangId = $p->Get("LanguageId"); if(is_object($p) && ($selected_id != '' || $count_ids > 1)) { echo int_subsection_title_ret(admin_language("la_tab_General")." :: ".GetPrimaryTranslation($p->Get("Phrase"))); 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); } } ?> 0) { "::".$PriTrans = GetPrimaryTranslation($NewLabel); } else { $PriTrans = ''; } ?> > > >
".admin_language("la_prompt_PhraseId")."".$p->Get("PhraseId")."
".admin_language("la_prompt_Label")."Get("PhraseId")."]\" VALUE=\"".inp_htmlize($p->Get("Phrase"))."\">
".admin_language("la_prompt_Value")."Get("PhraseId")."]\" VALUE=\"".inp_htmlize($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 "
>