Your account is activated!

Use the login form to login to OnlineCranes.

"; } if ($got['edit']=="confirmed") { $announce="

Your e-mail address is changed!

Use the login form to login to OnlineCranes.

"; } if (isset($posted['user'])) { if (!isset($_SERVER['HTTP_USER_AGENT'])) { //header("Location: http://www.onlinecranes.com/secure/log.php?ref=https_login"); mysql_close($connection); exit; } if ($_SERVER['REQUEST_METHOD'] != "POST") { //header("Location: http://www.onlinecranes.com/secure/log.php?ref=https_login"); mysql_close($connection); exit; } if (empty($posted['pw'])) { $announce="

Please enter username AND password!

"; } else { $sql="SELECT user, client_id, gender, name, active, suspended, req_nwpwd FROM client WHERE pw=\"".md5($posted['pw'])."\" AND user=\"".$posted['user']."\""; $result=mysql_query($sql, $connection) or die ($sql."

".mysql_error()); if (mysql_num_rows($result)==1) { $row_client=mysql_fetch_array($result); if(phpversion() >= "4.2.0") { extract($_SERVER); } $ts_unix=time(); if($row_client['active']!=1) { $announce="

Your account is not active!

If you just created your account, please activate the account first by clicking the link in the confirmation e-mail we sent you.

If your account was activated already, please contact OnlineCranes for assistance by using our contact form. Include your username in the message.

"; } else { if ($row_client['req_nwpwd']==md5($posted['pw'])) { $sql="UPDATE client SET req_nwpwd=\"\" WHERE client=\"".$row_client['client_id']."\""; $result=mysql_query($sql); $nwpw=1; } if($row_client['suspended']==1) { $announce="

There was a problem opening your account!

Please contact OnlineCranes for assistance by using our contact form.
Please include your username in the message.

"; $stop=1; } if(!isset($stop)) { include_once("secure/crypt.inc.php"); include_once("secure/rnd_string.inc.php"); $hash=encrypt(rnd_str(15)."||".$row_client['client_id']."||".$ts_unix."||".rnd_str(15),"Singhallelujah"); $session_string=$row_client['gender']."||".$row_client['name']."||".$row_client['client_id']."||".$ts_unix."||".$REMOTE_ADDR."||0"; $_SESSION['logged_str']=encrypt($session_string,$hash); $_SESSION['enc_client_id']=encrypt($row_client['client_id'],$_SESSION['logged_str']); $_SESSION['stable_enc_client_id']=encrypt($row_client['client_id'],$key); $_SESSION['client']=$row_client['gender']." ".$row_client['name']; $sql="INSERT INTO logging (logged_id, logged_ts, unix_ts, IP) VALUES (\"".$row_client['client_id']."\", \"".$vandaag."\", \"".$ts_unix."\", '".$REMOTE_ADDR."')"; $result=mysql_query($sql); $sql="INSERT INTO login_current (client_id, hash, ts, IP) VALUES ('".$row_client['client_id']."', '".$hash."', '".$ts_unix."', '".$REMOTE_ADDR."')"; $result=mysql_query($sql); unset($_POST,$posted,$sql,$result,$row_client,$hash,$session_string); mysql_close($connection); if($nwpw==1) { header("Location: clientindex.php?pw=nw"); exit; } else { header("Location: craneindex.php"); exit; } } } } else { $announce="

User unknown or password invalid!

"; } } } if ((!isset($posted['user'])) || (isset($announce))) { $sql="SELECT title, content FROM content WHERE content_id=\"2\""; $result=mysql_query($sql) or die('fout 0 '.mysql_error()); $row_content=mysql_fetch_array($result); $login_title=stripslashes($row_content['title']); $login_content=stripslashes(nl2br($row_content['content'])); if ($err==1) { $error=""; } $content="

Login to your OnlineCranes account

username:
password:

".$announce."

Forgot your password?

"; $right="

".$login_title."

In order to list your cranes for sale or hire or to receive our newsletter with new offered stock, you need to register with OnlineCranes. Registering is free!

Click here to register with OnlineCranes

If you've already registered with OnlineCranes, please login and manage your online cranes!

"; } ?> Log in to your account at Online Cranes!
 OnlineCranes
"; ?>