include( 'header.htm');
$debug= $_REQUEST['debug'];
$action= $_REQUEST['action'];
$webMaster= 'webmaster@floraPix.nl';
$self= $_SERVER['php_SELF'];
$casus= $_REQUEST['casus'];
$file= $_REQUEST['file'];
$submit= $_REQUEST['submit'];
$cfg = file( 'ident.cfg');
$group = trim( $cfg[0], " \n");
$startDate = trim( $cfg[1], " \n");
$group = rtrim( $group);
$gallery= trim( $cfg[2]);
$random = array( 'Lk6Dy', 'aQ4Un', 'pGx7f', 'aEz7f', 'Af8us', 'ky78x', '7z97G', 'P2xRc', 'HfyY2', '8uDxQ');
function echoDebug( $message)
{
global $debug;
if( $debug)
echo "Debug: $message
";
}
function addInput($info)
{
global $casus, $group, $webMaster, $subject, $name, $email, $contr, $entry, $message, $mailToList;
$date= date("d-m-Y");
echoDebug( "From=$name - Email=$email - Message=$message - Entry=$entry must be $contr
';
else if( !$name)
echo '!!! YOU HAVE TO ENTER YOUR NAME !!!
';
else if( !$message)
echo '!!! YOU HAVE TO ENTER A MESSAGE !!!
';
else
{
$body="Identification message posted\nAbout: $subject\nBy: $name\n\n$message\n
http://botuweb.bio.uu.nl/$group-L/identification/index.php?casus=$casus\n
Please do not reply to this message (to the list), but use the form on the identification page.\n";
if( $mailToList)
$body .= "A message will be send automatically to the list. Thanks! ($webMaster)";
else
$body .= "No message will be send to the list. Thanks! ($webMaster)";
$body = stripslashes($body);
mail($webMaster,"Identification of $subject added by $name",$body,"From: botuweb@bio.uu.nl");
echoDebug( "mail($webMaster,'Identification: $name ($group - $subject)',$body,'From: botuweb@bio.uu.nl');");
if( $mailToList)
mail( $group."-L@nic.surfnet.nl","Identification: $name ($subject)",$body,"From: botuweb@bio.uu.nl");
$message= str_replace("\n", "
", $message);
$message= str_replace("\r", "", $message);
$message= str_replace("\'", "'", $message);
$file_var= fopen( $info,"a") or
die( "Error - info file couldn't be openend");
$bytes_written = fwrite( $file_var, "$subject | $name | $email | $date | $message\n") or
die( "Error - info file couldn't be written");
fclose( $file_var);
}
}
if( $casus)
{
$nbrThumb= 5;
$info= $casus.'/info.txt';
if( $submit)
{
$subject= stripslashes($_POST['subject']);
$name= stripslashes($_POST['from']);
$email= stripslashes($_POST['email']);
$contr= stripslashes($_POST['contr']);
$entry= stripslashes($_POST['entry']);
$message= stripslashes($_POST['message']);
$mailToList= stripslashes($_POST['mailToList']);
addInput( $info);
}
if( file_exists( $info) ) // *** read info from info file ****
{
$date= date("d-m-Y", filectime( $info) );
$line = file( $info);
$array= explode( " | ", $line[0]);
echoDebug( $line[0]);
if( $array[2])
$name= " ".$array[1]."";
else
$name= "".$array[1]."";
$subject= $array[0];
if( $array[5])
echo "
From: | ".$name." | |
Date: | ".$array[3]." | |
".$array[4]." |
From: | ".$name." | |
Date: | ".$array[3]." | |
".$array[4]." |
If you have a suggestion or something to add to the discussion, you can use this form.
Updated by Eric Gouda,
'.$stamp.' Show Unsolved cases or Solved cases only. For Unsolved cases Click here. For Solved cases Click here.
';
}
else if( $file) // view Picture in View Page 800 pix wide!
{
echo "
(to see full size view picture by right clicking on it)
";
}
else if($curdir = opendir('.'))
{
include( 'spec.htm');
$cnt=0;
$days= 30;
echoDebug( "---".$PHPSELF."---");
if( !$action)
echo "
Casus | From whom | Identified as | Updated($days) | "; while( $file = readdir($curdir) ) { if( is_dir( $file) && $file != ".." && $file != ".") { $info= $file.'/info.txt'; $cnt++; if( file_exists( $info) ) { $date= date("d-m-Y", filemtime( $info) ); $curDay= (int)date("Y")*365+(int)date("m")*30+(int)date("d"); $filDay= (int)date("Y", filemtime( $info) )*365+(int)date("m", filemtime( $info) )*30+(int)date("d", filemtime( $info) ); $diff= $curDay - $filDay; echoDebug("Date=$curDay filDay=$filDay Diff=$diff
---|---|---|---|
$file ".$array[0]. " | ".$array[1]. " | ".$array[5]. " | $date |
$file ".$array[0]. " | ".$array[1]. " | $date |
Access from '.$startDate.':
'; } ?>