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

PHP set_style函数代码示例

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

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



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


示例16: type_select

        $mycat_select = type_select('product-' . $_userid, 0, 'mycatid', $L['type_default'], $mycatid, '', $L['type_my']);
        $condition = "username='{$_username}' AND status={$status}";
        if ($keyword) {
            $condition .= " AND keyword LIKE '%{$keyword}%'";
        }
        if ($catid) {
            $condition .= $CAT['child'] ? " AND catid IN (" . $CAT['arrchildid'] . ")" : " AND catid={$catid}";
        }
        if ($typeid >= 0) {
            $condition .= " AND typeid={$typeid}";
        }
        if ($mycatid >= 0) {
            $condition .= " AND mycatid IN (" . type_child($mycatid, $MTYPE) . ")";
        }
        $timetype = strpos($MOD['order'], 'add') !== false ? 'add' : '';
        $lists = $do->get_list($condition, $MOD['order']);
        foreach ($lists as $k => $v) {
            $lists[$k]['mycat'] = $v['mycatid'] && isset($MTYPE[$v['mycatid']]) ? set_style($MTYPE[$v['mycatid']]['typename'], $MTYPE[$v['mycatid']]['style']) : $L['type_default'];
        }
        break;
}
if ($_userid) {
    $nums = array();
    for ($i = 1; $i < 5; $i++) {
        $r = $db->get_one("SELECT COUNT(*) AS num FROM {$table} WHERE username='{$_username}' AND status={$i}");
        $nums[$i] = $r['num'];
    }
    $nums[0] = count($MTYPE);
}
$head_title = lang($L['module_manage'], array($MOD['name']));
include template($MOD['template_my'] ? $MOD['template_my'] : 'my_' . $module, 'member');
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:my.inc.php


示例17: type_select

        $type_select = type_select('ask', 1, 'typeid', '请选择分类', $typeid);
        $status_select = dselect($dstatus, 'status', '受理状态', $status, '', 1, '', 1);
        $order_select = dselect($sorder, 'order', '', $order);
        $condition = '1';
        if ($keyword) {
            $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
        }
        if ($typeid > 0) {
            $condition .= " AND typeid={$typeid}";
        }
        if ($status !== '') {
            $condition .= " AND status={$status}";
        }
        if ($page > 1 && $sum) {
            $items = $sum;
        } else {
            $r = $db->get_one("SELECT COUNT(*) AS num FROM {$DT_PRE}ask WHERE {$condition}");
            $items = $r['num'];
        }
        $pages = pages($items, $page, $pagesize);
        $asks = array();
        $result = $db->query("SELECT * FROM {$DT_PRE}ask WHERE {$condition} ORDER BY {$dorder[$order]} LIMIT {$offset},{$pagesize}");
        while ($r = $db->fetch_array($result)) {
            $r['addtime'] = timetodate($r['addtime'], 5);
            $r['dstatus'] = $_status[$r['status']];
            $r['type'] = $r['typeid'] && isset($TYPE[$r['typeid']]) ? set_style($TYPE[$r['typeid']]['typename'], $TYPE[$r['typeid']]['style']) : '默认';
            $asks[] = $r;
        }
        include tpl('ask', $module);
        break;
}
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:ask.inc.php


示例18: set_style

                ?>
" target="_blank"><strong><?php 
                echo set_style($c['catname'], $c['style']);
                ?>
</strong></a></li>
<?php 
                if (is_array($sub)) {
                    foreach ($sub as $j => $s) {
                        if ($j < 4) {
                            ?>
<li><a href="<?php 
                            echo $MODULE[$mid]['linkurl'];
                            echo $s['linkurl'];
                            ?>
" target="_blank"><?php 
                            echo set_style($s['catname'], $s['style']);
                            ?>
</a></li><?php 
                        }
                    }
                }
                ?>
</ul>
<?php 
            }
        }
    }
    ?>
</div>
</div>
<?php 
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:index.php


示例19: set_style

<td><input type="text" size="2" name="listorder[<?php 
        echo $v['moduleid'];
        ?>
]" value="<?php 
        echo $v['listorder'];
        ?>
"/></td>
<td><?php 
        echo $v['moduleid'];
        ?>
</td>
<td><a href="<?php 
        echo $v['linkurl'];
        ?>
" target="_blank"><?php 
        echo set_style($v['name'], $v['style']);
        ?>
</a></td>
<td><a href="<?php 
        echo $v['linkurl'];
        ?>
" target="_blank"><?php 
        echo $v['moduledir'] ? $v['moduledir'] : '--';
        ?>
</a></td>
<td><?php 
        echo $v['islink'] ? '<span class="f_red">外链</span>' : '内置';
        ?>
</td>
<td><img src="admin/image/<?php 
        echo $v['ismenu'] ? 'yes' : 'no';
开发者ID:hcd2008,项目名称:destoon,代码行数:31,代码来源:module.tpl.php


示例20: defined

<?php

defined('IN_DESTOON') or exit('Access Denied');
login();
$MG['mail'] or dalert(lang('message->without_permission_and_upgrade'), 'goback');
require DT_ROOT . '/module/' . $module . '/common.inc.php';
require DT_ROOT . '/include/post.func.php';
$TYPE = get_type('mail', 1);
foreach ($TYPE as $k => $v) {
    $TYPE[$k]['typename'] = set_style($v['typename'], $v['style']);
}
$r = $db->get_one("SELECT * FROM {$DT_PRE}mail_list WHERE username='{$_username}'");
switch ($action) {
    case 'cancel':
        if ($r) {
            $db->query("DELETE FROM {$DT_PRE}mail_list WHERE username='{$_username}'");
        } else {
            message($L['mail_msg_not_add']);
        }
        dmsg($L['mail_msg_cancel'], '?action=index');
        break;
    case 'show':
        $itemid or message();
        $r = $db->get_one("SELECT * FROM {$DT_PRE}mail WHERE itemid={$itemid}");
        $r or message($L['mail_msg_not_item']);
        $r['editdate'] = timetodate($r['edittime'], 5);
        $r['adddate'] = timetodate($r['addtime'], 5);
        break;
    case 'list':
        $r or message($L['mail_msg_not_add']);
        $typeids = substr($r['typeids'], 1, -1);
开发者ID:hiproz,项目名称:zhaotaoci.cc,代码行数:31,代码来源:mail.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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