Jump to content

Login Page


vasoftwaresolutions

Recommended Posts

??? ??? For some reason when i go to this page [url http://vasoftwaresolutions.com/cpanel]here[/url] it will not display anything on it.. it just blank.. can someone tell me what i am doing wrong

 

thats my code below

 

<?php require(sql/index.php); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
  session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
  $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['Username'])) {
  $loginUsername=$_POST['Username'];
  $password=$_POST['Password'];
  $MM_fldUserAuthorization = "";
  $MM_redirectLoginSuccess = "ceo/index.php";
  $MM_redirectLoginFailed = "index.php?M=Login Failed";
  $MM_redirecttoReferrer = false;
  mysql_select_db($database_cPanel, $cPanel);
  
  $LoginRS__query=sprintf("SELECT VA_name, password FROM virtual_airlines WHERE VA_name=%s AND password=%s",
    GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); 
   
  $LoginRS = mysql_query($LoginRS__query, $cPanel) or die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {
     $loginStrGroup = "";
    
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;	      

    if (isset($_SESSION['PrevUrl']) && false) {
      $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
    }
    header("Location: " . $MM_redirectLoginSuccess );
  }
  else {
    header("Location: ". $MM_redirectLoginFailed );
  }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>V.A.S.S. Login</title>
<style type="text/css">
<!--
.style1 {color: #C0C0C0}
-->
</style>
</head>

<body>
<span class="style1">Please Login<br />
</span><br />
<br />
<form id="form1" name="form1" method="POST" action="<?php echo $loginFormAction; ?>">
          <table width="100%" border="0">
            <tr>
              <td>Va Name:</td>
              <td><label>
                <input type="text" name="va_name" id="va_name" />
              </label></td>
            </tr>
            <tr>
              <td>Password:</td>
              <td><input type="password" name="password" id="password" /></td>
            </tr>
            <tr>
              <td height="23"> </td>
              <td> </td>
            </tr>
            <tr>
              <td height="23"> </td>
              <td><label>
                <input type="submit" name="button" id="button" value="Login" />
              </label></td>
            </tr>
          </table>
</form>
</body>
</html>

 

Link to comment
https://forums.phpfreaks.com/topic/92045-login-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.