SHOW:
|
|
- or go back to the newest paste.
1 | - | <?php |
1 | + | <?php |
2 | ||
3 | - | mysql_connect("localhost","root","irfan"); |
3 | + | mysql_connect("localhost","root","irfan"); |
4 | - | mysql_select_db("alumni"); |
4 | + | mysql_select_db("alumni"); |
5 | ||
6 | - | include "menu.php"; |
6 | + | |
7 | ||
8 | ?> | |
9 | ||
10 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
11 | <head> | |
12 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> | |
13 | <title>Untitled Document</title> | |
14 | ||
15 | <style type="text/css"> | |
16 | <!-- | |
17 | --> | |
18 | <!-- | |
19 | body { | |
20 | background-image: url(../../FINAL PHP/admin/image/bkg.png); | |
21 | background-repeat: no-repeat; | |
22 | background-attachment: fixed; | |
23 | } | |
24 | //--> | |
25 | </style> | |
26 | - | <script> |
26 | + | <script> |
27 | $(document).ready(function(){ | |
28 | $.validator.addMethod("username", function(value, element) { | |
29 | return this.optional(element) || /^[a-z0-9\_]+$/i.test(value); | |
30 | }, "Username must contain only letters, numbers, or underscore."); | |
31 | ||
32 | $("#regForm").validate(); | |
33 | }); | |
34 | </script> | |
35 | </head> | |
36 | ||
37 | <body > | |
38 | - | <div id="content"> |
38 | + | <div id="content"> |
39 | - | <h2> |
39 | + | <h2> |
40 | - | <? |
40 | + | <? |
41 | - | require("config.php"); |
41 | + | require("config.php"); |
42 | - | |
42 | + | |
43 | - | |
43 | + | $stat = $_GET[stat] ; |
44 | if($_POST) | |
45 | - | $stat = $_REQUEST[stat] ; |
45 | + | { |
46 | - | $no_ijazah = $_REQUEST[no_ijazah]; |
46 | + | |
47 | - | $nis = $_REQUEST[nis] ; |
47 | + | $no_ijazah = $_POST[no_ijazah]; |
48 | - | $nama = $_REQUEST[nama] ; |
48 | + | $nis = $_POST[nis] ; |
49 | - | $tmp_lahir = $_REQUEST[tmp_lahir] ; |
49 | + | $nama = $_POST[nama] ; |
50 | - | $tgl_lahir = $_REQUEST[tgl_lahir] ; |
50 | + | $tmp_lahir = $_POST[tmp_lahir] ; |
51 | - | $jenis_kelamin = $_REQUEST[jenis_kelamin] ; |
51 | + | $tgl_lahir = $_POST[tgl_lahir] ; |
52 | - | $agama = $_REQUEST[agama] ; |
52 | + | $jenis_kelamin = $_POST[jenis_kelamin] ; |
53 | - | $pekerjaan = $_REQUEST[pekerjaan] ; |
53 | + | $agama = $_POST[agama] ; |
54 | - | $no_hp = $_REQUEST[no_hp] ; |
54 | + | $pekerjaan = $_POST[pekerjaan] ; |
55 | - | $email = $_REQUEST[email] ; |
55 | + | $no_hp = $_POST[no_hp] ; |
56 | - | $password=md5(trim($_POST['password'])); |
56 | + | $email = $_POST[email] ; |
57 | - | $jurusan = $_REQUEST[jurusan] ; |
57 | + | $password=md5(trim($_POST['password'])); |
58 | - | $tahun_lulus = $_REQUEST[tahun_lulus] ; |
58 | + | $jurusan = $_POST[jurusan] ; |
59 | - | $alamat = $_REQUEST[alamat] ; |
59 | + | $tahun_lulus = $_POST[tahun_lulus] ; |
60 | - | $provinsi = $_REQUEST[provinsi] ; |
60 | + | $alamat = $_POST[alamat] ; |
61 | - | $kabupaten = $_REQUEST[kabupaten] ; |
61 | + | $provinsi = $_POST[provinsi] ; |
62 | - | $kecamatan = $_REQUEST[kecamatan] ; |
62 | + | $kabupaten = $_POST[kabupaten] ; |
63 | - | $desa = $_REQUEST[desa] ; |
63 | + | $kecamatan = $_POST[kecamatan] ; |
64 | - | |
64 | + | $desa = $_POST[desa] ; |
65 | } | |
66 | ||
67 | ||
68 | - | $sts = $stat ; |
68 | + | |
69 | $sts = $stat ; | |
70 | if ($sts == "" or $sts == 0 ) | |
71 | { | |
72 | ?> | |
73 | </h2> | |
74 | <h2 align="center"> </h2> | |
75 | - | <form action="" method="post" enctype="multipart/form-data" name="input" id="input"> |
75 | + | |
76 | <form action="daftar.php?stat=1" method="post" enctype="multipart/form-data" name="input" id="input"> | |
77 | - | <tr> |
77 | + | |
78 | <tr> | |
79 | <td width="200"><strong>Nomor Ijazah</strong></td> | |
80 | <td width="703">: | |
81 | <input type="text" name="no_ijazah" size="20" maxlength="30" id="no_ijazah" /></td> | |
82 | - | <tr> |
82 | + | |
83 | <tr> | |
84 | <td><strong>Nis</strong></td> | |
85 | <td>: | |
86 | <input type="text" name="nis" size="30" maxlength="30" id="nis" /></td> | |
87 | - | <tr> |
87 | + | |
88 | <tr> | |
89 | - | <td>: |
89 | + | |
90 | <td>: | |
91 | <input type="text" name="nama" size="40" maxlength="30" id="nama" /></td> | |
92 | </tr> | |
93 | <tr> | |
94 | - | <td>: |
94 | + | |
95 | <td>: | |
96 | <textarea name="tmp_lahir" cols="50" id="tmp_lahir"></textarea></td> | |
97 | - | <tr> |
97 | + | |
98 | <tr> | |
99 | - | <td>: |
99 | + | |
100 | - | <label> |
100 | + | |
101 | <label> | |
102 | - | <a href="javascript:void(0)" onClick="if(self.gfPop)gfPop.fPopCalendar(document.input.tgl_lahir);return false;" ><img name="popcal" align="absmiddle" style="border:none" src="calender/calender.jpeg" width="40" height="30" border="0" alt=""></a></label> |
102 | + | |
103 | <a href="javascript:void(0)" onClick="if(self.gfPop)gfPop.fPopCalendar(document.input.tgl_lahir);return false;" ><img name="popcal" align="absmiddle" style="border:none" src="calender/calender.jpeg" width="40" height="30" border="0" alt=""></a></label> | |
104 | <label> </label></td> | |
105 | </tr> | |
106 | <tr> | |
107 | <td><strong>Jenis Kelamin</strong></td> | |
108 | <td><input name="jenis_kelamin" type="radio" id="radio" value="L" checked> | |
109 | Laki-Laki | |
110 | <input type="radio" name="jenis_kelamin" id="radio2" value="P"> | |
111 | Perempuan</td> | |
112 | </tr> | |
113 | <tr> | |
114 | <td><strong>Agama</strong></td> | |
115 | <td> : | |
116 | <select name="agama" id="agama"> | |
117 | <option value="islam" selected>Islam</option> | |
118 | <option value="kristen">Keristen</option> | |
119 | <option value="budha">Budha</option> | |
120 | <option value="katolik">Katolik</option> | |
121 | </select></td> | |
122 | - | <tr> |
122 | + | |
123 | <tr> | |
124 | <td><strong>Pekerjaan</strong></td> | |
125 | <td>: | |
126 | <textarea name="pekerjaan" cols="50" id="pekerjaan"></textarea></td> | |
127 | - | <tr> |
127 | + | |
128 | <tr> | |
129 | - | <td>: |
129 | + | |
130 | <td>: | |
131 | <input type="text" name="no_hp" size="20" maxlength="30" id="no_hp" /></td> | |
132 | - | <tr> |
132 | + | |
133 | <tr> | |
134 | <td><strong>Email</strong></td> | |
135 | <td>: | |
136 | <input type="text" name="email" size="30" maxlength="30" id="email" /></td> | |
137 | - | <tr> |
137 | + | |
138 | <tr> | |
139 | <td><strong>Password</strong></td> | |
140 | <td>: | |
141 | <input type="text" name="password" size="40" maxlength="30" id="password" /></td> | |
142 | </tr> | |
143 | <tr> | |
144 | - | <td>: |
144 | + | |
145 | <td>: | |
146 | <select name="status" id="status"> | |
147 | <option value="">========</option> | |
148 | <option value="0" selected>Alumni</option> | |
149 | </select></td> | |
150 | </tr> | |
151 | <tr> | |
152 | - | <td>: |
152 | + | |
153 | <td>: | |
154 | <input type="text" name="jurusan" size="30" maxlength="30" id="jurusan" /></td> | |
155 | </tr> | |
156 | <tr> | |
157 | - | <td>: |
157 | + | |
158 | <td>: | |
159 | - | <option value="">========</option> |
159 | + | |
160 | <option value="">========</option> | |
161 | - | <option value="2012">2012</option> |
161 | + | |
162 | - | <option value="2011">2011</option> |
162 | + | <option value="2012">2012</option> |
163 | - | <option value="2010">2010</option> |
163 | + | <option value="2011">2011</option> |
164 | - | <option value="2009">2009</option> |
164 | + | <option value="2010">2010</option> |
165 | - | <option value="2008">2008</option> |
165 | + | <option value="2009">2009</option> |
166 | - | <option value="2007">2007</option> |
166 | + | <option value="2008">2008</option> |
167 | - | <option value="2006">2006</option> |
167 | + | <option value="2007">2007</option> |
168 | - | <option value="2005">2005</option> |
168 | + | <option value="2006">2006</option> |
169 | - | <option value="2004">2004</option> |
169 | + | <option value="2005">2005</option> |
170 | <option value="2004">2004</option> | |
171 | <option value="2003">2003</option> | |
172 | <option value="2002">2002</option> | |
173 | <option value="2001">2001</option> | |
174 | <option value="2000">2000</option> | |
175 | </select></td> | |
176 | </tr> | |
177 | <tr> | |
178 | - | <td>: |
178 | + | |
179 | <td>: | |
180 | <textarea name="alamat" cols="50" id="alamat"></textarea></td> | |
181 | </tr> | |
182 | <tr> | |
183 | - | <td> : |
183 | + | |
184 | <td> : | |
185 | <input type="text" name="provinsi" size="30" maxlength="30" id="provinsi" /></td> | |
186 | </tr> | |
187 | <tr> | |
188 | - | <td>: |
188 | + | |
189 | <td>: | |
190 | <input type="text" name="kabupaten" size="40" maxlength="30" id="kabupaten" /></td> | |
191 | </tr> | |
192 | <tr> | |
193 | - | <td>: |
193 | + | |
194 | <td>: | |
195 | <input type="text" name="kecamatan" size="30" maxlength="30" id="kecamatan" /></td> | |
196 | - | <tr> |
196 | + | |
197 | <tr> | |
198 | - | <td>: |
198 | + | |
199 | <td>: | |
200 | <input type="text" name="desa" size="40" maxlength="30" id="desa" /> </td> | |
201 | </tr> | |
202 | <tr> | |
203 | <td> </td> | |
204 | <td> </td> | |
205 | - | <tr> |
205 | + | |
206 | <tr> | |
207 | <td> </td> | |
208 | <td> <input type="submit" name="Input" value="input" /> <input type="reset" name="reset" value="Reset" /></td> | |
209 | </tr> | |
210 | </table> | |
211 | ||
212 | </form> | |
213 | <!-- PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. --> | |
214 | <iframe width=174 height=189 name="gToday:normal:./calender/agenda.js" id="gToday:normal:./calender/agenda.js" src="./calender/ipopeng.htm" scrolling="no" frameborder="0" style="visibility:visible; z-index:999; position:absolute; top:-500px; left:-500px;"> | |
215 | </iframe> | |
216 | - | <p><span class="isi"> |
216 | + | |
217 | - | <? |
217 | + | <p><span class="isi"> |
218 | <? | |
219 | } | |
220 | elseif ($stat==1) | |
221 | - | $msg=" !!!"; |
221 | + | |
222 | $msg=" !!!"; | |
223 | ||
224 | - | values('','$status','$nama','$password')"; |
224 | + | |
225 | - | $cursor = mysql_query($queryx) or die(mysql_error()); |
225 | + | values('','$status','$nama','$password')"; |
226 | $cursor = mysql_query($queryx) or die(mysql_error()."<br>$queryx"); | |
227 | - | echo "<br> $queryx"; |
227 | + | |
228 | ||
229 | ||
230 | ||
231 | - | values('$no_ijazah','$nis','$nama','$tgl_lahir','$jenis_kelamin','$agama','$pekerjaan','$no_hp','$email','$pass','$jurusan','$tahun_lulus','$alamat','$provinsi','$kabupaten','$kecamatan','$desa')"; |
231 | + | |
232 | - | $cursor1 = mysql_query($query1)or die(mysql_error()); |
232 | + | values('$no_ijazah','$nis','$nama','$tgl_lahir','$jenis_kelamin','$agama','$pekerjaan','$no_hp','$email','$pass','$jurusan','$tahun_lulus','$alamat','$provinsi','$kabupaten','$kecamatan','$desa')"; |
233 | - | echo "<br>$query1"; |
233 | + | $cursor1 = mysql_query($query1)or die(mysql_error()."<br/>$query1"); |
234 | ||
235 | ||
236 | if(!$cursor or !$cursor1) | |
237 | { | |
238 | ||
239 | ?> | |
240 | </span></p> | |
241 | - | <tr> |
241 | + | |
242 | - | <td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> |
242 | + | <tr> |
243 | - | </strong></font></font> |
243 | + | <td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> |
244 | </strong></font></font> | |
245 | - | <tr> |
245 | + | |
246 | <tr> | |
247 | - | <td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> <font color="#FF0000">Gagal |
247 | + | |
248 | <td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> <font color="#FF0000">Gagal | |
249 | <? echo $msg; ?> | |
250 | </font></strong></font></font></td> | |
251 | - | <tr> |
251 | + | |
252 | <tr> | |
253 | - | <td width="96%"><font size="2"> Data Gagal di Masukan Silahkan |
253 | + | |
254 | <td width="96%"><font size="2"> Data Gagal di Masukan Silahkan | |
255 | Ulang Kembali!!!</font></td> | |
256 | </tr> | |
257 | </table> | |
258 | - | <td width="10%"><div align="right"><strong><font size="2">| <a href="javascript:history.go(-1)">Kembali</a> |
258 | + | |
259 | <td width="10%"><div align="right"><strong><font size="2">| <a href="javascript:history.go(-1)">Kembali</a> | |
260 | | </font></strong></div></td> | |
261 | </tr> | |
262 | - | <? |
262 | + | |
263 | <? | |
264 | exit; | |
265 | } | |
266 | ||
267 | ?> | |
268 | - | <tr> |
268 | + | |
269 | - | <td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> |
269 | + | <tr> |
270 | - | </strong></font></font> |
270 | + | <td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> |
271 | </strong></font></font> | |
272 | - | <tr> |
272 | + | |
273 | <tr> | |
274 | <td><img src="../../FINAL PHP/icon/download.jpg" width="62" height="45"></td> | |
275 | <td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> Sukses</strong></font></font></td> | |
276 | - | <tr> |
276 | + | |
277 | <tr> | |
278 | <td width="4%"> </td> | |
279 | <td width="96%"><font size="2"> Data Sukses di Masukan</font></td> | |
280 | </tr> | |
281 | </table> | |
282 | </div></td> | |
283 | <td width="10%"><div align="right"><strong><font size="2"><a href="index.php">Kembali| </a></font></strong></div></td> | |
284 | </tr> | |
285 | </table> | |
286 | <? | |
287 | } | |
288 | //if(!$hasiltj) | |
289 | //{ | |
290 | // echo "Maaf Ada Kesalahan Pada Server Kami......"; | |
291 | // exit; | |
292 | //}*/?> | |
293 | </body> | |
294 | </html> |