当前位置: 首页>>代码示例>>PHP>>正文


PHP arrIndex函数代码示例

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


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

示例1: configSetting

 function configSetting($key)
 {
     $this->db->where('config_key', $key);
     $this->db->select('config_value');
     $result = $this->db->get('config')->row_array();
     return arrIndex($result, 'config_value');
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:7,代码来源:commonmodel.php

示例2: getBasicListing

 function getBasicListing($param = array())
 {
     $keywords = arrIndex($param, 'keywords');
     $offset = arrIndex($param, 'offset');
     //Setup pagination
     $perpage = 25;
     $config['base_url'] = base_url() . "customer/index/{$keywords}/";
     $config['uri_segment'] = 4;
     $config['total_rows'] = $this->Customermodel->countAll($this->ids);
     $config['per_page'] = $perpage;
     $this->pagination->initialize($config);
     //Fetch All Customers
     $customers = array();
     $customers = $this->Customermodel->listAll($this->ids);
     //Check For Missing Search Criteria
     if ($keywords == '0' || trim($keywords) == '') {
         $keywords = '';
     }
     //render view
     $inner = array();
     $inner['customers'] = $customers;
     $inner['keywords'] = $keywords;
     $inner['pagination'] = $this->pagination->create_links();
     return $inner;
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:25,代码来源:customer.php

示例3: insertRecord

 function insertRecord($param = array())
 {
     $data = array();
     $data['name'] = $this->input->post('name', true);
     $alis = $this->input->post('alias', true);
     if (!$alis) {
         $data['alias'] = str_replace(" ", "-", $data['name']);
     }
     $description = $this->input->post('description', true);
     if (!$description) {
         $data['description'] = $data['name'];
     } else {
         $data['description'] = $description;
     }
     $parent_id = arrIndex($param, 'parent_id');
     if (!$parent_id) {
         $parent_id = 0;
     }
     $data['parent_id'] = $parent_id;
     $data['creator_id'] = $param['creator_id'];
     $data['last_activity_id'] = $param['creator_id'];
     $data['created_date'] = date('Y-m-d');
     $data['created_time'] = date('H:i:s');
     $data['last_activity_datetime'] = date('Y-m-d H:i:s');
     if ($this->db->insert('forum', $data)) {
         $forum_id = $this->db->insert_id();
         if ($parent_id) {
             $this->updateThread($parent_id);
         }
         return $forum_id;
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:32,代码来源:forummodel.php

示例4: updateRecord

 function updateRecord($customer)
 {
     $data = array();
     $data = rSF('customer');
     $this->aauth->update_user($data['auth_user_id'], arrIndex($data, 'email'), arrIndex($data, 'passwd'), arrIndex($data, 'first_name'), FALSE);
     $this->db->where('auth_user_id', arrIndex($data, 'auth_user_id'))->update('customer', $data);
     return;
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:8,代码来源:customermodel.php

示例5: cron

 function cron()
 {
     $this->load->model('invoicemodel');
     $rows = $this->invoicemodel->getTodayInvoices();
     //        echo "<pre>";
     //        print_r($rows); exit;
     $this->load->library('email');
     //        $config['charset'] = 'utf-8';
     //        $config['wordwrap'] = TRUE;
     //        $config['mailtype'] = 'html';
     $config['protocol'] = 'sendmail';
     $config['mailtype'] = 'html';
     $config['charset'] = 'utf-8';
     $config['newline'] = "\r\n";
     $this->email->initialize($config);
     foreach ($rows as $row) {
         //            e($row);
         $invoice_gen_code = arrIndex($row, 'invoice_code');
         $applicant = $this->invoicemodel->getByPk(arrIndex($row, 'application_id'), 'applicants', 'applicant_id');
         $sendto = arrIndex($applicant, 'email');
         $fname = arrIndex($applicant, 'fname');
         $lname = arrIndex($applicant, 'lname');
         $home_address = arrIndex($applicant, 'address');
         $invoice_ref_code = arrIndex($row, 'invoice_id');
         $created_on = arrIndex($row, 'created_on');
         $due_on = arrIndex($row, 'due_on');
         //            e($row);
         $senddata = array("firstname" => $fname, "lastname" => $lname, "homeaddress" => $home_address, "invoice_no" => $invoice_gen_code, "created_date" => $created_on, "due_date" => $due_on, "installment_amount" => arrIndex($row, 'installment_fees'), "vat_value" => arrIndex($row, 'vat'), "after_vat" => arrIndex($row, 'total_amount'));
         // e($senddata,0);
         $msg_body = $this->load->view('invoice', $senddata, true);
         // echo $msg_body; exit;
         $filename = arrIndex($row, 'invoice_id');
         $pdfFilePath = FCPATH . "upload/virtcab/doc/{$filename}.pdf";
         include_once APPPATH . 'third_party/mpdf/mpdf.php';
         ini_set('memory_limit', '64M');
         $param = '"en-GB-x","A4","","",10,10,10,10,6,3';
         $mpdf = new mPDF('c');
         $mpdf->WriteHTML($msg_body);
         $mpdf->Output($pdfFilePath, 'F');
         $this->invoicemodel->updatevirtualcabnet($applicantId, arrIndex($row, 'company_id'), $filename, 3, 0);
         $this->invoicemodel->updatevirtualcabnet($applicantId, arrIndex($row, 'application_id'), $filename, 6, 1);
         $this->email->set_newline("\r\n");
         $this->email->from('invoice@webnseo.co.uk', 'Landlord Masters');
         // change it to yours
         $this->email->to($sendto);
         // change it to yours
         $this->email->subject('Invoice Notification');
         $this->email->message($msg_body);
         if ($this->email->send()) {
             //$this->invoicemodel->updateIsFirst($application_id,'W',$invoice_ref_code);
             echo "sent";
         } else {
             show_error($this->email->print_debugger());
         }
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:56,代码来源:invoice.php

示例6: eventdetail

 function eventdetail()
 {
     $this->load->model('Franchiseemodel');
     $eid = !empty($_POST['eid']) ? $_POST['eid'] : '';
     $franchisee = $this->Franchiseemodel->eventDetail($eid);
     $inner = array();
     $inner['row'] = $franchisee;
     $inner['small'] = arrIndex($_POST, 'small', false);
     $output = array();
     $output['event'] = $this->load->view("event-detail", $inner, true);
     echo json_encode($output);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:12,代码来源:franchisee.php

示例7: add

 function add()
 {
     $this->load->library('form_validation');
     if (arrIndex($_POST, 'type') == "dropdown") {
         if (empty(array_filter($_POST['drop']))) {
             $this->form_validation->set_rules('dropdown', 'Dropdown values', 'trim|required');
         }
     }
     $model = tableFields('units_attributes', true);
     $model['sort'] = 0;
     unset($model['id']);
     self::save($model, 0);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:13,代码来源:attributes.php

示例8: setUserSession

 function setUserSession($regions, $franchises)
 {
     $this->session->set_userdata('reporttype', 'default');
     $temp = array();
     foreach ($regions as $region) {
         $temp[] = arrIndex($region, 'id');
     }
     $this->session->set_userdata('regions', $temp);
     $temp = array();
     foreach ($franchises as $franchise) {
         $temp[] = arrIndex($franchise, 'id');
     }
     $this->session->set_userdata('franchises', $temp);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:14,代码来源:dashboard.php

示例9: add

 function add()
 {
     $data = rSF('franchise_region');
     if (arrIndex($data, 'name')) {
         if (arrIndex($data, 'id')) {
             $this->commonmodel->updateRecord($data, $data['id'], $this->table);
             $this->session->set_flashdata('SUCCESS', 'region_updated');
         } else {
             $this->commonmodel->insertRecord($data, $this->table);
             $this->session->set_flashdata('SUCCESS', 'region_added');
         }
         redirect($this->controllername . '/index');
     }
     $this->loadView();
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:15,代码来源:CommonController.php

示例10: checkApplicantLogin

 function checkApplicantLogin($email, $password)
 {
     $this->db->where('email', $email);
     $this->db->where('password', md5($password));
     $result = $this->db->get('applicants')->row_array();
     //        e($result);
     if (count($result) && arrIndex($result, 'type') == 'tnt') {
         $result['isAdmin'] = 0;
         $result['isCompany'] = 0;
         $result['isUser'] = 0;
         $result['isCustomer'] = 1;
         $result['loggedin'] = 1;
         $this->session->set_userdata($result);
         //            e(123);
         redirect(createUrl('applicants/dashboard'));
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:17,代码来源:welcome.php

示例11: addBooking

 function addBooking($customer, $order_total)
 {
     $customer = (array) $customer;
     extract($this->Cartmodel->variables());
     foreach ($this->cart->contents() as $item) {
         $cart = $item;
     }
     $this->load->helper('string');
     $booking = array();
     $booking['customer_id'] = arrIndex($customer, 'id');
     //        $booking['cart'] = base64_encode(serialize($this->cart->contents()));
     $booking['unique_id'] = date("ymd-His-") . rand(1000, 9999);
     $booking['event_id'] = arrIndex($cart, 'id');
     $booking['ctn'] = arrIndex($cart, 'qty');
     $booking['booking_total'] = $order_total;
     $booking['booking_status'] = 'pending';
     $booking['created'] = time();
     //insert into database
     $this->db->insert('eventbooking_bookings', $booking);
     $booking_id = $this->db->insert_id();
     $ticket = array();
     for ($i = 0; $i < $booking['ctn']; $i++) {
         foreach ($booking as $row) {
             $ticket[$i] = $booking;
             $ticket[$i]['unique_id'] .= $i;
         }
     }
     $no = 1;
     $ticket_data = array();
     foreach ($ticket as $row) {
         $ticket_data['booking_id'] = $booking_id;
         $ticket_data['event_id'] = $row['event_id'];
         $ticket_data['ticket_id'] = $row['unique_id'] . '-' . $no;
         $this->db->insert('eventbooking_bookings_tickets', $ticket_data);
         $no++;
     }
     $response = array();
     $response = $data;
     $response['booking_id'] = $booking_id;
     $response['booking'] = $booking;
     return $response;
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:42,代码来源:checkoutmodel.php

示例12: eventComplete

 function eventComplete($array = array())
 {
     $return['status'] = false;
     $event_id = arrIndex($array, 'event_id');
     if ($event_id) {
         $this->db->where('event_id', $event_id);
         $result = $this->db->get('event_complete')->result_array();
         if (!count($result)) {
             $result = $this->db->insert('event_complete', $array);
         } else {
             $this->db->where('event_id', $event_id);
             $result = $this->db->update('event_complete', $array);
         }
         if ($result) {
             $this->session->set_flashdata('SUCCESS', 'event_completed_saved');
             $return['status'] = true;
         } else {
             $this->session->set_flashdata('ERROR', 'event_completed_notsaved');
         }
     }
     echo json_encode($return);
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:22,代码来源:calendermodel.php

示例13: sendMail

 function sendMail($template)
 {
     $customers = array();
     $customers = $this->input->post('assigne_id', true);
     $this->email->initialize($this->config->item('EMAIL_CONFIG'));
     $cIds = implode(',', $customers);
     $fields = ' aauth_user_to_group.group_id,' . ' aauth_users.id as aauth_id,  aauth_users.email as aauth_email,' . ' aauth_users.pass  as aauth_pass, aauth_users.name  as aauth_name,' . ' aauth_users.is_active as aauth_active,' . ' aauth_users.pic as aauth_pic';
     $fields .= ',' . ' user_extra_detail.fname as user_fname, user_extra_detail.lname as user_lname,' . ' user_extra_detail.home_address as user_home_addr,' . ' user_extra_detail.bussiness_address as user_buss_addr,' . ' user_extra_detail.bussiness_number as user_buss_num,' . ' user_extra_detail.vat_number as user_vat_num, user_extra_detail.telephone as user_tel_num,' . ' user_extra_detail.linkedin as user_linkedin,  user_extra_detail.pinterest as user_pintrest,' . ' user_extra_detail.google as user_google,' . ' user_extra_detail.facebook as user_facebook, user_extra_detail.twitter as user_twitter,' . ' user_extra_detail.paypal as user_paypal,' . ' user_extra_detail.territory_name as user_territory, user_extra_detail.franchise_no as user_franchise,' . ' user_extra_detail.lat as user_lat, user_extra_detail.log as user_long,' . ' user_extra_detail.region as user_region';
     $fields .= ',' . 'customer.customer_id as cust_id, customer.auth_user_id as cust_aauth_id,' . ' customer.first_name as cust_fname,' . ' customer.last_name as cust_lname, customer.email as cust_email, customer.passwd as cust_passwd, customer.linkedin as cust_linkedin,' . ' customer.twitter as cust_twitter, customer.facebook as cust_facebook,' . ' customer.delivery_first_name as cust_del_fname, customer.delivery_last_name as cust_del_lname,' . ' customer.delivery_address1 as cust_del_addr1,' . ' customer.delivery_address2 as cust_del_addr2, customer.delivery_phone as cust_del_phone, customer.delivery_city as cust_del_city,' . ' customer.delivery_state as cust_del_state, customer.delivery_zipcode as cust_del_zipcode,' . ' customer.billing_address1, customer.billing_address2, customer.billing_phone,' . ' customer.billing_mobile, customer.billing_city, customer.billing_state,' . ' customer.billing_zipcode';
     $this->db->select($fields)->join('customer', 'customer.auth_user_id = aauth_users.id', 'LEFT')->join('user_extra_detail', 'user_extra_detail.id = aauth_users.id', 'LEFT')->join('aauth_user_to_group', 'aauth_user_to_group.user_id = aauth_users.id', 'LEFT')->where('aauth_users.id in (' . $cIds . ')');
     $rs = $this->db->get('aauth_users');
     if ($rs->num_rows()) {
         $rst = $rs->result_array();
         //            e($rst);
         foreach ($rst as $customer) {
             //                $emailBody = str_ireplace($search, $replace, $template['email_content']);
             $emailBody = $template['email_content'];
             $this->email->from(DWS_EMAIL_NOREPLY, DWS_EMAIL_FROM);
             //                $this->email->set_header('Return-Path', '<' . DWS_CLOUDMAILIN_EMAIL . '>');
             $this->email->reply_to('noreply@' . base_url());
             $this->email->to(arrIndex($customer, 'aauth_email'));
             $this->email->subject($template['email_subject']);
             $this->email->message($emailBody);
             $status = $this->email->send();
             if ($status) {
                 $this->session->set_flashdata('SUCCESS', 'marketing_mail_sent');
                 //                    $log_entry = array();
                 //                    $log_entry['email_log_id'] = $link;
                 //
                 //                    $log_entry['email_subject'] = 'test ing';
                 //                    $log_entry['email_content'] = $emailBody;
                 //                    $this->db->insert('email_log', $log_entry);
             } else {
                 $this->session->set_flashdata('ERROR', 'marketing_mail_not_sent');
             }
         }
     }
     redirect('marketing/index/email');
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:39,代码来源:marketingmodel.php

示例14: event

 function event()
 {
     $from = arrIndex($this->GET, 'from') / 1000;
     $to = arrIndex($this->GET, 'to') / 1000;
     if ($from) {
         $from = date('Y-m-d', $from);
     }
     if ($to) {
         $to = date('Y-m-d', $to);
     }
     $this->load->model('Calendermodel');
     $multiple_where = array('created_on >= ' => $from, 'created_on <= ' => $to);
     //        e($this->session->all_userdata());
     //       die();
     if ($this->aauth->isCustomer()) {
         $multiple_where['t1.applicant_id'] = curUsrId();
     }
     //        e($multiple_where);
     $applications = $this->Calendermodel->getCompanyInvoices($this->ids, $multiple_where);
     //        e($applications);
     $return['success'] = true;
     $return['result'] = $applications;
     echo json_encode($return);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:24,代码来源:calender.php

示例15: foreach

                    <tr>
                        <td>Clubs Contracts</td><td>£</td><td>£</td><td>£</td><td>£</td><td>£</td>
                    </tr>
                    <tr>
                        <td type="RETAILS_RETAILS">Retails</td>
                        <?php 
$total = 0;
$retail_buyed = $retail_sailed = 0;
foreach ($dasbBoardData['retail'] as $key => $array) {
    $total += arrIndex($array, 'retail_buyed', 0);
    ?>
                            <td>£<span class="<?php 
    echo $key;
    ?>
"><?php 
    echo arrIndex($array, 'retail_buyed', 0);
    ?>
</span></td>
                        <?php 
}
?>
                        <td>£<span class="total"><?php 
echo round($total, 2);
?>
</span></td>
                    </tr>
                    <tr>
                        <td>Total Income</td><td>£<span id="totalg1"></span></td><td>£<span id="totalg2"></span></td><td>£<span id="totalg3"></span></td><td>£<span id="totalg4"></span></td><td>£<span id="totalg5"></span></td>
                    </tr>
                </table>    
            </div>
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:31,代码来源:dashboard_1.php


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