<?php
include ("dbset.php");
session_start();

$con = mysql_connect("localhost",$dbu,$dbp);
if (!$con)
  {
  die('Could not connect to database: ' . mysql_error());
  }
   
mysql_select_db($dbs, $con);

function execsql($qry){
	$result = mysql_query($qry);
	return $result;
}


$check_query = "SELECT  username  FROM  dpt_active_users WHERE  username = '".$_SESSION['username']."' ";
$check_result = mySQL_query($check_query);
$check_num = mysql_num_rows($check_result);

if($check_num==1) {
$_SESSION['db_prefix']="dpt";	
}
else {
	header('Location: ../login.php?e=1');
}




?>
