* @Project NUKEVIET 3.0 * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2010 VINADES.,JSC. All rights reserved * @Createdate 7-17-2010 14:43 */ if (!defined('NV_IS_ALBUMS_ADMIN')) { die('Stop!!!'); } $page_title = $lang_module['main']; $xtpl = new XTemplate("main.tpl", NV_ROOTDIR . "/themes/" . $global_config['module_theme'] . "/modules/" . $module_name); $xtpl->assign('LANG', $lang_module); $xtpl->assign('LINK_ADD', "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=add_ab"); $xtpl->assign('URL_DEL_BACK', "index.php?" . NV_NAME_VARIABLE . "=" . $module_name); $xtpl->assign('URL_DEL', "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=del_lalbums"); $abd = new albumdb(); $result = $abd->getAllAlbumOBW(); $num = $db->sql_numrows($result); $link_del_one = "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=del_albums"; $link_edit = "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=add_ab"; $link_active = "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=active&id="; $link_album = "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=listimg&idb="; $link_hot = "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=hot&id="; $link_map = "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=map&id="; $i = 0; while ($rs = $db->sql_fetchrow($result)) { $xtpl->assign('id', $rs['albumid']); $xtpl->assign('name', $rs['name']); $class = $i % 2 ? " class=\"second\"" : ""; $xtpl->assign('class', $class); $xtpl->assign('URL_DEL_ONE', $link_del_one . "&id=" . $rs['albumid']); $xtpl->assign('URL_EDIT', $link_edit . "&id=" . $rs['albumid']);
<?php /** * @Project NUKEVIET 3.0 * @Author VINADES.,JSC (contact@vinades.vn) * @Copyright (C) 2010 VINADES.,JSC. All rights reserved * @Createdate 2-9-2010 14:43 */ if (!defined('NV_IS_ALBUMS_ADMIN')) { die('Stop!!!'); } $result = false; $id = $nv_Request->get_int('id', 'post,get'); $adb = new albumdb(); if ($id > 0) { $result = $adb->deleteAlbumByID($id); $result = $adb->deletePicturesByAlbumID($id); } $num = $db->sql_numrows($adb->getAllalbums()); $albs = $adb->getAllAlbumOBW(); $i = 1; while ($ab = $db->sql_fetchrow($albs)) { $adb->changeABWeightByID($ab['albumid'], $i); $i++; } if ($result) { echo $lang_module['delalbum_success']; } else { echo $lang_module['delalbum_error']; }