OSI-Certified logo

Source code of file cm_mimetypes.inc.php
from the Content Management module for Phprojekt.

<?php
// Content Management System module for PHProjekt (CMS4P).
// Copyright 2002-2005 by Mario A. Valdez-Ramirez
// http://www.mariovaldez.net/

// This program 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.

// This program 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 this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, 
// Boston, MA 02111-1307, USA.

// You can contact Mario A. Valdez-Ramirez by email 
// at mario@mariovaldez.org or paper mail at 
// Olmos 809, San Nicolas, NL. 66495, Mexico.


// MIME type identifiers sent to browser...
$cm_file_mimetype["default"] = "application/octet-stream";
$cm_file_mimetype["pdf"] = "application/pdf";
$cm_file_mimetype["rtf"] = "application/rtf";
$cm_file_mimetype["txt"] = "text/plain";
$cm_file_mimetype["doc"] = "application/msword";
$cm_file_mimetype["ppt"] = "application/vnd.ms-powerpoint";
$cm_file_mimetype["xls"] = "application/vnd.ms-excel";
$cm_file_mimetype["mpp"] = "application/vnd.ms-project";
$cm_file_mimetype["php"] = "application/x-httpd-php";
$cm_file_mimetype["htm"] = "text/html";
$cm_file_mimetype["html"] = "text/html";
$cm_file_mimetype["css"] = "text/css";
$cm_file_mimetype["jpg"] = "image/jpeg";
$cm_file_mimetype["tif"] = "image/tiff";
$cm_file_mimetype["tga"] = "image/x-tga";
$cm_file_mimetype["tiff"] = "image/tiff";
$cm_file_mimetype["png"] = "image/png";
$cm_file_mimetype["gif"] = "image/gif";
$cm_file_mimetype["bmp"] = "image/bmp";
$cm_file_mimetype["xcf"] = "image/x-xcf";
$cm_file_mimetype["mpg"] = "video/mpeg";
$cm_file_mimetype["mpeg"] = "video/mpeg";
$cm_file_mimetype["mov"] = "video/quicktime";
$cm_file_mimetype["avi"] = "video/x-msvideo";
$cm_file_mimetype["qt"] = "video/quicktime";
$cm_file_mimetype["fli"] = "video/x-fli";
$cm_file_mimetype["flc"] = "video/x-fli";
$cm_file_mimetype["mp3"] = "audio/mpeg";
$cm_file_mimetype["mid"] = "audio/midi";
$cm_file_mimetype["midi"] = "audio/midi";
$cm_file_mimetype["wav"] = "audio/x-wav";
$cm_file_mimetype["exe"] = "application/octet-stream";
$cm_file_mimetype["com"] = "application/octet-stream";
$cm_file_mimetype["dll"] = "application/octet-stream";
$cm_file_mimetype["bat"] = "text/plain";
$cm_file_mimetype["sh"] = "text/plain";
$cm_file_mimetype["sql"] = "text/plain";
$cm_file_mimetype["pas"] = "text/plain";
$cm_file_mimetype["c"] = "text/plain";
$cm_file_mimetype["cpp"] = "text/plain";
$cm_file_mimetype["bas"] = "text/plain";
$cm_file_mimetype["awk"] = "text/plain";
$cm_file_mimetype["pl"] = "text/plain";
$cm_file_mimetype["zip"] = "application/zip";
$cm_file_mimetype["rar"] = "application/rar";
$cm_file_mimetype["gz"] = "application/x-gzip";
$cm_file_mimetype["tgz"] = "application/x-gzip";
$cm_file_mimetype["bz2"] = "application/x-bz2";
$cm_file_mimetype["tar"] = "application/x-tar";
$cm_file_mimetype["iso"] = "application/octet-stream";
$cm_file_mimetype["pgp"] = "application/pgp-encrypted";
$cm_file_mimetype["bak"] = "text/plain";
$cm_file_mimetype["orig"] = "text/plain";
$cm_file_mimetype["bck"] = "text/plain";


// Download hint sent to browsers...
$cm_file_inline["default"] = "attachment";
$cm_file_inline["txt"] = "inline";
$cm_file_inline["htm"] = "inline";
$cm_file_inline["html"] = "inline";
$cm_file_inline["jpg"] = "inline";
$cm_file_inline["png"] = "inline";
$cm_file_inline["gif"] = "inline";
//$cm_file_inline["doc"] = "inline";
//$cm_file_inline["ppt"] = "inline";
//$cm_file_inline["xls"] = "inline";
//$cm_file_inline["mpp"] = "inline";
//$cm_file_inline["pdf"] = "inline";



// File types banned for uploads...
$cm_disabled_type["php"] = 1;
$cm_disabled_type["php3"] = 1;
$cm_disabled_type["asp"] = 1;
//$cm_disabled_type["cgi"] = 1;
//$cm_disabled_type["clfm"] = 1;
//$cm_disabled_type["js"] = 1;


?>
 
 
NA fum/lmd: 2004.09.16
Copyright ©1994-2018 by Mario A. Valdez-Ramírez.
no siga este enlace / do not follow this link