if ($state !=''):
session_start();
global $DOCUMENT_ROOT;
global $SERVER_NAME;
global $webmasteremail;
if($SERVER_name=="192.168.0.1"){$siteconfigpath="/indianmetals/www/";} else {$siteconfigpath="/";};
require($_SERVER['DOCUMENT_ROOT'] . $siteconfigpath . "siteconfig.php3");
mysql_pconnect($hosthame,$dbuser,$dbpassword) or die("Unable to connect to SQL server");
mysql_select_db("indianmetal") or die("Unable to select database");
if ($state != 'forgotpasswordform' && $state != 'forgotpassword'):
session_start();
if (!session_is_registered("SESSION")):
global $finaldest;
if(!isset($imiuserid)):
header("Location: /myim/login.php?finaldest=".urlencode($REQUEST_URI));
exit();
endif;
if ($imiuserid == '' or empty($imiuserid) or $imipassid =='' or empty($imipassid)):
echo $finaldest;
header("Location: /myim/login.php?finaldest=".urlencode($REQUEST_URI));
exit();
endif;
endif;
if (session_is_registered("SESSION")):
$currcorpuser=$imiuserid;
$currcorppassword=$imipassid;
$currcompid=checkuserpass("user",'corp',$currcorpuser);
$currcompid=checkuserpass("password",'corp',$currcorppassword);
if ($currcompid==''):
$corporperson="perso";
$currpersouser=$imiuserid;
$currpersopassword=$imipassid;
$currcompid=checkuserpass("user",'perso',$currpersouser);
$currcompid=checkuserpass("password",'perso',$currpersopassword);
else:
$corporperson="corpo";
endif;
require_once($DOCUMENT_ROOT . "/include/ipcode.php");
require_once($DOCUMENT_ROOT . "/include/tableborder.php");
function admincheck($adminuser,$adminpass){
$yesno=0;
$stmt="select user,password from admin where user = '$adminuser' and password='$adminpass'";
$resultstmt=mysql_query($stmt);
$rows=mysql_numrows($resultstmt);
if ($rows > 0):
while($getvaluerow = mysql_fetch_row($resultstmt))
{
$adminuser=$getvaluerow[0];
$adminpassword=$getvaluerow[1];
$yesno=1;
};
endif;
return $yesno;
};
function startpagenomenu()
{
echo "";
echo('
Indianmetals | Users
');
echo "
";
// BEGIN Head Code Inclusion Standard
///
$DOCUMENT_ROOT="..";
///
#include($_SERVER['DOCUMENT_ROOT'] . "/include/head_standard.txt");
// END Head Code Inclusion Standard
echo('');
echo('
');
};
$adminuser=$imiuserid;
$adminpass=$imipassid;
global $admincheck ;
$admincheck=admincheck($adminuser,$adminpass);
if ($admincheck != 1):
startpage(10,"Users","users","");
else:
if ($state == "updateuser" && $admincheck == 1):
/*$additionalmetatag="";
$additionalmetatag1=" onLoad=\"biginit();\" ";
startpagewithmetatag(10,"Users","users","",$additionalmetatag,$additionalmetatag1);
*/
#startpage(10,"Users","users","");
startpagenomenu();
else:
if ($admincheck != 1):
startpage(10,"Users","users","");
else:
startpagenomenu();
endif;
endif;
endif;
if ($currcompid==''):
echo "
You are not authorised member of indianmetals.com.
Site could not process the request you have mentioned.This could have been caused by any of the following :-
You are not Authorised Member of the site.
Either you have not Logged in or your session has expired.
Somebody has already logged in with your Username and Password.
Your Login has crossed permitted number of Users.
You may have not properly Logged off, kindly Login after sometime.