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 pathnfo.php
111 lines (105 loc) · 3.51 KB
/
nfo.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
<?
require("include/top.php");
$query ="SELECT prods.name,prods.group1,prods.group2,prods.group3,users.nickname,users.avatar ";
$query.="FROM prods,users ";
$query.="WHERE prods.id=".$which." AND users.id=prods.added";
$result = mysql_query($query);
$prod = mysql_fetch_array($result);
if ($prod["group1"]):
$gquery="select name,acronym from groups where id='".$prod["group1"]."'";
$gresult=mysql_query($gquery);
while($gtmp = mysql_fetch_array($gresult)) {
$prod["groupname1"]=$gtmp["name"];
$prod["groupacron1"]=$gtmp["acronym"];
}
endif;
if ($prod["group2"]):
$gquery="select name,acronym from groups where id='".$prod["group2"]."'";
$gresult=mysql_query($gquery);
while($gtmp = mysql_fetch_array($gresult)) {
$prod["groupname2"]=$gtmp["name"];
$prod["groupacron2"]=$gtmp["acronym"];
}
endif;
if ($prod["group3"]):
$gquery="select name,acronym from groups where id='".$prod["group3"]."'";
$gresult=mysql_query($gquery);
while($gtmp = mysql_fetch_array($gresult)) {
$prod["groupname3"]=$gtmp["name"];
$prod["groupacron3"]=$gtmp["acronym"];
}
endif;
if (strlen($prod["groupname1"].$prod["groupname2"].$prod["groupname3"])>27):
if (strlen($prod["groupname1"])>10 && $prod["groupacron1"]) $prod["groupname1"]=$prod["groupacron1"];
if (strlen($prod["groupname2"])>10 && $prod["groupacron2"]) $prod["groupname2"]=$prod["groupacron2"];
if (strlen($prod["groupname3"])>10 && $prod["groupacron3"]) $prod["groupname3"]=$prod["groupacron3"];
endif;
if(!$f) $f=1;
?>
<br>
<table><tr><td>
<table bgcolor="#000000" cellspacing="1" cellpadding="0" border="0" width="100%">
<tr>
<td>
<table bgcolor="#000000" cellspacing="1" cellpadding="2" border="0" width="100%">
<tr>
<td bgcolor="#224488">
<b>
<font size="+1"><? print(stripslashes($prod["name"])); ?></font>
<? if($prod["groupname1"]): ?>
by
<a href="groups.php?which=<? print($prod["group1"]); ?>"><? print($prod["groupname1"]); ?></a>
<? endif; ?>
<? if($prod["groupname2"]): ?>
&
<a href="groups.php?which=<? print($prod["group2"]); ?>"><? print($prod["groupname2"]); ?></a>
<? endif; ?>
<? if($prod["groupname3"]): ?>
&
<a href="groups.php?which=<? print($prod["group3"]); ?>"><? print($prod["groupname3"]); ?></a>
<? endif; ?>
</b>
</td>
</tr>
<tr bgcolor="#446688">
<td align="center">
<table><tr><td>
<? if($f=='none'): ?>
<pre><?= htmlentities(file_get_contents('nfo/'.$which.'.nfo')); ?></pre>
<? else: ?>
<img src="ascii.php?nfo=<?=$which?>&f=<?=$f?>"><br>
<? endif; ?>
</td></tr></table>
</td>
</tr>
<tr>
<td bgcolor="#6688AA" align="center">
<? $txt=array("dos 80*25","dos 80*50","rez's ascii","amiga medres","amiga hires");
print("<b>[ "); ?>
<a href="nfo.php?which=<?=$which?>&f=none">html</a>
<? for($i=0;$i<=count($txt)-1;$i++): ?>
| <a href="nfo.php?which=<?=$which?>&f=<?=$i+1?>"><?=$txt[$i]?></a>
<? endfor;
print(" ]</b>"); ?>
</td>
</tr>
<tr>
<td bgcolor="#224488" align="right">
<?
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="nfo/<?=$which?>.nfo">admin: download nfo</a> ]</b>
<?
}
?>
<b>[ <a href="prod.php?which=<? print($which); ?>">back to the prod</a> ]</b><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<br>
<? require("include/bottom.php"); ?>