jasonhardwick Posted May 20, 2008 Share Posted May 20, 2008 Ok here is my question... I have a database of users and i want to be able to create a network that will allow you to search and add other users to your network what i am wondering is how to set that up in my users sql or do i need to create a new sql database. any help or tutorials would be appreciated Link to comment https://forums.phpfreaks.com/topic/106500-creating-a-network-of-users/ Share on other sites More sharing options...
Caesar Posted May 20, 2008 Share Posted May 20, 2008 What kind of network? Social? You didn't go into much detail. You can use your existing database, of course. Several different ways of doing this (Using groups, friends, etc...etc) it is all dependent on your database structure & what your actual goal is with regards to design or functionality. One way, would be to use the existing users table and add a new column where you store other id's in an array separated by a unique character. Or, you can simply query users qho belong to a certain group or criteria. Like I said...it kind of depends on what you mean by network...and what type of network you have in mind. It all comes down to your MySQL database design/structure. Once you've got the data...you can use it, manipulate it, or query it any which way you want. Link to comment https://forums.phpfreaks.com/topic/106500-creating-a-network-of-users/#findComment-545955 Share on other sites More sharing options...
jasonhardwick Posted May 20, 2008 Author Share Posted May 20, 2008 Wow thanks that gives me some ideas.. I'll go a little more in depth... first a discription at the bottom of the page are my codes for the pages. Ok I've got a user page that shows USER X that you have searched for and on that page is a "Invite to network" button which I would like to grab USER X's ID and add it to the network colum (I dont have a clue on how to do that) . then on USER X's home page ther is a section called "My Invites" where your name and image will show up. then they can approve or deny you and you and USER X will only be shown in "My Network" if you have been approved similar to "myspace" and "linked in". New Colum in SQL ALTER TABLE `user` ADD `network` LONGTEXT NOT NULL AFTER `user_image` ; USER X's Profile page <?php session_start(); //$_SESSION['username'] = "Joe Shmo"; if(!isset($_SESSION['username'])) { header("location:index1.php"); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>My Creative Process - Profile Review</title> <style type="text/css"> <!-- .style1 {color: #666666} --> </style> <link href="/css/style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style2 { color: #f73602; font-weight: bold; } .style3 { color: #FFFFFF } .style4 {color: #F15A25} .style6 {color: #FFFFFF; font-size: 24px; } --> </style> </head> <body> <table width="972" border="0" cellspacing="0" cellpadding="5"> <tr> <td><div align="right">Logged in as: <? echo $_SESSION['username'];?></div></td> </tr> </table> <table width="972" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#F73602" id="frame"> <tr bordercolor="#F15A25"> <td colspan="4"><div align="center"> <p><img src="/images/header.jpg" width="942" height="84" /></p> <table width="902" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="728"><p><span class="style1"><a href="/index.php">home</a> | <a href="/main_forum.php">review</a> | <a href="/create_topic.php">post</a> | <a href="/search.php">search</a> | <a href="/archive.php">archive</a> | <a href="/mindgames.php">mindgames</a> | <a href="/brainstorm.php">brainstorm</a> | <a href="/careers.php">careers</a> | <a href="/suggestion_box.php">suggestion box</a></span></p> </td> <td colspan="-1"><div align="right"> <? //echo "You've been logged in since" . $_SESSION['time'] . "<br>"; echo '<a href="logout.php">Click here to logout</a>'; //echo "<br>"; // echo '<a href="' .$_SERVER['PHP_SELF']. '?action=change"> Change Password</a>'; ?> <? // $action=$_GET['action']; $action="sdfasdfasdfa"; if($action=="change"){ changepw($_SESSION['username']); update($newpass,$_SESSION['username']); }else{ } ?> </div></td> </tr> </table> <table width="902" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="728" rowspan="3" valign="top"><script type="text/javascript"><!-- google_ad_client = "pub-3297649199554245"; /* 728x90, created 5/13/08 */ google_ad_slot = "2051664931"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span><?php $user_profile=$_GET['username']; echo $user_profile;?>'s Profile</td> <td bgcolor="#EAEBEB"><div align="right"><a href="invite.php">invite to network</a></div></td> </tr> </table> <p><br /> <? include "config.php"; //$table = "press"; $sql = "SELECT * from user WHERE uname = '$user_profile' "; $result = mysql_query($sql); if (!$result) { echo "Could not successfully run query ($sql) from DB: " . mysql_error(); } while ($row = mysql_fetch_assoc($result)) { $occupation = $row['occupation']; $email = $row['e_private']; ?> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="80"><strong>Username:</strong></td> <td><? echo $row['uname']; ?></td> <td width="300" rowspan="10" valign="top"><table width="250" border="2" align="right" cellpadding="5" cellspacing="0" bordercolor="#E99979"> <tr> <td> <div align="center"> <?php $sql = "SELECT * from user WHERE uname = '$user_profile' "; $result = mysql_query($sql); $rows=mysql_fetch_array($result); $filename=$rows['user_image']; $img_path = "user_images/".$filename; $image_t = getimagesize($img_path); function imageResize($width, $height, $target) { if ($width > $height) { $percentage = ($target / $width); } else { $percentage = ($target / $height); } $width = round($width * $percentage); $height = round($height * $percentage); return "width=\"$width\" height=\"$height\""; } $wh = imageResize ($image_t[0], $image_t[1], 250); echo "<img src=\"$img_path\" $wh />"; ?></div></td> </tr> </table></td> </tr> <tr> <td width="80"><strong>Name:</strong></td> <td><? echo $row['f_name']," ".$row['l_name']; ?></td> </tr> <tr> <td width="80"><strong>Zip Code:</strong></td> <td><? echo $row['zip_code']; ?></td> </tr> <tr> <td width="80"><strong>Country:</strong></td> <td><? echo $row['country']; ?></td> </tr> <tr> <td width="80"> </td> <td> </td> </tr> <tr> <td width="80"><strong>Occupation:</strong></td> <td><? if ($occupation == "Other"){echo $row['occupation_other'];} else {echo $row['occupation']; } ?></td> </tr> <tr> <td width="80"><strong>Email:</strong></td> <td><? if ($email == "Private"){echo $row['uname'], "'s email has been set to private" ;} else {echo $row['email']; } ?></td> </tr> <tr> <td width="80"><strong>Website:</strong></td> <td><? echo $row['website']; ?></td> </tr> <tr> <td width="80"> </td> <td> </td> </tr> <tr> <td width="80"> </td> <td> </td> </tr> </table> <p> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span> <?php $user_profile=$_GET['username']; echo $user_profile;?> 's Network</td> </tr> </table> <p> <?php include "config.php"; $tbl_name="user"; $sql="SELECT * from forum_question WHERE username = '$user_profile' ORDER BY datetime ASC LIMIT 0,1000"; $result=mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { ?> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td><b><a href="user_profile.php?username=<? echo $rows['network']; ?>"><? echo $rows['network']; ?></a></b></td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> <p> <?php } ?> </p> <p></p> <p><br /> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span><?php echo $user_profile;?>'s Work</td> </tr> </table> <? } mysql_free_result($result); ?> <?php include "config.php"; $tbl_name="forum_question"; $sql="SELECT * from forum_question WHERE username = '$user_profile' ORDER BY datetime ASC LIMIT 0,1000"; $result=mysql_query($sql); ?> <table width="728" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td width="5%" align="center" bgcolor="#E6E6E6"><strong>Type</strong></td> <td width="70%" align="center" bgcolor="#E6E6E6"><strong>Title of Creative</strong></td> <td width="5%" align="center" bgcolor="#E6E6E6"><strong>Views</strong></td> <td width="5%" align="center" bgcolor="#E6E6E6"><strong>Replies</strong></td> <td width="15%" align="center" bgcolor="#E6E6E6"><strong>Owner</strong></td> </tr> <?php while($rows=mysql_fetch_array($result)){ // Start looping table row $type= $rows['file_type']; ?> <tr> <td valign="top" bgcolor="#FFFFFF"><?php $id=$_GET['id']; $tbl_name2="forum_answer"; $c_avg =("SELECT AVG(a_concept) FROM $tbl_name2 WHERE question_id='$id'"); $c_avg1 = mysql_query($c_avg) or die ("Error in query: $query1. ".mysql_error()); $query_data_c=mysql_fetch_row($c_avg1); $c_avgrows = $query_data_c[0]; if ($c_avgrows >= "6") {echo "Execution Grade: A+";} if ($c_avgrows >= "5.5" && $c_avgrows <= "5.99") {echo "Concept Grade: A";} if ($c_avgrows >= "5" && $c_avgrows <= "5.49") {echo "Concept Grade: A-";} if ($c_avgrows >= "4.5" && $c_avgrows <= "4.99") {echo "Concept Grade: B+";} if ($c_avgrows >= "4" && $c_avgrows <= "4.49") {echo "Concept Grade: B";} if ($c_avgrows >= "3.5" && $c_avgrows <= "3.99") {echo "Concept Grade: B-";} if ($c_avgrows >= "3" && $c_avgrows <= "3.49") {echo "Concept Grade: C+";} if ($c_avgrows >= "2.5" && $c_avgrows <= "2.99") {echo "Concept Grade: C";} if ($c_avgrows >= "2" && $c_avgrows <= "2.49") {echo "Concept Grade: C-";} if ($c_avgrows >= "1.5" && $c_avgrows <= "1.99") {echo "Concept Grade: D+";} if ($c_avgrows >= "1" && $c_avgrows <= "1.49") {echo "Concept Grade: D";} if ($c_avgrows >= ".5" && $c_avgrows <= ".99") {echo "Concept Grade: D-";} //echo "Concept Grade: $c_avgrows"; ?></td> <td valign="top" bgcolor="#FFFFFF"><b><a href="view_topic.php?id=<? echo $rows['id']; ?>"><? echo $rows['topic']; ?></a></b><br /> <span class="style1"><? echo $rows['file_type']; ?><br /> <br /> Posted: <? echo $rows['datetime']; ?></span><br /></td> <td align="center" valign="top" bgcolor="#FFFFFF"><? echo $rows['view']; ?></td> <td align="center" valign="top" bgcolor="#FFFFFF"><? echo $rows['reply']; ?></td> <td align="center" valign="top" bgcolor="#FFFFFF"><a href="view_user.php?username=<? echo $rows['username']; ?>"><? echo $rows['username'];?></a></td> </tr> <?php // Exit looping and close connection } mysql_close(); ?> <tr> <td colspan="5" align="right" bgcolor="#E6E6E6"> </td> </tr> </table></td> <td valign="top"><table width="150" border="1" align="right" cellpadding="5" cellspacing="0" bordercolor="#F73602"> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#F15A25"><p align="right" class="style2 style3 style1 style3">Sponsored Links</p></td> </tr> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#EAEBEB"><p align="right"><a href="/links/schools.php" target="_blank">Creative Schools</a></p> <p align="right"><a href="/links/careers.php" target="_blank">Creative Careers</a></p> <p align="right"><a href="/links/publications.php" target="_blank">Creative Publications</a></p> <p align="right"><a href="/links/professionals.php" target="_blank">Creative Professionals</a></p> <p align="right"><a href="/links/creative.php" target="_blank">General Creative Links</a></p> <p align="right"><a href="/links/photography.php" target="_blank">Photography Links</a></p> <p align="right"><a href="/links/art.php" target="_blank">Art Links</a></p> <p align="right"><a href="/links/design.php" target="_blank">Design links</a></p> <p align="right"><a href="/links/illustration.php" target="_blank">Illustration Links</a></p> <p align="right"><a href="/links/web.php" target="_blank">Web Links</a></p> <p align="right"><a href="/links/3d.php" target="_blank">3D Design Links</a></p> <p align="right"><a href="/links/id.php" target="_blank">Interior Design Links</a></p></td> </tr> </table></td> </tr> <tr> <td valign="top"><table width="150" border="1" align="right" cellpadding="5" cellspacing="0" bordercolor="#F73602"> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#F15A25"><p align="right" class="style2 style3 style1 style3">Stock Photos</p></td> </tr> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#EAEBEB"><p align="right"> <script type="text/javascript"><!-- google_ad_client = "pub-3297649199554245"; /* 120x240 Stock Photos */ google_ad_slot = "2792032096"; google_ad_width = 120; google_ad_height = 240; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script></p> </td> </tr> </table></td> </tr> <tr> <td valign="top"> </td> </tr> </table> <p> </p> <p> </p> </div></td> </tr> </table> <p> </p> </body> </html> Your Home Page <?php session_start(); //$_SESSION['username'] = "Joe Shmo"; if(!isset($_SESSION['username'])) { header("location:index1.php"); exit; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>My Creative Process - My Profile</title> <style type="text/css"> <!-- .style1 {color: #666666} --> </style> <link href="/css/style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style2 { color: #f73602; font-weight: bold; } .style3 { color: #FFFFFF } .style4 {color: #F15A25} .style6 {color: #FFFFFF; font-size: 24px; } --> </style> </head> <body> <table width="972" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td><div align="right">Logged in as: <? echo $_SESSION['username'];?></div></td> </tr> </table> <table width="972" border="1" align="center" cellpadding="5" cellspacing="0" bordercolor="#F73602" id="frame"> <tr bordercolor="#F15A25"> <td colspan="4"><div align="center"> <p><img src="/images/header.jpg" width="942" height="84" /></p> <table width="902" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="728"><p><span class="style1"><a href="/index.php">home</a> | <a href="/main_forum.php">review</a> | <a href="/create_topic.php">post</a> | <a href="/search.php">search</a> | <a href="/archive.php">archive</a> | <a href="/mindgames.php">mindgames</a> | <a href="/brainstorm.php">brainstorm</a> | <a href="/careers.php">careers</a> | <a href="/suggestion_box.php">suggestion box</a></span></p> </td> <td colspan="-1"><div align="right"> <? //echo "You've been logged in since" . $_SESSION['time'] . "<br>"; echo '<a href="logout.php">Click here to logout</a>'; //echo "<br>"; // echo '<a href="' .$_SERVER['PHP_SELF']. '?action=change"> Change Password</a>'; ?> <? // $action=$_GET['action']; $action="sdfasdfasdfa"; if($action=="change"){ changepw($_SESSION['username']); update($newpass,$_SESSION['username']); }else{ } ?> </div></td> </tr> </table> <table width="902" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="728" rowspan="3" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#F15A25"><span class="style6">Welcome back <? echo $_SESSION['username'];?></span></td> </tr> </table> <script type="text/javascript"><!-- google_ad_client = "pub-3297649199554245"; /* 728x90, created 5/13/08 */ google_ad_slot = "2051664931"; google_ad_width = 728; google_ad_height = 90; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span>My Profile</td> <td bgcolor="#EAEBEB" class="style4"><div align="right"><a href="/edit_profile.php">edit</a></div></td> </tr> </table> <? include "config.php"; //$table = "press"; $sql = "SELECT * from user WHERE uname = '{$_SESSION['username']}' "; $result = mysql_query($sql); if (!$result) { echo "Could not successfully run query ($sql) from DB: " . mysql_error(); } while ($row = mysql_fetch_assoc($result)) { $occupation = $row['occupation']; $email = $row['e_private']; ?> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td width="80"><strong>Username:</strong></td> <td><? echo $row['uname']; ?></td> <td width="300" rowspan="10" valign="top"> <table width="250" border="2" align="right" cellpadding="5" cellspacing="0" bordercolor="#E99979"> <tr> <td><div align="center"> <?php $sql = "SELECT * from user WHERE uname = '{$_SESSION['username']}' "; $result = mysql_query($sql); $rows=mysql_fetch_array($result); $filename=$rows['user_image']; $img_path = "user_images/".$filename; $image_t = getimagesize($img_path); function imageResize($width, $height, $target) { if ($width > $height) { $percentage = ($target / $width); } else { $percentage = ($target / $height); } $width = round($width * $percentage); $height = round($height * $percentage); return "width=\"$width\" height=\"$height\""; } $wh = imageResize ($image_t[0], $image_t[1], 250); echo "<img src=\"$img_path\" $wh />"; ?> </div> <p align="center"><a href="/edit_profile_image.php">add / edit image</a></p></td> </tr> </table> </td> </tr> <tr> <td width="80"><strong>Name:</strong></td> <td><? echo $row['f_name']," ".$row['l_name']; ?></td> </tr> <tr> <td width="80"><strong>Zip Code:</strong></td> <td><? echo $row['zip_code']; ?></td> </tr> <tr> <td width="80"><strong>Country:</strong></td> <td><? echo $row['country']; ?></td> </tr> <tr> <td width="80"> </td> <td> </td> </tr> <tr> <td width="80"><strong>Occupation:</strong></td> <td><? if ($occupation == "Other"){echo $row['occupation_other'];} else {echo $row['occupation']; } ?></td> </tr> <tr> <td width="80"><strong>Email:</strong></td> <td><? if ($email == "Private"){echo $row['uname'], "'s email has been set to private" ;} else {echo $row['email']; } ?></td> </tr> <tr> <td width="80"><strong>Website:</strong></td> <td><? echo $row['website']; ?></td> </tr> <tr> <td width="80"> </td> <td> </td> </tr> <tr> <td width="80"> </td> <td> </td> </tr> </table> <p> <br /> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span>My Network</td> </tr> </table> <p> <?php include "config.php"; $tbl_name="user"; $sql="SELECT * from forum_question WHERE username = '{$_SESSION['username']}' ORDER BY datetime ASC LIMIT 0,1000"; $result=mysql_query($sql); while ($row = mysql_fetch_assoc($result)) { ?> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td><b><a href="user_profile.php?username=<? echo $rows['network']; ?>"><? echo $rows['network']; ?></a></b></td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table> <p> <?php } ?> </p> <p> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span>My Invites</td> </tr> </table> <p></p> <p> </p> <p> </p> <table width="100%" border="0" cellspacing="0" cellpadding="5"> <tr> <td bgcolor="#EAEBEB" class="title_dark"><span class="style4">| </span>My Work</td> </tr> </table> <? } mysql_free_result($result); ?> <?php include "config.php"; $tbl_name="forum_question"; $sql="SELECT * from forum_question WHERE username = '{$_SESSION['username']}' ORDER BY datetime ASC LIMIT 0,1000"; $result=mysql_query($sql); ?> <table width="728" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC"> <tr> <td width="20%" align="center" bgcolor="#E6E6E6"><strong>Grades</strong></td> <td width="70%" align="center" bgcolor="#E6E6E6"><strong>Title of Creative</strong></td> <td width="5%" align="center" bgcolor="#E6E6E6"><strong>Views</strong></td> <td width="5%" align="center" bgcolor="#E6E6E6"><strong>Replies</strong></td> </tr> <?php while($rows=mysql_fetch_array($result)){ // Start looping table row $type= $rows['file_type']; ?> <tr> <td valign="top" bgcolor="#FFFFFF"><?php include "config.php"; $id=$_GET['id']; $tbl_name2="forum_answer"; $c_avg =("SELECT AVG(a_concept) FROM $tbl_name2 WHERE question_id='$id'"); $c_avg1 = mysql_query($c_avg) or die ("Error in query: $query1. ".mysql_error()); $query_data_c=mysql_fetch_row($c_avg1); $c_avgrows = $query_data_c[0]; if ($c_avgrows >= "6") {echo "Execution Grade: A+";} if ($c_avgrows >= "5.5" && $c_avgrows <= "5.99") {echo "Concept Grade: A";} if ($c_avgrows >= "5" && $c_avgrows <= "5.49") {echo "Concept Grade: A-";} if ($c_avgrows >= "4.5" && $c_avgrows <= "4.99") {echo "Concept Grade: B+";} if ($c_avgrows >= "4" && $c_avgrows <= "4.49") {echo "Concept Grade: B";} if ($c_avgrows >= "3.5" && $c_avgrows <= "3.99") {echo "Concept Grade: B-";} if ($c_avgrows >= "3" && $c_avgrows <= "3.49") {echo "Concept Grade: C+";} if ($c_avgrows >= "2.5" && $c_avgrows <= "2.99") {echo "Concept Grade: C";} if ($c_avgrows >= "2" && $c_avgrows <= "2.49") {echo "Concept Grade: C-";} if ($c_avgrows >= "1.5" && $c_avgrows <= "1.99") {echo "Concept Grade: D+";} if ($c_avgrows >= "1" && $c_avgrows <= "1.49") {echo "Concept Grade: D";} if ($c_avgrows >= ".5" && $c_avgrows <= ".99") {echo "Concept Grade: D-";} //echo "Concept Grade: $c_avgrows"; ?> <?php include "config.php"; $e_avg =("SELECT AVG(a_execution) FROM $tbl_name2 WHERE question_id='$id'"); $e_avg1 = mysql_query($e_avg) or die ("Error in query: $query1. ".mysql_error()); $query_data_e=mysql_fetch_row($e_avg1); $e_avgrows = $query_data_e[0]; if ($e_avgrows >= "6") {echo "Execution Grade: A+";} if ($e_avgrows >= "5.5" && $e_avgrows <= "5.99") {echo "Execution Grade: A";} if ($e_avgrows >= "5" && $e_avgrows <= "5.49") {echo "Execution Grade: A-";} if ($e_avgrows >= "4.5" && $e_avgrows <= "4.99") {echo "Execution Grade: B+";} if ($e_avgrows >= "4" && $e_avgrows <= "4.49") {echo "Execution Grade: B";} if ($e_avgrows >= "3.5" && $e_avgrows <= "3.99") {echo "Execution Grade: B-";} if ($e_avgrows >= "3" && $e_avgrows <= "3.49") {echo "Execution Grade: C+";} if ($e_avgrows >= "2.5" && $e_avgrows <= "2.99") {echo "Execution Grade: C";} if ($e_avgrows >= "2" && $e_avgrows <= "2.49") {echo "Execution Grade: C-";} if ($e_avgrows >= "1.5" && $e_avgrows <= "1.99") {echo "Execution Grade: D+";} if ($e_avgrows >= "1" && $e_avgrows <= "1.49") {echo "Execution Grade: D";} if ($e_avgrows >= ".5" && $e_avgrows <= ".99") {echo "Execution Grade: D-";} ?> </td> <td valign="top" bgcolor="#FFFFFF"><b><a href="view_topic.php?id=<? echo $rows['id']; ?>"><? echo $rows['topic']; ?></a></b><br /> <span class="style1"><? echo $rows['file_type']; ?><br /> <br /> Posted: <? echo $rows['datetime']; ?></span><br /></td> <td align="center" valign="top" bgcolor="#FFFFFF"><? echo $rows['view']; ?></td> <td align="center" valign="top" bgcolor="#FFFFFF"><? echo $rows['reply']; ?></td> </tr> <?php // Exit looping and close connection } mysql_close(); ?> <tr> <td colspan="4" align="right" bgcolor="#E6E6E6"><a href="create_topic.php"><strong>Post New Creative</strong> </a></td> </tr> </table></td> <td valign="top"><table width="150" border="1" align="right" cellpadding="5" cellspacing="0" bordercolor="#F73602"> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#F15A25"><p align="right" class="style2 style3 style1 style3">Sponsored Links</p></td> </tr> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#EAEBEB"><p align="right"><a href="/links/schools.php" target="_blank">Creative Schools</a></p> <p align="right"><a href="/links/careers.php" target="_blank">Creative Careers</a></p> <p align="right"><a href="/links/publications.php" target="_blank">Creative Publications</a></p> <p align="right"><a href="/links/professionals.php" target="_blank">Creative Professionals</a></p> <p align="right"><a href="/links/creative.php" target="_blank">General Creative Links</a></p> <p align="right"><a href="/links/photography.php" target="_blank">Photography Links</a></p> <p align="right"><a href="/links/art.php" target="_blank">Art Links</a></p> <p align="right"><a href="/links/design.php" target="_blank">Design links</a></p> <p align="right"><a href="/links/illustration.php" target="_blank">Illustration Links</a></p> <p align="right"><a href="/links/web.php" target="_blank">Web Links</a></p> <p align="right"><a href="/links/3d.php" target="_blank">3D Design Links</a></p> <p align="right"><a href="/links/id.php" target="_blank">Interior Design Links</a></p></td> </tr> </table></td> </tr> <tr> <td valign="top"><table width="150" border="1" align="right" cellpadding="5" cellspacing="0" bordercolor="#F73602"> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#F15A25"><p align="right" class="style2 style3 style1 style3">Stock Photos</p></td> </tr> <tr bordercolor="#F15A25" bgcolor="#CCCCCC"> <td bordercolor="#F15A25" bgcolor="#EAEBEB"><p align="right"> <script type="text/javascript"><!-- google_ad_client = "pub-3297649199554245"; /* 120x240 Stock Photos */ google_ad_slot = "2792032096"; google_ad_width = 120; google_ad_height = 240; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </p></td> </tr> </table></td> </tr> <tr> <td valign="top"> <script type="text/javascript"><!-- google_ad_client = "pub-3297649199554245"; /* 160x600, created 5/15/08 */ google_ad_slot = "8671586563"; google_ad_width = 150; google_ad_height = 600; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </td> </tr> </table> <p> </p> <p> </p> </div></td> </tr> </table> <p> </p> </body> </html> Link to comment https://forums.phpfreaks.com/topic/106500-creating-a-network-of-users/#findComment-546071 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.