This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathpopup_groups.php
178 lines (164 loc) · 5.62 KB
/
popup_groups.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<?
require("include/misc.php");
conn_db();
function lettermenu($pattern) {
print("[ ");
if($pattern=="#") {
print("<b>#</b>");
} else {
printf("<a href=\"popup_groups.php?pattern=%%23&form=%s&field=%s\">#</a>", htmlspecialchars($_GET['form'], ENT_QUOTES, 'UTF-8'), htmlspecialchars($_GET['field'], ENT_QUOTES, 'UTF-8'));
}
for($i=1;$i<=26;$i++) {
if ($i==13) {
print(" ]<br />\n");
print("[ ");
} else
print(" | ");
if($pattern==chr(96+$i)) {
print("<b>".chr(96+$i)."</b>");
} else {
printf("<a href=\"popup_groups.php?pattern=%s&form=%s&field=%s\">%s</a>",chr(96+$i), htmlspecialchars($_GET['form'], ENT_QUOTES, 'UTF-8'), htmlspecialchars($_GET['field'], ENT_QUOTES, 'UTF-8'), chr(96+$i));
}
}
print(" ]<br />\n");
}
function cmpcomments($a, $b)
{
if ($a["lcom_quand"] == $b["lcom_quand"])
{
return 0;
}
return ($a["lcom_quand"] > $b["lcom_quand"]) ? -1 : 1;
}
function goodfleche($wanted,$current) {
if($wanted==$current) {
$fleche="fleche1a";
} else {
$fleche="fleche1b";
}
return $fleche;
}
if(!$pattern&&!$which) {
$pattern=chr(mt_rand(96,122));
if($pattern==chr(96)) {
$pattern="#";
}
}
if($pattern) {
if($pattern=="#") {
//$sqlwhere="(name LIKE '0%')||(name LIKE '1%')||(name LIKE '2%')||(name LIKE '3%')||(name LIKE '4%')||(name LIKE '5%')||(name LIKE '6%')||(name LIKE '7%')||(name LIKE '8%')||(name LIKE '9%')";
$sqlwhere="(name REGEXP '^[^a-zA-Z]')";
} else {
$sqlwhere="name LIKE '".$pattern."%'";
}
$query="SELECT id,name,acronym,csdb,zxdemo,web FROM groups WHERE (".$sqlwhere.") ORDER BY name";
}
$result = mysql_query($query);
while($tmp = mysql_fetch_array($result)) {
$groups[]=$tmp;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<title>pouet.net groups</title>
<link rel="stylesheet" href="include/style.css" type="text/css">
<link rel="search" type="application/opensearchdescription+xml" href="opensearch_prod.xml" title="pouët.net - prod search" />
<meta name="description" content="pouët.net - your online demoscene resource">
<meta name="keywords" content="pouët.net,256b,1k,4k,40k,64k,cracktro,demo,dentro,diskmag,intro,invitation,lobster sex,musicdisk,Amiga AGA,Amiga ECS,Amiga PPC,Amstrad CPC,Atari ST,BeOS,Commodore 64,Falcon,MS-Dos,Linux,MacOS,Windows">
<script language="JavaScript" type="text/javascript">
<!--
function pickGroup(s) {
window.opener.document.forms["<?=htmlspecialchars($_GET['form'], ENT_QUOTES, 'UTF-8')?>"].<?=htmlspecialchars($_GET['field'], ENT_QUOTES, 'UTF-8')?>.value=s;
window.close();
}
//-->
</script>
</head>
<body background="gfx/trumpet.gif" bgcolor="#3A6EA5">
<br />
<br />
<table style="margin:0px auto"><tr><td valign="top">
<table bgcolor="#000000" cellspacing="1" cellpadding="0" border="0">
<tr>
<td>
<table bgcolor="#000000" cellspacing="1" cellpadding="2" border="0">
<tr bgcolor="#224488">
<th colspan="3">
<center><? lettermenu($pattern); ?></center>
</th>
</tr>
<tr bgcolor="#224488">
<th>
<table>
<tr>
<td>
<img src="gfx/fleche1a.gif" width="13" height="12" border="0"><br />
</td>
<td>
<b>groups</b>
</td>
</tr>
</table>
</th>
</tr>
<? if(count($groups)==0): ?>
<tr bgcolor="#557799">
<th colspan="3">
<br />
no group name beginning with a <b><? print($pattern); ?></b> yet =(<br />
<br />
</td>
</tr>
<? endif; ?>
<?
for($i=0;$i<count($groups);$i++)
{
if($i%2) {
print("<tr bgcolor=\"#446688\">\n");
} else {
print("<tr bgcolor=\"#557799\">\n");
}
print("<td valign=\"top\"><b><a href=\"javascript:pickGroup(".$groups[$i]["id"].")\">".$groups[$i]["name"]);
if($groups[$i]["acronym"]) print(" [".$groups[$i]["acronym"]."]");
print("</a></b>");
// if($SESSION_LEVEL=='administrator' || $SESSION_LEVEL=='moderator' || $SESSION_LEVEL=='gloperator') print(" <b>[<a href=\"editgroups.php?which=".$groups[$i]["id"]."\">editgroup</a>]</b>\n");
if($groups[$i]["web"]) print(" <b>[<a href=\"".$groups[$i]["web"]."\">web</a>]</b>\n");
if($groups[$i]["csdb"]) print(" <b>[<a href=\"http://noname.c64.org/csdb/group/?id=".$groups[$i]["csdb"]."\">csdb</a>]</b>\n");
if($groups[$i]["zxdemo"]) print(" <b>[<a href=\"http://zxdemo.org/author.php?id=".$groups[$i]["zxdemo"]."\">zxdemo</a>]</b>\n");
print("</td>\n");
// print("<td>\n<table cellspacing=\"1\" cellpadding=\"0\">\n");
$k=0;
/*
for($j=0;$j<count($prods);$j++) {
if(($prods[$j]["group1"]==$groups[$i]["id"])||($prods[$j]["group2"]==$groups[$i]["id"])||($prods[$j]["group3"]==$groups[$i]["id"]))
{
$typess = explode(",", $prods[$j]["type"]);
print("<tr><td><a href=\"prod.php?which=".$prods[$j]["id"]."\">");
for($kk=0;$kk<count($typess);$kk++) {
print("<img src=\"gfx/types/".$types[$typess[$kk]]."\" width=\"16\" height=\"16\" border=\"0\" title=\"".$typess[$kk]."\">");
}
print("<br /></a></td><td><img src=\"gfx/z.gif\" width=\"2\" height=\"1\" border=\"0\"><br /></td><td><a href=\"prod.php?which=".$prods[$j]["id"]."\">".strtolower(stripslashes($prods[$j]["name"]))."</a><br /></td></tr>\n");
$k++;
}
}
*/
}
?>
<tr bgcolor="#224488">
<th colspan="3">
<center><? lettermenu($pattern); ?></center>
</th>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr></table>
<br />
</div>
</body>
</html>