?
Path : /home/admin/public_html/libs-bak/ |
Current File : /home/admin/public_html/libs-bak/web2.0_etravel_view.php |
<? session_start(); require_once 'facebook-php-sdk/src/facebook.php'; $facebook = new Facebook(array( 'appId' => '132361363520281', 'secret' => '86b667fb37a5d5c7bb4f2321b64e44de', 'cookie' => true, )); $user = $facebook->getUser(); require_once('config.php'); require_once('libs/global.php'); require_once('libs/MySql.php'); require_once('libs/function.php'); require_once('libs/xajax/xajax.inc.php'); require_once('libs/xajax/xajaxExtend.php'); $db=new MySql; $xajax = new xajaxExtend; require_once('index.fbuser.server.php'); require_once('discuss.server.php'); require_once('web2.0_class.php'); $xajax->processRequests(); // Awesome Facebook Application // // Name: Calendar // if($_GET[content]){ $rs=$db->getDataOneRow('v1_content',$_GET['content'],'ContentURL'); } ?> <!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" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><?=$rs[ContentMetaTitle];?> ข้อมูลเที่ยว Wonderfulpackage</title> <meta name="keywords" content="<?=$rs[ContentMetaTitle];?> ข้อมูลเที่ยว Wonderfulpackage" /> <meta name="description" content="<?=$rs[ContentMetaTitle];?> ข้อมูลเที่ยว Wonderfulpackage" /> <?php $xajax->printJavascript('libs/xajax'); ?> <? require_once('web2.0_ui.php');?> <SCRIPT language="JavaScript" src="js/function.js"></SCRIPT> </head> <body> <? require_once('web2.0_header.php');?> <? require_once('web2.0_facebook_script.php');?> <div style="clear:both;"></div> <!-- CONTENT --> <div id="content" class="container_12"> <? require_once('web2.0_etravel_header.php');?> <!-- LEFT COLUM --> <div style="float:left;width:680px;border:0px solid #cccccc;"> <div id="tv_video"> <h1>ข้อมูลเที่ยว <?=$rs[ContentName];?></h1> <? require_once('2011_facebook2like.php');?> <div style="border:1px solid #cccccc;padding:5px;"> <? if($_GET['content']!=''){ $db->Query("UPDATE v1_content SET ContentView=ContentView+1 WHERE ContentID='{$rs[ContentID]}'"); $coun=$db->getDataOneRow('country',$rs['ContentCountry'],'CountryID'); if($rs['ContentDetailFile']!=''){ $data = $rs['ContentDetailFile']; //$data[ContentDetailFile]= parse_pseudo_functions( $data[ContentDetailFile] ); $data[ContentDetailFile]= $data[ContentDetailFile] ; $Handle = fopen("files/etravel_new/detail/$data", 'r'); $Handle=parse_pseudo_functions($Handle); fpassthru($Handle); } } ?> </div> <? require_once('functionSerachByTag.php'); Serachpackage($rs['ContentTags']); SerachTour($rs['ContentTags']); //SerachTotel($rs['ContentTags']); ?> <!--##################################--> <div id="discuss"> <? echo LoadPostOnload('',0,0,'discuss'); ?> </div> <h2>แสดงความคิดเห็น</h2> <div id="form_reply"> <div><span id="fb_photo"></span><textarea name="discuss" style="width:400px;height:50px;" id="discuss_input"></textarea></div> <div> <div id="post_button"><input type="checkbox" name="fb_status" id="fb_status" value="yes" checked />โพตไปยัง facebook ของคุณด้วย<input type="checkbox" name="reply_email" id="reply_email" value="yes" checked />ติดตามข่าวนี้ทาง Email <input type="button" value=" ตอบกลับ " onclick=" FB.login(function(response) { FB.api('/me', function(response) { if(response.name!=null){ if(document.getElementById('discuss_input').value!=''){ xajax_Post(response.name,response.id,'<?=$post_id;?>',document.getElementById('reply_email').checked,response.email,document.getElementById('discuss_input').value,'discuss'); if(document.getElementById('fb_status').checked==true){PostWall(document.getElementById('discuss_input').value);} document.getElementById('discuss_input').value=''; } } }); }, {perms: 'email,user_birthday,status_update,publish_stream,user_about_me'}); "> </div> </div> </div> <!--##################################--> </div> </div><!-- END LEFT COLUM --> <!-- RIGHT COLUM--> <div style="float:right;width:260px;border:0px solid #cccccc;padding-top:0px;text-align:left;"> <div><h1>ข้อมูลเที่ยวที่เกี่ยวข้อง</h1></div> <? $web20=new web20; $key_tag=$web20->getTags($rs[ContentTags]); $condition= Array(); foreach( $key_tag as $v){ if($v!=''){ $condition[]=" ContentTitle LIKE '%$v%' "; $condition[]=" ContentName LIKE '%$v%' "; $condition[]=" ContentMetaTitle LIKE '%$v%' "; } } $condition[]=" ContentID!='{$_GET[content]}'"; if(is_array($condition)){ $where =join(' OR ' , $condition) ; } $sql="SELECT ContentName,ContentTitle,ContentURL,ContentMetaTitle,ContentPublic,ContentView,ContentPhoto FROM v1_content WHERE $where ORDER BY ContentID DESC LIMIT 0,6"; $vrs=$db->Query($sql); while($data=mysql_fetch_array($vrs)){ echo " <div style=\"width:255px;border:1px solid #cccccc;margin-top:5px;\"> <table width=\"\"> <tr><td width=\"100\" valign=top><a href=\"http://www.wonderfulpackage.com/Etravel-new-{$data[ContentURL]}.html\"><img src=\"http://www.wonderfulpackage.com/files/etravel_new/photo/{$data[ContentPhoto]}\" width=100 ></td> <td width=\"150\" valign=top><a style=\"color:#3492DA;\" href=\"http://www.wonderfulpackage.com/Etravel-new-{$data[ContentURL]}.html\"><strong>{$data[ContentName]}</strong></a><br>".strip_tags($data[ContentTitle ])."<br><span style=\"color:#cc3366;\"><strong>เปิดดู </strong>{$data[ContentView]} ครั้ง</span></td> </tr> </table> </div> "; } ?> <div><h1>วีดีโอที่เกี่ยวข้อง</h1></div> <? $condition2= Array(); foreach( $key_tag as $v){ if($v!=''){ $condition2[]=" meta_title LIKE '%$v%' "; $condition2[]=" meta_keyword LIKE '%$v' "; } } if(is_array($condition2)){ $where =join(' OR ' , $condition2) ; } $sql="SELECT meta_keyword,id,pagelink,meta_title,photo,VdoView,hot,group1 FROM video_clip WHERE $where ORDER BY id DESC LIMIT 0,10"; $vrs=$db->Query($sql); while($data=mysql_fetch_array($vrs)){ echo " <div style=\"width:255px;border:1px solid #cccccc;margin-top:5px;\"> <table width=\"\"> <tr><td width=\"100\" valign=top><a href=\"http://www.wonderfulpackage.com/videoclip-{$data[pagelink]}.html\"><img src=\"http://www.wonderfulpackage.com/video-clip/thumbs/{$data[photo]}\" width=100 ></td> <td width=\"150\" valign=top><a href=\"http://www.wonderfulpackage.com/videoclip-{$data[pagelink]}.html\" target=_blank><strong>{$data[pagelink]}</strong></a><br>{$data[meta_title]}<br> <span style=\"color:#cc3366;\"><strong>เปิดดู</strong> {$data[VdoView]} ครั้ง</span></td> </tr> </table> </div> "; } ?> </div> <!-- END RIGHT COLUM --> <br> <br> <div style="clear:both;"></div> </div><!-- END FLOAT LEFT DIV DATA --> <div style="clear:both;"></div> </div> <!-- จบ CONTENT --> <? require_once('web2.0_footer.php');?>