SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | ||
3 | mysql_connect("localhost","root","irfan"); | |
4 | mysql_select_db("alumni"); | |
5 | ||
6 | include "menu.php"; | |
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> | |
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"> | |
39 | <h2> | |
40 | <? | |
41 | require("config.php"); | |
42 | ||
43 | ||
44 | ||
45 | $stat = $_REQUEST[stat] ; | |
46 | $no_ijazah = $_REQUEST[no_ijazah]; | |
47 | $nis = $_REQUEST[nis] ; | |
48 | $nama = $_REQUEST[nama] ; | |
49 | $tmp_lahir = $_REQUEST[tmp_lahir] ; | |
50 | $tgl_lahir = $_REQUEST[tgl_lahir] ; | |
51 | $jenis_kelamin = $_REQUEST[jenis_kelamin] ; | |
52 | $agama = $_REQUEST[agama] ; | |
53 | $pekerjaan = $_REQUEST[pekerjaan] ; | |
54 | $no_hp = $_REQUEST[no_hp] ; | |
55 | $email = $_REQUEST[email] ; | |
56 | $password=md5(trim($_POST['password'])); | |
57 | $jurusan = $_REQUEST[jurusan] ; | |
58 | $tahun_lulus = $_REQUEST[tahun_lulus] ; | |
59 | $alamat = $_REQUEST[alamat] ; | |
60 | $provinsi = $_REQUEST[provinsi] ; | |
61 | $kabupaten = $_REQUEST[kabupaten] ; | |
62 | $kecamatan = $_REQUEST[kecamatan] ; | |
63 | $desa = $_REQUEST[desa] ; | |
64 | ||
65 | ||
66 | ||
67 | ||
68 | $sts = $stat ; | |
69 | if ($sts == "" or $sts == 0 ) | |
70 | { | |
71 | ?> | |
72 | </h2> | |
73 | <h2 align="center"> </h2> | |
74 | <p> </p> | |
75 | <form action="" method="post" enctype="multipart/form-data" name="input" id="input"> | |
76 | <table width="903" border="0" align="center" cellpadding="0" cellspacing="0"> | |
77 | <tr> | |
78 | <td width="200"><strong>Nomor Ijazah</strong></td> | |
79 | <td width="703">: | |
80 | <input type="text" name="no_ijazah" size="20" maxlength="30" id="no_ijazah" /></td> | |
81 | </tr> | |
82 | <tr> | |
83 | <td><strong>Nis</strong></td> | |
84 | <td>: | |
85 | <input type="text" name="nis" size="30" maxlength="30" id="nis" /></td> | |
86 | </tr> | |
87 | <tr> | |
88 | <td><strong>Nama</strong></td> | |
89 | <td>: | |
90 | <input type="text" name="nama" size="40" maxlength="30" id="nama" /></td> | |
91 | </tr> | |
92 | <tr> | |
93 | <td><strong>Tempat Lahir</strong></td> | |
94 | <td>: | |
95 | <textarea name="tmp_lahir" cols="50" id="tmp_lahir"></textarea></td> | |
96 | </tr> | |
97 | <tr> | |
98 | <td><strong>Tanggal Lahir</strong></td> | |
99 | <td>: | |
100 | <label> | |
101 | <input name="tgl_lahir" type="text" size="10" /> | |
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> | |
103 | <label> </label></td> | |
104 | </tr> | |
105 | <tr> | |
106 | <td><strong>Jenis Kelamin</strong></td> | |
107 | <td><input name="jenis_kelamin" type="radio" id="radio" value="L" checked> | |
108 | Laki-Laki | |
109 | <input type="radio" name="jenis_kelamin" id="radio2" value="P"> | |
110 | Perempuan</td> | |
111 | </tr> | |
112 | <tr> | |
113 | <td><strong>Agama</strong></td> | |
114 | <td> : | |
115 | <select name="agama" id="agama"> | |
116 | <option value="islam" selected>Islam</option> | |
117 | <option value="kristen">Keristen</option> | |
118 | <option value="budha">Budha</option> | |
119 | <option value="katolik">Katolik</option> | |
120 | </select></td> | |
121 | </tr> | |
122 | <tr> | |
123 | <td><strong>Pekerjaan</strong></td> | |
124 | <td>: | |
125 | <textarea name="pekerjaan" cols="50" id="pekerjaan"></textarea></td> | |
126 | </tr> | |
127 | <tr> | |
128 | <td><strong>Nomor Hp</strong></td> | |
129 | <td>: | |
130 | <input type="text" name="no_hp" size="20" maxlength="30" id="no_hp" /></td> | |
131 | </tr> | |
132 | <tr> | |
133 | <td><strong>Email</strong></td> | |
134 | <td>: | |
135 | <input type="text" name="email" size="30" maxlength="30" id="email" /></td> | |
136 | </tr> | |
137 | <tr> | |
138 | <td><strong>Password</strong></td> | |
139 | <td>: | |
140 | <input type="text" name="password" size="40" maxlength="30" id="password" /></td> | |
141 | </tr> | |
142 | <tr> | |
143 | <td><strong>Staus</strong></td> | |
144 | <td>: | |
145 | <select name="status" id="status"> | |
146 | <option value="">========</option> | |
147 | <option value="0" selected>Alumni</option> | |
148 | </select></td> | |
149 | </tr> | |
150 | <tr> | |
151 | <td><strong>Jurusan</strong></td> | |
152 | <td>: | |
153 | <input type="text" name="jurusan" size="30" maxlength="30" id="jurusan" /></td> | |
154 | </tr> | |
155 | <tr> | |
156 | <td><strong>Tahun Lulus</strong></td> | |
157 | <td>: | |
158 | <select name="tahun_lulus" id="tahun_lulus"> | |
159 | <option value="">========</option> | |
160 | <option value=" 2013 " selected>2013</option> | |
161 | <option value="2012">2012</option> | |
162 | <option value="2011">2011</option> | |
163 | <option value="2010">2010</option> | |
164 | <option value="2009">2009</option> | |
165 | <option value="2008">2008</option> | |
166 | <option value="2007">2007</option> | |
167 | <option value="2006">2006</option> | |
168 | <option value="2005">2005</option> | |
169 | <option value="2004">2004</option> | |
170 | <option value="2003">2003</option> | |
171 | <option value="2002">2002</option> | |
172 | <option value="2001">2001</option> | |
173 | <option value="2000">2000</option> | |
174 | </select></td> | |
175 | </tr> | |
176 | <tr> | |
177 | <td><strong>Alamat</strong></td> | |
178 | <td>: | |
179 | <textarea name="alamat" cols="50" id="alamat"></textarea></td> | |
180 | </tr> | |
181 | <tr> | |
182 | <td><strong>Provinsi</strong></td> | |
183 | <td> : | |
184 | <input type="text" name="provinsi" size="30" maxlength="30" id="provinsi" /></td> | |
185 | </tr> | |
186 | <tr> | |
187 | <td><strong>Kabupaten</strong></td> | |
188 | <td>: | |
189 | <input type="text" name="kabupaten" size="40" maxlength="30" id="kabupaten" /></td> | |
190 | </tr> | |
191 | <tr> | |
192 | <td><strong>Kecamatan</strong></td> | |
193 | <td>: | |
194 | <input type="text" name="kecamatan" size="30" maxlength="30" id="kecamatan" /></td> | |
195 | </tr> | |
196 | <tr> | |
197 | <td><strong>Desa</strong></td> | |
198 | <td>: | |
199 | <input type="text" name="desa" size="40" maxlength="30" id="desa" /> </td> | |
200 | </tr> | |
201 | <tr> | |
202 | <td> </td> | |
203 | <td> </td> | |
204 | </tr> | |
205 | <tr> | |
206 | <td> </td> | |
207 | <td> <input type="submit" name="Input" value="input" /> <input type="reset" name="reset" value="Reset" /></td> | |
208 | </tr> | |
209 | </table> | |
210 | ||
211 | </form> | |
212 | <!-- PopCalendar(tag name and id must match) Tags should not be enclosed in tags other than the html body tag. --> | |
213 | <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;"> | |
214 | </iframe> | |
215 | </div> | |
216 | <p><span class="isi"> | |
217 | - | <? } |
217 | + | <? |
218 | } | |
219 | elseif ($stat==1) | |
220 | { // echo "</p><br><br><br><br>$id_nasabah"; | |
221 | $msg=" !!!"; | |
222 | ||
223 | $queryx="INSERT INTO admin (id, status, user, password ) | |
224 | - | $cursor = mysql_query($queryx); |
224 | + | |
225 | $cursor = mysql_query($queryx) or die(mysql_error()); | |
226 | ||
227 | echo "<br> $queryx"; | |
228 | ||
229 | ||
230 | $query1="INSERT INTO alumni (no_ijazah, nis, nama,tgl_lahir, jenis_kelamin, agama, pekerjaan, no_hp, email, pass, jurusan, tahun_lulus, alamat, provinsi, kabupaten, kecamatan, desa) | |
231 | - | $cursor1 = mysql_query($query1); |
231 | + | |
232 | $cursor1 = mysql_query($query1)or die(mysql_error()); | |
233 | echo "<br>$query1"; | |
234 | ||
235 | if(!$cursor or !$cursor1) | |
236 | { | |
237 | ||
238 | ?> | |
239 | </span></p> | |
240 | <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> | |
241 | <tr> | |
242 | <td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> | |
243 | </strong></font></font> | |
244 | <table width="33%" border="0" cellspacing="0" cellpadding="0"> | |
245 | <tr> | |
246 | <td><img src="../../FINAL PHP/icon/images.jpg" width="78" height="58"></td> | |
247 | <td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> <font color="#FF0000">Gagal | |
248 | <? echo $msg; ?> | |
249 | </font></strong></font></font></td> | |
250 | </tr> | |
251 | <tr> | |
252 | <td width="4%"> </td> | |
253 | <td width="96%"><font size="2"> Data Gagal di Masukan Silahkan | |
254 | Ulang Kembali!!!</font></td> | |
255 | </tr> | |
256 | </table> | |
257 | </div></td> | |
258 | <td width="10%"><div align="right"><strong><font size="2">| <a href="javascript:history.go(-1)">Kembali</a> | |
259 | | </font></strong></div></td> | |
260 | </tr> | |
261 | </table> | |
262 | <? | |
263 | exit; | |
264 | } | |
265 | ||
266 | ?> | |
267 | <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0"> | |
268 | <tr> | |
269 | <td width="90%"><div align="center"><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> | |
270 | </strong></font></font> | |
271 | <table width="33%" border="0" cellspacing="0" cellpadding="0"> | |
272 | <tr> | |
273 | <td><img src="../../FINAL PHP/icon/download.jpg" width="62" height="45"></td> | |
274 | <td><font color="#FF0000" size="2"><font color="#33CC00" size="3"><strong> Sukses</strong></font></font></td> | |
275 | </tr> | |
276 | <tr> | |
277 | <td width="4%"> </td> | |
278 | <td width="96%"><font size="2"> Data Sukses di Masukan</font></td> | |
279 | </tr> | |
280 | </table> | |
281 | </div></td> | |
282 | <td width="10%"><div align="right"><strong><font size="2"><a href="index.php">Kembali| </a></font></strong></div></td> | |
283 | </tr> | |
284 | </table> | |
285 | <? | |
286 | } | |
287 | //if(!$hasiltj) | |
288 | //{ | |
289 | // echo "Maaf Ada Kesalahan Pada Server Kami......"; | |
290 | // exit; | |
291 | //}*/?> | |
292 | </body> | |
293 | </html> |