1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

Database Utilities administration ready;

Database Verification administration ready;
minor admin improvements
This commit is contained in:
secretr
2008-12-30 13:51:41 +00:00
parent d387caf6a1
commit 53cc80a9c0
12 changed files with 1208 additions and 744 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1,71 +1,80 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $
| $Revision: 1.4 $
| $Date: 2007-11-24 15:42:35 $
| $Author: e107steved $
+----------------------------------------------------------------------------+
* e107 website system
*
* Copyright (C) 2001-2008 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
* Administration - DB Verify
*
* $Source: /cvs_backup/e107_0.8/e107_admin/db_verify.php,v $
* $Revision: 1.5 $
* $Date: 2008-12-30 13:51:41 $
* $Author: secretr $
*
*/
require_once("../class2.php");
$e_sub_cat = 'database';
require_once("auth.php");
$filename = "sql/core_sql.php";
$fd = fopen ($filename, "r");
$sql_data = @fread($fd, filesize($filename));
fclose ($fd);
if (!$sql_data) {
echo DBLAN_1."<br /><br />";
if(varset($_POST['db_tools_back']))
{
header("Location:".e_ADMIN_ABS."db.php");
exit;
}
$tables["core"] = $sql_data;
require_once("auth.php");
if (!getperms("0")) {
header("location:".e_BASE."index.php");
require_once(e_HANDLER."form_handler.php");
$frm = new e_form();
require_once (e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
$sql_data = file_get_contents(e_ADMIN.'sql/core_sql.php');
if (!$sql_data)
{
exit(DBLAN_1);
}
$tables["core"] = $sql_data;
if (!getperms("0"))
{
header("Location:".SITEURL."index.php");
exit;
}
//Get any plugin _sql.php files
foreach($pref['e_sql_list'] as $path => $file)
{
$filename = e_PLUGIN.$path."/".$file.".php";
if(is_readable($filename)){
$fd = fopen($filename, "r");
$sql_data = fread($fd, filesize($filename));
fclose ($fd);
$id = str_replace("_sql","",$file);
$tables[$id] = $sql_data;
}else{
echo $filename.DBLAN_22."<br />";
}
}
foreach($pref['e_sql_list'] as $path => $file)
{
$filename = e_PLUGIN.$path."/".$file.".php";
if(is_readable($filename))
{
$id = str_replace("_sql","",$file);
$tables[$id] = file_get_contents($filename);
}
else
{
$emessage->add($filename.DBLAN_22, E_MESSAGE_WARNING);
}
}
function read_tables($tab) {
global $tablines;
global $table_list;
global $tables,$sql,$pref;
function read_tables($tab)
{
global $tablines, $table_list, $tables, $pref;
$file = split("\n", $tables[$tab]);
foreach($file as $line) {
foreach($file as $line)
{
$line = ltrim(stripslashes($line));
if (preg_match("/CREATE TABLE (.*) /", $line, $match)) {
if($match[1] != "user_extended"){
$match = array();
if (preg_match('/CREATE TABLE (.*) /', $line, $match))
{
if($match[1] != "user_extended")
{
$table_list[$match[1]] = 1;
$current_table = $match[1];
$x = 0;
@@ -73,231 +82,339 @@ function read_tables($tab) {
}
}
if (strpos($line, "TYPE=") !== FALSE) {
if (strpos($line, "TYPE=") !== FALSE)
{
$current_table = "";
}
if ($current_table && $x) {
if ($current_table && $x)
{
$tablines[$current_table][$cnt++] = $line;
}
$x = 1;
}
// Get multi-language tables as well
if($pref['multilanguage']){
if($pref['multilanguage'])
{
$langs = table_list();
foreach($table_list as $name=>$stuff){
if($langs[$name]){
foreach(array_keys($table_list) as $name)
{
if($langs[$name])
{
$ltab = $langs[$name];
$table_list[$ltab] = 1;
$tablines[$ltab] = $tablines[$name];
}
}
}
}
// Get list of fields and keys for a table
function get_current($tab, $prefix = "")
{
if (!$prefix)
{
$prefix = MPREFIX;
}
$result = mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');
$qry = 'SHOW CREATE TABLE `'.$prefix.$tab."`";
$z = mysql_query($qry);
if ($z)
{
$row = mysql_fetch_row($z);
return str_replace("`", "", stripslashes($row[1]));
}
else
{
return FALSE;
}
function get_current($tab, $prefix = "")
{
if(! $prefix)
{
$prefix = MPREFIX;
}
mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');
$qry = 'SHOW CREATE TABLE `' . $prefix . $tab . "`";
$z = mysql_query($qry);
if($z)
{
$row = mysql_fetch_row($z);
return str_replace("`", "", stripslashes($row[1]));
}
else
{
return FALSE;
}
}
function check_tables($what)
function check_tables($what)
{
global $tablines;
global $table_list;
global $ns;
$cur=0;
global $tablines, $table_list, $frm;
$cur = 0;
$table_list = "";
read_tables($what);
$fix_active = FALSE; // Flag set as soon as there's a fix - enables 'Fix it' button
$text = "<form method='post' action='".e_SELF."' id='checktab'>
<div style='text-align:center'>
<table style='".ADMIN_WIDTH."' class='fborder'>
<tr>
<td class='fcaption' style='text-align:center'>".DBLAN_4."</td>
<td class='fcaption' style='text-align:center'>".DBLAN_5."</td>
<td class='fcaption' style='text-align:center'>".DBLAN_6."</td>
<td class='fcaption' style='text-align:center'>".DBLAN_7."</td>
</tr>";
foreach(array_keys($table_list) as $k)
$text = "
<form method='post' action='".e_SELF."'>
<fieldset id='core-db-verify-{$what}'>
<legend>".DBLAN_16." - $what ".DBLAN_18."</legend>
";
foreach(array_keys($table_list) as $k)
{ // $k is the DB table name (less prefix)
$prefix = MPREFIX;
$current_tab = get_current($k, $prefix); // Get list of fields and keys from actual table
unset($fields);
unset($xfields);
if ($current_tab)
{
$lines = split("\n", $current_tab); // Create one element of $lines per field or other line of info
$fieldnum = 0;
foreach($tablines[$k] as $x)
{ // $x is a line of the DB definition from the *_sql.php file
$x = str_replace(' ',' ',$x); // Remove double spaces
$fieldnum++;
$ffound = 0;
list($fname, $fparams) = split(" ", $x, 2);
if ($fname == "KEY")
{
list($key, $keyname, $keyparms) = split(" ", $x, 3);
$fname = $key." ".$keyname;
$fparams = $keyparms;
}
$fields[$fname] = 1;
$fparams = ltrim(rtrim($fparams));
$fparams = preg_replace("/\r?\n$|\r[^\n]$|,$/", "", $fparams);
if(stristr($k, "lan_") !== FALSE && $cur != 1)
{
$text .= "<tr><td colspan='6' class='fcaption'>".ADLAN_132."</td></tr>";
$cur = 1;
};
$text .= "
<table cellpadding='0' cellspacing='0' class='adminlist'>
<colgroup span='4'>
<col style='width: 25%'></col>
<col style='width: 25%'></col>
<col style='width: 10%'></col>
<col style='width: 30%'></col>
<col style='width: 10%'></col>
</colgroup>
<thead>
<tr>
<th>".DBLAN_4.": {$k}</th>
<th>".DBLAN_5."</th>
<th class='center'>".DBLAN_6."</th>
<th>".DBLAN_7."</th>
<th class='center last'>".DBLAN_19."</th>
</tr>
</thead>
<tbody>
";
$prefix = MPREFIX;
$current_tab = get_current($k, $prefix); // Get list of fields and keys from actual table
unset($fields);
unset($xfields);
$text .= "<tr><td class='forumheader3'>$k</td><td class='forumheader3'>$fname";
if (strpos($fparams, "KEY") !== FALSE)
{
$text .= " $fparams";
}
$text .= "</td>";
$s = 0;
$xfieldnum = -1;
foreach($lines as $l)
{
$xfieldnum++;
list($xl, $tmp) = split("\n", $l, 2); // $tmp should be null
$xl = ltrim(rtrim(stripslashes($xl)));
$xl = preg_replace("/\r?\n$|\r[^\n]$/", "", $xl);
$xl = str_replace(' ',' ',$xl); // Remove double spaces
list($xfname, $xfparams) = split(" ", $xl, 2); // Field name and the rest
if ($xfname == "KEY")
{
list($key, $keyname, $keyparms) = split(" ", $xl, 3);
$xfname = $key." ".$keyname;
$xfparams = $keyparms;
}
if ($xfname != "CREATE" && $xfname != ")")
{
$xfields[$xfname] = 1;
}
$xfparams = preg_replace("/,$/", "", $xfparams);
$fparams = preg_replace("/,$/", "", $fparams);
if ($xfname == $fname)
{ // Field names match - or it could be the word 'KEY' and its name which matches
$ffound = 1;
// echo "Field: ".$xfname." Actuals: ".$xfparams." Expected: ".$fparams."<br />";
$xfsplit = explode(' ',$xfparams);
$fsplit = explode(' ',$fparams);
$skip = FALSE;
$i = 0;
$fld_err = FALSE;
foreach ($xfsplit as $xf)
{
if ($skip)
{
$skip = FALSE;
// echo " Unskip: ".$xf."<br />";
}
elseif (strcasecmp(trim($xf),'collate') == 0)
{ // Strip out the collation definition
$skip = TRUE;
// echo "Skip = ".$xf;
}
else
{
// echo "Compare: ".$xf." - ".$fsplit[$i]."<br />";
// Since VARCHAR and CHAR are interchangeable, convert to CHAR (strictly, VARCHAR(3) and smalller becomes CHAR() )
if (stripos($xf,'VARCHAR') === 0) $xf = substr($xf,3);
if (stripos($fsplit[$i],'VARCHAR') === 0) $fsplit[$i] = substr($fsplit[$i],3);
if (strcasecmp(trim($xf),trim($fsplit[$i])) != 0)
{
$fld_err = TRUE;
// echo "Mismatch: ".$xf." - ".$fsplit[$i]."<br />";
}
$i++;
}
}
if ($fld_err)
{
$text .= "<td class='forumheader' style='text-align:center'>".DBLAN_8."</td>";
$text .= "<td class='forumheader3' style='text-align:center'>".DBLAN_9."<div class='indent'>".$xfparams."</div><b>".DBLAN_10."</b><div class='indent'>".$fparams." <br />".fix_form($k,$fname,$fparams,"alter")."</div></td>";
$fix_active = TRUE;
}
elseif ($fieldnum != $xfieldnum)
{ // Field numbers different - missing field?
$text .= "<td class='fcaption' style='text-align:center'>".DBLAN_5." ".DBLAN_8."</td>
<td class='forumheader3' style='text-align:center'>".DBLAN_9." #{$xfieldnum}<br />".DBLAN_10." #{$fieldnum}</td>";
}
else
{
$text .= "<td class='forumheader3' style='text-align:center;'>OK</td>
<td class='forumheader3' style='text-align:center'>&nbsp;</td>";
}
}
} // Finished checking one field
if ($ffound == 0)
{
$text .= "<td class='forumheader' style='text-align:center'><strong><em>".DBLAN_11."</em></strong></td>
<td class='forumheader3' style='text-align:center'><b>".DBLAN_10." [$fparams]</b><br />".fix_form($k,$fname,$fparams,"insert",$prev_fname)."<br /></td>";
$fix_active = TRUE;
}
$prev_fname = $fname;
$text .= "</tr>\n";
}
foreach(array_keys($xfields) as $tf)
if ($current_tab)
{
if (!$fields[$tf] && $k != "user_extended")
{
$fix_active = TRUE;
$text .= "<tr><td class='forumheader3' style='text-align:center'>$k</td><td class='forumheader3' style='text-align:center'>$tf</td><td class='forumheader3' style='text-align:center'><strong><em>".DBLAN_12."</em></strong></td><td class='forumheader3' style='text-align:center'>&nbsp;".fix_form($k,$tf,$fparams,"drop")."</td></tr>";
}
}
}
else
{ // Table Missing.
$text .= "<tr><td class='forumheader3' style='text-align:center'>$k</td><td class='forumheader3' style='text-align:center'>&nbsp;</td><td class='forumheader' style='text-align:center'>".DBLAN_13."<br /><td class='forumheader3' style='text-align:center'>&nbsp;".fix_form($k,$tf,$tablines[$k],"create")."</td></tr>";
$fix_active = TRUE;
}
}
$text .= "</table></div>";
$lines = split("\n", $current_tab); // Create one element of $lines per field or other line of info
$fieldnum = 0;
foreach($tablines[$k] as $x)
{ // $x is a line of the DB definition from the *_sql.php file
$x = str_replace(' ',' ',$x); // Remove double spaces
$fieldnum++;
$ffound = 0;
list($fname, $fparams) = split(" ", $x, 2);
if ($fname == "UNIQUE")
{
list($key, $key1, $keyname, $keyparms) = split(" ", $x, 4);
$fname = $key." ".$key1." ".$keyname;
$fparams = $keyparms;
}
elseif ($fname == "KEY")
{
list($key, $keyname, $keyparms) = split(" ", $x, 3);
$fname = $key." ".$keyname;
$fparams = $keyparms;
}
$fields[$fname] = 1;
$fparams = ltrim(rtrim($fparams));
$fparams = preg_replace("/\r?\n$|\r[^\n]$|,$/", "", $fparams);
if($fix_active){
$text .= "<div style='".ADMIN_WIDTH.";text-align:right'>
<input class='button' type='submit' name='do_fix' value='".DBLAN_21."' /></div>\n";
if(stristr($k, "lan_") !== FALSE && $cur != 1)
{
$cur = 1;
}
$text .= "
<tr>
<td>{$k}</td>
<td>{$fname}
";
if (strpos($fparams, "KEY") !== FALSE)
{
$text .= " $fparams";
}
$text .= "
</td>
";
//$s = 0; - never used
$xfieldnum = -1;
foreach($lines as $l)
{
$xfieldnum++;
list($xl, $tmp) = split("\n", $l, 2); // $tmp should be null
$xl = ltrim(rtrim(stripslashes($xl)));
$xl = preg_replace("/\r?\n$|\r[^\n]$/", "", $xl);
$xl = str_replace(' ',' ',$xl); // Remove double spaces
list($xfname, $xfparams) = split(" ", $xl, 2); // Field name and the rest
if ($xfname == "UNIQUE")
{
list($key, $key1, $keyname, $keyparms) = split(" ", $xl, 4);
$xfname = $key." ".$key1." ".$keyname;
$xfparams = $keyparms;
}
elseif ($xfname == "KEY")
{
list($key, $keyname, $keyparms) = split(" ", $xl, 3);
$xfname = $key." ".$keyname;
$xfparams = $keyparms;
}
if ($xfname != "CREATE" && $xfname != ")")
{
$xfields[$xfname] = 1;
}
$xfparams = preg_replace('/,$/', '', $xfparams);
$fparams = preg_replace('/,$/', '', $fparams);
if ($xfname == $fname)
{ // Field names match - or it could be the word 'KEY' and its name which matches
$ffound = 1;
//echo "Field: ".$xfname." Actuals: ".$xfparams." Expected: ".$fparams."<br />";
$xfsplit = explode(' ',$xfparams);
$fsplit = explode(' ',$fparams);
$skip = FALSE;
$i = 0;
$fld_err = FALSE;
foreach ($xfsplit as $xf)
{
if ($skip)
{
$skip = FALSE;
// echo " Unskip: ".$xf."<br />";
}
elseif (strcasecmp(trim($xf),'collate') == 0)
{ // Strip out the collation definition
$skip = TRUE;
// cho "Skip = ".$xf;
}
else
{
// echo "Compare: ".$xf." - ".$fsplit[$i]."<br />";
// Since VARCHAR and CHAR are interchangeable, convert to CHAR (strictly, VARCHAR(3) and smalller becomes CHAR() )
if (stripos($xf,'VARCHAR') === 0) $xf = substr($xf,3);
if (stripos($fsplit[$i],'VARCHAR') === 0) $fsplit[$i] = substr($fsplit[$i],3);
if (strcasecmp(trim($xf),trim($fsplit[$i])) != 0)
{
$fld_err = TRUE;
//echo "Mismatch: ".$xf." - ".$fsplit[$i]."<br />";
}
$i++;
}
}
if ($fld_err)
{
$text .= "
<td class='center middle error'>".DBLAN_8."</td>
<td>
<strong>".DBLAN_9."</strong>
<div class='indent'>{$xfparams}</div>
<strong>".DBLAN_10."</strong>
<div class='indent'>{$fparams}</div>
</td>
<td class='center middle autocheck e-pointer'>".fix_form($k, $fname, $fparams, "alter")."</td>
";
$fix_active = TRUE;
}
elseif ($fieldnum != $xfieldnum)
{ // Field numbers different - missing field?
$text .= "
<td class='center middle error'>".DBLAN_5." ".DBLAN_8."</td>
<td>
<strong>".DBLAN_9.": </strong>#{$xfieldnum}
<br />
<strong>".DBLAN_10.": </strong>#{$fieldnum}
</td>
<td class='center middle'>&nbsp;</td>
";
}
else
{
$text .= "
<td class='center'>OK</td>
<td>&nbsp;</td>
<td class='center middle'>&nbsp;</td>
";
/**/
}
}
} // Finished checking one field
if ($ffound == 0)
{
$prev_fname = $fname;
$text .= "
<td class='center middle error'>".DBLAN_11."</td>
<td>
<strong>".DBLAN_10."</strong>
<div class='indent'>{$fparams}</div>
</td>
<td class='center middle autocheck e-pointer'>".fix_form($k, $fname, $fparams, "insert", $prev_fname)."</td>
";
$fix_active = TRUE;
}
$text .= "
</tr>
";
}
foreach(array_keys($xfields) as $tf)
{
if (!$fields[$tf] && $k != "user_extended")
{
$fix_active = TRUE;
$text .= "
<tr>
<td>$k</td>
<td>$tf</td>
<td class='center middle'>".DBLAN_12."</td>
<td>&nbsp;</td>
<td class='center middle autocheck e-pointer'>".fix_form($k, $tf, $fparams, "drop")."</td>
</tr>
";
}
}
}
else
{ // Table Missing.
$text .= "
<tr>
<td>{$k}</td>
<td>&nbsp;</td>
<td class='center middle error'>".DBLAN_13."</td>
<td>&nbsp;</td>
<td class='center middle autocheck e-pointer'>".fix_form($k, $tf, $tablines[$k], "create") . "</td>
</tr>
";
$fix_active = TRUE;
}
$text .= "
</tbody>
</table>
<br/>
";
}
if($fix_active)
{
$text .= "
<div class='buttons-bar right'>
".$frm->admin_button('do_fix', DBLAN_21, 'execute', '', array('id'=>false))."
".$frm->admin_button('check_all', 'jstarget:fix_active', 'action', LAN_CHECKALL, array('id'=>false))."
".$frm->admin_button('uncheck_all', 'jstarget:fix_active', 'action', LAN_UNCHECKALL, array('id'=>false))."
</div>
";
}
foreach(array_keys($_POST) as $j) {
if (preg_match("/table_(.*)/", $j, $mitch)) {
$lx = $mitch[1];
$text .= "<input type='hidden' name='table_{$lx}' value='1' />\n";
$match = array();
if (preg_match('/table_(.*)/', $j, $match))
{
$lx = $match[1];
$text .= "<div><input type='hidden' name='table_{$lx}' value='1' /></div>\n";
}
}
$text .= "</form>";
$text .= "
</fieldset>
<div class='buttons-bar center'>
".$frm->admin_button('back', DBLAN_17, 'back')."
</div>
</form>
";
return $text;
}
@@ -306,16 +423,21 @@ global $table_list;
// -------------------- Table Fixing ------------------------------
if(isset($_POST['do_fix'])){
$text = "<div><table class='fborder' style='".ADMIN_WIDTH."'>";
foreach( $_POST['fix_active'] as $key=>$val){
if(isset($_POST['do_fix']))
{
//$emessage->add(DBLAN_20);
foreach( $_POST['fix_active'] as $key=>$val)
{
if (MAGIC_QUOTES_GPC == TRUE) {
if (MAGIC_QUOTES_GPC == TRUE)
{
$table = stripslashes($_POST['fix_table'][$key][0]);
$newval = stripslashes($_POST['fix_newval'][$key][0]);
$mode = stripslashes($_POST['fix_mode'][$key][0]);
$after = stripslashes($_POST['fix_after'][$key][0]);
} else {
}
else
{
$table = $_POST['fix_table'][$key][0];
$newval = $_POST['fix_newval'][$key][0];
$mode = $_POST['fix_mode'][$key][0];
@@ -325,94 +447,127 @@ if(isset($_POST['do_fix'])){
$field= $key;
if($mode == "alter"){
if($mode == "alter")
{
$query = "ALTER TABLE `".MPREFIX.$table."` CHANGE `$field` `$field` $newval";
}
if($mode == "insert"){
if($mode == "insert")
{
$query = "ALTER TABLE `".MPREFIX.$table."` ADD `$field` $newval AFTER $after";
}
if($mode == "drop"){
if($mode == "drop")
{
$query = "ALTER TABLE `".MPREFIX.$table."` DROP `$field` ";
}
if($mode == "index"){
if($mode == "index")
{
$query = "ALTER TABLE `".MPREFIX.$table."` ADD INDEX `$field` (`$newval`)";
}
if($mode == "indexdrop"){
if($mode == "indexdrop")
{
$query = "ALTER TABLE `".MPREFIX.$table."` DROP INDEX `$field`";
}
if($mode == "create"){
if($mode == "create")
{
$query = "CREATE TABLE ".MPREFIX.$table." ($newval) TYPE=MyISAM;";
}
$text .= "<tr><td class='forumheader3' style='vertical-align:top;width:70%'>".$query."</td><td class='forumheader3' style='vertical-align:top;width:30%'>";
$text .= (mysql_query($query)) ? " - <b>".LAN_UPDATED."</b>" : " - <b>".LAN_UPDATED_FAILED."</b>";
$text .= "</td></tr>";
if(mysql_query($query)) $emessage->add(LAN_UPDATED.' ['.$query.']', E_MESSAGE_SUCCESS);
else $emessage->add(LAN_UPDATED_FAILED.' ['.$query.']', E_MESSAGE_WARNING);
}
$text .= "</table></div>";
$text .="<div style='text-align:center'><br />
<form method='post' action='db.php'>
<input class='button' type='submit' name='back' value='".DBLAN_17."' />
</form>
</div>";
$ns -> tablerender(DBLAN_20, $text);
}
// ---------------------- Main Form and Submit. ------------------------
if (!$_POST['db_verify'] && !$_POST['do_fix']) {
$text = "
<form method='post' action='".e_SELF."'>
<table border=0 align='center'>
<tr><td>".DBLAN_14."<br /><br />";
foreach(array_keys($tables) as $x) {
$text .= "<input type='checkbox' name='table_".$x."' />".$x."<br />";
}
$text .= "
<br /><input class='button' name='db_verify' type='submit' value='".DBLAN_15."' />
</td></tr></table></form>";
$ns->tablerender(DBLAN_16, $text);
} else {
foreach(array_keys($_POST) as $k) {
if (preg_match("/table_(.*)/", $k, $match)) {
if (varset($_POST['db_verify']) || varset($_POST['do_fix']))
{
$text = '';
foreach(array_keys($_POST) as $k)
{
$match = array();
if (preg_match("/table_(.*)/", $k, $match))
{
$xx = $match[1];
$str = "<br />
<div style='text-align:center'>
<form method='post' action='db.php'>
<input class='button' type='submit' name='back' value='".DBLAN_17."' />
</form>
</div>";
$ns->tablerender(DBLAN_16." - $xx ".DBLAN_18, check_tables($xx).$str);
$text .= check_tables($xx);
}
}
if(!$text) $emessage->add(DBLAN_24, E_MESSAGE_WARNING);
else
{
$e107->ns->tablerender(DBLAN_23.' - '.DBLAN_16, $emessage->render().$text);
require_once(e_ADMIN."footer.php");
exit;
}
}
$text = "
<form method='post' action='".e_SELF."' id='core-db-verify-sql-tables-form'>
<fieldset id='core-db-verify-sql-tables'>
<legend>".DBLAN_14."</legend>
<table cellpadding='0' cellspacing='0' class='adminlist'>
<colgroup span='1'>
<col style='width: 100%'></col>
</colgroup>
<thead>
<tr>
<th class='last'>".$frm->checkbox_toggle('check-all-verify', 'table_').LAN_CHECKALL.' | '.LAN_UNCHECKALL."</th>
</tr>
</thead>
<tbody>
";
foreach(array_keys($tables) as $x) {
$text .= "
<tr>
<td>
".$frm->checkbox('table_'.$x, $x).$frm->label($x, 'table_'.$x, $x)."
</td>
</tr>
";
}
$text .= "
</tbody>
</table>
<div class='buttons-bar center'>
".$frm->admin_button('db_verify', DBLAN_15)."
".$frm->admin_button('db_tools_back', DBLAN_17, 'back')."
</div>
</fieldset>
</form>
";
$e107->ns->tablerender(DBLAN_23.' - '.DBLAN_16, $emessage->render().$text);
require_once(e_ADMIN."footer.php");
exit;
// --------------------------------------------------------------
function fix_form($table,$field, $newvalue,$mode,$after =''){
global $frm;
if(stristr($field, "KEY ") !== FALSE){
if(stristr($field, "KEY ") !== FALSE)
{
$field = chop(str_replace("KEY ","",$field));
$mode = ($mode == "drop") ? "indexdrop" : "index";
$search = array("(",")");
$newvalue = str_replace($search,"",$newvalue);
}
if($mode == "create"){
if($mode == "create")
{
$newvalue = implode("\n",$newvalue);
}
$text .= "<input type='checkbox' name=\"fix_active[$field][]\" value='1' /> ".DBLAN_19."\n"; // 'attempt to fix'
$field = trim($field, '`');
$text .= $frm->checkbox("fix_active[$field][]", 1, false, array('id'=>false));
$text .= "<input type='hidden' name=\"fix_newval[$field][]\" value=\"$newvalue\" />\n";
$text .= "<input type='hidden' name=\"fix_table[$field][]\" value=\"$table\" />\n";
$text .= "<input type='hidden' name=\"fix_mode[$field][]\" value=\"$mode\" />\n";
@@ -421,7 +576,8 @@ function fix_form($table,$field, $newvalue,$mode,$after =''){
return $text;
}
function table_list() {
function table_list()
{
// grab default language lists.
global $mySQLdefaultdb;
@@ -439,17 +595,18 @@ function table_list() {
$exclude[] = "pm_messages";
$exclude[] = "pm_blocks";
// print_r($search);
$tables = mysql_list_tables($mySQLdefaultdb);
while (list($temp) = mysql_fetch_array($tables)){
while (list($temp) = mysql_fetch_array($tables))
{
$prefix = MPREFIX."lan_";
if(preg_match("/^".$prefix."(.*)/", $temp, $match)){
$match = array();
if(preg_match('/^'.$prefix.'(.*)/', $temp, $match))
{
$e107tab = str_replace(MPREFIX, "", $temp);
$pos = strrpos($match[1],"_")+1;
$core = substr(str_replace("lan_","",$e107tab),$pos);
if (str_replace($exclude, "", $e107tab)){
if (str_replace($exclude, "", $e107tab))
{
$tabs[$core] = $e107tab;
}
}
@@ -458,8 +615,29 @@ function table_list() {
return $tabs;
}
/**
* Handle page DOM within the page header
*
* @return string JS source
*/
function headerjs()
{
require_once (e_HANDLER.'js_helper.php');
$ret = "
<script type='text/javascript'>
if(typeof e107Admin == 'undefined') var e107Admin = {}
/**
* OnLoad Init Control
*/
e107Admin.initRules = {
'Helper': true,
'AdminMenu': false
}
</script>
<script type='text/javascript' src='".e_FILE_ABS."jslib/core/admin.js'></script>
";
require_once(e_ADMIN."footer.php");
?>
return $ret;
}
?>

View File

@@ -9,8 +9,8 @@
* Manage/View failed login attempts
*
* $Source: /cvs_backup/e107_0.8/e107_admin/fla.php,v $
* $Revision: 1.6 $
* $Date: 2008-12-23 16:25:06 $
* $Revision: 1.7 $
* $Date: 2008-12-30 13:51:41 $
* $Author: secretr $
*
*/
@@ -166,7 +166,7 @@ else
</th>
<th class='center last'>
".LAN_BAN."<br/>
".$frm->checkbox('check_all_ban', 'jstarget:flaban', false, array('id'=>false,'class'=>'checkbox toggle-all'))."
".$frm->checkbox_toggle('check-all-ban', 'flaban')."
</th>
</tr>
</thead>
@@ -225,8 +225,6 @@ function headerjs()
require_once(e_HANDLER.'js_helper.php');
$ret = "
<script type='text/javascript'>
//add required core lan - delete confirm message
(".e_jshelper::toString(LAN_JSCONFIRM).").addModLan('core', 'delete_confirm');
if(typeof e107Admin == 'undefined') var e107Admin = {}
/**

View File

@@ -8,8 +8,8 @@
* e107 Admin Helper
*
* $Source: /cvs_backup/e107_0.8/e107_files/jslib/core/admin.js,v $
* $Revision: 1.11 $
* $Date: 2008-12-29 15:23:06 $
* $Revision: 1.12 $
* $Date: 2008-12-30 13:51:41 $
* $Author: secretr $
*
*/
@@ -111,10 +111,12 @@ e107Admin.Helper = {
* by default or any value set by checkbox value (special command 'jstarget:start_with_selector')
* This method is auto-attached (if init() method is executed) to every checkbox having class toggle-all
*
* Example of valid button being auto-observed:
* <input type='checkbox' class='toggle-all' name='not_important' value='multitoggle'>
* Example of valid checkbox being auto-observed:
* <input type='checkbox' class='toggle-all' name='not_important' value='jstarget:your_selector'>
*
* Demo: e107_admin/fla.php
* Demo: e107_admin/fla.php, e107_admin/db_verify.php
* Note: You could use e_form::checkbox_toggle() method (e107_handlers/form_handler.php),
* which produces multi-toggle checkbox observer in very convenient way
*
*/
allToggleChecked: function(event) {

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
| $Revision: 1.46 $
| $Date: 2008-12-28 22:37:43 $
| $Author: e107steved $
| $Revision: 1.47 $
| $Date: 2008-12-30 13:51:41 $
| $Author: secretr $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -34,7 +34,7 @@ class e_parse
var $e_highlighting; // Set to TRUE or FALSE once it has been calculated
var $e_query; // Highlight query
// toHTML Action defaults. For now these match existing convention.
// toHTML Action defaults. For now these match existing convention.
// Let's reverse the logic on the first set ASAP; too confusing!
var $e_optDefault = array(
'context' => 'olddefault', // default context: all "opt-out" conversions :(
@@ -48,12 +48,12 @@ class e_parse
'no_make_clickable' => FALSE, // URLs etc are clickable - TRUE disables
'no_replace' => FALSE, // Replace clickable links - TRUE disables (only if no_make_clickable not set)
'emotes_off' => FALSE, // Convert emoticons to graphical icons - TRUE disables conversion
'emotes_on' => FALSE, // FORCE conversion to emotes, even if syspref is disabled
'no_hook' => FALSE, // Hooked parsers (TRUE disables completely) (deprecated)
// Disabled by Default
'defs' => FALSE, // Convert defines(constants) within text.
'constants' => FALSE, // replace all {e_XXX} constants with their e107 value
@@ -61,7 +61,7 @@ class e_parse
'parse_sc' => FALSE, // Parse shortcodes - TRUE enables parsing
'no_tags' => FALSE // remove HTML tags.
);
// Super modifiers adjust default option values
// First line of adjustments change default-ON options
// Second line changes default-OFF options
@@ -166,7 +166,7 @@ class e_parse
case 1 : return mb_strtolower($str);
}
// Default case shouldn't happen often
return utf8_strtolower($str);
}
@@ -178,7 +178,7 @@ class e_parse
case 1 : return mb_strtoupper($str);
}
// Default case shouldn't happen often
return utf8_strtoupper($str);
}
@@ -204,14 +204,14 @@ class e_parse
}
// May be subtle differences in return values dependent on which routine is used.
// May be subtle differences in return values dependent on which routine is used.
// native substr() routine can return FALSE. mb_substr and utf8_substr just return an empty string.
function uSubStr($str, $start, $length = NULL)
{
switch ($this->utfAction)
{
case 0 : return strrpos($str, $start, $length);
case 1 :
case 1 :
if (is_null($length))
{
return mb_strrpos($haystack, $needle);
@@ -233,17 +233,17 @@ class e_parse
{
require_once(e_HANDLER."shortcode_handler.php");
$this->e_sc = new e_shortcode;
}
}
}
function toDB($data, $nostrip = false, $no_encode = false, $mod = false, $original_author = false)
{
/**
* $nostrip: toDB() assumes all data is GPC ($_GET, $_POST, $_COOKIE) unless you indicate otherwise by setting this var to true.
* If magic quotes is enabled on the server and you do not tell toDB() that the data is non GPC then slashes will be stripped when they should not be.
* $no_encode: This var should nearly always be false. It is used by the save_prefs() function to preserve html content within prefs even when
* $no_encode: This var should nearly always be false. It is used by the save_prefs() function to preserve html content within prefs even when
* the save_prefs() function has been called by a non admin user / user without html posting permissions.
* $mod: the 'no_html' and 'no_php' modifiers blanket prevent html and php posting regardless of posting permissions. (used in logging)
*/
@@ -356,7 +356,7 @@ class e_parse
// 0x205f 0xe2 0x81 0x9f
// 0x3000 0xe3 0x80 0x80
$utf8 = 'u';
$whiteSpace = '#([\x20|\x0c]|[\xe1][\x9a][\x80]|[\xe1][\xa0][\x8e]|[\xe2][\x80][\x80-\x8a,\xa8]|[\xe2][\x81][\x9f]|[\xe3][\x80][\x80]+)#';
$whiteSpace = '#([\x20|\x0c]|[\xe1][\x9a][\x80]|[\xe1][\xa0][\x8e]|[\xe2][\x80][\x80-\x8a,\xa8]|[\xe2][\x81][\x9f]|[\xe3][\x80][\x80]+)#';
// Have to explicitly enumerate the whitespace chars, and use non-utf-8 mode, otherwise regex fails on badly formed utf-8
}
else
@@ -364,7 +364,7 @@ class e_parse
$utf8 = '';
$whiteSpace = '#(\s+)#'; // For non-utf-8, can use a simple match string
}
// Start of the serious stuff - split into HTML tags and text between
$content = preg_split('#(<.*?>)#mis', $str, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
@@ -377,22 +377,22 @@ class e_parse
if ($lvalue)
{ // Tag of non-zero length
// If the first character is not a / then this is an opening tag
if ($lvalue[0] != "/")
{ // Collect the tag name
if ($lvalue[0] != "/")
{ // Collect the tag name
preg_match("/^(\w*?)(\s|$)/", $lvalue, $t);
// If this is a protected element, activate the associated protection flag
if (in_array($t[1], $nobreak)) array_unshift($innbk, $t[1]);
}
else
else
{ // Otherwise this is a closing tag
// If this is a closing tag for a protected element, unset the flag
if (in_array(substr($lvalue, 1), $nobreak))
if (in_array(substr($lvalue, 1), $nobreak))
{
reset($innbk);
while (list($key, $tag) = each($innbk))
while (list($key, $tag) = each($innbk))
{
if (substr($lvalue, 1) == $tag)
if (substr($lvalue, 1) == $tag)
{
unset($innbk[$key]);
break;
@@ -407,10 +407,10 @@ class e_parse
$value = ''; // Eliminate any empty tags altogether
}
// Else if we're outside any tags, and with non-zero length string...
}
elseif ($value)
}
elseif ($value)
{ // If unprotected...
if (!count($innbk))
if (!count($innbk))
{
// Use the ACK (006) ASCII symbol to replace all HTML entities temporarily
$value = str_replace("\x06", "", $value);
@@ -488,7 +488,7 @@ class e_parse
}
// Put captured HTML entities back into the string
foreach ($ents[0] as $ent) $value = preg_replace("/\x06/", $ent, $value, 1);
}
}
}
// Send the modified segment down the drain
$drain .= $value;
@@ -520,7 +520,7 @@ class e_parse
$tmp_pos = $pos-1;
$pos++;
break;
case ">" :
if($text{$pos-1} == "/")
{
@@ -534,7 +534,7 @@ class e_parse
$intag = FALSE;
$pos++;
break;
case "&" :
if($text{$pos+1} == "#")
{
@@ -569,7 +569,7 @@ class e_parse
// Truncate a string to a maximum length $len - append the string $more if it was truncated
// Uses current CHARSET - for utf-8, returns $len characters rather than $len bytes
function text_truncate($text, $len = 200, $more = "[more]")
function text_truncate($text, $len = 200, $more = "[more]")
{
if (strlen($text) <= $len) return $text; // Always valid
if (strtolower(CHARSET) !== 'utf-8')
@@ -596,7 +596,7 @@ class e_parse
function textclean ($text, $wrap=100)
{
$text = str_replace ("\n\n\n", "\n\n", $text);
$text = $this -> htmlwrap($text, $wrap);
$text = $this->htmlwrap($text, $wrap);
$text = str_replace (array ("<br /> ", " <br />", " <br /> "), "<br />", $text);
/* we can remove any linebreaks added by htmlwrap function as any \n's will be converted later anyway */
return $text;
@@ -633,20 +633,20 @@ class e_parse
}
function toHTML($text, $parseBB = FALSE, $modifiers = "", $postID = "", $wrap=FALSE)
function toHTML($text, $parseBB = FALSE, $modifiers = "", $postID = "", $wrap=FALSE)
{
if ($text == '') return $text;
global $pref, $fromadmin;
// Set default modifiers to start
$opts = $this->e_optDefault;
// Now process any modifiers that are specified
if (strlen($modifiers))
if (strlen($modifiers))
{
$aMods = explode( ',',$modifiers);
// If there's a supermodifier, it must be first, and in uppercase
$psm = trim($aMods[0]);
if (isset($this->e_SuperMods[$psm]))
@@ -709,7 +709,7 @@ class e_parse
foreach ($content as $full_text)
{
$proc_funcs = TRUE;
// We may have 'captured' a bbcode word - strip it if so
if ($last_bbcode == $full_text)
{
@@ -778,10 +778,10 @@ class e_parse
{ // Do the 'normal' processing - in principle, as previously - but think about the order.
// Split out and ignore any scripts and style blocks. With just two choices we can match the closing tag in the regex
$subcon = preg_split('#((?:<s)(?:cript[^>]+>.*?</script>|tyle[^>]+>.*?</style>))#mis', $full_text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
$subcon = preg_split('#((?:<s)(?:cript[^>]+>.*?</script>|tyle[^>]+>.*?</style>))#mis', $full_text, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE );
foreach ($subcon as $sub_blk)
{
// if (preg_match('#^<(script|style)[^>]+>#',$sub_blk)) //
// if (preg_match('#^<(script|style)[^>]+>#',$sub_blk)) //
if ((substr($sub_blk,0,7) == '<script') || (substr($sub_blk,0,6) == '<style'))
{ // Its a script/style block - just pass it through unaltered - except, do we need the line break stuff? - QUERY XXX-01
if (DB_INF_SHOW) echo "Processing script: {$sub_blk}<br />";
@@ -843,7 +843,7 @@ class e_parse
// Convert emoticons to graphical icons, unless modifiers override
if (!$opts['emotes_off'] && ($pref['smiley_activate'] || $opts['emotes_on']))
{
if (!is_object($this->e_emote))
if (!is_object($this->e_emote))
{
require_once(e_HANDLER.'emote_filter.php');
$this->e_emote = new e_emoteFilter;
@@ -878,7 +878,7 @@ class e_parse
// Start parse [bb][/bb] codes
if ($parseBB !== FALSE)
{
if (!is_object($this->e_bb))
if (!is_object($this->e_bb))
{
require_once(e_HANDLER.'bbcode_handler.php');
$this->e_bb = new e_bbcode;
@@ -910,9 +910,9 @@ class e_parse
// profanity filter
if ($pref['profanity_filter'])
if ($pref['profanity_filter'])
{
if (!is_object($this->e_pf))
if (!is_object($this->e_pf))
{
require_once(e_HANDLER."profanity_filter.php");
$this->e_pf = new e_profanityFilter;
@@ -946,7 +946,7 @@ class e_parse
$sub_blk = $this->e_hook[$hook]->$hook($sub_blk,$opts['context']);
}
}
if(isset($pref['e_tohtml_list']) && is_array($pref['e_tohtml_list']))
{
foreach($pref['e_tohtml_list'] as $hook)
@@ -999,7 +999,7 @@ class e_parse
$ret_parser .= $sub_blk;
} // End of 'normal' processing for a block of text
} // End of 'foreach() on each block of non-script text
} // End of 'foreach() on each block of non-script text
} // End of 'normal' parsing (non-script text)
@@ -1015,7 +1015,7 @@ class e_parse
function toAttribute($text) {
$text = str_replace("&amp;","&",$text); // URLs posted without HTML access may have an &amp; in them.
$text = htmlspecialchars($text, ENT_QUOTES, CHARSET); // Xhtml compliance.
if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text))
if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text))
{
$text = $this->replaceConstants($text);
return $text;

View File

@@ -9,8 +9,8 @@
* Form Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
* $Revision: 1.12 $
* $Date: 2008-12-23 08:28:42 $
* $Revision: 1.13 $
* $Date: 2008-12-30 13:51:41 $
* $Author: secretr $
*
*/
@@ -108,6 +108,12 @@ class e_form
}
function checkbox_toggle($name, $selector = 'multitoggle')
{
$selector = 'jstarget:'.$selector;
return $this->checkbox($name, $selector, false, array('id'=>false,'class'=>'checkbox toggle-all'));
}
function radio($name, $value, $checked = false, $options = array())
{
$options['checked'] = $checked; //comes as separate argument just for convenience

View File

@@ -9,8 +9,8 @@
* Message Handler
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/message_handler.php,v $
* $Revision: 1.10 $
* $Date: 2008-12-23 16:25:06 $
* $Revision: 1.11 $
* $Date: 2008-12-30 13:51:41 $
* $Author: secretr $
*
*/
@@ -317,7 +317,8 @@ class eMessage
E_MESSAGE_ERROR => array(),
E_MESSAGE_WARNING => array(),
E_MESSAGE_SUCCESS => array(),
E_MESSAGE_INFO => array()
E_MESSAGE_INFO => array(),
E_MESSAGE_DEBUG => array()
);
}

View File

@@ -1,13 +1,10 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_cpage.php,v $
| $Revision: 1.4 $
| $Date: 2008-12-29 15:23:06 $
| $Author: secretr $
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: lan_cpage.php,v 1.5 2008-12-30 13:51:41 secretr Exp $
*
* Admin Language File
*
*/
define("CUSLAN_1", "Title");
define("CUSLAN_2", "Type");

View File

@@ -1,50 +1,47 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_db.php,v $
| $Revision: 1.3 $
| $Date: 2007-03-15 15:55:08 $
| $Author: lisa_ $
+----------------------------------------------------------------------------+
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: lan_db.php,v 1.4 2008-12-30 13:51:41 secretr Exp $
*
* Admin Language File
*
*/
define("DBLAN_1", "Core settings backed up in database.");
define("DBLAN_2", "Click button to save a backup of your e107 database");
define("DBLAN_2", "Select to save a backup of your e107 database");
define("DBLAN_3", "Backup SQL database");
define("DBLAN_4", "Click button to check validity of e107 database");
define("DBLAN_4", "Select to check validity of e107 database");
define("DBLAN_5", "Check database validity");
define("DBLAN_6", "Click button to optimize your e107 database");
define("DBLAN_6", "Select to optimize your e107 database");
define("DBLAN_7", "Optimize SQL database");
define("DBLAN_8", "Click button to backup your core settings");
define("DBLAN_8", "Select to backup your core settings");
define("DBLAN_9", "Backup core");
define("DBLAN_10", "Database Utilities");
define("DBLAN_11", "MySQL database");
define("DBLAN_12", "optimized");
define("DBLAN_13", "Back");
define("DBLAN_14", "Done");
define("DBLAN_15", "Click button to check for any available db updates");
define("DBLAN_15", "Select to check for any available db updates");
define("DBLAN_16", "Check for Updates");
define("DBLAN_17", "Pref. Name");
define("DBLAN_18", "Pref. Value");
define("DBLAN_19", "Click button to open the preferences editor (for advanced users only)");
define("DBLAN_19", "Select to open the preferences editor (for advanced users only)");
define("DBLAN_20", "Preferences Editor");
define("DBLAN_21", "Delete Checked");
define("DBLAN_22", "Plugin: View and Scan");
define("DBLAN_22", "Plugin View and Scan");
define("DBLAN_23", "Scan Completed");
define("DBLAN_24", "Name");
define("DBLAN_25", "Directory");
define("DBLAN_26", "Included add-ons");
define("DBLAN_27", "Installed");
define("DBLAN_28", "Click button to scan plugin directories for changes");
define("DBLAN_28", "Select to scan plugin directories for changes");
define("DBLAN_29", "Scan plugin directories");
define("DBLAN_30", " (If an addon shows an error, check for characters outside the PHP opening/closing tags)");
define("DBLAN_30", "If an addon shows an error, check for characters outside the PHP opening/closing tags.");
define("DBLAN_31", "Pass");
define("DBLAN_32", "Error");
define("DBLAN_33", "Inaccessible");
define("DBLAN_34", "Not checked");
define("DBLAN_35", "Click button to check validity of e107 database records");
define("DBLAN_35", "Select to check validity of e107 database records");
define("DBLAN_36", "Check database record validity");
define("DBLAN_37", "Choose table(s) to validate");
define("DBLAN_38", "Start Verify");
@@ -58,8 +55,11 @@ define("DBLAN_45", "Id Not Found!");
define("DBLAN_46", "Table Not Found!");
define("DBLAN_47", "delete");
define("DBLAN_48", "Delete Checked");
define("DBLAN_49", "no records present in the table, so nothing to validate");
define("DBLAN_49", "No records present in the table, so nothing to validate");
define("DBLAN_50", "Sql Record Validation");
define("DBLAN_51", "Execute Selected");
define("DBLAN_52", "Delete Duplicate"); //plugin scan
define("DBLAN_53", "Please select action.");
define("DBLAN_54", "No Validation errors found.");
?>

View File

@@ -4,9 +4,9 @@
| e107 website system - Language File.
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_db_verify.php,v $
| $Revision: 1.2 $
| $Date: 2007-05-29 18:53:07 $
| $Author: e107steved $
| $Revision: 1.3 $
| $Date: 2008-12-30 13:51:41 $
| $Author: secretr $
+----------------------------------------------------------------------------+
*/
define("DBLAN_1", "Unable to read the sql datafile<br /><br />Please ensure the file <b>core_sql.php</b> exists in the <b>/admin/sql</b> directory.");
@@ -31,4 +31,6 @@ define("DBLAN_19", "Attempt to Fix");
define("DBLAN_20", "Attempting to fix tables");
define("DBLAN_21", "Fix Selected Items");
define("DBLAN_22", " is not readable");
define("DBLAN_23", "Database Utilities");
define("DBLAN_24", "Please select action.");
?>

View File

@@ -79,6 +79,16 @@ ul,ol { list-style:none; }
.no-bg { background:none !important; }
.clear { clear: both; }
pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
/* width: 99%; */
word-wrap: break-word; /* Internet Explorer 5.5+ */
}
/*******************************************************************************************************************/
/* E107 CORE ADMIN CSS *********************************************************************************************/
@@ -87,7 +97,7 @@ ul,ol { list-style:none; }
/******** Decorate JS */
/* Admin List Table */
.adminlist { width:100%; border:1px solid #ddd;}
.adminlist th { padding: 5px; border-bottom:1px solid #ddd; border-right: 1px solid #ddd; font-weight: bold; white-space:nowrap; }
.adminlist th { padding: 5px; border-bottom:1px solid #ddd; border-right: 1px solid #ddd; font-weight: bold }
.adminlist td { padding: 5px; border-bottom:1px solid #ddd; border-right: 1px solid #ddd; }
.adminlist th.last,
.adminlist td.last { border-right: 0px solid;}
@@ -197,6 +207,7 @@ label { cursor: pointer; }
#s-message div.info,
#s-message div.error,
#s-message div.success,
#s-message div.debug,
#s-message div.warning { padding: 5px; margin-bottom: 10px; }
@@ -204,6 +215,7 @@ label { cursor: pointer; }
#s-message div.error { background-color:#FFCECE; border: 1px solid #CC0000; }
#s-message div.success { background-color:#DFFFDF; border: 1px solid #009900; }
#s-message div.warning { background-color:#FFFFD5; border: 1px solid #FFCC00; }
#s-message div.debug { background-color:#FFFFFF; border: 1px solid #EAEAEA; }
.message-title { height: 32px; background: 0 50% no-repeat; padding-left: 42px; font-size: 14px; font-weight: bold; line-height: 32px; }
@@ -211,6 +223,7 @@ label { cursor: pointer; }
#s-message div.error .message-title { background-image: url(images/messagebox_critical.png); }
#s-message div.success .message-title { background-image: url(images/ok.png); }
#s-message div.warning .message-title { background-image: url(images/messagebox_warning.png); }
#s-message div.debug .message-title { background-image: url(images/messagebox_info.png); }
.message-body { padding-left: 42px; }
.message-item ()

View File

@@ -1,6 +1,7 @@
<?php
define("EMESSLAN_TITLE_INFO", "System Information");
define("EMESSLAN_TITLE_ERROR", "Critical Error");
define("EMESSLAN_TITLE_ERROR", "Error");
define("EMESSLAN_TITLE_SUCCESS", "Success");
define("EMESSLAN_TITLE_WARNING", "Warning");
define("EMESSLAN_TITLE_DEBUG", "System Debug");
?>