Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: A separate inlogform  (Read 1428 times)

Joost

  • Guest
A separate inlogform
« on: November 05, 2009, 12:18:32 am »

1) In snews.php find:

if (!empty($_GET['category'])) {

add the following line below:

   if ($_GET['category'] === 'login/') { include 'login.php'; die; }


2) Create a file named login.php and upload it to the directory where index.php resides.

Code: (login.php) [Select]
<?php if( ! function_exists('login')) die; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo _ADMIN l('logged_in') : l('login'); ?></title>
<meta name="robots" content="noindex" />
<style type="text/css">
form, h2 { width:400px; margin:4% auto 0;}
</style>
<script type="text/javascript">
//<![CDATA[
 function checkForm(){
for (var n=0; n < f.elements.length; n++) {
if (f.elements[n].value=='') { return false; }
}
return true;
 }
 
 window.onload = function(){
 f = document.forms[0];
 f.onsubmit = checkForm;
 }

//]]>
</script>
</head>
<body>
<?php login(); ?>
</body>
</html>
Logged