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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.