|
|
สถิติแผ่นดินไหวที่มีผลกระทบต่อประเทศไทย
require('../admin/stat/config.inc.php');
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_stat = 20;
$pageNum_stat = 0;
if (isset($_GET['pageNum_stat'])) {
$pageNum_stat = $_GET['pageNum_stat'];
}
$startRow_stat = $pageNum_stat * $maxRows_stat;
mysql_select_db($database_dbconn, $dbconn);
$query_stat = "SELECT * FROM stat ORDER BY id DESC";
$query_limit_stat = sprintf("%s LIMIT %d, %d", $query_stat, $startRow_stat, $maxRows_stat);
$stat = mysql_query($query_limit_stat, $dbconn) or die(mysql_error());
$row_stat = mysql_fetch_assoc($stat);
if (isset($_GET['totalRows_stat'])) {
$totalRows_stat = $_GET['totalRows_stat'];
} else {
$all_stat = mysql_query($query_stat);
$totalRows_stat = mysql_num_rows($all_stat);
}
$totalPages_stat = ceil($totalRows_stat/$maxRows_stat)-1;
$queryString_stat = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_stat") == false &&
stristr($param, "totalRows_stat") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_stat = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_stat = sprintf("&totalRows_stat=%d%s", $totalRows_stat, $queryString_stat);
?>
สถิติแผ่นดินไหวที่มีผลกระทบต่อประเทศไทย |
วันที่ |
เวลา |
ขนาด / ความรุนแรง |
ศูนย์กลาง / ตำแหน่งที่รู้สึก |
บันทึกเหตุการณ์ |
|
|
|
|
|
|
| |