Server IP : 119.59.102.212 / Your IP : 18.223.33.204 Web Server : Apache/2 System : Linux narin 2.6.32-042stab142.1 #1 SMP Tue Jan 28 23:44:17 MSK 2020 x86_64 User : yangkam ( 1022) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/yangkam/domains/yangkam.go.th/private_html/coremain/module/background/ |
Upload File : |
<?php // Status Package Module $status_module=select_query("status_module","cms_status_module","id","14"); if($status_module[0]!=1) { fieldset_no_module(); } $navig['manage_menu']="เปลี่ยนสีพื้นหลัง / BarHeader"; navigator($navig); echo"<br>"; fieldset_top("เปลี่ยนสีพื้นหลัง / BarHeader"); //#5.3#//if($p_bg_textrun!="") { $bg_textrun=trim($p_bg_textrun); } $bg_textrun = isset($p_bg_textrun) ? $p_bg_textrun : ''; //#5.3#//if($p_up_bg_textrun!="") { $up_bg_textrun=trim($p_up_bg_textrun); } $up_bg_textrun = isset($p_up_bg_textrun) ? $p_up_bg_textrun : ''; //#5.3#//if($p_line_title_table!="") { $line_title_table=trim($p_line_title_table); } $line_title_table = isset($p_line_title_table) ? $p_line_title_table : ''; //#5.3#//if($p_bg_menu!="") { $bg_menu=trim($p_bg_menu); } $bg_menu = isset($p_bg_menu) ? $p_bg_menu : ''; //#5.3#//if($p_update_background!="") { $update_background=trim($p_update_background); } $update_background = isset($p_update_background) ? $p_update_background : ''; //#5.3#//if($p_herder_top!="") { $herder_top=trim($p_herder_top); } $herder_top = isset($p_herder_top) ? $p_herder_top : ''; //#5.3#//if($p_bg_body1!="") { $bg_body1=trim($p_bg_body1); } $bg_body1 = isset($p_bg_body1) ? $p_bg_body1 : ''; $userfile1_name=trim($_FILES['userfile1']['name']); $userfile2_name=trim($_FILES['userfile2']['name']); $userfile3_name=trim($_FILES['userfile3']['name']); // ########### Check Image if($userfile1_name!="") { check_pic($userfile1_name,1); } if($userfile2_name!="") { check_pic($userfile2_name,1); } if($userfile3_name!="") { check_pic($userfile3_name,1); } if ($herder_top != "") { $sql = "UPDATE `cms_main_themes` SET `color` = '$bg_body1' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); $sql = "SELECT * FROM cms_main_themes WHERE `id`= '$_SESSION[themes_]'"; $re = mysql_query($sql); $data = mysql_fetch_array($re); $_SESSION['bg_body1'] = "$data[color]"; // Font Color echo "<center>หากข้อมูลยังไม่เปลี่ยนแปลงให้กดปุ่ม F5 เพื่อ Refresh หน้าจอ</center>"; ?> <script language="JavaScript"> window.opener.location.href='../index.php?mod=manage_menu&path=menu'; window.close(); </script> <?php refresh_data('index.php?mod=manage_background&path=background', 2); // refresh หน้าจอ // include('coremain/footer.php'); } // Upload File 1-3 //********************** ตรวจสอบว่า มีการ Upload File ที่ 1 หรือไม่ if ($userfile1_name != "") { // ชื่อไฟล์ $arr = explode('.', $userfile1_name); $strings = '.' . end($arr); #$strings = substr($userfile1_name, -4); $name1 = "bar1$strings"; $dlink = "$_SESSION[web_name]/theme/$_SESSION[themes_]/" . $name1; $temp_name = $_FILES['userfile1']['tmp_name']; if (is_uploaded_file($_FILES['userfile1']['tmp_name'])) { if (!move_uploaded_file($temp_name, $dlink)) { } } $sql = "UPDATE `cms_main_themes` SET `navigrator` = '$name1' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); } if ($userfile2_name != "") { // ชื่อไฟล์ $arr = explode('.', $userfile2_name); $strings = '.' . end($arr); #$strings = substr($userfile2_name, -4); $name1 = "bar2$strings"; $dlink = "$_SESSION[web_name]/theme/$_SESSION[themes_]/" . $name1; $temp_name = $_FILES['userfile2']['tmp_name']; if (is_uploaded_file($_FILES['userfile2']['tmp_name'])) { if (!move_uploaded_file($temp_name, $dlink)) { } } $sql = "UPDATE `cms_main_themes` SET `title_color` = '$name1' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); } if ($userfile3_name != "") { // ชื่อไฟล์ $arr = explode('.', $userfile3_name); $strings = '.' . end($arr); #$strings = substr($userfile3_name, -4); $name1 = "bar3$strings"; $dlink = "$_SESSION[web_name]/theme/$_SESSION[themes_]/" . $name1; $temp_name = $_FILES['userfile3']['tmp_name']; if (is_uploaded_file($_FILES['userfile3']['tmp_name'])) { if (!move_uploaded_file($temp_name, $dlink)) { } } $sql = "UPDATE `cms_main_themes` SET `bg_list_table` = '$name1' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); } // ################# เปลี่ยน Bg กลาง ####################### if ($up_bg_textrun != "" && $bg_textrun != "") { $sql = "UPDATE `cms_main_themes` SET `bg_textrun` = '$bg_textrun',`heder_color` = '$heder_color' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); msg_update_data(); // ข้อความแก้ไขแล้ว echo "<center>หากข้อมูลยังไม่เปลี่ยนแปลงให้กดปุ่ม F5 เพื่อ Refresh หน้าจอ</center>"; ?> <script language="JavaScript"> window.opener.location.href='../index.php?mod=manage_menu&path=menu'; window.close(); </script> <?php refresh_data('index.php?mod=manage_background&path=background', 2); // refresh หน้าจอ // include('coremain/footer.php'); } // ################# เปลี่ยน Bg เข้ม ####################### if ($up_bg_textrun != "" && $line_title_table != "") { $sql = "UPDATE `cms_main_themes` SET `line_title_table` = '$line_title_table' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); msg_update_data(); // ข้อความแก้ไขแล้ว echo "<center>หากข้อมูลยังไม่เปลี่ยนแปลงให้กดปุ่ม F5 เพื่อ Refresh หน้าจอ</center>"; ?> <script language="JavaScript"> window.opener.location.href='../index.php?mod=manage_menu&path=menu'; window.close(); </script> <?php refresh_data('index.php?mod=manage_background&path=background', 2); // refresh หน้าจอ // include('coremain/footer.php'); } // ################# เปลี่ยน Bg อ่อน ####################### if ($up_bg_textrun != "" && $bg_menu != "") { $sql = "UPDATE `cms_main_themes` SET `bg_menu` = '$bg_menu' WHERE `id`= '$_SESSION[themes_]'"; mysql_query($sql); msg_update_data(); // ข้อความแก้ไขแล้ว echo "<center>หากข้อมูลยังไม่เปลี่ยนแปลงให้กดปุ่ม F5 เพื่อ Refresh หน้าจอ</center>"; ?> <script language="JavaScript"> window.opener.location.href='../index.php?mod=manage_menu&path=menu'; window.close(); </script> <?php refresh_data('index.php?mod=manage_background&path=background', 2); // refresh หน้าจอ // include('coremain/footer.php'); } if ($update_background == 1) { msg_update_data(); // ข้อความแก้ไขแล้ว echo "<center>หากข้อมูลยังไม่เปลี่ยนแปลงให้กดปุ่ม F5 เพื่อ Refresh หน้าจอ</center>"; ?> <script language="JavaScript"> window.opener.location.href='../index.php?mod=manage_background&path=background'; window.close(); </script> <?php refresh_data('index.php?mod=manage_background&path=background', 2); // refresh หน้าจอ // include('coremain/footer.php'); } bar_header("เปลี่ยนสีพื้นกลาง"); ?> <form action="index.php?mod=manage_background&path=background&up_bg_textrun=1" method="post" enctype="multipart/form-data" onSubmit="return checkadd()" name='add'> <table width='100%' border='0' cellspacing='0' align='center' cellpadding='0'> <tr> <td width='50%' align=center><?php print_arr1(); ?> เปลี่ยนสีพื้นกลาง : </td> <td align=left> <input type=button value=" ... "onclick="showColorGrid3('input_field_1','sample_1');"> <INPUT TYPE="text" SIZE="9" id="input_field_1" name="bg_textrun" maxlength=7 value="<?php echo $_SESSION['bg_textrun'] ?>"> <INPUT TYPE="text" SIZE="2" id="sample_1"> </td> </tr> <tr height='59'> <td colspan='2' align='center'><input type='submit' name='icon' value='เปลี่ยนสีพื้นกลาง' onmouseover="this.style.cursor='hand'"></td> </tr> </table> </form> <?php bar_header("เปลี่ยนสีพื้นอ่อน"); ?> <form action="index.php?mod=manage_background&path=background&up_bg_textrun=1" method="post" enctype="multipart/form-data" onSubmit="return checkadd()" name='add'> <table width='100%' border='0' cellspacing='0' align='center' cellpadding='0'> <tr> <td width='50%' align=center><?php print_arr1(); ?> เปลี่ยนสีพื้นอ่อน : </td> <td align=left> <input type=button value=" ... "onclick="showColorGrid3('input_field_3','sample_3');"> <INPUT TYPE="text" SIZE="9" id="input_field_3" maxlength=7 name="bg_menu" value="<?php echo $_SESSION['bg_menu'] ?>"> <INPUT TYPE="text" SIZE="2" id="sample_3"> </td> </tr> <tr height='59'> <td colspan='2' align='center'><input type='submit' name='icon' value='เปลี่ยนสีพื้นอ่อน' onmouseover="this.style.cursor='hand'"></td> </tr> </table> </form> <?php bar_header("เปลี่ยนสีตัวอักษร"); ?> <form action="index.php?mod=manage_background&path=background&herder_top=1" method="post" enctype="multipart/form-data" onSubmit="return checkadd()" name='add'> <table width='100%' border='0' cellspacing='0' align='center' cellpadding='0'> <tr> <td width='50%' align=center><?php print_arr1(); ?> เปลี่ยนสีตัวอักษร : </td> <td align=left> <input type=button value=" ... "onclick="showColorGrid3('input_field_5','sample_5');"> <INPUT TYPE="text" SIZE="9" id="input_field_5" maxlength=7 name="bg_body1" value="<?php echo $_SESSION['bg_body1'] ?>"> <INPUT TYPE="text" SIZE="2" id="sample_5"> </td> </tr> <tr height='59'> <td colspan='2' align='center'><input type='submit' name='icon' value='เปลี่ยนสีตัวอักษร' onmouseover="this.style.cursor='hand'"></td> </tr> </table> </form> <?php bar_header("เปลี่ยน BarHeader"); ?> <form action="index.php?mod=manage_background&path=background&update_background=1" method="post" enctype="multipart/form-data" onSubmit="return checkadd()" name='add'> <table width='100%' border='0' cellspacing='0' align='center' cellpadding='0'> <tr> <td width='20%'> </td> <td width='22%'><?php print_arr1(); ?> เปลี่ยน BarHeader1</td> <td> <input name="userfile1" type="file" size="20"> <?php echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[bar_header1]'>"; ?> </td> </tr> <tr> <td width='20%'> </td> <td width='22%'><?php print_arr1(); ?> เปลี่ยน BarHeader2</td> <td> <input name="userfile2" type="file" size="20"> <?php echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[bar_header2]'>"; ?> </td> </tr> <tr> <td width='20%'> </td> <td width='22%'><?php print_arr1(); ?> เปลี่ยน BarHeader3</td> <td> <input name="userfile3" type="file" size="20"> <?php echo " <img src='$_SESSION[web_name]/theme/$_SESSION[themes_]/$_SESSION[bar_header3]'>"; ?> </td> </tr> <tr height='59'> <td colspan='3' align='center'><input type='submit' name='icon' value='เปลี่ยน BarHeader' onmouseover="this.style.cursor='hand'"></td> </tr> </table> </form> <?php fieldset_down();?>