示例#1
0
        }
        if ($func_who_view == 1 and defined('NV_IS_USER')) {
            $allowed = true;
        } elseif ($func_who_view == 2 and defined('NV_IS_MODADMIN')) {
            $allowed = true;
        } elseif ($func_who_view == 3 and defined('NV_IS_USER') and nv_is_in_groups($user_info['in_groups'], $global_array_cat[$catid]['groups_view'])) {
            $allowed = true;
        }
        if ($allowed) {
            $feature = array('cmable' => $photo_data['allowed_comm'], 'voteable' => $photo_data['allowed_rating']);
            $comment_array = np_comment('photos', $pid, $photo_data['allowed_comm'], 0);
            $comment_array['ver'] = $ver;
            $photo_data['comments'] = comment_theme('photos', $pid, $feature, $comment_array);
            $photo_data['scwidth'] = $scwidth;
            $photo_data['scheight'] = $scheight;
            $photo_data['fitwidth'] = $fitwidth;
            $photo_data['fitheight'] = $fitheight;
            $contents = np_view_photo($photo_data, $ver);
        } else {
            $msg = no_permission($func_who_view);
            $contents = np_theme_message($msg);
        }
    }
}
include NV_ROOTDIR . "/includes/header.php";
if ($ver == 0) {
    echo nv_site_theme($contents);
} else {
    echo $contents;
}
include NV_ROOTDIR . "/includes/footer.php";
示例#2
0
 * @Project NUKEVIET 3.0
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2010 VINADES ., JSC. All rights reserved
 * @Createdate Jul 11, 2010  8:43:46 PM
 */
if (!defined('NV_IS_MOD_NPHOTO')) {
    die('Stop!!!');
}
$contents = '';
$page_title = $module_info['custom_title'];
$key_words = $module_info['keywords'];
if ($catid > 0) {
    $array_mod_title[] = array('catid' => $catid, 'title' => $allcats[$catid]['title'], 'link' => NV_BASE_SITEURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . '=' . $allcats[$catid]['alias']);
}
if (!empty($category_alias) and $catid == 0) {
    $contents = np_theme_message('Chủ đề bạn yêu cầu không tồn tại hoặc đã bị xóa');
} elseif (!empty($home_category)) {
    if ($catid == 0) {
        if (!empty($setting['home_album'])) {
            $sql = "SELECT * FROM `" . NV_PREFIXLANG . "_" . $module_data . "_album` WHERE `albid` IN ( " . $setting['home_album'] . " )";
            $home_album = nv_db_cache($sql, 'home_album', $module_name);
            $contents = np_album_theme($home_album, '');
        }
    }
    $array_cat = array();
    $key = 0;
    foreach ($home_category as $_catid) {
        $func_who_view = $allcats[$_catid]['who_view'];
        $allowed = false;
        if ($func_who_view == 0) {
            $allowed = true;