Source code ชื่อ add_pay.php

Transcription

Source code ชื่อ add_pay.php
Source code ชื่อ add_pay.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('คุณยังไม่ได้ทาการล็อกอิน');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
if($_FILES[inPicture]<>""){
copy($_FILES[inPicture][tmp_name],"Slip/$_POST[inId].jpg");
}
$sql="insert into confirm
value('$_POST[inId]','$_POST[inorder2]','$_POST[shop_id]','$_POST[inPrice]','$_POST[mm]
$_POST[d] $_POST[y]','$_SESSION[user_id]','$_POST[inTle]','$_POST[inText]','$_POST[inName]')";
$q=mysql_query($sql);
if(!$q){
echo"<script>";
echo"alert('ไม่สามารถทาการบันทึกแจ้งชาระเงินได้');";
echo"window.location='payby?or_der.php=$_POST[inorder2]';";
echo"</script>";
}else{
echo"<script>";
echo"alert('ทาการบันทึกแจ้งชาระเงินเรียบร้อยแล้ว ');";
echo"window.location='payby.php?or_der=$_POST[inorder2]';";
echo"</script>";
}
?><style type="text/css">
<!-a{
font-family: AngsanaUPC, serif;
font-size: 16px;
}
-->
</style>
Source code ชือ่ adminshoplogin.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 type="text/css">
<!--
body,td,th {
font-family: ms Sans Serif, Microsoft Sans Serif;
font-size: 14px;
}
.style1 {font-size: 16px;
font-weight: bold;
}
.style3 {color: #000000}
-->
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.frmadmin;
if(formObj.inUsername.value == "" )
{ alert("กรุณากรอก Usename ด้วยครับ"); formObj.inUsername.focus(); return false; }
else if(formObj.inPassword.value ==
"" ) { alert("กรุณากรอก Password่ ด้วยครับ"); formObj.inPassword.focus();
return false; }
else return true ;
}
</script>
<p align="center"><img src="images/LOGOmakmay copy.gif" width="300" height="151" /></p>
<form id="form1" name="frmadmin" method="post" action="" onSubmit=" return checkform();">
<table width="511" height="209" border="0" align="center" cellpadding="0" cellspacing="0"
bordercolor="#CCCCCC">
<tr>
<td width="164" bgcolor="#DBDBDB"><div align="center"><img src="images/admin.png"
width="128" height="128" /></div></td>
<td width="341" bgcolor="#DBDBDB"><table width="340" height="146" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td height="39" colspan="2" align="left" valign="middle" bgcolor="#999999"><div align="center"
class="style1"><img src="images/icon_favourites.gif" width="16" height="16" /><span class="style3">
สาหรับผู้ดูแลระบบ</span><img src="images/icon_favourites.gif" width="16" height="16" /><br />
</div></td>
</tr>
<tr>
<td width="106" height="44" align="left" valign="top" bgcolor="#DBDBDB"><div
align="right"><strong>Username:</strong></div></td>
<td width="203" align="left" valign="top" bgcolor="#DBDBDB"><input type="text"
name="inUsername" id="inUsername" /></td>
</tr>
<tr>
<td height="23" align="left" valign="top" bgcolor="#DBDBDB"><div
align="right"><strong>Password:</strong></div></td>
<td align="left" valign="top" bgcolor="#DBDBDB"><input type="password" name="inPassword"
id="inPassword" /></td>
</tr>
<tr>
<td height="40" colspan="2" align="left" valign="top" bgcolor="#DBDBDB"><div
align="center">
<input name="submint" type="submit" id="submint" style="width:100px;height:40px; fontsize:18px" value="เข้าสู่ระบบ" />
&nbsp;
<input name="Reset" type="reset" id="submit2" style="width:100px;height:40px; font-size:18px"
value="ยกเลิก" />
</div></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"></div>
</form>
<?
if(isset($_POST[submint])){
include("config.inc.php");
$sql = "select * from shop where shop_username='$_POST[inUsername]' and
shop_password='$_POST[inPassword]'";
//print $sql;
$chk=mysql_query($sql);
$num=mysql_num_rows($chk);
if($num<=0){
echo"<script>";
echo"alert('Username และ Password ไม่ถูกต้อง');";
echo"window.location='adminshoplogin.php';";
echo"</script>";
}else{
session_register("admin_id");
$rs=mysql_fetch_array($chk);
$_SESSION[admin_id]=$rs[shop_id];// สร้าง session เก็บรหัสร้านค้า
if($rs[shop_typeid]==2){
$path="vip";
}else{
$path="Free";
}
echo"<script>";
echo"alert('ยินดีต้อนรับ $rs[shop_name] เข้าสู่ระบบ');";
echo"window.location='$path/$rs[shop_name]/admin.php';";
echo"</script>";
}
}
?>
</body>
</html>
Source code ชือ่ adminshoplogin.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 type="text/css">
<!-body,td,th {
font-family: ms Sans Serif, Microsoft Sans Serif;
font-size: 14px;
}
.style1 {font-size: 16px;
font-weight: bold;
}
.style3 {color: #000000}
-->
</style>
</head>
<body>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.frmadmin;
if(formObj.inUsername.value == "" )
{ alert("กรุณากรอก Usename ด้วยครับ"); formObj.inUsername.focus(); return false; }
else if(formObj.inPassword.value ==
"" ) { alert("กรุณากรอก Password่ ด้วยครับ"); formObj.inPassword.focus();
return false; }
else return true ;
}
</script>
<p align="center"><img src="images/LOGOmakmay copy.gif" width="300" height="151" /></p>
<form id="form1" name="frmadmin" method="post" action="" onSubmit=" return checkform();">
<table width="511" height="209" border="0" align="center" cellpadding="0" cellspacing="0"
bordercolor="#CCCCCC">
<tr>
<td width="164" bgcolor="#DBDBDB"><div align="center"><img src="images/admin.png"
width="128" height="128" /></div></td>
<td width="341" bgcolor="#DBDBDB"><table width="340" height="146" border="0" align="center"
cellpadding="0" cellspacing="0">
<tr>
<td height="39" colspan="2" align="left" valign="middle" bgcolor="#999999"><div align="center"
class="style1"><img src="images/icon_favourites.gif" width="16" height="16" /><span class="style3">
สาหรับผู้ดูแลระบบ</span><img src="images/icon_favourites.gif" width="16" height="16" /><br />
</div></td>
</tr>
<tr>
<td width="106" height="44" align="left" valign="top" bgcolor="#DBDBDB"><div
align="right"><strong>Username:</strong></div></td>
<td width="203" align="left" valign="top" bgcolor="#DBDBDB"><input type="text"
name="inUsername" id="inUsername" /></td>
</tr>
<tr>
<td height="23" align="left" valign="top" bgcolor="#DBDBDB"><div
align="right"><strong>Password:</strong></div></td>
<td align="left" valign="top" bgcolor="#DBDBDB"><input type="password" name="inPassword"
id="inPassword" /></td>
</tr>
<tr>
<td height="40" colspan="2" align="left" valign="top" bgcolor="#DBDBDB"><div
align="center">
<input name="submint" type="submit" id="submint" style="width:100px;height:40px; fontsize:18px" value="เข้าสู่ระบบ" />
&nbsp;
<input name="Reset" type="reset" id="submit2" style="width:100px;height:40px; font-size:18px"
value="ยกเลิก" />
</div></td>
</tr>
</table></td>
</tr>
</table>
<div align="center"></div>
</form>
<?
if(isset($_POST[submint])){
include("config.inc.php");
$sql = "select * from shop where shop_username='$_POST[inUsername]' and
shop_password='$_POST[inPassword]'";
//print $sql;
$chk=mysql_query($sql);
$num=mysql_num_rows($chk);
if($num<=0){
echo"<script>";
echo"alert('Username และ Password ไม่ถูกต้อง');";
echo"window.location='adminshoplogin.php';";
echo"</script>";
}else{
session_register("admin_id");
$rs=mysql_fetch_array($chk);
$_SESSION[admin_id]=$rs[shop_id];// สร้าง session เก็บรหัสร้านค้า
if($rs[shop_typeid]==2){
$path="vip";
}else{
$path="Free";
}
echo"<script>";
echo"alert('ยินดีต้อนรับ $rs[shop_name] เข้าสู่ระบบ');";
echo"window.location='$path/$rs[shop_name]/admin.php';";
echo"</script>";
}
}
?>
</body>
</html>
Source code ชื่อ basket_add.php
<?
include("config.inc.php");
if(!$_SESSION[user_id]){
echo"<script>";
echo"alert('·èÒ¹µéͧ·Ó¡Òà login ËÃ×Í ÊÁѤÃÊÁÒªÔ¡ ¶Ö§¨Ð·Ó¡ÒÃà¾ÔèÁÊÔ¹¤éÒä´é');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
$id_prd=$_REQUEST[b_id];
session_register("sess_id");
session_register("sess_name");
session_register("sess_price");
session_register("sess_num");
session_register("sess_unit");
if (!in_array($_REQUEST[b_id],$sess_id)){
$check=1;
}else{
$check=0;
}
if($check==1){
require("function.php");
$obj=new sql();
$sql="select * from product where pro_id='$_REQUEST[b_id]'";
print $sql;
$result=$obj->QuerySql($sql);
$rs=mysql_fetch_array($result);
$_SESSION[sess_id][]=$rs[pro_id];
$_SESSION[sess_name][]=$rs[pro_name];
$_SESSION[sess_price][]=$rs[pro_price];
$_SESSION[sess_num][]=1;
$_SESSION[sess_unit][]=$rs[pro_unit];
}
header ("Location: basket.php");
?>
Source code ชื่อ chkloginmember.php
<?php
include("config.inc.php");
if($_POST[user]=="" or $_POST[pass]==""){
echo"<script>";
echo"alert('¡ÃسҡÃÍ¡¢éÍÁÙÅãËé¤Ãº´éǤÃѺ');";
echo"window.location='index.php'";
echo"</script>";
}else{
include("config.inc.php");
$sql="select * from customer where
username='$_POST[user]' and password='$_POST[pass]'";
$q=mysql_query($sql);
$num=mysql_num_rows($q);
if($num<=0){
echo"<script>";
echo"alert('Username ËÃ×Í
Password äÁè¶Ù¡µéͧ');";
echo"window.location='index.php'";
echo"</script>";
}else{
$rs=mysql_fetch_array($q);
session_register("user_id");
$user_id=$rs[cus_id];
//$_SESSION[user]=$rs[];
echo"<script>";
echo"alert('ÂÔ¹´Õµé͹ÃѺ ¤Ø³ $rs[2]');";
echo"window.location='index.php'";
echo"</script>";
}
}
?>
Source code ชือ่ chknameshop2.php
<?php include("config.inc.php");
require("function.php");
$obj=new sql();
$table="shop";
$sql="where shop_name='$nameshop'";
$result=$obj->num_record($table,$sql);
if($result<=0){
echo"ÊÒÁÒöãªèª×èÍÃéÒ¹¹Õéä´é¤ÃѺ";
}else{
echo"äÁèÊÒÁÒö·Ó¡ÒÃãªéª×è͹Õéä´é¤ÃѺ";
}
?>
Source code ชือ่ chknameshop.php
<?php
if(isset($_POST[Submint])) {
if($_POST[inNameshop]==""){
echo"<script>";
echo"alert('กรุณากรอกชื่อร้านค้าทีต่ ้องการด้วย
ครับ');";
echo" form1.inNameshop.focus();";
echo"</script>";
}else{
include("config.inc.php");
require("function.php");
$obj=new sql();
$table="shop";
$sql="where shop_name='$_POST[inNameshop]'";
$result=$obj->num_record($table,$sql);
if($result<=0){
/* echo"<script>";
echo"alert('คุณสามารถใช้ชื่อ
$_POST[inNameshop] ได้');";
echo"window.location='index.php'";
echo"</script>";*/
echo"<script>";
echo"alert('คุณสามารถใช้ชื่อ
$_POST[inNameshop] ได้ครับ');";
echo"window.close()";
echo"</script>";
}else{
echo"<script>";
echo"alert('คุณไม่สามารถใช้ชื่อนีไ้ ด้ครับ
กรุณาเปลี่ยนชื่อร้านใหม่ดว้ ย');";
echo" form1.inNameshop.focus();";
echo"</script>";
}
}
}
?>
Source code ชือ่ config.inc.php
<?
session_start();
$con=mysql_connect("localhost","root","1234");
if(!$con){
echo"<center><b>äÁèÊÒÁÒöµÔ´µèÍ Host ä´é</b></center>";
exit();
}else{
$condb=mysql_select_db("makmayshop");
if(!$condb){
echo"<center><b>äÁèÊÒÁÒöµÔ´µèÍ °Ò¹¢éÍÁÙÅ ä´é</b></center>";
exit();
}else{
mysql_query("set names tis620");
}
}
?>
Source code ชือ่ counter.php
<?php
##############################################################
# GraphiCookie Counter 1.3
#
# Script by: Matthieu Biscay
#
# Web: http://www.skyminds.net/
#
# Contact: http://www.skyminds.net/contact/
#
# Copyright 2001-2004 - SkyMinds.Net. All rights reserved. #
# This script is linkware. Contact us for commercial use. #
##############################################################
// ----------------------------------- EDIT HERE ---------------------------------------- //
$gcc_aspect
$gcc_file
= "img";
// directory where the images can be found.
= "counter.txt"; // name of the file where the number of visitors is kept
$gcc_cookie_name = "my_cookie_name";
// name of the cookie (eg: your site's name)
$gcc_cookie_value = "my_cookie_value";// value of the cookie (eg: something about your site)
$gcc_cookie_life = "900";
// cookie lifespan. Default is 900s (15min)
// -------------------------------------------------------------------------------------- //
// ------------------------------ Creation of the counter file -------------------------- //
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
fclose($gcc_fp);
}
// ------------------------------------------------------------------------------------- //
// ----------------- Visitor already came : the cookie is here ------------------------- //
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] ==
"$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
// -------------------------------------------------------------------------------------- //
// ----------------- A new visitor is coming: creation of a cookie ---------------------- //
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
$gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
// -------------------------------------------------------------------------------------- //
// --------------------- Clean HTML: set the image attributes --------------------------- //
//
// Adapt height and width to your images.
$gcc_hits = str_replace('alt=""','alt="" border="0" height="12" width="10"',$gcc_hits);
// -------------------------------------------------------------------------------------- //
?>
Source code ชือ่ delcon.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('¤Ø³ÂѧäÁèä´é·Ó¡ÒÃÅçÍ¡ÍÔ¹');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
require("function.php");
$obj=new sql();
$sql2="delete from confirm where c_id='$_REQUEST[conid]' and
con_cus_id='$_SESSION[user_id]'";
$q=mysql_query($sql2);
if($q){
echo"<script>";
echo"window.location='profile.php';";
echo"</script>";
}
?>
Source code ชือ่ delshop.php
<?
include("../config.inc.php");
require_once("inccheckadmin.php");
require("function.php");
$obj=new sql();
$sql2="delete from shop where shop_id='$_REQUEST[conid]'";
$q=mysql_query($sql2);
if($q){
echo"<script>";
echo"window.location='ad_shop.php';";
echo"</script>";
}
?>
Source code ชือ่ dZip.inc.php
<?
class dZip{
var $filename;
var $overwrite;
var $zipSignature = "\x50\x4b\x03\x04"; // local file header signature
var $dirSignature = "\x50\x4b\x01\x02"; // central dir header signature
var $dirSignatureE= "\x50\x4b\x05\x06"; // end of central dir signature
var $files_count = 0;
var $fh;
Function dZip($filename, $overwrite=true){
$this->filename = $filename;
$this->overwrite = $overwrite;
}
Function addDir($dirname, $fileComments=''){
if(substr($dirname, -1) != '/')
$dirname .= '/';
$this->addFile(false, $dirname, $fileComments);
}
Function addFile($filename, $cfilename, $fileComments='', $data=false){
if(!($fh = &$this->fh))
$fh = fopen($this->filename, $this->overwrite?'wb':'a+b');
// $filename can be a local file OR the data wich will be compressed
if(substr($cfilename, -1)=='/'){
$details['uncsize'] = 0;
$data = '';
}
elseif(file_exists($filename)){
$details['uncsize'] = filesize($filename);
$data = file_get_contents($filename);
}
elseif($filename){
echo "<b>Cannot add $filename. File not found</b><br>";
return false;
}
else{
$details['uncsize'] = strlen($filename);
// DATA is given.. use it! :|
}
// if data to compress is too small, just store it
if($details['uncsize'] < 256){
$details['comsize'] = $details['uncsize'];
$details['vneeded'] = 10;
$details['cmethod'] = 0;
$zdata = &$data;
}
else{ // otherwise, compress it
$zdata = gzcompress($data);
$zdata = substr(substr($zdata, 0, strlen($zdata) - 4), 2); // fix crc bug (thanks to
Eric Mueller)
$details['comsize'] = strlen($zdata);
$details['vneeded'] = 10;
$details['cmethod'] = 8;
}
$details['bitflag'] = 0;
$details['crc_32'] = crc32($data);
// Convert date and time to DOS Format, and set then
$lastmod_timeS = str_pad(decbin(date('s')>=32?date('s')-32:date('s')), 5, '0',
STR_PAD_LEFT);
$lastmod_timeM = str_pad(decbin(date('i')), 6, '0', STR_PAD_LEFT);
$lastmod_timeH = str_pad(decbin(date('H')), 5, '0', STR_PAD_LEFT);
$lastmod_dateD = str_pad(decbin(date('d')), 5, '0', STR_PAD_LEFT);
$lastmod_dateM = str_pad(decbin(date('m')), 4, '0', STR_PAD_LEFT);
$lastmod_dateY = str_pad(decbin(date('Y')-1980), 7, '0', STR_PAD_LEFT);
# echo "ModTime: $lastmod_timeS-$lastmod_timeM-$lastmod_timeH (".date("s H
H").")\n";
# echo "ModDate: $lastmod_dateD-$lastmod_dateM-$lastmod_dateY (".date("d m
Y").")\n";
$details['modtime'] = bindec("$lastmod_timeH$lastmod_timeM$lastmod_timeS");
$details['moddate'] = bindec("$lastmod_dateY$lastmod_dateM$lastmod_dateD");
$details['offset'] = ftell($fh);
fwrite($fh, $this->zipSignature);
fwrite($fh, pack('s', $details['vneeded'])); // version_needed
fwrite($fh, pack('s', $details['bitflag'])); // general_bit_flag
fwrite($fh, pack('s', $details['cmethod'])); // compression_method
fwrite($fh, pack('s', $details['modtime'])); // lastmod_time
fwrite($fh, pack('s', $details['moddate'])); // lastmod_date
fwrite($fh, pack('V', $details['crc_32'])); // crc-32
fwrite($fh, pack('I', $details['comsize'])); // compressed_size
fwrite($fh, pack('I', $details['uncsize'])); // uncompressed_size
fwrite($fh, pack('s', strlen($cfilename))); // file_name_length
fwrite($fh, pack('s', 0)); // extra_field_length
fwrite($fh, $cfilename); // file_name
// ignoring extra_field
fwrite($fh, $zdata);
// Append it to central dir
$details['external_attributes'] = (substr($cfilename, -1)=='/'&&!$zdata)?16:32; //
Directory or file name
$details['comments']
= $fileComments;
$this->appendCentralDir($cfilename, $details);
$this->files_count++;
}
Function setExtra($filename, $property, $value){
$this->centraldirs[$filename][$property] = $value;
}
Function save($zipComments=''){
if(!($fh = &$this->fh))
$fh = fopen($this->filename, $this->overwrite?'w':'a+');
$cdrec = "";
foreach($this->centraldirs as $filename=>$cd){
$cdrec .= $this->dirSignature;
$cdrec .= "\x0\x0";
// version made by
$cdrec .= pack('v', $cd['vneeded']); // version needed to extract
$cdrec .= "\x0\x0";
// general bit flag
$cdrec .= pack('v', $cd['cmethod']); // compression method
$cdrec .= pack('v', $cd['modtime']); // lastmod time
$cdrec .= pack('v', $cd['moddate']); // lastmod date
$cdrec .= pack('V', $cd['crc_32']); // crc32
$cdrec .= pack('V', $cd['comsize']); // compressed filesize
$cdrec .= pack('V', $cd['uncsize']); // uncompressed filesize
$cdrec .= pack('v', strlen($filename)); // file comment length
$cdrec .= pack('v', 0);
// extra field length
$cdrec .= pack('v', strlen($cd['comments'])); // file comment length
$cdrec .= pack('v', 0); // disk number start
$cdrec .= pack('v', 0); // internal file attributes
$cdrec .= pack('V', $cd['external_attributes']); // internal file attributes
$cdrec .= pack('V', $cd['offset']); // relative offset of local header
$cdrec .= $filename;
$cdrec .= $cd['comments'];
}
$before_cd = ftell($fh);
fwrite($fh, $cdrec);
// end of central dir
fwrite($fh, $this->dirSignatureE);
fwrite($fh, pack('v', 0)); // number of this disk
fwrite($fh, pack('v', 0)); // number of the disk with the start of the central directory
fwrite($fh, pack('v', $this->files_count)); // total # of entries "on this disk"
fwrite($fh, pack('v', $this->files_count)); // total # of entries overall
fwrite($fh, pack('V', strlen($cdrec))); // size of central dir
fwrite($fh, pack('V', $before_cd));
// offset to start of central dir
fwrite($fh, pack('v', strlen($zipComments))); // .zip file comment length
fwrite($fh, $zipComments);
fclose($fh);
}
// Private
Function appendCentralDir($filename,$properties){
$this->centraldirs[$filename] = $properties;
}
}
?>
Source code ชือ่ edit_con.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('คุณยัง
ไม่ได้ทาการล็อกอิน');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
?><!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>Untitled Document</title>
<style type="text/css">
<!-.style10 {color: #FF0000}
.style6 {font-size: 18px;
font-weight: bold;
}
body,td,th {
font-family: Courier New, Courier, monospace;
font-size: 14px;
}
-->
</style>
</head>
<body>
<div align="center"><img src="images/LOGOmakmay copy.gif" width="300" height="151" /></div>
<p>
<?
require("function.php");
$obj=new sql();
$sql="select * from confirm where c_id='$_REQUEST[conid]'";
$result=$obj->QuerySql($sql);
$con=mysql_fetch_array($result);
?>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.form1;
if(formObj.inId.value == "" ) { alert("
กรุณากรอก รหัสจากใบเสร็จ ด้วยครับ"); formObj.inId.focus(); return false; }
else if(formObj.inPrice.value == "" )
{ alert("กรุณากรอก จานวนเงิน ด้วยครับ"); formObj.inPrice.focus();
return false; }
else if(formObj.mm.value == "" ) {
alert("กรุณาเลือก วันที่ ด้วยครับ"); formObj.mm.focus(); return false; }
alert("กรุณาเลือก เดือน ด้วยครับ"); formObj.d.focus();
else if(formObj.d.value == "" ) {
return false; }
alert("กรุณาเลือก ปี ด้วยครับ"); formObj.y.focus();
else if(formObj.y.value == "" ) {
return false; }
else if(formObj.inTle.value == "" ) {
alert("กรุณากรอก เบอร์โทรศัพท์ ด้วยครับ"); formObj.inTle.focus();
return false; }
else if(formObj.inName.value
== "" ) { alert("กรุณากรอก ชื่อ-สกุล ด้วยครับ"); formObj.inName.focus(); return false; }
else
if(formObj.inPicture.value == "" ) { alert("กรุณาเลือก รูปภาพด้วยครับ"); formObj.inPicture.focus();
return false; }
"" ) { alert("กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย"); formObj.capt.focus();
else if(formObj.capt.value ==
return false; }
else return true ;
}
function checkform2() {
return alert("คุณต้องการล้าง
ข้อมูลออกทั้งหมด ?");
}
</script>
</p>
<p align="center" class="style6">ระบบแจ้งชาระเงิน</p>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form2" onsubmit="
return checkform();">
<table width="877" height="441" border="1" align="center" cellpadding="0" cellspacing="0"
bordercolor="#CCCCCC">
<tr>
<td><table width="867" height="436" border="0" align="center" cellpadding="2" cellspacing="0"
bordercolor="#E9E9E9">
<tr>
<td width="363" rowspan="10" align="center" valign="top" bgcolor="#EEF0F0"><img
src="Slip/<?=$con[con_id]?>_<?=$con[o_id]?>.jpg" width="336" height="408" /></td>
<td width="179" bgcolor="#EEF0F0"><div align="right"><strong>รหัสการสั่งชือ
</strong></div></td>
<td width="313" bgcolor="#EEF0F0"><input type="id_order" name="inorder" id="inorder"
disabled="disabled" value="<?=$con[o_id]?>"/>
<input type="hidden" name="inorder2" value="<?=$con[o_id]?>" />
</td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><strong>จากบัญชีเลขที<่ /strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inId" id="inId" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false'
value="<?=$con[con_id]?>"/></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><strong>จานวนเงิน</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inPrice" id="inPrice" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false'
value="<?=$con[con_price]?>"/></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><strong>วันที<่ /strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="mm" id="mm"
value="<?=$con[con_date]?>"/></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><strong>เบอร์โทรที่สามารถติดต่อได้
</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inTle" id="inTle" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' value="<?=$con[tel]?>" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><strong>ชื่อ-สกุลผู้แจ้ง</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inName" id="inName"
value="<?=$con[con_name]?>"/></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>รูปสสิป</strong></div></td>
<td bgcolor="#EEF0F0"><input type="file" name="in" id="in" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><strong>รายละเอียดเพิ่มเติม<br />
<span class="style10">(ถ้ามี)</span></strong></div></td>
<td bgcolor="#EEF0F0"><textarea name="inText" id="inText" cols="45"
rows="5"><?=$con[text]?>
</textarea></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><img src="captcha/captcha_img.php" width="134"
height="28"/></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="capt" id="capt" />
<span class="style10">* กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย</span></td>
</tr>
<tr>
<td bgcolor="#EEF0F0">&nbsp;</td>
<td bgcolor="#EEF0F0"><input type="submit" name="submint" id="Submint" value="บันทึก" />
<input type="reset" name="button2" id="button2" value="ล้างข้อมูล" /></td>
</tr>
</table></td>
</tr>
</table>
<p>&nbsp;</p>
<div align="left"></div>
</form>
<?
if(isset($_POST[submint])){
if($_FILES[in]<>""){
copy($_FILES[in][tmp_name],"Slip/$_POST[inId]_$con[o_id].jpg");
}
$sql="update confirm set
con_id='$_POST[inId]',con_price='$_POST[inPrice]',con_date='$_POST[mm]',tel='$_POST[inTle]',text=
'$_POST[inText]',con_name='$_POST[inName]' where c_id='$con[c_id]' ";
$q=mysql_query($sql);
if(!$q){
echo"<script>";
echo"alert('ไม่สามารถทาการบันทึกแจ้งชาระเงินได้');";
echo"window.close()";
echo"</script>";
}else{
echo"<script>";
echo"alert('ทาการบันทึกแจ้งชาระเงินเรียบร้อยแล้ว ');";
echo"window.close()";
echo"</script>";
}
}
?>
<p align="center">&nbsp; </p>
<p>&nbsp;</p>
</body>
</html>
Source code ชือ่ editor.js
//
// htmlArea v2.03 - Copyright (c) 2002 interactivetools.com, inc.
// This copyright notice MUST stay intact for use (see license.txt).
//
// A free WYSIWYG editor replacement for <textarea> fields.
// For full source code and docs, visit http://www.interactivetools.com/
//
// write out styles for UI buttons
document.write('<style type="text/css">\n');
document.write('.btn { width: 22px; height: 22px; border: 1px solid buttonface; margin: 0; padding: 0;
}\n');
document.write('.btnOver { width: 22px; height: 22px; border: 1px outset; }\n');
document.write('.btnDown { width: 22px; height: 22px; border: 1px inset; background-color:
buttonhighlight; }\n');
document.write('.btnNA { width: 22px; height: 22px; border: 1px solid buttonface; filter:
alpha(opacity=25); }\n');
document.write('.cMenu { background-color: threedface; color: menutext; cursor: Default; font-family:
MS Sans Serif; font-size: 8pt; padding: 2 12 2 16; }');
document.write('.cMenuOver { background-color: highlight; color: highlighttext; cursor: Default; fontfamily: MS Sans Serif; font-size: 8pt; padding: 2 12 2 16; }');
document.write('.cMenuDivOuter { background-color: threedface; height: 9 }');
document.write('.cMenuDivInner { margin: 0 4 0 4; border-width: 1; border-style: solid; border-color:
threedshadow threedhighlight threedhighlight threedshadow; }');
document.write('</style>\n');
/* ---------------------------------------------------------------------- *\
Function : editor_defaultConfig
Description : default configuration settings for wysiwyg editor
\* ---------------------------------------------------------------------- */
function editor_defaultConfig(objname) {
this.version = "2.03"
this.width = "auto";
this.height = "auto";
this.bodyStyle = 'background-color: #FFFFFF; font-family: "Verdana"; font-size: x-small;';
this.imgURL = _editor_url + 'images/';
this.debug = 0;
this.replaceNextlines = 0; // replace nextlines from spaces (on output)
this.plaintextInput = 0; // replace nextlines with breaks (on input)
this.toolbar = [
['fontname'],
['fontsize'],
// ['fontstyle'],
// ['linebreak'],
['bold','italic','underline','separator'],
// ['strikethrough','subscript','superscript','separator'],
['justifyleft','justifycenter','justifyright','separator'],
['OrderedList','UnOrderedList','Outdent','Indent','separator'],
['forecolor','backcolor','separator'],
['HorizontalRule','Createlink','InsertImage','InsertTable','htmlmode','separator'],
// ['custom1','custom2','custom3','separator'],
['popupeditor','about']];
this.fontnames = {
"Arial":
"arial, helvetica, sans-serif",
"Courier New": "courier new, courier, mono",
"Georgia":
"Georgia, Times New Roman, Times, Serif",
"Tahoma":
"Tahoma, Arial, Helvetica, sans-serif",
"Times New Roman": "times new roman, times, serif",
"Verdana":
"Verdana, Arial, Helvetica, sans-serif",
"impact":
"impact",
"WingDings":
"WingDings"};
this.fontsizes = {
"1 (8 pt)": "1",
"2 (10 pt)": "2",
"3 (12 pt)": "3",
"4 (14 pt)": "4",
"5 (18 pt)": "5",
"6 (24 pt)": "6",
"7 (36 pt)": "7"
};
//this.stylesheet = "http://www.domain.com/sample.css"; // full URL to stylesheet
this.fontstyles = [ // make sure these exist in the header of page the content is being display as well in or
they won't work!
// { name: "headline", className: "headline", classStyle: "font-family: arial black, arial; font-size:
28px; letter-spacing: -2px;" },
// { name: "arial red", className: "headline2", classStyle: "font-family: arial black, arial; font-size:
12px; letter-spacing: -2px; color:red" },
// { name: "verdana blue", className: "headline4", classStyle: "font-family: verdana; font-size: 18px;
letter-spacing: -2px; color:blue" },
];
this.btnList = {
// buttonName: commandID,
"bold":
['Bold',
"italic":
['Italic',
title,
onclick,
'Bold',
'Italic',
"underline": ['Underline',
"subscript": ['SubScript',
"superscript": ['SuperScript',
"justifyleft": ['JustifyLeft',
"justifycenter": ['JustifyCenter',
"justifyright": ['JustifyRight',
'editor_action(this.id)', 'ed_format_bold.gif'],
'editor_action(this.id)', 'ed_format_italic.gif'],
'Underline',
"strikethrough": ['StrikeThrough',
'ed_format_strike.gif'],
image,
'editor_action(this.id)', 'ed_format_underline.gif'],
'Strikethrough', 'editor_action(this.id)',
'Subscript',
'editor_action(this.id)', 'ed_format_sub.gif'],
'Superscript',
'Justify Left',
'editor_action(this.id)', 'ed_format_sup.gif'],
'editor_action(this.id)', 'ed_align_left.gif'],
'Justify Center', 'editor_action(this.id)', 'ed_align_center.gif'],
'Justify Right', 'editor_action(this.id)', 'ed_align_right.gif'],
"orderedlist": ['InsertOrderedList', 'Ordered List',
'editor_action(this.id)', 'ed_list_num.gif'],
"unorderedlist": ['InsertUnorderedList', 'Bulleted List', 'editor_action(this.id)', 'ed_list_bullet.gif'],
"outdent":
['Outdent',
"indent":
['Indent',
"forecolor": ['ForeColor',
"backcolor": ['BackColor',
'Decrease Indent', 'editor_action(this.id)', 'ed_indent_less.gif'],
'Increase Indent', 'editor_action(this.id)', 'ed_indent_more.gif'],
'Font Color',
'editor_action(this.id)', 'ed_color_fg.gif'],
'Background Color', 'editor_action(this.id)', 'ed_color_bg.gif'],
"horizontalrule": ['InsertHorizontalRule', 'Horizontal Rule', 'editor_action(this.id)', 'ed_hr.gif'],
"createlink": ['CreateLink',
"insertimage": ['InsertImage',
"inserttable": ['InsertTable',
"htmlmode":
'ed_html.gif'],
['HtmlMode',
'Insert Web Link', 'editor_action(this.id)', 'ed_link.gif'],
'Insert Image',
'Insert Table',
'editor_action(this.id)', 'ed_image.gif'],
'editor_action(this.id)', 'insert_table.gif'],
'View HTML Source', 'editor_setmode(\''+objname+'\')',
"popupeditor": ['popupeditor',
'fullscreen_maximize.gif'],
"about":
['about',
'Enlarge Editor', 'editor_action(this.id)',
'About this editor', 'editor_about(\''+objname+'\')', 'ed_about.gif'],
// Add custom buttons here:
"custom1":
['custom1',
'Purpose of button 1', 'editor_action(this.id)', 'ed_custom.gif'],
"custom2":
['custom2',
'Purpose of button 2', 'editor_action(this.id)', 'ed_custom.gif'],
"custom3":
['custom3',
'Purpose of button 3', 'editor_action(this.id)', 'ed_custom.gif'],
// end: custom buttons
"help":
['showhelp',
'Help using editor', 'editor_action(this.id)', 'ed_help.gif']};
}
/* ---------------------------------------------------------------------- *\
Function : editor_generate
Description : replace textarea with wysiwyg editor
Usage
: editor_generate("textarea_id",[height],[width]);
Arguments : objname - ID of textarea to replace
w
- width of wysiwyg editor
h
- height of wysiwyg editor
\* ---------------------------------------------------------------------- */
function editor_generate(objname,userConfig) {
// Default Settings
var config = new editor_defaultConfig(objname);
if (userConfig) {
for (var thisName in userConfig) {
if (userConfig[thisName]) { config[thisName] = userConfig[thisName]; }
}
}
document.all[objname].config = config;
// store config settings
// set size to specified size or size of original object
var obj = document.all[objname];
if (!config.width || config.width == "auto") {
if (obj.style.width) { config.width = obj.style.width; } // use css style
else if (obj.cols)
else
{ config.width = (obj.cols * 8) + 22; } // col width + toolbar
{ config.width = '100%'; }
}
if (!config.height || config.height == "auto") {
// default
if (obj.style.height) { config.height = obj.style.height; } // use css style
else if (obj.rows)
else
{ config.height = obj.rows * 17 }
{ config.height = '200'; }
// row height
// default
}
var tblOpen = '<table border=0 cellspacing=0 cellpadding=0 style="float: left;"
unselectable="on"><tr><td style="border: none; padding: 1 0 0 0"><nobr>';
var tblClose = '</nobr></td></tr></table>\n';
// build button toolbar
var toolbar = '';
var btnGroup, btnItem, aboutEditor;
for (var btnGroup in config.toolbar) {
// linebreak
if (config.toolbar[btnGroup].length == 1 &&
config.toolbar[btnGroup][0].toLowerCase() == "linebreak") {
toolbar += '<br clear="all">';
continue;
}
toolbar += tblOpen;
for (var btnItem in config.toolbar[btnGroup]) {
var btnName = config.toolbar[btnGroup][btnItem].toLowerCase();
// fontname
if (btnName == "fontname") {
toolbar += '<select id="_' +objname+ '_FontName" onChange="editor_action(this.id)"
unselectable="on" style="margin: 1 2 0 2; font-size: 12px;">';
for (var fontname in config.fontnames) {
toolbar += '<option value="' +config.fontnames[fontname]+ '">' +fontname+ '</option>'
}
toolbar += '</select>';
continue;
}
// fontsize
if (btnName == "fontsize") {
toolbar += '<select id="_' +objname+ '_FontSize" onChange="editor_action(this.id)"
unselectable="on" style="margin: 1 2 0 0; font-size: 12px;">';
for (var fontsize in config.fontsizes) {
toolbar += '<option value="' +config.fontsizes[fontsize]+ '">' +fontsize+ '</option>'
}
toolbar += '</select>\n';
continue;
}
// font style
if (btnName == "fontstyle") {
toolbar += '<select id="_' +objname+ '_FontStyle" onChange="editor_action(this.id)"
unselectable="on" style="margin: 1 2 0 0; font-size: 12px;">';
+ '<option value="">Font Style</option>';
for (var i in config.fontstyles) {
var fontstyle = config.fontstyles[i];
toolbar += '<option value="' +fontstyle.className+ '">' +fontstyle.name+ '</option>'
}
toolbar += '</select>';
continue;
}
// separator
if (btnName == "separator") {
toolbar += '<span style="border: 1px inset; width: 1px; font-size: 16px; height: 16px; margin: 0 3 0
3"></span>';
continue;
}
// buttons
var btnObj = config.btnList[btnName];
if (btnName == 'linebreak') { alert("htmlArea error: 'linebreak' must be in a subgroup by itself, not
with other buttons.\n\nhtmlArea wysiwyg editor not created."); return; }
if (!btnObj) { alert("htmlArea error: button '" +btnName+ "' not found in button list when creating the
wysiwyg editor for '"+objname+"'.\nPlease make sure you entered the button name correctly.\n\nhtmlArea
wysiwyg editor not created."); return; }
var btnCmdID = btnObj[0];
var btnTitle = btnObj[1];
var btnOnClick = btnObj[2];
var btnImage = btnObj[3];
toolbar += '<button title="' +btnTitle+ '" id="_' +objname+ '_' +btnCmdID+ '" class="btn" onClick="'
+btnOnClick+ '" onmouseover="if(this.className==\'btn\'){this.className=\'btnOver\'}"
onmouseout="if(this.className==\'btnOver\'){this.className=\'btn\'}" unselectable="on"><img src="'
+config.imgURL + btnImage+ '" border=0 unselectable="on"></button>';
} // end of button sub-group
toolbar += tblClose;
} // end of entire button set
// build editor
var editor = '<span id="_editor_toolbar"><table border=0 cellspacing=0 cellpadding=0
bgcolor="buttonface" style="padding: 1 0 0 2" width=' + config.width + ' unselectable="on"><tr><td>\n'
+ toolbar
+ '</td></tr></table>\n'
+ '</td></tr></table></span>\n'
+ '<textarea ID="_' +objname + '_editor" style="width:' +config.width+ '; height:' +config.height+ ';
margin-top: -1px; margin-bottom: -1px;" wrap=soft></textarea>';
// add context menu
editor += '<div id="_' +objname + '_cMenu" style="position: absolute; visibility: hidden;"></div>';
// hide original textarea and insert htmlarea after it
if (!config.debug) { document.all[objname].style.display = "none"; }
if (config.plaintextInput) { // replace nextlines with breaks
var contents = document.all[objname].value;
contents = contents.replace(/\r\n/g, '<br>');
contents = contents.replace(/\n/g, '<br>');
contents = contents.replace(/\r/g, '<br>');
document.all[objname].value = contents;
}
// insert wysiwyg
document.all[objname].insertAdjacentHTML('afterEnd', editor)
// convert htmlarea from textarea to wysiwyg editor
editor_setmode(objname, 'init');
// call filterOutput when user submits form
for (var idx=0; idx < document.forms.length; idx++) {
var r = document.forms[idx].attachEvent('onsubmit', function() { editor_filterOutput(objname); });
if (!r) { alert("Error attaching event to form!"); }
}
return true;
}
/* ---------------------------------------------------------------------- *\
Function : editor_action
Description : perform an editor command on selected editor content
Usage
:
Arguments : button_id - button id string with editor and action name
\* ---------------------------------------------------------------------- */
function editor_action(button_id) {
// split up button name into "editorID" and "cmdID"
var BtnParts = Array();
BtnParts = button_id.split("_");
var objname = button_id.replace(/^_(.*)_[^_]*$/, '$1');
var cmdID = BtnParts[ BtnParts.length-1 ];
var button_obj = document.all[button_id];
var editor_obj = document.all["_" +objname + "_editor"];
var config = document.all[objname].config;
// help popup
if (cmdID == 'showhelp') {
window.open(_editor_url + "popups/editor_help.html", 'EditorHelp');
return;
}
// popup editor
if (cmdID == 'popupeditor') {
window.open(_editor_url + "popups/fullscreen.html?"+objname,
'FullScreen',
'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=640,h
eight=480');
return;
}
// check editor mode (don't perform actions in textedit mode)
if (editor_obj.tagName.toLowerCase() == 'textarea') { return; }
var editdoc = editor_obj.contentWindow.document;
editor_focus(editor_obj);
// get index and value for pulldowns
var idx = button_obj.selectedIndex;
var val = (idx != null) ? button_obj[ idx ].value : null;
if (0) {} // use else if for easy cutting and pasting
//
// CUSTOM BUTTONS START HERE
//
// Custom1
else if (cmdID == 'custom1') {
alert("Hello, I am custom button 1!");
}
// Custom2
else if (cmdID == 'custom2') { // insert some text from a popup window
var myTitle = "This is a custom title";
var myText = showModalDialog(_editor_url + "popups/custom2.html",
myTitle, // str or obj specified here can be read from dialog as
"window.dialogArguments"
"resizable: yes; help: no; status: no; scroll: no; ");
if (myText) { editor_insertHTML(objname, myText); }
}
// Custom3
else if (cmdID == 'custom3') { // insert some text
editor_insertHTML(objname, "It's easy to add buttons that insert text!");
}
//
// END OF CUSTOM BUTTONS
//
// FontName
else if (cmdID == 'FontName' && val) {
editdoc.execCommand(cmdID,0,val);
}
// FontSize
else if (cmdID == 'FontSize' && val) {
editdoc.execCommand(cmdID,0,val);
}
// FontStyle (change CSS className)
else if (cmdID == 'FontStyle' && val) {
editdoc.execCommand('RemoveFormat');
editdoc.execCommand('FontName',0,'636c6173734e616d6520706c616365686f6c646572');
var fontArray = editdoc.all.tags("FONT");
for (i=0; i<fontArray.length; i++) {
if (fontArray[i].face == '636c6173734e616d6520706c616365686f6c646572') {
fontArray[i].face = "";
fontArray[i].className = val;
fontArray[i].outerHTML = fontArray[i].outerHTML.replace(/face=['"]+/, "");
}
}
button_obj.selectedIndex =0;
}
// fgColor and bgColor
else if (cmdID == 'ForeColor' || cmdID == 'BackColor') {
var oldcolor = _dec_to_rgb(editdoc.queryCommandValue(cmdID));
var newcolor = showModalDialog(_editor_url + "popups/select_color.html", oldcolor, "resizable: no;
help: no; status: no; scroll: no;");
if (newcolor != null) { editdoc.execCommand(cmdID, false, "#"+newcolor); }
}
// execute command for buttons - if we didn't catch the cmdID by here we'll assume it's a
// commandID and pass it to execCommand(). See
http://msdn.microsoft.com/workshop/author/dhtml/reference/commandids.asp
else {
// subscript & superscript, disable one before enabling the other
if (cmdID.toLowerCase() == 'subscript' && editdoc.queryCommandState('superscript')) {
editdoc.execCommand('superscript'); }
if (cmdID.toLowerCase() == 'superscript' && editdoc.queryCommandState('subscript')) {
editdoc.execCommand('subscript'); }
// insert link
if (cmdID.toLowerCase() == 'createlink'){
editdoc.execCommand(cmdID,1);
}
// insert image
else if (cmdID.toLowerCase() == 'insertimage'){
showModalDialog(_editor_url + "popups/insert_image.html", editdoc, "resizable: no; help: no; status:
no; scroll: no; ");
}
// insert table
else if (cmdID.toLowerCase() == 'inserttable'){
showModalDialog(_editor_url + "popups/insert_table.html?"+objname,
window,
"resizable: yes; help: no; status: no; scroll: no; ");
}
// all other commands microsoft Command Identifiers
else { editdoc.execCommand(cmdID); }
}
editor_event(objname);
}
/* ---------------------------------------------------------------------- *\
Function : editor_event
Description : called everytime an editor event occurs
Usage
: editor_event(objname, runDelay, eventName)
Arguments : objname - ID of textarea to replace
runDelay: -1 = run now, no matter what
0 = run now, if allowed
1000 = run in 1 sec, if allowed at that point
\* ---------------------------------------------------------------------- */
function editor_event(objname,runDelay) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname+ "_editor"];
// html editor object
if (runDelay == null) { runDelay = 0; }
var editdoc;
var editEvent = editor_obj.contentWindow ? editor_obj.contentWindow.event : event;
// catch keypress events
if (editEvent && editEvent.keyCode) {
var ord
= editEvent.keyCode; // ascii order of key pressed
var ctrlKey = editEvent.ctrlKey;
var altKey = editEvent.altKey;
var shiftKey = editEvent.shiftKey;
if (ord == 16) { return; } // ignore shift key by itself
if (ord == 17) { return; } // ignore ctrl key by itself
if (ord == 18) { return; } // ignore alt key by itself
// cancel ENTER key and insert <BR> instead
//
if (ord == 13 && editEvent.type == 'keypress') {
//
editEvent.returnValue = false;
//
editor_insertHTML(objname, "<br>");
//
return;
//
}
if (ctrlKey && (ord == 122 || ord == 90)) { // catch ctrl-z (UNDO)
// TODO: Add our own undo/redo functionality
//
editEvent.cancelBubble = true;
return;
}
if ((ctrlKey && (ord == 121 || ord == 89)) ||
ctrlKey && shiftKey && (ord == 122 || ord == 90)) { // catch ctrl-y, ctrl-shift-z (REDO)
// TODO: Add our own undo/redo functionality
return;
}
}
// setup timer for delayed updates (some events take time to complete)
if (runDelay > 0) { return setTimeout(function(){ editor_event(objname); }, runDelay); }
// don't execute more than 3 times a second (eg: too soon after last execution)
if (this.tooSoon == 1 && runDelay >= 0) { this.queue = 1; return; } // queue all but urgent events
this.tooSoon = 1;
setTimeout(function(){
this.tooSoon = 0;
if (this.queue) { editor_event(objname,-1); };
this.queue = 0;
}, 333); // 1/3 second
editor_updateOutput(objname);
editor_updateToolbar(objname);
}
/* ---------------------------------------------------------------------- *\
Function : editor_updateToolbar
Description : update toolbar state
Usage
:
Arguments : objname - ID of textarea to replace
action - enable, disable, or update (default action)
\* ---------------------------------------------------------------------- */
function editor_updateToolbar(objname,action) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname+ "_editor"];
// disable or enable toolbar
if (action == "enable" || action == "disable") {
var tbItems = new Array('FontName','FontSize','FontStyle');
// add pulldowns
for (var btnName in config.btnList) { tbItems.push(config.btnList[btnName][0]); } // add buttons
for (var idxN in tbItems) {
var cmdID = tbItems[idxN].toLowerCase();
var tbObj = document.all["_" +objname+ "_" +tbItems[idxN]];
if (cmdID == "htmlmode" || cmdID == "about" || cmdID == "showhelp" || cmdID == "popupeditor") {
continue; } // don't change these buttons
if (tbObj == null) { continue; }
var isBtn = (tbObj.tagName.toLowerCase() == "button") ? true : false;
if (action == "enable") { tbObj.disabled = false; if (isBtn) { tbObj.className = 'btn' }}
if (action == "disable") { tbObj.disabled = true; if (isBtn) { tbObj.className = 'btnNA' }}
}
return;
}
// update toolbar state
if (editor_obj.tagName.toLowerCase() == 'textarea') { return; } // don't update state in textedit mode
var editdoc = editor_obj.contentWindow.document;
// Set FontName pulldown
var fontname_obj = document.all["_" +objname+ "_FontName"];
if (fontname_obj) {
var fontname = editdoc.queryCommandValue('FontName');
if (fontname == null) { fontname_obj.value = null; }
else {
var found = 0;
for (i=0; i<fontname_obj.length; i++) {
if (fontname.toLowerCase() == fontname_obj[i].text.toLowerCase()) {
fontname_obj.selectedIndex = i;
found = 1;
}
}
if (found != 1) { fontname_obj.value = null; } // for fonts not in list
}
}
// Set FontSize pulldown
var fontsize_obj = document.all["_" +objname+ "_FontSize"];
if (fontsize_obj) {
var fontsize = editdoc.queryCommandValue('FontSize');
if (fontsize == null) { fontsize_obj.value = null; }
else {
var found = 0;
for (i=0; i<fontsize_obj.length; i++) {
if (fontsize == fontsize_obj[i].value) { fontsize_obj.selectedIndex = i; found=1; }
}
if (found != 1) { fontsize_obj.value = null; } // for sizes not in list
}
}
// Set FontStyle pulldown
var classname_obj = document.all["_" +objname+ "_FontStyle"];
if (classname_obj) {
var curRange = editdoc.selection.createRange();
// check element and element parents for class names
var pElement;
if (curRange.length) { pElement = curRange[0]; }
else
// control tange
{ pElement = curRange.parentElement(); } // text range
while (pElement && !pElement.className) { pElement = pElement.parentElement; } // keep going up
var thisClass = pElement ? pElement.className.toLowerCase() : "";
if (!thisClass && classname_obj.value) { classname_obj.value = null; }
else {
var found = 0;
for (i=0; i<classname_obj.length; i++) {
if (thisClass == classname_obj[i].value.toLowerCase()) {
classname_obj.selectedIndex = i;
found=1;
}
}
if (found != 1) { classname_obj.value = null; } // for classes not in list
}
}
// update button states
var IDList =
Array('Bold','Italic','Underline','StrikeThrough','SubScript','SuperScript','JustifyLeft','JustifyCenter','Justify
Right','InsertOrderedList','InsertUnorderedList');
for (i=0; i<IDList.length; i++) {
var btnObj = document.all["_" +objname+ "_" +IDList[i]];
if (btnObj == null) { continue; }
var cmdActive = editdoc.queryCommandState( IDList[i] );
if (!cmdActive) {
// option is OK
if (btnObj.className != 'btn') { btnObj.className = 'btn'; }
if (btnObj.disabled != false) { btnObj.disabled = false; }
} else if (cmdActive) {
// option already applied or mixed content
if (btnObj.className != 'btnDown') { btnObj.className = 'btnDown'; }
if (btnObj.disabled != false) { btnObj.disabled = false; }
}
}
}
/* ---------------------------------------------------------------------- *\
Function : editor_updateOutput
Description : update hidden output field with data from wysiwg
\* ---------------------------------------------------------------------- */
function editor_updateOutput(objname) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname+ "_editor"];
// html editor object
var editEvent = editor_obj.contentWindow ? editor_obj.contentWindow.event : event;
var isTextarea = (editor_obj.tagName.toLowerCase() == 'textarea');
var editdoc = isTextarea ? null : editor_obj.contentWindow.document;
// get contents of edit field
var contents;
if (isTextarea) { contents = editor_obj.value; }
else
{ contents = editdoc.body.innerHTML; }
// check if contents has changed since the last time we ran this routine
if (config.lastUpdateOutput && config.lastUpdateOutput == contents) { return; }
else { config.lastUpdateOutput = contents; }
// update hidden output field
document.all[objname].value = contents;
}
/* ---------------------------------------------------------------------- *\
Function : editor_filterOutput
Description :
\* ---------------------------------------------------------------------- */
function editor_filterOutput(objname) {
editor_updateOutput(objname);
var contents = document.all[objname].value;
var config = document.all[objname].config;
// ignore blank contents
if (contents.toLowerCase() == '<p>&nbsp;</p>') { contents = ""; }
// filter tag - this code is run for each HTML tag matched
var filterTag = function(tagBody,tagName,tagAttr) {
tagName = tagName.toLowerCase();
var closingTag = (tagBody.match(/^<\//)) ? true : false;
// fix placeholder URLS - remove absolute paths that IE adds
if (tagName == 'img') { tagBody = tagBody.replace(/(src\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); }
if (tagName == 'a') { tagBody = tagBody.replace(/(href\s*=\s*.)[^*]*(\*\*\*)/, "$1$2"); }
// add additional tag filtering here
// convert to vbCode
// if (tagName == 'b' || tagName == 'strong') {
// if (closingTag) { tagBody = "[/b]"; } else { tagBody = "[b]"; }
// }
// else if (tagName == 'i' || tagName == 'em') {
// if (closingTag) { tagBody = "[/i]"; } else { tagBody = "[i]"; }
// }
// else if (tagName == 'u') {
// if (closingTag) { tagBody = "[/u]"; } else { tagBody = "[u]"; }
// }
// else {
// tagBody = ""; // disallow all other tags!
// }
return tagBody;
};
// match tags and call filterTag
RegExp.lastIndex = 0;
var matchTag = /<\/?(\w+)((?:[^'">]*|'[^']*'|"[^"]*")*)>/g; // this will match tags, but still doesn't
handle container tags (textarea, comments, etc)
contents = contents.replace(matchTag, filterTag);
// remove nextlines from output (if requested)
if (config.replaceNextlines) {
contents = contents.replace(/\r\n/g, ' ');
contents = contents.replace(/\n/g, ' ');
contents = contents.replace(/\r/g, ' ');
}
// update output with filtered content
document.all[objname].value = contents;
}
/* ---------------------------------------------------------------------- *\
Function : editor_setmode
Description : change mode between WYSIWYG and HTML editor
Usage
: editor_setmode(objname, mode);
Arguments : objname - button id string with editor and action name
mode - init, textedit, or wysiwyg
\* ---------------------------------------------------------------------- */
function editor_setmode(objname, mode) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname + "_editor"];
// wait until document is fully loaded
if (document.readyState != 'complete') {
setTimeout(function() { editor_setmode(objname,mode) }, 25);
return;
}
// define different editors
var TextEdit = '<textarea ID="_' +objname + '_editor" style="width:' +editor_obj.style.width+ '; height:'
+editor_obj.style.height+ '; margin-top: -1px; margin-bottom: -1px;"></textarea>';
var RichEdit = '<iframe ID="_' +objname+ '_editor" style="width:' +editor_obj.style.width+ '; height:'
+editor_obj.style.height+ ';"></iframe>';
// src="' +_editor_url+ 'popups/blank.html"
//
// Switch to TEXTEDIT mode
//
if (mode == "textedit" || editor_obj.tagName.toLowerCase() == 'iframe') {
config.mode = "textedit";
var editdoc = editor_obj.contentWindow.document;
var contents = editdoc.body.createTextRange().htmlText;
editor_obj.outerHTML = TextEdit;
editor_obj = document.all["_" +objname + "_editor"];
editor_obj.value = contents;
editor_event(objname);
editor_updateToolbar(objname, "disable"); // disable toolbar items
// set event handlers
editor_obj.onkeydown = function() { editor_event(objname); }
editor_obj.onkeypress = function() { editor_event(objname); }
editor_obj.onkeyup = function() { editor_event(objname); }
editor_obj.onmouseup = function() { editor_event(objname); }
editor_obj.ondrop = function() { editor_event(objname, 100); } // these events fire before they
occur
editor_obj.oncut
= function() { editor_event(objname, 100); }
editor_obj.onpaste = function() { editor_event(objname, 100); }
editor_obj.onblur = function() { editor_event(objname, -1); }
editor_updateOutput(objname);
editor_focus(editor_obj);
}
//
// Switch to WYSIWYG mode
//
else {
config.mode = "wysiwyg";
var contents = editor_obj.value;
if (mode == 'init') { contents = document.all[objname].value; } // on init use original textarea content
// create editor
editor_obj.outerHTML = RichEdit;
editor_obj = document.all["_" +objname + "_editor"];
// get iframe document object
// create editor contents (and default styles for editor)
var html = "";
html += '<html><head>\n';
if (config.stylesheet) {
html += '<link href="' +config.stylesheet+ '" rel="stylesheet" type="text/css">\n';
}
html += '<style>\n';
html += 'body {' +config.bodyStyle+ '} \n';
for (var i in config.fontstyles) {
var fontstyle = config.fontstyles[i];
if (fontstyle.classStyle) {
html += '.' +fontstyle.className+ ' {' +fontstyle.classStyle+ '}\n';
}
}
html += '</style>\n'
+ '</head>\n'
+ '<body contenteditable="true" topmargin=1 leftmargin=1'
// still working on this
// + ' oncontextmenu="parent.editor_cMenu_generate(window,\'' +objname+ '\');"'
+'>'
+ contents
+ '</body>\n'
+ '</html>\n';
// write to editor window
var editdoc = editor_obj.contentWindow.document;
editdoc.open();
editdoc.write(html);
editdoc.close();
editor_updateToolbar(objname, "enable"); // enable toolbar items
// store objname under editdoc
editdoc.objname = objname;
// set event handlers
editdoc.onkeydown = function() { editor_event(objname); }
editdoc.onkeypress = function() { editor_event(objname); }
editdoc.onkeyup
= function() { editor_event(objname); }
editdoc.onmouseup = function() { editor_event(objname); }
editdoc.body.ondrop = function() { editor_event(objname, 100); } // these events fire before they
occur
editdoc.body.oncut = function() { editor_event(objname, 100); }
editdoc.body.onpaste = function() { editor_event(objname, 100); }
editdoc.body.onblur = function() { editor_event(objname, -1); }
// bring focus to editor
if (mode != 'init') {
// don't focus on page load, only on mode switch
editor_focus(editor_obj);
}
}
// Call update UI
if (mode != 'init') {
editor_event(objname);
}
// don't update UI on page load, only on mode switch
}
/* ---------------------------------------------------------------------- *\
Function : editor_focus
Description : bring focus to the editor
Usage
: editor_focus(editor_obj);
Arguments : editor_obj - editor object
\* ---------------------------------------------------------------------- */
function editor_focus(editor_obj) {
// check editor mode
if (editor_obj.tagName.toLowerCase() == 'textarea') {
// textarea
var myfunc = function() { editor_obj.focus(); };
setTimeout(myfunc,100);
// doesn't work all the time without delay
}
else {
// wysiwyg
var editdoc = editor_obj.contentWindow.document;
// get iframe editor document object
var editorRange = editdoc.body.createTextRange();
// editor range
var curRange = editdoc.selection.createRange();
// selection range
if (curRange.length == null &&
// make sure it's not a controlRange
!editorRange.inRange(curRange)) {
// is selection in editor range
editorRange.collapse();
editorRange.select();
// move to start of range
// select
curRange = editorRange;
}
}
}
/* ---------------------------------------------------------------------- *\
Function : editor_about
Description : display "about this editor" popup
\* ---------------------------------------------------------------------- */
function editor_about(objname) {
showModalDialog(_editor_url + "popups/about.html", window, "resizable: yes; help: no; status: no;
scroll: no; ");
}
/* ---------------------------------------------------------------------- *\
Function : _dec_to_rgb
Description : convert dec color value to rgb hex
Usage
: var hex = _dec_to_rgb('65535'); // returns FFFF00
Arguments : value - dec value
\* ---------------------------------------------------------------------- */
function _dec_to_rgb(value) {
var hex_string = "";
for (var hexpair = 0; hexpair < 3; hexpair++) {
var myByte = value & 0xFF;
value >>= 8;
// get low byte
// drop low byte
var nybble2 = myByte & 0x0F;
// get low nybble (4 bits)
var nybble1 = (myByte >> 4) & 0x0F; // get high nybble
hex_string += nybble1.toString(16); // convert nybble to hex
hex_string += nybble2.toString(16); // convert nybble to hex
}
return hex_string.toUpperCase();
}
/* ---------------------------------------------------------------------- *\
Function : editor_insertHTML
Description : insert string at current cursor position in editor. If
two strings are specifed, surround selected text with them.
Usage
: editor_insertHTML(objname, str1, [str2], reqSelection)
Arguments : objname - ID of textarea
str1 - HTML or text to insert
str2 - HTML or text to insert (optional argument)
reqSelection - (1 or 0) give error if no text selected
\* ---------------------------------------------------------------------- */
function editor_insertHTML(objname, str1,str2, reqSel) {
var config = document.all[objname].config;
var editor_obj = document.all["_" +objname + "_editor"]; // editor object
if (str1 == null) { str1 = ''; }
if (str2 == null) { str2 = ''; }
// for non-wysiwyg capable browsers just add to end of textbox
if (document.all[objname] && editor_obj == null) {
document.all[objname].focus();
document.all[objname].value = document.all[objname].value + str1 + str2;
return;
}
// error checking
if (editor_obj == null) { return alert("Unable to insert HTML. Invalid object name '" +objname+ "'."); }
editor_focus(editor_obj);
var tagname = editor_obj.tagName.toLowerCase();
var sRange;
// insertHTML for wysiwyg iframe
if (tagname == 'iframe') {
var editdoc = editor_obj.contentWindow.document;
sRange = editdoc.selection.createRange();
var sHtml = sRange.htmlText;
// check for control ranges
if (sRange.length) { return alert("Unable to insert HTML. Try highlighting content instead of selecting
it."); }
// insert HTML
var oldHandler = window.onerror;
window.onerror = function() { alert("Unable to insert HTML for current selection."); return true; } //
partial table selections cause errors
if (sHtml.length) {
// if content selected
if (str2) { sRange.pasteHTML(str1 +sHtml+ str2) } // surround
else { sRange.pasteHTML(str1); }
// overwrite
} else {
// if insertion point only
if (reqSel) { return alert("Unable to insert HTML. You must select something first."); }
sRange.pasteHTML(str1 + str2);
// insert strings
}
window.onerror = oldHandler;
}
// insertHTML for plaintext textarea
else if (tagname == 'textarea') {
editor_obj.focus();
sRange = document.selection.createRange();
var sText = sRange.text;
// insert HTML
if (sText.length) {
// if content selected
if (str2) { sRange.text = str1 +sText+ str2; } // surround
else { sRange.text = str1; }
} else {
// overwrite
// if insertion point only
if (reqSel) { return alert("Unable to insert HTML. You must select something first."); }
sRange.text = str1 + str2;
}
}
// insert strings
else { alert("Unable to insert HTML. Unknown object tag type '" +tagname+ "'."); }
// move to end of new content
sRange.collapse(false); // move to end of range
sRange.select();
// re-select
}
/* ---------------------------------------------------------------------- *\
Function : editor_getHTML
Description : return HTML contents of editor (in either wywisyg or html mode)
Usage
: var myHTML = editor_getHTML('objname');
\* ---------------------------------------------------------------------- */
function editor_getHTML(objname) {
var editor_obj = document.all["_" +objname + "_editor"];
var isTextarea = (editor_obj.tagName.toLowerCase() == 'textarea');
if (isTextarea) { return editor_obj.value; }
else
}
{ return editor_obj.contentWindow.document.body.innerHTML; }
/* ---------------------------------------------------------------------- *\
Function : editor_setHTML
Description : set HTML contents of editor (in either wywisyg or html mode)
Usage
: editor_setHTML('objname',"<b>html</b> <u>here</u>");
\* ---------------------------------------------------------------------- */
function editor_setHTML(objname, html) {
var editor_obj = document.all["_" +objname + "_editor"];
var isTextarea = (editor_obj.tagName.toLowerCase() == 'textarea');
if (isTextarea) { editor_obj.value = html; }
else
{ editor_obj.contentWindow.document.body.innerHTML = html; }
}
/* ---------------------------------------------------------------------- *\
Function : editor_appendHTML
Description : append HTML contents to editor (in either wywisyg or html mode)
Usage
: editor_appendHTML('objname',"<b>html</b> <u>here</u>");
\* ---------------------------------------------------------------------- */
function editor_appendHTML(objname, html) {
var editor_obj = document.all["_" +objname + "_editor"];
var isTextarea = (editor_obj.tagName.toLowerCase() == 'textarea');
if (isTextarea) { editor_obj.value += html; }
else
{ editor_obj.contentWindow.document.body.innerHTML += html; }
}
/* ---------------------------------------------------------------- */
function _isMouseOver(obj,event) {
// determine if mouse is over object
var mouseX = event.clientX;
var mouseY = event.clientY;
var objTop = obj.offsetTop;
var objBottom = obj.offsetTop + obj.offsetHeight;
var objLeft = obj.offsetLeft;
var objRight = obj.offsetLeft + obj.offsetWidth;
if (mouseX >= objLeft && mouseX <= objRight &&
mouseY >= objTop && mouseY <= objBottom) { return true; }
return false;
}
/* ---------------------------------------------------------------- */
function editor_cMenu_generate(editorWin,objname) {
var parentWin = window;
editorWin.event.returnValue = false; // cancel default context menu
// define content menu options
var cMenuOptions = [ // menu name, shortcut displayed, javascript code
['Cut', 'Ctrl-X', function() {}],
['Copy', 'Ctrl-C', function() {}],
['Paste', 'Ctrl-C', function() {}],
['Delete', 'DEL', function() {}],
['---', null, null],
['Select All', 'Ctrl-A', function() {}],
['Clear All', '', function() {}],
['---', null, null],
['About this editor...', '', function() {
alert("about this editor");
}]];
editor_cMenu.options = cMenuOptions; // save options
// generate context menu
var cMenuHeader = ''
+ '<div id="_'+objname+'_cMenu" onblur="editor_cMenu(this);" oncontextmenu="return false;"
onselectstart="return false"'
+ ' style="position: absolute; visibility: hidden; cursor: default; width: 167px; background-color:
threedface;'
+ ' border: solid 1px; border-color: threedlightshadow threeddarkshadow threeddarkshadow
threedlightshadow;">'
+ '<table border=0 cellspacing=0 cellpadding=0 width="100%" style="width: 167px; backgroundcolor: threedface; border: solid 1px; border-color: threedhighlight threedshadow threedshadow
threedhighlight;">'
+ ' <tr><td colspan=2 height=1></td></tr>';
var cMenuList = '';
var cMenuFooter = ''
+ ' <tr><td colspan=2 height=1></td></tr>'
+ '</table></div>';
for (var menuIdx in editor_cMenu.options) {
var menuName = editor_cMenu.options[menuIdx][0];
var menuKey = editor_cMenu.options[menuIdx][1];
var menuCode = editor_cMenu.options[menuIdx][2];
// separator
if (menuName == "---" || menuName == "separator") {
cMenuList += ' <tr><td colspan=2 class="cMenuDivOuter"><div
class="cMenuDivInner"></div></td></tr>';
}
// menu option
else {
cMenuList += '<tr class="cMenu" onMouseOver="editor_cMenu(this)"
onMouseOut="editor_cMenu(this)" onClick="editor_cMenu(this, \'' +menuIdx+ '\',\'' +objname+ '\')">';
if (menuKey) { cMenuList += ' <td align=left class="cMenu">' +menuName+ '</td><td align=right
class="cMenu">' +menuKey+ '</td>'; }
else
{ cMenuList += ' <td colspan=2 class="cMenu">' +menuName+ '</td>'; }
cMenuList += '</tr>';
}
}
var cMenuHTML = cMenuHeader + cMenuList + cMenuFooter;
document.all['_'+objname+'_cMenu'].outerHTML = cMenuHTML;
editor_cMenu_setPosition(parentWin, editorWin, objname);
parentWin['_'+objname+'_cMenu'].style.visibility = 'visible';
parentWin['_'+objname+'_cMenu'].focus();
}
/* ---------------------------------------------------------------- */
function editor_cMenu_setPosition(parentWin, editorWin, objname) { // set object position that won't
overlap window edge
var event = editorWin.event;
var cMenuObj = parentWin['_'+objname+'_cMenu'];
var mouseX = event.clientX + parentWin.document.all['_'+objname+'_editor'].offsetLeft;
var mouseY = event.clientY + parentWin.document.all['_'+objname+'_editor'].offsetTop;
var cMenuH = cMenuObj.offsetHeight;
var cMenuW = cMenuObj.offsetWidth;
var pageH = document.body.clientHeight + document.body.scrollTop;
var pageW = document.body.clientWidth + document.body.scrollLeft;
// set horzontal position
if (mouseX + 5 + cMenuW > pageW) { var left = mouseX - cMenuW - 5; } // too far right
else
{ var left = mouseX + 5; }
// set vertical position
if (mouseY + 5 + cMenuH > pageH) { var top = mouseY - cMenuH + 5; } // too far down
else
{ var top = mouseY + 5; }
cMenuObj.style.top = top;
cMenuObj.style.left = left;
}
/* ---------------------------------------------------------------- */
function editor_cMenu(obj,menuIdx,objname) {
var action = event.type;
if (action == "mouseover" && !obj.disabled && obj.tagName.toLowerCase() == 'tr') {
obj.className = 'cMenuOver';
for (var i=0; i < obj.cells.length; i++) { obj.cells[i].className = 'cMenuOver'; }
}
else if (action == "mouseout" && !obj.disabled && obj.tagName.toLowerCase() == 'tr') {
obj.className = 'cMenu';
for (var i=0; i < obj.cells.length; i++) { obj.cells[i].className = 'cMenu'; }
}
else if (action == "click" && !obj.disabled) {
document.all['_'+objname+'_cMenu'].style.visibility = "hidden";
var menucode = editor_cMenu.options[menuIdx][2];
menucode();
}
else if (action == "blur") {
if (!_isMouseOver(obj,event)) { obj.style.visibility = 'hidden'; }
else {
if (obj.style.visibility != "hidden") { obj.focus(); }
}
}
else { alert("editor_cMenu, unknown action: " + action); }
}
/* ---------------------------------------------------------------------- */
Source code ชือ่ first.asp
<HTML>
<HEAD>
<TITLE>Freehost , Free host , ????????????????</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0
MARGINHEIGHT=0>
<iframe src="http://www.thaifasthost.com" frameborder="0" width="990" height="1500"> </iframe>
<!-- ImageReady Slices (Untitled-1.jpg) -->
<!-- End ImageReady Slices -->
</BODY>
</HTML>
Source code ชือ่ function.php
<?php
class sql{
function
QuerySql($sql){//Ãѹ¤ÓÊÑè§ sql
$query = mysql_query($sql)
or die("No Query Table");
if (($query)){
return $query;
}else{
return false;
}
}
//============== Function 㹡ÒÃá·Ã¡¢éÍÁÙÅ
==============
function insert($field,$value,$table)
{
$sql = "INSERT INTO $table
($field) VaLUES ($value)";
//echo $sql;
$result= mysql_query($sql);
return $result;
}
//------------------Function 㹡ÒÃá·Ã¡¢éÍÁÙÅ
ÃٻẺ·Õè 2----------------------function insertV($value,$table)
{
$sql = "INSERT INTO $table
VaLUES ($value)";
//echo $sql;
$result= mysql_query($sql);
return $result;
}
//============== Function 㹡ÒÃź¢éÍÁÙÅ
==============
function delete($table,$condition)
{
$sql ="delete from $table $condition";
$result = mysql_query($sql);
return $result;
}
//=============== Function 㹡ÒÃá¡é䢢éÍÁÙÅ
==================
function update($table,$command,$condition)
{
$sql = "UPDaTE $table SET
$command $condition";
$result = mysql_query($sql);
return $result;
}
//=============== Function 㹡ÒÃàÅ×Í¡¢éÍÁÙÅ
==================
function select($table,$condition)
{
$sql = "select * from
$table $condition";
//echo $sql;
$dbquery =
mysql_query($sql);
$result=
mysql_fetch_array($dbquery);
return $result;
}
//=============== Function 㹡ÒÃàÅ×Í¡¢éÍÁÙÅ·Ñé§ËÁ´
==================
function selectalldate($table,$condition)
{
$sql = "select * from $table
$condition";
//echo $sql;
$dbquery =
mysql_query($sql);
return $dbquery;
}
Min==================
//=============== select Reccord Max or
// ÍÒ¨¨Ðãªé㹡Òà ´Ö§ ੾ÒпÔÇÊì ËÃ×ÍÃÇÁ¤èÒ ¹Ñº¤èÒ
function
selectMaxOrMin($maxormin,$field,$table)
{
$sql = "select
$maxormin($field) as $field from $table";
$dbquery =
mysql_query($sql);
$result=
mysql_fetch_array($dbquery);
return $result;
}
//=============== Function
㹡ÒÃàÅ×Í¡¢éÍÁÙÅ==================
function
selectFistOrLast($table,$condition,$fieldlist,$bylist)
{
$sql = "select * from
$table $condition order by $fieldlist $bylist";
$dbquery =
mysql_query($sql);
$result=
mysql_fetch_array($dbquery);
return $result;
}
//=============== Function
㹡ҵÃǨÊͺµÑÇÍÑ¡ÉâéÍÁÙÅ ==================
function checkcharector($temp)
{
$temp=Trim(eregi_replace ( "'" , "" , $temp));
$temp=Trim(eregi_replace ( "\"" , "&quot;" ,
$temp));
return $temp;
}
//=============== Function
㹡ÒùѺ¨Ó¹Ç¹á¶Ç ==================
function num_record($table,$condition)
{
$sql = "select * from
$table $condition";
$dbquery =
mysql_query($sql);
$num_rows =
mysql_num_rows($dbquery);
return $num_rows;
}
//=============== Function
㹡ÒùѺµÃǨÊͺ¤èÒÇèÒ§ ==================
function
JscheckValueNull($form,$field,$msg)
{
echo"\nif(trim(document.$form.$field.value)=='')\n";
echo"{\n";
echo"alert('$msg');\n";
echo"document.$form.$field.focus();\n";
echo"return false;\n";
echo"}\n\n";
}
//======================µÃǨÊͺÃËÑʺѵûÃЪҪ¹=========================
===
function
checkID($id) {
if(strlen($id) != 13) return false;
for($i=0,
$sum=0; $i<12;$i++)
$sum +=
(int)($id{$i})*(13-$i);
if((11($sum%11))%10 == (int)($id{12}))
return true;
return false;
}
//======================àªç¤ÍÕàÁÅì====================
function checkemail($checkemail)
{
if(ereg( "^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\]{2}|net|com|gov|mil|rog|edu|int)$",$checkemail))
{
return true;
}
else
{
return false;
}
}
}
?>
Source code ชือ่ img.css
<style type="text/css">
.photo {
margin: 30px;
position: relative;
width: 180px;
height: 130px;
float: left;
}
.photo img {
background: #fff;
border: solid 1px #ccc;
padding: 4px;
}
.photo span {
width: 20px;
height: 18px;
display: block;
position: absolute;
top: 12px;
left: 12px;
background: url(images/digg-style.gif) no-repeat;
}
.photo a {
text-decoration: none;
}
.sample1 span {
width: 28px;
height: 21px;
display: block;
position: absolute;
top: -12px;
left: 90px;
background: url(images/pin.png) no-repeat;
}
.sample2 span {
width: 77px;
height: 27px;
display: block;
position: absolute;
top: -12px;
left: 50px;
background: url(images/tape.png) no-repeat;
}
.sample3 span {
width: 30px;
height: 60px;
display: block;
position: absolute;
top: -5px;
left: -2px;
background: url(images/paper-clip.png) no-repeat;
}
.sample4 span {
width: 115px;
height: 32px;
display: block;
position: absolute;
top: -13px;
left: 30px;
background: url(images/tape2.png) no-repeat;
}
.sample5 span {
width: 216px;
height: 166px;
display: block;
position: absolute;
top: -17px;
left: -18px;
background: url(images/gold-frame.png) no-repeat;
}
.sample6 span {
width: 189px;
height: 137px;
display: block;
position: absolute;
top: -5px;
left: -5px;
background: url(images/cut-corner.png) no-repeat;
}
.sample7 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 0;
left: 0;
background: url(images/round-corner.png) no-repeat;
}
.sample7 img {
border: none;
padding: 0;
}
.sample8 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 5px;
left: 6px;
background: url(images/round-corner.png) no-repeat;
}
.sample8 img {
border: none;
padding: 5px 6px 6px;
background: url(images/round-bg.gif) no-repeat;
}
.sample9 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 6px;
left: 7px;
background: url(images/stamp-pattern.png) no-repeat;
}
.sample9 img {
border: none;
padding: 6px 7px 7px;
background: url(images/stamp-bg.gif) no-repeat;
}
.sample10 span {
width: 181px;
height: 134px;
display: block;
position: absolute;
top: -6px;
left: -6px;
background: url(images/brush-border.png) no-repeat;
}
.sample10 img {
border: none;
padding: 0;
}
.sample11 span {
width: 122px;
height: 72px;
display: block;
position: absolute;
top: -22px;
left: -15px;
background: url(images/floral-corner.png) no-repeat;
}
.sample12 span {
width: 186px;
height: 137px;
display: block;
position: absolute;
top: 2px;
left: 2px;
background: url(images/watercolor-top.png) no-repeat;
}
.sample12 img {
border: none;
padding: 9px 12px 12px 11px;
background: url(images/watercolor-bg.png) no-repeat;
}
.sample13 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 0;
left: 0;
background: url(images/mask.png) no-repeat;
}
.sample13 img {
border: none;
padding: 0;
}
.sample14 span {
width: 170px;
height: 84px;
display: block;
position: absolute;
top: 5px;
left: 5px;
background: url(images/glossy-gradient.png);
}
</style>
<!--[if lt IE 7]>
<style type="text/css">
.photo span { behavior: url(iepngfix.htc); cursor: pointer; }
.sample12 img {
background: url(images/watercolor-bg.gif) no-repeat;
}
</style>
Source code ชือ่ img.php
<style type="text/css">
.photo {
margin: 30px;
position: relative;
width: 180px;
height: 130px;
float: left;
}
.photo img {
background: #fff;
border: solid 1px #ccc;
padding: 4px;
}
.photo span {
width: 20px;
height: 18px;
display: block;
position: absolute;
top: 12px;
left: 12px;
background: url(images/digg-style.gif) no-repeat;
}
.photo a {
text-decoration: none;
}
.sample1 span {
width: 28px;
height: 21px;
display: block;
position: absolute;
top: -12px;
left: 90px;
background: url(images/pin.png) no-repeat;
}
.sample2 span {
width: 77px;
height: 27px;
display: block;
position: absolute;
top: -12px;
left: 50px;
background: url(images/tape.png) no-repeat;
}
.sample3 span {
width: 30px;
height: 60px;
display: block;
position: absolute;
top: -5px;
left: -2px;
background: url(images/paper-clip.png) no-repeat;
}
.sample4 span {
width: 115px;
height: 32px;
display: block;
position: absolute;
top: -13px;
left: 30px;
background: url(images/tape2.png) no-repeat;
}
.sample5 span {
width: 216px;
height: 166px;
display: block;
position: absolute;
top: -17px;
left: -18px;
background: url(images/gold-frame.png) no-repeat;
}
.sample6 span {
width: 189px;
height: 137px;
display: block;
position: absolute;
top: -5px;
left: -5px;
background: url(images/cut-corner.png) no-repeat;
}
.sample7 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 0;
left: 0;
background: url(images/round-corner.png) no-repeat;
}
.sample7 img {
border: none;
padding: 0;
}
.sample8 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 5px;
left: 6px;
background: url(images/round-corner.png) no-repeat;
}
.sample8 img {
border: none;
padding: 5px 6px 6px;
background: url(images/round-bg.gif) no-repeat;
}
.sample9 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 6px;
left: 7px;
background: url(images/stamp-pattern.png) no-repeat;
}
.sample9 img {
border: none;
padding: 6px 7px 7px;
background: url(images/stamp-bg.gif) no-repeat;
}
.sample10 span {
width: 181px;
height: 134px;
display: block;
position: absolute;
top: -6px;
left: -6px;
background: url(images/brush-border.png) no-repeat;
}
.sample10 img {
border: none;
padding: 0;
}
.sample11 span {
width: 122px;
height: 72px;
display: block;
position: absolute;
top: -22px;
left: -15px;
background: url(images/floral-corner.png) no-repeat;
}
.sample12 span {
width: 186px;
height: 137px;
display: block;
position: absolute;
top: 2px;
left: 2px;
background: url(images/watercolor-top.png) no-repeat;
}
.sample12 img {
border: none;
padding: 9px 12px 12px 11px;
background: url(images/watercolor-bg.png) no-repeat;
}
.sample13 span {
width: 170px;
height: 120px;
display: block;
position: absolute;
top: 0;
left: 0;
background: url(images/mask.png) no-repeat;
}
.sample13 img {
border: none;
padding: 0;
}
.sample14 span {
width: 170px;
height: 84px;
display: block;
position: absolute;
top: 5px;
left: 5px;
background: url(images/glossy-gradient.png);
}
</style>
<!--[if lt IE 7]>
<style type="text/css">
.photo span { behavior: url(iepngfix.htc); cursor: pointer; }
.sample12 img {
background: url(images/watercolor-bg.gif) no-repeat;
}
</style>
Source code ชือ่ logout.php
<?
include("config.inc.php");
session_destroy();
echo"<script>";
echo"alert('¤Ø³ä´é·Ó¡ÒÃÍÍ¡¨ÒÃкºàÃÕºÃéÍÂáÅéÇ');";
echo"window.location='index.php';";
echo"</script>";
?>
Source code ชือ่ makmayshop.php
<?
include("config.inc.php");
?>
Source code ชือ่ new_de.php
<?
include("config.inc.php");
require("function.php");
$obj=new sql();
$sql="select * from new where new_id ='$_REQUEST[id]'";
$result=$obj->QuerySql($sql);
$rs=mysql_fetch_array($result);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title><?=$rs[new_titel ]?> .:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถกู ใจ เปิด
ร้านค้าออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<style type="text/css">
<!--
.style1 {
color: #FF0000;
font-weight: bold;
font-size: 16px;
}
body {
background-image: url();
background-color: #B5BECA;
}
body,td,th {
font-family: Times New Roman, Times, serif;
font-size: 14px;
}
-->
</style>
</head>
<body>
<div align="center">
<table width="850" border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
<tr>
<td width="769" background="images/6.gif"><table width="848" height="495" border="0"
cellpadding="0" cellspacing="0" background="images/6.gif">
<tr>
<td height="37">&nbsp;</td>
<td><span class="style1"><img src="images/star.png" width="32" height="32" />ข่าวสารจากเรา
</span></td>
</tr>
<tr>
<td width="37" height="37">&nbsp;</td>
<td width="526" bgcolor="#FFFFFF"><blockquote><strong>เรื่อง :</strong>
<?=$rs[new_titel ]?>
</blockquote></td>
</tr>
<tr>
<td height="35">&nbsp;</td>
<td valign="top"><table width="99%" height="388" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="24%" height="317"><img src="images/LOGOmakmay copy.gif" width="300"
height="151" /></td>
<td width="76%" valign="top">
<?=$rs[new_text]?>
</td>
</tr>
<tr>
<td height="36" align="right"><strong>ผู้ทาการประกาศ :</strong></td>
<td align="left">&nbsp;<strong>makmayshop</strong></td>
</tr>
<tr>
<td height="35" align="right"><strong>วัน / เวลา :</strong></td>
<td align="left">&nbsp;
<?=$rs[new_tiem ]?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<p>&nbsp;</p>
</div>
</body>
</html>
Source code ชือ่ newweb.php
<?
include("config.inc.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"><!-- InstanceBegin template="/Templates/tem.dwt.php"
codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Untitled Document</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!-body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed;
background-repeat: repeat-x;
background-image: url(images/_q_dnm052604-03.jpg);
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
border: 1px none #CC99FF;
}
.style5 {color: #000000}
.style9 {color: #BBBBBB; }
.style10 {color: #FF0000}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!-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];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!-a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
-->
</style>
<link rel="shortcut icon" href="images/favicon.ico">
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!-.style20 {
font-size: 14px;
font-weight: bold;
}
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
.style11 {font-size: 12px}
-->
</style>
<meta name="Keywords" content="เปิดร้านค้าฟรี ศูนย์รวมร้านค้า
ตลาดซื้อขาย สินค้ามือหนึ่ง สินค้ามือสอง ราคาถูก มากที่สดุ ในประเทศไทย อาทิ ช๊อปปิ้ง mp4 เครื่องสาอาง
พระเครื่อง รถ นาฬิกา อาหาร มือถือ เสื้อผ้าแฟชั่น อาหาร ...
" />
</head>
<body onload="MM_preloadImages('images/Untitled-1_032.jpg','images/Untitled1_052.jpg','images/Untitled-1_062.jpg','images/Untitled-1_072.jpg','images/Untitled-1_022.jpg')">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#E8E8E8"><div align="right"><strong>| <a href="index.php">หน้าแรก</a> | เข้าสู่
ระบบ | <a href="registermem.php">สมัครสมาชิก</a> | ออกจาระบบ </strong></div></td>
</tr>
<tr>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="287" align="left" valign="top"><a href="index.php"><img src="images/index_01.jpg"
width="288" height="103" border="0" /></a></td>
<td width="713" align="left" valign="top" bgcolor="#D7D7D7"><!-- InstanceBeginEditable
name="EditRegion4" -->
<table width="711" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wi
dth','711','height','98','src','Flash/teenee','quality','high','pluginspage','http://www.adobe.com/shockwave/do
wnload/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Flash/teenee' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="711" height="98">
<param name="movie" value="Flash/teenee.swf" />
<param name="quality" value="high" />
<embed src="Flash/teenee.swf" quality="high"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Flash" type="application/x-shockwave-flash" width="711" height="98"></embed>
</object></noscript></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="207" colspan="2" align="left" valign="top" bgcolor="#F2F2F2"><a
href="index.php"><img src="images/index_04.jpg" width="999" height="206" border="0" /></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="1000" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#F2F2F2"><span class="style5">
<marquee scrollamount="3">
<strong> <img src="images/new4.gif" width="28" height="11" /></strong>ยินดีต้อนรับเข้าสุ่เว็บ
มายมากช็อบเพียงท่าน <span class="style10"><strong><a href="registermem.php">สมัครสมาชิก
</a></strong></span> กับเว็บเราฟรีเว็บร้านค้า ขอให้ท่านสนุกกับการช็อบปิ้ง รายละเอียดเกีย่ วกับเว็บเรา
<span class="style10"><strong><a href="makmayshop.php">คลิกที่น<ี้ /a></strong></span>
</marquee>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF"><table width="999" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#ECECEC"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<th height="35" bgcolor="#BEBEBE">
<div align="center">
<form id="frmSearch" name="frmSearch" method="post"
action="Search_Shop.php">
<span class="style11">ชื่อร้านค้า</span>
<br />
<img src="images/icon_favourites.gif" width="16" height="16" />
<input name="inSearch" type="text" id="" size="20"/>
<input type="image" name="Submit" src="images/search-40.png"/>
</form>
</div></th>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">
<? if(session_is_registered("user_id")){
$sql2="select * from customer where cus_id='$_SESSION[user_id]'";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
?>
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center">
<? if($rs2[pic]=="1"){?>
<a href="profile.php"><img src="Picuser/<?=$_SESSION[user_id]?>.jpg "
width="120" height="120" border="0" /></a></div>
<div align="center">
<? }else{ ?>
<img src="Picuser/noavatar_middle.gif " width="120" height="120" />
</div>
<? }?>
</div>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left"><strong><span
class="style5">&nbsp;&nbsp;ยินดีต้อนรับ </span>&nbsp;</strong>
<a href="profile.php">
<b>
<?=$rs2[username] ?>
</b> </a> </div>
<div align="center"></div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left">&nbsp;&nbsp;<img
src="images/warning_16.png" width="16" height="16" /><strong> <a href="logout.php">ออกจากระบบ
</a></strong></div></td>
</tr>
</table>
<? }else{ ?>
<form id="form1" name="form1" method="post" action="chkloginmember.php">
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center"><strong>Username</strong>
<input name="user" type="text" id="user" style="color: #999999; "size="15" />
</div></td>
</tr>
<tr>
<td height="31" bgcolor="#ECECEC"><div align="center">
<strong>Password</strong>
<input name="pass" type="password" id="pass" size="15" style="color:
#999999; "/>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="center"><input type="image" name="Submit"
src="images/login.png" />
</div></td>
</tr>
<tr>
<th height="10" bgcolor="#FFFFFF"><div align="center" class="style9"><a
href="registermem.php">สมัครสมาชิก</a></div></th>
</tr>
</table>
</form>
<? } ?>
</tr>
</table></td>
</tr>
</td>
<tr>
<td><img src="images/Untitled-1_01.jpg" width="220" height="51" /></td>
</tr>
<tr>
<td><a href="registermem.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image30','','images/Untitled-1_022.jpg',1)"><img src="images/Untitled1_02.gif" name="Image30" width="220" height="42" border="0" id="Image30" /></a></td>
</tr>
<tr>
<td><a href="registershop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image4','','images/Untitled-1_032.jpg',1)"><img src="images/Untitled1_03.gif" name="Image4" width="220" height="46" border="0" id="Image" /></a></td>
</tr>
<tr>
<td><a href="productsale.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image6','','images/Untitled-1_052.jpg',1)"><img src="images/Untitled1_05.gif" name="Image6" width="220" height="46" border="0" id="Image9" /></a></td>
</tr>
<tr>
<td><a href="webbrod.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image7','','images/Untitled-1_062.jpg',1)"><img src="images/Untitled1_06.gif" name="Image7" width="220" height="45" border="0" id="Image10" /></a></td>
</tr>
<tr>
<td><a href="makmayshop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image8','','images/Untitled-1_072.jpg',1)"><img src="images/Untitled1_07.gif" name="Image8" width="220" height="44" border="0" id="Image11" /></a></td>
</tr>
<tr>
<td><img src="images/Untitled-1_08.gif" width="220" height="31" /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="220" align="left" valign="top" background="images/linl.jpg"><table width="220"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C3C2C3"><div align="center"><strong><img src="images/m_misc.gif"
width="16" height="16" /> หมวดหมู่สินค้า</strong></div></td>
</tr>
<?
$sql3="select * from type_produc";
$q3=mysql_query($sql3);
while($rs3=mysql_fetch_array($q3)){
?>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp; <img src="images/bullet_m3.gif" width="16" height="9"
/>
<a href="producttype.php?id_type=<?=$rs3[0] ?>&&typename=<?=$rs3[1] ?>"> <?=$rs3[1]
?></a></td>
</tr>
<? }?>
<tr>
<td align="left" valign="top"><table width="220" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" align="left" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="left" valign="bottom" bgcolor="#FFFFFF"><div align="center">
<strong>สถิติของเว็บ</strong> <img src="images/stat.gif" width="18" height="17" /></div></td>
</tr>
<tr>
<td width="36" align="left" valign="bottom" bgcolor="#FFFFFF"><img alt=""
align="absbottom" src="images/star.png" width="25" height="25" /></td>
<td width="70" align="left" bgcolor="#FFFFFF">สินค้า</td>
<td width="55" align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from product";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td width="57" align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/type.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">หมวดสินค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from type_produc";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">หมวด</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/mall.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ร้านค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from shop";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">ร้าน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/member.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">สมาชิก</td>
<td align="right" bgcolor="#FFFFFF"><div align="left" class="style10">
<div align="center"><strong>
<?
$sql="select * from customer";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">คน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img src="images/u15059458.jpg"
width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ยอดขาย</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select * from or_der";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img
src="images/dollar_currency_sign.png" width="30" height="30" /></td>
<td align="left" bgcolor="#FFFFFF">รวมมูลค่า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select sum(o_totel) from or_der";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
if($rs==""){
echo"0";
}else{
echo"$rs[0] ";
}
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">&nbsp;บาท</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> สินค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from product p,shop s where p.p_shop_id=s.shop_id order by pro_id desc
limit 5";
$q=mysql_query($sql);
while($rs=mysql_fetch_array($q)){
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;">
<?
$sql2="select * from shop where shop_id=$rs[p_shop_id] and
status=1";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
if($rs2[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<a href="<?=$pat?>/<?=$rs2[shop_name]?>/review.php?id_pro=<?=$rs[pro_id]?>"
target="_blank"> <img src="<?=$pat?>/<?=$rs[shop_name]?>/Picpro/<?=$rs[pro_id]?>.jpg"
alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="32" height="32" border="0"> </a>
<?=$rs[pro_name]; ?> &nbsp;<font color="#FF0000"><?=$rs[pro_price]; ?> บาท</font>
<strong>:ร้าน
<?
if($rs[shop_typeid]==2){
echo " <a
href='vip/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}else{
echo " <a
href='Free/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}
?>
<img src="images/new4.gif" width="28" height="11"
/></strong></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="left"></div></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> ร้านค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from shop where status=1 order by shop_id desc limit 5";
$q=mysql_query($sql);
// if($q==""){
//exit();
//
echo"<td height='30' align='left' valign='middle' bgcolor='#E0E0E0'
style='border-bottom-color:#918E91;border-bottom-style: dashed; border-width:1px;'>
// <center><b>ยังไม่มีข้อมูลครับ</b></center></td>";
//
}else{
while($rs=mysql_fetch_array($q)){
//}
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;"><div
align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/Home.png"
width="24" height="24" border="0"/>
<? if($rs[shop_typeid]==1){
echo "<a href='Free/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}else{
echo "<a href='vip/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}
?>
</strong></div></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><!-- InstanceBeginEditable
name="EditRegion5" -->
<div align="center"></div>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="center"></div></td>
</tr>
</table></td>
<td width="778" align="left" valign="top"><div align="left"><!-- InstanceBeginEditable
name="EditRegion3" -->
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.frmaddweb;
if(formObj.inTitle.value == "" ) {
alert("กรุณากรอก คาถาม ด้วยครับ"); formObj.inTitle.focus(); return false; }
else if(formObj.inText.value == "" )
{ alert("กรุณากรอก รายละเอียดเกี่ยวคาถาม ด้วยครับ"); formObj.inText.focus();
return false; }
else if(formObj.inName.value == "" )
{ alert("กรุณากรอก ชื่อของท่าน ด้วยครับ"); formObj.inName.focus();
return false; }
else if(formObj.inEmail.value == "" )
{ alert("กรุณากรอก อีเมล์ของท่าน ด้วยครับ"); formObj.inEmail.focus(); return false; }
else return true ;
}
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="4%" align="left" valign="top" background="img/viewboard_01.gif">&nbsp;</td>
<td width="92%" align="left" valign="top"
background="img/viewboard_02.jpg">&nbsp;</td>
<td width="4%" align="left" valign="top" background="img/viewboard_03.gif">&nbsp;</td>
</tr>
<tr>
<td height="18" align="left" valign="top" background="img/viewboard_04.gif">&nbsp;</td>
<td align="left" valign="top">
<?php
require("function.php");
$obj=new sql();
$table="customer";
$sql="where cus_id='$_SESSION[user_id]'";
$result=$obj->select($table,$sql);
?>
<form id="form3" name="frmaddweb" method="post" onsubmit="return checkform()">
<table width="95%" height="82" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td height="50" align="left" valign="top"><table width="89%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td width="10" align="left" valign="top"><img src="img/menubar_l.png" width="10"
height="61" /></td>
<td width="582" align="left" valign="middle"
background="images/menubar_m.png"><span class="style20">เรื่อง :</span>
<input name="inTitle" type="text" id="q26" style="width:500px;height:15px"
maxlength="255" /></td>
<td width="12" align="left" valign="top"><img src="img/menubar_r.png" width="10"
height="61" /></td>
</tr>
</table>
&nbsp;&nbsp;&nbsp; ชื่อกระทู้ควรยาวให้พอดี ไม่ควรสั้นเกินไป เพื่อให้สามารถอ่านแล้ว
เข้าใจได้ในทันที <br /></td>
</tr>
<tr>
<td><div align="left">
<p>
<textarea name="inText" id="inText" cols="45" rows="5"
style="width:598px;height:200px"></textarea>
</p> <p>
</p>
</div></td>
</tr>
<tr>
<td><table width="89%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" align="left" valign="top"><img src="img/menubar_l.png" width="10"
height="61" /></td>
<td width="582" align="left" valign="middle"
background="images/menubar_m.png"><span class="style20">โดย :</span>
<input name="inName" type="text" id="inName" style="width:500px;height:15px"
maxlength="255" value="<?=$result[username]?>"/></td>
<td width="12" align="left" valign="top"><img src="img/menubar_r.png" width="10"
height="61" /></td>
</tr>
</table>
<br /></td>
</tr>
<tr>
<td><table width="89%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" align="left" valign="top"><img src="img/menubar_l.png" width="10"
height="61" /></td>
<td width="582" align="left" valign="middle"
background="images/menubar_m.png"><span class="style20">อีเมล์ :</span>
<input name="inEmail" type="text" id="inEmail" style="width:500px;height:15px"
maxlength="255" value="<?=$result[cus_email]?>"/></td>
<td width="12" align="left" valign="top"><img src="img/menubar_r.png" width="10"
height="61" /></td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><div align="center">
<p>
<input name="submit" type="submit" id="submit" style="width:100px;height:40px;
font-size:18px" value="ตกลง" />
<input type="reset" name="Reset" id="button" value="ยกเลิก"
style="width:100px;height:40px; font-size:18px; font-stretch:condensed" />
</p>
</div></td>
</tr>
</table>
</form>
</td>
<td align="left" valign="top" background="img/viewboard_06.gif">&nbsp;</td>
</tr>
<tr>
<td height="21" align="left" valign="top" background="img/viewboard_07.gif">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_08.jpg">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_09.gif">&nbsp;</td>
</tr>
</table>
<?php
if(isset($_POST[submit])) {
$shop="makmay";
$sql="insert into webbor values (' ','$_POST[inTitle]','
$_POST[inText]','$_POST[inName] ','$_POST[inEmail] ',NOW(),'$shop','$result[cus_id]')";
$result=$obj->QuerySql($sql);
if(!$result){
echo"<script>";
echo"alert('ไม่สามารถเพิ่มคาถามได้');";
//echo"window.location='index.php'";
echo"</script>";
}else{
echo"<script>";
echo"alert('ทาการเพิ่มของคุณเรียบร้อยแล้ว');";
echo"window.location='webbrod.php'";
echo"</script>";
}
}
?>
<!-- InstanceEndEditable --></div>
<blockquote>
<p align="center"><br />
</p>
</blockquote>
<br />
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" background="images/kook1.jpg"><div
align="left"><span class="style5"><strong><img src="Bar Chart.png" width="24" height="24" />จานวน
ผู้ชม
<?php
$gcc_aspect
$gcc_file
= "img";
// directory where the images can be found.
= "counter.txt"; // name of the file where the number of visitors is kept
$gcc_cookie_name = "my_cookie_name";
// name of the cookie (eg: your site's name)
$gcc_cookie_value = "my_cookie_value"; // value of the cookie (eg: something about your site)
$gcc_cookie_life = "900";
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
// cookie lifespan. Default is 900s (15min)
fputs($gcc_fp,"0");
fclose($gcc_fp);
}
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] ==
"$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
$gcc_hits = str_replace('alt=""','alt="" border="0" height="15" width="12"',$gcc_hits);
echo $gcc_hits;
?>
<br />
Copyright &copy; 2010 By makmayshop.com</strong></span><br />
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Source code ชือ่ payby2.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('คุณยัง
ไม่ได้ทาการล็อกอิน');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
?>
<!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>รายการสั่งซื้อสินค้า.:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถูกใจ เปิด
ร้านค้าออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<style type="text/css">
<!-.style2 {font-size: 24px
}
.style3 {font-family: "Courier New", Courier, monospace; font-weight: bold;}
.style5 {font-family: "ms Sans Serif", "Microsoft Sans Serif";
font-weight: bold;
font-size: 18px;
}
body,td,th {
font-family: ms Sans Serif, Microsoft Sans Serif;
font-size: 14px;
}
.style6 {
font-size: 18px;
font-weight: bold;
}
.style7 {color: #FF0000}
.style10 {
font-size: 16px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<?
require("function.php");
$obj=new sql();
$sql="select * from or_der o , shop s where o.p_shop_id=s.shop_id and
o_id='$_REQUEST[or_der]'";
$result=$obj->QuerySql($sql);
$order=mysql_fetch_array($result);
?>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<input type="image" src="images/printer_48.png" width="55" height="48" onclick="window.print()"
/>
</div>
</form>
<p align="center"></p>
<table width="945" height="436" border="1" align="center" cellpadding="0" cellspacing="0"
bordercolor="#000000">
<tr>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><?php
$thai_day_arr=array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์");
/*$thai_month_arr=array(
"0"=>"",
"1"=>"มกราคม",
"2"=>"กุมภาพันธ์",
"3"=>"มีนาคม",
"4"=>"เมษายน",
"5"=>"พฤษภาคม",
"6"=>"มิถุนายน",
"7"=>"กรกฎาคม",
"8"=>"สิงหาคม",
"9"=>"กันยายน",
"10"=>"ตุลาคม",
"11"=>"พฤศจิกายน",
"12"=>"ธันวาคม"
);
*/
function thai_date($time){
//global $thai_day_arr,$thai_month_arr;
$thai_date_return="วัน".$thai_day_arr[date("w",$time)];
$thai_date_return.=
"ที่ ".date("j",$time);
$thai_date_return.=" เดือน".$thai_month_arr[date("n",$time)];
$thai_date_return.=
" พ.ศ.".(date("Y",$time)+543);
//$thai_date_return.=
"&nbsp; ".date("H:i",$time)." น.";
return $thai_date_return;
}
?>
<div align="right"><strong>
<?
// ถ้ามีการเก็บวันที่และเวลาในรูปแบบ timestamp
// สามารถนามาใช้งานในฟังก์ชันได้ดังนี้
// $eng=1224562026; กรณีเป็น timestamp
$eng_date=time(); // แสดงวันที่ปัจจุบัน
echo thai_date($eng_date);?>
&nbsp;&nbsp;&nbsp;&nbsp;</strong></div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center" class="style2">
<p align="left">&nbsp;</p>
<p class="style5">รายการสั่งซื้อสินค้าร้าน <?=$order[shop_name]?></p>
</div>
<div align="center"></div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center"><span class="style2"> <br />
</span></div></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;&nbsp;&nbsp; &nbsp;<strong>วันที่สั่งซื้อ :</strong>
<?=$order[o_date]?>
</td>
</tr>
<?
$table="customer";
$condition="where cus_id='$order[o_cus_id]'";
$result=$obj->selectalldate($table,$condition);
$cus=mysql_fetch_array($result);
?>
<tr>
<td align="left" valign="top">&nbsp;&nbsp;&nbsp; &nbsp;<strong>ชื่อ - สกุล :</strong>
<?=$cus[cus_name]?>
</td>
</tr>
<tr>
<td align="left"
valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>ที่
อยู่ :</strong>
<?=$cus[cus_address]?></td>
</tr>
<tr>
<td align="left"
valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>อีเมล์ :</strong>
<?=$cus[cus_email]?></td>
</tr>
<tr>
<td align="left" valign="top"><p>&nbsp;</p>
<p align="center">&nbsp;</p>
<hr width="90%" size="1"/>
</p></td>
</tr>
<tr>
<td align="left" valign="top"><blockquote>
<div align="center"><strong>รายการสินค้า <br />
</strong></div>
</blockquote></td>
</tr>
<tr>
<td align="left" valign="top"><table width="95%" border="0" align="center" cellpadding="5"
cellspacing="0">
<tr>
<td height="49" colspan="6" align="left" valign="top"
background="../../Free/FFE/images/menubar_m.png"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="13%" height="49" bgcolor="#DDE1E1"><div align="center"><strong>รหัสสินค้า
</strong></div></td>
<td width="26%" bgcolor="#DDE1E1"><div align="center"><strong>ชื่อสินค้า
</strong></div></td>
<td width="10%" bgcolor="#DDE1E1"><div align="center"><strong>ราคา
</strong></div></td>
<td width="13%" bgcolor="#DDE1E1"><div align="center"><strong>หน่วยนับ
</strong></div></td>
<td width="15%" bgcolor="#DDE1E1"><div align="center"><strong>จานวน
</strong></div></td>
<td width="23%" bgcolor="#DDE1E1"><div align="center"><strong>รวม
</strong></div></td>
</tr>
</table></td>
</tr>
<?
$sql="select * from order_detail dor,product pr where
dor.p_id=pr.pro_id and o_id='$_REQUEST[or_der]'";
$result2=$obj->QuerySql($sql);
while($pro=mysql_fetch_array($result2)){
?>
<?
if($bgcolor=="#F8F2FF"){
$bgcolor="#F7F8F9";
}else{
$bgcolor="#F8F2FF";
}
?>
<tr>
<td width="13%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=$pro[pro_id]?>
</strong></div></td>
<td width="26%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><strong>
<?=$pro[pro_name]?>
</strong></td>
<td width="10%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=number_format($pro[p_price],2)?>
</strong></div></td>
<td width="13%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=$pro[pro_unit]?>
</strong></div></td>
<td width="15%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=$pro[number]?>
</strong></div></td>
<td width="23%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=number_format($pro[pro_price]*$pro[number])
?>
</div></td>
</tr>
<? }?>
</table></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top"><div align="right"><strong>ราคาสุทธิ์
<?=$order[o_totel]?>
บาท</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top"><div
align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(...................................................)&nbsp;&nbsp
;&nbsp;&nbsp;</div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$cus[cus_name]?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;</div></td>
</tr>
<tr>
<td align="left" valign="top"> By makmayshop.com 2010</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
Source code ชือ่ payby.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('คุณยัง
ไม่ได้ทาการล็อกอิน');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
?>
<!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>รายการสั่งซื้อสินค้า .:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถกู ใจ เปิด
ร้านค้าออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<style type="text/css">
<!-.style2 {font-size: 24px
}
.style3 {font-family: "Courier New", Courier, monospace; font-weight: bold;}
.style5 {font-family: "ms Sans Serif", "Microsoft Sans Serif";
font-weight: bold;
font-size: 18px;
}
body,td,th {
font-family: ms Sans Serif, Microsoft Sans Serif;
font-size: 14px;
}
.style6 {
font-size: 18px;
font-weight: bold;
}
.style7 {color: #FF0000}
.style10 {
font-size: 16px;
font-weight: bold;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #000000;
}
-->
</style>
</head>
<body>
<?
require("function.php");
$obj=new sql();
$sql="select * from or_der o , shop s where o.p_shop_id=s.shop_id and
o_id='$_REQUEST[or_der]'";
$result=$obj->QuerySql($sql);
$order=mysql_fetch_array($result);
?>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.form1;
if(formObj.inId.value == "" ) { alert("
กรุณากรอก รหัสจากใบเสร็จ ด้วยครับ"); formObj.inId.focus(); return false; }
else if(formObj.inPrice.value == "" )
{ alert("กรุณากรอก จานวนเงิน ด้วยครับ"); formObj.inPrice.focus();
return false; }
else if(formObj.mm.value == "" ) {
alert("กรุณาเลือก วันที่ ด้วยครับ"); formObj.mm.focus(); return false; }
alert("กรุณาเลือก เดือน ด้วยครับ"); formObj.d.focus();
else if(formObj.d.value == "" ) {
return false; }
alert("กรุณาเลือก ปี ด้วยครับ"); formObj.y.focus();
else if(formObj.y.value == "" ) {
return false; }
else if(formObj.inTle.value == "" ) {
alert("กรุณากรอก เบอร์โทรศัพท์ ด้วยครับ"); formObj.inTle.focus();
return false; }
else if(formObj.inName.value
== "" ) { alert("กรุณากรอก ชื่อ-สกุล ด้วยครับ"); formObj.inName.focus(); return false; }
else
if(formObj.inPicture.value == "" ) { alert("กรุณาเลือก รูปภาพด้วยครับ"); formObj.inPicture.focus();
return false; }
"" ) { alert("กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย"); formObj.capt.focus();
else if(formObj.capt.value ==
return false; }
else return true ;
}
function checkform2() {
return alert("คุณต้องการล้าง
ข้อมูลออกทั้งหมด ?");
}
</script>
<p align="center" class="style6">ระบบแจ้งชาระเงิน</p>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form1" onSubmit="
return checkform();">
<table width="463" height="352" border="1" align="center" cellpadding="0" cellspacing="0"
bordercolor="#CCCCCC">
<tr>
<td><table width="460" height="347" border="0" align="center" cellpadding="2" cellspacing="0"
bordercolor="#E9E9E9">
<tr>
<td width="158" bgcolor="#EEF0F0"><div align="center"><strong>รหัสการสั่งชือ
</strong></div></td>
<td width="294" bgcolor="#EEF0F0"><input type="id_order" name="inorder" id="inorder"
disabled="disabled" value="<?=$order[o_id]?>"/>
<input type="hidden" name="inorder2" value="<?=$order[o_id]?>" />
</td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>จากบัญชีเลขที<่ /strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inId" id="inId" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>จานวนเงิน</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inPrice" id="inPrice" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>วันที<่ /strong></div></td>
<td bgcolor="#EEF0F0">วันที่
<select name="mm" id="mm">
<option>วันที<่ /option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
เดือน
<select name="d" id="d">
<option>เดือน</option>
<option value="มกราคม">มกราคม</option>
<option value="กุมภาพันธ์">กุมภาพันธ์</option>
<option value="มีนาคม">มีนาคม</option>
<option value="เมษายน">เมษายน</option>
<option value="พฤษภาคม">พฤษภาคม</option>
<option value="มิถุนายน">มิถุนายน</option>
<option value="กรกฎาคม">กรกฎาคม</option>
<option value="สิงหาคม">สิงหาคม</option>
<option value="กันยายน">กันยายน</option>
<option value="ตุลาคม">ตุลาคม</option>
<option value="พฤศจิกายน">พฤศจิกายน</option>
<option value="ธันวาคม">ธันวาคม</option>
</select>
พ.ศ.
<select name="y" id="y">
<option>ปี</option>
<option value="2553">2553</option>
<option value="2554">2554</option>
<option value="2555">2555</option>
<option value="2556">2556</option>
<option value="2557">2557</option>
</select></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>เบอร์โทรที่สามารถติดต่อได้
</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inTle" id="inTle" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>ชื่อ-สกุลผู้แจ้ง</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inName" id="inName" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>รูปสสิป</strong></div></td>
<td bgcolor="#EEF0F0"><input type="file" name="in" id="in" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>รายละเอียดเพิ่มเติม<br />
<span class="style7">(ถ้ามี)</span></strong></div></td>
<td bgcolor="#EEF0F0"><textarea name="inText" id="inText" cols="45"
rows="5"></textarea></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><img src="captcha/captcha_img.php" width="134" height="28"/></td>
<td bgcolor="#EEF0F0"><input type="text" name="capt" id="capt" />
<span class="style7">* กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย</span></td>
</tr>
<tr>
<td bgcolor="#EEF0F0">&nbsp;</td>
<td bgcolor="#EEF0F0">
<input type="hidden" name="shop_id" value="<?=$order[shop_id]?>" />
<input type="submit" name="submint" id="Submint" value="บันทึก" />
<input type="reset" name="button2" id="button2" value="ล้างข้อมูล" /></td>
</tr>
</table></td>
</tr>
</table>
<p>&nbsp;</p>
<div align="left"></div>
</form>
<?
if(isset($_POST[submint])){
if($_FILES[in]<>""){
copy($_FILES[in][tmp_name],"Slip/$_POST[inId]_$order[o_id].jpg");
}
$sql="insert into confirm
value('','$_POST[inId]','$_POST[inorder2]','$_POST[shop_id]','$_POST[inPrice]','$_POST[mm]
$_POST[d] $_POST[y]','$_SESSION[user_id]','$_POST[inTle]','$_POST[inText]','$_POST[inName]')";
$q=mysql_query($sql);
if(!$q){
echo"<script>";
echo"alert('ไม่สามารถทาการบันทึกแจ้งชาระเงินได้');";
echo"window.location='payby?or_der.php=$_POST[inorder2]';";
echo"</script>";
}else{
echo"<script>";
echo"alert('ทาการบันทึกแจ้งชาระเงินเรียบร้อยแล้ว ');";
echo"window.location='payby.php?or_der=$_POST[inorder2]';";
echo"</script>";
}
}
?>
<p align="center">
<p align="center">
<hr width="700" size="1" />
</p>
<p align="center"></p>
<table width="945" height="436" border="1" align="center" cellpadding="0" cellspacing="0"
bordercolor="#000000">
<tr>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><?php
$thai_day_arr=array("อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์");
/*$thai_month_arr=array(
"0"=>"",
"1"=>"มกราคม",
"2"=>"กุมภาพันธ์",
"3"=>"มีนาคม",
"4"=>"เมษายน",
"5"=>"พฤษภาคม",
"6"=>"มิถุนายน",
"7"=>"กรกฎาคม",
"8"=>"สิงหาคม",
"9"=>"กันยายน",
"10"=>"ตุลาคม",
"11"=>"พฤศจิกายน",
"12"=>"ธันวาคม"
);
*/
function thai_date($time){
//global $thai_day_arr,$thai_month_arr;
$thai_date_return="วัน".$thai_day_arr[date("w",$time)];
$thai_date_return.=
"ที่ ".date("j",$time);
$thai_date_return.=" เดือน".$thai_month_arr[date("n",$time)];
$thai_date_return.=
" พ.ศ.".(date("Y",$time)+543);
//$thai_date_return.=
"&nbsp; ".date("H:i",$time)." น.";
return $thai_date_return;
}
?>
<div align="right"><strong>
<?
// ถ้ามีการเก็บวันที่และเวลาในรูปแบบ timestamp
// สามารถนามาใช้งานในฟังก์ชันได้ดังนี้
// $eng=1224562026; กรณีเป็น timestamp
$eng_date=time(); // แสดงวันที่ปัจจุบัน
echo thai_date($eng_date);?>
&nbsp;&nbsp;&nbsp;&nbsp;</strong></div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center" class="style2">
<p align="left"><span class="style10"><span class="style10"><a
href="payby2.php?or_der=<?=$order[o_id]?>" target="_blank">ออกรายงานการสั่งซื้อ</a></span><a
href="payby2.php?or_der=<?=$order[o_id]?>"><img src="images/printer_48.png" width="24"
height="24" border="0" /></a></p>
<p class="style3">&nbsp;</p>
<p class="style5">รายการสั่งซื้อสินค้าร้าน <?=$order[shop_name]?></p>
</div>
<div align="center"></div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center"><span class="style2"> <br />
</span></div></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;&nbsp;&nbsp; &nbsp;<strong>วันที่สั่งซื้อ :</strong>
<?=$order[o_date]?>
</td>
</tr>
<?
$table="customer";
$condition="where cus_id='$order[o_cus_id]'";
$result=$obj->selectalldate($table,$condition);
$cus=mysql_fetch_array($result);
?>
<tr>
<td align="left" valign="top">&nbsp;&nbsp;&nbsp; &nbsp;<strong>ชื่อ - สกุล :</strong>
<?=$cus[cus_name]?>
</td>
</tr>
<tr>
<td align="left"
valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>ที่
อยู่ :</strong>
<?=$cus[cus_address]?></td>
</tr>
<tr>
<td align="left"
valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>อีเมล์ :</strong>
<?=$cus[cus_email]?></td>
</tr>
<tr>
<td align="left" valign="top"><p>&nbsp;</p>
<p align="center">&nbsp;</p>
<hr width="90%" size="1"/>
</p></td>
</tr>
<tr>
<td align="left" valign="top"><blockquote>
<div align="center"><strong>รายการสินค้า <br />
</strong></div>
</blockquote></td>
</tr>
<tr>
<td align="left" valign="top"><table width="95%" border="0" align="center" cellpadding="5"
cellspacing="0">
<tr>
<td height="49" colspan="6" align="left" valign="top"
background="../../Free/FFE/images/menubar_m.png"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="13%" height="49" bgcolor="#DDE1E1"><div align="center"><strong>รหัสสินค้า
</strong></div></td>
<td width="26%" bgcolor="#DDE1E1"><div align="center"><strong>ชื่อสินค้า
</strong></div></td>
<td width="10%" bgcolor="#DDE1E1"><div align="center"><strong>ราคา
</strong></div></td>
<td width="13%" bgcolor="#DDE1E1"><div align="center"><strong>หน่วยนับ
</strong></div></td>
<td width="15%" bgcolor="#DDE1E1"><div align="center"><strong>จานวน
</strong></div></td>
<td width="23%" bgcolor="#DDE1E1"><div align="center"><strong>รวม
</strong></div></td>
</tr>
</table></td>
</tr>
<?
$sql="select * from order_detail dor,product pr where
dor.p_id=pr.pro_id and o_id='$_REQUEST[or_der]'";
$result2=$obj->QuerySql($sql);
while($pro=mysql_fetch_array($result2)){
?>
<?
if($bgcolor=="#F8F2FF"){
$bgcolor="#F7F8F9";
}else{
$bgcolor="#F8F2FF";
}
?>
<tr>
<td width="13%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=$pro[pro_id]?>
</strong></div></td>
<td width="26%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><strong>
<?=$pro[pro_name]?>
</strong></td>
<td width="10%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=number_format($pro[p_price],2)?>
</strong></div></td>
<td width="13%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=$pro[pro_unit]?>
</strong></div></td>
<td width="15%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=$pro[number]?>
</strong></div></td>
<td width="23%" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong>
<?=number_format($pro[pro_price]*$pro[number])
?>
</div></td>
</tr>
<? }?>
</table></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top"><div align="right"><strong>ราคาสุทธิ์
<?=$order[o_totel]?>
บาท</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </div></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top"><div
align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(...................................................)&nbsp;&nbsp
;&nbsp;&nbsp;</div></td>
</tr>
<tr>
<td align="left" valign="top"><div align="right">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<?=$cus[cus_name]?>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n
bsp;</div></td>
</tr>
<tr>
<td align="left" valign="top"> By makmayshop.com 2010</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
Source code ชือ่ payshop.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('คุณยัง
ไม่ได้ทาการล็อกอิน');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
?>
<!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 type="text/css">
<!--
.style10 {color: #FF0000}
.style6 {font-size: 18px;
font-weight: bold;
}
-->
</style>
</head>
<body>
<p>
<?
require("function.php");
$obj=new sql();
$sql="select * from shop where shop_id='$_REQUEST[shop_id]'";
$result=$obj->QuerySql($sql);
$shop=mysql_fetch_array($result);
?>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.form1;
if(formObj.inId.value == "" ) { alert("
กรุณากรอก รหัสจากใบเสร็จ ด้วยครับ"); formObj.inId.focus(); return false; }
else if(formObj.inPrice.value == "" )
{ alert("กรุณากรอก จานวนเงิน ด้วยครับ"); formObj.inPrice.focus();
return false; }
else if(formObj.mm.value == "" ) {
alert("กรุณาเลือก วันที่ ด้วยครับ"); formObj.mm.focus(); return false; }
alert("กรุณาเลือก เดือน ด้วยครับ"); formObj.d.focus();
else if(formObj.d.value == "" ) {
return false; }
alert("กรุณาเลือก ปี ด้วยครับ"); formObj.y.focus();
else if(formObj.y.value == "" ) {
return false; }
else if(formObj.inTle.value == "" ) {
alert("กรุณากรอก เบอร์โทรศัพท์ ด้วยครับ"); formObj.inTle.focus();
return false; }
else if(formObj.inName.value
== "" ) { alert("กรุณากรอก ชื่อ-สกุล ด้วยครับ"); formObj.inName.focus(); return false; }
else
if(formObj.inPicture.value == "" ) { alert("กรุณาเลือก รูปภาพด้วยครับ"); formObj.inPicture.focus();
return false; }
"" ) { alert("กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย"); formObj.capt.focus();
else if(formObj.capt.value ==
return false; }
else return true ;
}
function checkform2() {
return alert("คุณต้องการล้าง
ข้อมูลออกทั้งหมด ?");
}
</script>
</p>
<p align="center" class="style6">ระบบแจ้งชาระเงินร้าน
<?=$shop[shop_name]?>
(VIP)</p>
<form action="" method="post" enctype="multipart/form-data" name="form1" id="form2" onsubmit="
return checkform();">
<table width="463" height="352" border="1" align="center" cellpadding="0" cellspacing="0"
bordercolor="#CCCCCC">
<tr>
<td><table width="563" height="401" border="0" align="center" cellpadding="2" cellspacing="0"
bordercolor="#E9E9E9">
<tr>
<td width="158" bgcolor="#EEF0F0"><div align="center"><strong>รหัสการร้านค้า
</strong></div></td>
<td width="294" bgcolor="#EEF0F0"><input type="id_order" name="inorder" id="inorder"
disabled="disabled" value="<?=$shop[shop_id]?>"/>
<input type="hidden" name="inorder2" value="<?=$shop[shop_id]?>" />
</td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>จากบัญชีเลขที<่ /strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inId" id="inId" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>จานวนเงิน</strong></div></td>
<td bgcolor="#EEF0F0"><input name="inPrice" type="text" id="inPrice" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' value="700" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>วันที<่ /strong></div></td>
<td bgcolor="#EEF0F0">วันที่
<select name="mm" id="mm">
<option>วันที<่ /option>
<option value="1">01</option>
<option value="2">02</option>
<option value="3">03</option>
<option value="4">04</option>
<option value="5">05</option>
<option value="6">06</option>
<option value="7">07</option>
<option value="8">08</option>
<option value="9">09</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
</select>
เดือน
<select name="d" id="d">
<option>เดือน</option>
<option value="มกราคม">มกราคม</option>
<option value="กุมภาพันธ์">กุมภาพันธ์</option>
<option value="มีนาคม">มีนาคม</option>
<option value="เมษายน">เมษายน</option>
<option value="พฤษภาคม">พฤษภาคม</option>
<option value="มิถุนายน">มิถุนายน</option>
<option value="กรกฎาคม">กรกฎาคม</option>
<option value="สิงหาคม">สิงหาคม</option>
<option value="กันยายน">กันยายน</option>
<option value="ตุลาคม">ตุลาคม</option>
<option value="พฤศจิกายน">พฤศจิกายน</option>
<option value="ธันวาคม">ธันวาคม</option>
</select>
พ.ศ.
<select name="y" id="y">
<option>ปี</option>
<option value="2553">2553</option>
<option value="2554">2554</option>
<option value="2555">2555</option>
<option value="2556">2556</option>
<option value="2557">2557</option>
</select></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>เบอร์โทรที่สามารถติดต่อได้
</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inTle" id="inTle" onkeypress='if
(event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false' /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>ชื่อ-สกุลผู้แจ้ง</strong></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="inName" id="inName" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>รูปสสิป</strong></div></td>
<td bgcolor="#EEF0F0"><input type="file" name="in" id="in" /></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="center"><strong>รายละเอียดเพิ่มเติม<br />
<span class="style10">(ถ้ามี)</span></strong></div></td>
<td bgcolor="#EEF0F0"><textarea name="inText" id="inText" cols="45"
rows="5"></textarea></td>
</tr>
<tr>
<td bgcolor="#EEF0F0"><div align="right"><img src="captcha/captcha_img.php" width="134"
height="28"/></div></td>
<td bgcolor="#EEF0F0"><input type="text" name="capt" id="capt" />
<span class="style10">* กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย</span></td>
</tr>
<tr>
<td bgcolor="#EEF0F0">&nbsp;</td>
<td bgcolor="#EEF0F0"><input type="hidden" name="shop_id" value="<?=$shop[shop_id]?>" />
<input type="submit" name="submint" id="Submint" value="บันทึก" />
<input type="reset" name="button2" id="button2" value="ล้างข้อมูล" /></td>
</tr>
</table></td>
</tr>
</table>
<p>&nbsp;</p>
<div align="left"></div>
</form>
<?
if(isset($_POST[submint])){
$sql="insert into
pay_shop(pay_num,pay_date,pay_price,pay_name,pay_shop_id,pay_tel,pay_text)value('$_POST[inId]','$
_POST[mm] $_POST[d]
$_POST[y]','$_POST[inPrice]','$_POST[inName]','$shop[shop_id]','$_POST[inTle]','$_POST[inText]')";
$q=mysql_query($sql);
$sql2="select max(pay_id) from pay_shop";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
if($_FILES[in]<>""){
copy($_FILES[in][tmp_name],"Slipshop/$_POST[inId]_$rs2[0].jpg");
}
if(!$q){
echo"<script>";
echo"alert('ไม่สามารถทาการบันทึกแจ้งชาระเงินได้');";
echo"window.location='profile.php?shop_id=$shop[shop_id]';";
echo"</script>";
}else{
echo"<script>";
echo"alert('ทาการบันทึกแจ้งชาระเงินเรียบร้อยแล้ว ');";
echo"window.location='profile.php?shop_id=$shop[shop_id]';";
echo"</script>";
}
}
?>
Source code ชือ่ poll.php
<?php
// ÊÃéÒ§¿Ñ§¡ìªÑ¹à¢Õ¹ä¿Åì
function write($path, $content, $mode="w+"){
if (file_exists($path) && !is_writeable($path)){ return false; }
if ($fp = fopen($path, $mode)){
fwrite($fp, $content);
fclose($fp);
}
else { return false; }
return true;
}
// ¡ÒÃãªé§Ò¹ âÁ´à¢Õ¹ä¿ÅìàÃÔèÁµé¹ w+
//write("poll1.txt","·´Êͺ","w+");
if($_GET['voteID']!=""){
header("Content-type:text/html; charset=UTF-8");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
$gPoll=file("poll1.txt");
$newData="";
$chartTitle="";
$numRowChart=$_GET['startKey']-1;
foreach($gPoll as $key=>$value){
if($key==0){
$chartTitle=trim($value);
}
if($_GET['voteID']+$_GET['startKey']==$key){
$value=intval($value)+1;
$newData.=$value."rn";
}else{
$newData.=$value;
}
}
write("poll1.txt",$newData,"w+");
?>
{
"ChoiceTitle":[
<?php
$gPoll=file("poll1.txt");
foreach($gPoll as $key=>$value){
if($key>0 && $key<$_GET['startKey']){
?>
{"choiceData":"<?=trim($value)?>
(<?=trim($gPoll[$key+$_GET['startKey']])?>)","score":<?=trim($gPoll[$key+$_GET['startKey']])?>},
<?php
}
}
?>
],
"chartTitle":"<?=trim($chartTitle)?>",
"numRowsChart":<?=$numRowChart?>
}
<?php
exit;
}
?>
<!--Div that will hold the pie chart-->
<div id="chart_div"></div>
<div id="pollDiv">
<?php
$gPoll=file("poll1.txt");
foreach($gPoll as $key=>$value){
if($key==0){
echo "<strong>".$value."</strong><br>";
}else{
if(trim($value)!=""){
echo '<input type="radio" name="choice" id="radio" value="'.$key.'" />';
echo $value."<br>";
}else{
echo '<input type="button" name="VotePoll" id="VotePoll" value="Vote" />';
break;
}
}
}
?>
</div>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">
google.load("visualization", "1", {packages:["columnchart"]});
</script>
<script type="text/javascript" src="js/jquery-1.4.1.min.js"></script>
<script type="text/javascript">
$(function(){
var checkCondi=0;
var chooseKey="";
var startKey=$("input[name=choice]").size()+1;
$("#VotePoll").click(function(){
$("input[name=choice]").each(function(key){
var condi=$("input[name=choice]").eq(key).attr("checked");
if(condi==true){
checkCondi=1;
chooseKey=key+1;
}
});
if(checkCondi==1){
var loading_obj='<p id="i_loading" align="center"><img
src="http://www.ninenik.com/ajax.gif" /></p>';
$("div#pollDiv").html(loading_obj);
var resultData=$.ajax({
url:"ajax_poll_jquery_google.php",
data:"voteID="+chooseKey+"&startKey="+startKey,
async:false,
success:function(resultData){
var myObject = eval('(' + resultData + ')');
$("div#pollDiv").html("");
var data = new google.visualization.DataTable();
data.addColumn('string', 'Choice Poll');
data.addColumn('number', 'Score Point');
data.addRows(myObject.numRowsChart);
for(i=0;i<myObject.numRowsChart;i++){
data.setCell(i, 0, myObject.ChoiceTitle[i].choiceData);
data.setCell(i, 1, myObject.ChoiceTitle[i].score);
}
var chart = new
google.visualization.PieChart(document.getElementById('pollDiv'));
chart.draw(data, {
width: 250,
height: 300,
is3D: true,
legend:'bottom',
legendFontSize:13,
titleFontSize:12,
title:myObject.chartTitle
});
}
}).responseText;
}
});
});
</script>
Source code ชือ่ producttype.php
<?
include("config.inc.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"><!-- InstanceBegin template="/Templates/tem.dwt.php"
codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>ค้นสินค้าตามประเภท .:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถูกใจ เปิด
ร้านค้าออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!-body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed;
background-repeat: repeat-x;
background-image: url(images/_q_dnm052604-03.jpg);
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
border: 1px none #CC99FF;
}
.style5 {color: #000000}
.style9 {color: #BBBBBB; }
.style10 {color: #FF0000}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!-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];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!-a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
-->
</style>
<link rel="shortcut icon" href="images/favicon.ico">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!-.style11 {font-size: 12px}
-->
</style>
<meta name="Keywords" content="เปิดร้านค้าฟรี ศูนย์รวมร้านค้า
ตลาดซื้อขาย สินค้ามือหนึ่ง สินค้ามือสอง ราคาถูก มากที่สดุ ในประเทศไทย อาทิ ช๊อปปิ้ง mp4 เครื่องสาอาง
พระเครื่อง รถ นาฬิกา อาหาร มือถือ เสื้อผ้าแฟชั่น อาหาร ...
" />
</head>
<body onload="MM_preloadImages('images/Untitled-1_032.jpg','images/Untitled1_052.jpg','images/Untitled-1_062.jpg','images/Untitled-1_072.jpg','images/Untitled-1_022.jpg')">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#E8E8E8"><div align="right"><strong>| <a href="index.php">หน้าแรก</a> | เข้าสู่
ระบบ | <a href="registermem.php">สมัครสมาชิก</a> | ออกจาระบบ </strong></div></td>
</tr>
<tr>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="287" align="left" valign="top"><a href="index.php"><img src="images/index_01.jpg"
width="288" height="103" border="0" /></a></td>
<td width="713" align="left" valign="top" bgcolor="#D7D7D7"><!-- InstanceBeginEditable
name="EditRegion4" -->
<table width="711" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wi
dth','711','height','98','src','images/Movie','quality','high','pluginspage','http://www.adobe.com/shockwave/d
ownload/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/Movie' ); //end AC code
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="711" height="98">
<param name="movie" value="images/Movie.swf" />
<param name="quality" value="high" />
<embed src="images/Movie.swf" quality="high"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Flash" type="application/x-shockwave-flash" width="711" height="98"></embed>
</object>
</noscript>
</td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="207" colspan="2" align="left" valign="top" bgcolor="#F2F2F2"><a
href="index.php"><img src="images/index_04.jpg" width="999" height="206" border="0" /></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="1000" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#F2F2F2"><span class="style5">
<marquee scrollamount="3">
<strong> <img src="images/new4.gif" width="28" height="11" /></strong>ยินดีต้อนรับเข้าสุ่เว็บ
มายมากช็อบเพียงท่าน <span class="style10"><strong><a href="registermem.php">สมัครสมาชิก
</a></strong></span> กับเว็บเราฟรีเว็บร้านค้า ขอให้ท่านสนุกกับการช็อบปิ้ง รายละเอียดเกีย่ วกับเว็บเรา
<span class="style10"><strong><a href="makmayshop.php">คลิกที่น<ี้ /a></strong></span>
</marquee>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF"><table width="999" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#ECECEC"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<th height="35" bgcolor="#BEBEBE">
<div align="center">
<form id="frmSearch" name="frmSearch" method="post"
action="Search_Shop.php">
<span class="style11">ชื่อร้านค้า</span>
<br />
<img src="images/icon_favourites.gif" width="16" height="16" />
<input name="inSearch" type="text" id="" size="20"/>
<input type="image" name="Submit" src="images/search-40.png"/>
</form>
</div></th>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">
<? if(session_is_registered("user_id")){
$sql2="select * from customer where cus_id='$_SESSION[user_id]'";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
?>
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center">
<? if($rs2[pic]=="1"){?>
<a href="profile.php"><img src="Picuser/<?=$_SESSION[user_id]?>.jpg "
width="120" height="120" border="0" /></a></div>
<div align="center">
<? }else{ ?>
<img src="Picuser/noavatar_middle.gif " width="120" height="120" />
</div>
<? }?>
</div>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left"><strong><span
class="style5">&nbsp;&nbsp;ยินดีต้อนรับ </span>&nbsp;</strong>
<a href="profile.php">
<b>
<?=$rs2[username] ?>
</b> </a> </div>
<div align="center"></div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left">&nbsp;&nbsp;<img
src="images/warning_16.png" width="16" height="16" /><strong> <a href="logout.php">ออกจากระบบ
</a></strong></div></td>
</tr>
</table>
<? }else{ ?>
<form id="form1" name="form1" method="post" action="chkloginmember.php">
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center"><strong>Username</strong>
<input name="user" type="text" id="user" style="color: #999999; "size="15" />
</div></td>
</tr>
<tr>
<td height="31" bgcolor="#ECECEC"><div align="center">
<strong>Password</strong>
<input name="pass" type="password" id="pass" size="15" style="color:
#999999; "/>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="center"><input type="image" name="Submit"
src="images/login.png" />
</div></td>
</tr>
<tr>
<th height="10" bgcolor="#FFFFFF"><div align="center" class="style9"><a
href="registermem.php">สมัครสมาชิก</a></div></th>
</tr>
</table>
</form>
<? } ?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/Untitled-1_01.jpg" width="220" height="51" /></td>
</tr>
<tr>
<td><a href="registermem.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image30','','images/Untitled-1_022.jpg',1)"><img src="images/Untitled1_02.gif" name="Image30" width="220" height="42" border="0" id="Image30" /></a></td>
</tr>
<tr>
<td><a href="registershop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image4','','images/Untitled-1_032.jpg',1)"><img src="images/Untitled1_03.gif" name="Image4" width="220" height="46" border="0" id="Image" /></a></td>
</tr>
<tr>
<td><a href="productsale.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image6','','images/Untitled-1_052.jpg',1)"><img src="images/Untitled1_05.gif" name="Image6" width="220" height="46" border="0" id="Image9" /></a></td>
</tr>
<tr>
<td><a href="webbrod.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image7','','images/Untitled-1_062.jpg',1)"><img src="images/Untitled1_06.gif" name="Image7" width="220" height="45" border="0" id="Image10" /></a></td>
</tr>
<tr>
<td><a href="makmayshop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image8','','images/Untitled-1_072.jpg',1)"><img src="images/Untitled1_07.gif" name="Image8" width="220" height="44" border="0" id="Image11" /></a></td>
</tr>
<tr>
<td><img src="images/Untitled-1_08.gif" width="220" height="31" /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="220" align="left" valign="top" background="images/linl.jpg"><table width="220"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C3C2C3"><div align="center"><strong><img src="images/m_misc.gif"
width="16" height="16" /> หมวดหมู่สินค้า</strong></div></td>
</tr>
<?
$sql3="select * from type_produc";
$q3=mysql_query($sql3);
while($rs3=mysql_fetch_array($q3)){
?>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp; <img src="images/bullet_m3.gif" width="16" height="9"
/>
<a href="producttype.php?id_type=<?=$rs3[0] ?>&&typename=<?=$rs3[1] ?>"> <?=$rs3[1]
?></a></td>
</tr>
<? }?>
<tr>
<td align="left" valign="top"><table width="220" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" align="left" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="left" valign="bottom" bgcolor="#FFFFFF"><div align="center">
<strong>สถิติของเว็บ</strong> <img src="images/stat.gif" width="18" height="17" /></div></td>
</tr>
<tr>
<td width="36" align="left" valign="bottom" bgcolor="#FFFFFF"><img alt=""
align="absbottom" src="images/star.png" width="25" height="25" /></td>
<td width="70" align="left" bgcolor="#FFFFFF">สินค้า</td>
<td width="55" align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from product";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td width="57" align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/type.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">หมวดสินค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from type_produc";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">หมวด</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/mall.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ร้านค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from shop";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">ร้าน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/member.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">สมาชิก</td>
<td align="right" bgcolor="#FFFFFF"><div align="left" class="style10">
<div align="center"><strong>
<?
$sql="select * from customer";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">คน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img src="images/u15059458.jpg"
width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ยอดขาย</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select * from or_der";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img
src="images/dollar_currency_sign.png" width="30" height="30" /></td>
<td align="left" bgcolor="#FFFFFF">รวมมูลค่า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select sum(o_totel) from or_der";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
if($rs==""){
echo"0";
}else{
echo"$rs[0] ";
}
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">&nbsp;บาท</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> สินค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from product p,shop s where p.p_shop_id=s.shop_id order by pro_id desc
limit 5";
$q=mysql_query($sql);
while($rs=mysql_fetch_array($q)){
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;">
<?
$sql2="select * from shop where shop_id=$rs[p_shop_id] and
status=1";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
if($rs2[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<a href="<?=$pat?>/<?=$rs2[shop_name]?>/review.php?id_pro=<?=$rs[pro_id]?>"
target="_blank"> <img src="<?=$pat?>/<?=$rs[shop_name]?>/Picpro/<?=$rs[pro_id]?>.jpg"
alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="32" height="32" border="0"> </a>
<?=$rs[pro_name]; ?> &nbsp;<font color="#FF0000"><?=$rs[pro_price]; ?> บาท</font>
<strong>:ร้าน
<?
if($rs[shop_typeid]==2){
echo " <a
href='vip/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}else{
echo " <a
href='Free/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}
?>
<img src="images/new4.gif" width="28" height="11"
/></strong></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="left"></div></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> ร้านค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from shop where status=1 order by shop_id desc limit 5";
$q=mysql_query($sql);
// if($q==""){
//exit();
//
echo"<td height='30' align='left' valign='middle' bgcolor='#E0E0E0'
style='border-bottom-color:#918E91;border-bottom-style: dashed; border-width:1px;'>
// <center><b>ยังไม่มีข้อมูลครับ</b></center></td>";
//
}else{
while($rs=mysql_fetch_array($q)){
//}
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;"><div
align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/Home.png"
width="24" height="24" border="0"/>
<? if($rs[shop_typeid]==1){
echo "<a href='Free/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}else{
echo "<a href='vip/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}
?>
</strong></div></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><!-- InstanceBeginEditable
name="EditRegion5" -->
<div align="center"></div>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="center"></div></td>
</tr>
</table></td>
<td width="778" align="left" valign="top"><div align="left"><!-- InstanceBeginEditable
name="EditRegion3" -->
<p>&nbsp; </p>
<?
require("function.php");
$obj=new sql();
$table="product";
$condition="where ty_id=$_REQUEST[id_type] order by
pro_id desc ";
$show=$obj->selectalldate($table,$condition);
?>
<p> &nbsp;&nbsp;<strong>ประเภทสินค้า :<?=$_REQUEST[typename] ?><br /></strong></p>
<div align="center">
<?
echo"<table><tr>";
$i=1;
$intRows = 0;
while($show_pro= mysql_fetch_array($show))
{
echo "<td>";
$intRows++;
?>
<table width="338" height="58" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="6%" height="19" align="left" valign="top"
background="img/viewboard_01.gif">&nbsp;</td>
<td width="89%" align="left" valign="top"
background="img/viewboard_02.jpg">&nbsp;</td>
<td width="5%" align="left" valign="top"
background="img/viewboard_03.gif">&nbsp;</td>
</tr>
<tr>
<td height="18" align="left" valign="top"
background="img/viewboard_04.gif">&nbsp;</td>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="48%" align="left" valign="top"><div align="center">
<?
echo"<script language='javascript'>
function zoom$i(){
document.getElementById('imag$i').width=200;
document.getElementById('imag$i').height=250;
}
function rezoom$i(){
document.getElementById('imag$i').width=135;
document.getElementById('imag$i').height=136;
}
</script> "
?>
<?
$sql="select * from shop where
shop_id=$show_pro[p_shop_id]";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
if($rs[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<a
href="<?=$pat?>/<?=$rs[shop_name]?>/review.php?id_pro=<?=$show_pro[pro_id]?>" target="_blank">
<img src="<?=$pat?>/<?=$rs[shop_name]?>/Picpro/<?=$show_pro[pro_id]?>.jpg"
alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="135" height="176" border="0"
id="imag<?=$i?>" onmouseover="javascript:zoom<?=$i?>();"
onmouseout="javascript:rezoom<?=$i?>();"/> </a></div></td>
<td width="52%" align="left" valign="top"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td><strong>ชื่อสินค้า</strong> :
<?=$show_pro[pro_name]?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><strong>ราคา</strong> : <span class="style2">
<?=number_format ($show_pro[pro_price], 2); ?>
</span> <strong>บาท</strong></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<?
$table="type_produc";
$condition="where ty_id='$show_pro[ty_id]'";
$type=$obj->select($table,$condition);
?>
<td><strong>ประเภท</strong> :
<?=$type[ty_name]?></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
<tr>
<?
$table="reviews";
$condition="where pro_id='$show_pro[pro_id]'";
$result=$obj->num_record($table,$condition);
?>
<td><div align="left">&nbsp;&nbsp;[<span class="style2">
<?=$result?>
</span>ความเห็น ]</div></td>
</tr>
<tr>
<td><div align="center"><a
href="<?=$pat?>/<?=$rs[shop_name]?>/review.php?id_pro=<?=$show_pro[pro_id]?>" target="_blank">
เข้าร้าน<img src="images/Home.png" width="32" height="32" border="0"/></a></div></td>
</tr>
</table></td>
</tr>
</table></td>
<td align="left" valign="top" background="img/viewboard_06.gif">&nbsp;</td>
</tr>
<tr>
<td height="21" align="left" valign="top"
background="img/viewboard_07.gif">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_08.jpg">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_09.gif">&nbsp;</td>
</tr>
</table>
<?
echo"</td>";
if(($intRows)%2==0)
{
echo"</tr>";
}
$i++;
}
echo"</tr></table>";
?>
</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- InstanceEndEditable --></div>
<blockquote>
<p align="center"><br />
</p>
</blockquote>
<br />
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" background="images/kook1.jpg"><div
align="left"><span class="style5"><strong><img src="Bar Chart.png" width="24" height="24" />จานวน
ผู้ชม
<?php
$gcc_aspect
$gcc_file
= "img";
// directory where the images can be found.
= "counter.txt"; // name of the file where the number of visitors is kept
$gcc_cookie_name = "my_cookie_name";
// name of the cookie (eg: your site's name)
$gcc_cookie_value = "my_cookie_value"; // value of the cookie (eg: something about your site)
$gcc_cookie_life = "900";
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
fclose($gcc_fp);
}
// cookie lifespan. Default is 900s (15min)
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] ==
"$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
$gcc_hits = str_replace('alt=""','alt="" border="0" height="15" width="12"',$gcc_hits);
echo $gcc_hits;
?>
<br />
Copyright &copy; 2010 By makmayshop.com</strong></span><br />
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Source code ชือ่ profile.php
<?
include("config.inc.php");
if(!session_is_registered("user_id")){
echo"<script>";
echo"alert('คุณยัง
ไม่ได้ทาการล็อกอิน');";
echo"window.location='index.php'";
echo"</script>";
exit();
}
?>
<!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"><!-- InstanceBegin template="/Templates/tem.dwt.php"
codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>ประวัติส่วนตัว .:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถูกใจ เปิดร้านค้า
ออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!-body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed;
background-repeat: repeat-x;
background-image: url(images/_q_dnm052604-03.jpg);
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
border: 1px none #CC99FF;
}
.style5 {color: #000000}
.style9 {color: #BBBBBB; }
.style10 {color: #FF0000}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!-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];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!-a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
-->
</style>
<link rel="shortcut icon" href="images/favicon.ico">
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!-.style20 {
font-size: 18px;
color: #000000;
}
.style16 {
font-size: 18px;
color: #0000CC;
}
.style23 {
font-size: 14px;
font-weight: bold;
}
.style24 {font-size: 24px}
.style27 {font-size: 12; font-weight: bold; }
-->
</style>
<!-- InstanceEndEditable -->
<style type="text/css">
<!-.style11 {font-size: 12px}
-->
</style>
<meta name="Keywords" content="เปิดร้านค้าฟรี ศูนย์รวมร้านค้า
ตลาดซื้อขาย สินค้ามือหนึ่ง สินค้ามือสอง ราคาถูก มากที่สดุ ในประเทศไทย อาทิ ช๊อปปิ้ง mp4 เครื่องสาอาง
พระเครื่อง รถ นาฬิกา อาหาร มือถือ เสื้อผ้าแฟชั่น อาหาร ...
" />
</head>
<body onload="MM_preloadImages('images/Untitled-1_032.jpg','images/Untitled1_052.jpg','images/Untitled-1_062.jpg','images/Untitled-1_072.jpg','images/Untitled-1_022.jpg')">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#E8E8E8"><div align="right"><strong>| <a href="index.php">หน้าแรก</a> | เข้าสู่
ระบบ | <a href="registermem.php">สมัครสมาชิก</a> | ออกจาระบบ </strong></div></td>
</tr>
<tr>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="287" align="left" valign="top"><a href="index.php"><img src="images/index_01.jpg"
width="288" height="103" border="0" /></a></td>
<td width="713" align="left" valign="top" bgcolor="#D7D7D7"><!-- InstanceBeginEditable
name="EditRegion4" -->
<table width="711" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wi
dth','711','height','98','src','Flash/teenee','quality','high','pluginspage','http://www.adobe.com/shockwave/do
wnload/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Flash/teenee' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="711" height="98">
<param name="movie" value="Flash/teenee.swf" />
<param name="quality" value="high" />
<embed src="Flash/teenee.swf" quality="high"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Flash" type="application/x-shockwave-flash" width="711" height="98"></embed>
</object></noscript></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="207" colspan="2" align="left" valign="top" bgcolor="#F2F2F2"><a
href="index.php"><img src="images/index_04.jpg" width="999" height="206" border="0" /></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="1000" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#F2F2F2"><span class="style5">
<marquee scrollamount="3">
<strong> <img src="images/new4.gif" width="28" height="11" /></strong>ยินดีต้อนรับเข้าสุ่เว็บ
มายมากช็อบเพียงท่าน <span class="style10"><strong><a href="registermem.php">สมัครสมาชิก
</a></strong></span> กับเว็บเราฟรีเว็บร้านค้า ขอให้ท่านสนุกกับการช็อบปิ้ง รายละเอียดเกีย่ วกับเว็บเรา
<span class="style10"><strong><a href="makmayshop.php">คลิกที่น<ี้ /a></strong></span>
</marquee>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF"><table width="999" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#ECECEC"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<th height="35" bgcolor="#BEBEBE">
<div align="center">
<form id="frmSearch" name="frmSearch" method="post"
action="Search_Shop.php">
<span class="style11">ชื่อร้านค้า</span>
<br />
<img src="images/icon_favourites.gif" width="16" height="16" />
<input name="inSearch" type="text" id="" size="20"/>
<input type="image" name="Submit" src="images/search-40.png"/>
</form>
</div></th>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">
<? if(session_is_registered("user_id")){
$sql2="select * from customer where cus_id='$_SESSION[user_id]'";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
?>
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center">
<? if($rs2[pic]=="1"){?>
<a href="profile.php"><img src="Picuser/<?=$_SESSION[user_id]?>.jpg "
width="120" height="120" border="0" /></a></div>
<div align="center">
<? }else{ ?>
<img src="Picuser/noavatar_middle.gif " width="120" height="120" />
</div>
<? }?>
</div>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left"><strong><span
class="style5">&nbsp;&nbsp;ยินดีต้อนรับ </span>&nbsp;</strong>
<a href="profile.php">
<b>
<?=$rs2[username] ?>
</b> </a> </div>
<div align="center"></div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left">&nbsp;&nbsp;<img
src="images/warning_16.png" width="16" height="16" /><strong> <a href="logout.php">ออกจากระบบ
</a></strong></div></td>
</tr>
</table>
<? }else{ ?>
<form id="form1" name="form1" method="post" action="chkloginmember.php">
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center"><strong>Username</strong>
<input name="user" type="text" id="user" style="color: #999999; "size="15" />
</div></td>
</tr>
<tr>
<td height="31" bgcolor="#ECECEC"><div align="center">
<strong>Password</strong>
<input name="pass" type="password" id="pass" size="15" style="color:
#999999; "/>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="center"><input type="image" name="Submit"
src="images/login.png" />
</div></td>
</tr>
<tr>
<th height="10" bgcolor="#FFFFFF"><div align="center" class="style9"><a
href="registermem.php">สมัครสมาชิก</a></div></th>
</tr>
</table>
</form>
<? } ?>
</tr>
</td>
</table></td>
</tr>
<tr>
<td><img src="images/Untitled-1_01.jpg" width="220" height="51" /></td>
</tr>
<tr>
<td><a href="registermem.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image30','','images/Untitled-1_022.jpg',1)"><img src="images/Untitled1_02.gif" name="Image30" width="220" height="42" border="0" id="Image30" /></a></td>
</tr>
<tr>
<td><a href="registershop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image4','','images/Untitled-1_032.jpg',1)"><img src="images/Untitled1_03.gif" name="Image4" width="220" height="46" border="0" id="Image" /></a></td>
</tr>
<tr>
<td><a href="productsale.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image6','','images/Untitled-1_052.jpg',1)"><img src="images/Untitled1_05.gif" name="Image6" width="220" height="46" border="0" id="Image9" /></a></td>
</tr>
<tr>
<td><a href="webbrod.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image7','','images/Untitled-1_062.jpg',1)"><img src="images/Untitled1_06.gif" name="Image7" width="220" height="45" border="0" id="Image10" /></a></td>
</tr>
<tr>
<td><a href="makmayshop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image8','','images/Untitled-1_072.jpg',1)"><img src="images/Untitled1_07.gif" name="Image8" width="220" height="44" border="0" id="Image11" /></a></td>
</tr>
<tr>
<td><img src="images/Untitled-1_08.gif" width="220" height="31" /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="220" align="left" valign="top" background="images/linl.jpg"><table width="220"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C3C2C3"><div align="center"><strong><img src="images/m_misc.gif"
width="16" height="16" /> หมวดหมู่สินค้า</strong></div></td>
</tr>
<?
$sql3="select * from type_produc";
$q3=mysql_query($sql3);
while($rs3=mysql_fetch_array($q3)){
?>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp; <img src="images/bullet_m3.gif" width="16" height="9"
/>
<a href="producttype.php?id_type=<?=$rs3[0] ?>&&typename=<?=$rs3[1] ?>"> <?=$rs3[1]
?></a></td>
</tr>
<? }?>
<tr>
<td align="left" valign="top"><table width="220" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" align="left" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="left" valign="bottom" bgcolor="#FFFFFF"><div align="center">
<strong>สถิติของเว็บ</strong> <img src="images/stat.gif" width="18" height="17" /></div></td>
</tr>
<tr>
<td width="36" align="left" valign="bottom" bgcolor="#FFFFFF"><img alt=""
align="absbottom" src="images/star.png" width="25" height="25" /></td>
<td width="70" align="left" bgcolor="#FFFFFF">สินค้า</td>
<td width="55" align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from product";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td width="57" align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/type.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">หมวดสินค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from type_produc";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">หมวด</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/mall.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ร้านค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from shop";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">ร้าน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/member.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">สมาชิก</td>
<td align="right" bgcolor="#FFFFFF"><div align="left" class="style10">
<div align="center"><strong>
<?
$sql="select * from customer";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">คน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img src="images/u15059458.jpg"
width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ยอดขาย</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select * from or_der";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img
src="images/dollar_currency_sign.png" width="30" height="30" /></td>
<td align="left" bgcolor="#FFFFFF">รวมมูลค่า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select sum(o_totel) from or_der";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
if($rs==""){
echo"0";
}else{
echo"$rs[0] ";
}
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">&nbsp;บาท</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> สินค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from product p,shop s where p.p_shop_id=s.shop_id order by pro_id desc
limit 5";
$q=mysql_query($sql);
while($rs=mysql_fetch_array($q)){
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;">
<?
$sql2="select * from shop where shop_id=$rs[p_shop_id] and
status=1";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
if($rs2[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<a href="<?=$pat?>/<?=$rs2[shop_name]?>/review.php?id_pro=<?=$rs[pro_id]?>"
target="_blank"> <img src="<?=$pat?>/<?=$rs[shop_name]?>/Picpro/<?=$rs[pro_id]?>.jpg"
alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="32" height="32" border="0"> </a>
<?=$rs[pro_name]; ?> &nbsp;<font color="#FF0000"><?=$rs[pro_price]; ?> บาท</font>
<strong>:ร้าน
<?
if($rs[shop_typeid]==2){
echo " <a
href='vip/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}else{
echo " <a
href='Free/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}
?>
<img src="images/new4.gif" width="28" height="11"
/></strong></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="left"></div></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> ร้านค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from shop where status=1 order by shop_id desc limit 5";
$q=mysql_query($sql);
// if($q==""){
//exit();
//
echo"<td height='30' align='left' valign='middle' bgcolor='#E0E0E0'
style='border-bottom-color:#918E91;border-bottom-style: dashed; border-width:1px;'>
// <center><b>ยังไม่มีข้อมูลครับ</b></center></td>";
//
}else{
while($rs=mysql_fetch_array($q)){
//}
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;"><div
align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/Home.png"
width="24" height="24" border="0"/>
<? if($rs[shop_typeid]==1){
echo "<a href='Free/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}else{
echo "<a href='vip/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}
?>
</strong></div></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><!-- InstanceBeginEditable
name="EditRegion5" -->
<div align="center">
<p>
</p>
<p>&nbsp; </p>
</div>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="center"></div></td>
</tr>
</table></td>
<td width="778" align="left" valign="top"><div align="left"><!-- InstanceBeginEditable
name="EditRegion3" -->
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="3%" align="left" valign="top"
background="img/viewboard_01.gif">&nbsp;</td>
<td width="94%" align="left" valign="top"
background="img/viewboard_02.jpg">&nbsp;</td>
<td width="3%" align="left" valign="top"
background="img/viewboard_03.gif">&nbsp;</td>
</tr>
<tr>
<td height="18" align="left" valign="top"
background="img/viewboard_04.gif">&nbsp;</td>
<td align="left" valign="top"><p align="center" class="style9 style20 style24">ประวัติ
ส่วนตัว </p>
<form action="" method="post" enctype="multipart/form-data" name="form3"
id="form3">
<table width="685" height="299" border="0" align="center" cellpadding="0"
cellspacing="0" >
<?php
$sql="select * from customer where cus_id='$_SESSION[user_id]'";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
?>
<tr>
<td width="217" height="297" align="left" valign="top"><table width="250"
height="249" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="250" height="186" align="center" valign="top" ><? if($rs[pic]==1){?>
<img src="Picuser/<?=$_SESSION[user_id]?>.jpg" width="164" height="178"
/>
<? }else{?>
<img src="Picuser/noavatar_middle.gif " width="120" height="120" />
<? }?>
</td>
</tr>
<tr>
<td height="17"><div align="center">
<input name="inPicture" type="file" id="inPicture" size="20" />
</div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table></td>
<td width="462" align="left" valign="top"><table width="464" height="250"
border="0" cellpadding="0" cellspacing="2">
<tr>
<td width="95"><div align="right">เพศ :</div></td>
<td width="363"><? if($rs[cus_sex]=="ชาย"){ ?>
<input name="radio" type="radio" id="radio" value="ชาย" checked="checked" />
ชาย
<input type="radio" name="radio" id="radio2" value="หญิง" />
หญิง
<? }else{?>
<input name="radio" type="radio" id="radio" value="ชาย" />
ชาย
<input type="radio" name="radio" id="radio2" value="หญิง" checked="checked"
/>
หญิง
<? }?>
</td>
</tr>
<tr>
<td><div align="right">ชื่อ - สกุล :</div></td>
<td><input name="inName" type="text" id="inName"
value="<?=$rs[cus_name]?>" size="30" /></td>
</tr>
<tr>
<td><div align="right">ที่อยู่ :</div></td>
<td><textarea name="inAdd" id="inAdd" cols="45"
rows="5"><?=$rs[cus_address]?>
</textarea></td>
</tr>
<tr>
<td><div align="right">อีเมล์ :</div></td>
<td><input name="inEmail" type="text" id="inEmail"
value="<?=$rs[cus_email]?>" size="30"/></td>
</tr>
<tr>
<td><div align="right">Username :</div></td>
<td>&nbsp;&nbsp;<b>
<?=$rs[username]?>
</b></td>
</tr>
<tr>
<td><div align="right">Password :</div></td>
<td><input name="inPass" type="text" id="inPass" value="<?=$rs[password]?>"
size="30"/></td>
</tr>
<tr>
<td height="29">&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
<p align="center">
<input name="submint" type="submit" id="submit"
style="width:100px;height:40px; font-size:18px" value="บันทึก" />
<input name="Reset" type="reset" id="submit2" style="width:100px;height:40px;
font-size:18px" value="ยกเลิก" />
</p></td>
</tr>
</table>
<p align="center">&nbsp;</p>
</form>
<p>
<?
if(isset($_POST[submint])){
include("config.inc.php");
$sql = "update customer set
cus_sex='$_POST[radio]',cus_name='$_POST[inName]',cus_address='$_POST[inAdd]',cus_email='$_PO
ST[inEmail]',password='$_POST[inPass]' where cus_id='$_SESSION[user_id]'";
mysql_query($sql) or die ("แก้ไขข้อมูลไม่ได้้");
if($_FILES[inPicture] <>""){
copy($_FILES[inPicture][tmp_name],"Picuser/$_SESSION[user_id].jpg");
$sql2="update customer set pic=1 where cus_id='$_SESSION[user_id]'";
$q2=mysql_query($sql2);
}
echo"<script>";
echo"alert('บันทึกข้อมูลของคุณ $rs[2] เรียบร้อยแล้ว');";
echo"window.location='profile.php';";
echo"</script>";
}
?>
</p>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="10" height="50" align="left" valign="top"><img src="img/menubar_l.png"
width="10" height="50" /></td>
<td width="690" align="left" valign="middle"
background="images/menubar_m.png"><div align="center" class="style16">
<div align="left"><img src="images/m_webboard.gif" width="16" height="16"
/><span class="style5 style23">รายการต่าง ๆ ที่เกี่ยวกับคุณ&nbsp;&nbsp;&nbsp;
<?=$rs[cus_name]?>
</span> </div>
</div></td>
<td width="16" align="left" valign="top"><img src="img/menubar_r.png" width="10"
height="50" /></td>
</tr>
</table>
<?php
require("function.php");
$obj=new sql();
$sql="select * from shop where cus_id='$_SESSION[user_id]' order by shop_id desc";
$result=$obj->QuerySql($sql);
$i=1;
?>
<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;ร้านค้าของคุณ
<span class="style10">
<?=$num_rows=mysql_num_rows($result);?>
</span>
ร้าน</strong><br />
<span class="style10">ร้าน VIP คลิกที่ประเภทร้าน (เพื่อทาการแจ้งชาระเงินร้านค้า)
</span><br />
<span class="style10">กรณีเป็นร้านค้า VIP ต้องแจ้งชาระเงินภายใน 7 วันนับจากวันที่
ลงทะเบียน เพราะมิฉะนัน่ ร้านค้าของท่านจะได้ลบออกทันที</span><br />
</p>
<table width="722" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td width="327" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">
<table width="722" border="1" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="63" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style23">ลาดับที<่ /div></td>
<td width="192" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">ชื่อร้าน</div></td>
<td width="271" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">ประเภทร้าน</div></td>
<td width="181" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">เปิดร้านค้าเมื่อ</div></td>
</tr>
<? while($re=mysql_fetch_array($result)){ ?>
<?
if($bgcolor=="#F4F4FF"){
$bgcolor="#F7F8F9";
}else{
$bgcolor="#F4F4FF";
}
?>
<tr>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<?=$i;?>
</div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><strong>
<? if($re[shop_typeid]==1){?>
<a href="Free/<?=$re[shop_name]?>" target="_blank"> <?=$re[shop_name]?></a>
<? }else{?>
<a href="vip/<?=$re[shop_name]?>" target="_blank"> <?=$re[shop_name]?></a>
<? }?>
</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><strong>
<?
if($re[shop_typeid]==1){
echo"Beginner Free";
}else{
echo"<a
href='payshop.php?shop_id=$re[shop_id]'><font color='#FF0000'>VIP</font></a>";
}
?>
</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<?=$re[shop_register]?>
</div></td>
</tr>
<? $i++; }?>
</table>
</div></td>
</tr>
</table>
<p>&nbsp;&nbsp;&nbsp;&nbsp;<strong>&nbsp;รายการสั่งซื้อสินค้าของคุณ</strong></p>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="84" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style23">เลขที่สั่งซื้อ</div></td>
<td width="187" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">เมื่อวันที่</div></td>
<td width="99" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">จากร้าน</div></td>
<td width="137" bgcolor="#E4E5E6" class="style23"><div align="center">จานวณ
</div></td>
<td width="198" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">ดูรายละเอียด/แจ้งชาระเงิน</div></td>
</tr>
<?
$sql2="select * from or_der o,shop s where
o.p_shop_id=s.shop_id and o_cus_id='$_SESSION[user_id]' order by o_id desc";
$result2=$obj->QuerySql($sql2);
while($re2=mysql_fetch_array($result2)){ ?>
<?
if($bgcolor=="#F4F4FF"){
$bgcolor="#F7F8F9";
}else{
$bgcolor="#F4F4FF";
}
?>
<tr>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<?=$re2[o_id]?>
</div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><strong>
<?=$re2[o_date]?>
</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><strong>
<?=$re2[shop_name]?>
</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<?=number_format($re2[o_totel],2)?>
<strong>บาท</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><span class="style27">
<?
if($re2[status]==2){
echo" <a href='payby.php?or_der=$re2[o_id]'
target='_blank'> จัดส่งเรียบร้อยแล้ว</a>";
}else{
echo"<a href='payby.php?or_der=$re2[o_id]'
target='_blank'><font color='#FF0000'>ดูรายละเอียด/แจ้งชาระเงิน </font></a>";
}
?>
</td>
</tr>
<? }?>
</table>
<p>&nbsp;</p>
<p>&nbsp;<strong>&nbsp;รายการแจ้งชาระเงินของคุณ</strong></p>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="74" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style23">เลขที่โอน</div></td>
<td width="145" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">เมื่อวันที่</div></td>
<td width="82" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">จากร้าน</div></td>
<td width="311" bgcolor="#E4E5E6" class="style23"><div align="center">จานวณ
</div></td>
<td width="55" bgcolor="#E4E5E6" class="style23"><div align="center">แก้ไข
</div></td>
<td width="35" bgcolor="#E4E5E6" class="style23"><div align="center"
class="style27">ลบ</div></td>
</tr>
<?
$sql3="select * from confirm c ,shop s where
c.con_cus_id='$_SESSION[user_id]' and c.shop_id=s.shop_id ";
$result3=$obj->QuerySql($sql3);
while($re3=mysql_fetch_array($result3)){ ?>
<?
if($bgcolor=="#F4F4FF"){
$bgcolor="#F7F8F9";
}else{
$bgcolor="#F4F4FF";
}
?>
<tr>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<a href="Slip/<?=$re3[con_id]?>_<?=$re3[o_id]?>.jpg" target="_blank">
<?=$re3[con_id]?> </a>
</div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><strong>
<?=$re3[con_date]?>
</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"><strong>
<?=$re3[shop_name]?>
</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<?=number_format($re3[con_price],2)?>
<strong>บาท</strong></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center"> <a
href="edit_con.php?conid=<?=$re3[c_id]?>" target="_blank"><img src="images/app_48.png"
width="24" height="24" border="0"/></a></div></td>
<td bgcolor="<?=$bgcolor?>"><div align="center">
<a href="delcon.php?conid=<?=$re3[c_id]?>" onclick="return confirm('ต้องการลบ การ
แจ้งชาระเงิน จริงหรือไม่ ?')"><img src="images/cancel_48.png" width="24" height="24" border="0"
/></a>
<span class="style27">
</td>
</tr>
<? }?>
</table>
<p></p>
<p>&nbsp; </p>
<p></p></td>
<td align="left" valign="top" background="img/viewboard_06.gif">&nbsp;</td>
</tr>
<tr>
<td height="21" align="left" valign="top"
background="img/viewboard_07.gif">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_08.jpg">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_09.gif">&nbsp;</td>
</tr>
</table>
<p align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</p>
<p>&nbsp;</p>
<!-- InstanceEndEditable --></div>
<blockquote>
<p align="center"><br />
</p>
</blockquote>
<br />
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" background="images/kook1.jpg"><div
align="left"><span class="style5"><strong><img src="Bar Chart.png" width="24" height="24" />จานวน
ผู้ชม
<?php
$gcc_aspect
$gcc_file
= "img";
// directory where the images can be found.
= "counter.txt"; // name of the file where the number of visitors is kept
$gcc_cookie_name = "my_cookie_name";
// name of the cookie (eg: your site's name)
$gcc_cookie_value = "my_cookie_value"; // value of the cookie (eg: something about your site)
$gcc_cookie_life = "900";
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
fclose($gcc_fp);
// cookie lifespan. Default is 900s (15min)
}
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] ==
"$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
$gcc_hits = str_replace('alt=""','alt="" border="0" height="15" width="12"',$gcc_hits);
echo $gcc_hits;
?>
<br />
Copyright &copy; 2010 By makmayshop.com</strong></span><br />
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Source code ชือ่ registermem.php
<?
include("config.inc.php");
if($_SESSION[user_id]){
echo"<script>";
echo"alert('คุณได้เป็นสมาชิกเรียบร้อยแล้ว');";
echo"window.location='profile.php'";
echo"</script>";
}
?>
<!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"><!-- InstanceBegin template="/Templates/tem.dwt.php"
codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>การสมัครสมาชิก .:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถูกใจ เปิดร้านค้า
ออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!-body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed;
background-repeat: repeat-x;
background-image: url(images/_q_dnm052604-03.jpg);
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
border: 1px none #CC99FF;
}
.style5 {color: #000000}
.style9 {color: #BBBBBB; }
.style10 {color: #FF0000}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!-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];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!-a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
-->
</style>
<link rel="shortcut icon" href="images/favicon.ico">
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<style type="text/css">
<!-.style11 {font-size: 12px}
-->
</style>
<meta name="Keywords" content="เปิดร้านค้าฟรี ศูนย์รวมร้านค้า
ตลาดซื้อขาย สินค้ามือหนึ่ง สินค้ามือสอง ราคาถูก มากที่สดุ ในประเทศไทย อาทิ ช๊อปปิ้ง mp4 เครื่องสาอาง
พระเครื่อง รถ นาฬิกา อาหาร มือถือ เสื้อผ้าแฟชั่น อาหาร ...
" />
</head>
<body onload="MM_preloadImages('images/Untitled-1_032.jpg','images/Untitled1_052.jpg','images/Untitled-1_062.jpg','images/Untitled-1_072.jpg','images/Untitled-1_022.jpg')">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#E8E8E8"><div align="right"><strong>| <a href="index.php">หน้าแรก</a> | เข้าสู่
ระบบ | <a href="registermem.php">สมัครสมาชิก</a> | ออกจาระบบ </strong></div></td>
</tr>
<tr>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="287" align="left" valign="top"><a href="index.php"><img src="images/index_01.jpg"
width="288" height="103" border="0" /></a></td>
<td width="713" align="left" valign="top" bgcolor="#D7D7D7"><!-- InstanceBeginEditable
name="EditRegion4" -->
<table width="711" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="711" align="left" valign="top"><script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wi
dth','711','height','98','src','images/Movie','quality','high','pluginspage','http://www.adobe.com/shockwave/d
ownload/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/Movie' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="711" height="98">
<param name="movie" value="images/Movie.swf" />
<param name="quality" value="high" />
<embed src="images/Movie.swf" quality="high"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Flash" type="application/x-shockwave-flash" width="711" height="98"></embed>
</object></noscript></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="207" colspan="2" align="left" valign="top" bgcolor="#F2F2F2"><a
href="index.php"><img src="images/index_04.jpg" width="999" height="206" border="0" /></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="1000" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#F2F2F2"><span class="style5">
<marquee scrollamount="3">
<strong> <img src="images/new4.gif" width="28" height="11" /></strong>ยินดีต้อนรับเข้าสุ่เว็บ
มายมากช็อบเพียงท่าน <span class="style10"><strong><a href="registermem.php">สมัครสมาชิก
</a></strong></span> กับเว็บเราฟรีเว็บร้านค้า ขอให้ท่านสนุกกับการช็อบปิ้ง รายละเอียดเกีย่ วกับเว็บเรา
<span class="style10"><strong><a href="makmayshop.php">คลิกที่น<ี้ /a></strong></span>
</marquee>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF"><table width="999" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#ECECEC"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<th height="35" bgcolor="#BEBEBE">
<div align="center">
<form id="frmSearch" name="frmSearch" method="post"
action="Search_Shop.php">
<span class="style11">ชื่อร้านค้า</span>
<br />
<img src="images/icon_favourites.gif" width="16" height="16" />
<input name="inSearch" type="text" id="" size="20"/>
<input type="image" name="Submit" src="images/search-40.png"/>
</form>
</div></th>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">
<? if(session_is_registered("user_id")){
$sql2="select * from customer where cus_id='$_SESSION[user_id]'";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
?>
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center">
<? if($rs2[pic]=="1"){?>
<a href="profile.php"><img src="Picuser/<?=$_SESSION[user_id]?>.jpg "
width="120" height="120" border="0" /></a></div>
<div align="center">
<? }else{ ?>
<img src="Picuser/noavatar_middle.gif " width="120" height="120" />
</div>
<? }?>
</div>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left"><strong><span
class="style5">&nbsp;&nbsp;ยินดีต้อนรับ </span>&nbsp;</strong>
<a href="profile.php">
<b>
<?=$rs2[username] ?>
</b> </a> </div>
<div align="center"></div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left">&nbsp;&nbsp;<img
src="images/warning_16.png" width="16" height="16" /><strong> <a href="logout.php">ออกจากระบบ
</a></strong></div></td>
</tr>
</table>
<? }else{ ?>
<form id="form1" name="form1" method="post" action="chkloginmember.php">
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center"><strong>Username</strong>
<input name="user" type="text" id="user" style="color: #999999; "size="15" />
</div></td>
</tr>
<tr>
<td height="31" bgcolor="#ECECEC"><div align="center">
<strong>Password</strong>
<input name="pass" type="password" id="pass" size="15" style="color:
#999999; "/>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="center"><input type="image" name="Submit"
src="images/login.png" />
</div></td>
</tr>
<tr>
<th height="10" bgcolor="#FFFFFF"><div align="center" class="style9"><a
href="registermem.php">สมัครสมาชิก</a></div></th>
</tr>
</table>
</form>
<? } ?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/Untitled-1_01.jpg" width="220" height="51" /></td>
</tr>
<tr>
<td><a href="registermem.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image30','','images/Untitled-1_022.jpg',1)"><img src="images/Untitled1_02.gif" name="Image30" width="220" height="42" border="0" id="Image30" /></a></td>
</tr>
<tr>
<td><a href="registershop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image4','','images/Untitled-1_032.jpg',1)"><img src="images/Untitled1_03.gif" name="Image4" width="220" height="46" border="0" id="Image" /></a></td>
</tr>
<tr>
<td><a href="productsale.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image6','','images/Untitled-1_052.jpg',1)"><img src="images/Untitled1_05.gif" name="Image6" width="220" height="46" border="0" id="Image9" /></a></td>
</tr>
<tr>
<td><a href="webbrod.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image7','','images/Untitled-1_062.jpg',1)"><img src="images/Untitled1_06.gif" name="Image7" width="220" height="45" border="0" id="Image10" /></a></td>
</tr>
<tr>
<td><a href="makmayshop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image8','','images/Untitled-1_072.jpg',1)"><img src="images/Untitled1_07.gif" name="Image8" width="220" height="44" border="0" id="Image11" /></a></td>
</tr>
<tr>
<td><img src="images/Untitled-1_08.gif" width="220" height="31" /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="220" align="left" valign="top" background="images/linl.jpg"><table width="220"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C3C2C3"><div align="center"><strong><img src="images/m_misc.gif"
width="16" height="16" /> หมวดหมู่สินค้า</strong></div></td>
</tr>
<?
$sql3="select * from type_produc";
$q3=mysql_query($sql3);
while($rs3=mysql_fetch_array($q3)){
?>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp; <img src="images/bullet_m3.gif" width="16" height="9"
/>
<a href="producttype.php?id_type=<?=$rs3[0] ?>&&typename=<?=$rs3[1] ?>"> <?=$rs3[1]
?></a></td>
</tr>
<? }?>
<tr>
<td align="left" valign="top"><table width="220" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" align="left" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="left" valign="bottom" bgcolor="#FFFFFF"><div align="center">
<strong>สถิติของเว็บ</strong> <img src="images/stat.gif" width="18" height="17" /></div></td>
</tr>
<tr>
<td width="36" align="left" valign="bottom" bgcolor="#FFFFFF"><img alt=""
align="absbottom" src="images/star.png" width="25" height="25" /></td>
<td width="70" align="left" bgcolor="#FFFFFF">สินค้า</td>
<td width="55" align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from product";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td width="57" align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/type.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">หมวดสินค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from type_produc";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">หมวด</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/mall.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ร้านค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from shop";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">ร้าน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/member.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">สมาชิก</td>
<td align="right" bgcolor="#FFFFFF"><div align="left" class="style10">
<div align="center"><strong>
<?
$sql="select * from customer";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">คน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img src="images/u15059458.jpg"
width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ยอดขาย</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select * from or_der";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img
src="images/dollar_currency_sign.png" width="30" height="30" /></td>
<td align="left" bgcolor="#FFFFFF">รวมมูลค่า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select sum(o_totel) from or_der";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
if($rs==""){
echo"0";
}else{
echo"$rs[0] ";
}
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">&nbsp;บาท</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> สินค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from product p,shop s where p.p_shop_id=s.shop_id order by pro_id desc
limit 5";
$q=mysql_query($sql);
while($rs=mysql_fetch_array($q)){
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;">
<?
$sql2="select * from shop where shop_id=$rs[p_shop_id] and
status=1";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
if($rs2[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<a href="<?=$pat?>/<?=$rs2[shop_name]?>/review.php?id_pro=<?=$rs[pro_id]?>"
target="_blank"> <img src="<?=$pat?>/<?=$rs[shop_name]?>/Picpro/<?=$rs[pro_id]?>.jpg"
alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="32" height="32" border="0"> </a>
<?=$rs[pro_name]; ?> &nbsp;<font color="#FF0000"><?=$rs[pro_price]; ?> บาท</font>
<strong>:ร้าน
<?
if($rs[shop_typeid]==2){
echo " <a
href='vip/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}else{
echo " <a
href='Free/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}
?>
<img src="images/new4.gif" width="28" height="11"
/></strong></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="left"></div></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> ร้านค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from shop where status=1 order by shop_id desc limit 5";
$q=mysql_query($sql);
// if($q==""){
//exit();
//
echo"<td height='30' align='left' valign='middle' bgcolor='#E0E0E0'
style='border-bottom-color:#918E91;border-bottom-style: dashed; border-width:1px;'>
// <center><b>ยังไม่มีข้อมูลครับ</b></center></td>";
//
}else{
while($rs=mysql_fetch_array($q)){
//}
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;"><div
align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/Home.png"
width="24" height="24" border="0"/>
<? if($rs[shop_typeid]==1){
echo "<a href='Free/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}else{
echo "<a href='vip/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}
?>
</strong></div></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><!-- InstanceBeginEditable
name="EditRegion5" -->
<div align="center"></div>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="center"></div></td>
</tr>
</table></td>
<td width="778" align="left" valign="top"><div align="left"><!-- InstanceBeginEditable
name="EditRegion3" -->
<p>&nbsp;</p>
<blockquote>
<p align="center"><img src="images/LOGOmakmay copy.gif" width="184" height="95"
/></p>
<p align="center"><br />
</p>
</blockquote>
<table width="598" height="264" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.formaddcsu;
if(formObj.inName.value == "" ) {
alert("กรุณากรอก ชื่อ-สกุล ด้วยครับ"); formObj.inName.focus(); return false; }
alert("กรุณากรอก ที่อยู่ ด้วยครับ"); formObj.inAdd.focus();
else if(formObj.inAdd.value == "" ) {
return false; }
else if(formObj.inMail.value == "" )
{ alert("กรุณากรอก อีเมลล์ ด้วยครับ"); formObj.inMail.focus(); return false; }
else if(formObj.inUser.value == "" )
{ alert("กรุณากรอก ชื่อผูใ้ ช้้ ด้วยครับ"); formObj.inUser.focus(); return false; }
else if(formObj.inPass.value == "" ) {
alert("กรุณากรอก รหัสผ่าน ด้วยครับ"); formObj.inPass.focus(); return false; }
else return true ;
}
function checkform2() {
return alert("คุณต้องการล้าง
ข้อมูลออกทั้งหมด ?");
}
</script>
<script type="text/javascript">
function isEingchar(str,obj){
var
orgi_text="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._-@";
var str_length=str.length;
var str_length_end=str_length-1;
var isEing=true;
var Char_At="";
for(i=0;i<str_length;i++){
Char_At=str.charAt(i);
if(orgi_text.indexOf(Char_At)==-1){
isEing=false;
}
}
if(str_length>=1){
if(isEing==false){
obj.value=str.substr(0,str_length_end);
}
}
return isEing; // ถ้าเป็น true แสดงว่าเป็นภาษา E ทั้งหมด
}
</script>
<form id="formaddcsu" name="formaddcsu" method="post" action="" onSubmit=" return
checkform();" onreset="return checkform2();" >
<table width="500" border="1" align="center" cellpadding="0" cellspacing="0"
bordercolor="#CCCCCC">
<tr>
<td><table width="529" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td colspan="2" bgcolor="#E8E8E8"><div align="center"><strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong> <strong>การสมัครสมาชิก
</strong> <strong><img src="images/icon_favourites.gif" width="16" height="16"
/></strong></div></td>
</tr>
<tr>
<td><div align="right">เพศ :</div></td>
<td><input name="radio" type="radio" id="radio" value="ชาย" checked="checked"
/>
ชาย
<input type="radio" name="radio" id="radio2" value="หญิง" />
หญิง</td>
</tr>
<tr>
<td width="147"><div align="right">ชื่อ - สกุล :</div></td>
<td width="353"><input type="text" name="inName" id="inName" /></td>
</tr>
<tr>
<td><div align="right">ที่อยู่ :</div></td>
<td><textarea name="inAdd" id="inAdd" cols="45" rows="5"></textarea> </td>
</tr>
<tr>
<td><div align="right">อีเมล์ :</div></td>
<td><input type="text" name="inMail" id="inMail"
onkeyup="isEingchar(this.value,this)" onkeydown="isEingchar(this.value,this)" /></td>
</tr>
<tr>
<td><div align="right">username :</div></td>
<td><input type="text" name="inUser" id="inUser"
onkeyup="isEingchar(this.value,this)" onkeydown="isEingchar(this.value,this)" /></td>
</tr>
<tr>
<td><div align="right">password :</div></td>
<td><input type="password" name="inPass" id="inPass" /></td>
</tr>
<tr>
<td><div align="right"><img src="captcha/captcha_img.php" width="134"
height="28"/></div></td>
<td><input type="text" name="capt" id="capt" />
<span class="style10"> * กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย</span></td>
</tr>
<tr>
<td><div align="right"></div></td>
<td><input type="submit" name="Submint" id="Submint" value="สมัครสมาชิก" />
<input type="reset" name="button2" id="button2" value="ล้างข้อมูล" /></td>
</tr>
<tr>
<td colspan="2" bgcolor="#E8E8E8">&nbsp;</td>
</tr>
</table></td>
</tr>
</table>
</form></td>
</tr>
</table>
<p align="center">
<?php
if(isset($_POST[Submint])) {
if(!isset($_POST['capt'])) {
exit("Error");
}
//session must be start to perform check
session_start();
//check input capt with session captcha
if($_SESSION['captcha']!=$_POST['capt'] || $_SESSION['captcha']=='BADCODE')
{
//wrong captcha exit the program not continue.
echo "<script>" ;
echo "alert('ป้อนอักขระ 5 ตัว ไม่ถกู ต้อง');" ;
echo "</script>" ;
exit;
}
//correct captcha continue program
require("function.php");
$obj=new sql();
$table="customer";
$condition="where username='$_POST[inUser]'";
$num_rows=$obj->num_record($table,$condition);
if($num_rows>0){
echo"<script>";
echo"alert('Username นี้มีการลงทะเบียนแล้ว');";
echo"</script>";
}else{
$sql="insert into customer values (' ','$_POST[radio]','
$_POST[inName]','$_POST[inAdd] ','$_POST[inMail] ','$_POST[inUser]','$_POST[inPass]',0 )";
$result=$obj->QuerySql($sql);
$sql2="select * from customer where username='$_POST[inUser]' and
password='$_POST[inPass]'";
$q2=mysql_query($sql2);
$num=mysql_num_rows($q2);
if($num<=0){
echo"<script>";
echo"alert('Username หรือ
Password ไม่ถูกต้อง');";
echo"window.location='index.php'";
echo"</script>";
}else{
$rs=mysql_fetch_array($q2);
session_register("user_id");
$_SESSION[user_id]=$rs[cus_id];
}
echo"<script>";
echo"alert('สมัครสมาชิกเรียบร้อยแล้ว');";
echo"window.location='index.php'";
echo"</script>";
exit;
// ....................
}
}
?></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- InstanceEndEditable --></div>
<blockquote>
<p align="center"><br />
</p>
</blockquote>
<br />
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" background="images/kook1.jpg"><div
align="left"><span class="style5"><strong><img src="Bar Chart.png" width="24" height="24" />จานวน
ผู้ชม
<?php
$gcc_aspect
$gcc_file
= "img";
// directory where the images can be found.
= "counter.txt"; // name of the file where the number of visitors is kept
$gcc_cookie_name = "my_cookie_name";
// name of the cookie (eg: your site's name)
$gcc_cookie_value = "my_cookie_value"; // value of the cookie (eg: something about your site)
$gcc_cookie_life = "900";
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
// cookie lifespan. Default is 900s (15min)
fclose($gcc_fp);
}
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] ==
"$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
$gcc_hits = str_replace('alt=""','alt="" border="0" height="15" width="12"',$gcc_hits);
echo $gcc_hits;
?>
<br />
Copyright &copy; 2010 By makmayshop.com</strong></span><br />
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Source code ชือ่ Search_Shop.php
<?
include("config.inc.php");
?>
<p>&nbsp; </p>
<p align="center"><img src="images/LOGOmakmay copy.gif" width="300" height="151" />
</p>
<p align="center">
<? if($_SESSION[user_id]==""){ ?>
</p>
<p align="center"><img src="images/icontexto-webdev-cancel-128x128.png" width="128"
height="128" /></p>
<p align="center" class="style10"><strong><span class="style5">คุณจาเป็นต้องทาการสู่ระบบ
</span> <span class="style5">หรือ</span> <a href="registermem.php" ><font color="#0000FF">สมัคร
สมาชิก</font></a> <span class="style5">ก่อนถึงจะมีสิทธิ์ในการสร้างร้านค้า</span></strong></p>
<p align="center" class="style10">
<p class="style1">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</p>
<? }else{?>
<?
require("function.php");
$obj=new sql();
$table="customer";
$sql="where cus_id='$_SESSION[user_id]'";
$result=$obj->select($table,$sql);
?>
<script language="JavaScript" type="text/javascript">
function checkform() {
var formObj = document.frmaddshop;
if(formObj.inNameshop.value == "" )
{ alert("กรุณากรอก ชื่อร้านค้า ด้วยครับ"); formObj.inNameshop.focus(); return false; }
else if(formObj.shop_id.value == "" )
{ alert("กรุณากรอก รหัสบัตรประชาชนของท่าน ด้วยครับ"); formObj.shop_id.focus();
return false;
}
else if(formObj.inPay.value == "" ) {
alert("กรุณากรอก วิธีการชาระเงิน ด้วยครับ"); formObj.inPay.focus();
return false; }
else if(formObj.inUsername.value ==
"" ) { alert("กรุณากรอก ชื่อผู้ใช้้งาน ด้วยครับ"); formObj.inUsername.focus();
return false; }
else if(formObj.inPass.value == "" ) {
alert("กรุณากรอก รหัสผ่าน ด้วยครับ"); formObj.inPass.focus(); return false; }
alert("กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย"); formObj.capt.focus();
else if(formObj.capt.value == "" ) {
return false; }
else return true ;
}
function checkform2() {
return alert("คุณต้องการล้าง
ข้อมูลออกทั้งหมด ?");
}
</script>
<script type="text/javascript">
function isEingchar(str,obj){
var
orgi_text="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890._-@";
var str_length=str.length;
var str_length_end=str_length-1;
var isEing=true;
var Char_At="";
for(i=0;i<str_length;i++){
Char_At=str.charAt(i);
if(orgi_text.indexOf(Char_At)==-1){
isEing=false;
}
}
if(str_length>=1){
if(isEing==false){
obj.value=str.substr(0,str_length_end);
}
}
return isEing; // ถ้าเป็น true แสดงว่าเป็นภาษา E ทั้งหมด
}
</script>
<form id="form3" name="frmaddshop" method="post" action="" onSubmit=" return
checkform();" onreset="return checkform2();" >
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="655" border="1" align="center" cellpadding="0" cellspacing="3"
style="border-width: 1px; border-color: #FF0000">
<tr>
<td colspan="2" align="left" valign="top"><div align="center"><span
class="style19"><strong>ลงทะเบียนร้านค้า</strong></span><br />
</div></td>
</tr>
<tr>
<td width="141" align="left" valign="top"><div align="center">ชือร้านค้า</div></td>
<td width="506" align="left" valign="top">
<input type="text" name="inNameshop" id="inNameshop"
onkeyup="isEingchar(this.value,this)" onkeydown="isEingchar(this.value,this)" />
<a
onClick="window.open('chknameshop.php','','titlebar=no,scrollbars=yes,resizable=on,top=30,left=30,widt
h=400,height=370');" href="javascript:;" class="style9"> ตรวจสอบชื่อร้าน</a></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">ประเภทร้านค้า</div></td>
<td align="left" valign="top"><input name="Tshop" type="radio" id="radio" value="1"
checked="checked" />
BeginneFree
<input type="radio" name="Tshop" id="radio2" value="2" />
VIP</td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">รหัสบัตรประชาชน</div></td>
<td align="left" valign="top"><input type="text" name="shop_id" id="shop_id"
maxlength="13" onkeypress='if (event.keyCode&lt;48||event.keyCode&gt;59) event.returnValue=false'
/>
*จาเป็นต้องกรอก</td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">ชื่อ - สกุล</div></td>
<td align="left" valign="top"><input type="text" name="inName" id="inName"
value="<?=$result[cus_name]?>" /></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">ที่อยู่</div></td>
<td align="left" valign="top"><textarea name="inAdd" id="inAdd" cols="45"
rows="5"><?=$result[cus_address]?></textarea></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">อีเมล์</div></td>
<td align="left" valign="top"><input type="text" name="inMail" id="inMail"
value="<?=$result[cus_email]?>" onkeyup="isEingchar(this.value,this)"
onkeydown="isEingchar(this.value,this)" /></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center"></div>
<div align="center">วิธีการชาระเงิน</div></td>
<td width="506" align="left" valign="top"><div align="left">
<textarea name="inPay" id="inPay" cols="60" rows="10"></textarea>
</div></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
<td align="left" valign="top" bordercolor="#000000">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">ชื่อเข้าใช้งาน</div></td>
<td align="left" valign="top" bordercolor="#000000"><input type="text"
name="inUsername" id="inUsername" onkeyup="isEingchar(this.value,this)"
onkeydown="isEingchar(this.value,this)" /></td>
</tr>
<tr>
<td align="left" valign="top"><div align="center">รหัสผ่าน</div></td>
<td align="left" valign="top" bordercolor="#000000"><p>
<input type="password" name="inPass" id="inPass" />
</p></td>
</tr>
<tr>
<td align="left" valign="top"><img src="captcha/captcha_img.php" width="134"
height="28"/></td>
<td align="left" valign="top"><input type="text" name="capt" id="capt" />
<span class="style10"> * กรุณาพิมพ์โค้ด 5 ตัวอักษรด้วย</span></td>
</tr>
<tr>
<td align="left" valign="top">&nbsp;</td>
<td align="left" valign="top"><input type="submit" name="Submint" id="button2"
value="สมัครร้านค้า" />
<input type="reset" name="button3" id="button3" value="ล้างข้อมูล" /></td>
</tr>
</table></td>
</tr>
</table>
<p>&nbsp;</p>
</form>
<?php
if(isset($_POST[Submint])) {
if(!isset($_POST['capt'])) {
exit("Error");
}
//session must be start to perform check
session_start();
//check input capt with session captcha
if($_SESSION['captcha']!=$_POST['capt'] || $_SESSION['captcha']=='BADCODE')
{
//wrong captcha exit the program not continue.
echo "<script>" ;
echo "alert('ป้อนอักขระ 5 ตัว ไม่ถกู ต้อง');" ;
echo "</script>" ;
exit;
}
//เช็ครหัสบัตรประชาชน
function checkID($id) {
if(strlen($id) != 13) return false;
for($i=0, $sum=0; $i<12;$i++)
$sum += (int)($id{$i})*(13-$i);
if((11-($sum%11))%10 == (int)($id{12}))
return true;
return false;
}
$a = $_POST[shop_id];
if(isset($a))
{
if(!checkID($a))
{
echo "<script>" ;
echo "alert('หมายเลขประจาตัวที่คณ
ุ กรอกไม่ถูกต้องครับ');" ;
echo"window.location='registershop.php'";
echo "</script>" ;
exit;
}
}
/*
if (!$obj->checkemail($_POST[inMail]))
{
echo "<script>" ;
echo "alert('รูปแบบอีเมล์ไม่ถูกต้อง
ครับ');" ;
echo"window.location='registershop.php'";
echo "</script>" ;
exit;
}*/
if($_POST[inUsername]<>""){
$sql="select * from shop where shop_username='$_POST[inUsername]'";
$q=mysql_query($sql);
$num=mysql_num_rows($q);
if($num>0){
echo"<script>";
echo"alert('Username ซ้าครับ กรุณากรอกใหม่');";
echo"window.location='registershop.php'";
echo"</script>";
exit();
}
}
//
$todays=date("Y")."-". date("m")."-".date("j")." ".date("h:m:s");
$field="shop_name,shop_owner_id,shop_owner,shop_address,shop_email,Shop_payment,shop_typeid,sh
op_register,shop_username,shop_password,cus_id,status";
$table="shop";
$value="'$_POST[inNameshop]','$_POST[shop_id]','$_POST[inName]','$_POST[inAdd]','$_POST[inMa
il]','$_POST[inPay]','$_POST[Tshop]',NOW(),'$_POST[inUsername]','$_POST[inPass]','$_SESSION[use
r_id]',1 ";
$result=$obj->insert($field,$value,$table);
if(!$result){
echo"<script>";
echo"alert('ไม่สามารถลงทะเบียนร้านค้าได้');";
//echo"window.location='index.php'";
echo"</script>";
}else{
//copy($_FILES[inPicture][tmp_name],"Picuser/$_SESSION[user_id].jpg");
if($_POST[Tshop]==2){
$strFileName = "shopid.txt";
$objFopen = fopen($strFileName, 'w'); //การสร้างไฟล์ shopid.txt
if ($objFopen) {
$objFopen2 = fopen($strFileName, 'a');//การเขียนไฟล์ shopid.txt
$result2=$obj->selectMaxOrMin("max","shop_id","shop");
$text=$result2[0]; //รหัสร้านค้า
fputs($objFopen2,$text);//เขียนรหัสร้านค้าลงในไฟล์ shopid.txt
}
fclose($objFopen);//ปิดไฟล์ shopid.txt
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
mkdir("vip/$_POST[inNameshop]", 0700);//สร้างโฟเดอร์ชื่อร้านค้า
copy("shopid.txt","vip/$_POST[inNameshop]/shopid.txt");
///////////////////////////////////////การคล้ายชิบ//////////////////////////////////////////////////////
$ZipName = "vip/vip.zip";
$DesName = "vip/$_POST[inNameshop]/";
require_once("dUnzip2.inc.php"); // include Class
$zip = new dUnzip2($ZipName); // New Class
$zip->unzipAll($DesName); // Unzip All
///////////////////////////////////////////////////////////////////////////////////
}else{
$strFileName = "shopid.txt";
$objFopen = fopen($strFileName, 'w'); //การสร้างไฟล์ shopid.txt
if ($objFopen) {
$objFopen2 = fopen($strFileName, 'a');//การเขียนไฟล์ shopid.txt
$result2=$obj->selectMaxOrMin("max","shop_id","shop");
$text=$result2[0]; //รหัสร้านค้า
fputs($objFopen2,$text);//เขียนรหัสร้านค้าลงในไฟล์ shopid.txt
}
fclose($objFopen);//ปิดไฟล์ shopid.txt
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
mkdir("Free/$_POST[inNameshop]", 0700);
copy("shopid.txt","Free/$_POST[inNameshop]/shopid.txt");
///////////////////////////////////////การคล้ายชิบ//////////////////////////////////////////////////////
$ZipName = "Free/Free.zip";
$DesName = "Free/$_POST[inNameshop]/";
require_once("dUnzip2.inc.php"); // include Class
$zip = new dUnzip2($ZipName); // New Class
$zip->unzipAll($DesName); // Unzip All
}
Source code ชือ่ Search_Shop.php
<?
include("config.inc.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"><!-- InstanceBegin template="/Templates/tem.dwt.php"
codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>ค้นหาร้านค้า .:: Makmayshop.com ซื้อง่าย ขายสะดวก ศูนย์รวมร้านค้า สินค้าที่ถูกใจ เปิดร้านค้า
ออนไลน์ง่าย ๆ ฟรีตลอดกาล ::.</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!-body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed;
background-repeat: repeat-x;
background-image: url(images/_q_dnm052604-03.jpg);
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
border: 1px none #CC99FF;
}
.style5 {color: #000000}
.style9 {color: #BBBBBB; }
.style10 {color: #FF0000}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!-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];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!-a:link {
color: #000000;
text-decoration: none;
}
a:visited {
color: #000000;
text-decoration: none;
}
a:hover {
color: #FF0000;
text-decoration: underline;
}
a:active {
color: #000000;
text-decoration: none;
}
-->
</style>
<link rel="shortcut icon" href="images/favicon.ico">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
<style type="text/css">
<!-.style11 {font-size: 12px}
-->
</style>
<meta name="Keywords" content="เปิดร้านค้าฟรี ศูนย์รวมร้านค้า
ตลาดซื้อขาย สินค้ามือหนึ่ง สินค้ามือสอง ราคาถูก มากที่สดุ ในประเทศไทย อาทิ ช๊อปปิ้ง mp4 เครื่องสาอาง
พระเครื่อง รถ นาฬิกา อาหาร มือถือ เสื้อผ้าแฟชั่น อาหาร ...
" />
</head>
<body onload="MM_preloadImages('images/Untitled-1_032.jpg','images/Untitled1_052.jpg','images/Untitled-1_062.jpg','images/Untitled-1_072.jpg','images/Untitled-1_022.jpg')">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#E8E8E8"><div align="right"><strong>| <a href="index.php">หน้าแรก</a> | เข้าสู่
ระบบ | <a href="registermem.php">สมัครสมาชิก</a> | ออกจาระบบ </strong></div></td>
</tr>
<tr>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="287" align="left" valign="top"><a href="index.php"><img src="images/index_01.jpg"
width="288" height="103" border="0" /></a></td>
<td width="713" align="left" valign="top" bgcolor="#D7D7D7"><!-- InstanceBeginEditable
name="EditRegion4" -->
<table width="711" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wi
dth','711','height','98','src','images/Movie','quality','high','pluginspage','http://www.adobe.com/shockwave/d
ownload/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','images/Movie' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0"
width="711" height="98">
<param name="movie" value="images/Movie.swf" />
<param name="quality" value="high" />
<embed src="images/Movie.swf" quality="high"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=Shockwave
Flash" type="application/x-shockwave-flash" width="711" height="98"></embed>
</object></noscript></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td height="207" colspan="2" align="left" valign="top" bgcolor="#F2F2F2"><a
href="index.php"><img src="images/index_04.jpg" width="999" height="206" border="0" /></a></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="1000" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#F2F2F2"><span class="style5">
<marquee scrollamount="3">
<strong> <img src="images/new4.gif" width="28" height="11" /></strong>ยินดีต้อนรับเข้าสุ่เว็บ
มายมากช็อบเพียงท่าน <span class="style10"><strong><a href="registermem.php">สมัครสมาชิก
</a></strong></span> กับเว็บเราฟรีเว็บร้านค้า ขอให้ท่านสนุกกับการช็อบปิ้ง รายละเอียดเกีย่ วกับเว็บเรา
<span class="style10"><strong><a href="makmayshop.php">คลิกที่น<ี้ /a></strong></span>
</marquee>
</span></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF"><table width="999" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#ECECEC"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<th height="35" bgcolor="#BEBEBE">
<div align="center">
<form id="frmSearch" name="frmSearch" method="post"
action="Search_Shop.php">
<span class="style11">ชื่อร้านค้า</span>
<br />
<img src="images/icon_favourites.gif" width="16" height="16" />
<input name="inSearch" type="text" id="" size="20"/>
<input type="image" name="Submit" src="images/search-40.png"/>
</form>
</div></th>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" bgcolor="#ECECEC">
<? if(session_is_registered("user_id")){
$sql2="select * from customer where cus_id='$_SESSION[user_id]'";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
?>
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center">
<? if($rs2[pic]=="1"){?>
<a href="profile.php"><img src="Picuser/<?=$_SESSION[user_id]?>.jpg "
width="120" height="120" border="0" /></a></div>
<div align="center">
<? }else{ ?>
<img src="Picuser/noavatar_middle.gif " width="120" height="120" />
</div>
<? }?>
</div>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="left"><strong><span
class="style5">&nbsp;&nbsp;ยินดีต้อนรับ </span>&nbsp;</strong>
<a href="profile.php">
<b>
<?=$rs2[username] ?>
</b> </a> </div>
</tr>
<tr>
<div align="center"></div></td>
<td bgcolor="#ECECEC"><div align="left">&nbsp;&nbsp;<img
src="images/warning_16.png" width="16" height="16" /><strong> <a href="logout.php">ออกจากระบบ
</a></strong></div></td>
</tr>
</table>
<? }else{ ?>
<form id="form1" name="form1" method="post" action="chkloginmember.php">
<table width="220" border="0" cellspacing="3" cellpadding="0">
<tr>
<td bgcolor="#ECECEC"><div align="center"><strong>Username</strong>
<input name="user" type="text" id="user" style="color: #999999; "size="15" />
</div></td>
</tr>
<tr>
<td height="31" bgcolor="#ECECEC"><div align="center">
<strong>Password</strong>
<input name="pass" type="password" id="pass" size="15" style="color:
#999999; "/>
</div></td>
</tr>
<tr>
<td bgcolor="#ECECEC"><div align="center"><input type="image" name="Submit"
src="images/login.png" />
</div></td>
</tr>
<tr>
<th height="10" bgcolor="#FFFFFF"><div align="center" class="style9"><a
href="registermem.php">สมัครสมาชิก</a></div></th>
</tr>
</table>
</form>
<? } ?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><img src="images/Untitled-1_01.jpg" width="220" height="51" /></td>
</tr>
<tr>
<td><a href="registermem.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image30','','images/Untitled-1_022.jpg',1)"><img src="images/Untitled1_02.gif" name="Image30" width="220" height="42" border="0" id="Image30" /></a></td>
</tr>
<tr>
<td><a href="registershop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image4','','images/Untitled-1_032.jpg',1)"><img src="images/Untitled1_03.gif" name="Image4" width="220" height="46" border="0" id="Image" /></a></td>
</tr>
<tr>
<td><a href="productsale.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image6','','images/Untitled-1_052.jpg',1)"><img src="images/Untitled1_05.gif" name="Image6" width="220" height="46" border="0" id="Image9" /></a></td>
</tr>
<tr>
<td><a href="webbrod.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image7','','images/Untitled-1_062.jpg',1)"><img src="images/Untitled1_06.gif" name="Image7" width="220" height="45" border="0" id="Image10" /></a></td>
</tr>
<tr>
<td><a href="makmayshop.php" onmouseout="MM_swapImgRestore()"
onmouseover="MM_swapImage('Image8','','images/Untitled-1_072.jpg',1)"><img src="images/Untitled1_07.gif" name="Image8" width="220" height="44" border="0" id="Image11" /></a></td>
</tr>
<tr>
<td><img src="images/Untitled-1_08.gif" width="220" height="31" /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="220" align="left" valign="top" background="images/linl.jpg"><table width="220"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C3C2C3"><div align="center"><strong><img src="images/m_misc.gif"
width="16" height="16" /> หมวดหมู่สินค้า</strong></div></td>
</tr>
<?
$sql3="select * from type_produc";
$q3=mysql_query($sql3);
while($rs3=mysql_fetch_array($q3)){
?>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp; <img src="images/bullet_m3.gif" width="16" height="9"
/>
<a href="producttype.php?id_type=<?=$rs3[0] ?>&&typename=<?=$rs3[1] ?>"> <?=$rs3[1]
?></a></td>
</tr>
<? }?>
<tr>
<td align="left" valign="top"><table width="220" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" align="left" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="left" valign="bottom" bgcolor="#FFFFFF"><div align="center">
<strong>สถิติของเว็บ</strong> <img src="images/stat.gif" width="18" height="17" /></div></td>
</tr>
<tr>
<td width="36" align="left" valign="bottom" bgcolor="#FFFFFF"><img alt=""
align="absbottom" src="images/star.png" width="25" height="25" /></td>
<td width="70" align="left" bgcolor="#FFFFFF">สินค้า</td>
<td width="55" align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from product";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td width="57" align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/type.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">หมวดสินค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from type_produc";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">หมวด</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/mall.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ร้านค้า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center" class="style10">
<div align="center"><strong>
<?
$sql="select * from shop";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">ร้าน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/member.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">สมาชิก</td>
<td align="right" bgcolor="#FFFFFF"><div align="left" class="style10">
<div align="center"><strong>
<?
$sql="select * from customer";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></div>
</div></td>
<td align="left" bgcolor="#FFFFFF">คน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img src="images/u15059458.jpg"
width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ยอดขาย</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select * from or_der";
$q=mysql_query($sql);
$con=mysql_num_rows($q);
echo"$con";
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img
src="images/dollar_currency_sign.png" width="30" height="30" /></td>
<td align="left" bgcolor="#FFFFFF">รวมมูลค่า</td>
<td align="right" bgcolor="#FFFFFF"><div align="center"><span
class="style10"><strong>
<?
$sql="select sum(o_totel) from or_der";
$q=mysql_query($sql);
$rs=mysql_fetch_array($q);
if($rs==""){
echo"0";
}else{
echo"$rs[0] ";
}
?>
</strong></span></div></td>
<td align="left" bgcolor="#FFFFFF">&nbsp;บาท</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> สินค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from product p,shop s where p.p_shop_id=s.shop_id order by pro_id desc
limit 5";
$q=mysql_query($sql);
while($rs=mysql_fetch_array($q)){
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;">
<?
$sql2="select * from shop where shop_id=$rs[p_shop_id] and
status=1";
$q2=mysql_query($sql2);
$rs2=mysql_fetch_array($q2);
if($rs2[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<a href="<?=$pat?>/<?=$rs2[shop_name]?>/review.php?id_pro=<?=$rs[pro_id]?>"
target="_blank"> <img src="<?=$pat?>/<?=$rs[shop_name]?>/Picpro/<?=$rs[pro_id]?>.jpg"
alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="32" height="32" border="0"> </a>
<?=$rs[pro_name]; ?> &nbsp;<font color="#FF0000"><?=$rs[pro_price]; ?> บาท</font>
<strong>:ร้าน
<?
if($rs[shop_typeid]==2){
echo " <a
href='vip/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}else{
echo " <a
href='Free/$rs[shop_name]/review.php?id_pro=$rs[pro_id]' target='_blank'> $rs[shop_name] </a>";
}
?>
<img src="images/new4.gif" width="28" height="11"
/></strong></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="left"></div></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="100%" border="0"
cellspacing="1" cellpadding="0">
<tr>
<td bgcolor="#C3C2C3" style="border-bottom-color:#918E91;border-bottom-style: dashed;
border-width:1px;"><div align="center"><strong><img src="images/icon_favourites.gif" width="16"
height="16" /> <span class="style10">5 อับดับ</span> ร้านค้ามาใหม่</strong> <strong><img
src="images/icon_favourites.gif" width="16" height="16" /></strong></div></td>
</tr>
<tr>
<? $sql="select * from shop where status=1 order by shop_id desc limit 5";
$q=mysql_query($sql);
// if($q==""){
//exit();
//
echo"<td height='30' align='left' valign='middle' bgcolor='#E0E0E0'
style='border-bottom-color:#918E91;border-bottom-style: dashed; border-width:1px;'>
// <center><b>ยังไม่มีข้อมูลครับ</b></center></td>";
//
}else{
while($rs=mysql_fetch_array($q)){
//}
?>
<td height="30" align="left" valign="middle" bgcolor="#E0E0E0" style="border-bottomcolor:#918E91;border-bottom-style: dashed; border-width:1px;"><div
align="left"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/Home.png"
width="24" height="24" border="0"/>
<? if($rs[shop_typeid]==1){
echo "<a href='Free/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}else{
echo "<a href='vip/$rs[shop_name]'
target='_blank'>$rs[shop_name]</a>";
}
?>
</strong></div></td>
</tr>
<? } ?>
</table></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><!-- InstanceBeginEditable
name="EditRegion5" -->
<div align="center"></div>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="center"></div></td>
</tr>
</table></td>
<td width="778" align="left" valign="top"><div align="left"><!-- InstanceBeginEditable
name="EditRegion3" -->
<p align="center"><strong>ผลการค้นหาร้านค้า</strong></p>
<div align="center">
<?
require("function.php");
$obj=new sql();
$table="shop";
$condition="where shop_name like '%$_POST[inSearch]%'";
$show=$obj->selectalldate($table,$condition);
echo"<table><tr>";
$i=1;
$intRows = 0;
while($show_pro=mysql_fetch_array($show))
{
echo "<td>";
$intRows++;
?>
<?
if($show_pro[shop_typeid]==2){
$pat="vip";
}else{
$pat="Free";
}
?>
<table width="373" height="58" border="0" align="left" cellpadding="0" cellspacing="0">
<tr>
<td width="6%" height="19" align="left" valign="top"
background="img/viewboard_01.gif">&nbsp;</td>
<td width="89%" align="left" valign="top"
background="img/viewboard_02.jpg">&nbsp;</td>
<td width="5%" align="left" valign="top"
background="img/viewboard_03.gif">&nbsp;</td>
</tr>
<tr>
<td height="18" align="left" valign="top"
background="img/viewboard_04.gif">&nbsp;</td>
<td align="left" valign="top"><table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="48%" align="left" valign="top"><div align="center">
<a href="<?=$pat?>/<?=$show_pro[shop_name]?>/index.php" target="_blank">
<img src="images/shop1.jpg" alt="<?=$show_pro[pro_detail]?>" name="imag<?=$i?>" width="169"
height="149" border="0" /> </a></div></td>
<td width="52%" align="left" valign="top"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><strong>ชื่อร้านค้า</strong> :
<?=$show_pro[shop_name]?>
</div></td>
</tr>
<tr>
<td height="20"><div align="center"></div></td>
</tr>
<tr>
<td><div align="center"><strong>มีสินค้า</strong> :
<?
$sql="select * from product where
p_shop_id='$show_pro[shop_id]'";
$q=mysql_query($sql);
$num=mysql_num_rows($q);
echo"$num";
?>
</div></td>
</tr>
<tr>
<td height="20"><div align="center"></div></td>
</tr>
<tr>
<td>
<div align="center"><strong>ร้านประเภท</strong> :
<? if($show_pro[shop_typeid]==2){
echo"VIP";
}else{
echo"FERR";
}
?>
</div></td>
</tr>
<tr>
<td height="20">&nbsp;</td>
</tr>
<tr>
<td>
<div align="center">
<?=$show_pro[shop_owner] ?>
</div></td>
</tr>
<tr>
<td><div align="center"><strong>เจ้าของร้าน</strong></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><div align="center"><a
href="<?=$pat?>/<?=$show_pro[shop_name]?>/index.php" target="_blank"> <img
src="images/Home.png" width="32" height="32" border="0"/><strong><br />
</strong>เข้าร้าน</a></div></td>
</tr>
</table></td>
</tr>
</table></td>
<td align="left" valign="top" background="img/viewboard_06.gif">&nbsp;</td>
</tr>
<tr>
<td height="21" align="left" valign="top"
background="img/viewboard_07.gif">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_08.jpg">&nbsp;</td>
<td align="left" valign="top" background="img/viewboard_09.gif">&nbsp;</td>
</tr>
</table>
<?
echo"</td>";
if(($intRows)%2==0)
{
echo"</tr>";
}
$i++;
}
echo"</tr></table>";
?>
</div>
<p align="left">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<!-- InstanceEndEditable --></div>
<blockquote>
<p align="center"><br />
</p>
</blockquote>
<br />
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" background="images/kook1.jpg"><div
align="left"><span class="style5"><strong><img src="Bar Chart.png" width="24" height="24" />จานวน
ผู้ชม
<?php
$gcc_aspect
$gcc_file
= "img";
// directory where the images can be found.
= "counter.txt"; // name of the file where the number of visitors is kept
$gcc_cookie_name = "my_cookie_name";
// name of the cookie (eg: your site's name)
$gcc_cookie_value = "my_cookie_value"; // value of the cookie (eg: something about your site)
$gcc_cookie_life = "900";
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
fclose($gcc_fp);
}
// cookie lifespan. Default is 900s (15min)
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] ==
"$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
// $gcc_hits = "<a href='http://www.skyminds.net/source/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
$gcc_hits = str_replace('alt=""','alt="" border="0" height="15" width="12"',$gcc_hits);
echo $gcc_hits;
?>
<br />
Copyright &copy; 2010 By makmayshop.com</strong></span><br />
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
Source code ชือ่ ssl.php
<?
include("config.inc.php");
?>
Source code ชือ่ tem.php
<?
include("config.inc.php");
if(!$_SESSION[admin_shop]){
echo"<script>";
echo"alert('คุณไม่ได้รับสิทธิ์เข้าใช้หน้านี้นะครับ');";
echo"window.location='index.php';";
echo"</script>";
exit();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>iระบบบริหารจัดการ www.makmayshop.com</title>
<style type="text/css">
<!-body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-attachment: fixed;
background-repeat: repeat-x;
background-image: url(images/_q_dnm052604-03.jpg);
}
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
border: 1px none #CC99FF;
}
.style5 {color: #000000}
.style9 {color: #BBBBBB; }
.style10 {color: #FF0000}
.style11 {
color: #9F9F9F;
font-weight: bold;
}
-->
</style>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript">
<!-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];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!-.style14 {color: #FFFFFF; font-size: 12px; }
.style15 {
color: #9900CC;
font-weight: bold;
}
.style16 {color: #9900CC}
.style17 {color: #FFFFFF}
-->
</style>
<script src="Scripts/AC_ActiveX.js" type="text/javascript"></script>
</head>
<body onLoad="MM_preloadImages('images/Untitled-1_022.jpg','images/Untitled1_032.jpg','images/Untitled-1_042.jpg','images/Untitled-1_052.jpg','images/Untitled1_062.jpg','images/Untitled-1_072.jpg')">
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#E8E8E8"><div align="right"><strong>| หน้าแรก | เข้าสู่ระบบ | สมัครสมาชิก |
ลงทะเบียนร้านค้า </strong></div></td>
</tr>
<tr>
<td><table width="1000" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="287" align="left" valign="top"><img src="images/index_01.jpg" width="288"
height="98" /></td>
<td width="713" align="left" valign="top" bgcolor="#E6E6E6">&nbsp;</td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><img src="images/index_04.jpg" width="999"
height="206" /></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top"><table width="1000" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#F2F2F2"><div align="right" class="style5">
<marquee scrollamount="3">
<strong> <img src="images/new4.gif" width="28" height="11" /></strong>ยินดีต้อนรับเข้าสุ่เว็บ
มายมากช็อบเพียงท่าน <span class="style10">สมัครสมาชิก</span> กับเว็บเราฟรีเว็บร้านค้า ขอให้ท่าน
สนุกกับการช็อบปิ้ง รายละเอียดเกีย่ วกับเว็บเรา <span class="style10">คลิกที่น<ี้ /span>
</marquee>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" background="images/linl.jpg"><table width="220" border="0"
cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top" bgcolor="#ECECEC"><img src="images/Untitled-1_01.jpg"
width="220" height="51" /></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image10','','images/Untitled-1_022.jpg',1)"><img
src="images/Untitled-1_02.gif" name="Image10" width="220" height="42" border="0" id="Image10"
/></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image4','','images/Untitled-1_032.jpg',1)"><img src="images/Untitled1_03.gif" name="Image4" width="220" height="46" border="0" id="Image" /></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image5','','images/Untitled-1_042.jpg',1)"><img src="images/Untitled1_04.gif" name="Image5" width="220" height="46" border="0" id="Image2" /></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image6','','images/Untitled-1_052.jpg',1)"><img src="images/Untitled1_05.gif" name="Image6" width="220" height="46" border="0" id="Image9" /></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image7','','images/Untitled-1_062.jpg',1)"><img src="images/Untitled1_06.gif" name="Image7" width="220" height="45" border="0" id="Image10" /></a></td>
</tr>
<tr>
<td><a href="#" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('Image8','','images/Untitled-1_072.jpg',1)"><img src="images/Untitled1_07.gif" name="Image8" width="220" height="44" border="0" id="Image11" /></a></td>
</tr>
<tr>
<td><img src="images/Untitled-1_08.gif" width="220" height="31" /></td>
</tr>
</table></td>
</tr>
<tr>
<td width="220" align="left" valign="top" background="images/linl.jpg"><table width="220"
border="0" cellspacing="0" cellpadding="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C3C2C3"><div align="center"><strong><img src="images/m_misc.gif"
width="16" height="16" /> หมวดหมู่สินค้า</strong></div></td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/bullet_m3.gif" width="16" height="9"
/>เทคโนโลยี</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/bullet_m3.gif" width="16" height="9"
/>การศึกษา</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/bullet_m3.gif" width="16" height="9"
/>ของใช้ประจาวัน</td>
</tr>
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/bullet_m3.gif" width="16" height="9"
/>เครื่องเสริมสวย</td>
</tr>
<tr>
<td><div align="left">&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/bullet_m3.gif"
width="16" height="9" />อื่น ๆ...</div></td>
</tr>
<tr>
<td><table width="220" cellpadding="0" cellspacing="0">
<tr>
<td colspan="4" align="left" valign="bottom">&nbsp;</td>
</tr>
<tr>
<td colspan="4" align="left" valign="bottom" bgcolor="#FFFFFF"><div align="center">
<strong>สถิติของเว็บ</strong> <img src="images/stat.gif" width="18" height="17" /></div></td>
</tr>
<tr>
<td width="36" align="left" valign="bottom" bgcolor="#FFFFFF"><img alt=""
align="absbottom" src="images/star.png" width="25" height="25" /></td>
<td width="70" align="left" bgcolor="#FFFFFF">สินค้า</td>
<td width="55" align="right" bgcolor="#FFFFFF">10 </td>
<td width="57" align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/type.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">หมวดสินค้า</td>
<td align="right" bgcolor="#FFFFFF">15 </td>
<td align="left" bgcolor="#FFFFFF">หมวด</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/mall.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ร้านค้า</td>
<td align="right" bgcolor="#FFFFFF">3 </td>
<td align="left" bgcolor="#FFFFFF">ร้าน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img alt="" align="absbottom"
src="images/member.png" width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">สมาชิก</td>
<td align="right" bgcolor="#FFFFFF">30 </td>
<td align="left" bgcolor="#FFFFFF">คน</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img src="images/u15059458.jpg"
width="25" height="25" /></td>
<td align="left" bgcolor="#FFFFFF">ยอดขาย</td>
<td align="right" bgcolor="#FFFFFF">10 </td>
<td align="left" bgcolor="#FFFFFF">รายการ</td>
</tr>
<tr>
<td align="left" valign="bottom" bgcolor="#FFFFFF"><img
src="images/dollar_currency_sign.png" width="30" height="30" /></td>
<td align="left" bgcolor="#FFFFFF">รวมมูลค่า</td>
<td align="right" bgcolor="#FFFFFF">40,271 </td>
<td align="left" bgcolor="#FFFFFF">บาท</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg"><div align="center"></div></td>
</tr>
<tr>
<td align="left" valign="top" background="images/linl.jpg">&nbsp;</td>
</tr>
</table></td>
<td width="78%" align="left" valign="top"><p>&nbsp;
<blockquote>
<p align="center"><br />
</p>
</blockquote>
<br />
<p>&nbsp;</p>
<p align="center">&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
</p>
<p>&nbsp;</p>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#005897"><div align="left"><br />
<span class="style17">Copyright &copy; 2010 By makmayshop.com</span><br />
</div></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
Source code ชือ่ webbrod.php
<?
include("config.inc.php");
?>
<div align="right">
<p><img src="images/star.png" width="25" height="25" /><span class="style17"><span
class="style18"> <a href="newweb.php">ตั้งคาถามใหม่</a></span>&nbsp;&nbsp;&nbsp;</span><br>
</p>
</div>
<p>&nbsp;&nbsp;<span class="style10">* สงสัยเรื่องอะไร หรือพบปัญหาต่าง ๆ เกี่ยวกับการใช้
งานกรุณาแจ้งที่น<ี้ /span></p>
<?
require("function.php");
$obj=new sql();
$sql="select * from webbor where s_id='makmay'";
$result=$obj->QuerySql($sql);
$Per_Page = 50; // Per Page
$Num_Rows = mysql_num_rows($result);
$Page = $_GET["Page"];
if(!$_GET["Page"])
{
$Page=1;
}
$Prev_Page = $Page-1;
$Next_Page = $Page+1;
$Page_Start = (($Per_Page*$Page)-$Per_Page);
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;
}
$sql .=" order by web_id desc LIMIT $Page_Start , $Per_Page";
$result = mysql_query($sql);
?>
<table width="100%" height="56" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="56" align="left" valign="top" background="images/menubar_m.png"><table
width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12%" align="left" valign="middle"><div align="center">
<div align="center"><strong>รหัส</strong></div>
</div></td>
<td width="1%" align="left" valign="middle"><img src="images/menu_level1_item.png"
width="2" height="55" /></td>
<td width="54%" align="left" valign="middle"><div align="center">
<div align="center"><strong>เรื่อง </strong></div>
</div></td>
<td width="0%" align="left" valign="middle"><img src="images/menu_level1_item.png"
width="2" height="55" /></td>
<td width="24%" align="left" valign="middle"><div align="center">
<div align="center"><strong>ถามโดย</strong></div>
</div></td>
<td width="0%" align="left" valign="middle"><img src="images/menu_level1_item.png"
width="2" height="55" /></td>
<td width="9%" align="left" valign="middle"><div align="center"><strong>ตอบ
</strong></div></td>
</tr>
</table></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
<?php
while($re=mysql_fetch_array($result)){
?>
<tr>
<?
if($bgcolor=="#F4F4FF"){
$bgcolor="#F7F8F9";
}else{
$bgcolor="#F4F4FF";
}
?>
<td width="12%" height="14" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong><img src="img/to-do-list.png" width="16" height="16" />
<?=$re[web_id] ?>
</strong></div></td>
<td width="55%" height="14" align="left" valign="top" bgcolor="<?=$bgcolor?>"
class="style19"><a href="answebbrod.php?id=<?=$re[web_id] ?>" title="เมื่อเวลา <?=$re[day]?>"
target="_blank"><?=$re[titel] ?></a></td>
<td width="24%" height="14" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong><?=$re[name] ?></strong></div></td>
<?php
$table="ans_web";
$sql="where web_id='$re[web_id]'";
$num=$obj->num_record($table,$sql);
?>
<td width="9%" height="14" align="left" valign="top" bgcolor="<?=$bgcolor?>"><div
align="center"><strong><?=$num?>
</strong></div></td>
</tr>
<? }?>
</table>
<p align="center"> <div align="left">
<div align="center">จานวนคาถาม
<?= $Num_Rows;?>
&nbsp;เรื่อง
จานวนหน้า :
<?=$Num_Pages;?>
หน้า :
<?
if($Prev_Page)
{
echo " <a href='$_SERVER[SCRIPT_NAME]?Page=$Prev_Page'><< ย้อนกลับ</a> ";
}
for($i=1; $i<=$Num_Pages; $i++){
if($i != $Page)
{
echo "[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i'>$i</a> ]";
}
else
{
echo "<b> $i </b>";
}
}
if($Page!=$Num_Pages)
{
echo " <a href ='$_SERVER[SCRIPT_NAME]?Page=$Next_Page'>ต่อไป>></a> ";
}
?>

Similar documents