$conc = $con->c(); } $tag_tag = isFollowing($conc, $uid, $pid) ? "title='undine with {$pname}' class='unff'" : "title='dine with {$pname}' class='ff'"; ?> <div id="panel" <?php echo $pid == 0 ? "style='display:none;'" : ""; ?> align="center"> <!--a href="#" class="music" title="Music" onclick="return _music()"></a> <a href="#" class="video" title="Video" onclick="return _video()"></a> <a href="#" class="art" title="Pictures" onclick="return _art()"></a--> <?php echo $pid != $uid && $uid != 0 ? "<a href='#' {$tag_tag} onclick='return ff(event,{$pid});' ></a> " : ""; echo $pid != $uid && $uid != 0 && isFollowing($conc, $pid, $uid) ? '<a href="#" class="msg" title="Send Message" onclick="modal_msg(\'' . $pid . '\',\'' . $pname . '\')"></a>' : ""; ?> </div> <?php /* <div id="music" onclick="$(this).fadeOut(500)"> <h2 style="border-bottom:1px solid #999;"><?php echo $pname?>'s Music</h2> <ul> <?php $q = NULL; $q = mysqli_query($conc,"SELECT music.id,music.user,music.name,music.info,music.mp3,music.dl,music.date FROM music WHERE music.user = $pid"); while($rr = mysqli_fetch_array($q)) { echo "<ahref='".PTH."/music-$rr[0]' onclick='return setURI(\"music\",$rr[0])' name='modal'><li class='muzik_item' title='$rr[3]' mid='$rr[0]' onclick='playmusic(event)' mname='$rr[2]' music='$rr[4]' mdate='".date("l jS F Y g:i:a",$rr[5])."' owner='$pname' uid='$pid'>$rr[2]</li></a>"; } ?>
function followPost($userId, $postId) { if (!isFollowing($userId, $postId)) { $query = conn()->prepare("INSERT INTO following (follower_id, post_id)\n VALUES (?, ?)"); if (true || $userId == $_SESSION["user_id"]) { $query->bind_param('ii', $userId, $postId); } $query->execute(); $query_errors = count($query->error_list); $query->close(); if ($query_errors == 0) { return true; } else { return false; } } return true; }
</Div> <?php if ($r[0] == $uid) { ?> <div style=""> <form method="post" target="bgf" action="./actions/uplbgimg.php" enctype="multipart/form-data"><input type="hidden" name="bgimg" /> <label><input type="file" id="upl" name="upl" onchange="submit();uploading(true);" class="hdd_upl"/> <div class="upldiv" id="sc_cs" style="background-color:transparent;float:left !important;"title="change background" onclick="if(navigator.userAgent.toString().indexOf('Firefox')>-1)$('#upl').click();" ></div></label></form><div style="font-size:10px;border:1px solid #ccc; background-color:#eee; border-radius:2px;color:#444; display:none;width:200px;" id="upltxt" onmouseover="$(this).fadeOut(1000);"></div> <iframe height="0" width="0" frameborder="0" name="bgf"></iframe> </div> <div style="margin-left:40% !important;"> <?php } echo $r[0] != $uid && $uid != 0 ? "<a href='#' onclick='return ff(event,{$r['0']});' ><div {$tag_tag}></div></a> " : ""; echo $pid != $uid && $uid != 0 && isFollowing($conc, $r[0], $uid) ? '<a href="./?to=' . urlencode($pid) . '&sendmsg&msg" title="Send Message"><div class="msg" ></div></a>' : ""; ?> </div> </div> </table> <div align="center" class="mndiv"><ul class="menu"> <li> <a href="./" class="se" onclick="_active(event);">Back Home</a> </li> <li> <a href="#sc_cs" onclick="gposts(4,'m_t_b');_active(event);">Mentions</a> </li> <li> <a href="#sc_cs" onclick="dine_(1);_active(event);">Dining With</a> </li>
$q = mysqli_query($conc, "SELECT * FROM users WHERE user LIKE '%{$s1}%' OR user LIKE '%s2%' OR user LIKE '%{$arg}%' or name LIKE '%{$s1}%' OR name LIKE '%s2%' OR name LIKE '%{$arg}%' ORDER BY user ASC LIMIT {$pp}, 21"); if (mysqli_num_rows($q) == 0) { $ress = "<div align='center' class='m_s_g'>There are search results for ‘<b>{$arg}</b>’\n\t\t\t</div>\n\t\t\t<div style='padding:10px;'>\n\t\t\t<div style='font-size:large;margin-bottom:30px;border-bottom:1px solid #336699;width:40%;' align='center'>Web Search</div>\n\t\t\t<a href='http://www.bing.com/search?q=" . urlencode($arg) . "&pc=MUZIKK&form=MKKPBL' target='_blank'><li>Bing Search ‘<b>{$arg}</b>’</li></a> \n\t\t<br/>\n\t\t<br/>\n\t\t\t\t<a href='http://www.google.com.ng/search?sclient=psy&hl=en&site=muzikkitchen.com&source=hp&q=" . urlencode($arg) . "&btnG=Search' target='_blank'><li>Google Search ‘<b>{$arg}</b>’</li></a>\n\t\t\t</div>\n\t\t\t"; } while ($r = mysqli_fetch_array($q)) { if (isset($mobile)) { // $url = "./?i="; $ajax_op = ""; $pic_class = "class='smpdiv'"; $bb = PTH . $r[7]; } else { $ajax_op = "onClick='return _pop(event,\"{$r['0']}\");'"; $pic_class = "class='mpdiv' "; $bb = PTH . $r[8]; } $tag_tag = isFollowing($conc, $uid, $r[0]) ? "title='undine with {$r['2']}' class='unff'" : "title='dine with {$r['2']}' class='ff'"; $ff = $r[0] != $uid ? "<img height='32' width='32' src='{$b}/img/spacer.gif' {$tag_tag} onclick='return ff(event,{$r['0']});' />" : ""; if ($_SESSION["uid"] == 0) { $ff = ""; } $res .= "<table class='post'><tr><td width='90%'><a href='{$url}{$r['2']}' {$ajax_op} ><div><table><tr><td><div {$pic_class} style='background-image:url({$bb})'></div></td><td valign='top'>{$r['2']}<Br/><i>{$r['3']}</i><br/><i>{$r['5']}</i></td></tr></table></div></a></td><td>{$ff}</td></tr></table>"; } $num = mysqli_num_rows($q); $q = NULL; $r = NULL; if ($num < 21) { $sm = false; } else { $sm = true; } $total = 20 + $page + 1;
$u = strclean($u); $con = new db(); $conc = $con->c(); $q = mysqli_query($conc, "SELECT id,user,name,img1,sex,bio,bg,bgcolor,web FROM users WHERE id = '{$u}' OR user = '******'"); if (mysqli_num_rows($q) == 0) { $con->close_db_con($conc); exit("<div class='m_s_g' align='center'>This user '{$u}' doest not exist.</div>"); } $r = mysqli_fetch_array($q); $q = NULL; $q = mysqli_query($conc, "SELECT * FROM follow WHERE u1 = {$r['0']}"); $ff = mysqli_num_rows($q); $feeds = numfeeds($conc, $r[0]); $q = NULL; $q = mysqli_query($conc, "SELECT `post`.`id`,`post`.`user`,`post`.`post`,`post`.`date`,`users`.`img1`,`users`.`user`,`users`.`name` ,`post`.`client`,`post`.`rid`,`post`.`type` FROM post INNER JOIN users ON (`post`.`user` = `users`.`id`) WHERE `post`.`user` = {$r['0']} ORDER BY `post`.`id` DESC LIMIT 0,3"); while ($rr = mysqli_fetch_array($q)) { $post .= post($rr[0], $uid, $rr[1], $rr[5], $rr[6], $rr[4], $rr[3], $rr[2], "pop", $rr[8], $rr[9], $rr[7]); } $q = NULL; $q = mysqli_query($conc, "SELECT * FROM follow WHERE u2 = {$r['0']}"); $ffl = mysqli_num_rows($q); $sex = intval($r[4]) > 0 ? "<br/>Sex: <b>" . $sex_array[$r[4]] . "</b>" : ""; $bio = strlen($r[5]) > 0 ? "<br/>Quote: <b>‘{$r['5']}’</b>" : ""; $url = strlen($r[7]) > 0 ? "Website: <b><a href='http://{$r['8']}'>{$r['8']}</a></b>" : ""; $r[6] = strlen($r[6]) > 3 ? $r[6] : "/profile_bg/default.jpg"; $tag_tag = isFollowing($conc, $uid, $r[0]) ? "title='undine with {$r['1']}' class='unff'" : "title='dine with {$r['1']}' class='ff'"; $follow = $uid != $r[0] && $uid != 0 ? "<img height='32' width='32' src='" . PTH . "/img/spacer.gif' {$tag_tag} onclick='return ff(event,{$r['0']});' /> " : ""; $smsg = $r[0] != $uid && $uid != 0 && isFollowing($conc, $r[0], $uid) ? "<img height='32' width='32' src='" . PTH . "/img/spacer.gif' class='msg' title='Send Message' onclick='modal_msg({$r['0']},\"{$r['1']}\")' />" : ""; echo "<div style='border-radius:5px;border:4px solid " . $color_array[$r[7]] . ";'><table align='center' style='background-image:url(" . PTH . "{$r['6']});border-bottom:2px solid " . $color_array[$r[7]] . ";' width='100%' cellpadding=0 cellspacing=2 border=0 class='userwindiv'>\n\t<tr><td valign='top' align='center'><a href='" . PTH . "/{$r['1']}' onclick='return _o(event,\"{$r['1']}\");'><div style='background:url(" . PTH . "{$r['3']}) center no-repeat;display:none' class='smpdiv'></div><img src='" . PTH . "{$r['3']}' title='{$r['2']}' /></a><br/><a href='" . PTH . "/{$r['1']}' onclick='return _o(event,\"{$r['1']}\");'>{$r['1']}</a><br/><b>{$r['2']}</b><br/>Feeds:<b>{$feeds}</b> Dining with me:<b>{$ffl}</b> Dining With:<b>{$ff}</b>{$sex} {$url} {$bio}<br/>{$follow} {$smsg}</td></tr>\n\t</table>\n\t<div class='userwindiv_'>\n\t\t" . $post . "\n\t</div>\n\t<input type='hidden' value='' id='eval_pop' />\n\t</div>\n\t____id:{$r['0']}"; } $con->close_db_con($conc);
$n = 0; $pag = intval($_POST["page"]); $pp = $pag > 0 ? $pag - 1 : 0; $q = mysqli_query($conc, "SELECT `follow`.`id`,`follow`.`u1`,`follow`.`u2`,`users`.`user`,`users`.`name`,`users`.`bio`,`users`.`img1` FROM `follow` INNER JOIN `users` ON (`follow`.`u2` = `users`.`id`) WHERE `follow`.`u1` = {$owner} ORDER BY follow.id DESC LIMIT {$pp},21"); $num = mysqli_num_rows($q); if ($num < 21) { $sm = false; } else { $sm = true; } while ($r = mysqli_fetch_array($q)) { $n++; $del = ""; $bb = PTH; $url = PTH . "/"; if ($_SESSION["mobile"] == 2) { //$bb = ".."; //$url = "./?i="; } $del = isFollowing($conc, $uid, $r[2]) ? "<img height='32' width='32' src='{$bb}/img/spacer.gif' onclick='ff(event,{$r['2']});' title='undine with {$r['3']}' class='unff' />" : "<img height='32' width='32' src='{$bb}/img/spacer.gif' onclick='ff(event,{$r['2']});' title='dine with {$r['3']}' class='ff' />"; $del = $uid == $r[2] || $_SESSION["uid"] == 0 ? "" : $del; echo "<table class='post'><tr><td width='90%'><a href='{$url}{$r['3']}' onclick='return _pop(event,{$r['2']})'><div><table><tr><td><div class='smpdiv' style='background:url({$bb}{$r['6']}) no-repeat center;'></div></td><td valign='top'>{$r['3']}<br/><b>{$r['4']}</b><br/>{$r['5']}</td></tr></table></div></a></td><td>{$del}</td></tr></table>"; } echo $n == 0 ? "<div class='m_s_g'>You have no friends.</a>" : ""; $type = "following.php"; $total = 20 + $pag + 1; if ($sm) { echo "<div id='show_more' align='center' onclick='_vmore(event,\"{$type}\",{$total})' title='show more'></div>"; } //total[$total], numrow[$num], n[$n] , page[$pag] $con->close_db_con($conc);