port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

14
web/connect.php Normal file
View File

@@ -0,0 +1,14 @@
<?php
include('k_Mysql.php');
error_reporting (E_ALL);
$ls_Host = "localhost";
$ls_SqlUser = "9_bluflame";
$ls_SqlPass = "r16461641";
$ls_SqlDb = "9_bluflame";
global $gk_Db;
$gk_Db = new k_Mysql($ls_SqlUser, $ls_SqlPass, $ls_Host, $ls_SqlDb, true);
?>

103
web/dialog.php Normal file
View File

@@ -0,0 +1,103 @@
<?php
function Dialog($as_Title, $as_Content, $ab_Dots = true)
{
?>
<table class="dialog">
<tr>
<td class="tl"></td>
<td class="tc"><?php if ($ab_Dots) echo "::";?> <?php echo $as_Title; ?></td>
<td class="tr"></td>
</tr>
<tr>
<td class="lc"></td>
<td class="c"><?php echo $as_Content; ?></td>
<td class="rc"></td>
</tr>
<tr>
<td class="bl"></td>
<td class="bc"></td>
<td class="br"></td>
</tr>
</table>
<?php
}
function ProfileDialog($as_Title, $as_Picture, $as_Content)
{
$ls_Content = "
<table class=\"profile\">
<tr>
<td><img style=\"width:200px;\" src=\"$as_Picture\"></img></td>
<td class=\"content\">$as_Content</td>
</tr>
</table>";
Dialog($as_Title, $ls_Content);
}
function StringList($as_Items_)
{
$ls_Result = "<table class=\"string-list\">";
foreach ($as_Items_ as $ls_Index => $ls_Value)
{
$ls_Result .= "<tr><td class=\"list-item\">$ls_Index:</td><td>$ls_Value</td></tr>";
}
$ls_Result .= "</table>";
return $ls_Result;
}
function GuestBook($as_Items_)
{
if (!is_array($as_Items_))
return "There are no entries in our guestbook yet!";
$ls_Result = "<table class=\"guestbook\">";
foreach ($as_Items_ as $ls_Entry_)
{
$ls_Result .= "<tr><td class=\"guest-date\">:: {$ls_Entry_["date"]}</td><td class=\"guest-poster\">{$ls_Entry_["poster"]}</td></tr><tr><td class=\"guest-text\" colspan=\"2\">{$ls_Entry_["text"]}</td></tr>";
}
$ls_Result .= "</table>";
return $ls_Result;
}
function GuestForm()
{
$ls_Result = "<form id=\"guestform\" name=\"guestform\"><table id=\"gbform\" class=\"form\">";
$ls_Result .= "<tr><td class=\"label\">Handle:</td><td><input type=\"text\" id=\"poster\" name=\"poster\"></input></td></tr>";
$ls_Result .= "<tr><td class=\"label\">Text:</td><td><textarea id=\"text\" name=\"text\"></textarea></td></tr>";
$ls_Result .= "<tr><td class=\"submit\" colspan=\"2\"><a href=\"javascript:gbsubmit();\">post</a></td></tr>";
$ls_Result .= "</table></form>";
return $ls_Result;
}
function UrlBar($as_Items_)
{
$ls_Result = "<div class=\"url-bar\">";
$ls_Urls_ = array();
foreach ($as_Items_ as $ls_Index => $ls_Value)
{
$ls_Urls_[] = "<a href=\"$ls_Index\">$ls_Value</a>";
}
$ls_Result .= implode(" :: ", $ls_Urls_);
$ls_Result .= "</div>";
return $ls_Result;
}
function MusicEntry($as_Items_)
{
$ls_Player = "<object width=\"17\" height=\"17\" data=\"musicplayer.swf?&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=,,,ff0000&\" type=\"application/x-shockwave-flash\"><param value=\"musicplayer.swf?&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=,,,ff0000&\" name=\"movie\"/><param value=\"transparent\" name=\"wmode\"/><param value=\"high\" name=\"quality\"/><param value=\"song_url={$as_Items_["url"]}\" name=\"FlashVars\"/><embed width=\"17\" height=\"17\" flashvars=\"song_url={$as_Items_["url"]}\" src=\"musicplayer.swf?&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=,,,ff0000&\"/></object>";
Dialog("<table class=\"music\"><tr><td>:: " . $as_Items_["title"] . " (" . $as_Items_["duration"] . ")</td><td class=\"player\">" . $ls_Player . "</td></tr></table>", StringList($as_Items_["description"]), false);
}
function Email($as_User)
{
return '<a href="javascript:location=\'mailto:' . $as_User . '\u0040\u0062\u006c\u0075\u002d\u0066\u006c\u0061\u006d\u0065\u002e\u006f\u0072\u0067\';void 0"><script type="text/javascript">document.write(\'' . $as_User . '\u0040\u0062\u006c\u0075\u002d\u0066\u006c\u0061\u006d\u0065\u002e\u006f\u0072\u0067\')</script></a>';
}
function Url($as_Href)
{
return "<a href=\"$as_Href\">$as_Href</a>";
}
?>

BIN
web/dialog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

2
web/footer.php Normal file
View File

@@ -0,0 +1,2 @@
</body>
</html>

22
web/gb-submit.php Normal file
View File

@@ -0,0 +1,22 @@
<?php
if (!isset($_GET["poster"]) || $_GET["poster"] == "")
{
echo "Please enter your handle";
die();
}
if (!isset($_GET["text"]) || $_GET["text"] == "")
{
echo "Please enter a message";
die();
}
$ls_Poster = $_GET["poster"];
$ls_Text = $_GET["text"];
include('connect.php');
$gk_Db->Query("INSERT INTO `guestbook` (`ID`, `date`, `poster`, `text`) VALUES ('', NOW(), '$ls_Poster', '$ls_Text')");
echo "ok";
?>

18
web/guestbook.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
include("dialog.php");
include("menu.php");
include('connect.php');
$gk_Db->Query("SELECT * FROM `guestbook` ORDER BY date DESC LIMIT 0, 20");
$ls_Data_ = $gk_Db->MultiFetch();
$ls_Urls_ = array(
"javascript:gbpost();" => "Post a reply"
);
Dialog("Guestbook", UrlBar($ls_Urls_) . GuestForm() . GuestBook($ls_Data_));
include("footer.php");
?>

BIN
web/images/codingcat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
web/images/crowbar.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
web/images/dialog-bc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/dialog-bl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/dialog-br.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/dialog-lc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/dialog-rc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/dialog-tc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/dialog-tl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
web/images/dialog-tr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
web/images/fractoblob.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/hel.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
web/images/julia.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
web/images/logo-top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

BIN
web/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
web/images/lunaquatic.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
web/images/rayn.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
web/images/space-colony.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
web/images/strobo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

BIN
web/images/tggc.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
web/images/timeless.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
web/images/title-left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

BIN
web/images/xtr1m.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

25
web/index.php Normal file
View File

@@ -0,0 +1,25 @@
<?php
include("dialog.php");
include("menu.php");
Dialog("Welcome to blu-flame.org", "We are a demo group in germany since 2007. Our main activity is at <a href=\"http://www.evoke.eu/2008/\">Evoke</a>, <a href=\"http://2008.tum-party.net/\">tUM</a> and <a href=\"http://breakpoint.untergrund.net/\">breakpoint</a>, and we love scene music, 4k and 64k intros.");
// News:
$ls_News_ = array(
"May 6th, 2010" => "We've added our executable music (newschool) release for Breakpoint to our <a href=\"prods.php\">prods</a> page. Also, we're happy to announce that we have two new members: <a href=\"members.php\">TGGC</a> and <a href=\"members.php\">CodingCat</a>. Welcome!",
"January 4th, 2010" => "A long time without updates, mainly because of xTr1m's laziness. Anyway, he visited Function 2009 and released a PC Demo, announcing the birth of his son, Simon, which was born on Novemer 9th. Check it out at the <a href=\"prods.php\">prods</a> page! The <a href=\"members.php\">members</a> page was also updated, with links to the group's email addresses.",
"August 2nd, 2009" => "Hel of BluFlame visited Evoke 2009 this year, and submitted our recent 4k, Lunaquatic. We're very happy to have achieved 1st place in the PC 4k compo. Thank you everyone! As always, you can watch it at the <a href=\"prods.php\">prods</a> page!",
"April 13th, 2009" => "We worked very hard on many productions for Breakpoint 2009! Check out our newest 4k PC-Intro, streamed music and executable music entries right here, at the <a href=\"prods.php\">prods</a> page!",
"February 10th, 2009" => "We released a party-prod at tUM 2008, check it out in our <a href=\"prods.php\">prods</a> page. We are also happy to announce that we have a new member: <a href=\"members.php\">Hel</a>. He will assist us with coding and graphics. Welcome!",
"November 3rd, 2008" => "An article interviewing xTr1m and giving insights into the creation of <i>fractoblob</i> and <i>Hauptsache Strobo! 4k</i> appeared on the diskmag <b>hugi #35</b>. Check it out <a href=\"http://pouet.net/prod.php?which=52018\">here</a>!",
"September 1st, 2008" => "A new 64k track has been released by ptrance^raYn. Originally supposed for the tiny music competition @ Evoke 2008. However, the tune did not even reach the pre-selection, due to the fact that something within the submission went terribly wrong.<br> You can leech the song from our prods section!",
"Augst 17th, 2008" => "We've just released another 4k intro. This time it's an 4k remake of the PC-Demo <b>Hauptsache Strobo! by Stroboholics</b>, which was intended as a fun production. So is ours and we remote released it just for fun at Buenzli 2008. Check out our <a href=\"prods.php\">Prods section</a>!",
"Augst 10th, 2008" => "We released three entries at evoke: Our 4k intro <b>fractoblob</b>, an ogg tune for the streamed music compo and a loop for the loop compo. Check out our productions <a href=\"prods.php\">here</a>!",
"Augst 9th, 2008" => "We are at <a href=\"http://www.evoke.eu/2008/\">Evoke 2008</a> in Cologne, Germany, and we'll be releasing a brand new 4k intro and a tune for the streaming music compo!",
"May 16th, 2008" => "Finally we've put up some contents to our website. We'll be publishing our productions over here from now on."
);
Dialog("News", StringList($ls_News_));
include("footer.php");
?>

575
web/k_Mysql.php Normal file
View File

@@ -0,0 +1,575 @@
<?php
class k_Mysql
{
private $ms_Query_ = null;
private $mv_Result_ = null;
private $mv_Connection_ = array();
private $ms_CurrentDatabase = '';
private $ms_Errors_ = array();
protected $mi_TransactionStarted_ = array();
private $ms_Username;
private $ms_Password;
private $ms_Host;
private $ms_DatabaseName;
public function __construct($as_Username, $as_Password, $as_Host, $as_DatabaseName, $ab_AutoConnect = true)
{
$this->ms_Username = $as_Username;
$this->ms_Password = $as_Password;
$this->ms_Host = $as_Host;
$this->ms_DatabaseName = $as_DatabaseName;
if ($ab_AutoConnect)
$this->Connect();
}
public function __destruct()
{
foreach ($this->mi_TransactionStarted_ as $ls_Database => $li_TransactionLevel)
{
if ($li_TransactionLevel)
{
if ($this->ms_DatabaseName != $ls_Database)
{
$this->SelectDatabase($ls_Database);
}
$this->RollbackTransaction();
$this->SaveError("Attempting to quit with pending transaction, rolling back.");
}
}
}
public function Connect()
{
if (!isset($this->mv_Connection_[$this->ms_DatabaseName])) {
if (!$this->mv_Connection_[$this->ms_DatabaseName] = @mysql_connect($this->ms_Host, $this->ms_Username, $this->ms_Password)) {
$this->SaveError("Connection with with server ". $this->ms_Host ." is not possible!");
return false;
} else {
$this->mi_TransactionStarted_[$this->ms_DatabaseName] = 0;
$this->SelectDatabase($this->ms_DatabaseName);
}
}
return $this->mv_Connection_[$this->ms_DatabaseName];
}
public function SelectDatabase($as_DatabaseName)
{
if (!@mysql_select_db($as_DatabaseName)) {
$this->SaveError("Can not connect to MySQL database (". $as_DatabaseName .")!");
return false;
} else if (!isset($this->mv_Connection_[$as_DatabaseName])) {
$this->mv_Connection_[$as_DatabaseName] = $this->mv_Connection_[$this->ms_CurrentDatabase];
}
$this->ms_CurrentDatabase = $as_DatabaseName;
return true;
}
public function Query($as_Query, $ab_AutoFetch = false)
{
$this->mv_Result_[$this->ms_CurrentDatabase] = mysql_query($as_Query, $this->mv_Connection_[$this->ms_CurrentDatabase]);
if ($ls_ErrorMessage = $this->error()) {
$this->SaveError($ls_ErrorMessage, $as_Query);
}
$this->ms_Query_[$this->ms_CurrentDatabase][] = $as_Query;
if ($ab_AutoFetch) {
$ls_Row_ = $this->FetchArray();
$this->FreeResult();
return $ls_Row_;
} else {
return $this->mv_Result_[$this->ms_CurrentDatabase];
}
}
public function Get($as_Query, $as_Var = '')
{
$this->Query($as_Query);
if ($as_Var) {
$ls_Row_ = $this->FetchArray(false, true);
if (isset($ls_Row_[$as_Var])) {
return $ls_Row_[$as_Var];
} else {
return false;
}
}
return $this->MultiFetch();
}
public function FetchVar($as_Var, $av_ResultId = false)
{
$ls_Row_ = $this->FetchArray($av_ResultId, true);
if (isset($ls_Row_[$as_Var])) {
return $ls_Row_[$as_Var];
}
return false;
}
public function FetchArray($av_ResultId = false, $ab_FetchAssoc = true)
{
$lv_Result = $av_ResultId ? $av_ResultId : $this->mv_Result_[$this->ms_CurrentDatabase];
if (!$lv_Result) {
return false;
}
if (!is_resource($lv_Result))
{
$this->Query("INSERT INTO DatenbankFehler VALUES ('', NOW(), '', 'Invalid MySql resource','" . var_export(debug_backtrace(), true) . "') ");
return false;
}
if ($ab_FetchAssoc) {
if ($lv_Array_ = mysql_fetch_array($lv_Result, MYSQL_ASSOC)) {
return $lv_Array_;
}
} else {
if ($lv_Array_ = mysql_fetch_array($lv_Result)) {
return $lv_Array_;
}
}
$this->FreeResult($lv_Result);
return false;
}
public function MultiFetch($av_ResultId = false, $ab_FetchAssoc = true)
{
$lv_Rows_ = null;
while ($lv_Row_ = $this->FetchArray($av_ResultId, $ab_FetchAssoc)) {
$lv_Rows_[] = $lv_Row_;
}
return $lv_Rows_;
}
public function ListFetch($av_ResultId = false, $as_Var)
{
$ab_FetchAssoc = true;
$lv_Rows_ = array();
while ($lv_Row_ = $this->FetchArray($av_ResultId, $ab_FetchAssoc)) {
$lv_Rows_[$lv_Row_[$as_Var]] = $lv_Row_;
}
return $lv_Rows_;
}
public function NumberedFetch($av_ResultId = false, $as_Var, $lowercase=true)
{
$ab_FetchAssoc = true;
$lv_Rows_ = array();
$i = 1;
while ($lv_Row_ = $this->FetchArray($av_ResultId, $ab_FetchAssoc)) {
$lv_Row_['Number'] = $i;
if ($lowercase)
$lv_Rows_[strtolower($lv_Row_[$as_Var])] = $lv_Row_;
else
$lv_Rows_[$lv_Row_[$as_Var]] = $lv_Row_;
$i++;
}
return $lv_Rows_;
}
public function FreeResult($av_ResultId = false)
{
$lv_Result = $av_ResultId ? $av_ResultId : $this->mv_Result_[$this->ms_CurrentDatabase];
if (!$lv_Result)
return;
if (!is_resource($lv_Result))
{
$this->Query("INSERT INTO DatenbankFehler VALUES ('', NOW(), '', 'Invalid MySql resource', '" . var_export(debug_backtrace(), true) . "') ");
return;
}
mysql_free_result($lv_Result);
$this->mv_Result_[$this->ms_CurrentDatabase] = null;
}
public function NumberOfRows($av_ResultId = false)
{
$lv_Result = $av_ResultId ? $av_ResultId : $this->mv_Result_[$this->ms_CurrentDatabase];
$li_Number = mysql_num_rows($lv_Result);
return $li_Number;
}
public function AffectedRows()
{
$lv_AffectedRows = mysql_affected_rows();
return $lv_AffectedRows;
}
public function ListTables()
{
$lv_Array_ = array();
$this->mv_Result_[$this->ms_CurrentDatabase] = mysql_list_tables($this->ms_CurrentDatabase);
while ($lv_Row_ = $this->FetchArray(false, false)) {
$lv_Array_[] = $lv_Row_[0];
}
return $lv_Array_;
}
public function Fields($as_Table = '')
{
$lv_Array_ = array();
if ($as_Table) {
$this->Query("select * from ". $as_Table);
}
$li_Fields = mysql_num_fields($this->mv_Result_[$this->ms_CurrentDatabase]);
for ($i = 0; $i < $li_Fields; $i++) {
$lv_Array_[$i]['type'] = mysql_field_type($this->mv_Result_[$this->ms_CurrentDatabase], $i);
$lv_Array_[$i]['name'] = mysql_field_name($this->mv_Result_[$this->ms_CurrentDatabase], $i);
$lv_Array_[$i]['size'] = mysql_field_len($this->mv_Result_[$this->ms_CurrentDatabase], $i);
$lv_Array_[$i]['flags'] = mysql_field_flags($this->mv_Result_[$this->ms_CurrentDatabase], $i);
}
return $lv_Array_;
}
public function NextId($as_Table)
{
$lv_Id = $this->Get("Show table status like '". $as_Table ."'", "Auto_increment");
return $lv_Id;
}
public function Error($ab_Echo = false)
{
$ls_Error = mysql_error();
if ($ab_Echo) {
echo $ls_Error;
}
return $ls_Error;
}
public function SaveError($as_Error, $as_Query = '')
{
$ls_Error = str_replace("\n", "", $as_Error);
$this->ms_Errors_[$this->ms_CurrentDatabase][] = ($as_Query != '' ? $as_Query . ': ' : '') . $ls_Error;
$lv_CallStack_ = debug_backtrace();
$ls_Url = $_SERVER["REQUEST_URI"];
$ls_Report = "";
$li_Count = 0;
foreach ($lv_CallStack_ as $lv_Function_)
{
$ls_FunctionReport = "";
$ls_FunctionReport .= $lv_Function_["file"] . " (";
$ls_FunctionReport .= $lv_Function_["line"] . "): ";
$ls_FunctionReport .= $lv_Function_["function"] . "(...);";
$ls_Report .= $ls_FunctionReport . "<br />";
}
$ls_Query = "INSERT INTO DatenbankFehler (Zeit, Query, Fehler, Stacktrace) ".
"VALUES (NOW(), '".mysql_escape_string($as_Query)."', '".mysql_escape_string($as_Error)."', '" . mysql_escape_string($ls_Report) . "')";
//echo $ls_Query;
mysql_query($ls_Query, $this->mv_Connection_[$this->ms_CurrentDatabase]);
}
public function ErrorStr($as_String)
{
$ls_String = str_replace("\n", "", $as_String);
$ls_String = str_replace("\t", "", $ls_String);
$ls_String = str_replace("\r", "", $ls_String);
$ls_String = preg_replace('/ {2,}/', ' ', $ls_String);
return $ls_String;
}
public function Errors()
{
while (list ($ls_Database, $ls_Errors_) = each ($this->ms_Errors_)) {
echo "<p><b>". $ls_Database ."</b>";
for ($i = 0; $i < sizeof($ls_Errors_); $i++) {
echo "<br />". $ls_Errors_[$i];
}
echo "<br />Total: <b>". $i ."</b> errors</p>";
}
reset($this->ms_Errors_);
}
public function NumberOfQuerys()
{
$li_Number = 0;
while (list ($ls_Database, $ls_Queries_) = each ($this->ms_Query_)) {
$li_Number += sizeof($ls_Queries_);
}
reset($this->ms_Query_);
return $li_Number;
}
// Hinzugefuegt 23.01.08 Jens
/**
* Startet eine SQL-Transaktion in der aktuellen Datenbank.
*/
public function StartTransaction()
{
if (!$this->mi_TransactionStarted_[$this->ms_DatabaseName])
{
$this->Query("START TRANSACTION");
}
else
{
// Tried to start nested transactions, log occurence
$this->SaveError("Attempted to start a nested transaction. Using outer transaction instead.");
}
$this->mi_TransactionStarted_[$this->ms_DatabaseName]++;
}
/**
* Schreibt die aktuelle Transaktion in der aktuellen Datenbank fest.
*/
public function CommitTransaction()
{
if (!$this->mi_TransactionStarted_[$this->ms_DatabaseName])
{
$this->SaveError("Trying to commit non-existing transaction.");
trigger_error("Trying to commit non-existing transaction.", E_USER_ERROR);
}
$this->mi_TransactionStarted_[$this->ms_DatabaseName]--;
if (!$this->mi_TransactionStarted_[$this->ms_DatabaseName])
{
$this->Query("COMMIT");
}
else
{
// Tried to start nested transactions, log occurence
$this->SaveError("Attempted to commit a nested transaction. Not committing and waiting for outer transaction instead.");
}
}
/**
* Bricht die aktuelle Transaktion in der aktuellen Datenbank ab.
*/
public function RollbackTransaction()
{
if (!$this->mi_TransactionStarted_[$this->ms_DatabaseName])
{
$this->SaveError("Trying to roll back non-existing transaction.");
trigger_error("Trying to roll back non-existing transaction.", E_USER_ERROR);
}
$this->mi_TransactionStarted_[$this->ms_DatabaseName]--;
if (!$this->mi_TransactionStarted_[$this->ms_DatabaseName])
{
$this->Query("ROLLBACK");
}
else
{
// Tried to start nested transactions, log occurence
$this->Query("ROLLBACK");
$this->SaveError("Attempted to roll back a nested transaction. Rolling back outer transaction.");
trigger_error("Attempted to roll back a nested transaction. Rolling back outer transaction and aborting.", E_USER_ERROR);
}
}
// Hinzugefügt 02.03.07 Jens
/**
* Selects data from a table.
*
* Selects data from a table. This method takes two or three parameters: The first one is the
* table name, the second one an array of the column names from which the values should be
* returned and the last, optional one may be a WHERE clause (without the WHERE, e.g.
* ID=1 AND Name='Test'). Returns an array of rows which are both numerically and associatively
* indexed.
*
* Please note that the input data in this function is <b>NOT</b> checked, so you will have
* to escape it yourself if you take it from user input or you will risk a SQL injection
* vulnerability.
*
* @param string $as_Table Name of the table to fetch data from.
* @param array $as_Columns_ Names of the columns to fetch data from.
* @param string $as_WhereClause An optional SQL WHERE clause without the WHERE.
* @return array A two-dimensional array in row-major order including the result set.
*/
public function Select($as_Table, array $as_Columns_, $as_WhereClause = FALSE) {
$lr_Result = $this->Query(
'SELECT ' . implode(', ', $as_Columns_) .
' FROM `' . $as_Table . '`' .
($as_WhereClause !== FALSE ? ' WHERE ' . $as_WhereClause : '')
);
$ls_ResultArray_ = $this->MultiFetch($lr_Result);
return is_array($ls_ResultArray_) ? $ls_ResultArray_ : array();
}
/**
* Selects the given columns from a table and returns the values as an k_Entity instance.
* Please note that only the first result is returned, if there are more, they are discarded.
* Please also note that in order to work with the k_Entity class, the table has to have
* an column named ID as a primary key
*
* @param string $as_Table Name of the table to fetch from
* @param array $as_Columns_ Names of the columns to fetch data from.
* @param string $as_WhereClause An optional SQL WHERE clause without the WHERE.
* @return k_Entity An entity representing the result or NULL if no result was found.
*/
public function SelectAsEntity($as_Table, array $as_Columns_, $as_WhereClause = FALSE, $as_AdditionalClause = FALSE)
{
if(!array_search('ID', $as_Columns_))
{
$as_Columns_[] = 'ID';
}
$lr_Result_ = $this->Query(
'SELECT ' . implode(', ', $as_Columns_) .
' FROM `' . $as_Table . '`' .
($as_WhereClause !== FALSE ? ' WHERE ' . $as_WhereClause : '').
($as_AdditionalClause !== FALSE ? ' ' . $as_AdditionalClause : '').
' LIMIT 1',
true
);
if($lr_Result_)
{
return new k_Entity($this, $as_Table, $lr_Result_['ID'], $lr_Result_);
}
else
{
return null;
}
}
/**
* Selects the given columns from a table and returns the values as an array of k_Entity
* instances. Please note that in order to work with the k_Entity class, the table has to have
* an column named ID as a primary key
*
* @param string $as_Table Name of the table to fetch from
* @param array $as_Columns_ Names of the columns to fetch data from.
* @param string $as_WhereClause An optional SQL WHERE clause without the WHERE.
* @param string $as_AdditionalClause An additional clause such as an ORDER BY clause.
* @return array An array of k_Entity objects holding the results-
*/
public function SelectAsEntities($as_Table, array $as_Columns_, $as_WhereClause = FALSE, $as_AdditionalClause = FALSE)
{
if(!array_search('ID', $as_Columns_))
{
$as_Columns_[] = 'ID';
}
$this->Query(
'SELECT ' . implode(', ', $as_Columns_) .
' FROM `' . $as_Table . '`' .
($as_WhereClause !== FALSE ? ' WHERE ' . $as_WhereClause : '').
($as_AdditionalClause !== FALSE ? ' ' . $as_AdditionalClause : '')
);
$lk_Entities_ = array();
while($lr_Result_ = $this->FetchArray())
{
$lk_Entities_[] = new k_Entity($this, $as_Table, $lr_Result_['ID'], $lr_Result_);
}
return $lk_Entities_;
}
/**
* Updates data in a table.
*
* Updates data in a table. This method takes four arguments: The first one is the table name,
* the second one is an array of the column names and the third one is an array of the values
* to update into the table. Both arrays have to have the same length. The forth argument is
* a where clause without the WHERE (e.g. ID = 2) which specifies the rows to be updated.
* Please note that the values will be quoted and escaped, so you do not have to do that before.
* Because of the quoting and escaping, you will not be able to issue MySQL functions, subqueries,
* NULL values etc. in the value array. If you need to do so, use the {@link Query}
* method.
*
* @param string $as_Table Name of the table to update.
* @param array $as_Columns_ Names of the columns to update.
* @param array $av_Values_ Values to update.
* @param string $as_WhereClause A SQL WHERE clause without the WHERE specifying the rows
* to be updated.
*/
public function Update($as_Table, array $as_Columns_, array $av_Values_, $as_WhereClause) {
if(count($as_Columns_) != count($av_Values_)) {
// In any case, quit the method
return;
}
// Construct query
$ls_Query = "UPDATE `$as_Table` SET ";
for($li_Col = 0; $li_Col < count($as_Columns_); $li_Col++) {
if($li_Col > 0)
$ls_Query .= ', ';
$ls_Query .=
"`{$as_Columns_[$li_Col]}` = ".
($av_Values_[$li_Col] === NULL ?
"NULL" :
"'" .
mysql_real_escape_string(
$av_Values_[$li_Col],
$this->mv_Connection_[$this->ms_CurrentDatabase]
) .
"'"
);
}
$ls_Query .= " WHERE $as_WhereClause";
// Execute query
$this->Query($ls_Query);
}
/**
* Inserts data into a table.
*
* Inserts data into a table. This method takes three arguments: The first one is the table name,
* the second one is an array of the column names and the third one is an array of the values
* to insert into the table. Both arrays have to have the same length. Please note that the
* values will be quoted and escaped, so you do not have to do that before. Because of the
* quoting and escaping, you will not be able to issue MySQL functions, subqueries,
* NULL values etc. in the value array. If you need to do so, use the {@link Query}
* method.
*
* @param string $as_Table Name of the table to insert into.
* @param array $as_Columns_ Names of the columns to insert the data into.
* @param array $av_Values_ Values to insert into the columns.
*/
public function Insert($as_Table, array $as_Columns_, array $av_Values_) {
if(count($as_Columns_) != count($av_Values_)) {
// In any case, quit the method
return;
}
// Construct query
$ls_Query = "INSERT INTO `$as_Table` (";
$lb_First = true;
foreach($as_Columns_ as $sColumn) {
if(!$lb_First)
$ls_Query .= ', ';
$ls_Query .= "`$sColumn`";
$lb_First = false;
}
$ls_Query .= ") VALUES (";
$lb_First = true;
foreach($av_Values_ as $vValue) {
if(!$lb_First)
$ls_Query .= ', ';
$ls_Query .=
($vValue === NULL ?
'NULL' :
"'".mysql_real_escape_string(
$vValue, $this->mv_Connection_[$this->ms_CurrentDatabase]
)."'");
$lb_First = false;
}
$ls_Query .= ")";
// Execute query
$this->Query($ls_Query);
}
/**
* Returns the last generated auto_increment ID.
*
* @return The last generated auto_increment ID.
* @see mysql_insert_id()
*/
public function LastInsertID() {
return @mysql_insert_id($this->mv_Connection_[$this->ms_CurrentDatabase]);
}
/**
* Gibt einen Dump der wichtigsten Daten zurück (ASCII-Plain-Text).
* @return string Ein Dump der wichtigsten Daten.
*/
public function Dump()
{
return print_r($this->ms_Query_, true) . "\n" . print_r($this->ms_Errors_, true);
}
}
?>

47
web/members.php Normal file
View File

@@ -0,0 +1,47 @@
<?php
include("dialog.php");
include("menu.php");
$ls_Details_ = array(
"Location" => "Karlsruhe",
"Does" => "Coding",
"Contact" => Email("codingcat"),
"Website" => Url("http://www.alphanew.net/")
);
ProfileDialog("CodingCat", "images/codingcat.png", StringList($ls_Details_));
$ls_Details_ = array(
"Location" => "Mainz",
"Does" => "Coding",
"Contact" => Email("tggc"),
"Website" => Url("http://www.games-net.de/hosted/tggc/")
);
ProfileDialog("TGGC", "images/tggc.jpg", StringList($ls_Details_));
$ls_Details_ = array(
"Location" => "M&uuml;nster (Westf.)",
"Does" => "Coding",
"Contact" => Email("hel"),
);
ProfileDialog("Hel", "images/hel.jpg", StringList($ls_Details_));
$ls_Details_ = array(
"Location" => "Darmstadt",
"Does" => "Coding",
"Contact" => Email("xtr1m"),
"Website" => Url("http://www.xTr1m.com")
);
ProfileDialog("xTr1m", "images/xtr1m.jpg", StringList($ls_Details_));
$ls_Details_ = array(
"Location" => "Mainz",
"Does" => "Music",
"Contact" => Email("rayn"),
"Website" => Url("http://ptrance.de")
);
ProfileDialog("ptrance'raYn", "images/rayn.jpg", StringList($ls_Details_));
include("footer.php");
?>

33
web/menu.php Normal file
View File

@@ -0,0 +1,33 @@
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?>"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>BluFlame</title>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="scripts.js" ></script>
</head>
<body>
<table id="menu">
<tr class="top">
<td></td>
<td class="title-logo">blu-flame.org</td>
<td class="title-biglogo"><div id="biglogo"></div></td>
</tr>
<tr>
<td class="left-title-bar"></td>
<td class="title-item">
<table id="menu-items">
<tr>
<td>
<a href="index.php">:: home</a>
<a href="members.php">:: members</a>
<a href="prods.php">:: prods</a>
<a href="guestbook.php">:: guestbook</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="logo"></div>

20
web/music.php Normal file
View File

@@ -0,0 +1,20 @@
<?php
include("dialog.php");
include("menu.php");
$ls_Song_ = array(
"title" => "Something",
"url" => "music/rn_something.mp3",
"duration" => "03:06",
"description" => array(
"Artist" => "raYn",
"Released" => "2007"
)
);
MusicEntry($ls_Song_);
include("footer.php");
?>

BIN
web/musicplayer.swf Normal file

Binary file not shown.

169
web/prods.php Normal file
View File

@@ -0,0 +1,169 @@
<?php
include("dialog.php");
include("menu.php");
// Goodbye Breakpoint;
$ls_Details_ = array(
"Released" => "Breakpoint 2009",
"Ranked" => "6th",
"Type" => "Executable music (newscool)",
"Download" => "<a href=\"files/bf-goodbye_bp.exe\">exe</a> <a href=\"files/bf-goodbye_bp.ogg\">ogg</a> <a href=\"files/bf-goodbye_bp.mpg\">live footage</a> <a href=\"http://www.youtube.com/watch?v=N1TXCnD8qTA\">youtube</a>"
);
ProfileDialog("Goodbye Breakpoint", "about:blank", StringList($ls_Details_));
// Timeless;
$ls_Details_ = array(
"Released" => "Function 2009",
"Ranked" => "6th",
"Type" => "PC Demo",
"Download" => "<a href=\"files/bf-timeless.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=53865\">pouet</a> <a href=\"files/timeless-720p.avi\">720p video</a>"
);
ProfileDialog("Timeless", "images/timeless.jpg", StringList($ls_Details_));
// Lunaquatic;
$ls_Details_ = array(
"Released" => "Evoke 2009",
"Ranked" => "1st",
"Type" => "4k Intro",
"Download" => "<a href=\"files/lunaquatic.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=53569\">pouet</a> <a href=\"files/lunaquatic.avi\">720p video</a>"
);
ProfileDialog("Lunaquatic", "images/lunaquatic.jpg", StringList($ls_Details_));
// Valleyball;
$ls_Details_ = array(
"Released" => "Breakpoint 2009",
"Ranked" => "4th",
"Type" => "4k Intro",
"Download" => "<a href=\"files/bluflame_valleyball.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=52946\">pouet</a> <a href=\"files/valleyball_1280x720.avi\">720p video</a>"
);
ProfileDialog("Valleyball", "images/valleyball_collage.png", StringList($ls_Details_));
// Teh Fag Vendetta 2009;
$ls_Song_ = array(
"title" => "Teh Fag Vendetta 2009",
"url" => "music/bf!ptr_-_Teh_Fag_Vendetta_2009.mp3",
"duration" => "4:00",
"description" => array(
"Artist" => "ptrance",
"Released" => "Breakpoint 2009",
"Ranked" => "14th",
"Comment" => "Follow up of a tune, which participated in the Trance is gay competition somewhen in 2005. <br> For more info visit: http://tigc.ptrance.de"
)
);
MusicEntry($ls_Song_);
// Deep inside my eardrums;
$ls_Details_ = array(
"Artist" => "raYn",
"Released" => "Breakpoint 2009",
"Ranked" => "8th",
"Type" => "Executable music",
"Download" => "<a href=\"music/bf!raYn_-_Deep_Inside_My_Eardrums.exe\">local</a>",
"Comment" => "Uses 4klang by gopher/alcatraz"
);
ProfileDialog("Deep inside my eardrums", "about:blank", StringList($ls_Details_));
// Space colony;
$ls_Details_ = array(
"Released" => "tUM 2008",
"Ranked" => "4th",
"Type" => "4k Intro",
"Download" => "<a href=\"files/bluflame-spacecolony.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=52357\">pouet</a>"
);
ProfileDialog("Space colony", "images/space-colony.jpg", StringList($ls_Details_));
// I Broke My Leg On This 64KiloByte Shizzle!;
$ls_Song_ = array(
"title" => "I Broke My Leg On This 64KiloByte Shizzle!",
"url" => "music/bf!ptr_-_ibmlot64kbs.mp3",
"duration" => "03:42",
"description" => array(
"Artist" => "ptrance",
"Released" => "2008",
"Comment" => "A fastforward trance song in <64k"
)
);
MusicEntry($ls_Song_);
// Hauptsache Strobo!;
$ls_Details_ = array(
"Released" => "Buenzli 2008",
"Ranked" => "3rd",
"Type" => "4k Intro",
"Download" => "<a href=\"files/strobo.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=51284\">pouet</a>"
);
ProfileDialog("Hauptsache Strobo! by Stroboholics & BluFlame", "images/strobo.gif", StringList($ls_Details_));
// I guess i'm a loop;
$ls_Song_ = array(
"title" => "I Guess I'm A Loop",
"url" => "files/bf!ptr_-_imaloop.mp3",
"duration" => "00:12",
"description" => array(
"Artist" => "ptrance",
"Released" => "2008"
)
);
MusicEntry($ls_Song_);
// Crowbar Massacre;
$ls_Song_ = array(
"title" => "Crowbar Massacre",
"url" => "music/Beatslaughter_and_raYn_-_Crowbar_Massacre.mp3",
"duration" => "03:33",
"description" => array(
"Artist" => "Beatslaughter & raYn",
"Released" => "2008"
)
);
MusicEntry($ls_Song_);
// Fractoblob;
$ls_Details_ = array(
"Released" => "evoke 2008",
"Ranked" => "2nd",
"Type" => "4k Intro",
"Download" => "<a href=\"files/fractoblob.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=51215\">pouet</a> <a href=\"files/fractoblob.avi\">xvid video</a>"
);
ProfileDialog("fractoblob", "images/fractoblob.png", StringList($ls_Details_));
// Eternal Flame;
$ls_Song_ = array(
"title" => "Eternal Flame (C64 SID remix)",
"url" => "music/ryn_-_eternal_sid.mp3",
"duration" => "03:09",
"description" => array(
"Artist" => "raYn",
"Original Artist" => "Cindy Lauper",
"Released" => "2008"
)
);
MusicEntry($ls_Song_);
// Crystal Cowboy;
$ls_Details_ = array(
"Released" => "tUM 2007",
"Ranked" => "4th",
"Type" => "4k Intro",
"Download" => "<a href=\"files/crystal_cowboy.zip\">local</a> <a href=\"http://pouet.net/prod.php?which=34536\">pouet</a>"
);
ProfileDialog("Crystal Cowboy", "images/crystal_cowboy.jpg", StringList($ls_Details_));
// Something;
$ls_Song_ = array(
"title" => "Something",
"url" => "music/ryn_-_something.mp3",
"duration" => "03:06",
"description" => array(
"Artist" => "raYn",
"Released" => "2007",
"Comment" => "Drum and Bass in 96k"
)
);
MusicEntry($ls_Song_);
include("footer.php");
?>

65
web/scripts.js Normal file
View File

@@ -0,0 +1,65 @@
var http = createRequestObject();
function createRequestObject() {
var ro;
try
{
ro = new XMLHttpRequest();
}
catch (error)
{
try
{
ro = new ActiveXObject('Microsoft.XMLHTTP');
}
catch (error)
{
return false;
}
}
return ro;
}
function handleResponse()
{
if (http.readyState == 4)
{
var e = document.getElementById("gbform");
var response = http.responseText;
if (response != 'ok')
{
alert(response);
}
else
{
window.location.reload();
}
}
}
function content(request)
{
http.open('get', request);
http.onreadystatechange = handleResponse;
http.send(null);
}
function gbpost()
{
var e = document.getElementById("gbform");
if (e.style.display == 'none' || e.style.display == '')
{
e.style.display = "table";
}
else
{
e.style.display = "none";
}
}
function gbsubmit()
{
var poster = document.getElementById("poster").value;
var text = document.getElementById("text").value;
content("gb-submit.php?poster=" + poster + "&text=" + text);
}

300
web/style.css Normal file
View File

@@ -0,0 +1,300 @@
html,body {
margin: 0px;
padding: 0px;
background: url(images/julia.jpg) fixed no-repeat top right;
}
table#menu
{
width: 100%;
margin: 0;
margin-bottom: 30px;
padding: 0;
border-collapse: collapse;
}
table#menu tr.top
{
height: 70px;
}
table#menu td.title-logo
{
vertical-align: bottom;
color: #929292;
background-color: white;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 9px;
padding-bottom: 4px;
}
table#menu td.title-biglogo
{
vertical-align: top;
text-align: right;
}
table#menu td.left-title-bar
{
width: 135px;
height: 32px;
background: url(images/title-left.png) no-repeat;
}
table#menu td.title-item
{
height: 32px;
background: url(images/title-bar-repeat.png) repeat-x;
}
div#logo
{
position: absolute;
top: 0px;
left: 0px;
background: url(images/logo-top.png);
width: 136px;
height: 154px;
}
table#menu-items
{
width: 500px;
margin: 0;
padding: 0;
border-collapse: collapse;
}
table#menu-items a
{
padding-left: 20px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 11px;
font-weight: bold;
text-decoration: none;
}
a
{
color: black;
}
a:hover
{
color: #D04010;
}
div#biglogo
{
position: absolute;
width: 459px;
height: 60px;
right: 0px;
background: url(images/logo.png);
}
table.dialog
{
margin-left: 200px;
margin-bottom: 30px;
padding: 0;
border-collapse: collapse;
width: 500px;
}
table.dialog td.tl
{
background: url(images/dialog-tl.png) no-repeat;
width: 15px;
height: 33px;
}
table.dialog td.tc
{
background: url(images/dialog-tc.png) repeat-x;
height: 33px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 13px;
font-weight: bold;
}
table.dialog td.tr
{
background: url(images/dialog-tr.png) no-repeat;
width: 6px;
height: 33px;
}
table.dialog td.lc
{
background: url(images/dialog-lc.png) repeat-y;
width: 15px;
}
table.dialog td.rc
{
background: url(images/dialog-rc.png) repeat-y;
width: 6px;
}
table.dialog td.c
{
padding: 20px;
font-family: Verdana,Arial,Helvetica,sans-serif;
vertical-align: top;
font-size: 10px;
background-color: white;
}
table.dialog td.bl
{
background: url(images/dialog-bl.png) no-repeat;
width: 15px;
height: 6px;
}
table.dialog td.bc
{
background: url(images/dialog-bc.png) repeat-x;
height: 6px;
}
table.dialog td.br
{
background: url(images/dialog-br.png) no-repeat;
width: 6px;
height: 6px;
}
table.profile td
{
vertical-align: top;
}
table.profile td.content
{
vertical-align: top;
padding-left: 10px;
}
table.string-list
{
margin: 0;
padding: 0;
border-collapse: collapse;
}
table.string-list td
{
padding-right: 10px;
vertical-align: top;
}
table.string-list td.list-item
{
white-space: nowrap;
font-weight: bold;
}
table.guestbook
{
margin: 0;
padding: 0;
border-collapse: collapse;
width: 100%;
}
table.guestbook td.guest-date
{
font-weight: bold;
background: url(images/gb-background.png) repeat-x bottom;
border-bottom: 1px solid black;
}
table.guestbook td.guest-poster
{
font-weight: bold;
background: url(images/gb-background.png) repeat-x bottom;
border-bottom: 1px solid black;
text-align: right;
}
table.guestbook td.guest-text
{
padding-left: 20px;
padding-top: 3px;
padding-bottom: 15px;
}
div.url-bar
{
width: 100%;
text-align: center;
padding-bottom: 10px;
}
table.form
{
margin: 0;
padding: 0;
border-collapse: collapse;
}
table.form td
{
font-weight: bold;
vertical-align: top;
}
table.form td.label
{
width: 50px;
}
table.form td.submit
{
text-align: center;
padding-bottom: 5px;
}
table.form input
{
width: 100%;
}
table.form textarea
{
width: 100%;
}
table#gbform
{
display: none;
width: 100%;
}
table.music
{
margin: 0;
padding: 0;
border-collapse: collapse;
width: 100%;
display: inline;
margin-top: 5px;
font-family: Verdana,Arial,Helvetica,sans-serif;
font-size: 13px;
font-weight: bold;
}
table.music td
{
height: 30px;
vertical-align: middle;
}
table.music td.player
{
width: 20px;
padding-top: 5px;
vertical-align: middle;
}