本文整理汇总了PHP中curUsrId函数的典型用法代码示例。如果您正苦于以下问题:PHP curUsrId函数的具体用法?PHP curUsrId怎么用?PHP curUsrId使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了curUsrId函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertRecord
function insertRecord()
{
$data = array();
$data['venue_name'] = $this->input->post('venue_name', true);
$data['email'] = $this->input->post('email', true);
$data['phone'] = $this->input->post('phone', true);
$data['city'] = $this->input->post('city', true);
$data['state'] = $this->input->post('state', true);
$data['country'] = $this->input->post('country', true);
$data['postcode'] = $this->input->post('postcode', true);
$data['address'] = $this->input->post('address', true);
$data['description'] = $this->input->post('description', true);
$data['user_id'] = curUsrId();
$config['upload_path'] = $this->config->item('UPLOAD_PATH_VENUES');
$config['allowed_types'] = 'gif|jpg|png';
$config['overwrite'] = FALSE;
$this->load->library('upload', $config);
if (count($_FILES) > 0) {
//Check for valid image upload
if ($_FILES['image']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['image']['tmp_name'])) {
if (!$this->upload->do_upload('image')) {
show_error($this->upload->display_errors('<p class="err">', '</p>'));
return FALSE;
} else {
$upload_data = $this->upload->data();
$data['venue_image'] = $upload_data['file_name'];
}
}
}
$this->db->insert('eventbooking_venues', $data);
}
示例2: tanetData
function tanetData()
{
$inner = $page = array();
$inner['data'] = $this->commonmodel->getAll('invoice_new', false, array(curUsrId()), 'applicant_id');
$page['content'] = $this->load->view('tanet-invoice', $inner, true);
$this->load->view($this->default, $page);
}
示例3: updateRecord
function updateRecord($uid)
{
$data['created_by'] = curUsrId();
$data['title'] = $this->input->post('title', TRUE);
$data['healtharticles_desc'] = $this->input->post('article_description');
$data['datetime'] = date('Y-m-d h:i:s');
$config = array('field' => 'uri', 'title' => 'title', 'table' => 'healtharticles', 'id' => 'healtharticles_id');
$this->load->library('slug', $config);
$data1 = array('title' => $data['title']);
$data['uri'] = $this->slug->create_uri($data1, $uid);
$config['upload_path'] = $this->config->item('UPLOAD_PATH_ARTICLES');
$config['allowed_types'] = '*';
$config['overwrite'] = FALSE;
$this->load->library('upload', $config);
if (count($_FILES) > 0) {
//Check for valid image upload
if ($_FILES['image']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['image']['tmp_name'])) {
if (!$this->upload->do_upload('image')) {
show_error($this->upload->display_errors('<p class="err">', '</p>'));
return FALSE;
} else {
$upload_data = $this->upload->data();
$data['image'] = $upload_data['file_name'];
}
}
}
$this->db->where("healtharticles_id", $uid);
$this->db->update('healtharticles', $data);
}
示例4: index
function index($offset = 0)
{
$this->load->model('Calendermodel');
$this->load->model('user/usermodel');
$this->load->library('form_validation');
$this->load->helper('form');
$this->load->library('pagination');
$this->load->helper('url');
$this->load->helper('text');
$perpage = 100;
$config = array();
$config['base_url'] = base_url() . "calender/index/";
$config['uri_segment'] = 3;
$config['total_rows'] = $this->Calendermodel->countAll();
$config['per_page'] = $perpage;
$config['first_link'] = 'First';
$config['last_link'] = 'Last';
$this->pagination->initialize($config);
$event = array();
$event = $this->Calendermodel->getEvents($this->ids);
if ($this->aauth->isFranshisee()) {
$ids = $this->usermodel->getFranchiseUsersId(curUsrId());
$event = $this->Calendermodel->getEvents($offset, $perpage, $ids);
}
$inner = array();
$inner['event'] = $event;
$inner['pagination'] = $this->pagination->create_links();
$inner['labels'] = array('' => '', 'date' => 'Date', 'title' => 'Event Title', 'status' => 'Status', 'action' => 'Actions');
$page = array();
$page['content'] = $this->load->view('event/event-index', $inner, TRUE);
$this->load->view($this->event, $page);
}
示例5: insertRecord
function insertRecord($customer)
{
$data = array();
$data['first_name'] = $this->input->post('first_name', TRUE);
$data['last_name'] = $this->input->post('last_name', TRUE);
$data['email'] = $this->input->post('email', TRUE);
$data['passwd'] = $this->input->post('passwd', TRUE);
$data['delivery_address1'] = $this->input->post('delivery_address1', TRUE);
$data['delivery_address2'] = $this->input->post('delivery_address2', TRUE);
$data['delivery_phone'] = $this->input->post('delivery_phone', TRUE);
$data['delivery_city'] = $this->input->post('delivery_city', TRUE);
$data['delivery_zipcode'] = $this->input->post('delivery_zipcode', TRUE);
$data['linkedin'] = $this->input->post('linkedin', TRUE);
$data['twitter'] = $this->input->post('twitter', TRUE);
$data['facebook'] = $this->input->post('facebook', TRUE);
$data['user_id'] = curUsrId();
// echo matches[passconf];
$user_id = $this->aauth->create_user($data['email'], $data['passwd'], $data['first_name'], 6, 0, $this->aauth->get_user()->id, false, 0, array('internal' => true));
if ($user_id) {
echo "<pre>";
var_dump($user_id);
$data['customer_id'] = $user_id;
$data['auth_user_id'] = $user_id;
$this->db->insert('customer', $data);
$customer_user_id = $this->db->insert_id();
}
return;
}
示例6: index
function index()
{
if (curUsrId()) {
redirect(createUrl('user/dashboard'));
}
$this->load->library('form_validation');
$this->load->helper('form');
$this->load->library('encrypt');
//validation check
$this->form_validation->set_rules('username', 'Username', 'trim|required');
$this->form_validation->set_rules('passwd', 'Password', 'trim|required|callback_login_check');
$this->form_validation->set_error_delimiters('<li>', '</li>');
if ($this->form_validation->run() == FALSE && !isset($this->session->userdata['loggedin'])) {
$data = array();
$this->load->view(THEME . 'login', $data);
} else {
session_start();
$_SESSION['ENABLE_IMAGE_MANAGER'] = true;
$_SESSION['IMAGE_MANAGER_PATH'] = str_replace('\\', '/', realpath(BASEPATH . '/../')) . '/upload/';
$_SESSION['DWS_BASE_URL'] = $this->config->item('site_url');
// e($_SESSION);
session_write_close();
redirect(createUrl('user/dashboard'));
}
}
示例7: init
function init()
{
if ($this->aauth->isFranshisee()) {
$this->ids = $this->usermodel->getFranchiseUsersId(curUsrId());
} elseif ($this->aauth->isUser()) {
$this->ids = $this->usermodel->getFranchiseUsersId(curUsrPid());
}
}
示例8: addReply
function addReply($offset)
{
$data = array();
$data['user_id'] = $offset;
$data['company_id'] = curUsrId();
$data['message'] = $this->input->post('message');
$data['reply'] = 1;
$this->db->insert('messages', $data);
}
示例9: tanetData
function tanetData()
{
$inner = $page = array();
$this->load->model('invoicemodel');
$inner["weekly_data"] = $this->invoicemodel->getTenantInvoices(curUsrId());
//$inner['weekly_data'] = $this->commonmodel->getAll('invoice_new', false, array(curUsrId()), 'applicant_id');
//$page['content'] = $this->load->view('tanet-invoice', $inner, true);
$page['content'] = $this->load->view('invoice-index', $inner, true);
$this->load->view($this->default, $page);
}
示例10: init
function init()
{
if ($this->aauth->isCompany()) {
$this->company_id = curUsrId();
$this->ids = $this->usermodel->getCompanyUsersId(curUsrId());
} elseif ($this->aauth->isUser()) {
$this->company_id = curUsrPid();
$this->ids = $this->usermodel->getCompanyUsersId(curUsrPid());
}
}
示例11: updateRecord
function updateRecord($uid)
{
$data['created_by'] = curUsrId();
$data['title'] = $this->input->post('title', TRUE);
parse_str(parse_url($this->input->post('video_url'), PHP_URL_QUERY), $my_array_of_vars);
$data['videoid'] = $my_array_of_vars['v'];
$data['video_url'] = $this->input->post('video_url');
$data['datetime'] = date('Y-m-d h:i:s');
$this->db->where("id", $uid);
$this->db->update('video', $data);
}
示例12: updateRecord
function updateRecord($uid)
{
$data['created_by'] = curUsrId();
$data['title'] = $this->input->post('title', TRUE);
$data['therapy_desc'] = $this->input->post('therapy_description');
$data['datetime'] = date('Y-m-d h:i:s');
$data['image'] = self::uploadImage();
$config = array('field' => 'uri', 'title' => 'title', 'table' => 'therapies', 'id' => 'therapies_id');
$this->load->library('slug', $config);
$data1 = array('title' => $data['title']);
$data['uri'] = $this->slug->create_uri($data1, $uid);
$this->db->where("therapies_id", $uid);
$this->db->update('therapies', $data);
}
示例13: updateSetting
function updateSetting($uid)
{
$id = curUsrId();
$data['paypal'] = $this->input->post('paypal', TRUE);
$data['facebook'] = $this->input->post('facebook', TRUE);
$data['google'] = $this->input->post('google');
$data['log'] = $this->input->post('log');
$data['fees'] = $this->input->post('fees');
$data['twitter'] = $this->input->post('twitter', TRUE);
$data['pinterest'] = $this->input->post('pinterest', TRUE);
$data['lat'] = $this->input->post('lat');
$this->db->where("id", $id);
$this->db->update('user_extra_detail', $data);
}
示例14: getBookings
function getBookings($offset = FALSE, $limit = FALSE, $ids = array())
{
$uid = curUsrId();
$this->db->from('eventbooking_bookings');
$this->db->join('eventbooking_events', 'eventbooking_events.event_id = eventbooking_bookings.event_id', 'left');
$this->db->join('customer', 'eventbooking_bookings.customer_id = customer.customer_id', 'left');
if ($offset) {
$this->db->offset($offset);
}
if ($limit) {
$this->db->limit($limit);
}
if (count($ids)) {
$this->db->where_in('eventbooking_events.user_id', $ids);
}
$result = $this->db->get();
return $result->result_array();
}
示例15: detail
function detail($uid)
{
// e($uid);
$this->load->model('propertymodel');
$property = $this->propertymodel->getProperty($uid);
$gallery_images = $this->propertymodel->getGalleryImages($uid);
$attributes = $this->propertymodel->getAttributeValue($uid);
$userDetails = $this->propertymodel->getUserDetails(curUsrId());
$inner = array();
$inner['property'] = $property;
$inner['gallery'] = $gallery_images;
$inner['attributes'] = $attributes;
$inner['userDetails'] = $userDetails;
$inner['features'] = $this->propertymodel->features(arrIndex($property, 'features'));
$inner['uid'] = $uid;
// e($inner);
$shell['contents'] = $this->load->view("detail", $inner, true);
$this->load->view("themes/" . THEME . "/templates/subpage", $shell);
}