$this_file='registrasi.php'; $this_info='Pendaftaran'; //header('Pragma : no-cache'); require_once("lib/template.db.php"); include('lib/class.upload.php'); if (isset($_GET['uid'])) $uid=dekripsi($_GET['uid']); else $uid=dekripsi($_POST['uid']); // [4] Start custom code if (isset($_POST['X'])) { $email=lowsecure($_POST['email']); $nama=strtoupper(lowsecure($_POST['nama'])); $tmp_lahir=strtoupper(lowsecure($_POST['tmp_lahir'])); $tgl_lahir=$_POST['tgl_lahir']; $hp=lowsecure($_POST['hp']); $alamat_rumah=lowsecure($_POST['alamat_rumah']); $kota=lowsecure($_POST['kota']); $alamat_kantor=lowsecure($_POST['alamat_kantor']); $bidang_usaha=lowsecure($_POST['bidang_usaha']); $pica_warna=lowsecure($_POST['pica_warna']); $pica_tahun=lowsecure($_POST['pica_tahun']); $pica_tipe=lowsecure($_POST['pica_tipe']); $pica_jenis=lowsecure($_POST['pica_jenis']); $pica_nopol=lowsecure($_POST['pica_nopol']); $pica_size=lowsecure($_POST['pica_size']); $pica_alasan=lowsecure($_POST['pica_alasan']); $soc_bb=lowsecure($_POST['soc_bb']); $soc_fb=lowsecure($_POST['soc_fb']); $perintah="select * from tm_users_ol where email='$email'"; $hasil=mysql_query($perintah) or die("$perintah"); $data=mysql_fetch_array($hasil); $n=mysql_numrows($hasil); $perintah="select * from tm_users where email='$email'"; $hasil=mysql_query($perintah) or die("$perintah"); $data=mysql_fetch_array($hasil); $n+=mysql_numrows($hasil); if ($n==0) { $empty='Data yang masih kosong:\n'; if (strlen($email)==0) $empty.='- Email\n'; if (strlen($nama)==0) $empty.='- Nama Lengkap\n'; if (strlen($tmp_lahir)==0) $empty.='- Tempat Lahir\n'; if (strlen($hp)==0) $empty.='- No HP\n'; if (strlen($alamat_rumah)==0) $empty.='- Alamat Rumah\n'; if ($kota=='0') $empty.='- Kota\n'; if (strlen($alamat_kantor)==0) $empty.='- Alamat Kantor\n'; if (strlen($bidang_usaha)==0) $empty.='- Bidang Usaha\n'; if ($pica_warna=='0') $empty.='- Warna Mobil Picanto Anda\n'; if ($pica_tahun=='0') $empty.='- Tahun Mobil Picanto Anda\n'; if ($pica_tipe=='0') $empty.='- Tipe Mobil Picanto Anda\n'; if ($pica_jenis=='0') $empty.='- Jenis Mobil Picanto Anda\n'; if (strlen($pica_nopol)==0) $empty.='- No Polisi Mobil Picanto Anda\n'; if ($pica_size=='0') $empty.='- Ukuran Kaos\n'; if (strlen($pica_alasan)==0) $empty.='- Alasan Anda\n'; $file_new_name_body = str_replace("@", "_at_", "$email"); $file_new_name_body = str_replace(".", "_dot_", "$file_new_name_body"); $foo = new Upload($_FILES['mobil']); if ($foo->uploaded) { $foo->file_new_name_body = $file_new_name_body . '_mobil'; $foo->image_resize = true; $foo->image_convert = 'jpg'; $foo->image_x = 600; $foo->image_ratio_y = true; $foo->jpeg_quality = 100; $foo->Process('_pm/'); if ($foo->processed) { //echo 'image renamed, resized x=100'; $foo->Clean(); } else { //echo 'error : ' . $foo->error; $empty.='- ' . $foo->error . '\n'; $mobil='0'; } } else { $empty.='- Foto Mobil Picanto Anda\n'; $mobil='0'; } $foo = new Upload($_FILES['pica']); if ($foo->uploaded) { $foo->file_new_name_body = $file_new_name_body . '_pica'; $foo->image_resize = true; $foo->image_convert = 'jpg'; $foo->image_x = 200; $foo->image_ratio_y = true; $foo->jpeg_quality = 100; $foo->Process('_pm/'); if ($foo->processed) { //echo 'image renamed, resized x=100'; $foo->Clean(); } else { //echo 'error : ' . $foo->error; $empty.='- ' . $foo->error . '\n'; $pica='0'; } } else { $empty.='- Foto Diri Anda\n'; $pica='0'; } if (strlen($empty)>25) { $pica_warna='0'; $pica_tipe='0'; $pica_jenis='0'; } else { unset($empty); $uid_baru=md5("$email::$email"); $perintah="insert into tm_users_ol values('$uid_baru',NULL,NULL,'$email',old_password('$email'),'$email','$nama','$tmp_lahir','$tgl_lahir','$email','$hp','$alamat_rumah','$kota','$alamat_kantor','$bidang_usaha',$pica_warna,$pica_tahun,$pica_tipe,$pica_jenis,'$pica_nopol','$pica_alasan','$pica_size','$soc_bb','$soc_fb',NULL,NULL,NULL,NULL,0,1,0,now(),'$nama')"; mysql_query($perintah);// OR die(mysql_error()); // MAILER $mail_untuk='bendahara@picanto-indonesia.com'; $mail_subject="[CEK TRANSFER] Calon PM Baru: $nama dari $kota"; $mail_subject=addslashes($mail_subject); $APP_MAILER_BODY=''; $APP_MAILER_BODY=$APP_MAILER_BODY . "