Initial commit
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
<?php ob_start(); ?>
|
||||
<?php
|
||||
|
||||
|
||||
if(isset($_GET['fno']))
|
||||
{
|
||||
// include"/var/www/dbaccess.php";
|
||||
// $polacz = mysql_connect($softspm_host, $demo_softspm_user, $demo_softspm_pass);mysql_select_db($demo_softspm_db);
|
||||
|
||||
// $polacz = mysql_connect('localhost', 'segap', 'segap');mysql_select_db('segap');
|
||||
$polacz = mysql_connect('localhost', 'softspm', 'ff8efe59e7265fe9680b0c325e44cb53');mysql_select_db('softspm');
|
||||
mysql_query("SET NAMES utf8");
|
||||
mysql_query("SET CHARACTER_SET utf8_general_ci");
|
||||
|
||||
$id = $_GET['fno'];
|
||||
$query = "select EQF_FILE_NAME,EQF_FILE_TYPE,EQF_FILE_SIZE,EQF_FILE from seg_equipments_files where EQF_ID=$id";
|
||||
$result = mysql_query($query) or die('Error, query failed');
|
||||
list($name, $type, $size, $content) = mysql_fetch_array($result);
|
||||
|
||||
header("Content-length: $size");
|
||||
header("Content-type: $type");
|
||||
header("Content-Disposition: download; filename=$name");
|
||||
echo $content;
|
||||
mysql_close($polacz);
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
<?php ob_end_flush();?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user