本文整理汇总了PHP中int_filter函数的典型用法代码示例。如果您正苦于以下问题:PHP int_filter函数的具体用法?PHP int_filter怎么用?PHP int_filter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了int_filter函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: int_filter
$pilihan = $datas2['id'] == $pertemuan ? "selected" : '';
$admin .= '<option value="' . $datas2['id'] . '" ' . $pilihan . '>' . $datas2['pertemuan'] . '</option>';
}
$admin .= '</select></td>
</tr>';
$admin .= "<tr><td><label><b>Judul</b></label></td><td>";
$admin .= '<input type="text" name="judul" class="form-control"value="' . $judul . '"></td></tr>';
$admin .= "<tr><td>\n<label>Isi</label></td><td><textarea name='konten' id='textarea1'>{$konten}</textarea></td></tr>";
$admin .= "<tr><td>\n<label><b>File Materi </b></label></td><td><input type='file' name='gambar'> {$mateributton}\n<input type='hidden' name='materilama' value='{$materi}'>\n</td></tr>";
$admin .= "\n<tr><td></td><td>\n<input type='hidden' name='guru' value='{$guru}'>\n<input type='hidden' name='idmateri' value='{$idmateri}'>\n<input type='submit'class='btn btn-success' value='Update' name='submit'>\n</td>";
$admin .= "</tr></table>\n</form>";
$admin .= '</div>';
}
if ($_GET['aksi'] == "detail") {
$id = int_filter($_GET['id']);
$idmateri = int_filter($_GET['materi']);
$admin .= '<div class="panel-heading"><b>Materi</b></div>';
$hasil = $koneksi_db->sql_query("SELECT * FROM kursus_setting where id='{$id}' ");
$data = $koneksi_db->sql_fetchrow($hasil);
$idkursus = $data['id'];
$guru = $data['guru'];
$mapel = $data['mapel'];
$tahun = $data['tahun'];
$admin .= '
<table cellspacing="0" cellpadding="0"class="table table-striped table-hover">
<tr>
<td>Nama Guru</td>
<td>:</td>
<td>' . getnamaguru($guru) . '</td>
<td>Tahun</td>
<td>:</td>
示例2: int_filter
if(!isNaN(i)) {
if(b[i].getAttribute("rel")==v) {b[i].style.backgroundColor="#fff";b[i].style.borderBottom="1px solid #fff";}
else {b[i].style.backgroundColor="#ccc";b[i].style.borderBottom="1px solid #000";}
}
}
for(i in t) {
if(!isNaN(i)) {
if(t[i].getAttribute("rel")==v) {t[i].style.display="";}
else {t[i].style.display="none";}
}
}
}
</script>
<?php
$id = int_filter($_GET['id']);
$idujian = int_filter($_GET['idujian']);
?>
<form id="form" method="post" action="mod/ujiantest/admin/answer.php">
<div style="margin:0 0 2px 5px;">
<span class="tabbutton" onclick="settab(this);" rel="1">Page 1</span>
<span class="tabbutton" onclick="settab(this);" rel="2">Page 2</span>
Sisa waktu : <span id="timer"></span>
</div>
<div class="tab" rel="1">
1. 1 + 1 = ...<br>
<input type="radio" name="radio1" value="a" onclick="send(this)"> 4<br>
<input type="radio" name="radio1" value="b" onclick="send(this)"> 7<br>
<input type="radio" name="radio1" value="c" onclick="send(this)"> 2<br>
<input type="radio" name="radio1" value="d" onclick="send(this)"> 1<br>
<input type="radio" name="radio1" value="e" onclick="send(this)"> 9<br><br>
2. 7 x 1 = ...<br>
示例3: getlombapersiswa
$nisn = $data['nisn'];
$hasillomba = $data['hasillomba'];
$datalomba = getlombapersiswa($replid);
$admin .= '<tr>
<td>' . $nis . '</td>
<td>' . $nisn . '</td>
<td>' . $nama . '</td>
<td>' . $datalomba . '</td>
<td><a href="?pilih=siswalomba&mod=yes&aksi=add&siswa=' . $data['replid'] . '" onclick="return confirm(\'Apakah Anda Yakin Ingin menambah Prestasi Siswa ?\')"><span class="btn btn-primary">Tambah</span></a> <a href="?pilih=siswalomba&mod=yes&aksi=cetak&idsiswa=' . $data['replid'] . '"><span class="btn btn-success">Cetak</span></a></td>
</tr>';
}
$admin .= '</tbody></table>';
$admin .= '</div>';
}
if ($_GET['aksi'] == 'cetak') {
$idsiswa = int_filter($_GET['idsiswa']);
if (isset($_POST['cetak'])) {
$tgl1 = $_POST['tgl1'];
$tgl2 = $_POST['tgl2'];
$admin .= '<script language=javascript>
window.open("./cetaksiswalomba.php?idsiswa=' . $idsiswa . '&tgl1=' . $tgl1 . '&tgl2=' . $tgl2 . '", "_blank", "toolbar=yes, scrollbars=yes, resizable=yes, top=50, left=200, width=800, height=600");
</script>';
}
$admin .= '<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">Cari Siswa</h3></div>';
$admin .= '
<form method="post" action="" class="form-inline"id="posts"class="form-inline">
<table class="table table-striped table-hover">
<tr>
<td>Siswa</td>
<td>:</td>
示例4: header
<?php
if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
header("HTTP/1.1 404 Not Found");
exit;
}
$content = '<h4 class="bg">Calender Event</h4>';
$seldate = (int) int_filter($_GET['sel_date']);
$t = getdate($seldate);
$_GET['waktu_akhir'] = isset($_GET['waktu_akhir']) ? $_GET['waktu_akhir'] : null;
$u = getdate((int) int_filter($_GET['waktu_akhir']));
if (isset($_GET['sel_date'])) {
$content .= '<div class="border">';
$content .= '<table width="100%">';
$JUDULCAL = array();
$TMPpesan = array();
$awalbulandengannol = $t['mon'] >= 10 ? $t['mon'] : '0' . $t['mon'];
$varwaktucalender = $t['year'] . '-' . $awalbulandengannol . '-' . $t['mday'];
$awalbulandengannol2 = $u['mon'] >= 10 ? $u['mon'] : '0' . $u['mon'];
$varwaktucalender2 = $u['year'] . '-' . $awalbulandengannol2 . '-' . $u['mday'];
$cekdate = mysql_query("SELECT `judul`,`waktu_mulai`,`waktu_akhir`,`isi` FROM `tbl_kalender` WHERE `waktu_mulai` = '{$varwaktucalender}' OR `waktu_akhir` = '{$varwaktucalender2}' ORDER BY `waktu_mulai`");
while ($getdate = mysql_fetch_assoc($cekdate)) {
// print_r($getdate);
$WKTMULAI = $getdate['waktu_mulai'];
$WKTAKHIR = $getdate['waktu_akhir'];
$GTTGL = (int) substr($WKTMULAI, -2, 2);
$TGLMULAI[$GTTGL] = $GTTGL;
//
$JUDULCAL[$GTTGL] = $getdate['judul'];
$idssss = '<b>' . $getdate['judul'] . '</b><br><small>Periode Awal : ' . converttgl($WKTMULAI) . '<br>Periode Akhir : ' . converttgl($WKTAKHIR) . '</small>
<br>' . limitTXT($getdate['isi'], 150) . '';
示例5: int_filter
<td></td>
<td></td>
<td>
<input type="submit" value="Simpan" name="submit"class="btn btn-success"></td>
</tr>
</table>
</form></div>';
}
if($_GET['aksi']==""){
if(isset($_POST['submit'])){
$jenjang = $_POST['jenjang'];
$kode = $_POST['kode'];
$nama = $_POST['nama'];
$jenis = $_POST['jenis'];
$hargajual = int_filter($_POST['hargajual']);
$error = '';
if ($koneksi_db->sql_numrows($koneksi_db->sql_query("SELECT jenjang FROM pos_produkbiaya WHERE jenjang='$jenjang' and jenis='$jenis' and nama='$nama' or kode='$kode'")) > 0) $error .= "Error: Biaya sudah terdaftar , silahkan ulangi.<br />";
if ($error){
$admin .= '<div class="error">'.$error.'</div>';
}else{
$hasil = mysql_query( "INSERT INTO `pos_produkbiaya` VALUES ('','$jenis','$jenjang','$kode','$nama','$hargajual')" );
if($hasil){
$admin .= '<div class="sukses"><b>Berhasil di Buat.</b></div>';
}else{
$admin .= '<div class="error"><b> Gagal di Buat.</b></div>';
}
unset($nama);
}
}
示例6: int_filter
if ($_GET['aksi'] == 'delhistorynilai') {
global $koneksi_db;
$user = $_GET['user'];
$idmapel = int_filter($_GET['idmapel']);
$hasil = $koneksi_db->sql_query("DELETE FROM `ujiannilai` WHERE `mapel`='{$idmapel}' and `user` ='{$user}'");
if ($hasil) {
$admin .= '<div class="sukses">Semua Nilai History berhasil dihapus! .</div>';
$style_include[] = '<meta http-equiv="refresh" content="1; url=admin.php?pilih=ujian&mod=yes&aksi=nilaihistoryujian" />';
} else {
$admin .= '<div class="error">Nilai History gagal dihapus! .</div>';
}
}
if ($_GET['aksi'] == 'delhistorynilaisiswa') {
global $koneksi_db;
$user = $_GET['user'];
$idmapel = int_filter($_GET['idmapel']);
$hasil = $koneksi_db->sql_query("DELETE FROM `ujiannilai` WHERE `mapel`='{$idmapel}' and `user` ='{$user}'");
if ($hasil) {
$admin .= '<div class="sukses">Semua Nilai History berhasil dihapus! .</div>';
$style_include[] = '<meta http-equiv="refresh" content="1; url=admin.php?pilih=ujian&mod=yes&aksi=nilaiujian" />';
} else {
$admin .= '<div class="error">Nilai History gagal dihapus! .</div>';
}
}
/************************/
if ($_GET['aksi'] == 'setting') {
$admin .= '<div class="box">
<div class="box-header">
<h3 class="box-title">Setting</h3>
</div><!-- /.box-header -->
<div class="box-body">';
示例7: rgb
$gambar = 'photo-default.jpg';
}
$admin .= '<tr><td align=center>
<img src="mod/photo/images/normal/' . $gambar . '" alt="' . $gambar . '" style="margin-right: 10px; margin-top: 5px; padding: 3px; border: 1px solid rgb(204, 204, 204); background: none repeat scroll 0% 0% rgb(255, 255, 255); float: left;" border="0">
</td></tr><tr><td>
<div class=border>
kategori : <a href="admin.php?pilih=photo&mod=yes&aksi=photo&kid=' . $kategori . '">' . $kat2 . '</a><br>
judul : ' . $judul . '<br>
keterangan : ' . $ket . '<br>
</div><div align=right>
<a href="admin.php?pilih=photo&mod=yes&aksi=cover_photo&id=' . $id . '&kid=' . $kategori . '"><img src="images/cover.gif">
<a href="admin.php?pilih=photo&mod=yes&aksi=edit_photo&id=' . $id . '"><img src="images/edit.gif"></a>
<a href="admin.php?pilih=photo&mod=yes&aksi=hapus_photo&id=' . $id . '"><img src="images/delete.gif"></a></div>
</td></tr>';
}
$admin .= '</table>';
$admin .= '</div>';
}
if ($_GET['aksi'] == 'cover_photo') {
$id = int_filter($_GET['id']);
$kid = int_filter($_GET['kid']);
$s = $koneksi_db->sql_query("SELECT * FROM photo WHERE id={$id}");
$data = mysql_fetch_array($s);
$gambar = $data['gambar'];
$cek = $koneksi_db->sql_query("update kat_photo set gambar = '{$gambar}' WHERE kid = '{$kid}'");
if ($cek) {
$admin .= '<div class="sukses">Photo Dengan ID = ' . $id . ' Berhasil Dibuat Cover = ' . $kid . '</div>';
$style_include[] = '<meta http-equiv="refresh" content="3; url=admin.php?pilih=photo&mod=yes" />';
}
}
echo $admin;
示例8: int_filter
}
if ($_GET['aksi'] == 'cover_photo') {
$id = int_filter($_GET['id']);
$kid = int_filter($_GET['kid']);
$s = $koneksi_db->sql_query("SELECT * FROM photo WHERE id={$id}");
$data = mysql_fetch_array($s);
$gambar = $data['gambar'];
$cek = $koneksi_db->sql_query("update photo_kat set gambar = '{$gambar}' WHERE kid = '{$kid}'");
if ($cek) {
$admin .= '<div class="sukses">Photo Dengan ID = ' . $id . ' Berhasil Dibuat Cover = ' . $kid . '</div>';
$style_include[] = '<meta http-equiv="refresh" content="3; url=admin.php?pilih=photo&mod=yes" />';
}
}
if ($_GET['aksi'] == "editthumb") {
$id = int_filter($_GET['id']);
$topik = int_filter($_GET['topik']);
if (isset($_POST['submit'])) {
define("GIS_GIF", 1);
define("GIS_JPG", 2);
define("GIS_PNG", 3);
define("GIS_SWF", 4);
include "includes/hft_image.php";
$namafile_name = $_FILES['gambar']['name'];
if (!empty($namafile_name)) {
$files = $_FILES['gambar']['name'];
$tmp_files = $_FILES['gambar']['tmp_name'];
$namagambar = 'photo-default.jpg';
$tempnews = 'mod/photo/images/temp/';
$uploaddir = $tempnews . $namagambar;
$uploads = move_uploaded_file($tmp_files, $uploaddir);
if (file_exists($uploaddir)) {
示例9: url
<?php
if (!defined('AURACMS_admin')) {
Header("Location: ../../../index.php");
exit;
}
if (!cek_login ()){
$admin .='<p class="judul">Access Denied !!!!!!</p>';
exit;
}
if (isset ($_GET['pg'])) $pg = int_filter ($_GET['pg']); else $pg = 0;
if (isset ($_GET['stg'])) $stg = int_filter ($_GET['stg']); else $stg = 0;
if (isset ($_GET['offset'])) $offset = int_filter ($_GET['offset']); else $offset = 0;
$style_include[] = <<<style
<style type="text/css">
@import url("mod/news/css/news.css");
</style>
style;
$JS_SCRIPT = <<<js
<!-- TinyMCE -->
<script type="text/javascript" src="js/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="js/tinymce/jscripts/tiny_mce/init.js"></script>
<script type="text/javascript">
if (typeof tinyMCE == 'object') {
tinyMCE.init({
示例10: int_filter
$admin .= '</table>';
$admin .= '<div id="responseajax"></div>';
}
######################
## Tampil Testimoni
######################
if ($_GET['aksi'] == 'tampil') {
if ($_GET['tampil'] == 'tidak') {
$id = int_filter($_GET['id']);
$koneksi_db->sql_query("UPDATE testimonial SET status='tidak' WHERE pid='{$id}'");
}
if ($_GET['tampil'] == 'ya') {
$id = int_filter($_GET['id']);
$koneksi_db->sql_query("UPDATE testimonial SET status='ya' WHERE pid='{$id}'");
}
header("location:?pilih=testimonial&mod=yes");
}
######################
## Hapus Testimoni
######################
if ($_GET['aksi'] == 'hapus_testimonial') {
$pid = int_filter($_GET['pid']);
$hapus = mysql_query("DELETE FROM `testimonial` WHERE `pid`='{$pid}'");
if ($hapus) {
$tengah .= '<div class="sukses">Testimonial Dengan ID = ' . $pid . ' Berhasil Dihapus</div>';
//$style_include[] ='<meta http-equiv="refresh" content="1; url=?pilih=testimonial&mod=yes" />';
} else {
$tengah .= '<div class="error">Testimonial Dengan ID = ' . $pid . ' Gagal dihapus</div>';
}
}
echo $admin;
示例11: int_filter
$pos = int_filter ($_GET['pos']);
unset($_SESSION['product_id'][$pos]);
header ("location:$url_situs/shop.html");
}
##########################
# EDIT ORDER
##########################
if($_GET['aksi'] == 'edit'){
$pos = int_filter ($_GET['pos']);
if (isset ($_POST['submit'])){
if(empty($_POST['jumlah'])){
$totaled = $jumlah_iwan;
}else{
$totaled = int_filter ($_POST['jumlah']);
}
$total = $_POST['harga'] * $totaled;
$_SESSION['product_id'][$pos]['jumlah'] = $totaled;
$_SESSION['product_id'][$pos]['total'] = $total;
header ("location:$url_situs/shop.html");
exit;
}
$new_array = Array ();
foreach ($_SESSION['product_id'] as $key=>$val){
if ($pos == $key){
$id_iwan = $_SESSION['product_id'][$key]['product_id'];
$jumlah_iwan = $_SESSION['product_id'][$key]['jumlah'];
break;
示例12: count
$jmljwb = count($PJAWABAN_TMP);
$PJAWABAN_TMP[$pilihan]++;
$PJAWABAN = '';
for ($i = 0; $i < $jmljwb; $i++) {
$PJAWABAN .= $PJAWABAN_TMP[$i] . "#";
}
$PJAWABAN = substr_replace($PJAWABAN, "", -1, 1);
//-----------------------------------------------
//---- simpan data terbaru
$query2 = "UPDATE `polling` SET `pjawaban`='{$PJAWABAN}' WHERE `pid`='{$pid}'";
mysql_query($query2);
// ----------------------------------------------------------------------
}
}
if (isset($_POST['pid'])) {
$pid = int_filter($_POST['pid']);
//$type_poll = 'chart';
$data_s = mysql_fetch_array(mysql_query("SELECT * FROM polling WHERE pid='{$pid}'"));
//tampilkan data terbaru
$hasil = mysql_query("SELECT * FROM polling WHERE pid='{$pid}'");
$data = mysql_fetch_array($hasil);
$PJUDUL = $data["pjudul"];
$PPILIHAN = explode("#", $data["ppilihan"]);
$PJAWABAN = explode("#", $data["pjawaban"]);
$jmlpil = count($PPILIHAN);
$JMLVOTE = 0;
for ($i = 0; $i < $jmlpil; $i++) {
$JMLVOTE = $JMLVOTE + $PJAWABAN[$i];
}
// Jika tidak ada vote, tetapkan jumlah vote = 1 untuk menghindari pembagian dengan nol
if ($JMLVOTE == 0) {
示例13: int_filter
} );
</script>
js;
$script_include[] = $JS_SCRIPT;
$admin .= '<h4 class="page-header">Administrasi Siswa - Kelas</h4>';
if ($_GET['aksi'] == 'del') {
global $koneksi_db;
$id = int_filter($_GET['id']);
$hasil = $koneksi_db->sql_query("DELETE FROM `akad_siswakelas` WHERE `replid`='{$id}'");
if ($hasil) {
$admin .= '<div class="sukses">Siswa Kelas tersebut berhasil dihapus! .</div>';
$style_include[] = '<meta http-equiv="refresh" content="1; url=admin.php?pilih=siswakelas&mod=yes" />';
}
}
if ($_GET['aksi'] == "addsiswa") {
$idkelas = int_filter($_GET['idkelas']);
$query = mysql_query("SELECT * FROM `akad_kelas` WHERE `replid`='{$idkelas}'");
$data = mysql_fetch_array($query);
$idkelas = $data['replid'];
$lokasi = $data['departemen'];
$kelas = $data['kelas'];
$tingkat = $data['subtingkat'];
$kapasitas = $data['kapasitas'];
$keterangan = $data['keterangan'];
$ts = $data['ts'];
$tahunajaran = $data['tahunajaran'];
$walikelas = $data['walikelas'];
$jenjang = $data['jenjang'];
$admin .= '<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title">Kelas</h3></div>';
$admin .= '
示例14: htmlentities
$limit = 10;
$s1 = '';
$query = htmlentities($query);
$hasil = $koneksi_db->sql_query("SELECT * FROM artikel WHERE ((judul LIKE '%{$query}%' OR konten LIKE '%{$query}%' OR user LIKE '%{$query}%')AND publikasi=1)");
$jumlah = $koneksi_db->sql_numrows($hasil);
if ($jumlah < 1) {
$s1 = "tidak ada";
}
$a = new paging($limit);
if (!$s1) {
$tengah .= '<div class="border">';
$tengah .= "Yang dicari <b>\"{$query}\"</b>";
$tengah .= '</div>';
$offset = int_filter(@$_GET['offset']);
$pg = int_filter(@$_GET['pg']);
$stg = int_filter(@$_GET['stg']);
$hasil2 = $koneksi_db->sql_query("SELECT * FROM artikel WHERE ((judul LIKE '%{$query}%' OR konten LIKE '%{$query}%' OR user LIKE '%{$query}%')AND publikasi=1) ORDER By id LIMIT {$offset},{$limit}");
$tengah .= '<div class="border">';
$tengah .= "Ditemukan <b>" . $jumlah . "</b> artikel mengandung kata: <b>{$query}</b>";
$tengah .= '</div>';
$tengah .= '<div class="border">';
while ($data = $koneksi_db->sql_fetchrow($hasil2)) {
$tengah .= "<p class=\"konten\"><a href=\"?pilih=news&mod=yes&aksi=lihat&id={$data['0']}\">{$data['1']}</a><br />";
$data[5] = datetimes($data['tgl']);
$tengah .= "<span class=\"keterangan\">{$data['5']} - by : <a href=\"?pilih=news&mod=yes&aksi=pesan&id={$data['0']}\">{$data['3']}</a></span></p>";
}
$tengah .= '</div>';
if ($jumlah >= 10) {
if (empty($_GET['offset']) and !isset($_GET['offset'])) {
$offset = 0;
}
示例15: int_filter
<?php
include 'includes/config.php';
include 'includes/mysql.php';
$bulan = int_filter($_GET['bulan']);
$tahun = int_filter($_GET['tahun']);
$pbulan = getbulan($bulan);
global $koneksi_db, $url_situs;
echo "<html><head><title>Laporan Penggajian Bulanan '.{$pbulan}.'-'.{$tahun}.'</title>";
//echo '<link rel="stylesheet" href="themes/administrator/css/print.css" type="text/css">';
//echo '<link rel="stylesheet" href="includes/bootstrap/css/bootstrap.css" type="text/css">';
echo '<style>
table {
border-collapse: collapse;
}
.borderbawah {
border-bottom:1px solid black;
padding : 2px;
margin : 2px 0 5px 0;
}
table, td, th {
border: 1px solid black;
font : 100% Arial, Helvetica, sans-serif;
}
th {
text-align: center;
}
</style>';
$logoslip = "<img src='images/logoslip.png'>";
echo "</head><body>";
echo '<div align="left">' . $logoslip . '</div>';