session_start(); // Register all the neccessary session variables in this index page include '../configuration/session_variables.php'; // Include the configuration variables include '../configuration/config.php'; // Create a database connection to kit database include '../configuration/connect_db.php'; //if ($display_year=='') // $display_year=date('Y'); $fishing_diary_id = $_GET['fishing_diary_id']; $display_year= $_GET['display_year']; // Include the tracking if ($fishing_diary_id!='') $track_page_name='DIARY - Fishing index page -'.$fishing_diary_id; else $track_page_name='FISHING DIARY YEAR '.$display_year; include '../tracking/track.inc'; if (strstr($_SERVER['HTTP_REFERER'],'uwants')){ // Forward unwanted outside refers to a declearation page header ("location: ../fishing/refer.php?refer=uwant_forum"); } else if(strstr($_SERVER['HTTP_REFERER'],'discuss')){ header ("location: ../fishing/refer.php?refer=discuss"); }else if ((strstr($ip_addr,'147.8.') || strstr($ip_addr,'158.132.')) && $_SESSION["user"]["user_id"]!=1 && $ip_addr!='147.8.177.159') header ("location:../about_kit/index.php"); else if (!($_COOKIE["fishing_watch"]=='Y' || $_COOKIE["fishing_watch"]=='N') && $_SESSION["user"]["user_id"]!="1" && $_SESSION["user"]["user_id"]!="2"){ // Ask if display hunting header ("location:declare.php"); } $with_hunting=$_COOKIE["fishing_watch"]; $display_range[0]=0; $display_range[1]=99999; if (($fishing_diary_id<$display_range[0] || $fishing_diary_id>$display_range[1]) && $_SESSION["user"]["user_id"]!="1" && $_SESSION["user"]["user_id"]!="2" && $fishing_diary_id!='') header ("location:index.php"); function place_path($input,$db_link,$server_path) { global $place_path_output; $query = "select * from `fishing_db_place` where place_id='".$input."'"; $result = mysql_query($query,$db_link) or die("Query failed: Failed to select from fishing_db_fish"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)){ if ($line['ref_place_id']!='0') $return_flag=place_path($line['ref_place_id'],$db_link,$server_path); if ($return_flag==1) $place_path_output.= " > "; if ($line['public']==0 && $_SESSION["user"]["user_id"]!="1" && $_SESSION["user"]["user_id"]!="2") $place_path_output.= "秘位"; else{ if ($line['x']!=''){ $place_path_output.= "".$line['name']." "; }else $place_path_output.= "".$line['name'].""; } if ($line['public']==1 && $fly_to_upper_location==0){ global $fly_to_upper_location; $fly_to_upper_location=1; global $google_map_x; $google_map_x=$line['x']; global $google_map_y; $google_map_y=$line['y']; global $google_map_zoom; $google_map_zoom=$line['zoom']; global $google_map_point_x; $google_map_point_x=$line['point_x']; global $google_map_point_y; $google_map_point_y=$line['point_y']; } } mysql_free_result($result); return 1; } $query = "select * from fishing_db_diary_asoc_place a, fishing_db_place b where a.place_id=b.place_id and a.fishing_diary_id='".$fishing_diary_id."'"; $result = mysql_query($query,$db_link) or die("Query failed : Failed to select the fishing diary place info from database"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)) $search_result[count($search_result)]=$line; mysql_free_result($result); $query2 = "select start_x,start_y,zoom from `fishing_diary` where fishing_diary_id='".$fishing_diary_id."' "; $result2 = mysql_query($query2,$db_link) or die("Query failed : Failed to select the startup map x,y,zoom from database"); while ($line2=mysql_fetch_array($result2, MYSQL_ASSOC)) $start_up=$line2; mysql_free_result($result2); // Google Map ?>
// Inlclude the neccessary modules $_PAGE['title'] = 'Fishing & Scuba Diving Diary 傑仔的釣魚和浮潛日記 '; $_PAGE['meta_keywords'] = '釣魚 船釣 艇釣 釣點 沉船位 青班 石班 西貢 艇家 魚餌 魚獲圖片 釣魚短片 釣魚電影 魚絲 魚鉤 呔魚 排口 大蝦 八爪 三們仔 塔門'; $page_marquee=' This page is written in Chinese language. Fishing, Diving, lots of fun ! 放生BB魚,保護大自然,大家齊響應! Protect the natural environment.'; $_page_top_banner='top_banner.jpg'; $site_helper='5.gif'; echo $_USER['browser']; //$_page_activate_moving_menu=1; $_page_is_fishing=1; $_page_fish_uncle='left'; $_page_selected_diary='left'; $_page_fish_search='left'; $_page_place_search='left'; $_page_fish_uncle_boat='left'; $_page_fish_chattabox='left'; include '../modules/default.inc'; $_SESSION["message"]=''; $_SESSION["user"]["site_helper"]=''; if ($fishing_diary_id!="") echo ""; else echo ""; // Include the page banner $page_banner_no_bgcolor=0; $page_banner='diving.jpg'; include '../modules/page_banner.inc'; if ($_SESSION["user"]["user_id"]!="1" && $_SESSION["user"]["user_id"]!="2"){ if ($with_hunting=='Y'){ if (trim($display_year)=='') $query = "select display_content,day,month,year,place,image_source,time,title,get,fishing_diary_id,title_image,have_photo,have_movie from `fishing_diary` where display='Y' and diary_type='kit' order by priority desc limit ".$_fishing_diary_display_no_of_entry; else $query = "select display_content,day,month,year,place,image_source,time,title,get,fishing_diary_id,title_image,have_photo,have_movie from `fishing_diary` where fishing_diary_id>='".$display_range[0]."' and fishing_diary_id<='".$display_range[1]."' and display='Y' and year='".$display_year."' and diary_type='kit' order by priority desc"; }else{ if (trim($display_year)=='') $query = "select display_content,day,month,year,place,image_source,time,title,get,fishing_diary_id,title_image,have_photo,have_movie from `fishing_diary` where display='Y' and with_hunting='".$with_hunting."' and diary_type='kit' order by priority desc limit ".$_fishing_diary_display_no_of_entry; else $query = "select display_content,day,month,year,place,image_source,time,title,get,fishing_diary_id,title_image,have_photo,have_movie from `fishing_diary` where fishing_diary_id>='".$display_range[0]."' and fishing_diary_id<='".$display_range[1]."' and display='Y' and with_hunting='".$with_hunting."' and year='".$display_year."' and diary_type='kit' order by priority desc"; } }else{ if (trim($display_year)=='') $query = "select display_content,day,month,year,place,image_source,time,title,get,fishing_diary_id,title_image,have_photo,have_movie from `fishing_diary` where diary_type='kit' order by priority desc limit ".$_fishing_diary_display_no_of_entry; else $query = "select display_content,day,month,year,place,image_source,time,title,get,fishing_diary_id,title_image,have_photo,have_movie from `fishing_diary` where year='".$display_year."' and diary_type='kit' order by priority desc"; } $result = mysql_query($query,$db_link) or die("Query failed : Failed to select the fishing diary from database"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)) $fishing[count($fishing)]=$line; mysql_free_result($result); if ($fishing_diary_id!=""){ if ($_SESSION["user"]["user_id"]!="1" && $_SESSION["user"]["user_id"]!="2"){ if ($with_hunting=='Y') $query = "select * from `fishing_diary` where fishing_diary_id='".$fishing_diary_id."' and display='Y' and diary_type='kit' "; else $query = "select * from `fishing_diary` where fishing_diary_id='".$fishing_diary_id."' and display='Y' and with_hunting='".$with_hunting."' and diary_type='kit' "; }else $query = "select * from `fishing_diary` where fishing_diary_id='".$fishing_diary_id."' and diary_type='kit' "; $result = mysql_query($query,$db_link) or die("Query failed : Failed to select the fishing diary from database"); while ($line=mysql_fetch_array($result, MYSQL_ASSOC)) $fishing_message=$line; mysql_free_result($result); } include $server_path.'/fishing/index_introduction_module.inc'; //helper ("Fishing, Diving, lots of fun !Hello 各位好! 又有一件事希望大家幫幫忙了, 我們有2張$4,000 勝景旅遊 S.K.Y. Travel 的Coupons. 可以用來訂機票,book酒店,旅行團等一切消費, 可惜傑仔和家人未能抽出時間去旅行...Coupons不能使用了... 使用Coupons的最後期限是31-3-2007, 不過都可以用來book之後的機票., 真的不想浪費喔.... 如果您有興趣, 我們可以以平價出讓給您, 請send email 去 kit[dot]fishing[at]gmail[dot]com 聯絡吧! Thank you |
顯示"; for ($i=(int)date('Y') ; $i>=2004 ; $i--){ if ($display_year==$i) echo "".$i." "; else echo "".$i." "; } echo "年的美好回憶. | "; echo ""; if ($with_hunting=='Y') echo "顯示 / 不顯示 內容包含獵魚活動的日記. |
時間 | 地點 | 主題 | 收穫 | 詳情 |
".$fishing[$i]["day"]."-".$fishing[$i]["month"]."-".$fishing[$i]["year"]." ".$fishing[$i]["time"]." | ";
echo "".$fishing[$i]["place"]." | "; echo "".$fishing[$i]["title"]." | "; if (strlen($fishing[$i]["get"])>33) echo "".substr($fishing[$i]["get"],0,37)."... | "; else echo "".$fishing[$i]["get"]." | "; echo ""; if ($fishing[$i]['display_content']=='Y' || $_SESSION["user"]["user_id"]=="1") echo ""; // Select random one out of the # of pics provided $fishing_pic_array=split(',',$fishing[$i]["title_image"]); $fish_pic_key=rand(0,count($fishing_pic_array)-1); $fishing[$i]["title_image"]=$fishing[$i]["image_source"].$fishing_pic_array[$fish_pic_key]; if ($fishing[$i]['display_content']=='Y'|| $_SESSION["user"]["user_id"]=="1") echo ""; else echo ""; if ($fishing[$i]['display_content']=='Y'|| $_SESSION["user"]["user_id"]=="1") echo ""; echo " | "; echo"
注意: 這遍日記中紀錄了獵魚的活動. 不顯示內容包含獵魚活動的日記 | |
Time | ".$fishing_message["time"]." |
Place | "; echo "";
for ($j=0 ;$j | ";
echo "
"; echo ""; echo " | |
Result | ".$fishing_message["get"]." |
Detail | ";
if ($_SESSION["user"]["user_id"]=="1" || $_SESSION["user"]["user_id"]=="2")
echo $fishing_message["description"];
else
echo preg_replace("/ |
Private | "; echo $fishing_message["private_description"]; echo " |