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


PHP set_style函数代码示例

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


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

示例1: get_list

 function get_list($condition = '1', $order = 'addtime DESC')
 {
     global $MOD, $TYPE, $pages, $page, $pagesize, $offset, $L, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}");
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     if ($items < 1) {
         return array();
     }
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['alt'] = $r['title'];
         $r['title'] = set_style($r['title'], $r['style']);
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['fromdate'] = $r['fromtime'] ? timetodate($r['fromtime'], 3) : $L['timeless'];
         $r['todate'] = $r['totime'] ? timetodate($r['totime'], 3) : $L['timeless'];
         $r['typename'] = $TYPE[$r['typeid']]['typename'];
         $r['typeurl'] = $MOD['form_url'] . list_url($r['typeid']);
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:28,代码来源:form.class.php

示例2: get_list

 function get_list($condition = '1', $order = 'addtime DESC')
 {
     global $pages, $page, $pagesize, $offset, $pagesize, $MOD, $item, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}");
         $item = $r['num'];
     }
     $pages = pages($item, $page, $pagesize);
     $lists = $pids = $P = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['linkurl'] = $MOD['linkurl'] . rewrite('price.php?itemid=' . $r['pid']);
         $pids[$r['pid']] = $r['pid'];
         $lists[] = $r;
     }
     if ($pids) {
         $result = $this->db->query("SELECT * FROM {$this->table_product} WHERE itemid IN (" . implode(',', $pids) . ")");
         while ($r = $this->db->fetch_array($result)) {
             $P[$r['itemid']] = $r;
         }
         if ($P) {
             foreach ($lists as $k => $v) {
                 $lists[$k]['unit'] = $P[$v['pid']]['unit'];
                 $lists[$k]['alt'] = $P[$v['pid']]['title'];
                 $lists[$k]['title'] = set_style($P[$v['pid']]['title'], $P[$v['pid']]['style']);
             }
         }
     }
     return $lists;
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:34,代码来源:price.class.php

示例3: get_list

 function get_list($condition = 'status=3', $order = 'addtime DESC', $cache = '')
 {
     global $MOD, $pages, $page, $pagesize, $offset, $items, $TYPE, $special, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}", $cache);
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     if ($items < 1) {
         return array();
     }
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}", $cache);
     while ($r = $this->db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['alt'] = $r['title'];
         $r['title'] = set_style($r['title'], $r['style']);
         $r['type'] = $r['typeid'] && isset($TYPE[$r['typeid']]) ? set_style($TYPE[$r['typeid']]['typename'], $TYPE[$r['typeid']]['style']) : '';
         $r['typeurl'] = $r['type'] ? rewrite($MOD['linkurl'] . 'type.php?tid=' . $r['typeid']) : '';
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:26,代码来源:item.class.php

示例4: get_list

 function get_list($condition = '1', $order = 'addtime DESC')
 {
     global $MOD, $pages, $page, $pagesize, $offset, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}");
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     if ($items < 1) {
         return array();
     }
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['title'] = set_style($r['title'], $r['style']);
         $r['linkurl'] = $MOD['linkurl'] . rewrite('expert.php?itemid=' . $r['itemid']);
         $r['rate'] = $r['answer'] && $r['best'] < $r['answer'] ? dround($r['best'] * 100 / $r['answer'], 2, true) . '%' : '100%';
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:25,代码来源:expert.class.php

示例5: get_list

 function get_list($condition = 'status=3', $order = 'listorder DESC,addtime DESC')
 {
     global $MOD, $pages, $page, $pagesize, $offset, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}");
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['title'] = set_style($r['title'], $r['style']);
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:20,代码来源:page.class.php

示例6: get_list

 function get_list($condition = 'status=3', $order = 'itemid DESC')
 {
     global $TYPE, $pages, $page, $pagesize, $offset, $L, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}");
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['dcompany'] = set_style($r['company'], $r['style']);
         $r['type'] = $r['typeid'] && isset($TYPE[$r['typeid']]) ? set_style($TYPE[$r['typeid']]['typename'], $TYPE[$r['typeid']]['style']) : $L['default_type'];
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:20,代码来源:friend.class.php

示例7: get_list

 function get_list($condition = '1', $order = 'listorder DESC, itemid DESC')
 {
     global $MOD, $TYPE, $pages, $page, $pagesize, $offset, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}");
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['title'] = set_style($r['title'], $r['style']);
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['typename'] = $TYPE[$r['typeid']]['typename'];
         $r['typeurl'] = $MOD['link_url'] . rewrite('index.php?typeid=' . $r['typeid']);
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:22,代码来源:link.class.php

示例8: tag


//.........这里部分代码省略.........
        } else {
            if ($areachild) {
                $areaids = '';
                $result = $db->query("SELECT arrchildid FROM {$db->pre}area WHERE areaid IN ({$areaid})");
                while ($r = $db->fetch_array($result)) {
                    $areaids .= ',' . $r['arrchildid'];
                }
                if ($areaids) {
                    $areaid = substr($areaids, 1);
                }
            }
            $condition .= " AND areaid IN ({$areaid})";
        }
    }
    $table = isset($table) ? $prefix . $table : get_table($moduleid);
    $offset or $offset = ($page - 1) * $pagesize;
    $percent = dround(100 / $cols) . '%';
    $num = 0;
    $order = $order ? ' ORDER BY ' . $order : '';
    $condition = stripslashes($condition);
    $condition = str_replace('##', '%', $condition);
    if ($showpage) {
        $num = $db->count($table, $condition, $tag_expires ? $tag_expires : $CFG['db_expires']);
        $pages = $catid ? listpages(get_cat($catid), $num, $page, $pagesize) : pages($num, $page, $pagesize);
    } else {
        if ($group) {
            $condition .= ' GROUP BY ' . $group;
        }
    }
    if ($page < 2 && strpos($parameter, '&page=') !== false) {
        $db_cache = 'CACHE';
        $tag_expires = $CFG['tag_expires'];
    }
    if ($template == 'null') {
        $db_cache = 'CACHE';
    }
    $query = "SELECT " . $fields . " FROM " . $table . " WHERE " . $condition . $order . " LIMIT " . $offset . "," . $pagesize;
    if ($debug) {
        echo $parameter . '<br/>' . $query . '<br/>';
    }
    $tags = $catids = $CATS = array();
    $result = $db->query($query, $db_cache, $tag_expires);
    while ($r = $db->fetch_array($result)) {
        if ($moduleid == 4 && isset($r['company'])) {
            $r['alt'] = $r['companyname'] = $r['company'];
            if ($length) {
                $r['company'] = dsubstr($r['company'], $length);
            }
        }
        if (isset($r['title'])) {
            $r['title'] = str_replace('"', '&quot;', trim($r['title']));
            $r['alt'] = $r['title'];
            if ($length) {
                $r['title'] = dsubstr($r['title'], $length);
            }
            if (isset($r['style']) && $r['style']) {
                $r['title'] = set_style($r['title'], $r['style']);
            }
        }
        if ($lazy && isset($r['thumb']) && $r['thumb']) {
            $r['thumb'] = DT_SKIN . 'image/lazy.gif" class="lazy" original="' . $r['thumb'];
        }
        if (isset($r['introduce']) && $introduce) {
            $r['introduce'] = dsubstr($r['introduce'], $introduce);
        }
        if (isset($r['linkurl']) && $r['linkurl'] && $moduleid > 4 && strpos($r['linkurl'], '://') === false) {
            $r['linkurl'] = $MODULE[$moduleid]['linkurl'] . $r['linkurl'];
        }
        if ($showcat && $moduleid > 4 && isset($r['catid'])) {
            $catids[$r['catid']] = $r['catid'];
        }
        $tags[] = $r;
    }
    $db->free_result($result);
    if ($showcat && $moduleid > 4 && $catids) {
        $result = $db->query("SELECT catid,catname,linkurl FROM {$db->pre}category WHERE catid IN (" . implode(',', $catids) . ")");
        while ($r = $db->fetch_array($result)) {
            $CATS[$r['catid']] = $r;
        }
        if ($CATS) {
            foreach ($tags as $k => $v) {
                $tags[$k]['catname'] = $v['catid'] ? $CATS[$v['catid']]['catname'] : '';
                $tags[$k]['caturl'] = $v['catid'] ? $MODULE[$moduleid]['linkurl'] . $CATS[$v['catid']]['linkurl'] : '';
            }
        }
    }
    if ($template == 'null') {
        return $tags;
    }
    if ($tag_cache) {
        ob_start();
        include template($template, $dir);
        $contents = ob_get_contents();
        ob_clean();
        file_put($TCF, '<!--' . ($DT_TIME + $tag_expires) . '-->' . $contents);
        echo $contents;
    } else {
        include template($template, $dir);
    }
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:101,代码来源:tag.func.php

示例9: template

         include template($template, $module);
         $data = ob_get_contents();
         ob_clean();
         file_put($filename, '<!--' . $totime . '-->' . $data);
     } else {
         file_del($filename);
     }
 } else {
     $ad = $db->get_one("SELECT * FROM {$DT_PRE}ad WHERE pid={$p['pid']} AND status=3 AND fromtime<{$DT_TIME} AND totime>{$DT_TIME} AND areaid={$areaid} ORDER BY fromtime DESC");
     if ($ad) {
         extract($ad);
         if ($url && $stat) {
             $url = DT_PATH . 'api/' . rewrite('redirect.php?aid=' . $aid);
         }
         if ($typeid == 2) {
             $text_name = set_style($text_name, $text_style);
         } else {
             if ($typeid == 3) {
                 if (strtolower(file_ext($image_src)) == 'swf') {
                     $typeid = 4;
                     $flash_src = $image_src;
                 }
             } else {
                 if ($typeid == 4) {
                     if (in_array(strtolower(file_ext($flash_src)), array('jpg', 'jpeg', 'png', 'gif', 'bmp'))) {
                         $typeid = 3;
                         $image_src = $flash_src;
                     }
                 }
             }
         }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:ad.htm.php

示例10: dmsg

        dmsg($L['op_del_success'], $forward);
        break;
    default:
        $status = isset($status) ? intval($status) : 3;
        in_array($status, array(1, 2, 3)) or $status = 3;
        $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1;
        $type_select = type_select($TYPE, 0, 'typeid', $L['default_type'], $typeid, '', $L['all_type']);
        $condition = "username='{$_username}' AND status={$status}";
        if ($keyword) {
            $condition .= " AND title LIKE '%{$keyword}%'";
        }
        if ($typeid > -1) {
            $condition .= " AND typeid={$typeid}";
        }
        $lists = $do->get_list($condition);
        foreach ($lists as $k => $v) {
            $lists[$k]['type'] = $lists[$k]['typeid'] && isset($TYPE[$lists[$k]['typeid']]) ? set_style($TYPE[$lists[$k]['typeid']]['typename'], $TYPE[$lists[$k]['typeid']]['style']) : $L['default_type'];
        }
        $head_title = $L['news_title'];
        break;
}
$nums = array();
$limit_used = 0;
for ($i = 1; $i < 4; $i++) {
    $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}news WHERE username='{$_username}' AND status={$i}");
    $nums[$i] = $r['num'];
    $limit_used += $r['num'];
}
$nums[0] = count($TYPE);
$limit_free = $MG['news_limit'] && $MG['news_limit'] > $limit_used ? $MG['news_limit'] - $limit_used : 0;
include template('news', $module);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:news.inc.php

示例11: isset

    default:
        $typeid = isset($typeid) ? $typeid === '' ? -1 : intval($typeid) : -1;
        $type_select = type_select($TYPE, 1, 'typeid', '请选择分类', $typeid);
        $condition = '1';
        if ($keyword) {
            $condition .= " AND title LIKE '%{$keyword}%'";
        }
        if ($typeid > 0) {
            $condition .= " AND typeid={$typeid}";
        }
        if ($page > 1 && $sum) {
            $items = $sum;
        } else {
            $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}mail WHERE {$condition}");
            $items = $r['num'];
        }
        $pages = pages($items, $page, $pagesize);
        $mails = array();
        $result = $db->query("SELECT * FROM {$DT_PRE}mail WHERE {$condition} ORDER BY itemid DESC LIMIT {$offset},{$pagesize}");
        while ($r = $db->fetch_array($result)) {
            $r['addtime'] = timetodate($r['addtime'], 5);
            $r['edittime'] = timetodate($r['edittime'], 5);
            $r['sendtime'] = $r['sendtime'] ? timetodate($r['sendtime'], 5) : '<span style="color:red;">未发送</span>';
            $r['type'] = $r['typeid'] && isset($TYPE[$r['typeid']]) ? set_style($TYPE[$r['typeid']]['typename'], $TYPE[$r['typeid']]['style']) : '<span style="color:red;">未分类</span>';
            $num = $db->get_one("SELECT count(itemid) as num FROM {$DT_PRE}mail_list WHERE typeids LIKE '%," . $r['typeid'] . ",%' ");
            $r['num'] = $num['num'];
            $mails[] = $r;
        }
        include tpl('mail', $module);
        break;
}
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:mail.inc.php

示例12: get_list

 function get_list($condition = 'status=3', $order = 'addtime DESC', $cache = '')
 {
     global $MOD, $pages, $page, $pagesize, $offset, $items, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}", $cache);
         $items = $r['num'];
     }
     $pages = defined('CATID') ? listpages(1, CATID, $items, $page, $pagesize, 10, $MOD['linkurl']) : pages($items, $page, $pagesize);
     if ($items < 1) {
         return array();
     }
     $lists = $catids = $groupids = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}", $cache);
     while ($r = $this->db->fetch_array($result)) {
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['replydate'] = timetodate($r['replytime'], 5);
         $r['alt'] = $r['title'];
         $r['title'] = set_style($r['title'], $r['style']);
         if (strpos($r['linkurl'], '://') === false) {
             $r['linkurl'] = $MOD['linkurl'] . $r['linkurl'];
         }
         $catids[$r['catid']] = $r['catid'];
         $groupids[$r['gid']] = $r['gid'];
         $lists[] = $r;
     }
     if ($catids) {
         $CATS = array();
         $result = $this->db->query("SELECT catid,catname,linkurl FROM {$this->db->pre}category WHERE catid IN (" . implode(',', $catids) . ")");
         while ($r = $this->db->fetch_array($result)) {
             $CATS[$r['catid']] = $r;
         }
         if ($CATS) {
             foreach ($lists as $k => $v) {
                 $lists[$k]['catname'] = $v['catid'] ? $CATS[$v['catid']]['catname'] : '';
                 $lists[$k]['caturl'] = $v['catid'] ? $MOD['linkurl'] . $CATS[$v['catid']]['linkurl'] : '';
             }
         }
     }
     if ($groupids) {
         $GRPS = array();
         $result = $this->db->query("SELECT itemid,title,linkurl FROM {$this->table}_group WHERE itemid IN (" . implode(',', $groupids) . ")");
         while ($r = $this->db->fetch_array($result)) {
             $GRPS[$r['itemid']] = $r;
         }
         if ($GRPS) {
             foreach ($lists as $k => $v) {
                 $lists[$k]['groupname'] = $v['gid'] ? $GRPS[$v['gid']]['title'] : '';
                 $lists[$k]['groupurl'] = $v['gid'] ? $MOD['linkurl'] . $GRPS[$v['gid']]['linkurl'] : '';
             }
         }
     }
     return $lists;
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:56,代码来源:club.class.php

示例13: get_list

 function get_list($condition = 'status=3', $order = 'edittime DESC', $cache = '')
 {
     global $MOD, $pages, $page, $pagesize, $offset, $CATEGORY, $items, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table} WHERE {$condition}", $cache);
         $items = $r['num'];
     }
     $pages = defined('CATID') ? listpages(1, CATID, $items, $page, $pagesize, 10, $MOD['linkurl']) : pages($items, $page, $pagesize);
     $lists = array();
     $result = $this->db->query("SELECT * FROM {$this->table} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}", $cache);
     while ($r = $this->db->fetch_array($result)) {
         $r['alt'] = $r['title'];
         $r['title'] = set_style($r['title'], $r['style']);
         $r['linkurl'] = $MOD['linkurl'] . $r['linkurl'];
         $r['parentid'] = $CATEGORY[$r['catid']]['parentid'] ? $CATEGORY[$r['catid']]['parentid'] : $r['catid'];
         $lists[] = $r;
     }
     return $lists;
 }
开发者ID:hcd2008,项目名称:destoon,代码行数:21,代码来源:resume.class.php

示例14: get_list_place

 function get_list_place($condition = '1', $order = 'listorder DESC,pid DESC')
 {
     global $MOD, $TYPE, $pages, $page, $pagesize, $offset, $DT_TIME, $sum;
     if ($page > 1 && $sum) {
         $items = $sum;
     } else {
         $r = $this->db->get_one("SELECT COUNT(*) AS num FROM {$this->table_place} WHERE {$condition}");
         $items = $r['num'];
     }
     $pages = pages($items, $page, $pagesize);
     if ($items < 1) {
         return array();
     }
     $ads = array();
     $result = $this->db->query("SELECT * FROM {$this->table_place} WHERE {$condition} ORDER BY {$order} LIMIT {$offset},{$pagesize}");
     while ($r = $this->db->fetch_array($result)) {
         $r['alt'] = $r['name'];
         $r['name'] = set_style($r['name'], $r['style']);
         $r['adddate'] = timetodate($r['addtime'], 5);
         $r['editdate'] = timetodate($r['edittime'], 5);
         $r['width'] or $r['width'] = '--';
         $r['height'] or $r['height'] = '--';
         $r['typename'] = $TYPE[$r['typeid']];
         $r['typeurl'] = $MOD['ad_url'] . list_url($r['typeid']);
         $ads[] = $r;
     }
     return $ads;
 }
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:28,代码来源:ad.class.php

示例15: listpages

    $topage = $fid + $num - 1;
    $total = $topage < $total ? $topage : $total;
}
for (; $page <= $total; $page++) {
    $offset = ($page - 1) * $pagesize;
    $pages = listpages($CAT, $items, $page, $pagesize);
    $tags = array();
    $result = $db->query("SELECT " . $MOD['fields'] . " FROM {$table} WHERE {$condition} ORDER BY " . $MOD['order'] . " LIMIT {$offset},{$pagesize}");
    while ($r = $db->fetch_array($result)) {
        $r['adddate'] = timetodate($r['addtime'], 5);
        $r['editdate'] = timetodate($r['edittime'], 5);
        if ($lazy && isset($r['thumb']) && $r['thumb']) {
            $r['thumb'] = DT_SKIN . 'image/lazy.gif" original="' . $r['thumb'];
        }
        $r['alt'] = $r['title'];
        $r['title'] = set_style(dsubstr($r['title'], 20, '..'), $r['style']);
        $r['linkurl'] = $MOD['linkurl'] . $r['linkurl'];
        $tags[] = $r;
    }
    $seo_file = 'list';
    include DT_ROOT . '/include/seo.inc.php';
    $destoon_task = "moduleid={$moduleid}&html=list&catid={$catid}&page={$page}";
    if ($EXT['wap_enable']) {
        $head_mobile = $EXT['wap_url'] . 'index.php?moduleid=' . $moduleid . '&catid=' . $catid . ($page > 1 ? '&page=' . $page : '');
    }
    $filename = DT_ROOT . '/' . $MOD['moduledir'] . '/' . listurl($CAT, $page);
    ob_start();
    include template($template, $module);
    $data = ob_get_contents();
    ob_clean();
    if ($DT['pcharset']) {
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:list.htm.php


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