<?php

/* 	This process will optimize tables used in osDate DB.

	Vijay Nair
*/
if ( !defined( 'SMARTY_DIR' ) ) {

	include_once( '../init.php' );

}

$tab =& $osDB->getAll( 'show tables' );

@set_time_limit(6000);

foreach( $tab as $num=>$tbx ) {

	$tbl = array_values($tbx);

	$osDB->query("optimize table ".$tbl[0]);

}
unset($tab);

$t->assign('lang', $lang);

$t->assign('rendered_page', $t->fetch('admin/optimize_tables.tpl'));

$t->display( 'admin/index.tpl' );

exit;
?>