<?php require "config.php"; require_once WWW_DIR . "/lib/framework/db.php"; $force = isset($argv[1]) && $argv[1] == "true"; $db = new DB(); $ret = $db->optimise($force); if (count($ret) > 0) { echo "Optmze : Optimised " . count($ret) . " tables\n"; } else { echo "Optmze : Nothing required optimisation." . (!$force ? " Try using force (optimise_db.php true)" : "") . "\n"; }
<?php require_once "config.php"; require_once WWW_DIR . "/lib/adminpage.php"; require_once WWW_DIR . "/lib/framework/db.php"; $page = new AdminPage(); $db = new DB(); $tablelist = $db->optimise(); $page->title = "DB Table Optimise"; $page->smarty->assign('tablelist', $tablelist); $page->content = $page->smarty->fetch('db-optimise.tpl'); $page->render();
<?php require "config.php"; require_once WWW_DIR . "/lib/framework/db.php"; $db = new DB(); $db->optimise();