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


PHP nv_alias_page函数代码示例

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


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

示例1: elseif

                $item['imghome'] = NV_BASE_SITEURL . NV_FILES_DIR . '/' . $module_upload . '/' . $item['homeimgfile'];
            } elseif ($item['homeimgthumb'] == 2) {
                //image file
                $item['imghome'] = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $item['homeimgfile'];
            } elseif ($item['homeimgthumb'] == 3) {
                //image url
                $item['imghome'] = $item['homeimgfile'];
            } elseif (!empty($show_no_image)) {
                //no image
                $item['imghome'] = NV_BASE_SITEURL . $show_no_image;
            } else {
                $item['imghome'] = '';
            }
            $item['newday'] = $global_array_cat[$item['catid']]['newday'];
            $item['link'] = $global_array_cat[$item['catid']]['link'] . '/' . $item['alias'] . '-' . $item['id'] . $global_config['rewrite_exturl'];
            $array_catpage[] = $item;
        }
        $viewcat = 'viewcat_list_new';
        $generate_page = nv_alias_page($page_title, $base_url, $num_items, $per_page, $page);
        $contents = call_user_func($viewcat, $array_catpage, 0, ($page - 1) * $per_page, $generate_page);
    }
    if (!defined('NV_IS_MODADMIN') and $contents != '' and $cache_file != '') {
        $nv_Cache->setItem($module_name, $cache_file, $contents);
    }
}
if ($page > 1) {
    $page_title .= ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['page'] . ' ' . $page;
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:nukeplus,项目名称:nuke,代码行数:31,代码来源:main.php

示例2: unserialize

$compare_id = unserialize($compare_id);
$link = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=';
$base_url = NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=group/' . $global_array_group[$groupid]['alias'];
$array_pro_id = array();
$_sql = 'SELECT pro_id FROM ' . $db_config['prefix'] . '_' . $module_data . '_group_items WHERE group_id IN (' . implode(',', $chirld_groupid) . ')';
$_query = $db->query($_sql);
while (list($pro_id) = $_query->fetch(3)) {
    $array_pro_id[] = $pro_id;
}
$array_pro_id = array_unique($array_pro_id);
$array_pro_id = !empty($array_pro_id) ? implode(',', $array_pro_id) : 0;
// Fetch Limit
$db->sqlreset()->select('COUNT(*)')->from($db_config['prefix'] . '_' . $module_data . '_rows')->where('status=1 AND id IN ( ' . $array_pro_id . ' )');
$num_items = $db->query($db->sql())->fetchColumn();
$db->select('id, listcatid, publtime, ' . NV_LANG_DATA . '_title, ' . NV_LANG_DATA . '_alias, ' . NV_LANG_DATA . '_hometext, homeimgalt, homeimgfile, homeimgthumb, product_code, product_number, product_price, money_unit, discount_id, showprice, ' . NV_LANG_DATA . '_gift_content, gift_from, gift_to')->order('id DESC')->limit($per_page)->offset(($page - 1) * $per_page);
$result = $db->query($db->sql());
$data_content = GetDataInGroup($result, $groupid);
$data_content['count'] = $num_items;
if (sizeof($data_content['data']) < 1 and $page > 1) {
    Header('Location: ' . nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name, true));
    exit;
}
$pages = nv_alias_page($page_title, $base_url, $num_items, $per_page, $page);
if ($page > 1) {
    $page_title .= ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['page'] . ' ' . $page;
    $description .= ' ' . $page;
}
$contents = call_user_func($global_array_group[$groupid]['viewgroup'], $data_content, $compare_id, $pages, $sorts, $viewtype);
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
开发者ID:hoangvtien,项目名称:module-shops,代码行数:31,代码来源:group.php

示例3: unset

            $item['alt'] = !empty($item['homeimgalt']) ? $item['homeimgalt'] : $item['title'];
            $item['width'] = $module_config[$module_name]['homewidth'];
            $end_weight = $item['weight'];
            $item['link'] = $global_array_cat[$item['catid']]['link'] . "/" . $item['alias'] . "-" . $item['id'];
            $topic_array[] = $item;
        }
        $db->sql_freeresult($query);
        unset($query, $row);
        $topic_other_array = array();
        $query = $db->sql_query("SELECT t1.id, t1.catid, t1.addtime, t1.edittime, t1.publtime, t1.title, t1.alias, t1.hitstotal FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` as t1 INNER JOIN `" . NV_PREFIXLANG . "_" . $module_data . "_block` AS t2 ON t1.id = t2.id WHERE t2.bid= " . $bid . " AND t2.weight > " . $end_weight . " ORDER BY t2.weight ASC LIMIT 0," . $st_links . "");
        while ($item = $db->sql_fetch_assoc($query)) {
            $item['link'] = $global_array_cat[$item['catid']]['link'] . "/" . $item['alias'] . "-" . $item['id'];
            $topic_other_array[] = $item;
        }
        unset($query, $row, $arr_listcatid);
        $generate_page = nv_alias_page($page_title, $base_url, $all_page, $per_page, $page);
        $contents = topic_theme($topic_array, $topic_other_array, $generate_page);
        if ($page > 1) {
            $page_title .= ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['page'] . ' ' . $page;
        }
    }
} else {
    $array_cat = array();
    $key = 0;
    $query_cat = $db->sql_query("SELECT `bid`, `number`, `title`, `alias` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_block_cat` ORDER BY `weight` ASC");
    while (list($bid, $numberlink, $btitle, $balias) = $db->sql_fetchrow($query_cat, 1)) {
        $array_cat[$key] = array('catid' => $bid, 'alias' => '', 'subcatid' => '', 'title' => $btitle, 'link' => NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=groups/" . $balias);
        $query = $db->sql_query("SELECT t1.id, t1.catid, t1.admin_id, t1.author, t1.sourceid, t1.addtime, t1.edittime, t1.publtime, t1.title, t1.alias, t1.hometext, t1.homeimgfile, t1.homeimgalt, t1.homeimgthumb, t1.allowed_rating, t1.hitstotal, t1.hitscm, t1.total_rating, t1.click_rating, t1.keywords FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` as t1 INNER JOIN `" . NV_PREFIXLANG . "_" . $module_data . "_block` AS t2 ON t1.id = t2.id WHERE t2.bid= " . $bid . " AND t1.status= 1 ORDER BY t2.weight ASC LIMIT 0," . $numberlink);
        while ($item = $db->sql_fetch_assoc($query)) {
            $array_img = !empty($item['homeimgthumb']) ? explode("|", $item['homeimgthumb']) : ($array_img = array("", ""));
            if ($array_img[0] != "" and file_exists(NV_ROOTDIR . '/' . NV_FILES_DIR . '/' . $module_name . '/' . $array_img[0])) {
开发者ID:atarubi,项目名称:nuke-viet,代码行数:31,代码来源:groups.php

示例4: FOUND_ROWS

    $orderby = 'rand() ';
}
$base_url = $global_array_cat[$catid]['link'];
$sql = "SELECT SQL_CALC_FOUND_ROWS `id`, `author`, `title`, `alias`, `url`, `urlimg`, `add_time`, `description`,`hits_total` FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE status='1' AND catid='" . $catid . "' ORDER BY " . $orderby . $sort . " LIMIT " . ($page - 1) * $per_page . "," . $per_page;
$result = $db->sql_query($sql);
$result_all = $db->sql_query("SELECT FOUND_ROWS()");
list($all_page) = $db->sql_fetchrow($result_all);
while ($row = $db->sql_fetchrow($result)) {
    $author = explode('|', $row['author']);
    if ($author[0] == 1) {
        $sql1 = "SELECT * FROM `" . NV_AUTHORS_GLOBALTABLE . "` WHERE `id`=" . $author[1] . "";
        $result1 = $db->sql_query($sql1);
        $row1 = $db->sql_fetchrow($result1);
        $row['author'] = $row1;
    }
    $row['link'] = $global_array_cat[$catid]['link'] . "/" . $row['alias'] . "-" . $row['id'];
    $row['visit'] = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=visitlink-" . $row['alias'] . "-" . $row['id'];
    $row['report'] = NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&amp;" . NV_NAME_VARIABLE . "=" . $module_name . "&amp;" . NV_OP_VARIABLE . "=reportlink-" . $row['alias'] . "-" . $row['id'];
    $urlimg = NV_ROOTDIR . '/' . NV_UPLOADS_DIR . '/' . $row['urlimg'];
    $imageinfo = nv_ImageInfo($urlimg, 300, true, NV_UPLOADS_REAL_DIR . '/' . $module_name . '/thumb');
    $row['urlimg'] = $imageinfo['src'];
    $items[] = $row;
}
$contents = call_user_func("viewcat", $array_subcat, $array_cat, $items);
$contents .= nv_alias_page($page_title, $base_url, $all_page, $per_page, $page);
if ($page > 1) {
    $page_title .= ' ' . NV_TITLEBAR_DEFIS . ' ' . $lang_global['page'] . ' ' . $page;
}
include NV_ROOTDIR . "/includes/header.php";
echo nv_site_theme($contents);
include NV_ROOTDIR . "/includes/footer.php";
开发者ID:hongoctrien,项目名称:module-weblink,代码行数:31,代码来源:viewcat.php


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