Overview

Packages

  • admin
  • classes
    • media
  • CodeIgniter
    • Libraries
  • core
  • functions
  • JSMin
  • None
  • OpenID
  • PHP
  • PHPMailer
  • plugins
    • admin
    • development
    • feed
    • mail
    • media
    • misc
    • seo
    • spam
    • uploader
    • users
    • zenpage
    • zenphoto
      • news
  • Services
    • JSON

Classes

  • _zp_captcha
  • _zp_HTML_cache
  • admin_approval
  • Album
  • AlbumBase
  • AlbumZip
  • AMFReader
  • AMFStream
  • AnyFile
  • AnyFile_Options
  • Auth_OpenID
  • Auth_OpenID_AlreadySigned
  • Auth_OpenID_AssociateRequest
  • Auth_OpenID_Association
  • Auth_OpenID_AuthRequest
  • Auth_OpenID_AX
  • Auth_OpenID_AX_AttrInfo
  • Auth_OpenID_AX_Error
  • Auth_OpenID_AX_FetchRequest
  • Auth_OpenID_AX_FetchResponse
  • Auth_OpenID_AX_KeyValueMessage
  • Auth_OpenID_AX_Message
  • Auth_OpenID_AX_StoreRequest
  • Auth_OpenID_AX_StoreResponse
  • Auth_OpenID_BcMathWrapper
  • Auth_OpenID_CancelResponse
  • Auth_OpenID_CheckAuthRequest
  • Auth_OpenID_CheckIDRequest
  • Auth_OpenID_Consumer
  • Auth_OpenID_ConsumerResponse
  • Auth_OpenID_CryptUtil
  • Auth_OpenID_DatabaseConnection
  • Auth_OpenID_Decoder
  • Auth_OpenID_DiffieHellman
  • Auth_OpenID_DiffieHellmanSHA1ConsumerSession
  • Auth_OpenID_DiffieHellmanSHA1ServerSession
  • Auth_OpenID_DiffieHellmanSHA256ConsumerSession
  • Auth_OpenID_DiffieHellmanSHA256ServerSession
  • Auth_OpenID_DumbStore
  • Auth_OpenID_Encoder
  • Auth_OpenID_EncodingError
  • Auth_OpenID_Extension
  • Auth_OpenID_FailureResponse
  • Auth_OpenID_FileStore
  • Auth_OpenID_GenericConsumer
  • Auth_OpenID_GmpMathWrapper
  • Auth_OpenID_KVForm
  • Auth_OpenID_MalformedReturnURL
  • Auth_OpenID_MalformedTrustRoot
  • Auth_OpenID_Mapping
  • Auth_OpenID_MathLibrary
  • Auth_OpenID_MDB2Store
  • Auth_OpenID_MemcachedStore
  • Auth_OpenID_Message
  • Auth_OpenID_MySQLStore
  • Auth_OpenID_NamespaceMap
  • Auth_OpenID_NoReturnToError
  • Auth_OpenID_OpenIDStore
  • Auth_OpenID_PAPE_Request
  • Auth_OpenID_PAPE_Response
  • Auth_OpenID_Parse
  • Auth_OpenID_PlainTextConsumerSession
  • Auth_OpenID_PlainTextServerSession
  • Auth_OpenID_PostgreSQLStore
  • Auth_OpenID_Request
  • Auth_OpenID_Server
  • Auth_OpenID_ServerError
  • Auth_OpenID_ServerErrorContainer
  • Auth_OpenID_ServerRequest
  • Auth_OpenID_ServerResponse
  • Auth_OpenID_ServiceEndpoint
  • Auth_OpenID_ServiceEndpointLoader
  • Auth_OpenID_SessionNegotiator
  • Auth_OpenID_SetupNeededResponse
  • Auth_OpenID_Signatory
  • Auth_OpenID_SigningEncoder
  • Auth_OpenID_SQLiteStore
  • Auth_OpenID_SQLStore
  • Auth_OpenID_SRegBase
  • Auth_OpenID_SRegRequest
  • Auth_OpenID_SRegResponse
  • Auth_OpenID_SuccessResponse
  • Auth_OpenID_TrustRoot
  • Auth_OpenID_TypeURIMismatch
  • Auth_OpenID_UntrustedReturnURL
  • Auth_OpenID_WebResponse
  • Auth_Yadis_Discovery
  • Auth_Yadis_DiscoveryResult
  • Auth_Yadis_dom
  • Auth_Yadis_domxml
  • Auth_Yadis_HTTPFetcher
  • Auth_Yadis_HTTPResponse
  • Auth_Yadis_Manager
  • Auth_Yadis_ManagerLoader
  • Auth_Yadis_ParanoidHTTPFetcher
  • Auth_Yadis_ParseHTML
  • Auth_Yadis_PHPSession
  • Auth_Yadis_PlainHTTPFetcher
  • Auth_Yadis_ProxyResolver
  • Auth_Yadis_Service
  • Auth_Yadis_SessionLoader
  • Auth_Yadis_XMLParser
  • Auth_Yadis_XRDS
  • Auth_Yadis_Yadis
  • auto_backup
  • AVCSequenceParameterSetReader
  • bxslider
  • cacheManager
  • cacheManagerFeed
  • CI_jsmin
  • CI_load
  • cloneZenphoto
  • codeIgniter_kludge
  • colorbox
  • Comment
  • comment_form
  • contactformOptions
  • crop_image
  • cycle
  • defaultCodeblocks
  • deprecated_functions
  • DownloadList
  • dynamic_locale
  • dynamicAlbum
  • elFinder_options
  • email_new_user
  • exampleMacros
  • external_auth
  • ExternalFeed
  • externalFeed_options
  • favorites
  • favoritesOptions
  • federated_logon
  • feed
  • fieldExtender
  • flag_thumbnail
  • Gallery
  • galleryArticles
  • getID3
  • getid3_aac
  • getid3_apetag
  • getid3_flv
  • getid3_handler
  • getid3_id3v1
  • getid3_id3v2
  • getid3_lib
  • getid3_lyrics3
  • getid3_mp3
  • getid3_mpeg
  • getid3_quicktime
  • getid3_swf
  • GoogleMap
  • Googlemaps
  • googleVerifyOptions
  • hitcounter
  • HTML
  • htmlmetatags
  • http_auth
  • Image
  • image_effects
  • internal_deprecations
  • ipBlocker
  • jcarousel
  • jPlayer
  • jplayer_options
  • jquery_rating
  • JSMin
  • lib_GD_Options
  • lib_Imagick_Options
  • lib_NoGraphics
  • MediaObject
  • menu_manager
  • MergedRSS
  • MergedRSSOptions
  • mobile
  • Mobile_Detect
  • mobileTheme
  • multipleLayoutOptions
  • null_seo
  • OAuthConsumer
  • OAuthDataStore
  • OAuthRequest
  • OAuthServer
  • OAuthSignatureMethod
  • OAuthSignatureMethod_HMAC_SHA1
  • OAuthSignatureMethod_PLAINTEXT
  • OAuthSignatureMethod_RSA_SHA1
  • OAuthToken
  • OAuthUtil
  • pagedThumbsNav
  • pagedthumbsOptions
  • PclZip
  • PersistentObject
  • PHPMailer
  • PlainText
  • POP3
  • print_album_menu
  • pseudoPlayer
  • publishContent
  • quota_manager
  • reCaptcha
  • ReCaptchaResponse
  • register_user
  • rewriteRules
  • rewriteTokens
  • RSS
  • RSS_internal_deprecations
  • rss_options
  • search_statistics
  • SearchEngine
  • security_logger
  • seo_locale
  • Services_JSON
  • Services_JSON_Error
  • setupexternalFeed
  • setupRSS
  • show_not_loggedin
  • sitemap
  • slideshow
  • SMTP
  • static_html_cache
  • tagsuggest
  • TextObject
  • TextObject_internal_deprecations
  • TextObject_Options
  • ThemeObject
  • themeSwitcher
  • tinymce4Options
  • tinyURL
  • Transientimage
  • tweet
  • TwitterOAuth
  • UploadHandler
  • user_expiry
  • user_groups
  • user_logout_options
  • userAddressFields
  • utf8
  • Video
  • Video_internal_deprecations
  • VideoObject_Options
  • viewer_size_image_options
  • WEBdocs
  • WEBdocs_Options
  • xmpMetadata
  • Zenpage
  • Zenpage_internal_deprecations
  • ZenpageCategory
  • zenpagecms
  • ZenpageItems
  • ZenpageNews
  • ZenpagePage
  • ZenpageRoot
  • Zenphoto_Administrator
  • Zenphoto_Authority
  • zenphoto_org_news
  • zenphoto_seo
  • zenphotoDonate
  • ZipStream
  • zp_PHPMailer
  • zpCaptcha
  • zpFunctions
  • zpLegacySpam
  • zpMutex
  • zpSimpleSpam
  • zpTrivialSpam

Exceptions

  • BadFunctionCallException
  • BadMethodCallException
  • Exception
  • getid3_exception
  • JSMin_UnterminatedCommentException
  • JSMin_UnterminatedRegExpException
  • JSMin_UnterminatedStringException
  • LogicException
  • OAuthExcept
  • phpmailerException

Functions

  • __autoload
  • _escape_xref
  • _recaptcha_aes_encrypt
  • _recaptcha_aes_pad
  • _recaptcha_http_post
  • _recaptcha_mailhide_email_parts
  • _recaptcha_mailhide_urlbase64
  • _recaptcha_qsencode
  • accessAllAlbums
  • add_context
  • addalbumsToDatabase
  • addCategoriesToDatabase
  • addGeoCoord
  • addItem
  • addPagesToDatabase
  • addPluginScript
  • addPluginType
  • addSubalbumMenus
  • admin_album_list
  • admin_securityChecks
  • admin_showupdate
  • adminPageNav
  • adminToolbox
  • albumNumber
  • applyMacros
  • Auth_OpenID_arrangeByType
  • Auth_OpenID_AX_checkAlias
  • Auth_OpenID_AX_toTypeURIs
  • Auth_OpenID_bestMatchingService
  • Auth_OpenID_checkFieldName
  • Auth_OpenID_checkSessionType
  • Auth_OpenID_checkTimestamp
  • Auth_OpenID_detectMathLibrary
  • Auth_OpenID_discover
  • Auth_OpenID_discoverURI
  • Auth_OpenID_discoverWithoutYadis
  • Auth_OpenID_discoverWithYadis
  • Auth_OpenID_discoverXRI
  • Auth_OpenID_extractReturnURL
  • Auth_OpenID_findOPLocalIdentifier
  • Auth_OpenID_getAllAssociationTypes
  • Auth_OpenID_getAllowedReturnURLs
  • Auth_OpenID_getAuthorityPattern
  • Auth_OpenID_getAvailableSessionTypes
  • Auth_OpenID_getDefaultAssociationOrder
  • Auth_OpenID_getDefaultGen
  • Auth_OpenID_getDefaultMod
  • Auth_OpenID_getDefaultNegotiator
  • Auth_OpenID_getEncodedPattern
  • Auth_OpenID_getEncryptedNegotiator
  • Auth_OpenID_getEscapeRE
  • Auth_OpenID_getMathLib
  • Auth_OpenID_getOnlyEncryptedOrder
  • Auth_OpenID_getOpenIDConsumerTypeURIs
  • Auth_OpenID_getOpenIDTypeName
  • Auth_OpenID_getOpenIDTypeURIs
  • Auth_OpenID_getOPOrUserServices
  • Auth_OpenID_getSecretSize
  • Auth_OpenID_getSessionTypes
  • Auth_OpenID_getSupportedAssociationTypes
  • Auth_OpenID_getUnreserved
  • Auth_OpenID_getURIPattern
  • Auth_OpenID_getURLIllegalCharRE
  • Auth_OpenID_HMACSHA1
  • Auth_OpenID_HMACSHA256
  • Auth_OpenID_include_init
  • Auth_OpenID_isError
  • Auth_OpenID_isOpenID1
  • Auth_OpenID_legacy_discover
  • Auth_OpenID_makeOpenIDEndpoints
  • Auth_OpenID_math_extensions
  • Auth_OpenID_mkNonce
  • Auth_OpenID_noMathSupport
  • Auth_OpenID_pct_encoded_replace
  • Auth_OpenID_pct_encoded_replace_unreserved
  • Auth_OpenID_registerNamespaceAlias
  • Auth_OpenID_remove_dot_segments
  • Auth_OpenID_removeNamespaceAlias
  • Auth_OpenID_returnToMatches
  • Auth_OpenID_setNoMathSupport
  • Auth_OpenID_SHA1
  • Auth_OpenID_SHA256
  • Auth_OpenID_splitNonce
  • Auth_OpenID_supportsSReg
  • Auth_OpenID_urinorm
  • Auth_OpenID_verifyReturnTo
  • Auth_Yadis_array_scramble
  • Auth_Yadis_escapeForIRI
  • Auth_Yadis_getCanonicalID
  • Auth_Yadis_getDefaultProxy
  • Auth_Yadis_getEscapeRE
  • Auth_Yadis_getIPrivateChars
  • Auth_Yadis_getNSMap
  • Auth_Yadis_getServiceEndpoints
  • Auth_Yadis_getSupportedExtensions
  • Auth_Yadis_getUCSChars
  • Auth_Yadis_getXMLParser
  • Auth_Yadis_getXRDExpiration
  • Auth_Yadis_getXrefRE
  • Auth_Yadis_getXRIAuthorities
  • Auth_Yadis_identifierScheme
  • Auth_Yadis_iriToURI
  • Auth_Yadis_pct_escape_unicode
  • Auth_Yadis_providerIsAuthoritative
  • Auth_Yadis_rootAuthority
  • Auth_Yadis_setDefaultParser
  • Auth_Yadis_startswith
  • Auth_Yadis_toIRINormal
  • Auth_Yadis_toURINormal
  • Auth_Yadis_XRI
  • Auth_Yadis_XRIAppendArgs
  • authorSelector
  • build_query
  • build_url
  • bulkActionRedirect
  • bulkTags
  • byteConvert
  • cacheImage
  • checkAccess
  • checkAlbumimagesort
  • checkAlbumParentid
  • checkAlbumPassword
  • checkChosenItemStatus
  • checkChosenMenuset
  • checked
  • checkFolder
  • checkForEmptyTitle
  • checkForGuest
  • checkForPage
  • checkForPassword
  • checkForUpdate
  • checkHitcounterDisplay
  • checkIfChecked
  • checkIfLockedNews
  • checkIfLockedPage
  • checkIfNew
  • checkInstall
  • checkLayoutUseForImages
  • checkNewsAccess
  • checkNewsCategoryPassword
  • checkObjectsThumb
  • checkPagePassword
  • checkPageValidity
  • checkParentLayouts
  • checkPublishDates
  • checkRequiredField
  • checkSelectedAlbum
  • checkSignature
  • cleanAlbum
  • cleanHTML
  • clearSitemapCache
  • clonedFrom
  • codeblocktabsJS
  • comment_form_addComment
  • comment_form_handle_comment
  • comment_form_PaginationJS
  • comment_form_postcomment
  • comment_form_print10Most
  • comment_form_visualEditor
  • commentFormUseCaptcha
  • commentReply
  • commentsAllowed
  • consolidatedEditMessages
  • copyLayoutSelection
  • copyThemeDirectory
  • countArticles
  • countCombiNews
  • createMenuIfNotExists
  • createRelatedItemsResultArray
  • cron_starter
  • currentRelativeURL
  • customOptions
  • dateDiff
  • datepickerJS
  • dateTimeConvert
  • db_affected_rows
  • db_close
  • db_collation
  • db_connect
  • db_count
  • db_create
  • db_create_table
  • db_error
  • db_fetch_assoc
  • db_fetch_row
  • db_free_result
  • db_getSQLmode
  • db_insert_id
  • db_LIKE_escape
  • db_list_fields
  • db_name
  • db_num_rows
  • db_permissions
  • db_quote
  • db_setSQLmode
  • db_show
  • db_software
  • db_table_update
  • db_truncate_table
  • debug404
  • debugLog
  • debugLogBacktrace
  • debugLogVar
  • defaultCodeblocks_codebox
  • deleteArticle
  • deleteCategory
  • deleteItem
  • deleteLayoutSelection
  • deletePage
  • deleteThemeDirectory
  • detect_fetcher
  • detect_math
  • detect_query_corruption
  • detect_random
  • detect_stores
  • detect_xml
  • dircopy
  • displayError
  • doIncludes
  • elFinder_admin_tabs
  • elFinder_tinymce
  • enableExtension
  • escape
  • executeRSS
  • exitZP
  • exposeZenPhotoInformations
  • extensionEnabled
  • fetchComments
  • filesystemToInternal
  • filter_extractReturnURL
  • filter_MatchesAnyOpenIDConsumerType
  • filter_MatchesAnyOpenIDType
  • filterImageQuery
  • fix_path_redirect
  • formatList
  • fullText
  • galleryAlbumsPerPage
  • genAlbumList
  • generateCaptcha
  • generateLanguageList
  • generateListFromArray
  • generateListFromFiles
  • generateRadiobuttonsFromArray
  • generateSitemapCacheFile
  • generateSitemapIndexCacheFile
  • generateUnorderedListFromArray
  • get_AnyFile_suffixes
  • get_context
  • get_filterScript
  • get_instance
  • get_language_string
  • getAdminThumb
  • getAlbumArray
  • getAlbumBreadcrumb
  • getAlbumBreadcrumbAdmin
  • getAlbumCustomData
  • getAlbumData
  • getAlbumDate
  • getAlbumDesc
  • getAlbumFolder
  • getAlbumGeodata
  • getAlbumId
  • getAlbumInherited
  • getAlbumLinkURL
  • getAlbumLocation
  • getAlbumPage
  • getAlbumPlace
  • getAlbumStatistic
  • getAlbumThumb
  • getAlbumTitle
  • getAlbumURL
  • getAllAccessibleAlbums
  • getAllAlbums
  • getAllArticleDates
  • getAllCategories
  • getAllDates
  • getAllowedTags
  • getAllSubAlbumIDs
  • getAllSubalbums
  • getAllTagsCount
  • getAllTagsFromAlbum
  • getAllTagsFromAlbum_multi_unique
  • getAllTagsFromZenpage
  • getAllTagsUnique
  • getAllTranslations
  • getAnnotatedAlbumTitle
  • getAnnotatedImageTitle
  • getArticles
  • getAuthor
  • getBare
  • getBareAlbumDesc
  • getBareAlbumTitle
  • getBareGalleryDesc
  • getBareGalleryTitle
  • getBareImageDesc
  • getBareImageTitle
  • getBareNewsAlbumTitle
  • getBareNewsTitle
  • getBarePageTitle
  • getCategory
  • getCategoryID
  • getCategoryLink
  • getCategoryParentID
  • getCategorySortOrder
  • getCategoryTitle
  • getCheckboxState
  • getCodeblock
  • getCombiNews
  • getCommentAddress
  • getCommentAuthorEmail
  • getCommentAuthorLink
  • getCommentAuthorName
  • getCommentAuthorSite
  • getCommentBody
  • getCommentCount
  • getCommentDate
  • getCommentDateTime
  • getCommentErrors
  • getCommentsAllowed
  • getCommentStored
  • getCommentTime
  • getConsumer
  • getContentShorten
  • getCurrentMenuItem
  • getCurrentNewsArchive
  • getCurrentNewsCategory
  • getCurrentNewsCategoryID
  • getCurrentNewsCategoryParentID
  • getCurrentNewsPage
  • getCurrentPage
  • getCurrentTheme
  • getCustomAlbumThumb
  • getCustomAlbumThumbMaxSpace
  • getCustomImageURL
  • getCustomPageURL
  • getCustomSizedImageMaxSpace
  • getCustomSizedImageThumbMaxSpace
  • getDefaultHeight
  • getDefaultSizedImage
  • getDefaultWidth
  • getDownloadLink
  • getdownloadList
  • getDownloadURL
  • getE
  • getEnabledPlugins
  • getExpiryDatePost
  • getFavoritesURL
  • getField
  • getFirstImageURL
  • getFullHeight
  • getFullImageURL
  • getFullNewsImage
  • getFullWidth
  • getGalleryDesc
  • getGalleryIndexURL
  • getGalleryTitle
  • getGeoCoord
  • getHeadTitle
  • getHitcounter
  • getImageArgs
  • getImageCacheFilename
  • getImageCachePostfix
  • getImageCity
  • getImageCountry
  • getImageCustomData
  • getImageData
  • getImageDate
  • getImageDesc
  • getImageEXIFData
  • getImageGeodata
  • getImageID
  • getImageLinkURL
  • getImageLocation
  • getImageMetaData
  • getImageParameters
  • getImageProcessorURI
  • getImageProcessorURIFromCacheName
  • getImageRotation
  • getImageSortOrder
  • getImageState
  • getImageStatistic
  • getImageThumb
  • getImageTitle
  • getImageURI
  • getImageURL
  • getItem
  • getItemByID
  • getItemTitleAndURL
  • getjPlayerSkinCSS
  • getjPlayerSkins
  • getLanguageArray
  • getLanguageFlag
  • getLastImageURL
  • getLatestComments
  • getLatestNews
  • getLatestZenpageComments
  • getLayout
  • getLayoutSelector
  • getLink
  • getLinkHTML
  • getLogTabs
  • getMacros
  • getMainSiteName
  • getMainSiteURL
  • getManagedAlbumList
  • getMaxSpaceContainer
  • getMenuFromLink
  • getMenuItemChilds
  • getMenuItems
  • getMenumanagerPredicessor
  • getMenumanagerSuccessor
  • getMenuSetSelector
  • getMenuVisibility
  • getMimeString
  • getNestedAlbumList
  • getNewsAdminOption
  • getNewsAdminOptionPath
  • getNewsAlbumName
  • getNewsAlbumTitle
  • getNewsAlbumURL
  • getNewsArchivePath
  • getNewsArchiveURL
  • getNewsAuthor
  • getNewsCategories
  • getNewsCategoryCustomData
  • getNewsCategoryDesc
  • getNewsCategoryPath
  • getNewsCategoryURL
  • getNewsContent
  • getNewsContentShorten
  • getNewsCustomData
  • getNewsDate
  • getNewsExtraContent
  • getNewsID
  • getNewsImageTags
  • getNewsIndexURL
  • getNewsLink
  • getNewsPagesStatistic
  • getNewsPathNav
  • getNewsReadMore
  • getNewsTitle
  • getNewsTitleLink
  • getNewsTitlePath
  • getNewsType
  • getNewsURL
  • getNewsVideoContent
  • getNextAlbum
  • getNextAlbumURL
  • getNextImageThumb
  • getNextImageURL
  • getNextNewsPageURL
  • getNextNewsURL
  • getNextPageURL
  • getNextPrevNews
  • getNotViewableAlbums
  • getNotViewableImages
  • getNumAlbums
  • getNumAllSubalbums
  • getNumImages
  • getNumNews
  • getNumPages
  • getNumSubalbums
  • getOpenIDURL
  • getOption
  • getOptionFromDB
  • getOptionList
  • getPageAuthor
  • getPageContent
  • getPageCustomData
  • getPageDate
  • getPageExtraContent
  • getPageID
  • getPageLastChangeDate
  • getPageLinkPath
  • getPageLinkURL
  • getPageNavList
  • getPageNumURL
  • getPageParentID
  • getPageRedirect
  • getPages
  • getPageSelector
  • getPageSortorder
  • getPageTitle
  • getPageTitleLink
  • getPageURL
  • getParentAlbums
  • getParentAlbumsAdmin
  • getParentBreadcrumb
  • getParentItems
  • getParentMenuItems
  • getParentNewsCategories
  • getParentPages
  • getPasswordProtectImage
  • getPHPFiles
  • getPlugin
  • getPluginFiles
  • getPluginTabs
  • getPrevAlbum
  • getPrevAlbumURL
  • getPrevImageThumb
  • getPrevImageURL
  • getPrevNewsPageURL
  • getPrevNewsURL
  • getPrevPageURL
  • getProtectedImageURL
  • getRandomImages
  • getRandomImagesAlbum
  • getRating
  • getRelatedItems
  • getRequestURI
  • getReturnTo
  • getRSSHeaderLink
  • getRSSLink
  • getScheme
  • getSearchDate
  • getSearchURL
  • getSearchWords
  • getSelectedLayout
  • getSerializedArray
  • getSetClause
  • getSiteHomeURL
  • getSitemapAlbumList
  • getSitemapAlbums
  • getSitemapGoogleImageVideoExtras
  • getSitemapGoogleLoopIndex
  • getSitemapImages
  • getSitemapIndexLinks
  • getSitemapZenpageNewsArticles
  • getSitemapZenpageNewsCategories
  • getSitemapZenpageNewsIndex
  • getSitemapZenpagePages
  • getSizeCustomImage
  • getSizeDefaultImage
  • getSizeDefaultThumb
  • getSizedImageURL
  • getSizeFullImage
  • getStore
  • getSubCategories
  • getSubtabs
  • getSuffix
  • getTagCountByAccess
  • getTagOrder
  • getTags
  • gettext_pl
  • gettext_th
  • getTheme
  • getThemeFiles
  • getThemeOption
  • getTimezones
  • getTinyMCE4ConfigFiles
  • getTitle
  • getTotalArticles
  • getTotalImagesIn
  • getTotalNewsPages
  • getTotalPages
  • getTrustRoot
  • getUnprotectedImageURL
  • getUrAlbum
  • getURL
  • getUserIP
  • getUserLocale
  • getVersion
  • getViewerImageSize
  • getWatermarkParam
  • getWatermarkPath
  • getWatermarks
  • getWhereClause
  • getXSRFToken
  • getZenpageHitcounter
  • getZenpageRSSHeaderLink
  • getZenpageRSSLink
  • getZenpageStatistic
  • googleVerifyHead
  • handleSearchParms
  • hasDynamicAlbumSuffix
  • hasNextImage
  • hasNextPage
  • hasPrevImage
  • hasPrevPage
  • hitcounter
  • html_decode
  • html_encode
  • html_encodeTagged
  • httpsRedirect
  • httpUploadHandler
  • httpUploadHandler_admin_tabs
  • i18nSetLocale
  • imageBlurGD
  • imageDebug
  • imageError
  • imageNumber
  • imgSrcURI
  • in_context
  • inNewsCategory
  • inProtectedNewsCategory
  • installSignature
  • instrument
  • inSubNewsCategoryOf
  • internalToFilesystem
  • inventMenuItem
  • iptc_make_tag
  • is_AdminEditPage
  • is_connected
  • is_GalleryNewsType
  • is_News
  • is_NewsArchive
  • is_NewsArticle
  • is_NewsCategory
  • is_NewsPage
  • is_NewsType
  • is_Pages
  • is_valid_email_zp
  • is_valid_image
  • is_valid_other_type
  • is_zip
  • isAlbumClass
  • isAlbumPage
  • isArchive
  • isHandledAlbum
  • isImageClass
  • isImagePage
  • isImagePhoto
  • isImageVideo
  • isLandscape
  • isMyAlbum
  • isMyNews
  • isMyPage
  • isolate
  • isProtectedAlbum
  • isProtectedNewsCategory
  • isProtectedPage
  • isSubNewsCategoryOf
  • isValidURL
  • jQueryUpload_head
  • jQueryUpload_headers
  • jQueryUploadHandler
  • jQueryUploadHandler_admin_tabs
  • js_encode
  • json_decode
  • json_encode
  • kses
  • kses_array_lc
  • kses_attr
  • kses_bad_protocol
  • kses_bad_protocol_once
  • kses_bad_protocol_once2
  • kses_check_attr_val
  • kses_decode_entities
  • kses_hair
  • kses_hook
  • kses_html_error
  • kses_js_entities
  • kses_no_null
  • kses_normalize_entities
  • kses_normalize_entities2
  • kses_split
  • kses_split2
  • kses_stripslashes
  • kses_version
  • ksesProcess
  • layoutSelector
  • layoutSelector_album
  • listDBUses
  • listDirectoryFiles
  • listUses
  • load_zenpage_news
  • load_zenpage_pages
  • loadLocalOptions
  • log_message
  • lookupSortKey
  • macro_admin_tabs
  • macroList_show
  • makeAlbumCurrent
  • makeImageCurrent
  • makeSpecialImageName
  • markRelease_button
  • mb_strlen
  • mb_strpos
  • mb_strrpos
  • mb_strtolower
  • mb_strtoupper
  • mb_substr
  • mb_substr_count
  • menu_admin_toolbox_global
  • menu_tabs
  • minDiff
  • mkdir_recursive
  • my_truncate_string
  • myts_date
  • newAlbum
  • newImage
  • next_album
  • next_comment
  • next_image
  • next_news
  • next_page
  • ngettext_pl
  • ngettext_th
  • normalizeColumns
  • omsAdditions
  • openedForComments
  • parse_query
  • parse_size
  • parseAllowedTags
  • parseHttpAcceptLanguage
  • passAlbums
  • passImages
  • pathurlencode
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • PHPMailerAutoload
  • populateManagedObjectsList
  • postAlbumSort
  • postIndexDecode
  • postIndexEncode
  • prefix
  • prepareAlbumPage
  • prepareCustomPage
  • prepareImagePage
  • prepareIndexPage
  • print404status
  • print_language_string_list
  • printAddToFavorites
  • printAdminFooter
  • printAdminHeader
  • printAdminRightsTable
  • printAdminToolbox
  • printAlbumBreadcrumb
  • printAlbumButtons
  • printAlbumCustomData
  • printAlbumData
  • printAlbumDate
  • printAlbumDesc
  • printAlbumEditForm
  • printAlbumEditRow
  • printAlbumLegend
  • printAlbumLink
  • printAlbumLocation
  • printAlbumMap
  • printAlbumMenu
  • printAlbumMenuJump
  • printAlbumMenuList
  • printAlbumMenuListAlbum
  • printAlbumPlace
  • printAlbumRating
  • printAlbumsSelector
  • printAlbumStatistic
  • printAlbumStatisticItem
  • printAlbumThumbImage
  • printAlbumTitle
  • printAlbumURL
  • printAlbumZip
  • printAllDates
  • printAllNewsCategories
  • printAllTags
  • printAllTagsAs
  • printAllTagsFromAlbum
  • printAllTagsFromZenpage
  • printAnnotatedAlbumTitle
  • printAnnotatedImageTitle
  • printArticleCategories
  • printArticleDatesDropdown
  • printArticlesPerPageDropdown
  • printBareAlbumDesc
  • printBareAlbumTitle
  • printBareGalleryDesc
  • printBareGalleryTitle
  • printBareImageDesc
  • printBareImageTitle
  • printBareNewsTitle
  • printBarePageTitle
  • printBulkActions
  • printCaptcha
  • printCategoriesStatistic
  • printCategoryCheckboxListEntry
  • printCategoryDropdown
  • printCategoryListSortableTable
  • printCategorySelection
  • printCodeblock
  • printCodeblockEdit
  • printCommentAuthorLink
  • printCommentErrors
  • printCommentForm
  • printContactForm
  • printCurrentNewsArchive
  • printCurrentNewsCategory
  • printCustomAlbumThumbImage
  • printCustomAlbumThumbMaxSpace
  • printCustomMenu
  • printCustomPageSelector
  • printCustomPageURL
  • printCustomSizedImage
  • printCustomSizedImageMaxHeight
  • printCustomSizedImageMaxSpace
  • printCustomSizedImageThumbMaxSpace
  • printDefaultSizedImage
  • printDownloadAlbumZipURL
  • printDownloadLink
  • printDownloadLinkAlbumZip
  • printdownloadList
  • printDownloadURL
  • printEditable
  • printEditCommentLink
  • printEditDropdown
  • printExpired
  • printFavoritesLink
  • printFavoritesURL
  • printField
  • printGalleryDesc
  • printGalleryIndexURL
  • printGalleryTitle
  • printGoogleMap
  • printHeadTitle
  • printHomeLink
  • printImageCustomData
  • printImageData
  • printImageDate
  • printImageDesc
  • printImageDiv
  • printImageEXIFData
  • printImageID
  • printImageLink
  • printImageMap
  • printImageMetadata
  • printImageRating
  • printImageSortOrder
  • printImageStatistic
  • printImageThumb
  • printImageTitle
  • printImageURL
  • printItemEditLink
  • printItemsList
  • printItemsListTable
  • printItemStatusDropdown
  • printjCarouselThumbNav
  • printjPlayerPlaylist
  • printLanguageSelector
  • printLatestAlbums
  • printLatestComments
  • printLatestImages
  • printLatestImagesByDate
  • printLatestImagesByMtime
  • printLatestNews
  • printLatestUpdatedAlbums
  • printLatestZenpageComments
  • printLink
  • printLinkHTML
  • printLogoAndLinks
  • printManagedObjects
  • printMenuemanagerPageList
  • printMenuemanagerPageListWithNav
  • printMenumanagerBreadcrumb
  • printMenumanagerNextLink
  • printMenumanagerPrevLink
  • printMostPopularItems
  • printMostRatedAlbums
  • printMostRatedImages
  • printMostRatedItems
  • printNestedAlbumsList
  • printNestedItemsList
  • printNestedMenu
  • printNews
  • printNewsArchive
  • printNewsAuthor
  • printNewsCategories
  • printNewsCategoryCustomData
  • printNewsCategoryDesc
  • printNewsCategoryURL
  • printNewsContent
  • printNewsCustomData
  • printNewsDate
  • printNewsExtraContent
  • printNewsImageTags
  • printNewsIndexURL
  • printNewsLink
  • printNewsPageList
  • printNewsPageListWithNav
  • printNewsReadMoreLink
  • printNewsStatistic
  • printNewsTitle
  • printNewsTitleLink
  • printNewsURL
  • printNextNewsLink
  • printNextNewsPageLink
  • printNextPageLink
  • printNextPageURL
  • printPageArticleTags
  • printPageAuthor
  • printPageContent
  • printPageCustomData
  • printPageDate
  • printPagedThumbsNav
  • printPageExtraContent
  • printPageID
  • printPageLastChangeDate
  • printPageLinkURL
  • printPageList
  • printPageListWithNav
  • printPageMenu
  • printPageNav
  • printPageSelector
  • printPagesListTable
  • printPagesStatistic
  • printPageTitle
  • printPageTitleLink
  • printPageURL
  • printParentBreadcrumb
  • printParentPagesBreadcrumb
  • printPasswordForm
  • printPopularAlbums
  • printPopularImages
  • printPreloadScript
  • printPrevNewsLink
  • printPrevNewsPageLink
  • printPrevPageLink
  • printPrevPageURL
  • printPublished
  • printPublishIconLink
  • printRandomImages
  • printRating
  • printRegisterURL
  • printRegistrationForm
  • printRelatedItems
  • printRSSHeaderLink
  • printRSSLink
  • printSearchBreadcrumb
  • printSearchForm
  • printSiteHomeURL
  • printSizedImageLink
  • printSizedImageURL
  • printSlideShow
  • printSlideShowJS
  • printSlideShowLink
  • printSortableHead
  • printSortOrderDropdown
  • printSubPagesExcerpts
  • printSubtabs
  • printTabs
  • printTags
  • printThumbNav
  • printTopRatedAlbums
  • printTopRatedImages
  • printTopRatedItems
  • printUnpublishedDropdown
  • printUserLogin_out
  • printUserSizeImage
  • printUserSizeSelector
  • printVersion
  • printZenJavascripts
  • printZenpageIconLegend
  • printZenpageItemsBreadcrumb
  • printZenpageNewsCategorySelector
  • printZenpagePagesSelector
  • printZenpageRSSHeaderLink
  • printZenpageRSSLink
  • printZenpageStatistic
  • printZenphotoLink
  • process_language_string_save
  • processAlbumBulkActions
  • processAlbumEdit
  • processCodeblockSave
  • processCommentBulkActions
  • processCredentials
  • processCustomOptionSave
  • processEditSelection
  • processExpired
  • processImageBulkActions
  • processImageEdit
  • processManagedObjects
  • processMenuBulkActions
  • processOrder
  • processRights
  • processTags
  • processZenpageBulkActions
  • propSizes
  • publishItem
  • purgeOption
  • query
  • query_full_array
  • query_single_row
  • rc4
  • read_exif_data_protected
  • readTags
  • recaptcha_check_answer
  • recaptcha_get_html
  • recaptcha_get_signup_url
  • recaptcha_mailhide_html
  • recaptcha_mailhide_url
  • reconfigureAction
  • reconfigureCS
  • reconfigurePage
  • recordMissing
  • rem_context
  • removeParentAlbumNames
  • resetCurrentAlbum
  • restore_context
  • reveal
  • rewrite_get_album_image
  • rewrite_path
  • rewrite_path_zenpage
  • RSS_Channel
  • RSS_Retrieve
  • RSS_Tags
  • rulesList
  • run
  • safe_fnmatch
  • safe_glob
  • sanitize
  • sanitize_numeric
  • sanitize_path
  • sanitize_script
  • sanitize_string
  • sanitizeRedirect
  • save_context
  • saveLayoutSelection
  • saveZenphotoLayoutSelection
  • search_quote
  • secureServer
  • seo_cleanup_button
  • seoFriendly
  • seoFriendlyJS
  • set_context
  • setAlbumCustomData
  • setAlbumSubtabs
  • setImageCustomData
  • setMainDomain
  • setOption
  • setOptionDefault
  • setPluginDomain
  • setThemeColumns
  • setThemeDomain
  • setThemeOption
  • setThemeOptionDefault
  • setupAllowedMaps
  • setupCurrentLocale
  • setupDomain
  • setupTheme
  • shortenContent
  • showOrNotShowField
  • shuffle_assoc
  • signatureChange
  • site_upgrade_button
  • site_upgrade_status
  • sitemap_echonl
  • sitemap_getChangefreq
  • sitemap_getDateformat
  • sitemap_getDBLimit
  • sitemap_getISO8601Date
  • skipScheduledPublishing
  • sortByKey
  • sortByMultilingual
  • sortMultiArray
  • standardScripts
  • standardThemeOptions
  • stickyNews
  • storeConfig
  • storeTags
  • stripSuffix
  • submenuOf
  • switchLog
  • tagSelector
  • tagSuggestJS
  • tagSuggestJS_admin
  • tagSuggestJS_frontend
  • themeIsEditable
  • themeSetup
  • timezoneDiff
  • tinymce4ConfigJS
  • truncate_string
  • unpublishedZenphotoItemCheck
  • unpublishSubalbums
  • unQuote
  • unzip
  • updateArticle
  • updateCacheName
  • updateCategory
  • updateConfigItem
  • updateItemSortorder
  • updateItemsSortorder
  • updateMenuItem
  • updatePage
  • upload_extra
  • upload_form
  • upload_head
  • user_mailing_list_button
  • validateLocale
  • wordpress_import_button
  • wp_prefix
  • wp_query_full_array
  • wpimport_TryAgainError
  • XSRFdefender
  • XSRFToken
  • zenJavascript
  • zenpageAlbumImage
  • zenpageBulkActionMessage
  • zenpageHitcounter
  • zenpageJSCSS
  • zenpageOpenedForComments
  • zenpagePublish
  • zenphoto_PHPMailer
  • zenphoto_sendmail
  • zenPhotoTheme
  • zp_apply_filter
  • zp_clearCookie
  • zp_colorAllocate
  • zp_cookieEncode
  • zp_copyCanvas
  • zp_createImage
  • zp_drawRectangle
  • zp_error
  • zp_filter_slot
  • zp_filter_unique_id
  • zp_getCookie
  • zp_getFonts
  • zp_graphicsLibInfo
  • zp_handle_password
  • zp_handle_password_single
  • zp_has_filter
  • zp_image_types
  • zp_imageCanRotate
  • zp_imageColorTransparent
  • zp_imageDims
  • zp_imageFill
  • zp_imageFontHeight
  • zp_imageFontWidth
  • zp_imageFromString
  • zp_imageGet
  • zp_imageGray
  • zp_imageHeight
  • zp_imageIPTC
  • zp_imageKill
  • zp_imageLoadFont
  • zp_imageMerge
  • zp_imageOutput
  • zp_imageResizeAlpha
  • zp_imageUnsharpMask
  • zp_imageWidth
  • zp_load_album
  • zp_load_gallery
  • zp_load_image
  • zp_load_page
  • zp_load_request
  • zp_load_search
  • zp_loggedin
  • zp_mail
  • zp_register_filter
  • zp_remove_filter
  • zp_resampleImage
  • zp_rotateImage
  • zp_session_start
  • zp_setCookie
  • zp_writeString
  • zpErrorHandler
  • zpFormattedDate
  • zpRewriteURL
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  1: <?php
  2: 
  3: /*
  4:  * Note: Zenphoto does not want html entities encoded. This script has been modified
  5:  * to prevent the encodings. Search for Zenphoto for changes.
  6:  */
  7: 
  8: # kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes
  9: # Copyright (C) 2002, 2003, 2005  Ulf Harnhammar
 10: #
 11: # This program is free software and open source software; you can redistribute
 12: # it and/or modify it under the terms of the GNU General Public License as
 13: # published by the Free Software Foundation; either version 2 of the License,
 14: # or (at your option) any later version.
 15: #
 16: # This program is distributed in the hope that it will be useful, but WITHOUT
 17: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 18: # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 19: # more details.
 20: #
 21: # You should have received a copy of the GNU General Public License along
 22: # with this program; if not, write to the Free Software Foundation, Inc.,
 23: # 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA  or visit
 24: # http://www.gnu.org/licenses/gpl.html
 25: #
 26: # *** CONTACT INFORMATION ***
 27: #
 28: # E-mail:      metaur at users dot sourceforge dot net
 29: # Web page:    http://sourceforge.net/projects/kses
 30: # Paper mail:  Ulf Harnhammar
 31: #              Ymergatan 17 C
 32: #              753 25  Uppsala
 33: #              SWEDEN
 34: #
 35: # [kses strips evil scripts!]
 36: 
 37: 
 38: function kses($string, $allowed_html, $allowed_protocols =
 39:                array('http', 'https', 'ftp', 'news', 'nntp', 'telnet',
 40:                      'gopher', 'mailto'))
 41: ###############################################################################
 42: # This function makes sure that only the allowed HTML element names, attribute
 43: # names and attribute values plus only sane HTML entities will occur in
 44: # $string. You have to remove any slashes from PHP's magic quotes before you
 45: # call this function.
 46: ###############################################################################
 47: {
 48:   $string = kses_no_null($string);
 49:   $string = kses_js_entities($string);
 50: //  $string = kses_normalize_entities($string); Zenphoto does not want & encoded
 51:   $string = kses_hook($string);
 52: //  $allowed_html = kses_array_lc($allowed_html); Zenphoto insures that these are already lowercase
 53:   return kses_split($string, $allowed_html, $allowed_protocols);
 54: } # function kses
 55: 
 56: 
 57: function kses_hook($string)
 58: ###############################################################################
 59: # You add any kses hooks here.
 60: ###############################################################################
 61: {
 62:   return $string;
 63: } # function kses_hook
 64: 
 65: 
 66: function kses_version()
 67: ###############################################################################
 68: # This function returns kses' version number.
 69: ###############################################################################
 70: {
 71:   return '0.2.2';
 72: } # function kses_version
 73: 
 74: 
 75: function kses_split($string, $allowed_html, $allowed_protocols)
 76: ###############################################################################
 77: # This function searches for HTML tags, no matter how malformed. It also
 78: # matches stray ">" characters.
 79: ###############################################################################
 80: {
 81:     global $_allowed_html, $_allowed_protocols;
 82:     //Zenphoto:preg_replace with the "e" modifier is deprecated, use callback
 83:     $_allowed_html = $allowed_html;
 84:     $_allowed_protocols = $allowed_protocols;
 85: 
 86:   return preg_replace_callback('%(<'.   # EITHER: <
 87:                       '[^>]*'. # things that aren't >
 88:                       '(>|$)'. # > or end of string
 89:                       '|>)%', # OR: just a >
 90:                       "kses_split2",
 91:                       $string);
 92: } # function kses_split
 93: 
 94: 
 95: function kses_split2($matches)
 96: ###############################################################################
 97: # This function does a lot of work. It rejects some very malformed things
 98: # like <:::>. It returns an empty string, if the element isn't allowed (look
 99: # ma, no strip_tags()!). Otherwise it splits the tag into an element and an
100: # attribute list.
101: ###############################################################################
102: {
103:     //Zenphoto:preg_replace with the "e" modifier is deprecated, this is the callback
104:     global $_allowed_html, $_allowed_protocols;
105:     $allowed_html = $_allowed_html;
106:     $allowed_protocols = $_allowed_protocols;
107:   $string = kses_stripslashes($matches[1]);
108:   if (substr($string, 0, 1) != '<') {
109:     return '>';
110:     # It matched a ">" character
111:   }
112: 
113:   if (!preg_match('%^<\s*(/\s*)?([a-zA-Z0-9]+)([^>]*)>$%', $string, $matches)) {
114:     return $string;
115:     # It's seriously malformed
116:   }
117: 
118:   $slash = trim($matches[1]);
119:   $elem = $matches[2];
120:   $attrlist = $matches[3];
121: 
122:   if (!@isset($allowed_html[strtolower($elem)]))
123:     return '';
124:     # They are using a not allowed HTML element
125: 
126:   if ($slash != '')
127:     return "<$slash$elem>";
128:   # No attributes are allowed for closing elements
129: 
130:   return kses_attr("$slash$elem", $attrlist, $allowed_html,
131:                    $allowed_protocols);
132: } # function kses_split2
133: 
134: 
135: function kses_attr($element, $attr, $allowed_html, $allowed_protocols)
136: ###############################################################################
137: # This function removes all attributes, if none are allowed for this element.
138: # If some are allowed it calls kses_hair() to split them further, and then it
139: # builds up new HTML code from the data that kses_hair() returns. It also
140: # removes "<" and ">" characters, if there are any left. One more thing it
141: # does is to check if the tag has a closing XHTML slash, and if it does,
142: # it puts one in the returned code as well.
143: ###############################################################################
144: {
145: # Is there a closing XHTML slash at the end of the attributes?
146: 
147:   $xhtml_slash = '';
148:   if (preg_match('%\s/\s*$%', $attr))
149:     $xhtml_slash = ' /';
150: 
151: # Are any attributes allowed at all for this element?
152: 
153:   if (@count($allowed_html[strtolower($element)]) == 0)
154:     return "<$element$xhtml_slash>";
155: 
156: # Split it
157: 
158:   $attrarr = kses_hair($attr, $allowed_protocols);
159: 
160: # Go through $attrarr, and save the allowed attributes for this element
161: # in $attr2
162: 
163:   $attr2 = '';
164: 
165:   foreach ($attrarr as $arreach)
166:   {
167:     if (!@isset($allowed_html[strtolower($element)]
168:                             [strtolower($arreach['name'])]))
169:       continue; # the attribute is not allowed
170: 
171:     $current = $allowed_html[strtolower($element)]
172:                             [strtolower($arreach['name'])];
173: 
174:     if (!is_array($current))
175:       $attr2 .= ' '.$arreach['whole'];
176:     # there are no checks
177: 
178:     else
179:     {
180:     # there are some checks
181:       $ok = true;
182:       foreach ($current as $currkey => $currval)
183:         if (!kses_check_attr_val($arreach['value'], $arreach['vless'],
184:                                  $currkey, $currval))
185:         { $ok = false; break; }
186: 
187:       if ($ok)
188:         $attr2 .= ' '.$arreach['whole']; # it passed them
189:     } # if !is_array($current)
190:   } # foreach
191: 
192: # Remove any "<" or ">" characters
193: 
194:   $attr2 = preg_replace('/[<>]/', '', $attr2);
195: 
196:   return "<$element$attr2$xhtml_slash>";
197: } # function kses_attr
198: 
199: 
200: function kses_hair($attr, $allowed_protocols)
201: ###############################################################################
202: # This function does a lot of work. It parses an attribute list into an array
203: # with attribute data, and tries to do the right thing even if it gets weird
204: # input. It will add quotes around attribute values that don't have any quotes
205: # or apostrophes around them, to make it easier to produce HTML code that will
206: # conform to W3C's HTML specification. It will also remove bad URL protocols
207: # from attribute values.
208: ###############################################################################
209: {
210:   $attrarr = array();
211:   $mode = 0;
212:   $attrname = '';
213: 
214: # Loop through the whole attribute list
215: 
216:   while (strlen($attr) != 0)
217:   {
218:     $working = 0; # Was the last operation successful?
219: 
220:     switch ($mode)
221:     {
222:       case 0: # attribute name, href for instance
223: 
224:         if (preg_match('/^([-a-zA-Z]+)/', $attr, $match))
225:         {
226:           $attrname = $match[1];
227:           $working = $mode = 1;
228:           $attr = preg_replace('/^[-a-zA-Z]+/', '', $attr);
229:         }
230: 
231:         break;
232: 
233:       case 1: # equals sign or valueless ("selected")
234: 
235:         if (preg_match('/^\s*=\s*/', $attr)) # equals sign
236:         {
237:           $working = 1; $mode = 2;
238:           $attr = preg_replace('/^\s*=\s*/', '', $attr);
239:           break;
240:         }
241: 
242:         if (preg_match('/^\s+/', $attr)) # valueless
243:         {
244:           $working = 1; $mode = 0;
245:           $attrarr[] = array
246:                         ('name'  => $attrname,
247:                          'value' => '',
248:                          'whole' => $attrname,
249:                          'vless' => 'y');
250:           $attr = preg_replace('/^\s+/', '', $attr);
251:         }
252: 
253:         break;
254: 
255:       case 2: # attribute value, a URL after href= for instance
256: 
257:         if (preg_match('/^"([^"]*)"(\s+|$)/', $attr, $match))
258:          # "value"
259:         {
260:           $thisval = kses_bad_protocol($match[1], $allowed_protocols);
261: 
262:           $attrarr[] = array
263:                         ('name'  => $attrname,
264:                          'value' => $thisval,
265:                          'whole' => "$attrname=\"$thisval\"",
266:                          'vless' => 'n');
267:           $working = 1; $mode = 0;
268:           $attr = preg_replace('/^"[^"]*"(\s+|$)/', '', $attr);
269:           break;
270:         }
271: 
272:         if (preg_match("/^'([^']*)'(\s+|$)/", $attr, $match))
273:          # 'value'
274:         {
275:           $thisval = kses_bad_protocol($match[1], $allowed_protocols);
276: 
277:           $attrarr[] = array
278:                         ('name'  => $attrname,
279:                          'value' => $thisval,
280:                          'whole' => "$attrname='$thisval'",
281:                          'vless' => 'n');
282:           $working = 1; $mode = 0;
283:           $attr = preg_replace("/^'[^']*'(\s+|$)/", '', $attr);
284:           break;
285:         }
286: 
287:         if (preg_match("%^([^\s\"']+)(\s+|$)%", $attr, $match))
288:          # value
289:         {
290:           $thisval = kses_bad_protocol($match[1], $allowed_protocols);
291: 
292:           $attrarr[] = array
293:                         ('name'  => $attrname,
294:                          'value' => $thisval,
295:                          'whole' => "$attrname=\"$thisval\"",
296:                          'vless' => 'n');
297:                          # We add quotes to conform to W3C's HTML spec.
298:           $working = 1; $mode = 0;
299:           $attr = preg_replace("%^[^\s\"']+(\s+|$)%", '', $attr);
300:         }
301: 
302:         break;
303:     } # switch
304: 
305:     if ($working == 0) # not well formed, remove and try again
306:     {
307:       $attr = kses_html_error($attr);
308:       $mode = 0;
309:     }
310:   } # while
311: 
312:   if ($mode == 1)
313:   # special case, for when the attribute list ends with a valueless
314:   # attribute like "selected"
315:     $attrarr[] = array
316:                   ('name'  => $attrname,
317:                    'value' => '',
318:                    'whole' => $attrname,
319:                    'vless' => 'y');
320: 
321:   return $attrarr;
322: } # function kses_hair
323: 
324: 
325: function kses_check_attr_val($value, $vless, $checkname, $checkvalue)
326: ###############################################################################
327: # This function performs different checks for attribute values. The currently
328: # implemented checks are "maxlen", "minlen", "maxval", "minval" and "valueless"
329: # with even more checks to come soon.
330: ###############################################################################
331: {
332:   $ok = true;
333: 
334:   switch (strtolower($checkname))
335:   {
336:     case 'maxlen':
337:     # The maxlen check makes sure that the attribute value has a length not
338:     # greater than the given value. This can be used to avoid Buffer Overflows
339:     # in WWW clients and various Internet servers.
340: 
341:       if (strlen($value) > $checkvalue)
342:         $ok = false;
343:       break;
344: 
345:     case 'minlen':
346:     # The minlen check makes sure that the attribute value has a length not
347:     # smaller than the given value.
348: 
349:       if (strlen($value) < $checkvalue)
350:         $ok = false;
351:       break;
352: 
353:     case 'maxval':
354:     # The maxval check does two things: it checks that the attribute value is
355:     # an integer from 0 and up, without an excessive amount of zeroes or
356:     # whitespace (to avoid Buffer Overflows). It also checks that the attribute
357:     # value is not greater than the given value.
358:     # This check can be used to avoid Denial of Service attacks.
359: 
360:       if (!preg_match('/^\s{0,6}[0-9]{1,6}\s{0,6}$/', $value))
361:         $ok = false;
362:       if ($value > $checkvalue)
363:         $ok = false;
364:       break;
365: 
366:     case 'minval':
367:     # The minval check checks that the attribute value is a positive integer,
368:     # and that it is not smaller than the given value.
369: 
370:       if (!preg_match('/^\s{0,6}[0-9]{1,6}\s{0,6}$/', $value))
371:         $ok = false;
372:       if ($value < $checkvalue)
373:         $ok = false;
374:       break;
375: 
376:     case 'valueless':
377:     # The valueless check checks if the attribute has a value
378:     # (like <a href="blah">) or not (<option selected>). If the given value
379:     # is a "y" or a "Y", the attribute must not have a value.
380:     # If the given value is an "n" or an "N", the attribute must have one.
381: 
382:       if (strtolower($checkvalue) != $vless)
383:         $ok = false;
384:       break;
385:   } # switch
386: 
387:   return $ok;
388: } # function kses_check_attr_val
389: 
390: 
391: function kses_bad_protocol($string, $allowed_protocols)
392: ###############################################################################
393: # This function removes all non-allowed protocols from the beginning of
394: # $string. It ignores whitespace and the case of the letters, and it does
395: # understand HTML entities. It does its work in a while loop, so it won't be
396: # fooled by a string like "javascript:javascript:alert(57)".
397: ###############################################################################
398: {
399:   $string = kses_no_null($string);
400:   $string = preg_replace('/\xad+/', '', $string); # deals with Opera "feature"
401:   $string2 = $string.'a';
402: 
403:   while ($string != $string2)
404:   {
405:     $string2 = $string;
406:     $string = kses_bad_protocol_once($string, $allowed_protocols);
407:   } # while
408: 
409:   return $string;
410: } # function kses_bad_protocol
411: 
412: 
413: function kses_no_null($string)
414: ###############################################################################
415: # This function removes any NULL characters in $string.
416: ###############################################################################
417: {
418:   $string = preg_replace('/\0+/', '', $string);
419:   $string = preg_replace('/(\\\\0)+/', '', $string);
420: 
421:   return $string;
422: } # function kses_no_null
423: 
424: 
425: function kses_stripslashes($string)
426: ###############################################################################
427: # This function changes the character sequence  \"  to just  "
428: # It leaves all other slashes alone. It's really weird, but the quoting from
429: # preg_replace(//e) seems to require this.
430: ###############################################################################
431: {
432:   return preg_replace('%\\\\"%', '"', $string);
433: } # function kses_stripslashes
434: 
435: 
436: function kses_array_lc($inarray)
437: ###############################################################################
438: # This function goes through an array, and changes the keys to all lower case.
439: ###############################################################################
440: {
441:   $outarray = array();
442: 
443:   foreach ($inarray as $inkey => $inval)
444:   {
445:     $outkey = strtolower($inkey);
446:     $outarray[$outkey] = array();
447: 
448:     foreach ($inval as $inkey2 => $inval2)
449:     {
450:       $outkey2 = strtolower($inkey2);
451:       $outarray[$outkey][$outkey2] = $inval2;
452:     } # foreach $inval
453:   } # foreach $inarray
454: 
455:   return $outarray;
456: } # function kses_array_lc
457: 
458: 
459: function kses_js_entities($string)
460: ###############################################################################
461: # This function removes the HTML JavaScript entities found in early versions of
462: # Netscape 4.
463: ###############################################################################
464: {
465:   return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
466: } # function kses_js_entities
467: 
468: 
469: function kses_html_error($string)
470: ###############################################################################
471: # This function deals with parsing errors in kses_hair(). The general plan is
472: # to remove everything to and including some whitespace, but it deals with
473: # quotes and apostrophes as well.
474: ###############################################################################
475: {
476:   return preg_replace('/^("[^"]*("|$)|\'[^\']*(\'|$)|\S)*\s*/', '', $string);
477: } # function kses_html_error
478: 
479: 
480: function kses_bad_protocol_once($string, $allowed_protocols)
481: ###############################################################################
482: # This function searches for URL protocols at the beginning of $string, while
483: # handling whitespace and HTML entities.
484: ###############################################################################
485: {
486: 
487:     global $_allowed_protocols;
488:     //Zenphoto:preg_replace with the "e" modifier is deprecated, use callback
489:     $_allowed_protocols = $allowed_protocols;
490: 
491:   return preg_replace_callback('/^((&[^;]*;|[\sA-Za-z0-9])*)'.
492:                       '(:|&#58;|&#[Xx]3[Aa];)\s*/',
493:                       'kses_bad_protocol_once2',
494:                       $string);
495: } # function kses_bad_protocol_once
496: 
497: 
498: function kses_bad_protocol_once2($matches)
499: ###############################################################################
500: # This function processes URL protocols, checks to see if they're in the white-
501: # list or not, and returns different data depending on the answer.
502: ###############################################################################
503: {
504: 
505:     //Zenphoto:preg_replace with the "e" modifier is deprecated, this is the callback
506:     global $_allowed_protocols;
507:     $allowed_protocols = $_allowed_protocols;
508: 
509:   $string2 = kses_decode_entities($matches[1]);
510:   $string2 = preg_replace('/\s/', '', $string2);
511:   $string2 = kses_no_null($string2);
512:   $string2 = preg_replace('/\xad+/', '', $string2);
513:    # deals with Opera "feature"
514:   $string2 = strtolower($string2);
515: 
516:   $allowed = false;
517:   foreach ($allowed_protocols as $one_protocol)
518:     if (strtolower($one_protocol) == $string2)
519:     {
520:       $allowed = true;
521:       break;
522:     }
523: 
524:   if ($allowed)
525:     return "$string2:";
526:   else
527:     return '';
528: } # function kses_bad_protocol_once2
529: 
530: 
531: function kses_normalize_entities($string)
532: ###############################################################################
533: # This function normalizes HTML entities. It will convert "AT&T" to the correct
534: # "AT&amp;T", "&#00058;" to "&#58;", "&#XYZZY;" to "&amp;#XYZZY;" and so on.
535: ###############################################################################
536: {
537: # Disarm all entities by converting & to &amp;
538: 
539:   $string = str_replace('&', '&amp;', $string);
540: 
541: # Change back the allowed entities in our entity whitelist
542: 
543:   $string = preg_replace('/&amp;([A-Za-z][A-Za-z0-9]{0,19});/',
544:                          '&\\1;', $string);
545:   $string = preg_replace_callback('/&amp;#0*([0-9]{1,5});/',
546:                          'kses_normalize_entities2', $string);
547:   $string = preg_replace('/&amp;#([Xx])0*(([0-9A-Fa-f]{2}){1,2});/',
548:                          '&#\\1\\2;', $string);
549: 
550:   return $string;
551: } # function kses_normalize_entities
552: 
553: 
554: function kses_normalize_entities2($matches)
555: ###############################################################################
556: # This function helps kses_normalize_entities() to only accept 16 bit values
557: # and nothing more for &#number; entities.
558: ###############################################################################
559: {
560:   return (($matches[1] > 65535) ? "&amp;#$i;" : "&#$i;");
561: } # function kses_normalize_entities2
562: 
563: 
564: function kses_decode_entities($string)
565: ###############################################################################
566: # This function decodes numeric HTML entities (&#65; and &#x41;). It doesn't
567: # do anything with other entities like &auml;, but we don't need them in the
568: # URL protocol whitelisting system anyway.
569: ###############################################################################
570: {
571:   $string = preg_replace('/&#([0-9]+);/', 'chr("\\1")', $string);
572:   $string = preg_replace('/&#[Xx]([0-9A-Fa-f]+);/', 'chr(hexdec("\\1"))',
573:                          $string);
574: 
575:   return $string;
576: } # function kses_decode_entities
577: 
578: ?>
579: 
Zenphoto doc API documentation generated by ApiGen