$cur = "trade"; ?>
$menu = "menu1"; ?>
include ("header.inc.php"); ?>
|
|
|
|
| 每週經濟事件展望 |
|
| 經濟事件展望 |
|
if ($_GET['day'] == "") {
$day = date("d", time());
}
if ($_GET['mon'] == "") {
$mon = date("m", time());
}
if ($_GET['yr'] == "") {
$yr = date("Y", time());
}
$strday = mktime(0,0,0,$mon,$day,$yr);
$w = date("w", $strday);
for ($i=$w; $i>0; $i--) {
$pday = $pday + 1;
}
for ($i=$w; $i<6; $i++) {
$nday = $nday + 1;
}
$pdate = mktime(0,0,0,$mon,$day - $pday,$yr);
$ndate = mktime(0,0,0,$mon,$day + $nday,$yr);
//$d2 = strtoupper(date("d M Y", $pdate));
//$d3 = strtoupper(date("d M Y", $ndate));
$prev = strtoupper(date("Y-m-d", $pdate));
$next = strtoupper(date("Y-m-d", $ndate));
$start_day = date("d", $pdate);
$pweek = mktime(0,0,0,$mon,$day - $pday - 1,$yr);
$nweek = mktime(0,0,0,$mon,$day + $nday + 1,$yr);
$nextd = date("d", $nweek);
$nextm = date("m", $nweek);
$nexty = date("Y", $nweek);
$prevd = date("d", $pweek);
$prevm = date("m", $pweek);
$prevy = date("Y", $pweek);
//echo $prev." - ".$next;
//echo "Prev";
//echo " ";
//echo "Next";
?>
|
|
|
| 日期 |
時間 |
地區 |
事件 |
重要性 |
預測值 |
前值 |
富泰點評 |
$date2 = "";
if ($_GET['d'] == "y") {
$today = date("Y-m-d", time());
$sql = "select * from fpi_event where status='active' and (DATE_FORMAT(date2, '%Y-%m-%d')) ='$today' order by date2";
} else {
$sql = "select * from fpi_event where status='active' and (DATE_FORMAT(date2, '%Y-%m-%d')) >='$prev' and (DATE_FORMAT(date2, '%Y-%m-%d')) <='$next' order by date2";
}
$result = mysql_query($sql, $conn);
while ($myrow = mysql_fetch_object($result)) {
$ary = explode(" ",$myrow->date2);
$date = explode("-",$ary[0]);
$time = explode(":",$ary[1]);
$date_text = "";
$bg2 = "#FFFFFF";
if ($ary[0] != $date2) {
$t = strtotime($ary[0]);
$date_text = date("D", $t)." ".date("M d", $t);
$date2 = $ary[0];
$bg2 = "#73A4C5";
}
$import = "";
if ($myrow->important == "H") {
$bg = "#00B378";
$import = "High";
} else if ($myrow->important == "M") {
$bg = "#FEC762";
$import = "Medium";
} else if ($myrow->important == "L") {
$bg = "#63B0DE";
$import = "Low";
}
$fore = "";
if ($myrow->forecast) {
$fore = $myrow->forecast;
}
$previous = "";
if ($myrow->previous2) {
$previous = $myrow->previous2;
}
$photo = "";
$sql = "select * from fpi_country where status='active' and id='$myrow->cty_id'";
$result2 = mysql_query($sql, $conn);
if ($myrow2 = mysql_fetch_object($result2)) {
$photo = $myrow2->name_chi;
if ($myrow2->photo != "") {
$photo = " ";
}
}
?>
|
|
|
=$time[0]?>:=$time[1]?> |
=$photo?> |
=$myrow->name_chi?> |
|
=$fore?> |
=$previous?> |
id?>>
if ($myrow->note_chi != "") { ?>
} ?>
|
} ?>
|
|
|
|
include ("footer.inc.php"); ?>