<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script type="text/javascript" src="js/jquery_002.js"></script> <script type="text/javascript" src="js/displaymsg.js"></script> <script type="text/javascript" src="js/ajaxdelete.js"></script> <style type="text/css"> .help { font-size:11px; color:#006600; } body { color: #000000; background-color:#999999 ; background:#999999 url(<?php loadpic($uid); ?> ) fixed repeat top left; font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif; } .msgdiv{ width:759px; padding-top:8px; padding-bottom:8px; background-color: #fff; font-weight:bold; font-size:18px;-moz-border-radius: 6px;-webkit-border-radius: 6px; }
$current = 1; } elseif ($page > $countp) { $current = $countp; } else { $current = $page; } // sinon la page courante est bien celle indiquée dans l'URL } /* $start est la valeur de départ du LIMIT dans notre requête SQL (est fonction de la page courante) */ $start = $current * $epp - $epp; /* Récupération des données à afficher pour la page courante */ $uh = mysql_query("select * from notes where user='******' and (type='1' or type='2') order by notes_id desc LIMIT {$start}, {$epp}"); if ($uh) { /* Affichage des données */ while ($yow = mysql_fetch_array($uh)) { $pic = loadpic($yow['user']); $userN = nameUser($yow['user']); $timestamp = Timesince($yow['date']); $noteIDs = hashit($yow['notes_id']); $notes = stripslashes(nl2br($yow['note'])); $notes = wordwrap($notes, 20, "\n", 1); echo "\n\n\t\t\t\t<table width='765' border='0'>\n\t\t\t\t <tr>\n\t\t\t\t\t<td width='10' height='21' valign='top'><a href='user/{$userN}'>{$pic}</a></td>\n\t\t\t\t\t<td width='745' valign='top'><a href='user/{$userN}'><font color='blue'>{$userN}</font></a> <a href='note/{$noteIDs}'>" . $notes . "</a><br /><em><font color='grey'>Posted {$timestamp} ago</font></em></td>\n\t\t\t\t </tr>\n\t\t\t\t \t\n\n\t\t\t\t \n\t\t\t\t</table>\n\t\t\t\t<hr />\n\n\t\t\t\n\t\t\t\n\t\t\t\t\t"; } /* Libération du résultat */ mysql_free_result($uh); } //else echo mysqli_error($dbc); } //while of friends /* Appel de la fonction */ echo @paginate("welcome.php", '?p=', $countp, $current);
session_start(); include 'config.php'; include 'functions.php'; @($uid = $_SESSION['user_id']); @($user = $_SESSION['user']); loggedin(); $id = intval($_GET['id']); $userCheck = user_Check($id); if ($userCheck != 0) { $a = "user='******'"; $b = "friend='{$id}'"; $sql = mysql_query("select * from friends where ({$a} or {$b}) and permet='1'"); $oopn = mysql_num_rows($sql); $user = nameUser($id); echo "<em>{$user} has {$oopn} Friends</em>"; while ($oop = mysql_fetch_array($sql)) { $userID = $oop['user']; $friendID = $oop['friend']; if ($userID == $id) { $s = $oop['friend']; } else { $s = $oop['user']; } $userN = nameUser($s); $pic = loadpic($s); echo "\n\t\t\t\n\t\t\t\t<table width='200' border='0'>\n\t\t\t\t <tr>\n\t\t\t\t\t<td><a href='user/{$userN}'>{$pic}</a></td>\n\t\t\t\t </tr>\n\t\t\t\t <tr>\n\t\t\t\t\t<td><a href='user/{$userN}'>{$userN}</a></td>\n\t\t\t\t </tr>\n\t\t\t\t</table>\n\t\t\t\n\t\t\t\n\t\t\t"; } } else { echo "<div id='wrong'>We don't have this user in our DB</div>"; }
<div id="top_nav"> <li><a href="home.html" title="Go home">Home</a></li> <li><a href="profile.html" title="Go to my profile">My profile</a></li> <li><a href="friends.html" title="View my friends">My friends</a></li> <li><a href="friend_requests.html" title="See friend requests">Friend requests</a> (0)</li> <li><a href="" title="See notification alerts">Notifications</a> (0)</li> <li><a href="settings.html" title="Change my settings">Settings</a></li> <li class="last" title="Sign out of Noterly"><a href="">Sign out</a></li> </div> </div> <div id="content"> <div id="left"> <div id="profile"> <ul> <li><img src="<?php echo loadpic($id); ?> " width="60" height="60" /></li> <li> <h2><?php echo $user; ?> </h2> <span class="profile_info"><?php echo date("d", $since); ?> </span> days on Noterly<br /> <span class="profile_info"><?php numberOfNotes($id); ?> </span> notes
$current = $page; } // sinon la page courante est bien celle indiquée dans l'URL } /* $start est la valeur de départ du LIMIT dans notre requête SQL (est fonction de la page courante) */ $start = $current * $epp - $epp; /* Récupération des données à afficher pour la page courante */ $qry = "select * from `notes` where `note` LIKE '%{$q}%' and `type`='1' LIMIT {$start}, {$epp}"; $res = @mysql_query($qry); $num = mysql_num_rows($res); if ($num == 0) { echo "<div id='wrong'>No Results</div>"; } if ($res) { while ($row = mysql_fetch_array($res)) { $user = $row['user']; $userN = nameUser($user); $pic = loadpic($user); $timestamp = Timesince($row['date']); $note = stripslashes(nl2br($row['note'])); $noteID = hashit($row['notes_id']); echo "\n\n\t\t\t\t\t\t\t\t\t\t\t\t<table width='765' border='0'>\n\t\t\t\t\t\t\t\t\t\t\t\t <tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td width='10' height='21' valign='top'><a href='user/{$userN}'>{$pic}</a></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td width='745' valign='top'><a href='user/{$userN}'><font color='blue'>{$userN} \t \t\t\t\t\t\t\t\t\t\t</font></a> <a href='note/{$noteID}'>" . $note . "</a><br /><em><font color='grey'>Posted \t\t\t\t\t\t\t\t\t\t{$timestamp} ago</font></em> \t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t </tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\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</table>\n\t\t\t\t\t\t\t\t\t\t\t\t<hr />\n\n\t\t\t\n\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; } } /* Libération du résultat */ mysql_free_result($res); //else echo mysqli_error($dbc); /* Appel de la fonction */ echo paginate("search2.php?q={$q}", '&p=', $countp, $current); } //else error
function show_comments($noteID) { $getcom = mysql_query("select * from note_comment where note_id='{$noteID}'"); $numcom = mysql_num_rows($getcom); if ($numcom == 0) { echo "<h1><strong>Make</strong> the first comment!</h1>"; } else { echo "<h1><strong># Comments</strong> on this note</h1>"; while ($oopcom = mysql_fetch_array($getcom)) { $userID = $oopcom['user']; $user = nameUser($userID); $com = stripslashes(nl2br($oopcom['comment'])); //echo "<em>Posted by : </em>$user <br />$com<hr />"; ?> <div id="comment"> <li id="comment_profile_pic"><img src="<?php echo loadpic($userID); ?> " width='30' height='30' /></li> <li id="comment_content"> <span class="note_meta"><?php echo "Posted by <a href='profile.php?id={$userID}'>{$user}</a>"; ?> </span><br /> <?php echo $com; ?> </li> </div> <?php } // else } }
@($uid = $_SESSION['user_id']); @($user_sess = $_SESSION['user']); $date = time(); $user = mysql_real_escape_string(addslashes($_GET['user'])); $selu = mysql_query("select * from users where username='******' limit 1"); $numu = mysql_num_rows($selu); $id = IDuser($user); //$user=nameUser($id); //check avaibility of this user if (!isset($user) || empty($user) || $numu == 0) { echo "<div id='wrong'>There is no such user on our DB ,sorry</div>"; } else { $sql = mysql_query("select * from users where user_id='{$id}' limit 1"); $row = mysql_fetch_array($sql); $dateReg = $row['date_reg']; $picc = "../" . loadpic($id); echo "<img src='{$picc}' height='30px' width='30px' /><br />"; echo "Username : {$user} <br />"; echo "Date of registration : " . date("M j'G", $dateReg) . "<br />"; echo "Number of notes posted : "; numberOfNotes($id); echo "<hr />"; echo "<input type='hidden' id='uid' value='{$uid}' />"; echo "<input type='hidden' id='idi' value='{$id}' />"; //echo "<input type='hidden' id='permet' value='0' />"; //ADD FRIENDS ?> <script type="text/javascript" src="http://localhost/noterly/jquery.js" ></script> <script type="text/javascript"> jQuery(function($) {