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

PHP gParam函数代码示例

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

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



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

示例1: index

 function index()
 {
     $this->load->model('cms/Pagemodel');
     $this->load->library('form_validation');
     $this->load->library('email');
     $this->load->library('parser');
     $this->load->helper('form');
     $this->load->helper('text');
     //validation check
     $this->form_validation->set_rules('name', 'Name', 'trim|required');
     $this->form_validation->set_rules('number', 'Phone Number', 'trim|required');
     $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
     $this->form_validation->set_rules('message', 'Message', 'trim');
     $this->form_validation->set_error_delimiters('<li>', '</li>');
     if ($this->form_validation->run() == FALSE) {
         $shell = array();
         $shell['contents'] = $this->load->view('contact-form', $inner, true);
         $this->load->view("themes/" . THEME . "/templates/{$page['template_alias']}", $shell);
     } else {
         $emailData = array();
         $emailData['DATE'] = date("jS F, Y");
         $emailData['NAME'] = $this->input->post('name', TRUE);
         $emailData['EMAIL'] = $this->input->post('email', TRUE);
         $emailData['PHONE'] = $this->input->post('number', TRUE);
         $emailData['COMMENTS'] = nl2br($this->input->post('message', TRUE));
         $emailBody = $this->parser->parse('contact/emails/contactus', $emailData, TRUE);
         $this->db->insert('enquery', array('name' => gParam('name'), 'email' => gParam('email'), 'number' => gParam('number'), 'message' => gParam('message')));
         $config = array();
         $emlarray = $this->config->item('EMAIL_CONFIG');
         unset($emlarray['mailtype']);
         $this->email->initialize($emlarray);
         $this->email->from(DWS_EMAIL_NOREPLY, DWS_EMAIL_FROM);
         $this->email->reply_to(DWS_EMAIL_REPLY_TO);
         //            $this->email->to(DWS_EMAIL_ADMIN);
         //  e($this->config->item('EMAIL_CONFIG'));
         // The message
         $subject = 'Landlord Contact us';
         $headers = "From: " . strip_tags(DWS_EMAIL_FROM) . "\r\n";
         $headers .= "Reply-To: " . strip_tags(DWS_EMAIL_FROM) . "\r\n";
         $headers .= "CC: [email protected]\r\n";
         $headers .= "MIME-Version: 1.0\r\n";
         $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n";
         mail(DWS_EMAIL_ADMIN, $subject, $emailBody, $headers);
         redirect('/contact/thankyou');
         exit;
         //$this->email->to(gParam('email'));
         //$this->email->subject('Contact Us');
         //$this->email->message($emailBody);
         //   $status = $this->email->send();
         //  $status = true;
         //            e( $this->email->print_debugger());
         //            if ($status == TRUE) {
         //                redirect('/contact/thankyou');
         //                exit();
         //            }
         //            redirect('/contact-us/error');
         //            exit();
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:59,代码来源:contact.php


示例2: index

 function index()
 {
     //print_r($this->session->all_userdata());
     $this->load->library('user_agent');
     $referred_from_url = $this->agent->referrer();
     $this->load->model('Customermodel');
     $this->load->library('form_validation');
     $this->load->library('email');
     $this->load->library('parser');
     $this->load->helper('form');
     $this->load->helper('text');
     //Get Page Details
     //validation check
     if (count($_POST)) {
         $this->session->set_flashdata('error', '<h1 style="color:red">Wrong email id or password</h1>');
     }
     $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');
     $this->form_validation->set_rules('password', 'Password', 'trim|required|callback_login_check');
     $this->form_validation->set_error_delimiters('<li>', '</li>');
     if ($this->form_validation->run() == FALSE) {
         $inner = array();
         $shell = array();
         $shell['contents'] = $this->load->view('login-page', $inner, true);
         $this->load->view("themes/" . THEME . "/templates/subpage", $shell);
     } else {
         $email = gParam('email');
         $password = gParam('password');
         if (!$email || !$password) {
             return false;
         }
         $this->db->from('applicants');
         $this->db->where('email', $email);
         $this->db->where('password', md5($password));
         $result = $this->db->get()->row_array();
         if (!count($result)) {
             redirect("/customer/login/");
         } else {
             //e($this->session->all_userdata());
             $result['isAdmin'] = 0;
             $result['isCompany'] = 0;
             $result['isUser'] = 0;
             $result['isCustomer'] = 1;
             $this->session->set_userdata($result);
             //echo $referred_from;
             redirect('/');
             //               if($redirect!=''){
             //                redirect($redirect, 'refresh');
             //
             //                $shortlist = $this->session->userdata('referred_from');
             //                unset($shortlist[0]);
             //
             //               }
             //               else{
             //                   redirect('/');
             //               }
             //redirect('');
         }
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:59,代码来源:login.php


示例3: getGrpOpt

 function getGrpOpt($elementId = null, $grp = null, $internal = false)
 {
     $grp;
     if (!$grp) {
         $grp = gParam('grp');
     }
     if (!$grp && !$internal) {
         $selectRes = array();
         echo json_encode(array('success' => 0, 'msg' => 'Please choose group'));
         exit;
     } else {
         if (!$grp && $internal) {
             return '';
         }
     }
     $rule_grp_row = array();
     if ($grp == 'allgrp') {
         $result = $this->aauth->list_groups(true);
         $rule_row = $this->Notificationmodel->getRow($elementId);
         $rule_grp_row = explode(',', $rule_row['for_group']);
     } else {
         $result = $this->usermodel->listAllAsGrp(False, false, 'id, name', array('where' => 'group_id = ' . $grp));
     }
     $datamsg = null;
     $selectRes = array();
     if ($result) {
         foreach ($result as $key => $kval) {
             if (count($rule_grp_row) && !in_array($kval['id'], $rule_grp_row)) {
                 continue;
             }
             $selectRes[$kval['id']] = $kval['name'];
         }
     }
     $selectedArr = array();
     if (isset($internal['assignTo'])) {
         $selectedArr = explode(',', $internal['assignTo']);
     }
     $js = 'id="assigne-' . $elementId . '" multiple class="assigne form-control" data-id="' . $elementId . '"';
     $retHtml = form_dropdown('assigne[' . $elementId . '][]', $selectRes, $selectedArr, $js);
     $retHtml .= '<script>
                     $(document).ready(
                         function () {
                                         $(".assigne").multiselect({ 
                                         includeSelectAllOption: true,
                                         enableFiltering:true
                                 });
                         }
                     );
                 </script>';
     if ($internal) {
         return $retHtml;
     }
     $datamsg = array('success' => 1, 'msg' => $retHtml);
     echo json_encode($datamsg);
     exit;
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:56,代码来源:notificationpanel.php


示例4: login_check

 function login_check($str)
 {
     $this->aauth->login(gParam('username'), gParam('passwd'), true);
     $data = $this->aauth->get_user();
     if ($data) {
         setcookie('user_id', $data->id, time() + 86400 * 30, "/");
         return true;
     }
     $this->form_validation->set_message('login_check', 'Login failed');
     return false;
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:11,代码来源:welcome.php


示例5: rSF

function rSF($tableName)
{
    $fields = tableFields($tableName);
    $new_array = array();
    foreach ($fields as $field) {
        if (!gParam($field)) {
            continue;
        }
        $new_array[$field] = gParam($field);
    }
    return $new_array;
}
开发者ID:ravinderphp,项目名称:revitalise,代码行数:12,代码来源:function_helper.php


示例6: indexOld

 function indexOld()
 {
     $return['success'] = false;
     if (!gParam('email') || !gParam('password')) {
         echo json_encode($return);
     }
     $this->aauth->login(gParam('email'), gParam('password'));
     $ar = array();
     $ar = $this->aauth->get_user();
     if (isset($ar->id)) {
         $group = $this->aauth->get_user_groups($ar->id);
         if ($group['group_id'] == 6) {
             $return['success'] = true;
         } else {
             $this->aauth->logout();
         }
     }
     echo json_encode($return);
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:19,代码来源:login.php


示例7: index

 function index()
 {
     $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'])) {
         //            print_r($_POST);
         if (gParam('username') && gParam('passwd')) {
             self::checkApplicantLogin(gParam('username'), gParam('passwd'));
         }
         $data = array();
         $this->load->view(THEME . 'login', $data);
     } else {
         redirect(createUrl('user/dashboard'));
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:20,代码来源:welcome.php


示例8: add

 function add($id = null)
 {
     $table_name = 'franchise_testimonials';
     if (gParam('content') && gParam('name')) {
         $data = rSF($table_name);
         $data['user_id'] = curUsrId();
         if (!$id) {
             $result = $this->commonmodel->insertRecord($data, $table_name);
         } else {
             $result = $this->commonmodel->updateRecord($data, $id, $table_name);
         }
         if ($result) {
             redirect(createUrl('frontend/testimonials'));
         }
     }
     $model = $this->commonmodel->getByPk($id, $table_name);
     $inner = $page = array();
     $inner['model'] = $model;
     $page['content'] = $this->load->view('addtestimonials', $inner, true);
     $this->load->view($this->default, $page);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:21,代码来源:testimonials.php


示例9: save

 function save()
 {
     $data = rSF('units_attributes');
     $id = gParam('id');
     if ($id) {
         if (isset($_POST['deldrop'])) {
             $ids = array_filter($_POST['deldrop']);
             foreach ($ids as $delIds) {
                 if (trim($delIds) != "") {
                     $this->db->where('id', $delIds);
                     $this->db->delete('units_attributes_dropdown');
                 }
             }
         }
         if (isset($_POST['drop'])) {
             foreach (array_filter($_POST['drop']) as $dropdwn) {
                 if (trim($dropdwn) != "") {
                     $this->db->insert('units_attributes_dropdown', array('dropdown_id' => $id, 'value' => $dropdwn, 'sort' => 0));
                 }
             }
         }
         //e($_POST);
         $this->db->where('id', $id);
         $this->db->update('units_attributes', $data);
         $this->session->set_flashdata('SUCCESS', 'attribute_updated');
     } else {
         $this->db->insert('units_attributes', $data);
         $lastDrodown = $this->db->insert_id();
         if ($data['type'] == "dropdown") {
             foreach (array_filter($_POST['drop']) as $dropdwn) {
                 if (trim($dropdwn) != "") {
                     $this->db->insert('units_attributes_dropdown', array('dropdown_id' => $lastDrodown, 'value' => $dropdwn, 'sort' => 0));
                 }
             }
         }
         $this->session->set_flashdata('SUCCESS', 'attribute_added');
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:38,代码来源:attributesmodel.php


示例10: addsidelinks

 function addsidelinks($id = null)
 {
     $model = $this->commonmodel->getByPk($id, 'front_events');
     $inner = $page = array();
     if (gParam('color')) {
         //            gAParams();
         $data = rSF('front_events');
         $data['user_id'] = curUsrId();
         if (isset($_FILES['image']['name'])) {
             $data['pic'] = self::uploadImage();
         }
         if (!$id) {
             $result = $this->commonmodel->insertRecord($data, 'front_events');
         } else {
             $result = $this->commonmodel->updateRecord($data, $id, 'front_events');
         }
         if ($result) {
             redirect(createUrl('frontend/sideEventsLinks'));
         }
     }
     $inner['model'] = $model;
     $page['content'] = $this->load->view('addsidelinks', $inner, true);
     $this->load->view($this->default, $page);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:24,代码来源:frontend.php


示例11: csvdownload

 function csvdownload($offet = 0)
 {
     $this->load->model('propertymodel');
     $perpage = 500;
     $attributes = gParam('attributes', array());
     $property = $this->propertymodel->listCsvAll($attributes, $perpage, $offet);
     echo count($property);
     $html = "<table border='1'>";
     $array = array('unit_number', 'post_code', 'county', 'property_type', 'street', 'city', 'amount');
     $html .= '<tr>';
     foreach ($array as $key) {
         $html .= '<td>' . $key . '</td>';
     }
     $html .= '</tr>';
     foreach ($property as $pro) {
         $html .= '<tr>' . '<td>' . $pro['unit_number'] . '</td>' . '<td>' . $pro['post_code'] . '</td>' . '<td>' . $pro['county'] . '</td>' . '<td>' . $pro['property_type'] . '</td>' . '<td>' . $pro['street'] . '</td>' . '<td>' . $pro['city'] . '</td>' . '<td>' . $pro['amount'] . '</td>' . '</tr>';
     }
     $html .= "</table>";
     echo $html;
     //print_r($property);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:21,代码来源:property.php


示例12: updateRecord

 function updateRecord($uid)
 {
     $group = current(gParam('group'));
     if ($this->aauth->getUserGroup($uid) != $group) {
         $this->aauth->remove_member($uid, $this->aauth->getUserGroup());
         $this->aauth->add_member($uid, $group);
     }
     $this->aauth->update_user($uid, gParam('email'), gParam('pass'), gParam('name'), self::uploadImage());
     $data = array();
     $data['fname'] = $this->input->post('firstname', TRUE);
     $data['lname'] = $this->input->post('lastname', TRUE);
     $data['home_address'] = $this->input->post('address', TRUE);
     $data['qualification'] = $this->input->post('qualifications', TRUE);
     $data['city'] = $this->input->post('city', TRUE);
     $data['county'] = $this->input->post('county', TRUE);
     $data['post_code'] = $this->input->post('post_code', TRUE);
     $data['telephone'] = $this->input->post('phone', TRUE);
     $data['about_txt'] = $this->input->post('about_description');
     $data['services_txt'] = $this->input->post('service_description');
     $data['contact_txt'] = $this->input->post('contact_description');
     $data['lat'] = $this->input->post('lat', TRUE);
     $data['log'] = $this->input->post('lng', TRUE);
     unset($data['id']);
     $this->db->where('id', $uid);
     $row = $this->db->get('user_extra_detail');
     $row = $row->num_rows();
     if ($row) {
         unset($data['start_date']);
         $this->db->where('id', $uid);
         $this->db->update('user_extra_detail', $data);
     } else {
         $data['id'] = $uid;
         $this->db->insert('user_extra_detail', $data);
     }
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:35,代码来源:usermodel.php


示例13: updateQuestion

 function updateQuestion()
 {
     $surveyId = gParam('survey_id');
     if (!$surveyId) {
         $surveyId = $_POST['survey_id'];
     }
     if (!$surveyId) {
         return false;
     }
     $data[$this->is_active] = '0';
     $on = array('fld' => $this->survey_id, 'fldval' => $surveyId);
     $this->recordUpdate($on, $data);
     $data = array();
     foreach ($_POST as $postkey => $postval) {
         if (is_array($postval)) {
             if (!is_numeric($postkey)) {
                 continue;
             }
             if (isset($postval['dbid'])) {
                 $questionArr = $this->getQuestionInsertArray($postval);
                 $questionArr['survey_id'] = $surveyId;
                 $questionArr[$this->is_active] = '1';
                 $questionArr[$this->update_date] = date('Y-m-d H:i:s');
                 $on = array('fld' => $this->id, 'fldval' => $postval['dbid']);
                 $this->recordUpdate($on, $questionArr);
             } else {
                 $questionArr = $this->getQuestionInsertArray($postval);
                 $questionArr['survey_id'] = $surveyId;
                 $questionArr[$this->is_active] = '1';
                 $questionArr[$this->update_date] = date('Y-m-d H:i:s');
                 $questionArr[$this->creation_date] = date('Y-m-d H:i:s');
                 $this->db->insert('survey_question', $questionArr);
             }
         }
     }
     $data = array('survey_id' => $surveyId, $this->is_active => 0);
     $this->deleteUpdate($data);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:38,代码来源:surveyquestionmodel.php


示例14: booking

 function booking($id)
 {
     $user_id = $this->session->userdata('user_id');
     if (gParam('book_event')) {
         $result = self::saveUserToEvent(gParam('event_id'), gParam('qty'), $user_id);
         $this->session->set_flashdata('SUCCESS', 'booking_done');
         redirect(createUrl('classes/booking/' . $id));
     }
     $this->load->model('classesmodel');
     if (!$user_id) {
         redirect(base_url());
     }
     $inner = $page = array();
     $inner['event'] = $this->classesmodel->getOneEvent($id);
     $page['contents'] = $this->load->view('booking', $inner, true);
     $this->load->view("themes/" . THEME . "/templates/onlycontent", $page);
 }
开发者ID:ravinderphp,项目名称:revitalise,代码行数:17,代码来源:classes_b.php


示例15: deletefile

 function deletefile($fileId = null)
 {
     if (!$fileId) {
         $fileId = gParam('fileid', false, true);
     }
     $fileDet = $this->VirtualCabinetmodel->fetchByID($fileId);
     if ($fileDet) {
         $ext = $fileDet[$this->VirtualCabinetmodel->filetype];
         $virCabPath = $this->config->item('UPLOAD_PATH_VIRCAB_MISC');
         if (in_array($ext, $this->imgArray)) {
             $virCabPath = $this->config->item('UPLOAD_PATH_VIRCAB_IMG');
         } else {
             if (in_array($ext, $this->docArray)) {
                 $virCabPath = $this->config->item('UPLOAD_PATH_VIRCAB_DOC');
             }
         }
         $file = $virCabPath . $fileDet[$this->VirtualCabinetmodel->visible_name];
         $this->VirtualCabinetmodel->deleteByID($fileDet['id']);
         if (file_exists($file) && unlink($file)) {
         }
         echo json_encode(array('success' => 1));
     } else {
         echo json_encode(array('success' => 1, 'msg' => 'File Not Exist'));
     }
     exit;
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:26,代码来源:virtcab.php


示例16: updateRecord

 function updateRecord($id)
 {
     if (isset($_POST['deleteImage'])) {
         foreach ($_POST['deleteImage'] as $delImg) {
             $imgar = $this->getImageName($delImg);
             @unlink($this->config->item('UNIT_IMAGE_PATH') . $imgar['image']);
             $this->db->where('image_id', $delImg);
             $this->db->delete('unit_image');
         }
     }
     $data = array();
     $config['upload_path'] = $this->config->item('UNIT_IMAGE_PATH');
     $config['allowed_types'] = 'gif|jpg|png';
     $config['overwrite'] = FALSE;
     $this->load->library('upload', $config);
     $config_slug = array('field' => 'uri', 'table' => 'units', 'id' => 'id');
     $this->load->library('slug', $config_slug);
     $data_slug = array('title' => $this->input->post('unit_number'));
     $data['uri'] = $this->slug->create_uri($data_slug, $id);
     $map_img = $_FILES['map_image']['name'];
     if ($map_img != '') {
         $mainimage = $this->getUnitDetails($id);
         @unlink($this->config->item('UNIT_IMAGE_PATH') . $mainimage['map_image']);
         if ($_FILES['map_image']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['map_image']['tmp_name'])) {
             if (!$this->upload->do_upload('map_image')) {
                 show_error($this->upload->display_errors('<p class="err">', '</p>'));
                 return FALSE;
             } else {
                 $upload_data = $this->upload->data();
                 $data['map_image'] = $upload_data['file_name'];
             }
         }
     }
     if (!empty($_FILES['photo']['name'])) {
         //  e($this->config->item('UNIT_IMAGE_PATH') . $mainimage['unit_image']);
         $mainimage = $this->getUnitDetails($id);
         @unlink($this->config->item('UNIT_IMAGE_PATH') . $mainimage['unit_image']);
         if (count($_FILES) > 0) {
             if ($_FILES['photo']['error'] == UPLOAD_ERR_OK && is_uploaded_file($_FILES['photo']['tmp_name'])) {
                 if (!$this->upload->do_upload('photo')) {
                     show_error($this->upload->display_errors('<p class="err">', '</p>'));
                     return FALSE;
                 } else {
                     $upload_data = $this->upload->data();
                     $data['unit_image'] = $upload_data['file_name'];
                 }
             }
         }
     }
     $data['unit_number'] = $this->input->post('unit_number');
     //   $data['property_type'] = $this->input->post('ptype');
     $data['owner'] = $this->input->post('owner');
     $data['owner'] = $this->input->post('owner');
     $data['flat_no'] = $this->input->post('flat_no');
     $data['street'] = $this->input->post('street');
     $data['city'] = $this->input->post('city');
     $data['country'] = $this->input->post('country');
     $data['status'] = $this->input->post('status');
     $data['amount'] = $this->input->post('amount');
     $data['amount_type'] = $this->input->post('amount_type');
     $data['unit_type'] = $this->input->post('unit_type');
     $data['is_active'] = $this->input->post('active');
     $data['description'] = $this->input->post('description');
     $data['is_featured'] = $this->input->post('is_featured');
     $data['post_code'] = $this->input->post('post_code');
     $data['county'] = $this->input->post('county');
     $data['ptenure'] = $this->input->post('ptenure');
     if (!empty($_POST['features'])) {
         $data['features'] = implode($_POST['features'], '|');
     }
     $this->db->where('id', $id);
     $status = $this->db->update('units', $data);
     if ($status) {
         $unit_id = $id;
         if ($unit_id) {
             $this->db->where('unit_id', $unit_id);
             $this->db->delete('units_attributes_value');
             $attributes = gParam('attributes') ? gParam('attributes') : array();
             foreach ($attributes as $key => $value) {
                 $data = array();
                 $data['unit_id'] = $unit_id;
                 $data['attribute_id'] = $key;
                 $data['value'] = $value;
                 $this->db->insert('units_attributes_value', $data);
             }
         }
     }
     $this->load->library('upload', $config);
     $this->upload->initialize(array("upload_path" => $this->config->item('UNIT_IMAGE_PATH'), 'allowed_types' => 'gif|jpg|png'));
     if ($this->upload->do_multi_upload("galleryImages")) {
         //Print data for all uploaded files.
         foreach ($this->upload->get_multi_upload_data() as $images) {
             $this->db->insert('unit_image', array('image' => $images['file_name'], 'unit_id' => $id));
         }
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:96,代码来源:unitsmodel.php


示例17: saveTargetColor

 function saveTargetColor()
 {
     $precentages = gParam('percentage');
     $colors = gParam('color');
     $this->load->model('usermodel');
     $this->db->empty_table('target_color');
     foreach ($precentages as $key => $precentage) {
         $this->usermodel->saveTargetColor($precentage, arrIndex($colors, $key));
     }
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:10,代码来源:franchise.php


示例18: franchiseClass

 function franchiseClass()
 {
     $inner = array();
     $inner['eventType'] = null;
     $custom_groupby = false;
     $type = gParam('type');
     //        $type = 'CLASS__income';
     $franchise = gParam('franchise');
     $ids = $franchise ? array($franchise) : array();
     $arr = explode('__', $type);
     $eventType[] = Event::$types[$arr[0]];
     if (Event::$types[$arr[0]] == 9) {
         $eventType = Event::$types;
         $inner['eventType'] = Event::$types1[9];
     } else {
         $inner['eventType'] = $type;
     }
     $syear = $this->session->userdata('syear');
     $eyear = $this->session->userdata('eyear');
     $inner['models'] = $this->usermodel->dashboardEventFilter($syear, $eyear, $ids, $eventType, $this->ids);
     $inner['display'] = $arr[1];
     //        e($inner['models']);
     if (!count($inner['models'])) {
         return false;
     }
     $page['content'] = $this->load->view("dashboard/franchisesRegions", $inner);
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:27,代码来源:dashboard.php


示例19: index

 function index()
 {
     $this->load->helper('url');
     $this->load->helper('text');
     $this->load->library('Cart');
     $this->load->model('Pagemodel');
     $this->load->helper('cms_helper');
     //$this->load->model('news/Newsmodel');
     $this->load->model('slideshow/Slidemodel');
     $this->load->model('property/Propertymodel');
     //Language
     $lang = 'en';
     $lang_trigger = false;
     $lang_uri = $this->uri->uri_string();
     if ($lang_uri) {
         $lang_arr = explode('/', $lang_uri);
         if (count($lang_arr) > 1) {
             $lang_code = $lang_arr[0];
             $this->db->where('language_code', $lang_code);
             $rs = $this->db->get('language');
             if ($rs->num_rows() == 1) {
                 $lang = $lang_code;
                 $lang_trigger = true;
             }
         }
     }
     //        echo 'here'; exit();
     //Page Alias
     $alias = 'homepage';
     $segment_1 = $this->uri->uri_string();
     if ($segment_1) {
         if (!$lang_trigger) {
             $alias = str_replace('/', '', $segment_1);
         } else {
             $lang_arr = explode('/', $lang_uri);
             $lang_arr = array_slice($lang_arr, 1);
             $alias = implode('/', $lang_arr);
         }
     }
     //$this->setLanguage($lang);
     //Get Page Details
     $page = array();
     $page = $this->Pagemodel->getDetails($alias, $lang);
     //        print_r($page); exit();
     if (!$page) {
         $this->http->show404();
         return;
     }
     $this->setPage($page);
     //Compiled blocks
     $compiled_blocks = array();
     $compiled_blocks = $this->Pagemodel->compiledBlocks($page);
     //        print_r($compiled_blocks);
     //        exit;
     //fetch page languages
     $languages = array();
     $languages = $this->Pagemodel->getAllLanguages($page, $lang);
     //        $company = array();
     //        $company = $this->COMPANY;
     $breadcrumbs = array();
     $breadcrumbs = $this->Pagemodel->breadcrumbs($page['page_id']);
     $slides = array();
     $slides = $this->Slidemodel->listAll();
     $attributes = gParam('attributes', array());
     $property = array();
     $property = $this->Propertymodel->listAll($attributes, 4);
     //Get all news
     //        $news = array();
     //        $news = $this->Newsmodel->listAll(0 ,2);
     //Variables
     $shell = array();
     $inner = array();
     $inner['page'] = $page;
     $inner['breadcrumbs'] = $breadcrumbs;
     $inner['languages'] = $languages;
     $inner['slides'] = $slides;
     $inner['property'] = $property;
     //        $inner['news'] = $news;
     if ($page['frontend_modules']) {
         $modules = explode(',', $page['frontend_modules']);
         foreach ($modules as $page_module) {
             $this->load->library("page_modules/" . $page_module, array('page' => $page));
             $module_name = "module_{$page_module}";
             $inner[$module_name] = $this->{$module_name};
         }
     }
     $compiledblocks = array();
     foreach ($compiled_blocks as $key => $val) {
         $compiledblocks[] = $val;
         $inner[$key] = $val;
     }
     $inner['compiledblocks'] = $compiledblocks;
     //     $inner['comapny'] = $company;
     foreach ($inner as $key => $val) {
         $shell[$key] = $val;
     }
     //File Name & File Path
     $file_name = str_replace('/', '_', $page['page_uri']);
     $file_path = "application/views/themes/" . THEME . "/cms/" . $file_name . ".php";
     //echo $file_path;
//.........这里部分代码省略.........
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:101,代码来源:cms.php


示例20: getGrpOpt

 function getGrpOpt($grp = null, $internal = false)
 {
     $grp;
     if (!$grp) {
         $grp = gParam('grp');
     }
     if (!$grp && !$internal) {
         return json_encode(array('succcess' => 0, 'msg' => 'Nothing Find'));
     } else {
         if (!$grp && $internal) {
             return '';
         }
     }
     $result = $this->usermodel->listAllAsGrp(False, false, 'id, name', array('where' => 'group_id = ' . $grp));
     $datamsg = null;
     $selectRes = array();
     if ($result) {
         foreach ($result as $key => $kval) {
             $selectRes[$kval['id']] = $kval['name'];
         }
     }
     $selectedArr = array();
     if (isset($internal['assignTo'])) {
         $selectedArr = explode(',', $internal['assignTo']);
     }
     $js = 'id="assigne_id" multiple';
     $retHtml = '<div>' . form_dropdown('assigne_id[]', $selectRes, $selectedArr, $js) . '</div>';
     $retHtml .= '<script>
                 $(document).ready(
                         function () {
                                         $("#assigne_id").multiselect({ 
                                         includeSelectAllOption: true,
                                         enableFiltering:true
                                 });
                         }
                     );
             </script>
         ';
     if ($internal) {
         return $retHtml;
     }
     $datamsg = array('success' => 1, 'msg' => $retHtml);
     echo json_encode($datamsg);
     exit;
 }
开发者ID:ravinderphp,项目名称:landlordv2,代码行数:45,代码来源:survey.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP gSQLRowCount函数代码示例发布时间:2022-05-15
下一篇:
PHP gGetDb函数代码示例发布时间: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