function toplook($from, $rows) { $mc = new myclass(); $date_dif = $mc->date_difference(); if ($_SESSION['show'] == 'today') { $q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['today']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} "; } if ($_SESSION['show'] == 'week') { $q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['last_week']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} "; } if ($_SESSION['show'] == 'month') { $q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['last_month']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} "; } if ($_SESSION['show'] == 'year') { $q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno and date_ > '{$date_dif['last_year']}' order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} "; } if ($_SESSION['show'] == 'all') { $q = "SELECT * from postedlooks pl,fs_members fm where pl.mno=fm.mno order by \n\t\t\t\t\t\t\t((select sum(r.rating) from ratings r where r.plno=pl.plno)+(select count(*) from pl_loves l where l.plno=pl.plno)) desc\n\t\t\t\t\t\tlimit {$from},{$rows} "; } $ex = mysql_query($q) or die(mysql_error()); $i = 1; while ($r = mysql_fetch_array($ex)) { $plinfo = $mc->posted_look_info($r[0]); $xx = mysql_query("select sum(rating) from ratings where plno={$r['0']}") or die(mysql_error()); $rr = mysql_fetch_array($xx); $xxx = mysql_query("select count(rating) from ratings where plno={$r['0']}") or die(mysql_error()); $rrr = mysql_fetch_array($xxx); $xxxx = mysql_query("select count(*) from posted_looks_comments where plno={$r['0']}") or die(mysql_error()); $rrrr = mysql_fetch_array($xxxx); $x5 = mysql_query("select count(*) from pl_loves where plno={$r['0']}") or die(mysql_error()); $r5 = mysql_fetch_array($x5); $memq = mysql_query("select * from fs_members fs,fs_member_accounts fa where fs.mno=fa.mno and fs.mno=" . $r["mno"]) or die(mysql_error()); $rsmemq = mysql_fetch_array($memq); $qr = mysql_query("select sum(r.rating) from ratings r, postedlooks pl where r.plno=pl.plno and pl.mno=" . $r["mno"]); $rsqr = mysql_fetch_array($qr); $qc = mysql_query("select count(*) from ratings r, postedlooks pl where r.plno=pl.plno and pl.mno=" . $r["mno"]); $rsqc = mysql_fetch_array($qc); $ql = mysql_query("select count(*) from pl_loves l, postedlooks pl where pl.plno=l.plno and pl.mno=" . $r["mno"]); $rsql = mysql_fetch_array($ql); $qf = mysql_query("select count(*) from friends f where mno2=" . $r["mno"]); $rsqf = mysql_fetch_array($qf); $qff = mysql_query("select count(*) from friends f where mno1=" . $r["mno"]); $rsqff = mysql_fetch_array($qff); echo "\n\t\t\t\t\t\t\t<style>\n\t\t\t\t\t\t\t\t.stands b{\n\t\t\t\t\t\t\t\t\tcolor:#000\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</style>\n\t\t\t\t\t\t"; echo "\n\t\t\t\t\t\t\t\t<li >\n\t\t\t\t\t\t\t\t\t<div onmouseover=\"showRate({$r['0']},'block')\" onmouseout=\"showRate({$r['0']},'none')\" >\n\t\t\t\t\t\t\t\t\t\t<div style='position:absolute;display:none;' id='rate{$r['0']}'>\n\t\t\t\t\t\t\t\t\t\t\t<div style='position:absolute;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<div style='position:relative;left:44px;top:-20px;'><img src='images/corner.png' /></div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div style='position:absolute;'>\n\t\t\t\t\t\t\t\t\t\t\t\t<div style=\"overflow:hidden;font:bold 12px 'arial';padding:10px;width:150px;position:relative;left:50px;top:15px;background:url('images/trans-back.png');width:218px;color:white\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<b style=\"font:bold 15px 'arial'\">" . $r["lookName"] . "</b>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t" . $r["lookAbout"] . "<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tTags: Polka Dot; Brand; <br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tOther<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tPrice: \$89<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\tWhere: Name of Store<br><br>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\tPosted on " . $r["date_"] . "<br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t04:15 pm\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t<div class='rate' style='background:white;WIDTH:35px;padding:1px;position:relative;left:5px;top:-20px;border:1px solid #6d6d6d' >\n\t\t\t\t\t\t\t\t\t\t\t\t<div style=\"padding:5px 2px 5px 2px;background:#02c7ea;font:bold 11px 'arial';color:#fff\">" . @round($rr[0] / ($rrr[0] * 5) * 100) . "%</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div style=\"padding:0px;background:white;font:bold 11px 'helvetica (TT)';color:#3b3b3b\">RATE</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r5' onclick=\"ratethis({$r['0']},5)\">5</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r4' onclick=\"ratethis({$r['0']},4)\" >4</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r3' onclick=\"ratethis({$r['0']},3)\" >3</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r2' onclick=\"ratethis({$r['0']},2)\" >2</div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div id='r1' onclick=\"ratethis({$r['0']},1)\" >1</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t<div onclick=\"dripthis({$r['0']})\" style=\"background:white url('images/drip.png') center no-repeat\"> </div>\n\t\t\t\t\t\t\t\t\t\t\t\t<div onclick=\"lovethis({$r['0']})\" style=\"background:white url('images/love.png') center no-repeat\"> </div>\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<table border=0 width=100% >\n\t\t\t\t\t\t\t\t\t\t\t<td valign=top >\n\t\t\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img onclick=\"window.location='lookdetails.php?id={$r['0']}'\" src='images/members/posted looks/{$r['0']}.jpg' style='width:287px;height:450px' />\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t<div style='padding:5px;'></div>\n\t\t\t\t\t\t\t\t\t\t<table width=100% class='stands'>"; if (file_exists("../images/members/{$rsmemq['mno']}.jpg")) { echo "<td width=1><a href='" . $rsmemq["username"] . "'><img src='images/members/" . $rsmemq["mno"] . ".jpg' width=50px height=53px style='margin-top:6px;' /></a></td>"; } else { echo "<td width=1><a href='" . $rsmemq["username"] . "'><img src='images/members/0.jpg' width=50px height=53px style='margin-top:6px;' /></a></td>"; } echo "\t\n\t\t\t\t\t\t\t\t\t\t\t\t<td style='padding:5px;'> "; // echo "<a href='".$rsmemq["username"]."' style='color:#454545;font:15px helveticaBold;text-decoration:none;//text-transform:uppercase'>".$rsmemq["firstname"]." ".$rsmemq["lastname"]."</a><br>"; echo "<a style='color:#454545;font:12px helveticaBold;text-decoration:none;//text-transform:uppercase'>" . $rsmemq["firstname"] . " " . $rsmemq["lastname"] . " </a> <span style='font-size:11px'>posted a new look </span><br>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='color:#454545;font:11px helvetica; font-weight:bold;' >" . $plinfo['tlrates'] . " Rates | Ratings " . $plinfo['tlrpercent'] . " %</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t<table style='width:auto;color:#454545;font:bold 11px helvetica' border=0>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td><b>{$plinfo['tldrips']}</b></td><td><img src='images/drip.png' height=10 /></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> | <b>{$plinfo['tllove']}</b></td><td><img src='images/love.png' height=10 /></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td> | " . $plinfo['tlcomments'] . " Comments</b></td> \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span style='font-size:11px;font-weight:bold'>" . get_look_tview($r[0]) . " total Views</span>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td valign=center ><br><img src='images/look-icon.png' /></td>\n\t\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</li>\t\n\t\t\t\t\t\t\t\t"; $i++; } }
<?php session_start(); include "connect.php"; include "function.php"; include "source.php"; // if($_SESSION['mno']=="") // jump("login.php?errno=2"); check_if_look_posted(); detect_attempt_to_hacker(); // echo "This is the id = $_GET[id] <br>"; add_look_tview(get_look_tview($_GET['id']), $_GET['id']); ?> <html> <link rel="stylesheet" type="text/css" href="style1.css"> <script type="text/javascript" src="js1/jQv1.8.2.js"></script> <script type="text/javascript"> $(window).ready(function(){ specific_showhide(); function specific_showhide(){ $('.parent_option').click(function(){