日期:2014-05-17 浏览次数:20503 次
<?php require_once("global.php"); require_once("checkpostandget.php"); $id=$_GET['id']; if (isset($_POST['yue'])&&isset($_POST['ri'])) { $yue = $_POST['yue']; $ri = $_POST['ri']; } else { $yue = date("m"); $ri = date("d"); } if (isset($id)) { $query="select * from list Where id=".intval($_GET['id']).""; } else { $query="select * from list Where M=".$yue." And D=".$ri.""; } $result=mysql_query($query); if (isset($id)) { $c=mysql_query($query); $r=mysql_fetch_object($c); $tit=$yue."月".$ri."日-".$r->Title; } else { $tit=$yue."月".$ri."日-历史上的今天"; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <title>历史上的今天</title> <body> <form action="" method="post"> <input name="act" type="hidden" value="yi" /> </form> <form action="index.php" method="post"> <select name="yue" id="yue"> <option value="<?=date("m")?>" selected="selected"?><?=date("n")?></option> <option value="01">1</option> <option value="02">2</option> <option value="03">3</option> <option value="04">4</option> <option value="05">5</option> <option value="06">6</option> <option value="07">7</option> <option value="08">8</option> <option value="09">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> 月 <select name="ri" id="ri"> <option value="<?=date("d")?>" selected="selected"><?=date("j")?></option> <option value="01">1</option> <option value="02">2</option> <option value="03">3</option> <option value="04">4</option> <option value="05">5</option> <option value="06">6</option> <option value="07">7</option> <option value="08">8</option> <option value="09">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option val