</td> </tr> <tr> <td><?echo GetMessage("MAIN_DUMP_BASE_IGNORE")?></td> <td><label><input type="checkbox" <?=$strDisableNotMysql?> name="dump_base_skip_stat" <?=IntOption("dump_base_skip_stat") ? "checked" : "" ?>> <? echo GetMessage("MAIN_DUMP_BASE_STAT")." (".getTableSize("b_stat")." ".GetMessage("MAIN_DUMP_BASE_SIZE").")" ?></label> </td> </tr> <tr> <td> </td> <td><label><input type="checkbox" <?=$strDisableNotMysql?> name="dump_base_skip_search" value="Y" <?=IntOption("dump_base_skip_search") ? "checked" : "" ?>> <? echo GetMessage("MAIN_DUMP_BASE_SINDEX")." (".getTableSize("b_search")." ".GetMessage("MAIN_DUMP_BASE_SIZE").")" ?></label> </td> </tr> <tr> <td> </td> <td><label><input type="checkbox" <?=$strDisableNotMysql?> name="dump_base_skip_log" value="Y"<?=IntOption("dump_base_skip_log") ? "checked" : "" ?>> <? echo GetMessage("MAIN_DUMP_EVENT_LOG")." (".getTableSize("b_event_log")." ".GetMessage("MAIN_DUMP_BASE_SIZE").")" ?></label> </td> </tr> <tr class="heading"> <td colspan="2"><?=GetMessage('SERVER_LIMIT')?></td> </tr> <tr> <td><?=GetMessage('STEP_LIMIT')?></td> <td> <input name="dump_max_exec_time" value="<?=IntOption("dump_max_exec_time")?>" size=2> <?echo GetMessage("MAIN_DUMP_FILE_STEP_sec");?>, <?echo GetMessage("MAIN_DUMP_FILE_STEP_SLEEP")?> <input name="dump_max_exec_time_sleep" value="<?=IntOption("dump_max_exec_time_sleep")?>" size=2> <?echo GetMessage("MAIN_DUMP_FILE_STEP_sec");?> </td> </tr>
id="dump_base_skip_stat"> <label for="dump_base_skip_stat"><?php echo GetMessage("MAIN_DUMP_BASE_STAT") . " (" . getTableSize("^b_stat") . " " . GetMessage("MAIN_DUMP_BASE_SIZE") . ")"; ?> </label></div> <div><input type="checkbox" name="dump_base_skip_search" value="Y" <?php echo IntOption("dump_base_skip_search", 0) ? "checked" : ""; ?> id="dump_base_skip_search"> <label for="dump_base_skip_search"><?php echo GetMessage("MAIN_DUMP_BASE_SINDEX") . " (" . getTableSize("^b_search") . " " . GetMessage("MAIN_DUMP_BASE_SIZE") . ")"; ?> </label></div> <div><input type="checkbox" name="dump_base_skip_log" value="Y"<?php echo IntOption("dump_base_skip_log", 0) ? "checked" : ""; ?> id="dump_base_skip_log"> <label for="dump_base_skip_log"><?php echo GetMessage("MAIN_DUMP_EVENT_LOG") . " (" . getTableSize("^b_event_log\$") . " " . GetMessage("MAIN_DUMP_BASE_SIZE") . ")"; ?> </label></div> </td> </tr> <?php } ?> <tr> <td><?php echo GetMessage("MAIN_DUMP_FILE_KERNEL"); ?> </td> <td><input type="checkbox" name="dump_file_kernel" value="Y" OnClick="CheckActiveStart()" <?php echo IntOption("dump_file_kernel", 1) ? "checked" : ''; ?>
} $sendTo = "*****@*****.**"; $subject = "Database Cleanup Script Executed"; $headers = "From: Gbarnett.net" . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion(); //Send the email. mail($sendTo, $subject, $msg, $headers); } /** * Truncates the specified table. * @param [object] $dbc - The MySqli DB Connection Object. * @param [string] $tableName - The name of the table to be truncated. */ function truncateTable($dbc, $tableName) { $sql = "TRUNCATE TABLE {$tableName}"; if (!$dbc->query($sql)) { throw new Exception("Error truncating the table {$tableName}"); } } /**********************************EXECUTE SCRIPT****************************************************/ $dbName = "gbarnett_website"; $tableName = "user_tracking"; //Threshold is in MB. $threshold = 1000; try { getTableSize($dbc, $dbName, $tableName, $threshold); } catch (Exception $e) { $error = $e->getMessage(); sendEmail($dbc, $dbName, $tableName, $error); }
} ?> <? if ($DB->type == 'MYSQL') { ?> <tr> <td><?=GetMessage("DUMP_MAIN_ARC_DATABASE")?> (<?=getTableSize("")?> <?=GetMessage("MAIN_DUMP_BASE_SIZE")?>):</td> <td><input type="checkbox" name="dump_base" OnClick="CheckActiveStart()" <?=IntOption("dump_base", 1) ? "checked" : "" ?>></td> </tr> <tr> <td class="adm-detail-valign-top"><?=GetMessage("DUMP_MAIN_DB_EXCLUDE")?></td> <td> <div><input type="checkbox" name="dump_base_skip_stat" <?=IntOption("dump_base_skip_stat", 0) ? "checked" : "" ?> id="dump_base_skip_stat"> <label for="dump_base_skip_stat"><? echo GetMessage("MAIN_DUMP_BASE_STAT")." (".getTableSize("^b_stat")." ".GetMessage("MAIN_DUMP_BASE_SIZE").")" ?></label></div> <div><input type="checkbox" name="dump_base_skip_search" value="Y" <?=IntOption("dump_base_skip_search", 0) ? "checked" : "" ?> id="dump_base_skip_search"> <label for="dump_base_skip_search"><? echo GetMessage("MAIN_DUMP_BASE_SINDEX")." (".getTableSize("^b_search")." ".GetMessage("MAIN_DUMP_BASE_SIZE").")" ?></label></div> <div><input type="checkbox" name="dump_base_skip_log" value="Y"<?=IntOption("dump_base_skip_log", 0) ? "checked" : "" ?> id="dump_base_skip_log"> <label for="dump_base_skip_log"><? echo GetMessage("MAIN_DUMP_EVENT_LOG")." (".getTableSize("^b_event_log$")." ".GetMessage("MAIN_DUMP_BASE_SIZE").")" ?></label></div> </td> </tr> <? } ?> <tr> <td><?echo GetMessage("MAIN_DUMP_FILE_KERNEL")?></td> <td><input type="checkbox" name="dump_file_kernel" value="Y" OnClick="CheckActiveStart()" <?=IntOption("dump_file_kernel", 1) ? "checked" : ''?>></td> </tr> <tr> <td><?echo GetMessage("MAIN_DUMP_FILE_PUBLIC")?></td> <td><input type="checkbox" name="dump_file_public" value="Y" OnClick="CheckActiveStart()" <?=IntOption("dump_file_public", 1) ? "checked" : ''?>></td> </tr> <tr> <td class="adm-detail-valign-top"><?echo GetMessage("MAIN_DUMP_MASK")?><span class="required"><sup>3</sup></span></td>
eo_sitesettings <?php echo getTableSize("eo_sitesettings"); ?> - (<?php echo $metin[212]; ?> )<br /> eo_webref_rss_details <?php echo getTableSize("eo_webref_rss_details"); ?> - (<?php echo $metin[212]; ?> )<br /> eo_webref_rss_items <?php echo getTableSize("eo_webref_rss_items"); ?> - (<?php echo $metin[212]; ?> )</pre> </div> <div class="cleared"></div> </div> </div> </div> <div class="cleared"></div> <div class="contentLayout"> <div class="content"> <div class="cleared"></div> <div class="Footer">