-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUsersProfileView.php
executable file
·86 lines (79 loc) · 3.92 KB
/
UsersProfileView.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
require_once("OralHistoryDataConn.php");
require_once("LookupFunctions.php");
require_once("settings.php");
$ny = array("No", "Yes");
if (isset($_GET['U'])) { $UserId=$_GET['U']; }
$Title = 'Users Table:';
if ($UserId!="") { $where = " WHERE UserId = '$UserId'"; }
$bareQuery = "SELECT * FROM users ";
$querysearch = $bareQuery.$where;
$resultsearch = mysqli_query($conn, $querysearch);
$numbersearch = mysqli_num_rows($resultsearch);
if ($numbersearch==0) :
$o = "<h3>User Record Not Found!</h3>\n";
$o .= "<a class=b1 href='#' onClick='clearDiv(\"recordView\");>Close</a> \n";
$o .= "<a class=b1 href='#' onClick='showRegistration(0);'>Register!</a>\n";
elseif ($numbersearch>0) :
// Retreive data and put it in local variables...
$row = mysqli_fetch_array($resultsearch, MYSQLI_ASSOC);
$UserId=$row['UserId'];
$UserName=$row['UserName'];
$UserAddress=$row['UserAddress'];
$UserPhone=$row['UserPhone'];
$UserMobilePhone=$row['UserMobilePhone'];
$UserFax=$row['UserFax'];
$UserEmail=$row['UserEmail'];
$UserURL=$row['UserURL'];
$UserPwReminder=$row['UserPwReminder'];
$CountryID=$row['CountryID'];
$IsAdmin=$row['IsAdmin'];
$CanUpload=$row['CanUpload'];
$AnnotatesOwn=$row['AnnotatesOwn'];
$AnnotatesAll=$row['AnnotatesAll'];
$CanDownload=$row['CanDownload'];
$CanAdd=$row['CanAdd'];
$CanModify=$row['CanModify'];
$EnteredBy=$row['EnteredBy'];
$DateEntered=$row['DateEntered'];
// Format the output table...
$o .= "<div class=centered>\n";
$o .= " <table class='rv' style='width: 100%; font-size: 8.25pt;'>\n";
$o .= " <tr class=row1>\n";
$o .= " <td colspan=6 class=colname>$UserName's Profile:</td>\n";
$o .= " </tr>\n";
$o .= " <tr class=row1>\n";
$o .= " <td class=fldname style='width: 200px'>Name:</td>\n";
$o .= " <td class=data>$UserName </td>\n";
$o .= " <td class=fldname style='width: 200px'>Address:</td>\n";
$o .= " <td class=data>$UserAddress </td>\n";
$o .= " <td class=fldname style='width: 200px'>Country:</td>\n";
$o .= " <td class=data>" . FetchLookup("Name", "countries", "CountryID", $CountryID) . " </td>\n";
$o .= " </tr>\n";
$o .= " <tr class=row1>\n";
$o .= " <td class=fldname style='width: 200px'>Phone:</td>\n";
$o .= " <td class=data>$UserPhone </td>\n";
$o .= " <td class=fldname style='width: 200px'>Mobile:</td>\n";
$o .= " <td class=data>$UserMobilePhone </td>\n";
$o .= " <td class=fldname style='width: 200px'>Fax:</td>\n";
$o .= " <td class=data>$UserFax </td>\n";
$o .= " </tr>\n";
$o .= " <tr class=row1>\n";
$o .= " <td class=fldname style='width: 200px'>E-mail:</td>\n";
$o .= " <td class=data>$UserEmail </td>\n";
$o .= " <td class=fldname style='width: 200px'>URL:</td>\n";
$o .= " <td class=data>$UserURL </td>\n";
$o .= " <td class=fldname style='width: 200px'>PW Prompt:</td>\n";
$o .= " <td class=data>$UserPwReminder </td>\n";
$o .= " </tr>\n";
$o .= " </table><br> \n";
$o .= " <a class=b1 href='#' onClick='clearDiv(\"recordView\");'>Close</a> \n";
$o .= " <a class=b1 style='text-decoration: none' href='#' onClick='showRegistration($UserId);'>Edit Your Profile</a> \n";
$o .= " <a class=b4 style='text-decoration: none' href='#' onClick='showPWReset($UserId);'>Reset Your Password</a> \n";
// $o .= " <a class=b2 style='text-decoration: none' href='#' onClick='showUserProfile($UserId);'>Reload Profile</a> \n";
$o .= " <hr>";
$o .= "</div>\n";
endif;
echo $o;
$o = "";
?>