function getFile() { $file_id = params::get('file'); $dir = FILES_ROOT . 'pages/'; db::table('pages_files'); db::where('file_id', $file_id); $file = db::assoc(); $link = $dir . $file_id . '.' . $file['file_type']; files::downloadFile($link, $file['file_name'] . '.' . $file['file_type']); }
function download() { $file_id = params::get('file'); db::table('files'); db::where('file_id', $file_id); $file = db::assoc(); if (db::rows() == 0) { web::error404(); } $file_link = FILES_ROOT . 'all/' . $file_id . '.' . $file['file_type']; files::downloadFile($file_link); }
function download() { $tmpl_file = params::get('tmpl_file'); $app = params::get('app'); $file = SYS_ROOT . 'tmpls/' . ADMIN_SITE . '/' . $app . '/' . $tmpl_file; files::downloadFile($file); }
function download() { db::table('templates'); db::where('tmpl_id', params::get('tmpl_id')); $tmpl_file = db::get('tmpl_file'); $file = SYS_ROOT . 'tmpls/' . ADMIN_SITE . '/' . $tmpl_file; files::downloadFile($file); }