示例#1
0
文件: cat.php 项目: lzhao18/nukeviet
$xtpl = new XTemplate('cat.tpl', NV_ROOTDIR . '/themes/' . $global_config['module_theme'] . '/modules/' . $module_file);
$xtpl->assign('LANG', $lang_module);
$xtpl->assign('GLANG', $lang_global);
$xtpl->assign('NV_BASE_ADMINURL', NV_BASE_ADMINURL);
$xtpl->assign('NV_NAME_VARIABLE', NV_NAME_VARIABLE);
$xtpl->assign('MODULE_NAME', $module_name);
$xtpl->assign('OP', $op);
$xtpl->assign('caption', $caption);
$xtpl->assign('catid', $catid);
$xtpl->assign('title', $title);
$xtpl->assign('titlesite', $titlesite);
$xtpl->assign('alias', $alias);
$xtpl->assign('parentid', $parentid);
$xtpl->assign('keywords', $keywords);
$xtpl->assign('description', nv_htmlspecialchars(nv_br2nl($description)));
$xtpl->assign('CAT_LIST', nv_show_cat_list($parentid));
$xtpl->assign('UPLOAD_CURRENT', NV_UPLOADS_DIR . '/' . $module_upload);
if (!empty($image) and file_exists(NV_UPLOADS_REAL_DIR . '/' . $module_upload . '/' . $image)) {
    $image = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_upload . '/' . $image;
}
$xtpl->assign('image', $image);
for ($i = 0; $i <= 2; $i++) {
    $data = array('value' => $i, 'selected' => $viewdescription == $i ? ' checked="checked"' : '', 'title' => $lang_module['viewdescription_' . $i]);
    $xtpl->assign('VIEWDESCRIPTION', $data);
    $xtpl->parse('main.content.viewdescription');
}
if ($catid > 0) {
    $sql = 'SELECT id FROM ' . NV_PREFIXLANG . '_' . $module_data . '_' . $catid . ' WHERE status=1 ORDER BY publtime DESC LIMIT 100';
    $result = $db->query($sql);
    $array_id = array();
    $array_id[] = $featured;
示例#2
0
<?php

/**
 * @Project NUKEVIET 3.x
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2012 VINADES.,JSC. All rights reserved
 * @Createdate 2-10-2010 18:49
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
if (!defined('NV_IS_AJAX')) {
    die('Wrong URL');
}
$parentid = $nv_Request->get_int('parentid', 'get', 0);
$contents = nv_show_cat_list($parentid);
include NV_ROOTDIR . "/includes/header.php";
echo $contents;
include NV_ROOTDIR . "/includes/footer.php";
示例#3
0
                    nv_fix_cat($parentid_old);
                    nv_insert_logs(NV_LANG_DATA, $module_name, 'log_edit_cat', "catid " . $catid, $admin_info['userid']);
                }
                nv_del_moduleCache($module_name);
                Header("Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $op . "");
                die;
            } else {
                $error = $lang_module['errorsave'];
            }
            $db->sql_freeresult();
        }
    }
}
global $array_cat, $numcat;
$contents = "<div id=\"module_show_list\">";
$contents .= nv_show_cat_list($array_cat, $numcat);
$contents .= "</div><br>\n";
$catid = isset($_GET['catid']) ? intval($_GET['catid']) : 0;
if ($catid > 0) {
    list($catid, $parentid, $title, $catimage, $alias, $description, $keywords) = $db->sql_fetchrow($db->sql_query("SELECT `catid`, `parentid`, `title`, `catimage`, `alias`, `description`, `keywords`  FROM `" . NV_PREFIXLANG . "_" . $module_data . "_cat` where `catid`=" . $catid . ""));
    $caption = $lang_module['edit_cat'];
    $description = nv_br2nl($description);
} else {
    $catimage = '';
    $caption = $lang_module['add_cat'];
    $parentid = 0;
}
$description = nv_htmlspecialchars($description);
if ($error != "") {
    $contents .= "<div class=\"quote\" style=\"width:780px;\">\n";
    $contents .= "<blockquote class=\"error\"><span>" . $error . "</span></blockquote>\n";
示例#4
0
<?php

/**
 * @Project NUKEVIET 3.0
 * @Author VINADES.,JSC (contact@vinades.vn)
 * @Copyright (C) 2010 VINADES.,JSC. All rights reserved
 * @Createdate 2-10-2010 18:49
 */
if (!defined('NV_IS_FILE_ADMIN')) {
    die('Stop!!!');
}
$contents = nv_show_cat_list();
include NV_ROOTDIR . "/includes/header.php";
echo $contents;
include NV_ROOTDIR . "/includes/footer.php";