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:  * Support for allowing visitors to register to access your site. Users registering
  4:  * are verified via an e-mail to insure the validity of the e-mail address they provide.
  5:  * Options are provided for setting the required registration details and the default
  6:  * user rights that will be granted.
  7:  *
  8:  * Place a call on <i>printRegistrationForm()</i> where you want the form to appear.
  9:  * Probably the best use is to create a new <i>custom page</i> script just for handling these
 10:  * user registrations. Then put a link to that script on your index page so that people
 11:  * who wish to register will click on the link and be taken to the registration page.
 12:  *
 13:  * When successfully registered, a new Zenphoto user will be created with no logon rights. An e-mail
 14:  * will be sent to the user with a link to activate the user ID. When he clicks on that link
 15:  * he will be taken to the registration page and the verification process will be completed.
 16:  * At this point the user ID rights are set to the value of the plugin default user rights option
 17:  * and an email is sent to the Gallery admin announcing the new registration.
 18:  *
 19:  * <b>NOTE:</b> If you change the rights of a user pending verification you have verified the user!
 20:  *
 21:  * @author Stephen Billard (sbillard)
 22:  * @package plugins
 23:  * @subpackage users
 24:  */
 25: $plugin_is_filter = 5 | FEATURE_PLUGIN;
 26: $plugin_description = gettext("Provides a means for placing a user registration form on your theme pages.");
 27: $plugin_author = "Stephen Billard (sbillard)";
 28: 
 29: $option_interface = 'register_user';
 30: 
 31: $_zp_conf_vars['special_pages']['register_user'] = array('define'    => '_REGISTER_USER_', 'rewrite'     => getOption('register_user_link'),
 32:                 'option'     => 'register_user_link', 'default'  => '_PAGE_/register');
 33: $_zp_conf_vars['special_pages'][] = array('definition' => '%REGISTER_USER%', 'rewrite' => '_REGISTER_USER_');
 34: 
 35: $_zp_conf_vars['special_pages'][] = array('define' => false, 'rewrite' => '%REGISTER_USER%', 'rule' => '^%REWRITE%/*$       index.php?p=' . 'register' . ' [L,QSA]');
 36: 
 37: 
 38: if (getOption('register_user_address_info')) {
 39:     require_once(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/comment_form/functions.php');
 40: }
 41: 
 42: /**
 43:  * Plugin class
 44:  *
 45:  */
 46: class register_user {
 47: 
 48:     function __construct() {
 49:         global $_zp_authority;
 50:         setOptionDefault('register_user_link', '_PAGE_/register');
 51:         gettext($str = 'You have received this email because you registered with the user id %3$s on this site.' . "\n" . 'To complete your registration visit %1$s.');
 52:         setOptionDefault('register_user_text', getAllTranslations($str));
 53:         gettext($str = 'Click here to register for this site.');
 54:         setOptionDefault('register_user_page_tip', getAllTranslations($str));
 55:         gettext($str = 'Register');
 56:         setOptionDefault('register_user_page_link', getAllTranslations($str));
 57:         setOptionDefault('register_user_captcha', 0);
 58:         setOptionDefault('register_user_email_is_id', 1);
 59:         setOptionDefault('register_user_create_album', 0);
 60:         $mailinglist = $_zp_authority->getAdminEmail(ADMIN_RIGHTS);
 61:         if (count($mailinglist) == 0) { //  no one to send the notice to!
 62:             setOption('register_user_notify', 0);
 63:         } else {
 64:             setOptionDefault('register_user_notify', 1);
 65:         }
 66:     }
 67: 
 68:     function getOptionsSupported() {
 69:         global $_zp_authority, $_common_notify_handler, $_zp_captcha;
 70:         $options = array(
 71:                         gettext('Link text')                             => array('key'      => 'register_user_page_link', 'type'    => OPTION_TYPE_TEXTAREA,
 72:                                         'order'  => 1,
 73:                                         'desc'   => gettext('If this option is set, the visitor login form will include a link to this page. The link text will be labeled with the text provided.')),
 74:                         gettext('Hint text')                             => array('key'      => 'register_user_page_tip', 'type'     => OPTION_TYPE_TEXTAREA,
 75:                                         'order'  => 2.5,
 76:                                         'desc'   => gettext('If this option is set, the visitor login form will include a link to this page. The link text will be labeled with the text provided.')),
 77:                         gettext('Notify*')                               => array('key'      => 'register_user_notify', 'type'   => OPTION_TYPE_CHECKBOX,
 78:                                         'order'  => 4,
 79:                                         'desc'   => gettext('If checked, an e-mail will be sent to the gallery admin when a new user has verified his registration.')),
 80:                         gettext('User album')                            => array('key'      => 'register_user_create_album', 'type'     => OPTION_TYPE_CHECKBOX,
 81:                                         'order'  => 6,
 82:                                         'desc'   => gettext('If checked, an album will be created and assigned to the user.')),
 83:                         gettext('Email ID')                              => array('key'      => 'register_user_email_is_id', 'type'  => OPTION_TYPE_CHECKBOX,
 84:                                         'order'  => 4,
 85:                                         'desc'   => gettext('If checked, The use’s e-mail address will be used as his User ID.')),
 86:                         gettext('Email notification text') => array('key'        => 'register_user_text', 'type'     => OPTION_TYPE_TEXTAREA,
 87:                                         'order'  => 3,
 88:                                         'desc'   => gettext('Text for the body of the email sent to the registrant for registration verification. <p class="notebox"><strong>Note:</strong> You must include <code>%1$s</code> in your message where you wish the <em>registration verification</em> link to appear. You may also insert the registrant’s <em>name</em> (<code>%2$s</code>), <em>user id</em> (<code>%3$s</code>), and <em>password</em>* (<code>%4$s</code>).<br /><br />*For security reasons we recommend <strong>not</strong> inserting the <em>password</em>.</p>')),
 89:                         gettext('CAPTCHA')                               => array('key'      => 'register_user_captcha', 'type'  => OPTION_TYPE_CHECKBOX,
 90:                                         'order'  => 5,
 91:                                         'desc'   => ($_zp_captcha->name) ? gettext('If checked, the form will include a Captcha verification.') : '<span class="notebox">' . gettext('No captcha handler is enabled.') . '</span>'),
 92:         );
 93:         if (extensionEnabled('userAddressFields')) {
 94:             $options[gettext('Address fields')] = array('key'            => 'register_user_address_info', 'type'         => OPTION_TYPE_RADIO,
 95:                             'order'      => 4.5,
 96:                             'buttons'    => array(gettext('Omit') => 0, gettext('Show') => 1, gettext('Require') => 'required'),
 97:                             'desc'       => gettext('If <em>Address fields</em> are shown or required, the form will include positions for address information. If required, the user must supply data in each address field.'));
 98:         }
 99:         if ($_common_notify_handler) {
100:             $options['note'] = array('key'       => 'menu_truncate_note', 'type'     => OPTION_TYPE_NOTE,
101:                             'order'  => 8,
102:                             'desc'   => '<p class="notebox">' . $_common_notify_handler . '</p>');
103:         } else {
104:             $_common_notify_handler = gettext('* The option may be set via the <a href="javascript:gotoName(\'register_user\');"><em>register_user</em></a> plugin options.');
105:             $options['note'] = array('key'       => 'menu_truncate_note',
106:                             'type'   => OPTION_TYPE_NOTE,
107:                             'order'  => 8,
108:                             'desc'   => gettext('<p class="notebox">*<strong>Note:</strong> The setting of this option is shared with other plugins.</p>'));
109:         }
110:         $mailinglist = $_zp_authority->getAdminEmail(ADMIN_RIGHTS);
111:         if (count($mailinglist) == 0) { //  no one to send the notice to!
112:             $options[gettext('Notify*')]['disabled'] = true;
113:             $options[gettext('Notify*')]['desc'] .= ' ' . gettext('Of course there must be some Administrator with an e-mail address for this option to make sense!');
114:         }
115:         if (class_exists('user_groups')) {
116:             $admins = $_zp_authority->getAdministrators('groups');
117:             $defaultrights = ALL_RIGHTS;
118:             $ordered = array();
119:             foreach ($admins as $key => $admin) {
120:                 $ordered[$admin['user']] = $admin['user'];
121:                 if ($admin['rights'] < $defaultrights && $admin['rights'] >= NO_RIGHTS) {
122:                     $nullselection = $admin['user'];
123:                     $defaultrights = $admin['rights'];
124:                 }
125:             }
126:             if (!empty($nullselection)) {
127:                 if (is_numeric(getOption('register_user_user_rights'))) {
128:                     setOption('register_user_user_rights', $nullselection);
129:                 } else {
130:                     setOptionDefault('register_user_user_rights', $nullselection);
131:                 }
132:             }
133:             $options[gettext('Default user group')] = array('key'                => 'register_user_user_rights', 'type'          => OPTION_TYPE_SELECTOR,
134:                             'order'          => 1,
135:                             'selections' => $ordered,
136:                             'desc'           => gettext("Initial group assignment for the new user."));
137:         } else {
138:             if (is_numeric(getOption('register_user_user_rights'))) {
139:                 setOptionDefault('register_user_user_rights', NO_RIGHTS);
140:             } else {
141:                 setOption('register_user_user_rights', NO_RIGHTS);
142:             }
143:             $options[gettext('Default rights')] = array('key'        => 'register_user_user_rights', 'type'  => OPTION_TYPE_CUSTOM,
144:                             'order'  => 2,
145:                             'desc'   => gettext("Initial rights for the new user. (If no rights are set, approval of the user will be required.)"));
146:         }
147:         return $options;
148:     }
149: 
150:     function handleOption($option, $currentValue) {
151:         global $_zp_gallery;
152:         switch ($option) {
153:             case 'register_user_user_rights':
154:                 printAdminRightsTable('register_user', '', '', getOption('register_user_user_rights'));
155:                 break;
156:         }
157:     }
158: 
159:     static function handleOptionSave($themename, $themealbum) {
160:         if (!class_exists('user_groups')) {
161:             $saved_rights = NO_RIGHTS;
162:             $rightslist = sortMultiArray(Zenphoto_Authority::getRights(), array('set', 'value'));
163:             foreach ($rightslist as $rightselement => $right) {
164:                 if (isset($_POST['register_user-' . $rightselement])) {
165:                     $saved_rights = $saved_rights | $_POST['register_user-' . $rightselement];
166:                 }
167:             }
168:             setOption('register_user_user_rights', $saved_rights);
169:         }
170:         return false;
171:     }
172: 
173:     /**
174:      * Processes the post of an address
175:      *
176:      * @param int $i sequence number of the comment
177:      * @return array
178:      */
179:     static function getUserInfo($i) {
180:         $result = array();
181:         if (isset($_POST[$i . '-comment_form_website']))
182:             $result['website'] = sanitize($_POST[$i . '-comment_form_website'], 1);
183:         if (isset($_POST[$i . '-comment_form_street']))
184:             $result['street'] = sanitize($_POST[$i . '-comment_form_street'], 1);
185:         if (isset($_POST[$i . '-comment_form_city']))
186:             $result['city'] = sanitize($_POST[$i . '-comment_form_city'], 1);
187:         if (isset($_POST[$i . '-comment_form_state']))
188:             $result['state'] = sanitize($_POST[$i . '-comment_form_state'], 1);
189:         if (isset($_POST[$i . '-comment_form_country']))
190:             $result['country'] = sanitize($_POST[$i . '-comment_form_country'], 1);
191:         if (isset($_POST[$i . '-comment_form_postal']))
192:             $result['postal'] = sanitize($_POST[$i . '-comment_form_postal'], 1);
193:         return $result;
194:     }
195: 
196:     static function getLink() {
197:         return zp_apply_filter('getLink', rewrite_path(_REGISTER_USER_ . '/', '/index.php?p=register'), 'register.php', NULL);
198:     }
199: 
200:     static function post_processor() {
201:         global $admin_e, $admin_n, $user, $_zp_authority, $_zp_captcha, $_zp_gallery, $_notify, $_link, $_message;
202:         //Handle registration
203:         if (isset($_POST['username']) && !empty($_POST['username'])) {
204:             $_notify = 'honeypot'; // honey pot check
205:         }
206:         if (getOption('register_user_captcha')) {
207:             if (isset($_POST['code'])) {
208:                 $code = sanitize($_POST['code'], 3);
209:                 $code_ok = sanitize($_POST['code_h'], 3);
210:             } else {
211:                 $code = '';
212:                 $code_ok = '';
213:             }
214:             if (!$_zp_captcha->checkCaptcha($code, $code_ok)) {
215:                 $_notify = 'invalidcaptcha';
216:             }
217:         }
218:         $admin_n = trim(sanitize($_POST['admin_name']));
219:         if (empty($admin_n)) {
220:             $_notify = 'incomplete';
221:         }
222:         $user = trim(sanitize($_POST['user']));
223:         if (getOption('register_user_email_is_id')) {
224:             $mail_duplicate = $_zp_authority->checkUniqueMailaddress($user, $user);
225:             if ($mail_duplicate) {
226:                 $_notify = 'exists';
227:             }
228:         } 
229:         if (isset($_POST['admin_email'])) {
230:             $admin_e = trim(sanitize($_POST['admin_email']));
231:             $mail_duplicate = $_zp_authority->checkUniqueMailaddress($admin_e, $user);
232:             if($mail_duplicate) {
233:                 $_notify = 'duplicateemail';
234:             }
235:         } else {
236:             $admin_e = $user;
237:         }
238:         if (!is_valid_email_zp($admin_e)) {
239:             $_notify = 'invalidemail';
240:         }
241:         $pass = trim(sanitize($_POST['pass']));
242:         if (empty($pass)) {
243:             $_notify = 'empty';
244:         } else if (!empty($user) && !(empty($admin_n)) && !empty($admin_e)) {
245:             if (isset($_POST['disclose_password']) || $pass == trim(sanitize($_POST['pass_r']))) {
246:                 $currentadmin = Zenphoto_Authority::getAnAdmin(array('`user`=' => $user, '`valid`>' => 0));
247:                 if (is_object($currentadmin)) {
248:                     $_notify = 'exists';
249:                 }
250:                 if (empty($_notify)) {
251:                     $userobj = Zenphoto_Authority::newAdministrator('');
252:                     $userobj->transient = false;
253:                     $userobj->setUser($user);
254:                     $userobj->setPass($pass);
255:                     $userobj->setName($admin_n);
256:                     $userobj->setEmail($admin_e);
257:                     $userobj->setRights(0);
258:                     $userobj->setObjects(NULL);
259:                     $userobj->setGroup('');
260:                     $userobj->setCustomData('');
261:                     $userobj->setLanguage(getUserLocale());
262:                     if (extensionEnabled('userAddressFields')) {
263:                         $addresses = getOption('register_user_address_info');
264:                         $userinfo = register_user::getUserInfo(0);
265:                         $_comment_form_save_post = serialize($userinfo);
266:                         if ($addresses == 'required') {
267:                             if (!isset($userinfo['street']) || empty($userinfo['street'])) {
268:                                 $userobj->transient = true;
269:                                 $userobj->msg .= ' ' . gettext('You must supply the street field.');
270:                             }
271:                             if (!isset($userinfo['city']) || empty($userinfo['city'])) {
272:                                 $userobj->transient = true;
273:                                 $userobj->msg .= ' ' . gettext('You must supply the city field.');
274:                             }
275:                             if (!isset($userinfo['state']) || empty($userinfo['state'])) {
276:                                 $userobj->transient = true;
277:                                 $userobj->msg .= ' ' . gettext('You must supply the state field.');
278:                             }
279:                             if (!isset($userinfo['country']) || empty($userinfo['country'])) {
280:                                 $userobj->transient = true;
281:                                 $userobj->msg .= ' ' . gettext('You must supply the country field.');
282:                             }
283:                             if (!isset($userinfo['postal']) || empty($userinfo['postal'])) {
284:                                 $userobj->transient = true;
285:                                 $userobj->msg .= ' ' . gettext('You must supply the postal code field.');
286:                             }
287:                         }
288:                         zp_setCookie('reister_user_form_addresses', $_comment_form_save_post);
289:                         userAddressFields::setCustomData($userobj, $userinfo);
290:                     }
291: 
292:                     zp_apply_filter('register_user_registered', $userobj);
293:                     if ($userobj->transient) {
294:                         if (empty($_notify)) {
295:                             $_notify = 'filter';
296:                         }
297:                     } else {
298:                         $userobj->save();
299:                         if (MOD_REWRITE) {
300:                             $verify = '?verify=';
301:                         } else {
302:                             $verify ='&verify=';
303:                         }
304:                         $_link = PROTOCOL . "://" . $_SERVER['HTTP_HOST'] . register_user::getLink() . $verify . bin2hex(serialize(array('user' => $user, 'email' => $admin_e)));
305:                         $_message = sprintf(get_language_string(getOption('register_user_text')), $_link, $admin_n, $user, $pass);
306:                         $_notify = zp_mail(get_language_string(gettext('Registration confirmation')), $_message, array($user => $admin_e));
307:                         if (empty($_notify)) {
308:                             $_notify = 'accepted';
309:                         }
310:                     }
311:                 }
312:             } else {
313:                 $_notify = 'mismatch';
314:             }
315:         } else {
316:             $_notify = 'incomplete';
317:         }
318:     }
319: 
320: }
321: 
322: /**
323:  * Parses the verification and registration if they have occurred
324:  * places the user registration form
325:  *
326:  * @param string $thanks the message shown on successful registration
327:  */
328: function printRegistrationForm($thanks = NULL) {
329:     global $admin_e, $admin_n, $user, $_zp_authority, $_zp_captcha, $_zp_gallery, $_notify, $_link, $_message;
330:     require_once(SERVERPATH . '/' . ZENFOLDER . '/admin-functions.php');
331:     $userobj = NULL;
332:     // handle any postings
333:     if (isset($_GET['verify'])) {
334:         $currentadmins = $_zp_authority->getAdministrators();
335:         $params = unserialize(pack("H*", trim(sanitize($_GET['verify']), '.')));
336:         // expung the verify query string as it will cause us to come back here if login fails.
337:         unset($_GET['verify']);
338:         $_link = explode('?', getRequestURI());
339:         $p = array();
340:         if (isset($_link[1])) {
341:             $p = explode('&', $_link[1]);
342:             foreach ($p as $k => $v) {
343:                 if (strpos($v, 'verify=') === 0) {
344:                     unset($p[$k]);
345:                 }
346:             }
347:             unset($p['verify']);
348:         }
349:         $_SERVER['REQUEST_URI'] = $_link[0];
350:         if (!empty($p)) {
351:             $_SERVER['REQUEST_URI'] .= '?' . implode('&', $p);
352:         }
353: 
354:         $userobj = Zenphoto_Authority::getAnAdmin(array('`user`=' => $params['user'], '`valid`=' => 1));
355:         if ($userobj && $userobj->getEmail() == $params['email']) {
356:             if (!$userobj->getRights()) {
357:                 $userobj->setCredentials(array('registered', 'user', 'email'));
358:                 $rights = getOption('register_user_user_rights');
359:                 $group = NULL;
360:                 if (!is_numeric($rights)) { //  a group or template
361:                     $admin = Zenphoto_Authority::getAnAdmin(array('`user`=' => $rights, '`valid`=' => 0));
362:                     if ($admin) {
363:                         $userobj->setObjects($admin->getObjects());
364:                         if ($admin->getName() != 'template') {
365:                             $group = $rights;
366:                         }
367:                         $rights = $admin->getRights();
368:                     } else {
369:                         $rights = NO_RIGHTS;
370:                     }
371:                 }
372:                 $userobj->setRights($rights | NO_RIGHTS);
373:                 $userobj->setGroup($group);
374:                 zp_apply_filter('register_user_verified', $userobj);
375:                 if (getOption('register_user_notify')) {
376:                     $_notify = zp_mail(gettext('Zenphoto Gallery registration'), sprintf(gettext('%1$s (%2$s) has registered for the zenphoto gallery providing an e-mail address of %3$s.'), $userobj->getName(), $userobj->getUser(), $userobj->getEmail()));
377:                 }
378:                 if (empty($_notify)) {
379:                     if (getOption('register_user_create_album')) {
380:                         $userobj->createPrimealbum();
381:                     }
382:                     $_notify = 'verified';
383:                     $_POST['user'] = $userobj->getUser();
384:                 }
385:                 $userobj->save();
386:             } else {
387:                 $_notify = 'already_verified';
388:             }
389:         } else {
390:             $_notify = 'not_verified'; // User ID no longer exists
391:         }
392:     }
393: 
394:     if (isset($_GET['login'])) { //presumably the user failed to login....
395:         $_notify = 'loginfailed';
396:     }
397: 
398:     if (zp_loggedin()) {
399:         if (isset($_GET['login'])) {
400:             echo '<meta http-equiv="refresh" content="1; url=' . WEBPATH . '/">';
401:         } else {
402:             echo '<div class="errorbox fade-message">';
403:             echo '<h2>' . gettext("you are already logged in.") . '</h2>';
404:             echo '</div>';
405:         }
406:         return;
407:     }
408:     if (isset($_GET['login'])) { //presumably the user failed to login....
409:         $_notify = 'loginfailed';
410:     }
411:     if (!empty($_notify)) {
412:         switch ($_notify) {
413:             case'verified':
414:                 if (is_null($thanks))
415:                     $thanks = gettext("Thank you for registering.");
416:                 ?>
417:                 <div class="Messagebox fade-message">
418:                     <p><?php echo $thanks; ?></p>
419:                     <p><?php echo gettext('You may now log onto the site and verify your personal information.'); ?></p>
420:                 </div>
421:             <?php
422:             case 'already_verified':
423:             case 'loginfailed':
424:                 $_link = getRequestURI();
425:                 if (strpos($_link, '?') === false) {
426:                     $_SERVER['REQUEST_URI'] = $_link . '?login=true';
427:                 } else {
428:                     $_SERVER['REQUEST_URI'] = $_link . '&login=true';
429:                 }
430:                 require_once(SERVERPATH . '/' . ZENFOLDER . '/' . PLUGIN_FOLDER . '/user_login-out.php');
431:                 printPasswordForm(NULL, true, false, WEBPATH . '/' . ZENFOLDER . '/admin-users.php?page=users');
432:                 $_notify = 'success';
433:                 break;
434:             case 'honeypot': //pretend it was accepted
435:             case 'accepted':
436:                 ?>
437:                 <div class="Messagebox fade-message">
438:                     <p><?php echo gettext('Your registration information has been accepted. An email has been sent to you to verify your email address.'); ?></p>
439:                 </div>
440:                 <?php
441:                 if ($_notify != 'honeypot')
442:                     $_notify = 'success'; // of course honeypot catches are no success!
443:                 break;
444:             case 'exists':
445:                 ?>
446:                 <div class="errorbox fade-message">
447:                     <h2><?php echo gettext("Registration failed."); ?></h2>
448:                     <?php 
449:                         if(getOption('register_user_email_is_id')) { 
450:                             $idnote = $admin_e;
451:                         } else {
452:                             $idnote = $user;
453:                         } 
454:                     ?>
455:                     <p><?php printf(gettext('The user ID <em>%s</em> is already in use.'), $idnote); ?></p>
456:                 </div>
457:                 <?php
458:                 break;
459:             case 'empty':
460:                 ?>
461:                 <div class="errorbox fade-message">
462:                     <h2><?php echo gettext("Registration failed."); ?></h2>
463:                     <p><?php echo gettext('Passwords may not be empty.'); ?></p>
464:                 </div>
465:                 <?php
466:                 break;
467:             case 'mismatch':
468:                 ?>
469:                 <div class="errorbox fade-message">
470:                     <h2><?php echo gettext("Registration failed."); ?></h2>
471:                     <p><?php echo gettext('Your passwords did not match.'); ?></p>
472:                 </div>
473:                 <?php
474:                 break;
475:             case 'incomplete':
476:                 ?>
477:                 <div class="errorbox fade-message">
478:                     <h2><?php echo gettext("Registration failed."); ?></h2>
479:                     <p><?php echo gettext('You have not filled in all the fields.'); ?></p>
480:                 </div>
481:                 <?php
482:                 break;
483:             case 'notverified':
484:                 ?>
485:                 <div class="errorbox fade-message">
486:                     <h2><?php echo gettext("Registration failed."); ?></h2>
487:                     <p><?php echo gettext('Invalid verification link.'); ?></p>
488:                 </div>
489:                 <?php
490:                 break;
491:             case 'invalidemail':
492:                 ?>
493:                 <div class="errorbox fade-message">
494:                     <h2><?php echo gettext("Registration failed."); ?></h2>
495:                     <p><?php echo gettext('Enter a valid email address.'); ?></p>
496:                 </div>
497:                 <?php
498:                 break;
499:             case 'duplicateemail':
500:                 ?>
501:                 <div class="errorbox fade-message">
502:                     <h2><?php echo gettext("Registration failed."); ?></h2>
503:                     <p><?php echo gettext('The email address entered is already used.'); ?></p>
504:                 </div>
505:                 <?php
506:                 break;
507:             case 'invalidcaptcha':
508:                 ?>
509:                 <div class="errorbox fade-message">
510:                     <h2><?php echo gettext("Registration failed."); ?></h2>
511:                     <p><?php echo gettext('The CAPTCHA you entered was not correct.'); ?></p>
512:                 </div>
513:                 <?php
514:                 break;
515:             case 'not_verified':
516:                 ?>
517:                 <div class="errorbox fade-message">
518:                     <h2><?php echo gettext("Verification failed."); ?></h2>
519:                     <p><?php echo gettext('Your registration request could not be completed.'); ?></p>
520:                 </div>
521:                 <?php
522:                 break;
523:             case 'filter':
524:                 ?>
525:                 <div class="errorbox fade-message">
526:                     <h2><?php echo gettext("Registration failed."); ?></h2>
527:                     <p>
528:                         <?php
529:                         if (is_object($userobj) && !empty($userobj->msg)) {
530:                             echo $userobj->msg;
531:                         } else {
532:                             echo gettext('Your registration attempt failed a <code>register_user_registered</code> filter check.');
533:                         }
534:                         ?>
535:                     </p>
536:                 </div>
537:                 <?php
538:                 break;
539:             default:
540:                 ?>
541:                 <div class="errorbox fade-message">
542:                     <h2><?php echo gettext("Registration failed."); ?></h2>
543:                     <p><?php echo $_notify; ?></p>
544:                 </div>
545:                 <?php
546:                 break;
547:         }
548:     }
549:     if ($_notify != 'success') {
550:         $form = getPlugin('register_user/register_user_form.php', true);
551:         require_once($form);
552:     }
553: }
554: 
555: /**
556:  * prints the link to the register user page
557:  *
558:  * @param string $_linktext text for the link
559:  * @param string $prev text to insert before the URL
560:  * @param string $next text to follow the URL
561:  * @param string $class optional class
562:  */
563: function printRegisterURL($_linktext, $prev = '', $next = '', $class = NULL) {
564:     if (!zp_loggedin()) {
565:         if (!is_null($class)) {
566:             $class = 'class="' . $class . '"';
567:         }
568:         if (is_null($_linktext)) {
569:             $_linktext = get_language_string(getOption('register_user_page_link'));
570:         }
571:         echo $prev;
572:         ?>
573:         <a href="<?php echo html_encode(register_user::getLink()); ?>"<?php echo $class; ?> title="<?php echo html_encode($_linktext); ?>" id="register_link"><?php echo $_linktext; ?> </a>
574:         <?php
575:         echo $next;
576:     }
577: }
578: 
579: if (isset($_POST['register_user'])) {
580:     zp_register_filter('load_theme_script', 'register_user::post_processor');
581: }
582: ?>
Zenphoto doc API documentation generated by ApiGen