本文整理汇总了PHP中getList函数的典型用法代码示例。如果您正苦于以下问题:PHP getList函数的具体用法?PHP getList怎么用?PHP getList使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getList函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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 ' . $cat->category_name . '</span></label>
</div>';
echo '</ul>';
}
}
} else {
$html = getList($id, $selected);
echo $html;
}
}
}
示例3: getPaymentsAdminContent
function getPaymentsAdminContent()
{
global $site;
global $sActionText;
global $action, $itemviewid;
$content .= getList();
return $content;
}
示例4: display
function display($cid)
{
$res = getList($cid);
foreach ($res as $key => $value) {
$str .= "<a href='#'>{$value['cname']}</a>>";
}
return $str;
}
示例5: getArticlesAdminContent
function getArticlesAdminContent()
{
global $site;
global $sActionText;
global $action, $itemviewid;
$ret = getList();
return $ret;
}
示例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)));
}
示例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));
}
示例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();
}
示例9: display
function display()
{
$res = getList();
$str = '<select>';
foreach ($res as $k => $v) {
$str .= "<option>{$v['cname']}</option>";
}
$str .= '</select>';
return $str;
}
示例10: said
function said($nameTry, $fileName)
{
$names = getList($fileName);
$ret = false;
foreach ($names as $name) {
if ($nameTry === trim($name)) {
$ret = true;
}
}
return $ret;
}
示例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();
}
示例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();
}
示例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(" ", $spac) . '|--' . $row['catename'];
$result[] = $row;
getList($row['id'], $result, $spac);
}
return $result;
}
示例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(' ', $spac) . '|--' . $val['title'];
$result[] = $val;
getList($val['id'], $result, $spac);
}
return $result;
}
示例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;
}