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


PHP common::getVar方法代码示例

本文整理汇总了PHP中common::getVar方法的典型用法代码示例。如果您正苦于以下问题:PHP common::getVar方法的具体用法?PHP common::getVar怎么用?PHP common::getVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在common的用法示例。


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

示例1: get_user_grid

 function get_user_grid()
 {
     $sortname = common::getVar('sidx', 'user_id');
     $sortorder = common::getVar('sord', 'asc');
     $sort = "ORDER BY {$sortname} {$sortorder}";
     $searchField = common::getVar('searchField');
     $searchValue = common::getVar('searchValue');
     $con = 1;
     if ($searchField != '' && $searchValue != '') {
         $con .= " and {$searchField} like '%{$searchValue}%'";
     }
     $sql = "select * from scic_result where {$con} {$sort}";
     $page = common::getVar('page', 1);
     $limit = common::getVar('rows');
     $count = sql::count("scic_result");
     if ($count > 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 0;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     if ($limit < 0) {
         $limit = 0;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $sql_query = $this->db->query($sql . " limit {$start}, {$limit}");
     $rows = $sql_query->result_array();
     $i = 0;
     $responce->page = $page;
     $responce->total = $total_pages;
     $responce->records = $count;
     foreach ($rows as $row) {
         $dat = sql::row("scic_skillset", "user_id=" . $row['user_id'], "fullname");
         $notify = $row['notification'] == 1 ? 'Email Sent' : 'Pending';
         $status = $row['test_status'] == 1 ? 'Complete' : 'Incomplete';
         $responce->rows[$i]['id'] = $row['user_id'];
         $responce->rows[$i]['cell'] = array($row['email'], $dat['fullname'], $status, $notify);
         //$row['first_name'] . ' ' . $row['last_name'], $row['email'],
         $i++;
     }
     header("Expires: Sat, 17 Jul 2010 05:00:00 GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     header("Author: Mohaimen khan");
     header("Email: joyes528@gmail.com");
     header("Content-type: text/x-json");
     echo json_encode($responce);
     return '';
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:55,代码来源:mod_result.php

示例2: get_shorturl_grid

 function get_shorturl_grid()
 {
     $sortname = common::getVar('sidx', 'id');
     $sortorder = common::getVar('sord', 'desc');
     $sort = "ORDER BY {$sortname} {$sortorder}";
     $serachoption = '1 ';
     if ($this->session->userdata('purchase_search') != '') {
         $serachoption = $this->session->userdata('purchase_search');
         //$this->session->unset_userdata('purchase_search');
     }
     $sql = "select * from urls where " . $serachoption . $sort;
     $page = common::getVar('page', 1);
     $limit = common::getVar('rows');
     $i = 0;
     $count = sql::count('urls', '1');
     if ($count > 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 5;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     if ($limit < 0) {
         $limit = 0;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $sql_query = $this->db->query($sql . " limit {$start}, {$limit}");
     $rows = $sql_query->result_array();
     $responce->page = $page;
     $responce->total = $total_pages;
     $responce->records = $count;
     foreach ($rows as $row) {
         $surl = "guit.biz/" . $row['shortcode'];
         $responce->rows[$i]['id'] = $row['id'];
         $responce->rows[$i]['cell'] = array($row['shortcode'], $surl, $row['url'], $row['ga_campaign'], $row['ga_adgroup'], $row['ga_ad_content'], $row['ga_keyword']);
         $i++;
     }
     header("Expires: Sat, 17 Jul 2010 05:00:00 GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     header("Author:Mohaimen khan");
     header("Email: joyes@sec.ac.bd");
     header("Content-type: text/x-json");
     echo json_encode($responce);
     return '';
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:51,代码来源:shorturl_model.php

示例3: get_member_form_list

 function get_member_form_list()
 {
     //$sortname = common::getVar('sidx', 'id');
     //$sortorder = common::getVar('sord', 'asc');
     //$sort = "ORDER BY $sortname $sortorder";
     $sql = "select * from user where user_type=1";
     $page = common::getVar('page', 1);
     $limit = common::getVar('rows');
     $i = 0;
     $tmp = $this->db->query($sql);
     $count = count($tmp->result_array());
     if ($count > 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 5;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     if ($limit < 0) {
         $limit = 0;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $sql_query = $this->db->query($sql . " limit {$start}, {$limit}");
     $rows = $sql_query->result_array();
     $responce->page = $page;
     $responce->total = $total_pages;
     $responce->records = $count;
     foreach ($rows as $row) {
         if ($row['status'] == 1) {
             $status = 'Active';
         } else {
             $status = 'Inactive';
         }
         $responce->rows[$i]['id'] = $row['id'];
         $responce->rows[$i]['cell'] = array($row['name'], $row['birthdate'], $row['username'], $row['present_address'], $row['phone'], $row['email'], $status);
         $i++;
     }
     header("Expires: Sat, 17 Jul 2010 05:00:00 GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     header("Author: Md. Forhadur Rahman");
     header("Email: forhad271@gmail.com");
     header("Content-type: text/x-json");
     echo json_encode($responce);
     return '';
 }
开发者ID:joyes974,项目名称:Ejob,代码行数:51,代码来源:mod_member.php

示例4: get_categoryGrid

 function get_categoryGrid()
 {
     $sql = "select * from category";
     $page = common::getVar('page', 1);
     $limit = common::getVar('rows');
     $i = 0;
     $tmp = $this->db->query($sql);
     $count = count($tmp->result_array());
     if ($count > 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 5;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     if ($limit < 0) {
         $limit = 0;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $sql_query = $this->db->query($sql . " limit {$start}, {$limit}");
     $rows = $sql_query->result_array();
     $responce->page = $page;
     $responce->total = $total_pages;
     $responce->records = $count;
     foreach ($rows as $row) {
         $desc = $this->word_limiter(trim(strip_tags($row['description'])), 5);
         $responce->rows[$i]['cat_id'] = $row['cat_id'];
         if ($row['status'] == 1) {
             $status = 'Active';
         } else {
             $status = 'Inactive';
         }
         $responce->rows[$i]['cell'] = array($row['cat_name'], $desc, $status);
         $i++;
     }
     header("Expires: Sat, 17 Jul 2010 05:00:00 GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     header("Author: Md. Anwar Hossain");
     header("Email: anwarworld@gmail.com");
     header("Content-type: text/x-json");
     echo json_encode($responce);
     return '';
 }
开发者ID:joyes974,项目名称:Ejob,代码行数:49,代码来源:mod_category.php

示例5: get_advertise_form_list_1

 function get_advertise_form_list_1()
 {
     $sql = "select * from advertise";
     $page = common::getVar('page', 1);
     $limit = common::getVar('rows');
     $i = 0;
     $tmp = $this->db->query($sql);
     $count = count($tmp->result_array());
     if ($count > 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 5;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     if ($limit < 0) {
         $limit = 0;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $sql_query = $this->db->query($sql . " limit {$start}, {$limit}");
     $rows = $sql_query->result_array();
     $responce->page = $page;
     $responce->total = $total_pages;
     $responce->records = $count;
     foreach ($rows as $row) {
         if ($row['status'] == 1) {
             $status = 'Active';
         } else {
             $status = 'Inactive';
         }
         $responce->rows[$i]['add_id'] = $row['add_id'];
         $responce->rows[$i]['cell'] = array($row['company_name'], $row['description'], $row['dead_line'], $row['url'], $status);
         $i++;
     }
     header("Expires: Sat, 17 Jul 2010 05:00:00 GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     header("Author: Md. Forhadur Rahman");
     header("Email: forhad271@gmail.com");
     header("Content-type: text/x-json");
     echo json_encode($responce);
     return '';
 }
开发者ID:joyes974,项目名称:Ejob,代码行数:48,代码来源:mod_publisher.php

示例6: get_question_grid

 function get_question_grid()
 {
     $sortname = common::getVar('sidx', 'id');
     $sortorder = common::getVar('sord', 'desc');
     $sort = " ORDER BY {$sortname} {$sortorder}";
     $searchField = $_REQUEST['searchField'];
     //common::getVar('searchField');
     //$searchValue = common::getVar('searchValue');
     $con = 1;
     if ($searchField != '0' && $searchField != '') {
         $searchField = $searchField - 1;
         $con .= " and type = {$searchField} ";
     }
     $sql = "select * from scic_question where " . $con . $sort;
     $page = common::getVar('page', 1);
     $limit = common::getVar('rows');
     $i = 0;
     $count = sql::count('scic_question', '1');
     if ($count > 0) {
         $total_pages = ceil($count / $limit);
     } else {
         $total_pages = 5;
     }
     if ($page > $total_pages) {
         $page = $total_pages;
     }
     if ($limit < 0) {
         $limit = 0;
     }
     $start = $limit * $page - $limit;
     if ($start < 0) {
         $start = 0;
     }
     $sql_query = $this->db->query($sql . " limit {$start}, {$limit}");
     $rows = $sql_query->result_array();
     $responce->page = $page;
     $responce->total = $total_pages;
     $responce->records = $count;
     foreach ($rows as $row) {
         if ($row['type'] == 0) {
             $label = "General";
         } else {
             if ($row['type'] == 1) {
                 $label = "First Part";
             } else {
                 if ($row['type'] == 2) {
                     $label = "Second part";
                 } else {
                     if ($row['type'] == 3) {
                         $label = "Third part";
                     } else {
                         $label = "None";
                     }
                 }
             }
         }
         $responce->rows[$i]['id'] = $row['id'];
         $responce->rows[$i]['cell'] = array($row['texts'], $label, $row['status']);
         $i++;
     }
     header("Expires: Sat, 17 Jul 2010 05:00:00 GMT");
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma: no-cache");
     header("Author:Mohaimen khan");
     header("Email: joyes@sec.ac.bd");
     header("Content-type: text/x-json");
     echo json_encode($responce);
     return '';
 }
开发者ID:joyes974,项目名称:Employee-Testing-System,代码行数:70,代码来源:question_model.php


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