コード例 #1
0
 /**
  * 信息审核页面
  */
 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
0
ファイル: dashboard.php プロジェクト: robdmat/sport.net
 /**
  */
 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;
         }
     }
 }
コード例 #3
0
function getPaymentsAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $content .= getList();
    return $content;
}
コード例 #4
0
ファイル: plink.php プロジェクト: ryanlee1992/recursion
function display($cid)
{
    $res = getList($cid);
    foreach ($res as $key => $value) {
        $str .= "<a href='#'>{$value['cname']}</a>>";
    }
    return $str;
}
コード例 #5
0
function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $ret = getList();
    return $ret;
}
コード例 #6
0
 /**
  * 分页获取信息
  */
 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
0
 /**
  * 搜索需求
  */
 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
0
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
0
ファイル: path.php プロジェクト: ryanlee1992/recursion
function display()
{
    $res = getList();
    $str = '<select>';
    foreach ($res as $k => $v) {
        $str .= "<option>{$v['cname']}</option>";
    }
    $str .= '</select>';
    return $str;
}
コード例 #10
0
ファイル: index.php プロジェクト: kayneth/codsworth
function said($nameTry, $fileName)
{
    $names = getList($fileName);
    $ret = false;
    foreach ($names as $name) {
        if ($nameTry === trim($name)) {
            $ret = true;
        }
    }
    return $ret;
}
コード例 #11
0
ファイル: TypeController.class.php プロジェクト: Caojunkai/jd
 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
0
 /**
  * 详情信息页
  */
 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
0
ファイル: 2.php プロジェクト: denson7/phpstudy
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;
}
コード例 #14
0
ファイル: function.php プロジェクト: jank2014/jankzmaker
/**
 * [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;
}
コード例 #15
0
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;
}
コード例 #16
0
ファイル: displayLink.php プロジェクト: ryanlee1992/recursion
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;
}
コード例 #17
0
ファイル: function.php プロジェクト: Caojunkai/jd
/**
 *  无限分类列表
 *@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;
}
コード例 #18
0
ファイル: cate.func.php プロジェクト: usingsth/usingcms
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;
}
コード例 #19
0
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);
}
コード例 #20
0
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;
}
コード例 #21
0
function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $ret = '';
    switch ($action) {
        case 'edit':
            $ret .= getEdit();
            break;
        case 'add':
            $ret .= getAdd();
            break;
        default:
            $ret .= getList();
            break;
    }
    return $ret;
}
コード例 #22
0
function getArticlesAdminContent()
{
    global $site;
    global $sActionText;
    global $action, $itemviewid;
    $content = '';
    switch ($action) {
        case 'edit':
            $ID = (int) $_REQUEST['ID'];
            $content .= getEdit($ID);
            break;
        case 'add':
            $content .= getAdd();
            break;
        default:
            $content .= getList();
            break;
    }
    return $content;
}
コード例 #23
0
function parseMail($body, $db, $mail)
{
    $parsed = array();
    $parsed['body'] = $body;
    findProp('priority', $parsed);
    findProp('tags', $parsed);
    findProp('duedate', $parsed);
    findProp('list', $parsed);
    if ($parsed['list']) {
        $parsed['list'] = getList($parsed['list'], $db, $mail);
    } else {
        $parsed['list'] = getList("MailImport", $db, $mail);
    }
    if ($parsed['duedate']) {
        $parsed['duedate'] = pasreDate($parsed['duedate']);
    }
    if (!$parsed['list']) {
        err("no list defined (neither in mail nor in config)", $mail);
    }
    return $parsed;
}
コード例 #24
0
 public function index()
 {
     $types = M('type');
     $data = $types->field('id,name,pid')->select();
     //查询类别信息
     $typeList = getList($data);
     $typeId = array();
     //自定义数组,下标为类别ID 值为类别名称
     foreach ($data as $v) {
         $typeId[$v['id']] = $v['name'];
     }
     $brands = M("brands");
     //获取搜索条件
     if ($_GET['type_id']) {
         $map['type_id'] = $_GET['type_id'];
         //组装搜索条件
     }
     $total = $brands->where($map)->count();
     //查询数据总条数
     $Page = new \Think\Page($total, 10, $map);
     //实例化分页类
     $data = $brands->where($map)->order('sort ASC')->page($_GET['p'], 10)->select();
     $show = $Page->show();
     //分页显示输出
     $type_id = $brands->field('id,type_id')->select();
     foreach ($type_id as $v) {
         $types = explode(',', $v['type_id']);
         for ($i = 0; $i < count($types); $i++) {
             $typename[$v['id']][] = $types[$i];
         }
     }
     $this->assign('typename', $typename);
     $this->assign("type", $typeId);
     $this->assign("typeList", $typeList);
     $this->assign("brands", $data);
     $this->assign("page", $show);
     $this->display();
 }
コード例 #25
0
ファイル: products.php プロジェクト: artpro676/happysocks
<?php

include_once 'data/products.php';
$limit = isset($_GET['limit']) ? (int) $_GET['limit'] : 16;
$list = getList($limit);
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
echo json_encode($list);
コード例 #26
0
ファイル: blog.php プロジェクト: joindennis/yidejia
 /**
  * 获取blog列表(加入标签查询)
  * 
  * @param array         $tags    标签
  * @param array|string  $where   查询条件
  * @param array         $option  操作选项
  * @param string        $fields  查询字段
  * @return array
  */
 function getListByTags($tags = null, $where = null, $option = array(), $fields = "*")
 {
     if ($where && $tags && !empty($tags)) {
         foreach ($tags as $tag) {
             $where .= " AND tags LIKE '%,{$tag},%'";
         }
     }
     return getList($where, $option, $fields);
 }
コード例 #27
0
ファイル: filter.php プロジェクト: since2014/MantisAcra
                        $model_list = getList($sql, "phone_model");
                        $model_list = outputList($model_list);
                    } else {
                        $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);
                    }
                }
            }
            break;
        default:
            $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 = "";
            $brand = "";
            $model = "";
            break;
    }
    $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);
}
コード例 #28
0
ファイル: Item.php プロジェクト: TheProjecter/mylangnotebook
         $response = array("success" => false, "data" => array("msg" => "Anything was wong in del case!"));
     }
     break;
 case "update":
     @($id = getRequest(PARAM_ID));
     @($result = getRequest(PARAM_RESULT));
     $color = updateItem($id, $result);
     if (is_numeric($color)) {
         $response = array("success" => true, "color" => $color);
     } else {
         $response = array("success" => false, "data" => array("msg" => "Anything was wong!"));
     }
     break;
 case "getList":
     @($category = getRequest(INPUT_CATEGORY));
     list($arrList, $direction) = getList($category);
     if ($arrList) {
         // group items in differents array in groups of 5 or according
         //  to their fails, shuffle elements after to provide a random order
         // 1. stores the position of the last items with the same
         // fails or group
         $failLastPosition = array();
         $pos = 0;
         // the cursor of the array
         $cont = 0;
         // the cursor of groups of randomized words
         $fail = current($arrList);
         $fail = $fail[2][0];
         while ($pos < sizeof($arrList) && $fail > 0) {
             $nextItem = next($arrList);
             if (($cont + 1) % 5 == 0 || $nextItem[2] != $fail) {
コード例 #29
0
 /**
  * 详情信息页面
  */
 public function detailInfo()
 {
     $proId = I('post.id');
     //某一条消息的id
     $find = M('product_list')->where(array('pro_id' => $proId))->select();
     $list = getList($find);
     if ($find) {
         $resault['status'] = 200;
         $resault['info'] = 'success';
     } else {
         $resault['status'] = -400;
         $resault['info'] = 'error';
     }
     $resault['data'] = $list['0'];
     $this->ajaxReturn($resault);
 }
コード例 #30
0
ファイル: seo.php プロジェクト: soross/myteashop
<?php

require_once "action/checkAamsLogin.php";
require_once "action/smarty_inc.php";
require_once "action/mysql.class.php";
$list = getList(" boya_config where comm_type in('SEO_Title','SEO_Keyword','SEO_Desc')", $db, 'id,comm_code,comm_flag');
$seolist = array();
for ($i = 0; $i < sizeof($list); $i++) {
    if ($list[$i][comm_flag] == 'Title') {
        $seolist["title"] = $list[$i][comm_code];
    }
    if ($list[$i][comm_flag] == 'Keyword') {
        $seolist["keyword"] = $list[$i][comm_code];
    }
    if ($list[$i][comm_flag] == 'Desc') {
        $seolist["desc"] = $list[$i][comm_code];
    }
}
//print_r($list);
$smarty->assign("seolist", $seolist);
$smarty->display("seo.html");