"; } 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@floraPix.nl)"; else $body .= "No message will be send to the list. Thanks! (webmaster@floraPix.nl)"; $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 "

 $casus $subject = ".$array[5]."

"; else echo "

 $casus $subject

"; echo "
    From: ".$name."
    Date: ".$array[3]."
      ".$array[4]."

"; } echo " "; $handle = opendir('./'.$casus); $firstImage= ''; while( ($fname = readdir($handle)) !== FALSE ) { if($fname != '.' && $fname != '..' && !is_dir($fname) ) { if( strpos( $fname, '_thb_') !== FALSE && strpos( $fname, '.jpg') !== FALSE ) { $large= $casus.'/'.str_replace('_thb_', "", $fname); if( !$firstImage) $firstImage= str_replace('_thb_', "", $fname); echo " "; $picCnt++; if( ++$cnt >= $nbrThumb) { echo " "; $cnt= 0; } } } } closedir($handle); if( $line) { echo "
Click on the thumbnails to view the picture.

Discussion:

"; } else // *** try to get the info from pic-desc.txt file in Gallery **** { $date= date("d-m-Y"); $picDesc= file( $gallery); echoDebug( 'Searching for: '.$firstImage); foreach($picDesc as $value) { $array= explode(" | ", $value); if( $array[0] == $firstImage) { $array= explode(" courtesy ", $array[1]); $subject= str_replace("", "", $array[0]); $subject = str_replace("", "", $subject); $array= explode("
", $array[1]); $message= $array[1].' '.$array[2]; if( strpos( $array[0], "href='mailto:") == FALSE) $name = $array[0]; else { $array= explode("href='mailto:", $array[0]); $array= explode("?subject", $array[1]); $email= $array[0]; $array= explode(">", $array[1]); $array= explode("<", $array[1]); //>" $name= $array[0]; addInput($info); } echoDebug( "*** Found ***
name= $name
email= $email
subject= $subject
message= $message
"); addInput( $info); break; } } if( $name) echo "

".$casus.". ".$subject."

    From: ".$name."
    Date: ".$array[3]."
      ".$array[4]."

"; else echo "Owner has to enter data before any other input
"; } // ** make random control tekst image ** // $entry = $random[ date(s) % 10]; $im = imagecreate(60, 30); $bgColor = imagecolorallocate ($im, 237, 238, 232); $textColor = imagecolorallocate ($im, 0, 0, 0); imagestring ($im, 5, 5, 8, $entry, $textColor); ImagePNG($im,"code.png"); if( file_exists( $info) ) $stamp= date("d-m-Y", filemtime( $info) ); echo '

If you have a suggestion or something to add to the discussion, you can use this form.

Subject
Your name
Email address
Message


Entry code: (retype this code)      Mail to list '.$group.'-L


Updated by Eric Gouda, '.$stamp.'
'; } 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 "

Show Unsolved cases or Solved cases only.

"; else if( $action == 'solved') echo "

For Unsolved cases Click here.

"; else echo "

For Solved cases Click here.

"; echo "\n "; 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
"); if( $diff <= $days ) $date= "

$date

"; $file_var= fopen( $info,"r") or die( "Error - description file couldn't be openend"); $line = fgets( $file_var, 4096); $array= explode( " | ", $line); } else $array= array( "no subject", "no author"); if( $cnt % 2) $tableLine= 'odd'; else $tableLine= 'even'; if( $array[5] && !($action == 'unsolved') ) echo ""; else if( !$array[5] && !($action == 'solved') ) echo ""; } } closedir($curdir); echo '
CasusFrom whomIdentified asUpdated($days)
$file ".$array[0]. "".$array[1]. " ".$array[5]. "$date
$file ".$array[0]. "".$array[1]. " $date

Updated by Eric Gouda, Access from '.$startDate.': 

'; } ?>