$image = "image/default.png"; } if (isset($_POST['update']) && isset($_POST['id_dinding'])) { $update = htmlentities($_POST['update']); $id_dinding = $_POST['id_dinding']; $img_url = htmlentities($_REQUEST['image_url']); $time = time(); $ip = $_SERVER['REMOTE_ADDR']; $query = mysql_query("SELECT idstatus, status FROM status \n WHERE uid='{$uid}' ORDER BY idstatus DESC LIMIT 1"); $result = mysql_fetch_array($query); if ($update != $result['status']) { $query = mysql_query("INSERT INTO status (status, \n uid, \n id_dinding, \n foto, \n ip, \n dibuat) \n VALUES ('{$update}', \n '{$uid}', \n '{$id_dinding}', \n '{$img_url}', \n '{$ip}', \n '{$time}' )"); $oquery = mysql_query("SELECT * FROM status,user\n WHERE status.uid=user.uid\n AND status.id_dinding='{$id_dinding}'\n ORDER BY status.idstatus DESC LIMIT 1"); $result = mysql_fetch_array($oquery); $idstatus = $result['idstatus']; $status = tolink(htmlentities($result['status'])); $time = $result['dibuat']; $uid = $result['uid']; $foto = $result['foto']; $nama = $result['nama']; $face = $image; if ($uid == $id_dinding) { $fotostatus = "member/{$uid}/foto/{$foto}"; } if ($uid != $id_dinding) { $fotostatus = "member/{$id_dinding}/foto/{$foto}"; } ?> <div class="stbody" id="stbody<?php echo $idstatus;
<?php @session_start(); if ($_SESSION['flag'] == 1) { echo '<script> window.location="login.php";</script>'; } ?> <?php //Srinivas Tamada http://9lessons.info //Loading Comments link with load_updates.php foreach ($updatesarray as $data) { $msg_id = $data['msg_id']; $orimessage = $data['message']; $message = tolink(htmlentities($data['message'])); $time = $data['created']; $username = $data['username']; $uid = $data['uid_fk']; //$face=$Wall->Gravatar($uid); $x = $_SESSION['id']; $face = "uploads/" . "{$uid}" . ".jpg"; +($face1 = "uploads/" . "{$x}" . ".jpg"); $commentsarray = $Wall->Comments($msg_id); ?> <script type="text/javascript"> $(document).ready(function(){$("#stexpand<?php echo $msg_id; ?> ").oembed("<?php echo $orimessage; ?>
} //Tampil komentar ter_update if (isset($_POST['komentar'])) { $komentar = $_POST['komentar']; $idstatus = $_POST['idstatus']; $ip = $_SERVER['REMOTE_ADDR']; $komentar = htmlentities($komentar); $time = time(); $query = mysql_query("SELECT idkomentar,komentar FROM komentar \n WHERE uid={$uid} AND idstatus='{$idstatus}'\n ORDER BY idkomentar DESC LIMIT 1"); $result = mysql_fetch_array($query); if ($komentar != $result['komentar']) { $query = mysql_query("INSERT INTO komentar (komentar,\n uid,\n idstatus,\n ip,\n dibuat)\n VALUES ('{$komentar}',\n '{$uid}',\n '{$idstatus}',\n '{$ip}',\n '{$time}')"); $oquery = mysql_query("SELECT * FROM komentar,user\n WHERE komentar.uid=user.uid\n AND komentar.uid='{$uid}'\n AND komentar.idstatus='{$idstatus}'\n ORDER BY komentar.idkomentar DESC LIMIT 1"); $result = mysql_fetch_array($oquery); $idkom = $result['idkomentar']; $kom = tolink(htmlentities($result['komentar'])); $time = $result['dibuat']; $nama = $result['nama']; $uid = $result['uid']; $face = $image; ?> <div class="stcommentbody" id="stcommentbody<?php echo $idkom; ?> "> <div class="stcommentimg"> <img src="<?php echo $face; ?> " class="small_face">
$statusakhir = $_POST['statusakhir']; $query = mysql_query("SELECT * FROM status,user \n WHERE status.uid=user.uid\n AND status.uid=status.id_dinding\n AND status.idstatus<'{$statusakhir}'\n ORDER BY status.idstatus DESC LIMIT 10"); } else { $query = mysql_query("SELECT * FROM status,user\n WHERE status.uid=user.uid\n AND status.uid=status.id_dinding\n ORDER BY status.idstatus DESC LIMIT 0,10"); } while ($row = mysql_fetch_array($query)) { //Ambil gambar profile kecil untuk gambar status if ($row['gambar_profil_kecil'] != NULL) { $image = "member/{$row['uid']}/profile" . $row['uid'] . ".jpg"; } else { $image = "image/default.png"; } $idstatus = $row['idstatus']; $userid = $row['uid']; $oristatus = $row['status']; $status = tolink(htmlentities($oristatus)); $time = $row['dibuat']; $nama = $row['nama']; $foto = $row['foto']; $fotostatus = "member/{$row['uid']}/foto/{$foto}"; $face = $image; $face_komen = $image_komentar; ?> <script type="text/javascript"> $(document).ready(function() { $("#stexpand<?php echo $idstatus; ?> ").oembed("<?php echo $oristatus;
<a href="#" class="view_comments" id="<?php echo $msg_id; ?> ">View all <?php echo $comment_count; ?> comments</a> </div> <?php $commentsarray = $FbWall->Comments($msg_id, $second_count); } } if ($commentsarray) { foreach ($commentsarray as $cdata) { $com_id = $cdata['com_id']; $comment = tolink($cdata['comment']); $time = $cdata['created']; $username = $cdata['fullname']; $userid = $cdata['uid_fk']; $cface = $FbWall->Gravatar($userid); ?> <div class="stcommentbody" id="stcommentbody<?php echo $com_id; ?> "> <div class="stcommentimg"> <?php if (!empty($cface)) { ?> <img src="<?php echo "user_avatar/" . $cface;
} ?> </div> <div style='display:none' id='commentboxall<?php echo $idstatus; ?> '> <?php // Query menampilkan keseluruhan komentar pada status $querykoment = mysql_query("SELECT * FROM komentar,user\n WHERE komentar.uid=user.uid \n AND komentar.idstatus='{$idstatus}' \n ORDER BY komentar.idkomentar DESC"); while ($rowkoment = mysql_fetch_array($querykoment)) { $idkom = $rowkoment['idkomentar']; $komentar = tolink(htmlentities($rowkoment['komentar'])); $time = $rowkoment['dibuat']; $nama = $rowkoment['nama']; $uid = $rowkoment['uid']; if ($rowkoment['gambar_profil_kecil'] != NULL) { $image_koment = "member/{$uid}/profile" . $uid . ".jpg"; } else { $image_koment = "image/default.png"; } $cface = $image_koment; ?> <div class="stcommentbody" id="stcommentbody<?php echo $idkom; ?> ">
} else { $lastid = 0; } //Image query for Image in comment container (Sliding down) $img_query = mysql_query("Select email from users where uid = '" . $uid . "'"); $email_value = mysql_fetch_row($img_query); $lower_email = strtolower($email_value[0]); $image = md5($lower_email); $comm_face = $FbWall->Gravatar($uid); $updatesarray = $FbWall->Updates($user_ids, $lastid); //$total = $FbWall->Total_Updates($user_ids); if (!empty($updatesarray)) { foreach ($updatesarray as $data) { $msg_id = $data['msg_id']; $orimessage = $data['message']; $message = tolink($data['message']); $time = $data['created']; $username = $data['fullname']; $uploads = $data['uploads']; $userid = $data['uid_fk']; $profileid = $data['profile_uid']; $face = $FbWall->Gravatar($userid); if (textlink($orimessage)) { $link = textlink($orimessage); } ?> <div class="stbody" id="stbody<?php echo $msg_id; ?> "> <div class="stimg">
<?php //Srinivas Tamada http://9lessons.info //Loading Comments link with load_updates.php foreach ($commentsarray as $cdata) { $com_id = $cdata['com_id']; $comment = tolink(htmlentities($cdata['comment'])); $time = $cdata['created']; $username = $cdata['username']; $uid = $cdata['uid_fk']; $cface = $Wall->Gravatar($uid); ?> <div class="stcommentbody" id="stcommentbody<?php echo $com_id; ?> "> <div class="stcommentimg"> <img src="<?php echo $cface; ?> " class='small_face'/> </div> <div class="stcommenttext"> <a class="stcommentdelete" href="#" id='<?php echo $com_id; ?> ' title='Delete Comment'>X</a> <b><?php echo $username; ?> </b> <?php
<?php include "../includes/mysql.php"; include "../includes/functions.php"; include "../includes/sessions.php"; if (isset($_POST['uid'])) { $uid = $_POST['uid']; $chk = mysql_query("SELECT f.*, u.fname, u.lname, u.pic FROM feed f, user u WHERE f.user_id = '{$uid}' AND u.id = f.user_id ORDER BY f.id DESC") or die(mysql_error()); if (mysql_num_rows($chk) > 0) { while ($a = mysql_fetch_array($chk)) { $fid = $a['id']; $pname = $a['fname'] . ' ' . $a['lname']; $ppic = $a['pic']; $feed = tolink($a['feed']); $time = cleanDate($a['time']); ?> <div class="feed"> <div class="fleft"><img src="<?php echo $ppic; ?> "></div> <div class="fright"> <div class="fname"><?php echo $pname; ?> </div> <div class="fpost"><?php echo $feed; ?> </div> <div class="ftime"><?php