Show upload-backup.php syntax highlighted
<?php
/*
This file is part of SMEWebApp. SMEWebApp is a web application that
helps the informatization of small and medium enterprises.
Copyright 2003, 2004, 2005, 2006 Dashamir Hoxha, dashohoxha@users.sf.net
SMEWebApp is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
SMEWebApp is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with SMEWebApp; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
$error = $_FILES['sql_file']['error'];
function upload_file()
{
$tmp_name = $_FILES['sql_file']['tmp_name'];
$file_name = $_FILES['sql_file']['name'];
$fname = basename($file_name);
$dest_file = "db/backup/$fname";
move_file($tmp_name, $dest_file);
}
include_once 'upload/upload.php';
?>
See more files for this project here