Location: PHPKode > projects > Coxiar Media Platform > coxiar_productions/cpanel/login.php
<?php
session_start();
include("../db.php");
$msg = '';
if ( isset($_POST['username']) && isset($_POST['password']) ){
	
	$query = 'SELECT * FROM `login` Where `username`="'.$_POST['username'].'" And `password`="'.md5($_POST['password']).'"';
	$result = mysql_query($query);	
	if($row = mysql_fetch_assoc( $result )){
		$_SESSION['logged_in'] = "yes";
		$_SESSION['user_id'] = $row['user_id'];
		$_SESSION['username'] = $_POST['username'];
		$_SESSION['SESSION_ID'] = session_id();
		header('Location: cpanel.php');
		exit;
	}
	else{
		$msg = 'Invalid login credentials. Please try again';
	}
}

?>
<html>
<head>
<style type="text/css">
<!--
body {
	background-color: black;
}
h1{
font-size:20px;
font-family:Arial, Helvetica, sans-serif;
}
div, td, tr, table, p{
font-size:10px;
font-family:Arial, Helvetica, sans-serif;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: underline;
	color: #000000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
input{

font-size:10px;
font-family:Tahoma;

-->
</style>
<script language="Javascript" src="resize.js"></script>
</head>
<body>
<?=$msg?>
<br>
<form name="login" method="post" action="<?=$_SERVER['PHP_SELF']?>">
  <img src="../images/easy_tms.php?text=<?=urlencode($config['site_name'])?>">
  <p>&nbsp;</p>
  <div align="center">
    <table width="230" border="1" cellpadding="0" cellspacing="0">
      <tr>
        <td colspan="2"><div align="center"><img src="../images/easy_tms.php?text=Enter%20Your%20Credentials&font_size=12"></div></td>
      </tr>
      <tr>
        <td width="80" ><img src="../images/easy_tms.php?text=<?=urlencode('Username:')?>&font_size=10">/td>
        <td width="144"><input type="text" name="username" /></td>
      </tr>
      <tr>
        <td><img src="../images/easy_tms.php?text=<?=urlencode('Password:')?>&font_size=10"></td>
        <td><input type="password" name="password" /></td>
      </tr>
      <tr>
        <td colspan="2"><div align="center"><a href="javascript:document.login.submit();"><img src="../images/easy_tms.php?text=Login&font_size=12"></a></div></td>
      </tr>
      </table>
  </div>
  <p align="center">&nbsp;</p>
</form>
</body>
</html>
Return current item: Coxiar Media Platform