- Changes to user account viewing screen
- Links properly redirect (assuming they've been set properly)
This commit is contained in:
parent
491c34cc93
commit
872cd022ad
@ -195,7 +195,7 @@ session_start();
|
|||||||
</div>
|
</div>
|
||||||
<div class="dateSelector">
|
<div class="dateSelector">
|
||||||
<select size="1" name="month" id="month" onchange="refreshDisplay()">
|
<select size="1" name="month" id="month" onchange="refreshDisplay()">
|
||||||
<option value="all">All</option>
|
<option value="all">All</option> <!-- all option -->
|
||||||
<?php
|
<?php
|
||||||
// Automatically write the months using a script
|
// Automatically write the months using a script
|
||||||
// Also automatically selects the current month
|
// Also automatically selects the current month
|
||||||
@ -211,7 +211,7 @@ session_start();
|
|||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<select size="1" name="year" id="year" onchange="refreshDisplay()">
|
<select size="1" name="year" id="year" onchange="refreshDisplay()">
|
||||||
<option value="all">All</option>
|
<option value="all">All</option> <!-- all option -->
|
||||||
<?php
|
<?php
|
||||||
// This uses the years we grabbed earlier and ensures we're only showing
|
// This uses the years we grabbed earlier and ensures we're only showing
|
||||||
// the years we have entries for
|
// the years we have entries for
|
||||||
|
@ -22,4 +22,21 @@ function verifyPageInFrame() {
|
|||||||
} else {
|
} else {
|
||||||
window.location = mainURL;
|
window.location = mainURL;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function redirect(location, address) {
|
||||||
|
|
||||||
|
switch (location) {
|
||||||
|
case "twitch":
|
||||||
|
var link = "https://twitch.tv/" + address;
|
||||||
|
break;
|
||||||
|
case "discord":
|
||||||
|
var link = "https://discordapp.com/users/" + address;
|
||||||
|
break;
|
||||||
|
case "youtube":
|
||||||
|
var link = address;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.open(link).focus();
|
||||||
}
|
}
|
@ -1,3 +1,5 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
#generalBody {
|
#generalBody {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -17,7 +19,6 @@
|
|||||||
padding-bottom: 15px;
|
padding-bottom: 15px;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
/*box-shadow: 0px 5px 10px;*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#informationContentPanel h4,h5 {
|
#informationContentPanel h4,h5 {
|
||||||
@ -83,4 +84,6 @@
|
|||||||
|
|
||||||
.divTableRightColumn {
|
.divTableRightColumn {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
@ -85,6 +85,7 @@
|
|||||||
|
|
||||||
#editUserDetails input[type="text"] {
|
#editUserDetails input[type="text"] {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#editUserDetails input[type="text"]::placeholder {
|
#editUserDetails input[type="text"]::placeholder {
|
||||||
@ -262,3 +263,11 @@
|
|||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.accountDetailsRightSide a {
|
||||||
|
text-decoration: none;
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.accountDetailsRightSide a:hover {
|
||||||
|
color: rgb(30, 90, 255);;
|
||||||
|
}
|
@ -61,6 +61,7 @@ try { // Try opening the SQL database connection
|
|||||||
<link rel="stylesheet" href="/styles/data.css" />
|
<link rel="stylesheet" href="/styles/data.css" />
|
||||||
<link rel="stylesheet" href="/styles/user_management.css" />
|
<link rel="stylesheet" href="/styles/user_management.css" />
|
||||||
<link rel="stylesheet" href="/styles/db_management.css" />
|
<link rel="stylesheet" href="/styles/db_management.css" />
|
||||||
|
<script src="/scripts/tools.js"></script>
|
||||||
<title>User Account Management</title>
|
<title>User Account Management</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
@ -72,7 +73,7 @@ try { // Try opening the SQL database connection
|
|||||||
<p class="detailsBold">Username:</p>
|
<p class="detailsBold">Username:</p>
|
||||||
<p class="detailsBold">Date Joined:</p>
|
<p class="detailsBold">Date Joined:</p>
|
||||||
<p class="detailsBold">Total trophies:</p>
|
<p class="detailsBold">Total trophies:</p>
|
||||||
<p> By division:</p>
|
<p> By division</p>
|
||||||
<p> Open:</p>
|
<p> Open:</p>
|
||||||
<p> Intermediate:</p>
|
<p> Intermediate:</p>
|
||||||
<p> Main:</p>
|
<p> Main:</p>
|
||||||
@ -100,9 +101,9 @@ try { // Try opening the SQL database connection
|
|||||||
<p>YouTube (name):</p>
|
<p>YouTube (name):</p>
|
||||||
<p>YouTube (link):</p>
|
<p>YouTube (link):</p>
|
||||||
<p>Discord (name):</p>
|
<p>Discord (name):</p>
|
||||||
<p>Discord (link):</p>
|
<p>Discord (UserID):</p>
|
||||||
<p> </p>
|
<p> </p>
|
||||||
<p><a href=\"/admin/user_management/change_password.php\" id=\"changePasswordButton\" class=\"disabled\">Change Password</a></p>
|
<p><a href=\"/admin/user_management/change_password.php\" id=\"changePasswordButton\" style=\"text-align:center;\" class=\"disabled\">Change Password</a></p>
|
||||||
<p>(coming soon!)</p>
|
<p>(coming soon!)</p>
|
||||||
</div>
|
</div>
|
||||||
<div class=\"accountDetailsRightSide\">
|
<div class=\"accountDetailsRightSide\">
|
||||||
@ -138,14 +139,14 @@ try { // Try opening the SQL database connection
|
|||||||
<div class=\"accountDetailsRightSide\">
|
<div class=\"accountDetailsRightSide\">
|
||||||
");
|
");
|
||||||
if (isset($userDetails["twitch"]) && $userDetails["twitch"] != "") {
|
if (isset($userDetails["twitch"]) && $userDetails["twitch"] != "") {
|
||||||
echo ("<p><a href=\"https://twitch.tv/\"" . $userDetails["twitch"] . "> " . $userDetails["twitch"] . "</a></p>");
|
echo ("<p><a href=\"#\" id=\"twitchURL\" onclick=\"redirect('twitch', '" . $userDetails["twitch"] . "')\">" . $userDetails["twitch"] . "</a></p>");
|
||||||
} else {
|
} else {
|
||||||
echo ("<p>none</p>");
|
echo ("<p>none</p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($userDetails["youtube"]) && $userDetails["youtube"] != "") {
|
if (isset($userDetails["youtube"]) && $userDetails["youtube"] != "") {
|
||||||
if (isset($userDetails["youtubeLink"]) && $userDetails["youtubeLink"] != "") {
|
if (isset($userDetails["youtubeLink"]) && $userDetails["youtubeLink"] != "") {
|
||||||
echo ("<p><a href=" . $userDetails["youtubeLink"] . "> " . $userDetails["youtube"] . "</a></p>");
|
echo ("<p><a href=\"#\" id=\"youtubeURL\" onclick=\"redirect('youtube', '" . $userDetails["youtubeLink"] . "')\">" . $userDetails["youtube"] . "</a></p>");
|
||||||
} else {
|
} else {
|
||||||
echo ("<p>" . $userDetails["youtube"] . "</a></p>");
|
echo ("<p>" . $userDetails["youtube"] . "</a></p>");
|
||||||
}
|
}
|
||||||
@ -155,7 +156,7 @@ try { // Try opening the SQL database connection
|
|||||||
|
|
||||||
if (isset($userDetails["discord"]) && $userDetails["discord"] != "") {
|
if (isset($userDetails["discord"]) && $userDetails["discord"] != "") {
|
||||||
if (isset($userDetails["discordLink"]) && $userDetails["discordLink"] != "") {
|
if (isset($userDetails["discordLink"]) && $userDetails["discordLink"] != "") {
|
||||||
echo ("<p><a href=" . $userDetails["discordLink"] . "> " . $userDetails["discord"] . "</a></p>");
|
echo ("<a href=\"#\" id=\"discordURL\" onclick=\"redirect('discord', '" . $userDetails["discordLink"] . "')\"> " . $userDetails["discord"] . "</a></p>");
|
||||||
} else {
|
} else {
|
||||||
echo ("<p>" . $userDetails["discord"] . "</a></p>");
|
echo ("<p>" . $userDetails["discord"] . "</a></p>");
|
||||||
}
|
}
|
||||||
|
@ -65,8 +65,17 @@ try { // Try opening the SQL database connection
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<a href="../" class="subNavLink" id="mainHomeButton">HOME</a>
|
<a href="../" class="subNavLink" id="mainHomeButton">HOME</a>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// If we're showing someone other than who's logged in, offer a link to their own page
|
||||||
|
if (isset($_SESSION["userID"]) && $_SESSION["username"] != $_GET["username"]){
|
||||||
|
echo "<a href=\"/user/" . $_SESSION["username"] . " \" class=\"subNavLink\">MY ACCOUNT</a>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
<p class="newLine"></p>
|
<p class="newLine"></p>
|
||||||
<?php
|
<?php
|
||||||
|
// If someone is logged in, give them the opportunity to log out
|
||||||
if (isset($_SESSION["userID"])){
|
if (isset($_SESSION["userID"])){
|
||||||
echo "<a href=\"../logout.php?redirect=\" class=\"subNavLink\" id=\"loginButton\">LOGOUT</a>";
|
echo "<a href=\"../logout.php?redirect=\" class=\"subNavLink\" id=\"loginButton\">LOGOUT</a>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user