} else { $func_who_view = $photo_data['who_view']; $allowed = false; if ($func_who_view == 0) { $allowed = true; } 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) {
* @Copyright (C) 2010 VINADES.,JSC. All rights reserved * @Createdate 3-6-2010 0:14 */ if (!defined('NV_IS_MOD_NPHOTO')) { die('Stop!!!'); } if (!defined('NV_IS_AJAX')) { die('Wrong URL'); } $contents = ""; $id = $nv_Request->get_int('id', 'get', 0); $checkss = $nv_Request->get_string('checkss', 'get', ''); $page = $nv_Request->get_int('page', 'get', 0); $cmable = $nv_Request->get_string('cmable', 'get', '0'); $level = $nv_Request->get_string('level', 'get', ''); $cmcount = $nv_Request->get_int('cmcount', 'get', 0); $action = $nv_Request->get_string('action', 'get', ''); $type = $nv_Request->get_string('type', 'get', ''); $is_theater = $nv_Request->get_int('is_theater', 'get', 0); if ($cmable and $id > 0 and $checkss == md5($id . session_id() . $global_config['sitekey'])) { if ($action == "showform") { $contents = np_show_comment_form($type, $id, $level, $cmcount, $cmable, $is_theater); } else { $comment_array = np_comment($type, $id, $cmable, $page); $is_theater == 1 ? $comment_array['ver'] = 1 : ($comment_array['ver'] = 0); $contents = comment_theme($type, $id, array('cmable' => $cmable, 'voteable' => 0), $comment_array); } } include NV_ROOTDIR . "/includes/header.php"; echo $contents; include NV_ROOTDIR . "/includes/footer.php";
} 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'], $allalbs[$albid]['groups_view'])) { $allowed = true; } if ($allowed) { $per_page = $setting['view_album_numphotos']; $sql = "SELECT SQL_CALC_FOUND_ROWS * FROM `" . NV_PREFIXLANG . "_" . $module_data . "_photos` " . $where . " LIMIT " . $limit; $query = $db->sql_query($sql); while ($photo = $db->sql_fetch_assoc($query)) { $list_photo[] = $photo; } $result_all = $db->sql_query("SELECT FOUND_ROWS()"); list($all_page) = $db->sql_fetchrow($result_all); $generate_page = nv_alias_page($page_title, $base_url, $all_page, $per_page, $page); // Get comment $feature = array('cmable' => $allalbs[$albid]['allowed_comm'], 'voteable' => $allalbs[$albid]['allowed_rating']); $comment_array = np_comment('album', $albid, $allalbs[$albid]['allowed_comm'], 0); $alb_comments = comment_theme('album', $albid, $feature, $comment_array); $contents = np_list_photo($list_photo, $generate_page, $alb_comments, $allalbs[$albid]); } else { $msg = no_permission($func_who_view); $contents = np_theme_message($msg); } } include NV_ROOTDIR . "/includes/header.php"; echo nv_site_theme($contents); include NV_ROOTDIR . "/includes/footer.php";