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++; } }
// } // else // { // $ppic_mem = '../betatest/images/members'; // } $_SESSION['mno'] = $mc->get_cookie('mno', 136); $mno = $mc->get_cookie('mno', 136); $_SESSION['plno'] = $mc->get_cookie('plno', 0); $plno = $_SESSION['plno']; ?> <link rel="stylesheet" type="text/css" href="style.css"> <div class='main_comment_container'> <?php if (!empty($_GET["comment"])) { $mc->date_difference(); $comment = str_replace('\'', "\"", $_GET["comment"]); $dtime = $mc->date_time; $mno = $_SESSION['mno']; // $plcno = $_GET["plcno"]; } echo "<li style='list-style:none'>"; if (empty($_GET["post_comment"])) { $_GET['post_comment'] = "null"; } if ($_GET['post_comment'] == 'reply_a_comment') { // if (strlen($comment)>0) { // insert( // 'fs_plcm_reply', // array('plcno','mno','plcr_date','plcr_message'), // array($plcno,$_SESSION['mno'],$date_time['date_time'],tcleaner($comment)),
<?php session_start(); require "../../../php_functions/connect.php"; require "../../../php_functions/function.php"; require "../../../php_functions/library.php"; require "../../../php_functions/source.php"; require "../../../php_functions/myclass.php"; $mc = new myclass(); $date_time = $mc->date_difference(); $comment = str_replace('\'', "\"", $_GET["comment"]); // $plno=$_GET["plno"]; $dtime = $date_time['date_time']; $mno = $_SESSION['mno']; $plno = $_SESSION['plno']; // echo "comment was $comment "; save_comment($plno, $mno, $comment, $dtime); function save_comment($plno, $mno, $comment, $dtime) { if (strlen($comment) > 0) { insert('posted_looks_comments', array('plno', 'mno', 'date_', 'msg'), array($plno, $mno, $dtime, tcleaner($comment)), 'plcno'); // echo "<span style='color:green'> succesfully post comment </span>"; } else { // echo " <span style='color:red' > failled to post comment </span>" ; } } $posted_comment = true; require 'commentDesign.php'; // echo " <li> comment design <li> "; ?>
function main() { $mc = new myclass(); $mc->date_difference(); $plcno = !empty($_GET['plcno']) ? intval($_GET["plcno"]) : ""; $rcomment = !empty($_GET['rcomment']) ? $_GET['rcomment'] : ""; $plcrno = !empty($_GET['plcrno']) ? intval($_GET['plcrno']) : 0; $mno = intval($_SESSION['mno']); $status = $_GET['status']; $date_time = $mc->date_time; $flag_note = !empty($_GET['flag_note']) ? $_GET['flag_note'] : 0; $cboxes = !empty($_GET['cboxes']) ? $_GET['cboxes'] : 0; $replyEdited = !empty($_GET['replyEdited']) ? $_GET['replyEdited'] : 0; $replied_no = !empty($_GET['replied_no']) ? $_GET['replied_no'] : 0; $isReplyIndented = !empty($_GET['isReplyIndented']) ? $_GET['isReplyIndented'] : 0; $mc->auto_detect_path(); // echo " status = [$status] replied_no = $replied_no <br> "; if ($status == 'replySave') { save_reply_comment($status, $plcno, $replied_no, $mno, $rcomment, $date_time); $posted_comment = false; // require ('replyDesign.php'); require '../test_reply.php'; // echo "result of the output"; reply_print($plcno, 0, true, 'YES', $mno, $isReplyIndented, '../../../../'); // echo "reply design print here !"; } else { if ($status == 'replyLike') { replyLike($mno, $plcrno); } else { if ($status == 'replyDisLike') { replyDisLike($mno, $plcrno); } else { if ($status == 'check_flag') { // echo "chekcing flagged "; // echo "$flag_note $cboxes"; check_flagged($plcrno); // echo "1"; } else { if ($status == 'replySaveFlag') { // echo " save flag reply note = $flag_note check box options = $cboxes <br>"; save_reply_flagged($plcrno, $mno, tcleaner($flag_note), $cboxes, $date_time); } else { if ($status == 'replyDelete') { // echo "delete reply plcrno = $plcrno "; $del_array = $mc->get_multiple_reply($plcrno); // for ($i=0; $i < count($del_array) ; $i++) // { // // replyDelete ($del_array[$i]); // echo " plcrno to del = ".$del_array[$i].'<br>'; // } } else { if ($status == 'replyEdit') { // echo " edit reply plcrno = $plcrno edited reply = $replyEdited <br> "; replyEdit($plcrno, $replyEdited); } } } } } } } }