Skip to content

Commit

Permalink
Merge branch 'master' of github.com:slims/slims5_meranti
Browse files Browse the repository at this point in the history
  • Loading branch information
dicarve committed Sep 22, 2012
2 parents 2e56f34 + cc8e795 commit 3414c57
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 1 deletion.
32 changes: 32 additions & 0 deletions admin/default/home.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -72,6 +73,37 @@
$warnings[] = __('The PATH for <strong>mysqldump</strong> 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 '<li class="warning">Table '.$row[0].' might need to be repaired.</li>';
}
$prevtable = $row[0];
$is_repaired = true;
}
}
}
if (($is_repaired) && !isset($_POST['do_repair'])) {
echo '<li class="warning"><form method="POST"><input type="hidden" name="do_repair" value="1"><input value="Repaire Tables" type="submit"></form></li>';
}

// if there any warnings
if ($warnings) {
echo '<div class="message">';
Expand Down
2 changes: 1 addition & 1 deletion template/default/index_template.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@
<?php echo $header_info; ?>
</div>
<?php } ?>
<div class="section">
<div class="section page">
<div class="collection-detail">
<div class="content-padding"><?php echo $main_content; ?></div>
<div class="clear">&nbsp;</div>
Expand Down
21 changes: 21 additions & 0 deletions template/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
/*----------------------------------------------------------------*/
Expand Down Expand Up @@ -393,6 +409,11 @@ hr
filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=#000000,endColorstr=#000000);
}

.section.page
{
width: 100%;
}

/*----------------------------------------------------------------*/
/* Collection Layout */
/*----------------------------------------------------------------*/
Expand Down

0 comments on commit 3414c57

Please sign in to comment.