function process_login()
{
    global $label;
    $session_duration = ini_get("session.gc_maxlifetime");
    if ($session_duration == '') {
        $session_duration = 60 * 20;
    }
    $now = gmdate("Y-m-d H:i:s");
    $sql = "UPDATE `users` SET `logout_date`='{$now}' WHERE UNIX_TIMESTAMP(DATE_SUB('{$now}', INTERVAL {$session_duration} SECOND)) > UNIX_TIMESTAMP(last_request_time) AND (`logout_date` ='0000-00-00 00:00:00')";
    mysql_query($sql) or die($sql . mysql_error());
    if (!is_logged_in() || $_SESSION['MDS_Domain'] != "ADVERTISER") {
        ?>

	<html>
   <head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
   <title><?php 
        echo $label["advertiser_loginform_title"];
        ?>
</title>

   <link rel="stylesheet" type="text/css" href="style.css" />

   </head>
   <body>
   <p>&nbsp</p>
  <p>
   <center><img alt="" src="<?php 
        echo SITE_LOGO_URL;
        ?>
"/> <br>
   </p>
   <p>&nbsp</p>
   <table width="80%" cellpadding=5 border=1 style="border-collapse: collapse; border-style:solid; border-color:#E8E8E8">

	<tr>
	<td width="50%" valign="top" ><center><h3><?php 
        echo $label["advertiser_section_heading"];
        ?>
</h3></center>
		<?php 
        login_form();
        ?>

</td>
<?php 
        if (USE_AJAX == 'SIMPLE') {
            ?>
<td valign=top>
<center>
<h3><?php 
            echo $label["advertiser_section_newusr"];
            if (USE_AJAX == 'SIMPLE') {
                $order_page = 'order_pixels.php';
            } else {
                $order_page = 'select.php';
            }
            ?>
</h3>
<a class="big_link" href="<?php 
            echo $order_page;
            ?>
"><?php 
            echo $label["adv_login_new_link"];
            ?>
</a> <br><br><?php 
            echo $label["advertiser_go_buy_now"];
            ?>
      <h3 ></h3></center> 
</td>
<?php 
        }
        ?>
</tr>
</table>
<?php 
        echo_copyright();
        ?>
<!-- This software is free on the condition that you do not remove any copyright messages as part of the license. If you want to remove these, please see http://www.milliondollarscript.com/remove.html -->
<body>

		</body>

	 </html>

		<?php 
        die;
    } else {
        // update last_request_time
        $now = gmdate("Y-m-d H:i:s");
        $sql = "UPDATE `users` SET `last_request_time`='{$now}', logout_date='0' WHERE `Username`='" . $_SESSION['MDS_Username'] . "'";
        mysql_query($sql) or die($sql . mysql_error());
    }
}
예제 #2
0
</div>
<?php 
echo_copyright();
?>
<!-- This software is free on the condition that you do not remove any copyright messages as part of the license. If you want to remove these, please see http://www.milliondollarscript.com/remove.html -->
</html>