Login   Register  
PHP Classes
elePHPant
Icontem

File: phpsecureweb/createmd5.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Bulent Tezcan  >  phpsecureweb  >  phpsecureweb/createmd5.php  >  Download  
File: phpsecureweb/createmd5.php
Role: Application script
Content type: text/plain
Description: This is a standalone script just to generate MD5 passwords.
Class: phpsecureweb
Allow users certain rights, login with password.
Author: By
Last change:
Date: 12 years ago
Size: 2,241 bytes
 

Contents

Class file image Download
<?php
    
/*
    * @author Bulent Tezcan. bulent@greenpepper.ca
    */

        #
        #    This is a standalone script just to generate MD5 passwords.
        #
        #    You don't have to put this on your production server.
        #
        #
        #

        
ob_start( );

        
session_start();

        
$FormElements $_POST["form_md5"];

        
$FormElements['__error'] = "";
        
        if (
$FormElements['password'] == "")
        {
            
$FormElements['__error'] = "Please enter password";
            
$FormElements['md5'] = "";
        }
        else
        {
            
$FormElements['md5'] = md5(htmlspecialchars($FormElements['password']));
            
$FormElements['__error'] = "Copy the MD5 password and use it for your admin account.";
        }
        
        
$serverURL "http".($_SERVER["HTTPS"]=="on"?"s":"")
                                    .
"://".$_SERVER["HTTP_HOST"]
                                    .
strrev(strstr(strrev($_SERVER['PHP_SELF']),"/"));
?>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="<?=$serverURL?>css/Corona.css">
</head>


<!-- START FORM (md5) -->

<form method="post" name="md5">


<table class="CoronaFormTABLE" width="400" cellspacing="1" cellpadding="4" align="center">
    <tr>
        <td colspan="2" width="100%" align="middle">
            <font class="CoronaFormHeaderFont">MD5 Password Creation</font>
        </td>
    </tr>
    <tr>
        <td colspan="2" width="100%" class="CoronaError">
            Please enter password
        </td>
    </tr>
    <tr>
        <td class="CoronaFieldCaptionTD">
            Password :
        </td>
        <td class="CoronaDataTD">
            
        <input  class="CoronaInput"  type="text" name="form_md5[password]" size="20" maxlength="20" value="<?=$FormElements['password']?>" >
        </td>
    </tr>
    <tr>
        <td class="CoronaFieldCaptionTD">
            MD5 Password :
        </td>
        <td class="CoronaDataTD">
            
        <input  class="CoronaInput"  type="text" name="form_md5[md5]" size="50" maxlength="50" value="<?=$FormElements['md5']?>" >
        </td>
    </tr>
    <tr>
        <td class="CoronaFieldCaptionTD" align="middle" colspan="2">
            
        <input class="CoronaButton" type="submit" name="form_md5[Submit]" value="Create MD5"  >
        </td>
    </tr>


    <!-- Start of passtru values -->
    

<!-- Start of Hidden Values -->



    <!-- End of passtru values -->
</table>


</form>
<!-- END FORM (md5) -->

<?
    

        ob_end_flush
( );

        return 
true;


?>