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

PHP getList函数代码示例

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

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



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

示例1: index

 /**
  * 信息审核页面
  */
 public function index()
 {
     $searchName = I('search');
     if ($searchName !== "") {
         //按nickname查询
         $where['check_state'] = 0;
         $where['pro_name'] = array('like', '%' . $searchName . '%');
         $count = M('product_list')->where($where)->count();
         $Page = new \Think\Page($count, 10);
         // 实例化分页类
         $show = $Page->show();
         // 分页显示输出
         $list = M('product_list')->limit($Page->firstRow . ',' . $Page->listRows)->where($where)->select();
     } else {
         $count = M('product_list')->where('check_state = 0')->count();
         $Page = new \Think\Page($count, 10);
         // 实例化分页类
         $show = $Page->show();
         // 分页显示输出
         $list = D('product_list')->where('check_state = 0')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     }
     $this->assign('list', getList($list));
     // 赋值数据集
     $this->assign('show', $show);
     // 赋值分页输出
     $this->display();
 }
开发者ID:RedrockTeam,项目名称:LostAndFound,代码行数:30,代码来源:CheckController.class.php


示例2: categorySubList

 /**
  */
 public function categorySubList()
 {
     $id = $this->input->post('id', TRUE);
     $selected = $this->input->post('selected', TRUE);
     if (isset($id) || $id != '') {
         //delete the requested user
         $chck = $this->categoryModel->getSubCategoriesListByParentId($id);
         if (empty($chck)) {
             $getByid = $this->categoryModel->getCategoryListById($id);
             if (!empty($getByid)) {
                 foreach ($getByid as $cat) {
                     $checked = backChecked($cat->id, $selected);
                     echo '<ul id="checkList_' . $cat->id . '" class="chk-list-wrap light clear_fix">';
                     //                        echo '<li><strong class="title">' . $cat->category_name . '</strong><div class="checkbox chk-all">
                     //                                        <label><input type="checkbox"><span>' . $cat->category_name . '</span></label>
                     //                                    </div>';
                     echo '<li><strong class="title">' . $cat->category_name . '</strong><div class="checkbox chk-all">
                                     <label><input class="' . $cat->category_name . '" name="isCheckedAll" id="' . $cat->id . '"  class="' . $cat->category_name . '" type="checkbox" id="' . $cat->id . '" value="' . $cat->id . '"' . $checked . '><span>All From &nbsp;' . $cat->category_name . '</span></label>
                                 </div>';
                     echo '</ul>';
                 }
             }
         } else {
             $html = getList($id, $selected);
             echo $html;
         }
     }
 }
开发者ID:robdmat,项目名称:sport.net,代码行数:30,代码来源:dashboard.php


示例3: getPaymentsAdminContent

function getPaymentsAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $content .= getList();
    return $content;
}
开发者ID:Benn,项目名称:Silurus-Classifieds-Script,代码行数:8,代码来源:payment_statistic.php


示例4: display

function display($cid)
{
    $res = getList($cid);
    foreach ($res as $key => $value) {
        $str .= "<a href='#'>{$value['cname']}</a>>";
    }
    return $str;
}
开发者ID:ryanlee1992,项目名称:recursion,代码行数:8,代码来源:plink.php


示例5: getArticlesAdminContent

function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $ret = getList();
    return $ret;
}
开发者ID:Benn,项目名称:Silurus-Classifieds-Script,代码行数:8,代码来源:pphoto.php


示例6: nextPage

 /**
  * 分页获取信息
  */
 public function nextPage()
 {
     //获取要去的的分页信息
     $from = I('from');
     $num = I('num');
     $LorF = I('LorF');
     $result = M('product_list')->field('pro_name, pro_description, create_time, pro_kind_id, pro_user_id')->where(array('lost_or_found' => $LorF, 'status' => 0))->order('pro_id desc')->limit($from, $num)->select();
     $this->ajaxReturn(array('nextPage' => getList($result)));
 }
开发者ID:RedrockTeam,项目名称:LostAndFound,代码行数:12,代码来源:IndexController.class.php


示例7: search

 /**
  * 搜索需求
  */
 public function search()
 {
     $key = get_query('key');
     if (empty($key)) {
         this . getList();
     }
     $list = $this->pM->search($key, LIST_PPN, get_query('p', 1));
     json_success(array('isEnd' => empty($list), 'list' => $list));
 }
开发者ID:bennylii,项目名称:waterfall,代码行数:12,代码来源:PictureAction.class.php


示例8: print_summary

function print_summary()
{
    global $path_to_root;
    $imc = $_POST['PARAM_0'];
    $comments = $_POST['PARAM_1'];
    $orientation = $_POST['PARAM_2'];
    $destination = $_POST['PARAM_3'];
    if ($destination) {
        include_once $path_to_root . "/reporting/includes/excel_report.inc";
    } else {
        include_once $path_to_root . "/reporting/includes/pdf_report.inc";
    }
    $orientation = $orientation ? 'L' : 'P';
    $dec = user_price_dec();
    $cols = array(0, 10, 100, 150, 200, 250, 300, 350, 400, 450, 520);
    //$headers = array(_('IMC'));
    $aligns = array('left', 'left', 'left', 'left', 'left', 'left', 'left', 'left', 'left');
    //$params =   array( 	0 => $comments,	1 => array(  'text' => _('Period'), 'from' => $from));
    $aligns2 = $aligns;
    $summary = 1;
    $rep = new FrontReport(_('Client List'), "ClientList", user_pagesize(), 9, $orientation);
    if ($orientation == 'L') {
        recalculate_cols($cols);
    }
    $cols2 = $cols;
    $rep->Font();
    $rep->Info(null, $cols, null, $aligns);
    $rep->NewPage();
    $salesman = 0;
    $result = getList($imc);
    while ($myrow = db_fetch($result)) {
        $previous == '';
        $salesman = get_salesman_name($myrow['salesman']);
        $current = $salesman;
        if ($salesman != "") {
            if ($previous == $current) {
                $salesman = '';
                $rep->TextCol(1, 10, $myrow['br_name']);
                $rep->NewLine();
            } else {
                $rep->Font('bold');
                $rep->NewLine(2);
                $rep->Line($rep->row + 10);
                $rep->TextCol(0, 2, $salesman);
                $rep->Line($rep->row - 4);
                $rep->NewLine(2);
                $rep->Font();
                $rep->TextCol(1, 10, $myrow['br_name']);
                $rep->NewLine();
            }
            $previous = $current;
        }
    }
    $rep->NewLine();
    $rep->End();
}
开发者ID:knjy24,项目名称:FrontAccounting,代码行数:56,代码来源:rep_client_listing.php


示例9: display

function display()
{
    $res = getList();
    $str = '<select>';
    foreach ($res as $k => $v) {
        $str .= "<option>{$v['cname']}</option>";
    }
    $str .= '</select>';
    return $str;
}
开发者ID:ryanlee1992,项目名称:recursion,代码行数:10,代码来源:path.php


示例10: said

function said($nameTry, $fileName)
{
    $names = getList($fileName);
    $ret = false;
    foreach ($names as $name) {
        if ($nameTry === trim($name)) {
            $ret = true;
        }
    }
    return $ret;
}
开发者ID:kayneth,项目名称:codsworth,代码行数:11,代码来源:index.php


示例11: index

 public function index()
 {
     $types = M("type");
     $data = $types->order("sort ASC")->select();
     $arr = getList($data, '  ');
     //获取无限分类排序列表结果集
     $typeList = getLayer($data);
     $this->assign("typeList", $typeList);
     $this->assign("types", $arr);
     $this->display();
 }
开发者ID:Caojunkai,项目名称:jd,代码行数:11,代码来源:TypeController.class.php


示例12: index

 /**
  * 详情信息页
  */
 public function index()
 {
     $proId = I('id');
     $share = $this->shareApi();
     $find = M('product_list')->where(array('pro_id' => $proId))->select();
     $list = getList($find);
     //dd($list['0']);
     $this->assign('detail', $list['0']);
     $this->assign('share', $share);
     //        dd(getList($find));
     $this->display();
 }
开发者ID:RedrockTeam,项目名称:LorF,代码行数:15,代码来源:DetailController.class.php


示例13: getList

function getList($pid = 0, &$result = array(), $spac = 0)
{
    $spac = $spac + 2;
    $sql = "select *from {$table}where pid={$pid}";
    $res = mysql_query($sql);
    while ($row = mysql_fetch_assoc($res)) {
        $row['catename'] = str_repeat("&nbsp;", $spac) . '|--' . $row['catename'];
        $result[] = $row;
        getList($row['id'], $result, $spac);
    }
    return $result;
}
开发者ID:denson7,项目名称:phpstudy,代码行数:12,代码来源:2.php


示例14: getList

/**
 * [getList 递归生成无限级分类]
 * @param  integer $pid     [description]
 * @param  array   &$result [description]
 * @param  integer $spac    [description]
 * @return [type]           [description]
 */
function getList($pid = 0, &$result = array(0 => array('id' => '0', 'title' => '|--顶级菜单')), $spac = 0)
{
    $spac += 4;
    $system = M('System');
    $info = $system->field('id,pid,title')->where(array('pid' => $pid))->select();
    foreach ($info as $key => $val) {
        $val['title'] = str_repeat('&nbsp;', $spac) . '|--' . $val['title'];
        $result[] = $val;
        getList($val['id'], $result, $spac);
    }
    return $result;
}
开发者ID:jank2014,项目名称:jankzmaker,代码行数:19,代码来源:function.php


示例15: getMenus

function getMenus(&$DB, $menus)
{
    $html = " <div class='block_addNew'>\n                        <input type='hidden' name='lastID' value='113' />\n                        <input type='button' name='addNew' value='add' onclick='addNewITEM()' />\n                        <input type='text'   name='itemName'value='' placeholder='item name'>\n                        <span  class='types'>\n                             <select name='type'>\n                                 <option class='none'> none</option>\n                                 <option class='contact'> contact</option>\n                                 <option class='page'> page</option>\n                                 <option class='single'> single</option>\n                                 <option class='about'> about</option>\n                                 <option class='portof'> portof</option>\n                                 <option class='portof_ch'> portof_ch</option>\n                                 <option class='news'> news</option>\n                                 <option class='expertise'> expertise</option>\n                             </select>\n                        </span>\n                    </div>";
    $html .= "\n    <ol class='sortable'>\n                   <li id='list_MenuFREE' style='display: none;'>\n                       <div>New Item</div>\n                       <ol id='children_new'></ol>\n                   </li>\n";
    foreach ($menus as $menuKey => $menuType) {
        $html .= "<li id='list_Menu{$menuKey}'>\n                    <div>Meniu_{$menuKey} {$menuType}</div>";
        $html .= getList($DB, $menuKey);
        $html .= "</li>";
    }
    $html .= "</ol>";
    return $html;
}
开发者ID:OccultScripto,项目名称:rogentos-www,代码行数:12,代码来源:createList.php


示例16: dlink

function dlink()
{
    $rs = getList(11);
    krsort($rs);
    foreach ($rs as $k => $v) {
        $str .= "<a href='#'>{$v['cname']}</a>>";
        /*echo '<a href="#">';
        		echo $v['cname'];
        		echo '</a>>';*/
    }
    return $str;
}
开发者ID:ryanlee1992,项目名称:recursion,代码行数:12,代码来源:displayLink.php


示例17: getList

/**
 *  无限分类列表
 *@param $types array 分类结果集
 *@param $html string 子级分类填充字符串
 *@param $pid int 父类id
 *@param $num int 填充字符串个数
 *@return array 返回排序后结果集
 */
function getList($types, $html = '----', $pid = 0, $num = 0)
{
    $arr = array();
    foreach ($types as $v) {
        if ($v['pid'] == $pid) {
            //$v['num'] = $num + 1;//可做自定义级别使用
            $v['html'] = str_repeat($html, $num);
            //填充字符串个数
            $arr[] = $v;
            $arr = array_merge($arr, getList($types, $html, $v['id'], $num + 1));
            //递归把子类压入父类数组后
        }
    }
    return $arr;
}
开发者ID:Caojunkai,项目名称:jd,代码行数:23,代码来源:function.php


示例18: gotCate

function gotCate($pid = '0', $res = array(), $level = 0)
{
    $res1 = getList('category', 0, 100, '*', 'pid=' . $pid);
    if (!empty($res1)) {
        foreach ($res1 as $k => $v) {
            $str = '<font color="red" >';
            for ($i = 0; $i < $level; $i++) {
                $str .= '|-';
            }
            $str .= '</font>';
            $v['str_name'] = $str . '<font color="green" >' . $v['name'] . '</font>';
            $res[] = $v;
            $res = gotCate($v['id'], $res, $level + 1);
        }
    }
    return $res;
}
开发者ID:usingsth,项目名称:usingcms,代码行数:17,代码来源:cate.func.php


示例19: outputDefaultFilterData

function outputDefaultFilterData()
{
    $android_list = getList("", "android_version");
    $android_list = outputList($android_list);
    $brand_list = getList("", "phone_brand");
    $brand_list = outputList($brand_list);
    $model_list = getList("", "phone_model");
    $model_list = outputList($model_list);
    $android = getFilterValue("android");
    $brand = getFilterValue("brand");
    $model = getFilterValue("model");
    $android_data = array('id' => "android", 'selected' => getSelectedIndex($android, $android_list), 'list' => $android_list);
    $brand_data = array('id' => "brand", 'selected' => getSelectedIndex($brand, $brand_list), 'list' => $brand_list);
    $model_data = array('id' => "model", 'selected' => getSelectedIndex($model, $model_list), 'list' => $model_list);
    $out = array($android_data, $brand_data, $model_data);
    echo json_encode($out);
}
开发者ID:since2014,项目名称:MantisAcra,代码行数:17,代码来源:acra_filter_api.php


示例20: getLanguagesAdminContent

function getLanguagesAdminContent()
{
    global $action;
    $content = '';
    switch ($action) {
        case 'edit':
            $ID = (int) $_REQUEST['ID'];
            $content .= getEdit($ID);
            break;
        case 'add':
            $content .= getAdd();
            break;
        default:
            $content .= getList();
            break;
    }
    return $content;
}
开发者ID:Benn,项目名称:Silurus-Classifieds-Script,代码行数:18,代码来源:languages.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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