Пример #1
0
if (isset($_POST['emailupdate'])) {
    $oldemail = $_POST['oldemail'];
    $newemail = $_POST['newemail'];
    $inptpass = $_POST['inputpassword'];
    if (isset($oldemail) && !empty($oldemail)) {
        if (isset($newemail) && !empty($newemail)) {
            if (isset($inptpass) && !empty($inptpass)) {
                $myUser->emailUpdate($_SESSION['userid'], $oldemail, $newemail, $inptpass);
            } else {
                Main::setMessage("settings.php", "Please make sure to have repeated the password", "alert-error");
            }
        } else {
            Main::setMessage("settings.php", "Please Input the values on the New Email Field", "alert-error");
        }
    } else {
        Main::setMessage("settings.php", "Please input your old Email!", "alert-error");
    }
}
?>
	<div class="row">
		<div class=".col-lg-12 col-offset-1">
			<h2>Password Update</h2>

			<form class="form-horizontal" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
				<div class="form-group">
					<label class="col-lg-2 control-label" for="inputOldPassword">Old Password</label>

					<div class="col-lg-8">
Пример #2
0
require_once 'header.php';
$myUser->notLogedin();
if (isset($_POST['addhost'])) {
    $hostname = $_POST['hostname'];
    $domainorip = $_POST['domainorip'];
    $port = $_POST['port'];
    $ispublic = $_POST['ispublic'];
    $userid = $_SESSION['userid'];
    if (!isset($hostname) && empty($hostname)) {
        Main::setMessage("host.php", "Please make sure to have putted the correct Host Name!", "alert-error");
    }
    if (!isset($domainorip) && empty($domainorip)) {
        Main::setMessage("host.php", "Please make sure to have putted the correct Hostname or IP", "alert-error");
    }
    if (!isset($port) && empty($port)) {
        Main::setMessage("host.php", "Please make sure you have inputted the correct port number!", "alert-error");
    } else {
        $myUser->addHost($userid, $hostname, $domainorip, $port, $ispublic);
    }
}
?>
	<form class="form-horizontal col-offset-2" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
		<div class="form-group">
			<label class="col-lg-2 control-label" for="inputHostname">Host Name</label>

			<div class="col-lg-5">
				<input type="text" name="hostname" class="form-control" id="inputHostname" placeholder="Host Name">
			</div>
Пример #3
0
<?php

require_once 'config.php';
session_destroy();
Main::setMessage("index.php", "You have logged out!", "alert-info");
Пример #4
0
 /**
  * It will delete a specific host
  *
  * @param $userid
  * @param $hostid
  */
 public function hostDelete($userid, $hostid)
 {
     $string = "DELETE FROM hosts WHERE id=" . $hostid . " AND user_id=" . $userid . "";
     $validation = "SELECT user_id FROM hosts WHERE id=" . $hostid . "";
     $result = mysql_query($validation);
     $row = mysql_fetch_row($result);
     if ($row[0] == $userid) {
         if (mysql_query($string)) {
             Main::setMessage("index.php", "The host was successfully deleted from the database!", "alert-success");
         } else {
             Main::setMessage("index.php", mysql_error(), "alert-error");
         }
     } else {
         Main::setMessage("index.php", "There was an error, please retry again!", "alert-error");
     }
 }
Пример #5
0
                    if (isset($email) && !empty($email)) {
                        $myUser->userRegister($username, $password, $passrep, $email, $name, $lastname);
                    } else {
                        Main::setMessage("register.php", "The email filed is empty!", "alert-error");
                    }
                } else {
                    Main::setMessage("register.php", "The password field is empty!", "alert-error");
                }
            } else {
                Main::setMessage("register.php", "The username field is empty!", "alert-error");
            }
        } else {
            Main::setMessage("register.php", "The lastname field is empty!", "alert-error");
        }
    } else {
        Main::setMessage("register.php", "The name field is empty!", "alert-error");
    }
}
?>

	<form class="form-horizontal col-offset-2" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
		<div class="form-group">
			<label class="col-lg-2 control-label" for="inputName">Name</label>

			<div class="col-lg-5">
				<input type="text" name="name" class="form-control" id="inputName" placeholder="Name">
			</div>
		</div>
Пример #6
0
<?php

require_once 'header.php';
$myUser->isLogedin();
if (isset($_POST['submit'])) {
    $username = $_POST['username'];
    $password = $_POST['password'];
    if (!$myUser->userLogin($username, $password)) {
        Main::setMessage("login.php", "Please try to login again!", "alert-error");
    } else {
        Main::setMessage("index.php", "Welcome in " . $scriptName, "alert-success");
    }
}
?>
	<form class="form-horizontal col-offset-2" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
		<fieldset>
			<div class="form-group">
				<label class="col-lg-2 control-label" for="inputUsername">Username</label>

				<div class="col-lg-5">
					<input type="text" class="form-control" name="username" id="inputUsername" placeholder="Username">
				</div>
			</div>
			<div class="form-group">
				<label class="col-lg-2 control-label" for="inputPassword">Password</label>

				<div class="col-lg-5">
					<input type="password" class="form-control" name="password" id="inputPassword" placeholder="Password">