File: /var/www/web37/htdocs/websuche/katalog/bewerten2.php
<?PHP
include "./inc/config.inc.php";
include "./inc/systemeinstellungen.php";
include "./inc/de.php";
include "./system/funktionen.php";
db();
$id= $_REQUEST['id'];
$wert= $_REQUEST['wert'];
$hinweis= "";
mysql_query("DELETE
FROM ".$dbtable06."
WHERE zeit < ".time()." ");
$bewerten_sql= mysql_query("SELECT bwert, bzahl, siteid, name
FROM ".$dbtable02."
WHERE siteid='".$id."'
AND code= '1' ");
if(mysql_num_rows($bewerten_sql) == 0)
{
$hinweis= 'Dieser Eintrag existiert nicht in unserem Webkatalog';
}
else
{
$ROW=mysql_fetch_assoc($bewerten_sql);
$bewert= $ROW['bwert'];
$bzahl= $ROW['bzahl'];
$idbewname= $ROW['siteid'];
$seitenname= $ROW['name'];
$ipnummer = $_SERVER["REMOTE_ADDR"];
$schonbewertet_sql= mysql_query("SELECT *
FROM ".$dbtable06."
WHERE ipnummer='".$ipnummer."'
AND nummer= '".$id."' ");
if(mysql_num_rows($schonbewertet_sql) != 0 )
{
$hinweis= '<b>Dieser Eintrag wurde bereits <br>von Ihnen bewertet!</b><br><br><br><br><br>';
}
else
{
$hinweis= 'Meine Bewertung: <b>'.$wert.'</b> von <b>10</b> Punkten!<br><br>Ihre Bewertung wurde gespeichert!<br>
Vielen Dank für Ihre Mitarbeit.<br><br><br><br>';
$bzahl++;
if($wert == 10) { $wert = 9.99; }
$bewert= $bewert + $wert;
$bwd = $bewert / $bzahl;
// $bwd = substr($bwd, 0, 3);
mysql_query("UPDATE ".$dbtable02."
SET bwert = '".$bewert."' ,
bzahl = '".$bzahl."' ,
userb = '".$bwd."'
WHERE siteid= '".$idbewname."' ");
$zeit= (time()+$termteim_ipbewertung);
mysql_query("INSERT INTO ".$dbtable06."
SET ipnummer= '".$ipnummer."',
zeit = '".$zeit."',
nummer = '".$id."' ");
}
}
db_()
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="./system/<?PHP echo $design_typ ?>">
<title>Bewerten</title>
</head>
<script language="javascript">
<!--//
function closepop(){
close();
return true;
}
//-->
</script>
<body bgcolor="#ffffff">
<div align="center"><a name="oben"></a><table cellpadding="0" width="370">
<tr><td><div align="center">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td align="left">
<table border="0" width="100%" cellspacing="1" cellpadding="1">
<tr><td valign="top"><div align="left">
<table height="20" border="0" width="100%" cellspacing="0" cellpadding="0" class="header1">
<tr><td align="left"><div align="center" class="menuber">
Eintrag bewerten...</div>
</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr>
<tr height="10"><td valign="top" height="10"><div align="center">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td align="left"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td align="left" bgcolor="black"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td valign="top" bgcolor="#ffffff"><div align="left">
<table height="10" border="0" width="100%" cellspacing="0" cellpadding="0">
<table cellpadding="0" width="100%">
<tr><td class="einsb"><div align="center"><br>
"<?PHP echo $seitenname ?>"<br></div></td>
</tr>
<tr><td><div align="center" class="einsa">
<br><?PHP echo $hinweis ?><br>
</div></td></tr></table>
<br>
</td></tr></table></div></td></tr></table></td></tr></table></td></tr></table></div></td>
</tr><tr><td><div align="center"><font size="1"></font></div></td></tr><tr><td>
<div align="center"><table border="0" width="96%" cellspacing="0" cellpadding="0">
<tr><td align="left"><div align="center"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td align="left" bgcolor="black"><table border="0" width="100%" cellspacing="1" cellpadding="1">
<tr><td valign="top" bgcolor="#ffffff"><div align="left">
<table height="10" border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td align="left">
<div align="center"><a href="javascript:close()"><b><FONT SIZE="1" FACE="Verdana,Tahoma,Arial,Helvetica,Sans-serif,sans-serif" color="#003366">Fenster schließen</b></a></div>
</td></tr></table></div></td></tr></table></td></tr></table></div></td></tr></table>
</div></td></tr></table></div></body></html>