|
|
|
ถามหน่อยคับอัพขึ้น server แล้วหน้า index ไม่รันคับ |
|
|
|
|
|
|
|
ผมอัพเว็บตัวใหม่ขึ้น server แต่หน้า index มันไม่รันแต่หน้าอื่นๆๆ
รันได้ปกติไม่รู้เป็นเพราะไรใครรู้รบกวนด้วยคับ
หน้า index.php
http://irrigation.rid.go.th/rid11/rid11
หน้าอื่นที่รันได้ปกติ
http://irrigation.rid.go.th/rid11/rid11/water_report.php
โคด index.php คับ
Code (PHP)
<?php
require_once 'fnc/config.php';
require_once 'fnc/rewrite.php';
require_once 'adodb/adodb.inc.php';
require_once 'class/class.GenericEasyPagination.php';
require_once 'libs/Smarty.class.php';
$db = NewADOConnection('mysql');
$db->Connect($config[host], $config[dbuser], $config[dbpassword],$config[dbname]);
//$db->debug=1;
if ($where!=""): $page = $where ; else: $page = 1; endif;
define ('RECORDS_BY_PAGE',3);
define ('CURRENT_PAGE',$page);
$render = 'index.tpl.htm' ;
//block news
$SQLstr = " SELECT * FROM `news` WHERE `cate_id` = '1' AND `active` = 'Yes' ORDER BY `news_id` desc " ;
$rs = $db->PageExecute($SQLstr,RECORDS_BY_PAGE,CURRENT_PAGE);
$recordsFound = $rs->_maxRecordCount;
$GenericEasyPagination =& new GenericEasyPagination(CURRENT_PAGE,RECORDS_BY_PAGE,"eng");
$GenericEasyPagination->setTotalRecords($recordsFound);
$Npage = $GenericEasyPagination->getNpage();
//end block news
//block activities
$SQLstr2 = " SELECT * FROM `news` WHERE `cate_id` = '2' AND `active` = 'Yes' ORDER BY `news_id` desc LIMIT 0,5 " ;
$rs2 = $db->Execute($SQLstr2);
//end block activities
//block presscenter
$SQLstr3 = " SELECT * FROM `presscenter` WHERE `download_status` = 'Active' ORDER BY `press_id` desc LIMIT 0,8 " ;
$rs3 = $db->Execute($SQLstr3);
//end block presscenter
//block goverment
$SQLstr4 = " SELECT * FROM `goverment` WHERE `download_status` = 'Active' ORDER BY `gover_id` desc LIMIT 0,8 " ;
$rs4 = $db->Execute($SQLstr4);
//end block goverment
//block product
$SQLstr5 = " SELECT * FROM `product` WHERE`product_status` = 'Active' AND `product_pin` = 'Active' ORDER BY `product_id` desc LIMIT 0,5" ;
$rs5 = $db->Execute($SQLstr5);
//end block product
//block BannerMenu
$SQLstr6 = " SELECT * FROM `banner` WHERE`banner_status` = 'Active' AND `banner_pin` = 'Active' ORDER BY `banner_id` desc LIMIT 0,10" ;
$rs6= $db->Execute($SQLstr6);
//end block BannerMenu
$template = new Smarty;
$template->compile_check = true;
//$template->debugging = true;
$template->assign("currentpage",CURRENT_PAGE);
$template->assign("totalpage",$GenericEasyPagination->getPagesFound());
$template->assign("prevpage",$Npage['previous']);
$template->assign("nextpage",$Npage['next']);
$template->assign('rec',$rs->GetAssoc());
$template->assign('rec2',$rs2->GetAssoc());
$template->assign('rec3',$rs3->GetAssoc());
$template->assign('rec4',$rs4->GetAssoc());
$template->assign('rec5',$rs5->GetAssoc());
$template->assign('rec6',$rs6->GetAssoc());
$template->display($render);
?>
โคด index.tpl.htm
Code (PHP)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874">
<title>สำนักชลประทาน11</title>
<link href="css/rid11_2009.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript">
function gettab(a,b,c,d,e,f) {
document.getElementById(a).style.display = "block" ;
document.getElementById(b).style.display = "none" ;
document.getElementById(c).style.display = "block" ;
document.getElementById(d).style.display = "block" ;
document.getElementById(e).style.display = "none" ;
document.getElementById(f).style.display = "none" ;
}
</script>
<link rel="stylesheet" type="text/css" href="ajax/contentslider.css" />
<link rel="stylesheet" href="css/videobox.css" type="text/css" media="screen" />
<script type="text/javascript" src="ajax/contentslider.js"></script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="js/mootools.js"></script>
<script type="text/javascript" src="js/swfobject.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script src="js/jquery.tabs.pack.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
$(function() {
$('#container-7').tabs({ fxAutoHeight: true });
});
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link rel="stylesheet" href="js/jquery.tabs3.css" type="text/css" media="print, projection, screen">
</head>
<body><div align="center"><div style="position:relative; width:1024px; margin-left:auto; margin-right:auto;"><?php include("inc/inc_menutop.php");?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="291" valign="top">
<table width="100%" height="484" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/images_left_bost_01.jpg" width="291" height="484"></td>
</tr>
</table>
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0" background="images/bg_menuleft.jpg">
<tr>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/bg_menuleft.jpg">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" height="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="50%"></td>
</tr>
</table>
<!--smarty foreach item=RS6 from=$rec6 key=key name=banlist -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10%"></td>
<td width="85%" style="border-bottom-style:dotted; border-bottom-width:1px"><a href="<!--smarty $RS6.url -->"><img src="img_banner/thumbnail/<!--smarty $RS6.image -->" border="0"></a></td>
<td width="5%"></td>
</tr>
</table>
<!--smarty /foreach --></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" height="1000" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" background="images/bg_menuleft.jpg"> </td>
</tr>
</table>
</td>
<td valign="top" width="515"><table width="100%" height="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="532"><img src="images/images_pr.gif" width="532" height="57" /></td>
</tr>
<tr>
<td height="15"></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="10"> </td>
<td height="40" class="Gray11N01"><!--smarty foreach item=RS from=$rec key=key name=newslist --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="176"><table width="176" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" ><a href="news_detail.php?/<!--smarty $RS.news_id-->" class="PicActivites" ><img src="img_news/thumbnail/<!--smarty $RS.image -->" width="168" height="89" border="0"></a></td>
</tr>
<tr>
<td><img src="images/tabgray_pic.jpg" width="176" height="4"></td>
</tr>
<tr>
<td height="5"></td>
</tr>
</table></td>
<td width="22" align="center"><table width="100%" height="27" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20"></td>
</tr>
</table>
<img src="images/images_icon.jpg" width="10" height="10"></td>
<td class="Black11N01"><table width="100%" height="5" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<strong><span class="Red11N01"><!--smarty $RS.date_news|date_format:"%d-%m-%y" --></span></strong>
<table width="100%" height="3" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<a href="news_detail.php?/<!--smarty $RS.news_id -->" class="Blue12B02"><!--smarty $RS.topic|substring:1:100 --></a>
<table width="100%" height="7"border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<!--smarty $RS.sdetail --></td>
</tr>
<tr valign="top">
<td><img src="images/spacer.gif" width="5" height="5"></td>
<td align="center"><img src="images/spacer.gif" width="5" height="5"></td>
<td height="5"><img src="images/spacer.gif" width="5" height="5"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="1" background="images/dot_gray.gif"></td>
</tr>
<tr>
<td height="18" ><img src="images/spacer.gif" width="18" height="18"></td>
</tr>
</table><!--smarty /foreach--></td>
<td></td>
</tr>
</table> </td>
</tr>
<tr>
<td height="30" align="right" class="Red11N01">+ <a href="news.php" class="Black11N01">ดูทั้งหมด</a> </td>
<td> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td height="300"><div id="container-7" style="width:532px">
<ul class="tabs-nav">
<li><a href="#1" class="one"><span>รายงานปริมาณน้ำ</span></a></li>
<li><a href="#2" class="two"><span>รายงานสถานการน้ำ</span></a></li>
<li><a href="#3" class="three"><span>จุดเฝ้าระวัง</span></a></li>
</ul>
<div id="1" style="display: none"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td><?php include("water_inc.php");?></td>
</tr>
</table>
</div>
<div id="2" style="display: none"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td><?php include("water_inc2.php");?></td>
</tr>
</table>
</div>
<div id="3" style="display: none"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td><?php include("water_inc3.php");?></td>
</tr>
</table>
</div>
</div></td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0" background="images/bg_tab_index.jpg">
<tr valign="top">
<td width="11"> </td>
<td width="106"><a href="javascript:gettab('tabPressCenter','tabGoverment','ac1','n0','ac0','n1');"><img src="images/tab_act_index_active.gif" width="136" height="23" border="0" id="ac1"><img src="images/tab_act_index.gif" width="136" height="23" border="0" id="ac0" style="display:none"></a></td>
<td width="2"></td>
<td width="105"><a href="javascript:gettab('tabGoverment','tabPressCenter','n1','ac0','ac1','n0');"><img src="images/tab_news_index.gif" width="136" height="23" border="0" id="n0"><img src="images/tab_news_index_active.gif" width="136" height="23" border="0" id="n1" style="display:none"></a></td>
<td> </td>
</tr>
</table>
<table width="100%" height="15" border="0" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table><div id="tabPressCenter">
<!--smarty foreach item=RS3 from=$rec3 key=key name=presslist --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="1" align="right"></td>
<td width="5" class="Gray11N01"></td>
<td><table width="100%" height="5"border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2"></td>
</tr>
</table><a href="img_presscenter/<!--smarty $RS3.fileatt -->" target="_blank" class="SkyB01"><img src="images/PDF.gif" width="17" height="18" border="0"></a></td>
<td width="60" align="left" valign="top" class="Red11B02"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3" class="Red11B02"><!--smarty $RS3.press_date|date_format:"%d-%m-%y" --></td>
</tr>
</table></td>
<td align="left" valign="top" class="SkyB01" > <a href="img_presscenter/<!--smarty $RS3.fileatt -->" target="_blank" class="SkyB01"><!--smarty $RS3.topic --></a><span class="Red11B02"> | </span><!--smarty $RS3.filesize --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"></td>
</tr>
</table>
</td>
</tr>
</table></td>
<td width="15"></td>
</tr>
<tr valign="top">
<td align="right"></td>
<td class="Gray11N01"></td>
<td class="Gray11N01"><table width="100%" height="5" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" background="images/dot_gray.gif">
<tr>
<td><img src="images/spacer.gif" width="5" height="1"></td>
</tr>
</table></td>
<td></td>
</tr>
</table><!--smarty /foreach --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"> </td>
<td width="30%"> </td>
<td width="20%"height="30" align="left" class="Red11N01">+ <a href="presscenter.php" class="Black11N01">ดูทั้งหมด</a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div id="tabGoverment" style="display:none">
<!--smarty foreach item=RS4 from=$rec4 key=key name=goverlist --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="1" align="right"></td>
<td width="5" class="Gray11N01"></td>
<td><table width="100%" height="5"border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="2"></td>
</tr>
</table><img src="images/images_icon.jpg" width="10" height="10" border="0"></td>
<td width="60" align="left" valign="top" class="Red11B02"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3" class="Red11B02"><!--smarty $RS4.gover_date|date_format:"%d-%m-%y" --></td>
</tr>
</table></td>
<td align="left" valign="top" class="SkyB01" > <a href="goverment_detail.php?/<!--smarty $RS4.gover_id -->" class="Blue12B02"><!--smarty $RS4.topic --></a><span class="Red11B02"> | </span><a href="file_goverment/<!--smarty $RS4.fileatt -->" class="Black11N01"><!--smarty $RS4.filerem --></a><span class="Red11B02"> | </span><a href="%3C!--smarty%20$RS4.url%20--%3E">ดูรายละเอียด</a><table width="10" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="15"></td>
</tr>
<tr valign="top">
<td align="right"></td>
<td class="Gray11N01"></td>
<td class="Gray11N01"><table width="100%" height="5" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" background="images/dot_gray.gif">
<tr>
<td><img src="images/spacer.gif" width="5" height="1"></td>
</tr>
</table></td>
<td></td>
</tr>
</table><!--smarty /foreach --><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%"> </td>
<td width="30%"> </td>
<td width="20%"height="30" align="left" class="Red11N01">+ <a href="goverment.php" class="Black11N01">ดูทั้งหมด</a></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="2%"> </td>
<td width="98%"><img src="images/webboard.jpg" width="532" height="57"></td>
</tr>
<tr height="100">
<td colspan="2"><div align="center"><?php include("webboard_inc.php");?></div></td>
</tr>
<tr>
<td colspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="78%" "height="20" align="right" class="Red11N01"><a href="webboard/new.php" target="_blank" class="Black11N01"><img src="images/new_webboard.png" width="150" height="50" border="0">่</a></td>
<td width="4%" align="left" class="Red11N01"> </td>
<td width="18%" "height="20" align="right" class="Red11N01"><a href="webboard/webboard.php" target="_blank" class="Black11N01"><img src="images/all_webboard.png" width="150" height="50"border="0"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="522" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td><table width="522" height="121" border="0" align="center"cellspacing="0" cellpadding="1" bgcolor="#ECECEC">
<tr>
<td align="center"><table width="510" height="109" border="0" align="center"cellspacing="0" cellpadding="6" bgcolor="#FFFFFF">
<tr>
<td><div id="slider1" class="sliderwrapper">
<!--smarty foreach item=RS5 from=$rec5 key=key name=prolist -->
<div class="contentdiv"><a href="<!--smarty $RS5.url -->"><img src="img_product/thumbnail/<!--smarty $RS5.image -->" alt="" border="0" /></a></div>
<!--smarty /foreach -->
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td width="24" valign="top" style="background:url(images/bg_banner_index.jpg) top repeat-x"> <table width="100%" height="4"border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
</tr>
</table>
<table width="100%" height="25" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><div class="pagination" id="paginate-slider1"></div>
<script type="text/javascript">
featuredcontentslider.init({
id: "slider1", //id of main slider DIV
contentsource: ["inline", ""], //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
toc: "#increment", //Valid values: "#increment", "markup", ["label1", "label2", etc]
nextprev: ["", ""], //labels for "prev" and "next" links. Set to "" to hide.
enablefade: [true, 0.1], //[true/false, fadedegree]
autorotate: [true, 9000], //[true/false, pausetime]
onChange: function(previndex, curindex){ //event handler fired whenever script changes slide
//previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
//curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
}
})
</script> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table></td>
<td width="194" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/vdo.jpg" width="194" height="172"></td>
</tr>
</table>
<table width="100%" align="center" valign="top" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/menu_oil.jpg" width="194" height="29"></td>
</tr>
<tr>
<td><div align="center">
<iframe frameborder=0 width="187" height="300" scrolling="no" src="http://www.pttplc.com/en/oilprice.asp"></iframe>
</div></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/menu_weather.jpg" width="194" height="31"></td>
</tr>
<tr>
<td><div align="center"><iframe src="http://www.tmd.go.th/daily_forecast_forweb.php?strProvinceID=41-49-50-46-51-59-43" width="187" height="260" scrolling="no" frameborder="0"></iframe></div></td>
</tr>
</table>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><?php include("inc/inc_footer.php");?></td>
</tr>
</table>
</div></div>
</body>
</html>
Tag : - - - -
|
|
|
|
|
|
Date :
2009-11-25 13:27:32 |
By :
aody |
View :
1613 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองสร้างไฟล์ index.php แล้วรันง่าย ๆ ดูน่ะครับ ว่าทำงานได้หรือไม่
|
|
|
|
|
Date :
2009-11-30 21:48:07 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
IE มันฟ้องว่าประมาณนี้อะ
This error (HTTP 500 Internal Server Error) means that the website you are visiting had a server problem which prevented the webpage from displaying.
|
|
|
|
|
Date :
2009-11-30 21:58:51 |
By :
naskw |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
http://irrigation.rid.go.th/rid11/rid11/index.php ได้ไหม
|
|
|
|
|
Date :
2009-11-30 22:24:44 |
By :
plakrim |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|