예제 #1
0
//ทำการ select admin_id ออกมาจาก admin
$query_admin="select admin_id from admin where admin_username='******'";
$result_admin=$obj_manage_data->select_data_proc($query_admin);
$rs_admin=mysql_fetch_array($result_admin);
if(!$rs_admin){
$admin_id=0;
}else{
$admin_id=$rs_admin['admin_id'];
}
if($_SESSION['admin_status']=="3"){
$admin_id=1;
}
echo"admin_id".$admin_id;

$db = new database();
$result_customer = $db->tableSQL("customer where cus_id='$cus_id' and admin_id='$admin_id'");
$rs = mysql_fetch_array($result_customer);

?>

<div id="dev_title">
ข้อมูลสมาชิก
</div>
<form method="post" action="member_action.php" enctype="multipart/form-data">
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
    	<td>
        <div id="dev_picturetext2">
        ชื่อ-นามสกุล:
        </div>
        <div id="dev_picturetext2">
예제 #2
0
<?  ob_start(); session_start();?>

<?php 
include "../config.inc.php";
require "../class_mysql.php";
$db = new database();
$cus_email = $_POST['cus_email'];
$cus_first_name = $_POST['cus_first_name'];
$cus_last_name = $_POST['cus_last_name'];
$cus_tel = $_POST['cus_tel'];
$cus_pass = $_POST['cus_pass'];
$action = $_POST['action'];
/*check email ซ้ำตรงนี้*/
if ($action == 'checkEmail') {
    $result_cus = $db->tableSQL("customer where cus_email ='{$cus_email}'");
    $num = mysql_num_rows($result_cus);
    if ($num != 0) {
        echo '["thisEmailIsAlready"]';
    } else {
        echo '["thisEmailIsEmpty"]';
    }
} else {
    $cus_date = date("d-m-y:h:i:s");
    $strSQL = "insert into customer(cus_email,cus_enable,cus_pass,cus_first_name,cus_last_name,cus_tel,admin_id,cus_date,cus_update)VALUES\r\n\t('{$cus_email}','P','{$cus_pass}','{$cus_first_name}','{$cus_last_name}','{$cus_tel}','1','{$cus_date}','{$cus_date}')";
    $sucess = mysql_query($strSQL) or die(mysql_error());
    if ($sucess) {
        $result_cus = $db->tableSQL("customer where cus_email ='{$cus_email}'");
        $re_cus = mysql_fetch_array($result_cus);
        $_SESSION['cus_id'] = $re_cus[cus_id];
        $_SESSION['cus_pass'] = $re_cus[cus_pass];
        $_SESSION['cus_email'] = $re_cus[cus_email];
예제 #3
0
      "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='images/banner_tunnel.jpg' alt='Tunnel'></a><a class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
      "content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
      "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='images/banner_bike.jpg' alt='Bike'></a><a class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
      "content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
      "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='images/banner_paint.jpg' alt='Paint'></a><a class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
      "content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}]*/
?>

<?php 
include_once "../../class_mysql.php";
$localPath = "web_design/rchaneltv";
$db = new database();
$result = $db->tableSQL("news");
$i = 0;
while ($rs = mysql_fetch_array($result)) {
    //¨Ñ´¡ÒáѺÃÙ»ÀÒ¾
    $thumbnailsPath = "../../news/1/" . $rs[news_id] . "/thumbnail";
    if (!is_dir($thumbnailsPath)) {
        echo "not found images";
    } else {
        //else
        if ($handle = opendir($thumbnailsPath)) {
            $imagesFiles = array();
            while (false != ($file = readdir($handle))) {
                if ($file != "." && $file != "..") {
                    $thumbnailsFile = $thumbnailsPath . "/" . $file;
                    $fileType = pathinfo($thumbnaisFile);
                    //áÊ´§path
예제 #4
0
파일: index_bk3.php 프로젝트: nong053/condo
	<?php
	include_once("oop/manage_data.php");
	$localPath="web_design/rchaneltv";
	?>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php

//SEO START
$name_title=$_GET['name_title'];//is name to call title
## ทำการ require เอาclass database;
			include_once("class_mysql.php");
			$db = new database();		
 		## set logo area.
$main_menu_id2=$_GET['main_menu_id'];
if($_GET['page']=="" ){
$result_seo = $db->tableSQL("seo where 	seo_id = 5");
			$rs_seo = mysql_fetch_array($result_seo);
			$object_seo_id=$rs_seo['seo_id'];
			$object_seo_tag1=$rs_seo['seo_tag1'];
			$object_seo_tag2=$rs_seo['seo_tag2'];
			$object_seo_tag3=$rs_seo['seo_tag3'];
			$object_seo_keyword=$rs_seo['seo_keyword'];
?>
			
			<title><?=$object_seo_tag1?> <?=$object_seo_tag2?> <?=$object_seo_tag3?></title>
            <meta name="Description" content="<?=$object_seo_keyword?>" />
            <meta name="KeyWords" content="<?=$object_seo_tag1?>,<?=$object_seo_tag2?>,<?=$object_seo_tag3?>"/>
<?

}
if($main_menu_id2){
예제 #5
0
		$msg.="<br><br>=============================";
		$msg.="<br><br>หมายเลขสั่งซื้อ : $_POST[txtOrderNo] ";
		$msg.="<br>ชื่อ : $_POST[txtName] ";				
		$msg.="<br>อีเมล์ : $_POST[txtEmail] ";						
		$msg.="<br>หมายเลขโทรศัพท์ : $_POST[txtTel] ";
		$msg.="<br>วันที่-เวลา : $_POST[txtDate],$_POST[txtTime] ";
		$msg.="<br>รายละเอียด : $_POST[txtDesc] ";																								
		$msg.="<br><br>=============================";

		$msg.="<br>โดย : $_POST[txtName]";		
		$msg.="<br>=============================";
		
		
		//require("class_mysql.php");
		$db = new database();
		$result_admin= $db->tableSQL("admin where admin_status=3");
		$rs_admin = mysql_fetch_array($result_admin);
		$admin_email=$rs_admin[admin_email];
		@mail($admin_email,$subject,$msg,$header);									
						
						
	echo "<script language=\"JavaScript\"> ";
	echo "	alert('ทางเราได้รับข้อมูลของคุณเรียบร้อยแล้ว');window.location='index.php';";
	echo "	</script> ";												

}


?>
<script language="JavaScript">
		function checkvalue()
예제 #6
0
파일: cart.php 프로젝트: nong053/web-ready
                                    <td><div align="center">จำนวน</div></td>
                                    <td><div align="center">รวม</div></td>
                                  </tr>
                                  
                                  <?

//============ ทำการแสงรายการที่ได้เลือกว่ามีกี่รายการ

$strNum=0;
$strTotal=0;

for($i=0;$i<=count($_SESSION["strProductID"]);$i++)
{
//============ เลือกว่ารายการสินค้าใดบ้าง
//echo"session".$_SESSION["strProductID"]["$i"];
$result_product = $db->tableSQL("product where product_id='".$_SESSION["strProductID"]["$i"]."'");
$rs_product=mysql_fetch_array($result_product);
$product_title=$rs_product['product_title'];

if($rs_product)
{
	$rows=mysql_num_rows($result_product);
		//echo" rows:$rows";
$strNum++;
								//$bgcolor=($i++%2)?'#ffffff':'#ccc';
								$bgcolor=($i%2)?'#cccccc':'#ffffff';
?>
									
                                  <tr bgcolor="<?php 
echo $bgcolor;
?>
예제 #7
0
            		if($unlink){
            		@unlink($unlink);*/
            //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
            //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
        }
    }
} else {
    //picture member default
    $object_picture = "";
}
//picture
$cus_date = date("d-m-y:h:i:s");
$strSQL = "insert into customer(cus_email,cus_user,cus_pass,cus_company,cus_fullname,cus_address,cus_tel,cus_fax,cus_pic,cus_other,cus_date)VALUES('{$cus_email}','{$cus_user}','{$cus_password}','{$cus_company}','{$cus_fullname}','{$cus_address}','{$cus_tel}','{$cus_fax}','{$object_picture}','{$cus_other}','{$cus_date}')";
$sucess = mysql_query($strSQL) or die(mysql_error());
if ($sucess) {
    $result_cus = $db->tableSQL("customer where cus_user ='******'");
    $re_cus = mysql_fetch_array($result_cus);
    $_SESSION['cus_id'] = $re_cus[cus_id];
    $_SESSION['cus_user'] = $re_cus[cus_user];
    $_SESSION['cus_pass'] = $re_cus[cus_password];
    $_SESSION['cus_name'] = $re_cus[cus_fullname];
    $result_admin = $db->tableSQL("admin where admin_status=3");
    $rs_admin = mysql_fetch_array($result_admin);
    //ส่งmailให้ผู้ดูแลระบบ
    $strTo = $result_admin[admin_email];
    $strSubject = "สมัครสมาชิก";
    $strHeader = $result_admin[admin_website];
    $strMessage = "เข้าไปตรวจสอบระบบ Back office ด้วยครับ คุณ.{$cus_fullname}.สมัครสมาชิก:.ชื่อเข้าใช้ระบบ{$cus_user}.รหัสผ่าน.{$cus_password}";
    $flgSend = @mail($strTo, $strSubject, $strMessage, $strHeader);
    // @ = No Show Error //
    //ส่งให้สมาชิก
예제 #8
0
파일: index.php 프로젝트: nong053/web-ready
		//alert("ok");
		
		$("input[type=button],input[type=submit]").button();
		var productSearch = ['a1','a2','a3'];
		$("#txtSearch").autocomplete({source:productSearch});
	});
	</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<? $name_title=$_GET['name_title'];//is name to call title
## ทำการ require เอาclass database;
			include_once("class_mysql.php");
			$db = new database();		
 		## set logo area.
$main_menu_id2=$_GET['main_menu_id'];
if($_GET['page']=="" ){
$result_seo = $db->tableSQL("seo where 	seo_id = 5");
			$rs_seo = mysql_fetch_array($result_seo);
			$object_seo_id=$rs_seo['seo_id'];
			$object_seo_tag1=$rs_seo['seo_tag1'];
			$object_seo_tag2=$rs_seo['seo_tag2'];
			$object_seo_tag3=$rs_seo['seo_tag3'];
			$object_seo_keyword=$rs_seo['seo_keyword'];
?>
			
			<title><?php 
echo $object_seo_tag1;
?>
 <?php 
echo $object_seo_tag2;
?>
 <?php 
예제 #9
0
<html>
	<header>
    	<meta http-equiv="content-type" content="text/html charset=utf-8;">
    	<title>Product List</title>
    </header>
    <body>
    	<?
		require("class_mysql.php");
		$db = new database();
		$result = $db->tableSQL("product");
		
		?>
        <table>
        	<thead bgcolor="#FFFFCC">
            	<tr>
                	<th>
                    ลำดับ
                    </th>
                    <th>
                    ชื่อสินค้า
                    </th>
                    <th>
                    ราคาสินค้า
                    </th>
                    <th>
                    สั่งชื้อ
                    </th>
                </tr>
            </thead>
            <tbody>
            <?
예제 #10
0
$query_admin_id="select admin_id from admin where admin_username='******'";
$result_admin_id=$obj_manage_data->select_data_proc($query_admin_id);
$rs_admin=mysql_fetch_array($result_admin_id);
$admin_id=$rs_admin["admin_id"];
//echo"<br>admin_id".$rs_admin["admin_id"]."<br>";

$name_title=$_GET['name_title'];//is name to call title
## ทำการ require เอาclass database;
			include_once("class_mysql.php");
			$db = new database();		
 		## set logo area.
$main_menu_id=$_GET['main_menu_id'];
//echo"main_menu_id".$main_menu_id."<br>";

if($_GET['page']=="home"  or $_GET['page']=="" ){
$result_seo = $db->tableSQL("seo where admin_id='".$admin_id."'");
			$rs_seo = mysql_fetch_array($result_seo);
			$object_seo_id=$rs_seo['seo_id'];
			$object_seo_tag1=$rs_seo['seo_tag1'];
			$object_seo_tag2=$rs_seo['seo_tag2'];
			$object_seo_tag3=$rs_seo['seo_tag3'];
			$object_seo_keyword=$rs_seo['seo_keyword'];
			$name_title="โปรโมชั่นพิเศษ";
?>
			
			<title><?php 
echo $object_seo_tag1;
?>
 <?php 
echo $object_seo_tag2;
?>
예제 #11
0
	font-weight:bold;
}
-->
</style>
<? //session_start(); ob_start(); require("class_mysql.php");?>
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<?


$db = new database();

$cus_id=$_SESSION['cus_id'];
//echo"cus_id$cus_id<br>";
//echo session_id();
$result_customer = $db->tableSQL("customer where cus_id='$cus_id'");
$rs = mysql_fetch_array($result_customer);

//echo"ยืนยันการสั่งซื้อ";


if($_POST['BtnPayment']){
	echo"hello my payment";

	echo"order_sumprice$order_sumprice<br>";
	$strSQL="select * from counter";
	$result = mysql_query($strSQL);
	$result1= mysql_fetch_array($result);
	$counter=$result1[counter];
	$_SESSION['counter'] = $counter;
	$num_run=$_SESSION['counter']; // echo ค่าของ conter
예제 #12
0
<style>
.txtTitle{
padding:5px;
}
a{
text-decoration:none;
	
}
</style>
<?php 
include_once("../class_mysql.php");
$db = new database();
$result=$db->tableSQL("schedule_plan");
?>


<table width="100%" id="tableTv">
	<thead>
		<tr bgcolor="#dddddd">
			<th>
			<div class="txtTitle">
			ลำดับ
			</div>
			</th>
			<th>
			<div class="txtTitle">
			ชื่อรายการ
			</div>
			</th>
			<th>
			<div class="txtTitle">
예제 #13
0
      "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='images/banner_tunnel.jpg' alt='Tunnel'></a><a class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
      "content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
      "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='images/banner_bike.jpg' alt='Bike'></a><a class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
      "content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}, {
      "content": "<div class='slide_inner'><a class='photo_link' href='#'><img class='photo' src='images/banner_paint.jpg' alt='Paint'></a><a class='caption' href='#'>Sample Carousel Pic Goes Here And The Best Part is that...</a></div>",
      "content_button": "<div class='thumb'><img src='images/f2_thumb.jpg' alt='bike is nice'></div><p>Agile Carousel Place Holder</p>"
}]*/
?>

<?php 
include_once "class_mysql.php";
$localPath = "web_design/rchaneltv";
$db = new database();
$result = $db->tableSQL("news where news_cat_id=1");
$i = 0;
while ($rs = mysql_fetch_array($result)) {
    //จัดการกับรูปภาพ
    $thumbnailsPath = "news/1/" . $rs[news_id] . "/thumbnail";
    if (!is_dir($thumbnailsPath)) {
        echo "not found images";
    } else {
        //else
        if ($handle = opendir($thumbnailsPath)) {
            $imagesFiles = array();
            while (false != ($file = readdir($handle))) {
                if ($file != "." && $file != "..") {
                    $thumbnailsFile = $thumbnailsPath . "/" . $file;
                    $fileType = pathinfo($thumbnaisFile);
                    //แสดงpath
예제 #14
0
<?
class database{
	function tableSQL($table)
	{
			include("config.inc.php");
			$strSQL="select * from $table";
			$result=mysql_query($strSQL);
			
			return $result;
		
	}
}
$fc= new database();
$test=$fc->tableSQL("main_menu");
$num=mysql_num_rows($test);
$rs=mysql_fetch_array($test);
echo $rs[main_menu_id];
?>