本文整理汇总了PHP中User_helper::get_uisc_info方法的典型用法代码示例。如果您正苦于以下问题:PHP User_helper::get_uisc_info方法的具体用法?PHP User_helper::get_uisc_info怎么用?PHP User_helper::get_uisc_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User_helper
的用法示例。
在下文中一共展示了User_helper::get_uisc_info方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: base_url
?>
<li><a href="<?php
echo base_url();
?>
report/report_home/">প্রতিবেদন</a></li>
<li><a href="<?php
echo base_url();
?>
home/logout/">লগ আউট</a></li>
</ul>
<div class="clearfix"></div>
</div>
</div>
<?php
$uisc = User_helper::get_uisc_info();
if (sizeof($uisc) > 0) {
?>
<div class="col-lg-12 text-right">
<p class="text-primary">
সেবা কেন্দ্রের নাম: <?php
echo $uisc->uisc_name;
?>
</p>
</div>
<div class="clearfix"></div>
<br/>
<?php
}
?>
示例2: system_save
private function system_save()
{
$user = User_helper::get_user();
$uisc = User_helper::get_uisc_info();
$id = $this->input->post("id");
if ($id > 0) {
if (!$this->permissions['edit']) {
$ajax['status'] = false;
$ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS");
$this->jsonReturn($ajax);
die;
}
} else {
if (!$this->permissions['add']) {
$ajax['status'] = false;
$ajax['system_message'] = $this->lang->line("YOU_DONT_HAVE_ACCESS");
$this->jsonReturn($ajax);
die;
}
}
if (!$this->check_validation()) {
$ajax['status'] = false;
$ajax['system_message'] = $this->message;
$this->jsonReturn($ajax);
} else {
//$service_detail['createdby']=$user->id;
$service_detail['created_time'] = time();
$service_detail['uisc_id'] = $uisc->id;
$service_detail['user_id'] = $user->id;
//$service_detail['status']=$this->config->item('SERVICES_STATUS_PROPOSED');
$this->db->trans_start();
//DB Transaction Handle START
$all_update['status'] = $this->config->item('STATUS_INACTIVE');
Query_helper::update($this->config->item('table_services_uisc'), $all_update, array("user_id = " . $user->id));
$number_of_service = sizeof($this->input->post("service_id"));
$service_id = $this->input->post('service_id');
$uisc_service_id = $this->input->post('uisc_service_id');
for ($i = 0; $i < $number_of_service; $i++) {
$check_post = $service_id[$i];
if ($this->input->post($check_post)) {
$uisc_service_post_id = $uisc_service_id[$i];
// $single_data['remaining']="'remaining'+1";
// Query_helper::update($this->config->item('table_services_uisc'),$single_data,array("user_id = ".$user->id, "service_id = ".$uisc_service_post_id));
$update_sql = "update " . $this->config->item('table_services_uisc') . " set remaining=remaining+1 where user_id='" . $user->id . "' AND service_id='{$uisc_service_post_id}'";
$this->db->query($update_sql);
$service_detail['service_id'] = $check_post;
$service_detail['remaining'] = 1;
Query_helper::add($this->config->item('table_services_uisc'), $service_detail);
}
}
/*
$number_of_own_service=sizeof($this->input->post("own_service_id"));
$service_id=$this->input->post('service_id');
$uisc_service_id=$this->input->post('uisc_service_id');
for($i=0; $i<$number_of_service; $i++)
{
$check_post=$service_id[$i];
if($this->input->post($check_post))
{
$uisc_service_post_id=$uisc_service_id[$i];
// $single_data['remaining']="'remaining'+1";
// Query_helper::update($this->config->item('table_services_uisc'),$single_data,array("user_id = ".$user->id, "service_id = ".$uisc_service_post_id));
$update_sql="update ".$this->config->item('table_services_uisc')." set remaining=remaining+1 where user_id='".$user->id."' AND service_id='$uisc_service_post_id'";
$this->db->query($update_sql);
$service_detail['service_id']=$check_post;
$service_detail['remaining']=1;
Query_helper::add($this->config->item('table_services_uisc'),$service_detail);
}
}
*/
// $service_detail_uisc['uisc_id']=$user->id;
// $service_detail_uisc['service_id']=$service_last_id;
// $service_detail_uisc['user_id']=$user->id;
// $service_detail_uisc['created_time']=time();
// Query_helper::add($this->config->item('table_services_uisc'),$service_detail_uisc);
$this->db->trans_complete();
//DB Transaction Handle END
//die();
if ($this->db->trans_status() === TRUE) {
$this->message = $this->lang->line("MSG_CREATE_SUCCESS");
$this->system_add();
} else {
$ajax['status'] = false;
$ajax['system_message'] = $this->lang->line("MSG_CREATE_FAIL");
$this->jsonReturn($ajax);
}
}
}