Exemplo n.º 1
0
function xml_userlist_get($allytag, $nick)
{
    if ($nick == "all") {
        $nick = "%";
    }
    $filter['username'] = '"$nick"';
    $filter['ally'] = '"$allytag"';
    $filter['checkallygalas'] = "true";
    #  return ":C:CC :C:C";
    return listUser($filter, 1, 1, 100);
}
Exemplo n.º 2
0
 function _Member_list()
 {
     $page = param_num("page", 1);
     $rows = 12;
     $filter = $_SESSION['memberfilter'];
     if (!$filter) {
         $filter['sort'] = "koords";
         $filter['order'] = "asc";
         $filter['page'] = 1;
         $_SESSION['memberfilter'] = $filter;
     }
     if ($_REQUEST['sort'] && $_REQUEST['order']) {
         $filter['sort'] = $_REQUEST['sort'];
         $filter['order'] = $_REQUEST['order'];
         $_SESSION['memberfilter'] = $filter;
     }
     if ($_POST['send']) {
         if ($_POST['ally'] && is_numeric($_POST['ally']) && getAlly($_POST['ally'])) {
             $filter['ally'] = $_POST['ally'];
         } else {
             unset($filter['ally']);
         }
         $_SESSION['memberfilter'] = $filter;
     }
     $sort[$filter['sort']][$filter['order']] = '_active';
     $allylist = getAllyList();
     if ($filter['ally']) {
         for ($i = 0; $i < count($allylist); $i++) {
             if ($allylist[$i]['aid'] == $filter['ally']) {
                 $allylist[$i]['selected'] = "selected";
                 break;
             }
         }
     } else {
         $this->template->assign("ally0", "selected");
     }
     $userlist = listUser($filter, &$pages, &$page, $rows);
     $this->template->assign("pages", showPageBar($page, $pages, "index.php?action=members", "page", "menu"));
     $setback = "index.php?action=members&page=" . $page . "&" . $this->session['link'];
     $_SESSION['setback'] = $setback;
     $this->template->assign("sort", $sort);
     $this->template->assign('userlist', $userlist);
     $this->template->assign('allylist', $allylist);
     $this->show('member_list', 'Memberliste');
 }
Exemplo n.º 3
0
 /**
    \brief Zeigt Userstatistiken
 
    zeigt Statistiken zu den Usern an
 */
 function User_Stats()
 {
     if (!$this->_checkUserRights(array("admin"))) {
         $this->_header("index.php");
     }
     $userstatsfilter = $_SESSION['userstatsfilter'];
     $page = param_num("page", 1);
     $rows = 12;
     if ($_REQUEST['sort'] && $_REQUEST['order'] && $userstatsfilter) {
         $sort = trim($_REQUEST['sort']);
         $order = trim($_REQUEST['order']);
         if ($sort != 'username' && $sort != 'koords' && $sort != 'login') {
             $sort = 'username';
         }
         if ($order != "asc" && $order != "desc") {
             $order = "asc";
         }
         $userstatsfilter['sort'] = $sort;
         $userstatsfilter['order'] = $order;
         $_SESSION['userstatsfilter'] = $userstatsfilter;
     }
     if (!$userstatsfilter) {
         $userstatsfilter['sort'] = 'koords';
         $userstatsfilter['order'] = 'asc';
         $_SESSION['userstatsfilter'] = $userstatsfilter;
     }
     $this->forms['userlist'][$userstatsfilter['sort']][$userstatsfilter['order']] = '_active';
     $userlist = listUser($userstatsfilter, &$pages, &$page, $rows);
     for ($i = 0; $i < count($userlist); $i++) {
         if ($userlist[$i]['loggedin']) {
             $item =& $userlist[$i];
             preg_match("/^(\\d{4})-(\\d{2})-(\\d{2})\\s(\\d{2}):(\\d{2}):(\\d{2})/s", $item['loggedin'], $result);
             $item['date'] = $result[3] . "." . $result[2] . "." . $result[1];
             $item['time'] = $result[4] . ":" . $result[5];
         }
     }
     $this->forms['userlist']['pages'] = showPageBar($page, $pages, "admin.php?action=userstats", "page", "menu");
     $this->template->assign('userlist', $userlist);
     $this->show('user_stats', 'Benutzerstatistik');
 }
Exemplo n.º 4
0
function process_get()
{
    global $page;
    global $MySelf;
    $ajax = 0;
    switch ($_GET['action']) {
        // Maintenance!
        case "maintenance":
            $page = maintenance();
            break;
            // a specific run is requested.
        // a specific run is requested.
        case "show":
            $page = listRun();
            $ajax = 20;
            break;
            // a profile is requested.
        // a profile is requested.
        case "profile":
            $page = profile();
            break;
            // a profile change is requested.
        // a profile change is requested.
        case "modprofile":
            $page = modProfile();
            break;
            // Admin request to delete an api key (NOT user deleting own!)
        // Admin request to delete an api key (NOT user deleting own!)
        case "delapi":
            $page = deleteAPIKey();
            break;
            // Quick toggle of login capabilities.
        // Quick toggle of login capabilities.
        case "toggleLogin":
            $page = toggleLogin();
            break;
            // Quick confirm an account.
        // Quick confirm an account.
        case "quickconfirm":
            $page = quickConfirm();
            break;
            // Change of eMail requested
        // Change of eMail requested
        case "changeemail":
            $page = makeEmailChangeForm();
            break;
            // Show corp hierarchy
        // Show corp hierarchy
        case "hierarchy":
            $page = showHierarchy();
            break;
            // Browser solar Systems
        // Browser solar Systems
        case "browse":
            $page = browser();
            break;
            // User wants to delete a run.
        // User wants to delete a run.
        case "deleterun":
            deleteRun();
            break;
            // User wants to see the preferences page.
        // User wants to see the preferences page.
        case "preferences":
            $page = makePreferences();
            break;
            // A banker wants to see the transaction log for a user.
        // A banker wants to see the transaction log for a user.
        case "showTransactions":
            $page = showTransactions();
            break;
            // User wants to manage his cans.
        // User wants to manage his cans.
        case "cans":
            $page = makeCanPage();
            break;
            // Print out fancy global statistics
        // Print out fancy global statistics
        case "globstats":
            $page = globalStatistics();
            break;
            // User wants to re-validate his email.
        // User wants to re-validate his email.
        case "revalidate":
            validate();
            break;
            // User wants to pop a can.
        // User wants to pop a can.
        case "popcan":
            $page = popCan();
            break;
            // Kick a user.
        // Kick a user.
        case "kickban":
            $page = kick();
            break;
            // User wants to toggle the empty/full setting of a can.
        // User wants to toggle the empty/full setting of a can.
        case "togglecan":
            $page = toggleCan();
            break;
            // close a run.
        // close a run.
        case "endrun":
            endrun();
            break;
            // Show ore values
        // Show ore values
        case "showorevalue":
            $page = showOreValue();
            break;
            // Show ship values
        // Show ship values
        case "showshipvalue":
            $page = showShipValue();
            break;
            // Show Corp Hierarchy
        // Show Corp Hierarchy
        case "hier":
            $page = showHierarchy();
            break;
            // manage payouts
        // manage payouts
        case "payout":
            $page = payout();
            break;
            // set/view the online time
        // set/view the online time
        case "onlinetime":
            $page = onlineTime();
            break;
            // Mods a template
        // Mods a template
        case "edittemplate":
            $page = editTemplate();
            break;
            // Some Admin wants to change the ore values.
        // Some Admin wants to change the ore values.
        case "changeow":
            $page = makeOreWorth();
            break;
            // Some Admin wants to change the ore values.
        // Some Admin wants to change the ore values.
        case "changesv":
            $page = makeShipValue();
            break;
            // Password change request. We wont touch that.
        // Password change request. We wont touch that.
        case "changepw":
            $page = makePWChangeForm();
            break;
            // User wants to join the selected run.
        // User wants to join the selected run.
        case "joinrun":
            $page = joinRun();
            break;
            // User wants to part the selected run.
        // User wants to part the selected run.
        case "partrun":
            $page = leaveRun();
            break;
            // Password change request. We wont touch that.
        // Password change request. We wont touch that.
        case "lostpass":
            $page = makeLostPassForm();
            break;
            // Lotto: Create group
        // Lotto: Create group
        case "lotto_createGroup":
            $page = lotto_createGroup();
            break;
            // add ore from a haul to an open run.
        // add ore from a haul to an open run.
        case "addhaul":
            $page = addHaulPage();
            break;
            // Edit site configuration
        // Edit site configuration
        case "configuration":
            $page = configuration();
            break;
            // Add an event.
        // Add an event.
        case "addevent":
            $page = addEvent();
            break;
            // Show all events.
        // Show all events.
        case "showevents":
            $page = showEvents();
            break;
            // Join an Event
        // Join an Event
        case "joinevent":
            $page = joinEvent();
            break;
            // Show an event.
        // Show an event.
        case "showevent":
            $page = showEvent();
            break;
            // lists all ore runs.
        // lists all ore runs.
        case "list":
            $page = listRuns();
            $ajax = 60;
            break;
            // Manage wallet
        // Manage wallet
        case "manageWallet":
            $page = manageWallet();
            break;
            // Show current ranks
        // Show current ranks
        case "showranks":
            $page = showRanks();
            break;
            // delete a rank
        // delete a rank
        case "deleterank":
            $page = delRank();
            break;
            // delete an event from the database.
        // delete an event from the database.
        case "deleteevent":
            $page = deleteEvent();
            break;
            // lists all users.
        // lists all users.
        case "editusers":
            $page = listUsers();
            break;
            // lists one user.
        // lists one user.
        case "edituser":
            $page = listUser();
            break;
            // prints the form for a new run.
        // prints the form for a new run.
        case "newrun":
            $page = makeNewOreRunPage();
            break;
            // add a new user.
        // add a new user.
        case "newuser":
            $page = makeAddUserForm();
            break;
            // Toggle the charity flag.
        // Toggle the charity flag.
        case "toggleCharity":
            toggleCharity();
            break;
            /* Locking unlocking */
        /* Locking unlocking */
        case "lockrun":
            toggleLock();
            break;
            // prints the main welcome page.
        // prints the main welcome page.
        default:
            $page = makeWelcome();
            break;
            /* LOTTO STUFF */
        /* LOTTO STUFF */
        case "editLotto":
            $page = lotto_editLottery();
            break;
        case "lotto":
            $page = lotto_playLotto();
            break;
        case "claimTicket":
            lotto_claimTicket();
            break;
        case "drawLotto":
            lotto_draw();
            break;
        case "buycredits":
            $page = lotto_buyTickets();
            break;
        case "style":
            $page = style();
            break;
        case "getItemList":
            $page = getItemList();
            break;
        case "switch":
            $MySelf = null;
            $_SESSION['MySelf'] = null;
            unset($_SERVER[QUERY_STRING]);
            makeLoginPage($SUPPLIED_USERNAME);
            break;
    }
    if ($ajax > 1) {
        $ajaxHtml = "<script>window.setTimeout(function(){\$.ajax({";
        if (isset($_REQUEST['ajax'])) {
            $ajaxHtml .= "url: '?" . $_SERVER['QUERY_STRING'] . "',";
        } else {
            $ajaxHtml .= "url: '?" . $_SERVER['QUERY_STRING'] . "&ajax',";
        }
        $ajaxHtml .= "success: function(data) {\$('#content').html(data);}";
        $ajaxHtml .= "});},(" . $ajax * 1000 . "));</script>";
        $page .= $ajaxHtml;
    }
    if (isset($_REQUEST['ajax'])) {
        $html = new html();
        $page = $html->clean($page);
        print $page;
    } else {
        // Clean & Print the page.
        $html = new html();
        $html->addBody($page);
        print $html->flush();
    }
}
Exemplo n.º 5
0
     $reponse = getConfig();
 } else {
     if ($action == 'validEditConf') {
         $reponse = validEditConf();
     } else {
         if ($action == 'validConfAccueil') {
             $reponse = validConfAccueil();
         } else {
             if ($action == 'getComm') {
                 $reponse = getComm();
             } else {
                 if ($action == 'supprComm') {
                     $reponse = supprComm();
                 } else {
                     if ($action == 'listUser') {
                         $reponse = listUser();
                     } else {
                         if ($action == 'ajoutUser') {
                             $reponse = ajoutUser();
                         } else {
                             if ($action == 'supprUser') {
                                 $reponse = supprUser();
                             } else {
                                 if ($action == 'editUser') {
                                     $reponse = editUser();
                                 } else {
                                     if ($action == 'listeTemplates') {
                                         $reponse = listeTemplates();
                                     } else {
                                         if ($action == 'validConfTemplate') {
                                             $reponse = validConfTemplate();
Exemplo n.º 6
0
 function Fleets_list()
 {
     $filter = $_SESSION['userfleetfilter'];
     #filter setzen
     if (!$filter) {
         $galalist = getGalaListbyAlly($this->userdata['aid']);
         if (count($galalist)) {
             $filter['gala'] = $galalist[0]['gala'];
         }
     }
     $filter['ally'] = $this->userdata['aid'];
     $filter['order'] = "asc";
     $filter['sort'] = "koords";
     #filter neu setzen
     if ($_POST['subaction'] == "filter") {
         $gala = param_num("galaxy");
     } else {
         $gala = $filter['gala'];
     }
     $ally = $filter['ally'];
     $galalist = getGalaListbyAlly($ally);
     if (count($galalist)) {
         if ($gala) {
             for ($i = 0; $i < count($galalist); $i++) {
                 if ($galalist[$i]['gala'] == $gala) {
                     $filter['gala'] = $gala;
                     $galalist[$i]['selected'] = "selected";
                     break;
                 }
             }
         } else {
             $gala = $galalist[0]['gala'];
             $filter['gala'] = $gala;
         }
     } else {
         unset($filter['gala']);
     }
     if ($_POST['subaction'] == "filter") {
         $_SESSION['userfleetfilter'] = $filter;
     }
     if ($gala) {
         $list = listUser($filter, &$pages, 1, 12);
         for ($i = 0; $i < count($list); $i++) {
             $list[$i]['fleets'] = user_fleet_list_byuser($list[$i]['uid']);
             $gesamt = array();
             $gesamt['dir'] = "Gesamt";
             $gesamt['name'] = "Gesamt";
             $gesamt['class'] = "bold";
             $list[$i]['fleets'][0]['name'] = "Orbit";
             $list[$i]['fleets'][1]['name'] = "Flotte 1";
             $list[$i]['fleets'][2]['name'] = "Flotte 2";
             for ($j = 0; $j < count($list[$i]['fleets']); $j++) {
                 $fleet =& $list[$i]['fleets'][$j];
                 if ($fleet['return_flight']) {
                     $fleet['dir'] = "Rückflug";
                     $fleet['class'] = "blue";
                 } else {
                     if ($fleet['status'] == 1) {
                         $fleet['dir'] = "Angriff";
                         $fleet['class'] = "red";
                     } elseif ($fleet['status'] == 2) {
                         $fleet['dir'] = "Verteidigung";
                         $fleet['class'] = "green";
                     } else {
                         $fleet['dir'] = "Im Orbit";
                     }
                 }
                 if ($fleet['tgala']) {
                     $fleet['dir'] .= " (" . $fleet['tgala'] . ":" . $fleet['tpos'] . ")";
                 }
                 $fleet['irc'] = generate_irc_user_fleet($j, $fleet, $list[$i]);
                 $gesamt['cancris'] += $fleet['cancris'];
                 $gesamt['kleptoren'] += $fleet['kleptoren'];
                 $gesamt['fregatten'] += $fleet['fregatten'];
                 $gesamt['zerstoerer'] += $fleet['zerstoerer'];
                 $gesamt['bomber'] += $fleet['bomber'];
                 $gesamt['jaeger'] += $fleet['jaeger'];
                 $gesamt['schlachter'] += $fleet['schlachter'];
                 $gesamt['traeger'] += $fleet['traeger'];
                 $gesamt['kreuzer'] += $fleet['kreuzer'];
             }
             $gesamt['irc'] = generate_irc_user_fleet(3, $gesamt, $list[$i]);
             $list[$i]['fleets'][3] = $gesamt;
             if ($list[$i]['fleetupdate']) {
                 $list[$i]['fleetdate'] = formatdate_unix("d.m.Y", $list[$i]['fleetupdate']);
                 $list[$i]['fleettime'] = date("H:i", $list[$i]['fleetupdate']);
             }
         }
         $this->template->assign('list', $list);
     }
     $this->template->assign("ally", getAlly($this->userdata['aid']));
     $this->template->assign('galalist', $galalist);
     $this->show('userfleets_index', "Flottenpflege");
 }