本文整理汇总了PHP中getField函数的典型用法代码示例。如果您正苦于以下问题:PHP getField函数的具体用法?PHP getField怎么用?PHP getField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getField函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getNoPendaftaran
function getNoPendaftaran($siswa,$kel){
if(isset($siswa) && is_numeric($siswa)) {// view
$s = 'SELECT nopendaftaran no FROM psb_calonsiswa WHERE replid='.$siswa;
$proses = getField('proses','psb_kelompok','replid',$kel);
// var_dump($proses);exit();
$awal = getField('kodeawalan','psb_proses','replid',$proses);
}else {// create new
$proses = getField('proses','psb_kelompok','replid',$kel);
$s='SELECT
LPAD((max(nopendaftaran)+1),6,0) no
FROM
psb_calonsiswa c
LEFT JOIN psb_kelompok k ON k.replid = c.kelompok
WHERE
k.proses ='.$proses;
$awal = getField('kodeawalan','psb_proses','replid',$proses);
}
// var_dump($awal);exit();
$e = mysql_query($s);
$r = mysql_fetch_assoc($e);
if($r['no']==NULL) $akhir = '000001'; // kosong
else $akhir =$r['no']; // ada
return array('full'=>$awal.$akhir,'awal'=>$awal,'akhir'=>$akhir);
}
开发者ID:nickohappy7,项目名称:sister,代码行数:25,代码来源:psb_func.php
示例2: post
function post()
{
if (isset($_POST['submit'])) {
$nama = $this->input->post('nama');
$nidn = $this->input->post('nidn');
$nip = $this->input->post('nip');
$tempat_lahir = $this->input->post('tempat_lahir');
$tanggal_lahir = $this->input->post('tanggal_lahir');
$gender = $this->input->post('gender');
$agama = $this->input->post('agama');
$kawin = $this->input->post('kawin');
$alamat = $this->input->post('alamat');
$hp = $this->input->post('hp');
$email = $this->input->post('email');
$data = array('nama_lengkap' => $nama, 'nidn' => $nidn, 'nip' => $nip, 'tempat_lahir' => $tempat_lahir, 'tanggal_lahir' => $tanggal_lahir, 'gender' => $gender, 'agama_id' => $agama, 'status_kawin' => $kawin, 'alamat' => $alamat, 'hp' => $hp, 'email' => $email);
$username = $this->input->post('username');
$password = $this->input->post('password');
$this->db->insert($this->tables, $data);
$id = getField('app_dosen', 'dosen_id', 'nama_lengkap', $nama);
$account = array('username' => $username, 'password' => md5($password), 'keterangan' => $id, 'level' => 3);
$this->db->insert('app_users', $account);
redirect($this->uri->segment(1));
} else {
$data['title'] = $this->title;
$data['desc'] = "Input Dosen";
$this->template->load('template', $this->folder . '/post', $data);
}
}
开发者ID:rayxaxnerx,项目名称:siakademik,代码行数:28,代码来源:dosen.php
示例3: load_mahasiswa
function load_mahasiswa()
{
$jadwal_id = $_GET['jadwal_id'];
$tanggal = $_GET['tanggal'];
$thn = get_tahun_ajaran_aktif('tahun_akademik_id');
$d = $this->db->query("SELECT ad.nama_lengkap,mm.nama_makul \n FROM app_dosen as ad,makul_matakuliah as mm,akademik_jadwal_kuliah as jk \n WHERE jk.makul_id=mm.makul_id and jk.dosen_id=ad.dosen_id and jk.jadwal_id={$jadwal_id}")->row_array();
$sql = " SELECT sm.nim,sm.nama,kh.mutu,kh.khs_id,kh.tugas,kh.kehadiran,kh.grade\n FROM akademik_krs as ak,student_mahasiswa as sm,akademik_khs as kh,akademik_jadwal_kuliah as jk\n WHERE kh.krs_id=ak.krs_id and sm.nim=ak.nim and ak.jadwal_id='{$jadwal_id}' and jk.jadwal_id=ak.jadwal_id and jk.tahun_akademik_id='{$thn}'";
echo " <table class='table table-bordered'>\n <tr class='success'><th colspan=2>MATAKULIAH</th></tr>\n <tr><td width=120>Matakuliah</td><td>" . strtoupper($d['nama_makul']) . "</td></tr>\n <tr><td>Dosen Pengapu</td><td>" . strtoupper($d['nama_lengkap']) . "</td></tr>\n </table>\n <table class='table table-bordered'>\n <tr class='success'><th colspan=6>DATA MAHASISWA</th></tr>\n <tr><th>No</th><th>NIM</th><th>NAMA MAHASISWA</th><th width=120>Kehadiran</th></tr>";
$data = $this->db->query($sql)->result();
$no = 1;
foreach ($data as $r) {
$absen = array('h' => 'Hadir', 'a' => 'Alpa', 'i' => 'Izin');
echo "<tr>\n <td width='7'>{$no}</td>\n <td width='70'>" . strtoupper($r->nim) . "</td>\n <td>" . strtoupper($r->nama) . "</td>\n <td align='center' width='90'><div class='cols-4'>";
$absensi = $this->db->get_where('student_absen_detail', array('nim' => $r->nim, 'absen_id' => getField('student_absen', 'absen_id', 'tanggal', $tanggal)));
if ($absensi->num_rows() > 0) {
$absensi = $absensi->row_array();
echo form_dropdown('absen', $absen, $absensi['kehadiran'], "class='form-control' id='absenid" . $absensi['detail_id'] . "' onChange='simpanabsen(" . $absensi['detail_id'] . ")'");
//echo inputan('text', '','col-sm-12','Kehadiran', 0, $r->kehadiran,array('onkeyup'=>'simpankehadiran('.$r->khs_id.')','id'=>'ambilkehadiran'.$r->khs_id)).'</td>';
} else {
echo form_dropdown('absen', $absen, '', "class='form-control' onChange='belumabsen()'");
//echo inputan('text', '','col-sm-12','Kehadiran', 0, $r->kehadiran,array('onkeyup'=>'simpankehadiran('.$r->khs_id.')','id'=>'ambilkehadiran'.$r->khs_id)).'</td>';
}
echo "</div></tr>";
$no++;
}
echo " </table>";
}
开发者ID:rayxaxnerx,项目名称:siakademik,代码行数:27,代码来源:absensi.php
示例4: post
function post()
{
if (isset($_POST['submit'])) {
$tahun = $this->input->post('tahun');
$batas = $this->input->post('batas');
$data = array('keterangan' => $tahun, 'status' => 'n', 'batas_registrasi' => $batas);
$this->db->insert($this->tables, $data);
// ambil id tahun akademik
$angkatan_id = getField('student_angkatan', 'angkatan_id', 'aktif', 'y');
// foreach konsentrasi
$konsentrasi = $this->db->get('akademik_konsentrasi')->result();
foreach ($konsentrasi as $k) {
// foreach jenis biaya kuliah
$jenis_biaya = $this->db->get('keuangan_jenis_bayar')->result();
foreach ($jenis_biaya as $j) {
// insert data ke tabel keuangan_biaya_kuliah
$data = array('angkatan_id' => $angkatan_id, 'jenis_bayar_id' => $j->jenis_bayar_id, 'konsentrasi_id' => $k->konsentrasi_id, 'jumlah' => 0);
$this->db->insert('keuangan_biaya_kuliah', $data);
}
}
redirect($this->uri->segment(1));
} else {
$data['title'] = $this->title;
$data['desc'] = "";
$this->template->load('template', $this->folder . '/post', $data);
}
}
开发者ID:rayxaxnerx,项目名称:siakademik,代码行数:27,代码来源:tahunakademik.php
示例5: setvar
function setvar(&$id, $tag, &$val)
{
if (getField("vars", "count(*)", "where uid={$id} and tag='{$tag}'") < 1) {
dbExec("insert into vars (uid, tag, val) values({$id}, '{$tag}', 0)");
}
dbExec("update vars set val={$val} where uid={$id} and tag='{$tag}'");
}
开发者ID:piter65,项目名称:spilldec,代码行数:7,代码来源:a_analyze.php
示例6: keterangan
function keterangan($id)
{
if ($id == '') {
return '';
} else {
return getField('akademik_prodi', 'nama_prodi', 'prodi_id', $id);
}
}
开发者ID:rayxaxnerx,项目名称:siakademik,代码行数:8,代码来源:users.php
示例7: checkDetailKelas
function checkDetailKelas($thn)
{
$kel = getField('count(*)', 'aka_kelas', '', '');
$dkel = getField('count(*)', 'aka_detailkelas', 'tahunajaran', $thn);
// vdump($kel);
if ($dkel <= 0 || $kel != $dkel) {
addDetailKelas($thn);
}
}
开发者ID:rekysda,项目名称:sistermetta,代码行数:9,代码来源:aka_func.php
示例8: semester_mhs
function semester_mhs()
{
$id = $_GET['id_mahasiswa'];
$sms = getField('student_mahasiswa', 'semester_aktif', 'mahasiswa_id', $id);
for ($i = 1; $i <= $sms; $i++) {
echo "<option value='{$i}'> Semester {$i}</option>";
}
echo "<option value='0'>Semua Semester</option>";
}
开发者ID:ahmadisurahman05,项目名称:AKADEMIK,代码行数:9,代码来源:khs.php
示例9: isValidUser
function isValidUser()
{
$result = runSQL('SELECT id FROM users where username="' . getField('username') . '" and password="' . md5(getField('password')) . '" ');
if (mysql_num_rows($result) == 1) {
$row = mysql_fetch_array($result);
$_SESSION['sharebd_user_id'] = $row['id'];
return true;
}
return false;
}
开发者ID:Tokhin,项目名称:tokinMama,代码行数:10,代码来源:lib.php
示例10: getAuleGroup
/**
* 用户角色
*/
function getAuleGroup($id = '', $field = 'title')
{
if (empty($id)) {
return '';
}
$model = M('AuthGroupAccess');
$map['uid'] = array('eq', $id);
$res = $model->where($map)->find();
if ($res) {
return getField($res['group_id'], $field, 'AuthGroup');
} else {
return false;
}
}
开发者ID:sxfenglei,项目名称:TP_flhoutai,代码行数:17,代码来源:function.php
示例11: contactUsSubmit
function contactUsSubmit()
{
$contactUsContacts = array("Sales" => "[email protected]", "Employment Opportunity" => "[email protected]", "Press, Media, and Marketing" => "[email protected]", "Partner Inquiries" => "[email protected]", "Support Request" => "[email protected]", "Professional Services" => "[email protected]", "Other" => "[email protected]");
$name = getField('cu_first_name') . " " . getField('cu_last_name');
$company = getField('cu_company');
$email = getField('cu_email');
$phone = getField('cu_phone');
$country = getField('cu_country');
$department = getField('cu_reason');
$to = array_key_exists($department, $contactUsContacts) ? $contactUsContacts[$department] : "[email protected]@monsooncommerce.com";
$body = getField('cu_response');
$from = "From: [email protected]\r\n";
$subject = "Contact Us Request for {$department} from support.monsooncommerce.com";
$message = "Web Request from support.monsooncommerce.com:\n" . "\tName: {$name}\n" . "\tCompany: {$company}\n" . "\tEmail: {$email}\n" . "\tPhone: {$phone}\n" . "\tCountry: {$country}\n\n" . getField('cu_response');
wp_mail($to, $subject, $message, $from);
}
开发者ID:eggmatters,项目名称:monsoon-responsive,代码行数:16,代码来源:ajax.php
示例12: change_status
public function change_status()
{
$id = intval($_REQUEST['id']);
$status = M("coin_type")->where("id=" . $id)->getField("status");
M("coin_type")->where("id=" . $id)->setField("status", ($status + 1) % 2);
$status = M("coin_type")->where("id=" . $id) . getField("status");
M("coin_item")->where("pay_type=" . $id)->setField("status", $status);
$model = D("coin_type");
if (method_exists($this, '_filter')) {
$this->_filter($map);
}
$model = D("coin_type");
if (!empty($model)) {
$this->_list($model, $map);
}
$this->display("index");
}
开发者ID:BruceJi,项目名称:fanwe,代码行数:17,代码来源:CoinAction.class.php
示例13: login
function login()
{
//safely escape entries
$num = esc($_POST[number]);
$pass = esc($_POST[pass]);
$sql = "SELECT * FROM employee WHERE number='{$num}'";
$result = dbQuery($sql);
$hash = getField($result, "hash");
// Hashing the password with its hash as the salt returns the same hash
//TODO: do something upon login
if (strcmp($hash, crypt($pass, $hash)) == 0) {
echo "LOGIN SUCCESS";
redir("../login.html");
} else {
echo "Invalid Employee Number/Password<br>";
redir("../login.html");
}
}
开发者ID:TylerHann,项目名称:cpr,代码行数:18,代码来源:login.php
示例14: post
function post()
{
if (isset($_POST['submit'])) {
$jenis = $this->input->post('jenis');
$this->db->insert($this->tables, array('keterangan' => $jenis));
$jns_byr = $this->db->get_where('keuangan_jenis_bayar', array('keterangan' => $jenis))->row_array();
$thn_ajr = getField('student_angkatan', 'angkatan_id', 'aktif', 'y');
// foreach konsentrasi
$konsen = $this->db->get('akademik_konsentrasi')->result();
foreach ($konsen as $k) {
$data = array('angkatan_id' => $thn_ajr, 'jumlah' => 0, 'jenis_bayar_id' => $jns_byr['jenis_bayar_id'], 'konsentrasi_id' => $k->konsentrasi_id);
$this->db->insert('keuangan_biaya_kuliah', $data);
}
redirect($this->uri->segment(1));
} else {
$data['title'] = $this->title;
$this->template->load('template', $this->folder . '/post', $data);
}
}
开发者ID:ahmadisurahman05,项目名称:AKADEMIK,代码行数:19,代码来源:jenisbayar.php
示例15: draw
/**
* @param $widgetData
* @param \cs\models\Client $user
*
*/
function draw($widgetData, $user)
{
$fields = $widgetData['fields'];
$rows = $widgetData['rows'];
$exclude = ArrayHelper::getValue($widgetData, 'exclude', []);
$fieldsOff = [];
foreach ($rows as $row) {
if (is_string($row)) {
$fieldsOff[] = $row;
}
}
echo '<table class="table table-striped table-bordered detail-view">';
echo '<tbody>';
foreach ($rows as $row) {
echo '<tr>';
if (is_array($row)) {
$label = ArrayHelper::getValue($row, 'label', '');
if ($label != '') {
$name = ArrayHelper::getValue($row, 'attribute', '');
$field = getField($fields, $name);
$label = $field[1];
}
$content = $row['content'];
$value = call_user_func($content, $user);
} else {
if (is_string($row)) {
$name = $row;
$field = getField($fields, $name);
$label = $field[1];
$value = $user->getField($name);
}
}
echo '<th>';
echo $label;
echo '</th>';
echo '<td>';
echo $value;
echo '</tr>';
}
echo '</tbody>';
echo '</table>';
}
开发者ID:Makeyko,项目名称:galaxysss,代码行数:47,代码来源:client_item.php
示例16: loadmapel
function loadmapel()
{
$konsentrasi = $_GET['konsentrasi'];
$mahasiswa_id = $_GET['mahasiswa_id'];
$nim = getField('student_mahasiswa', 'nim', 'mahasiswa_id', $mahasiswa_id);
echo "<table class='table table-bordered'>\n <tr class='warning'><th colspan=5>DAFTAR MATAKULIAH</th><th colspan=2><button onclick='loaddata({$mahasiswa_id})' class='btn btn-primary btn-sm'><i class='fa fa-mail-reply-all'></i> Kembali</button></th></tr>\n <tr><th width=10>No</th><th width=20>Kode</th>\n <th>Nama Matakuliah</th>\n <th>Dosen</th>\n <th width=60>SKS</th><th width=60>JAM</th><th>Ambil</th></tr>";
// dapatkan jumlah semester dari kosentrasi yang diminta
$data = $this->db->get_where('akademik_konsentrasi', array('konsentrasi_id' => $konsentrasi))->row_array();
$jmlSemester = $data['jml_semester'];
for ($i = 1; $i <= $jmlSemester; $i++) {
echo "<tr class='success'><td colspan=9>Semester {$i}</td></tr>";
$query = "SELECT mm.kode_makul,mm.sks,mm.jam,mm.kode_makul,mm.nama_makul,mm.sks,jk.jadwal_id,ds.nama_lengkap\n FROM akademik_jadwal_kuliah as jk,makul_matakuliah as mm,app_dosen as ds\n WHERE mm.makul_id=jk.makul_id and mm.konsentrasi_id={$konsentrasi} and mm.semester={$i} and ds.dosen_id=jk.dosen_id and jk.jadwal_id not in(select jadwal_id from akademik_krs where nim='{$nim}')";
$makul = $this->db->query($query)->result();
$no = 1;
foreach ($makul as $m) {
echo "<tr id='hide{$m->jadwal_id}'><td>{$no}</td>\n <td>" . strtoupper($m->kode_makul) . "</td>\n <td>" . strtoupper($m->nama_makul) . "</td>\n <td>" . strtoupper($m->nama_lengkap) . "</td>\n <td>{$m->sks} sks</td>\n <td>{$m->jam} Jam</td>\n <td width='10' align='center'><i class='fa fa-share-square-o' onclick='ambil({$m->jadwal_id},{$mahasiswa_id})' title='Ambil Matakuliah'></i></td>\n </tr>";
$no++;
}
}
echo "<table>";
}
开发者ID:ahmadisurahman05,项目名称:AKADEMIK,代码行数:21,代码来源:krs.php
示例17: tampilkanmahasiswa
function tampilkanmahasiswa()
{
$konsentrasi = $_GET['konsentrasi'];
$tahun_angkatan = $_GET['tahun_angkatan'];
$data = $this->db->get_where('student_mahasiswa', array('konsentrasi_id' => $konsentrasi, 'angkatan_id' => $tahun_angkatan))->result();
echo "<tr><th width='5'>No</th><th width='70'>NIM</th><th>NAMA</th>\n <th width=100>Tahun AKD</th>\n <th>Aktif</th>\n <th>Tanggal Registrasi</th>\n <th></th></tr>";
$no = 1;
foreach ($data as $r) {
// get last registrasi
$last_id = $this->db->query("SELECT registrasi_id FROM akademik_registrasi WHERE nim='{$r->nim}' order by registrasi_id desc limit 1")->row_array();
$gender = $r->gender == 1 ? 'Laki Laki' : 'Perempuan';
$tahun_akademik_id = get_tahun_ajaran_aktif('tahun_akademik_id');
$tanggal = status_registrasi($tahun_akademik_id, $r->nim, 'tanggal_registrasi');
$status = $tanggal == '' ? 'Tidak' : 'Aktif';
$smt_aktif = getField('student_mahasiswa', 'semester_aktif', 'mahasiswa_id', $r->mahasiswa_id);
$btnaktf = "<button class='btn btn-primary btn-sm' onclick='registrasi({$r->mahasiswa_id})'>Belum Registrasi</button>";
$btnnon = anchor('registrasi/delete/' . $last_id['registrasi_id'], 'Batalkan registrasi', array('class' => 'btn btn-success btn-sm'));
$btn = $tanggal == '' ? $btnaktf : $btnnon;
echo "<tr id='hide{$r->mahasiswa_id}'>\n <td>{$no}</td>\n <td>" . strtoupper($r->nim) . "</td>\n <td>" . strtoupper($r->nama) . "</td>\n <td>" . get_tahun_ajaran_aktif('keterangan') . "</td>\n <td>{$status}</td>\n <td>" . tgl_indo($tanggal) . "</td>\n <td>{$btn}</td>\n </tr>";
$no++;
//
}
}
开发者ID:ahmadisurahman05,项目名称:AKADEMIK,代码行数:23,代码来源:registrasi.php
示例18: updateFieldWhere
<?php
if (isset($_POST['foot1'])) {
updateFieldWhere('settings', 'set_val', $_POST['foot1'], "set_name = 'footer" . $_POST['htype'] . "'");
}
?>
<tr>
<td style="vertical-align: top; padding-top: 30px;">
<form action="" method="post">
Poraštė 1:<br>
<input type="hidden" name="htype" value="1" />
<textarea name="foot1"><?php
echo getField('settings', 'set_val', 'set_id', '1');
?>
</textarea><br>
<input type="submit" value="Išsaugoti" />
</form>
</td>
<td style="vertical-align: top; padding-top: 30px;">
Poraštė 2:<br>
<form action="" method="post">
<input type="hidden" name="htype" value="2" />
<textarea name="foot1"><?php
echo getField('settings', 'set_val', 'set_id', '2');
?>
</textarea><br>
<input type="submit" value="Išsaugoti" />
</form>
</td>
</tr>
</table>
开发者ID:vsi-geros-valios-projektai,项目名称:admin.pagalbadaiktais.lt,代码行数:31,代码来源:hefo.php
示例19: getField
echo getField('contactstext');
?>
</p>
<p class="contacts">
<?php
echo getField('contactname');
?>
</p>
<p class="contacts">
<?php
echo getField('phone');
?>
</p>
<p class="contacts">
<?php
echo getField('email');
?>
</p>
</div>
<div class="col-md-6 col-md-offset-1">
<form action="#" role="form">
<div class="form-group userField">
<div class=" col-md-6 col-xs-6" >
<input type="email" id="email" name="email" class="form-control " placeholder="EMAIL" required aria-describedby="email">
</div>
<div class=" col-md-6 col-xs-6" >
<input name="name" id="name" type="text" class="form-control" placeholder="NAME" aria-describedby="username" required>
</div>
</div>
<div class="form-group sendGroup">
开发者ID:andxbes,项目名称:secondWPSite,代码行数:31,代码来源:page-start.php
示例20: dbg
}
dbg("school_state={$school_state}");
$school_city = rt("school_city");
if ($other_city != "") {
$school_city = $other_city;
}
$school_city = ucfirst($school_city);
dbg("school_city={$school_city}");
$school_name = rt("school_name");
if ($other_name != "") {
$school_name = $other_name;
}
$school_name = ucfirst($school_name);
dbg("school_name={$school_name}");
$confirm = rt("confirm");
$regopen = getField("config", "val", "where tag='registration'");
$regopen = $regopen == "1" ? true : false;
if ($regopen) {
if ($school_state == "") {
include "regintro.php";
}
?>
<div style="margin: 30px;">
<span class=body_copy_blue>
<style>
#inset {
开发者ID:piter65,项目名称:spilldec,代码行数:30,代码来源:register.php
注:本文中的getField函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论