|
|
if (file_exists("current_ty.dat"))
{
$fp = fopen("current_ty.dat", "r");
$no = (int)trim(fgets($fp));
if ($no > 0)
{
$tyno = array();
$tynm = array();
for ($i=0; $i<$no; $i++)
{
$str = trim(fgets($fp));
$tyno[$i] = substr($str, 0, 4);
$tynm[$i] = substr($str, 4, 10);
}
echo "";
for ($i=0; $i□ ".$tyno[$i]." ".$tynm[$i]." ";
}
echo " | ";
echo "
| ";
}
else
{
echo " | \n";
}
}
else
{
echo "현재태풍 데이터 읽기 실패 | \n";
}
?>
|
|
if (file_exists("tc_old.dat"))
{
$tyb = file("tc_old.dat");
$no = (int)$tyb[0];
if ($no >= 15) $noo = 15;
else $noo = $no;
$cnt = 0;
?>
if ($noo >= 1) { ?> } ?> |
if ($noo >= 1) { ?> more } ?> |
|
for ($i=1; $i<=$noo; $i++)
{
$ty_no = substr($tyb[$i], 0, 4);
$ty_year = substr($tyb[$i], 0, 2);
$ty_name = trim(substr($tyb[$i], 4, 10));
if (trim($ty_name) == "") $ty_name='NONAME';
$ty_html = "../tyinfo.php?tyno=".$ty_no;
// modified by kbshin
//if ($ty_year == "04") $ty_html = "../tyinfo.php?tyno=".$ty_no;
//else $ty_html = $ty_no.".html";
if ($i == 1) echo "\n";
if ($i == 1 || $i == 6 || $i == 11) echo "";
echo "".$ty_no." ".$ty_name." ";
if ($i == 5 || $i == 10 || $i == 15) echo " | \n";
}
if ($noo < 1) echo "  | \n";
}
else echo "Unknown typhoon data file | \n";
?>
|
|
|
|
$sql = mysql_query("select subject, idx, date from notice order by num DESC limit 0, 4");
for ($i=1; $i<=4; $i++)
{
$data = mysql_fetch_array($sql);
$subject = stripslashes($data[subject]);
echo "\n";
echo "· ".sub_str($subject, 56, '')." | \n";
echo "[".substr($data[date], 5, 5)."] | \n";
echo " \n";
}
?>
|
|
$sql = mysql_query("select subject, idx, date from sense order by idx DESC limit 0, 4");
for ($i=1; $i<=4; $i++)
{
$data = mysql_fetch_array($sql);
$subject = stripslashes($data[subject]);
echo "\n";
echo "· ".sub_str($subject, 54, '')." | \n";
echo "[".substr($data[date], 5, 5)."] | \n";
echo " \n";
}
?>
|
|
|
$date = date("Y-m-d");
$sql = mysql_query("select count from countday where date = '$date'");
$today_count = mysql_result($sql, 0, 0);
$sql = mysql_query("select sum(count) from countday");
$total_count = mysql_result($sql, 0, 0);
?>
접속 통계
|
|
TOTAL |
0 Hits |
TODAY |
0 Hits |
|
|
|