function avatarlist($avatarcategory) { global $user, $userinfo, $cookie, $module_name; cookiedecode($user); getusrinfo($user); include "header.php"; if (is_user($user) and strtolower($userinfo['username']) == strtolower($cookie[1]) and $userinfo['user_password'] == $cookie[2]) { // SecurityReason Fix 2005 - sp3x -> check if we are user if not then Access Denied $avatarcatname = ereg_replace("_", " ", $avatarcategory); $avatarcategory = htmlspecialchars($avatarcategory); //SecurityReason Fix 2005 - sp3x title("" . $avatarcategory . " Avatar Gallery"); Opentable(); nav(); CloseTable(); echo "<br>"; Opentable(); echo "<center><font class=\"title\"><b>" . _AVAILABLEAVATARS . " on category " . $avatarcatname . "</b></font><br><br>"; echo "<b>To Select Your Avatar Click On It</b><br><br></center>"; Opentable2(); echo "<center>"; $d = dir("modules/Forums/images/avatars/{$avatarcategory}"); $temcount = 1; while (false !== ($entry = $d->read())) { if (preg_match('/(\\.gif$|\\.png$|\\.jpg|\\.jpeg)$/is', $entry)) { if ($entry != '.' && $entry != '..') { $patterns[0] = "/\\.gif/"; $patterns[1] = "/\\.png/"; $patterns[2] = "/\\.jpg/"; $patterns[3] = "/\\.jpeg/"; $patterns[4] = "/-/"; $patterns[5] = "/_/"; $replacements[5] = ""; $replacements[4] = " "; $replacements[3] = ""; $replacements[2] = ""; $replacements[1] = ""; $replacements[0] = ""; ksort($patterns); ksort($replacements); $entryname = preg_replace($patterns, $replacements, $entry); $a = 1; echo "<a href=\"modules.php?name={$module_name}&op=avatarsave&category={$avatarcategory}&avatar={$entry}\"><img src=\"modules/Forums/images/avatars/{$avatarcategory}/{$entry}\" border=\"0\" alt=\"{$entryname}\" title=\"{$entryname}\" hspace=\"10\" vspace=\"10\"></a>"; } if ($temcount == 10) { echo "<br>"; $temcount -= 10; } $temcount++; } } echo "</center>"; CloseTable2(); echo "<center><br>" . "" . _GOBACK . "" . "<br></center>"; $d->close(); CloseTable(); include "footer.php"; } else { die("Access Denied"); } }
function themearticle($aid, $informant, $datetime, $title, $thetext, $topic, $topicname, $topicimage, $topictext) { global $admin, $sid, $tipath, $admin_file; $ThemeSel = get_theme(); if (file_exists("themes/{$ThemeSel}/images/topics/{$topicimage}")) { $t_image = "themes/{$ThemeSel}/images/topics/{$topicimage}"; } else { $t_image = "{$tipath}{$topicimage}"; } Opentable(); echo "<font class=\"option\" color=\"#363636\"><b>{$title}</b></font><br>\n" . "<font class=\"content\">Posted on {$datetime} by "; formatAidHeader($aid); if (is_admin($admin)) { echo "<br>[ <a href=\"" . $admin_file . ".php?op=EditStory&sid={$sid}\">" . _EDIT . "</a> | <a href=\"" . $admin_file . ".php?op=RemoveStory&sid={$sid}\">" . _DELETE . "</a> ]\n"; } echo "<br><br>"; echo "<a href=\"modules.php?name=News&new_topic={$topic}\"><img src=\"{$t_image}\" border=\"0\" Alt=\"{$topictext}\" align=\"right\" hspace=\"10\" vspace=\"10\"></a>\n"; FormatStory($thetext, $notes = "", $aid, $informant); echo "<br>\n\n\n"; CloseTable(); }
function info_box($graphic, $message) { // Function to generate a message box with a graphic inside // $graphic value can be whichever: warning, caution, tip, note. // Then the graphic value with the extension .gif should be present inside /images/system/ folder if (file_exists("images/system/" . $graphic . ".gif") and !empty($message)) { Opentable(); $graphic = filter($graphic, "nohtml"); $message = filter($message, ""); echo "<table align=\"center\" border=\"0\" width=\"80%\" cellpadding=\"10\"><tr>" . "<td valign=\"top\"><img src=\"images/system/" . $graphic . ".gif\" border=\"0\" alt=\"\" title=\"\" width=\"34\" height=\"34\"></td>" . "<td valign=\"top\">{$message}</td>" . "</tr></table>"; CloseTable(); } else { return; } }
function avatarlist($avatarcategory) { global $module_name; include "header.php"; $avatarcatname = ereg_replace("_", " ", $avatarcategory); title("" . $avatarcategory . " Avatar Gallery"); Opentable(); nav(); CloseTable(); Opentable(); echo "<center><font class=\"title\"><b>" . _AVAILABLEAVATARS . " on category " . $avatarcatname . "</b></font><br><br>"; echo "<b>To Select Your Avatar Click On It</b><br><br></center>"; Opentable2(); echo "<center>"; $d = dir("modules/Forums/images/avatars/{$avatarcategory}"); $temcount = 1; while (false !== ($entry = $d->read())) { if (preg_match('/(\\.gif$|\\.png$|\\.jpg|\\.jpeg)$/is', $entry)) { if ($entry != '.' && $entry != '..') { $patterns[0] = "/\\.gif/"; $patterns[1] = "/\\.png/"; $patterns[2] = "/\\.jpg/"; $patterns[3] = "/\\.jpeg/"; $patterns[4] = "/-/"; $patterns[5] = "/_/"; $replacements[5] = ""; $replacements[4] = " "; $replacements[3] = ""; $replacements[2] = ""; $replacements[1] = ""; $replacements[0] = ""; ksort($patterns); ksort($replacements); $entryname = preg_replace($patterns, $replacements, $entry); $a = 1; echo "<a href=\"modules.php?name={$module_name}&op=avatarsave&category={$avatarcategory}&avatar={$entry}\"><img src=\"modules/Forums/images/avatars/{$avatarcategory}/{$entry}\" border=\"0\" alt=\"{$entryname}\" title=\"{$entryname}\" hspace=\"10\" vspace=\"10\"></a>"; } if ($temcount == 10) { echo "<br>"; $temcount -= 10; } $temcount++; } } echo "</center>"; CloseTable2(); echo "<center><br>" . "" . _GOBACK . "" . "<br></center>"; $d->close(); CloseTable(); include "footer.php"; }
function _copyplayers($eventid, $voldteam, $vtname) { // simple copy function // retrieve players from old team and add to new team .... global $TEAM_LEVEL, $dbi, $pgreenpic, $predpic; if ($TEAM_LEVEL < 3) { die("<h3>No access ....</h3>"); } echo "<h3>OLD Team = {$voldteam}</h3>"; // ?????????? uhuhuh how do we get the new TEAMID ???? // must be a unique combination of event and name (no id as yet ...) $prec = sql_query("Select id,tname from tblteam where tevent_id={$eventid} and tname=\"{$vtname}\"", $dbi); $newTeam = sql_fetch_array($prec, $dbi); echo "<h3>NEW Team = " . $newTeam['id'] . "</h3>"; $vnewteam = $newTeam['id']; if ($vnewteam == 0) { die("Error :: New Team not found ...({$prec})"); } echo "<p>Anstehend wird eine Liste aller transferierten Spieler angezeigt, GRÜN bedeutet erfolgreich, ROT = fehlgeschlagen</p>"; // select from tblteamplayer, - insert into tblteamplayer ... // select only regular players with type>0 ... $prec = sql_query("select lteamid,lplayerid,ltype,pfname,plname,pfkey1,ppassnr from tblteamplayer left join tplayer on lplayerid=pid where lteamid={$voldteam} and ltype>0", $dbi); Opentable(); while (list($lteamid, $lplayerid, $ltype, $pfname, $plname, $pfkey1, $ppassnr) = sql_fetch_row($prec, $dbi)) { echo "<tr><td>{$lplayerid}</td><td>{$pfname}</td><td>{$plname}</td><td>{$ppassnr} / {$pfkey1}</td>"; // INSERTS ...unqid,event,team,player,active $qry = "insert into tblteamplayer values(0,{$eventid},{$vnewteam},{$lplayerid},1,{$ltype})"; $pqry = sql_query($qry, $dbi); if ($pqry == 1) { echo "<td>{$pgreenpic}</td></tr>"; } else { echo "<td>({$pqry})={$predpic}</td></tr>"; } #debug($qry); } CloseTable(); }