Index: trunk/admin/include/elements.php =================================================================== --- trunk/admin/include/elements.php (revision 953) +++ trunk/admin/include/elements.php (revision 954) @@ -1,624 +1,625 @@ <?php ############################################################## ##In-portal :: Administration Interfaces :: Common Elements ## ############################################################## ## In-portal ## ## Intechnic Corporation ## ## All Rights Reserved, 1998-2002 ## ## ## ## No portion of this code may be copied, reproduced or ## ## otherwise redistributed without proper written ## ## consent of Intechnic Corporation. Violation will ## ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## if(!defined('IS_INSTALL'))define('IS_INSTALL',0); if(!IS_INSTALL) { if (!admin_login()) { if(!headers_sent()) { setcookie("sid"," ",time()-3600); } $objSession->Logout(); header("Location: ".$adminURL."/index.php?logout=1"); die(); //require_once($pathtoroot."admin/login.php"); } } global $admin,$pathtoroot, $objConfig; if(!strlen($admin)) { $admin = $objConfig->Get("AdminDirectory"); if(!strlen($admin)) { $admin = "admin"; } } require_once($pathtoroot.$admin."/include/sections.php"); $envar = "env=" . BuildEnv(); /* this function loads the javascript for each module's toolbar */ function load_module_javascript($sectionname, $skip_modules = Array() ) { global $adminURL, $pathtoroot; echo "<SCRIPT LANGUAGE=JavaScript1.2 src=\"".$adminURL."/browse/fw_menu.js\"></SCRIPT>\n"; echo "<SCRIPT LANGUAGE=JavaScript1.2 src=\"".$adminURL."/include/tabs.js\"></SCRIPT>\n"; echo "<script language=\"JavaScript1.2\" src=\"$adminURL/include/checkarray.js\"></script>\n"; global $objConfig, $ItemTabs; $m = GetModuleArray("admin"); echo "<!-- ".count($m)."-->"; foreach($m as $key=>$value) { $path = $pathtoroot. $value."admin/include/toolbar/".$sectionname.".php"; if( !in_array($value, $skip_modules) && file_exists($path) ) { echo "\n<!-- $path -->\n"; include_once($path); } else echo "\n<!-- $path not found -->\n"; } } function load_module_styles() { global $objConfig, $ItemTabs,$rootURL,$pathtoroot; $m = GetModuleArray("admin"); echo "<!-- module styles (".count($m).")-->"; foreach($m as $key=>$value) { $path = $pathtoroot.$value."admin/include/style.css"; if(file_exists($path)) { $inc = $rootURL.$value."admin/include/style.css"; print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$inc\">\n"; } } } //*********************************** //Page Header function int_header($toolbar=NULL,$NavBarText=NULL,$ExtraTitle=NULL,$onLoad=NULL, $ExtraHead=NULL,$skip_modules=Array(),$OtherSection = '') { global $pathtoroot; global $pathtolocal; global $section; global $objSections; global $rootURL; global $localURL; global $adminURL; global $envar; global $admin; global $metatag; $style_sheet_global = $adminURL."/include/style.css"; $style_sheet_local = $localURL."admin/include/style.css"; $ExtraTitle = str_replace(Array('<','>'),Array('<','>'),$ExtraTitle); //$ExtraTitle = htmlentities($ExtraTitle); if (is_object($toolbar)) { if(file_exists($pathtolocal."admin/include/toolbar.php")) require_once ($pathtolocal."admin/include/toolbar.php"); //Aray of the preloaded elems //$int_toolbar_preload = array(); print "<html>\n\t<head>\n\t\t<title>In-portal</title>\n"; if(strlen($metatag)) { print $metatag."\n"; } else { $charset = GetRegionalOption('Charset'); + if(defined('FORCE_CHARSET')&&FORCE_CHARSET) $charset=FORCE_CHARSET; print "<meta http-equiv=\"content-type\" content=\"text/html;charset=$charset\">\n"; print "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n"; } print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">\n"; load_module_styles(); require_once($pathtoroot.$admin."/include/mainscript.php"); //require_once($pathtolocal."admin/include/script.js"); print $ExtraHead; $sectionname = explode(":", $section); $sectionname = $sectionname[sizeof($sectionname)-1]; load_module_javascript($sectionname, $skip_modules); if(is_object($toolbar)) print $toolbar->GetInitScript(); print '</head><body topmargin="0" leftmargin="8" marginheight="8" marginwidth="8" bgcolor="#FFFFFF"'; //*** Preload toolbar images if(strlen($onLoad)) { print $onLoad; } else print " ONLOAD=\"clear_list_checkboxes();\""; //*** Preload toolbar images if(is_object($toolbar)) { if (strlen($toolbar->Get("CheckClass"))) { print $toolbar->onLoadString().">"; } else print " >"; $menufunc = $toolbar->Get("load_menu_func"); if (strlen($menufunc)) { print "<script language=\"JavaScript1.2\">$menufunc</script>"; } } else print " >"; } else { $charset = GetRegionalOption('Charset'); print "<html><head><title>In-Portal </title>"; print "<meta http-equiv=\"content-type\" content=\"text/html;charset=$charset\">"; print "<meta http-equiv=\"Pragma\" content=\"no-cache\">"; print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">"; load_module_styles(); require_once ($pathtoroot.$admin."/include/mainscript.php"); //require_once ($pathtolocal."admin/include/script.js"); $sectionname = explode(":", $section); $sectionname = $sectionname[sizeof($sectionname)-1]; load_module_javascript($sectionname); print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\">"; } if(strlen($section)>0) { $objSections->SetCurrentSection($section); $sec = $objSections->GetCurrentSection(); if ($sec->Get("notitle") != 1) print $objSections->page_title(); print $objSections->page_tabs($envar); if ($sec->Get("nonavbar") != 1) //Section Navigatior print $objSections->section_header($envar,$NavBarText,$ExtraTitle,false,$OtherSection); //Toolbar if appropriate if ( isset($sections[$section]) && ($sections[$section]['toolbar']==1) || ( is_object($toolbar) ) ) print $toolbar->Build(); } }//Page Header // HELP Page Header function int_help_header() { global $pathtoroot; global $pathtolocal; global $section; global $objSections; global $rootURL; global $localURL; global $adminURL; global $envar; global $admin; global $metatag; $style_sheet_global = $adminURL."/include/style.css"; $style_sheet_local = $localURL."admin/include/style.css"; // TOOLBAR: $charset = GetRegionalOption('Charset'); print "<html><head><title>In-Portal - Help</title>"; print "<meta http-equiv=\"content-type\" content=\"text/html;charset=$charset\">"; print "<meta http-equiv=\"Pragma\" content=\"no-cache\">"; print "<link rel=\"stylesheet\" type=\"text/css\" href=\"$style_sheet_global\">"; load_module_styles(); require_once ($pathtoroot.$admin."/include/mainscript.php"); print "</head><body topmargin=\"0\" leftmargin=\"8\" marginheight=\"8\" marginwidth=\"8\" bgcolor=\"#FFFFFF\">"; if(strlen($section)>0) { $objSections->SetCurrentSection($section); $sec = $objSections->GetCurrentSection(); if ($sec->Get("notitle") != 1) print $objSections->page_title(); if ($sec->Get("nonavbar") != 1) //Section Navigatior print $objSections->section_header($envar,'','', true); } }// HELP Page Header function int_SectionHeader($toolbar=NULL,$onLoad=NULL,$NavBarText=NULL,$ExtraTitle=NULL) { global $pathtoroot; global $pathtolocal; global $section, $sections; global $objSections; global $rootURL; global $adminURL,$admin; global $localURL; global $envar; global $b_topmargin; if (!isset($b_topmargin)) $b_topmargin = 8; $sectionname = explode(":", $section); $sectionname = $sectionname[sizeof($sectionname)-1]; load_module_javascript($sectionname); if(is_object($toolbar)) print $toolbar->GetInitScript(); print "</head><body topmargin=\"$b_topmargin\" leftmargin=\"8\" marginheight=\"$b_topmargin\" marginwidth=\"8\" bgcolor=\"#FFFFFF\""; //*** Preload toolbar images if(strlen($onLoad)) { print $onLoad; } else print " onload=\"if (clear_checkboxes) clear_checkboxes();\""; print ">"; global $b_header_addon; if (isset($b_header_addon)) echo $b_header_addon; if(strlen($section)>0) { $objSections->SetCurrentSection($section); $sec = $objSections->GetCurrentSection(); if ($sec->Get("notitle")!=1) print $objSections->page_title(); print $objSections->page_tabs($envar); //Section Navigatior if ($sec->Get("nonavbar")!=1) { if (is_null($ExtraTitle)) $ExtraTitle = ""; print $objSections->section_header($envar,$NavBarText,$ExtraTitle); } //Toolbar if appropriate if( isset($sections[$section]) ) if($sections[$section]['toolbar'] == 1 || (is_object($toolbar)) ) print $toolbar->Build(); } }//Section Page Header //*********************************** //SubSection Title function int_subsection_title($caption, $ColSpan = 5) { int_table_color(1); print <<<END <!-- Subsection Title --> <tr class="subsectiontitle"> <td colspan="$ColSpan">$caption</td> </tr> END; } function int_subsection_title_install($caption) { int_table_color(1); print <<<END <!-- Subsection Title --> <tr class="subsectiontitle"> <td colspan="3">$caption</td> </tr> END; } function int_subsection_title_ret($caption) { int_table_color_ret(1); $o = "<!-- Subsection Title --><tr class=\"subsectiontitle\"><td colspan=\"5\">$caption</td></tr>"; return $o; } //SubSection Title //*********************************** //Table Alternating colors function int_table_color($reset_color=0, $return_result = false) { static $colorset; if($reset_color) { $colorset="table_color2"; return; } if ($colorset == "table_color1") $colorset = "table_color2"; else $colorset = "table_color1"; $ret = "class=\"".$colorset."\""; if($return_result) return $ret; else print $ret; }//Table Alternating colors //Table Alternating colors with return function int_table_color_ret($reset_color=0) { static $colorset; if($reset_color) { $colorset="table_color2"; return; } if ($colorset == "table_color1") $colorset = "table_color2"; else $colorset = "table_color1"; return "class=\"".$colorset."\""; }//Table Alternating colors //*********************************** //Hint function int_hint($caption) { global $imagesURL; print <<<END <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td> <span class="hint"><img src="$imagesURL/smicon7.gif" width="14" height="14" align="absmiddle">$caption</span> <td> </tr> </table> END; }//Hint function int_hint_red($caption) { global $imagesURL; print <<<END <table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td> <span class="hint_red">$caption</span> <td> </tr> </table> END; }//Hint //*********************************** //Navigation String function int_nav($caption) { global $pathtoroot; global $imagespath; print <<<END <table width="100%" border="0" cellspacing="0" cellpadding="2" bgcolor="#f0f0f0"> <tr> <td><b class="text"><span class="navbar"><a class="navbar" href="">$caption</a></span></b></td> </tr> </table> END; }//Navigation String //*********************************** //Print Out Images function int_img($img) { global $images; global $pathtoroot; global $imagesURL; $src = $imagesURL."/".$images[$img]['file']; $alt = $images[$img]['alt']; $width = $images[$img]['width']; $height = $images[$img]['height']; $name = $img; //Set ID if needed if ($img == 'img:tool:view') $id = "ID=\"viewbutton\""; print "<img alt=\"$alt\" name=\"$name\" src=\"$src\" width=\"$width\" height=\"$height\" $id border=\"0\" align=\"absmiddle\">"; }//Print Out Images //*********************************** //Page Footer function int_footer() { global $objSession; if($objSession->HasSystemPermission("DEBUG.INFO")) { //phpinfo(); } if( defined('REQUIRE_LAYER_HEADER') ) echo '</div>'; print <<<END </body> </html> END; }//Page Footer function HomeEnv() { global $m_var_list_update; $m_var_list_update["cat"]=0; return BuildEnv(); } function UpEnv() { global $m_var_list_update,$objCatList; $current = $objCatList->CurrentCat(); $parent = $current->Get("ParentId"); $m_var_list_update["cat"]=$parent; return BuildEnv(); } function ModuleInclude($file) { global $pathtoroot; $m = GetModuleArray(); foreach($m as $key=>$value) { $path = $pathtoroot.$value.$file; if(file_exists($path)) { echo "<!-- $path -->"; @include_once($path); } } } function MultiEditButtons(&$ToolBar,$next,$prev,$Form,$StatusField, $url,$onClick, $ExtraVar="", $prev_phrase = 'Phrase Not Passed', $next_phrase = 'Phrase Not Passed') { global $adminURL; $ToolBar->Add("divider"); if($prev>-1) { $MouseOver="swap('moveleft','toolbar/tool_prev_f2.gif');"; $MouseOut="swap('moveleft', 'toolbar/tool_prev.gif');"; $var="env=".BuildEnv()."&en=$prev&lpn=".GetVar('lpn'); if (strlen($ExtraVar)) $var.= $ExtraVar; if ($onClick != 'LangSubmitMove') { $link = "javascript:edit_submit('$Form','$StatusField','$url',0,'$var');"; } else { $link = "javascript:$onClick('$url', '$prev')"; } $ToolBar->Add("moveleft",$prev_phrase,$link,$MouseOver,$MouseOut,"","toolbar/tool_prev.gif"); } else { $MouseOver=""; $MouseOut=""; //$onClick=""; $link="#"; $ToolBar->Add("moveleft",$prev_phrase,"#","","","","toolbar/tool_prev_f3.gif"); } if($next>-1) { $MouseOver="swap('moveright','toolbar/tool_next_f2.gif');"; $MouseOut="swap('moveright', 'toolbar/tool_next.gif');"; $var="env=".BuildEnv()."&en=$next".( isset($_REQUEST['lpn']) ? '&lpn='.$_REQUEST['lpn'] : ''); if (strlen($ExtraVar)) $var.= $ExtraVar; if ($onClick != 'LangSubmitMove') { $link = "javascript:edit_submit('$Form','$StatusField','$url',0,'$var');"; } else { $link = "javascript:$onClick('$url', '$next')"; } $ToolBar->Add("moveright",$next_phrase,$link,$MouseOver,$MouseOut,"","toolbar/tool_next.gif"); } else { $ToolBar->Add("moveright",$next_phrase,"#","","","","toolbar/tool_next_f3.gif"); } } function InsertButtons(&$ToolBar, $Buttons = Array(), $params = Array() ) { foreach($Buttons as $button) switch($button) { case 'save': $ToolBar->Add( "img_save", "la_Save", "#", "swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');", "edit_submit('".$params['form']."','".$params['status_field']."','".$params['url']."',1,'&lpn=".$_REQUEST['lpn']."');","tool_select.gif"); break; case 'cancel': $ToolBar->Add( "img_cancel", "la_Cancel", "#", "swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');", "edit_submit('".$params['form']."','".$params['status_field']."','".$params['url']."',2,'&lpn=".$_REQUEST['lpn']."');","tool_cancel.gif"); break; case 'edit': break; case 'delete': break; } } function GetTitle($item_phrase, $tab_phrase, $id, $item_name = false) { //gets correct caption for editing windows with tabs //echo "In: $item_phrase, $tab_phrase, $id"; $is_new = (isset($_REQUEST['new']) && ($_REQUEST['new'] == 1)) || $id <= 0 ? 1 : 0; $text = $is_new ? 'la_Text_Adding' : 'la_Text_Editing'; $text = admin_language($text).' '.admin_language($item_phrase); if($is_new == 0) { if ($item_name == false) { $text .= ' #'.$id; } else { if ($item_name != '') { $text .= " '".$item_name."'"; } } } if ($tab_phrase != '') { $text .= ' - '.admin_language($tab_phrase); } return $text; } function MarkFields($form_name) { // mark specified form fields as required ?> <script language="JavaScript">MarkAsRequired(document.getElementById("<?php echo $form_name; ?>"));</script> <?php } ?> Property changes on: trunk/admin/include/elements.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.19 \ No newline at end of property +1.20 \ No newline at end of property Index: trunk/admin/config/addlang.php =================================================================== --- trunk/admin/config/addlang.php (revision 953) +++ trunk/admin/config/addlang.php (revision 954) @@ -1,339 +1,340 @@ <?php ############################################################## ##In-portal ## ############################################################## ## In-portal ## ## Intechnic Corporation ## ## All Rights Reserved, 1998-2002 ## ## ## ## No portion of this code may be copied, reproduced or ## ## otherwise redistributed without proper written ## ## consent of Intechnic Corporation. Violation will ## ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## if(!strlen($pathtoroot)) { $path=dirname(realpath(__FILE__)); if(strlen($path)) { /* determine the OS type for path parsing */ $pos = strpos($path,":"); if ($pos === false) { $gOS_TYPE="unix"; $pathchar = "/"; } else { $gOS_TYPE="win"; $pathchar="\\"; } $p = $path.$pathchar; /*Start looking for the root flag file */ while(!strlen($pathtoroot) && strlen($p)) { $sub = substr($p,strlen($pathchar)*-1); if($sub==$pathchar) { $filename = $p."root.flg"; } else $filename = $p.$pathchar."root.flg"; if(file_exists($filename)) { $pathtoroot = $p; } else { $parent = realpath($p.$pathchar."..".$pathchar); if($parent!=$p) { $p = $parent; } else $p = ""; } } if(!strlen($pathtoroot)) $pathtoroot = ".".$pathchar; } else { $pathtoroot = ".".$pathchar; } } $sub = substr($pathtoroot,strlen($pathchar)*-1); if($sub!=$pathchar) { $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; //print_r($_GET); //print_r($_POST); require_once($pathtoroot."kernel/startup.php"); //admin only util /* set the destination of the image upload, relative to the root path */ $DestDir = "kernel/images/"; $rootURL="http://".ThisDomain().$objConfig->Get("Site_Path"); $admin = $objConfig->Get("AdminDirectory"); if(!strlen($admin)) $admin = "admin"; $localURL=$rootURL."kernel/"; $adminURL = $rootURL.$admin; $imagesURL = $adminURL."/images"; $browseURL = $adminURL."/browse"; $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"); 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); } } $objMessages = new clsEmailMessageList(); unset($objEditItems); $objEditItems = new clsLanguageList(); $objEditItems->SourceTable = $objSession->GetEditTable("Language"); $objEditItems->EnablePaging = FALSE; $objPhraseList = new clsPhraseList(); $objPhraseList->EnablePaging = FALSE; if ($_GET["new"] == 1) { $c = new clsLanguage(NULL); $c->Set("DecimalPoint","."); $c->Set("ThousandSep",","); $c->Set("DateFormat","m-d-Y"); $c->Set("TimeFormat","g:i:s a"); $en = 0; $action = "m_lang_add"; $name = prompt_language("la_Text_New"); $objLanguages->CreateEmptyEditTable("LanguageId"); $objPhraseList->CreateEmptyEditTable("PhraseId"); $objMessages->CreateEmptyEditTable($_POST["itemlist"]); } else { $en = (int)$_GET["en"]; if (isset($_POST["itemlist"])) { $objLanguages->CopyToEditTable("LanguageId",$_POST["itemlist"]); $objPhraseList->CopyToEditTable("LanguageId",$_POST["itemlist"]); $objMessages->CopyToEditTable("LanguageId",$_POST["itemlist"]); } $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); $itemcount=$objEditItems->NumItems(); $c = $objEditItems->GetItemByIndex($en); 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_lang_edit"; $name = $c->Get("LocalName"); } $section = "in-portal:lang_general"; $envar = "env=".BuildEnv(); $title = $title = GetTitle("la_Text_Pack", "la_tab_General", $c->Get('LanguageId'), $c->Get('LocalName'));///prompt_language("la_Text_Configuration")." - ".$name."' ".prompt_language("la_Text_Pack")." - ".prompt_language("la_tab_General"); //Display header $sec = $objSections->GetSection($section); $objListToolbar = new clsToolBar(); $objListToolbar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',1);",$imagesURL."/toolbar/tool_select.gif"); $objListToolbar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif"); if ( isset($en_prev) || isset($en_next) ) { $url = $admin."/config/addlang.php"; $objListToolbar->Add("divider"); $form = "language"; 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 = "javascript:edit_submit('$form','$url',0,'$var');"; $objListToolbar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","toolbar/tool_prev.gif"); } else { $MouseOver=""; $MouseOut=""; $onClick=""; $link="#"; $objListToolbar->Add("moveleft",admin_language("la_ToolTip_Previous")." ".admin_language("la_Text_Category"),"#","","","","toolbar/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 = "javascript:edit_submit('$form','$url',0,'$var');"; $objListToolbar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","toolbar/tool_next.gif"); } else { $objListToolbar->Add("moveright",admin_language("la_ToolTip_Next")." ".admin_language("la_Text_Category"),$link,$MouseOver,$MouseOut,"","toolbar/tool_next_f3.gif"); } } + define('FORCE_CHARSET', $c->Get("Charset") ); int_header($objListToolbar,NULL,$title); if ($objSession->GetVariable("HasChanges") == 1) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar"> <tr> <td valign="top"> <?php int_hint_red(admin_language("la_Warning_Save_Item")); ?> </td> </tr> </table> <?php } ?> <FORM enctype="multipart/form-data" ID="language" NAME="language" method="POST" ACTION=""> <TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder"> <?php int_subsection_title(prompt_language("la_tab_General")); ?> <?php $c->Data=inp_htmlize($c->Data);?> <TR <?php int_table_color(); ?> > <TD class="text"><?php echo prompt_language("la_prompt_LanguageId"); ?></TD> <TD><?php echo $c->Get("LanguageId"); ?></TD> <TD></TD> </TR> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_packname" class="text"><?php echo prompt_language("la_prompt_PackName"); ?></SPAN></TD> <TD><input type=text ValidationType="exists" tabindex="1" NAME="packname" VALUE="<?php echo $c->Get("PackName"); ?>"></TD> <TD></TD> </TR> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_localname"><?php echo prompt_language("la_prompt_LocalName"); ?></SPAN></TD> <TD><input type=text ValidationType="exists" tabindex="2" NAME="localname" VALUE="<?php echo $c->Get("LocalName"); ?>"></TD> <TD></TD> </TR> <!-- charset: begin --> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_theme_charset"><?php echo prompt_language("la_prompt_charset"); ?></SPAN></TD> <TD><input type=text NAME="charset" tabindex="3" VALUE="<?php echo $c->Get("Charset"); ?>"></TD> <TD></TD> </TR> <!-- charset: end --> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_theme_icon"><?php echo prompt_language("la_prompt_icon_url"); ?></SPAN></TD> <TD><input type=text NAME="icon" tabindex="3" VALUE="<?php echo $c->Get("IconUrl"); ?>"></TD> <TD></TD> </TR> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_dateformat"><?php echo prompt_language("la_prompt_lang_dateformat"); ?></SPAN></TD> <TD><input type=text NAME="date_format" tabindex="4" VALUE="<?php echo $c->Get("DateFormat"); ?>"> <?php if(strlen($c->Get("DateFormat"))) echo prompt_language("la_Text_example").":".date($c->Get("DateFormat")); ?> </TD> <TD></TD> </TR> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_timeformat"><?php echo prompt_language("la_prompt_lang_timeformat"); ?></SPAN></TD> <TD><input type=text NAME="time_format" tabindex="5" VALUE="<?php echo $c->Get("TimeFormat"); ?>"> <?php if(strlen($c->Get("TimeFormat"))) echo prompt_language("la_Text_example").":".date($c->Get("TimeFormat")); ?> </TD> <TD></TD> </TR> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_lang_decimal"><?php echo prompt_language("la_prompt_decimal"); ?></SPAN></TD> <TD><input type=text ValidationType="exists" tabindex="6" NAME="decimal" VALUE="<?php echo $c->Get("DecimalPoint"); ?>"></TD> <TD></TD> </TR> <TR <?php int_table_color(); ?> > <TD><SPAN id="prompt_lang_thousand"><?php echo prompt_language("la_prompt_thousand"); ?></SPAN></TD> <TD><input type=text NAME="thousand" tabindex="7" VALUE="<?php echo $c->Get("ThousandSep"); ?>"></TD> <TD></TD> </TR> <tr <?php int_table_color(); ?>> <td valign="top" class="text"><?php echo prompt_language("la_prompt_Enabled"); ?></td> <td> <input type="checkbox" name="enabled" tabindex="8" class="text" value="1" <?php if($c->Get("Enabled") == 1) echo "checked"; ?>> </td> <td class="text"> </td> </tr> <tr <?php int_table_color(); ?>> <td valign="top" class="text"><?php echo prompt_language("la_prompt_Primary"); ?></td> <td> <input type="checkbox" name="primary" tabindex="9" class="text" value="1" <?php if($c->Get("PrimaryLang") == 1) echo "checked"; ?>> </td> <td class="text"> </td> </tr> <tr <?php int_table_color(); ?>> <td valign="top" class="text"><?php echo prompt_language("la_prompt_CopyLabels"); ?></td> <td> <input type="checkbox" name="importlabels" tabindex="10" class="text" value="1"> <SELECT NAME="srcpack"> <OPTION VALUE="0">--<?php echo prompt_language("la_prompt_Select_Source"); ?> <?php $ado = &GetADODBConnection(); $sql = "SELECT * FROM ".GetTablePrefix()."Language"; $rs = $ado->Execute($sql); while($rs && !$rs->EOF) { echo "<OPTION VALUE=\"".$rs->fields["LanguageId"]."\">".$rs->fields["PackName"]."\n"; $rs->MoveNext(); } ?> </SELECT> </td> <td class="text"> </td> <input type=hidden NAME="Action" VALUE="<?php echo $action; ?>"> <INPUT TYPE="hidden" NAME="LanguageId" VALUE="<?php echo $c->Get("LanguageId"); ?>"> <input type="hidden" name="LangEditStatus" VALUE="0"> </tr> </TABLE> </FORM> <!-- CODE FOR VIEW MENU --> <form method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="viewmenu"> <input type="hidden" name="fieldname" value=""> <input type="hidden" name="varvalue" value=""> <input type="hidden" name="varvalue2" value=""> <input type="hidden" name="Action" value=""> </form> <!-- END CODE--> <?php int_footer(); ?> \ No newline at end of file Property changes on: trunk/admin/config/addlang.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.8 \ No newline at end of property +1.9 \ No newline at end of property Index: trunk/admin/config/email_edit.php =================================================================== --- trunk/admin/config/email_edit.php (revision 953) +++ trunk/admin/config/email_edit.php (revision 954) @@ -1,253 +1,254 @@ <?php ############################################################## ##In-portal ## ############################################################## ## In-portal ## ## Intechnic Corporation ## ## All Rights Reserved, 1998-2002 ## ## ## ## No portion of this code may be copied, reproduced or ## ## otherwise redistributed without proper written ## ## consent of Intechnic Corporation. Violation will ## ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## if(!strlen($pathtoroot)) { $path=dirname(realpath(__FILE__)); if(strlen($path)) { /* determine the OS type for path parsing */ $pos = strpos($path,":"); if ($pos === false) { $gOS_TYPE="unix"; $pathchar = "/"; } else { $gOS_TYPE="win"; $pathchar="\\"; } $p = $path.$pathchar; /*Start looking for the root flag file */ while(!strlen($pathtoroot) && strlen($p)) { $sub = substr($p,strlen($pathchar)*-1); if($sub==$pathchar) { $filename = $p."root.flg"; } else $filename = $p.$pathchar."root.flg"; if(file_exists($filename)) { $pathtoroot = $p; } else { $parent = realpath($p.$pathchar."..".$pathchar); if($parent!=$p) { $p = $parent; } else $p = ""; } } if(!strlen($pathtoroot)) $pathtoroot = ".".$pathchar; } else { $pathtoroot = ".".$pathchar; } } $sub = substr($pathtoroot,strlen($pathchar)*-1); if($sub!=$pathchar) { $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; //print_r($_GET); //print_r($_POST); require_once($pathtoroot."kernel/startup.php"); //admin only util /* set the destination of the image upload, relative to the root path */ $DestDir = "kernel/images/"; $rootURL="http://".ThisDomain().$objConfig->Get("Site_Path"); $admin = $objConfig->Get("AdminDirectory"); if(!strlen($admin)) $admin = "admin"; $localURL=$rootURL."kernel/"; $adminURL = $rootURL.$admin; $imagesURL = $adminURL."/images"; $cssURL = $adminURL."/include"; $browseURL = $adminURL."/browse"; //$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"); //require_once($pathtoroot.$admin."/listview/listview.php"); require_once($pathtoroot.$admin."/editor/FCKeditor/fckeditor.php"); $m = GetModuleArray(); foreach($m as $key=>$value) { $path = $pathtoroot. $value."admin/include/parser.php"; if(file_exists($path)) { include_once($path); } } $objLangEdit = new clsLanguageList(); $objLangEdit->SourceTable = $objSession->GetEditTable("Language"); $objLangEdit->EnablePaging = FALSE; $en = (int)$_GET["en"]; $objLangEdit->Query_Item("SELECT * FROM ".$objLangEdit->SourceTable); $itemcount=$objLangEdit->NumItems(); $l = $objLangEdit->GetItemByIndex($en); $LangId = $l->Get("LanguageId"); unset($objEditItems); $objEditItems = new clsEmailMessageList(); $objEditItems->SourceTable = $objSession->GetEditTable("EmailMessage"); $objEditItems->EnablePaging = FALSE; if(is_array($_POST["itemlist"])) { $EventId = $_POST["itemlist"][0]; } else { $EventId = $_POST["itemlist"]; } $m = $objEditItems->GetMessage($EventId,$LangId); $objEvents = new clsEventList(); $ev = $objEvents->GetItem($EventId); if($m===FALSE) { $m = new clsEmailMessage(); $m->tablename = $objEditItems->SourceTable; $m->Set("EventId",$EventId); $m->Set("LanguageId",$LangId); $id = (int)GetMinValue($m->tablename,"EmailMessageId"); $m->Set("EmailMessageId",$id-1); $m->Create(); $m->Set("EmailMessageId",$id-1); $m->headers = explode("\n",$objConfig->Get("Smtp_DefaultHeaders")); } else { $m->ReadTemplate(); } $subject = $m->subject; if(strlen($subject)) $subject = substr($subject,strpos($subject,":")+2); $action = "m_emailevent_edit"; $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-portal:lang_email'; $ado = &GetADODBConnection(); /* page header */ -$charset = GetRegionalOption('Charset'); + +$charset = $l->Get("Charset"); //GetRegionalOption('Charset'); print <<<END <html> <head> <title>In-portal</title> <meta http-equiv="content-type" content="text/html;charset=$charset"> <meta http-equiv="Pragma" content="no-cache"> <script language="JavaScript"> imagesPath='$imagesURL'+'/'; </script> <script src="$browseURL/common.js"></script> <script src="$browseURL/toolbar.js"></script> <script src="$browseURL/utility.js"></script> <script src="$browseURL/checkboxes.js"></script> <script language="JavaScript1.2" src="$browseURL/fw_menu.js"></script> <link rel="stylesheet" type="text/css" href="$browseURL/checkboxes.css"> <link rel="stylesheet" type="text/css" href="$cssURL/style.css"> <link rel="stylesheet" type="text/css" href="$browseURL/toolbar.css"> END; $objListToolBar = new clsToolBar(); $objListToolBar->Add("msg_save", "la_Save","#","swap('msg_save','toolbar/tool_select_f2.gif');", "swap('msg_save', 'toolbar/tool_select.gif');","edit_submit('language','LangEditStatus','".$admin."/config/addlang_email.php',0);",$imagesURL."/toolbar/tool_select.gif"); $objListToolBar->Add("msg_cancel", "la_Cancel","#","swap('msg_cancel','toolbar/tool_cancel_f2.gif');", "swap('msg_cancel', 'toolbar/tool_cancel.gif');","msg_submit('language','".$admin."/config/addlang_email.php');", $imagesURL."/toolbar/tool_cancel.gif"); $title = prompt_language("la_Text_Editing")." ".prompt_language("la_Text_MailEvent")." '".prompt_language($ev->Get("Description"))."'"; if($ev->Get("Type")==0) { $title .= " - ".prompt_language("la_Text_User"); } else $title .= " - ".prompt_language("la_Text_Admin"); int_header($objListToolBar,NULL,$title); ?> <table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder"> <form ID="language" name="langage" action="" method=POST> <input type="hidden" name="LangEditStatus" VALUE="0"> <INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_edit"> <INPUT TYPE="HIDDEN" NAME="MessageId" VALUE="<?php echo $m->Get("EmailMessageId"); ?>"> <?php int_subsection_title(prompt_language("la_tab_General")); ?> <tr <?php int_table_color(); ?>> <td valign="top"><span class="text"><?php echo prompt_language("la_prompt_Subject"); ?></span></td> <td> <input type="text" tabindex="1" name="subject" class="text" size="60" value="<?php echo htmlspecialchars($subject); ?>"> </td> <td></td> </tr> <TR <?php int_table_color(); ?>> <td valign="top"><span class="text"><?php echo prompt_language("la_prompt_sendmethod"); ?></SPAN></TD> <TD><span class="text"> <input type="RADIO" tabindex="2" NAME="sendhtml" VALUE="0" <?php if($m->Get("MessageType")!="html") echo "CHECKED"; ?>><?php echo prompt_language("la_prompt_plaintext"); ?> <INPUT TYPE="RADIO" tabindex="2" NAME="sendhtml" VALUE="1" <?php if($m->Get("MessageType")=="html") echo "CHECKED"; ?>><?php echo prompt_language("la_prompt_html"); ?> </span> </td> <td></td> </TR> <tr <?php int_table_color(); ?>> <td valign="top"><span class="text"><?php echo prompt_language("la_prompt_headers"); ?></span></td> <td> <textarea name="headers" tabindex="3" id="headers" rows="5" cols="60"><?php echo implode("\n",$m->headers); ?></textarea> </td> <td></td> </tr> <?php int_subsection_title(prompt_language("la_tab_Message")); ?> <tr <?php int_table_color(); ?>> <td valign="top" COLSPAN=3> <?php // $oFCKeditor = new FCKeditor(); // $oFCKeditor->Value = $m->body; // $oFCKeditor->CreateFCKeditor( 'messageBody', '100%',300 ) ; ?> <TEXTAREA name="messageBody" rows=20 cols=85><?php echo $m->body; ?></TEXTAREA> </td> </tr> </FORM> </TABLE> <?php int_footer(); ?> Property changes on: trunk/admin/config/email_edit.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.5 \ No newline at end of property +1.6 \ No newline at end of property Index: trunk/admin/config/addlang_email.php =================================================================== --- trunk/admin/config/addlang_email.php (revision 953) +++ trunk/admin/config/addlang_email.php (revision 954) @@ -1,440 +1,441 @@ <?php ############################################################## ##In-portal ## ############################################################## ## In-portal ## ## Intechnic Corporation ## ## All Rights Reserved, 1998-2002 ## ## ## ## No portion of this code may be copied, reproduced or ## ## otherwise redistributed without proper written ## ## consent of Intechnic Corporation. Violation will ## ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## if(!strlen($pathtoroot)) { $path=dirname(realpath(__FILE__)); if(strlen($path)) { /* determine the OS type for path parsing */ $pos = strpos($path,":"); if ($pos === false) { $gOS_TYPE="unix"; $pathchar = "/"; } else { $gOS_TYPE="win"; $pathchar="\\"; } $p = $path.$pathchar; /*Start looking for the root flag file */ while(!strlen($pathtoroot) && strlen($p)) { $sub = substr($p,strlen($pathchar)*-1); if($sub==$pathchar) { $filename = $p."root.flg"; } else $filename = $p.$pathchar."root.flg"; if(file_exists($filename)) { $pathtoroot = $p; } else { $parent = realpath($p.$pathchar."..".$pathchar); if($parent!=$p) { $p = $parent; } else $p = ""; } } if(!strlen($pathtoroot)) $pathtoroot = ".".$pathchar; } else { $pathtoroot = ".".$pathchar; } } $sub = substr($pathtoroot,strlen($pathchar)*-1); if($sub!=$pathchar) { $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; require_once($pathtoroot."kernel/startup.php"); //admin only util $rootURL="http://".ThisDomain().$objConfig->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"); unset($objEditItems); $objEditItems = new clsPhraseList(); $objEditItems->SourceTable = $objSession->GetEditTable("Language"); $objEditItems->EnablePaging = FALSE; //Multiedit init $en = (int)$_GET["en"]; $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); $itemcount=$objEditItems->NumItems(); $c = $objEditItems->GetItemByIndex($en); $name = $c->Get("PackName"); $LangId = $c->Get("LanguageId"); 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"; /* -------------------------------------- Section configuration ------------------------------------------- */ $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-portal:lang_email'; $sec = $objSections->GetSection($section); $SortFieldVar = "LangEmail_LV_SortField"; $SortOrderVar = "LangEmail_LV_SortOrder"; $DefaultSortField = "Description"; $PerPageVar = "Perpage_LangEmail"; $CurrentPageVar = "Page_LangEmail"; $CurrentFilterVar = "LangEmailEvent_View"; $ListForm = "language"; $CheckClass = "EmailChecks"; /* ------------------------------------- Configure the toolbar ------------------------------------------- */ $objListToolBar = new clsToolBar(); $objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('language','LangEditStatus','".$admin."/config/config_lang.php',1);",$imagesURL."/toolbar/tool_select.gif"); $objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","edit_submit('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif"); $objListToolBar->Set("section",$section); $objListToolBar->Set("load_menu_func",""); $objListToolBar->Set("CheckClass",$CheckClass); $objListToolBar->Set("CheckForm",$ListForm); 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"); } } $objListToolBar->Add("divider"); $listImages = array(); //$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick $EditEnv = $envar."&Lang=".$c->Get("LanguageId"); $objListToolBar->Add("email_edit", "la_ToolTip_Edit","#","if (EmailChecks.itemChecked()) swap('email_edit','toolbar/tool_edit_f2.gif');", "if (EmailChecks.itemChecked()) swap('email_edit', 'toolbar/tool_edit.gif');", "if (EmailChecks.itemChecked()) EmailChecks.check_submit('email_edit', '');", "tool_edit.gif",TRUE,TRUE); $listImages[] = "EmailChecks.addImage('email_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); "; /* $objListToolBar->Add("email_user", "la_ToolTip_Email_UserSelect","#","if (EmailChecks.itemChecked()) swap('email_user','toolbar/tool_usertogroup_f2.gif');", "if (EmailChecks.itemChecked()) swap('email_user', 'toolbar/tool_usertogroup.gif');", "OpenUserSelector('$envar&Selector=radio&destform=userpopup&destfield=FromUserId&IdField=PortalUserId',$LangId);", "tool_usertogroup.gif"); $listImages[] = "EmailChecks.addImage('email_user','$imagesURL/toolbar/tool_usertogroup.gif','$imagesURL/toolbar/tool_usertogroup_f3.gif',1); "; */ $objListToolBar->Add("divider"); $objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ", "swap('viewmenubutton', 'toolbar/tool_view.gif');", "ShowViewMenu();","tool_view.gif"); $objListToolBar->AddToInitScript($listImages); $objListToolBar->AddToInitScript("fwLoadMenus();"); /* ----------------------------------------- Set the View Filter ---------------------------------------- */ $ViewNormal=1; $Bit_Disabled=2; $Bit_Enabled=1; $Bit_FrontOnly=4; $Bit_All = 7; $FilterLabels = array(); $FilterLabels[0] = admin_language("la_Text_Enabled"); $FilterLabels[1] = admin_language("la_Text_Disabled"); $FilterLabels[2] = admin_language("la_Text_FrontOnly"); /* determine current view menu settings */ $MsgView = $objConfig->Get($CurrentFilterVar); if(!is_numeric($MsgView)) { $MsgView = $Bit_All; //Set all bits ON $MsgFilter = ""; } if($MsgView & $Bit_Disabled) $Status[] = 0; if($MsgView & $Bit_Enabled) $Status[] = 1; if($MsgView & $Bit_FrontOnly) $Status[] = 2; if(count($Status)>0) { $MsgFilter = "Enabled IN (".implode(",",$Status).")"; } else $MsgFilter = "Enabled = -1"; /* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/ $objEvents = new clsEventList(); $order = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar)); $SearchWords = $objSession->GetVariable("LangEmailEventSearchWord"); if(strlen($SearchWords)) { // remove u.Login from search fields in this case $i = 0; $field_count = count($objEvents->AdminSearchFields); while($i < $field_count) { if( $objEvents->AdminSearchFields[$i] == 'u.Login' ) { array_splice($objEvents->AdminSearchFields,$i); break; } $i++; } $where = $objEvents->AdminSearchWhereClause($SearchWords); } else { $where = ""; } $UserTable = GetTablePrefix()."PortalUser"; $EventTable = GetTablePrefix()."Events"; $MessageTable = GetTablePrefix()."EmailMessage"; $sql = "SELECT e.Description as Description, e.Module as Module, e.EventId as EventId, "; $sql .="ELT(e.Enabled+1,'".admin_language("la_Text_Disabled")." ','".admin_language("la_Text_Enabled")." ', '".admin_language("la_Text_FrontOnly")." ') as EventStatus, "; $sql .="ELT(e.Type+1,'".admin_language("la_Text_User")." ','".admin_language("la_Text_Admin")." ') as EventType, "; $sql .="u.Login as FromUser FROM $EventTable as e LEFT JOIN $UserTable as u ON (e.FromUserId=u.PortalUserId) "; $FullWhere = ""; if(strlen($where)) { $FullWhere = "WHERE $where "; } if(strlen($MsgFilter)) { if(!strlen($FullWhere)) { $FullWhere = "WHERE $MsgFilter "; } else $FullWhere .= " AND ($MsgFilter) "; } $sql .= $FullWhere; if(strlen($objConfig->Get($SortFieldVar))) $sql .= "ORDER BY ".$order." "; if(isset($_GET["lpn"])) $objSession->SetVariable($CurrentPageVar,$_GET["lpn"]); $sql .= GetLimitSQL($objSession->GetVariable($CurrentPageVar),$objConfig->Get($PerPageVar)); //echo $sql; $objEvents->Query_Item($sql); $itemcount = TableCount($objEvents->SourceTable, $where,0); if($objSession->HasSystemPermission("DEBUG.LIST")) echo htmlentities($sql,ENT_NOQUOTES)."<br>\n"; /* ---------------------------------------- Configure the list view ---------------------------------------- */ $objListView = new clsListView($objListToolBar,$objEvents); $objListView->IdField = "EventId"; $order = $objConfig->Get("LangEmail_LV_SortField"); $objListView->ColumnHeaders->Add("Description",admin_language("la_prompt_Description"),1,0,$order,"width=\"50%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","Description"); $objListView->ColumnHeaders->Add("Module",admin_language("la_prompt_Module"),1,0,$order,"width=\"15%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","Module"); $objListView->ColumnHeaders->Add("EventType",admin_language("la_prompt_Type"),1,0,$order,"width=\"10%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","EventType"); $objListView->ColumnHeaders->Add("EventStatus",admin_language("la_prompt_Status"),1,0,$order,"width=\"10%\"","LangEmail_LV_SortField","LangEmail_LV_SortOrder","EventStatus"); //$objListView->ColumnHeaders->Add("FromUser",admin_language("la_prompt_FromUser"),1,0,$order,"width=\"15%\"","Email_LV_SortField","Email_LV_SortOrder","FromUser"); $objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar)); $objListView->PrintToolBar = FALSE; $objListView->checkboxes = TRUE; $objListView->CurrentPageVar = $CurrentPageVar; $objListView->PerPageVar = $PerPageVar; $objListView->CheckboxName = "itemlist[]"; $objListView->SearchBar = TRUE; $objListView->SearchKeywords = $SearchWords; $objListView->SearchAction="m_langemailevent_search"; $objListView->TotalItemCount = $itemcount; $objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField, $CurrentFilterVar,$MsgView,$Bit_All); foreach($FilterLabels as $Bit=>$Label) { $objListView->AddViewMenuFilter($Label,$Bit); } for($i=0;$i<count($objEvents->Items);$i++) { $e =& $objEvents->GetItemRefByIndex($i); $e->Set("Description",prompt_language($e->Get("Description"))); } $filter = false; // always initialize variables before use if($objSession->GetVariable("LangEmailEventSearchWord") != '') { $filter = true; } else { if ($MsgView != $Bit_All) { $filter = true; } } $title = $title = GetTitle("la_Text_Pack", "la_tab_EmailEvents", $c->Get('LanguageId'), $c->Get('LocalName'));///prompt_language("la_Text_Configuration")." - '".$name."' ".prompt_language("la_Text_Pack")." - ".prompt_language("la_tab_EmailEvents"); $h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n"; +define('FORCE_CHARSET', $c->Get("Charset") ); int_header($objListToolBar,NULL, $title,NULL,$h); if ($objSession->GetVariable("HasChanges") == 1) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar"> <tr> <td valign="top"> <?php int_hint_red(admin_language("la_Warning_Save_Item")); ?> </td> </tr> </table> <?php } ?> <?php if ($filter) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar"> <tr> <td valign="top"> <?php int_hint_red(admin_language("la_Warning_Filter")); ?> </td> </tr> </table> <?php } ?> <form name="language" ID="language" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST> <table cellSpacing="0" cellPadding="2" width="100%" class="tableborder"> <tbody> <?php print $objListView->PrintList(); ?> <input type="hidden" NAME="section" VALUE="<?php echo $section; ?>"> <input type="hidden" name="Action" value="m_email_edit"> <input type="hidden" name="LangEditStatus" VALUE="0"> </FORM> <FORM> <TR <?php int_table_color(); ?> > <td colspan="3"> </td> </tr> </FORM> </TABLE> <!-- CODE FOR VIEW MENU --> <form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="viewmenu"> <input type="hidden" name="fieldname" value=""> <input type="hidden" name="varvalue" value=""> <input type="hidden" name="varvalue2" value=""> <input type="hidden" name="Action" value=""> </form> <FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>"> <INPUT TYPE="HIDDEN" NAME="Action" VALUE=""> <INPUT TYPE="HIDDEN" NAME="list_search"> </FORM> <FORM NAME="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="popup"> <INPUT TYPE="HIDDEN" NAME="MessageId" value=""> <INPUT TYPE="HIDDEN" NAME="LanguageId" value=""> <INPUT TYPE="HIDDEN" NAME="Enabled" value=""> <INPUT TYPE="HIDDEN" NAME="Template" value=""> <INPUT TYPE="HIDDEN" NAME="MessageType" value=""> <INPUT TYPE="HIDDEN" NAME="Subscribed" value=""> <INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_edit"> </FORM> <FORM NAME="userpopup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="userpopup"> <INPUT TYPE="HIDDEN" NAME="MessageId" value=""> <INPUT TYPE="HIDDEN" NAME="LanguageId" value="<?php echo $c->Get("LanguageId"); ?>"> <INPUT TYPE="HIDDEN" NAME="FromUserId" value=""> <INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_emailevent_user"> </FORM> <script src="<?php echo $adminURL; ?>/listview/listview.js"></script> <script> initSelectiorContainers(); <?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?> </script> <?php int_footer(); ?> Property changes on: trunk/admin/config/addlang_email.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.5 \ No newline at end of property +1.6 \ No newline at end of property Index: trunk/admin/config/addlang_labels.php =================================================================== --- trunk/admin/config/addlang_labels.php (revision 953) +++ trunk/admin/config/addlang_labels.php (revision 954) @@ -1,439 +1,441 @@ <?php ############################################################## ##In-portal ## ############################################################## ## In-portal ## ## Intechnic Corporation ## ## All Rights Reserved, 1998-2002 ## ## ## ## No portion of this code may be copied, reproduced or ## ## otherwise redistributed without proper written ## ## consent of Intechnic Corporation. Violation will ## ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## if(!strlen($pathtoroot)) { $path=dirname(realpath(__FILE__)); if(strlen($path)) { /* determine the OS type for path parsing */ $pos = strpos($path,":"); if ($pos === false) { $gOS_TYPE="unix"; $pathchar = "/"; } else { $gOS_TYPE="win"; $pathchar="\\"; } $p = $path.$pathchar; /*Start looking for the root flag file */ while(!strlen($pathtoroot) && strlen($p)) { $sub = substr($p,strlen($pathchar)*-1); if($sub==$pathchar) { $filename = $p."root.flg"; } else $filename = $p.$pathchar."root.flg"; if(file_exists($filename)) { $pathtoroot = $p; } else { $parent = realpath($p.$pathchar."..".$pathchar); if($parent!=$p) { $p = $parent; } else $p = ""; } } if(!strlen($pathtoroot)) $pathtoroot = ".".$pathchar; } else { $pathtoroot = ".".$pathchar; } } $sub = substr($pathtoroot,strlen($pathchar)*-1); if($sub!=$pathchar) { $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; require_once($pathtoroot."kernel/startup.php"); //admin only util $rootURL="http://".ThisDomain().$objConfig->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"); $objEditItems->EnablePaging = FALSE; //Multiedit init $en = (int)$_GET["en"]; $objEditItems->Query_Item("SELECT * FROM ".$objEditItems->SourceTable); $itemcount=$objEditItems->NumItems(); $c = $objEditItems->GetItemByIndex($en); $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"; /* -------------------------------------- Section configuration ------------------------------------------- */ $envar = "env=" . BuildEnv() . "&en=$en"; $section = 'in-portal:lang_labels'; $sec = $objSections->GetSection($section); $SortFieldVar = "Phrase_LV_Sortfield"; $SortOrderVar = "Phrase_LV_Sortorder"; $DefaultSortField = "Phrase"; $PerPageVar = "Perpage_Phrase"; $CurrentPageVar = "Page_Phrase"; $CurrentFilterVar = "Lang_View"; $ListForm = "language"; $CheckClass = "LangChecks"; /* ------------------------------------- Configure the toolbar ------------------------------------------- */ $objListToolBar = new clsToolBar(); $objListToolBar->Add("img_save", "la_Save","#","swap('img_save','toolbar/tool_select_f2.gif');", "swap('img_save', 'toolbar/tool_select.gif');","do_edit_save('language','LangEditStatus','".$admin."/config/config_lang.php',1);","tool_select.gif"); $objListToolBar->Add("img_cancel", "la_Cancel","#","swap('img_cancel','toolbar/tool_cancel_f2.gif');", "swap('img_cancel', 'toolbar/tool_cancel.gif');","do_edit_save('language','LangEditStatus','".$admin."/config/config_lang.php',2);",$imagesURL."/toolbar/tool_cancel.gif"); $objListToolBar->Set("section",$section); $objListToolBar->Set("load_menu_func",""); $objListToolBar->Set("CheckClass",$CheckClass); $objListToolBar->Set("CheckForm",$ListForm); 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&lpn=1"; $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&lpn=1"; $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"); } } $listImages = array(); //$img, $alt, $link, $onMouseOver, $onMouseOut, $onClick $objListToolBar->Add("new_label", "la_ToolTip_New_label","#","swap('new_label','toolbar/tool_new_language_var_f2.gif');", "swap('new_label', 'toolbar/tool_new_language_var.gif');", "OpenPhraseEditor('&destform=popup&LanguageId=".$c->Get("LanguageId")."');", "tool_new_language_var.gif"); $objListToolBar->Add("label_edit","la_ToolTip_Edit","#", "if (LangChecks.itemChecked()) swap('label_edit','toolbar/tool_edit_f2.gif');", "if (LangChecks.itemChecked()) swap('label_edit', 'toolbar/tool_edit.gif');", "if (LangChecks.itemChecked()) EditPhrase();", "tool_edit.gif",TRUE,TRUE); $listImages[] = "LangChecks.addImage('label_edit','$imagesURL/toolbar/tool_edit.gif','$imagesURL/toolbar/tool_edit_f3.gif',1); "; $objListToolBar->Add("label_del","la_ToolTip_Delete","#", "if (LangChecks.itemChecked()) swap('label_del','toolbar/tool_delete_f2.gif');", "if (LangChecks.itemChecked()) swap('label_del', 'toolbar/tool_delete.gif');","if (LangChecks.itemChecked()) LangChecks.check_submit('addlang_labels', 'm_phrase_delete');", "tool_delete.gif",FALSE,TRUE); $listImages[] = "LangChecks.addImage('label_del','$imagesURL/toolbar/tool_delete.gif','$imagesURL/toolbar/tool_delete_f3.gif',1); "; $objListToolBar->Add("divider"); $objListToolBar->Add("viewmenubutton", "la_ToolTip_View","#","swap('viewmenubutton','toolbar/tool_view_f2.gif'); ", "swap('viewmenubutton', 'toolbar/tool_view.gif');", "ShowViewMenu();","tool_view.gif"); $objListToolBar->AddToInitScript($listImages); $objListToolBar->AddToInitScript("fwLoadMenus();"); $CurrentLangId = $c->Get("LanguageId"); /* ----------------------------------------- Set the View Filter ---------------------------------------- */ /* bit place holders for view menu */ $Bit_Front=1; $Bit_Admin=2; $Bit_Both = 4; $Bit_All = 7; $FilterLabels = array(); $FilterLabels[0] = admin_language("la_Text_Front"); $FilterLabels[1] = admin_language("la_Text_Admin"); $FilterLabels[2] = admin_language("la_Text_Both"); if(!is_object($objThemeList)) { $objThemeList = new clsThemeList(); } if($objThemeList->NumItems()==0) $objThemeList->LoadThemes(); /* determine current view menu settings */ $LangView = $objConfig->Get($CurrentFilterVar); if(!is_numeric($LangView)) { $LangView = $Bit_All; //Set all bits ON $LangFilter = ""; } if($LangView & $Bit_Both) $Status[] = 2; if($LangView & $Bit_Admin) $Status[] = 1; if($LangView & $Bit_Front) $Status[] = 0; if(count($Status)>0) { $LangFilter = "p.PhraseType IN (".implode(",",$Status).")"; } else $LangFilter = "p.PhraseType = -1"; $objPhrases = new clsPhraseList(); $objPhrases->SourceTable = $objSession->GetEditTable("Phrase"); $order = trim($objConfig->Get($SortFieldVar)." ".$objConfig->Get($SortOrderVar)); $SearchWords = $objSession->GetVariable("PhraseSearchWord"); if(strlen($SearchWords)) { $where = $objPhrases->AdminSearchWhereClause($SearchWords); } else $where = ""; $primary = $objLanguages->GetPrimary(); /* ------------------------------------ Build the SQL statement to populate the list ---------------------------*/ $ptable = GetTablePrefix()."Phrase"; $sql = "SELECT distinct(p.Phrase) as Phrase,p.Translation as Translation,ELT(p.PhraseType+1,'".admin_language("la_Text_Front")."','".admin_language("la_Text_Admin")."','".admin_language("la_Text_Both")."') as Type, "; $sql .="pri.Translation as PrimaryValue, p.PhraseId as PhraseId "; $sql .= "FROM ".$objPhrases->SourceTable." as p LEFT JOIN $ptable as pri ON (p.Phrase=pri.Phrase AND pri.LanguageId=1) WHERE p.LanguageId=".$c->Get("LanguageId")." "; if(strlen($where)) $sql .= "AND ".$where." "; if(strlen($LangFilter)) { $sql .= " AND $LangFilter "; } if(strlen($order)) $sql .= "ORDER BY ".$order." "; if(isset($_GET["lpn"])) $objSession->SetVariable($CurrentPageVar,$_GET["lpn"]); $sql .= GetLimitSQL($objSession->GetVariable($CurrentPageVar),$objConfig->Get($PerPageVar)); //echo $sql; $objPhrases->Query_Item($sql); $itemcount = QueryCount($sql); if($objSession->HasSystemPermission("DEBUG.LIST")) echo htmlentities($sql,ENT_NOQUOTES)."<br>\n"; /* ---------------------------------------- Configure the list view ---------------------------------------- */ $objListView = new clsListView($objListToolBar,$objPhrases); $objListView->IdField = "PhraseId"; $order = $objConfig->Get($SortOrderVar); $objListView->ColumnHeaders->Add("Phrase",admin_language("la_prompt_Label"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"Phrase"); $objListView->ColumnHeaders->Add("Translation",admin_language("la_prompt_Value"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"Translation"); $objListView->ColumnHeaders->Add("PrimaryValue",admin_language("la_prompt_PrimaryValue"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"PrimaryValue"); $objListView->ColumnHeaders->Add("Type",admin_language("la_prompt_Type"),1,0,$order,"width=\"30%\"",$SortFieldVar,$SortOrderVar,"Type"); $objListView->ColumnHeaders->SetSort($objConfig->Get($SortFieldVar), $objConfig->Get($SortOrderVar)); $objListView->PrintToolBar = FALSE; $objListView->checkboxes = TRUE; $objListView->CurrentPageVar = $CurrentPageVar; $objListView->PerPageVar = $PerPageVar; $objListView->CheckboxName = "itemlist[]"; $objListView->SearchBar = TRUE; $objListView->SearchKeywords = $SearchWords; $objListView->SearchAction="m_phrase_search"; $objListView->TotalItemCount = $itemcount; $objListView->ConfigureViewMenu($SortFieldVar,$SortOrderVar,$DefaultSortField, $CurrentFilterVar,$LangView,$Bit_All); foreach($FilterLabels as $Bit=>$Label) { $objListView->AddViewMenuFilter($Label,$Bit); } for($i=0;$i<count($objPhrases->Items);$i++) { $objListView->RowIcons[] = $objPhrases->Items[$i]->AdminIcon(); } $filter = false; // always initialize variables before use if($objSession->GetVariable("PhraseSearchWord") != '') { $filter = true; } else { if ($LangView != $Bit_All) { $filter = true; } } $title = $title = GetTitle("la_Text_Pack", "la_tab_Labels", $c->Get('LanguageId'), $c->Get('LocalName'));///admin_language("la_Text_Configuration")." - '".$name."' ".admin_language("la_Text_Pack")." - ".admin_language("la_tab_Labels")." ($itemcount)"; $h = "\n\n<SCRIPT Language=\"JavaScript1.2\">\n".$objListView->GetViewMenu($imagesURL)."\n</SCRIPT>\n"; + +define('FORCE_CHARSET', $c->Get("Charset") ); int_header($objListToolBar,NULL, $title,NULL,$h); if ($objSession->GetVariable("HasChanges") == 1) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar"> <tr> <td valign="top"> <?php int_hint_red(admin_language("la_Warning_Save_Item")); ?> </td> </tr> </table> <?php } ?> <?php if ($filter) { ?> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="toolbar"> <tr> <td valign="top"> <?php int_hint_red(admin_language("la_Warning_Filter")); ?> </td> </tr> </table> <?php } ?> <form name="language" ID="language" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST> <table cellSpacing="0" cellPadding="2" width="100%" class="tableborder"> <tbody> <?php print $objListView->PrintList(); ?> <input type="hidden" NAME="section" VALUE="<?php echo $section; ?>"> <input type="hidden" name="Action" value="m_config_phrase"> <input type="hidden" name="LangEditStatus" VALUE="0"> </FORM> </TABLE> <!-- CODE FOR VIEW MENU --> <form ID="viewmenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="viewmenu"> <input type="hidden" name="fieldname" value=""> <input type="hidden" name="varvalue" value=""> <input type="hidden" name="varvalue2" value=""> <input type="hidden" name="Action" value=""> </form> <!-- CODE FOR TEMPLATE MENU --> <form ID="templatemenu" method="post" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" name="templatemenu"> <input type="hidden" name="fieldname" value=""> <input type="hidden" name="varvalue" value=""> <input type="hidden" name="varvalue2" value=""> <input type="hidden" name="Action" value=""> </form> <FORM ID="ListSearchForm" NAME="ListSearchForm" method="POST" action="<?php echo $_SERVER["PHP_SELF"]."?env=".BuildEnv(); ?>"> <INPUT TYPE="HIDDEN" NAME="Action" VALUE=""> <INPUT TYPE="HIDDEN" NAME="list_search"> </FORM> <FORM NAME="popup" METHOD="POST" ACTION="<?php echo $_SERVER["PHP_SELF"]."?".$envar; ?>" ID="popup"> <INPUT TYPE="HIDDEN" NAME="phrase" value=""> <INPUT TYPE="HIDDEN" NAME="languageid" value=""> <INPUT TYPE="HIDDEN" NAME="phraseid" value=""> <INPUT TYPE="HIDDEN" NAME="phrasetype" value=""> <INPUT TYPE="HIDDEN" NAME="transvalue" value=""> <INPUT TYPE="HIDDEN" NAME="Action" VALUE="m_phrase_edit"> </FORM> <script src="<?php echo $adminURL; ?>/listview/listview.js"></script> <script> initSelectiorContainers(); <?php echo $objListToolBar->Get("CheckClass").".setImages();"; ?> function EditPhrase() { if(LangChecks.countChecks() > 0) { var retval = LangChecks.getItemList(); OpenPhraseEditor('&destform=popup&PhraseId='+retval); } } </script> <?php int_footer(); ?> Property changes on: trunk/admin/config/addlang_labels.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: trunk/admin/config/edit_label.php =================================================================== --- trunk/admin/config/edit_label.php (revision 953) +++ trunk/admin/config/edit_label.php (revision 954) @@ -1,337 +1,351 @@ <?php ############################################################## ##In-portal ## ############################################################## ## In-portal ## ## Intechnic Corporation ## ## All Rights Reserved, 1998-2002 ## ## ## ## No portion of this code may be copied, reproduced or ## ## otherwise redistributed without proper written ## ## consent of Intechnic Corporation. Violation will ## ## result in revocation of the license and support ## ## privileges along maximum prosecution allowed by law. ## ############################################################## if(!strlen($pathtoroot)) { $path=dirname(realpath(__FILE__)); if(strlen($path)) { /* determine the OS type for path parsing */ $pos = strpos($path,":"); if ($pos === false) { $gOS_TYPE="unix"; $pathchar = "/"; } else { $gOS_TYPE="win"; $pathchar="\\"; } $p = $path.$pathchar; /*Start looking for the root flag file */ while(!strlen($pathtoroot) && strlen($p)) { $sub = substr($p,strlen($pathchar)*-1); if($sub==$pathchar) { $filename = $p."root.flg"; } else $filename = $p.$pathchar."root.flg"; if(file_exists($filename)) { $pathtoroot = $p; } else { $parent = realpath($p.$pathchar."..".$pathchar); if($parent!=$p) { $p = $parent; } else $p = ""; } } if(!strlen($pathtoroot)) $pathtoroot = ".".$pathchar; } else { $pathtoroot = ".".$pathchar; } } $sub = substr($pathtoroot,strlen($pathchar)*-1); if($sub!=$pathchar) { $pathtoroot = $pathtoroot.$pathchar; } //echo $pathtoroot; require_once($pathtoroot."kernel/startup.php"); //admin only util $rootURL="http://".ThisDomain().$objConfig->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 "<SCRIPT language=\"JavaScript\">\n"; echo " if(window.opener) window.opener.location=window.opener.location;\n"; echo " window.close();"; echo "</SCRIPT>"; die(); } $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(); $sql = "SELECT PhraseId FROM ".$objSession->GetEditTable("Phrase"); 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); ?> <form name="frmPhrase" ID="frmPhrase" action="<?php echo $_SERVER["PHP_SELF"]."?".$envar;?>" method=POST> <TABLE cellSpacing="0" cellPadding="2" width="100%" class="tableborder"> <?php if( !isset($objPhraseList) || !is_object($objPhraseList) ) { $objPhraseList = new clsPhraseList(); } if(!$EditDirect) { $objPhraseList->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 "<pre>"; print_r($p); echo "</pre>"; 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 "<TR ".int_table_color_ret()." >\n"; echo " <TD>".admin_language("la_prompt_PhraseId")."</TD>\n"; echo " <TD>".$p->Get("PhraseId")."</TD>\n"; echo " <TD></TD>\n"; echo "</TR>\n"; echo "<TR ".int_table_color_ret()." >\n"; echo " <TD>".admin_language("la_prompt_Label")."</TD>\n"; echo " <TD><input size=60 type=text tabindex=\"1\" ValidationType=\"exists\" NAME=\"name[".$p->Get("PhraseId")."]\" VALUE=\"".inp_htmlize($p->Get("Phrase"))."\"></TD>\n"; echo " <TD></TD>\n"; echo "</TR>\n"; echo "<TR ".int_table_color_ret()." >\n"; echo " <TD>".admin_language("la_prompt_Value")."</TD>\n"; echo " <TD><input size=60 type=text tabindex=\"2\" ValidationType=\"exists\" NAME=\"translation[".$p->Get("PhraseId")."]\" VALUE=\"".inp_htmlize($p->Get("Translation"))."\"></TD>\n"; echo " <TD></TD>\n"; echo "</TR>\n"; echo "<TR ".int_table_color_ret()." >\n"; echo " <TD>".admin_language("la_prompt_PhraseType")."</TD>\n"; echo " <TD COLSPAN=2>\n"; echo " <input type=radio tabindex=\"3\" NAME=\"phrasetype[".$p->Get("PhraseId")."]\" VALUE=\"0\""; if($p->Get("PhraseType")==0) echo "CHECKED"; echo ">"; echo admin_language("la_Text_Front"); echo " <input type=radio tabindex=\"3\" NAME=\"phrasetype[".$p->Get("PhraseId")."]\" VALUE=\"1\""; if($p->Get("PhraseType")==1) echo "CHECKED"; echo ">"; echo admin_language("la_Text_Admin"); echo " <input type=radio tabindex=\"3\" NAME=\"phrasetype[".$p->Get("PhraseId")."]\" VALUE=\"2\""; if($p->Get("PhraseType")==2) echo "CHECKED"; echo ">"; echo admin_language("la_Text_Both"); echo " </TD>\n"; echo "</TR>\n"; unset($p); } } ?> <?php if(strlen($NewLabel)>0) { "::".$PriTrans = GetPrimaryTranslation($NewLabel); } else { $PriTrans = ''; } ?> <?php if ( !GetVar('PhraseId') ) { ?> <?php int_subsection_title(admin_language("la_tab_General")." :: New Phrase ".$PriTrans); ?> <TR <?php int_table_color(); ?> > <td><?php echo admin_language("la_prompt_Label"); ?></td> <td><input type=text size=60 tabindex="4" NAME="name[0]" VALUE="<?php $names = GetVar('name'); if($names !== false) echo $names[0]; ?>"></td> <td></td> </tr> <TR <?php int_table_color(); ?> > <td><?php echo admin_language("la_prompt_Value"); ?></td> <td><input type=text size=60 tabindex="5" NAME="translation[0]" VALUE="<?php $traslations = GetVar('translation'); if($traslations !== false) echo $traslations[0]; ?>"></td> <td></td> </tr> <TR <?php int_table_color(); ?> > <TD><?php echo admin_language("la_prompt_PhraseType"); ?></TD> <TD COLSPAN=2> <input type=radio tabindex="6" NAME="phrasetype[0]" VALUE="0"> <?php echo admin_language("la_Text_Front"); ?> <input type=radio tabindex="6" NAME="phrasetype[0]" VALUE="1"> <?php echo admin_language("la_Text_Admin"); ?> <input type=radio tabindex="6" NAME="phrasetype[0]" VALUE="2"> <?php echo admin_language("la_Text_Both"); ?> </TD> </tr> <tr> <td colspan="3" align="center"><font color="#FF0000"><?php if( isset($add_error) ) echo $add_error; ?></font></td> </tr> <INPUT type=hidden name="Action1" VALUE="new"> <?php } ?> <INPUT TYPE=HIDDEN NAME="LanguageId" VALUE="<?php echo $LangId; ?>"> <INPUT type=hidden name="Action" VALUE="m_phrase_edit"> <input type=hidden name="direct" VALUE="<?php echo $EditDirect; ?>"> </FORM> </TABLE> <?php int_footer(); ?> Property changes on: trunk/admin/config/edit_label.php ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property