Login   Register  
PHP Classes
elePHPant
Icontem

File: beispiel.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Florian Rathe  >  checkidd  >  beispiel.php  >  Download  
File: beispiel.php
Role: Example script
Content type: text/plain
Description: example script
Class: checkidd
Class that checks german passport IDDs
Author: By
Last change:
Date: 2003-05-15 10:42
Size: 1,216 bytes
 

Contents

Class file image Download
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Ausweisnummer check</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?
if(isset($idd))
{
  include(
"iddcheck.php");
  
$id = new iddcheck;
  
$rueckgabe=$id->checkidd($idd);
  if(
$rueckgabe[0]==0)
    echo 
"Falsches Format!<br>";
  else
  {
    if(
$rueckgabe[1]==0)
    {
      echo 
"Erste Zahlenreihe falsch!<br>";
      
$error=1;
    }
    if(
$rueckgabe[2]==0)
    {
      echo 
"Zweite Zahlenreihe falsch!<br>";
      
$error=1;
    }
    if(
$rueckgabe[3]==0)
    {
      echo 
"Dritte Zahlenreihe falsch!<br>";
      
$error=1;
    }
    if(
$rueckgabe[4]==0)
    {
      echo 
"Checksumme ist Falsch!<br>";
      
$error=1;
    }
    if(
$error!=1)
    {
      echo 
"Nett ;) ein echter Ausweis ;)<br>";
      echo 
"Ausweisnummer: " .$rueckgabe[5]. "<br>";
      echo 
"Geburtsdatum (dd.mm.yy): " .$rueckgabe[6]."<br>";
    }
  }
  
print_r(array_values($rueckgabe));
}
else{
?>

<form name="iddcheck" method="post" action="<? echo $PHP_SELF?>">
  Ausweisnummer:<input name="idd" type="text" id="idd">
</form>
<? ?>
</body>
</html>