Killing ending whitespace to remove future noise on commits

This commit is contained in:
Laurent Raufaste 2013-05-08 23:12:00 -04:00
parent a2d8ccab98
commit 4e5ae7a8b1
85 changed files with 436 additions and 436 deletions

18
add.php
View File

@ -27,7 +27,7 @@ switch ($_POST["type"]) {
if($_SESSION["SCENEID_ID"]==78655) if($_SESSION["SCENEID_ID"]==78655)
$errormessage[]="nope."; $errormessage[]="nope.";
if($_REQUEST["message"]&&!$errormessage) if($_REQUEST["message"]&&!$errormessage)
{ {
$who=$_SESSION["SCENEID_ID"]; $who=$_SESSION["SCENEID_ID"];
$query="SELECT who FROM oneliner ORDER BY quand DESC LIMIT 1"; $query="SELECT who FROM oneliner ORDER BY quand DESC LIMIT 1";
@ -37,14 +37,14 @@ switch ($_POST["type"]) {
$result=mysql_query($query); $result=mysql_query($query);
$lastmine=mysql_fetch_assoc($result); $lastmine=mysql_fetch_assoc($result);
if($lastone["who"]!=$who && trim($lastmine["message"])!=trim($message)) if($lastone["who"]!=$who && trim($lastmine["message"])!=trim($message))
{ {
$title="You've successfully added the following oneline:"; $title="You've successfully added the following oneline:";
$query="INSERT INTO oneliner SET who=".$who.", quand=NOW(), message='".addslashes($message)."'"; $query="INSERT INTO oneliner SET who=".$who.", quand=NOW(), message='".addslashes($message)."'";
mysql_query($query); mysql_query($query);
//$title="HOLD ON A SEC (i'm fixing shit.) --garg"; //$title="HOLD ON A SEC (i'm fixing shit.) --garg";
} }
else else
{ {
$title="ERROR! DOUBLEPOST == ROB IS JARIG!"; $title="ERROR! DOUBLEPOST == ROB IS JARIG!";
} }
@ -54,12 +54,12 @@ switch ($_POST["type"]) {
// endif; // endif;
break; break;
case "topic": case "topic":
$url="bbs.php"; $url="bbs.php";
//if (stristr($topic,"random")!==FALSE) //if (stristr($topic,"random")!==FALSE)
if (date("Y-m-d")=="2008-11-19") if (date("Y-m-d")=="2008-11-19")
$errormessage[] = "bbs is closed today. go use the other 5000 threads for a change."; $errormessage[] = "bbs is closed today. go use the other 5000 threads for a change.";
if($topic&&$message&&!$errormessage) if($topic&&$message&&!$errormessage)
{ {
$query="SELECT topic FROM bbs_topics ORDER BY lastpost DESC LIMIT 1"; $query="SELECT topic FROM bbs_topics ORDER BY lastpost DESC LIMIT 1";
@ -90,7 +90,7 @@ switch ($_POST["type"]) {
die("FU!"); die("FU!");
if (strstr($message,"netetrader.com")!==false) if (strstr($message,"netetrader.com")!==false)
die("FU!"); die("FU!");
$query="SELECT author,topic,post FROM bbs_posts ORDER BY added DESC LIMIT 1"; $query="SELECT author,topic,post FROM bbs_posts ORDER BY added DESC LIMIT 1";
$result=mysql_query($query); $result=mysql_query($query);
$lastone=mysql_fetch_assoc($result); $lastone=mysql_fetch_assoc($result);
@ -124,7 +124,7 @@ switch ($_POST["type"]) {
$message=$comment; $message=$comment;
if (strstr($comment,"freecliptv.samsonshome.de")!==false) if (strstr($comment,"freecliptv.samsonshome.de")!==false)
$errormessage[] = "please post video links to <a href='http://www.pouet.net/topic.php?which=1024'>this thread</a>"; $errormessage[] = "please post video links to <a href='http://www.pouet.net/topic.php?which=1024'>this thread</a>";
if (strstr($comment,"EmwW_6kUdHw")!==false) if (strstr($comment,"EmwW_6kUdHw")!==false)
$errormessage[] = "please post video links to <a href='http://www.pouet.net/topic.php?which=1024'>this thread</a> - also, your link has been removed from youtube."; $errormessage[] = "please post video links to <a href='http://www.pouet.net/topic.php?which=1024'>this thread</a> - also, your link has been removed from youtube.";
@ -156,7 +156,7 @@ switch ($_POST["type"]) {
$timestart = microtime_float(); $timestart = microtime_float();
mysql_query($query); mysql_query($query);
$time["query3"] = microtime_float() - $timestart; $time["query3"] = microtime_float() - $timestart;
//update vote info //update vote info
unset($commentss); unset($commentss);
//unset($checktable); //unset($checktable);
@ -193,7 +193,7 @@ switch ($_POST["type"]) {
$timestart = microtime_float(); $timestart = microtime_float();
mysql_query($query); mysql_query($query);
$time["query5"] = microtime_float() - $timestart; $time["query5"] = microtime_float() - $timestart;
} }
$timestart = microtime_float(); $timestart = microtime_float();
//create_cache_module("latest_comments", "SELECT prods.id,prods.name,prods.type,prods.group1,prods.group2,prods.group3,comments.who,users.nickname,users.avatar FROM prods JOIN comments LEFT JOIN users ON users.id=comments.who WHERE comments.which=prods.id ORDER BY comments.quand DESC LIMIT 20",1); //create_cache_module("latest_comments", "SELECT prods.id,prods.name,prods.type,prods.group1,prods.group2,prods.group3,comments.who,users.nickname,users.avatar FROM prods JOIN comments LEFT JOIN users ON users.id=comments.who WHERE comments.which=prods.id ORDER BY comments.quand DESC LIMIT 20",1);

View File

@ -45,7 +45,7 @@ $typ = explode(",", $o->p1type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->p1id?>"><?=$o->p1name?></a> <a href="prod.php?which=<?=$o->p1id?>"><?=$o->p1name?></a>
</td> </td>
<td> <td>
@ -57,7 +57,7 @@ $typ = explode(",", $o->p2type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->p2id?>"><?=$o->p2name?></a> <a href="prod.php?which=<?=$o->p2id?>"><?=$o->p2name?></a>
</td> </td>
</tr> </tr>

View File

@ -21,4 +21,4 @@ if (!($_GET['latest'] == '1')) {
echo $row['prod'] . "\t" . $row['party'] . "\t" . $row['party_year'] . "\t" . $row['partycompo'] . "\t" . $row['party_place'] . "\n"; echo $row['prod'] . "\t" . $row['party'] . "\t" . $row['party_year'] . "\t" . $row['partycompo'] . "\t" . $row['party_place'] . "\n";
} }
} }
?> ?>

View File

@ -8,4 +8,4 @@ $result = mysql_query($query);
while($row = mysql_fetch_array($result)) { while($row = mysql_fetch_array($result)) {
echo $row['prod'] . "\t" . $row['type'] . "\t" . $row['link'] . "\n"; echo $row['prod'] . "\t" . $row['type'] . "\t" . $row['link'] . "\n";
} }
?> ?>

View File

@ -12,4 +12,4 @@ while($row = mysql_fetch_array($result)) {
echo $row['id'] . "\t" . iconv('iso-8859-1', 'utf-8', $row['name']) . "\t" . $row['web'] . "\t" . $row['csdb'] . "\t" . echo $row['id'] . "\t" . iconv('iso-8859-1', 'utf-8', $row['name']) . "\t" . $row['web'] . "\t" . $row['csdb'] . "\t" .
$row['zxdemo'] . "\t" . iconv('iso-8859-1', 'utf-8', $row['acronym']) . "\n"; $row['zxdemo'] . "\t" . iconv('iso-8859-1', 'utf-8', $row['acronym']) . "\n";
} }
?> ?>

View File

@ -11,4 +11,4 @@ $result = mysql_query($query);
while($row = mysql_fetch_array($result)) { while($row = mysql_fetch_array($result)) {
echo $row['id'] . "\t" . iconv('iso-8859-1', 'utf-8', $row['name']) . "\t" . $row['web'] . "\n"; echo $row['id'] . "\t" . iconv('iso-8859-1', 'utf-8', $row['name']) . "\t" . $row['web'] . "\n";
} }
?> ?>

View File

@ -8,4 +8,4 @@ $result = mysql_query($query);
while($row = mysql_fetch_array($result)) { while($row = mysql_fetch_array($result)) {
echo $row['id'] . "\t" . $row['party'] . "\t" . $row['year'] . "\t" . $row['csdb'] . "\t" . $row['zxdemo'] . "\t" . $row['slengpung'] . "\n"; echo $row['id'] . "\t" . $row['party'] . "\t" . $row['year'] . "\t" . $row['csdb'] . "\t" . $row['zxdemo'] . "\t" . $row['slengpung'] . "\n";
} }
?> ?>

View File

@ -8,4 +8,4 @@ $result = mysql_query($query);
while($row = mysql_fetch_array($result)) { while($row = mysql_fetch_array($result)) {
echo $row['id'] . "\t" . $row['name'] . "\t" . $row['icon'] . "\n"; echo $row['id'] . "\t" . $row['name'] . "\t" . $row['icon'] . "\n";
} }
?> ?>

View File

@ -25,4 +25,4 @@ while($bailout < 1000000) {
break; break;
} }
} }
?> ?>

View File

@ -20,4 +20,4 @@ while($row = mysql_fetch_array($result)) {
} }
echo $row['id'] . "\t" . $row['prod'] . "\t" . $format . "\n"; echo $row['id'] . "\t" . $row['prod'] . "\t" . $format . "\n";
} }
?> ?>

View File

@ -10,4 +10,4 @@ if ($row = mysql_fetch_array($result)) {
} else { } else {
echo 'none'; echo 'none';
} }
?> ?>

View File

@ -8,4 +8,4 @@ $result = mysql_query($query);
while($row = mysql_fetch_array($result)) { while($row = mysql_fetch_array($result)) {
echo $row['id'] . '|' . $row['name'] . '|' . $row['download'] . "\n"; echo $row['id'] . '|' . $row['name'] . '|' . $row['download'] . "\n";
} }
?> ?>

View File

@ -21,7 +21,7 @@ function write($txt,$a,$b,$br,$bg,$bb)
imagecolorset($fnt,$f2,($br+255)/2,($bg+255)/2,($bb+255)/2); imagecolorset($fnt,$f2,($br+255)/2,($bg+255)/2,($bb+255)/2);
imagecolorset($fnt,$f3,255,255,255); imagecolorset($fnt,$f3,255,255,255);
for($i=0;$i<strlen($txt);$i++) for($i=0;$i<strlen($txt);$i++)
{ {
$chr=ord($txt{$i}); $chr=ord($txt{$i});
$x=$chr%16*$c_w; $x=$chr%16*$c_w;
$y=($chr-$chr%16)/16*$c_h; $y=($chr-$chr%16)/16*$c_h;
@ -124,7 +124,7 @@ for($i=0;$i<$nbr;$i++)
{ {
$len=strlen($txt[$i]); $len=strlen($txt[$i]);
for($j=0;$j<$len+1;$j++) for($j=0;$j<$len+1;$j++)
{ {
$chr=ord($txt[$i]{$j}); $chr=ord($txt[$i]{$j});
if($chr==9) $chr=32; if($chr==9) $chr=32;
$x=$chr%16*$c_w; $x=$chr%16*$c_w;
@ -141,4 +141,4 @@ write("generated by pouet lobstergod REZ! (".$t."s)",1,$i_h-7,$r3,$g3,$b3);
header("Content-type: image/png"); header("Content-type: image/png");
imagepng($im); imagepng($im);
?> ?>

View File

@ -12,8 +12,8 @@ print("<br />");
$year = $sceneorgyear; $year = $sceneorgyear;
if (!$year) if (!$year)
die("all done for now, see you next year!"); die("all done for now, see you next year!");
if ($_SESSION["SCENEID_ID"]) if ($_SESSION["SCENEID_ID"])
{ {
if ($action=='alter') if ($action=='alter')
{ {
@ -29,7 +29,7 @@ if ($_SESSION["SCENEID_ID"])
$sqlc = array(); $sqlc = array();
$prod = (int)$prod; $prod = (int)$prod;
if ($_POST["cat"]) { if ($_POST["cat"]) {
foreach ($_POST["cat"] as $v) foreach ($_POST["cat"] as $v)
$sqlc[(int)$v] = (int)$prod; $sqlc[(int)$v] = (int)$prod;
@ -39,18 +39,18 @@ if ($_SESSION["SCENEID_ID"])
if (isset($_POST["cat".$x])) if (isset($_POST["cat".$x]))
$sqlc[$x] = (int)$_POST["cat".$x]; $sqlc[$x] = (int)$_POST["cat".$x];
} }
foreach ($sqlc as $k=>$v) { foreach ($sqlc as $k=>$v) {
$v = (int)$v; $v = (int)$v;
if ($v >= 0) if ($v >= 0)
{ {
$r = mysql_fetch_object(mysql_query(sprintf("select date from prods where id=%d",$v))); $r = mysql_fetch_object(mysql_query(sprintf("select date from prods where id=%d",$v)));
if (substr($r->date,0,4)!=$year) continue; if (substr($r->date,0,4)!=$year) continue;
$query = "update awardscand_".$year." set cat".$k."='".(int)$v."' where user='".$_SESSION["SCENEID_ID"]."'"; $query = "update awardscand_".$year." set cat".$k."='".(int)$v."' where user='".$_SESSION["SCENEID_ID"]."'";
mysql_query($query); mysql_query($query);
} }
} }
} }
$query = "SELECT * FROM awardscand_".$year." WHERE user='".$_SESSION["SCENEID_ID"]."'"; $query = "SELECT * FROM awardscand_".$year." WHERE user='".$_SESSION["SCENEID_ID"]."'";
@ -132,7 +132,7 @@ foreach($awardscat[$year] as $x=>$name) {
most outstanding 4k intro from <?=$year?>. most outstanding 4k intro from <?=$year?>.
</td> </td>
</tr> </tr>
<!-- <!--
<tr> <tr>
<td bgcolor="#557799" >best animation</td> <td bgcolor="#557799" >best animation</td>
<td bgcolor="#557799"> <td bgcolor="#557799">
@ -143,8 +143,8 @@ foreach($awardscat[$year] as $x=>$name) {
<tr> <tr>
<td bgcolor="#557799" >best oldschool</td> <td bgcolor="#557799" >best oldschool</td>
<td bgcolor="#557799"> <td bgcolor="#557799">
most outstanding demo on an oldschool platform from <?=$year?>. the platform most outstanding demo on an oldschool platform from <?=$year?>. the platform
of the demo is limited to non-modern computers and alternative platforms of the demo is limited to non-modern computers and alternative platforms
that can be considered "low-end". that can be considered "low-end".
</td> </td>
</tr> </tr>
@ -194,8 +194,8 @@ foreach($awardscat[$year] as $x=>$name) {
<td bgcolor="#557799"> <td bgcolor="#557799">
a group (or artist) that raised their personal bar significantly a group (or artist) that raised their personal bar significantly
during <?=$year?>. promising talents that might be tomorrows best demo makers. during <?=$year?>. promising talents that might be tomorrows best demo makers.
this doesn't need to be necessarily a newcomer group, rather than this doesn't need to be necessarily a newcomer group, rather than
someone receiving deserved attention after rising above mediocrity. someone receiving deserved attention after rising above mediocrity.
</td> </td>
</tr> </tr>
<tr> <tr>
@ -218,7 +218,7 @@ foreach($awardscat[$year] as $x=>$name) {
<br /> <br />
<? <?
} }
else else
{ {
?> ?>
<style type="text/css"> <style type="text/css">
@ -246,7 +246,7 @@ else
} }
#container { #container {
width: 750px; width: 750px;
margin: 0px auto; margin: 0px auto;
} }
</style> </style>
@ -257,7 +257,7 @@ else
</tr> </tr>
<tr> <tr>
<td class='bg1'> <td class='bg1'>
<form action="login.php" method="post"> <form action="login.php" method="post">
<input type="text" name="login" value="SceneID" size="15" maxlength="16" onfocus="this.value=''"><br /> <input type="text" name="login" value="SceneID" size="15" maxlength="16" onfocus="this.value=''"><br />
<input type="password" name="password" value="password" size="15" onfocus="javascript:if(this.value=='password') this.value='';"><br /> <input type="password" name="password" value="password" size="15" onfocus="javascript:if(this.value=='password') this.value='';"><br />
@ -265,7 +265,7 @@ else
<a href="account.php">register here</a><br /> <a href="account.php">register here</a><br />
<input type="image" src="gfx/submit.gif"> <input type="image" src="gfx/submit.gif">
</form> </form>
</td> </td>
</tr> </tr>
</table> </table>

20
bbs.php
View File

@ -43,7 +43,7 @@ switch($order) {
case "category": $query.=" ORDER BY bbs_topics.category"; break; case "category": $query.=" ORDER BY bbs_topics.category"; break;
default: $query.=" ORDER BY bbs_topics.lastpost DESC"; break; default: $query.=" ORDER BY bbs_topics.lastpost DESC"; break;
} }
$query.=" LIMIT ".(($page-1)*$topics_per_page).",".$topics_per_page; $query.=" LIMIT ".(($page-1)*$topics_per_page).",".$topics_per_page;
$result=mysql_query($query); $result=mysql_query($query);
while($tmp=mysql_fetch_assoc($result)) { while($tmp=mysql_fetch_assoc($result)) {
@ -53,7 +53,7 @@ while($tmp=mysql_fetch_assoc($result)) {
$sortlink ="bbs.php?"; $sortlink ="bbs.php?";
if ($_GET["categoryfilter"]) if ($_GET["categoryfilter"])
$sortlink ="categoryfilter=".$_GET["categoryfilter"]."&amp;"; $sortlink ="categoryfilter=".$_GET["categoryfilter"]."&amp;";
$sortlink.="order="; $sortlink.="order=";
$pagelink = "bbs.php?order=".$order; $pagelink = "bbs.php?order=".$order;
if ($_GET["categoryfilter"]) if ($_GET["categoryfilter"])
@ -111,7 +111,7 @@ if (canSeeBBSCategories()) {
</th> </th>
<? <?
} }
?> ?>
<th bgcolor="#224488"> <th bgcolor="#224488">
<table><tr> <table><tr>
<td> <td>
@ -189,11 +189,11 @@ if (canEditBBSCategories()) {
[<a href="edit_topic_category.php?which=<?=$topics[$i]["id"]?>">edit</a>] [<a href="edit_topic_category.php?which=<?=$topics[$i]["id"]?>">edit</a>]
<? <?
} }
?> ?>
</td> </td>
<? <?
} }
?> ?>
<td bgcolor="<?=$tdcolor?>"> <td bgcolor="<?=$tdcolor?>">
<a href="topic.php?which=<?=$topics[$i]["id"]?>"><b> <a href="topic.php?which=<?=$topics[$i]["id"]?>"><b>
@ -224,10 +224,10 @@ if (canEditBBSCategories()) {
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
<? endfor; ?> <? endfor; ?>
</tr> </tr>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<td colspan="<?=$row?>"> <td colspan="<?=$row?>">
@ -343,11 +343,11 @@ if (canSeeBBSCategories()) {
foreach ($thread_categories as $k=>$v) foreach ($thread_categories as $k=>$v)
printf("<option value='%d'%s>%s</option>\n",$k,0==$k?' selected="selected"':"",htmlspecialchars($v)); printf("<option value='%d'%s>%s</option>\n",$k,0==$k?' selected="selected"':"",htmlspecialchars($v));
?> ?>
</select> </select>
<br /> <br />
<? <?
} }
?> ?>
message:<br /> message:<br />
<textarea cols="80" rows="10" name="message"><?=$message?></textarea><br /> <textarea cols="80" rows="10" name="message"><?=$message?></textarea><br />
<div align="right"><a href="faq.php#BB Code"><b>BB Code</b></a> is allowed here</div> <div align="right"><a href="faq.php#BB Code"><b>BB Code</b></a> is allowed here</div>

View File

@ -19,7 +19,7 @@ function lettermenu($pattern) {
print(" ]<br />\n"); print(" ]<br />\n");
} }
function cmpcomments($a, $b) function cmpcomments($a, $b)
{ {
if ($a["lcom_quand"] == $b["lcom_quand"]) if ($a["lcom_quand"] == $b["lcom_quand"])
{ {
@ -119,7 +119,7 @@ if($which) {
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<th colspan="9"> <th colspan="9">
<center> <center>
<? <?
$i=0; $i=0;
print("<b><a href=\"bbses.php?which=".$bbses[$i]["id"]."\">".$bbses[$i]["name"]); print("<b><a href=\"bbses.php?which=".$bbses[$i]["id"]."\">".$bbses[$i]["name"]);
print("</a></b>"); print("</a></b>");
@ -230,7 +230,7 @@ if($which) {
<? } ?> <? } ?>
</table> </table>
</td> </td>
</tr> </tr>
<? if($bbsnfos): ?> <? if($bbsnfos): ?>
<tr> <tr>
@ -246,7 +246,7 @@ if($which) {
<? } ?> <? } ?>
</table> </table>
</td> </td>
</tr> </tr>
<? endif; ?> <? endif; ?>
</table> </table>
</td> </td>
@ -295,7 +295,7 @@ if($which) {
</tr> </tr>
<? endif; ?> <? endif; ?>
<? } ?> <? } ?>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<? if($which): ?> <? if($which): ?>
<? if(count($bbses)!=0): ?> <? if(count($bbses)!=0): ?>

View File

@ -28,7 +28,7 @@ if (!$_SESSION["nodonate"]) {
<td><img src="http://www.pouet.net/gfx/titles/coupdecoeur.gif"/></td> <td><img src="http://www.pouet.net/gfx/titles/coupdecoeur.gif"/></td>
</tr> </tr>
</table> </table>
<? <?
$fn = "cache/bpbudget.inc"; $fn = "cache/bpbudget.inc";
if (!file_exists($fn) || time() - filemtime($fn) < 3600) { if (!file_exists($fn) || time() - filemtime($fn) < 3600) {
@ -38,15 +38,15 @@ if (!file_exists($fn) || time() - filemtime($fn) < 3600) {
$content .= fgets($f, 4096); $content .= fgets($f, 4096);
} }
fclose($f); fclose($f);
$content = str_replace("<table","<table id='bpbudget'",$content); $content = str_replace("<table","<table id='bpbudget'",$content);
$f = fopen($fn,"w"); $f = fopen($fn,"w");
fwrite($f,$content); fwrite($f,$content);
fclose($f); fclose($f);
} }
echo file_get_contents($fn); echo file_get_contents($fn);
?> ?>
</td> </td>
</tr> </tr>
@ -60,4 +60,4 @@ echo file_get_contents($fn);
</div> </div>
<? <?
} }
?> ?>

12
cdc.php
View File

@ -191,13 +191,13 @@ endfor;
</tr></table> </tr></table>
</td> </td>
</tr> </tr>
<? for($i=0;$i<count($cdc);$i++): <? for($i=0;$i<count($cdc);$i++):
if($i%2) { if($i%2) {
print("<tr bgcolor=\"#446688\">"); print("<tr bgcolor=\"#446688\">");
} else { } else {
print("<tr bgcolor=\"#557799\">"); print("<tr bgcolor=\"#557799\">");
} }
$typess = explode(",", $cdc[$i]["type"]); $typess = explode(",", $cdc[$i]["type"]);
print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$cdc[$i]["which"]."\">"); print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$cdc[$i]["which"]."\">");
for($k=0;$k<count($typess);$k++) { for($k=0;$k<count($typess);$k++) {
@ -213,7 +213,7 @@ endfor;
} }
print("</tr></table></td>\n"); print("</tr></table></td>\n");
?> ?>
<td nowrap> <td nowrap>
<? if(strlen($cdc[$i]["groupname1"])): ?> <? if(strlen($cdc[$i]["groupname1"])): ?>
<a href="groups.php?which=<? print($cdc[$i]["group1"]); ?>"> <a href="groups.php?which=<? print($cdc[$i]["group1"]); ?>">
@ -266,7 +266,7 @@ endfor;
print("<tr bgcolor=\"#446688\">"); print("<tr bgcolor=\"#446688\">");
} else { } else {
print("<tr bgcolor=\"#557799\">"); print("<tr bgcolor=\"#557799\">");
} }
$typess = explode(",", $pcdc[$i]["type"]); $typess = explode(",", $pcdc[$i]["type"]);
print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$pcdc[$i]["which"]."\">"); print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$pcdc[$i]["which"]."\">");
for($k=0;$k<count($typess);$k++) { for($k=0;$k<count($typess);$k++) {
@ -281,7 +281,7 @@ endfor;
?><td align="right"><a href="prodlist.php?platform[]=<? print($platforms[$kkk]); ?>"><img src="gfx/os/<? print($os[$platforms[$kkk]]); ?>" width="16" height="16" border="0" title="<? print($platforms[$kkk]); ?>"></a><br /></td><? ?><td align="right"><a href="prodlist.php?platform[]=<? print($platforms[$kkk]); ?>"><img src="gfx/os/<? print($os[$platforms[$kkk]]); ?>" width="16" height="16" border="0" title="<? print($platforms[$kkk]); ?>"></a><br /></td><?
} }
print("</tr></table></td>\n"); print("</tr></table></td>\n");
?> ?>
<td nowrap> <td nowrap>
<? if(strlen($pcdc[$i]["groupname1"])): ?> <? if(strlen($pcdc[$i]["groupname1"])): ?>

View File

@ -19,7 +19,7 @@ while($tmp = mysql_fetch_array($result)) {
<tr><td> <tr><td>
<table cellspacing="1" cellpadding="2" class="box"> <table cellspacing="1" cellpadding="2" class="box">
<tr><th colspan="2"><center>platform icon check</center></th></tr> <tr><th colspan="2"><center>platform icon check</center></th></tr>
<? $k=0; <? $k=0;
for($i=0;$i<count($platforms);$i++): for($i=0;$i<count($platforms);$i++):
$k++; $k++;

View File

@ -21,7 +21,7 @@ $platforms = array();
// latest commented prods // latest commented prods
/* /*
$query="SELECT $query="SELECT
prods.id,prods.name,prods.group1,prods.group2,prods.group3,prods.type,comments.who,"; prods.id,prods.name,prods.group1,prods.group2,prods.group3,prods.type,comments.who,";
if ($com) $query.="comments.comment,"; if ($com) $query.="comments.comment,";
$query.="comments.rating,users.nickname,users.avatar,UNIX_TIMESTAMP()-UNIX_TIMESTAMP(comments.quand) as difftime, ". $query.="comments.rating,users.nickname,users.avatar,UNIX_TIMESTAMP()-UNIX_TIMESTAMP(comments.quand) as difftime, ".
@ -41,7 +41,7 @@ $query.="comments.rating,users.nickname,users.avatar,UNIX_TIMESTAMP()-UNIX_TIMES
" GROUP BY comments.id". " GROUP BY comments.id".
" ORDER BY comments.quand DESC"; " ORDER BY comments.quand DESC";
*/ */
$query = "SELECT $query = "SELECT
prods.id,prods.name,prods.group1,prods.group2,prods.group3,prods.type,c.who,"; prods.id,prods.name,prods.group1,prods.group2,prods.group3,prods.type,c.who,";
if ($com) $query.=" c.comment,"; if ($com) $query.=" c.comment,";
$query.=" c.rating, users.nickname, users.avatar, UNIX_TIMESTAMP()-UNIX_TIMESTAMP(c.quand) as difftime, ". $query.=" c.rating, users.nickname, users.avatar, UNIX_TIMESTAMP()-UNIX_TIMESTAMP(c.quand) as difftime, ".
@ -184,7 +184,7 @@ for($i=0;$i<count($comments);$i++) {
<td bgcolor="<?=$tdcolor?>" align="left"> <td bgcolor="<?=$tdcolor?>" align="left">
<? <?
switch((int)($comments[$i]["rating"])) switch((int)($comments[$i]["rating"]))
{ {
case 1: print("<img src=\"gfx/rulez.gif\" alt=\"rulez!\">"); case 1: print("<img src=\"gfx/rulez.gif\" alt=\"rulez!\">");
break; break;
case -1: print("<img src=\"gfx/sucks.gif\" alt=\"sucks!\">"); case -1: print("<img src=\"gfx/sucks.gif\" alt=\"sucks!\">");
@ -224,7 +224,7 @@ for($i=0;$i<count($comments);$i++) {
</table> </table>
</td> </td>
</tr> </tr>
<? <?
flush(); flush();
endfor; ?> endfor; ?>
</table> </table>

View File

@ -167,7 +167,7 @@ for($i=0;$i<count($comments);$i++) {
<td bgcolor="<?=$tdcolor?>" align="left"> <td bgcolor="<?=$tdcolor?>" align="left">
<? <?
switch((int)($comments[$i]["rating"])) switch((int)($comments[$i]["rating"]))
{ {
case 1: print("<img src=\"gfx/rulez.gif\" alt=\"rulez!\">"); case 1: print("<img src=\"gfx/rulez.gif\" alt=\"rulez!\">");
break; break;
case -1: print("<img src=\"gfx/sucks.gif\" alt=\"sucks!\">"); case -1: print("<img src=\"gfx/sucks.gif\" alt=\"sucks!\">");
@ -207,7 +207,7 @@ for($i=0;$i<count($comments);$i++) {
</table> </table>
</td> </td>
</tr> </tr>
<? <?
flush(); flush();
endfor; ?> endfor; ?>
</table> </table>

View File

@ -7,13 +7,13 @@ printf("START %s - ",date("Y-m-d H:i:s"));
include('/home/hosted/pouet/sites/www.pouet.net/lastRSS.php'); include('/home/hosted/pouet/sites/www.pouet.net/lastRSS.php');
// create lastRSS object // create lastRSS object
$rss = new lastRSS; $rss = new lastRSS;
// setup transparent cache // setup transparent cache
$rss->cache_dir = '/home/hosted/pouet/sites/www.pouet.net/cache'; $rss->cache_dir = '/home/hosted/pouet/sites/www.pouet.net/cache';
$rss->cache_time = 5*60; // in seconds $rss->cache_time = 5*60; // in seconds
$rss->CDATA = 'strip'; $rss->CDATA = 'strip';
$rss->date_format = 'Y-m-d'; $rss->date_format = 'Y-m-d';
$rss->get('http://bitfellas.org/e107_plugins/rss_menu/rss.php?1.2'); $rss->get('http://bitfellas.org/e107_plugins/rss_menu/rss.php?1.2');

View File

@ -31,7 +31,7 @@ $prod["download"] = str_replace("%2F","/",$prod["download"]);
get <?=$prod["name"]?> here: <a href="<?=$prod["download"]?>"><?=$prod["download"]?></a><br /> get <?=$prod["name"]?> here: <a href="<?=$prod["download"]?>"><?=$prod["download"]?></a><br />
<br /> <br />
got a 404 ? try one of those mirror list:<br /> got a 404 ? try one of those mirror list:<br />
<? <?
$somepos = strrpos(basename($prod["download"]), "."); $somepos = strrpos(basename($prod["download"]), ".");
if ($pos === false) { // not found means it is extensionless, cool for amiga stuff if ($pos === false) { // not found means it is extensionless, cool for amiga stuff
$extensionless = basename($prod["download"]); $extensionless = basename($prod["download"]);
@ -44,12 +44,12 @@ $prod["download"] = str_replace("%2F","/",$prod["download"]);
- <a href="http://www.filemirrors.com/search.src?file=<? print($extensionless); ?>"><?=$prod["name"]?> on filemirrors</a><br /> - <a href="http://www.filemirrors.com/search.src?file=<? print($extensionless); ?>"><?=$prod["name"]?> on filemirrors</a><br />
- <a href="http://hornet.scene.org/cgi-bin/scene-search.cgi?search=<? print($extensionless); ?>"><?=$prod["name"]?> on the hornet archive</a><br /> - <a href="http://hornet.scene.org/cgi-bin/scene-search.cgi?search=<? print($extensionless); ?>"><?=$prod["name"]?> on the hornet archive</a><br />
<? <?
//- <a href="http://www.ojuice.net/ftpsearch.htm?sftp= //- <a href="http://www.ojuice.net/ftpsearch.htm?sftp=
//- <a href="http://www.chscene.ch/ftpsearch2/search.php?type=file&query= //- <a href="http://www.chscene.ch/ftpsearch2/search.php?type=file&query=
$query="select count(0) from prods_platforms, platforms WHERE platforms.name like 'Amiga%' and prods_platforms.platform=platforms.id and prods_platforms.prod=".$which; $query="select count(0) from prods_platforms, platforms WHERE platforms.name like 'Amiga%' and prods_platforms.platform=platforms.id and prods_platforms.prod=".$which;
$result = mysql_query($query); $result = mysql_query($query);
if (mysql_result($result,0)>0): ?> if (mysql_result($result,0)>0): ?>
- <a href="http://aminet.net/search.php?query=<? print($extensionless); ?>"><?=$prod["name"]?> on aminet (new)</a><br /> - <a href="http://aminet.net/search.php?query=<? print($extensionless); ?>"><?=$prod["name"]?> on aminet (new)</a><br />
- <a href="http://uk.aminet.net/aminetbin/find?<? print($extensionless); ?>"><?=$prod["name"]?> on aminet (uk)</a><br /> - <a href="http://uk.aminet.net/aminetbin/find?<? print($extensionless); ?>"><?=$prod["name"]?> on aminet (uk)</a><br />
- <a href="http://de.aminet.net/aminetbin/find?<? print($extensionless); ?>"><?=$prod["name"]?> on aminet (de)</a><br /> - <a href="http://de.aminet.net/aminetbin/find?<? print($extensionless); ?>"><?=$prod["name"]?> on aminet (de)</a><br />

View File

@ -37,7 +37,7 @@ if ($_GET["pixturhack"]) {
$query = "select name,id,prodz.* from groups "; $query = "select name,id,prodz.* from groups ";
$query .= "left join (select sum(voteup) as t_up,sum(votedown) as t_down,group1,count(*) as nprods from prods group by group1) as prodz on prodz.group1 = groups.id "; $query .= "left join (select sum(voteup) as t_up,sum(votedown) as t_down,group1,count(*) as nprods from prods group by group1) as prodz on prodz.group1 = groups.id ";
$query .= "order by t_up desc limit 1000"; $query .= "order by t_up desc limit 1000";
} }
$r = mysql_query($query) or die(mysql_error()); $r = mysql_query($query) or die(mysql_error());
@ -66,8 +66,8 @@ while ($o = mysql_fetch_object($r)) {
$party = $r["partyname"]." ".$year; $party = $r["partyname"]." ".$year;
$platform = $r["platform"]; $platform = $r["platform"];
$pouetID = $r["id"]; $pouetID = $r["id"];
*/ */
printf(" </prod>\n"); printf(" </prod>\n");
} }
printf(" </feed>\n"); printf(" </feed>\n");
?> ?>

View File

@ -15,7 +15,7 @@ while($o = mysql_fetch_object($r))
$name .= " by ".$o->g1name; $name .= " by ".$o->g1name;
if ($o->g2name) if ($o->g2name)
$name .= " and ".$o->g2name; $name .= " and ".$o->g2name;
printf("<a href='http://www.pouet.net/prod.php?which=%d'>%s</a>\n",$o->id,$name); printf("<a href='http://www.pouet.net/prod.php?which=%d'>%s</a>\n",$o->id,$name);
} }
?> ?>

View File

@ -73,7 +73,7 @@ $xnfo_categories = Array (
'votedisk' => Array('votedisk', 'Vote Disk'), 'votedisk' => Array('votedisk', 'Vote Disk'),
'wild' => Array('wild', 'Wild') 'wild' => Array('wild', 'Wild')
); );
$output.= $t.$t.'<category type="'.$xnfo_categories[$prod['type']][0].'">'; $output.= $t.$t.'<category type="'.$xnfo_categories[$prod['type']][0].'">';
$output.= xmlentities(utf8_encode($xnfo_categories[$prod['type']][1])); $output.= xmlentities(utf8_encode($xnfo_categories[$prod['type']][1]));
$output.= '</category>'.$nl; $output.= '</category>'.$nl;
@ -199,4 +199,4 @@ if (isset($dbl)) {
} }
print($output); print($output);
?> ?>

View File

@ -33,9 +33,9 @@ while ($o = mysql_fetch_object($r)) {
$party = $r["partyname"]." ".$year; $party = $r["partyname"]." ".$year;
$platform = $r["platform"]; $platform = $r["platform"];
$pouetID = $r["id"]; $pouetID = $r["id"];
*/ */
printf(" </prod>\n"); printf(" </prod>\n");
flush(); flush();
} }
printf(" </feed>\n"); printf(" </feed>\n");
?> ?>

View File

@ -10,7 +10,7 @@ mysql_select_db($db['database'],$dbl);
header("Content-type: text/xml"); header("Content-type: text/xml");
echo "<"."?xml version='1.0' encoding='UTF-8'?".">\n"; echo "<"."?xml version='1.0' encoding='UTF-8'?".">\n";
$query = $query =
"SELECT prods.id as id, prods.name, parties.name as partyname, downloadlinks.link, prods.partycompo, prods.party_place, g1.name as g1name, g2.name as g2name, g3.name as g3name ". "SELECT prods.id as id, prods.name, parties.name as partyname, downloadlinks.link, prods.partycompo, prods.party_place, g1.name as g1name, g2.name as g2name, g3.name as g3name ".
" FROM downloadlinks ". " FROM downloadlinks ".
" LEFT JOIN prods on prods.id = downloadlinks.prod ". " LEFT JOIN prods on prods.id = downloadlinks.prod ".
@ -44,4 +44,4 @@ while ($o = mysql_fetch_object($r)) {
flush(); flush();
} }
printf("</feed>\n"); printf("</feed>\n");
?> ?>

View File

@ -21,4 +21,4 @@ while($o = mysql_fetch_object($r)) {
printf("</table>\n"); printf("</table>\n");
include_once("include/bottom.php"); include_once("include/bottom.php");
?> ?>

View File

@ -10,7 +10,7 @@ $sql = "select groups.id,groups.name from groups "
. "left join groupsaka as g1 on g1.group1 = groups.id " . "left join groupsaka as g1 on g1.group1 = groups.id "
. "left join groupsaka as g2 on g2.group2 = groups.id " . "left join groupsaka as g2 on g2.group2 = groups.id "
. "where (p1.id is null and p2.id is null and p3.id is null and g1.group1 is null and g2.group1 is null)"; . "where (p1.id is null and p2.id is null and p3.id is null and g1.group1 is null and g2.group1 is null)";
$r = mysql_query($sql) or die(mysql_error()); $r = mysql_query($sql) or die(mysql_error());
printf("<table class='pouettbl'>\n"); printf("<table class='pouettbl'>\n");
@ -22,4 +22,4 @@ while($o = mysql_fetch_object($r)) {
printf("</table>\n"); printf("</table>\n");
include_once("include/bottom.php"); include_once("include/bottom.php");
?> ?>

View File

@ -31,4 +31,4 @@ $awardscat["2011"][9] = "best direction";
$awardscat["2011"][10] = "most original concept"; $awardscat["2011"][10] = "most original concept";
$awardscat["2011"][11] = "breakthrough performance"; $awardscat["2011"][11] = "breakthrough performance";
$awardscat["2011"][12] = "best technical achievement"; $awardscat["2011"][12] = "best technical achievement";
?> ?>

View File

@ -128,4 +128,4 @@ $os["Android"]="k_android.gif";
$os["Commodore 128"]="k_c128.gif"; $os["Commodore 128"]="k_c128.gif";
$os["Raspberry Pi"]="k_raspi.gif"; $os["Raspberry Pi"]="k_raspi.gif";
$os["Sharp MZ"]="k_sharpmz.gif"; $os["Sharp MZ"]="k_sharpmz.gif";
?> ?>

View File

@ -3,17 +3,17 @@
* bbdecode/bbencode functions: * bbdecode/bbencode functions:
* Rewritten - Nathan Codding - Aug 24, 2000 * Rewritten - Nathan Codding - Aug 24, 2000
* quote, code, and list rewritten again in Jan. 2001. * quote, code, and list rewritten again in Jan. 2001.
* All BBCode tags now implemented. Nesting and multiple occurances should be * All BBCode tags now implemented. Nesting and multiple occurances should be
* handled fine for all of them. Using str_replace() instead of regexps often * handled fine for all of them. Using str_replace() instead of regexps often
* for efficiency. quote, list, and code are not regular, so they are * for efficiency. quote, list, and code are not regular, so they are
* implemented as PDAs - probably not all that efficient, but that's the way it is. * implemented as PDAs - probably not all that efficient, but that's the way it is.
* *
* Note: all BBCode tags are case-insensitive. * Note: all BBCode tags are case-insensitive.
*/ */
function bbencode($message, $is_html_disabled) { function bbencode($message, $is_html_disabled) {
global $user; global $user;
// pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0). // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0).
// This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it. // This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it.
$message = " " . $message; $message = " " . $message;
@ -72,7 +72,7 @@ function bbencode($message, $is_html_disabled) {
$patterns[1] = "#\[url\](.*?)\[/url\]#si"; $patterns[1] = "#\[url\](.*?)\[/url\]#si";
$replacements[1] = '<!-- BBCode u1 Start --><A HREF="http://\1">\1</A><!-- BBCode u1 End -->'; $replacements[1] = '<!-- BBCode u1 Start --><A HREF="http://\1">\1</A><!-- BBCode u1 End -->';
// [url=xxxx://www.phpbb.com]phpBB[/url] code.. // [url=xxxx://www.phpbb.com]phpBB[/url] code..
$patterns[2] = "#\[url=([a-z]+?://){1}(.*?)\](.*?)\[/url\]#si"; $patterns[2] = "#\[url=([a-z]+?://){1}(.*?)\](.*?)\[/url\]#si";
$replacements[2] = '<!-- BBCode u2 Start --><A HREF="\1\2">\3</A><!-- BBCode u2 End -->'; $replacements[2] = '<!-- BBCode u2 Start --><A HREF="\1\2">\3</A><!-- BBCode u2 End -->';
@ -148,7 +148,7 @@ function bbdecode($message) {
/** /**
* James Atkinson - Feb 5, 2001 * James Atkinson - Feb 5, 2001
* This function does exactly what the PHP4 function array_push() does * This function does exactly what the PHP4 function array_push() does
* however, to keep phpBB compatable with PHP 3 we had to come up with out own * however, to keep phpBB compatable with PHP 3 we had to come up with out own
* method of doing it. * method of doing it.
*/ */
function bbcode_array_push(&$stack, $value) { function bbcode_array_push(&$stack, $value) {
@ -181,11 +181,11 @@ function bbcode_array_pop(&$stack) {
/** /**
* Nathan Codding - Jan. 12, 2001. * Nathan Codding - Jan. 12, 2001.
* Performs [quote][/quote] bbencoding on the given string, and returns the results. * Performs [quote][/quote] bbencoding on the given string, and returns the results.
* Any unmatched "[quote]" or "[/quote]" token will just be left alone. * Any unmatched "[quote]" or "[/quote]" token will just be left alone.
* This works fine with both having more than one quote in a message, and with nested quotes. * This works fine with both having more than one quote in a message, and with nested quotes.
* Since that is not a regular language, this is actually a PDA and uses a stack. Great fun. * Since that is not a regular language, this is actually a PDA and uses a stack. Great fun.
* *
* Note: This function assumes the first character of $message is a space, which is added by * Note: This function assumes the first character of $message is a space, which is added by
* bbencode(). * bbencode().
*/ */
function bbencode_quote($message) function bbencode_quote($message)
@ -224,7 +224,7 @@ function bbencode_quote($message)
// Check if we've already found a matching starting tag. // Check if we've already found a matching starting tag.
if (sizeof($stack) > 0) if (sizeof($stack) > 0)
{ {
// There exists a starting tag. // There exists a starting tag.
// We need to do 2 replacements now. // We need to do 2 replacements now.
$start_index = bbcode_array_pop($stack); $start_index = bbcode_array_pop($stack);
@ -241,7 +241,7 @@ function bbencode_quote($message)
$message .= $between_tags . "</div></div><!-- BBCode Quote End -->"; $message .= $between_tags . "</div></div><!-- BBCode Quote End -->";
$message .= $after_end_tag; $message .= $after_end_tag;
// Now.. we've screwed up the indices by changing the length of the string. // Now.. we've screwed up the indices by changing the length of the string.
// So, if there's anything in the stack, we want to resume searching just after it. // So, if there's anything in the stack, we want to resume searching just after it.
// otherwise, we go back to the start. // otherwise, we go back to the start.
if (sizeof($stack) > 0) if (sizeof($stack) > 0)
@ -277,11 +277,11 @@ function bbencode_quote($message)
/** /**
* Nathan Codding - Jan. 12, 2001. * Nathan Codding - Jan. 12, 2001.
* Performs [code][/code] bbencoding on the given string, and returns the results. * Performs [code][/code] bbencoding on the given string, and returns the results.
* Any unmatched "[code]" or "[/code]" token will just be left alone. * Any unmatched "[code]" or "[/code]" token will just be left alone.
* This works fine with both having more than one code block in a message, and with nested code blocks. * This works fine with both having more than one code block in a message, and with nested code blocks.
* Since that is not a regular language, this is actually a PDA and uses a stack. Great fun. * Since that is not a regular language, this is actually a PDA and uses a stack. Great fun.
* *
* Note: This function assumes the first character of $message is a space, which is added by * Note: This function assumes the first character of $message is a space, which is added by
* bbencode(). * bbencode().
*/ */
function bbencode_code($message, $is_html_disabled) function bbencode_code($message, $is_html_disabled)
@ -297,7 +297,7 @@ function bbencode_code($message, $is_html_disabled)
// $message = preg_replace("/$str_to_match/si", "<!-- BBCode Start --><div class=\"bbs_code\"><b>Code:</b><pre>$after_replace</pre></div><!-- BBCode End -->", $message); // $message = preg_replace("/$str_to_match/si", "<!-- BBCode Start --><div class=\"bbs_code\"><b>Code:</b><pre>$after_replace</pre></div><!-- BBCode End -->", $message);
// Second things second: we have to watch out for stuff like [1code] or [/code1] in the // Second things second: we have to watch out for stuff like [1code] or [/code1] in the
// input.. So escape them to [#1code] or [/code#1] for now: // input.. So escape them to [#1code] or [/code#1] for now:
$message = preg_replace("/\[([0-9]+?)code\]/si", "[#\\1code]", $message); $message = preg_replace("/\[([0-9]+?)code\]/si", "[#\\1code]", $message);
$message = preg_replace("/\[\/code([0-9]+?)\]/si", "[/code#\\1]", $message); $message = preg_replace("/\[\/code([0-9]+?)\]/si", "[/code#\\1]", $message);
@ -329,7 +329,7 @@ function bbencode_code($message, $is_html_disabled)
// Check if we've already found a matching starting tag. // Check if we've already found a matching starting tag.
if (sizeof($stack) > 0) if (sizeof($stack) > 0)
{ {
// There exists a starting tag. // There exists a starting tag.
$curr_nesting_depth = sizeof($stack); $curr_nesting_depth = sizeof($stack);
$max_nesting_depth = ($curr_nesting_depth > $max_nesting_depth) ? $curr_nesting_depth : $max_nesting_depth; $max_nesting_depth = ($curr_nesting_depth > $max_nesting_depth) ? $curr_nesting_depth : $max_nesting_depth;
@ -349,7 +349,7 @@ function bbencode_code($message, $is_html_disabled)
$message .= $between_tags . "[/code" . $curr_nesting_depth . "]"; $message .= $between_tags . "[/code" . $curr_nesting_depth . "]";
$message .= $after_end_tag; $message .= $after_end_tag;
// Now.. we've screwed up the indices by changing the length of the string. // Now.. we've screwed up the indices by changing the length of the string.
// So, if there's anything in the stack, we want to resume searching just after it. // So, if there's anything in the stack, we want to resume searching just after it.
// otherwise, we go back to the start. // otherwise, we go back to the start.
if (sizeof($stack) > 0) if (sizeof($stack) > 0)
@ -422,11 +422,11 @@ function bbencode_code($message, $is_html_disabled)
/** /**
* Nathan Codding - Jan. 12, 2001. * Nathan Codding - Jan. 12, 2001.
* Performs [list][/list] and [list=?][/list] bbencoding on the given string, and returns the results. * Performs [list][/list] and [list=?][/list] bbencoding on the given string, and returns the results.
* Any unmatched "[list]" or "[/list]" token will just be left alone. * Any unmatched "[list]" or "[/list]" token will just be left alone.
* This works fine with both having more than one list in a message, and with nested lists. * This works fine with both having more than one list in a message, and with nested lists.
* Since that is not a regular language, this is actually a PDA and uses a stack. Great fun. * Since that is not a regular language, this is actually a PDA and uses a stack. Great fun.
* *
* Note: This function assumes the first character of $message is a space, which is added by * Note: This function assumes the first character of $message is a space, which is added by
* bbencode(). * bbencode().
*/ */
function bbencode_list($message) function bbencode_list($message)
@ -478,7 +478,7 @@ function bbencode_list($message)
// Check if we've already found a matching starting tag. // Check if we've already found a matching starting tag.
if (sizeof($stack) > 0) if (sizeof($stack) > 0)
{ {
// There exists a starting tag. // There exists a starting tag.
// We need to do 2 replacements now. // We need to do 2 replacements now.
$start = bbcode_array_pop($stack); $start = bbcode_array_pop($stack);
$start_index = $start[0]; $start_index = $start[0];
@ -510,7 +510,7 @@ function bbencode_list($message)
$message .= $after_end_tag; $message .= $after_end_tag;
// Now.. we've screwed up the indices by changing the length of the string. // Now.. we've screwed up the indices by changing the length of the string.
// So, if there's anything in the stack, we want to resume searching just after it. // So, if there's anything in the stack, we want to resume searching just after it.
// otherwise, we go back to the start. // otherwise, we go back to the start.
if (sizeof($stack) > 0) if (sizeof($stack) > 0)
@ -549,7 +549,7 @@ function bbencode_list($message)
* Nathan Codding - Oct. 30, 2000 * Nathan Codding - Oct. 30, 2000
* *
* Escapes the "/" character with "\/". This is useful when you need * Escapes the "/" character with "\/". This is useful when you need
* to stick a runtime string into a PREG regexp that is being delimited * to stick a runtime string into a PREG regexp that is being delimited
* with slashes. * with slashes.
*/ */
function escape_slashes($input) function escape_slashes($input)
@ -564,7 +564,7 @@ function escape_slashes($input)
* - Goes through the given string, and replaces xxxx://yyyy with an HTML <a> tag linking * - Goes through the given string, and replaces xxxx://yyyy with an HTML <a> tag linking
* to that URL * to that URL
* - Goes through the given string, and replaces www.xxxx.yyyy[zzzz] with an HTML <a> tag linking * - Goes through the given string, and replaces www.xxxx.yyyy[zzzz] with an HTML <a> tag linking
* to http://www.xxxx.yyyy[/zzzz] * to http://www.xxxx.yyyy[/zzzz]
* - Goes through the given string, and replaces xxxx@yyyy with an HTML mailto: tag linking * - Goes through the given string, and replaces xxxx@yyyy with an HTML mailto: tag linking
* to that email address * to that email address
* - Only matches these 2 patterns either after a space, or at the beginning of a line * - Only matches these 2 patterns either after a space, or at the beginning of a line
@ -609,7 +609,7 @@ function make_clickable($text) {
* - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs. * - Does not distinguish between "www.xxxx.yyyy" and "http://aaaa.bbbb" type URLs.
* *
*/ */
function undo_make_clickable($text) { function undo_make_clickable($text) {
$text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text); $text = preg_replace("#<!-- BBCode auto-link start --><a href=\"(.*?)\">.*?</a><!-- BBCode auto-link end -->#i", "\\1", $text);
@ -653,7 +653,7 @@ function normalize_whitespace($str)
} }
$output .= $tok[$tok_count - 1]; $output .= $tok[$tok_count - 1];
return $output; return $output;
} }

View File

@ -11,7 +11,7 @@
* *
* 200701 Nicolas Leveille <knos@scene.org> * 200701 Nicolas Leveille <knos@scene.org>
* Updated to run over SSL, optionaly using certificates (to enable * Updated to run over SSL, optionaly using certificates (to enable
* registration capabilities, for portal class 1-2) * registration capabilities, for portal class 1-2)
*/ */
@include_once("sceneidlib.config.php"); @include_once("sceneidlib.config.php");
@ -57,7 +57,7 @@ class FopenStream extends Stream
class CurlStream extends Stream class CurlStream extends Stream
{ {
/** /**
* options can be: * options can be:
* CURLOPT_CAINFO : path for the CA certificate to use * CURLOPT_CAINFO : path for the CA certificate to use
* => implies peer verification * => implies peer verification
* CURLOPT_SSLCERT : path for the certificate to use * CURLOPT_SSLCERT : path for the certificate to use
@ -142,17 +142,17 @@ class SceneID
$out = "GET ".$url["path"]."?".$url["query"]." HTTP/1.1\r\n"; $out = "GET ".$url["path"]."?".$url["query"]." HTTP/1.1\r\n";
$out .= "Host: ".$url["host"]."\r\n"; $out .= "Host: ".$url["host"]."\r\n";
$out .= "Connection: Close\r\n\r\n"; $out .= "Connection: Close\r\n\r\n";
fwrite($f, $out); fwrite($f, $out);
$data = NULL; $data = NULL;
while (!feof($f)) $data .= fgets($f, 4096); while (!feof($f)) $data .= fgets($f, 4096);
fclose($f); fclose($f);
list($header,$data) = explode("\r\n\r\n",$data,2); list($header,$data) = explode("\r\n\r\n",$data,2);
return $data; return $data;
} }
} }
//private //private
static function parseSceneIdData($command, $param=NULL) static function parseSceneIdData($command, $param=NULL)
{ {
@ -171,7 +171,7 @@ class SceneID
SceneID::$portals = NULL; SceneID::$portals = NULL;
SceneID::$cookie = NULL; SceneID::$cookie = NULL;
SceneID::$file = NULL; SceneID::$file = NULL;
if(is_array($param)) if(is_array($param))
{ {
while(list($k,$v)=each($param)) while(list($k,$v)=each($param))
@ -222,7 +222,7 @@ class SceneID
$returnvalue = -1; $returnvalue = -1;
$curdata = ""; $curdata = "";
$curlevel = 0; $curlevel = 0;
if(!strcasecmp($vals[0]["tag"], "sceneid")) if(!strcasecmp($vals[0]["tag"], "sceneid"))
{ {
while(list($k,$v)=each($vals)) while(list($k,$v)=each($vals))
@ -233,11 +233,11 @@ class SceneID
if(strtolower($v["tag"])=="email"&&$v["attributes"]["HIDDEN"]) { if(strtolower($v["tag"])=="email"&&$v["attributes"]["HIDDEN"]) {
SceneID::$hidden = $v["attributes"]["HIDDEN"]; SceneID::$hidden = $v["attributes"]["HIDDEN"];
SceneID::$user["hidden"] = $v["attributes"]["HIDDEN"]; SceneID::$user["hidden"] = $v["attributes"]["HIDDEN"];
} }
else if(strtolower($v["tag"])=="emailhidden") { else if(strtolower($v["tag"])=="emailhidden") {
SceneID::$hidden = $v["value"]; SceneID::$hidden = $v["value"];
SceneID::$user["hidden"] = $v["value"]; SceneID::$user["hidden"] = $v["value"];
} }
else if(strtolower($v["tag"])=="country"&&$v["attributes"]["ID"]) else if(strtolower($v["tag"])=="country"&&$v["attributes"]["ID"])
{ {
SceneID::$country = $v["attributes"]["ID"]; SceneID::$country = $v["attributes"]["ID"];
@ -329,10 +329,10 @@ class SceneID
} }
} }
} }
SceneID::$userID = SceneID::$user["id"]; SceneID::$userID = SceneID::$user["id"];
SceneID::$fileID = SceneID::$file["id"]; SceneID::$fileID = SceneID::$file["id"];
$tmpArray = array("returnvalue" => $returnvalue, "message" => SceneID::$message); $tmpArray = array("returnvalue" => $returnvalue, "message" => SceneID::$message);
if(isset(SceneID::$userID)) if(isset(SceneID::$userID))
$tmpArray = array_merge($tmpArray, array("userID" => SceneID::$userID)); $tmpArray = array_merge($tmpArray, array("userID" => SceneID::$userID));
@ -347,9 +347,9 @@ class SceneID
return $tmpArray; return $tmpArray;
} }
} }
/* Functions for all the SceneID enabled sites (minor website / portal class 4 or less). */ /* Functions for all the SceneID enabled sites (minor website / portal class 4 or less). */
public static function loginUser($login, $password, $ip, $permanent=NULL, $externalid=NULL) public static function loginUser($login, $password, $ip, $permanent=NULL, $externalid=NULL)
{ {
return SceneID::parseSceneIdData("loginUserMD5", array("login" => $login, "password" => md5($password), return SceneID::parseSceneIdData("loginUserMD5", array("login" => $login, "password" => md5($password),
@ -365,7 +365,7 @@ class SceneID
{ {
return SceneID::logoutUser(NULL, $login); return SceneID::logoutUser(NULL, $login);
} }
public static function logoutUser_Cookie($cookie) public static function logoutUser_Cookie($cookie)
{ {
return SceneID::logoutUser(NULL, NULL, $cookie); return SceneID::logoutUser(NULL, NULL, $cookie);
@ -375,7 +375,7 @@ class SceneID
{ {
return SceneID::parseSceneIdData("logoutUser", array("userID" => $userID, "login" => $login, "cookie" => $cookie)); return SceneID::parseSceneIdData("logoutUser", array("userID" => $userID, "login" => $login, "cookie" => $cookie));
} }
public static function getUserInfo_UserID($userID) public static function getUserInfo_UserID($userID)
{ {
return SceneID::getUserInfo($userID); return SceneID::getUserInfo($userID);
@ -395,16 +395,16 @@ class SceneID
{ {
return SceneID::parseSceneIdData("getUserInfo", array("userID" => $userID, "login" => $login, "cookie" => $cookie)); return SceneID::parseSceneIdData("getUserInfo", array("userID" => $userID, "login" => $login, "cookie" => $cookie));
} }
public static function getPortalList() public static function getPortalList()
{ {
return SceneID::parseSceneIdData("getPortalList"); return SceneID::parseSceneIdData("getPortalList");
} }
/* Functions for websites (portal class 3 or less) */ /* Functions for websites (portal class 3 or less) */
public static function setUserInfo($userID, $email=NULL, $password=NULL, $password2=NULL, public static function setUserInfo($userID, $email=NULL, $password=NULL, $password2=NULL,
$nickname=NULL, $firstname=NULL, $lastname=NULL, $nickname=NULL, $firstname=NULL, $lastname=NULL,
$url=NULL, $showinfo=NULL, $birthdate=NULL, $country=NULL) $url=NULL, $showinfo=NULL, $birthdate=NULL, $country=NULL)
{ {
$params["userID"] = $userID; $params["userID"] = $userID;
@ -448,7 +448,7 @@ class SceneID
{ {
return SceneID::parseSceneIdData("requestNewUserPassword", array("userID" => $userID, "login" => $login)); return SceneID::parseSceneIdData("requestNewUserPassword", array("userID" => $userID, "login" => $login));
} }
/* Functions for portals (portal class 2 or less) */ /* Functions for portals (portal class 2 or less) */
public static function renewUserPassword($key) public static function renewUserPassword($key)
@ -456,7 +456,7 @@ class SceneID
return SceneID::parseSceneIdData("renewUserPassword", array("key" => $key)); return SceneID::parseSceneIdData("renewUserPassword", array("key" => $key));
} }
public static function registerUser($login, $email, $password, $password2, $nickname=NULL, $firstname=NULL, $lastname=NULL, public static function registerUser($login, $email, $password, $password2, $nickname=NULL, $firstname=NULL, $lastname=NULL,
$url=NULL, $showinfo=NULL, $birthdate=NULL, $country=NULL) $url=NULL, $showinfo=NULL, $birthdate=NULL, $country=NULL)
{ {
$params["login"] = $login; $params["login"] = $login;
@ -486,4 +486,4 @@ class SceneID
} }
} }
?> ?>

View File

@ -2,11 +2,11 @@
/* /*
====================================================================== ======================================================================
lastRSS 0.9.1 lastRSS 0.9.1
Simple yet powerfull PHP class to parse RSS files. Simple yet powerfull PHP class to parse RSS files.
by Vojtech Semecky, webmaster @ webdot . cz by Vojtech Semecky, webmaster @ webdot . cz
Latest version, features, manual and examples: Latest version, features, manual and examples:
http://lastrss.webdot.cz/ http://lastrss.webdot.cz/
@ -239,4 +239,4 @@ class lastRSS {
} }
} }
?> ?>

View File

@ -28,7 +28,7 @@ function goodfleche($wanted,$current) {
return $fleche; return $fleche;
} }
function reorder_prodtype($a, $b) function reorder_prodtype($a, $b)
{ {
if (($a["type"] == "prod") && ($b["type"] == "prod")) { if (($a["type"] == "prod") && ($b["type"] == "prod")) {
if ($a["prodtype"] == $b["prodtype"]) if ($a["prodtype"] == $b["prodtype"])
@ -58,7 +58,7 @@ function reorder_prodtype($a, $b)
} }
} }
/*function reorder_date($a, $b) /*function reorder_date($a, $b)
{ {
if ($a["date"] == $b["date"]) if ($a["date"] == $b["date"])
{ {
@ -67,7 +67,7 @@ function reorder_prodtype($a, $b)
return ($a["date"] > $b["date"]) ? -1 : 1; return ($a["date"] > $b["date"]) ? -1 : 1;
} }
function reorder_id($a, $b) function reorder_id($a, $b)
{ {
if ($a["id"] == $b["id"]) if ($a["id"] == $b["id"])
{ {
@ -76,7 +76,7 @@ function reorder_id($a, $b)
return ($a["id"] > $b["id"]) ? -1 : 1; return ($a["id"] > $b["id"]) ? -1 : 1;
}*/ }*/
function reorder_id_and_date($a, $b) function reorder_id_and_date($a, $b)
{ {
if (($a["type"] == "prod") && ($b["type"] == "prod")) { if (($a["type"] == "prod") && ($b["type"] == "prod")) {
if ($a["date"] == $b["date"]) if ($a["date"] == $b["date"])
@ -107,7 +107,7 @@ function reorder_id_and_date($a, $b)
} }
function reorder_partycompo($a, $b) function reorder_partycompo($a, $b)
{ {
if (($a["type"] == "prod") && ($b["type"] == "prod")) { if (($a["type"] == "prod") && ($b["type"] == "prod")) {
if ($a["partycompo"] == $b["partycompo"]) if ($a["partycompo"] == $b["partycompo"])
@ -137,7 +137,7 @@ function reorder_partycompo($a, $b)
} }
} }
function reorder_name($a, $b) function reorder_name($a, $b)
{ {
if (($a["type"] == "prod") && ($b["type"] == "prod")) { if (($a["type"] == "prod") && ($b["type"] == "prod")) {
if (strtolower($a["name"]) == strtolower($b["name"])) if (strtolower($a["name"]) == strtolower($b["name"]))
@ -167,7 +167,7 @@ function reorder_name($a, $b)
} }
} }
function reorder_platform($a, $b) function reorder_platform($a, $b)
{ {
if (($a["type"] == "prod") && ($b["type"] == "prod")) { if (($a["type"] == "prod") && ($b["type"] == "prod")) {
if ($a["platform"] == $b["platform"]) if ($a["platform"] == $b["platform"])
@ -197,7 +197,7 @@ function reorder_platform($a, $b)
} }
} }
/*function reorder_views($a, $b) /*function reorder_views($a, $b)
{ {
if ($a["views"] == $b["views"]) if ($a["views"] == $b["views"])
{ {
@ -206,7 +206,7 @@ function reorder_platform($a, $b)
return ($a["views"] > $b["views"]) ? -1 : 1; return ($a["views"] > $b["views"]) ? -1 : 1;
} }
function reorder_thumbup($a, $b) function reorder_thumbup($a, $b)
{ {
if ($a["voteup"] == $b["voteup"]) if ($a["voteup"] == $b["voteup"])
{ {
@ -215,7 +215,7 @@ function reorder_thumbup($a, $b)
return ($a["voteup"] > $b["voteup"]) ? -1 : 1; return ($a["voteup"] > $b["voteup"]) ? -1 : 1;
} }
function reorder_thumbpig($a, $b) function reorder_thumbpig($a, $b)
{ {
if ($a["votepig"] == $b["votepig"]) if ($a["votepig"] == $b["votepig"])
{ {
@ -225,7 +225,7 @@ function reorder_thumbpig($a, $b)
} }
function reorder_thumbdown($a, $b) function reorder_thumbdown($a, $b)
{ {
if ($a["votedown"] == $b["votedown"]) if ($a["votedown"] == $b["votedown"])
{ {
@ -234,7 +234,7 @@ function reorder_thumbdown($a, $b)
return ($a["votedown"] > $b["votedown"]) ? -1 : 1; return ($a["votedown"] > $b["votedown"]) ? -1 : 1;
} }
function reorder_avg($a, $b) function reorder_avg($a, $b)
{ {
if ($a["voteavg"] == $b["voteavg"]) if ($a["voteavg"] == $b["voteavg"])
{ {
@ -381,11 +381,11 @@ if($which) {
} }
switch($prodorder) { switch($prodorder) {
case "type": usort($listitems, "reorder_id_and_date"); case "type": usort($listitems, "reorder_id_and_date");
usort($listitems, "reorder_prodtype"); break; usort($listitems, "reorder_prodtype"); break;
case "name": usort($listitems, "reorder_name"); break; case "name": usort($listitems, "reorder_name"); break;
case "release": usort($listitems, "reorder_id_and_date"); break; case "release": usort($listitems, "reorder_id_and_date"); break;
case "platform": usort($listitems, "reorder_id_and_date"); case "platform": usort($listitems, "reorder_id_and_date");
usort($listitems, "reorder_platform"); break; usort($listitems, "reorder_platform"); break;
/* case "views": usort($listitems, "reorder_views"); break; /* case "views": usort($listitems, "reorder_views"); break;
case "thumbup": usort($listitems, "reorder_thumbup"); break; case "thumbup": usort($listitems, "reorder_thumbup"); break;
@ -411,7 +411,7 @@ if($which) {
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<th colspan="9"> <th colspan="9">
<center> <center>
<? <?
$i=0; $i=0;
//print("<b><a href=\"lists.php?which=".$lists[$i]["id"]."\">".$lists[$i]["name"]."</a></b> - ".$lists[$i]["desc"]); //print("<b><a href=\"lists.php?which=".$lists[$i]["id"]."\">".$lists[$i]["name"]."</a></b> - ".$lists[$i]["desc"]);
print("<b><a href=\"lists.php?which=".$lists[$i]["id"]."\">".$lists[$i]["name"]."</a></b>"); print("<b><a href=\"lists.php?which=".$lists[$i]["id"]."\">".$lists[$i]["name"]."</a></b>");
@ -593,7 +593,7 @@ if($which) {
print("<tr bgcolor=\"#557799\">\n"); print("<tr bgcolor=\"#557799\">\n");
} }
//print("pokaman"); //print("pokaman");
if ($listitems[$i]["type"]=="prod"): if ($listitems[$i]["type"]=="prod"):
$typess = explode(",", $listitems[$i]["prodtype"]); $typess = explode(",", $listitems[$i]["prodtype"]);
print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$listitems[$i]["id"]."\">"); print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$listitems[$i]["id"]."\">");
@ -624,7 +624,7 @@ if($which) {
print("<td width=\"100%\">&nbsp;</td>"); print("<td width=\"100%\">&nbsp;</td>");
$platforms = explode(",", $listitems[$i]["platform"]); $platforms = explode(",", $listitems[$i]["platform"]);
for($kkk=0; $kkk<count($platforms); $kkk++){ for($kkk=0; $kkk<count($platforms); $kkk++){
print("<td align=\"right\"><a href=\"prodlist.php?platform=".$platforms[$kkk]."\"><img src=\"gfx/os/".$os[$platforms[$kkk]]."\" width=\"16\" height=\"16\" border=\"0\" title=\"".$platforms[$kkk]."\"></a><br /></td>"); print("<td align=\"right\"><a href=\"prodlist.php?platform=".$platforms[$kkk]."\"><img src=\"gfx/os/".$os[$platforms[$kkk]]."\" width=\"16\" height=\"16\" border=\"0\" title=\"".$platforms[$kkk]."\"></a><br /></td>");
} }
@ -648,7 +648,7 @@ if($which) {
case 61: case 61:
case 71: case 71:
case 81: case 81:
case 91: $placeadj="st"; case 91: $placeadj="st";
print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 2: case 2:
@ -659,7 +659,7 @@ if($which) {
case 62: case 62:
case 72: case 72:
case 82: case 82:
case 92: $placeadj="nd"; case 92: $placeadj="nd";
print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 3: case 3:
@ -670,7 +670,7 @@ if($which) {
case 63: case 63:
case 73: case 73:
case 83: case 83:
case 93: $placeadj="rd"; case 93: $placeadj="rd";
print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 97: print("<td>disqualified at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); case 97: print("<td>disqualified at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
@ -683,15 +683,15 @@ if($which) {
print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
} }
} else } else
{ {
$placeadj = "??"; $placeadj = "??";
print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$listitems[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$listitems[$i]["party"]."&when=".sprintf("%02d",$listitems[$i]["party_year"])."\">".$listitems[$i]["partyname"]." ".sprintf("%02d",$listitems[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
} }
} else { } else {
if ($listitems[$i]["party"]==1024) print("<td>no party<br /></td>\n"); if ($listitems[$i]["party"]==1024) print("<td>no party<br /></td>\n");
else print("<td>??<br /></td>\n"); else print("<td>??<br /></td>\n");
} }
if(($listitems[$i]["date"]!="0000-00-00")&&(strlen($listitems[$i]["date"])>0)) if(($listitems[$i]["date"]!="0000-00-00")&&(strlen($listitems[$i]["date"])>0))
{ {
@ -713,7 +713,7 @@ if($which) {
} }
print("<td>".$rmonth." ".$rdate[0]."<br /></td>\n"); print("<td>".$rmonth." ".$rdate[0]."<br /></td>\n");
} else { } else {
print("<td>&nbsp;<br /></td>\n"); print("<td>&nbsp;<br /></td>\n");
} }
/* if ($listitems[$i]["voteup"]) /* if ($listitems[$i]["voteup"])
@ -756,7 +756,7 @@ if($which) {
<a href="groups.php?which=<?=$listitems[$i]["group1"]?>"><?=$listitems[$i]["groupname1"]?></a> <a href="groups.php?which=<?=$listitems[$i]["group1"]?>"><?=$listitems[$i]["groupname1"]?></a>
<? if ($listitems[$i]["groupname2"]) {print(" &amp; ");} ?><a href="groups.php?which=<?=$listitems[$i]["group2"]?>"><?=$listitems[$i]["groupname2"]?></a> <? if ($listitems[$i]["groupname2"]) {print(" &amp; ");} ?><a href="groups.php?which=<?=$listitems[$i]["group2"]?>"><?=$listitems[$i]["groupname2"]?></a>
<? if ($listitems[$i]["groupname3"]) {print(" &amp; ");} ?><a href="groups.php?which=<?=$listitems[$i]["group3"]?>"><?=$listitems[$i]["groupname3"]?></a> <? if ($listitems[$i]["groupname3"]) {print(" &amp; ");} ?><a href="groups.php?which=<?=$listitems[$i]["group3"]?>"><?=$listitems[$i]["groupname3"]?></a>
<br /></td> */ <br /></td> */
elseif ($listitems[$i]["type"]=="user"): ?> elseif ($listitems[$i]["type"]=="user"): ?>
<td colspan="9"> <td colspan="9">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">
@ -771,7 +771,7 @@ if($which) {
<td colspan="9"><a href="party.php?which=<? print($listitems[$i]["itemid"]); ?>"><? print($listitems[$i]["partyname"]); ?></a> <td colspan="9"><a href="party.php?which=<? print($listitems[$i]["itemid"]); ?>"><? print($listitems[$i]["partyname"]); ?></a>
<? if($listitems[$i]["partyweb"]) print(" [<a href=\"".$listitems[$i]["partyweb"]."\">web</a>]\n"); ?><br /></td> <? if($listitems[$i]["partyweb"]) print(" [<a href=\"".$listitems[$i]["partyweb"]."\">web</a>]\n"); ?><br /></td>
<? elseif ($listitems[$i]["type"]=="group"): ?> <? elseif ($listitems[$i]["type"]=="group"): ?>
<td colspan="9"><a href="groups.php?which=<? print($listitems[$i]["itemid"]); ?>"><? print($listitems[$i]["groupname"]); <td colspan="9"><a href="groups.php?which=<? print($listitems[$i]["itemid"]); ?>"><? print($listitems[$i]["groupname"]);
if($listitems[$i]["groupacronym"]) print(" [".$listitems[$i]["groupacronym"]."]"); ?></a> if($listitems[$i]["groupacronym"]) print(" [".$listitems[$i]["groupacronym"]."]"); ?></a>
<? if($listitems[$i]["groupweb"]) print(" [<a href=\"".$listitems[$i]["groupweb"]."\">web</a>]\n"); <? if($listitems[$i]["groupweb"]) print(" [<a href=\"".$listitems[$i]["groupweb"]."\">web</a>]\n");
if($listitems[$i]["groupcsdb"]) print(" [<a href=\"http://noname.c64.org/csdb/group/?id=".$listitems[$i]["groupcsdb"]."\">csdb</a>]\n"); if($listitems[$i]["groupcsdb"]) print(" [<a href=\"http://noname.c64.org/csdb/group/?id=".$listitems[$i]["groupcsdb"]."\">csdb</a>]\n");
@ -785,9 +785,9 @@ if($which) {
</tr> </tr>
<? <?
endfor; endfor;
} }
print("<tr bgcolor=\"#224488\">"); print("<tr bgcolor=\"#224488\">");
if($which): if($which):
if(count($lists)!=0): ?> if(count($lists)!=0): ?>
<td colspan="3" align="right"> <td colspan="3" align="right">
<table cellspacing="0" cellpadding="0"> <table cellspacing="0" cellpadding="0">

View File

@ -22,12 +22,12 @@ $refer = $HTTP_REFERER ? $HTTP_REFERER : "index.php";
switch($returnvalue["returnvalue"]) switch($returnvalue["returnvalue"])
{ {
case 30: { // login successful case 30: { // login successful
if(authenticate($returnvalue["userID"]) != 1) // user found from pouet.net db if(authenticate($returnvalue["userID"]) != 1) // user found from pouet.net db
{ {
// no user found from pouet.net database, create a new one. // no user found from pouet.net database, create a new one.
$userparams = array("userID" => $returnvalue["userID"]); $userparams = array("userID" => $returnvalue["userID"]);
$returnvalue = $xml->parseSceneIdData("getUserInfo", $userparams); $returnvalue = $xml->parseSceneIdData("getUserInfo", $userparams);
//if($returnvalue["returnvalue"]==10) //if($returnvalue["returnvalue"]==10)
$u = $returnvalue["user"]; $u = $returnvalue["user"];
@ -35,24 +35,24 @@ switch($returnvalue["returnvalue"])
$query= "INSERT users SET "; $query= "INSERT users SET ";
$query.="id=".(int)$returnvalue["userID"].", "; $query.="id=".(int)$returnvalue["userID"].", ";
$query.="nickname='".mysql_real_escape_string($u["nickname"] ? $u["nickname"] : $_REQUEST["login"])."', "; $query.="nickname='".mysql_real_escape_string($u["nickname"] ? $u["nickname"] : $_REQUEST["login"])."', ";
$entry = glob("./avatars/*.gif"); $entry = glob("./avatars/*.gif");
$r = $entry[array_rand($entry)]; $r = $entry[array_rand($entry)];
$a = str_replace("./avatars/","",$r); $a = str_replace("./avatars/","",$r);
$query.="avatar='".$a."', "; // todo $query.="avatar='".$a."', "; // todo
$query.="lastip='".$_SERVER["REMOTE_ADDR"]."', "; $query.="lastip='".$_SERVER["REMOTE_ADDR"]."', ";
$query.="lasthost='".gethostbyaddr($_SERVER["REMOTE_ADDR"])."', "; $query.="lasthost='".gethostbyaddr($_SERVER["REMOTE_ADDR"])."', ";
$query.="quand=NOW()"; $query.="quand=NOW()";
mysql_query($query); mysql_query($query);
authenticate($returnvalue["userID"]); authenticate($returnvalue["userID"]);
} }
setcookie($returnvalue["cookie"]["name"], setcookie($returnvalue["cookie"]["name"],
$returnvalue["cookie"]["value"], $returnvalue["cookie"]["value"],
$returnvalue["cookie"]["expires"], $returnvalue["cookie"]["expires"],
$returnvalue["cookie"]["path"], ".pouet.net"); $returnvalue["cookie"]["path"], ".pouet.net");
// $cookie["path"], $cookie["domain"]); // $cookie["path"], $cookie["domain"]);
// $returnvalue["cookie["path"], "localhost"); // $returnvalue["cookie["path"], "localhost");

View File

@ -8,7 +8,7 @@ while ($tmp = mysql_fetch_assoc($result))
?> ?>
<? <?
foreach ($logos as $logo) { // we display each logo foreach ($logos as $logo) { // we display each logo
?> ?>
<input type="hidden" name="id" value="<?=$logo['id']?>"> <input type="hidden" name="id" value="<?=$logo['id']?>">
@ -32,4 +32,4 @@ foreach ($logos as $logo) { // we display each logo
<? } ?> <? } ?>
<? require("include/bottom.php"); ?> <? require("include/bottom.php"); ?>

View File

@ -13,13 +13,13 @@ $command = "logoutUser";
session_unset(); session_unset();
session_destroy(); session_destroy();
if($_COOKIE["SCENEID_COOKIE"]) if($_COOKIE["SCENEID_COOKIE"])
{ {
// setcookie("SCENEID_COOKIE","", time() - 3600, "/", "scene.org"); // setcookie("SCENEID_COOKIE","", time() - 3600, "/", "scene.org");
setcookie("SCENEID_COOKIE","", time() - 3600, "/", "pouet.net"); setcookie("SCENEID_COOKIE","", time() - 3600, "/", "pouet.net");
unset($_COOKIE["SCENEID_COOKIE"]); unset($_COOKIE["SCENEID_COOKIE"]);
} }
if($_COOKIE["SCENEID_SESSION"]) if($_COOKIE["SCENEID_SESSION"])
{ {
// setcookie("SCENEID_SESSION","", time() - 3600, "/", "scene.org"); // setcookie("SCENEID_SESSION","", time() - 3600, "/", "scene.org");
setcookie("SCENEID_SESSION","", time() - 3600, "/", "pouet.net"); setcookie("SCENEID_SESSION","", time() - 3600, "/", "pouet.net");

View File

@ -82,16 +82,16 @@ if(!$f) $f=1;
<td bgcolor="#6688AA" align="center"> <td bgcolor="#6688AA" align="center">
<? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires"); <? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires");
print("<b>[ "); ?> print("<b>[ "); ?>
<a href="nfo.php?which=<?=$which?>&amp;f=none">html</a> <a href="nfo.php?which=<?=$which?>&amp;f=none">html</a>
<? for($i=0;$i<=count($txt)-1;$i++): ?> <? for($i=0;$i<=count($txt)-1;$i++): ?>
| <a href="nfo.php?which=<?=$which?>&amp;f=<?=$i+1?>"><?=$txt[$i]?></a> | <a href="nfo.php?which=<?=$which?>&amp;f=<?=$i+1?>"><?=$txt[$i]?></a>
<? endfor; <? endfor;
print(" ]</b>"); ?> print(" ]</b>"); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td bgcolor="#224488" align="right"> <td bgcolor="#224488" align="right">
<? <?
if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') { if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') {
?> ?>
<b>[ <a href="submitnfo.php?which=<?=$which?>">admin: upload new nfo</a> ]</b> <b>[ <a href="submitnfo.php?which=<?=$which?>">admin: upload new nfo</a> ]</b>

View File

@ -42,10 +42,10 @@ if(!$f) $f=1;
<td bgcolor="#6688AA" align="center"> <td bgcolor="#6688AA" align="center">
<? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires"); <? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires");
print("<b>[ "); ?> print("<b>[ "); ?>
<a href="othernfo.php?which=<?=$which?>&amp;f=none">html</a> <a href="othernfo.php?which=<?=$which?>&amp;f=none">html</a>
<? for($i=0;$i<=count($txt)-1;$i++): ?> <? for($i=0;$i<=count($txt)-1;$i++): ?>
| <a href="othernfo.php?which=<?=$which?>&amp;f=<?=$i+1?>"><?=$txt[$i]?></a> | <a href="othernfo.php?which=<?=$which?>&amp;f=<?=$i+1?>"><?=$txt[$i]?></a>
<? endfor; <? endfor;
print(" ]</b>"); ?> print(" ]</b>"); ?>
</td> </td>
</tr> </tr>

View File

@ -5,7 +5,7 @@ $order=$_REQUEST['order'];
require("include/top.php"); require("include/top.php");
function cmp_year($a, $b) function cmp_year($a, $b)
{ {
if ($a["year"] == $b["year"]) if ($a["year"] == $b["year"])
{ {
@ -14,7 +14,7 @@ function cmp_year($a, $b)
return ($a["year"] > $b["year"]) ? -1 : 1; return ($a["year"] > $b["year"]) ? -1 : 1;
} }
function cmp_name($a, $b) function cmp_name($a, $b)
{ {
if (strtolower($a["name"]) == strtolower($b["name"])) if (strtolower($a["name"]) == strtolower($b["name"]))
{ {
@ -122,16 +122,16 @@ function lettermenu($pattern) {
</tr> </tr>
<? <?
for($i=0,$j=0;$i<count($parties);$i++): for($i=0,$j=0;$i<count($parties);$i++):
if($parties[$i]['id']!=1024): if($parties[$i]['id']!=1024):
if($parties[$i]['id']!=$parties[$i-1]['id']): if($parties[$i]['id']!=$parties[$i-1]['id']):
if (($order=="year") && ($parties[$i]['year']!=$parties[$i-1]['year'])) if (($order=="year") && ($parties[$i]['year']!=$parties[$i-1]['year']))
print("<tr bgcolor=\"#224488\"><td></td><td><b>".$parties[$i]["year"]."</b><br /></td><td></td><td></td></tr>"); print("<tr bgcolor=\"#224488\"><td></td><td><b>".$parties[$i]["year"]."</b><br /></td><td></td><td></td></tr>");
$j++; $j++;
if($j%2) { if($j%2) {
print("<tr bgcolor=\"#446688\"><td>"); print("<tr bgcolor=\"#446688\"><td>");
} else { } else {
@ -150,16 +150,16 @@ function lettermenu($pattern) {
} else { } else {
print("<tr bgcolor=\"#557799\"><td><br /></td>"); print("<tr bgcolor=\"#557799\"><td><br /></td>");
} }
endif; ?> endif; ?>
<td> <td>
<? print("<a href=\"party.php?which=".$parties[$i]['id']."&when=".$parties[$i]['year']."\">".$parties[$i]['year']."</a>\n"); ?> <? print("<a href=\"party.php?which=".$parties[$i]['id']."&when=".$parties[$i]['year']."\">".$parties[$i]['year']."</a>\n"); ?>
<? if($parties[$i]["slengpung"]): ?> <? if($parties[$i]["slengpung"]): ?>
[<a href="http://www.slengpung.com/?eventid=<?=$parties[$i]["slengpung"]?>">slengpung</a>] [<a href="http://www.slengpung.com/?eventid=<?=$parties[$i]["slengpung"]?>">slengpung</a>]
<? endif; ?> <? endif; ?>
<? if($parties[$i]["csdb"]): ?> <? if($parties[$i]["csdb"]): ?>
[<a href="http://noname.c64.org/csdb/event/?id=<?=$parties[$i]["csdb"]?>">csdb</a>] [<a href="http://noname.c64.org/csdb/event/?id=<?=$parties[$i]["csdb"]?>">csdb</a>]
<? endif; ?> <? endif; ?>
<? if($parties[$i]["zxdemo"]): ?> <? if($parties[$i]["zxdemo"]): ?>
[<a href="http://zxdemo.org/party.php?id=<?=$parties[$i]["zxdemo"]?>">zxdemo</a>] [<a href="http://zxdemo.org/party.php?id=<?=$parties[$i]["zxdemo"]?>">zxdemo</a>]
@ -170,17 +170,17 @@ function lettermenu($pattern) {
<td> <td>
<? print($parties[$i]['cprods']); ?><br /> <? print($parties[$i]['cprods']); ?><br />
</td> </td>
<td> <td>
<? if($parties[$i]["download"]): ?> <? if($parties[$i]["download"]): ?>
[<a href="<?=$parties[$i]["download"]?>">prods</a>] [<a href="<?=$parties[$i]["download"]?>">prods</a>]
<? endif; ?> <? endif; ?>
<? if(file_exists("results/".$parties[$i]["id"]."_".substr($parties[$i]["year"],-2).".txt")): ?> <? if(file_exists("results/".$parties[$i]["id"]."_".substr($parties[$i]["year"],-2).".txt")): ?>
[<a href="results.php?which=<?=$parties[$i]["id"]?>&when=<?=substr($parties[$i]["year"],-2)?>">results</a>] [<a href="results.php?which=<?=$parties[$i]["id"]?>&when=<?=substr($parties[$i]["year"],-2)?>">results</a>]
<? endif; ?> <? endif; ?>
</td> </td>
</tr> </tr>
<? endif; ?> <? endif; ?>
<? endfor; ?> <? endfor; ?>

View File

@ -18,7 +18,7 @@ $result = mysql_query($query) or die(mysql_error());
<description>Pouet.net Piclens feed</description> <description>Pouet.net Piclens feed</description>
<language>en-us</language> <language>en-us</language>
<docs>http://feedvalidator.org/docs/rss2.html</docs> <docs>http://feedvalidator.org/docs/rss2.html</docs>
<atom:icon>http://www.pouet.net/favicon.ico</atom:icon> <atom:icon>http://www.pouet.net/favicon.ico</atom:icon>
<atom:link href="http://www.pouet.net/piclens/piclens.rss.php" rel="self" type="application/rss+xml" /> <atom:link href="http://www.pouet.net/piclens/piclens.rss.php" rel="self" type="application/rss+xml" />

View File

@ -18,7 +18,7 @@ function pickAvatar(s) {
window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s; window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s;
window.opener.document.avatr.src='avatars/'+s; window.opener.document.avatr.src='avatars/'+s;
window.close(); window.close();
} }
//--> //-->
</script> </script>
@ -50,4 +50,4 @@ function pickAvatar(s) {
</div> </div>
</body> </body>
</html> </html>

View File

@ -24,7 +24,7 @@ function lettermenu($pattern) {
print(" ]<br />\n"); print(" ]<br />\n");
} }
function cmpcomments($a, $b) function cmpcomments($a, $b)
{ {
if ($a["lcom_quand"] == $b["lcom_quand"]) if ($a["lcom_quand"] == $b["lcom_quand"])
{ {
@ -81,7 +81,7 @@ while($tmp = mysql_fetch_array($result)) {
function pickGroup(s) { function pickGroup(s) {
window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s; window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s;
window.close(); window.close();
} }
//--> //-->
</script> </script>
@ -159,7 +159,7 @@ function pickGroup(s) {
*/ */
} }
?> ?>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<th colspan="3"> <th colspan="3">
<center><? lettermenu($pattern); ?></center> <center><? lettermenu($pattern); ?></center>
@ -175,4 +175,4 @@ function pickGroup(s) {
</div> </div>
</body> </body>
</html> </html>

View File

@ -2,7 +2,7 @@
require("include/misc.php"); require("include/misc.php");
conn_db(); conn_db();
function cmp_year($a, $b) function cmp_year($a, $b)
{ {
if ($a["year"] == $b["year"]) if ($a["year"] == $b["year"])
{ {
@ -11,7 +11,7 @@ function cmp_year($a, $b)
return ($a["year"] > $b["year"]) ? -1 : 1; return ($a["year"] > $b["year"]) ? -1 : 1;
} }
function cmp_name($a, $b) function cmp_name($a, $b)
{ {
if (strtolower($a["name"]) == strtolower($b["name"])) if (strtolower($a["name"]) == strtolower($b["name"]))
{ {
@ -64,7 +64,7 @@ if($pattern=="#") {
} else { } else {
$sqlwhere="name LIKE '".$pattern."%'"; $sqlwhere="name LIKE '".$pattern."%'";
} }
$query = "SELECT * FROM parties "; $query = "SELECT * FROM parties ";
$query .= " WHERE ".$sqlwhere; $query .= " WHERE ".$sqlwhere;
$query .= " ORDER BY parties.name ASC"; $query .= " ORDER BY parties.name ASC";
@ -91,7 +91,7 @@ while($row = mysql_fetch_assoc($result)) {
function pickParty(s) { function pickParty(s) {
window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s; window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s;
window.close(); window.close();
} }
//--> //-->
</script> </script>
@ -130,7 +130,7 @@ function pickParty(s) {
</tr> </tr>
<? <?
} ?> } ?>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<th colspan="3"> <th colspan="3">
<center><? lettermenu($pattern); ?></center> <center><? lettermenu($pattern); ?></center>
@ -146,4 +146,4 @@ function pickParty(s) {
</div> </div>
</body> </body>
</html> </html>

View File

@ -68,7 +68,7 @@ while($tmp = mysql_fetch_array($result)) {
function pickProd(s) { function pickProd(s) {
window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s; window.opener.document.forms["<?=$_GET["form"]?>"].<?=$_GET["field"]?>.value=s;
window.close(); window.close();
} }
//--> //-->
</script> </script>
@ -148,9 +148,9 @@ function pickProd(s) {
print("</tr></table></td>\n"); print("</tr></table></td>\n");
} }
?> ?>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<th colspan="3"> <th colspan="3">
<center><? lettermenu($pattern); ?></center> <center><? lettermenu($pattern); ?></center>
@ -166,4 +166,4 @@ function pickProd(s) {
</div> </div>
</body> </body>
</html> </html>

View File

@ -4,7 +4,7 @@
// Version: 1.0 // Version: 1.0
// Copyright (c) Maros Fric, qualityunit.com 2004 // Copyright (c) Maros Fric, qualityunit.com 2004
// All rights reserved // All rights reserved
// //
// This library is free software; you can redistribute it and/or // This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public // modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either // License as published by the Free Software Foundation; either
@ -14,11 +14,11 @@
// but WITHOUT ANY WARRANTY; without even the implied warranty of // but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details. // Lesser General Public License for more details.
// //
// You should have received a copy of the GNU Lesser General Public // You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// //
// Copy of GNU Lesser General Public License at: http://www.gnu.org/copyleft/lesser.txt // Copy of GNU Lesser General Public License at: http://www.gnu.org/copyleft/lesser.txt
// //
// For support contact support@qualityunit.com // For support contact support@qualityunit.com
@ -27,27 +27,27 @@
class PostGraph class PostGraph
{ {
var $img; var $img;
var $graphWidth; // Graph Image Width var $graphWidth; // Graph Image Width
var $graphHeight; // Graph Image Height var $graphHeight; // Graph Image Height
var $textPadding; // Graph Text Padding var $textPadding; // Graph Text Padding
var $graphTitle; // Graph main Title at the top center var $graphTitle; // Graph main Title at the top center
var $graphXTitle; // Graph Title at x axe var $graphXTitle; // Graph Title at x axe
var $graphYTitle; // Graph Title at y axe var $graphYTitle; // Graph Title at y axe
var $yTicks; // Number of Ticks on y axe var $yTicks; // Number of Ticks on y axe
var $yNumberFormat; // Format numbers at y axe var $yNumberFormat; // Format numbers at y axe
var $yValueMode; // Mode that defines place of y numbers. 3 for outside of bar, 2 inside, 1 inside if bar height is bigger then 13 var $yValueMode; // Mode that defines place of y numbers. 3 for outside of bar, 2 inside, 1 inside if bar height is bigger then 13
var $textXOrientation; // Text orientation at x axe. Usually normal. var $textXOrientation; // Text orientation at x axe. Usually normal.
var $data = null; // Graph data var $data = null; // Graph data
var $countData; // Count of data var $countData; // Count of data
var $dataSum; // Summary of data var $dataSum; // Summary of data
var $maxData; // Maximum value of data var $maxData; // Maximum value of data
var $maxTextLength; // Lenght of maximum value var $maxTextLength; // Lenght of maximum value
var $colorWhiteArray; // White color in RGB format var $colorWhiteArray; // White color in RGB format
var $colorLinesArray; // Line color in RGB format var $colorLinesArray; // Line color in RGB format
var $colorBarsArray; // Bar color in RGB format var $colorBarsArray; // Bar color in RGB format
@ -56,10 +56,10 @@ class PostGraph
var $colorTextArray; // Text color in RGB format var $colorTextArray; // Text color in RGB format
var $colorAboveBarArray; // Number color above the bar in RGB format var $colorAboveBarArray; // Number color above the bar in RGB format
var $colorInsideBarArray; // Number color inside the bar in RGB format var $colorInsideBarArray; // Number color inside the bar in RGB format
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
* constructor Create an PostGraph object. * constructor Create an PostGraph object.
* *
* @param width Width of graph image. If it is not defined, width is set to 400. * @param width Width of graph image. If it is not defined, width is set to 400.
@ -69,7 +69,7 @@ class PostGraph
function PostGraph($width = 400, $height = 300) function PostGraph($width = 400, $height = 300)
{ {
register_shutdown_function(array(&$this, '_PostGraph')); register_shutdown_function(array(&$this, '_PostGraph'));
$this->graphWidth = $width; $this->graphWidth = $width;
$this->graphHeight = $height; $this->graphHeight = $height;
$this->textPadding = 3; $this->textPadding = 3;
@ -77,7 +77,7 @@ class PostGraph
$this->yNumberFormat = ''; $this->yNumberFormat = '';
$this->yValueMode = 3; $this->yValueMode = 3;
$this->textXOrientation = 'horizontal'; $this->textXOrientation = 'horizontal';
$this->colorWhiteArray = array(255, 255, 255); $this->colorWhiteArray = array(255, 255, 255);
$this->colorLinesArray = array(72, 107, 143); $this->colorLinesArray = array(72, 107, 143);
$this->colorBarsArray = array(72, 107, 143); $this->colorBarsArray = array(72, 107, 143);
@ -88,10 +88,10 @@ class PostGraph
$this->colorInsideBarArray = array(255, 255, 255); $this->colorInsideBarArray = array(255, 255, 255);
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
* create graph image with functions. Create the image, initialise Colors and * create graph image with functions. Create the image, initialise Colors and
* area, draw axis, bars and titles. * area, draw axis, bars and titles.
* *
@ -102,23 +102,23 @@ class PostGraph
{ {
/* Create initial image */ /* Create initial image */
$this->img = ImageCreate($this->graphWidth, $this->graphHeight); $this->img = ImageCreate($this->graphWidth, $this->graphHeight);
$this->initColors(); $this->initColors();
$this->initArea(); $this->initArea();
$this->drawYAxe(); $this->drawYAxe();
$this->drawXAxe(); $this->drawXAxe();
$this->drawBars(); $this->drawBars();
$this->drawTitles(); $this->drawTitles();
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
* initialise all graph colors * initialise all graph colors
* *
* @param null * @param null
@ -135,7 +135,7 @@ class PostGraph
$this->colorAboveBar = ImageColorAllocate($this->img, $this->colorAboveBarArray[0], $this->colorAboveBarArray[1], $this->colorAboveBarArray[2]); $this->colorAboveBar = ImageColorAllocate($this->img, $this->colorAboveBarArray[0], $this->colorAboveBarArray[1], $this->colorAboveBarArray[2]);
$this->colorInsideBar = ImageColorAllocate($this->img, $this->colorInsideBarArray[0], $this->colorInsideBarArray[1], $this->colorInsideBarArray[2]); $this->colorInsideBar = ImageColorAllocate($this->img, $this->colorInsideBarArray[0], $this->colorInsideBarArray[1], $this->colorInsideBarArray[2]);
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -150,7 +150,7 @@ class PostGraph
$this->posXEnd = $this->graphWidth - 5; $this->posXEnd = $this->graphWidth - 5;
$this->posYStart = 35; $this->posYStart = 35;
$this->posYEnd = $this->graphHeight - 15 - ($this->maxTextLength*6+15); $this->posYEnd = $this->graphHeight - 15 - ($this->maxTextLength*6+15);
ImageFilledRectangle($this->img, $this->posXStart, $this->posYStart, $this->posXEnd , $this->posYEnd, $this->colorBackground); ImageFilledRectangle($this->img, $this->posXStart, $this->posYStart, $this->posXEnd , $this->posYEnd, $this->colorBackground);
ImageRectangle($this->img, $this->posXStart, $this->posYStart, $this->posXEnd , $this->posYEnd, $this->colorLines); ImageRectangle($this->img, $this->posXStart, $this->posYStart, $this->posXEnd , $this->posYEnd, $this->colorLines);
} }
@ -168,13 +168,13 @@ class PostGraph
// draw lines // draw lines
$startPos = $this->posXStart; $startPos = $this->posXStart;
$step = round(( ($this->posXEnd - $this->posXStart) / $this->countData), 2); $step = round(( ($this->posXEnd - $this->posXStart) / $this->countData), 2);
for($i=0; $i<=$this->countData; $i++) for($i=0; $i<=$this->countData; $i++)
{ {
ImageLine($this->img, $startPos, $this->posYEnd-5, $startPos, $this->posYEnd+5, $this->colorLines); ImageLine($this->img, $startPos, $this->posYEnd-5, $startPos, $this->posYEnd+5, $this->colorLines);
$startPos += $step; $startPos += $step;
} }
// draw numbers // draw numbers
$startPos = $this->posXStart; $startPos = $this->posXStart;
foreach($this->data as $key => $value) foreach($this->data as $key => $value)
@ -187,7 +187,7 @@ class PostGraph
$startPos += $step; $startPos += $step;
} }
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -205,27 +205,27 @@ class PostGraph
{ {
$style = array($this->colorStyle, $this->colorStyle, $this->colorStyle, $this->colorStyle, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT); $style = array($this->colorStyle, $this->colorStyle, $this->colorStyle, $this->colorStyle, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT, IMG_COLOR_TRANSPARENT);
ImageSetStyle($this->img, $style); ImageSetStyle($this->img, $style);
ImageLine($this->img, $this->posXStart-5, $top, $this->posXStart+5, $top, $this->colorLines); ImageLine($this->img, $this->posXStart-5, $top, $this->posXStart+5, $top, $this->colorLines);
$top += $step; $top += $step;
} }
// draw numbers // draw numbers
$xAxeValue = $this->maxData; $xAxeValue = $this->maxData;
$top = $this->posYStart; $top = $this->posYStart;
for($i=0; $i<=$this->yTicks; $i++) for($i=0; $i<=$this->yTicks; $i++)
{ {
ImageString($this->img, 2, $this->posXStart-12-strlen($xAxeValue)*4, $top-6, $xAxeValue, $this->colorText); ImageString($this->img, 2, $this->posXStart-12-strlen($xAxeValue)*4, $top-6, $xAxeValue, $this->colorText);
$xAxeValue -= ($this->maxData/$this->yTicks); $xAxeValue -= ($this->maxData/$this->yTicks);
if($xAxeValue < 0.01) if($xAxeValue < 0.01)
$xAxeValue = 0; $xAxeValue = 0;
$top += $step; $top += $step;
} }
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -238,34 +238,34 @@ class PostGraph
{ {
$startPos = $this->posXStart; $startPos = $this->posXStart;
$step = (($this->posXEnd - $this->posXStart)/$this->countData)/2; $step = (($this->posXEnd - $this->posXStart)/$this->countData)/2;
foreach($this->data as $key => $value) foreach($this->data as $key => $value)
{ {
$barWidth = (0.75*($this->posXEnd-$this->posXStart)/$this->countData)/2; $barWidth = (0.75*($this->posXEnd-$this->posXStart)/$this->countData)/2;
$barHeight = (($this->posYEnd-$this->posYStart)*$value)/$this->maxData; $barHeight = (($this->posYEnd-$this->posYStart)*$value)/$this->maxData;
ImageFilledRectangle($this->img, $startPos + $step- $barWidth, $this->posYEnd - $barHeight, $startPos + $step + $barWidth, $this->posYEnd, $this->colorBars); ImageFilledRectangle($this->img, $startPos + $step- $barWidth, $this->posYEnd - $barHeight, $startPos + $step + $barWidth, $this->posYEnd, $this->colorBars);
$startX = $startPos + $step - (strlen($value)*3); $startX = $startPos + $step - (strlen($value)*3);
if(($barHeight>13 && $this->yValueMode == 1) || $this->yValueMode == 2) if(($barHeight>13 && $this->yValueMode == 1) || $this->yValueMode == 2)
{ {
$startY = $this->posYEnd - $barHeight; $startY = $this->posYEnd - $barHeight;
ImageString($this->img, 1, $startX, $startY, $value, $this->colorInsideBar); ImageString($this->img, 1, $startX, $startY, $value, $this->colorInsideBar);
} }
else else
{ {
$startY = $this->posYEnd - $barHeight - 13; $startY = $this->posYEnd - $barHeight - 13;
ImageString($this->img, 1, $startX, $startY, $value, $this->colorAboveBar); ImageString($this->img, 1, $startX, $startY, $value, $this->colorAboveBar);
} }
$startPos = round((($this->posXEnd-$this->posXStart)/$this->countData),2) + $startPos; $startPos = round((($this->posXEnd-$this->posXStart)/$this->countData),2) + $startPos;
} }
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
* draw titles of graph. Main title on the top center, verticaly on the left * draw titles of graph. Main title on the top center, verticaly on the left
* side and horizontaly on the botton * side and horizontaly on the botton
* *
* @param null * @param null
@ -277,7 +277,7 @@ class PostGraph
ImageStringUp($this->img, 3, $this->textPadding, $this->graphHeight/2+strlen($this->graphYTitle)*3, $this->graphYTitle, $this->colorText); ImageStringUp($this->img, 3, $this->textPadding, $this->graphHeight/2+strlen($this->graphYTitle)*3, $this->graphYTitle, $this->colorText);
ImageString($this->img, 3, $this->graphWidth/2-strlen($this->graphXTitle)*3, $this->posYEnd+$this->textPadding+($this->maxTextLength*6+15)-10, $this->graphXTitle, $this->colorText); ImageString($this->img, 3, $this->graphWidth/2-strlen($this->graphXTitle)*3, $this->posYEnd+$this->textPadding+($this->maxTextLength*6+15)-10, $this->graphXTitle, $this->colorText);
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -305,10 +305,10 @@ class PostGraph
function setGraphTitles($mainTitle, $xTitle, $yTitle) function setGraphTitles($mainTitle, $xTitle, $yTitle)
{ {
$this->graphTitle = $mainTitle; $this->graphTitle = $mainTitle;
$this->graphXTitle = $xTitle; $this->graphXTitle = $xTitle;
$this->graphYTitle = $yTitle; $this->graphYTitle = $yTitle;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -456,13 +456,13 @@ class PostGraph
function setYTicks($ticks) function setYTicks($ticks)
{ {
$this->yTicks = $ticks; $this->yTicks = $ticks;
if($this->data != null && $this->yNumberFormat == 'integer') if($this->data != null && $this->yNumberFormat == 'integer')
{ {
if($this->yTicks > $this->maxData) if($this->yTicks > $this->maxData)
$this->yTicks = $this->maxData; $this->yTicks = $this->maxData;
} }
if($this->yTicks == 0) if($this->yTicks == 0)
$this->yTicks = 1; $this->yTicks = 1;
} }
@ -493,11 +493,11 @@ class PostGraph
{ {
if(count($data) == 0) if(count($data) == 0)
$data = array('' => 0); $data = array('' => 0);
$this->data = $data; $this->data = $data;
$this->computeDataSum(); $this->computeDataSum();
$this->findMaxValues(); $this->findMaxValues();
$this->countData = count($data); $this->countData = count($data);
if($this->yTicks > $this->maxData && $this->yNumberFormat == 'integer') if($this->yTicks > $this->maxData && $this->yNumberFormat == 'integer')
@ -506,7 +506,7 @@ class PostGraph
if($this->yTicks == 0) if($this->yTicks == 0)
$this->yTicks = 1; $this->yTicks = 1;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -519,7 +519,7 @@ class PostGraph
{ {
$this->textXOrientation = $orientation; $this->textXOrientation = $orientation;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -532,10 +532,10 @@ class PostGraph
{ {
if(!is_array($this->data)) if(!is_array($this->data))
return; return;
$this->dataSum = 0; $this->dataSum = 0;
foreach($this->data as $key => $value) foreach($this->data as $key => $value)
$this->dataSum += $value; $this->dataSum += $value;
} }
@ -551,14 +551,14 @@ class PostGraph
{ {
if(!is_array($this->data)) if(!is_array($this->data))
return; return;
$this->maxData = 0; $this->maxData = 0;
$this->maxTextLength = 0; $this->maxTextLength = 0;
foreach($this->data as $key => $value) foreach($this->data as $key => $value)
{ {
if($this->maxData < $value) if($this->maxData < $value)
$this->maxData = $value; $this->maxData = $value;
$length = strlen($key); $length = strlen($key);
if($this->maxTextLength < $length) if($this->maxTextLength < $length)
$this->maxTextLength = $length; $this->maxTextLength = $length;
@ -569,19 +569,19 @@ class PostGraph
if($this->maxData == 0) if($this->maxData == 0)
$this->maxData = 1; $this->maxData = 1;
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
* do special round on max value of data. Round at first digit for 2 digit * do special round on max value of data. Round at first digit for 2 digit
* int number. Round at second digit for bigger int number. * int number. Round at second digit for bigger int number.
* *
* @param number Float or int number * @param number Float or int number
* @returns number Special round number * @returns number Special round number
*/ */
function specialRound($number) function specialRound($number)
{ {
if(strlen(ceil($number)) < 2) // check if number is smaller then 10 if(strlen(ceil($number)) < 2) // check if number is smaller then 10
{ {
if( (strpos($number, ".")) !== false ) // float number ? if( (strpos($number, ".")) !== false ) // float number ?
{ {
@ -621,7 +621,7 @@ class PostGraph
if($dot_place == 0) if($dot_place == 0)
$number = "0."; $number = "0.";
else $number = substr($undot_number,0,$dot_place); else $number = substr($undot_number,0,$dot_place);
if( $length > 4 ) if( $length > 4 )
{ {
if(strlen($undot_number) == 2) if(strlen($undot_number) == 2)
@ -635,7 +635,7 @@ class PostGraph
} }
} }
return $number; return $number;
} }
else // big number else // big number
{ {
$number = ceil($number); $number = ceil($number);
@ -643,7 +643,7 @@ class PostGraph
if(substr($number, 1) == 0) if(substr($number, 1) == 0)
return $number; return $number;
if($length < 3) // if number is smaller then 3 digit increment it 1 digit, other digits set to 0 if($length < 3) // if number is smaller then 3 digit increment it 1 digit, other digits set to 0
{ {
$firstDigit = substr($number, 0, 1) + 1; $firstDigit = substr($number, 0, 1) + 1;
@ -660,7 +660,7 @@ class PostGraph
return $number; // finally set the y axe maximum return $number; // finally set the y axe maximum
} }
} }
//------------------------------------------------------------------------ //------------------------------------------------------------------------
/** /**
@ -669,7 +669,7 @@ class PostGraph
* @param null * @param null
* @returns nothing * @returns nothing
*/ */
function _PostGraph () function _PostGraph ()
{ {
//ImageDestroy($this->img); //ImageDestroy($this->img);
return; return;
@ -678,4 +678,4 @@ class PostGraph
//------------------------------------------------------------------------ //------------------------------------------------------------------------
} }
?> ?>

View File

@ -68,7 +68,7 @@ $o = mysql_fetch_object($result);
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
@ -78,4 +78,4 @@ $o = mysql_fetch_object($result);
</div> </div>
</body> </body>
</html> </html>

View File

@ -71,4 +71,4 @@ if ($which) {
</div> </div>
</body> </body>
</html> </html>

View File

@ -12,7 +12,7 @@ $fields = array(
"party" => "release party", "party" => "release party",
"party_year" => "release party year", "party_year" => "release party year",
"party_place" => "release party ranking", "party_place" => "release party ranking",
); );
if ($_POST["requestid"]) { if ($_POST["requestid"]) {
if ($_POST["approve"]) { if ($_POST["approve"]) {
@ -23,7 +23,7 @@ if ($_POST["requestid"]) {
$sql = sprintf("update prods set %s = '%s' where id=%d", $sql = sprintf("update prods set %s = '%s' where id=%d",
$o->field,addslashes($o->newvalue),$o->prodid); $o->field,addslashes($o->newvalue),$o->prodid);
$r = mysql_query($sql); $r = mysql_query($sql);
$sql = sprintf("update editrequests set approved = 1, gloperatorid = %d where id=%d", $sql = sprintf("update editrequests set approved = 1, gloperatorid = %d where id=%d",
$_SESSION["SCENEID_ID"],$_POST["requestid"]); $_SESSION["SCENEID_ID"],$_POST["requestid"]);
mysql_query($sql); mysql_query($sql);

View File

@ -39,4 +39,4 @@ while($o = mysql_fetch_object($result)) {
} }
?> ?>
</channel> </channel>
</rss> </rss>

View File

@ -129,7 +129,7 @@ echo "\t<date>".$prod["date"]."</date>\n".
// other parties? // other parties?
// for($i=0;$i<count($prodotherparties);$i++): // for($i=0;$i<count($prodotherparties);$i++):
// affils? // affils?
// if(count($affils)): // if(count($affils)):
// print($affils[$i]["prod2"]); // print($affils[$i]["prod2"]);

View File

@ -112,7 +112,7 @@ for($i=0;$i<count($_GET["platform"]);$i++) {
if ($_GET["platform"][$i]==$platforms[$j]["name"]): if ($_GET["platform"][$i]==$platforms[$j]["name"]):
$platfquery.="platforms.name='".$_GET["platform"][$i]."' OR "; $platfquery.="platforms.name='".$_GET["platform"][$i]."' OR ";
$platfcheck++; $platfcheck++;
endif; endif;
} }
} }
unset($typecheck); unset($typecheck);
@ -152,7 +152,7 @@ if ($_GET["reverse"])
if (substr($orderClause,-5)==" DESC") if (substr($orderClause,-5)==" DESC")
$orderClause = str_replace(" DESC"," ASC",$orderClause); $orderClause = str_replace(" DESC"," ASC",$orderClause);
else else
$orderClause = str_replace(","," DESC,",$orderClause) . " DESC"; $orderClause = str_replace(","," DESC,",$orderClause) . " DESC";
} }
$query .= $orderClause; $query .= $orderClause;
@ -209,7 +209,7 @@ for($i=0;$i<count($prods);$i++) {
if (strlen($prods[$i]["groupn3"])>10 && $prods[$i]["groupacron3"]) $prods[$i]["groupn3"]=$prods[$i]["groupacron3"]; if (strlen($prods[$i]["groupn3"])>10 && $prods[$i]["groupacron3"]) $prods[$i]["groupn3"]=$prods[$i]["groupacron3"];
endif; endif;
$result=mysql_query("SELECT * from sceneorgrecommended where prodid=".$prods[$i]["id"]." ORDER BY type"); $result=mysql_query("SELECT * from sceneorgrecommended where prodid=".$prods[$i]["id"]." ORDER BY type");
while($tmp=mysql_fetch_array($result)) { while($tmp=mysql_fetch_array($result)) {
$sceneorgrecommends[]=$tmp; $sceneorgrecommends[]=$tmp;
@ -245,7 +245,7 @@ if($platfcheck) {
<table bgcolor="#000000" cellspacing="1" cellpadding="2" border="0"> <table bgcolor="#000000" cellspacing="1" cellpadding="2" border="0">
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<th> <th>
<? <?
$pagelink="prodlist.php?"; $pagelink="prodlist.php?";
if($_GET["platform"]) foreach($_GET["platform"] as $p) if($_GET["platform"]) foreach($_GET["platform"] as $p)
$pagelink.="platform[]=".rawurlencode($p)."&amp;"; $pagelink.="platform[]=".rawurlencode($p)."&amp;";
@ -259,7 +259,7 @@ if($platfcheck) {
//unset($_SESSION['ourorder']); //unset($_SESSION['ourorder']);
$_SESSION['ourorder']=$order; $_SESSION['ourorder']=$order;
//print("->".$sortlink."<-"); //print("->".$sortlink."<-");
function printSortlink($ord) function printSortlink($ord)
{ {
global $sortlink; global $sortlink;
@ -274,7 +274,7 @@ if($platfcheck) {
if ($_GET["order"]) if ($_GET["order"])
$pagelink.="order=".rawurlencode($_GET["order"])."&amp;"; $pagelink.="order=".rawurlencode($_GET["order"])."&amp;";
?> ?>
<table><tr> <table><tr>
<td> <td>
<a href="<? printSortlink("type"); ?>"><img src="gfx/<? print(goodfleche("type",$order)); ?>.gif" width="13" height="12" border="0"></a><br /> <a href="<? printSortlink("type"); ?>"><img src="gfx/<? print(goodfleche("type",$order)); ?>.gif" width="13" height="12" border="0"></a><br />
@ -374,7 +374,7 @@ if($platfcheck) {
print("<tr bgcolor=\"#557799\">"); print("<tr bgcolor=\"#557799\">");
} }
?> ?>
<? $typess = explode(",", $prods[$i]["type"]); <? $typess = explode(",", $prods[$i]["type"]);
print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$prods[$i]["id"]."\">"); print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$prods[$i]["id"]."\">");
for($k=0;$k<count($typess);$k++) { for($k=0;$k<count($typess);$k++) {
@ -384,8 +384,8 @@ if($platfcheck) {
?> ?>
<a href="prod.php?which=<? print($prods[$i]["id"]); ?>"><b><? print(strtolower(stripslashes($prods[$i]["name"]))); ?></b></a> <a href="prod.php?which=<? print($prods[$i]["id"]); ?>"><b><? print(strtolower(stripslashes($prods[$i]["name"]))); ?></b></a>
<? <?
print("<td>&nbsp;</td>"); print("<td>&nbsp;</td>");
if(count($sceneorgrecommends)): if(count($sceneorgrecommends)):
print("<td nowrap>"); print("<td nowrap>");
@ -403,7 +403,7 @@ if($platfcheck) {
print("<br /></td>"); print("<br /></td>");
endif; endif;
print("<td width=\"100%\">&nbsp;</td>"); print("<td width=\"100%\">&nbsp;</td>");
$platforms = explode(",", $prods[$i]["allplatforms"]); $platforms = explode(",", $prods[$i]["allplatforms"]);
for($kkk=0;$kkk<count($platforms);$kkk++) { for($kkk=0;$kkk<count($platforms);$kkk++) {
@ -447,7 +447,7 @@ if($platfcheck) {
case 61: case 61:
case 71: case 71:
case 81: case 81:
case 91: $placeadj="st"; case 91: $placeadj="st";
print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n"); print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n");
break; break;
case 2: case 2:
@ -458,7 +458,7 @@ if($platfcheck) {
case 62: case 62:
case 72: case 72:
case 82: case 82:
case 92: $placeadj="nd"; case 92: $placeadj="nd";
print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n"); print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n");
break; break;
case 3: case 3:
@ -469,7 +469,7 @@ if($platfcheck) {
case 63: case 63:
case 73: case 73:
case 83: case 83:
case 93: $placeadj="rd"; case 93: $placeadj="rd";
print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n"); print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n");
break; break;
case 97: print("<td nowrap>disqualified at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n"); case 97: print("<td nowrap>disqualified at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n");
@ -482,9 +482,9 @@ if($platfcheck) {
print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n"); print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n");
break; break;
} }
} else } else
{ {
$placeadj = "??"; $placeadj = "??";
print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n"); print("<td nowrap>".$prods[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$i]["party"]."&when=".sprintf("%02d",$prods[$i]["party_year"])."\">".$prods[$i]["partyname"]."</a><br /></td>\n");
} }
} else { } else {
@ -506,7 +506,7 @@ if($platfcheck) {
?> ?>
<? print($month." ".$year); ?><br /> <? print($month." ".$year); ?><br />
</td> </td>
<? <?
if ($prods[$i]["voteup"]) if ($prods[$i]["voteup"])
{ print("<td>\n".$prods[$i]["voteup"]."</td>\n"); { print("<td>\n".$prods[$i]["voteup"]."</td>\n");
@ -560,7 +560,7 @@ if($platfcheck) {
</a> </a>
</td> </td>
<? endif; ?> <? endif; ?>
<td width="50%" align="right"> <td width="50%" align="right">
<select name="page"> <select name="page">
<? for($i=1;($i-1)<=($nbprods/$prods_per_page);$i++): ?> <? for($i=1;($i-1)<=($nbprods/$prods_per_page);$i++): ?>

View File

@ -52,7 +52,7 @@ $typ = explode(",", $o->type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>" alt="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>" alt="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a> <a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a>
</td> </td>
<td> <td>
@ -62,7 +62,7 @@ if ($o->group1) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group1
if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2); if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2);
if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3); if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3);
echo implode(" :: ",$a); echo implode(" :: ",$a);
?> ?>
</td> </td>
<td> <td>
<? <?
@ -121,7 +121,7 @@ $typ = explode(",", $o->type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>" alt="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>" alt="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a> <a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a>
</td> </td>
<td> <td>
@ -131,7 +131,7 @@ if ($o->group1) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group1
if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2); if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2);
if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3); if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3);
echo implode(" :: ",$a); echo implode(" :: ",$a);
?> ?>
</td> </td>
<td> <td>
<? <?
@ -193,7 +193,7 @@ $typ = explode(",", $o->type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>" alt="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>" alt="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a> <a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a>
</td> </td>
<td> <td>
@ -203,7 +203,7 @@ if ($o->group1) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group1
if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2); if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2);
if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3); if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3);
echo implode(" :: ",$a); echo implode(" :: ",$a);
?> ?>
</td> </td>
<td> <td>
<? <?

View File

@ -2,4 +2,4 @@
@session_start(); @session_start();
$_SESSION["nodonate"]=$_GET["reset"]?false:true; $_SESSION["nodonate"]=$_GET["reset"]?false:true;
header("Location: index.php"); header("Location: index.php");
?> ?>

View File

@ -35,16 +35,16 @@ if(!$f) $f=1;
<td bgcolor="#6688AA" align="center"> <td bgcolor="#6688AA" align="center">
<? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires"); <? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires");
print("<b>[ "); ?> print("<b>[ "); ?>
<a href="results.php?which=<?=$which?>&amp;when=<?=$when?>&amp;f=none">html</a> <a href="results.php?which=<?=$which?>&amp;when=<?=$when?>&amp;f=none">html</a>
<? for($i=0;$i<=count($txt)-1;$i++): ?> <? for($i=0;$i<=count($txt)-1;$i++): ?>
| <a href="results.php?which=<?=$which?>&amp;when=<?=$when?>&amp;f=<?=$i+1?>"><?=$txt[$i]?></a> | <a href="results.php?which=<?=$which?>&amp;when=<?=$when?>&amp;f=<?=$i+1?>"><?=$txt[$i]?></a>
<? endfor; <? endfor;
print(" ]</b>"); ?> print(" ]</b>"); ?>
</td> </td>
</tr> </tr>
<tr> <tr>
<td bgcolor="#224488" align="right"> <td bgcolor="#224488" align="right">
<? <?
if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') { if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') {
?> ?>
<b>[ <a href="submitpartyresults.php?which=<?=$which?>&amp;when=<?=$when?>">admin: upload new res</a> ]</b> <b>[ <a href="submitpartyresults.php?which=<?=$which?>&amp;when=<?=$when?>">admin: upload new res</a> ]</b>

View File

@ -11,7 +11,7 @@ if ($_SESSION["SESSION_LEVEL"]=='administrator' && $_POST["ban_id"]) {
$sql = sprintf("update users set level='banned' where id=%d",$_POST["ban_id"]); $sql = sprintf("update users set level='banned' where id=%d",$_POST["ban_id"]);
echo $sql; echo $sql;
mysql_query($sql); mysql_query($sql);
} }
?> ?>
<table bgcolor="#000000" cellspacing="1" cellpadding="3" border="0"> <table bgcolor="#000000" cellspacing="1" cellpadding="3" border="0">
@ -53,7 +53,7 @@ if ($SESSION_LEVEL=='administrator') {
</td> </td>
<? <?
} }
?> ?>
</tr> </tr>
<? <?
} }

View File

@ -395,7 +395,7 @@ if ($voteavg||$all)
$query="UPDATE prods SET voteup=".$rulez.", votepig=".$piggie.", votedown=".$sucks.", voteavg='".$avg."' where id=".$prods[$j]["id"]; $query="UPDATE prods SET voteup=".$rulez.", votepig=".$piggie.", votedown=".$sucks.", voteavg='".$avg."' where id=".$prods[$j]["id"];
print($query."<br />"); print($query."<br />");
mysql_query($query); mysql_query($query);
} }
print("voteavg!<br />"); print("voteavg!<br />");
} }
@ -441,7 +441,7 @@ if ($bbstopics||$all)
$query="UPDATE bbs_topics SET lastpost='".$topics[$i]["lastpost"]."', firstpost='".$topics[$i]["firstpost"]."', userlastpost='".$topics[$i]["latest"]."', userfirstpost='".$topics[$i]["starter"]."', count='".$topics[$i]["replies"]."' where id=".$topics[$i]["id"]; $query="UPDATE bbs_topics SET lastpost='".$topics[$i]["lastpost"]."', firstpost='".$topics[$i]["firstpost"]."', userlastpost='".$topics[$i]["latest"]."', userfirstpost='".$topics[$i]["starter"]."', count='".$topics[$i]["replies"]."' where id=".$topics[$i]["id"];
print($query."<br />"); print($query."<br />");
mysql_query($query); mysql_query($query);
} }
print("bbstopics!<br />"); print("bbstopics!<br />");
} }
@ -526,7 +526,7 @@ if ($webtv||$all)
$query ="insert into downloadlinks set type = 'demoscene.tv', link = 'http://www.demoscene.tv/prod.php?id_prod=".$dtvid."', prod =". $pouetid; $query ="insert into downloadlinks set type = 'demoscene.tv', link = 'http://www.demoscene.tv/prod.php?id_prod=".$dtvid."', prod =". $pouetid;
$result = mysql_query($query); $result = mysql_query($query);
echo "inserted, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />"; echo "inserted, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />";
} else { } else {
echo "already existed, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />"; echo "already existed, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />";
} }
unset($prods); unset($prods);
@ -573,7 +573,7 @@ if ($webtv||$all)
$query ="insert into downloadlinks set type = 'capped.tv', link = 'http://capped.tv/playeralt.php?vid=".$capped."', prod =". $pouetid; $query ="insert into downloadlinks set type = 'capped.tv', link = 'http://capped.tv/playeralt.php?vid=".$capped."', prod =". $pouetid;
$result = mysql_query($query); $result = mysql_query($query);
echo "inserted, pouetid: " . $pouetid . " capped: " . $capped . "<br />"; echo "inserted, pouetid: " . $pouetid . " capped: " . $capped . "<br />";
} else { } else {
echo "already existed, pouetid: " . $pouetid . " capped: " . $capped . "<br />"; echo "already existed, pouetid: " . $pouetid . " capped: " . $capped . "<br />";
} }
} else { echo "no pouetid for capped: " . $capped . "<br />"; } } else { echo "no pouetid for capped: " . $capped . "<br />"; }

View File

@ -67,7 +67,7 @@ $typ = explode(",", $o->type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a> <a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a>
</td> </td>
<td> <td>
@ -77,7 +77,7 @@ if ($o->group1) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group1
if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2); if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2);
if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3); if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3);
echo implode(" :: ",$a); echo implode(" :: ",$a);
?> ?>
</td> </td>
<td> <td>
<? <?
@ -154,7 +154,7 @@ $typ = explode(",", $o->type);
foreach($typ as $p) { foreach($typ as $p) {
?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><? ?><a href="prodlist.php?type[]=<?=$p?>"><img src="gfx/types/<?=$types[$p]?>" border="0" title="<?=$p?>"></a><?
} }
?> ?>
<a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a></td> <a href="prod.php?which=<?=$o->id?>"><?=$o->name?></a></td>
<td> <td>
<? <?
@ -163,7 +163,7 @@ if ($o->group1) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group1
if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2); if ($o->group2) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group2,$o->groupn2);
if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3); if ($o->group3) $a[] = sprintf("<a href='groups.php?which=%d'>%s</a>",$o->group3,$o->groupn3);
echo implode(" :: ",$a); echo implode(" :: ",$a);
?> ?>
</td> </td>
<td> <td>
<? <?

View File

@ -2,7 +2,7 @@
require("include/top.php"); require("include/top.php");
require("include/libbb.php"); require("include/libbb.php");
function cmp_avg($a, $b) function cmp_avg($a, $b)
{ {
if ($a["avg_rating"] == $b["avg_rating"]) if ($a["avg_rating"] == $b["avg_rating"])
{ {
@ -11,7 +11,7 @@ function cmp_avg($a, $b)
return ($a["avg_rating"] > $b["avg_rating"]) ? -1 : 1; return ($a["avg_rating"] > $b["avg_rating"]) ? -1 : 1;
} }
function cmp_avg_rev($a, $b) function cmp_avg_rev($a, $b)
{ {
if ($a["avg_rating"] == $b["avg_rating"]) if ($a["avg_rating"] == $b["avg_rating"])
{ {
@ -20,7 +20,7 @@ function cmp_avg_rev($a, $b)
return ($a["avg_rating"] < $b["avg_rating"]) ? -1 : 1; return ($a["avg_rating"] < $b["avg_rating"]) ? -1 : 1;
} }
function cmp_tot($a, $b) function cmp_tot($a, $b)
{ {
if ($a["total"] == $b["total"]) if ($a["total"] == $b["total"])
{ {
@ -303,7 +303,7 @@ if($type=="prod") {
} else { } else {
print("<tr bgcolor=\"#557799\">"); print("<tr bgcolor=\"#557799\">");
} }
$typess = explode(",", $results[$i]["type"]); $typess = explode(",", $results[$i]["type"]);
print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$results[$i]["id"]."\">"); print("<td nowrap><table cellspacing=\"0\" cellpadding=\"0\"><tr><td nowrap><a href=\"prod.php?which=".$results[$i]["id"]."\">");
for($k=0;$k<count($typess);$k++) { for($k=0;$k<count($typess);$k++) {
@ -334,8 +334,8 @@ if($type=="prod") {
} }
print("</tr></table></td>\n"); print("</tr></table></td>\n");
?> ?>
<td><a href="groups.php?which=<? print($results[$i]["group1"]); ?>"><? print(strtolower($results[$i]["groupn1"])); ?></a> <td><a href="groups.php?which=<? print($results[$i]["group1"]); ?>"><? print(strtolower($results[$i]["groupn1"])); ?></a>
@ -343,8 +343,8 @@ if($type=="prod") {
<? if ($results[$i]["groupn3"]) {print(" :: ");} ?><a href="groups.php?which=<? print($results[$i]["group3"]); ?>"><? print(strtolower($results[$i]["groupn3"])); ?></a> <? if ($results[$i]["groupn3"]) {print(" :: ");} ?><a href="groups.php?which=<? print($results[$i]["group3"]); ?>"><? print(strtolower($results[$i]["groupn3"])); ?></a>
</td> </td>
<? <?
if(($results[$i]["partyname"])&&!($results[$i]["party"]==1024)) if(($results[$i]["partyname"])&&!($results[$i]["party"]==1024))
{ {
if($results[$i]["party_place"]) if($results[$i]["party_place"])
@ -363,7 +363,7 @@ if($type=="prod") {
case 61: case 61:
case 71: case 71:
case 81: case 81:
case 91: $placeadj="st"; case 91: $placeadj="st";
print("<td>".$results[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$results[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 2: case 2:
@ -374,7 +374,7 @@ if($type=="prod") {
case 62: case 62:
case 72: case 72:
case 82: case 82:
case 92: $placeadj="nd"; case 92: $placeadj="nd";
print("<td>".$results[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$results[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 3: case 3:
@ -385,7 +385,7 @@ if($type=="prod") {
case 63: case 63:
case 73: case 73:
case 83: case 83:
case 93: $placeadj="rd"; case 93: $placeadj="rd";
print("<td>".$results[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$results[$i]["party_place"].$placeadj." at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 97: print("<td>disqualified at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n"); case 97: print("<td>disqualified at <a href=\"party.php?which=".$results[$i]["party"]."&when=".sprintf("%02d",$results[$i]["party_year"])."\">".$results[$i]["partyname"]." ".sprintf("%02d",$results[$i]["party_year"])."</a>".$compophrase."<br /></td>\n");
@ -451,12 +451,12 @@ if($type=="prod") {
DoBar($pourcent); DoBar($pourcent);
print("</td>\n"); print("</td>\n");
?> ?>
</tr> </tr>
<? endfor; ?> <? endfor; ?>
<? if((($nb_posts-1)/$posts_per_page)>0): ?> <? if((($nb_posts-1)/$posts_per_page)>0): ?>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
<td colspan="9"> <td colspan="9">

View File

@ -6,10 +6,10 @@ conn_db();
$r = mysql_query("select name,type,party_year from prods where name like '".mysql_real_escape_string($_GET["what"])."%' order by views desc limit 10"); $r = mysql_query("select name,type,party_year from prods where name like '".mysql_real_escape_string($_GET["what"])."%' order by views desc limit 10");
$res[0] = $_GET["what"]; $res[0] = $_GET["what"];
while($o = mysql_fetch_object($r)) while($o = mysql_fetch_object($r))
{ {
$res[1][] = $o->name; $res[1][] = $o->name;
$res[2][] = $o->type.($o->party_year?", ".$o->party_year:""); $res[2][] = $o->type.($o->party_year?", ".$o->party_year:"");
} }
echo json_encode($res); echo json_encode($res);
?> ?>

View File

@ -1,4 +1,4 @@
<? <?
session_start(); session_start();
var_dump($_SESSION); var_dump($_SESSION);
?> ?>

View File

@ -11,7 +11,7 @@ if (!$_GET["tag"]) {
$sql = "select * from users where id=".$poor_fucker.""; $sql = "select * from users where id=".$poor_fucker."";
$r = mysql_query($sql) or die(mysql_error()); $r = mysql_query($sql) or die(mysql_error());
$usr = mysql_fetch_object($r); $usr = mysql_fetch_object($r);
$r = mysql_query( sprintf("select comment from comments where who=%d",$poor_fucker) ) or die(mysql_error()); $r = mysql_query( sprintf("select comment from comments where who=%d",$poor_fucker) ) or die(mysql_error());
while ($o = mysql_fetch_object($r)) $posts[] = $o->comment; while ($o = mysql_fetch_object($r)) $posts[] = $o->comment;
@ -24,56 +24,56 @@ if (!$_GET["tag"]) {
while ($o = mysql_fetch_object($r)) $posts[] = $o->post; while ($o = mysql_fetch_object($r)) $posts[] = $o->post;
} }
} }
else else
{ {
$threshold = 2000; $threshold = 2000;
$sql = "select * from comments"; $sql = "select * from comments";
$r = mysql_query($sql) or die(mysql_error()); $r = mysql_query($sql) or die(mysql_error());
$usr->avatar = "r.gif"; $usr->avatar = "r.gif";
$usr->nickname = "ALL USERS"; $usr->nickname = "ALL USERS";
} }
$tags = array(); $tags = array();
foreach ($posts as $post) foreach ($posts as $post)
{ {
$a = preg_split("/[^a-zA-Z0-9]/",$post); $a = preg_split("/[^a-zA-Z0-9]/",$post);
foreach($a as $v) if (strlen(trim($v))>1) foreach($a as $v) if (strlen(trim($v))>1)
$tags[strtolower($v)] += 1; $tags[strtolower($v)] += 1;
} }
// remove common words // remove common words
$common = unserialize(@file_get_contents("common_words.txt")); $common = unserialize(@file_get_contents("common_words.txt"));
if (!$common) { if (!$common) {
$f = file_get_contents("http://en.wikipedia.org/w/index.php?title=Most_common_words_in_English&action=raw"); $f = file_get_contents("http://en.wikipedia.org/w/index.php?title=Most_common_words_in_English&action=raw");
echo preg_match_all("/^\| [0-9]+ \|\| ([a-zA-Z]+)$/m",$f,$matches); echo preg_match_all("/^\| [0-9]+ \|\| ([a-zA-Z]+)$/m",$f,$matches);
foreach ($matches[1] as $v) foreach ($matches[1] as $v)
$common[] = strtolower($v); $common[] = strtolower($v);
$common[] = "is"; $common[] = "is";
$common[] = "are"; $common[] = "are";
file_put_contents("common_words.txt",serialize($common)); file_put_contents("common_words.txt",serialize($common));
} }
foreach ($common as $v) unset($tags[$v]); foreach ($common as $v) unset($tags[$v]);
$max = 0; $max = 0;
$avg = 0; $avg = 0;
$avgn = 0; $avgn = 0;
foreach ($tags as $v) { $max = max($max, $v); $avg += $v; $avgn++; } foreach ($tags as $v) { $max = max($max, $v); $avg += $v; $avgn++; }
$avg = (int)($avg / $avgn); $avg = (int)($avg / $avgn);
ksort($tags); ksort($tags);
//var_dump($tags); //var_dump($tags);
?> ?>
<table bgcolor="#000000" cellspacing="1" cellpadding="0" border="0" width="75%" style="margin:5px"> <table bgcolor="#000000" cellspacing="1" cellpadding="0" border="0" width="75%" style="margin:5px">
<tr> <tr>
<td> <td>
<table bgcolor="#000000" cellspacing="1" cellpadding="2" border="0" width="100%"> <table bgcolor="#000000" cellspacing="1" cellpadding="2" border="0" width="100%">
<tr bgcolor="#224488"> <tr bgcolor="#224488">
@ -94,7 +94,7 @@ if (!$_GET["tag"]) {
</tr> </tr>
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
<? <?

View File

@ -19,7 +19,7 @@ function lettermenu($pattern) {
print(" ]<br />\n"); print(" ]<br />\n");
} }
function cmpcomments($a, $b) function cmpcomments($a, $b)
{ {
if ($a["lcom_quand"] == $b["lcom_quand"]) if ($a["lcom_quand"] == $b["lcom_quand"])
{ {
@ -109,7 +109,7 @@ while($tmp = mysql_fetch_array($result)) {
//get max_views for popularity //get max_views for popularity
$result=mysql_query("SELECT MAX(views) FROM prods"); $result=mysql_query("SELECT MAX(views) FROM prods");
$max_views=mysql_result($result,0); $max_views=mysql_result($result,0);
if ($order=="latestcomment") usort($prods, "cmpcomments"); if ($order=="latestcomment") usort($prods, "cmpcomments");
?> ?>
@ -267,7 +267,7 @@ while($tmp = mysql_fetch_array($result)) {
case 61: case 61:
case 71: case 71:
case 81: case 81:
case 91: $placeadj="st"; case 91: $placeadj="st";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 2: case 2:
@ -278,7 +278,7 @@ while($tmp = mysql_fetch_array($result)) {
case 62: case 62:
case 72: case 72:
case 82: case 82:
case 92: $placeadj="nd"; case 92: $placeadj="nd";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 3: case 3:
@ -289,7 +289,7 @@ while($tmp = mysql_fetch_array($result)) {
case 63: case 63:
case 73: case 73:
case 83: case 83:
case 93: $placeadj="rd"; case 93: $placeadj="rd";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 97: print("<td>disqualified at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); case 97: print("<td>disqualified at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
@ -302,15 +302,15 @@ while($tmp = mysql_fetch_array($result)) {
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
} }
} else } else
{ {
$placeadj = "??"; $placeadj = "??";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
} }
} else { } else {
if ($prods[$j]["party"]==1024) print("<td>no party<br /></td>\n"); if ($prods[$j]["party"]==1024) print("<td>no party<br /></td>\n");
else print("<td>??<br /></td>\n"); else print("<td>??<br /></td>\n");
} }
if(($prods[$j]["date"]!="0000-00-00")&&(strlen($prods[$j]["date"])>0)) if(($prods[$j]["date"]!="0000-00-00")&&(strlen($prods[$j]["date"])>0))
{ {
@ -332,7 +332,7 @@ while($tmp = mysql_fetch_array($result)) {
} }
print("<td>".$rmonth." ".$rdate[0]."<br /></td>\n"); print("<td>".$rmonth." ".$rdate[0]."<br /></td>\n");
} else { } else {
print("<td>&nbsp;<br /></td>\n"); print("<td>&nbsp;<br /></td>\n");
} }
if ($prods[$j]["voteup"]) if ($prods[$j]["voteup"])
@ -401,10 +401,10 @@ while($tmp = mysql_fetch_array($result)) {
</tr> </tr>
</table> </table>
</td> </td>
<? <?
} else { } else {
print("<td>&nbsp;<br /></td>\n"); print("<td>&nbsp;<br /></td>\n");
} } ?> } } ?>
</table> </table>
</td> </td>

View File

@ -94,4 +94,4 @@ echo $o->c;
?></td> ?></td>
</tr> </tr>
*/ */
require("include/bottom.php"); ?> require("include/bottom.php"); ?>

View File

@ -4,14 +4,14 @@ include_once("include/sqllib.inc.php");
$r = SQLLib::selectRows("select count(*) as c, substr(quand,1,7) as d from users group by d order by d"); $r = SQLLib::selectRows("select count(*) as c, substr(quand,1,7) as d from users group by d order by d");
include('postgraph.class.php'); include('postgraph.class.php');
$graph = new PostGraph(1920,1080); $graph = new PostGraph(1920,1080);
$data = array(); $data = array();
foreach ($r as $o) foreach ($r as $o)
$data[$o->d] = $o->c; $data[$o->d] = $o->c;
$graph->setData($data); $graph->setData($data);
$graph->setXTextOrientation('vertical'); $graph->setXTextOrientation('vertical');
@ -19,4 +19,4 @@ $graph->drawImage();
$graph->printImage(); $graph->printImage();
?> ?>

View File

@ -16,7 +16,7 @@ $r = mysql_query($sql);
<tr><td> <tr><td>
<table cellspacing="1" cellpadding="2" class="box"> <table cellspacing="1" cellpadding="2" class="box">
<tr><th colspan="3"><center>platform icon check</center></th></tr> <tr><th colspan="3"><center>platform icon check</center></th></tr>
<? <?
$n = 1; $n = 1;
while ($o = mysql_fetch_object($r)) { while ($o = mysql_fetch_object($r)) {

View File

@ -38,4 +38,4 @@ while($o = mysql_fetch_object($r)) {
echo "</table>\n"; echo "</table>\n";
require("include/bottom.php"); require("include/bottom.php");
?> ?>

View File

@ -23,7 +23,7 @@ $sqlz["scene.org nominations by party"] =
foreach ($sqlz as $desc=>$sql) { foreach ($sqlz as $desc=>$sql) {
$r = mysql_query($sql) or die(mysql_error()); $r = mysql_query($sql) or die(mysql_error());
?> ?>
<br /> <br />
<table width="30%"> <table width="30%">
<tr><td> <tr><td>

View File

@ -65,7 +65,7 @@ if($submitok){
$query.= "added=NOW()"; $query.= "added=NOW()";
mysql_query($query); mysql_query($query);
$lastid=mysql_insert_id(); $lastid=mysql_insert_id();
for($i=0;$i<count($platform);$i++) { for($i=0;$i<count($platform);$i++) {
for($j=0;$j<count($platforms);$j++) { for($j=0;$j<count($platforms);$j++) {
if ($platform[$i]==$platforms[$j]["name"]): if ($platform[$i]==$platforms[$j]["name"]):

View File

@ -13,7 +13,7 @@ if(is_uploaded_file($nfofile))
if(file_exists("nfo/".$which.".nfo")) if(file_exists("nfo/".$which.".nfo"))
{ {
if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator')
{ {
unlink("nfo/".$which.".nfo"); unlink("nfo/".$which.".nfo");
copy($nfofile,"nfo/".$which.".nfo"); copy($nfofile,"nfo/".$which.".nfo");
unlink($nfofile); unlink($nfofile);

View File

@ -13,7 +13,7 @@ if(is_uploaded_file($nfofile))
if(file_exists("othernfo/".$which.".nfo")) if(file_exists("othernfo/".$which.".nfo"))
{ {
if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator')
{ {
unlink("othernfo/".$which.".nfo"); unlink("othernfo/".$which.".nfo");
copy($nfofile,"othernfo/".$which.".nfo"); copy($nfofile,"othernfo/".$which.".nfo");
unlink($nfofile); unlink($nfofile);

View File

@ -21,7 +21,7 @@ if($dir)
// check user account // check user account
if(!$_SESSION["SESSION"]||!$_SESSION["SCENEID"]) if(!$_SESSION["SESSION"]||!$_SESSION["SCENEID"])
$errormessage[]="you need to be logged in first."; $errormessage[]="you need to be logged in first.";
// check if there already exists a download directory // check if there already exists a download directory
$query = "SELECT download FROM partylinks WHERE party=".$which." and year=".$when; $query = "SELECT download FROM partylinks WHERE party=".$which." and year=".$when;
$result = mysql_query($query); $result = mysql_query($query);

View File

@ -26,7 +26,7 @@ if(is_uploaded_file($resultsfile))
if(file_exists("results/".$which."_".$when2d.".txt")) if(file_exists("results/".$which."_".$when2d.".txt"))
{ {
if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator')
{ {
unlink("results/".$which."_".$when2d.".txt"); unlink("results/".$which."_".$when2d.".txt");
copy($resultsfile, "results/".$which."_".$when2d.".txt"); copy($resultsfile, "results/".$which."_".$when2d.".txt");
unlink($resultsfile); unlink($resultsfile);

View File

@ -54,7 +54,7 @@ if($name)
foreach ($shithosts as $v) foreach ($shithosts as $v)
if(strstr($myurl["host"],$v)) if(strstr($myurl["host"],$v))
$errormessage[] = "seriously, get better hosting"; $errormessage[] = "seriously, get better hosting";
if(strstr($myurl["host"],"youtube") || strstr($myurl["host"],"youtu.be")) if(strstr($myurl["host"],"youtube") || strstr($myurl["host"],"youtu.be"))
$errormessage[] = "FUCK YOUTUBE - BINARY OR GTFO"; $errormessage[] = "FUCK YOUTUBE - BINARY OR GTFO";
@ -79,7 +79,7 @@ if($name)
$errormessage[] = "no private FTP please"; $errormessage[] = "no private FTP please";
if(!basename($myurl["path"])) if(!basename($myurl["path"]))
$errormessage[] = "no file? no prod!"; $errormessage[] = "no file? no prod!";
} }
// check the release date // check the release date
if((($rmonth)&&($ryear))&&(($rmonth>date('m'))&&($ryear>=date('Y')))) { if((($rmonth)&&($ryear))&&(($rmonth>date('m'))&&($ryear>=date('Y')))) {
@ -97,7 +97,7 @@ if($name)
$errormessage[] = "please select a party"; $errormessage[] = "please select a party";
if(($party&&!$pyear)&&$party!=1024) if(($party&&!$pyear)&&$party!=1024)
$errormessage[] = "please select a party year"; $errormessage[] = "please select a party year";
// check the screenshot // check the screenshot
if(is_uploaded_file($sshotfile)) { if(is_uploaded_file($sshotfile)) {
$fileinfo = GetImageSize($sshotfile); $fileinfo = GetImageSize($sshotfile);
@ -334,7 +334,7 @@ if ((int)($_SESSION["SCENEID_ID"])==3254) {
<!-- <!--
document.write("(<a href=\"javascript:popupGroupSelector('submitprod','group1');\">select</a>)"); document.write("(<a href=\"javascript:popupGroupSelector('submitprod','group1');\">select</a>)");
//--> //-->
</script> </script>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -344,7 +344,7 @@ if ((int)($_SESSION["SCENEID_ID"])==3254) {
<!-- <!--
document.write("(<a href=\"javascript:popupGroupSelector('submitprod','group2');\">select</a>)"); document.write("(<a href=\"javascript:popupGroupSelector('submitprod','group2');\">select</a>)");
//--> //-->
</script> </script>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -354,7 +354,7 @@ if ((int)($_SESSION["SCENEID_ID"])==3254) {
<!-- <!--
document.write("(<a href=\"javascript:popupGroupSelector('submitprod','group3');\">select</a>)"); document.write("(<a href=\"javascript:popupGroupSelector('submitprod','group3');\">select</a>)");
//--> //-->
</script> </script>
</td> </td>
</tr> </tr>

View File

@ -12,7 +12,7 @@ $fields = array(
"party" => "release party", "party" => "release party",
"party_year" => "release party year", "party_year" => "release party year",
"party_place" => "release party ranking", "party_place" => "release party ranking",
); );
$pid = $_GET["which"] ? $_GET["which"] : $_POST["prodid"]; $pid = $_GET["which"] ? $_GET["which"] : $_POST["prodid"];
if ($pid) { if ($pid) {
@ -42,7 +42,7 @@ please enter the prod id you wish to have edited:
?> ?>
<input type="hidden" name="prodid" value="<?=((int)$pid)?>"/> <input type="hidden" name="prodid" value="<?=((int)$pid)?>"/>
please select the field/parameter you wish to have edited for <b><?=$o->name?></b>: please select the field/parameter you wish to have edited for <b><?=$o->name?></b>:
<select name="field"> <select name="field">
<? foreach($fields as $k=>$v) {?> <? foreach($fields as $k=>$v) {?>
<option value="<?=$k?>"><?=$v?></option> <option value="<?=$k?>"><?=$v?></option>
@ -61,7 +61,7 @@ please enter the correct value for <b><?=$fields[$_POST["field"]]?></b> for <b><
$sql = sprintf("insert into editrequests set prodid='%d', field='%s', newvalue='%s', userid='%d', datetime='%s'", $sql = sprintf("insert into editrequests set prodid='%d', field='%s', newvalue='%s', userid='%d', datetime='%s'",
$pid,$_POST["field"],$_POST["newvalue"],$_SESSION["SCENEID_ID"],date("Y-m-d H:i:s")); $pid,$_POST["field"],$_POST["newvalue"],$_SESSION["SCENEID_ID"],date("Y-m-d H:i:s"));
$r = mysql_query($sql); $r = mysql_query($sql);
echo "thanks for your correction. it will soon be reviewed by someone worthy enough to fuck up the site."; echo "thanks for your correction. it will soon be reviewed by someone worthy enough to fuck up the site.";
} }
?> ?>

View File

@ -37,7 +37,7 @@ if(is_uploaded_file($sshotfile))
if(file_exists("screenshots/".$which.".gif")||file_exists("screenshots/".$which.".jpg")||file_exists("screenshots/".$which.".png")) if(file_exists("screenshots/".$which.".gif")||file_exists("screenshots/".$which.".jpg")||file_exists("screenshots/".$which.".png"))
{ {
if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator')
{ {
unlink("screenshots/".$which.".jpg"); unlink("screenshots/".$which.".jpg");
unlink("screenshots/".$which.".gif"); unlink("screenshots/".$which.".gif");
unlink("screenshots/".$which.".png"); unlink("screenshots/".$which.".png");

View File

@ -10,7 +10,7 @@ if ($_GET["derivative"] && $_GET["original"])
if ($o->type) { if ($o->type) {
$query = "DELETE FROM affiliatedprods WHERE derivative=".$_GET["derivative"]." and original=".$_GET["original"]; $query = "DELETE FROM affiliatedprods WHERE derivative=".$_GET["derivative"]." and original=".$_GET["original"];
mysql_query($query); mysql_query($query);
$query = "INSERT INTO affiliatedprods SET "; $query = "INSERT INTO affiliatedprods SET ";
$query.= "derivative='".$_GET["original"]."', "; $query.= "derivative='".$_GET["original"]."', ";
$query.= "original='".$_GET["derivative"]."', "; $query.= "original='".$_GET["derivative"]."', ";

View File

@ -11,4 +11,4 @@ while(list($k,$v)=each($_SESSION))
echo "COOKIE:<br>"; echo "COOKIE:<br>";
while(list($k,$v)=each($_COOKIE)) while(list($k,$v)=each($_COOKIE))
echo "$k: $v<br>"; echo "$k: $v<br>";
?> ?>

View File

@ -1,9 +1,9 @@
<? <?
setcookie("SCENEID_COOKIE","", time() - 3600, "/", "scene.org"); setcookie("SCENEID_COOKIE","", time() - 3600, "/", "scene.org");
unset($_COOKIE["SCENEID_COOKIE"]); unset($_COOKIE["SCENEID_COOKIE"]);
//print_r($_COOKIE); //print_r($_COOKIE);
while(list($k,$v)=each($_COOKIE)) while(list($k,$v)=each($_COOKIE))
echo "$k: $v<br>"; echo "$k: $v<br>";
?> ?>

View File

@ -23,7 +23,7 @@ if ($which == 6618)
if ($which == 7465) { if ($which == 7465) {
header("Location: http://www.scene.org/demoscene.php"); header("Location: http://www.scene.org/demoscene.php");
exit(); exit();
} }
*/ */
$query='SELECT count(0) FROM bbs_posts WHERE topic='.(int)$which; $query='SELECT count(0) FROM bbs_posts WHERE topic='.(int)$which;
$result=mysql_query($query); $result=mysql_query($query);
@ -65,7 +65,7 @@ if (canEditBBSCategories()) {
[<a href="edit_topic_category.php?which=<?=$which?>">edit</a>] [<a href="edit_topic_category.php?which=<?=$which?>">edit</a>]
<? <?
} }
?> ?>
</td> </td>
</tr> </tr>
<tr bgcolor="#224488"><td> <tr bgcolor="#224488"><td>
@ -125,7 +125,7 @@ if (canEditBBSCategories()) {
<? for($i=0;$i<count($replies);$i++): ?> <? for($i=0;$i<count($replies);$i++): ?>
<tr class="cite-<?=$replies[$i]["author"]?>"><td bgcolor="#446688" id="c<?=$replies[$i]["id"]?>"> <tr class="cite-<?=$replies[$i]["author"]?>"><td bgcolor="#446688" id="c<?=$replies[$i]["id"]?>">
<? if ($i == count($replies) - 1) printf("<a name='lastpost'></a>"); ?> <? if ($i == count($replies) - 1) printf("<a name='lastpost'></a>"); ?>
<? <?
if ( if (
( ($replies[$i]["level"]=='fakeuser') && $user["topichidefakeuser"] ) || ( ($replies[$i]["level"]=='fakeuser') && $user["topichidefakeuser"] ) ||
( ($replies[$i]["level"]=='pr0nstahr') && $user["topichidepornstar"] ) || ( ($replies[$i]["level"]=='pr0nstahr') && $user["topichidepornstar"] ) ||
@ -218,9 +218,9 @@ if (canEditBBSCategories()) {
if($_SESSION["SCENEID_ID"]) if($_SESSION["SCENEID_ID"])
{ {
if ($which==1024) if ($which==1024)
$message = "please always use [url=http://en.wikipedia.org/wiki/BBCode]bbcode[/url] in this thread when refering to broken things."; $message = "please always use [url=http://en.wikipedia.org/wiki/BBCode]bbcode[/url] in this thread when refering to broken things.";
if ($topic->closed) if ($topic->closed)
{ {
?> ?>
@ -306,7 +306,7 @@ else
</tr> </tr>
</table> </table>
</form> </form>
<? <?
} }
?><br /> ?><br />

View File

@ -396,7 +396,7 @@ if ($voteavg||$all)
$query="UPDATE prods SET voteup=".$rulez.", votepig=".$piggie.", votedown=".$sucks.", voteavg='".$avg."' where id=".$prods[$j]["id"]; $query="UPDATE prods SET voteup=".$rulez.", votepig=".$piggie.", votedown=".$sucks.", voteavg='".$avg."' where id=".$prods[$j]["id"];
print($query."<br />"); print($query."<br />");
mysql_query($query); mysql_query($query);
} }
print("voteavg!<br />"); print("voteavg!<br />");
} }
@ -442,7 +442,7 @@ if ($bbstopics||$all)
$query="UPDATE bbs_topics SET lastpost='".$topics[$i]["lastpost"]."', firstpost='".$topics[$i]["firstpost"]."', userlastpost='".$topics[$i]["latest"]."', userfirstpost='".$topics[$i]["starter"]."', count='".$topics[$i]["replies"]."' where id=".$topics[$i]["id"]; $query="UPDATE bbs_topics SET lastpost='".$topics[$i]["lastpost"]."', firstpost='".$topics[$i]["firstpost"]."', userlastpost='".$topics[$i]["latest"]."', userfirstpost='".$topics[$i]["starter"]."', count='".$topics[$i]["replies"]."' where id=".$topics[$i]["id"];
print($query."<br />"); print($query."<br />");
mysql_query($query); mysql_query($query);
} }
print("bbstopics!<br />"); print("bbstopics!<br />");
} }
@ -528,7 +528,7 @@ if ($webtv||$all)
$query ="insert into downloadlinks set type = 'demoscene.tv', link = 'http://www.demoscene.tv/prod.php?id_prod=".$dtvid."', prod =". $pouetid; $query ="insert into downloadlinks set type = 'demoscene.tv', link = 'http://www.demoscene.tv/prod.php?id_prod=".$dtvid."', prod =". $pouetid;
$result = mysql_query($query); $result = mysql_query($query);
echo "inserted, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />"; echo "inserted, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />";
} else { } else {
echo "already existed, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />"; echo "already existed, pouetid: " . $pouetid . " dtvid: " . $dtvid . "<br />";
} }
unset($prods); unset($prods);
@ -572,7 +572,7 @@ if ($webtv||$all)
$query ="insert into downloadlinks set type = 'capped.tv', link = 'http://capped.tv/playeralt.php?vid=".$capped."', prod =". $pouetid; $query ="insert into downloadlinks set type = 'capped.tv', link = 'http://capped.tv/playeralt.php?vid=".$capped."', prod =". $pouetid;
$result = mysql_query($query); $result = mysql_query($query);
echo "inserted, pouetid: " . $pouetid . " capped: " . $capped . "<br />"; echo "inserted, pouetid: " . $pouetid . " capped: " . $capped . "<br />";
} else { } else {
echo "already existed, pouetid: " . $pouetid . " capped: " . $capped . "<br />"; echo "already existed, pouetid: " . $pouetid . " capped: " . $capped . "<br />";
} }
unset($prods); unset($prods);

View File

@ -50,7 +50,7 @@ switch($order) {
$query="SELECT id,nickname,quand,level,avatar,glops FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; $query="SELECT id,nickname,quand,level,avatar,glops FROM users WHERE (".$sqlwhere.") ORDER BY nickname";
$cquery="SELECT count(0) FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; $cquery="SELECT count(0) FROM users WHERE (".$sqlwhere.") ORDER BY nickname";
break; break;
case "age": case "age":
$query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY quand"; $query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY quand";
if(($page<=0)||(!$page)) { if(($page<=0)||(!$page)) {
$page=1; $page=1;
@ -58,7 +58,7 @@ switch($order) {
$query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page"; $query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page";
$cquery="SELECT count(0) FROM users ORDER BY quand"; $cquery="SELECT count(0) FROM users ORDER BY quand";
break; break;
case "glops": case "glops":
$query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY glops DESC"; $query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY glops DESC";
if(($page<=0)||(!$page)) { if(($page<=0)||(!$page)) {
$page=1; $page=1;
@ -66,7 +66,7 @@ switch($order) {
$query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page"; $query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page";
$cquery="SELECT count(0) FROM users ORDER BY glops DESC"; $cquery="SELECT count(0) FROM users ORDER BY glops DESC";
break; break;
case "level": case "level":
$query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY level ASC, quand"; $query="SELECT id,nickname,quand,level,avatar,glops FROM users ORDER BY level ASC, quand";
if(($page<=0)||(!$page)) { if(($page<=0)||(!$page)) {
$page=1; $page=1;
@ -74,7 +74,7 @@ switch($order) {
$query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page"; $query.=" LIMIT ".(($page-1)*$users_per_page).",$users_per_page";
$cquery="SELECT count(0) FROM users ORDER BY quand"; $cquery="SELECT count(0) FROM users ORDER BY quand";
break; break;
default: default:
$query="SELECT id,nickname,quand,level,avatar,glops FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; $query="SELECT id,nickname,quand,level,avatar,glops FROM users WHERE (".$sqlwhere.") ORDER BY nickname";
$cquery="SELECT count(0) FROM users WHERE (".$sqlwhere.") ORDER BY nickname"; $cquery="SELECT count(0) FROM users WHERE (".$sqlwhere.") ORDER BY nickname";
break; break;
@ -263,7 +263,7 @@ if(!$maxglops)$maxglops=1;
</th> </th>
</tr> </tr>
<? else: <? else:
$nextlink="userlist.php?order=".$order."&page="; $nextlink="userlist.php?order=".$order."&page=";
?> ?>
<tr bgcolor="#224488"> <tr bgcolor="#224488">
@ -320,9 +320,9 @@ if(!$maxglops)$maxglops=1;
</table> </table>
</td> </td>
</tr> </tr>
<? endif; ?> <? endif; ?>
</table> </table>
</td> </td>

View File

@ -19,7 +19,7 @@ function lettermenu($pattern) {
print(" ]<br />\n"); print(" ]<br />\n");
} }
function cmpcomments($a, $b) function cmpcomments($a, $b)
{ {
if ($a["lcom_quand"] == $b["lcom_quand"]) if ($a["lcom_quand"] == $b["lcom_quand"])
{ {
@ -109,7 +109,7 @@ while($tmp = mysql_fetch_array($result)) {
//get max_views for popularity //get max_views for popularity
$result=mysql_query("SELECT MAX(views) FROM prods"); $result=mysql_query("SELECT MAX(views) FROM prods");
$max_views=mysql_result($result,0); $max_views=mysql_result($result,0);
if ($order=="latestcomment") usort($prods, "cmpcomments"); if ($order=="latestcomment") usort($prods, "cmpcomments");
?> ?>
@ -267,7 +267,7 @@ while($tmp = mysql_fetch_array($result)) {
case 61: case 61:
case 71: case 71:
case 81: case 81:
case 91: $placeadj="st"; case 91: $placeadj="st";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 2: case 2:
@ -278,7 +278,7 @@ while($tmp = mysql_fetch_array($result)) {
case 62: case 62:
case 72: case 72:
case 82: case 82:
case 92: $placeadj="nd"; case 92: $placeadj="nd";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 3: case 3:
@ -289,7 +289,7 @@ while($tmp = mysql_fetch_array($result)) {
case 63: case 63:
case 73: case 73:
case 83: case 83:
case 93: $placeadj="rd"; case 93: $placeadj="rd";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
case 97: print("<td>disqualified at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); case 97: print("<td>disqualified at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
@ -302,15 +302,15 @@ while($tmp = mysql_fetch_array($result)) {
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
break; break;
} }
} else } else
{ {
$placeadj = "??"; $placeadj = "??";
print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n"); print("<td>".$prods[$j]["party_place"].$placeadj." at <a href=\"party.php?which=".$prods[$j]["party"]."&when=".sprintf("%02d",$prods[$j]["party_year"])."\">".$prods[$j]["partyname"]." ".sprintf("%02d",$prods[$j]["party_year"])."</a>".$compophrase."<br /></td>\n");
} }
} else { } else {
if ($prods[$j]["party"]==1024) print("<td>no party<br /></td>\n"); if ($prods[$j]["party"]==1024) print("<td>no party<br /></td>\n");
else print("<td>??<br /></td>\n"); else print("<td>??<br /></td>\n");
} }
if(($prods[$j]["date"]!="0000-00-00")&&(strlen($prods[$j]["date"])>0)) if(($prods[$j]["date"]!="0000-00-00")&&(strlen($prods[$j]["date"])>0))
{ {
@ -332,7 +332,7 @@ while($tmp = mysql_fetch_array($result)) {
} }
print("<td>".$rmonth." ".$rdate[0]."<br /></td>\n"); print("<td>".$rmonth." ".$rdate[0]."<br /></td>\n");
} else { } else {
print("<td>&nbsp;<br /></td>\n"); print("<td>&nbsp;<br /></td>\n");
} }
if ($prods[$j]["voteup"]) if ($prods[$j]["voteup"])
@ -401,10 +401,10 @@ while($tmp = mysql_fetch_array($result)) {
</tr> </tr>
</table> </table>
</td> </td>
<? <?
} else { } else {
print("<td>&nbsp;<br /></td>\n"); print("<td>&nbsp;<br /></td>\n");
} } ?> } } ?>
</table> </table>
</td> </td>