From 04d417359ee62eac18c4b05f4afcc7c78b62a6a7 Mon Sep 17 00:00:00 2001 From: Indra Sutriadi Pipii Date: Sun, 5 Aug 2012 14:35:28 +0800 Subject: [PATCH 1/2] perbaikan tampilan page pd template --- template/default/index_template.inc.php | 2 +- template/default/style.css | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) 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 */ /*----------------------------------------------------------------*/ From cc8e795277306ce652ed29304ac2ed2ef687bef5 Mon Sep 17 00:00:00 2001 From: Hendro Wicaksono Date: Wed, 12 Sep 2012 11:31:13 +0700 Subject: [PATCH 2/2] Add self recovery for database if corrupted (reliability) --- admin/default/home.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) 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 '
    ';