Esempio n. 1
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("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>";
}
Esempio n. 2
0
</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
		if($handle= opendir($thumbnailsPath)){
Esempio n. 3
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'];
Esempio n. 4
0
     require_once "../oop/" . $file_name . ".php";
 }
 /*echo"admin_name".$admin_name."<br>";
 echo"admin_surname".$admin_surname."<br>";*/
 //echo"admin_username".$admin_username."<br>";
 /*echo"admin_password".$admin_password."<br>";
 echo"admin_status".$admin_status."<br>";
 echo"admin_email".$admin_email."<br>";
 echo"admin_address".$admin_address."<br>";
 echo"dmin_tel".$dmin_tel."<br>";
 */
 $obj_manage_data = new manage_data();
 $field_select = "admin_username";
 //check user duplicate
 $table_condition = "admin where admin_username='******'";
 $result_select_web = $obj_manage_data->select_data($table_condition, $field_select);
 $num = mysql_num_rows($result_select_web);
 //check url duplicate
 $field_select_url = "webre_url";
 $table_condition_url = "web_register where webre_url='{$webre_url}'";
 $result_select_web_url = $obj_manage_data->select_data($table_condition_url, $field_select_url);
 $num_url = mysql_num_rows($result_select_web_url);
 if ($num) {
     echo "{\"result\":\"user_duplicate\"}";
 } else {
     if ($num_url) {
         echo "{\"result\":\"url_duplicate\"}";
     } else {
         $table = "admin";
         $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}'";
Esempio n. 5
0
<?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];
Esempio n. 6
0
							
								<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
													$fileType = strtolower($fileType['extension']);//แสดงpathพร้อม แสดงนามสกุล
Esempio n. 7
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)){
		$imagesFiles = array();
Esempio n. 8
0
$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>
			<td>
			<?php 
echo $rs[webre_id];
Esempio n. 9
0
	echo"<script>window.location=\"index.php?page=tv_system\";</script>";
	}else{
	
	echo"<script>window.location=\"index.php?page=tv_system\";</script>";
	}
		
}
if($_POST['action_post']=="edit"){
	include("oop/manage_data.php");
	
	$bj_manage_data = new manage_data();
	$table="schedule_plan";
	$list_id=$_POST['list_id'];
	$condition="list_id=$list_id";
	echo "list_id $list_id";
	$result_select=$bj_manage_data->select_data("schedule_plan where list_id=$list_id");
	$rs_select=mysql_fetch_array($result_select);
	//echo "list_picture".$rs_select[list_picture];
	
	
	if(!$result){
	echo "error".mysql_error();
	}else{
	@unlink("../schedule_plan/$rs_select[list_picture]");
	echo"<script>window.location=\"index.php?page=tv_system\";</script>";
	}



//manage image
	$rand=rand(1,10000);
Esempio n. 10
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>";
	}
	
Esempio n. 11
0
		$result=$obj_manage_data->insert_data($table,$field,$values);
		if($result){
			echo"{\"result\":\"success\"}";
		}

}//if action


if($_POST['action']=="show_data"){


	$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  group by webre_url";
	$result=$obj_manage_data->select_data($table_condition,$field_select);
	

	$i=1;
	while($rs=mysql_fetch_array($result)){
	?>
    <tr>
    	<td>
        <center>
        <?=$i?>
        </center>
        </td>
        <td>
        <?=$rs[webre_url]?>
        </td>
        <td>
Esempio n. 12
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>";
}
Esempio n. 13
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];
Esempio n. 14
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
//
Esempio n. 15
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>