diff --git a/admin/default/home.php b/admin/default/home.php index 945d47a..2fc78e8 100755 --- a/admin/default/home.php +++ b/admin/default/home.php @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * + * some patches by hendro */ // key to authenticate @@ -72,6 +73,37 @@ $warnings[] = __('The PATH for mysqldump program is not right! Please check configuration file or you won\'t be able to do any database backups.'); } +// check need to be repaired mysql database +$query_of_tables = $dbs->query('SHOW TABLES'); +$num_of_tables = $query_of_tables->num_rows; +$prevtable = ''; +$is_repaired = false; + +if (isset ($_POST['do_repair'])) { + if ($_POST['do_repair'] == 1) { + while ($row = $query_of_tables->fetch_row()) { + $sql_of_repair = 'REPAIR TABLE '.$row[0]; + $query_of_repair = $dbs->query ($sql_of_repair); + } + } +} + +while ($row = $query_of_tables->fetch_row()) { + $query_of_check = $dbs->query('CHECK TABLE '.$row[0]); + while ($rowcheck = $query_of_check->fetch_assoc()) { + if (!(($rowcheck['Msg_type'] == "status") && ($rowcheck['Msg_text'] == "OK"))) { + if ($row[0] != $prevtable) { + echo '
  • Table '.$row[0].' might need to be repaired.
  • '; + } + $prevtable = $row[0]; + $is_repaired = true; + } + } +} +if (($is_repaired) && !isset($_POST['do_repair'])) { + echo '
  • '; +} + // if there any warnings if ($warnings) { echo '
    '; diff --git a/template/default/index_template.inc.php b/template/default/index_template.inc.php index 8b77308..cf16a32 100755 --- a/template/default/index_template.inc.php +++ b/template/default/index_template.inc.php @@ -319,7 +319,7 @@
    -
    +
     
    diff --git a/template/default/style.css b/template/default/style.css index 05b95bd..367ee80 100755 --- a/template/default/style.css +++ b/template/default/style.css @@ -108,6 +108,22 @@ hr } +label span { + width: 200px; + float: left; + display: inline; +} + +input[type=radio] { + width: auto; + padding: 5px; +} + +p.strip { + border-bottom: 1px solid #FFF; + padding-bottom: 5px; +} + /*----------------------------------------------------------------*/ /* Header Layout */ /*----------------------------------------------------------------*/ @@ -393,6 +409,11 @@ hr filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#000000,endColorstr=#000000); } +.section.page +{ + width: 100%; +} + /*----------------------------------------------------------------*/ /* Collection Layout */ /*----------------------------------------------------------------*/