function getSingleResult($sql)
{
$response="";
$result = mysql_query($sql) or die("query failed: $sql");
if($line=mysql_fetch_array($result))
{
$response=$line[0];
}
return $response;
}
function executeUpdate($sql)
{
mysql_query($sql) or die("query failed: $sql".mysql_error());
}
if($_GET[ratelist])
{
$rateip=$REMOTE_ADDR;
$ratelist=$_GET[ratelist];
$id=$_GET[id];
$check="select * from yellow_rating where mediaid='$id' and ipaddress='$rateip'";
$response= getSingleResult($check);
if($response!="")
{
$msg="You have already rated this";
session_register('msg');
}
else
{
$sql1="insert into yellow_rating(ipaddress,mediaid,rated) values('$rateip','$id','$ratelist')" ;
executeUpdate($sql1);
$msg="Rating Submitted";
session_register('msg');
}
}
$q12 = "select * from yellow_agents where AgentID = '$_SESSION[AgentID]' ";
$r12 = mysql_query($q12) or die(mysql_error());
$a12 = mysql_fetch_array($r12);
$q123 = "select * from yellow_subcat where subcatid = '$a1[SubCategoryID]' ";
$r123 = mysql_query($q123) or die(mysql_error());
$a123 = mysql_fetch_array($r123);
?>
if($_GET[i]=='2'){echo $ShowInfo1;}?>
echo $_SESSION[msg] ; session_unregister('msg')?>
|
Home
> =$a1[CategoryName]?> > =$a123[subcatname]?> > =$a1[CompanyName]?>
|
=$a1[CompanyName]?>
$rate="SELECT avg(rated) as abcde FROM yellow_rating where mediaid ='$_GET[id]' GROUP BY mediaid";
$rateq=mysql_query($rate)or die($rate);
$rateline=mysql_fetch_array($rateq);
$count=1;
while($count<=round($rateline[abcde]))
{?>
$count=$count+1;}?>
|
=$logo?>
|
|
Price: Rs. =$a1[Price]?>
|
Description:
|
=nl2br($a1[resume])?>
|
|
";
$i++;
}
}
?>
More Images:
=$ImageBlock?>
|
|
Comments: Post Comments
|
|
|
|
if ($a1[City]=="")
{
$cityname =$a1[city];
}
else
{
$cityname =$a1[City];
}
?>
Ad Detail:
You are viewing "" classified Ad. This free Ad has been placed in , , location under , category.
=BACK?>