• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP farray函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了farray函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: dbSFA

     // update / delete form
     $sel = $dbtable . '.*';
     $r = dbSFA($sel, $dbtable . ',departemen', "W/keu_budget.replid='{$cid}' and keu_budget.id_department=departemen.replid");
     // shared/db.php
     // $r=dbSFA("*",$dbtable.','.'departemen',"W/keu_budget.replid='$cid' and keu_budget.id_department=departemen.replid");  // shared/db.php
     // $r=dbSFA("*",$dbtable,"W/replid='$cid'");  // shared/db.php
     // $r=dbLJoin($dbtable,'replid','departemen','replid');  // shared/db.php
     // var_dump($r);
     $a = 0;
     // $kategorirek=kategorirek_r($a);
     $departemen = departemen_r($a);
     // print_r($departemen);
 } else {
     // opt == 'af' //  add form
     // $r                = farray('kategorirek','kode','nama','keterangan'); //shared/libraries/common.php
     $r = farray('tahunbuku', 'nama', 'nominal', 'keterangan', 'id_department');
     //shared/libraries/common.php
     // $r['kategorirek'] = gpost('skategorirek'); // shared/libraries/common.php
     $r['id_department'] = gpost('sid_department');
     // shared/libraries/common.php
     // $kategorirek      = kategorirek_r($r['kategorirek']); //shared/libraries/modules/app/keu/rekening.php
     $departemen = departemen_r($r['id_department']);
     //shared/libraries/modules/app/keu/rekening.php
     // // if($r['kategorirek']!=0){
     // // 	//$r['kode']=$r['kategorirek'];
     // // }
     // $departemen=departemen_r($a,1); //shared/libraries/obj/departmen.php (tambahan)
 }
 // $departemen=departemen_r($a,1); //shared/libraries/obj/departmen.php (tambahan)
 // }$departemen=departemen_r($a); //shared/libraries/obj/departmen.php
 $fform->dimension(400, 120);
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:budgetXX.php


示例2: users

 function users($page = 'list', $index = 1)
 {
     if ($page == 'list') {
         // $this->users() it's the current method, $this->users is the main user object
         $users = $this->users->auth->list_users($group_par = FALSE, $limit = FALSE, $offset = FALSE, $include_banneds = FALSE);
         $this->gui->set_title(sprintf(__('Users — %s'), get('core_signature')));
         $this->load->view('../modules/aauth/views/users/body', array('users' => $users));
     } else {
         if ($page == 'edit') {
             if (!User::can('manage_users')) {
                 redirect(array('dashboard?notice=access-denied'));
             }
             // permission checks
             // if current user matches user id
             if ($this->users->auth->get_user_id() == $index) {
                 redirect(array('dashboard', 'users', 'profile'));
             }
             // User Goup
             $user = $this->users->auth->get_user($index);
             $user_group = farray($this->users->auth->get_user_groups($index));
             if (!$user) {
                 redirect(array('dashboard', 'unknow-user'));
             }
             // validation rules
             $this->load->library('form_validation');
             $this->form_validation->set_rules('user_email', __('User Email'), 'required|valid_email');
             $this->form_validation->set_rules('password', __('Password'), 'min_length[6]');
             $this->form_validation->set_rules('confirm', __('Confirm'), 'matches[password]');
             $this->form_validation->set_rules('userprivilege', __('User Privilege'), 'required');
             // load custom rules
             $this->events->do_action('user_creation_rules');
             if ($this->form_validation->run()) {
                 $exec = $this->users->edit($index, $this->input->post('user_email'), $this->input->post('password'), $this->input->post('userprivilege'), $user_group);
                 $this->notice->push_notice($this->lang->line('user-updated'));
                 // Refresh user data
                 $user = $this->users->auth->get_user($index);
                 // User Goup
                 $user_group = farray($this->users->auth->get_user_groups($index));
                 if (!$user) {
                     redirect(array('dashboard', 'unknow-user'));
                 }
             }
             // User Goup
             $user_group = farray($this->users->auth->get_user_groups($user->id));
             // selecting groups
             $groups = $this->users->auth->list_groups();
             $this->gui->set_title(sprintf(__('Edit user — %s'), get('core_signature')));
             $this->load->view('../modules/aauth/views/users/edit', array('groups' => $groups, 'user' => $user, 'user_group' => $user_group));
         } else {
             if ($page == 'create') {
                 if (!User::can('manage_users')) {
                     redirect(array('dashboard?notice=access-denied'));
                 }
                 // permission checks
                 $this->load->library('form_validation');
                 $this->form_validation->set_rules('username', __('User Name'), 'required|min_length[5]');
                 $this->form_validation->set_rules('user_email', __('User Email'), 'required|valid_email');
                 $this->form_validation->set_rules('password', __('Password'), 'required|min_length[6]');
                 $this->form_validation->set_rules('confirm', __('Confirm'), 'required|matches[password]');
                 $this->form_validation->set_rules('userprivilege', __('User Privilege'), 'required');
                 // load custom rules
                 $this->events->do_action('user_creation_rules');
                 if ($this->form_validation->run()) {
                     $exec = $this->users->create($this->input->post('user_email'), $this->input->post('password'), $this->input->post('username'), $this->input->post('userprivilege'));
                     if ($exec == 'user-created') {
                         redirect(array('dashboard', 'users?notice=' . $exec));
                         exit;
                     }
                     $this->notice->push_notice($this->lang->line($exec));
                 }
                 // selecting groups
                 $groups = $this->users->auth->list_groups();
                 $this->gui->set_title(sprintf(__('Create a new user — %s'), get('core_signature')));
                 $this->load->view('../modules/aauth/views/users/create', array('groups' => $groups));
             } else {
                 if ($page == 'delete') {
                     if (!User::can('manage_users')) {
                         redirect(array('dashboard?notice=access-denied'));
                     }
                     // permission checks
                     $user = $this->users->auth->user_exsist_by_id($index);
                     if ($user) {
                         $this->users->delete($index);
                         redirect(array('dashboard', 'users?notice=user-deleted'));
                     }
                     redirect(array('dashboard', 'unknow-user'));
                 } else {
                     if ($page == 'profile') {
                         $this->load->library('form_validation');
                         $this->form_validation->set_rules('user_email', __('User Email'), 'valid_email');
                         $this->form_validation->set_rules('old_pass', __('Old Pass'), 'min_length[6]');
                         $this->form_validation->set_rules('password', __('Password'), 'min_length[6]');
                         $this->form_validation->set_rules('confirm', __('Confirm'), 'matches[password]');
                         // Launch events for user profiles edition rules
                         $this->events->do_action('user_profile_rules');
                         if ($this->form_validation->run()) {
                             $exec = $this->users->edit($this->users->auth->get_user_id(), $this->input->post('user_email'), $this->input->post('password'), $this->input->post('userprivilege'), null, $this->input->post('old_pass'), 'profile');
                             $this->notice->push_notice_array($exec);
                         }
                         $this->gui->set_title(sprintf(__('My Profile — %s'), get('core_signature')));
//.........这里部分代码省略.........
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:101,代码来源:dashboard.php


示例3: session_start

<?php
session_start();
	if (!isset($_SESSION['admin'])) header("Location:../login.php");
if (isset($_REQUEST['id']))
{
	$id = $_REQUEST['id'];
	$sql = "SELECT * FROM tbl_admin WHERE id ='".$id."';";
	$q = mysql_query($sql);
	$arr = farray($q);
	$user = $arr['username'];
	$password = $arr['password'];
	$email = $arr['email'];
	
	$tit = 'Edit Information of User';
	$do = 'index.php?f=manager&act=editadmin&id='.$id;
}

?>
<p><b><?=$tit?></b></p>
<form name="addadmin" id="addadmin" method="post" action="<?=$do?>">
<table width="100%" border="0" cellspacing="2" cellpadding="2" style="border: 1px solid #d8d8d8">
  <tr>
    <td width="389">Username: *</td>
    <td width="579"><input name="user" type="text" id="user" value="<?=$user?>" />  </td>
  </tr>
  <tr>
    <td>Password : *</td>
    <td><input type="password" name="password" id="password" /></td>
  </tr>
  <tr>
    <td>Confirm: *</td>
开发者ID:NoahPena,项目名称:Aging-In-Place,代码行数:31,代码来源:addadmin.php


示例4: require_once

<?php require_once(MODDIR.'xform/xform.php'); require_once(MODDIR.'control.php');
$opt=gpost('opt'); $cid=gpost('cid'); if($cid=='')$cid=0;

$ssid=session_id();
dbDel("pus_tpjm","ssid='$ssid'");

$fmod='peminjaman';
$xform=new xform($fmod,$opt,$cid);

if($opt=='uf'){ // Nilai field editan
	//$t=mysql_query("SELECT * FROM pus_katalog WHERE replid='$cid' LIMIT 0,1");
	//$data=mysql_fetch_array($t);
	$ttl='Edit';
}
else { // Nilai field default
	$data=farray();
	$ttl='Tambah';
	$data['tanggal1']=date("Y-m-d");
	$data['tanggal2']=date("Y-m-d",strtotime("+7 day"));
}

$xform->title($ttl.' data peminjaman');
$xform->table_begin();
	$xform->col_begin('50%');
	$xform->set_fieldw(340);
	$xform->group_begin('Data Peminjam');
		$s='<button title="Cari" class="btn" style="margin-right:4px" onclick="sirkulasi_member_add()"><div class="bi_srcb">&nbsp;</div></button>';
		$xform->fi('Peminjam',iText('smember','','width:250px;margin-right:4px','ID atau nama member','onkeyup="sirkulasi_member_cari(event)"').$s);
		hiddenval('member_id',0);
		hiddenval('member_tipe',0);
		hiddenval('sirkulasi_form',1);
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:peminjaman_form.php


示例5: __posttype_controller

 public function __posttype_controller($namespace, $page = 'list', $id = 0, $taxonomy_arg1 = 'list', $taxonomy_arg2 = 0)
 {
     if ($this->current_posttype = riake($namespace, $this->config->item('posttypes'))) {
         $data['current_posttype'] = $this->current_posttype;
         $data['post_namespace'] = $namespace;
         if ($page === 'list') {
             $id = $id === 0 ? 1 : $id;
             $post_limit = 20;
             $post_nbr = count($this->current_posttype->get());
             $pagination = pagination_helper($post_limit, $post_nbr, $id, site_url(array('dashboard', 'posttype', $namespace, 'list')), site_url(array('error', 'code', 'page-404')));
             $this->config->set_item('pagination_data', $pagination);
             $post = $this->current_posttype->get(array(array('limit' => array('start' => riake('start', $pagination), 'end' => riake('end', $pagination)))));
             $data['post'] = $post;
             $data['post_list_label'] = $this->current_posttype->posts_list_label;
             $this->gui->set_title($this->current_posttype->posts_list_label);
             $this->load->view('../modules/post_type/views/list', $data, false);
         } else {
             if ($page === 'new') {
                 $data['post_namespace'] = $namespace;
                 $data['new_post_label'] = $this->current_posttype->new_post_label;
                 $this->load->library('form_validation');
                 $this->form_validation->set_rules('post_title', __('Post title'));
                 if ($this->form_validation->run()) {
                     $return = $this->current_posttype->set($this->input->post('post_title'), $this->input->post('post_content'), riake('post_meta', $_POST, array()), riake('post_taxonomy', $_POST, array()), $this->input->post('post_status'), $this->input->post('post_parent'), $status = 'set');
                     if (riake('msg', $return) === 'custom-query-saved') {
                         redirect(array('dashboard', 'posttype', $namespace, 'edit', riake('id', $return) . '?notice=' . riake('msg', $return)));
                     }
                     get_instance()->notice->push_notice($this->lang->line(riake('msg', $return)));
                 }
                 $this->gui->set_title($this->current_posttype->new_post_label);
                 $this->load->view('../modules/post_type/views/create', $data, false);
             } else {
                 if ($page === 'edit') {
                     $this->load->library('form_validation');
                     $this->form_validation->set_rules('post_title', __('Post title'));
                     if ($this->form_validation->run()) {
                         $return = $this->current_posttype->update($this->input->post('post_title'), $this->input->post('post_content'), riake('post_meta', $_POST, array()), riake('post_taxonomy', $_POST, array()), $this->input->post('post_status'), $this->input->post('post_parent'), $status = 'publish', $id);
                         if (riake('msg', $return) === 'custom-query-saved') {
                             redirect(array('dashboard', 'posttype', $namespace, 'edit', riake('id', $return) . '?notice=' . riake('msg', $return)));
                         }
                         get_instance()->notice->push_notice($this->lang->line(riake('msg', $return)));
                     }
                     // print_array( get_core_vars( 'post' ) );die;
                     $this->gui->set_title($this->current_posttype->edit_post_label);
                     $this->load->view('../modules/post_type/views/edit', array('post_namespace' => $namespace, 'new_post_label' => $this->current_posttype->new_post_label, 'current_posttype' => $this->current_posttype, 'post' => farray($this->current_posttype->get(array(array('where' => array('id' => $id)))))), false);
                 } else {
                     if ($page === 'taxonomy') {
                         // $id is taxonomy namespace here
                         if (in_array($id, array_keys(force_array($taxonomy = $this->current_posttype->query->get_defined_taxonomies())))) {
                             $data = array();
                             $data['current_taxonomy'] = $current_taxonomy = riake($id, $taxonomy);
                             $data['taxonomy_namespace'] = $taxonomy_namespace = $id;
                             $data['taxonomy'] = $taxonomy;
                             $data['taxonomy_list_label'] = riake('taxonomy-list-label', $current_taxonomy);
                             $data['post_namespace'] = $namespace;
                             if ($taxonomy_arg1 === 'list') {
                                 $taxonomy_limit = 20;
                                 $taxonomy_arg2 = $taxonomy_arg2 === 0 ? 1 : $taxonomy_arg2;
                                 $taxonomies_nbr = count($this->current_posttype->query->get_taxonomies($taxonomy_namespace));
                                 $pagination = pagination_helper($taxonomy_limit, $taxonomies_nbr, $taxonomy_arg2, site_url(array('dashboard', 'posttype', $namespace, $page, $id, $taxonomy_arg1)), site_url(array('error', 'code', 'page-404')));
                                 $data['taxonomy_list_label'] = riake('taxonomy-list-label', $current_taxonomy);
                                 $data['taxonomies'] = $this->current_posttype->query->get_taxonomies($taxonomy_namespace, $pagination['start'], $pagination['end']);
                                 $data['taxonomies_nbr'] = $taxonomies_nbr;
                                 $data['pagination'] = $pagination;
                                 $data['current_taxonomy'] = $current_taxonomy;
                                 $this->gui->set_title(riake('new-taxonomy-label', $current_taxonomy));
                                 $this->load->view('../modules/post_type/views/taxonomy-list', $data);
                             } else {
                                 if ($taxonomy_arg1 === 'new') {
                                     $this->load->library('form_validation');
                                     $this->form_validation->set_rules('taxonomy_title', __('Taxonomy Title'), 'required');
                                     if ($this->form_validation->run()) {
                                         $result = $this->current_posttype->query->set_taxonomy($data['taxonomy_namespace'], $this->input->post('taxonomy_title'), $this->input->post('taxonomy_content'), in_array($this->input->post('taxonomy_parent'), array(false, ''), TRUE) ? null : $this->input->post('taxonomy_parent'));
                                         get_instance()->notice->push_notice($this->lang->line($result));
                                     }
                                     $this->gui->set_title(riake('new-taxonomy-label', $current_taxonomy, __('New taxonomy')));
                                     $this->load->view('../modules/post_type/views/taxonomy-create', $data, false);
                                 } else {
                                     if ($taxonomy_arg1 === 'edit') {
                                         $this->load->library('form_validation');
                                         $this->form_validation->set_rules('taxonomy_title', __('Taxonomy Title'), 'required');
                                         if ($this->form_validation->run()) {
                                             $result = $this->current_posttype->query->update_taxonomy($id, $this->input->post('taxonomy_title'), $this->input->post('taxonomy_content'), $taxonomy_arg2, in_array($this->input->post('taxonomy_parent'), array(false, ''), TRUE) ? null : $this->input->post('taxonomy_parent'));
                                             get_instance()->notice->push_notice($this->lang->line('taxonomy-set'));
                                         }
                                         $data['taxonomy_id'] = $taxonomy_arg2;
                                         $data['get_taxonomy'] = farray($this->current_posttype->query->get_taxonomies($taxonomy_namespace, $taxonomy_arg2, 'as_id'));
                                         $this->gui->set_title(riake('edit-taxonomy-label', $current_taxonomy, __('Edit taxonomy')));
                                         $this->load->view('../modules/post_type/views/taxonomy-edit', $data);
                                     }
                                 }
                             }
                         } else {
                             redirect(array('dashboard', 'error', 'unknow-taxonomy'));
                         }
                     } else {
                         if ($page === 'comments') {
                             if ($id === 'approve' && $taxonomy_arg1 != 0) {
                                 $exec = $this->current_posttype->query->comment_status($taxonomy_arg1, 1);
                                 if ($exec == 'comment-edited') {
//.........这里部分代码省略.........
开发者ID:2329697501,项目名称:tendoo-cms,代码行数:101,代码来源:post_type.php


示例6: dbUpdate

            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
                $q &= dbDel("aka_siswa", "kelas='{$cid}'");
            }
        }
    }
    //$fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('kelas', 'tingkat', 'kapasitas', 'wali', 'keterangan');
        $r['tahunajaran'] = gpost('tahunajaran');
        $r['tingkat'] = gpost('tingkat');
        $r['kapasitas'] = 1;
    }
    $fform->dimension(450, 100);
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $pelajaran = pelajaran_opt(gpost('tahunajaran'));
        $fform->fl('Kelas', kelas_name(gpost('sks_kelas')));
        $fform->fi('Mata pelajaran', iSelect('pelajaran', $pelajaran, $r['kelas']));
        $s = '<button title="Cari" class="btn" style="float:left" onclick="sks_guru_formlist()"><div class="bi_srcb">&nbsp;</div></button>';
        $fform->fi('Guru', iText('sguru', $r['sguru'], 'float:left;margin-right:4px;width:' . ($fform->rwidth - 40) . 'px', '', 'readonly', 'onclick="sks_guru_formlist()"') . $s);
        hiddenval('guru', $r['guru']);
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:sks.php


示例7: dbUpdate

            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
        $r['passwd'] = '';
    } else {
        $r = farray('nama', 'uname', 'passwd', 'rpasswd', 'keterangan');
    }
    $fform->dimension(450, 120);
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fi('Nama anggota', iText('nama', $r['nama'], $fform->rwidths));
        $fform->fi('User ID', iText('uname', $r['uname'], $fform->rwidths));
        $fform->fi('Password', iPswd('passwd', $r['passwd'], $fform->rwidths));
        $fform->fi('Konfirmasi password', iPswd('rpasswd', $r['rpasswd'], $fform->rwidths));
    } else {
        if ($opt == 'df') {
            // Delete form
            $fform->dlg_del($r['uname']);
        }
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:grup.php


示例8: mysql_query

if (!isset($_SESSION['admin'])) header("Location:../login.php");
$sqlad = "SELECT * FROM tbl_admin ORDER BY id ASC";
$qad = mysql_query($sqlad);

?>
<p><b>Set Device Management</b></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="23%"><div class="mn1" align="center">Username</div></td>
    <td width="19%"><div class="mn1" align="center">Device 1</div></td>
     <td width="12%"><div class="mn1" align="center">Device 2 </div></td>
	 <td width="12%"><div class="mn1" align="center">Camera </div></td>
    <td width="11%"><div class="mn1" align="center">Edit</div></td>
  </tr>
  <?php
  	while ($arrad = farray($qad))
			{
  ?>
  <tr>
    <td><div class="mn2" align="center"><?=$arrad['username']?></div></td>
    <td><div class="mn2" align="center"><? if($arrad['device1']==1) echo "Yes"; else echo "No"?></div></td>
	 <td><div class="mn2" align="center"><? if($arrad['device2']==1) echo "Yes"; else echo "No"?></div></td>
	  <td><div class="mn2" align="center"><? if($arrad['camera']==1) echo "Yes"; else echo "No"?></div></td>
    <td><div class="mn2" align="center"><a href="index.php?f=device&act=adddevice&id=<?=$arrad['id']?>"> + </a></div></td>
    
  </tr>
  <?php
  }  
  ?>
</table>
开发者ID:NoahPena,项目名称:Aging-In-Place,代码行数:30,代码来源:manadevice.php


示例9: dbDel

            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    $a = 0;
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
        $a = 0;
        $kategorirek = kategorirek_r($a);
    } else {
        $r = farray('kategorirek', 'kode', 'nama', 'keterangan');
        $r['kategorirek'] = gpost('skategorirek');
        $kategorirek = kategorirek_r($r['kategorirek']);
        if ($r['kategorirek'] != 0) {
            //$r['kode']=$r['kategorirek'];
        }
    }
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fi('Kategori', iSelect('kategorirek', $kategorirek, $r['kategorirek'], '', 'rekening_setkode()'));
        $fform->fi('Kode', iText('kode', $r['kode'], 'width:80px'));
        $fform->fi('Rekening', iText('nama', $r['nama'], $fform->rwidths));
        $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3));
    } else {
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:rekening.php


示例10: dbDel

        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
                $q = dbDel("aka_tingkat", "tahunajaran='{$cid}'");
                //$q&=dbDel("aka_siswa","aka_tahunajaran='$cid'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('tahunajaran', 'tglmulai', 'tglakhir', 'keterangan');
        $r['departemen'] = $inp['departemen'];
        $r['tahunajaran'] = date("Y") . '-' . date("Y", strtotime("+1 year"));
    }
    $fform->fwidth_del = 600;
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fl('Departemen', departemen_name($r['departemen']));
        $fform->fi('Tahun Ajaran', iText('tahunajaran', $r['tahunajaran'], $fform->rwidths));
        $fform->fi('Tanggal mulai', inpDate('tglmulai', $r['tglmulai']));
        $fform->fi('Tanggal akhir', inpDate('tglakhir', $r['tglakhir']));
        $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3));
        if ($opt == 'af' && tahunajaran_aktif($r['departemen']) != 0) {
            // iCheckbox (id, name, value, label, input value, style)
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:tahunajaran.php


示例11: delete_taxonomies

 /**
  *    Delete Taxonomy
  *
  * @access        :    Public
  *
  * @params        :    Int (ID)
  *
  * @return        :    String/Array
  **/
 function delete_taxonomies($id)
 {
     if (is_array($id)) {
         $notice = array();
         foreach ($id as $_id) {
             $notices[] = $this->delete_taxonomies($_id);
         }
         return $notices;
     } else {
         if (($taxonomy = farray($this->taxonomy_exists($id))) == TRUE and !$this->taxonomy_is_bound($id)) {
             if (count($this->get_taxonomies(riake('NAMESPACE', $taxonomy))) > 1) {
                 $this->db->where('ID', $id)->where('QUERY_NAMESPACE', $this->query_namespace)->delete('query_taxonomies');
                 return 'taxonomy-deleted';
             }
             return 'cant-delete-the-latest-taxonomy';
         }
         return 'taxonomy-not-found-or-bound';
     }
 }
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:28,代码来源:CustomQuery.php


示例12: dbUpdate

            // edit
            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('bagian', 'keterangan');
    }
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fi('Nama divisi', iText('bagian', $r['bagian'], $fform->rwidths));
        $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3));
    } else {
        if ($opt == 'df') {
            // Delete form
            $fform->dlg_delw($r['bagian'], 'Data bagian pada pegawai akan menjadi kosong.');
        }
    }
    $fform->foot();
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:bagian.php


示例13: dbDel

        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
                //$q&=dbDel("aka_kelas","kegiatan='$cid'");
                //$q&=dbDel("aka_siswa","kegiatan='$cid'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('nama', 'tanggal1', 'tanggal2', 'keterangan', 'efektif');
        $r['efektif'] = 0;
    }
    $fform->ptop = 60;
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        //$fform->fl('Departemen',departemen_name($r['departemen']));
        //$fform->fl('Tahun ajaran',tahunajaran_name($r['tahunajaran']));
        //$fform->fi('Nama Kegiatan',iText('nama',$r['nama'],$fform->rwidths));
        $fform->fi('Tanggal', inputTanggal('tanggal1', $r['tanggal1']));
        $fform->fi('sampai', inputTanggal('tanggal2', $r['tanggal2']));
        $fform->fi('', iCheckx('efektif', 'Hari efektif', $r['efektif'], 'margin:6px 0px'));
        $fform->fa('Uraian kegiatan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 8));
    } else {
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:kegiatan.php


示例14: dbUpdate

            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
                $q = dbDel("psb_calonsiswa_syarat", "syarat='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('syarat', 'wajib', 'keterangan');
        $r['wajib'] = '1';
    }
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fi('Persyaratan', iText('syarat', $r['syarat'], $fform->rwidths, '', '', $cid == '1' || $cid == '2' ? 'disabled' : ''));
        $fform->fi('Sifat', iSelect('wajib', array('1' => 'Wajib', '0' => 'Tidak wajib'), $r['wajib']));
        $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3));
    } else {
        if ($opt == 'df') {
            // Delete form
            $fform->dlg_del($r['syarat']);
        }
    }
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:syarat.php


示例15: dbDel

                    dbDel($dbtable . '_ayah', "siswa='{$cid}'");
                    dbDel($dbtable . '_ibu', "siswa='{$cid}'");
                    dbDel($dbtable . '_keluarga', "siswa='{$cid}'");
                    dbDel($dbtable . '_kontakdarurat', "siswa='{$cid}'");
                    dbDel($dbtable . '_saudara', "siswa='{$cid}'");
                }
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('nis', 'nisn');
        $r['departemen'] = gpost('departemen');
        $r['tahunajaran'] = gpost('tahunajaran');
        $r['kelas'] = gpost('kelas');
    }
    $fform->reg['title_af'] = '<idata>';
    $fform->reg['title_uf'] = 'Edit <idata>';
    $fform->reg['title_df'] = 'Batalkan <idata>';
    $fform->dimension(350);
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $pros = gpost('proses');
        $tp = mysql_query("SELECT angkatan FROM psb_proses WHERE replid='{$pros}'");
        $rp = mysql_fetch_array($tp);
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:penempatan.php


示例16: get

 /**
  * Get option
  * 
  * Get option from database
  *
  * @access : public
  * @param : string
  * @param : int user id
  * @return : var (can return null if key is not set)
  **/
 function get($key = null, $user_id = NULL, $autoload = false)
 {
     // option general otpions can be saved on global options array for autoload parameters. User Parameters must be loaded from db.
     if (riake($key, $this->options) && $user_id == NULL) {
         return $this->options[$key];
     } else {
         if (riake($key, $this->user_options) && $user_id === 'current_user') {
             return $this->user_options[$key];
         }
     }
     // get only data from user
     if ($user_id !== NULL) {
         $this->db->where('user', $user_id);
     }
     if ($key !== NULL) {
         $this->db->where('key', $key);
     }
     if ($autoload == true) {
         $this->db->where('autoload', true);
     }
     // fetch data
     $query = $this->db->get('options');
     $option = $query->result_array();
     // if there is any result
     if ($key != null) {
         if ($option) {
             $value = riake('value', farray($option));
             $value = is_array($array = json_decode($value, true)) ? $array : $value;
             // converting array to JSON
             $value = in_array($value, array('true', 'false')) ? $value === 'true' ? true : false : $value;
             // Converting Bool to string
             // Internal Cache
             if ($user_id == NULL) {
                 $this->options[$key] = $value;
             } else {
                 $this->user_options[$key] = $value;
             }
             return $value;
         }
     } else {
         $key_value = array();
         foreach ($option as $_option) {
             $value = riake('value', $_option);
             $value = is_array($array = json_decode($value, true)) ? $array : $value;
             // converting array to JSON
             $value = in_array($value, array('true', 'false')) ? $value === 'true' ? true : false : $value;
             // Converting Bool to string
             $key_value[riake('key', $_option)] = $value;
             // Internal Cache
             if ($user_id == NULL) {
                 $this->options[riake('key', $_option)] = $value;
             } else {
                 if ($user_id === 'current_user') {
                     $this->user_options[$user_id] = $value;
                 }
             }
         }
         return $key_value;
     }
     return NULL;
 }
开发者ID:eboominathan,项目名称:tendoo-cms,代码行数:71,代码来源:Options.php


示例17: dbUpdate

            // edit
            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('judul', 'penyelenggara', 'tempat', 'tgl1', 'tgl2', 'pembicara', 'peserta', 'jenistraining');
    }
    $fform->ptop = 50;
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fi('Judul', iText('judul', $r, $fform->rwidths));
        $fform->fi('Penyelenggara', iText('penyelenggara', $r, $fform->rwidths));
        $fform->fi('Tempat', iText('tempat', $r, $fform->rwidths));
        $fform->fi('Tanggal', inputDate('tgl1', $r));
        $fform->fi('', inputDate('tgl2', $r));
        $fform->fi('Pembicara', iText('pembicara', $r, $fform->rwidths));
        $fform->fi('Jenis training', iSelect('jenistraining', jenistraining_r($a), $r));
        $fform->fa('Peserta', iTextarea('peserta', $r, $fform->rwidths, 5));
    } else {
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:training.php


示例18: dbUpdate

            // edit
            $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
        } else {
            if ($opt == 'd') {
                // delete
                $q = dbDel($dbtable, "replid='{$cid}'");
            }
        }
    }
    $fform->notif($q);
} else {
    if ($opt == 'uf' || $opt == 'df') {
        // Prepocessing form
        $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    } else {
        $r = farray('nama', 'keterangan');
    }
    $fform->dimension(400, 110);
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $fform->fi('Nama jenis barang', iText('nama', $r['nama'], $fform->rwidths));
        //$fform->fa('Keterangan',iTextarea('keterangan',$r['keterangan'],$fform->rwidths,3));
    } else {
        if ($opt == 'df') {
            // Delete form
            $fform->dlg_del($r['nama']);
        }
    }
    $fform->foot();
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:inventory_kelompokbrg.php


示例19: dbUpdate


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fastcgi_finish_request函数代码示例发布时间:2022-05-15
下一篇:
PHP fans_update函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap