当前位置: 首页>>代码示例>>PHP>>正文


PHP getField函数代码示例

本文整理汇总了PHP中getField函数的典型用法代码示例。如果您正苦于以下问题:PHP getField函数的具体用法?PHP getField怎么用?PHP getField使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getField函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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" => "sales@monsooncommerce.com", "Employment Opportunity" => "hr@monsooncommerce.com", "Press, Media, and Marketing" => "outreach@monsooncommerce.com", "Partner Inquiries" => "partners@monsooncommerce.com", "Support Request" => "support@monsooncommerce.com", "Professional Services" => "professionalservices@monsooncommerce.com", "Other" => "outreach@monsooncommerce.com");
    $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] : "outreach@monsooncommerce.com@monsooncommerce.com";
    $body = getField('cu_response');
    $from = "From: noreply@monsoondev.io\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


注:本文中的getField函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。