| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/onecms.hk/ |
Upload File : |
<!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>Untitled Document</title>
<link type="text/css" media="screen" rel="stylesheet" href="colorbox.css" />
<script src="jquery.min.js"></script>
<script src="jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
//Examples of how to assign the ColorBox event to elements
$("a[rel='example1']").colorbox();
$("a[rel='example2']").colorbox({transition:"fade"});
$("a[rel='example3']").colorbox({transition:"none", width:"70%", height:"95%"});
$("a[rel='example4']").colorbox({slideshow:true});
$(".example5").colorbox();
$(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
$(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
$(".example9").colorbox({
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
});
//Example of preserving a JavaScript event for inline calls.
$("#click").click(function(){
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
return false;
});
});
</script>
<script type="text/javascript">
function zoom(mysrc)
{
var str = mysrc
var str2 = str.replace("/190/", "/300/");
//document.write(str2);
document.getElementById("mainimg").src = str2;
str2 = str.replace("/190/", "/1024/");
document.getElementById("img").href = str2;
}
</script>
</head>
<body>
<?php
// get tid from temp1
if( isset($_GET['tid']) ){
$tid = $_GET['tid'];
}
else{
$tid = "tms10001";
}
//connect database
define('DB_USER', 'onecmssa');
define('DB_PASSWORD', 'kwr20I*a');
define('DB_HOST', '192.168.171.21');
define('DB_DATABASE', 'onecmsadmin');
$link = mysql_pconnect(DB_HOST, DB_USER, DB_PASSWORD)
or die('Connection errorG'.mysql_error());
mysql_select_db(DB_DATABASE)
or die('Selection error'.DB_DATABASE.']G'.mysql_error());
$noPerRow = 3;
$sql = 'SELECT count(*) as count FROM tempDetail where tid = "'.$tid.'"';
$result = mysql_query($sql);
$record = mysql_fetch_array($result);
$noPerPage = $record[count];
$sql = 'SELECT folder FROM temp where tid = "'.$tid.'"';
$result = mysql_query($sql);
$record = mysql_fetch_array($result);
$folder = $record[folder];
$i = 0;
$sql = 'SELECT * FROM tempDetail where tid = "'.$tid.'" order by tdid';
$result = mysql_query($sql);
while($record = mysql_fetch_array($result))
{
$tdid[$i] = $record[tdid];
$i++;
}
echo <<<EOF
<table border="0" cellpadding="0" cellspacing="0"><a name="top" id="top"></a>
<tr>
<td width="50"></td>
<td width="370" height="410" align="left" valign="top" style="background:url(templateView/icon/table_bg2.jpg) top left no-repeat"><table width="370" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="40" height="80"></td>
<td width="300"></td>
<td width="30" height="80"></td>
</tr>
<tr>
<td width="40"></td>
<td width="300" height="300" align="center" valign="top">
<img name = "zoomIn" width="300" height="300" src="templateView/detail/300/$folder/$tdid[0].jpg" border = "0" style="border-style: solid;vertical-align:middle" id="mainimg"/>
</td>
<td width="30" height="300"></td>
</tr>
</table>
<a href="templateView/detail/1024/$folder/$tdid[0].jpg" rel="example3" title="$tid" id="img">
<center><img width="20" height="20" src="templateView/icon/zoomin.jpg" border = "0" style="border-style: solid;vertical-align:middle"/></center>
</a>'
EOF;
for ($i=0; $i<$noPerPage; $i++)
$slideshow .= '<a href="templateView/detail/1024/'.$folder.'/'.$tdid[$i].'.jpg" rel="example3" title="'.$tid.'"></a>';
echo <<<EOF
$slideshow
</td>
<td width="30"></td>
<td valign="top"><table border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="5"></td>
</tr>
<tr>
<td height="35" colspan="5"></td>
</tr>
<tr>
EOF;
//show Pic
for ($i=0; $i<($noPerPage/$noPerRow); $i++)
{
for ($j=0; $j<$noPerRow; $j++)
{
$value = ($j+$i*$noPerRow);
if ($value < $noPerPage)
echo <<<EOF
<td width="150" align="center" valign="top" style="border:solid 1px #CCC">
<img onclick="zoom(this.src)" width="150" height="150" src="templateView/detail/190/$folder/$tdid[$value].jpg" /></td>
<td width="10"></td>
EOF;
}
if ($value < $noPerPage)
echo <<<EOF
</tr>
<tr>
<td height="10"></td>
<td width="10" height="10"></td>
<td height="10"></td>
<td width="10" height="10"></td>
<td height="10"></td>
</tr>
<tr>
EOF;
}
echo <<<EOF
</tr>
<tr>
<td height="25" colspan="5" align="right" valign="bottom">
<a href="javascript:history.go(-1)">
<img src="templateView/icon/back.jpg" width="55" height="17" border = "0" style="border-style: solid;vertical-align:middle" />
</a>
</td>
</tr>
</table></td>
</tr>
</table>
EOF;
?>
</body>
</html>