Jump to content

zhshero

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Everything posted by zhshero

  1. to do what you are telling me to do, is i have to download the script install it find where the friends is and take from there but i would have to upload it to my web host, and then unzip the files, witch i have no clue how to do with my *** web host
  2. i just want it to show all the friends i ever added, but not based on time i want to be able to go to someone else profile and see who there friends are and they can do the same
  3. I'm trying to make it so i can show the friends i added, or users that added a friend <table border=2 width="250" height="125"><tr> <?php $userfinal = get_username($_SESSION['user_id']); $Members = mysql_query("SELECT * FROM friends WHERE username='$userfinal' AND friendname"); $numRowsMembers = mysql_num_rows($Members); for($count = 1; $count <= $numRowsMembers; $count++) { $name = mysql_fetch_array($Members); ?> <td width="150" height="125"> <a href="view_profile.php?username=<? echo $name['friendname']?>"><img src="<? echo $name['main_P']?>" width="100" height="100"/> <? echo $name['friendname']?></a> <? if (isset($name['date']) && (time() - $name['date'] > 300)) { echo 'offline =['; } else { echo "<font color=green>[Online Now!]</font>"; } $name['date'] = time(); // update last activity time stamp ?> </td> <? } ?> </tr></table> database id friendname username 12 kristybellexo zhshero 13 demo zhshero 14 zhshero zhshero
  4. Nvm i got it XD $sql = mysql_query("SELECT count(message_id) FROM messages WHERE to_user='$userfinal' AND message_read='1'"); $total = mysql_fetch_array($sql); $num = $total[0]; echo $num;
  5. message_id from_user to_user user_photo message_title message_contents message_read message_date
  6. i don't really have much of a code, half way of doing so i started thinking this can't be right and now i'm unsure where to even start $sql = mysql_query("SELECT count(message_id) FROM messages WHERE MATCH(to_user='$userfinal', message_read)"); $total = mysql_fetch_array($sql); $num = $total[0]; echo $num;
  7. hey i'm just woundering how i would go abouts on echoing unread messages sent to a user i want to beable to see how many unread messages i have
  8. message_user.php <?php include "sessionStore.php"; ?> <? $Username = $_GET['msg']; $user = mysql_query("SELECT * FROM users WHERE Username = '$Username'"); $lvl = mysql_query("SELECT * FROM users WHERE Level_access = '$Level_access'"); $lvl=mysql_fetch_assoc($lvl); $user=mysql_fetch_assoc($user); ?> <head> <title>Zhshero Friends</title> <link href="themes/theme1/default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <h1>Zhshero Friends</h1> <h2>Menu</h2> <ul> <li class="first"><a href="home.php" accesskey="1" title="">Home</a></li> <li><a href="mymembers.php" accesskey="2" title="">members</a></li> <li><a href="#" accesskey="3" title="">Services</a></li> <li><a href="#" accesskey="4" title="">About</a></li> <li><a href="/inbox/" accesskey="5" title="">inbox</a></li> </ul> </div> <div id="content"> <div id="colOne"> <h3> sending msg to <? echo $user['Username']?> </h3> <ul class="list"> <img src="<? echo $user['main_P']?>" width="150" height="150"/><br> </ul> <p> </p> <h3>news box</h3> <p> <a href=view_photos.php?users_photo=<? echo $user['Username']?>>view my photos</a><br> <a href=message_user.php?msg=<? echo $user['Username']?>>send me a msg</a> </p> </div> <div id="colTwo"> <p> <?php echo "<center><table border='1' boredercolor='red'><tr><td><b><font color=blue>sending a msg to ".$user['Username']."</td></tr></table></center><br>"; $userfinal = get_username($_SESSION['user_id']); $userhehe=$userfinal; ?><font color=white><? echo $user1['Username']?><center> <form name="message" action="/inbox/messageck.php" method="post"> <input type="text" rows="8" name="message_title" value="no titled"> <br> <input type="hidden" name="message_to" value="<? echo $user['Username']?>"><br> Message: <br> <textarea rows="20" cols="50" name="message_content"> </textarea> <?php echo '<input type="hidden" name="message_from" value="'.$userhehe.'"><br>'; ?> <input type="submit" value="Submit"> </form> </p> </div> </div> <div id="footer"> <p>Copyright (c) 2006 Sitename.com. All rights reserved. Design by <a href="http://freecsstemplates.org/">Free CSS Templates</a>.</p> </div> <div style="font-size: 0.8em; text-align: center;"> <br /> Design downloaded from Zeroweb.org: <a href="http://www.zeroweb.org">Free website templates, layouts, and tools.</a><br /> <br /> </div> </body> </html> messageck.php <?php include "sessionStore.php"; ?> <head> <title>Zhshero Friends</title> <link href="../themes/theme1/default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <h1>Zhshero Friends</h1> <h2>Menu</h2> <ul> <li><a href="../home.php" accesskey="1" title="">Home</a></li> <li><a href="../mymembers.php" accesskey="2" title="">members</a></li> <li><a href="../update_profile.php" accesskey="3" title="">settings</a></li> <li class="first"><a href="/inbox/" accesskey="5" title="">inbox</a></li> <li><a href="../logout.php" accesskey="4" title="">logout</a></li> </ul> </div> <div id="colTwo"> <? $userfinal2 = get_main_P($_SESSION['user_id']); $title=$_POST['message_title']; $to=$_POST['message_to']; $content=$_POST['message_content']; $from=$_POST['message_from']; $time=$_POST['message_date']; $ck_reciever = "SELECT Username FROM users WHERE Username = '".$to."'"; if( mysql_num_rows( mysql_query( $ck_reciever ) ) == 0 ){ die("The user you are trying to contact don't excist. Please go back and try again.<br> <form name=\"back\" action=\"new_message.php\" method=\"post\"> <input type=\"submit\" value=\"Try Again\"> </form> "); } elseif(strlen($content) < 1){ die("Your can't send an empty message!<br> <form name=\"back\" action=\"new_message.php\" method=\"post\"> <input type=\"submit\" value=\"Try Again\"> </form> "); } elseif(strlen($title) < 1){ die("You must have a Title!<br> <form name=\"back\" action=\"new_message.php\" method=\"post\"> <input type=\"submit\" value=\"Try Again\"> </form> "); }else{ mysql_query("INSERT INTO messages (from_user, to_user, message_title, message_contents, message_date, user_photo) VALUES ('$from','$to','$title','$content','$time','$userfinal2')") OR die("Could not send the message: <br>".mysql_error()); echo "The Message Was Successfully Sent!"; ?> <form name="back" action="index.php" method="post"> <input type="submit" value="Back to The Inbox"> </form> <?php } ?> </div> <div id="footer"> <p>Copyright (c) 2006 Sitename.com. All rights reserved. Design by <a href="http://freecsstemplates.org/">Free CSS Templates</a>.</p> </div> <div style="font-size: 0.8em; text-align: center;"> <br /> Design downloaded from Zeroweb.org: <a href="http://www.zeroweb.org">Free website templates, layouts, and tools.</a><br /> <br /> </div> </body> </html> <center><a href="http://www.adleaf.com" style="font-size:12px;">Free Advertising</a><br/><script type="text/javascript"> riv_client = 318310; riv_backgroundColor = '000000'; riv_borderColor = '000066'; riv_headlineColor = '669900'; riv_textColor = 'FFFFFF'; riv_linkColor = 'CC3300'; riv_adWidth = 728; riv_adHeight = 90; riv_adType = 4; </script> <script type="text/javascript" src="http://ad1.adleaf.com/js/rivad.js"></script>
  9. i get this error when i send a message to a user when i use this ' in a message :S Could not send the message: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '','','http://zhshero.freehostingcloud.com/members/zhshero/1290146596.jpg')' at line 1
  10. i am looking for help to how to build a function, that will redirect you to a construction page while they site is being updated with new updates, but allow staff only access while its being constructed on, so while i do my updates to my site, i can test the new update, before others have access
  11. how about something that will help not, not help
  12. what i'm trying to do, is have it so a staff member can mange users i came up with these, but it dosn't show on the page :S if ( isadmin ( $_SESSION['user_id'] ) ): ?> <br /> It seems that you're an admin. You may <a href="manage_users.php" title="manage users">manage users</a> or <a href="admin_settings.php" title="edit site settings">edit site settings</a>. <? if ( ismod ( $_SESSION['user_id'] ) ): ?> <br /> It seems that you're an mod. You may <a href="manage_users.php" title="manage users">manage users</a>. <?php endif; ?>
  13. im trying to get data from mysql from Level_access 2 and 3 so it can echo all the users of 2 and 3 and leave out 1
  14. nvm i got it if this is how its done $userfinal = get_username($_SESSION['user_id']); $the_time = time(); mysql_query("UPDATE users SET date='$the_time' WHERE Username='$userfinal'")or die(mysql_error()); if (isset($user['date']) && (time() - $user['date'] > 60)) { echo 'offline'; } else { echo "<font color=green>[Online Now!]</font>"; } $user['LAST_ACTIVITY'] = time(); // update last activity time stamp ?>
  15. how would i do and offline or online check so if 5 mins has passed it shows the user as offline date('G:ia'); // 0:00am
  16. Im storing the photos in members/"membersname"/14315.jpg all i wanted was it to store into a database for when a users wants to change his/hers main photo, i already had an uploading script, so i toke that edited it so it would do what i needed
  17. yea that dosn't help one bit -.- thanks anyways
  18. what is the simple way to upload a photo to mysql or store in a dir, and update the database with the new url?
  19. if i do it that why, i'll get what i want, but then everything is to the left of the screen i wanted to keep it ceneter what i have now works <center><table border=2 width="250" height="125"><tr> <? $Members = mysql_query("SELECT * FROM users") or die(mysql_error()); $numRowsMembers = mysql_num_rows($Members); ?> <?php for($count = 1; $count <= $numRowsMembers; $count++) { $name = mysql_fetch_array($Members); ?> <td width="150" height="125"> <a href="view_profile.php?username=<? echo $name['Username']?>"><img src="<? echo $name['main_P']?>" width="100" height="100"/> <? echo $name['Username']?></a> <? $onlinestatus = $name['ON_OFF']; if ( $onlinestatus == OFFLINE ) { echo ""; } else { echo "<font color=green>Online</font>"; } ?> </td> <? } ?> </tr></table>
  20. i been working on my view Members page for a while now i can't seem to get it to work right this is how i shows up for me and i want it to show up like this i think it has something to do with the loop, but have no idea how to fix this :S <?php require_once('settings.php'); checkLogin('1 2'); $Members = mysql_query("SELECT * FROM users") or die(mysql_error()); $numRowsMembers = mysql_num_rows($Members); ?> <?php for($count = 1; $count <= $numRowsMembers; $count++) { $name = mysql_fetch_array($Members); ?> <table border=2> <tr><td><img src="<? echo $name['main_P']?>" width="50" height="50"/> <a href="view_profile.php?username=<? echo $name['Username']?>"><? echo $name['Username']?></a> <? $onlinestatus = $name['ON_OFF']; if ( $onlinestatus == OFFLINE ) { echo ""; } else { echo "<font color=green>Online Now!</font>"; } ?> </td></tr></table> <? } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.