예제 #1
0
<style>
#div_preview{
	font-family:Tahoma, Geneva, sans-serif;
	font-size:13px;
}
</style>
<div id="div_preview">
<?


require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	
	$result_preview = $db->selectSQL("content_style");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[content_header];
	echo"preview_object---->$preview_object";
	$img="../object_system/$preview_object";
	if(!$preview_object){
		echo"ไม่มีไฟล์ข้อมูล";
	}else{
	?>
    
    <img src="<?php 
echo $img;
?>
" />
    <a href="preview_content_style.php?del_file=<?php 
echo $img;
예제 #2
0
//ทำการเพิ่มข้อมูลเมื่อมี User ใหม่เข้ามา
if (!$rs_num) {
    $table = "footer_style";
    $field = "admin_id";
    $admin_id = $rs_admin_id['admin_id'];
    $obj_manage_data->insert_data($table, $field, $admin_id);
}
//##### Check table home end #####
//include("fckeditor/fckeditor.php");
$admin_id = $rs_admin_id['admin_id'];
if ($_SESSION['admin_status'] == "3") {
    echo "admin here";
    $admin_id = 1;
}
//Check User and Management by User End
$result_footer = $db->selectSQL("footer_style where admin_id='" . $admin_id . "'");
$rs_footer = mysql_fetch_array($result_footer);
$footer_num = @mysql_num_rows($rs_footer);
$footer_bg = $rs_footer[footer_bg];
$footer_repeat = $rs_footer[footer_repeat];
$footer_color = $rs_footer[footer_color];
?>
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
	background:#efefef;
}
예제 #3
0
	font-family:Tahoma, Geneva, sans-serif;
	font-size:13px;
}
</style>
<div id="div_preview">
<?
echo"test";
require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	$bg_id=$_GET['bg_id'];
	echo"bg_id---->$bg_id";
	$admin_id=$_GET['admin_id'];
	//echo"object_position------->$object_position";
	$result_preview = $db->selectSQL("bg_style where admin_id='$admin_id'");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[bg_name];
	
	echo"preview_object---->$preview_object";
	$img="../object_system/$admin_id/$preview_object";
	if(!$preview_object){
		echo"ไม่มีไฟล์ข้อมูล";
	}else{
	?>
    
    <img src="<?php 
echo $img;
?>
" />
    <a href="preview_style_process.php?del_file=<?php 
예제 #4
0
	background:#efefef;
}
#devtext tr td a{
	color:#000;
	text-decoration:none;

	 
}
</style>

<div id="devtext_title">
จัดการใส่รูปภาพลงบน Laout
<?
require("class_mysql.php");
	$db=new database();
	$result_select_style=$db->selectSQL('select_style');
	$rs_select_style=mysql_fetch_array($result_select_style);
	//echo"select_laout_number:$rs_select_labout[select_laout_number]<br>";
	$select_style_number=$rs_select_labout[select_style_number];
	echo"$select_style_number<br>";
?>
</div>
<br style="clear:both" />
<div id="devtext">
<table>
	<tr>
    	<td>
        <a href="index.php?page=style_system&select_page=picture_style&page_style=bg">
        <img src="../images_system/App_Store.png"  border="0"/><br>
        จัดการภาพพื้นหลัง
        </a>
예제 #5
0
 //--ต้องแก้ไข
 $file_array = explode(".", $file_name);
 $file_1 = $file_array[0];
 $file_2 = $file_array[1];
 $file_1 = strtolower($file_1);
 $file_2 = strtolower($file_2);
 $now = date("dmyihs");
 $file_1 = $file_1 . $now . '.' . $file_2;
 if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
     if (is_dir($path_object)) {
         $object_name = $file_1;
         //echo"object_name$object_name<br>";
         copy($_FILES["content_header"]["tmp_name"], "../object_system/{$admin_id}/" . $object_name);
         //--ต้องแก้ไข
         //echo"sucessfully";
         $result_object = $db->selectSQL("content_style where admin_id='{$admin_id}'");
         $num_object = mysql_num_rows($result_object);
         $rs_object = mysql_fetch_array($result_object);
         $object_name_edit = $rs_object[content_header];
         //--ต้องแก้ไข
         $unlink = "../object_system/{$admin_id}/{$object_name_edit}";
         if ($unlink) {
             @unlink($unlink);
             //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
             //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
         }
         if ($num_object) {
             //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdate
             $strSQL = "UPDATE content_style SET content_header='{$object_name}',content_header_color='{$content_header_color}',content_border_color='{$content_border_color}',content_border_style='{$content_border_style}',content_width='{$content_width}',content_height='{$content_height}',content_font_color='{$content_font_color}',content_bg_color='{$content_bg_color}' where admin_id='{$admin_id}'";
             $query = mysql_query($strSQL);
             if (!$query) {
예제 #6
0
//--ต้องแก้ไข
if ($file_bg) {
    echo "inside";
    $file_array = explode(".", $file_name);
    $file_1 = $file_array[0];
    $file_2 = $file_array[1];
    $file_1 = strtolower($file_1);
    $file_2 = strtolower($file_2);
    $now = date("dmyihs");
    $file_1 = $file_1 . $now . '.' . $file_2;
    if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
        if (is_dir($path_object)) {
            $object_name = $file_1;
            copy($_FILES["footer_bg"]["tmp_name"], "../object_system/{$admin_id}/" . $object_name);
            //--ต้องแก้ไข
            $result_object = $db->selectSQL("footer_style");
            $num_object = mysql_num_rows($result_object);
            echo "num_objec{$num_object}";
            $rs_object = mysql_fetch_array($result_object);
            //$object_position_edit=$rs_object[bg_position];
            $object_name_edit = $rs_object[footer_bg];
            $unlink = "../object_system/{$admin_id}/{$object_name_edit}";
            if ($unlink) {
                @unlink($unlink);
                //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
                //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
            }
            //echo"object_position_edit$object_position_edit";
            //echo"num_object$num_object<br>";
            if ($num_object) {
                //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdateและแก้ไขรูปภาพ
예제 #7
0
 $file_2 = $file_array[1];
 $file_1 = strtolower($file_1);
 $file_2 = strtolower($file_2);
 $now = date("dmyihs");
 $file_1 = $file_1 . $now . '.' . $file_2;
 //echo "file1:= $file_1<br>";
 //echo "file2:= $file_2<br>";
 if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
     //echo"hello $file_2<br>";
     if (is_dir($path_object)) {
         $object_name = $file_1;
         //echo"object_name$object_name<br>";
         copy($_FILES["file_header_bg"]["tmp_name"], "../object_system/" . $object_name);
         //--ต้องแก้ไข
         //echo"sucessfully";
         $result_object = $db->selectSQL("object_system where object_position='{$object_position}'");
         $num_object = mysql_num_rows($result_object);
         $rs_object = mysql_fetch_array($result_object);
         $object_position_edit = $rs_object[object_position];
         $object_name_edit = $rs_object[object_name];
         $unlink = "../object_system/{$object_name_edit}";
         if ($unlink) {
             @unlink($unlink);
             //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
             //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
         }
         //echo"object_position_edit$object_position_edit";
         //echo"num_object$num_object<br>";
         if ($num_object) {
             //check ถ้ามีข้อมูลอยู่แล้วให้ทำการลบของเดิม
             $strSQL = "UPDATE object_system SET object_name='{$object_name}',object_position='{$object_position}',object_color='{$object_color}',object_width='{$object_width}',object_height='{$object_height}' where object_position='{$object_position_edit}'";
예제 #8
0
파일: style_box.php 프로젝트: nong053/condo
//ทำการเพิ่มข้อมูลเมื่อมี User ใหม่เข้ามา
if (!$rs_num) {
    $table = "box_style";
    $field = "admin_id";
    $values = $rs_admin_id['admin_id'];
    $obj_manage_data->insert_data($table, $field, $values);
}
//##### Check table home end #####
//include("fckeditor/fckeditor.php");
$values = $rs_admin_id['admin_id'];
if ($_SESSION['admin_status'] == "3") {
    echo "admin here";
    $values = 1;
}
//Check User and Management by User End
$result_box = $db->selectSQL("box_style where admin_id='" . $values . "'");
$rs_box = mysql_fetch_array($result_box);
$box_num = mysql_num_rows($result_box);
$box_header = $rs_box[box_header];
$box_header_color = $rs_box[box_header_color];
$box_border_color = $rs_box[box_border_color];
$box_border_style = $rs_box[box_border_style];
$box_color_bg = $rs_box[box_color_bg];
$box_color = $rs_box[box_color];
$box_color_over = $rs_box[box_color_over];
$box_color_overed = $rs_box[box_color_overed];
$box_font_color = $rs_box[box_font_color];
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--สี-->
<script language=JavaScript src="javascript/picker.js"></script>
예제 #9
0
<? ob_start();
$db=new database();
?>
<?php 
//require("class_mysql.php");

$result_plugin= $db->selectSQL("plugin_on_web");
$rs_plugin=mysql_fetch_array($result_plugin);
$plugint_num=mysql_num_rows($result_plugin);

$plugin_code=$rs_plugin[plugin_code];
$plugin_name=$rs_plugin[plugin_name];
$plugin_position=$rs_plugin[plugin_position];
$plugin_status=$rs_plugin[plugin_status];
$plugin_important=$rs_plugin[plugin_important];

?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!--สี-->
<script language=JavaScript src="javascript/picker.js"></script>
<!--สี-->
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
	background:#efefef;
}
#devtext a{
예제 #10
0
<? ob_start();
$db=new database();
?>
<?php 
//require("class_mysql.php");
$result_footer = $db->selectSQL("footer_style");
$rs_footer = mysql_fetch_array($result_footer);
$footer_num = @mysql_num_rows($rs_footer);
$footer_bg = $rs_footer[footer_bg];
$footer_repeat = $rs_footer[footer_repeat];
$footer_color = $rs_footer[footer_color];
?>
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
	background:#efefef;
}
#devtext a{
	color:#000;
	text-decoration:none;

	 
}
</style>
<!-- CKE-->
<script type="text/javascript" src="../ckeditor/ckeditor.js"></script>
<!-- CKE-->
예제 #11
0
<? ob_start();
$db=new database();
?>
<?php 
//require("class_mysql.php");
$result_bg = $db->selectSQL("bg_style");
$rs_bg = mysql_fetch_array($result_bg);
$bg_num = @mysql_num_rows($rs_bg);
$bg_name = $rs_bg[bg_name];
$bg_repeat = $rs_bg[bg_repeat];
$bg_position = $rs_bg[bg_position];
$bg_color = $rs_bg[bg_color];
$bg_web_color = $rs_bg[bg_web_color];
?>
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
	background:#efefef;
}
#devtext a{
	color:#000;
	text-decoration:none;

	 
}
</style>
<!-- CKE-->
예제 #12
0
<style>
#div_preview{
	font-family:Tahoma, Geneva, sans-serif;
	font-size:13px;
}
</style>
<div id="div_preview">
<?
$admin_id=$_GET['admin_id'];
require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	$slide_position=$_GET['slide_position'];
	//echo"object_position------->$object_position";
	$result_preview = $db->selectSQL("slide_picture where slide_position='$slide_position' and admin_id='$admin_id'");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[slide_picture_object];
	echo"preview_object---->$preview_object";
	$img="../slide_picture/$admin_id/$preview_object";
	echo"<br>$img";
	if(!$preview_object){
		echo"ไม่มีไฟล์ข้อมูล";
	}else{
	?>
    
    <img src="<?php 
echo $img;
?>
" />
    <a href="preveiw_slide.php?del_file=<?php 
예제 #13
0
 //--ต้องแก้ไข
 $file_array = explode(".", $file_name);
 $file_1 = $file_array[0];
 $file_2 = $file_array[1];
 $file_1 = strtolower($file_1);
 $file_2 = strtolower($file_2);
 $now = date("dmyihs");
 $file_1 = $file_1 . $now . '.' . $file_2;
 if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
     if (is_dir($path_object)) {
         $object_name = $file_1;
         //echo"object_name$object_name<br>";
         copy($_FILES["button_bg"]["tmp_name"], "../object_system/" . $object_name);
         //--ต้องแก้ไข
         //echo"sucessfully";
         $result_object = $db->selectSQL("button_style");
         $num_object = mysql_num_rows($result_object);
         $rs_object = mysql_fetch_array($result_object);
         $object_name_edit = $rs_object[button_bg];
         //--ต้องแก้ไข
         $unlink = "../object_system/{$object_name_edit}";
         if ($unlink) {
             @unlink($unlink);
             //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
             //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
         }
         if ($num_object) {
             //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdate
             $strSQL = "UPDATE button_style SET button_bg='{$object_name}',button_bg_color='{$button_bg_color}'";
             $query = mysql_query($strSQL);
             if (!$query) {
예제 #14
0
<? ob_start();
$db=new database();
?>
<?php 
//require("class_mysql.php");
$result_intro = $db->selectSQL("intro_style");
$rs_intro = mysql_fetch_array($result_intro);
$intro_num = @mysql_num_rows($rs_intro);
$intro_bg = $rs_intro[intro_bg];
$intro_repeat = $rs_intro[intro_repeat];
$intro_color = $rs_intro[intro_color];
$intro_detail = $rs_intro[intro_detail];
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
	background:#efefef;
}
#devtext a{
	color:#000;
	text-decoration:none;

	 
}
</style>
<!-- CKE-->
예제 #15
0
	color:#000;
	text-decoration:none;

	 
}
</style>

<div id="devtext_title">
ภาพสไลด์
</div>
<br style="clear:both">
<div id="box_style">
<div id="box_style_l" style="float:left">
<?php 
//require("class_mysql.php");
$result_slide_1 = $db->selectSQL("slide_picture  where slide_position='1'");
$rs_slide_1 = mysql_fetch_array($result_slide_1);
$slide_num_1 = mysql_num_rows($result_slide_1);
$slide_picture_object_1 = $rs_slide_1[slide_picture_object];
$slide_picture_link_1 = $rs_slide_1[slide_picture_link];
$result_slide_2 = $db->selectSQL("slide_picture where slide_position='2'");
$rs_slide_2 = mysql_fetch_array($result_slide_2);
$slide_num_2 = mysql_num_rows($result_slide_2);
$slide_picture_object_2 = $rs_slide_2[slide_picture_object];
$slide_picture_link_2 = $rs_slide_2[slide_picture_link];
$result_slide_3 = $db->selectSQL("slide_picture  where slide_position='3'");
$rs_slide_3 = mysql_fetch_array($result_slide_3);
$slide_num_3 = mysql_num_rows($result_slide_3);
$slide_picture_object_3 = $rs_slide_3[slide_picture_object];
$slide_picture_link_3 = $rs_slide_3[slide_picture_link];
?>
예제 #16
0
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?
require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	$object_position=$_GET['object_position'];
	//echo"object_position$object_position";
	$result_preview = $db->selectSQL("object_system where object_position='$object_position'");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[object_name];
	echo"preview_object$preview_object";
	$img="../object_system/$preview_object";
	?>
    <img src="<?php 
echo $img;
?>
" />
    <a href="#">ลบไฟลล์นี้</a>
    <?
	
	
}
?>
예제 #17
0
$file_name = $file_bg;
//--ต้องแก้ไข
if ($file_bg) {
    $file_array = explode(".", $file_name);
    $file_1 = $file_array[0];
    $file_2 = $file_array[1];
    $file_1 = strtolower($file_1);
    $file_2 = strtolower($file_2);
    $now = date("dmyihs");
    $file_1 = $file_1 . $now . '.' . $file_2;
    if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
        if (is_dir($path_object)) {
            $object_name = $file_1;
            copy($_FILES["bg_picture"]["tmp_name"], "../object_system/" . $object_name);
            //--ต้องแก้ไข
            $result_object = $db->selectSQL("bg_style");
            $num_object = mysql_num_rows($result_object);
            $rs_object = mysql_fetch_array($result_object);
            $object_position_edit = $rs_object[bg_position];
            $object_name_edit = $rs_object[bg_name];
            $unlink = "../object_system/{$object_name_edit}";
            if ($unlink) {
                @unlink($unlink);
                //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
                //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
            }
            //echo"object_position_edit$object_position_edit";
            //echo"num_object$num_object<br>";
            if ($num_object) {
                //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdate
                $strSQL = "UPDATE bg_style SET bg_name='{$object_name}',bg_repeat='{$bg_repeat}',bg_position='{$bg_position}',bg_color='{$bg_color}',bg_web_color='{$bg_web_color}'";
예제 #18
0
<style>
#div_preview{
	font-family:Tahoma, Geneva, sans-serif;
	font-size:13px;
}
</style>
<div id="div_preview">
<?
echo"test";
require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	
	
	$result_preview = $db->selectSQL("footer_style");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[footer_bg];
	echo"preview_object---->$preview_object";
	$img="../object_system/$preview_object";
	if(!$preview_object){
		echo"ไม่มีไฟล์ข้อมูล";
	}else{
	?>
    
    <img src="<?php 
echo $img;
?>
" />
    <a href="preview_footer_style.php?del_file=<?php 
echo $img;
예제 #19
0
    $obj_manage_data->insert_data($table, $field, $values);
    //add recode header_banner
    $table = "object_system";
    $field = "admin_id,object_position";
    $values = " '" . $admin_id . "','header_banner'";
    $obj_manage_data->insert_data($table, $field, $values);
}
//##### Check table home end #####
//include("fckeditor/fckeditor.php");
$values = $rs_admin_id['admin_id'];
if ($_SESSION['admin_status'] == "3") {
    $values = 1;
}
//Check User and Management by User End
//counter Background
$result_counter_bg = $db->selectSQL("object_system where object_position='counter_bg' and admin_id='" . $values . "'");
$rs_counter_bg = mysql_fetch_array($result_counter_bg);
$counter_num = mysql_num_rows($result_counter_bg);
$counter_bg_color = $rs_counter_bg[object_color];
$counter_bg_width = $rs_counter_bg[object_width];
$counter_bg_height = $rs_counter_bg[object_height];
//Title top Background
$result_header_title_bg = $db->selectSQL("object_system where object_position='header_title_bg' and admin_id='" . $values . "'");
$rs_header_title_bg = mysql_fetch_array($result_header_title_bg);
$header_title_num = mysql_num_rows($result_header_title_bg);
$header_title_bg_color = $rs_header_title_bg[object_color];
$header_title_bg_width = $rs_header_title_bg[object_width];
$header_title_bg_height = $rs_header_title_bg[object_height];
$result_header_bg = $db->selectSQL("object_system where object_position='header_bg' and admin_id='" . $values . "'");
$rs_header_bg = mysql_fetch_array($result_header_bg);
$header_num = mysql_num_rows($result_header_bg);
예제 #20
0
//--ต้องแก้ไข
if ($file_bg) {
    echo "inside";
    $file_array = explode(".", $file_name);
    $file_1 = $file_array[0];
    $file_2 = $file_array[1];
    $file_1 = strtolower($file_1);
    $file_2 = strtolower($file_2);
    $now = date("dmyihs");
    $file_1 = $file_1 . $now . '.' . $file_2;
    if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
        if (is_dir($path_object)) {
            $object_name = $file_1;
            copy($_FILES["intro_bg"]["tmp_name"], "../object_system/" . $object_name);
            //--ต้องแก้ไข
            $result_object = $db->selectSQL("intro_style");
            $num_object = mysql_num_rows($result_object);
            echo "num_objec{$num_object}";
            $rs_object = mysql_fetch_array($result_object);
            //$object_position_edit=$rs_object[bg_position];
            $object_name_edit = $rs_object[intro_bg];
            $unlink = "../object_system/{$object_name_edit}";
            if ($unlink) {
                @unlink($unlink);
                //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
                //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
            }
            //echo"object_position_edit$object_position_edit";
            //echo"num_object$num_object<br>";
            if ($num_object) {
                //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdate
예제 #21
0
<?
$i++;
}
?>

</table>

<?
if($action=="edit"){
	$id_youtupe=$_GET['id_youtupe'];
	//echo"action$action";
	//echo"id_youtupe";
	require("class_mysql.php");
	$db = new database();
	$result = $db->selectSQL("youtupe where id_youtupe='$id_youtupe'");
	$rs=mysql_fetch_array($result);
	$vdo=$rs[embed_youtupe];
	$title_vdo=$rs[title_youtupe];
	
	$submit="แก้ไขข้อมูล";
	$action="edit";
}else{
	$submit="เพิ่มข้อมูล";
	$vdo="";
	$title_vdo="";
	$action="add";
}
?>

<form method="post" action="action_youtube.php" enctype="multipart/form-data">
예제 #22
0
//ทำการเพิ่มข้อมูลเมื่อมี User ใหม่เข้ามา
if (!$rs_num) {
    $table = "intro_style";
    $field = "admin_id";
    $values = $rs_admin_id['admin_id'];
    $obj_manage_data->insert_data($table, $field, $values);
}
//##### Check table home end #####
//include("fckeditor/fckeditor.php");
$values = $rs_admin_id['admin_id'];
if ($_SESSION['admin_status'] == "3") {
    echo "admin here";
    $values = 1;
}
//Check User and Management by User End
$result_intro = $db->selectSQL("intro_style where admin_id='" . $values . "'");
$rs_intro = mysql_fetch_array($result_intro);
$intro_num = @mysql_num_rows($rs_intro);
$intro_bg = $rs_intro[intro_bg];
$intro_repeat = $rs_intro[intro_repeat];
$intro_color = $rs_intro[intro_color];
$intro_detail = $rs_intro[intro_detail];
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
예제 #23
0
 //--ต้องแก้ไข
 $file_array = explode(".", $file_name);
 $file_1 = $file_array[0];
 $file_2 = $file_array[1];
 $file_1 = strtolower($file_1);
 $file_2 = strtolower($file_2);
 $now = date("dmyihs");
 $file_1 = $file_1 . $now . '.' . $file_2;
 if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
     if (is_dir($path_object)) {
         $object_name = $file_1;
         //echo"object_name$object_name<br>";
         copy($_FILES["content_header"]["tmp_name"], "../object_system/" . $object_name);
         //--ต้องแก้ไข
         //echo"sucessfully";
         $result_object = $db->selectSQL("content_style");
         $num_object = mysql_num_rows($result_object);
         $rs_object = mysql_fetch_array($result_object);
         $object_name_edit = $rs_object[content_header];
         //--ต้องแก้ไข
         $unlink = "../object_system/{$object_name_edit}";
         if ($unlink) {
             @unlink($unlink);
             //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
             //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
         }
         if ($num_object) {
             //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdate
             $strSQL = "UPDATE content_style SET content_header='{$object_name}',content_header_color='{$content_header_color}',content_border_color='{$content_border_color}',content_border_style='{$content_border_style}',content_width='{$content_width}',content_height='{$content_height}',content_font_color='{$content_font_color}',content_bg_color='{$content_bg_color}'";
             $query = mysql_query($strSQL);
             if (!$query) {
예제 #24
0
</style>
<div id="devtext_title">
เลือกLaout
</div>
<?
$select_laout=$_POST['select_laout'];
if($select_laout){
//echo"select_laout$select_laout";
//$strSQL="INSERT INTO select_style(select_style_number)VALUES($select_laout)";
$strSQL="UPDATE select_style SET select_style_number='$select_laout' where select_style_id='1'";
mysql_query($strSQL);

}else{
 include("class_mysql.php");
 $db= new database();
 $result_select=$db->selectSQL("select_style");
 $rs_select=mysql_fetch_array($result_select);
 $select_laout=$rs_select[select_style_number];	
}


switch($select_laout){
	case"1":$checked1="checked";break;
	case"2":$checked2="checked";break;
	case"3":$checked3="checked";break;
	case"4":$checked4="checked";break;
	case"5":$checked5="checked";break;
	case"6":$checked6="checked";break;
}
?>
예제 #25
0
 //echo"object_position$object_position<br>";
 $file_name = $file_slide1;
 //--ต้องแก้ไข
 //echo"file:$file_name<br>";
 $file_array = explode(".", $file_name);
 $file_1 = $file_array[0];
 $file_2 = $file_array[1];
 $file_1 = strtolower($file_1);
 $file_2 = strtolower($file_2);
 $now = date("dmyihs");
 $file_1 = $file_1 . $now . '.' . $file_2;
 //echo "file1:= $file_1<br>";
 //echo "file2:= $file_2<br>";
 if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg") {
     //echo"hello $file_2<br>";
     $result_object = $db->selectSQL("slide_picture where slide_position='{$slide_position_1}' and admin_id='{$admin_id}'");
     $num_object = mysql_num_rows($result_object);
     $rs_object = mysql_fetch_array($result_object);
     $slide_position_edit = $rs_object[slide_position];
     $slide_picture_object_edit = $rs_object[slide_picture_object];
     if (is_dir($path_object)) {
         $unlink = "../slide_picture/{$admin_id}/{$slide_picture_object_edit}";
         if ($unlink) {
             @unlink($unlink);
             //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
             //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
         }
         $object_name = "work1.png";
         if (trim($_FILES["file_slide1"]["tmp_name"]) != "") {
             $date = date("d-m-y-H-i-s");
             $rand = rand(1, 1000);
 //--ต้องแก้ไข
 $file_name = $file_counter_bg;
 //--ต้องแก้ไข
 $file_array = explode(".", $file_name);
 $file_1 = $file_array[0];
 $file_2 = $file_array[1];
 $file_1 = strtolower($file_1);
 $file_2 = strtolower($file_2);
 $now = date("dmyihs");
 $file_1 = $file_1 . $now . '.' . $file_2;
 if ($file_2 == "jpg" or $file_2 == "gif" or $file_2 == "png" or $file_2 == "jpeg" or $file_2 == "swf") {
     if (is_dir($path_object)) {
         $object_name = $file_1;
         copy($_FILES["file_counter_bg"]["tmp_name"], "../object_system/{$admin_id}/" . $object_name);
         //--ต้องแก้ไข
         $result_object = $db->selectSQL("object_system where object_position='{$object_position}' and admin_id='{$admin_id}'");
         $num_object = mysql_num_rows($result_object);
         $rs_object = mysql_fetch_array($result_object);
         $object_position_edit = $rs_object[object_position];
         $object_name_edit = $rs_object[object_name];
         $unlink = "../object_system/{$admin_id}/{$object_name_edit}";
         if ($unlink) {
             @unlink($unlink);
             //@ไม่ต้องการให้มันฟอ้งถ้าไม่มีไฟลล์ให้ลบ
             //file_exists();ใช้ function นี้ตรวจสอบก่อนว่ามีไฟลล์ใหลบมั้ย
         }
         //echo"object_position_edit$object_position_edit";
         if ($num_object) {
             //check ถ้ามีข้อมูลอยู่แล้วให้ทำการUpdate
             $strSQL = "UPDATE object_system SET object_name='{$object_name}',object_position='{$object_position}',object_color='{$object_color}',object_width='{$object_width}',object_height='{$object_height}' where object_position='{$object_position_edit}' and admin_id='{$admin_id}'";
             $query = mysql_query($strSQL);
예제 #27
0
	border-bottom:#dedede solid 1px;
	background:#efefef;
}
#devtext a{
	color:#000;
	text-decoration:none;

	 
}
</style>

<div id="box_style">
<div id="box_style_l" style="float:left">
<?php 
//require("class_mysql.php");
$result_header_bg = $db->selectSQL("object_system where object_position='header_bg'");
$rs_header_bg = mysql_fetch_array($result_header_bg);
$header_num = mysql_num_rows($result_header_bg);
$header_bg_color = $rs_header_bg[object_color];
$header_bg_width = $rs_header_bg[object_width];
$header_bg_height = $rs_header_bg[object_height];
$result_header_logo = $db->selectSQL("object_system where object_position='header_logo'");
$rs_header_logo = mysql_fetch_array($result_header_logo);
$header_logo_color = $rs_header_logo[object_color];
$header_logo_width = $rs_header_logo[object_width];
$header_logo_height = $rs_header_logo[object_height];
$result_header_banner = $db->selectSQL("object_system where object_position='header_banner'");
$rs_header_banner = mysql_fetch_array($result_header_banner);
$header_banner_color = $rs_header_banner[object_color];
$header_banner_width = $rs_header_banner[object_width];
$header_banner_height = $rs_header_banner[object_height];
예제 #28
0
파일: style_bg.php 프로젝트: nong053/condo
$rs_admin_id = mysql_fetch_array($result_admin_id);
//ทำการเพิ่มข้อมูลเมื่อมี User ใหม่เข้ามา
if (!$rs_num) {
    $table = "bg_style";
    $field = "admin_id";
    $admin_id = $rs_admin_id['admin_id'];
    $obj_manage_data->insert_data($table, $field, $admin_id);
}
//##### Check table home end #####
//include("fckeditor/fckeditor.php");
$admin_id = $rs_admin_id['admin_id'];
if ($_SESSION['admin_status'] == "3") {
    echo "admin here";
    $admin_id = 1;
}
$result_bg = $db->selectSQL("bg_style where admin_id='" . $admin_id . "'");
$rs_bg = mysql_fetch_array($result_bg);
$bg_num = @mysql_num_rows($rs_bg);
$bg_name = $rs_bg[bg_name];
$bg_repeat = $rs_bg[bg_repeat];
$bg_position = $rs_bg[bg_position];
$bg_color = $rs_bg[bg_color];
$bg_web_color = $rs_bg[bg_web_color];
?>
<style>
#devtext_title{	
	padding:5px;
	font-weight:bold;
	font-size:13px;
	border-top:#dedede solid 1px;
	border-bottom:#dedede solid 1px;
예제 #29
0
<style>
#div_preview{
	font-family:Tahoma, Geneva, sans-serif;
	font-size:13px;
}
</style>
<div id="div_preview">
<?
echo"hello";
$button=$_GET['button'];
require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	
	$result_preview = $db->selectSQL("button_style");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[$button];
	echo"preview_object---->$preview_object";
	$img="../object_system/$preview_object";
	if(!$preview_object){
		echo"ไม่มีไฟล์ข้อมูล";
	}else{
	?>
    
    <img src="<?php 
echo $img;
?>
" />
    <a href="preview_button_style.php?del_file=<?php 
echo $img;
예제 #30
0
<style>
#div_preview{
	font-family:Tahoma, Geneva, sans-serif;
	font-size:13px;
}
</style>
<div id="div_preview">
<?
echo"test";
require("class_mysql.php");
$db=new database();
if($_GET['want']=="preview"){
	
	$bg_id=$_GET['bg_id'];
	//echo"object_position------->$object_position";
	$result_preview = $db->selectSQL("bg_style where bg_id='$bg_id'");
	$rs_preview=mysql_fetch_array($result_preview);
	$preview_object=$rs_preview[bg_name];
	echo"preview_object---->$preview_object";
	$img="../object_system/$preview_object";
	if(!$preview_object){
		echo"ไม่มีไฟล์ข้อมูล";
	}else{
	?>
    
    <img src="<?php 
echo $img;
?>
" />
    <a href="preview_style_process.php?del_file=<?php 
echo $img;