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

PHP user_id函数代码示例

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

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



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

示例1: view

 public function view($id = NULL)
 {
     $settings = $this->data['settings'] = $this->settings->get_settings();
     $user = $this->data['user'] = $this->ion_auth->get_user(user_id());
     $ticket = $this->data['ticket'] = $this->core->get_ticket($id);
     $replies = $this->data['replies'] = $this->core->get_ticket_replies($ticket->code);
     $client = $this->data['client'] = $this->ion_auth->get_user($ticket->client);
     if (isset($_POST['reply'])) {
         // Quick and dirty - reply
         $this->form_validation->set_rules('reply', 'Reply', 'required|trim|xss_clean');
         if ($this->form_validation->run() == TRUE) {
             if (count($replies) == 0) {
                 $subject = $ticket->subject;
             } else {
                 $subject = $replies[count($replies) - 1]->subject;
             }
             $query = $this->db->query("INSERT INTO tickets (code, subject, issue, client, project, status, reply) VALUES ('{$ticket->code}', 'RE: {$subject}', '<b>{$user->username} (admin) says:</b> " . mysql_real_escape_string($_POST['reply']) . "', '{$ticket->client}', '{$ticket->project}', 'Open', 1)");
             if ($query) {
                 // Send Email
                 $email_data['user'] = $user->username;
                 $email_data['reply'] = '<b>' . $user->username . ' (admin) says:</b> ' . $_POST['reply'];
                 $email_data['ticket_id'] = $ticket->ticket_id;
                 $email_data['ticket_subject'] = 'RE: ' . $subject;
                 $this->email->from($settings['company_email'], $settings['site_name']);
                 $this->email->to($client->email);
                 $this->email->subject('New Reply On Your Ticket');
                 $this->email->message($this->load->view('emails/ticket_reply', $email_data, true));
                 $this->email->send();
                 flashmsg('New reply successfully added to ticket', 'success');
                 redirect('/admin/tickets/view/' . $id);
             }
         }
     }
 }
开发者ID:roncodes,项目名称:bitsy-crm,代码行数:34,代码来源:tickets.php


示例2: index

 public function index()
 {
     $data = array();
     $this->load->model(array('questionnaires_model', 'recently_viewed_questionnaires_model'));
     // Check for any previous message
     if ($this->session->flashdata('message_content')) {
         $data['severity'] = $this->session->flashdata('message_severity') ? $this->session->flashdata('message_severity') : 'info';
         $data['message'] = $this->session->flashdata('message_content');
     }
     // Load data for tables
     $data['recently_returned_table'] = $this->questionnaires_model->recently_returned_table();
     $data['recently_viewed_table'] = $this->recently_viewed_questionnaires_model->recently_viewed_table(user_id());
     $data['questionnaires_table'] = $this->questionnaires_model->questionnaires_table();
     // Load Chart.js resources
     $this->layout->add_script('/assets/js/chartJs/chart.min.js');
     // Load Moment.js and Relative Time resources
     $this->layout->add_script('/assets/js/momentJs/moment.min.js');
     $this->layout->add_script('/assets/js/relativeTime.js');
     // Load Peity resources
     $this->layout->add_script('/assets/js/peity/jquery.peity.min.js');
     // Load DataTables resources
     $this->layout->add_stylesheet('/assets/css/dataTables/dataTables.bootstrap.css');
     $this->layout->add_script('/assets/js/dataTables/jquery.dataTables.js');
     $this->layout->add_script('/assets/js/dataTables/dataTables.bootstrap.js');
     // General dashboard style and script
     $this->layout->add_stylesheet('/assets/css/dashboard.css');
     $this->layout->add_script('/assets/js/dashboard.js');
     // Load the view
     $this->layout->set_page_title('Dashboard');
     $this->layout->view('dashboard/home', $data);
 }
开发者ID:AdrianBav,项目名称:ee-questionnaire,代码行数:31,代码来源:dashboard.php


示例3: saveRiwayatPendidikan

 public function saveRiwayatPendidikan($post)
 {
     if ($post) {
         $this->db->trans_begin();
         $this->db->set('NIP', $post['nip']);
         $this->db->set('TINGKAT_PENDIDIKAN_ID', $post['tingkat_pendidikan']);
         $this->db->set('PENDIDIKAN_ID', $post['nama_pendidikan']);
         $this->db->set('TANGGAL_LULUS', mysql_date($post['tanggal_lulus']));
         $this->db->set('TAHUN_LULUS', $post['tahun_lulus']);
         $this->db->set('NOMOR_IJAZAH', $post['nomor_ijazah']);
         $this->db->set('NAMA_SEKOLAH', $post['nama_sekolah']);
         $this->db->set('GELAR_DEPAN', $post['gelar_depan']);
         $this->db->set('GELAR_BELAKANG', $post['gelar_belakang']);
         $this->db->set('STATUS_PENDIDIKAN', $post['status_pendidikan']);
         if (!empty($post['riwayat_pendidikan_id'])) {
             $this->db->set('USERUPDATE', user_id());
             $this->db->set('UPDATEDATE', 'NOW()', FALSE);
             $this->db->where('RIWAYAT_PENDIDIKAN_ID', $post['riwayat_pendidikan_id']);
             $this->db->update('sp_riwayat_pendidikan');
         } else {
             $this->db->set('USERINSERT', user_id());
             $this->db->set('INSERTDATE', 'NOW()', FALSE);
             $this->db->insert('sp_riwayat_pendidikan');
         }
         if ($this->db->trans_status() === FALSE) {
             $this->db->trans_rollback();
             $success = FALSE;
         } else {
             $this->db->trans_commit();
             $success = TRUE;
         }
         return $success;
     }
 }
开发者ID:allfonso,项目名称:simpeg2,代码行数:34,代码来源:riwayat_pendidikan_model.php


示例4: saveRiwayatPenghargaan

 public function saveRiwayatPenghargaan($post)
 {
     if ($post) {
         $this->db->trans_begin();
         $this->db->set('NIP', $post['nip']);
         $this->db->set('PENGHARGAAN_ID', $post['jenis_penghargaan_id']);
         $this->db->set('TANGGAL_SK', mysql_date($post['penghargaan_tgl_sk']));
         $this->db->set('NOMOR_SK', $post['penghargaan_no_sk']);
         if (!empty($post['riwayat_penghargaan_id'])) {
             $this->db->set('USERUPDATE', user_id());
             $this->db->set('UPDATEDATE', 'NOW()', FALSE);
             $this->db->where('RIWAYAT_PENGHARGAAN_ID', $post['riwayat_penghargaan_id']);
             $this->db->update('sp_riwayat_penghargaan');
         } else {
             $this->db->set('USERINSERT', user_id());
             $this->db->set('INSERTDATE', 'NOW()', FALSE);
             $this->db->insert('sp_riwayat_penghargaan');
         }
         if ($this->db->trans_status() === FALSE) {
             $this->db->trans_rollback();
             $success = FALSE;
         } else {
             $this->db->trans_commit();
             $success = TRUE;
         }
         return $success;
     }
 }
开发者ID:allfonso,项目名称:simpeg2,代码行数:28,代码来源:riwayat_penghargaan_model.php


示例5: save

 function save($data)
 {
     $app_id = $data['app_id'];
     if ($q = $this->db->query("select a.cust_id,c.cust_name,c.phone \n\t\t\tfrom ls_app_master a left join ls_cust_master c\n\t\t\ton a.cust_id=c.cust_id where a.app_id='" . $app_id . "'")) {
         if ($row = $q->row()) {
             $data['cust_id'] = $row->cust_id;
             $data['cust_name'] = $row->cust_name;
             $data['phone'] = $row->phone;
         }
     }
     $score = 0;
     foreach ($data as $key => $value) {
         if ($value == "1") {
             $score++;
         }
     }
     $score = round($score / 14 * 100);
     $ok = $this->db->insert($this->table_name, $data);
     if ($ok) {
         if ($score > 75) {
             $this->db->where("app_id", $app_id)->update("ls_app_master", array("scored" => 1, "score_value" => $score, "status" => "Wait Review"));
         } else {
             //masuk inbox sa nomor SPK ditolak
             $message = "Nomor SPK {$app_id} tidak memenuhi syarat score value = {$score}";
             $to = $this->db->select("create_by")->where("app_id", $app_id)->get("ls_app_master")->row()->create_by;
             inbox_send(user_id(), $to, "Not Recomended", $message);
             $this->db->where("app_id", $app_id)->update("ls_app_master", array("scored" => 1, "score_value" => $score, "status" => "Not Recomended"));
         }
     }
     return $ok;
 }
开发者ID:AlvaCorp,项目名称:maxon,代码行数:31,代码来源:scoring_model.php


示例6: location_impossible

function location_impossible($user_id = false)
{
    if (!$user_id) {
        $user_id = user_id();
    }
    db_query("UPDATE users SET impossible = '1', sweep_ts = NULL\n\t\tWHERE id = '" . (int) $user_id . "';");
}
开发者ID:rcrowley,项目名称:wheresmycar,代码行数:7,代码来源:lib_location.php


示例7: index

 public function index()
 {
     $this->data['invoices'] = $this->core->get_recent_client_invoices(user_id());
     $this->data['projects'] = $this->core->get_recent_client_projects(user_id());
     $this->data['user'] = $this->ion_auth->get_user(user_id());
     $this->data['meta_title'] = 'Clients Manager';
 }
开发者ID:roncodes,项目名称:bitsy-crm,代码行数:7,代码来源:frontend.php


示例8: createAccountContactInformation

 public function createAccountContactInformation()
 {
     $this->accessNumber = 1;
     if ($this->checkACL()) {
         $this->form_validation->set_rules('type', 'Contact Information Type', 'required');
         $this->form_validation->set_rules('detail', 'Detail', 'required');
         if ($this->form_validation->run()) {
             $result = $this->m_account_contact_information->createAccountContactInformation(user_id(), $this->input->post("type"), $this->input->post("detail"));
             if ($result) {
                 $this->actionLog($result);
                 $this->responseData($result);
             } else {
                 $this->responseError(3, "Failed to create");
             }
         } else {
             if (count($this->form_validation->error_array())) {
                 $this->responseError(102, $this->form_validation->error_array());
             } else {
                 $this->responseError(4, "Required Fields are empty");
             }
         }
     } else {
         $this->responseError(1, "Not Authorized");
     }
     $this->outputResponse();
 }
开发者ID:patricksage,项目名称:wasteline,代码行数:26,代码来源:c_account_contact_information.php


示例9: comment

 public function comment($id = NULL)
 {
     $settings = $this->data['settings'] = $this->settings->get_settings();
     $user = $this->data['user'] = $this->ion_auth->get_user(user_id());
     $project = $this->data['project'] = $this->core->get_project($id);
     if ($project->client != $user->id) {
         flashmsg('Project does not exist', 'error');
         redirect('client/projects');
     }
     if (isset($_POST['new_update'])) {
         // Quick and dirty - add a new update
         $this->form_validation->set_rules('title', 'Comment Title', 'required|trim|xss_clean');
         $this->form_validation->set_rules('description', 'Comment Description', 'required|trim|xss_clean');
         if ($this->form_validation->run() == TRUE) {
             $query = $this->db->query("INSERT INTO project_updates (project_id, title, description) VALUES ('{$project->id}', 'Comment by Client: {$_POST['title']}', '{$_POST['description']}')");
             if ($query) {
                 // Send Email
                 $email_data['user'] = $user->username;
                 $email_data['project_name'] = $project->name;
                 foreach ($this->core->get_admin_emails() as $email) {
                     $this->email->from($settings['company_email'], $settings['site_name']);
                     $this->email->to($email);
                     $this->email->subject('New Comment on Project');
                     $this->email->message($this->load->view('emails/project_comment', $email_data, true));
                     $this->email->send();
                 }
                 flashmsg('Project Comment added successfully to ' . $project->name . '.', 'success');
                 redirect('/client/projects/comment/' . $id);
             }
         }
     }
     $this->data['updates'] = $this->core->get_updates($id);
     $this->data['meta_title'] = 'Comment on Project';
 }
开发者ID:roncodes,项目名称:bitsy-crm,代码行数:34,代码来源:projects.php


示例10: adminuser

function adminuser($lang, $arglist = false)
{
    if (!user_has_role('administrator')) {
        return run('error/unauthorized', $lang);
    }
    $user_id = false;
    if (is_array($arglist)) {
        if (isset($arglist[0])) {
            $user_id = $arglist[0];
        }
    }
    if (!$user_id) {
        return run('error/notfound', $lang);
    }
    $user_id = user_id($user_id);
    if (!$user_id) {
        return run('error/notfound', $lang);
    }
    $useredit = build('useredit', $lang, $user_id);
    if ($useredit === false) {
        return redirect('admin', $lang);
    }
    head('title', translate('admin:title', $lang));
    head('description', false);
    head('keywords', false);
    head('robots', 'noindex, nofollow');
    $admin = true;
    $banner = build('banner', $lang, compact('admin'));
    $content = view('adminuser', $lang, compact('useredit'));
    $output = layout('standard', compact('banner', 'content'));
    return $output;
}
开发者ID:RazorMarx,项目名称:izend,代码行数:32,代码来源:adminuser.php


示例11: store

 /**
  * Display the specified resource.
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(MessageUserRequest $request)
 {
     try {
         $mails = $request->get('mails');
         $attributes = $request->all();
         $attributes['user_id'] = user_id('web');
         $attributes['user_type'] = user_type();
         $attributes['name'] = user()->name;
         $attributes['from'] = user()->email;
         $attributes['to'] = implode(",", $mails);
         $attributes['status'] = $request->get('status');
         $message = $this->repository->create($attributes);
         if ($request->get('status') == 'Sent') {
             foreach ($mails as $mail) {
                 $attributes['status'] = "Inbox";
                 $message1 = $this->repository->create($attributes);
             }
         }
         $sent_count = $this->repository->msgCount('Sent');
         $inbox_count = $this->repository->msgCount('Inbox');
         return response()->json(['message' => trans('messages.success.updated', ['Module' => trans('message::message.name')]), 'code' => 204, 'redirect' => trans_url('/user/message/message/' . $message->getRouteKey()), 'sent_count' => $sent_count, 'inbox_count' => $inbox_count], 201);
     } catch (Exception $e) {
         return response()->json(['message' => $e->getMessage(), 'code' => 400], 400);
     }
 }
开发者ID:lavalite,项目名称:message,代码行数:32,代码来源:MessageUserController.php


示例12: index

 public function index()
 {
     $user = $this->data['user'] = $this->ion_auth->get_user(user_id());
     if (isset($_POST['update_password'])) {
         $this->form_validation->set_rules('old_password', 'Old Password', 'required');
         $this->form_validation->set_rules('new_password', 'Password', 'min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[new_password_confirm]|trim|xss_clean');
         $this->form_validation->set_rules('new_password_confirm', 'Password Confirmation', 'trim|xss_clean');
         if ($this->form_validation->run() === TRUE) {
             if ($this->ion_auth->change_password($user->email, $_POST['old_password'], $_POST['new_password'])) {
                 flashmsg('Your password has been updated successfully.', 'success');
                 redirect('/client/profile');
             } else {
                 flashmsg('Your password failed to be updated.', 'error');
                 redirect('/client/profile');
             }
         }
     }
     $this->form_validation->set_rules('email', 'Email', 'required|valid_email');
     if ($this->form_validation->run() === TRUE) {
         $this->ion_auth->update_user(user_id(), array('email' => $_POST['email'], 'first_name' => $_POST['first_name'], 'last_name' => $_POST['last_name'], 'company' => $_POST['company'], 'phone' => $_POST['phone'], 'address' => $_POST['address'], 'timezone' => $_POST['timezone']));
         flashmsg('Your profile has been updated successfully.', 'success');
         redirect('/client/profile');
     }
     $timezones = array('America/Phoenix', 'America/Adak', 'America/Anchorage', 'America/Anguilla', 'America/Antigua', 'America/Araguaina', 'America/Argentina/Buenos_Aires', 'America/Argentina/Catamarca', 'America/Argentina/ComodRivadavia', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/La_Rioja', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Salta', 'America/Argentina/San_Juan', 'America/Argentina/San_Luis', 'America/Argentina/Tucuman', 'America/Argentina/Ushuaia', 'America/Aruba', 'America/Asuncion', 'America/Atikokan', 'America/Atka', 'America/Bahia', 'America/Bahia_Banderas', 'America/Barbados', 'America/Belem', 'America/Belize', 'America/Blanc-Sablon', 'America/Boa_Vista', 'America/Bogota', 'America/Boise', 'America/Buenos_Aires', 'America/Cambridge_Bay', 'America/Campo_Grande', 'America/Cancun', 'America/Caracas', 'America/Catamarca', 'America/Cayenne', 'America/Cayman', 'America/Chicago', 'America/Chihuahua', 'America/Coral_Harbour', 'America/Cordoba', 'America/Costa_Rica', 'America/Creston', 'America/Cuiaba', 'America/Curacao', 'America/Danmarkshavn', 'America/Dawson', 'America/Dawson_Creek', 'America/Denver', 'America/Detroit', 'America/Dominica', 'America/Edmonton', 'America/Eirunepe', 'America/El_Salvador', 'America/Ensenada', 'America/Fort_Wayne', 'America/Fortaleza', 'America/Glace_Bay', 'America/Godthab', 'America/Goose_Bay', 'America/Grand_Turk', 'America/Grenada', 'America/Guadeloupe', 'America/Guatemala', 'America/Guayaquil', 'America/Guyana', 'America/Halifax', 'America/Havana', 'America/Hermosillo', 'America/Indiana/Indianapolis', 'America/Indiana/Knox', 'America/Indiana/Marengo', 'America/Indiana/Petersburg', 'America/Indiana/Tell_City', 'America/Indiana/Vevay', 'America/Indiana/Vincennes', 'America/Indiana/Winamac', 'America/Indianapolis', 'America/Inuvik', 'America/Iqaluit', 'America/Jamaica', 'America/Jujuy', 'America/Juneau', 'America/Kentucky/Louisville', 'America/Kentucky/Monticello', 'America/Knox_IN', 'America/Kralendijk', 'America/La_Paz', 'America/Lima', 'America/Los_Angeles', 'America/Louisville', 'America/Lower_Princes', 'America/Maceio', 'America/Managua', 'America/Manaus', 'America/Marigot', 'America/Martinique', 'America/Matamoros', 'America/Mazatlan', 'America/Mendoza', 'America/Menominee', 'America/Merida', 'America/Metlakatla', 'America/Mexico_City', 'America/Miquelon', 'America/Moncton', 'America/Monterrey', 'America/Montevideo', 'America/Montreal', 'America/Montserrat', 'America/Nassau', 'America/New_York', 'America/Nipigon', 'America/Nome', 'America/Noronha', 'America/North_Dakota/Beulah', 'America/North_Dakota/Center', 'America/North_Dakota/New_Salem', 'America/Ojinaga', 'America/Panama', 'America/Pangnirtung', 'America/Paramaribo', 'America/Phoenix', 'America/Port-au-Prince', 'America/Port_of_Spain', 'America/Porto_Acre', 'America/Porto_Velho', 'America/Puerto_Rico', 'America/Rainy_River', 'America/Rankin_Inlet', 'America/Recife', 'America/Regina', 'America/Resolute', 'America/Rio_Branco', 'America/Rosario', 'America/Santa_Isabel', 'America/Santarem', 'America/Santiago', 'America/Santo_Domingo', 'America/Sao_Paulo', 'America/Scoresbysund', 'America/Shiprock', 'America/Sitka', 'America/St_Barthelemy', 'America/St_Johns', 'America/St_Kitts', 'America/St_Lucia', 'America/St_Thomas', 'America/St_Vincent', 'America/Swift_Current', 'America/Tegucigalpa', 'America/Thule', 'America/Thunder_Bay', 'America/Tijuana', 'America/Toronto', 'America/Tortola', 'America/Vancouver', 'America/Virgin', 'America/Whitehorse', 'America/Winnipeg', 'America/Yakutat', 'America/Yellowknife');
     $this->data['timezones'] = array_combine($timezones, $timezones);
     $this->data['meta_title'] = 'Your Profile';
 }
开发者ID:roncodes,项目名称:bitsy-crm,代码行数:27,代码来源:profile.php


示例13: widget

    /** @see WP_Widget::widget */
    function widget($args, $instance)
    {
        extract($args);
        $widget_title = $instance['widget_title'];
        if (isset($instance['auto_play'])) {
            $auto_play = 'true';
        } else {
            $auto_play = 'false';
        }
        $info = crInstGetInfo(user_id(), access_token());
        echo $before_widget;
        echo $before_title . $widget_title . $after_title;
        echo '<div class="instagram-wrap">';
        echo crInstShowInfo($info, array('website' => true, 'media' => true, 'followers' => true, 'following' => true, 'profile_pic' => true), $this->avatar_width);
        echo crInstShowWidgetData(crInstGetSelfFeed(access_token()), $info, $this->display_photos, $this->item_width, "sIntSelfFeed", $instance['display_caption']);
        echo '</div>';
        ?>
		<script type="text/javascript">
			jQuery(document).ready(function($){
				$("a[data-rel^='sIntSelfFeed']").prettyPhoto({
					hook: 'data-rel',
					autoplay_slideshow: <?php 
        echo $auto_play;
        ?>
,
					social_tools: false
				});
			});
		</script>
<?php 
        echo $after_widget;
    }
开发者ID:sabdev1,项目名称:sabljc,代码行数:33,代码来源:crum-instagram-widget.php


示例14: saveRiwayatKursus

 public function saveRiwayatKursus($post)
 {
     if ($post) {
         $this->db->trans_begin();
         $this->db->set('NIP', $post['nip']);
         //$this->db->set('KURSUS_ID', $post['tingkat_pendidikan']);
         $this->db->set('NAMA_KURSUS', $post['nama_kursus']);
         $this->db->set('TANGGAL_KURSUS', mysql_date($post['tanggal_kursus']));
         $this->db->set('JUMLAH_JAM', $post['jumlah_jam']);
         $this->db->set('TAHUN_KURSUS', $post['tahun_kursus']);
         $this->db->set('INSTANSI_ID', $post['instansi']);
         $this->db->set('INSTITUSI_PENYELENGGARA', $post['institusi_penyelenggara']);
         $this->db->set('TIPE_KURSUS', $post['tipe_kursus']);
         $this->db->set('NOMOR_SERTIFIKAT', $post['nomor_sertifikat']);
         if (!empty($post['riwayat_kursus_id'])) {
             $this->db->set('USERUPDATE', user_id());
             $this->db->set('UPDATEDATE', 'NOW()', FALSE);
             $this->db->where('RIWAYAT_KURSUS_ID', $post['riwayat_kursus_id']);
             $this->db->update('sp_riwayat_kursus');
         } else {
             $this->db->set('USERINSERT', user_id());
             $this->db->set('INSERTDATE', 'NOW()', FALSE);
             $this->db->insert('sp_riwayat_kursus');
         }
         if ($this->db->trans_status() === FALSE) {
             $this->db->trans_rollback();
             $success = FALSE;
         } else {
             $this->db->trans_commit();
             $success = TRUE;
         }
         return $success;
     }
 }
开发者ID:allfonso,项目名称:simpeg2,代码行数:34,代码来源:riwayat_kursus_model.php


示例15: saveRiwayatDiklat

 public function saveRiwayatDiklat($post)
 {
     if ($post) {
         $this->db->trans_begin();
         $this->db->set('NIP', $post['nip']);
         $this->db->set('JENIS_DIKLAT_ID', $post['jenis_diklat']);
         $this->db->set('DIKLAT_STRUKTURAL_ID', $post['diklat_struktural']);
         $this->db->set('NAMA_DIKLAT', $post['nama_diklat']);
         $this->db->set('TANGGAL_MULAI', mysql_date($post['tanggal_mulai']));
         $this->db->set('TANGGAL_SELESAI', mysql_date($post['tanggal_selesai']));
         $this->db->set('NOMOR_SERTIFIKAT', $post['no_sertifikat']);
         $this->db->set('JUMLAH_PJL', $post['jumlah_pjl']);
         $this->db->set('PENYELENGGARA', $post['penyelenggara']);
         if (!empty($post['riwayat_diklat_id'])) {
             $this->db->set('USERUPDATE', user_id());
             $this->db->set('UPDATEDATE', 'NOW()', FALSE);
             $this->db->where('RIWAYAT_DIKLAT_ID', $post['riwayat_diklat_id']);
             $this->db->update('sp_riwayat_diklat');
         } else {
             $this->db->set('USERINSERT', user_id());
             $this->db->set('INSERTDATE', 'NOW()', FALSE);
             $this->db->insert('sp_riwayat_diklat');
         }
         if ($this->db->trans_status() === FALSE) {
             $this->db->trans_rollback();
             $success = FALSE;
         } else {
             $this->db->trans_commit();
             $success = TRUE;
         }
         return $success;
     }
 }
开发者ID:allfonso,项目名称:simpeg2,代码行数:33,代码来源:riwayat_diklat_model.php


示例16: login

function login($email, $password)
{
    if (check_password($email, $password)) {
        return create_session(user_id($email));
    } else {
        return false;
    }
}
开发者ID:qiemem,项目名称:GovDialogue,代码行数:8,代码来源:sessionmanagement.php


示例17: user_logout

function user_logout()
{
    if ($id = user_id()) {
        db_query("UPDATE users SET hash = NULL WHERE id = '" . (int) $id . "' LIMIT 1;");
    }
    $GLOBALS['_user_id'] = false;
    setcookie('car', '', strtotime('+1 day'), '/', 'car.rcrowley.org');
}
开发者ID:rcrowley,项目名称:wheresmycar,代码行数:8,代码来源:lib_user.php


示例18: gadget

 public function gadget($count)
 {
     return $this->model->with('user')->where(function ($query) {
         if (user('web')) {
             $query->whereUserId(user_id('web'));
         }
     })->orderBy('id', 'DESC')->take($count)->get();
 }
开发者ID:lavalite,项目名称:task,代码行数:8,代码来源:TaskRepository.php


示例19: _format_data

 public function _format_data($mode)
 {
     $input = elements(['name', 'class', 'acquisition_method', 'acquisition_state', 'estimated_cost', 'beginning_quantity', 'details', 'is_disposed'], $this->input->post(), NULL);
     if ($mode === MODE_CREATE) {
         $input['created_by'] = user_id();
         unset($input['is_disposed']);
     }
     return $input;
 }
开发者ID:biglanggwapoventures,项目名称:ebarangay,代码行数:9,代码来源:Items.php


示例20: set_last_downloaded

 public function set_last_downloaded($questionnaire_id)
 {
     // Define the query
     $this->db->set('last_downloaded_date', 'NOW()', false);
     $this->db->set('last_downloaded_user', user_id());
     $this->db->where('questionnaire_id', $questionnaire_id);
     // Run the query
     $this->db->update('pdfs');
 }
开发者ID:AdrianBav,项目名称:ee-questionnaire,代码行数:9,代码来源:pdfs_model.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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