1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
<?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();?>
|