/View/MemberProfile.php
PHP | 732 lines | 647 code | 79 blank | 6 comment | 94 complexity | 847cf1a0825cb3c57bd8b88534bc1d85 MD5 | raw file
Possible License(s): LGPL-2.1
- <?php
-
- require '../Model/Connect.php';
- require '../Control/RegisterLogic.php';
- require '../Control/LoginLogic.php';
- require '../Control/SendNotification.php';
- require '../Control/CreateClubLogic.php';
- require '../Control/DBCreate.php';
- require '../Control/ReportLogic.php';
- ob_start();
- $UserNm=$_SESSION['username'];
- $Role = $_SESSION['role'];
- if(isset($_GET['id'])) {
- $SearchName = $_GET['id'];
- $SearchID = GetSearchID($SearchName);
- $GamePrivacyStatus=GetGamePrivacy($SearchID);
- } else {
- $SearchID = $UserNm;
- }
-
- function GetSearchID($SearchName) {
- $GetID = "SELECT mp_username FROM memberprofile WHERE mp_fullname = '".$SearchName."' ";
- $ResultID = mysql_query($GetID);
- if ($ResultID) {
- $rows = mysql_num_rows($ResultID);
- while($info = mysql_fetch_assoc( $ResultID)) {
- return $info['mp_username'];
- }
- }
- }
-
- function GetGamePrivacy($SearchID) {
- $GetPrivacy="SELECT gpp_privacy FROM gameprofileprivacy WHERE gpp_usename = '".$SearchID."'";
- $ResultPrivacy= mysql_query($GetPrivacy);
- if ($ResultPrivacy) {
- $rows = mysql_num_rows($ResultPrivacy);
- while($info = mysql_fetch_assoc( $ResultPrivacy)) {
- return $info['gpp_privacy'];
- }
- }
- }
- ?>
- <!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>Online Chess Portal </title>
- <!-- CSS Files -->
- <link rel="stylesheet" href="css/preview.css" />
- <link rel="stylesheet" href="css/screen.css" />
- <link href="css/reset.css" rel="stylesheet" type="text/css" />
- <link href="css/style.css" rel="stylesheet" type="text/css" />
- <link rel="stylesheet" type="text/css" href="css/superfish.css" media="screen" />
- <link rel="stylesheet" href="css/jquery.ui.all.css">
- <link rel="stylesheet" href="css/jquery-ui-1.8.16.custom.css">
- <link rel="stylesheet" type="text/css" href="css/jquery.gritter.css" />
- <style type="text/css">
- .sf-sub-indicator {
- behavior: url(css/iepngfix.htc)
- }
- ;
- </style>
- <link rel="stylesheet" href="css/legend.css" />
-
- <style type="text/css">
- #largeImg {
- border: solid 1px #ccc;
- width: 550px;
- height: 400px;
- padding: 5px;
- }
- .thumbs img {
- border: solid 1px #ccc;
- width: 80px;
- height: 80px;
- padding: 4px;
- }
- .thumbs img:hover {
- border-color: #FF9900;
- }
- </style>
-
- <!-- End of CSS Files -->
- <!-- Javascript Files -->
- <script type="text/javascript" src=".javascript/image.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
- <script type="text/javascript" src="javascript/jquery.cycle.all.js"></script>
- <script type="text/javascript" src="javascript/superfish.js"></script>
- <script type="text/javascript" src="javascript/dd.min.js"></script>
- <script type="text/javascript" src="javascript/popup-window.js"></script>
- <script type="text/javascript" src="javascript/jquery-1.6.2.js"></script>
- <script type="text/javascript" src="javascript/jquery.form.js"></script>
- <script type="text/javascript" src="js/jquery_thumbs.js"></script>
- <script type="text/javascript" src="http://www.google.com/jsapi"></script>
- <script type="text/javascript">google.load('jquery', '1.5');</script>
- <script type="text/javascript" src="js/jquery.gritter.js"></script>
-
- <script type="text/javascript" src="javascript/jquery.ui.core.js"></script>
- <script type="text/javascript" src="javascript/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="javascript/jquery.ui.datepicker.js"></script>
-
- <script type="text/javascript">
- $(document).ready(function(){
-
- $("h2").append('<em></em>')
-
- $(".thumbs a").click(function(){
- var LargeAlt = $(this).attr("title");
- var Id = $(this).attr("id");
-
- if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
- xmlhttp=new XMLHttpRequest();
- } else {// code for IE6, IE5
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlhttp.onreadystatechange=function() {
- if (xmlhttp.readyState==4 && xmlhttp.status==200) {
- alert(xmlhttp.responseText);
- if(xmlhttp.responseText == "Success")
- alert("Your request has been sent to " +LargeAlt+". Please await confirmation.");
- else
- alert("Something unexpected happened during the process. Please try again later.");
- }
- }
- xmlhttp.open("GET","../Control/SendGameRequest.php?ID=" + Id,true);
- xmlhttp.send();
-
- return false;
- });
-
- });
-
- <!--popup-->
- var time_interval = setInterval(
- function ()
- {
- $('#popup').load('../Control/Notification.php').fadeIn("slow");
- }, 5000); // refresh every 5000 milliseconds
- </script>
- <script>
- $(function() {
- $( "#TxtFrm" ).datepicker({
- changeMonth: true,
- changeYear: true
- });
- });
-
- $(function() {
- $( "#TourTo" ).datepicker({
- changeMonth: true,
- changeYear: true
- });
- });
-
- </script>
-
-
- <!-- End of Javascript Files -->
- </head>
- <body>
- <?php
- if(!empty($SearchID)) {
- $Sql = "SELECT * FROM memberprofile where mp_username = '$SearchID'";
- } else {
- $Sql = "SELECT * FROM memberprofile where mp_username = '$UserNm'";
- }
-
- if ($Result = mysql_query($Sql)) {
- //echo $UserNm;
- $Rows = mysql_num_rows($Result);
- if ($Rows > 0) {
- while($Info = mysql_fetch_assoc( $Result )) {
- //$FulName = 'gayani';
- $FulName =$Info['mp_fullname'];
- $DOB = $Info['mp_dob'];
- $Sex = $Info['mp_sex'];
-
- if ($Sex=='f' || $Sex=='F') {
- $NSex='Female';
- }else {
- $NSex='Male';
- }
- //echo $Sex;
- //echo $NSex;
- $HomeTown = $Info['mp_hometown'];
- $CurrentCity = $Info['mp_currentcity'];
- $ReligiousView = $Info['mp_religiousview'];
- $PoliticalView = $Info['mp_politicalview'];
- $RelationshipStatus = $Info['mp_relationshipstatus'];
-
- if($RelationshipStatus=='I') {
- $Status='In a Relationship';
- } else if($RelationshipStatus=='IW') {
- $Status='In a Relationship With';
- } else if($RelationshipStatus=='M') {
- $Status='Married';
- } else if($RelationshipStatus=='MT') {
- $Status='Married to';
- } else {
- $Status='Single';
- }
-
-
- $RelationshipWith = $Info['mp_relationshipwith'];
- $MarriedTo = $Info['mp_marriedto'];
-
- if($Status=='Married to') {
- $WithStatus=$MarriedTo;
- } else {
- $WithStatus=$RelationshipWith;
- }
- $Mobile = $Info['mp_mobile'];
- $Telephone = $Info['mp_telephone'];
- $Email = $Info['mp_email'];
- $Fax = $Info['mp_fax'];
- $Employer = $Info['mp_employer'];
- $EFrom = $Info['mp_from'];
- $GradSchool = $Info['mp_gradschool'];
- $College = $Info['mp_college'];
- $HighSchool = $Info['mp_highschool'];
- $HighClass = $Info['mp_highclassof'];
- $CollegeClass = $Info['mp_collegeclassof'];
- $Imagename=$Info['mp_imagename'];
- }
- } else if ($Rows == 0) {
- echo '<script language="javascript">if(confirm("Details are not set yet.Do you prefer to fill the details now?")) {
- window.location = "GuestProfile.php";
- } else {
- window.location = "Home_Login.php";
- }</script>';
- //echo '<script type="text/javascript"> window.location = "GuestProfile.php"</script>';
- }
- }
-
- ?>
-
-
- <!-- Wrapper -->
- <div id="wrapper">
- <div id="topbar">
- <div id="topbar"> <img src="images/icon1.png" alt="logo" width="42" height="41" class="logo" id='test' /><img src="images/logo.gif" alt="logo" width="322" height="41" class="logo1" id='test' />
-
- <div id="secnav">
- <ul>
- <li class="noimg"> <a href="../Control/LogoutLogic.php?Reason=Normal">SIGN OUT</a> </li>
- </ul>
- </div>
-
- <div class="menu">
- <ul class="sf-menu">
-
-
- <li> <?php if($_SESSION['role'] == 'SiteAdmin') {
- ?> <a href="SiteAdminProfile.php">
- <?php } else { ?>
- <a href="MemberProfile.php">
- <?php }
- $result = mysql_query("SELECT mp_fullname FROM memberprofile WHERE mp_username='".$_SESSION['username']."' ");
- $row = mysql_fetch_array($result);
- $Rows = mysql_num_rows($result);
- if($_SESSION['role'] == 'SiteAdmin' || $Rows == 0) {
- echo 'Profile';
- } else {
- echo $row['mp_fullname'];
- }?></a>
- </li>
-
-
- </ul>
-
- </div> </div><!-- menu end-->
-
- <div id="content" >
- <div class="froms">
- <form id="formMain" action="" method="post">
- <table border="0" width="100%">
- <tr>
- <td colspan="5"><div id="apDiv1" style="background-image:url(images/mymembrprof1.jpg);width:100%;height:150px;text-align:justify">
- <div align="center">
- <h5><font size="25" color="#000000">
- <?php if($SearchID==$UserNm) {
- $result = mysql_query ("SELECT `mp_fullname` FROM `memberprofile` WHERE `mp_username`= '".$_SESSION['username']."' ");
- $row = mysql_fetch_array($result);
- echo $row ['mp_fullname'];
- } else {
- echo $SearchName;
- }?>
- </font><img src="UserImages/<?php echo $Imagename ?>" alt="" name="image1" width="150px" height="150px" id="image1" align="right"/></h5>
- </div>
- </div></td>
- </tr>
- <tr>
- <td colspan="5"><label class="content"><strong>
- <h1>Basic Details</h1>
- <hr/></strong></label></td>
- </tr>
- <tr>
- <td width=10%></td>
- <td width=15%><label class="content" >Full Name</label></td>
- <td height="20" colspan="3"><label class="content"><font size="-2" color="#000099"><?php echo $FulName ?></font></label></td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Date of Birth</label></td>
- <td width="60" height="20"><label class="content"><font size="-2" color="#000099"><?php echo $DOB ?></font></label></td>
- <td width="93"> </td>
- <td width="69"> </td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Sex</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $NSex ?></font></label></td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Home Town</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $HomeTown ?></font></label></td>
- <td class="content">Current City
- <td ><label class="content"><font size="-2" color="#000099"><?php echo $CurrentCity ?></font></label></td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Religious View</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $ReligiousView ?></font></label></td>
- <td><label class="content">Political View</label></td>
- <td><label class="content"><font size="-2" color="#000099"><?php echo $PoliticalView ?></font></label></td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Relationship Status</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $Status ?></font></label></td>
- <td colspan="2"><label class="content"><font size="-2" color="#000099"><?php echo $WithStatus ?></font></label></td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="5"><label class="content"><strong>
- <h1>Contact Details</h1>
- <hr/></strong></label></td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Mobile</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $Mobile ?></font></label></td>
- <td><label class="content">Telephone</label></td>
- <td><label class="content"><font size="-2" color="#000099"><?php echo $Telephone ?></font></label></td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">E-mail</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $Email ?></font></label></td>
- <td><label class="content">Fax</label></td>
- <td><label class="content"><font size="-2" color="#000099"><?php echo $Fax ?></font></label></td>
- </tr>
- <tr>
- <td></td>
- <td><label class="content">Facebook address</label></td>
- <td height="20"><label class="content" id="lblFacebookAddress"></label></td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td colspan="5"><label class="content"><strong>
- <h1>Work & Education</h1>
- <hr/></strong></label></td>
- </tr>
- <tr>
- <td> </td>
- <td><label class="content">Employer</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $Employer ?></font></label></td>
- <td><label class="content">From</label></td>
- <td><label class="content"><font size="-2" color="#000099"><?php echo $EFrom ?></font></label></td>
- </tr>
- <tr>
- <td> </td>
- <td><label class="content">Grad School</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $GradSchool ?></font></label></td>
- <td> </td>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td><label class="content">College</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $College ?></font></label></td>
- <td><label class="content">Class of</label></td>
- <td><label class="content"><font size="-2" color="#000099"><?php echo $CollegeClass ?></font></label></td>
- </tr>
- <tr>
- <td> </td>
- <td><label class="content">High Scool</label></td>
- <td height="20"><label class="content"><font size="-2" color="#000099"><?php echo $HighSchool ?></font></label></td>
- <td><label class="content">Class of</label></td>
- <td><label class="content"><font size="-2" color="#000099"><?php echo $HighClass ?></font></label></td>
- </tr>
- <tr>
- <td colspan="5">
- <?php if($SearchID==$UserNm) {?>
- <a href="MemberProfileEdit.php" class="Buttonview">Edit My Profile</a>
- <?php } ?>
-
- <?php if(($SearchID!=$UserNm && $GamePrivacyStatus=='Pub')) {?>
- <a href="GameProfile.php?id=<?php echo $SearchName ?>" class="Buttonview">Game Profile</a>
- <?php } else { ?>
- <a href="GameProfile.php" class="Buttonview">Game Profile</a>
- <?php } ?>
-
- </td>
- </tr>
- <tr>
- <td colspan="5"> </td>
- </tr>
- </table>
- </form>
-
- </div>
-
- </div>
-
- <div id="sidebar">
-
- <li>
- <!--------------------------------------------------------------->
- <h2>Tournaments </h2>
- <ul>
- <?php if($Role == 'ClubAdmin') { ?>
- <!-- <li class="noimg"> <a href="CreateTourna.php" >Create Tournaments</a> </li>-->
- <li class="noimg"> <a class="content" href="#" onclick="popup_show('popup_createTournament', 'popup_drag1', 'popup_exit1', 'screen-center', 0, 0);">Create New Tour</a> </li>
- <?php } ?>
-
- </ul>
- </li>
-
- <li>
- <!--------------------------------------------------------------->
- <h2>Recent Tournaments <img src="images/DropDownButton.png"/ align="right" class="show_hide10" longdesc="#"></h2>
- <div class="slidingDiv10">
- <ul>
- <?php
- $sql=" SELECT to_tournamentname,to_id,to_creator FROM tournament";
- $result =mysql_query($sql);
- while ($data=mysql_fetch_assoc($result)){
- ?>
- <li> <a class="content" href="ViewTourna.php?TourID=<?php echo $data['to_id'] ?>&Creator=<?php echo $data['to_creator'] ?> "><?php echo $data['to_tournamentname']?></a></li>
- <?php } ?>
-
-
- </ul>
- <?php if($SearchID != $UserNm && $SearchID != 'kungfu@panda.com') { ?>
- <li class="content">
- <!--------------------------------------------------------------->
- <h2>Actions</h2>
- <ul>
- <li class="noimg"> <a href="#" class="content" onclick="popup_show('popup_report', 'popup_drag', 'popup_exit', 'screen-center', 0, 0);">Report this Person</a> </li>
- </ul>
- </li>
- <?php } ?>
- </div>
- </li>
-
-
- </div>
-
-
-
- <!-- topbar-->
- <!-- new code-->
- <layer>
- <ul id="navigation">
- <li class="home"><a href="Home_Login.php" title="Home"></a></li>
- <li class="play"><a href="Play.php" title="Play Chess"></a></li>
- <li class="ChessBoard"><a href="TraningGames.php" title="Traning Chess Game"></a></li>
- <li class="photos"><a href="Inbox.php" title="Inbox"></a></li>
- <li class="club"><a href="SearchClub.php" title="Clubs"></a></li>
- <li class="settings"><a href="Settings.php" title="Settings"></a></li>
-
- </ul>
-
- </layer>
-
- <script type="text/javascript">
- $(function() {
- $('#navigation a').stop().animate({'marginLeft':'-90px'},100);
-
- $('#navigation > li').hover(
- function () {
- $('a',$(this)).stop().animate({'marginLeft':'-70px'},100);
- },
- function () {
- $('a',$(this)).stop().animate({'marginLeft':'-90px'},100);
- }
- );
- });
- </script>
- <!--new code end -->
- <div class="clear"></div>
- <div id="footers">
-
-
- <div style="float:right"><div class="fotterlast">
- <a href="#" title="About Us">About Us</a>
- |
- <a href="#" title="Terms of Service">Terms of Service</a>
- |
- <a href="#" title="Privacy Statement">Privacy</a>
- |
- <a href="Contact.php" title="Contac Us">Contact Us</a>
- </div></div>
-
- <div style="float:Left"><div class="fotterlastdesing">Design by SEP_WE_05 Team.</div></div>
-
- </div>
-
- </div></div>
-
- <!-- ***** Popup Window **************************************************** -->
- <!--play-->
-
- <div class="sample_popup" id="popup_play" style="display: none;">
-
- <div class="menu_form_header" id="popup_drag_play">
- <img class="menu_form_exit" id="popup_exit_play" src="images/form_exit.png" alt="exit" />
- Choose Opponent
- </div>
-
- <div class="menu_form_body">
- <p class="content"> Select the user you want to play with </p>
- <table width="110%">
- <div id="thumbs">
- <p class="thumbs" method ="GET"><?php $etc = SelectOnlineMembers($_SESSION['username']); echo $etc ?></p>
- </div></br>
- <!--<tr><th></th><td><input class="Buttonview" align="center" type="submit" value="Done" /></td></tr>-->
- <input type = "hidden" name = "step" value = "2"/>
- </table>
- </div> </div>
-
- <!--Report-->
- <div class="sample_popup" id="popup_report" style="display: none;">
-
- <div class="menu_form_header" id="popup_drag">
- <img class="menu_form_exit" id="popup_exit" src="images/form_exit.png" alt="exit" />
- Report
- </div>
-
- <div class="menu_form_body">
- <form action="" method="post">
- <p class="content"> Please select the reason why you want to report this member </p>
- <table width="110%" class="content">
- <tr><input type="radio" name="reason" value="Reason1" class="content" /><label class="content">This person is annoying me</label></tr><br />
- <tr><input type="radio" name="reason" value="Reason2" /><label class="content">Reason 2</label> </tr><br />
- <tr><input type="radio" name="reason" value="Reason3" /><label class="content">Reason 3 </label></tr><br />
- <tr><input type="radio" name="reason" value="Reason4" /><label class="content">Reason 4</label> </tr><br />
- <input type="hidden" name="step" value="1" />
- <tr>
- <input class="Buttonview" type="submit" value="Report" name="Report" /></tr>
- </table>
- </form>
- </div> </div>
-
-
-
- <div class="sample_popup" id="popup_createTournament" style="display: none;">
-
- <div class="menu_form_header" id="popup_drag1">
- <img class="menu_form_exit" id="popup_exit1" src="images/form_exit.png" alt="exit" />
- Create New Private Tournament
- </div>
-
- <div class="menu_form_body">
- <form action="" method="post">
- <div> </div>
- <table>
- <tr>
- <td><div align="left"><font color="#000000" class="content">Tournament Name </font></td>
- <td><input type="text" name="TourName" /></div></td>
- </tr>
- <tr>
- <td><div align="left"><font color="#000000" class="content">From </font></td>
- <td><input type="text" name="TxtFrm" id="TxtFrm"/></div></td>
- </tr>
- <tr>
- <td><div align="left"><font color="#000000" class="content">To </font></td>
- <td><input type="text" name="TourTo" id="TourTo"/></div></td>
- </tr>
- <tr>
- <td><div align="left"><font color="#000000" class="content">Tournament Type </font></td>
- <td><select name="TourType" id="TourType">
- <option>-- Select --</option>
- <option>Open</option>
- <option>Private</option>
- </select></div></td>
- </tr>
- <tr>
- <td><div align="left"><font color="#000000" class="content">Max Paticipants </font></td>
- <td><input type="text" name="TourMax" /></div></td>
- </tr>
- </table>
- <div > </div>
-
- <div align="left"></div>
- <div align="center"></div>
- <div >
- <div align="right">
- <label>
- <input type="submit" name="Submit" value="Create" class="Buttonview" />
- <input type="hidden" name="step" value="2"/>
- </label>
-
- </div>
- </div>
- </form>
- </form>
- </div> </div>
- </body>
- </html>
-
- <?php
- if(LoggedIn ()) {
- if(isset($_POST['Report']) || isset($_POST['Submit'])) {
- if(isset($_POST['step'])) {
- if($_POST['step'] == 2) {
- if(isset($_POST['TourName']) && isset($_POST['TxtFrm']) && isset($_POST['TourTo']) && isset($_POST['TourType']) && isset($_POST['TourMax'])) {
- if(isset($_POST['Submit'])) {
- $Name=$_POST['TourName'];
- $Frm=$_POST['TxtFrm'];
- $To=$_POST['TourTo'];
- $GameType=$_POST['TourType'];
- $MaxParticipants=$_POST['TourMax'];
- $Creator=$UserNm;
- $NewFrm = strtotime( $Frm );
- $MyDateFrm = date( 'y-m-d', $NewFrm );
- $NewTo=strtotime($To);
- $MyDateTo=date('y-m-d',$NewTo);
-
- if($MyDateFrm==''){
- echo '<script language="javascript">alert("vghjkko")</script>';
- }
- if(InsertTournament($Name,$MyDateFrm,$MyDateTo,$Creator,$MaxParticipants,$GameType)) {
- echo '<script language="javascript">alert("Tournament creation successful")</script>';
- } else {
- echo '<script language="javascript">alert("Tournament creation unsuccessful")</script>';
- }
- echo '<script type="text/javascript"> window.location = "MemberProfile.php"</script>';
- mysql_close();
- }
- } else {
- echo '<script language="javascript">alert("All fields are required to be filled")</script>';
- }
- } else if($_POST['step'] == 1){
- $User = $_SESSION['username'] ;
- $Reason = 'unchecked';
- $About = $_POST['ID'];
-
- if (isset($_POST['Report'])) {
- $SelectedReason = $_POST['reason'];
- if ($SelectedReason == 'Reason1') {
- $Reason = 'This person is annoying me';
- } else if ($SelectedReason == 'Reason2') {
- $Reason = 'Reason2';
- } else if ($SelectedReason == 'Reason3') {
- $Reason = 'Reason3';
- } else if ($SelectedReason == 'Reason4') {
- $Reason = 'Reason4';
- } else {
- echo '<script language="javascript">alert("You must provide a valid reason selected")</script>';
- echo '<script type="text/javascript"> window.location = "MemberProfile.php"</script>';
- }
- if (ReportPerson($User,$About,$Reason)) {
- echo '<script language="javascript">alert("Reporting was successful")</script>';
- echo '<script type="text/javascript"> window.location = "MemberProfile.php"</script>';
-
- } else {
- echo '<script language="javascript">alert("You have already reported this person on this issue")</script>';
- echo '<script type="text/javascript"> window.location = "MemberProfile.php"</script>';
- }
- } else {
- echo '<script language="javascript">alert("You are not logged in")</script>';
- echo '<script type="text/javascript"> window.location = "MemberProfile.php"</script>';
- }
- }
- }
- }}
- function GetClubId($ClubName)
- {
- $sql = "SELECT cl_id FROM Club WHERE cl_name = '".$ClubName."'";
- $Result = mysql_query($sql);
- if ($Result) {
- $rows = mysql_num_rows($Result);
- while($info = mysql_fetch_assoc( $Result )) {
- $ID = $info['cl_id'];
- }
- return $ID;
- } else {
- return false;
- }
- }
-
- function SelectOnlineMembers($Username) {
- $QueryOnlineUsers = "SELECT * FROM `User`,`MemberProfile` WHERE `us_status` = 'LoggedIn' AND mp_username = us_username AND us_role != 'SiteAdmin' AND us_username != '".$Username."'";
- if ($QueryOnlineUsersRun = mysql_query($QueryOnlineUsers)) {
- $QueryNumRows = mysql_num_rows ($QueryOnlineUsersRun);
- if($QueryNumRows == 0) {
- return false;
- } else {
- $Code ="";
- while($info = mysql_fetch_assoc( $QueryOnlineUsersRun )) {
- $ImageID = $info['us_username'];
- $ImageTitle = $info['mp_fullname'];
- $ImageSource = $info['mp_imagename'];
- $Text = '<a id ="'.$ImageID.'" href="#" title="'.$ImageTitle.'"><img src="UserImages/'.$ImageSource.'" /></a>';
- $Code .= $Text;
- }
- return ($Code);
- }
- }
- }
-
- ?>
-