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); }
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); } }
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>"; }
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); } }
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}'"); }
function keterangan($id) { if ($id == '') { return ''; } else { return getField('akademik_prodi', 'nama_prodi', 'prodi_id', $id); } }
function checkDetailKelas($thn) { $kel = getField('count(*)', 'aka_kelas', '', ''); $dkel = getField('count(*)', 'aka_detailkelas', 'tahunajaran', $thn); // vdump($kel); if ($dkel <= 0 || $kel != $dkel) { addDetailKelas($thn); } }
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>"; }
function isValidUser() { $result = runSQL('SELECT id FROM users where username="******" and password="******" '); if (mysql_num_rows($result) == 1) { $row = mysql_fetch_array($result); $_SESSION['sharebd_user_id'] = $row['id']; return true; } return false; }
/** * 用户角色 */ 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; } }
function contactUsSubmit() { $contactUsContacts = array("Sales" => "*****@*****.**", "Employment Opportunity" => "*****@*****.**", "Press, Media, and Marketing" => "*****@*****.**", "Partner Inquiries" => "*****@*****.**", "Support Request" => "*****@*****.**", "Professional Services" => "*****@*****.**", "Other" => "*****@*****.**"); $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); }
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"); }
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"); } }
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); } }
/** * @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>'; }
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>"; }
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++; // } }
<?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>
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">
} 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 {
?> </div> <?php include realpath('protected/components/UpdatesForm.php'); // Configuration for the updates / optional info form: $editions = array('pro', 'pla'); $edition = 'opensource'; foreach ($editions as $ed) { // Add editional prefixes as necessary if (file_exists("initialize_{$ed}.php")) { $edition = $ed; } } $form = new UpdatesForm(array('x2_version' => $version, 'unique_id' => getField('unique_id', 'none', True), 'formId' => 'install', 'submitButtonId' => 'install-button', 'statusId' => 'error-box', 'themeUrl' => $themeURL, 'receiveUpdates' => getField('receiveUpdates', 1, True), 'edition' => $edition), 'installer_t'); require_once realpath('protected/views/admin/stayUpdated.php'); ?> <?php $haveErrors = !empty($errorMessages); ?> <hr /> <div class="form" id="error-box"<?php echo $haveErrors ? Null : ' style="display:none;"'; ?> > <?php if ($haveErrors) { ?>
function getRegionalKM() { $sql = "SELECT * FROM rates WHERE region='Prairie'"; $result = dbQuery($sql); $cost = getField($result, "regionalkm"); echo json_encode($cost); }
function ligneEtatTypeFournisseur($wh = '', $ord = '', $sens = 'ASC') { $userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte'); $ilang = getCodelangue($userName); $returnHTML = ''; //Where clause $where = ''; isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = ""); //Order condition $order = ''; isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY TYPEFOUR_NOM ASC"); //Nombre d'éléments $nbre = nombreTypeFournisseur($where); if ($nbre > 0) { $sql = "SELECT * FROM typefournisseur {$where} {$order};"; //Exécution try { $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); //Connexion to database } catch (PDOException $error) { //Treat error //("Erreur de connexion : " . $error->getMessage() ); header('location:errorPage.php'); } $query = $cnx->prepare($sql); //Prepare the SQL $query->execute(); //Execute prepared SQL => $query $i = 0; while ($row = $query->fetch(PDO::FETCH_ASSOC)) { $returnHTML .= ' <tr align="left" valign="middle"> <td height="22" class="botBorderTdall" align="left">' . $row['CODE_TYPEFOUR'] . ' </td> <td class="botBorderTdall" >' . stripslashes($row['TYPEFOUR_NOM']) . ' </td> </tr>'; $i++; } } else { if ($ilang == '1' && $ilang != '') { $returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>'; } if ($ilang == '2' && $ilang != '') { $returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>'; } if ($ilang == '3' && $ilang != '') { $returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>'; } } return $returnHTML; }
<tr> <td width="150">Kelompok Matakuliah</td><td> <div class="col-sm-6"> <?php echo editcombo('kelompok', 'makul_kelompok', '', 'nama', 'kelompok_id', '', '', $r['kelompok_id']); ?> </div> </td> </tr> <tr> <td width="150">Konsentrasi /Prodi</td><td> <div class="col-sm-3"> <?php echo editcombo('prodi', 'akademik_prodi', '', 'nama_prodi', 'prodi_id', $param, array('id' => 'prodi'), getField('akademik_konsentrasi', 'prodi_id', 'konsentrasi_id', $r['konsentrasi_id'])); ?> </div> <div class="col-sm-3"> <?php echo editcombo('konsentrasi', 'akademik_konsentrasi', '', 'nama_konsentrasi', 'konsentrasi_id', '', array('id' => 'konsentrasi'), $r['konsentrasi_id']); ?> </div> </td> </tr> <tr><td>Jumlah Jam</td><td> <?php echo inputan('text', 'jam', 'col-sm-1', 'Jam ..', 1, $r['jam'], ''); ?> </td></tr> <tr>
function ubahstatus() { $id = $_GET['id']; // chek status terakhir $statuslama = getField('makul_matakuliah', 'aktif', 'makul_id', $id); // simpan status $statusbaru = $statuslama == 'y' ? 'n' : 'y'; // ubah status $this->mcrud->update($this->tables, array('aktif' => $statusbaru), $this->pk, $id); }
<?php //Session session_start(); if ($_SESSION['GL_USER']['SESSIONID'] != session_id()) { header("location:dbuser.php?do=logout"); } require_once '../lib/phpfuncLib.php'; //All commun functions require_once 'functypedotation.php'; $INFO = getInfoGenerale($_SESSION['GL_USER']['MAGASIN']); $nommag = getField('CODE_MAGASIN', $_SESSION['GL_USER']['MAGASIN'], 'SER_NOM', 'magasin'); isset($INFO['ID']) ? $id = $INFO['ID'] : ($id = ''); isset($INFO['INF_CLIENT']) ? $client = $INFO['INF_CLIENT'] : ($client = ''); isset($INFO['INF_DATEACQ']) ? $dateacq = $INFO['INF_DATEACQ'] : ($dateacq = ''); isset($INFO['INF_LICENCE']) ? $licence = $INFO['INF_LICENCE'] : ($licence = ''); isset($INFO['INF_MINISTERE']) && $INFO['INF_MINISTERE'] != '' ? $ministere = $INFO['INF_MINISTERE'] : ($ministere = ''); isset($INFO['INF_SECRETARIAT']) && $INFO['INF_SECRETARIAT'] != '' ? $secretariat = '<div align="center">-----------------</div>' . $INFO['INF_SECRETARIAT'] : ($secretariat = ''); isset($INFO['INF_DIRECTION']) && $INFO['INF_DIRECTION'] != '' ? $direction = '<div align="center">-----------------</div>' . $INFO['INF_DIRECTION'] : ($direction = ''); isset($INFO['INF_SERVICE']) && $INFO['INF_SERVICE'] != '' ? $service = '<div align="center">-----------------</div>' . $INFO['INF_SERVICE'] : ($service = ''); isset($INFO['INF_CSPS']) && $INFO['INF_CSPS'] != '' ? $csps = '<div align="center">-----------------</div>' . $INFO['INF_CSPS'] : ($csps = ''); isset($INFO['INF_PAYS']) ? $pays = $INFO['INF_PAYS'] : ($pays = ''); isset($INFO['INF_VILLE']) ? $ville = $INFO['INF_VILLE'] : ($ville = ''); isset($INFO['INF_DEVISE']) ? $devise = $INFO['INF_DEVISE'] : ($devise = ''); $dateacq == '0000-00-00' ? $dateacq = '' : ($dateacq = frFormat2($dateacq)); $libellecde = 'Liste des types de dotation'; //Ligne if (isset($_SESSION['WHERE']) && $_SESSION['WHERE'] != '') { $ligne = ligneEtatTypeDotation($_SESSION['WHERE']); } else { $ligne = ligneEtatTypeDotation('', '', '');
function ligneEtatListeBonsortie($wh = '', $ord = '', $sens = 'ASC') { $userName = getField('LOGIN', $_SESSION['GL_USER']['LOGIN'], 'LOGIN', 'compte'); $ilang = getCodelangue($userName); $returnHTML = ''; //Where clause $where = ''; isset($wh) and $wh != '' ? $where = " WHERE {$wh} " : ($where = ""); //Oerder condition $order = ''; isset($ord) and $ord != '' ? $order = " ORDER BY {$ord} {$sens}" : ($order = " ORDER BY SOR_DATE DESC"); //Nombre d'éléments $nbre = nombreBonsortie($where); if ($nbre > 0) { //Calcule des limites $sql = "SELECT * FROM bonsortie INNER JOIN beneficiaire ON (bonsortie.CODE_BENEF=beneficiaire.CODE_BENEF) {$where} {$order};"; //Exécution try { $cnx = new PDO(DBD, DBUSER, DBPWD, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8")); //Connexion to database } catch (PDOException $error) { //Treat error //("Erreur de connexion : " . $error->getMessage() ); header('location:errorPage.php'); } $query = $cnx->prepare($sql); //Prepare the SQL $query->execute(); //Execute prepared SQL => $query $i = 1; while ($row = $query->fetch(PDO::FETCH_ASSOC)) { //($i%2 == 0 ? $col = "tableOddRow" : $col = "tableEvenRow"); $col = ''; $d1 = frFormat($row['SOR_DATE']); //Return $ret = array(); // DFR, TFR if ($row['SOR_VALIDE'] == '0') { $imgCl = '<img src="../images/encours.gif" title="En cours" width="16" height="16">'; } elseif ($row['SOR_VALIDE'] == '2') { $imgCl = '<img src="../images/cancel.png" title="Annulée" width="16" height="16">'; } else { $imgCl = '<img src="../images/valider.gif" title="Validée" width="16" height="16">'; } $returnHTML .= ' <tr align="left" valign="middle" class="' . $col . '"> <td class="botBorderTdall" align="center">' . $i . '</td> <td class="botBorderTdall" align="center">' . $imgCl . '</td> <td class="botBorderTdall" >' . stripslashes($row['CODE_BONSORTIE']) . ' </td> <td class="botBorderTdall" align="center">' . stripslashes($d1['DFR']) . ' </td> <td class="botBorderTdall" >' . stripslashes($row['SOR_LIBELLE']) . ' </td> <td class="botBorderTdall" >' . stripslashes($row['BENEF_NOM']) . ' </td> </tr>'; $i++; } } else { if ($ilang == '1' && $ilang != '') { $returnHTML .= '<tr><td colspan="4" class="text">Aucune donnée...</td></tr>'; } if ($ilang == '2' && $ilang != '') { $returnHTML .= '<tr><td colspan="4" class="text">No data...</td></tr>'; } if ($ilang == '3' && $ilang != '') { $returnHTML .= '<tr><td colspan="4" class="text">Nenhum dado...</td></tr>'; } } return $returnHTML; }
isset($INFO['INF_LICENCE']) ? $licence = $INFO['INF_LICENCE'] : ($licence = ''); isset($INFO['INF_MINISTERE']) ? $ministere = $INFO['INF_MINISTERE'] : ($ministere = ''); isset($INFO['INF_SECRETARIAT']) ? $secretariat = $INFO['INF_SECRETARIAT'] : ($secretariat = ''); isset($INFO['INF_DIRECTION']) ? $direction = $INFO['INF_DIRECTION'] : ($direction = ''); isset($INFO['INF_SERVICE']) ? $service = $INFO['INF_SERVICE'] : ($service = ''); isset($INFO['INF_PAYS']) ? $pays = $INFO['INF_PAYS'] : ($pays = ''); isset($INFO['INF_VILLE']) ? $ville = $INFO['INF_VILLE'] : ($ville = ''); isset($INFO['INF_DEVISE']) ? $devise = $INFO['INF_DEVISE'] : ($devise = ''); $dateacq == '0000-00-00' ? $dateacq = '' : ($dateacq = frFormat2($dateacq)); isset($INFO['INF_SIGNATEUR2']) ? $chef = $INFO['INF_SIGNATEUR2'] : ($chef = ''); isset($INFO['INF_NOMSIGNATEUR2']) ? $nomchef = $INFO['INF_NOMSIGNATEUR2'] : ($nomchef = ''); isset($INFO['INF_NOMSIGNATEUR3']) ? $directeur = $INFO['INF_SIGNATEUR3'] : ($directeur = ''); isset($INFO['INF_NOMSIGNATEUR3']) ? $nomdirecteur = $INFO['INF_NOMSIGNATEUR3'] : ($nomdirecteur = ''); isset($INFO['INF_SIGNATEUR3']) ? $gestionnaire = $INFO['INF_SIGNATEUR3'] : ($gestionnaire = ''); isset($INFO['INF_SIGNATEUR4']) ? $daf = $INFO['INF_SIGNATEUR4'] : ($daf = ''); $libelle = 'Programmations BAC ' . getField('CODE_MAGASIN', $_SESSION['GL_USER']['MAGASIN'], 'SER_NOM', 'magasin'); isset($_SESSION['WHERE']) && $_SESSION['WHERE'] != '' ? $where = ' AND ' . $_SESSION['WHERE'] : ($where = ''); $arrayPrd = getTableBareme("WHERE BAR_NATURE LIKE 'BAC'"); $entete = getBaremeEntete($arrayPrd); //Ligne if (isset($_SESSION['WHERE']) && $_SESSION['WHERE'] != '') { $affichage = ligneEtatProgrammeBac(' AND ' . $_SESSION['WHERE'], '', ''); } else { $affichage = ligneEtatProgrammeBac(" AND programmation.ID_EXERCICE=" . $_SESSION['GL_USER']['EXERCICE'] . " AND CODE_MAGASIN LIKE '" . $_SESSION['GL_USER']['MAGASIN'] . "'", $dot = ''); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="fr" xml:lang="fr"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <META HTTP-EQUIV="refresh" CONTENT="" >
?> </td> <td>Alamat Ayah, Ibu</td> <td><?php echo textarea('alamat_ayah', '', 'col-sm-6', 2, $r['alamat_ayah']); ?> <?php echo textarea('alamat_ibu', '', 'col-sm-6', 2, $r['alamat_ibu']); ?> </td> </tr> <tr> <td width="050">Prodi / Konsentrasi</td><td> <div class="col-sm-6"> <?php $prodi = getField('akademik_konsentrasi', 'prodi_id', 'konsentrasi_id', $r['konsentrasi_id']); ?> <?php echo buatcombo('prodi', 'akademik_prodi', '', 'nama_prodi', 'prodi_id', $param, array('id' => 'prodi')); ?> </div> <div class="col-sm-6"> <?php echo editcombo('konsentrasi', 'akademik_konsentrasi', '', 'nama_konsentrasi', 'konsentrasi_id', array('prodi_id' => $prodi), array('id' => 'konsentrasi'), $r['konsentrasi_id']); ?> </div> </td> <td>Penghasilan Ayah, Ibu</td> <td> <?php $penghasilan = array(0 => 'Satu Juta s/d dua juta', 2 => 'Dua Juta s/d Tiga Juta', 3 => 'Tiga Juta Lebih');
$ar = array('status'=>'kosong'); }else{ // ada data if(!isset($_POST['replid'])){ while ($r=mysql_fetch_assoc($e)) { $dt[]=$r; } }else{ $dt[]=mysql_fetch_assoc($e); }$ar = array('status'=>'sukses',$mnu=>$dt); } }$out=json_encode($ar); break; // aktifkan ----------------------------------------------------------------- case 'aktifkan': if(!isset($_POST['id_'.$mnu])) $stat='no_id_'.$mnu.'_to_post'; else{ $akt = getField('isAktif',$tb,'replid',$_POST['id_'.$mnu]); $s = 'UPDATE '.$tb.' set isAktif='.($akt==1?0:1).' where replid ='.$_POST['id_'.$mnu]; $e = mysql_query($s); $stat=!$e?'gagal mengaktifkan':'sukses'; }$out = json_encode(array('status'=>$stat)); break; // aktifkan ----------------------------------------------------------------- } } echo $out; // echo json_encode($out); ?>