mirror of
https://github.com/psenough/pouet.net.git
synced 2025-01-29 11:02:20 +01:00
Affiliates did not survive the OSS
This commit is contained in:
parent
15ed5f2440
commit
28743167d4
@ -1,7 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>nothing here</title>
|
||||
</head>
|
||||
<body>
|
||||
<div align="center">y a rien on vous dit =)</div>
|
||||
</body>
|
@ -1,42 +0,0 @@
|
||||
<?
|
||||
//if($REMOTE_ADDR!="212.11.11.55") die("access not allowed");
|
||||
|
||||
print("<?\n\n");
|
||||
|
||||
require_once("../../include/auth.php");
|
||||
$dbinfo=$db;
|
||||
$db=mysql_connect($dbinfo['host'],$dbinfo['user'], $dbinfo['password']);
|
||||
mysql_select_db($dbinfo['database'],$db);
|
||||
|
||||
$query="SELECT id,type,name,group1,group2,quand FROM prods ORDER BY quand DESC LIMIT 5";
|
||||
$result=mysql_query($query,$db);
|
||||
while($tmp=mysql_fetch_array($result)) {
|
||||
$prods[]=$tmp;
|
||||
}
|
||||
|
||||
for($i=0;$i<count($prods);$i++) {
|
||||
$query="SELECT name FROM groups WHERE id=".$prods[$i]["group1"];
|
||||
$result=mysql_query($query,$db);
|
||||
if(mysql_num_rows($result)) {
|
||||
$prods[$i]["groupname1"]=mysql_result($result,0);
|
||||
}
|
||||
$query="SELECT name FROM groups WHERE id=".$prods[$i]["group2"];
|
||||
$result=mysql_query($query,$db);
|
||||
if(mysql_num_rows($result)) {
|
||||
$prods[$i]["groupname2"].=mysql_result($result,0);
|
||||
}
|
||||
}
|
||||
|
||||
for($i=0;$i<count($prods);$i++) {
|
||||
print("\$newprods[".$i."][\"id\"]=".$prods[$i]["id"].";\n");
|
||||
print("\$newprods[".$i."][\"name\"]=\"".$prods[$i]["name"]."\";\n");
|
||||
print("\$newprods[".$i."][\"type\"]=\"".$prods[$i]["type"]."\";\n");
|
||||
print("\$newprods[".$i."][\"group1\"]=\"".$prods[$i]["groupname1"]."\";\n");
|
||||
print("\$newprods[".$i."][\"group2\"]=\"".$prods[$i]["groupname2"]."\";\n");
|
||||
print("\$newprods[".$i."][\"date\"]=\"".$prods[$i]["quand"]."\";\n");
|
||||
print("\n");
|
||||
}
|
||||
|
||||
mysql_close($db);
|
||||
print("?>\n");
|
||||
?>
|
@ -1 +0,0 @@
|
||||
deny from all
|
@ -1,3 +0,0 @@
|
||||
<?
|
||||
mysql_close($db);
|
||||
?>
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
require_once("../../../include/auth.php");
|
||||
$dbinfo=$db;
|
||||
$db=mysql_connect($dbinfo['host'],$dbinfo['user'], $dbinfo['password']);
|
||||
mysql_select_db($dbinfo['database'],$db);
|
||||
?>
|
@ -1,46 +0,0 @@
|
||||
<?
|
||||
require("inc/top.php");
|
||||
|
||||
/*
|
||||
$query="SELECT MAX(views) FROM prods";
|
||||
$result=mysql_query($query,$db);
|
||||
$maxviews=mysql_result($result,0);
|
||||
$query="SELECT id,name,groups,views FROM prods WHERE (views>=(".floor(($maxviews*7)/100).")) ORDER BY name ASC";
|
||||
|
||||
$query="SELECT id,type,name,groups,when FROM prods ORDER BY views DESC LIMIT 5";
|
||||
$result=mysql_query($query,$db);
|
||||
while($tmp=mysql_fetch_array($result)) {
|
||||
$prods[]=$tmp;
|
||||
}
|
||||
*/
|
||||
|
||||
$query="SELECT id,type,name,group1,group2,quand FROM prods ORDER BY quand DESC LIMIT 15";
|
||||
$result=mysql_query($query,$db);
|
||||
while($tmp=mysql_fetch_array($result)) {
|
||||
$prods[]=$tmp;
|
||||
}
|
||||
|
||||
for($i=0;$i<count($prods);$i++) {
|
||||
$query="SELECT name FROM groups WHERE id=".$prods[$i]["group1"];
|
||||
$result=mysql_query($query,$db);
|
||||
if(mysql_num_rows($result)) {
|
||||
$prods[$i]["group"]=mysql_result($result,0);
|
||||
}
|
||||
$query="SELECT name FROM groups WHERE id=".$prods[$i]["group2"];
|
||||
$result=mysql_query($query,$db);
|
||||
if(mysql_num_rows($result)) {
|
||||
$prods[$i]["group"].=" and ".mysql_result($result,0);
|
||||
}
|
||||
}
|
||||
|
||||
for($i=0;$i<count($prods);$i++) {
|
||||
if($i<5) {
|
||||
$prodtype="most";
|
||||
} else {
|
||||
$prodtype="latest";
|
||||
}
|
||||
print($prods[$i]["id"]."\r\n".$prods[$i]["type"]."\r\n".$prods[$i]["name"]."\r\n".$prods[$i]["group"]."\r\n".$prods[$i]["quand"]."\r\n".$prodtype."\r\n");
|
||||
}
|
||||
|
||||
require("inc/bottom.php");
|
||||
?>
|
@ -1,58 +0,0 @@
|
||||
<?
|
||||
require("inc/top.php");
|
||||
|
||||
if($which)
|
||||
{
|
||||
// $query = "SELECT name,group1,group2,platform FROM prods WHERE id=".$which;
|
||||
$query = '
|
||||
SELECT name,group1,group2
|
||||
FROM prods
|
||||
WHERE id='.$which.'
|
||||
';
|
||||
$result=mysql_query($query);
|
||||
$prod=mysql_fetch_array($result);
|
||||
|
||||
$query = '
|
||||
SELECT platforms.name
|
||||
FROM platforms, prods_platforms
|
||||
WHERE
|
||||
prods_platforms.prod = '.$which.' AND
|
||||
platforms.id = prods_platforms.platform
|
||||
';
|
||||
$result=mysql_query($query);
|
||||
$platforms=mysql_fetch_assoc($result);
|
||||
}
|
||||
|
||||
if($prod["group1"])
|
||||
{
|
||||
$query="SELECT name FROM groups WHERE id=".$prod["group1"];
|
||||
$result=mysql_query($query);
|
||||
$prod["group1"]=mysql_result($result,0);
|
||||
} else $prod["group1"]="";
|
||||
|
||||
if($prod["group2"])
|
||||
{
|
||||
$query="SELECT name FROM groups WHERE id=".$prod["group2"];
|
||||
$result=mysql_query($query);
|
||||
$prod["group2"]=mysql_result($result,0);
|
||||
} else $prod["group2"]="";
|
||||
|
||||
if(file_exists("../../screenshots/".$which.".gif"))
|
||||
$prod["sshot"]="gif";
|
||||
elseif(file_exists("../../screenshots/".$which.".jpg"))
|
||||
$prod["sshot"]="jpg";
|
||||
elseif(file_exists("../../screenshots/".$which.".png"))
|
||||
$prod["sshot"]="png";
|
||||
|
||||
print($prod["name"]."\r\n");
|
||||
print($prod["group1"]."\r\n");
|
||||
print($prod["group2"]."\r\n");
|
||||
print($prod["sshot"]."\r\n");
|
||||
if(is_array($platforms)) {
|
||||
foreach($platforms as $p) {
|
||||
print($platforms['name']."\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
require("inc/bottom.php");
|
||||
?>
|
@ -1,31 +0,0 @@
|
||||
<?
|
||||
require("inc/top.php");
|
||||
|
||||
/*
|
||||
$query="SELECT MAX(views) FROM prods";
|
||||
$result=mysql_query($query,$db);
|
||||
$maxviews=mysql_result($result,0);
|
||||
$query="SELECT id,name,groups,views FROM prods WHERE (views>=(".floor(($maxviews*7)/100).")) ORDER BY name ASC";
|
||||
*/
|
||||
$query="SELECT id,name,group1,group2,views,quand FROM prods ORDER BY name ASC";
|
||||
$result=mysql_query($query,$db);
|
||||
while($tmp=mysql_fetch_array($result)) {
|
||||
$prods[]=$tmp;
|
||||
}
|
||||
|
||||
$query="SELECT id,name FROM groups";
|
||||
$result=mysql_query($query,$db);
|
||||
while($tmp=mysql_fetch_array($result)) {
|
||||
$groups[$tmp["id"]]=$tmp["name"];
|
||||
}
|
||||
|
||||
for($i=0;$i<count($prods);$i++) {
|
||||
if($prods[$i]["group2"]) {
|
||||
print($prods[$i]["id"]."\r\n".$prods[$i]["name"]."\r\n".$groups[$prods[$i]["group1"]]." and ".$groups[$prods[$i]["group2"]]."\r\n".$prods[$i]["quand"]."\r\n");
|
||||
} else {
|
||||
print($prods[$i]["id"]."\r\n".$prods[$i]["name"]."\r\n".$groups[$prods[$i]["group1"]]."\r\n".$prods[$i]["quand"]."\r\n");
|
||||
}
|
||||
}
|
||||
|
||||
require("inc/bottom.php");
|
||||
?>
|
@ -1 +0,0 @@
|
||||
<? mysql_close($db); ?>
|
@ -1,61 +0,0 @@
|
||||
<?
|
||||
require("top.php");
|
||||
|
||||
$query="SELECT author1,author2,vote_count FROM logos";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
// count only voted up logos
|
||||
if($tmp['vote_count'] > 0)
|
||||
{
|
||||
if($tmp["author1"])
|
||||
$totals[$tmp["author1"]]+=20;
|
||||
if($tmp["author2"])
|
||||
$totals[$tmp["author2"]]+=20;
|
||||
}
|
||||
}
|
||||
$query="SELECT added FROM prods";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
$totals[$tmp["added"]]+=2;
|
||||
}
|
||||
$query="SELECT added FROM groups";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
$totals[$tmp["added"]]++;
|
||||
}
|
||||
$query="SELECT added FROM parties";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
$totals[$tmp["added"]]++;
|
||||
}
|
||||
$query="SELECT user FROM screenshots";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
$totals[$tmp["user"]]++;
|
||||
}
|
||||
$query="SELECT user FROM nfos";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
$totals[$tmp["user"]]++;
|
||||
}
|
||||
|
||||
$query="SELECT COUNT(DISTINCT which) as comments,who FROM comments GROUP BY who";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result)) {
|
||||
$totals[$tmp["who"]]+=$tmp["comments"];
|
||||
}
|
||||
|
||||
$query="SELECT users.id,ud.points FROM users,ud WHERE ud.login=users.udlogin";
|
||||
$result=mysql_query($query);
|
||||
while($tmp=mysql_fetch_assoc($result))
|
||||
$totals[$tmp["id"]]+=round($tmp["points"]/1000);
|
||||
|
||||
reset($totals);
|
||||
for($i=0;$i<count($totals);$i++) {
|
||||
$query="UPDATE users SET glops=".$totals[key($totals)]." WHERE id=".key($totals);
|
||||
mysql_query($query);
|
||||
next($totals);
|
||||
}
|
||||
|
||||
require("bottom.php");
|
||||
?>
|
@ -1,35 +0,0 @@
|
||||
<?
|
||||
require("top.php");
|
||||
|
||||
/* marche pas encore */
|
||||
$fd = fsockopen ("onds.ojuice.net",80);
|
||||
fputs($fd,"GET /newspouet.php HTTP/1.1\nHost:onds.ojuice.net\n\n");
|
||||
//while (!feof ($fd)) {
|
||||
$buffer = fgets($fd, 4096);
|
||||
echo $buffer;
|
||||
//}
|
||||
fclose ($fd);
|
||||
/**/
|
||||
?>
|
||||
|
||||
</pre>
|
||||
<?
|
||||
include("http://onds.ojuice.net/newspouet.php");
|
||||
|
||||
for($i=0;$i<=4;$i++) {
|
||||
$query="REPLACE ojnews SET ";
|
||||
$query.="id=".$ojnews[$i]["id"].", ";
|
||||
$query.="title='".addslashes($ojnews[$i]["title"])."', ";
|
||||
$query.="url='".$ojnews[$i]["url"]."', ";
|
||||
$query.="quand='".$ojnews[$i]["when"]."', ";
|
||||
$query.="authorid=".$ojnews[$i]["authorid"].", ";
|
||||
$query.="authornick='".addslashes($ojnews[$i]["authornick"])."', ";
|
||||
$query.="authorgroup='".addslashes($ojnews[$i]["authorgroup"])."', ";
|
||||
$query.="content='".addslashes($ojnews[$i]["content"])."'";
|
||||
mysql_query($query,$db);
|
||||
//print("<hr>".$query."<br>");
|
||||
}
|
||||
|
||||
|
||||
require("bottom.php");
|
||||
?>
|
@ -1,33 +0,0 @@
|
||||
<?
|
||||
require("top.php");
|
||||
|
||||
unset($total);
|
||||
$i=0;
|
||||
$query="SELECT id FROM prods ORDER BY views DESC";
|
||||
$result = mysql_query($query);
|
||||
while($tmp = mysql_fetch_assoc($result)) {
|
||||
$total[$tmp["id"]]+=$i;
|
||||
$i++;
|
||||
}
|
||||
|
||||
$i=0;
|
||||
$query="SELECT prods.id,SUM(comments.rating) AS somme FROM prods,comments WHERE prods.id=comments.which GROUP BY prods.id ORDER BY somme DESC";
|
||||
$result = mysql_query($query);
|
||||
while($tmp = mysql_fetch_assoc($result)) {
|
||||
$total[$tmp["id"]]+=$i;
|
||||
$i++;
|
||||
}
|
||||
|
||||
asort($total);
|
||||
|
||||
$i=1;
|
||||
unset($tmp);
|
||||
unset($top_demos);
|
||||
while ((list ($key, $val)=each($total))) {
|
||||
$query="UPDATE prods SET rank=".$i." WHERE id=".$key;
|
||||
mysql_query($query);
|
||||
$i++;
|
||||
}
|
||||
|
||||
require("bottom.php");
|
||||
?>
|
@ -1,6 +0,0 @@
|
||||
<?php
|
||||
require_once("../../include/auth.php");
|
||||
$dbinfo=$db;
|
||||
$db=mysql_connect($dbinfo['host'],$dbinfo['user'], $dbinfo['password']);
|
||||
mysql_select_db($dbinfo['database'],$db);
|
||||
?>
|
@ -1,117 +0,0 @@
|
||||
<pre>
|
||||
<?
|
||||
require("top.php");
|
||||
|
||||
$file = fopen ("http://www.grid.org/services/teams/team_members.htm?id=BC792A55-96EB-4170-9026-239438C3D04A&rsps=250", "r");
|
||||
if (!$file) {
|
||||
echo "<p>Unable to open remote file.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
$i=0;
|
||||
|
||||
while (!feof ($file)) {
|
||||
$line = fgets ($file, 1024);
|
||||
if(strstr($line,"<tr bgcolor=\"#FFFFFF\" onmouseover=\"javascript:style.background='#E5E5E5'\" onmouseout=\"javascript:style.background='#FFFFFF'\">")) {
|
||||
$line = fgets ($file, 1024);
|
||||
eregi("><b>(.*)</b></a></td>", $line, $out);
|
||||
$ud[$i]["login"]=$out[1];
|
||||
$line = fgets ($file, 1024);
|
||||
eregi("<td align=\"right\" nowrap=\"true\">(.*)</td>", $line, $out);
|
||||
$ud[$i]["joined"]=$out[1];
|
||||
$line = fgets ($file, 1024);
|
||||
eregi("<td align=\"right\">(.*)</td>", $line, $out);
|
||||
$ud[$i]["cputime"]=$out[1];
|
||||
$line = fgets ($file, 1024);
|
||||
eregi("<td align=\"right\">(.*)</td>", $line, $out);
|
||||
$ud[$i]["points"]=$out[1];
|
||||
$line = fgets ($file, 1024);
|
||||
eregi("<td align=\"right\">(.*)</td>", $line, $out);
|
||||
$ud[$i]["results"]=$out[1];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
fclose($file);
|
||||
|
||||
for($i=0;$i<count($ud);$i++)
|
||||
{
|
||||
/*
|
||||
// cputime transformation
|
||||
$ty=sprintf("%d",substr($ud[$i]["cputime"],0,1));
|
||||
$td=sprintf("%d",substr($ud[$i]["cputime"],2,3));
|
||||
$th=sprintf("%d",substr($ud[$i]["cputime"],6,2));
|
||||
$tm=sprintf("%d",substr($ud[$i]["cputime"],9,2));
|
||||
$ts=sprintf("%d",substr($ud[$i]["cputime"],12,2));
|
||||
$ud[$i]["cputime"]="";
|
||||
if($ty) $ud[$i]["cputime"].=$ty." year".(($ty>1)?"s":"")." ";
|
||||
if($td) $ud[$i]["cputime"].=$td." day".(($td>1)?"s":"")." ";
|
||||
if($th) $ud[$i]["cputime"].=$th." hour".(($th>1)?"s":"")." ";
|
||||
if($tm) $ud[$i]["cputime"].=$tm." minute".(($tm>1)?"s":"")." ";
|
||||
if($ts||(!$ty&&!$td&&!$th&&!$tm)) $ud[$i]["cputime"].=$ts." second".(($ts>1)?"s":"");
|
||||
*/
|
||||
// joined date transformation
|
||||
$jm=sprintf("%02d",substr($ud[$i]["joined"],0,2));
|
||||
$jd=sprintf("%02d",substr($ud[$i]["joined"],3,2));
|
||||
$jy=sprintf("%d",substr($ud[$i]["joined"],6,4));
|
||||
$ud[$i]["joined"]=$jy."-".$jm."-".$jd;
|
||||
|
||||
$ud[$i]["results"]=str_replace(",","",$ud[$i]["results"]);
|
||||
$ud[$i]["points"]=str_replace(",","",$ud[$i]["points"]);
|
||||
/*
|
||||
// pouët.net account check
|
||||
$query="SELECT id,nickname,avatar FROM users WHERE udlogin='".$ud[$i]["login"]."'";
|
||||
$result=mysql_query($query);
|
||||
if(mysql_num_rows($result))
|
||||
{
|
||||
$ud[$i]["id"]=mysql_result($result,0,"id");
|
||||
$ud[$i]["nickname"]=mysql_result($result,0,"nickname");
|
||||
$ud[$i]["avatar"]=mysql_result($result,0,"avatar");
|
||||
}
|
||||
*/
|
||||
}
|
||||
// print(count($ud)."\n");
|
||||
for($i=0;$i<count($ud);$i++)
|
||||
{
|
||||
$query="SELECT id FROM ud WHERE login='".$ud[$i]["login"]."'";
|
||||
$result=mysql_query($query);
|
||||
if(mysql_num_rows($result))
|
||||
{
|
||||
$id=mysql_result($result,0);
|
||||
$query="UPDATE ud SET ";
|
||||
$query.="joined='".$ud[$i]["joined"]."',";
|
||||
$query.="results=".$ud[$i]["results"].",";
|
||||
$query.="points=".$ud[$i]["points"].",";
|
||||
$query.="cputime='".$ud[$i]["cputime"]."' ";
|
||||
$query.="WHERE id=".$id;
|
||||
} else {
|
||||
$query="INSERT ud SET ";
|
||||
$query.="login='".$ud[$i]["login"]."',";
|
||||
$query.="joined='".$ud[$i]["joined"]."',";
|
||||
$query.="results=".$ud[$i]["results"].",";
|
||||
$query.="points=".$ud[$i]["points"].",";
|
||||
$query.="cputime='".$ud[$i]["cputime"]."'";
|
||||
}
|
||||
// print($query."\n");
|
||||
mysql_query($query);
|
||||
}
|
||||
?>
|
||||
</pre>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>members</th>
|
||||
<th>joined</th>
|
||||
<th>results</th>
|
||||
<th>points</th>
|
||||
<th>cputime</th>
|
||||
</tr>
|
||||
<? for($i=0;$i<count($ud);$i++): ?>
|
||||
<tr>
|
||||
<td><? print($ud[$i]["login"]); ?></td>
|
||||
<td><? print($ud[$i]["joined"]); ?></td>
|
||||
<td align="right"><? print($ud[$i]["results"]); ?></td>
|
||||
<td align="right"><? print($ud[$i]["points"]); ?></td>
|
||||
<td align="right"><? print($ud[$i]["cputime"]); ?></td>
|
||||
</tr>
|
||||
<? endfor; ?>
|
||||
</table>
|
||||
<? require("bottom.php"); ?>
|
Loading…
x
Reference in New Issue
Block a user