gehe zum Quellcode dieser Datei
Namensbereiche | |
| namespace | Joomla |
Klassen | |
| class | mosAbstractLog |
| class | mosAbstractTasker |
| class | mosCache |
| class | mosCategory |
| class | mosCommonHTML |
| class | mosComponent |
| class | mosContent |
| class | mosHTML |
| class | mosMainFrame |
| class | mosMambot |
| class | mosMenu |
| class | mosModule |
| class | mosProfiler |
| class | mosSection |
| class | mosSession |
| class | mosTemplate |
| class | mosUser |
| class | patHTML |
Aufzählungen | |
| enum | _MOS_ALLOWHTML |
| enum | _MOS_ALLOWRAW |
| enum | _MOS_MAMBO_INCLUDED |
| enum | _MOS_NOTRIM |
Funktionen | |
| _josSpoofCheck ($array, $badStrings) | |
| ampReplace ($text) | |
| doGzip () | |
| GetImageFolders (&$temps, $path) | |
| GetImages (&$images, $path, $base='/') | |
| GetSavedImages (&$row, $path) | |
| ImageCheck ($file, $directory='/images/M_images/', $param=NULL, $param_directory='/images/M_images/', $alt=NULL, $name=NULL, $type=1, $align='middle', $title=NULL, $admin=NULL) | |
| ImageCheckAdmin ($file, $directory='/administrator/images/', $param=NULL, $param_directory='/administrator/images/', $alt=NULL, $name=NULL, $type=1, $align='middle', $title=NULL) | |
| initGzip () | |
| josGetArrayInts ($name, $type=NULL) | |
| josHashPassword ($password) | |
| JosIsValidEmail ($email) | |
| JosIsValidName ($string) | |
| josSpoofCheck ($header=NULL, $alt=NULL, $method= 'post') | |
| josSpoofValue ($alt=NULL) | |
| menuItem ($item) | |
| menutypes () | |
| mosArrayToInts (&$array, $default=null) | |
| mosBackTrace () | |
| mosBindArrayToObject ($array, &$obj, $ignore='', $prefix=NULL, $checkSlashes=true) | |
| mosChmod ($path) | |
| mosChmodRecursive ($path, $filemode=NULL, $dirmode=NULL) | |
| mosCompressID ($ID) | |
| mosCreateGUID () | |
| mosCreateMail ($from='', $fromname='', $subject, $body) | |
| mosCurrentDate ($format="") | |
| mosErrorAlert ($text, $action='window.history.go(-1);', $mode=1) | |
| mosExpandID ($ID) | |
| mosFormatDate ($date, $format="", $offset=NULL) | |
| mosGetBrowser ($agent) | |
| mosGetOrderingList ($sql, $chop='30') | |
| mosGetOS ($agent) | |
| mosGetParam (&$arr, $name, $def=null, $mask=0) | |
| mosHash ($seed) | |
| mosMail ($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=NULL, $bcc=NULL, $attachment=NULL, $replyto=NULL, $replytoname=NULL) | |
| mosMakeHtmlSafe (&$mixed, $quote_style=ENT_QUOTES, $exclude_keys='') | |
| mosMakePassword ($length=8) | |
| mosMenuCheck ($Itemid, $menu_option, $task, $gid) | |
| mosNotAuth () | |
| mosObjectToArray ($p_obj) | |
| mosPathName ($p_path, $p_addtrailingslash=true) | |
| mosPathWay () | |
| mosPrepareSearchContent ($text, $length=200, $searchword) | |
| mosReadDirectory ($path, $filter='.', $recurse=false, $fullpath=false) | |
| mosRedirect ($url, $msg='') | |
| mosSendAdminMail ($adminName, $adminEmail, $email, $type, $title, $author) | |
| mosSmartSubstr ($text, $length=200, $searchword) | |
| mosStripslashes (&$value) | |
| mosToolTip ($tooltip, $title='', $width='', $image='tooltip.png', $text='', $href='#', $link=1) | |
| mosTreeRecurse ($id, $indent, $list, &$children, $maxlevel=9999, $level=0, $type=1) | |
| mosWarning ($warning, $title='Joomla!Warning') | |
| ReadImagesX (&$folders, &$images) | |
| SortArrayObjects (&$a, $k, $sort_direction=1) | |
| SortArrayObjects_cmp (&$a, &$b) | |
Variablen | |
| $_MAMBOTS = new mosMambotHandler() | |
| $acl = new gacl_api() | |
| $basePath = dirname( __FILE__ ) | |
| $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix ) | |
| $images [$folderPath][] = mosHTML::makeOption( $imageFile, $file ) | |
| $trans_tbl = array_flip ($trans_tbl) | |
| $url_schemes = 'data:, file:, ftp:, gopher:, imap:, ldap:, mailto:, news:, nntp:, telnet:, javascript:, irc:, mms:' | |
| enum _MOS_ALLOWHTML |
Definiert in Zeile 3019 der Datei joomla.php.
| enum _MOS_ALLOWRAW |
Definiert in Zeile 3020 der Datei joomla.php.
| enum _MOS_MAMBO_INCLUDED |
Definiert in Zeile 16 der Datei joomla.php.
| enum _MOS_NOTRIM |
Utility function to return a value from a named array or a specified default
| array | A named array | |
| string | The key to search for | |
| mixed | The default value to give if no key found | |
| int | An options mask: _MOS_NOTRIM prevents trim, _MOS_ALLOWHTML allows safe html, _MOS_ALLOWRAW allows raw input |
Definiert in Zeile 3018 der Datei joomla.php.
| _josSpoofCheck | ( | $ | array, | |
| $ | badStrings | |||
| ) |
Definiert in Zeile 6083 der Datei joomla.php.
Benutzt mosErrorAlert().
Wird benutzt von josSpoofCheck().
06084 { 06085 // Loop through each $array value and test if it contains 06086 // one of the $badStrings 06087 foreach( $array as $v ) { 06088 if (is_array( $v )) { 06089 _josSpoofCheck( $v, $badStrings ); 06090 } else { 06091 foreach ( $badStrings as $v2 ) { 06092 if ( stripos( $v, $v2 ) !== false ) { 06093 header( 'HTTP/1.0 403 Forbidden' ); 06094 mosErrorAlert( _NOT_AUTH ); 06095 exit(); // mosErrorAlert dies anyway, double check just to make sure 06096 } 06097 } 06098 } 06099 } 06100 }


| ampReplace | ( | $ | text | ) |
Replaces & with & for xhtml compliance
Needed to handle unicode conflicts due to unicode conflicts
Definiert in Zeile 5775 der Datei joomla.php.
Wird benutzt von botVoting(), search_html::display(), wrapper_menu_html::edit(), submit_content_menu_html::edit(), newsfeed_link_menu_html::edit(), content_menu_html::edit(), content_item_link_menu_html::edit(), content_blog_section_html::edit(), content_blog_category_html::edit(), contact_item_link_menu_html::edit(), components_menu_html::edit(), component_item_link_menu_html::edit(), weblink_category_table_menu_html::editCategory(), newsfeed_category_table_menu_html::editCategory(), content_category_menu_html::editCategory(), content_archive_category_menu_html::editCategory(), contact_category_table_menu_html::editCategory(), editContent(), HTML_content::editContent(), content_section_menu_html::editSection(), content_archive_section_menu_html::editSection(), GetImageFolders(), menuLink(), modules_html::modoutput_feed(), mosGetMenuLink(), mosShowHead(), save(), saveconfig(), saveContent(), saveMenu(), show(), HTML_content::show(), showArchiveCategory(), HTML_content::showCategories(), HTML_newsfeed::showNewsfeeds(), showPathway(), HTML_weblinks::showTable() und HTML_newsfeed::showTable().
05775 { 05776 $text = str_replace( '&&', '*--*', $text ); 05777 $text = str_replace( '&#', '*-*', $text ); 05778 $text = str_replace( '&', '&', $text ); 05779 $text = preg_replace( '|&(?![\w]+;)|', '&', $text ); 05780 $text = str_replace( '*-*', '&#', $text ); 05781 $text = str_replace( '*--*', '&&', $text ); 05782 05783 return $text; 05784 }

| doGzip | ( | ) |
Perform GZIP
Borrowed from php.net!
Definiert in Zeile 4117 der Datei joomla.php.
04117 { 04118 global $do_gzip_compress; 04119 if ( $do_gzip_compress ) { 04123 $gzip_contents = ob_get_contents(); 04124 ob_end_clean(); 04125 04126 $gzip_size = strlen($gzip_contents); 04127 $gzip_crc = crc32($gzip_contents); 04128 04129 $gzip_contents = gzcompress($gzip_contents, 9); 04130 $gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4); 04131 04132 echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; 04133 echo $gzip_contents; 04134 echo pack('V', $gzip_crc); 04135 echo pack('V', $gzip_size); 04136 } else { 04137 ob_end_flush(); 04138 } 04139 }
| GetImageFolders | ( | &$ | temps, | |
| $ | path | |||
| ) |
Definiert in Zeile 5065 der Datei joomla.php.
Benutzt ampReplace(), mosHTML::makeOption() und mosHTML::selectList().
Wird benutzt von edit(), editContent() und editItem().
05065 { 05066 if ( $temps[0]->value != 'None' ) { 05067 foreach( $temps as $temp ) { 05068 if ( substr( $temp->value, -1, 1 ) != '/' ) { 05069 $temp = $temp->value .'/'; 05070 $folders[] = mosHTML::makeOption( $temp, $temp ); 05071 } else { 05072 $temp = $temp->value; 05073 $temp = ampReplace( $temp ); 05074 $folders[] = mosHTML::makeOption( $temp, $temp ); 05075 } 05076 } 05077 } else { 05078 $folders[] = mosHTML::makeOption( 'None Selected' ); 05079 } 05080 05081 $javascript = "onchange=\"changeDynaList( 'imagefiles', folderimages, document.adminForm.folders.options[document.adminForm.folders.selectedIndex].value, 0, 0);\""; 05082 $getfolders = mosHTML::selectList( $folders, 'folders', 'class="inputbox" size="1" '. $javascript, 'value', 'text', '/' ); 05083 05084 return $getfolders; 05085 }


| GetImages | ( | &$ | images, | |
| $ | path, | |||
| $ | base = '/' | |||
| ) |
Definiert in Zeile 5087 der Datei joomla.php.
Benutzt $images, mosHTML::makeOption() und mosHTML::selectList().
Wird benutzt von edit(), editContent() und editItem().
05087 { 05088 if ( is_array($base) && count($base) > 0 ) { 05089 if ( $base[0]->value != '/' ) { 05090 $base = $base[0]->value .'/'; 05091 } else { 05092 $base = $base[0]->value; 05093 } 05094 } else { 05095 $base = '/'; 05096 } 05097 05098 if ( !isset($images[$base] ) ) { 05099 $images[$base][] = mosHTML::makeOption( '' ); 05100 } 05101 05102 $javascript = "onchange=\"previewImage( 'imagefiles', 'view_imagefiles', '$path/' )\" onfocus=\"previewImage( 'imagefiles', 'view_imagefiles', '$path/' )\""; 05103 $getimages = mosHTML::selectList( $images[$base], 'imagefiles', 'class="inputbox" size="10" multiple="multiple" '. $javascript , 'value', 'text', null ); 05104 05105 return $getimages; 05106 }


| GetSavedImages | ( | &$ | row, | |
| $ | path | |||
| ) |
Definiert in Zeile 5108 der Datei joomla.php.
Benutzt $filename, mosHTML::makeOption() und mosHTML::selectList().
Wird benutzt von edit(), editContent() und editItem().
05108 { 05109 $images2 = array(); 05110 05111 foreach( $row->images as $file ) { 05112 $temp = explode( '|', $file ); 05113 if( strrchr($temp[0], '/') ) { 05114 $filename = substr( strrchr($temp[0], '/' ), 1 ); 05115 } else { 05116 $filename = $temp[0]; 05117 } 05118 $images2[] = mosHTML::makeOption( $file, $filename ); 05119 } 05120 05121 $javascript = "onchange=\"previewImage( 'imagelist', 'view_imagelist', '$path/' ); showImageProps( '$path/' ); \""; 05122 $imagelist = mosHTML::selectList( $images2, 'imagelist', 'class="inputbox" size="10" '. $javascript, 'value', 'text' ); 05123 05124 return $imagelist; 05125 }


| ImageCheck | ( | $ | file, | |
| $ | directory = '/images/M_images/', |
|||
| $ | param = NULL, |
|||
| $ | param_directory = '/images/M_images/', |
|||
| $ | alt = NULL, |
|||
| $ | name = NULL, |
|||
| $ | type = 1, |
|||
| $ | align = 'middle', |
|||
| $ | title = NULL, |
|||
| $ | admin = NULL | |||
| ) |
Checks to see if an image exists in the current templates image directory if it does it loads this image. Otherwise the default image is loaded. Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image
Definiert in Zeile 5133 der Datei joomla.php.
Benutzt $cur_template, $directory, $image, $name, $path, $title und $type.
Wird benutzt von addNew(), apply(), archiveList(), back(), botVoting(), cancel(), contactpage(), deleteList(), search_html::display(), divider(), editCss(), editHtml(), HTML_content::EditIcon(), editList(), HTML_content::EmailIcon(), ImageCheckAdmin(), media_manager(), output_rssfeed(), HTML_content::PdfIcon(), preview(), mosHTML::PrintIcon(), publish(), publishList(), save(), saveedit(), savenew(), HTML_weblinks::showTable(), HTML_newsfeed::showTable(), unarchiveList(), unpublish() und unpublishList().
05133 { 05134 global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe; 05135 05136 $cur_template = $mainframe->getTemplate(); 05137 05138 $name = ( $name ? ' name="'. $name .'"' : '' ); 05139 $title = ( $title ? ' title="'. $title .'"' : '' ); 05140 $alt = ( $alt ? ' alt="'. $alt .'"' : ' alt=""' ); 05141 $align = ( $align ? ' align="'. $align .'"' : '' ); 05142 05143 // change directory path from frontend or backend 05144 if ($admin) { 05145 $path = '/administrator/templates/'. $cur_template .'/images/'; 05146 } else { 05147 $path = '/templates/'. $cur_template .'/images/'; 05148 } 05149 05150 if ( $param ) { 05151 $image = $mosConfig_live_site. $param_directory . $param; 05152 if ( $type ) { 05153 $image = '<img src="'. $image .'" '. $alt . $name . $align .' border="0" />'; 05154 } 05155 } else if ( $param == -1 ) { 05156 $image = ''; 05157 } else { 05158 if ( file_exists( $mosConfig_absolute_path . $path . $file ) ) { 05159 $image = $mosConfig_live_site . $path . $file; 05160 } else { 05161 // outputs only path to image 05162 $image = $mosConfig_live_site. $directory . $file; 05163 } 05164 05165 // outputs actual html <img> tag 05166 if ( $type ) { 05167 $image = '<img src="'. $image .'" '. $alt . $name . $title . $align .' border="0" />'; 05168 } 05169 } 05170 05171 return $image; 05172 }

| ImageCheckAdmin | ( | $ | file, | |
| $ | directory = '/administrator/images/', |
|||
| $ | param = NULL, |
|||
| $ | param_directory = '/administrator/images/', |
|||
| $ | alt = NULL, |
|||
| $ | name = NULL, |
|||
| $ | type = 1, |
|||
| $ | align = 'middle', |
|||
| $ | title = NULL | |||
| ) |
Checks to see if an image exists in the current templates image directory if it does it loads this image. Otherwise the default image is loaded. Also can be used in conjunction with the menulist param to create the chosen image load the default or use no image
Definiert in Zeile 5180 der Datei joomla.php.
Benutzt $directory, $image, $name, $title, $type und ImageCheck().
Wird benutzt von mosMenuBar::addNew(), mosMenuBar::addNewX(), mosMenuBar::apply(), mosMenuBar::archiveList(), mosMenuBar::assign(), mosMenuBar::back(), mosMenuBar::cancel(), mosMenuBar::custom(), mosMenuBar::customX(), mosMenuBar::deleteList(), mosMenuBar::deleteListX(), mosMenuBar::divider(), mosMenuBar::editCssX(), mosMenuBar::editHtml(), mosMenuBar::editHtmlX(), mosMenuBar::editList(), mosMenuBar::editListX(), mosMenuBar::help(), mosMenuBar::makeDefault(), mosMenuBar::media_manager(), mosMenuBar::preview(), mosMenuBar::publish(), mosMenuBar::publishList(), mosMenuBar::save(), mosMenuBar::saveedit(), mosMenuBar::savenew(), mosMenuBar::trash(), mosMenuBar::unarchiveList(), mosMenuBar::unpublish() und mosMenuBar::unpublishList().
05180 { 05181 /* 05182 global $mosConfig_absolute_path, $mosConfig_live_site, $mainframe; 05183 05184 $cur_template = $mainframe->getTemplate(); 05185 05186 $name = ( $name ? ' name="'. $name .'"' : '' ); 05187 $title = ( $title ? ' title="'. $title .'"' : '' ); 05188 $alt = ( $alt ? ' alt="'. $alt .'"' : ' alt=""' ); 05189 $align = ( $align ? ' align="'. $align .'"' : '' ); 05190 05191 $path = '/administrator/templates/'. $cur_template .'/images/'; 05192 05193 if ( $param ) { 05194 $image = $mosConfig_live_site. $param_directory . $param; 05195 if ( $type ) { 05196 $image = '<img src="'. $image .'" '. $alt . $name . $align .' border="0" />'; 05197 } 05198 } else if ( $param == -1 ) { 05199 $image = ''; 05200 } else { 05201 if ( file_exists( $mosConfig_absolute_path . $path . $file ) ) { 05202 $image = $mosConfig_live_site . $path . $file; 05203 } else { 05204 // outputs only path to image 05205 $image = $mosConfig_live_site. $directory . $file; 05206 } 05207 05208 // outputs actual html <img> tag 05209 if ( $type ) { 05210 $image = '<img src="'. $image .'" '. $alt . $name . $title . $align .' border="0" />'; 05211 } 05212 } 05213 */ 05214 // functionality consolidated into ImageCheck 05215 $image = mosAdminMenus::ImageCheck( $file, $directory, $param, $param_directory, $alt, $name, $type, $align, $title, $admin=1 ); 05216 05217 return $image; 05218 }


| initGzip | ( | ) |
Initialise GZIP
Definiert in Zeile 4060 der Datei joomla.php.
04060 { 04061 global $mosConfig_gzip, $do_gzip_compress; 04062 04063 $do_gzip_compress = FALSE; 04064 if ($mosConfig_gzip == 1) { 04065 $phpver = phpversion(); 04066 $useragent = mosGetParam( $_SERVER, 'HTTP_USER_AGENT', '' ); 04067 $canZip = mosGetParam( $_SERVER, 'HTTP_ACCEPT_ENCODING', '' ); 04068 04069 $gzip_check = 0; 04070 $zlib_check = 0; 04071 $gz_check = 0; 04072 $zlibO_check = 0; 04073 $sid_check = 0; 04074 if ( strpos( $canZip, 'gzip' ) !== false) { 04075 $gzip_check = 1; 04076 } 04077 if ( extension_loaded( 'zlib' ) ) { 04078 $zlib_check = 1; 04079 } 04080 if ( function_exists('ob_gzhandler') ) { 04081 $gz_check = 1; 04082 } 04083 if ( ini_get('zlib.output_compression') ) { 04084 $zlibO_check = 1; 04085 } 04086 if ( ini_get('session.use_trans_sid') ) { 04087 $sid_check = 1; 04088 } 04089 04090 if ( $phpver >= '4.0.4pl1' && ( strpos($useragent,'compatible') !== false || strpos($useragent,'Gecko') !== false ) ) { 04091 // Check for gzip header or northon internet securities or session.use_trans_sid 04092 if ( ( $gzip_check || isset( $_SERVER['---------------']) ) && $zlib_check && $gz_check && !$zlibO_check && !$sid_check ) { 04093 // You cannot specify additional output handlers if 04094 // zlib.output_compression is activated here 04095 ob_start( 'ob_gzhandler' ); 04096 return; 04097 } 04098 } else if ( $phpver > '4.0' ) { 04099 if ( $gzip_check ) { 04100 if ( $zlib_check ) { 04101 $do_gzip_compress = TRUE; 04102 ob_start(); 04103 ob_implicit_flush(0); 04104 04105 header( 'Content-Encoding: gzip' ); 04106 return; 04107 } 04108 } 04109 } 04110 } 04111 ob_start(); 04112 }
| josGetArrayInts | ( | $ | name, | |
| $ | type = NULL | |||
| ) |
Definiert in Zeile 5906 der Datei joomla.php.
Benutzt $name, $type, mosArrayToInts(), mosGetParam() und NULL.
Wird benutzt von TOOLBAR_menus::_EDIT(), copyCategorySave(), copyMenu(),