5 * @author Cristian NAVALICI
6 * @version 1.0 feb 2008
10 require_once("../globals.php");
11 require_once("$srcdir/acl.inc");
13 // Check authorization.
14 $thisauth = acl_check('admin', 'vektis');
15 if (!$thisauth) die("Not authorized.");
22 <link rel
=stylesheet href
='<?php echo $css_header ?>' type
='text/css'>
23 <LINK href
="<?php echo $css_dbc ?>" rel
="stylesheet" type
="text/css">
24 <title
>Vektis Validation
</title
>
27 <body
<?php
echo $top_bg_line;?
>>
29 <form enctype
="multipart/form-data" action
="<?echo $_SERVER['PHP_SELF'] ?>" method
="POST">
30 <input type
="radio" name
="resim" value
="1" checked
="checked" />Simulation
<br
/>
31 <input type
="radio" name
="resim" value
="2" />Real <br
/>
33 <input type
="hidden" name
="MAX_FILE_SIZE" value
="500000" />
34 Upload the Vektis returning file
: <input name
="returnfile" type
="file" />
35 <input type
="submit" value
="Upload and validate" name
="submitfile" />
39 if ( $_POST['submitfile'] ) {
40 $upddir = 'retuploads/';
41 $updfile = $upddir . basename($_FILES['returnfile']['name']);
43 if (move_uploaded_file($_FILES['returnfile']['tmp_name'], $updfile)) {
44 echo "File was successfully uploaded.<br />";
46 $state = ( ($_POST['resim'] == 1) ||
($_POST['resim'] == 2) ) ?
$_POST['resim'] : 1;
47 vk_parse_returning_file($updfile, $state);
49 echo "Possible file upload attack!\n";