forked from seanlebeck/site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imgcredits.inc.php
42 lines (27 loc) · 984 Bytes
/
imgcredits.inc.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
<?php
require_once("initvars.inc.php");
require_once("config.inc.php");
?>
<div class="imagecredits">
<b><?php echo $lang['IMAGES_CREDITS']; ?></b>
<select onchange="if(this.value) location.href='<?php echo $script_url; ?>/'+this.value;">
<option value="">- <?php echo $lang['SELECT']; ?> -</option>
<?php
// Poster list
$sql = "SELECT postername, posteremail, COUNT(*) AS imgcount
FROM $t_imgs a
INNER JOIN $t_cities ct ON a.cityid = ct.cityid
WHERE $visibility_condn $loc_condn_img
GROUP BY postername, posteremail";
$res = mysql_query($sql) or die(mysql_error());
while($row = @mysql_fetch_array($res))
{
$posterenc = EncryptPoster("IMG", $row['postername'], $row['posteremail']);
$posterurl = buildURL("imgs", array($xcityid, $posterenc));
?>
<option value="<?php echo $posterurl; ?>" <?php if($posterenc == $xposterenc) echo "selected"; ?>><?php echo $row['postername']; ?> (<?php echo $row['imgcount']; ?>)</option>
<?php
}
?>
</select>
</div>