Example #1
0
function list_options($array, $depth = 0)
{
    foreach ($array as $v) {
        ?>
                            <option value="<?php 
        echo $v['category_id'];
        ?>
" <?php 
        echo chkvar("page_category", $v['category_id']) ? 'selected' : (isset($content['content_category']) && $content['content_category'] == $v['category_id'] ? 'selected' : '');
        ?>
>
                                <?php 
        echo str_repeat("&nbsp;&nbsp;&nbsp;", $depth) . ($depth > 0 ? "&boxur;" : '') . " " . $v['category_title'];
        ?>
                            </option>
                            <?php 
        if (!empty($v['category_subcats'])) {
            $depth++;
            list_options($v['category_subcats'], $depth);
            $depth--;
        }
    }
}
Example #2
0
$out .= "<a href='multiscan.php'>Multi scan</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?ban=1'>Ban Player</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?update_scores=1'>Update Scores</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?more_money=1'>Give Money</a><p />";
$out .= "General:<br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?admin_name=1'>Change Admin Name</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?email=1'>Change Admin E-mail</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?descr=1'>Change Game Description</a><br />";
$out .= "<a href='{$_SERVER['PHP_SELF']}?messag=1'>Change Intro Message</a><br />";
$out .= "<a href='{$directories['includes']}/other_admin.php?admin_readme=1'>Admin Readme!</a><br />";
$out .= "<form action='{$_SERVER['PHP_SELF']}' name='get_var_form' method='post'>";
$out .= "<input type='hidden' name='save_vars' value='1' />";
$out .= "<input type='submit' value='Submit Vars' />";
$out .= "<p />Note: Only variables that are within range will be saved.";
//load the vars that are in the DB for this. File vars may be outdated.
load_admin_vars();
db2("select name, min, max, description from se_db_vars order by name");
$out .= list_options(1, $GAME_VARS);
$db_var = dbr(1);
while ($db_var) {
    if ($db_var['value'] < $db_var['min'] || $db_var['value'] > $db_var['max']) {
        //error checking
        $db_var['value'] = $db_var['default_value'];
    }
    $out .= "<p /><table border=2 cellspacing=1 width=350><tr bgcolor='#333333' width='350'><td width='250'><b><font color='#AAAAEE'>{$db_var['name']}</font></b> ( {$db_var['min']} .. {$db_var['max']} )</td><td align='right' width='100'><input type='text' name='{$db_var['name']}' value='{$db_var['value']}' size='8' /></td></tr><tr bgcolor='#555555' width='350'><td colspan='2' width='350'><blockquote>{$db_var['descript']} <p />Server Default: <b>{$db_var['default_value']}</b></blockquote></td></tr></table><br />";
    $db_var = dbr(1);
}
$out .= "<p /><input type='submit' value='Submit Vars' />";
$out .= "<br /></form>";
$rs = "<p /><a href='location.php'>Back to Star System</a>";
print_page("Admin", $out);
Example #3
0
} elseif (isset($_GET['keep'])) {
    $user_options['color_scheme'] = $_GET['keep'];
    dbn("update {$db_name}_user_options set color_scheme = '" . (int) $_GET['keep'] . "' where login_id = '{$user['login_id']}'");
    $error_str .= $st[974] . " <b>{$_GET['keep']}</b>.";
    $error_str .= "<br />" . $st[975];
    $rs .= "<br /><a href='options.php'>" . $cw['back_to_options'] . "</a>";
    print_page($st[976], $error_str);
    #keep new style sheet. for server
} elseif (isset($_GET['keep_server'])) {
    dbn("update user_accounts set default_color_scheme = '" . (int) $_GET['keep_server'] . "' where login_id = '{$user['login_id']}'");
    $error_str .= $st[977] . " <b>{$_GET['keep_server']}</b>.";
    $error_str .= "<br />" . $st[978];
    $rs .= "<br /><a href='options.php'>" . $cw['back_to_options'] . "</a>";
    print_page($st[976], $error_str);
}
#print main page
$error_str .= "<p />" . $st[979];
$error_str .= "<p /><a href='options.php?changepass=change'>" . $st[980] . "</a>";
//$error_str .= "<br /><a href='options.php?scheme=1'>Change your Colour Scheme</a>";
$error_str .= "<br /><a href='options.php?player_op=1'>" . $st[981];
if ($user['login_id'] != 1) {
    $error_str .= "<p /><a href='options.php?retire=1'>" . $st[982] . "</a>";
}
#list other options
$error_str .= "<p />" . $st[983] . ".<form method='POST' name='get_var_form' action='options.php'>";
$error_str .= "<br /><input type='submit' value=\"" . $cw['submit_vars'] . "\" />";
#select and output all the user options
db2("select * from option_list order by name asc");
$error_str .= list_options(1, $user_options);
$error_str .= "<br /><input type='hidden' name='save_vars' value='1' /><input type='submit' value=\"" . $cw['submit_vars'] . "\" /></form>";
print_page($st[984], $error_str);
Example #4
0
function drawAdminTools_MailingLists($domain)
{
    global $adm_login;
    global $adm_pass;
    global $edit_domain;
    global $edit_mailbox;
    global $addrlink;
    $txt = "";
    //	$nbr_email = sizeof($domain["emails"]);
    if (isset($domain["mailinglists"])) {
        $nbr_email = sizeof($domain["mailinglists"]);
    } else {
        $nbr_email = 0;
    }
    $max_email = $domain["max_lists"];
    if ($nbr_email >= $max_email) {
        $max_color = "color=\"#440000\"";
    }
    $nbrtxt = _("Number of active mailing lists");
    $txt .= "<font size=\"-2\">{$nbrtxt}</font> <font size=\"-1\">" . $nbr_email . "</font> / <font size=\"-1\">" . $max_email . "</font><br><br>";
    $txt .= "<font face=\"Arial, Verdana\"><font size=\"-1\"><h3>" . _("List of your mailing lists") . "</h3>";
    if (isset($domain["mailinglists"])) {
        $lists = $domain["mailinglists"];
    }
    $nbr_boites = 0;
    if (isset($lists)) {
        $nbr_boites = sizeof($lists);
    }
    for ($i = 0; $i < $nbr_boites; $i++) {
        $list = $lists[$i];
        $id = $list["id"];
        $list_name = $list["name"];
        $list_owner = $list["owner"];
        if ($i != 0) {
            $txt .= " - ";
        }
        if (isset($_REQUEST["edit_mailbox"]) && $_REQUEST["edit_mailbox"] == $list_name) {
            $txt .= "{$list_name}";
        } else {
            $txt .= "<a href=\"?adm_login={$adm_login}&adm_pass={$adm_pass}&addrlink={$addrlink}&edit_domain={$edit_domain}&whatdoiedit=mails&edit_mailbox={$list_name}&list_owner={$list_owner}\">{$list_name}</a>";
        }
    }
    if (isset($_REQUEST["edit_mailbox"]) && $_REQUEST["edit_mailbox"] != "") {
        $txt .= "<br><br><a href=\"?adm_login={$adm_login}&adm_pass={$adm_pass}&addrlink={$addrlink}&edit_domain={$edit_domain}&whatdoiedit=mails\">" . _("new mailing list") . "</a> ";
        $txt .= "<br><br><h3>" . _("Edit mailing list") . "</h3><br><br>";
        $list_name = $_REQUEST["edit_mailbox"];
        if (isset($_REQUEST["list_owner"])) {
            $list_owner = $_REQUEST["list_owner"];
        } else {
            if (isset($_REQUEST["editmail_owner"])) {
                $list_owner = $_REQUEST["editmail_owner"];
            }
        }
        $txt .= "\n<table border=\"1\"><tr><td align=\"right\">\n<form action=\"?\" method=\"post\">\n\t<input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n\t<input type=\"hidden\" name=\"adm_pass\" value=\"{$adm_pass}\">\n\t<input type=\"hidden\" name=\"addrlink\" value=\"{$addrlink}\">\n\t<input type=\"hidden\" name=\"edit_domain\" value=\"{$edit_domain}\">\n\t<input type=\"hidden\" name=\"whatdoiedit\" value=\"mails\">\n\t<input type=\"hidden\" name=\"edit_mailbox\" value=\"" . $_REQUEST["edit_mailbox"] . "\">\n\t<div onmouseover=\"return escape('" . _("Name of the list.") . "')\">" . _("List name:") . "</div></td>\n\t<td><b>{$list_name}</b>@{$edit_domain}</td></tr>\n\t<tr><td align=\"right\"><div onmouseover=\"return escape('" . _("This is the main owner of the list.") . "')\">" . _("List owner") . "</div></td>\n\t<td><input type=\"text\" name=\"editmail_owner\" value=\"{$list_owner}\"></td></tr>";
        $txt .= list_options();
        $txt .= "<tr><td>&nbsp;</td><td><input type=\"submit\" name=\"modifylistdata\" value=\"Ok\">&nbsp;\n<input type=\"submit\" name=\"dellist\" value=\"Del\">\n</td></tr>\n</table>\n</form>\n";
        $admin_path = getAdminPath($adm_login);
        $list_path = $admin_path . "/" . $edit_domain . "/lists/" . $edit_domain . "_" . $_REQUEST["edit_mailbox"];
        $txt .= subscribers_list($list_path);
    } else {
        $txt .= "<br><br>" . _("new mailing list");
        $txt .= "<br><br><h3>" . _("New mailing list:") . "</h3><br>";
        if ($nbr_email < $max_email) {
            $txt .= "\n<form action=\"" . $_SERVER["PHP_SELF"] . "\" method=\"post\">\n<table border=\"1\"><tr><td align=\"right\">\n\t<input type=\"hidden\" name=\"adm_login\" value=\"{$adm_login}\">\n\t<input type=\"hidden\" name=\"adm_pass\" value=\"{$adm_pass}\">\n\t<input type=\"hidden\" name=\"addrlink\" value=\"{$addrlink}\">\n\t<input type=\"hidden\" name=\"edit_domain\" value=\"{$edit_domain}\">\n\t<input type=\"hidden\" name=\"whatdoiedit\" value=\"mails\">\n\t<div onmouseover=\"return escape('" . _("List name") . "')\">" . _("List name:") . "</div></td>\n\t<td><input type=\"text\" name=\"newlist_name\" value=\"\"></td></tr>\n\t<tr><td align=\"right\"><div onmouseover=\"return escape('" . _("This is the main owner of the list.") . "')\">" . _("List owner:") . "</div></td>\n\t<td><input type=\"text\" name=\"newlist_owner\" value=\"\">";
            $txt .= "</td></tr>\n<tr><td>&nbsp;</td>\n<td><input type=\"submit\" name=\"addnewlisttodomain\" value=\"Ok\"></td>\n</tr>\n</table>\n</form>\n";
        } else {
            $txt .= _("Maximum number of lists reached") . "<br>";
        }
    }
    $txt .= "</b></font></font>";
    return $txt;
}
Example #5
0
//Connect to the database
db_connect();
/************
* Game Variable Listings
*************/
if (isset($_GET['list_vars'])) {
    $help_type = $cw['game_variables'];
    if (!isset($db_name)) {
        $out_str .= $st[811];
    } elseif ($GAME_VARS['admin_var_show'] == 0) {
        $out_str .= $st[812];
    } else {
        load_admin_vars();
        //this line required as list_options uses this for it's v listing.
        db2("select name, min, max, description from se_db_vars order by name");
        $out_str .= list_options(0, $GAME_VARS);
    }
    /************
    * Stories
    *************/
} elseif (isset($_GET['story'])) {
    $help_type = $cw['game_stories'];
    //load stories
    $results = load_xml("{$directories['includes']}/stories.xml");
    $header_str = "";
    $content_str = "";
    //list stories from arrray.
    foreach ($results['story'] as $key => $stories_array) {
        $header_str .= "\n<a href='#{$key}'>{$stories_array['title']}</a><br />";
        $content_str .= "\n<a name='{$key}'><center><b>{$stories_array['title']}</b></center></a><br>{$stories_array['content']} <p />" . $cw['written_by'] . " <b class=b1>{$stories_array['author']}</b><br />" . $cw['dated'] . " <b>{$stories_array['date']}</b><p /><a href='#top'>" . $cw['top'] . "</a>";
    }