<?php // +---------------------------------------------------------------------- // | Demila [ Beautiful Digital Content Trading System ] // +---------------------------------------------------------------------- // | Copyright (c) 2015 http://demila.org All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Email author@demila.org // +---------------------------------------------------------------------- if (!isset($_GET['type']) || !in_array($_GET['type'], array('other', 'buyers', 'authors', 'referrals', 'system'))) { refresh('?m=' . $_GET['m'] . '&c=badges&type=system', '', 'error'); } _setView(__FILE__); _setTitle($langArray['badges'] . ' › ' . ucfirst($_GET['type'])); $types = array('system', 'other', 'buyers', 'authors', 'referrals'); $tmp = array(); foreach ($types as $type) { $tmp[] = array('name' => ucfirst($type), 'href' => '?m=' . $_GET['m'] . '&c=badges&type=' . $type); } abr('types', $tmp); require_once ROOT_PATH . '/apps/system/models/badges.class.php'; $badges = new badges(); $data = $badges->getAll(START, LIMIT, "`type`='" . $_GET['type'] . "'"); abr('data', $data); $p = paging("?m=" . $_GET['m'] . "&c=badges&type=" . $_GET['type'] . "&p=", "", PAGE, LIMIT, $badges->foundRows); abr('paging', $p); require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';
$usersClass->editExclusiveAuthor('false', $_GET['id']); } elseif (isset($_POST['exclusive_true'])) { $usersClass = new users(); $usersClass->editExclusiveAuthor('true', $_GET['id']); } $_POST = $cms->get($_GET['id']); $badges = explode(',', $_POST['badges']); $_POST['badges'] = array(); foreach ($badges as $badge) { $_POST['badges'][] = $badge; } } $users = $cms->get($_GET['id']); $users['stats'] = $cms->getStatistic($_GET['id']); abr('user', $users); require_once ROOT_PATH . '/apps/' . $_GET['m'] . '/models/groups.class.php'; $g = new groups(); $groups = $g->getAll(); abr('groups', $groups); require_once ROOT_PATH . '/apps/system/models/badges.class.php'; $badges = new badges(); $badges_data = $badges->getAll(0, 0, "`type` = 'other'"); abr('badges', $badges_data); if (isset($_POST['badges'])) { if (!is_array($_POST['badges'])) { $_POST['badges'] = explode(',', $_POST['badges']); } } else { $_POST['badges'] = array(); } require_once ROOT_PATH . '/apps/lists/leftlist_admin.php';