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:
|
/** Berwertung Bilder **/
if ($action == 'bewerten')
{
$lang->load("MISC");
if (isset($_GET['userpicid'])) $userpicid = intval($_GET['userpicid']);
elseif (isset($_POST['userpicid'])) $userpicid = intval($_POST['userpicid']);
else
{
eval("\$tpl->output(\"".$tpl->get("userpic_bewerten_error")."\");");
exit();
}
$result = $db->query_first("SELECT userpicid FROM bb".$n."_userpic_bewertungen WHERE userpicid = '$userpicid' AND userid = '$wbbuserdata[userid]'");
if ($result['userpicid'])
{
eval("\$tpl->output(\"".$tpl->get("userpic_bewerten_error")."\");");
exit();
}
$result = $db->query_first("SELECT userid FROM bb".$n."_userpic WHERE userpicid = '$userpicid'");
if ($result['userid']==$wbbuserdata[userid])
{
eval("\$tpl->output(\"".$tpl->get("userpic_bewerten_error")."\");");
exit();
}
if (isset($_POST['send']))
{
$ratingpoints = intval($_POST['ratingpoints']);
if ($ratingpoints >= 0 && $ratingpoints <= 10)
{
$db->unbuffered_query("INSERT INTO bb".$n."_userpic_bewertungen (userpicid,userid,bewertet,vote_name) VALUES ('$userpicid','$wbbuserdata[userid]','$ratingpoints','$wbbuserdata[username]')", 1);
}
eval("\$tpl->output(\"".$tpl->get("window_close")."\");");
exit();
}
$user['username'] = htmlconverter($user['username']);
eval("\$tpl->output(\"".$tpl->get("userpic_bewerten_window")."\");");
} |