|
|
|
|
$que = "select * from shop_list where upper_code='SN3' and goods_regist='1' order by goods_counter desc, goods_date desc limit 0,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
$que = "select * from shop_list where upper_code='SN3' and goods_regist='1' order by goods_counter desc, goods_date desc limit 4,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
|
|
$que = "select * from shop_list where upper_code='SN2' and goods_regist='1' order by goods_counter desc, goods_date desc limit 0,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
$que = "select * from shop_list where upper_code='SN2' and goods_regist='1' order by goods_counter desc, goods_date desc limit 4,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
|
|
$que = "select * from shop_list where upper_code='SN5' and goods_regist='1' order by goods_counter desc, goods_date desc limit 0,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
$que = "select * from shop_list where upper_code='SN5' and goods_regist='1' order by goods_counter desc, goods_date desc limit 4,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
|
|
$que = "select * from shop_list where upper_code='SN1' and goods_regist='1' order by goods_counter desc, goods_date desc limit 0,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
$que = "select * from shop_list where upper_code='SN1' and goods_regist='1' order by goods_counter desc, goods_date desc limit 4,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
|
|
$que = "select * from shop_list where upper_code='SN8' and goods_regist='1' order by goods_counter desc, goods_date desc limit 0,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
$que = "select * from shop_list where upper_code='SN8' and goods_regist='1' order by goods_counter desc, goods_date desc limit 4,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
|
|
$que = "select * from shop_list where upper_code='SN9' and goods_regist='1' order by goods_counter desc, goods_date desc limit 0,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
$que = "select * from shop_list where upper_code='SN9' and goods_regist='1' order by goods_counter desc, goods_date desc limit 4,4";
$result = mysql_query($que, $conn);
$j=0;
while($row = mysql_fetch_array($result))
{
$code = $row["code"];
$upper_code = $row["upper_code"];
$middle_code = $row["middle_code"];
$goods_price = $row["goods_price"];
$goods_name = $row["goods_name"];
$goods_make = $row["goods_make"];
$goods_color = $row["goods_color"];
$goods_size = $row["goods_size"];
$goods_content = $row["goods_content"];
$goods_counter = $row["goods_counter"];
$regist_date = $row["regist_date"];
$goods_date = $row["goods_date"];
$goods_regist = intval($row["goods_regist"]);
$goods_main_hit = $row["goods_main_hit"];
$goods_main_today = $row["goods_main_today"];
$goods_best = $row["goods_best"];
$goods_sub_best = $row["goods_sub_best"];
$goods_new = $row["goods_new"];
$goods_event = $row["goods_event"];
$imgurl1 = $row["imgurl1"];
$imgurl2 = $row["imgurl2"];
$imgurl3 = $row["imgurl3"];
$imgurl4 = $row["imgurl4"];
$imgurl5 = $row["imgurl5"];
$imgurl6 = $row["imgurl6"];
$imgurl7 = $row["imgurl7"];
$imgurl8 = $row["imgurl8"];
$imgurl9 = $row["imgurl9"];
$imgurl10 = $row["imgurl10"];
$que = "select shop_catagory_upper.upper_name,shop_catagory_middle.middle_name from shop_catagory_upper,shop_catagory_middle where shop_catagory_upper.upper_code = shop_catagory_middle.upper_code and shop_catagory_middle.middle_code='$middle_code'";
$result2 = mysql_query($que, $conn);
$row2 = mysql_fetch_row($result2);
$upper_name = $row2[0];
$middle_name = $row2[1];
?>
|
if($goods_regist) {
?>
0¿ø
} else {
echo "Ç°Àý";
}
?>
|
|
}
?>
|
|
|
if(!$count_cook)
{
$sqluser = "livingblue";
$sqlpwd = "com007";
$sqldb = "livingblue";
$sqlhost = "localhost";
$conn= mysql_connect("$sqlhost","$sqluser","$sqlpwd") or die("db ¼¹ö ¿¬°É¿À·ù");
mysql_select_db("$sqldb", $conn);
$ftime = getdate(time());
$cyear = $ftime[year];
$cmon = $ftime[mon];
$cday = $ftime[mday];
$chours = $ftime[hours];
$itime = $cyear."- ".$cmon."¿ù ".$cday."ÀÏ";
if($cmon <10){
$cmon = "0" . $cmon;
}
if($cday <10){
$cday = "0" . $cday;
}
$cdate = $cyear . $cmon . $cday ;
$chdate = $cyear . "-" . $cmon . "-" . $cday ;
$que = "select * from counter where cdate='$cdate'";
$result = mysql_query($que, $conn);
$row = mysql_fetch_row($result);
if($row[0] > 0)
{
switch($chours)
{
case '0' :
$que = "update counter set zero=zero + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '1' :
$que = "update counter set one=one + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '2' :
$que = "update counter set two=two + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '3' :
$que = "update counter set three=three + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '4' :
$que = "update counter set four=four + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '5' :
$que = "update counter set five=five + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '6' :
$que = "update counter set six=six + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '7' :
$que = "update counter set seven=seven + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '8' :
$que = "update counter set eight=eight + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '9' :
$que = "update counter set nine=nine + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '10' :
$que = "update counter set ten=ten + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '11' :
$que = "update counter set eleven=eleven + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '12' :
$que = "update counter set twelve=twelve + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '13' :
$que = "update counter set thirteen=thirteen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '14' :
$que = "update counter set fourteen=fourteen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '15' :
$que = "update counter set fifteen=fifteen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '16' :
$que = "update counter set sixteen=sixteen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '17' :
$que = "update counter set seventeen=seventeen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '18' :
$que = "update counter set eighteen=eighteen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '19' :
$que = "update counter set nineteen=nineteen + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '20' :
$que = "update counter set twenty=twenty + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '21' :
$que = "update counter set twentyone=twentyone + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '22' :
$que = "update counter set twentytwo=twentytwo + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
case '23' :
$que = "update counter set twentythree=twentythree + 1 where cdate='$cdate'";
mysql_query($que, $conn);
break;
}
}
else
{
$que = "insert into counter(cdate) values('$cdate')";
mysql_query($que, $conn);
}
}
?>
|