-
+
diff --git a/index.php b/index.php
index 2c42721..86c7fb6 100644
--- a/index.php
+++ b/index.php
@@ -63,6 +63,7 @@ $username = $_SESSION['svmm-user'];
-->LogoutLoginRegisterAbout
@@ -82,12 +83,6 @@ if(isset($_GET['forms']))
else if($forms=="login") {
loginForm();
}
- else if($forms=="friendreq") {
- friendReqForm();
- }
- else if($forms=="changepass") {
- changePassForm();
- }
else { echo "ERROR: Unknown form-name "; }
}
else if(isset($_GET['notify']))
@@ -125,7 +120,9 @@ else if(isset($_GET['do']))
// grab session values and send friend request functions.
- if($do=="create-micro") {
+
+
+ if($do=="create-medium") {
if (!isset($_SESSION['svmm-user']) || !isset($_SESSION['svmm-pass'])) { loginForm(); } else {
include("svmm_db/users/$username.php");
if(!file_exists("svmm_db/disks/$userid.img")) {
@@ -136,8 +133,8 @@ else if(isset($_GET['do']))
else
{
// Trigger event to start VM!
- file_put_contents("svmm_db/events/$userid", "./machine start-micro $userid");
- file_put_contents("ssvm_db/users/$userid.type", "micro");
+ file_put_contents("svmm_db/events/$userid", "./machine start-medium $userid");
+ file_put_contents("ssvm_db/users/$userid.type", "medium");
echo "VM created! Refer to the user management panel for start / up info.";
}
} else {
@@ -146,12 +143,13 @@ else if(isset($_GET['do']))
}
}
+
// For real VMs
if($do=="create-mini") {
if (!isset($_SESSION['svmm-user']) || !isset($_SESSION['svmm-pass'])) { loginForm(); } else {
include("svmm_db/users/$username.php");
if(!file_exists("svmm_db/disks/$userid.img")) {
- if(!copy("svmm_db/disks/debian.img", "svmm_db/disks/$userid.img"))
+ if(!copy("svmm_db/disks/slitaz.img", "svmm_db/disks/$userid.img"))
{
echo "Error copying new disk image to user location... Please contact the system administrator!";
}
@@ -178,8 +176,8 @@ else if(isset($_GET['do']))
$vmstatus = file_get_contents("svmm_db/users/$userid.pid.statuscode");
if($vmstatus == "false") {
$vmtype = file_get_contents("svmm_db/users/$userid.type");
- if(!file_exists("svmm_db/users/$userid.type") || $vmtype == "micro") {
- file_put_contents("svmm_db/events/$userid", "./machine start-micro $userid");
+ if(!file_exists("svmm_db/users/$userid.type") || $vmtype == "medium") {
+ file_put_contents("svmm_db/events/$userid", "./machine start-medium $userid");
} else if($vmtype == "mini") {
file_put_contents("svmm_db/events/$userid", "./machine start-mini $userid");
}
@@ -221,11 +219,10 @@ else if(isset($_GET['do']))
if(file_exists("svmm_db/disks/$userid.img")) {
$vmstatus = file_get_contents("svmm_db/users/$userid.pid.statuscode");
if($vmstatus == "true") {
- file_put_contents("svmm_db/events/$userid", "./machine stop $userid");
+ file_put_contents("svmm_db/events/$userid", "./machine del $userid");
+ sleep(2);
unlink("svmm_db/users/$userid.pid.status");
unlink("svmm_db/users/$userid.pid.statuscode");
- unlink("svmm_db/pids/$userid.pid");
- unlink("svmm_db/disks/$userid.img");
header("Location: index.php");
} else {
unlink("svmm_db/users/$userid.pid.status");
@@ -245,25 +242,33 @@ else if(isset($_GET['do']))
include("svmm_db/users/$username.php");
if(file_exists("svmm_db/disks/$userid.img")) {
if(!file_exists("svmm_db/users/$userid.pid.status")) {
- echo "Pending: VM is pending creation, this process shouldn't take longer than 30 seconds...";
+ echo "Please wait: VM is being created, this process shouldn't take longer than 30 seconds...";
+ // Refresh the page every 5 seconds for updates on the VM status.
+ echo "";
} else {
echo $username . "'s VM VM status: ";
$vmstatus = file_get_contents("svmm_db/users/$userid.pid.status");
echo $vmstatus;
- echo " Start Stop Delete";
+ echo " Start Stop Delete ";
+ echo "The VM manipulation functions above take time to process, the page will update within 1 minute";
echo "
";
echo "Connection information (Via SSH): ";
echo "IP/Port: | cddo.cf/" . $userid . "22 | ";
+ echo "Default username: | user | ";
+ echo "Default user password: | user | ";
echo "Default root password: | root |
";
echo "Available ports for use:";
echo "Server side port | External port (viewable) | ";
echo "21 | " . $userid . "21 | ";
echo "22 | " . $userid . "22 | ";
- echo "25565 | " . $userid . "65 | ";
+ echo "80 | " . $userid . "80 | ";
+ //echo "25565 | " . $userid . "65 | ";
echo "6666 | " . $userid . "66 | ";
echo "6667 | " . $userid . "67 | ";
- echo "80 | " . $userid . "80 | ";
echo " ";
+
+ // Refresh the page every 5 seconds for updates on the VM status.
+ echo "";
}
} else {
echo "ERROR: VM not found!";
@@ -274,7 +279,16 @@ else if(isset($_GET['do']))
if($do=="about")
{
echo "About";
- echo $desc;
+ echo "" . $desc;
+ echo " If anyone runs into any issues with the FreeBox services, or wants to request a registration code; please reach out at cddo [at] riseup [dot] net. ";
+ echo " If you enjoy the FreeBox services, please consider donating!";
+ echo ' ';
}
if($do=="login")
@@ -314,10 +328,16 @@ else if(isset($_GET['do']))
if($vpscount < $maxvm)
{
if(filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
- $vpscount = $vpscount + 1;
- file_put_contents("svmm_db/users/usercount", $vpscount);
- file_put_contents("svmm_db/users/" . stripslashes(htmlentities($_POST['username'])) . ".php", "");
- header("Location: index.php");
+ if(stripslashes(htmlentities($_POST['codeword'])) == $panelpass) {
+ $vpscount = $vpscount + 1;
+ file_put_contents("svmm_db/users/usercount", $vpscount);
+ file_put_contents("svmm_db/users/" . stripslashes(htmlentities($_POST['username'])) . ".php", "");
+ header("Location: index.php");
+ }
+ else
+ {
+ echo "ERROR: Registration code incorrect, please try again!";
+ }
}
else
{
@@ -352,25 +372,25 @@ else
if(!file_exists("svmm_db/disks/$userid.img"))
{
echo "Free VPS creation";
- echo "Each user will have the ability to create a VM, and will have a consistent uptime unless FreeBox ends up being disabled due to malicious users improperly using the virtual machines. The choice is yours, but remember theres a limited amount of mini boxes in comparison to the micro boxes. ";
- echo "";
- echo "- CPU: 25% of 1x Xeon E5649 core
- RAM: 128MB dedicated
- Disk: 10GB dedicated space
- OS: Alpine GNU/Linux
- Network: 50mbps down + 2mbps upload
- Select available ports for server operation
";
- echo "";
- echo " | ";
- echo "- CPU: 50% of 2x Xeon E5649 cores
- RAM: 512MB dedicated
- Disk: 25GB dedicated space
- OS: Debian GNU/Linux
- Network: 50mbps down + 2mbps upload
- Select available ports for server operation
";
- echo "";
+ echo "Each user will have the ability to create a VM, and will have a consistent uptime unless FreeBox ends up being disabled due to malicious users improperly using the virtual machines. ";
+ echo "Best VM for IRC bouncers / session idling CLI IRC clients. Great for small websites and some development.
";
+ echo "- CPU: 10% of 1x Xeon E5649 core
- RAM: 48MB dedicated
- Disk: 500MB dedicated space
- OS: SliTaz GNU/Linux
- Network: 10mbps down + 5mbps upload
- Select available ports for server operation
";
+ echo "";
+ echo " | Best VM for development / IRC server hosting / FTP server hosting. Awesome for hosting source tarballs, websites, forums, git repo, and more!";
+ echo "- CPU: 25% of 1x Xeon E5649 core
- RAM: 192MB dedicated
- Disk: 10GB dedicated space
- OS: Alpine GNU/Linux
- Network: 10mbps down + 5mbps upload
- Select available ports for server operation
";
+ echo "";
echo " | ";
}
else
{
- echo "You've been assigned a VPS, click "Manage" for more information on your server.";
+ echo "You've been assigned a VPS, click "Manage" for more information on your server. ";
}
}
?>
-Powered By SVMM
+
|
|