Beispiel #1
0
    }
    nv_news_fix_block($bid);
    nv_del_moduleCache($module_name);
    Header('Location: ' . NV_BASE_ADMINURL . 'index.php?' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $op . '&bid=' . $bid);
    die;
}
$xtpl = new XTemplate('block.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('NV_OP_VARIABLE', NV_OP_VARIABLE);
$xtpl->assign('MODULE_NAME', $module_name);
$xtpl->assign('OP', $op);
$xtpl->assign('CHECKSESS', md5(session_id()));
$xtpl->assign('BLOCK_LIST', nv_show_block_list($bid));
$id_array = array();
$listid = $nv_Request->get_string('listid', 'get', '');
if ($listid == '') {
    $db->sqlreset()->select('id, ' . NV_LANG_DATA . '_title')->from($db_config['prefix'] . '_' . $module_data . '_rows')->where('inhome=1 AND id NOT IN(SELECT id FROM ' . $db_config['prefix'] . '_' . $module_data . '_block WHERE bid=' . $bid . ')')->order('id DESC')->limit(20);
    $sql = $db->sql();
} else {
    $id_array = array_map('intval', explode(',', $listid));
    $sql = 'SELECT id, ' . NV_LANG_DATA . '_title FROM ' . $db_config['prefix'] . '_' . $module_data . '_rows WHERE inhome=1 AND id IN (' . implode(',', $id_array) . ') ORDER BY id DESC';
}
$result = $db->query($sql);
if ($result->rowCount()) {
    $a = 0;
    while (list($id, $title) = $result->fetch(3)) {
        $xtpl->assign('ROW', array('id' => $id, 'checked' => in_array($id, $id_array) ? ' checked="checked"' : '', 'title' => $title));
        $xtpl->parse('main.loop');
Beispiel #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');
}
$bid = $nv_Request->get_int('bid', 'get', 0);
$contents = nv_show_block_list($bid);
include NV_ROOTDIR . "/includes/header.php";
echo $contents;
include NV_ROOTDIR . "/includes/footer.php";