<?php session_start(); require_once("function/fcontrol.php"); $link_root=""; //$page="tvmobile"; $style="mobilestyle.css"; $rschannel=slcvar3("select * from tv_channel where channel='".$_GET["ch"]."'"); ?> <html> <head> <meta name="description" content="คลิปรายการย้อนหลัง"> <meta name="keywords" content="คลิปรายการย้อนหลัง"> <META name="ROBOTS" content="ALL"> <META name="Author" content="Tvwaimun.com"> <meta name="copyright" content="Copyright 2009 Tvwaimun.com, All Rights Reserved."> <meta http-equiv="Content-Type" content="text/html; charset=tis-620" /> <title>ทดสอบการเรียกข้อมุล</title> <link href="<?php echo $link_root; ?>style/waimun_mainstyle.css" rel="stylesheet" type="text/css" /> <link href="<?php echo $link_root; ?>style/<?php echo $style; ?>" rel="stylesheet" type="text/css" /> </head> <body> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td width="11%"><img src="http://www.tvwaimun.com/mobile/logo.png" alt="" width="114" height="42" border="0" align="left" class="pic"/></td> <td width="89%" align="right"> <?php $qlch=mysql_query("select * from tv_channel order by channel asc"); $num_qlch=mysql_num_rows($qlch); ?> <select style="font-family:sans-serif; font-size:10px;" id="ch_sl" name="ch_sl" onchange = "document.location.href='<?php echo ".".$PHP_SELF;?>?ch_sl='+this.value+'&page=<?php echo $page;?>';"> <option selected>เลือกรายการทีวี</option> <option value="<?php $PHP_SELF?>">แสดงทั้งหมด</option> <?php for($n_ch=0;$n_ch<$num_qlch;$n_ch++){ $rch=mysql_fetch_array($qlch); echo '<option value="'.$rch['channel'].'">'.$rch["name"].'</option>'; }//for $n_ch ?> </select> </td> </tr> <td colspan="2" bgcolor="#D90000"><span style=" font-family:sans-serif;font-size:10pt; color:#fff; padding:0px 0px 0px 3px;"><strong>Video » </strong></span> </td> </tr> </table> <?php $perpage =4; // จำนวนข้อมูลที่จะแสดงใน 1 หน้า if(empty($page)) { $page = 1;} //โค้ดแบ่งหน้า //$all_data=mysql_query("select * from tv_program"); if(!empty($ch_sl)){ $all_data=mysql_query("SELECT * FROM tv_program Left Join tv_channel ON tv_channel.channel = tv_program.channel where tv_channel.channel = '".$ch_sl."' "); }else{ $all_data=mysql_query("SELECT * FROM tv_program Left Join tv_channel ON tv_channel.channel = tv_program.channel"); } $num_chk=mysql_num_rows($all_data); //จำนวนเรคคอร์ดทั้งหมด $rt = $num_chk%$perpage;//หารหาเศษ เพื่อหาจำนวนหน้า if($rt!=0) {$totalpage = floor($num_chk/$perpage)+1;} else {$totalpage = floor($num_chk/$perpage);} $goto = ($page-1)*$perpage; ?> <table width="100%" border="0" cellspacing="10" cellpadding="10"> <?php if(!empty($ch_sl)){ $per_page_ch="SELECT * FROM tv_program Left Join tv_channel ON tv_channel.channel = tv_program.channel where tv_program.status = 'on' and tv_channel.channel = '".$ch_sl."' "; }else{ $per_page_ch="SELECT * FROM tv_program Left Join tv_channel ON tv_channel.channel = tv_program.channel where tv_program.status = 'on' "; } $per_page_ch.=" ORDER BY episode DESC limit ".$goto.",".$perpage; //echo $per_page_ch,"<br>"; $dbqr_channel=mysql_query($per_page_ch); $num_rows_channel=mysql_num_rows($dbqr_channel); for($i=0;$i<$num_rows_channel;$i++) { $rschannel2_=mysql_fetch_array($dbqr_channel); $rsviewlogs=slcvar3("select view from tv_view_logs where episode='".$rschannel2_["episode"]."'"); $result_tv_video=mysql_query("SELECT * FROM tv_video WHERE tv_video.episode = '".$rschannel2_["episode"]."'"); $rows_tv_video=mysql_fetch_array($result_tv_video); $arr_video=explode(".",$rows_tv_video[2]); $chlink=$link_root."/mobile_player.php?file_link=tv/".$rschannel2_[1]."/".$arr_video[0].".mp4&eps=".$rschannel2_["episode"]; ?> <tr> <td width="178" align="center" valign="middle"><a href="<?php echo $chlink; ?>" class="list_nav__" ><img src="<?php echo $link_root.$rschannel2_[5].'" alt="'.$rschannel2_["name"];?>" border="0" width="135" height="76" /></a></td> <td width="89%" valign="top"><a href="<?php echo $chlink;?>" class="list_nav__"><span style="font-size:10pt;"><strong><?php echo $rschannel2_["name"];?></strong></span></a><br> <span style="color:#FFFFFF; font-size:9pt; font-family:Arial, Helvetica, sans-serif; font-weight:bold;"><?php echo number_format($rsviewlogs["view"])." Views"; ?></span><br/> <span style="font-family:sans-serif; font-size:10pt; color:#666666;"><strong><?php echo "IN : " ?></strong></span><span style="font-size:10pt; color:#00CCFF;"><strong><?php echo $rschannel2_["12"];?></strong></span><br/> </td> </tr> <tr> <td colspan="2"><div style="border-top:1px solid #666;"></div></td> </tr> <?php } ?> </table> <center> <?php for($n=1;$n<=$totalpage;$n++){ if($page==$n){ echo"<font size='2' face='Tahoma' color='#FF0000'><b>" .$n. "</b> </font>"; }else{ if(!empty($ch_sl)){ echo "<a href='$PHP_SELF?page=$n&ch_sl=".$ch_sl."'><font size='2' face='Tahoma' color='#006600'>$n</font></a><font size='2' face='Tahoma' color='#006600'> </font>"; }else{ echo "<a href='$PHP_SELF?page=$n'><font size='2' face='Tahoma' color='#006600'>$n</font></a><font size='2' face='Tahoma' color='#006600'> </font>"; } } }//for $n ?> </center> </body> </html>
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง