本文整理汇总了PHP中Ubah函数的典型用法代码示例。如果您正苦于以下问题:PHP Ubah函数的具体用法?PHP Ubah怎么用?PHP Ubah使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Ubah函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
$TxtJudul = trim($_POST['TxtJudul']);
$TxtIsi = trim($_POST['TxtIsi']);
$TxtTgl = trim($_POST['TxtTgl']);
$TxtPengirim = trim($_POST['TxtPengirim']);
$TxtPage = trim($_POST['TxtPage']);
$TxtGambar = "upload/" . $_FILES['TxtGambar']['name'];
move_uploaded_file($_FILES['TxtGambar']['tmp_name'], $TxtGambar);
if (!empty($TxtJudul) && !empty($TxtIsi) && !empty($TxtTgl) && !empty($TxtPengirim) && !empty($TxtPage)) {
switch ($_GET['action']) {
case "TAMBAH":
/*echo 'kode='.$TxtKode.',nama='.$TxtNmBrng.',sub='.$TxtSub.',merk='.$TxtMerk.',spec='.$TxtSpec.',harga='.$TxtHarga.',stok='.$TxtStok.',berat='.$TxtBerat.',file='.$TxtGambar.',tgl='.$TxtTgl;*/
Tambah(" artikel ", " '{$TxtId}','{$TxtJudul}','{$TxtIsi}','{$TxtTgl}','{$TxtPengirim}','{$TxtPage}','{$TxtGambar}'", " artikel ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=ListArtikel'></head><body></body></html>";
break;
case "UBAH":
Ubah(" artikel ", " judul='{$TxtJudul}',isi='{$TxtIsi}',post='{$TxtTgl}',pengirim='{$TxtPengirim}',page='{$TxtPage}',foto='{$TxtGambar}' WHERE id='" . $_GET['id'] . "' ", "artikel");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListArtikel'></head><body></body></html>";
break;
}
} else {
if (empty($TxtJudul) || empty($TxtIsi) || empty($TxtTgl) || empty($TxtPengirim) || empty($TxtPage)) {
echo '<b>Semua field harus isi..!!</b> <br>';
/*echo 'id='.$TxtId.',judul='.$TxtJudul.',isi='.$TxtIsi.',tgl='.$TxtTgl.',pengirim='.$TxtPengirim.',page='.$TxtPage.',gambar='.$TxtGambar;*/
}
}
}
?>
</form>
</div>
</div>
示例2: bukaquery
$_sql = "SELECT * FROM set_tahun";
$hasil = bukaquery($_sql);
$baris = mysql_fetch_row($hasil);
$tahun = $baris[0];
$bulan = $baris[1];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$persen = "-";
if (!empty($id) && !empty($persen)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" pembagian_warung ", "'{$id}','{$persen}' ", " Penerima Warung ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputPenerimaWarung&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" pembagian_warung ", "persen='{$persen}' WHERE id='{$id}' ", " Penerima Warung ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListWarung'></head><body></body></html>";
break;
}
} else {
if (empty($id) || empty($persen)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例3: trim
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$nik = trim($_POST['nik']);
$nama = trim($_POST['nama']);
$indek = trim($_POST['indek']);
$pengurang = trim($_POST['pengurang']);
$cuti_diambil = trim($_POST['cuti_diambil']);
if (!empty($pengurang) && !empty($indek)) {
switch ($_GET['action']) {
case "UBAH":
Ubah(" pegawai ", " pengurang='{$pengurang}',indek='{$indek}',cuti_diambil='{$cuti_diambil}' WHERE id='" . $_GET['id'] . "' ", " Index Pegawai ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=EditIndexPegawai&action=UBAH&id={$id}'></head><body></body></html>";
break;
}
} else {
if (empty($indek) || empty($pengurang)) {
echo '<b>Semua field harus isi..!!</b>';
/*echo " nik='$nik',nama='$nama',jk='$jk',jbtn='$jbtn',jnj_jabatan='$jnj_jabatan',departemen='$departemen',
bidang='$bidang',stts_wp='$stts_wp',stts_kerja='$stts_kerja',npwp='$npwp',pendidikan='$pendidikan',
gapok='$gapok',tmp_lahir='$tmp_lahir',tgl_lahir='$tgl_lahir',alamat='$alamat',kota='$kota',
mulai_kerja='$mulai_kerja',ms_kerja='$ms_kerja',indek='$indek',indexins='$indexins',bpd='$bpd',
rekening='$rekening' ";*/
}
}
}
?>
示例4: trim
$tahun = $baris[0];
$bulan = $baris[1];
if (isset($BtnSimpan)) {
$pendapatan_resume = trim($_POST['pendapatan_resume']);
$persen_rs = trim($_POST['persen_rs']);
$bagian_rs = $persen_rs / 100 * $pendapatan_resume;
$persen_kry = trim($_POST['persen_kry']);
$bagian_kry = $persen_kry / 100 * $pendapatan_resume;
if (!empty($pendapatan_resume) && !empty($persen_rs) && !empty($persen_kry)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" set_resume ", "'{$tahun}','{$bulan}','{$pendapatan_resume}','{$persen_rs}','{$bagian_rs}','{$persen_kry}','{$bagian_kry}' ", " Pendapatan Resume");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputResume&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" set_resume ", "pendapatan_resume='{$pendapatan_resume}',persen_rs='{$persen_rs}',bagian_rs='{$bagian_rs}',persen_kry='{$persen_kry}',\r\n bagian_kry='{$bagian_kry}' WHERE tahun='{$tahun}' and bulan='{$bulan}' ", " Pendapatan Resume");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListResume'></head><body></body></html>";
break;
}
} else {
if (empty($pendapatan_resume) || empty($persen_rs) || empty($persen_kry)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例5: trim
</tr>
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$TxtKode = trim($_POST['TxtKode']);
$TxtJabatan = trim($_POST['TxtJabatan']);
if (!empty($TxtKode) && !empty($TxtJabatan)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" jbtn_struktural ", " '{$TxtKode}','{$TxtJabatan}' ", " Jabatan Struktural ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputStruktural&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" jbtn_struktural ", " nama='{$TxtJabatan}' WHERE kode='" . $_GET['kode'] . "' ", "jabatan struktural");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListStruktural'></head><body></body></html>";
break;
}
} else {
if (empty($TxtKode) || empty($TxtJabatan)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例6: trim
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$nama = trim($_POST['nama']);
$jm = trim($_POST['jm']);
$jns = trim($_POST['jns']);
if (!empty($nama) && !empty($jm)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" master_tindakan ", "'','{$nama}','{$jm}','{$jns}'", " Master Tindakan ");
echo "<meta http-equiv='refresh' content='1;URL=?act=DetailTindakanRj&action=TAMBAH&nama='{$nama}'>";
break;
case "UBAH":
Ubah(" master_tindakan ", "nama='{$nama}',jm='{$jm}',jns='{$jns}' WHERE id='{$id}' ", " Master Tindakan ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=DetailTindakanRj&action=TAMBAH&nama='{$nama}'></head><body></body></html>";
break;
}
} else {
if (empty($nama) || empty($jm)) {
echo 'Semua field harus isi..!!!';
}
}
}
?>
<div style="width: 598px; height: 400px; overflow: auto; padding: 5px">
<?php
$awal = $_GET['awal'];
if (empty($awal)) {
$awal = 0;
示例7: trim
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$nama = trim($_POST['nama']);
$tnj = trim($_POST['tnj']);
if (!empty($nama) && !empty($tnj)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" master_tunjangan_harian ", "'','{$nama}','{$tnj}'", " Master Tunjangan Harian ");
echo "<meta http-equiv='refresh' content='1;URL=?act=DetailTunjanganHarian&action=TAMBAH&nama='{$nama}'>";
break;
case "UBAH":
Ubah(" master_tunjangan_harian ", "tnj='{$tnj}',nama='{$nama}' WHERE id='{$id}' ", " Master Tunjangan Harian ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=DetailTunjanganHarian&action=TAMBAH&nama='{$nama}'></head><body></body></html>";
break;
}
} else {
if (empty($nama) || empty($tnj)) {
echo 'Semua field harus isi..!!!';
}
}
}
?>
<div style="width: 598px; height: 300px; overflow: auto; padding: 5px">
<?php
$awal = $_GET['awal'];
if (empty($awal)) {
$awal = 0;
示例8: trim
</tr>
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$TxtKode = trim($_POST['TxtKode']);
$TxtNama = trim($_POST['TxtNama']);
if (!empty($TxtKode) && !empty($TxtNama)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" dosen_jurusan ", " '{$TxtKode}','{$TxtNama}' ", " Dosen Jurusan ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputUnitkerja&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" dosen_jurusan ", " nama='{$TxtNama}' WHERE kode='" . $_GET['kode'] . "' ", " Dosen Jurusan ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListUnitkerja'></head><body></body></html>";
break;
}
} else {
if (empty($TxtKode) || empty($TxtNama)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例9: trim
$tahun = $baris[0];
$bulan = $baris[1];
if (isset($BtnSimpan)) {
$pendapatan_warung = trim($_POST['pendapatan_warung']);
$persen_rs = trim($_POST['persen_rs']);
$bagian_rs = $persen_rs / 100 * $pendapatan_warung;
$persen_kry = trim($_POST['persen_kry']);
$bagian_kry = $persen_kry / 100 * $pendapatan_warung;
if (!empty($pendapatan_warung) && !empty($persen_rs) && !empty($persen_kry)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" set_warung ", "'{$tahun}','{$bulan}','{$pendapatan_warung}','{$persen_rs}','{$bagian_rs}','{$persen_kry}','{$bagian_kry}' ", " Pendapatan Warung");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputWarung&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" set_warung ", "pendapatan_warung='{$pendapatan_warung}',persen_rs='{$persen_rs}',bagian_rs='{$bagian_rs}',persen_kry='{$persen_kry}',\r\n bagian_kry='{$bagian_kry}' WHERE tahun='{$tahun}' and bulan='{$bulan}' ", " Pendapatan Warung");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListWarung'></head><body></body></html>";
break;
}
} else {
if (empty($pendapatan_warung) || empty($persen_rs) || empty($persen_kry)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例10: trim
</tr>
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$TxtKode = trim($_POST['TxtKode']);
$TxtNama = trim($_POST['TxtNama']);
if (!empty($TxtKode) && !empty($TxtNama)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" fungsional ", " '{$TxtKode}','{$TxtNama}' ", " Jabatan Fungsional ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputFungsional&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" fungsional ", " nama='{$TxtNama}' WHERE kode='" . $_GET['kode'] . "' ", "jabatan fungsional");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListFungsional'></head><body></body></html>";
break;
}
} else {
if (empty($TxtKode) || empty($TxtNama)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例11: bukaquery
$_sql = "SELECT * FROM set_tahun";
$hasil = bukaquery($_sql);
$baris = mysql_fetch_row($hasil);
$tahun = $baris[0];
$bulan = $baris[1];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$persen = trim($_POST['persen']);
if (!empty($id) && !empty($persen)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" pembagian_tuslah ", "'{$id}','{$persen}' ", " Porsi Tuslah ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputPenerimaTuslah&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" pembagian_tuslah ", "persen='{$persen}' WHERE id='{$id}' ", " Porsi Tuslah ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListTuslah'></head><body></body></html>";
break;
}
} else {
if (empty($id) || empty($persen)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例12: trim
</tr>
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="SIMPAN"> <input name=BtnKosong type=reset class="button" value="KOSONG"></div><br>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$TxtKode = trim($_POST['TxtKode']);
$TxtNama = trim($_POST['TxtNama']);
if (!empty($TxtKode) && !empty($TxtNama)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" sub_unit_kerja ", " '{$TxtKode}','{$TxtNama}' ", " sub unit kerja ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputSubunit&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" sub_unit_kerja ", " nama='{$TxtNama}' WHERE kode='" . $_GET['kode'] . "' ", " sub unit kerja ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListSubunit'></head><body></body></html>";
break;
}
} else {
if (empty($TxtKode) || empty($TxtNama)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
示例13: trim
<td width="67%"><input name="keterangan" class="text" onkeydown="setDefault(this, document.getElementById('MsgIsi2'));" type=text id="TxtIsi2" class="inputbox" value="<?php
echo $keterangan;
?>
" size="40" maxlength="100"/>
<span id="MsgIsi2" style="color:#CC0000; font-size:10px;"></span>
</td>
</tr>
</table>
<div align="center"><input name=BtnSimpan type=submit class="button" value="Simpan"/> <input name=BtnKosong type=reset class="button" value="Kosong"/></div><br/>
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$keterangan = trim($_POST['keterangan']);
if (!empty($id) && !empty($keterangan)) {
Ubah(" rekap_presensi ", " keterangan='{$keterangan}' WHERE id='{$id}' ", " Keterangan ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?page=TampilPulang'></head><body></body></html>";
} else {
if (empty($id) || empty($keterangan)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>
</div>
</div>
示例14: trim
<?php
$BtnSimpan = $_POST['BtnSimpan'];
if (isset($BtnSimpan)) {
$tingkat = trim($_POST['tingkat']);
$indek = trim($_POST['indek']);
$gapok1 = trim($_POST['gapok1']);
$gapok2 = trim($_POST['gapok2']);
$gapok3 = trim($_POST['gapok3']);
if (!empty($tingkat) && !empty($indek) && !empty($gapok1) && !empty($gapok2) && !empty($gapok3)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" pendidikan ", " '{$tingkat}','{$indek}','{$gapok1}','{$gapok2}','{$gapok3}' ", " Pendidikan ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputPendidikan&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" pendidikan ", " tingkat='{$tingkat}',indek='{$indek}',gapok1='{$gapok1}',gapok2='{$gapok2}',\r\n gapok3='{$gapok3}' WHERE tingkat='{$tingkat}' ", "Pendidikan");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListPendidikan'></head><body></body></html>";
break;
}
} else {
if (empty($tingkat) || empty($indek) || empty($gapok1) || empty($gapok2) || empty($gapok3)) {
echo '<b>Semua field harus isi..!!</b> ';
//echo "1'$tingkat',2'$indek',3'$gapok1',4'$gapok2',5'$gapok3'";
}
}
}
?>
</form>
</div>
</div>
示例15: bukaquery
$_sql = "SELECT * FROM set_tahun";
$hasil = bukaquery($_sql);
$baris = mysql_fetch_row($hasil);
$tahun = $baris[0];
$bulan = $baris[1];
if (isset($BtnSimpan)) {
$id = trim($_POST['id']);
$persen = trim($_POST['persen']);
if (!empty($id) && !empty($persen)) {
switch ($_GET['action']) {
case "TAMBAH":
Tambah(" pembagian_resume ", "'{$id}','{$persen}' ", " Porsi Resume ");
echo "<html><head><title></title><meta http-equiv='refresh' content='1;URL=?act=InputPenerimaResume&action=TAMBAH'></head><body></body></html>";
break;
case "UBAH":
Ubah(" pembagian_resume ", "persen='{$persen}' WHERE id='{$id}' ", " Porsi Resume ");
echo "<html><head><title></title><meta http-equiv='refresh' content='2;URL=?act=ListResume'></head><body></body></html>";
break;
}
} else {
if (empty($id) || empty($persen)) {
echo '<b>Semua field harus isi..!!</b>';
}
}
}
?>
</form>
</div>
</div>
</div>