| 1 | <?php |
| 2 | require 'xnet.inc.php'; |
| 3 | |
| 4 | $res = $globals->xdb->query("SELECT logo, logo_mime FROM groupex.asso WHERE id = {?}", $globals->asso('id')); |
| 5 | list($logo, $logo_mime) = $res->fetchOneRow(); |
| 6 | |
| 7 | if (!empty($logo)) { |
| 8 | header("Content-type: $mime"); |
| 9 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
| 10 | header("Last-Modified:" . gmdate("D, d M Y H:i:s") . " GMT"); |
| 11 | header("Cache-Control: no-cache, must-revalidate"); |
| 12 | header("Pragma: no-cache"); |
| 13 | echo $logo; |
| 14 | } else { |
| 15 | header("Content-type: image/jpeg"); |
| 16 | header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); |
| 17 | header("Last-Modified:" . gmdate("D, d M Y H:i:s") . " GMT"); |
| 18 | header("Cache-Control: no-cache, must-revalidate"); |
| 19 | header("Pragma: no-cache"); |
| 20 | readfile("../images/dflt_carre.jpg"); |
| 21 | } |
| 22 | |
| 23 | ?> |