<?
if(isset($_GET['details']) && isset($_GET['id']))
{
$waiting=0;
$paid=1;
$notpaid=2;
$id=$_GET['id'];
$sqlpro=mysql_query("SELECT*FROM project WHERE id='$id'");
$numpro=mysql_num_rows($sqlpro);
$rowpro=mysql_fetch_array($sqlpro);
?>
<table border="0" width="431" align="center">
<tr>
<td width="425" height="144" bgcolor="#CEDEFA" valign="top">
<table border="0" width="431" align="center">
<tr>
<td width="172" height="35" colspan="2">
<p align="left"><a href="<?=$rowpro['url']?>" class="hr" target="_blank"><b><?=$rowpro['progname']?></b></a></p>
</td>
<td width="143" height="35">
<p align="left" class="txtprog">Status: <? if($rowpro['status']==$paid) { ?><font color="#006600"><b>Paying</b></font><?}if($rowpro['status']==$waiting) { ?><b><font color="#666666">Waiting</font></b><?} if($rowpro['status']==$notpaid) { ?><b><font color="red">Notpaid</font></b><?}?></p>
</td>
<td width="97" height="35">
<p class="txtprog">Added: <?=$rowpro['adddate']?></p>
</td>
</tr>
<tr>
<td width="88" height="21" bgcolor="#A0B8DD">
<p class="txtprog">Our Rating:</p>
</td>
<td width="80" height="21" bgcolor="#A0B8DD">
<p><? for($a=0; $a<$rowpro['ratingstar']; $a++) { ?><img src="/image/full_star.gif" width="19" height="19" border="0"><?}?></p>
</td>
<td width="143" height="21" bgcolor="#A0B8DD">
<p class="txtprog">Our Rating: <?=$rowpro['ratingnum']?></p>
</td>
<td width="97" height="106" bgcolor="#A0B8DD" rowspan="4">
<p class="txtprog"><?=$rowpro['procent']?></p>
</td>
</tr>
<tr>
<td width="172" height="24" colspan="2">
<p class="txtprog">OurInvetment: <?=$rowpro['invetment']?>$</p>
</td>
<td width="143" height="24">
<p class="txtprog">Minimal Spend: <?=$rowpro['minspend']?>$</p>
</td>
</tr>
<tr>
<td width="172" height="19" colspan="2">
<p class="txtprog">Payout: <?=$rowpro['payout']?>$</p>
</td>
<td width="143" height="19">
<p class="txtprog">Referral: <?=$rowpro['referralcom']?>%</p>
</td>
</tr>
<tr>
<td width="172" height="26" colspan="2" bgcolor="#A0B8DD">
<p align="left" class="txtprog">Last Paid: <?=$rowpro['lastpaid']?></p>
</td>
<td width="143" height="26" bgcolor="#A0B8DD">
<p class="txtprog">Withdrawal: <font color="red"><b><?=$rowpro['withdrawal']?></b></font></p>
</td>
</tr>
<tr>
<td width="425" height="16" colspan="4" bgcolor="#CEDEFA">
<p align="left" class="txtprog">Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text Text </p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p>
<?
}
?>
</p>
<table width="435" align="center" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td width="91" height="23" bgcolor="#A0B8DD" style="border-top-width:0; border-right-width:1; border-bottom-width:0; border-left-width:0; border-top-color:rgb(236,233,216); border-right-color:black; border-bottom-color:rgb(236,233,216); border-left-color:rgb(236,233,216); border-top-style:none; border-right-style:solid; border-bottom-style:none; border-left-style:none;">
<p align="center" class="txtprog">Vote:</p>
</td>
<td width="115" height="23" bgcolor="#A0B8DD" style="border-top-width:0; border-right-width:1; border-bottom-width:0; border-left-width:1; border-top-color:rgb(236,233,216); border-right-color:black; border-bottom-color:rgb(236,233,216); border-left-color:black; border-top-style:none; border-right-style:solid; border-bottom-style:none; border-left-style:solid;">
<p align="center" class="txtprog">Date:</p>
</td>
<td width="115" height="23" bgcolor="#A0B8DD" style="border-top-width:0; border-right-width:1; border-bottom-width:0; border-left-width:1; border-top-color:rgb(236,233,216); border-right-color:black; border-bottom-color:rgb(236,233,216); border-left-color:black; border-top-style:none; border-right-style:solid; border-bottom-style:none; border-left-style:solid;">
<p align="center" class="txtprog">IP:</p>
</td>
<td width="95" height="23" bgcolor="#A0B8DD" style="border-top-width:0; border-right-width:0; border-bottom-width:0; border-left-width:1; border-top-color:rgb(236,233,216); border-right-color:rgb(236,233,216); border-bottom-color:rgb(236,233,216); border-left-color:black; border-top-style:none; border-right-style:none; border-bottom-style:none; border-left-style:solid;">
<p align="center" class="txtprog">E-mail:</p>
</td>
</tr>
<?
$idprog=$_GET['id'];
$sqlvote=mysql_query("SELECT*FROM vote WHERE progid='$idprog' ORDER BY date DESC");
$numvote=mysql_num_rows($sqlvote);
for($i=0; $i<$numvote; $i++)
{
$rowvote=mysql_fetch_array($sqlvote);
?>
<tr>
<td width="91" height="23" bgcolor="#CEDEFA" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p class="txtprog" align="center"><? if($rowvote['vote']==3){ ?><img src="../image/r3.gif" width="17" height="17" border="0"><?}if($rowvote['vote']==2){?><img src="../image/r2.gif" width="17" height="17" border="0"><?}if($rowvote['vote']==1){?><img src="../image/r1.gif" width="17" height="17" border="0"><?}if($rowvote['vote']==0){?><img src="../image/r0.gif" width="17" height="17" border="0"><?}?></p>
</td>
<td width="115" height="23" bgcolor="#CEDEFA" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center" class="txtprog"><?=$rowvote['date']?></p>
</td>
<td width="115" height="23" bgcolor="#CEDEFA" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center" class="txtprog"><?=$rowvote['ip']?></p>
</td>
<td width="95" height="23" bgcolor="#CEDEFA" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center" class="txtprog"><?=$rowvote['email']?></p>
</td>
</tr>
<tr>
<td width="433" height="23" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;" colspan="4">
<p align="center" class="txtprog"><?=$rowvote['descript']?></p>
</td>
</tr>
<?
}
?>
</table><p> </p>
<?
if(isset($_POST['sentvote']))
{
$vote=$_POST['vote'];
$email=$_POST['email'];
$descript=$_POST['descrip'];
$ip=$_SERVER["HTTP_X_FORWARDED_FOR"];
$date=date('Y-m-d');
$progid=$_GET['id'];
$idi=0;
if(($email=="")||($descript==""))
{
?>
<center><b><span class='txterr'>*You have not filled obligatory fields!</span></b></center>
<?
}
else
{
if($vote==3)
{
$raitnow=$rowpro['ratingnum'] + 2;
}
if($vote==2)
{
$raitnow=$rowpro['ratingnum'] + 1;
}
if($vote==1)
{
$raitnow=$rowpro['ratingnum'] - 1;
}
if($vote==0)
{
$raitnow=$rowpro['ratingnum'] - 2;
}
$_SESSION['proid']=$progid;
$sqluseraddvote=mysql_query("INSERT into vote VALUES ('$idi', '$progid', '$vote', '$ip', '$descript', '$date', '$email')");
$sqlupddterait=mysql_query("UPDATE project SET ratingnum='$raitnow' WHERE id='$progid'");
?>
<center><b><span class='txton'>*Thanks your voice is added!</span></b></center>
<meta http-equiv='Refresh' content='5'>
<?
}
}
else
{
?>
<form name="formvote" method="post">
<table width="441" align="center" cellspacing="0" style="border-collapse:collapse;">
<tr>
<td width="39" height="21" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="left" class="txtprog">Vote:</p>
</td>
<td width="117" height="21" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p class="txtprog" align="center"><img src="../image/r3.gif" width="17" height="17" border="0"><input type="radio" name="vote" checked value="3">Very Good</p>
</td> <td width="89" height="21" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p class="txtprog" align="center"><img src="../image/r2.gif" width="17" height="17" border="0"><input type="radio" name="vote" value="2">Good</p>
</td>
<td width="74" height="21" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center" class="txtprog"><img src="../image/r1.gif" width="17" height="17" border="0"><input type="radio" name="vote" value="1">Bad</p>
</td>
<td width="112" height="21" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center" class="txtprog"><img src="../image/r0.gif" width="17" height="17" border="0"><input type="radio" name="vote" value="0">Very Bad</p>
</td>
</tr>
<tr>
<td width="158" height="21" bgcolor="#A0B8DD" colspan="2" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="right" class="txtprog">Your e-mail:</p>
</td>
<td width="279" height="21" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;" colspan="3"><input type="text" class="styleform" name="email"></td>
</tr>
<tr>
<td width="439" height="15" colspan="5" bgcolor="#CEDEFA" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p class="txtprog" align="left">Description:</p>
</td> </tr>
<tr>
<td width="439" height="21" colspan="5" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center"><textarea name="descrip" rows="3" class="styleform" cols="62"></textarea></p>
</td>
</tr>
<tr>
<td width="439" height="21" colspan="5" bgcolor="#A0B8DD" style="border-width:0; border-color:rgb(236,233,216); border-style:none;">
<p align="center"><input type="submit" class="sabmitclass" name="sentvote" value="Vote Now"></p>
</td>
</tr>
</table>
</form>
<?
}
?>
Вот полная страница кода.
|