<title>PT.DAYA ADICIPTA WISESA</title>
<form id="Nama" target="" enctype="multipart/form-data" method="post" action="input_registrasi.php" name="localhost">
<table style="text-align:left;" cellpadding="2" cellspacing="0" border="0" bgcolor="#708090">
<tr>
<td style="" colspan="2">
<font face="Verdana" size="2" color="#000000"><b style="font-size:20px;">Formulir Pendaftaran</b><br />
<label style="font-size:15px;">PT.DATA ADICIPTA WISESA<br /></label><br /></font>
<img src="powel.png" width="250" height="103" /></td>
</tr>
<tr valign="top">
<td id="td_element_label_2" style="" align="left"><b><font color="#000000" size="2" face="Verdana">Nama</font></b></td>
<td id="td_element_field_2" style="">
<input id="element_2" name="element_2" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_5" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Tanggal Lahir</b></font>
</td>
<td id="td_element_field_5" style="">
<table cellpadding='0' cellspacing='0' border='0'>
<tr>
<td style='padding-left:3px;padding-right:3px;'>
<select id="element_5_year-dd" name="element_5_day">
<option value="01">
01
</option>
<option value="02">
02
</option>
<option value="03">
03
</option>
<option value="04">
04
</option>
<option value="05">
05
</option>
<option value="06">
06
</option>
<option value="07">
07
</option>
<option value="08">
08
</option>
<option value="09">
09
</option>
<option value="10">
10
</option>
<option value="11">
11
</option>
<option value="12">
12
</option>
<option value="13">
13
</option>
<option value="14">
14
</option>
<option value="15">
15
</option>
<option value="16">
16
</option>
<option value="17">
17
</option>
<option value="18">
18
</option>
<option value="19">
19
</option>
<option value="20">
20
</option>
<option value="21">
21
</option>
<option value="22">
22
</option>
<option value="23">
23
</option>
<option value="24">
24
</option>
<option value="25">
25
</option>
<option value="26">
26
</option>
<option value="27">
27
</option>
<option value="28">
28
</option>
<option value="29">
29
</option>
<option value="30">
30
</option>
<option value="31">
31
</option>
</select><br />
Hari</td>
<td style="padding-top:5px" valign="top">
<font face="Verdana" size="2" color="#000000">/</font>
</td>
<td style='padding-left:0;padding-right:3px;'>
<select id="element_5_year-mm" name="element_5_month">
<option value="01">
01
</option>
<option value="02">
02
</option>
<option value="03">
03
</option>
<option value="04">
04
</option>
<option value="05">
05
</option>
<option value="06">
06
</option>
<option value="07">
07
</option>
<option value="08">
08
</option>
<option value="09">
09
</option>
<option value="10">
10
</option>
<option value="11">
11
</option>
<option value="12">
12
</option>
</select><br />
Bulan</td>
<td style="padding-top:5px" valign="top">
<font face="Verdana" size="2" color="#000000">/</font>
</td>
<td style='padding-left:3px;padding-right:3px;'>
<select id="element_5_year" name="element_5_year">
<option value="1920">
1920
</option>
<option value="1921">
1921
</option>
<option value="1922">
1922
</option>
<option value="1923">
1923
</option>
<option value="1924">
1924
</option>
<option value="1925">
1925
</option>
<option value="1926">
1926
</option>
<option value="1927">
1927
</option>
<option value="1928">
1928
</option>
<option value="1929">
1929
</option>
<option value="1930">
1930
</option>
<option value="1931">
1931
</option>
<option value="1932">
1932
</option>
<option value="1933">
1933
</option>
<option value="1934">
1934
</option>
<option value="1935">
1935
</option>
<option value="1936">
1936
</option>
<option value="1937">
1937
</option>
<option value="1938">
1938
</option>
<option value="1939">
1939
</option>
<option value="1940">
1940
</option>
<option value="1941">
1941
</option>
<option value="1942">
1942
</option>
<option value="1943">
1943
</option>
<option value="1944">
1944
</option>
<option value="1945">
1945
</option>
<option value="1946">
1946
</option>
<option value="1947">
1947
</option>
<option value="1948">
1948
</option>
<option value="1949">
1949
</option>
<option value="1950">
1950
</option>
<option value="1951">
1951
</option>
<option value="1952">
1952
</option>
<option value="1953">
1953
</option>
<option value="1954">
1954
</option>
<option value="1955">
1955
</option>
<option value="1956">
1956
</option>
<option value="1957">
1957
</option>
<option value="1958">
1958
</option>
<option value="1959">
1959
</option>
<option value="1960">
1960
</option>
<option value="1961">
1961
</option>
<option value="1962">
1962
</option>
<option value="1963">
1963
</option>
<option value="1964">
1964
</option>
<option value="1965">
1965
</option>
<option value="1966">
1966
</option>
<option value="1967">
1967
</option>
<option value="1968">
1968
</option>
<option value="1969">
1969
</option>
<option value="1970">
1970
</option>
<option value="1971">
1971
</option>
<option value="1972">
1972
</option>
<option value="1973">
1973
</option>
<option value="1974">
1974
</option>
<option value="1975">
1975
</option>
<option value="1976">
1976
</option>
<option value="1977">
1977
</option>
<option value="1978">
1978
</option>
<option value="1979">
1979
</option>
<option value="1980">
1980
</option>
<option value="1981">
1981
</option>
<option value="1982">
1982
</option>
<option value="1983">
1983
</option>
<option value="1984">
1984
</option>
<option value="1985">
1985
</option>
<option value="1986">
1986
</option>
<option value="1987">
1987
</option>
<option value="1988">
1988
</option>
<option value="1989">
1989
</option>
<option value="1990">
1990
</option>
<option value="1991">
1991
</option>
<option value="1992">
1992
</option>
<option value="1993">
1993
</option>
<option value="1994">
1994
</option>
<option value="1995">
1995
</option>
<option value="1996">
1996
</option>
<option value="1997">
1997
</option>
<option value="1998">
1998
</option>
<option value="1999">
1999
</option>
<option value="2000">
2000
</option>
<option value="2001">
2001
</option>
<option value="2002">
2002
</option>
<option value="2003">
2003
</option>
<option value="2004">
2004
</option>
<option value="2005">
2005
</option>
<option value="2006">
2006
</option>
<option value="2007">
2007
</option>
<option value="2008">
2008
</option>
<option value="2009">
2009
</option>
<option value="2010">
2010
</option>
<option value="2011">
2011
</option>
<option value="2012">
2012
</option>
<option value="2013">
2013
</option>
<option value="2014">
2014
</option>
<option value="2015">
2015
</option>
<option value="2016">
2016
</option>
<option value="2017">
2017
</option>
<option value="2018">
2018
</option>
<option value="2019">
2019
</option>
<option value="2020">
2020
</option>
<option value="2021">
2021
</option>
<option value="2022">
2022
</option>
<option value="2023">
2023
</option>
<option value="2024">
2024
</option>
<option value="2025">
2025
</option>
<option value="2026">
2026
</option>
<option value="2027">
2027
</option>
<option value="2028">
2028
</option>
<option value="2029">
2029
</option>
<option value="2030">
2030
</option>
</select><br />
Tahun</td>
</tr>
</table>
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_6" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Jenis Kelamin</b></font>
</td>
<td id="td_element_field_6" style="">
<div style="width:100%;padding-bottom:5px;">
<input id="element_6_0" name="element_6" value="Pria" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Pria </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_6_1" name="element_6" value="Wanita" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Wanita </font>
</div>
<div style="clear:both;"></div>
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_8" style="" align="left"><b><font color="#000000" size="2" face="Verdana">Alamat</font></b></td>
<td id="td_element_field_8" style="">
<input id="element_8" name="element_8" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_10" style="" align="left"><b><font color="#000000" size="2" face="Verdana">Kota</font></b></td>
<td id="td_element_field_10" style="">
<input id="element_10" name="element_10" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_11" style="" align="left"><b><font color="#000000" size="2" face="Verdana">Provinsi</font></b></td>
<td id="td_element_field_11" style="">
<input id="element_11" name="element_11" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_12" style="" align="left"><b><font color="#000000" size="2" face="Verdana">Kode pos</font></b></td>
<td id="td_element_field_12" style="">
<input id="element_12" name="element_12" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_13" style="" align="left"><b><font color="#000000" size="2" face="Verdana">Negara</font></b></td>
<td id="td_element_field_13" style="">
<input id="element_13" name="element_13" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_14" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Alamat Email</b></font>
</td>
<td id="td_element_field_14" style="">
<input id="element_14" name="element_14" class="validate[optional,custom[email]]" value="" size="30" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_15" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>No Hp</b></font>
</td>
<td id="td_element_field_15" style="">
<input id="element_15" name="element_15" class="validate[optional,custom[telephone]]" value="" size="30" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_16" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>No Telepon</b></font>
</td>
<td id="td_element_field_16" style="">
<input id="element_16" name="element_16" class="validate[optional,custom[telephone]]" value="" size="30" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_17" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>No KTP</b></font>
</td>
<td id="td_element_field_17" style="">
<input id="element_17" name="element_17" class="validate[optional,custom[telephone]]" value="" size="30" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_18" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Pendidikan</b></font>
</td>
<td id="td_element_field_18" style="">
<div style="width:100%;padding-bottom:5px;">
<input id="element_18_0" name="element_18" value="SMA / SMK" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> SMA / SMK </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_18_1" name="element_18" value="D3" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> D3 </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_18_2" name="element_18" value="S1" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> S1 </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_18_3" name="element_18" value="S2" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> S2 </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_18_4" name="element_18" value="S3" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> S3 </font>
</div>
<div style="clear:both;"></div>
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_19" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Agama</b></font>
</td>
<td id="td_element_field_19" style="">
<div style="width:100%;padding-bottom:5px;">
<input name="element_19" type="radio" class="validate[optional]" id="element_19_0" value="Kristen Protestan" /><font face="Verdana" size="2" color="#000000"> Kristen
Protestan </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_19_1" name="element_19" value="Katolik" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Katolik </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_19_2" name="element_19" value="Hindu" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Hindu </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_19_3" name="element_19" value="Budha" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Budha </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_19_4" name="element_19" value="Islam" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Islam </font>
</div>
<div style="clear:both;"></div>
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_20" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Jurusan / Program Study</b></font>
</td>
<td id="td_element_field_20" style="">
<input id="element_20" name="element_20" value="" size="30" class="validate[optional]" type="text" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_21" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Status</b></font>
</td>
<td id="td_element_field_21" style="">
<div style="width:100%;padding-bottom:5px;">
<input id="element_21_0" name="element_21" value="Belum Menikah" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Belum Menikah </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_21_1" name="element_21" value="Sudah Menikah" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Sudah Menikah </font>
</div>
<div style="width:100%;padding-bottom:5px;">
<input id="element_21_2" name="element_21" value="Jand / Duda" class="validate[optional]" type="radio" /><font face="Verdana" size="2" color="#000000"> Jand / Duda </font>
</div>
<div style="clear:both;"></div>
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_22" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Alasan Anda Melamar Di Perusahaan Kami</b></font>
</td>
<td id="td_element_field_22" style="">
<textarea id="element_22" name="element_22" cols="45" rows="6" class="validate[optional]">
</textarea>
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_23" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Anda Ingin Melamar Sebagai</b></font>
</td>
<td id="td_element_field_23" style="">
<textarea id="element_23" name="element_23" cols="45" rows="1" class="validate[optional]">
</textarea>
<div style="padding-bottom:8px;color:#000000;">
<small><font face="Verdana">ingat: sesuaikan dengan permintaan kami atau lihat pada papan lowongan pekerjaan</font></small>
</div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_24" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Riwayat Pekerjaan Anda</b></font>
</td>
<td id="td_element_field_24" style="">
<textarea id="element_24" name="element_24" cols="70" rows="10" class="validate[optional]">
</textarea>
<div style="padding-bottom:8px;color:#000000;">
<small><font face="Verdana">ingat: sebutkan nama perusahaan dan jabatan anda pada saat itu</font></small>
</div>
</td>
</tr>
<tr valign="top">
<td id="td_element_label_25" style="" align="left">
<font face="Verdana" size="2" color="#000000"><b>Upload Foto / Dokumen</b></font>
</td>
<td id="td_element_field_25" style="">
<input id="element_25" name="element_25" class="validate[optional]" type="file" />
<div style="padding-bottom:8px;color:#000000;"></div>
</td>
</tr>
<tr>
<td colspan="2" align="left">
<input name="element_counts" value="26" type="hidden" /> <input name="embed" value="forms" type="hidden" /><input name="Submit" type="submit" value="Kirim" />
</td>
</tr>
</table>Pemberitahuan akan di kirim di email anda
</form>
Powered By Mahasiswa De la salle <a href=https://www.facebook.com/powel.muntu>Powel Muntu</a>
</body>
</html>
<div></div>
elseif ($_GET[module]=='uploadkoleksifoto'){
$tmpl_pwd=mysql_query("select * from member where username='$_SESSION[namamember]'");
while($tpl_pwd=mysql_fetch_array($tmpl_pwd)){
$username=$tpl_pwd[username];
$id_member=$tpl_pwd[id_member];
}
function getExtension($str) {
$i = strrpos($str,".");
if (!$i) { return ""; }
$l = strlen($str) - $i;
$ext = substr($str,$i+1,$l);
return $ext;
}
$filename = stripslashes($_FILES['foto']['name']);
$extension = getExtension($filename);
$extension = strtolower($extension);
if (($extension != "jpg") && ($extension != "jpeg") && ($extension != "png"))
{
echo"Field gambar masih kosong....!!!!<br>Mohon Lengkapi Kembali!!!";
echo"<br><a href=javascript:history.go(-1)><b>Ulangi Lagi</b></a>";
}
else{
if(is_uploaded_file($_FILES['foto']['tmp_name'])){
if (isset ($_FILES['foto'])){
$imagename = stripslashes($_FILES['foto']['name']);
$source = $_FILES['foto']['tmp_name'];
$target = "foto-member/".$imagename;
move_uploaded_file($source, $target);
$imagepath = $imagename;
$save = "foto-member/" . $imagename; //This is the new file you saving
$file = "foto-member/" . $imagepath; //This is the original file
list($width, $height) = getimagesize($file) ;
$modwidth = 500;
$diff = $width / $modwidth;
$modheight = $height / $diff;
$tn = imagecreatetruecolor($modwidth, $modheight) ;
$image = imagecreatefromjpeg($file) ;
imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ;
imagejpeg($tn, $save, 100) ;
$save = "foto-member/sml_" . $imagename; //This is the new file you saving
$file = "foto-member/" . $imagepath; //This is the original file
list($width, $height) = getimagesize($file) ;
$modwidth = 90;
$diff = $width / $modwidth;
$modheight = $height / $diff;
$tn = imagecreatetruecolor($modwidth, $modheight) ;
$image = imagecreatefromjpeg($file) ;
imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ;
imagejpeg($tn, $save, 100) ;
}
$query=mysql_query("insert into koleksi_foto (id_member,foto_kecil, foto_besar) values ('$id_member', 'sml_$imagename', '$imagename')") or die (mysql_error());
echo "<meta http-equiv='refresh' content='0; url=member-$id_member.html'>";
}
}
}
<?php
require_once( '../opendb.php' );
require_once( '../setudf.php' );
if( isset( $_POST['btn_load'] ) ) {
if( $_POST['btn_load'] == 'Load File' ) {
$file = "/barang/ambil.txt";
$fp = fopen( $file, "r" );
$data = fread( $fp, filesize( $file ) );
fclose( $fp );
$output = str_replace( "\t|\t", ",", $data );
$output = explode( "\n", $output );
$date_trans = $POST['txt_date_transfer'];
//--- Check Double Data
$double = mysql_query( "SELECT * FROM tb_tes WHERE tgl ='$date_trans'" );
$hasil = mysql_num_rows( $double );
if( $hasil>=1 ) {
$hapus = "DELETE FROM tb_tes WHERE tgl = '$date_trans'";
mysql_query( $hapus );
} else {
foreach($output as $var) {
$tmp = explode(",", $var);
//-- Fields yang diambil dari file *.txt
$tanggal = $tmp[0];
$id = $tmp[1];
$remaks = $tmp[2];
$sql = "INSERT INTO tb_tes SET tgl='$tanggal', mem_id='$id', remaks='$remaks'";
$trans = mysql_query($sql);
if( $trans )
echo 'Proses transfer ok! :)'.date_db_to_normal( $date_trans );
else
echo 'Proses transfer gagal! :(';
}
}
}
}
?>
<link type="text/css" rel="stylesheet" href="/barang/css/radius.css" media="screen"/>
<div id="Radius_1">
<form enctype="multipart/form-data" method="post">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<th height="25" colspan="3">:: Tes Transfer Data ::</th>
</tr>
<tr>
<td>Date Transfer :
<input type="text"
id="txt_date_transfer"
name="txt_date_transfer"
maxlength="10"
size="8"
value="<?php echo date('d/m/Y');?>"/>
</td>
<td>File Location :
<input type="hidden"
name="MAX_FILE_SIZE"
value="2000000"/>
<input type="file"
name="nama_file"/>
</td>
</tr>
<tr>
<td colspan="2" align="left">
<input type="submit"
name="btn_load"
id="btn_load"
value="Load File"/>
</td>
</tr>
</table>
</form>
</div>
<link type="text/css" rel="stylesheet" href="/barang/css/radius.css" media="screen"/>
<div id="Radius_1">
<form enctype="multipart/form-data" method="post">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<th height="25" colspan="3">:: Tes Transfer Data ::</th>
</tr>
<tr>
<td>Date Transfer :
<input type="text"
id="txt_date_transfer"
name="txt_date_transfer"
maxlength="10"
size="9"
value="<?php echo date('d/m/Y');?>"/>
</td>
<td>File Location :
<input type="hidden"
name="MAX_FILE_SIZE"
value="2000000"/>
<input type="file"
name="nama_file"
value="Browse"/>
</td>
<td>
<input type="submit"
name="btn_load"
id="btn_load"
value="Load File"
onclick="Save_n_transfer_data(); return false;"/>
</td>
</tr>
<tr>
<td colspan="3" id="_show_progress" align="center"> </td>
</tr>
</table>
</form>
</div>
var sendReq = getXmlHttpRequestObject(), _save_n_trans='_show_progress';
function getXmlHttpRequestObject() {
if (window.XMLHttpRequest) {
return new XMLHttpRequest();
} else if(window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
} else {
alert('Status: Cound not create XmlHttpRequest Object. Consider upgrading your browser.');
}
}
function Save_n_transfer_data() {
document.getElementById( _save_n_trans ).innerHTML = '<img src="/barang/skin/proses_load.gif">';
if ( sendReq.readyState == 4 || sendReq.readyState == 0 ) {
sendReq.open( "POST", "/barang/tes/transfer_data_.php", true );
sendReq.setRequestHeader( "Content-Type", "application/x-www-form-urlencoded" );
sendReq.onreadystatechange=function() {
if ( sendReq.readyState == 4 && sendReq.status == 200 ) {
document.getElementById( 'txt_date_transfer' ).value;
document.getElementById( 'nama_file' ).value;
alert( sendReq.responseText );
document.getElementById( _save_n_trans= ).innerHTML ='';
}
}
var param = 'txt_date_transfer=' + document.getElementById( 'txt_date_transfer' ).value;
param += '&nama_file=' + document.getElementById( 'nama_file' ).value;
sendReq.send( param );
}
}
<?php
require_once( '../opendb.php' );
require_once( '../setudf.php' );
$date_transfer = date_to_db( $_POST['txt_date_transfer'] );
$filename = $_FILES['nama_file']['name'];
$tmpName = $_FILES['nama_file']['tmp_name'];
$fp = fopen( $tmpName, "r" );
$data = fread( $fp, filesize( $tmpName ) );
fclose( $fp );
$output = str_replace( "\t|\t", ",", $data );
$output = explode( "\n", $output );
//--- Check Double Data ----
$double = mysql_query( "SELECT * FROM tb_tes WHERE tgl ='$date_transfer'" );
$hasil = mysql_num_rows( $double );
if( $hasil>=1 ) {
$hapus = "DELETE FROM tb_tes WHERE tgl = '$date_transfer'";
mysql_query( $hapus );
} else {
foreach($output as $var) {
$tmp = explode(",", $var);
//-- Fields yang Diambil Dari File *.txt
$tanggal = $tmp[0];
$id = $tmp[1];
$remaks = $tmp[2];
$sql = "INSERT INTO tb_tes SET tgl='$tanggal', mem_id='$id', remaks='$remaks'";
$trans = mysql_query($sql);
if( $trans )
echo 'Proses transfer Oke! :) '.date_db_to_normal( $date_transfer );
else
echo 'Proses transfer gagal! :(';
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jquery</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/flexslider.css">
<script language="javascript" src="jquery.js"></script>
<script language="javascript">
function Load(data,primid){
$('#loading'+data).empty().append('<img src="img/ajax-loader.gif"/>');
$.post("lo.php",{tipe:data,id:primid},
function(result){
$('#cb'+data).html(result);
$('#loading'+data).empty();
}
);
}
$(function(){
Load('propinsi',0);
$('#cbpropinsi').change(
function(){
if($('#cbpropinsi option:selected').val() !=''){
Load('lokasi',$('#cbpropinsi option:selected').val());
}
}
);
});
</script>
</head>
<body>
<!-- The template uses conditional comments to add wrappers div for ie8 and ie7 - just add .ie or .ie7 prefix to your css selectors when needed -->
<!--[if lt IE 9]><div class="ie"><![endif]-->
<!--[if lt IE 8]><div class="ie7"><![endif]-->
<!-- Header -->
<!-- Server status -->
<header><div class="container_12">
</div></header>
<!-- End server status -->
<!-- Main nav -->
<form class="block-content form" action="set.php" id = "form_admin" name = "form_admin">
<h1>Location Management <a href=""><img src="images/icons/fugue/navigation-180.png" width="16" height="16"> Back</a></h1>
<div class="block-header">Register Location</div>
<div class="columns">
<div class="colx2-left">
<fieldset>
<legend>Profile</legend>
<table cellpadding="3" class="table-padding">
<tr title="Required">
<td><b>Propinsi</b><span class="required">*</span></td>
<td>:</td>
<td><select id="cbpropinsi" name="propinsi" ></select></td>
</tr>
<tr title="Required">
<td><b>Location</b><span class="required">*</span></td>
<td>:</td>
<td><select id="cblokasi" name="lokasi" ></select></td>
</tr>
</table>
</fieldset>
</div>
</div>
<div class="block-footer" style="height:30px;">
<div class="float-right">
<button type="submit"><img src="images/icons/fugue/tick-octagon.png" name = "save" id ="save" onclick="saveForm(); return false;" width="16" height="16"> Save</button>
<button type="reset" class="grey" onclick="this.form.reset();"><img src="images/icons/fugue/arrow-circle.png" width="16" height="16"> Reset</button>
<button type="reset" class="red" onclick="document.location.href='http:register.php';"><img src="images/icons/fugue/cross-white.png" width="16" height="16"> Cancel</button>
</div>
</div>
</form>
<br>
<p>
<span class="required">*</span> Required</p>
</div></div>
</section>
<div class="clear"></div>
</body>
</html>
<?php
mysql_connect ('localhost','','');
mysql_select_db ('java');
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$tipedata = $_POST['tipe'];
$id = $_POST['id'];
switch($tipedata){
case 'lokasi':
$sql='SELECT kode,lokasi FROM '.$tipedata.' WHERE kode_pro = "'.$id.'" ORDER BY lokasi ASC';break;
case 'propinsi':
$sql='SELECT idProp,namaPropinsi FROM '.$tipedata.' ORDER BY namaPropinsi ASC';break;
}
$kueri=mysql_query($sql);
echo '<option value="">--- Select ---</option>';
while($row=mysql_fetch_object($kueri)){
echo '<option value="'.$row->idProp.'">';
switch($tipedata){
case 'lokasi':
echo $row->lokasi;break;
case 'propinsi':
echo $row->namaPropinsi;break;
}
echo '</option>';
}
}
?>
<?php
mysql_connect ("localhost", "root", "rahasia");
mysql_select_db ("java");
$lokasi = $_GET['lokasi'];
$propinsi = $_GET['propinsi'];
$sql = "INSERT INTO hasil VALUES('$propinsi','$lokasi')";
mysql_query($sql) or die ('GAGAL');
?>