// always modified header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 //header("Content-Type: application/json"); echo htmlentities(mysql_result($Q_tpl, 0, 'template'), ENT_QUOTES, 'ISO-8859-1', false); } } exit; } elseif (isset($_GET['attSearch'])) { // Searching for an attachment $Q_att = mysql_query("select * from `entry_confirm_attachment` where att_filename_orig like '%" . addslashes($_GET['attSearch']) . "%' order by `att_filename_orig`"); $dynamicPrint = true; while ($R_att = mysql_fetch_assoc($Q_att)) { $aResults[] = array('att_id' => $R_att['att_id'], 'att_displayname' => $R_att['att_filename_orig'] . ' (' . smarty_modifier_file_size($R_att['att_filesize']) . ')', 'att_filetype_icon' => iconFiletypeFilename($R_att['att_filetype']) . '.gif'); } } else { exit; // DIE DIE DIE MY DARLING! } header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // always modified header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Pragma: no-cache"); // HTTP/1.0 header("Content-Type: application/json"); /* */
function iconFiletype($extention) { $filename = iconFiletypeFilename($extention); $fileending = '.gif'; return iconHTML($filename, $fileending); }