Abstract validation
\n"; } set_error_handler("__error_handler");*/ $file = "./mopmop/abstracts.csv"; if(!file_exists($file)){ touch($file); chmod($file, 0666); } $f = fopen($file, 'r+'); if($f){ flock($f, LOCK_EX); $id = trim($_REQUEST['id']); $code = trim($_REQUEST['code']); // user $lines = array(); $id_line = -1; for($i=0; ($line = fgetcsv($f, 65536, ';')) !== false; $i++){ $lines[] = $line; if($id == $line[1]) $id_line = $i; } if($id_line != -1 && $lines[$id_line][2]==$code){ // activated $email = $lines[$id_line][7]; $lines[$id_line][0] = 1; fseek($f, 0, SEEK_SET); ftruncate($f, 0); foreach($lines as $line){ if($line[7] == $email && $line[1] != $id){ $line[0] = 0; } fputcsv($f, $line, ';'); } fflush($f); flock($f, LOCK_UN); fclose($f); echo 'Your abstract submitted for the VIIIth congress of ISTCP has been validated. Please find your abstract here.
'; }else{ echo 'Abstract validation failed. Please try again later or contact the administrator.
'; } }else{ echo 'Activation failed due to system malfunction. Please try again later or contact the administrator.
'; } ?>