ecco le pagine:
login.php
Codice PHP:
<?PHP
require_once("./include/membersite_config.php");
if(isset($_POST['submitted']))
{
if($fgmembersite->Login())
{
$fgmembersite->RedirectToURL("login-home.php");
}
}
?>
<!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" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<title>Login</title>
<link rel="STYLESHEET" type="text/css" href="style/fg_membersite.css" />
<link rel="stylesheet" type="text/css" href="sfondosito.css">
<script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
</head>
<style type="text/css">
<!--
A{text-decoration:none}
-->
</style>
<body >
<br><br><br><br><br><br><br><br><br><br><center>
<!-- Form Code Start -->
<div id='fg_membersite'>
<form id='login' action='<?php echo $fgmembersite->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
<fieldset >
<legend>Login</legend>
<input type='hidden' name='submitted' id='submitted' value='1'/>
<div class='short_explanation'>* campo obbligatorio</div>
<div><span class='error'><?php echo $fgmembersite->GetErrorMessage(); ?></span></div>
<div class='container'>
<label for='username' >USERNAME *:</label><br/>
<input type='text' name='username' id='username' value='<?php echo $fgmembersite->SafeDisplay('username') ?>' maxlength="50" /><br/>
<span id='login_username_errorloc' class='error'></span>
</div>
<div class='container'>
<label for='password' >PASSWORD *:</label><br/>
<input type='password' name='password' id='password' maxlength="50" /><br/>
<span id='login_password_errorloc' class='error'></span>
</div>
<div class='container'>
<input type='submit' name='Submit' value='Login' />
</div>
<div class='short_explanation'><a href='reset-pwd-req.php'>Password dimenticata?</a></div>
</fieldset>
</form></center>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->
<script type='text/javascript'>
// <![CDATA[
var frmvalidator = new Validator("login");
frmvalidator.EnableOnPageErrorDisplay();
frmvalidator.EnableMsgsTogether();
frmvalidator.addValidation("username","req","Please provide your username");
frmvalidator.addValidation("password","req","Please provide the password");
// ]]>
</script>
</div>
<!--
Form Code End (see html-form-guide.com for more info.)
-->
</body>
</html>
quando il login va a buon fine l'utente finisce nella sua pagina personale ed e' proprio qui che dovrebbe trovare IL LINK che lo indirizza alla sua cartella gia pronta con i suoi documenti..
questa e' la pag. profilo:
login-home.php
Codice PHP:
<?PHP
require_once("./include/membersite_config.php");
include('menu.js');
if(!$fgmembersite->CheckLogin())
{
$fgmembersite->RedirectToURL("login.php");
exit;
}
?>
<!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" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<title>Home page</title>
<link rel="STYLESHEET" type="text/css" href="style/fg_membersite.css">
<link rel="stylesheet" type="text/css" href="sfondosito.css">
</head>
<style type="text/css">
<!--
A{text-decoration:none}
-->
</style>
<body>
<br><br><br><br><br><br><center>
<div id='fg_membersite_content'>
<h2><font face="Pr celtic Narrow" font size="5">LA TUA PAGINA PROFILO</font></h2>
<font face="Pr celtic Narrow" font size="5">Benvenuto : </font> <?= $fgmembersite->UserFullName(); ?>!
<p><a href='change-pwd.php'><font face="Pr celtic Narrow" font size="5">Cambia password</a></font></p><br><br><br><br>
<p><a href='access-controlled.php'><font face="Pr celtic Narrow" font size="6">ENTRA NEL SITO</font></a></p>
<br><br><br>
<p><a href='logout.php'><font face="Pr celtic Narrow" font size="5">ESCI</a></font></p>
</div></center>
<?php
include("dataeora.php");
?>
</body>
non so proprio come fare...