* @Copyright (C) 2014 VINADES. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-9-2010 14:43 */ if (!defined('NV_IS_FILE_ADMIN')) { die('Stop!!!'); } $mark = $nv_Request->get_title('mark', 'post', ''); if (!empty($mark) and ($mark == 'read' or $mark == 'unread')) { $mark = $mark == 'read' ? 1 : 0; $sends = $nv_Request->get_array('sends', 'post', array()); if (empty($sends)) { die(json_encode(array('status' => 'error', 'mess' => $lang_module['please_choose']))); } foreach ($sends as $id) { nv_status_notification(NV_LANG_DATA, $module_name, 'contact_new', $id, $mark); } $sends = implode(',', $sends); $db->query('UPDATE ' . NV_PREFIXLANG . '_' . $module_data . '_send SET is_read=' . $mark . ' WHERE id IN (' . $sends . ')'); die(json_encode(array('status' => 'ok', 'mess' => ''))); } $page_title = $module_info['custom_title']; $xtpl = new XTemplate('main.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file); $xtpl->assign('LANG', $lang_module); $xtpl->assign('GLANG', $lang_global); $contact_allowed = nv_getAllowed(); if (!empty($contact_allowed['view'])) { $in = implode(',', array_keys($contact_allowed['view'])); $page = $nv_Request->get_int('page', 'get', 1); $per_page = 30; $base_url = NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name;
$rowcontent = array_merge($rowcontent, $body_contents); unset($body_contents); $_query = $db->query('SELECT tid, keyword FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tags_id WHERE id=' . $rowcontent['id'] . ' ORDER BY keyword ASC'); while ($row = $_query->fetch()) { $array_keywords_old[$row['tid']] = $row['keyword']; } $rowcontent['keywords'] = implode(', ', $array_keywords_old); $rowcontent['keywords_old'] = $rowcontent['keywords']; $id_block_content = array(); $sql = 'SELECT bid FROM ' . NV_PREFIXLANG . '_' . $module_data . '_block where id=' . $rowcontent['id']; $result = $db->query($sql); while (list($bid_i) = $result->fetch(3)) { $id_block_content[] = $bid_i; } if (empty($rowcontent['status'])) { nv_status_notification(NV_LANG_DATA, $module_name, 'post_queue', $rowcontent['id']); } if (!empty($rowcontent['homeimgfile']) and file_exists(NV_UPLOADS_REAL_DIR)) { $currentpath = NV_UPLOADS_DIR . '/' . $module_upload . '/' . dirname($rowcontent['homeimgfile']); } } $array_cat_add_content = $array_cat_pub_content = $array_cat_edit_content = $array_censor_content = array(); foreach ($global_array_cat as $catid_i => $array_value) { $check_add_content = $check_pub_content = $check_edit_content = $check_censor_content = false; if (defined('NV_IS_ADMIN_MODULE')) { $check_add_content = $check_pub_content = $check_edit_content = $check_censor_content = true; } elseif (isset($array_cat_admin[$admin_id][$catid_i])) { if ($array_cat_admin[$admin_id][$catid_i]['admin'] == 1) { $check_add_content = $check_pub_content = $check_edit_content = $check_censor_content = true; } else { if ($array_cat_admin[$admin_id][$catid_i]['add_content'] == 1) {
$file = NV_UPLOADS_DIR . $file; if (file_exists(NV_ROOTDIR . '/' . $file)) { @nv_deletefile(NV_ROOTDIR . '/' . $file); } } } if (!empty($fileimage)) { $fileimage = NV_UPLOADS_DIR . $fileimage; if (file_exists(NV_ROOTDIR . '/' . $fileimage)) { @nv_deletefile(NV_ROOTDIR . '/' . $fileimage); } } } $result = $db->query('SELECT id FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tmp'); while (list($_id) = $result->fetch(3)) { nv_status_notification(NV_LANG_DATA, $module_name, 'upload_new', $_id); } $db->query('TRUNCATE TABLE ' . NV_PREFIXLANG . '_' . $module_data . '_tmp'); die('OK'); } //List files $page_title = $lang_module['download_filequeue']; $sql = 'FROM ' . NV_PREFIXLANG . '_' . $module_data . '_tmp'; $sql1 = 'SELECT COUNT(*) ' . $sql; $result1 = $db->query($sql1); $all_file = $result1->fetchColumn(); if (!$all_file) { $contents = "<div style=\"padding-top:15px;text-align:center\">\n"; $contents .= "<strong>" . $lang_module['filequeue_empty'] . "</strong>"; $contents .= "</div>\n"; $contents .= "<meta http-equiv=\"refresh\" content=\"2;url=" . NV_BASE_ADMINURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "\" />";
} $id = $nv_Request->get_int('id', 'post', 0); $query = 'SELECT COUNT(*) FROM ' . NV_MOD_TABLE . '_report WHERE fid=' . $id; $numrows = $db->query($query)->fetchColumn(); if ($numrows != 1) { die('NO'); } $db->query('DELETE FROM ' . NV_MOD_TABLE . '_report WHERE fid=' . $id); nv_status_notification(NV_LANG_DATA, $module_name, 'report', $id); die('OK'); } //All del if ($nv_Request->isset_request('alldel', 'post')) { $query = $db->query('SELECT fid FROM ' . NV_MOD_TABLE . '_report'); while (list($fid) = $query->fetch(3)) { nv_status_notification(NV_LANG_DATA, $module_name, 'report', $fid); } $db->query('DELETE FROM ' . NV_MOD_TABLE . '_report'); die('OK'); } //List $page_title = $lang_module['download_report']; $sql = 'SELECT a.post_time AS post_time, a.post_ip AS post_ip, b.id AS id, b.title AS title, b.catid AS catid FROM ' . NV_MOD_TABLE . '_report a INNER JOIN ' . NV_MOD_TABLE . ' b ON a.fid=b.id ORDER BY a.post_time DESC'; $_array_report = $db->query($sql)->fetchAll(); $num = sizeof($_array_report); if (!$num) { $contents = "<div style=\"padding-top:15px;text-align:center\">\n"; $contents .= "<strong>" . $lang_module['report_empty'] . "</strong>"; $contents .= "</div>\n"; $contents .= "<meta http-equiv=\"refresh\" content=\"2;url=" . NV_BASE_ADMINURL . "index.php?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "\" />"; include NV_ROOTDIR . '/includes/header.php';
$contact_allowed = nv_getAllowed(); if (!isset($contact_allowed['view'][$row['cid']])) { Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name); die; } $is_read = intval($row['is_read']); $mark = $nv_Request->get_title('mark', 'post', ''); if ($mark == 'unread') { if ($is_read) { $db->query('UPDATE ' . NV_PREFIXLANG . '_' . $module_data . '_send SET is_read=0 WHERE id=' . $id); nv_status_notification(NV_LANG_DATA, $module_name, 'contact_new', $id, 0); } die(json_encode(array('status' => 'ok', 'mess' => NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name))); } if (!$is_read) { nv_status_notification(NV_LANG_DATA, $module_name, 'contact_new', $row['id']); $db->query('UPDATE ' . NV_PREFIXLANG . '_' . $module_data . '_send SET is_read=1 WHERE id=' . $id); $is_read = 1; } $page_title = $module_info['custom_title']; $xtpl = new XTemplate('view.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file); $xtpl->assign('LANG', $lang_module); $xtpl->assign('GLANG', $lang_global); $sender_name = $row['sender_name']; $sender_id = intval($row['sender_id']); if ($sender_id) { $sender_name = '<a href="' . NV_BASE_ADMINURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=users&' . NV_OP_VARIABLE . '=edit&userid=' . $sender_id . '">' . $sender_name . '</a>'; } $row['send_name'] = $sender_name; $row['time'] = nv_date('H:i d/m/Y', $row['send_time']); $part_row_title = $contact_allowed['view'][$row['cid']];
* @Copyright (C) 2014 VINADES.,JSC. All rights reserved * @License GNU/GPL version 2 or any later version * @Createdate 2-10-2010 18:49 */ if (!defined('NV_IS_FILE_ADMIN')) { die('Stop!!!'); } $cid = $nv_Request->get_int('cid', 'post', 0); $sql = 'SELECT id, module FROM ' . NV_PREFIXLANG . '_' . $module_data . ' WHERE cid=' . $cid; $row = $db->query($sql)->fetch(); if (empty($row)) { die('NO_' . $cid); } $new_status = $nv_Request->get_bool('new_status', 'post'); $new_status = (int) $new_status; $sql = 'UPDATE ' . NV_PREFIXLANG . '_' . $module_data . ' SET status=' . $new_status . ' WHERE cid=' . $cid; $db->query($sql); if (isset($site_mod_comm[$row['module']])) { $mod_info = $site_mod_comm[$row['module']]; if (file_exists(NV_ROOTDIR . '/modules/' . $mod_info['module_file'] . '/comment.php')) { include NV_ROOTDIR . '/modules/' . $mod_info['module_file'] . '/comment.php'; $nv_Cache->delMod($row['module']); } } if ($new_status) { nv_status_notification(NV_LANG_DATA, $module_name, 'comment_queue', $cid); } $nv_Cache->delMod($module_name); include NV_ROOTDIR . '/includes/header.php'; echo 'OK_' . $cid; include NV_ROOTDIR . '/includes/footer.php';