1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Lancheck Administration area - ready

This commit is contained in:
secretr
2008-12-15 21:16:32 +00:00
parent eb8ebadaf7
commit a03d9c5019
8 changed files with 312 additions and 167 deletions

View File

@@ -1,21 +1,19 @@
<?php <?php
/* /*
+ ----------------------------------------------------------------------------+ * e107 website system
| e107 website system *
| * Copyright (C) 2001-2008 e107 Inc (e107.org)
| <20>Steve Dunstan 2001-2002 * Released under the terms and conditions of the
| http://e107.org * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
| jalist@e107.org *
| * Administration Area - Language check
| Released under the terms and conditions of the * With code from Izydor and Lolo.
| GNU General Public License (http://gnu.org). *
| * $Source: /cvs_backup/e107_0.8/e107_admin/lancheck.php,v $
| $Source: /cvs_backup/e107_0.8/e107_admin/lancheck.php,v $ * $Revision: 1.11 $
| $Revision: 1.10 $ * $Date: 2008-12-15 21:16:31 $
| $Date: 2008-11-20 20:34:44 $ * $Author: secretr $
| $Author: e107steved $ *
| With code from Izydor and Lolo.
+----------------------------------------------------------------------------+
*/ */
require_once("../class2.php"); require_once("../class2.php");
if (!getperms("0")) { if (!getperms("0")) {
@@ -24,6 +22,11 @@ if (!getperms("0")) {
} }
$e_sub_cat = 'language'; $e_sub_cat = 'language';
require_once("auth.php"); require_once("auth.php");
require_once(e_HANDLER."message_handler.php");
require_once(e_HANDLER."form_handler.php");
$frm = new e_form();
$emessage = &eMessage::getInstance();
$qry = explode("|",e_QUERY); $qry = explode("|",e_QUERY);
$f = $qry[0]; $f = $qry[0];
@@ -64,16 +67,19 @@ if(isset($_POST['submit']))
{ {
// create CVS compatible description. // create CVS compatible description.
$diz = chr(47)."*\n"; $diz = chr(47)."*\n";
$diz .= "+---------------------------------------------------------------+\n"; $diz .= " * e107 website system\n";
$diz .= "| e107 website system ".$lan." Language File\n"; $diz .= " *\n";
$diz .= "| Released under the terms and conditions of the\n"; $diz .= " * Copyright (C) 2001-2008 e107 Inc (e107.org)\n";
$diz .= "| GNU General Public License (http://gnu.org).\n"; $diz .= " * Released under the terms and conditions of the\n";
$diz .= "|\n"; $diz .= " * GNU General Public License (http://www.gnu.org/licenses/gpl.txt)\n";
$diz .= "| ".chr(36)."Source: $writeit ".chr(36)."\n"; $diz .= " *\n";
$diz .= "| ".chr(36)."Revision: 1.0 ".chr(36)."\n"; $diz .= " * Language File\n";
$diz .= "| ".chr(36)."Date: ".date("Y/m/d H:i:s")." ".chr(36)."\n"; $diz .= " *\n";
$diz .= "| ".chr(36)."Author: ".USERNAME." ".chr(36)."\n"; $diz .= " * ".chr(36)."Source: ".str_replace(array(e_LANGUAGEDIR, e_PLUGIN), array(e_LANGUAGEDIR_ABS, e_PLUGIN_ABS), $writeit)." ".chr(36)."\n";
$diz .= "+---------------------------------------------------------------+\n"; $diz .= " * ".chr(36)."Revision: 1.0 ".chr(36)."\n";
$diz .= " * ".chr(36)."Date: ".date("Y/m/d H:i:s")." ".chr(36)."\n";
$diz .= " * ".chr(36)."Author: ".USERNAME." ".chr(36)."\n";
$diz .= " *\n";
$diz .= "*".chr(47)."\n\n"; $diz .= "*".chr(47)."\n\n";
} }
else else
@@ -123,22 +129,26 @@ if(isset($_POST['submit']))
$fp = @fopen($writeit,"w"); $fp = @fopen($writeit,"w");
if(!@fwrite($fp, $input)) if(!@fwrite($fp, $input))
{ {
$caption = LAN_ERROR; $caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_ERROR;
$message = LAN_CHECK_17; $message = '';
$emessage->add(LAN_CHECK_17, E_MESSAGE_ERROR);
} }
else else
{ {
$caption = LAN_SAVED." <b>$lan/".$writeit."</b>"; $caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24;
$emessage->add(sprintf(LAN_CHECK_23, basename($writeit)), E_MESSAGE_SUCCESS);
} }
fclose($writeit); fclose($writeit);
$message .= "<form method='post' action='".e_SELF."' id='select_lang'> $message .= "
<div style='text-align:center'><br />"; <form method='post' action='".e_SELF."' id='core-lancheck-save-file-form'>
$message .= "<br /><br /><input class='button' type='submit' name='language_sel' value=\"".LAN_BACK."\" /> <div class='center'>
<input type='hidden' name='language' value='$lan' /></div></form>"; ".$frm->admin_button('language_sel', LAN_BACK)."
".$frm->hidden('language', $lan)."
</div>
</form>";
$e107->ns->tablerender($caption, $emessage->render().$message);
$ns -> tablerender($caption, $message);
require_once(e_ADMIN."footer.php"); require_once(e_ADMIN."footer.php");
exit; exit;
} }
@@ -174,98 +184,154 @@ if($f != ""){
// =========================================================================== // ===========================================================================
$core_plugins = array( $core_plugins = array(
"alt_auth","banner_menu","blogcalendar_menu","calendar_menu","chatbox_menu", "alt_auth","banner_menu","blogcalendar_menu","calendar_menu","chatbox_menu",
"clock_menu","comment_menu","content","featurebox","forum","gsitemap", "clock_menu","comment_menu","content","featurebox","forum","gsitemap",
"links_page","linkwords","list_new","log","login_menu","newforumposts_main", "links_page","linkwords","list_new","log","login_menu","newforumposts_main",
"newsfeed","newsletter","online","other_news_menu","pdf","pm","poll", "newsfeed","newsletter","online","other_news_menu","pdf","pm","poll",
"rss_menu","search_menu","siteinfo_menu","trackback","tree_menu","user_menu" "rss_menu","search_menu","siteinfo_menu","trackback","tree_menu","user_menu"
); );
$core_themes = array("crahan","e107v4a","human_condition","interfectus","jayya", $core_themes = array("crahan","e107v4a","human_condition","interfectus","jayya",
"khatru","kubrick","lamb","leaf","reline","sebes","vekna_blue"); "khatru","kubrick","lamb","leaf","reline","sebes","vekna_blue","_blank");
if(isset($_POST['language_sel']) && isset($_POST['language'])){ if(isset($_POST['language_sel']) && isset($_POST['language']))
{
$ns -> tablerender(LAN_CHECK_3.": ".$_POST['language'],check_core_lanfiles($_POST['language'])); $text = check_core_lanfiles($_POST['language']).check_core_lanfiles($_POST['language'],"admin/");
$ns -> tablerender(LAN_CHECK_3.": ".$_POST['language']."/admin",check_core_lanfiles($_POST['language'],"admin/"));
$plug_text = "<table class='fborder' style='".ADMIN_WIDTH."'> $text .= "
<tr> <fieldset id='core-lancheck-plugin'>
<td class='fcaption'>".LAN_PLUGIN."</td> <legend>".ADLAN_CL_7."</legend>
<td class='fcaption'>".LAN_CHECK_16."</td> <table cellpadding='0' cellspacing='0' class='adminlist'>
<td class='fcaption'>".$_POST['language']."</td> <colgroup span='4'>
<td class='fcaption'>".LAN_OPTIONS."</tr>"; <col style='width: 25%'></col>
<col style='width: 25%'></col>
<col style='width: 40%'></col>
<col style='width: 10%'></col>
</colgroup>
<thead>
<tr>
<th>".LAN_PLUGIN."</th>
<th>".LAN_CHECK_16."</th>
<th>".$_POST['language']."</th>
<th class='center last'>".LAN_OPTIONS."</th>
</tr>
</thead>
<tbody>
";
foreach($core_plugins as $plugs) foreach($core_plugins as $plugs)
{ {
if(is_readable(e_PLUGIN.$plugs)) if(is_readable(e_PLUGIN.$plugs))
{ {
$plug_text .= check_lanfiles('P',$plugs,"English",$_POST['language']); $text .= check_lanfiles('P',$plugs,"English",$_POST['language']);
} }
} }
$plug_text .= "</table>"; $text .= "
$ns -> tablerender(ADLAN_CL_7,$plug_text); </tbody>
</table>
</fieldset>
";
$theme_text = "<table class='fborder' style='".ADMIN_WIDTH."'> $text .= "
<tr> <fieldset id='core-lancheck-theme'>
<td class='fcaption'>".LAN_CHECK_21."</td> <legend>".LAN_CHECK_22."</legend>
<td class='fcaption'>".LAN_CHECK_16."</td> <table cellpadding='0' cellspacing='0' class='adminlist'>
<td class='fcaption'>".$_POST['language']."</td> <colgroup span='4'>
<td class='fcaption'>".LAN_OPTIONS."</tr>"; <col style='width: 25%'></col>
<col style='width: 25%'></col>
<col style='width: 40%'></col>
<col style='width: 10%'></col>
</colgroup>
<thead>
<tr>
<th>".LAN_CHECK_21."</th>
<th>".LAN_CHECK_16."</th>
<th>".$_POST['language']."</th>
<th class='center last'>".LAN_OPTIONS."</th>
</tr>
</thead>
<tbody>
";
foreach($core_themes as $them) foreach($core_themes as $them)
{ {
if(is_readable(e_THEME.$them)) if(is_readable(e_THEME.$them))
{ {
$theme_text .= check_lanfiles('T',$them,"English",$_POST['language']); $text .= check_lanfiles('T',$them,"English",$_POST['language']);
} }
} }
$theme_text .= "</table>"; $text .= "
</tbody>
</table>
</fieldset>
";
$ns -> tablerender(LAN_CHECK_22,$theme_text); $ns->tablerender(LAN_CHECK_25, $text);
require_once(e_ADMIN."footer.php"); require_once(e_ADMIN."footer.php");
exit; exit;
} }
function check_core_lanfiles($checklan,$subdir=''){ function check_core_lanfiles($checklan,$subdir=''){
global $lanfiles,$_POST; global $frm;
$English = get_comp_lan_phrases(e_LANGUAGEDIR."English/".$subdir,$checklan); $English = get_comp_lan_phrases(e_LANGUAGEDIR."English/".$subdir,$checklan);
$check = get_comp_lan_phrases(e_LANGUAGEDIR.$checklan."/".$subdir,$checklan); $check = get_comp_lan_phrases(e_LANGUAGEDIR.$checklan."/".$subdir,$checklan);
$legend_txt = LAN_CHECK_3.": ".$_POST['language']."/".$subdir;
$text .= "<table class='fborder' style='".ADMIN_WIDTH."'> $fieldset_id = $subdir ? str_replace('/', '', $_POST['language'])."-".str_replace('/', '', $subdir) : str_replace('/', '', $_POST['language']);
<tr> $text .= "
<td class='fcaption'>".LAN_CHECK_16."</td> <fieldset id='core-lancheck-{$fieldset_id}'>
<td class='fcaption'>".$_POST['language'].' '.LAN_CHECK_20."</td> <legend>{$legend_txt}</legend>
<td class='fcaption'>".LAN_OPTIONS."</tr>"; <table cellpadding='0' cellspacing='0' class='adminlist'>
<colgroup span='3'>
<col style='width: 50%'></col>
<col style='width: 40%'></col>
<col style='width: 10%'></col>
</colgroup>
<thead>
<tr>
<th>".LAN_CHECK_16."</th>
<th>".$_POST['language'].' '.LAN_CHECK_20."</th>
<th class='center last'>".LAN_OPTIONS."</th>
</tr>
</thead>
<tbody>
";
$keys = array_keys($English); $keys = array_keys($English);
sort($keys); sort($keys);
$i = 0;
foreach($keys as $k) foreach($keys as $k)
{ {
if($k != "bom") if($k != "bom")
{ {
$lnk = $k; $lnk = $k;
$k_check = str_replace("English",$checklan,$k); $k_check = str_replace("English",$checklan,$k);
$text .= "
<tr>
";
if(array_key_exists($k,$check)) if(array_key_exists($k,$check))
{ {
$text .= "<tr><td class='forumheader3' style='width:45%'>{$lnk}</td>"; $text .= "
<td>{$lnk}</td>
";
$subkeys = array_keys($English[$k]); $subkeys = array_keys($English[$k]);
$er=""; $er="";
$utf_error = ""; $utf_error = "";
$bomkey = str_replace(".php","",$k_check); $bomkey = str_replace(".php","",$k_check);
$bom_error = ($check['bom'][$bomkey]) ? "<i>".LAN_CHECK_15."</i><br />" : ""; // illegal chars $bom_error = ($check['bom'][$bomkey]) ? "<span class='error'><em>".LAN_CHECK_15."</em></span><br />" : ""; // illegal chars
foreach($subkeys as $sk) foreach($subkeys as $sk)
{ {
if($utf_error == "" && !is_utf8($check[$k][$sk])) if($utf_error == "" && !is_utf8($check[$k][$sk]))
{ {
$utf_error = "<i>".LAN_CHECK_19."</i><br />"; $utf_error = "<span class='error'><em>".LAN_CHECK_19."</em></span><br />";
} }
if($sk == "LC_ALL"){ if($sk == "LC_ALL"){
@@ -280,27 +346,46 @@ function check_core_lanfiles($checklan,$subdir=''){
} }
} }
$style = ($er) ? "forumheader2" : "forumheader3"; $style = ($er) ? "warning" : "success";
$text .= "<td class='{$style}' style='width:50%'><div class='smalltext'>"; $text .= "
<td class='{$style}' style='width:50%'>
<div class='smalltext'>
";
$text .= $bom_error . $utf_error; $text .= $bom_error . $utf_error;
$text .= (!$er && !$bom_error && !$utf_error) ? LAN_OK : $er."<br />"; $text .= (!$er && !$bom_error && !$utf_error) ? LAN_OK : $er."<br />";
$text .= "</div></td>"; $text .= "
</div>
</td>
";
} }
else else
{ {
$text .= "<tr> // file missing
<td class='forumheader3' style='width:45%'>{$lnk}</td> $text .= "
<td class='forumheader' style='width:50%'>".LAN_CHECK_4."</td>"; // file missing. <td>{$lnk}</td>
<td><span class='error'>".LAN_CHECK_4."</span></td>
";
} }
// Leave in EDIT button for all entries - to allow re-translation of bad entries. // Leave in EDIT button for all entries - to allow re-translation of bad entries.
$subpath = ($subdir!='') ? $subdir.$k : $k; $subpath = ($subdir!='') ? $subdir.$k : $k;
$text .="<td class='forumheader3' style='width:5%;text-align:center'> $text .= "
<input class='tbox' type='button' style='width:60px' name='but_$i' value=\"".LAN_EDIT."\" onclick=\"window.location='".e_SELF."?".$subpath."|".$_POST['language']."'\" /> "; <td class='center'>
$text .="</td></tr>"; ".$frm->admin_button('but-corelan-'.str_replace(array('/', '\\'), '-', $subdir).$i, LAN_EDIT, 'edit', '', array('other' => "onclick=\"window.location='".e_SELF."?".$subpath."|".$_POST['language']."'\""))."
";
$text .= "
</td>
</tr>
";
} }
$i++;
} }
$text .= "</table>"; $text .= "
</tbody>
</table>
</fieldset>
";
return $text; return $text;
} }
@@ -382,9 +467,10 @@ function get_comp_lan_phrases($comp_dir,$lang,$depth=0)
} }
// for plugins and themes - checks what kind of language files directory structure we have // for plugins and themes - checks what kind of language files directory structure we have
function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan){ function check_lanfiles($mode, $comp_name, $base_lan="English", $target_lan)
global $ns,$sql; {
global $frm;
$folder['P'] = e_PLUGIN.$comp_name; $folder['P'] = e_PLUGIN.$comp_name;
$folder['T'] = e_THEME.$comp_name; $folder['T'] = e_THEME.$comp_name;
$comp_dir = $folder[$mode]; $comp_dir = $folder[$mode];
@@ -396,29 +482,34 @@ function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan){
$keys = array_keys($baselang); $keys = array_keys($baselang);
sort($keys); sort($keys);
$i = 0;
foreach($keys as $k) foreach($keys as $k)
{ {
$lnk = $k; $lnk = $k;
//echo "klucz ".$k."<br />"; //echo "klucz ".$k."<br />";
$k_check = str_replace("English",$target_lan,$k); $k_check = str_replace("English",$target_lan,$k);
$text .= "
<tr>
";
if(array_key_exists($k_check,$check)) if(array_key_exists($k_check,$check))
{ {
$text .= "<tr> $text .= "
<td class='forumheader3' style='width:20%'>".$comp_name."</td> <td>".$comp_name."</td>
<td class='forumheader3' style='width:25%'>".str_replace("English/","",$lnk)."</td>"; <td>".str_replace("English/","",$lnk)."</td>
";
$subkeys = array_keys($baselang[$k]); $subkeys = array_keys($baselang[$k]);
$er=""; $er = "";
$utf_error = ""; $utf_error = "";
$bomkey = str_replace(".php","",$k_check); $bomkey = str_replace(".php","",$k_check);
$bom_error = ($check['bom'][$bomkey]) ? "<i>".LAN_CHECK_15."</i><br />" : ""; // illegal chars $bom_error = ($check['bom'][$bomkey]) ? "<span class='error'><em>".LAN_CHECK_15."</em></span><br />" : ""; // illegal chars
foreach($subkeys as $sk) foreach($subkeys as $sk)
{ {
if($utf_error == "" && !is_utf8($check[$k_check][$sk])) if($utf_error == "" && !is_utf8($check[$k_check][$sk]))
{ {
$utf_error = "<i>".LAN_CHECK_19."</i><br />"; $utf_error = "<span class='error'><em>".LAN_CHECK_19."</em></span><br />";
} }
if(!array_key_exists($sk,$check[$k_check]) || (trim($check[$k_check][$sk]) == "" && $baselang[$k][$sk] != "")) if(!array_key_exists($sk,$check[$k_check]) || (trim($check[$k_check][$sk]) == "" && $baselang[$k][$sk] != ""))
@@ -428,33 +519,43 @@ function check_lanfiles($mode,$comp_name,$base_lan="English",$target_lan){
} }
} }
$style = ($er) ? "forumheader2" : "forumheader3"; $style = ($er) ? "warning" : "success";
$text .= "<td class='{$style}' style='width:50%'><div class='smalltext'>"; $text .= "
<td class='{$style}' style='width:50%'>
<div class='smalltext'>
";
$text .= $bom_error . $utf_error; $text .= $bom_error . $utf_error;
$text .= (!$er && !$bom_error && !$utf_error) ? LAN_OK : $er."<br />"; $text .= (!$er && !$bom_error && !$utf_error) ? LAN_OK : $er."<br />";
$text .= "</div></td>"; $text .= "
</div>
</td>
";
} }
else else
{ {
$text .= "<tr> $text .= "
<td class='forumheader3' style='width:20%'>".$comp_name."</td> <td>".$comp_name."</td>
<td class='forumheader3' style='width:25%'>".str_replace("English/","",$lnk)."</td> <td>".str_replace("English/","",$lnk)."</td>
<td class='forumheader' style='width:50%'><span style='cursor:pointer' title=\"".str_replace("English",$target_lan,$lnk)."\">".LAN_CHECK_4."</span></td>"; <td><span style='cursor:pointer' title='".str_replace("English",$target_lan,$lnk)."'>".LAN_CHECK_4."</span></td>
";
} }
$text .="<td class='forumheader3' style='width:5%;text-align:center'> $text .="
<input class='tbox' type='button' style='width:60px' name='but_$i' value=\"".LAN_EDIT."\" onclick=\"window.location='".e_SELF."?".$comp_dir."/languages/".$lnk."|".$target_lan."|file'\" /> "; <td class='center'>
$text .="</td></tr>"; ".$frm->admin_button('but-corelan-'.str_replace(array('/', '\\'), '-', $comp_dir).$i, LAN_EDIT, 'edit', '', array('other'=> "onclick=\"window.location='".e_SELF."?".$comp_dir."/languages/".$lnk."|".$target_lan."|file'\""))."
";
$text .="
</td>
</tr>
";
$i++;
} }
// if (!$known) {$text = LAN_CHECK_18." : --> ".$fname." :: ".$dname;}
return $text; return $text;
} }
function edit_lanfiles($dir1,$dir2,$f1,$f2){ function edit_lanfiles($dir1,$dir2,$f1,$f2){
global $ns,$sql,$lan; global $e107, $emessage, $lan;
/* echo "<br />dir1 = $dir1"; /* echo "<br />dir1 = $dir1";
echo "<br />file1 = $f1"; echo "<br />file1 = $f1";
@@ -484,9 +585,25 @@ function edit_lanfiles($dir1,$dir2,$f1,$f2){
$keys = array_keys($trans); $keys = array_keys($trans);
sort($keys); sort($keys);
$text = "<div style='text-align:center'> $text = "
<form method='post' action='".e_SELF."?".e_QUERY."' id='transform'> <form method='post' action='".e_SELF."?".e_QUERY."' id='transform'>
<table style='".ADMIN_WIDTH."' class='fborder'>"; <fieldset id='core-lancheck-edit'>
<legend>".LAN_CHECK_3." ".str_replace(array(e_PLUGIN, e_LANGUAGEDIR), array(e_PLUGIN_ABS, e_LANGUAGEDIR_ABS), $dir2)."{$f2} -&gt; {$lan}</legend>
<table cellpadding='0' cellspacing='0' class='adminlist'>
<colgroup span='3'>
<col style='width: 20%'></col>
<col style='width: 40%'></col>
<col style='width: 40%'></col>
</colgroup>
<thead>
<tr>
<th>&nbsp;</th>
<th>".LAN_CHECK_16."</th>
<th class='last'>Translate to ".$lan."</th>
</tr>
</thead>
<tbody>
";
$subkeys = array_keys($trans['orig']); $subkeys = array_keys($trans['orig']);
foreach($subkeys as $sk) foreach($subkeys as $sk)
@@ -494,58 +611,69 @@ function edit_lanfiles($dir1,$dir2,$f1,$f2){
$rowamount = round(strlen($trans['orig'][$sk])/34)+1; $rowamount = round(strlen($trans['orig'][$sk])/34)+1;
$hglt1=""; $hglt2=""; $hglt1=""; $hglt2="";
if ($trans['tran'][$sk] == "" && $trans['orig'][$sk]!="") { if ($trans['tran'][$sk] == "" && $trans['orig'][$sk]!="") {
$hglt1="<span style='font-style:italic;font-weight:bold;color:red'>"; $hglt1="<span class='error'>";
$hglt2="</span>"; $hglt2="</span>";
} }
$text .="<tr> $text .= "
<td class='forumheader3' style='width:10%;vertical-align:top'>".$hglt1.htmlentities($sk).$hglt2."</td> <tr>
<td class='forumheader3' style='width:40%;vertical-align:top'>".htmlentities(str_replace("ndef++","",$trans['orig'][$sk])) ."</td>"; <td>".$hglt1.htmlentities($sk).$hglt2."</td>
$text .= "<td class='forumheader3' style='width:50%;vertical-align:top'>"; <td>".htmlentities(str_replace("ndef++", "", $trans['orig'][$sk])) ."</td>
$text .= ($writable) ? "<textarea class='tbox' name='newlang[]' rows='$rowamount' cols='45' style='height:100%'>" : ""; <td>
$text .= str_replace("ndef++","",$trans['tran'][$sk]); ".(($writable) ? "<textarea class='tbox' name='newlang[]' rows='{$rowamount}' cols='45'>" : "")
$text .= ($writable) ? "</textarea>" : ""; .str_replace("ndef++","",$trans['tran'][$sk])
.(($writable) ? "</textarea>" : "")."
";
//echo "orig --> ".$trans['orig'][$sk]."<br />"; //echo "orig --> ".$trans['orig'][$sk]."<br />";
if (strpos($trans['orig'][$sk],"ndef++") !== False) if (strpos($trans['orig'][$sk],"ndef++") !== False)
{ {
//echo "+orig --> ".$trans['orig'][$sk]." <> ".strpos($trans['orig'][$sk],"ndef++")."<br />"; //echo "+orig --> ".$trans['orig'][$sk]." <> ".strpos($trans['orig'][$sk],"ndef++")."<br />";
$text .= "<input type='hidden' name='newdef[]' value='ndef++".$sk."' />"; $text .= "
<input type='hidden' name='newdef[]' value='ndef++".$sk."' />
";
} }
else else
{ {
$text .= "<input type='hidden' name='newdef[]' value='".$sk."' />"; $text .= "
<input type='hidden' name='newdef[]' value='".$sk."' />
";
} }
$text .="</td></tr>"; $text .="
</td>
</tr>
";
} }
$text .= "
</tbody>
</table>
";
//Check if directory is writable //Check if directory is writable
if($writable) if($writable)
{ {
$text .="<tr style='vertical-align:top'> $text .="
<td colspan='3' style='text-align:center' class='forumheader'> <div class='buttons-bar center'>
<input class='button' type='submit' name='submit' value=\"".LAN_SAVE." ".str_replace($dir2,"",$root_file)." \" />"; <button class='update' type='submit' name='submit' value='".LAN_SAVE." ".str_replace($dir2,"",$root_file)."'><span>".LAN_SAVE." ".str_replace($dir2,"",$root_file)."</span></button>
".(($root_file) ? "<input type='hidden' name='root' value='".$root_file."' />" : "")."
if($root_file) </div>
{ ";
$text .= "<input type='hidden' name='root' value='".$root_file."' />";
}
$text .= "</td></tr>";
} }
$text .= " $text .= "
</table> </fieldset>
</form> </form>
</div>"; ";
$text .= "<form method='post' action='".e_SELF."' id='select_lang'> $text .= "
<div style='text-align:center'><br />"; <form method='post' action='".e_SELF."' id='select_lang'>
$text .= (!$writable) ? "<br />".$dir2.$f2.LAN_NOTWRITABLE : ""; <div style='text-align:center'>
$text .= "<br /><br /><input class='button' type='submit' name='language_sel' value=\"".LAN_BACK."\" /> ".((!$writable) ? $dir2.$f2.LAN_NOTWRITABLE : "")."
<input type='hidden' name='language' value='$lan' /></div></form>"; <br />
<button class='submit' type='submit' name='language_sel' value='".LAN_BACK."'><span>".LAN_BACK."</span></button>
<input type='hidden' name='language' value='$lan' />
</div>
</form>
";
$e107->ns->tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24, $text);
$caption = LAN_CHECK_3." <b>".$dir2.$f2."</b> -> <b>".$lan."</b>";
$ns -> tablerender($caption, $text);
require_once(e_ADMIN."footer.php"); require_once(e_ADMIN."footer.php");
exit; exit;
@@ -659,19 +787,19 @@ function lancheck_adminmenu() {
$action = "db"; $action = "db";
} }
$var['main']['text'] = LAN_PREFS; $var['main']['text'] = LAN_PREFS;
$var['main']['link'] = e_ADMIN."language.php"; $var['main']['link'] = e_ADMIN_ABS."language.php";
if(isset($pref['multilanguage']) && $pref['multilanguage']){ if(isset($pref['multilanguage']) && $pref['multilanguage']){
$var['db']['text'] = LANG_LAN_03; $var['db']['text'] = LANG_LAN_03;
$var['db']['link'] = e_ADMIN."language.php?db"; $var['db']['link'] = e_ADMIN_ABS."language.php?db";
} }
$var['tools']['text'] = ADLAN_CL_6; $var['tools']['text'] = ADLAN_CL_6;
$var['tools']['link'] = e_ADMIN."language.php?tools"; $var['tools']['link'] = e_ADMIN_ABS."language.php?tools";
show_admin_menu(ADLAN_132, $action, $var); show_admin_menu(ADLAN_132, $action, $var);
} }
$ns -> tablerender(LAN_CHECK_1, 'No data'); $ns -> tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_1, LAN_CHECK_26);
require_once(e_ADMIN."footer.php"); require_once(e_ADMIN."footer.php");

View File

@@ -9,8 +9,8 @@
* Administration Area - Languages * Administration Area - Languages
* *
* $Source: /cvs_backup/e107_0.8/e107_admin/language.php,v $ * $Source: /cvs_backup/e107_0.8/e107_admin/language.php,v $
* $Revision: 1.12 $ * $Revision: 1.13 $
* $Date: 2008-12-15 17:03:25 $ * $Date: 2008-12-15 21:16:31 $
* $Author: secretr $ * $Author: secretr $
* *
*/ */
@@ -28,7 +28,6 @@ require_once("auth.php");
require_once(e_HANDLER."form_handler.php"); require_once(e_HANDLER."form_handler.php");
require_once(e_HANDLER."message_handler.php"); require_once(e_HANDLER."message_handler.php");
$rs = new form;
$frm = new e_form(); $frm = new e_form();
$emessage = &eMessage::getInstance(); $emessage = &eMessage::getInstance();
@@ -454,7 +453,7 @@ function table_list() {
// ------------- render form --------------------------------------------------- // ------------- render form ---------------------------------------------------
function multilang_db(){ function multilang_db(){
global $pref, $e107, $tp, $rs, $frm, $emessage, $lanlist, $tabs; global $pref, $e107, $tp, $frm, $emessage, $lanlist, $tabs;
if(isset($pref['multilanguage']) && $pref['multilanguage']){ if(isset($pref['multilanguage']) && $pref['multilanguage']){

View File

@@ -9,8 +9,8 @@
* Form Handler * Form Handler
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
* $Revision: 1.6 $ * $Revision: 1.7 $
* $Date: 2008-12-12 23:29:32 $ * $Date: 2008-12-15 21:16:32 $
* $Author: secretr $ * $Author: secretr $
* *
*/ */
@@ -165,7 +165,7 @@ class e_form
return "<input class='image' type='image' src='{$image}' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />"; return "<input class='image' type='image' src='{$image}' name='{$name}' value='{$value}'".$this->get_attributes($options, $name, $value)." />";
} }
function admin_button($name, $value, $action = '', $label = '', $options = array()) function admin_button($name, $value, $action = 'submit', $label = '', $options = array())
{ {
$options['class'] = $action; //additional classes in options not allowed $options['class'] = $action; //additional classes in options not allowed
$btype = 'submit'; $btype = 'submit';

View File

@@ -4,9 +4,9 @@
| e107 website system - Language File. | e107 website system - Language File.
| |
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_lancheck.php,v $ | $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_lancheck.php,v $
| $Revision: 1.2 $ | $Revision: 1.3 $
| $Date: 2008-01-08 20:23:00 $ | $Date: 2008-12-15 21:16:32 $
| $Author: e107steved $ | $Author: secretr $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
define("LAN_CHECK_1", "Verify/Edit Language Files"); // modified in 0.7.6 define("LAN_CHECK_1", "Verify/Edit Language Files"); // modified in 0.7.6
@@ -34,5 +34,10 @@ define('LAN_CHECK_20', 'File');
define('LAN_CHECK_21', 'Theme'); define('LAN_CHECK_21', 'Theme');
define('LAN_CHECK_22', 'Themes'); define('LAN_CHECK_22', 'Themes');
define('LAN_CHECK_23', '%s saved');
?> define('LAN_CHECK_PAGE_TITLE', 'Languages');
define('LAN_CHECK_24', 'Edit/Create file');
define('LAN_CHECK_25', 'Language verification');
define('LAN_CHECK_26', 'No data');
?>

View File

@@ -207,7 +207,7 @@ label { cursor: pointer; }
/* message text (overall) */ /* message text (overall) */
.warning { color: #FF6600 } .warning { color: #FF6600 }
.success {} .success { color: green; }
.error { color: #FF0000 } .error { color: #FF0000 }
.info {} .info {}
@@ -307,6 +307,7 @@ input.edit {}
.admin-header-content { border: 1px solid #DDDDDD; } .admin-header-content { border: 1px solid #DDDDDD; }
.admin-page-body { padding: 20px 15px 0; } .admin-page-body { padding: 20px 15px 0; }
.admin-footer {} .admin-footer {}
legend { font-size: 16px; font-weight: bold; }
/******** Layout */ /******** Layout */
.main-table { width: 100%; border: 0 none; } .main-table { width: 100%; border: 0 none; }
@@ -318,7 +319,6 @@ input.edit {}
/******** Horizontal navigation ADMIN_NAV_ALT */ /******** Horizontal navigation ADMIN_NAV_ALT */
.admin-navigation { border: 1px solid #DDDDDD;} .admin-navigation { border: 1px solid #DDDDDD;}
/******** Side Navigation /******** Side Navigation
- Admin Navigation - Admin Navigation
- Plugin Navigation - Plugin Navigation
@@ -339,7 +339,7 @@ ul.plugin-navigation ul.sub-nav a.link-active {font-weight: bold;}
/******** Block Elements */ /******** Block Elements */
.block { border: 1px solid #DDDDDD; margin-bottom: 10px;} .block { border: 1px solid #DDDDDD; margin-bottom: 10px;}
.block-text { padding: 10px 10px 10px; } .block-text { padding: 10px 10px 10px; }
.block h4 { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; } .block h2, .block h4 { padding: 5px 10px 5px; border-bottom: 1px solid #DDDDDD; }
.page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; } .page-info { border: 1px solid #DDDDDD; margin-bottom: 10px; }
.page-info p { padding: 10px; } .page-info p { padding: 10px; }

View File

@@ -9,8 +9,8 @@
* Admin template - _blank theme * Admin template - _blank theme
* *
* $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $ * $Source: /cvs_backup/e107_0.8/e107_themes/_blank/admin_template.php,v $
* $Revision: 1.4 $ * $Revision: 1.5 $
* $Date: 2008-12-12 11:23:05 $ * $Date: 2008-12-15 21:16:31 $
* $Author: secretr $ * $Author: secretr $
* *
*/ */
@@ -45,6 +45,7 @@ $ADMIN_HEADER = "
<td> <td>
<div class='col-main'> <div class='col-main'>
<div class='inner-wrapper'> <div class='inner-wrapper'>
{SETSTYLE=admin_content}
"; ";
/* /*
{SETSTYLE=admin_menu} {SETSTYLE=admin_menu}

View File

@@ -15,9 +15,9 @@
display: block; display: block;
font-family: Verdana, Arial, Helvetica, sans-serif; font-family: Verdana, Arial, Helvetica, sans-serif;
text-align: center; text-align: center;
font-size: 12px; font-size: 14px;
color: #13394E; color: #13394E;
font-weight: bold; font-weight: normal;
text-decoration: none; text-decoration: none;
} }
@@ -55,8 +55,8 @@ ul.sub {border-top: 1px solid #DDDDDD;}
background-image: none; background-image: none;
background-color: #FFFFFF; background-color: #FFFFFF;
line-height: 28px; line-height: 28px;
font-size: 11px; font-size: 12px;
font-weight: bold; font-weight: normal;
padding-left: 10px; padding-left: 10px;
padding-right: 0px; padding-right: 0px;
border-left: 1px solid #DDDDDD; border-left: 1px solid #DDDDDD;

View File

@@ -64,6 +64,18 @@ function tablestyle($caption, $text){
</div> </div>
'; ';
break; break;
case 'admin_content':
echo '
<div class="block">
<h2>'.$caption.'</h2>
<div class="block-text">
'.$text.'
</div>
</div>
';
break;
default: default:
echo ' echo '
<div class="block"> <div class="block">