예제 #1
0
 public function invoke($action, $args)
 {
     if (defined('IS_PROFILING')) {
         \App::profiler()->log('Invoking controller');
     }
     // Begin the document, and assign it as the response document
     $this->document = Document::begin(Document::DT_HTML5, 'en-us', 'UTF-8');
     $this->response->setDocument($this->document);
     $this->setup();
     $handler = [$this, $action . 'Action'];
     if (is_callable($handler)) {
         call_user_func_array($handler, $args);
         $this->response->output();
     } else {
         $this->show_404();
     }
     //$this->indexAction($doc);
     // Output the document
 }
예제 #2
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("delete user", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        if (!isset($delete)) {
            $result = mysql_query("SELECT * FROM passwd");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"deleteuser.php?delete=2&user=%s\">%s</a><br>\n", $currow["username"], $currow["username"]);
            }
        } else {
            if ($delete == 2) {
                print <<<end
Are you sure you want to delete {$user}?<br><br>
<a href="deleteuser.php?delete=3&user={$user}">Confirm deletion</a>
end;
            } else {
                if ($delete == 3) {
                    mysql_query("DELETE FROM passwd WHERE username = '******'");
                    print <<<end
User deleted.
end;
                }
            }
        }
    } else {
        print <<<end
예제 #3
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("installation");
print <<<end
<b>windows</b><br><br>
The windows installer is a self-extracting executable. Click on link to
download the installer. Either open it from its current location or save
to disk and double click on the saved file in the explorer. Then follow
the installer wizard's steps to complete the installation. You can double
click the installed desktop icon to start BZFlag.<br><br>

To remove BZFlag, start the Add/Remove programs control panel, select
`BZFlag' and press the `Uninstall' button. An uninstaller dialog appears
and finishes it's job very quickly. Click the `OK' button. At this point,
all the files have been removed except two: the uninstaller itself
(bzfuinst.exe) and a file named bzflag.bzc. You can safely delete the
former. If you're going to install a new version of BZFlag, you probably
want to keep the latter file, which stores your configuration settings.
Otherwise, remove it and the directory it was in.<br><br>

<b>linux</b><br><br>
The Linux install can use either RPM or DEB formats. To install, use
rpm or apt, repectively. Its possible that the following symbolic links
may need to be made to get BZFlag to install properly over Mesa:<br>
\$ ln -s libMesaGL.so.3 /usr/lib/libGL.so.1<br>
\$ ln -s libMesaGLU.so.3 /usr/lib/libGLU.so.1<br>
Also, rpm may require the --nodeps option for some systems (to get
around broken dependencies). However, Mesa is absolutely required for DRI
systems.<br><br>
예제 #4
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("download");
print <<<end
The newest downloads are available on the SourceForge
<a href="http://www.sourceforge.net/projects/bzflag">download page</a>
or from the
<a href="http://download.sourceforge.net/bzflag/">downloads directory</a>.<br><br>

For those of you who like to be on the bleeding edge, you can download
the <a href="http://sourceforge.net/cvs/?group_id=3248">CVS sources</a>
and compile it yourself. There are also
<a href="/developers/compiling.php">compiling instructions</a>
available for various platforms.<br><br>

<b>BZFlag system requirements:</b><br><br>
BZFlag supports the following operating systems:<br>
<ul>
<li>Windows 95 or newer</li>
<li>Linux 2.1 or newer</li>
<li>Mac OS X</li>
<li>Solaris (all versions)</li>
<li>Irix 5.3 or newer</li>
<li>FreeBSD (in ports)</li>
</ul>
BZFlag requires at least 4MB of disk space and 16MB of RAM. A working internet
connection is also required to play.<br><br>
These are also highly recommended:<br>
<ul>
예제 #5
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("frequently asked questions");
print <<<end
These are some questions that just don't fit anywhere else.<br><br>
<b>What is OpenGL?</b><br>
OpenGL is a portable graphics library. Its an open standard, which means that
no single company controls it and improvements are agreed upon by all. Its one
of the reasons BZFlag works on so many different platforms.<br><br>

<b>What does "Oscillation Overthruster" mean?</b><br>
The term comes from the movie "The Adventures of Buckaroo Banzai: Across the Eighth
Dimension." In it our hero B.B. and his team of scientists invent the "oscillation
overthruster," a device which allows matter to move effortlessly through other matter.
B.B. demonstrates by driving his rocket car through a mountain. (The special effects
used for the inside of the mountain are a lot cooler than the floating triangles
inside buildings in BZFlag).<br><br>

<b>What's with the latitude and longitude command line options?</b><br>
You can tell BZFlag the latitude and longitude of the host you're using and it'll
calculate the sun position based on them. For example, if you used a latitude of 90
and any longitude, you'd be at the north pole; the sun would never come up in the winter
and never set in the summer. The sun, moon, and star positions are based on the latitude,
longitude, time of day, and time of year and should be fairly accurate. The phase of the
moon is also accurately computed. This feature is more of a curiosity than something useful.<br><br>

<b>How come i hear distant explosions well after i see the explosion?</b><br>
BZFlag's audio attempts to mimic reality. While a jumping tank might not be realistic
sound does in fact travel slower than light. This is the same effect as when watching fireworks.
예제 #6
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("troubleshooting");
print <<<end
This is a list of common problems and their solutions. If your
problem isn't listed here, check the
<a href="http://sourceforge.net/bugs/?group_id=3248">bugs list</a> and
write to the <a href="http://sourceforge.net/mail/?group_id=3248">mailing lists</a>.
<br><br>
<b>BZFlag runs slowly</b><br>
There are two possible causes for this. If your system has an old graphics card,
this can usually be solved by turning off some rendering options through the
options menu. Some options can also trip up certain graphics cards. If your card
is relatively new, you can try turning off shadows or smoothing and seeing if there
is any improvement.<br><br>

<b>Can't connect to servers</b><br>
If you can't connect to a server, the problem is often that your internet connection
is just too slow. There isn't a good fix for this problem, and the best choice is just
to try a different server, preferably one geographically closer to you.<br><br>

<b>All players are not responding</b><br>
A symptom of this problem is that shots seem to come from nowhere and none of the tanks
move around. There are a couple causes for this. The first is that you have a firewall
that filters out UDP. The solution for such a problem is either to adjust the firewall
or turn off UDP networking. The other cause is that BZFlag has incorrectly decided that
it can use multicasting. To fix this, try running bzflag from the command line with the
option "-ttl 0".<br><br>
예제 #7
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("edit news", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 2) {
        if (!isset($edit)) {
            $result = mysql_query("SELECT * FROM news ORDER BY date DESC");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"editnews.php?edit=2&entry=%s\">%s</a><br>\n", $currow[date], $currow["headline"]);
            }
        } else {
            if ($edit == 2) {
                $result = mysql_query("SELECT * FROM news WHERE date = {$entry}");
                $currow = mysql_fetch_array($result);
                $headline = $currow["headline"];
                $body = $currow["body"];
                print <<<end
<form method="GET" action="editnews.php">
<input type="hidden" name="edit" value="3">
<input type="hidden" name="entry" value="{$entry}">
<b>Headline:</b><br>
<input type="text" name="headline" value="{$headline}"><br>
<b>Body:</b><br>
<textarea rows="8" cols="45" name="body">
{$body}
</textarea><br>
<input type="submit" value="Modify">
예제 #8
0
<?php

include "../document.php";
$doc = new Document();
if (isset($ID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        if (!isset($edit)) {
            $doc->begin("edit user", 1);
            $result = mysql_query("SELECT * FROM passwd");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"edituser.php?edit=2&user=%s\">%s</a><br>\n", $currow["username"], $currow["username"]);
            }
        } else {
            if ($edit == 2) {
                $doc->begin("edit user", 1);
                $result = mysql_query("SELECT * FROM passwd WHERE username = '******'");
                $row = mysql_fetch_array($result);
                $user = $row["username"];
                $access = $row["access"];
                print <<<end
<form method="GET" action="edituser.php">
<input type="hidden" name="edit" value="3">
<input type="hidden" name="user" value="{$user}">
<table border="0">
  <tr>
    <td>Username:</td>
    <td><input type="text" maxlength="32" name="username" value="{$user}">
  </tr>
  <tr>
예제 #9
0
<?php

include '../document.php';
require_once 'TableEditor.php';
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 1) {
        $editor = new TableEditor($db, 'motd');
        $editor->setDefaultOrderby('title');
        $editor->setConfig('allowCopy', false);
        $editor->setConfig('allowCSV', false);
        $editor->noDisplay('id');
        $editor->display();
    } else {
        $doc = new Document();
        $doc->begin("Edit MOTD", 1);
        print "Unable to find any any MOTD results";
        $doc->end();
    }
} else {
    $doc = new Document();
    $doc->accessDenied();
}
예제 #10
0
<?php

include "document.php";
$doc = new Document();
$doc->begin("reviews");
print <<<end
<a href="http://happypenguin.org/">The Game Tome</a> allows visitors to rate the
games. <a href="http://happypenguin.org/show?bzflag">BZFlag</a> has a rating of 5 (of 5) stars.<br><br>

<a href="http://www.tucows.com/">TUCOWS</a> gives
<a href="http://www.tucows.com/perl/tucowsSearch?platform=%&word=bzflag">BZFlag</a> a rating of 5 (of 5) cows.<br><br>
<hr size="1">
<i>These are unsolicited quotes from BZFlag players.</i><br><br>
I want to say thank you for the game... we've been having a blast with it!!!! ... Thanks again for providing us with stress relief at the end of a work day. --V.S.<br><br>

First of all, I`d like to thank you for writing BZFlag. Without a doubt, its the best (and most entertaining!) software we have on these machines. ... Once again, on behalf of all the SGI users here at [company], many many thanks for writing probably the best game we have.... --S.L.<br><br>

Very nice game! Thank you very much! Addictive to the extreme! --E.D.<br><br>

It is an amazing game.... It may ruin my life. Is there a BZFlag anonymous help club? --S.Y.<br><br>

Great game, killer, love it. --B.K.<br><br>

We have been using 1.5 and *LOVE* it! --J.P.A.<br><br>

There's a group of us in [a company's support division] who find this game a great way to relieve the stress built up after a hard day being polite to idiot customers! --D.B.<br><br>

This game is totally awsome!!! I would love to play this at home or over the Net. --J.M.<br><br>

Here, in Hungary BZFlag means many crazy nights sitting in front of an SGI machine. ... I've seen many games before I worked for SGI, but in this game there's something special.... --P.S.<br><br>
예제 #11
0
<?php

include "../document.php";
$doc = new Document();
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1) {
        if (!(isset($pass) || isset($passconf))) {
            $doc->begin("change password", 1);
            print <<<end
<br>
<form action="chpass.php" method="POST">
  <table border="0">
    <tr>
      <td>Password:</td>
      <td><input type="password" name="pass"></td>
    </tr>
    <tr>
      <td>Confirm password:</td>
      <td><input type="password" name="passconf"></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" value="Change password"></td>
    </tr>
  </table>
</form>
end;
        } else {
            if ($pass != $passconf) {
                $doc->begin("change password", 1);
예제 #12
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("screenshots");
print <<<end
<h1>Screenshots</h1>

<p>Six screenshots are in the <a href="http://sourceforge.net/project/screenshots.php?group_id=3248">SourceForge Screenshots</a> tracker. That is all it can handle. Obviously we need a better solution.</p>

<hr>

<p>Feel free to <a href="mailto:learner AT brlcad DOT org">submit a screenshot</a> that you would like to see added.  Screenshots can be created while playing BZFlag by pressing the F5 key.  This will generate either a raw image (sgi format) or a gamma-corrected png, depending on your version of BZFlag.</p>

<p>Fullsize mages should be converted to either jpeg or png format.  Any resolution is okay, but please include a jpeg thumbnail if you would.  Thumbnail images should be approximately no more than 128 pixels wide, preserving the original aspect ratio.  <tiny>(*nix users can try running "<code>djpeg image.jpg  | pnmscale -pixels 16384 | cjpeg -progressive > t-image.jpg</code>")</tiny></p>

<br>
<hr>
<h2>Version 2.0</h2>
<p>Version 2 marks the beginning of enhanced graphics support, improved texturing, more detailed models, more detailed worlds and more more more.</p>
<br>

<p>There are a lot of nice 2.0 screenshots provided by <i>romfls</i> on his site at  <b><a href="http://www.bzflag.at/index.php?a=screenshots">http://www.bzflag.at/index.php?a=screenshots</a></b>.  Enjoy!</p>

<br>
<hr>
<h2>Version 1.10</h2>
<br>
<table border=0 cellspacing=16 ><tr><td align="center">

<table border=0><tr><td align="center">
예제 #13
0
<?
    Document::begin(Document::DT_HTML401_TRANS);
    $currentbook = 1; // TODO: initialize from session
    $currentbookdata = array(
        'id' => 1,
        'slug' => 'default',
        'title' => 'Demonstration Boki'
    );
    if ($currentbook) {
        $booktitle = $currentbookdata['title'];
    } else {
        $booktitle = "No book open";
    }
    KeyStore::register('api:google','ABQIAAAAX0duTJDNnIGr0q-PMsNgPBQGZChJCJZDmT1j5LVvleoaQrnX6hSGrc-x9nyNu0-Z5W4PyN81K-Oa4w');
?>
<html lang="en-us">
<head>
    <title>BOKi: <?php 
echo $booktitle;
?>
</title>
    <script type="text/javascript" src="http://www.google.com/jsapi?key=<?php 
echo KeyStore('api:google');
?>
"></script>
    <script type="text/javascript">
        google.load("prototype", "1.6.1.0");
        google.load("scriptaculous", "1.8.3");
    </script>
    <link rel="stylesheet" type="text/css" href="/res/boki/boki.css">
    <script type="text/javascript" src="/res/boki/boki.js"></script>
예제 #14
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("get involved");
print <<<end

<p>The best way to contribute to BZFlag is to just jump in.  Edit the
<a href="http://my.bzflag.org/w/">wiki</a> documentation.  <a
href="https://sourceforge.net/tracker2/?func=add&group_id=3248&atid=103248">Post</a>
bug reports.  Review an existing patch.  Fix bugs.  Make your own
patch.</p>

<p>If you <a
href="https://sourceforge.net/tracker2/?func=add&group_id=3248&atid=303248">post
patches</a> to the SourceForge tracker and your work is good, you will
very likely get commit access to work on the BZFlag source code
directly.</p>

<p>These should help get you started:</p>
<ul>
<li><a href="http://sourceforge.net/tracker/?atid=103248&group_id=3248&func=browse">Current bugs</a><br>
<li><a href="http://sourceforge.net/tracker/?atid=303248&group_id=3248&func=browse">Current patches</a><br>
<li><a href="http://sourceforge.net/tracker/?atid=353248&group_id=3248&func=browse">Feature requests</a><br>
</ul>
<br>
end;
$doc->end();
예제 #15
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("add news", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 1) {
        if (!isset($add)) {
            print <<<end
<form method="post" action="addnews.php">
<input type="hidden" name="add" value="1">
<b>Headline:</b><br>
<input name="headline" type="text"><br>
<b>Body:</b><br>
<textarea rows="8" cols="45" name="body"></textarea><br>
<input type="submit" value="Add news"><br>
</form>
end;
        } else {
            print <<<end
<div align="center"><b>News Added</b></div><br><br>
end;
            $substr = explode("|", $bzID);
            $user = $substr[0];
            $query = "INSERT INTO news (headline, body, date, username) values ('{$headline}', '{$body}', '" . time() . "', '{$user}')";
            $result = mysql_query($query);
            $result = mysql_query("SELECT * FROM news ORDER BY date DESC");
            $currow = mysql_fetch_array($result);
            printf("<b>%s</b> - %s by %s<br>%s<br><br>\n", $currow["headline"], date("F j Y, g:i A", $currow["date"]), $currow["username"], $currow["body"]);
예제 #16
0
<?php

include "../document.php";
include "useradmin.php";
$doc = new Document();
$doc->begin("user list", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        $result = mysql_query("SELECT * FROM passwd");
        print <<<end
Access levels:<br>
end;
        print_accesslevel(1);
        print "<br>\n";
        print_accesslevel(2);
        print "<br>\n";
        print_accesslevel(3);
        print "<br>\n";
        print <<<end
<br><br>
<table border="1">
  <tr><td>Username:</td><td>Access level:</td></tr>
end;
        while ($currow = mysql_fetch_array($result)) {
            printf("  <tr><td>%s</td><td>%s</td></tr>\n", $currow["username"], $currow["access"]);
        }
        print <<<end
</table>
end;
예제 #17
0
<?php

include "document.php";
$doc = new Document();
$doc->begin("title");
// add page content here:
print <<<end
end;
$doc->end();
예제 #18
0
<?php

include "document.php";
$doc = new Document();
$doc->begin("home");
$result = mysql_query("SELECT * FROM news ORDER BY date DESC");
print <<<end
<table border="0">
<tr>
<td>
<center><b>BZFlag is a free online multiplayer cross-platform open source 3D tank battle game.</b></center>
<p>The name originates from "Battle Zone capture the Flag".  It runs on Irix, Linux, *BSD, Windows, Mac OS X, and many other platforms.  It's one of the most popular games ever on Silicon Graphics machines and continues to be developed and improved to this day.  It's one of the most popular open source games ever.  For more information, check out some of the <a href="reviews.php">reviews</a>.</p>
</td>
</tr>
<tr>
<td align="center">
<br><br>
<a href="http://my.bzflag.org/bb/viewforum.php?f=8" alt="NEWS"><img src="images/bz_news_button.png" width=256 height=128 border=0></a>
<a href="http://bzflag.org/screenshots/" alt="screenshots"><img src="images/bz_screenshots_button.png" width=256 height=128 border=0></a>
<a href="https://sourceforge.net/project/showfiles.php?group_id=3248" alt="downloads"><img src="images/bz_downloads_button.png" width=256 height=128 border=0></a>
<a href="http://my.bzflag.org/bb/" alt="forums"><img src="images/bz_forums_button.png" width=256 height=128 border=0></a>
<a href="http://bzflag.org/getin" alt="contribute"><img src="images/bz_contribute_button.png" width=256 height=128 border=0></a>
<a href="http://my.bzflag.org/w/" alt="wiki"><img src="images/bz_wiki_button.png" width=256 height=128 border=0></a>

</td>
</tr>
</table>

<br><br>

end;
예제 #19
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("customization");
print <<<end
<b>Customizing BZFlag</b><br><br>

This document only applies to version 1.7. Earlier versions are customized differently. Run `man bzflagrc' on your system for more information.<br>
<b>Sound Files</b><br><br>

You can customize the sounds that BZFlag plays by getting it to load your
own sound files. You can do this by replacing the original sound files
themselves; by putting sound files in another directory and using the
-directory command line option; or by copying the original data files to
a new location, replacing the sound files, and using the -directory option.
On UNIX, you can of course use links to data files instead of making copies.<br><br>

The sound files must have the original name. The files are 22.05kHz 16 bit WAV
files, stereo or mono. The sound files are (not including the usual extension .wav):<br>
<table border="0" width="100%">
<tr><td>boom</td><td>Played when a shell explodes.</td></tr>
<tr><td>explosion</td><td>Played when a tank explodes.</td></tr>
<tr><td>fire</td><td>Played when a shot is fired.</td></tr>
<tr><td>flag_alert</td><td>Played when your team flag is grabbed by an enemy.</td></tr>
<tr><td>flag_drop</td><td>Played when a flag is dropped.</td></tr>
<tr><td>flag_grab</td><td>Played when a flag is grabbed.</td></tr>
<tr><td>flag_lost</td><td>Played when your team flag is captured.</td></tr>
<tr><td>flag_won</td><td>Played when you capture an enemy flag.</td></tr>
<tr><td>jump</td><td>Played when a tank jumps.</td></tr>
<tr><td>land</td><td>Played when a tank lands.</td></tr>
예제 #20
0
<?php

include "../document.php";
$doc = new Document();
if (isset($bzID) && !isset($function)) {
    $substr = explode("|", $bzID);
    $query = "SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'";
    $result = mysql_query($query);
    if (mysql_num_rows($result) == 1) {
        if ($substr[2] >= 1) {
            $doc->begin("admin", 1);
            print <<<end
<br>
<b>News:</b><br>
<a href="/admin/addnews.php">Add news</a><br>
end;
        }
        if ($substr[2] >= 2) {
            print <<<end
<a href="/admin/editnews.php">Edit news</a><br>
<a href="/admin/deletenews.php">Delete news</a><br>
end;
        }
        if ($substr[2] >= 1) {
            print <<<end
<br>
<b>MOTD:</b><br>
<a href="/admin/setMOTD.php">Set MOTD</a><br>
<a href="/admin/editMOTD.php">Edit existing MOTDs</a><br>
end;
        }
예제 #21
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("help");
print <<<end
Help is organized into several sections. Please choose one below:<br><br>
<a href="/help/installation.php">Installation</a><br>
<a href="/help/playing.php">Playing</a><br>
<a href="/help/customization.php">Customization</a><br>
<a href="/help/troubleshooting.php">Troubleshooting</a><br>
<a href="/help/faq.php">Frequently asked questions</a><br>
end;
$doc->end();
예제 #22
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("links");
print <<<end
Here are a collection of links related to BZFlag:<br><br>
<a href="http://www.sourceforge.net/projects/bzflag">Sourceforge project page</a><br>
<a href="http://www.chesco.com/~dbrosius/BZFlag/BZFlag.html">MrApathyCream's page</a><br>
<a href="http://www.bzflag.de/">Oma & Frank's BZFlag page</a><br>
<a href="http://pub33.ezboard.com/bbzflag">The unofficial forums</a><br>
<a href="http://sourceforge.net/mail/?group_id=3248">The mailing lists</a><br>
<a href="http://worldstrider.tripod.com/">Gerbil's BZFlag page</a><br>
<a href="http://bzflag.free.fr/">Valoche's BZFlag page</a><br>
<a href="http://www.lans-web.com/bzflag/">Grape of Wrath's page</a><br>

<br>
end;
$doc->end();
예제 #23
0
<?php

include "../document.php";
function table_exist($table)
{
    $query = "select * from {$table}";
    $result = mysql_query($query);
    $num_rows = @mysql_num_rows($result);
    if ($num_rows) {
        return true;
    } else {
        return false;
    }
}
$doc = new Document();
$doc->begin("set MOTD", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 1) {
        if (!isset($add)) {
            // check for the table
            if (!table_exist('motd')) {
                $query = "CREATE TABLE motd ( title varchar(80) NOT NULL default '', description varchar(255) NOT NULL default '', author varchar(64) NOT NULL default '', pubDate varchar(64) NOT NULL default '', version varchar(64) NOT NULL default '', id bigint(20) unsigned NOT NULL default 0 ) TYPE=MyISAM COMMENT='the current message';";
                $result = mysql_query($query);
                $query = "INSERT INTO motd (title, description, author, pubDate, version, id) values ('Welcome to BZFlag', 'BZFlag is a free multiplayer multiplatform 3D tank battle game. The name stands for Battle Zone capture Flag. It runs on Irix, Linux, BSD, Windows, Mac OS X and other platforms.', 'BZFlag Developers', '', '0.0', '0' )";
                $result = mysql_query($query);
            }
            $query = "SELECT * FROM motd";
            $result = mysql_query($query) or die("Query failed : " . mysql_error());
            $row = mysql_fetch_array($result);
예제 #24
0
<?php

include "../document.php";
$doc = new Document();
$doc->begin("delete news", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 2) {
        if (!isset($delete)) {
            $result = mysql_query("SELECT * FROM news ORDER BY date DESC");
            while ($currow = mysql_fetch_array($result)) {
                printf("<a href=\"deletenews.php?delete=2&entry=%s\">%s</a><br>\n", $currow[date], $currow["headline"]);
            }
        } else {
            if ($delete == 2) {
                $result = mysql_query("DELETE FROM news WHERE date = {$entry}");
                print "deleted<br><br><br><br>\n";
            }
        }
    } else {
        print <<<end
Access denied.
end;
    }
} else {
    print <<<end
Access denied.
end;
}
$doc->end();
예제 #25
0
<?php

include "../document.php";
include "useradmin.php";
$doc = new Document();
$doc->begin("create a user", 1);
if (isset($bzID)) {
    $substr = explode("|", $bzID);
    $result = mysql_query("SELECT * FROM passwd WHERE password = '******'1']}' AND username = '******'0']}' AND access = '{$substr['2']}'");
    if (mysql_num_rows($result) == 1 && $substr[2] >= 3) {
        if (!isset($add)) {
            print <<<end
<form method="POST" action="createuser.php">
<input type="hidden" name="add" value="2">
<table border="0">
  <tr>
    <td>Username:</td>
    <td><input type="text" maxlength="32" name="username"></td>
  </tr>
  <tr>
    <td>Password:</td>
    <td><input type="password" name="password"></td>
  </tr>
  <tr>
    <td>Confirm Password:</td>
    <td><input type="password" name="pwconf"></td>
  </tr>
  <tr>
    <td>Access level:</td>
    <td>
      <select name="access">