|
|
|
อัพขึ้นโฮส แล้วเจอปัญหา คลิกเลือกหน้าถัดไปไม่ได้ แต่ในเครื่องทำได้ครับ |
|
|
|
|
|
|
|
การคลิกหน้าถัดไป เช่น หน้า 1 2 3 ประมาณนี้อ่ะครับ
ซึ่งผมทำใน เครื่อง คลิกได้ปกติ แต่พออัพขึ้นโฮส มันคลิกไม่ได้ครับ
รบกวนช่วยดูหน่อยครับ
อันนี้เป็นเว็บครับ http://movierent.is-other.com/
Code (PHP)
<!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=utf-8" />
<title>ยินดีต้อนรับเข้าสู่ Movie Rent.com</title>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
body {
background-image: url(img/bg-home.jpg);
background-repeat: repeat;
background-attachment:fixed;
}
-->
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
<script language="javascript"> // แสดงหน้าต่าง Graph ใหม่
var win = null;
function NewWindow(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
win = window.open(mypage,myname,settings)
}
</script>
</head>
<body>
<?
//เรียกใช้ฐานข้อมูล
?>
<?
require("connect/connect.php");
require("connect/function.php");
$days=date("Y-m-d");
function DateDiff($strDate1,$strDate2)
{
return (strtotime($strDate2) - strtotime($strDate1))/ ( 60 * 60 * 24 ); // 1 day = 60*60*24
}
?>
<table width="1007" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="1007" height="230" scope="col"><img src="img/h1.jpg" width="1006" height="230" align="top" />
</th>
</tr>
<tr>
<th height="50" scope="col" ><table width="1006" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th width="1006" height="50" align="center" valign="top" bgcolor="#99FF99" scope="col"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="1006" height="50">
<param name="movie" value="test.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="test.swf" width="1006" height="50">
<!--<![endif]-->
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="swfversion" value="8.0.35.0" />
<param name="expressinstall" value="Scripts/expressInstall.swf" />
<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
<div>
<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
</div>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object></th>
</tr>
</table></th>
</tr>
<tr>
<th scope="col"><table width="954" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="210" height="250" bgcolor="#99FF99" scope="col"><table width="200" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<th width="220" height="250" bgcolor="#FFFFFF" scope="col"><embed src="http://www.siaminfobiz.com/Icons/Calendar/kal16.swf" width="209" height="250" bgcolor="#FFFFFF" wmode="transparent" type="application/x-shockwave-flash"></embed></th>
</tr>
</table></th>
<th width="600" height="250" bgcolor="#99FF99" scope="col">
<table width="590" height="237" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td width="516" height="32"><img src="img/new.jpg" width="590" height="40" /></td>
</tr>
<tr>
<td height="200" valign="top" bgcolor="#FFFFFF"><div align="center">
<?
function getthaidate( $date ){
$_month_name = array("01"=>"มกราคม","02"=>"กุมภาพันธ์","03"=>"มีนาคม","04"=>"เมษายน","05"=>"พฤษภาคม","06"=>"มิถุนายน","07"=>"กรกฏาคม","08"=>"สิงหาคม","09"=>"กันยายน","10"=>"ตุลาคม","11"=>"พฤศจิกายน","12"=>"ธันวาคม");
$yy=substr($date,0,4);$mm=substr($date,5,2);$dd=substr($date,8,2);$time=substr($date,11,8);
$yy+=543;
$dateT=intval($dd)." ".$_month_name[$mm]." ".$yy." ".$time;
return $dateT;
}
?>
</div>
<table width="590" align="center">
<?
$sql1=mysql_query("select * from news ");
while($fetch = mysql_fetch_array($sql1)) {
?>
<tr height="25" >
<td width="23" bgcolor="#FFFFFF"><img src="img/icnuser7.gif" width="20" height="20" align="bottom"></td>
<td width="555" height="25" colspan="2" valign="top" bgcolor="#FFFFFF">
<div align="left"><font size="2">
<a href="news_detail.php?News_ID=<?=$fetch['News_ID']?>" onClick="NewWindow(this.href,'name','700','800','no');return false"><?=$fetch['Title']?></a>
[<font color="#FF0000"><?= getthaidate($fetch['DatePost'])?></font>]
<a href="news_detail.php?News_ID=<?=$fetch['News_ID']?>" onClick="NewWindow(this.href,'name','700','800','no');return false"><?=$fetch['Count']?></a>ครั้ง
<a href="news_detail.php?News_ID=<?=$fetch['News_ID']?>" onClick="NewWindow(this.href,'name','700','800','no');return false"><? if($days==$fetch['DatePost']){
echo "<img src=img/5.gif width=20 height=20 border=0>";
}?>
</a></font></div></td>
</tr>
<?
}
?>
<tr height="25">
<td colspan="3" bgcolor="#FFFFFF"><a href="news/news_all.php"></a></td>
</tr>
</table>
</td>
</tr>
</table>
</th>
<th width="200" height="250" bgcolor="#99FF99" scope="col"><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><a href="http://www.majorcineplex.com/" target="_blank"><img src="img/4.jpg" width="200" height="50" border="0" /></a></th>
</tr>
<tr>
<td><a href="http://www.youtube.com/" target="_blank"><img src="img/3.jpg" width="200" height="50" border="0" /></a></td>
</tr>
<tr>
<td><a href="http://www.facebook.com" target="_blank"><img src="img/2.jpg" width="200" height="50" border="0" /></a></td>
</tr>
<tr>
<td><a href="http://twitter.com/" target="_blank"><img src="img/1.jpg" width="200" height="50" border="0" /></a></td>
</tr>
<tr>
<td><a href="http://www.google.co.th/" target="_blank"><img src="img/5.jpg" width="200" height="50" border="0" /></a></td>
</tr>
</table></th>
</tr>
<tr>
<th colspan="3" bgcolor="#99FF99" scope="col">
<form id="form1" name="form1" method="get" action="search.php">
<label><font size="3" color="#0033FF">ค้นหาภาพยนตร์</font>
<input type="text" name="txtSearch" id="txtSearch" value="<?=$_GET["txtSearch"];?>" />
</label>
<label>
<input type="submit" name="submit" id="submit" value="^ค้นหา^" />
</label>
</td>
</form></tr>
<tr>
<th scope="col" colspan="3"><table width="1006" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="200" valign="top" bgcolor="#FFFFFF" scope="col">
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><a href="index.php"><img src="img/all.gif" width="200" height="49" border="0" /></a></th>
</tr>
</table>
<?
//=คำสั่งประเภทวีซีดี
$sqlCatShow="select * from category where 1=1 order by CategoryID asc ";
$queryCatShow=mysql_query($sqlCatShow);
$i=0;
while($resutCatShow=mysql_fetch_array($queryCatShow))
{
?>
<table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col" width="200" height="49" background="img/HL.jpg">
<span class="link-yellow"><a href="index.php?CategoryID=<?=$resutCatShow["CategoryID"];?>">
<div align="center"><font color="#FFFFFF"><strong><?=$resutCatShow["CategoryName"];?></strong></font></div>
</a></span></th>
</tr>
</table>
<?
}
//==จบโค้ด
?>
</th>
<th width="806" valign="top" bgcolor="#FFFFFF" scope="col">
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col" width="500" height="30" valign="top"> </th>
</tr>
<tr>
<th height="30" valign="top" scope="col"><strong>
<?
//============ เลือกว่าเป็นหมวดอะไร
$resultHeadPro=select("category","where 1=1 and CategoryID='".$_GET["CategoryID"]."'");
if(!$resultHeadPro)
{
//header("location:index.php");
}
if($_GET["CategoryID"]!="")
{
echo "(".$resultHeadPro["CategoryName"].")";
}
else
{
echo "ภาพยนตร์ใหม่วันนี้";
}
?>
</strong></th>
</tr>
<tr>
<th scope="col" valign="top">
<?
//=เลือกรายการสินค้าออกมาแสดง
$condition="";
if($_GET["CategoryID"] <> "")
{
$condition="and CategoryID='$_GET[CategoryID]' ";
}
echo"<table align=center><tr>";
$sql = "select * from movie where 1=1 $condition ";
/* ตั้งค่า แสดงผลต่อหน้า $Per_Page */
$Per_Page =20;
if(!$Page)
$Page=1;
//============ คำนวณจำนวนหน้า
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$result=mysql_query($sql);
$Page_start = ($Per_Page*$Page)-$Per_Page;
$Num_Rows = mysql_num_rows($result);
if($Num_Rows<=$Per_Page)
$Num_Pages =1;
else if(($Num_Rows % $Per_Page)==0)
$Num_Pages =($Num_Rows/$Per_Page);
else
$Num_Pages =($Num_Rows/$Per_Page)+1;
$Num_Pages = (int)$Num_Pages;
if(($Page>$Num_Pages) || ($Page<0))
print "<center><b>จำนวน $Page มากกว่า $Num_Pages ยังไม่มีข้อความ<b></center>";
$sql .= " order by MovieID DESC LIMIT $Page_start,$Per_Page";
//ส่วนแสดงผล
$i=0;
$query = mysql_query($sql);
while($resutNewPro= mysql_fetch_array($query)){
$i++;
echo "<td>";
?>
<table width="150" height="190" border="0" cellpadding="0" cellspacing="2">
<tr>
<th height="60" colspan="3" valign="top" scope="col"><div align="center"><a href="moviedetail.php?CategoryID=<?=$resutNewPro["CategoryID"];?>&MovieID=<?=$resutNewPro["MovieID"];?>"><img src="picture/<?=$resutNewPro["Picture"];?>" width="100" height="150" border="0" /></a></div></th>
</tr>
<tr>
<th width="24" height="16" align="center" valign="top" scope="col"> </th>
<th width="100" align="left" valign="top" scope="col"><img src="img/rate2/<?=$resutNewPro["RateID"];?>.gif" width="30" height="20" />
<?
$dayadd = $resutNewPro["dateadd"];
$daynew= DateDiff($dayadd,$days);
if($daynew <=3)
{
echo "<img src=img/new.gif width=30 height=20 border=0>";
}
?>
</th>
<th width="24" align="center" valign="top" scope="col"> </th>
</tr>
<tr>
<th colspan="3" valign="top" scope="col"><div align="center"> <a href="moviedetail.php?CategoryID=<?=$resutNewPro["CategoryID"];?>&MovieID=<?=$resutNewPro["MovieID"];?>">
<font size="2" color="#0000FF "><?=$resutNewPro["MovieName"];?></font>
</a></div></th>
</tr>
</table>
<?
//============ แสดงแถวละ 4
echo"</td>";
if(($i)%4==0)
{
echo"</tr>";
}
else
{
echo "<td>";
}
}
echo"</tr></table>";
if($i==0)
{
echo "<strong><center><font color=red>ไม่มีรายการสินค้า</font></center></strong>";
}
?>
</th>
</tr>
<tr>
<th bgcolor="" scope="col">
<table width="376" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="183" colspan="10" align="center" class="boxtext">จำนวน <?=$Page;?>หน้า <b> <?=$Num_Pages;?></b> ( <?= $Num_Rows;?>รายการ) </td>
</tr>
</table>
<table width="48%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td align="center">
<?
/* สร้างปุ่มย้อนกลับ */
if($Prev_Page)
echo " <a href='$PHP_SELF?Page=$Prev_Page&CategoryID=$_GET[CategoryID]' class='boxtext'><< Back </a> ";
for($i=1; $i<$Num_Pages; $i++){
if($i != $Page)
echo " [ <a href='$PHP_SELF?Page=$i&CategoryID=$_GET[CategoryID]' class='boxtext'>$i</a> ]";
else
echo "<b> $i </b>";
}
/*สร้างปุ่มเดินหน้า */
if($Page!=$Num_Pages)
echo " <a href ='$PHP_SELF?Page=$Next_Page&CategoryID=$_GET[CategoryID]' class='boxtext'> Next >> </a>";
?>
</td>
</tr>
</table>
</th>
</tr>
</table>
</th>
</tr>
<tr>
<th height="100" colspan="2" scope="col"><img src="img/f1.jpg" width="1006" height="100" /></th>
</tr>
<tr>
<td colspan="2" align="right" scope="col"><font size="2" color="#FF0000">เว็บไซต์แสดงผลได้สมบรูณ์ที่หน้าจอความละเอียด 1280 x 1024 pixel</font></td>
</tr>
</table></th>
</tr>
</table></th>
</tr>
</table>
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
</html>
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2011-09-05 08:40:57 |
By :
donwaan2027 |
View :
1034 |
Reply :
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ได้ล่ะครับ ขอบคุณ พี่วิน มากครับ
|
|
|
|
|
Date :
2011-09-05 09:21:08 |
By :
donwaan2027 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
แต่ผมอยากรู้ครับ ว่าทำไม ตอนรันในเครื่องมันรันได้อ่ะครับ
|
|
|
|
|
Date :
2011-09-05 09:24:41 |
By :
donwaan2027 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ดีนะ
|
|
|
|
|
Date :
2013-01-21 09:58:26 |
By :
pecomsci14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|