示例#1
0
<?php

$list_id = $_GET['list_id'];
$bj = new manage_data();
$result = $bj->select_data("schedule_plan where list_id={$list_id}");
$rs = mysql_fetch_array($result);
echo $rs['list_detail'];
示例#2
0
文件: index.php 项目: nong053/condo
session_start();
require "../config.inc.php";
if (isset($_GET['logout'])) {
    session_destroy();
    header("location:../index.php?member_user_url=" . $_SESSION['member_user_url2'] . "");
}
if (!$_SESSION['admin_name']) {
    //กรณี check การloginของ admin
    header("location:../index.php");
}
/*##########ดึง oject มาใช้งาน Start*/
function __autoload($filename)
{
    require_once "../oop/" . $filename . ".php";
}
$obj_manage_data = new manage_data();
/*##########ดึง oject มาใช้งาน End*/
/*################## จัดาร session ผู้ใช้งาน Start*/
$member_user_url = trim($_SESSION['member_user_url2']);
//ทำการ select admin_id ออกมาใช้งาน
$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_id = mysql_fetch_array($result_admin_id);
$_SESSION['member_user_id'] = $rs_admin_id['admin_id'];
$admin_id = $rs_admin_id['admin_id'];
//echo"Member User Url ".$member_user_url."<br>";
//echo"Member User Id ".$_SESSION['member_user_id']."<br>";
$member_user_id = $_SESSION['member_user_id'];
/*################## จัดาร session ผู้ใช้งาน End*/
/*get role  start*/
$query_role = "select web.webre_cat_id as webre_cat_id,webcat.cat_webre_detail as cat_webre_detail\r\nfrom web_register web INNER JOIN webcat_register webcat\r\nON web.webre_cat_id=webcat.cat_webre_id\r\nWHERE admin_id='{$admin_id}' ";
示例#3
0
						<div class="mainBox">
							
								<div class="boxTop">

									<div class="boxTitle">
									กิจกรรม/Update
									
									</div>
								
								</div>
								<div class="boxCenter">
								<table>
								
								
								<?php
									$bj_manage = new manage_data();
									$resultNews=$bj_manage->select_data("news where news_cat_id=2");
									while($rsNews=mysql_fetch_array($resultNews)){
									$news_cat_id=$rsNews[news_cat_id];
									//จัดการกับรูปภาพ
									$thumbnailsPath="news/".$news_cat_id."/".$rsNews[news_id]."/thumbnail/";
										if(!is_dir($thumbnailsPath)){
										
										}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
<?php 
/*
$field_select="webre_id,webre_url,cat_webre_package ,admin_status";
$table_condition="web_register,webcat_register,admin
where web_register.webre_cat_id=webcat_register.cat_webre_id 
and web_register.admin_id=admin.admin_id ";
$result=$obj_manage_data->select_data($table_condition,$field_select);
*/
$webre_id = $_GET['webre_id'];
//echo"webre_id"+$webre_id;
function __autoload($file)
{
    require_once "../oop/" . $file . ".php";
}
$obj_manage_data = new manage_data();
$field_select = "webre_id,webre_url,webre_detail ,webre_start ,webre_end,webre_update ,cat_webre_package,cat_webre_detail ,admin_status,admin_name,admin_surname,admin_username ,admin_password,admin_status,admin_email ,admin_address ,admin_tel";
$table_condition = "web_register,webcat_register,admin\r\nwhere web_register.webre_cat_id=webcat_register.cat_webre_id \r\nand web_register.admin_id=admin.admin_id  and webre_id='{$webre_id}'";
$result = $obj_manage_data->select_data($table_condition, $field_select);
$rs = mysql_fetch_array($result);
$num = mysql_num_rows($result);
//echo"num=$num";
?>
<table>

	<tbody>
	
		<tr>
			<td>
			เว็บไชต์ ID
			</td>
示例#5
0
文件: get_vdo.php 项目: nong053/condo
<?php

$id_youtupe = trim($_GET[id_youtupe]);
$ex_id_youtupe = explode("/", $id_youtupe);
include_once "../../oop/manage_data.php";
$bj_manage = new manage_data();
$result_youtube = $bj_manage->select_data("youtupe where id_youtupe = {$ex_id_youtupe['1']}");
$rs_youtube = mysql_fetch_array($result_youtube);
echo $rs_youtube[embed_youtupe];
</style>
<?php
$id_cat_youtube=(explode("-",$_GET[id_cat_youtube]));
$id_cat_youtube[0];
$id_cat_youtube[1];
//echo $id_cat_youtube[1];


?>
<!-- require new latest vdo -->
						<?php
						function __autoload($filename){
						require_once("oop/".$filename.".php");
						}
						$bj_manage = new manage_data();
						$result_youtube = $bj_manage->select_data("youtupe  where id_cat_youtupe = ".$id_cat_youtube[1]." order by id_youtupe DESC LIMIT 9");
						///$rum_vdo = mysql_num_rows($result_youtube);
						while($rs_youtube = mysql_fetch_array($result_youtube)){
$embed=$rs_youtube[embed_youtupe];
$title_youtupe=$rs_youtube[title_youtupe];
$id_youtupe=$rs_youtube[id_youtupe];
$id_cat_youtupe=$rs_youtube[id_cat_youtupe];


	$thumbnailsPath="youtupe/".$id_cat_youtupe."/".$rs_youtube[id_youtupe]."/thumbnail";
		
		
		if(!is_dir($thumbnailsPath)){
		echo"11".$file;
		}else{ //else
示例#7
0
文件: select.php 项目: nong053/condo
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
function __autoload($filename)
{
    require_once $filename . ".php";
}
$obj_manage_data = new manage_data();
$result_article = $obj_manage_data->select_data("article");
$rs_article = mysql_fetch_array($result_article);
while ($rs_article = mysql_fetch_array($result_article)) {
    echo "<br>article_title" . $rs_article[article_title] . "<br>";
}
示例#8
0
$webre_cat_id=$_POST['webre_cat_id'];
$admin_id=$_POST['admin_id'];
/*
echo "webre_url ".$webre_url."<br>";
echo "webre_detail ".$webre_detail."<br>";
echo "webre_start ".$webre_start."<br>";
echo "webre_end ".$webre_end."<br>";
echo "webre_update ".$webre_update."<br>";
echo "webre_cat_id ".$webre_cat_id."<br>";
echo "admin_id ".$admin_id."<br>";
*/
function __autoload($file){
require_once("../oop/".$file.".php");

}
$obj_manage_data=new manage_data();
if($_POST['action']=="add_data"){

		$table="web_register";
		$field="webre_url  ,webre_detail ,webre_start  ,webre_end ,webre_update ,webre_cat_id  ,admin_id";
		$values="'$webre_url' ,'$webre_detail','$webre_start' ,'$webre_end','$webre_update' ,'$webre_cat_id' ,'$admin_id'";
		$result=$obj_manage_data->insert_data($table,$field,$values);
		if($result){
			echo"{\"result\":\"success\"}";
		}

}//if action


if($_POST['action']=="show_data"){
示例#9
0
<?php

ob_start();
session_start();
/*##########ดึง oject มาใช้งาน Start*/
function __autoload($filename)
{
    require_once "oop/" . $filename . ".php";
}
$obj_manage_data = new manage_data();
/*##########ดึง oject มาใช้งาน End*/
$member_user_url = trim($_SESSION['member_user_url2']);
//ทำการ select admin_id ออกมาจาก admin
$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>";
echo "{$admin_id}";
$timeoutseconds = 300;
//ตั้งเวลาสำหรับเช็คคนออนไลน์ เป็นวินาที 300= 5 นาที
$timestamp = time();
$timeout = $timestamp - $timeoutseconds;
// เมื่อมีการโหลดเวบเพจขึ้นมา จะกำหนดให้เก็บค่า IP ของคนเยี่ยมชม และเวลาที่โหลดหน้าเวบเพจ ลงในฐานข้อมูลทันที
$query = "INSERT INTO useronline VALUES ('{$timestamp}','{$REMOTE_ADDR}','{$PHP_SELF}')";
$obj_manage_data->insert_query($query);
//หลังจากนั้นเช็คว่า คนเยี่ยมชมหมายเลข IP ใด เกินกำหนดเวลาที่ตั้งไว้แล้ว ให้ลบออกฐานข้อมูล
$table = "useronline";
$condition = "{$timestamp}<{$timeout}";
$obj_manage_data->delete_data($table, $condition);
//ให้นับจำนวนเรคคอร์ดในตารางทั้งหมด ที่มี IP ต่างกัน ว่ามีเท่าไหร่ โดย IP เดียวกันให้นับเป็นคนเดียว
示例#10
0
<?php

$news_id = $_GET[news_id];
$bj_manage = new manage_data();
$resultNews = $bj_manage->select_data("news where news_id={$news_id}");
$rsNews = mysql_fetch_array($resultNews);
echo $rsNews[news_detail];
示例#11
0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
function __autoload($filename)
{
    require_once $filename . ".php";
}
$obj_manage_data = new manage_data();
$result_article = @$obj_manage_data->select_data(article);
$rs_article = mysql_fetch_array($result_article);
while ($rs_article = mysql_fetch_array($result_article)) {
    echo "<br>article_title" . $rs_article[article_title] . "<br>";
}
示例#12
0
			</center>
			</td>
		</tr>
<?
$i++;
}
?>
		
	</tbody>
</table>


<!-- edit-->
<?php
include_once("oop/manage_data.php");
$bj = new manage_data();

if($_GET['action_get']=="edit"){
$list_id=$_GET['list_id'];
echo"edit herer";
$result_select=$bj->select_data("schedule_plan where list_id=$list_id");
$rs_select=mysql_fetch_array($result_select);
$list_id = $rs_select['list_id'];
$list_date = $rs_select['list_date'];
$list_hour_from = $rs_select['list_hour_from'];
$list_minute_from = $rs_select['list_minute_from'];
$list_hour_to = $rs_select['list_hour_to'];
$list_minute_to = $rs_select['list_minute_to'];
$list_name = $rs_select['list_name'];
$list_detail = $rs_select['list_detail'];
示例#13
0
    function insert_data($table, $field, $vaule)
    {
        $strSQL = "INSERT INTO {$table} ({$field})VALUES({$vaule})";
        mysql_query($strSQL);
        //$test = "INSERT INTO member()VALUES()";
    }
    function edit_data($table, $setfield, $condition)
    {
        $strSQL = "UPDATE {$table} SET {$setfield} {$condition}";
        mysql_query($strSQL);
        //$test ="UPDATE member set dd='aa' where user_id=100";
    }
    function delete_data($table, $condition)
    {
        $strSQL = "DELETE FROM {$table} {$condition}";
        mysql_query($strSQL);
    }
}
//$obj_connect_mysql= new connect_mysql();
$obj_manage_data = new manage_data();
//@$obj_manage_data->set_host_user_pass_dbname();
$obj_manage_data->set_host_user_pass_dbname("localhost", "root", "010535546", "nnit_db");
//select data
$result_article = $obj_manage_data->select_data("*", "article");
$rs_article = mysql_fetch_array($result_article);
while ($rs_article = mysql_fetch_array($result_article)) {
    echo "<br>article_title" . $rs_article[article_title] . "<br>";
}
//
//insert data
//
示例#14
0
<?php

function __autoload($filename)
{
    require_once $filename . ".php";
}
$obj_manage_data = new manage_data();
$table = "article";
$condition = "article_id='12'";
$obj_manage_data->delete_data($table, $condition);
示例#15
0
            $field = "admin_name ,admin_surname,admin_username ,admin_password,admin_status ,admin_email ,admin_address ,admin_tel";
            $values = "'{$admin_name}' ,'{$admin_surname}','{$admin_username}' ,'{$admin_password}','{$admin_status}' ,'{$admin_email}' ,'{$admin_address}' ,'{$admin_tel}'";
            $result = $obj_manage_data->insert_data($table, $field, $values);
            if ($result) {
                $result_admin = $obj_manage_data->select_data("admin where admin_name='{$admin_name}'");
                $rs_admin = mysql_fetch_array($result_admin);
                echo "{\"admin_id\":\"" . $rs_admin[admin_id] . "\"}";
            }
            //if($result)
        }
    }
    //if($num)
}
if ($_POST['action'] == "edit") {
    function __autoload($file_name)
    {
        require_once "../oop/" . $file_name . ".php";
    }
    $obj_manage_data = new manage_data();
    //relation is one:one
    //echo"{\"result\":\"edit admin\"}";
    $admin_id = $_POST['admin_id'];
    //echo "admin_id $admin_id";
    $table = "admin";
    $setfield = "admin_name='{$admin_name}',admin_surname='{$admin_surname}',admin_username='******',admin_password='******',admin_status='{$admin_status}',admin_email='{$admin_email}',admin_address='{$admin_address}',admin_tel='{$admin_tel}'";
    $condition = "admin_id='{$admin_id}'";
    $result = $obj_manage_data->edit_data($table, $setfield, $condition);
    if ($result) {
        echo "{\"result\":\"success\"}";
    }
}
示例#16
0
/*
	$host=$_SERVER['HTTP_HOST'];
	$userAsUrl = explode(".", $host);
	if($host!="www.nn-it.com"){
		//echo"<script>window.location=\"../index.php?userUrlId=$userAsUrl[1]\"</script>";
		$userUrlId=$userAsUrl;
	}
		$userUrlId=$_GET['userUrlId'];
	
*/

	$userUrlId=$_GET['userUrlId'];
	function __autoload($filename){
		require_once "oop/".$filename.".php";
		}
	$obj_manage_data = new manage_data();
	$result_admin=$obj_manage_data->select_data("admin where admin_username='******'");
	$rs_num=mysql_num_rows($result_admin);
	if($rs_num){
		
		$_SESSION['member_user_url']=$userUrlId;
		//echo"<script>window.location=\"../home.html\"</script>";
		
		header('Location: ../view-home.html');
		//header("Location: ../dispatcher.php?page=$userUrlId");
		//header("Location: ../dispatcher.php?page=home");
		//Usering on hosting
		//echo"<script>window.location=\"../index.php?page=home\"</script>";
	}else{
		echo"<script>alert(\"User can't found.\");</script>";
	}
示例#17
0
文件: select.php 项目: nong053/condo
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
function __autoload($filename)
{
    require_once $filename . ".php";
}
$obj_manage_data = new manage_data();
$result_article = $obj_manage_data->select_data("web_register");
$rs_article = mysql_fetch_array($result_article);
while ($rs_article = mysql_fetch_array($result_article)) {
    echo "<br>article_title" . $rs_article[admin_id] . "<br>";
}
示例#18
0
								ถ่ายทอดสด
									</div>
									<div class="id_youtupe" style="display:none;">
									/1
									</div>
								</div>
								<!--
								<div class="contentYoutube">
								<?=$embed?>
								</div>
								-->
							</div>
							<!-- streaming-->
						<?php
						
						$bj_manage = new manage_data();
						$result_youtube = $bj_manage->select_data("youtupe order by id_youtupe DESC LIMIT 8");
						///$rum_vdo = mysql_num_rows($result_youtube);
						while($rs_youtube = mysql_fetch_array($result_youtube)){
$embed=$rs_youtube[embed_youtupe];
$title_youtupe=$rs_youtube[title_youtupe];
$id_youtupe=$rs_youtube[id_youtupe];
$id_cat_youtupe=$rs_youtube[id_cat_youtupe];

	$thumbnailsPath="youtupe/".$id_cat_youtupe."/".$rs_youtube[id_youtupe]."/thumbnail";
		
		
		if(!is_dir($thumbnailsPath)){
		
		}else{ //else
		if($handle= opendir($thumbnailsPath)){
示例#19
0
<?php

function __autoload($filename)
{
    require_once $filename . ".php";
}
$obj_manage_data = new manage_data();
$table = "article";
$field = "article_name,article_title";
$values = "'nong2','title2'";
$obj_manage_data->insert_data($table, $field, $values);
示例#20
0
<?php
	function __autoload($filename){
	require_once($filename.".php");
	}
	$bj = new manage_data();
	$result=$bj->select_data("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">
			เริ่มเวลา
			</div>
			</th>
			<th>
			<div class="txtTitle">
			จบเวลา
			</div>