$cat['cat_url'] = $action . "&parentid=" . $cat['catid']; $cat['edit_url'] = $action . "&catid=" . $cat['catid']; $cat['del_url'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=delete&type=cat&catid=" . $cat['catid']; $cat['addphoto_url'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=addphoto&type=category&typeid=" . $cat['catid']; $i % 2 == 0 ? $cat['class'] = 'class="second"' : ($cat['class'] = ''); $xtpl->assign('LISTCAT', $cat); $xtpl->parse('main.listcat.loop'); ++$i; } $xtpl->parse('main.listcat'); } if (!empty($array_cat_list)) { if (empty($alias)) { $xtpl->parse('main.content.getalias'); } foreach ($listcat as $data) { $xtpl->assign('listcat', $data); $xtpl->parse('main.content.listcat'); } } $hook .= custom_metatag($cats); $hook .= configdata($who_views, $groups_views, $cats['who_view']); $hook .= setAdmin($cats); $xtpl->assign('CAT', $cats); $xtpl->assign('HOOK', $hook); $xtpl->parse('main.content'); $xtpl->parse('main'); $contents .= $xtpl->text('main'); include NV_ROOTDIR . "/includes/header.php"; echo nv_admin_theme($contents); include NV_ROOTDIR . "/includes/footer.php";
$_ShowUserPic = FALSE; // Bid des users anzeigen if (file_exists("./include/Settings/multilogin.xml")) { $multilogin = simplexml_load_file("./include/Settings/multilogin.xml"); } else { create_mulitsettings(); $multilogin = simplexml_load_file("./include/Settings/multilogin.xml"); } setGuest(); // falls eingeloogt, dann User - Einstellungen laden if (isset($_SESSION['admin'])) { setUser(); } // admin-Pannel? (admin.php), dann Admin - Einstellungen laden if ($_logcheck->_admins && isset($_SESSION['admin'])) { setAdmin(); } function setGuest() { global $multilogin; global $_ShowUsername; global $_ShowUserOnline; global $_ShowUserLastTime; global $_ShowUserAllTime; global $_ShowUserPic; if ($multilogin->guest->ShowUsername == "true") { $_ShowUsername = TRUE; } else { $_ShowUsername = FALSE; } if ($multilogin->guest->ShowUserOnline == "true") {
die("Failed CSRF check. Cookies must be enabled for this site to work."); } if ($_POST['action'] == 'delete') { if ($_POST['username'] == $curusr) { die("You can't delete yourself! You can only delete other users."); } deleteUser($_POST['username']); } elseif ($_POST['action'] == 'promote') { setAdmin($_POST['username'], true); } elseif ($_POST['action'] == 'activate') { setActive($_POST['username'], true); } elseif ($_POST['action'] == 'demote') { if ($_POST['username'] == $curusr) { die("You can't demote yourself! You can only demote other admins."); } setAdmin($_POST['username'], false); } elseif ($_POST['action'] == 'newreset') { $reset = newReset($_POST['username']); echo '<h1>New reset code for ' . htmlspecialchars($_POST['username']) . ": {$reset}</h1>"; } } ?> <h1>User Management</h1> <form action="admin" method="post"> <p>Search: <input type="text" name="search" value=""></p> <input type="submit" value="Go"> <?php echo getCSRFinputcode(); ?> </form> <table>
$xtpl->assign('FORM_ACTION', $action); $xtpl->assign('NV_BASE_SITEURL', NV_BASE_SITEURL); $xtpl->assign('UPLOADS_DIR', NV_UPLOADS_DIR); $xtpl->assign('CURRENT_DIR', NV_UPLOADS_DIR . '/' . $module_name); if (!empty($allalbs)) { $i = 1; foreach ($allalbs as $albid => $alb) { $alb['edit_url'] = $action . "&albid=" . $alb['albid']; $alb['del_url'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=delete&type=alb&albid=" . $alb['albid']; $alb['addphoto_url'] = NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=addphoto&type=album&typeid=" . $alb['albid']; $i % 2 == 0 ? $alb['class'] = 'class="second"' : ($alb['class'] = ''); $xtpl->assign('LISTALB', $alb); $xtpl->parse('main.listalb.loop'); ++$i; } $xtpl->parse('main.listalb'); } if (empty($alias)) { $xtpl->parse('main.content.getalias'); } $hook .= custom_metatag($albs); $hook .= configdata($who_views, $groups_views, $albs['who_view']); $hook .= setAdmin($albs); $xtpl->assign('ALB', $albs); $xtpl->assign('HOOK', $hook); $xtpl->parse('main.content'); $xtpl->parse('main'); $contents .= $xtpl->text('main'); include NV_ROOTDIR . "/includes/header.php"; echo nv_admin_theme($contents); include NV_ROOTDIR . "/includes/footer.php";