Baanboa Guest House - Home away from home
Baan Boa
Guest House

Our room are all nicely appointed, air-conditioned and furnished with refrigerator, satellite TV&UBC
Baan Boa II
We have 3 floors of newly constructed large and spacious rooms. All are equipped with private bathroom, shower and solar cell hot water.
Baan Boa Guest House
186/2 Pisitkorraneen Rd., Patong, Kathu Phuket 83150 Thailand
Tel. (6676) 296366-7  Fax. (6676) 296593
Email: baanboa1@baanboaresort.com
Baan Boa II
15 Na-*Nai Rd., Patong, Kathu, Phuket 83150 Thailand
Tel. (6676) 296717-8  Fax. (6676) 296719
Email: banboa2@banboaresort.com
 
Copy Right 2003. All rights reserved.  Designed and Maintained by  Rachada Srepaotong
ript errors in incompatible browsers // set $DHTMLenabled = TRUE to get the nice DHTML display in recent browsers $dbNameInCreate = false; // if true: "CREATE TABLE `database`.`table`", if false: "CREATE TABLE `table`" $CreateIfNotExists = false; // if true: "CREATE TABLE IF NOT EXISTS `database`.`table`", if false: "CREATE TABLE `database`.`table`" $ReplaceInto = false; // if true: "REPLACE INTO ", if false: "INSERT INTO " $HexBLOBs = true; // if true: blobs get data dumped as hex string; if false: blobs get data dumped as escaped binary string $SuppressHTMLoutput = (@$_REQUEST['nohtml'] ? true : false); // disable all output for running as a cron job $backuptimestamp = '.'.date('Y-m-d.H-i'); // timestamp if (!empty($_REQUEST['onlyDB'])) { $backuptimestamp = '.'.$_REQUEST['onlyDB'].$backuptimestamp; } //$backuptimestamp = ''; // no timestamp $backupabsolutepath = dirname(__FILE__).'/backupdb/'; // make sure to include trailing slash $fullbackupfilename = $DB_NAME.''.$backuptimestamp.'.sql'.($GZ_enabled ? '.gz' : ''); $tempbackupfilename = $DB_NAME.'.temp.sql'.($GZ_enabled ? '.gz' : ''); $NeverBackupDBtypes = array('HEAP'); if (!function_exists('getmicrotime')) { function getmicrotime() { list($usec, $sec) = explode(' ', microtime()); return ((float) $usec + (float) $sec); } } function FormattedTimeRemaining($seconds, $precision=1) { if ($seconds > 86400) { return number_format($seconds / 86400, $precision).' days'; } elseif ($seconds > 3600) { return number_format($seconds / 3600, $precision).' hours'; } elseif ($seconds > 60) { return number_format($seconds / 60, $precision).' minutes'; } return number_format($seconds, $precision).' seconds'; } function FileSizeNiceDisplay($filesize, $precision=2) { if ($filesize < 1000) { $sizeunit = 'bytes'; $precision = 0; } else { $filesize /= 1024; $sizeunit = 'kB'; } if ($filesize >= 1000) { $filesize /= 1024; $sizeunit = 'MB'; } if ($filesize >= 1000) { $filesize /= 1024; $sizeunit = 'GB'; } return number_format($filesize, $precision).' '.$sizeunit; } function OutputInformation($id, $dhtml, $text='') { global $DHTMLenabled; if ($DHTMLenabled) { if (!is_null($dhtml)) { if ($id) { echo ''; } else { echo $dhtml; } flush(); } } else { if ($text) { echo $text; flush(); } } return true; } if (isset($_REQUEST['StartBackup'])) { if (!@mysql_connect($DB_HOST, $DB_USER, $DB_PASS) || !@mysql_select_db($DB_NAME)) { echo""._backerror1.":
"."\n".mysql_error(); echo"

"; footer(); exit; } } if (!is_dir($backupabsolutepath)) { echo'"'.htmlentities($backupabsolutepath).'""._backerror1."'; echo"

"; footer(); exit; } elseif (!is_writable($backupabsolutepath)) { echo'"'.htmlentities($backupabsolutepath).'""._backerror2."'; echo"

"; footer(); exit; } if ($SuppressHTMLoutput) { ob_start(); } echo "

"._backmdb."

"; $dbname = $DB_NAME; if (isset($_REQUEST['StartBackup'])) { if (($GZ_enabled && ($zp = @gzopen($backupabsolutepath.$tempbackupfilename, 'wb'))) || (!$GZ_enabled && ($fp = @fopen($backupabsolutepath.$tempbackupfilename, 'wb')))) { $fileheaderline = '# Snfoor 3.5 (http://www.magtrb.com)'.LINE_TERMINATOR; $fileheaderline .= '# mySQL backup ('.date('F j, Y g:i a').') Type = '; if ($GZ_enabled) { gzwrite($zp, $fileheaderline, strlen($fileheaderline)); } else { fwrite($fp, $fileheaderline, strlen($fileheaderline)); } if ($GZ_enabled) { gzwrite($zp, 'Complete'.LINE_TERMINATOR.LINE_TERMINATOR, strlen('Complete'.LINE_TERMINATOR.LINE_TERMINATOR)); } else { fwrite($fp, 'Complete'.LINE_TERMINATOR.LINE_TERMINATOR, strlen('Complete'.LINE_TERMINATOR.LINE_TERMINATOR)); } $backuptype = 'full'; unset($SelectedTables); @set_time_limit(60); $tables = mysql_list_tables($dbname); if (is_resource($tables)) { $tablecounter = 0; while (list($tablename) = mysql_fetch_array($tables)) { $TableStatusResult = mysql_query('SHOW TABLE STATUS LIKE "'.mysql_escape_string($tablename).'"'); if ($TableStatusRow = mysql_fetch_array($TableStatusResult)) { if (in_array($TableStatusRow['Type'], $NeverBackupDBtypes)) { // no need to back up HEAP tables, and will generate errors if you try to optimize/repair } else { $SelectedTables[$dbname][] = $tablename; } } } } $starttime = getmicrotime(); OutputInformation('', null, 'Checking tables...

'); $TableErrors = array(); if(empty($SelectedTables)){ echo""._back1.""; echo"

"; footer(); exit;} foreach ($SelectedTables as $dbname => $selectedtablesarray) { mysql_select_db($dbname); $repairresult = ''; $CanContinue = true; foreach ($selectedtablesarray as $selectedtablename) { OutputInformation('statusinfo', 'Checking table '.$dbname.'.'.$selectedtablename.''); $result = mysql_query('CHECK TABLE '.$selectedtablename); while ($row = mysql_fetch_array($result)) { @set_time_limit(60); if ($row['Msg_text'] == 'OK') { mysql_query('OPTIMIZE TABLE '.$selectedtablename); } else { OutputInformation('statusinfo', 'Repairing table '.$selectedtablename.''); $repairresult .= 'REPAIR TABLE '.$selectedtablename.' EXTENDED'."\n\n"; $fixresult = mysql_query('REPAIR TABLE '.$selectedtablename.' EXTENDED'); $ThisCanContinue = false; while ($fixrow = mysql_fetch_array($fixresult)) { $thisMessage = $fixrow['Msg_type'].': '.$fixrow['Msg_text']; $repairresult .= $thisMessage."\n"; switch ($thisMessage) { case 'status: OK': case 'error: The handler for the table doesn\'t support repair': case 'note: The storage engine for the table doesn\'t support repair': $ThisCanContinue = true; break; } } if (!$ThisCanContinue) { $CanContinue = false; } $repairresult .= "\n\n".str_repeat('-', 60)."\n\n"; } } } if (!empty($repairresult)) { @mail(ADMIN_EMAIL, 'backupDB: MySQL Table Error Report', $repairresult); echo '
'.$repairresult.'
'; if (!$CanContinue) { if ($SuppressHTMLoutput) { ob_end_clean(); echo 'errors'; } exit; } } } OutputInformation('statusinfo', ''); OutputInformation('', "
"._backovpss.":
"); $overallrows = 0; foreach ($SelectedTables as $dbname => $value) { mysql_select_db($dbname); // echo '