PHP Classes

File: phpsecureweb/index.php

Recommend this page to a friend!
  Classes of Bulent Tezcan   phpsecureweb   phpsecureweb/index.php   Download  
File: phpsecureweb/index.php
Role: Application script
Content type: text/plain
Description: remove this file or integrate it to your site.
Class: phpsecureweb
Allow users certain rights, login with password.
Author: By
Last change:
Date: 20 years ago
Size: 1,672 bytes


Class file image Download
    * @author Bulent Tezcan.

session_start( );

ob_start( );


    if (
$_GET['isOK'] == 'OK')
$FormElements['__error'] = "Thank you. We hope you found it useful.";
$_SESSION['resetDatabaseError'] = "";
$_GET['isOK'] == 'ERROR')
$FormElements['__error'] = $_SESSION['resetDatabaseError'];

$myForm = new Form("login");
$myForm-> SetNumberOfColumns( 2 );
$myForm-> SetCellSpacing( 1 );
$myForm-> SetCellPadding( 5 );
$myForm-> SetBorder ( 0 );
$myForm-> SetAlign ("center");
$myForm-> SetTableWidth ("400");
$myForm-> SetTableHeight (null);
$myForm-> SetCSS ( $_SESSION["CSS"] );
$myForm-> SetEmptyCells (false);
$myForm-> SetFormHeader("<font class=\"".$_SESSION["CSS"]."FormHeaderFont\">Welcome to Security Demo</font>");

$myForm-> SetErrorMessage($FormElements['__error']);
$label = new Label("lbl1","After you are done with the testing,<br>PLEASE reset the database for others.<br><br>User : admin<br>Password: secret");
$label-> SetColspan(2);

$myForm-> AddFormElementToNewLine($label);

$adminMenu = "\n<a class=\"".$_SESSION["CSS"]."LinkButton\" href=\"adminmenu.php\">Start the Demo</a>";

$passtru = new PassTru();


$myForm-> AddFormElementToNewLine($passtru);

$passtru->SetValue("\n<a class=\"".$_SESSION["CSS"]."LinkButton\" href=\"resetDatabase.php\">Reset the Database</a>");
$myForm-> AddFormElement($passtru);

$myForm-> GetFormInTable( );


ob_end_flush( );