Files
auth-site/html/index.php
T
Bandit42 42523a2e05 v2.03 UPDATE HTML (#4)
* Add files via upload

v2.02 UPDATE: 10/30/2019

1.) Added folder "swgsourceclient" for VM owner to add his configured client in zip format to allow others to download the client.

2.) Modified "addnewuser.php" file to include a download link and file location for client download in compressed file format

    Bandit

* typo

* closing tag

* HTML fixes

-Put the download link within the document body.
-Remove the closing br tag, which isn't a thing. It's a self closing tag.

* v2.03 HTML Update

v2.03 UPDATE: 11/15/19

1.) Cleaned up some misplaced HTML code that was out of sync on index.php

	a.) Removed broken links to webpages that no longer exist but I did keep the names of those sites on the left column of index.php
	
	b.) Reactivated intro music but added "muted" to line of code so you can't hear the music play on index.php
	
	c.) Removed code and background for "Star Wars" background pic and added new code and background pic on index.php

2.) Removed code and background for "Vader Lightsaber" background pic and added new code and background pic on addnewuser.php

	a.) Removed link to download SWG Source Client to give the server owner an option to point to a link to download file or host file within VM

* Fix HTML errors

+ BR is a self closing tag. There is no such thing as </br>
+ There shouldn't be any content outside of </body>
+ <center> needs to be closed

* Just trying to close all open tags

* It seems both should be centered
2019-11-27 11:34:32 -05:00

181 lines
5.0 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>SWG Source Server Main Page</title>
<link rel="stylesheet" type="text/css"href="stylesheet.css">
<meta name="viewport" content="width=device-width">
<meta name="viewport" content="initial-scale=1">
<script type="text/javascript" language="JavaScript">
<!--
function BothFieldsIdenticalCaseSensitive() {
var one = document.NewUser.realpassword.value;
var another = document.NewUser.confirmpassword.value;
if(one == another) { return true; }
alert("Password fields must be the same.");
return false;
}
//-->
</script>
<style>
div.container {
width: 90%;
border: none;
}
header, footer {
padding: 1em;
color: white;
background-color: none;
clear: left;
text-align: center;
}
nav {
float: left;
max-width: 160px;
margin: 0;
padding: 1em;
}
nav ul {
list-style-type: none;
padding: 0;
}
nav ul a {
text-decoration: none;
}
article {
margin-left: 170px;
border-left: none;
padding: 1em;
overflow: hidden;
}
body {
background-color: black;
background-image: url("/images/stormtrooper.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
background-size: cover;
}
a:link {
color: green;
background-color: transparent;
text-decoration: none;
}
a:visited {
color: orange;
background-color: transparent;
text-decoration: none;
}
a:hover {
color: red;
background-color: transparent;
text-decoration: underline;
}
a:active {
color: yellow;
background-color: transparent;
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<header>
<nav>
<ul>
<li><b><a href="/index.php">Home</a></b></li>
<li><b><a href="/forums/index.php">Forums</a></b></li><br>
<p><b><u>Useful Links</u></b></p>
<li><b><a href="http://www.swgsource.com">SWG Source</a></b></li>
<li><b><a href="https://discordapp.com/channels/366560008068005892/366560008608940035">SWG Source Discord Server</a></b></li>
<li><b><a href="#">Stella Bellum</a></b></li>
<li><b><a href="http://www.swgpets.com">SWG Pets</a></b></li>
<li><b><a href="http://www.swgcraft.co.uk">SWG Craft</a></b></li>
<li><b><a href="http://www.galaxyharvester.net">Galaxy Harvester</a></b></li>
<li><b><a href="http://www.swgjunkyard.com">SWG Junkyard</a></b></li>
<li><b><a href="http://www.swgtools.com">SWG Tools</a></b></li>
<li><b><a href="#">SWG City Planner</a></b></li>
<li><b><a href="#">SWG Activeframe</a></b></li>
</ul>
</nav>
<audio muted autoplay id="myaudio">
<source src="/music/Star Wars Main Theme.mp3">
</audio>
<script>
var audio = document.getElementById("myaudio");
audio.volume = 0.3;
</script>
<center><h1><b>WELCOME</b></h1>
<p><b>to</b></p>
<p><b>SWG Source Server v2.2</b></p>
<p><b>This is the Login frontend for your NGE server</b></p>
<p><b>Click below to Create a New Account</b></p>
<p><b><a href="/addnewuser.php"><u>Register an Account</u></a></b></p></center>
</header>
<article>
<p></p>
<p></p>
<p></p>
</article>
<h1><b><font color='#FFFFFF'><u>Server Status</u></font></b></h1>
<div class="status">
<div>
<table>
<?php
$server = "127.0.0.1";
$portg = "44463";
$portl = "44453";
$timeout = "5";
$portm = "3306";
$mysql = @fsockopen("$server", $portm, $errno, $errstr, $timeout);
$game = @fsockopen("$server", $portg, $errno, $errstr, $timeout);
$login = @fsockopen("$server", $portl, $errno, $errstr, $timeout);
echo "<p><center><strong><font color='#FFFFFF'>Login Server: </font></strong>";
echo $login ? "<font color=\"green\">Online</font>" : "<font color=\"red\">Offline</font></p></center>";
echo "<p><center><strong><font color='#FFFFFF'>Game Server: </font></strong>";
echo $game ? "<font color=\"green\">Online</font>" : "<font color=\"red\">Offline</font></p></center>";
?>
</table>
</div>
</div>
<center>
<?php
//first you need to define db info
define('mySQL_hostname', '127.0.0.1'); //database IP
define('mySQL_database', 'swgusers'); //database name
define('mySQL_username', 'root'); //database user
define('mySQL_password', 'swg'); //database password
//connects to mysql
$db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password )
or die( 'Error connecting to mysql<br><br>'.mysql_error() );
//connects to Database
$db_select = mysql_select_db( mySQL_database, $db_link )
or die( 'Error connecting to Database<br><br>'.mysql_error() );
//selects desired table
$chars= mysql_query("SELECT `online` FROM `characters` where `online`=1");
//tells how much rows are there (will come helpfull with while loops)
$rows = mysql_num_rows($chars);
echo "<p><strong><font color='#FFFFFF'> Online Players:</font></strong></p><em>".$rows."<em>"; //prints out the $x number of players online
?>
</center>
</div>
</body>
</html>