- ./
- ./images
- ./includes/common
- ./includes/config
- ./includes/functions
- ./javascript
- ./styles
- ./templates/borrower
- ./templates/main
- ./templates/manage
- ./templates/search
./includes/functions/form.php
<?php
if ( !defined('IN_SITE'))
{
report ('Hacking attempt.', 'Insite unset');
}
function upload_single ($file, $id)
{
if(is_uploaded_file($file[tmp_name]))
{
$extension = pathinfo($file['name']);
$extension = $extension['extension'];
move_uploaded_file($file[tmp_name], 'images/books/'.$file[name]);
$newimagename = 'images/books/'.$id.'.'.$extension;
rename('images/books/'.$file[name], $newimagename);
}
}