- Timestamp:
- Dec 3, 2005 9:17:54 PM (19 years ago)
- Location:
- trunk/lib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Auth_SQL.inc.php
r24 r25 41 41 'encryption_type' => AUTH_ENCRYPT_MD5, 42 42 43 // The URL t he user will be directed if unsuccessfully calling requireLogin.43 // The URL to the login script. 44 44 'login_url' => '/', 45 45 … … 303 303 SELECT *, " . $this->_params['db_primary_key'] . " AS user_id 304 304 FROM " . $this->_params['db_table'] . " 305 WHERE BINARY" . $this->_params['db_username_column'] . " = '" . addslashes($username) . "'305 WHERE " . $this->_params['db_username_column'] . " = '" . addslashes($username) . "' 306 306 AND BINARY userpass = '" . addslashes($this->encryptPassword($password)) . "' 307 307 "); -
trunk/lib/CSS.inc.php
r24 r25 8 8 * @author Quinn Comendant <quinn@strangecode.com> 9 9 * @version 1.1 10 * TODO: set different css files attached to an app with /css.php?app=name 11 * TODO: 10 12 */ 11 13 class CSS { -
trunk/lib/Email.inc.php
r24 r25 73 73 . '(?:|\s*|\s+\([^,@]+\)\s*))$/i')); // FALSE ensure there is no ending > 74 74 75 $this->setParam($params); 75 if (isset($params)) { 76 $this->setParam($params); 77 } 76 78 } 77 79 -
trunk/lib/Nav.inc.php
r24 r25 72 72 function setFeature($features=null, $page_id=null) 73 73 { 74 if (!isset($page_id)) { 75 $page_id = sizeof($this->pages) - 1; 76 } else if ($page_id < 0 && is_numeric($page_id)) { 77 $page_id = sizeof($this->pages) + intval($page_id); 78 } 79 80 if (isset($features) && is_array($features)) { 74 $page_id = $this->_calculatePageID($page_id); 75 76 if (isset($features) && is_array($features) && isset($this->pages[sizeof($this->pages)-1]['features']) && is_array($this->pages[sizeof($this->pages)-1]['features'])) { 81 77 // Set features for specified page. 82 78 $this->pages[sizeof($this->pages)-1]['features'] = array_merge($this->pages[sizeof($this->pages)-1]['features'], $features); 83 // Store "current page" features.84 $this->pages[$page_id]['features'] = array_merge($this->pages[$page_id]['features'], $features);79 // TODO: Store "current page" features. 80 // $this->pages[$page_id]['features'] = array_merge($this->pages[$page_id]['features'], $features); 85 81 } 86 82 } … … 111 107 function getFeature($feature, $page_id=null, $default=null) 112 108 { 113 if (!isset($page_id)) { 114 $page_id = sizeof($this->pages) - 1; 115 } else if ($page_id < 0 && is_numeric($page_id)) { 116 $page_id = sizeof($this->pages) + intval($page_id); 117 } 109 $page_id = $this->_calculatePageID($page_id); 118 110 119 111 if (isset($this->pages[$page_id]['features'][$feature])) { … … 141 133 function getTitle($page_id=null) 142 134 { 143 if (!isset($page_id)) { 144 $page_id = sizeof($this->pages) - 1; 145 } else if ($page_id < 0 && is_numeric($page_id)) { 146 $page_id = sizeof($this->pages) + intval($page_id); 147 } 135 $page_id = $this->_calculatePageID($page_id); 148 136 149 137 if ($this->getFeature('title', $page_id)) { 150 return oTxt($this->pages[$page_id]['title'] );138 return oTxt($this->pages[$page_id]['title'], true); 151 139 } else { 152 140 return false; … … 174 162 function getPath($page_id=null) 175 163 { 176 if (!isset($page_id)) { 177 $page_id = sizeof($this->pages) - 1; 178 } else if ($page_id < 0 && is_numeric($page_id)) { 179 $page_id = sizeof($this->pages) + intval($page_id); 180 } 164 $page_id = $this->_calculatePageID($page_id); 181 165 182 166 if ($this->getFeature('path', $page_id)) { … … 217 201 function getBreadcrumbs($page_id=null) 218 202 { 219 if (!isset($page_id)) { 220 $page_id = sizeof($this->pages) - 1; 221 } else if ($page_id < 0 && is_numeric($page_id)) { 222 $page_id = sizeof($this->pages) + intval($page_id); 223 } 203 $page_id = $this->_calculatePageID($page_id); 224 204 225 205 if ($this->getFeature('breadcrumbs')) { … … 293 273 } 294 274 275 /** 276 * Returns the ID of the current page, or the adjusted ID for a given page ID. 277 * 278 * @access private 279 * @return string The value of the current page id. 280 */ 281 function _calculatePageID($page_id=null) 282 { 283 if (!isset($page_id)) { 284 return sizeof($this->pages) - 1; 285 } else if ($page_id < 0 && is_numeric($page_id)) { 286 return sizeof($this->pages) + intval($page_id); 287 } else { 288 return $page_id; 289 } 290 } 291 295 292 } 296 293 // End of class. -
trunk/lib/Upload.inc.php
r24 r25 39 39 // Array of file name extensions and corresponding mime-types. 40 40 var $mime_extension_map = array( 41 'Z' => 'application/x-compress', 42 'ai' => 'application/postscript', 43 'aif' => 'audio/x-aiff', 44 'aifc' => 'audio/x-aiff', 45 'aiff' => 'audio/x-aiff', 46 'asc' => 'text/plain', 47 'asf' => 'video/x-ms-asf', 48 'asx' => 'video/x-ms-asf', 49 'au' => 'audio/basic', 50 'avi' => 'video/x-msvideo', 51 'bcpio' => 'application/x-bcpio', 41 'ez' => 'application/andrew-inset', 42 'hqx' => 'application/mac-binhex40', 43 'cpt' => 'application/mac-compactpro', 44 'doc' => 'application/msword', 52 45 'bin' => 'application/octet-stream', 53 'bmp' => 'image/bmp',54 'cdf' => 'application/x-netcdf',55 46 'class' => 'application/octet-stream', 56 'cpio' => 'application/x-cpio',57 'cpt' => 'application/mac-compactpro',58 'csh' => 'application/x-csh',59 'css' => 'text/css',60 'dcr' => 'application/x-director',61 'diff' => 'text/diff',62 'dir' => 'application/x-director',63 47 'dll' => 'application/octet-stream', 64 48 'dms' => 'application/octet-stream', 65 'doc' => 'application/msword', 49 'exe' => 'application/octet-stream', 50 'lha' => 'application/octet-stream', 51 'lzh' => 'application/octet-stream', 52 'so' => 'application/octet-stream', 53 'oda' => 'application/oda', 54 'pdf' => 'application/pdf', 55 'ps' => 'application/postscript', 56 'eps' => 'application/postscript', 57 'ai' => 'application/postscript', 58 'smi' => 'application/smil', 59 'smil' => 'application/smil', 60 'mif' => 'application/vnd.mif', 61 'xls' => 'application/vnd.ms-excel', 62 'ppt' => 'application/vnd.ms-powerpoint', 63 'stc' => 'application/vnd.sun.xml.calc.template', 64 'sxc' => 'application/vnd.sun.xml.calc', 65 'std' => 'application/vnd.sun.xml.draw.template', 66 'sxd' => 'application/vnd.sun.xml.draw', 67 'sti' => 'application/vnd.sun.xml.impress.template', 68 'sxi' => 'application/vnd.sun.xml.impress', 69 'sxm' => 'application/vnd.sun.xml.math', 70 'sxg' => 'application/vnd.sun.xml.writer.global', 71 'stw' => 'application/vnd.sun.xml.writer.template', 72 'sxw' => 'application/vnd.sun.xml.writer', 73 'vsd' => 'application/vnd.visio', 74 'wbxml' => 'application/vnd.wap.wbxml', 75 'wmlc' => 'application/vnd.wap.wmlc', 76 'wmlsc' => 'application/vnd.wap.wmlscriptc', 77 'bcpio' => 'application/x-bcpio', 78 'vcd' => 'application/x-cdlink', 79 'pgn' => 'application/x-chess-pgn', 80 'Z' => 'application/x-compress', 81 'cpio' => 'application/x-cpio', 82 'csh' => 'application/x-csh', 83 'dcr' => 'application/x-director', 84 'dir' => 'application/x-director', 85 'dxr' => 'application/x-director', 66 86 'dvi' => 'application/x-dvi', 67 'dxr' => 'application/x-director', 68 'eps' => 'application/postscript', 69 'etx' => 'text/x-setext', 70 'exe' => 'application/octet-stream', 71 'ez' => 'application/andrew-inset', 72 'gif' => 'image/gif', 87 'spl' => 'application/x-futuresplash', 73 88 'gtar' => 'application/x-gtar', 89 'tgz' => 'application/x-gtar', 74 90 'gz' => 'application/x-gzip', 75 91 'hdf' => 'application/x-hdf', 76 'hqx' => 'application/mac-binhex40', 77 'htm' => 'text/html', 78 'html' => 'text/html', 79 'ice' => 'x-conference/x-cooltalk', 80 'ics' => 'text/calendar', 81 'ief' => 'image/ief', 82 'ifb' => 'text/calendar', 83 'iges' => 'model/iges', 84 'igs' => 'model/iges', 85 'jpe' => 'image/jpeg', 86 'jpeg' => 'image/jpeg', 87 'jpg' => 'image/jpeg', 92 'php3' => 'application/x-httpd-php3', 93 'php' => 'application/x-httpd-php', 88 94 'js' => 'application/x-javascript', 89 'kar' => 'audio/midi',90 'latex' => 'application/x-latex',91 'lha' => 'application/octet-stream',92 'log' => 'text/plain',93 'lzh' => 'application/octet-stream',94 'm3u' => 'audio/x-mpegurl',95 'man' => 'application/x-troff-man',96 'me' => 'application/x-troff-me',97 'mesh' => 'model/mesh',98 'mid' => 'audio/midi',99 'midi' => 'audio/midi',100 'mif' => 'application/vnd.mif',101 'mov' => 'video/quicktime',102 'movie' => 'video/x-sgi-movie',103 'mp2' => 'audio/mpeg',104 'mp3' => 'audio/mpeg',105 'mpe' => 'video/mpeg',106 'mpeg' => 'video/mpeg',107 'mpg' => 'video/mpeg',108 'mpga' => 'audio/mpeg',109 'ms' => 'application/x-troff-ms',110 'msh' => 'model/mesh',111 'mxu' => 'video/vnd.mpegurl',112 'nc' => 'application/x-netcdf',113 'oda' => 'application/oda',114 'patch' => 'text/diff',115 'pbm' => 'image/x-portable-bitmap',116 'pdb' => 'chemical/x-pdb',117 'pdf' => 'application/pdf',118 'pgm' => 'image/x-portable-graymap',119 'pgn' => 'application/x-chess-pgn',120 'php' => 'application/x-httpd-php',121 'php3' => 'application/x-httpd-php3',122 'pl' => 'application/x-perl',123 'pm' => 'application/x-perl',124 'png' => 'image/png',125 'pnm' => 'image/x-portable-anymap',126 'po' => 'text/plain',127 'ppm' => 'image/x-portable-pixmap',128 'ppt' => 'application/vnd.ms-powerpoint',129 'ps' => 'application/postscript',130 'qt' => 'video/quicktime',131 'ra' => 'audio/x-realaudio',132 'ram' => 'audio/x-pn-realaudio',133 'ras' => 'image/x-cmu-raster',134 'rgb' => 'image/x-rgb',135 'rm' => 'audio/x-pn-realaudio',136 'roff' => 'application/x-troff',137 'rpm' => 'audio/x-pn-realaudio-plugin',138 'rtf' => 'text/rtf',139 'rtx' => 'text/richtext',140 'sgm' => 'text/sgml',141 'sgml' => 'text/sgml',142 'sh' => 'application/x-sh',143 'shar' => 'application/x-shar',144 'shtml' => 'text/html',145 'silo' => 'model/mesh',146 'sit' => 'application/x-stuffit',147 95 'skd' => 'application/x-koan', 148 96 'skm' => 'application/x-koan', 149 97 'skp' => 'application/x-koan', 150 98 'skt' => 'application/x-koan', 151 'smi' => 'application/smil', 152 'smil' => 'application/smil', 153 'snd' => 'audio/basic', 154 'so' => 'application/octet-stream', 155 'spl' => 'application/x-futuresplash', 156 'src' => 'application/x-wais-source', 157 'stc' => 'application/vnd.sun.xml.calc.template', 158 'std' => 'application/vnd.sun.xml.draw.template', 159 'sti' => 'application/vnd.sun.xml.impress.template', 160 'stw' => 'application/vnd.sun.xml.writer.template', 99 'latex' => 'application/x-latex', 100 'wmd' => 'application/x-ms-wmd', 101 'wmz' => 'application/x-ms-wmz', 102 'cdf' => 'application/x-netcdf', 103 'nc' => 'application/x-netcdf', 104 'pl' => 'application/x-perl', 105 'pm' => 'application/x-perl', 106 'shar' => 'application/x-shar', 107 'swf' => 'application/x-shockwave-flash', 108 'sh' => 'application/x-sh', 109 'sit' => 'application/x-stuffit', 161 110 'sv4cpio' => 'application/x-sv4cpio', 162 111 'sv4crc' => 'application/x-sv4crc', 163 'swf' => 'application/x-shockwave-flash',164 'sxc' => 'application/vnd.sun.xml.calc',165 'sxd' => 'application/vnd.sun.xml.draw',166 'sxg' => 'application/vnd.sun.xml.writer.global',167 'sxi' => 'application/vnd.sun.xml.impress',168 'sxm' => 'application/vnd.sun.xml.math',169 'sxw' => 'application/vnd.sun.xml.writer',170 't' => 'application/x-troff',171 112 'tar' => 'application/x-tar', 172 113 'tcl' => 'application/x-tcl', 173 'tex' => 'application/x-tex',174 114 'texi' => 'application/x-texinfo', 175 115 'texinfo' => 'application/x-texinfo', 176 'tgz' => 'application/x-gtar', 116 'tex' => 'application/x-tex', 117 'man' => 'application/x-troff-man', 118 'me' => 'application/x-troff-me', 119 'ms' => 'application/x-troff-ms', 120 'roff' => 'application/x-troff', 121 't' => 'application/x-troff', 122 'tr' => 'application/x-troff', 123 'ustar' => 'application/x-ustar', 124 'src' => 'application/x-wais-source', 125 'xhtml' => 'application/xhtml+xml', 126 'xht' => 'application/xhtml+xml', 127 'xml' => 'application/xml', 128 'zip' => 'application/zip', 129 'au' => 'audio/basic', 130 'snd' => 'audio/basic', 131 'kar' => 'audio/midi', 132 'mid' => 'audio/midi', 133 'midi' => 'audio/midi', 134 'mp3' => 'audio/mpeg', 135 'mp2' => 'audio/mpeg', 136 'mpga' => 'audio/mpeg', 137 'aiff' => 'audio/x-aiff', 138 'aif' => 'audio/x-aiff', 139 'aifc' => 'audio/x-aiff', 140 'm3u' => 'audio/x-mpegurl', 141 'wax' => 'audio/x-ms-wax', 142 'wma' => 'audio/x-ms-wma', 143 'rpm' => 'audio/x-pn-realaudio-plugin', 144 'ram' => 'audio/x-pn-realaudio', 145 'rm' => 'audio/x-pn-realaudio', 146 'ra' => 'audio/x-realaudio', 147 'wav' => 'audio/x-wav', 148 'pdb' => 'chemical/x-pdb', 149 'xyz' => 'chemical/x-xyz', 150 'bmp' => 'image/bmp', 151 'gif' => 'image/gif', 152 'ief' => 'image/ief', 153 'jpg' => 'image/jpeg', 154 'jpe' => 'image/jpeg', 155 'jpeg' => 'image/jpeg', 156 'png' => 'image/png', 177 157 'tif' => 'image/tiff', 178 158 'tiff' => 'image/tiff', 179 'tr' => 'application/x-troff', 180 'tsv' => 'text/tab-separated-values', 181 'txt' => 'text/plain', 182 'ustar' => 'application/x-ustar', 183 'vcd' => 'application/x-cdlink', 184 'vcf' => 'text/x-vcard', 159 'wbmp' => 'image/vnd.wap.wbmp', 160 'ras' => 'image/x-cmu-raster', 161 'pnm' => 'image/x-portable-anymap', 162 'pbm' => 'image/x-portable-bitmap', 163 'pgm' => 'image/x-portable-graymap', 164 'ppm' => 'image/x-portable-pixmap', 165 'rgb' => 'image/x-rgb', 166 'xbm' => 'image/x-xbitmap', 167 'xpm' => 'image/x-xpixmap', 168 'xwd' => 'image/x-xwindowdump', 169 'iges' => 'model/iges', 170 'igs' => 'model/iges', 171 'mesh' => 'model/mesh', 172 'msh' => 'model/mesh', 173 'silo' => 'model/mesh', 174 'vrml' => 'model/vrml', 175 'wrl' => 'model/vrml', 176 'ics' => 'text/calendar', 177 'ifb' => 'text/calendar', 185 178 'vcs' => 'text/calendar', 186 179 'vfb' => 'text/calendar', 187 'vrml' => 'model/vrml', 188 'vsd' => 'application/vnd.visio', 189 'wav' => 'audio/x-wav', 190 'wax' => 'audio/x-ms-wax', 191 'wbmp' => 'image/vnd.wap.wbmp', 192 'wbxml' => 'application/vnd.wap.wbxml', 180 'css' => 'text/css', 181 'diff' => 'text/diff', 182 'patch' => 'text/diff', 183 'html' => 'text/html', 184 'htm' => 'text/html', 185 'shtml' => 'text/html', 186 'txt' => 'text/plain', 187 'asc' => 'text/plain', 188 'log' => 'text/plain', 189 'po' => 'text/plain', 190 'rtx' => 'text/richtext', 191 'rtf' => 'text/rtf', 192 'sgm' => 'text/sgml', 193 'sgml' => 'text/sgml', 194 'tsv' => 'text/tab-separated-values', 195 'wmls' => 'text/vnd.wap.wmlscript', 196 'wml' => 'text/vnd.wap.wml', 197 'etx' => 'text/x-setext', 198 'vcf' => 'text/x-vcard', 199 'xsl' => 'text/xml', 200 'mpeg' => 'video/mpeg', 201 'mpe' => 'video/mpeg', 202 'mpg' => 'video/mpeg', 203 'mov' => 'video/quicktime', 204 'qt' => 'video/quicktime', 205 'mxu' => 'video/vnd.mpegurl', 206 'asf' => 'video/x-ms-asf', 207 'asx' => 'video/x-ms-asf', 208 'wmv' => 'video/x-ms-wmv', 193 209 'wm' => 'video/x-ms-wm', 194 'wma' => 'audio/x-ms-wma',195 'wmd' => 'application/x-ms-wmd',196 'wml' => 'text/vnd.wap.wml',197 'wmlc' => 'application/vnd.wap.wmlc',198 'wmls' => 'text/vnd.wap.wmlscript',199 'wmlsc' => 'application/vnd.wap.wmlscriptc',200 'wmv' => 'video/x-ms-wmv',201 210 'wmx' => 'video/x-ms-wmx', 202 'wmz' => 'application/x-ms-wmz',203 'wrl' => 'model/vrml',204 211 'wvx' => 'video/x-ms-wvx', 205 'xbm' => 'image/x-xbitmap', 206 'xht' => 'application/xhtml+xml', 207 'xhtml' => 'application/xhtml+xml', 208 'xls' => 'application/vnd.ms-excel', 209 'xml' => 'application/xml', 210 'xpm' => 'image/x-xpixmap', 211 'xsl' => 'text/xml', 212 'xwd' => 'image/x-xwindowdump', 213 'xyz' => 'chemical/x-xyz', 214 'zip' => 'application/zip' 212 'avi' => 'video/x-msvideo', 213 'movie' => 'video/x-sgi-movie', 214 'ice' => 'x-conference/x-cooltalk', 215 215 ); 216 216
Note: See TracChangeset
for help on using the changeset viewer.