Overview

Namespaces

  • Composer
    • Autoload
  • Geekwright
    • RegDom
  • League
    • OAuth2
      • Client
        • Provider
  • None
  • Xmf
    • Database
    • Jwt
    • Key
    • Module
      • Helper

Classes

  • ArtObject
  • ArtObjectHandler
  • BloggerApi
  • CGIF
  • CGIFCOLORTABLE
  • CGIFFILEHEADER
  • CGIFIMAGE
  • CGIFIMAGEHEADER
  • CGIFLZW
  • Composer\Autoload\ClassLoader
  • Composer\Autoload\ComposerStaticInit274e5fff219a4f27a346e611b0580d6a
  • ComposerAutoloaderInit274e5fff219a4f27a346e611b0580d6a
  • Config_File
  • Cookie
  • Criteria
  • CriteriaCompo
  • CriteriaElement
  • Database
  • Db_manager
  • ErrorHandler
  • FormDhtmlTextArea
  • FormTextArea
  • Geekwright\RegDom\PublicSuffixList
  • Geekwright\RegDom\RegisteredDomain
  • HTMLPurifier
  • League\OAuth2\Client\Provider\Google
  • MetaWeblogApi
  • ModuleAdmin
  • MovableTypeApi
  • MyTextSanitizer
  • MyTextSanitizerExtended
  • MyTextSanitizerExtension
  • MytsCensor
  • MytsFlash
  • MytsIframe
  • MytsImage
  • MytsLi
  • MytsMms
  • MytsMp3
  • MytsRtsp
  • MytsSoundcloud
  • MytsSyntaxhighlight
  • MytsTextfilter
  • MytsUl
  • MytsWiki
  • MytsWmp
  • MytsYoutube
  • PathStuffController
  • PHPMailer
  • PHPMailerOAuth
  • PHPMailerOAuthGoogle
  • phpthumb
  • phpthumb_bmp
  • phpthumb_filters
  • phpthumb_functions
  • phpthumb_ico
  • phpUnsharpMask
  • PmCorePreload
  • PmMessage
  • PmMessageHandler
  • PmSystemPreload
  • POP3
  • ProfileCategory
  • ProfileCategoryHandler
  • ProfileCorePreload
  • ProfileField
  • ProfileFieldHandler
  • ProfileProfile
  • ProfileProfileHandler
  • ProfileRegstep
  • ProfileRegstepHandler
  • ProfileVisibility
  • ProfileVisibilityHandler
  • Protector
  • Protector_bruteforce_overrun_message
  • Protector_crawler_overrun_message
  • Protector_f5attack_overrun_message
  • Protector_postcommon_post_deny_by_httpbl
  • Protector_postcommon_post_deny_by_rbl
  • Protector_postcommon_post_htmlpurify4everyone
  • Protector_postcommon_post_htmlpurify4guest
  • Protector_postcommon_post_language_match
  • Protector_postcommon_post_need_multibyte
  • Protector_postcommon_post_register_moratorium
  • Protector_postcommon_post_stopforumspam
  • Protector_postcommon_register_insert_js_check
  • Protector_postcommon_register_stopforumspam
  • Protector_precommon_badip_errorlog
  • Protector_precommon_badip_message
  • Protector_precommon_badip_redirection
  • Protector_precommon_bwlimit_errorlog
  • Protector_precommon_bwlimit_message
  • Protector_prepurge_exit_message
  • Protector_spamcheck_overrun_message
  • ProtectorCorePreload
  • ProtectorFilterAbstract
  • ProtectorFilterHandler
  • ProtectorMySQLDatabase
  • ProtectorRegistry
  • ReCaptchaResponse
  • RpcArrayHandler
  • RpcBase64Handler
  • RpcBooleanHandler
  • RpcDateTimeHandler
  • RpcDoubleHandler
  • RpcIntHandler
  • RpcMemberHandler
  • RpcMethodNameHandler
  • RpcNameHandler
  • RpcStringHandler
  • RpcStructHandler
  • RpcValueHandler
  • RssAuthorHandler
  • RssCategoryHandler
  • RssChannelHandler
  • RssCommentsHandler
  • RssCopyrightHandler
  • RssDescriptionHandler
  • RssDocsHandler
  • RssGeneratorHandler
  • RssGuidHandler
  • RssHeightHandler
  • RssImageHandler
  • RssItemHandler
  • RssLanguageHandler
  • RssLastBuildDateHandler
  • RssLinkHandler
  • RssManagingEditorHandler
  • RssNameHandler
  • RssPubDateHandler
  • RssSourceHandler
  • RssTextInputHandler
  • RssTitleHandler
  • RssTtlHandler
  • RssUrlHandler
  • RssWebMasterHandler
  • RssWidthHandler
  • SaxParser
  • Smarty
  • Smarty_Compiler
  • SMTP
  • Snoopy
  • SqlUtility
  • SystemAvatar
  • SystemAvatarHandler
  • SystemBanner
  • SystemBannerclient
  • SystemBannerclientHandler
  • SystemBannerFinish
  • SystemBannerfinishHandler
  • SystemBannerHandler
  • SystemBlock
  • SystemBlockHandler
  • SystemBlockLinkModule
  • SystemBlockLinkModuleHandler
  • SystemBreadcrumb
  • SystemCorePreload
  • SystemFineAvatarUploadHandler
  • SystemFineImUploadHandler
  • SystemFineUploadHandler
  • SystemGroup
  • SystemGroupHandler
  • SystemMaintenance
  • SystemMenuHandler
  • SystemSmilies
  • SystemsmiliesHandler
  • SystemUserrank
  • SystemuserrankHandler
  • SystemUsers
  • SystemUsersHandler
  • Tar
  • ThemeSetAuthorHandler
  • ThemeSetDateCreatedHandler
  • ThemeSetDescriptionHandler
  • ThemeSetEmailHandler
  • ThemeSetFileTypeHandler
  • ThemeSetGeneratorHandler
  • ThemeSetImageHandler
  • ThemeSetLinkHandler
  • ThemeSetModuleHandler
  • ThemeSetNameHandler
  • ThemeSetTagHandler
  • ThemeSetTemplateHandler
  • TinyMCE
  • Xmf\Assert
  • Xmf\Database\Migrate
  • Xmf\Database\TableLoad
  • Xmf\Database\Tables
  • Xmf\Debug
  • Xmf\FilterInput
  • Xmf\Highlighter
  • Xmf\IPAddress
  • Xmf\Jwt\JsonWebToken
  • Xmf\Jwt\KeyFactory
  • Xmf\Jwt\TokenFactory
  • Xmf\Jwt\TokenReader
  • Xmf\Key\ArrayStorage
  • Xmf\Key\Basic
  • Xmf\Key\FileStorage
  • Xmf\Key\KeyAbstract
  • Xmf\Language
  • Xmf\Metagen
  • Xmf\Module\Admin
  • Xmf\Module\Helper
  • Xmf\Module\Helper\AbstractHelper
  • Xmf\Module\Helper\Cache
  • Xmf\Module\Helper\GenericHelper
  • Xmf\Module\Helper\Permission
  • Xmf\Module\Helper\Session
  • Xmf\Random
  • Xmf\Request
  • Xmf\StopWords
  • Xmf\Yaml
  • XmlTagHandler
  • XoopsApi
  • xoopsart
  • XoopsAuth
  • XoopsAuthAds
  • XoopsAuthFactory
  • XoopsAuthLdap
  • XoopsAuthProvisionning
  • XoopsAuthXoops
  • XoopsAvatar
  • XoopsAvatarHandler
  • XoopsBlock
  • XoopsBlockHandler
  • XoopsBlockInstance
  • XoopsBlockInstanceHandler
  • XoopsCache
  • XoopsCacheApc
  • XoopsCacheEngine
  • XoopsCacheFile
  • XoopsCacheMemcache
  • XoopsCacheModel
  • XoopsCacheModelHandler
  • XoopsCacheModelObject
  • XoopsCacheXcache
  • XoopsCaptcha
  • XoopsCaptchaImage
  • XoopsCaptchaImageHandler
  • XoopsCaptchaMethod
  • XoopsCaptchaRecaptcha
  • XoopsCaptchaRecaptcha2
  • XoopsCaptchaText
  • XoopsComment
  • XoopsCommentHandler
  • XoopsCommentRenderer
  • XoopsComments
  • XoopsConfigCategory
  • XoopsConfigCategoryHandler
  • XoopsConfigHandler
  • XoopsConfigItem
  • XoopsConfigItemHandler
  • XoopsConfigOption
  • XoopsConfigOptionHandler
  • XoopsDatabase
  • XoopsDatabaseFactory
  • XoopsDownloader
  • XoopsEditor
  • XoopsEditorHandler
  • XoopsErrorHandler
  • XoopsFile
  • XoopsFileHandler
  • XoopsFilterInput
  • XoopsFolderHandler
  • XoopsForm
  • XoopsFormButton
  • XoopsFormButtonTray
  • XoopsFormCaptcha
  • XoopsFormCheckBox
  • XoopsFormColorPicker
  • XoopsFormDateTime
  • XoopsFormDhtmlTextArea
  • XoopsFormEditor
  • XoopsFormElement
  • XoopsFormElementTray
  • XoopsFormFile
  • XoopsFormHidden
  • XoopsFormHiddenToken
  • XoopsFormLabel
  • XoopsFormPassword
  • XoopsFormRadio
  • XoopsFormRadioYN
  • XoopsFormRenderer
  • XoopsFormRendererBootstrap3
  • XoopsFormRendererLegacy
  • XoopsFormSelect
  • XoopsFormSelectCheckGroup
  • XoopsFormSelectCountry
  • XoopsFormSelectEditor
  • XoopsFormSelectGroup
  • XoopsFormSelectLang
  • XoopsFormSelectMatchOption
  • XoopsFormSelectTheme
  • XoopsFormSelectTimezone
  • XoopsFormSelectUser
  • XoopsFormText
  • XoopsFormTextArea
  • XoopsFormTextDateSelect
  • XoopsFormTinymce
  • XoopsGroup
  • XoopsGroupFormCheckBox
  • XoopsGroupHandler
  • XoopsGroupPerm
  • XoopsGroupPermForm
  • XoopsGroupPermHandler
  • XoopsGTicket
  • XoopsGuestUser
  • XoopsGuiDefault
  • XoopsGuiThadmin
  • XoopsGuiTransition
  • XoopsGuiZetadigme
  • XoopsHandlerRegistry
  • XoopsImage
  • XoopsImagecategory
  • XoopsImagecategoryHandler
  • XoopsImageHandler
  • XoopsImageSet
  • XoopsImagesetHandler
  • XoopsImagesetimg
  • XoopsImagesetimgHandler
  • XoopsInstallWizard
  • XoopsLists
  • XoopsLoad
  • XoopsLocal
  • XoopsLocalAbstract
  • XoopsLocalWrapper
  • XoopsLogger
  • XoopsMailer
  • XoopsMailerLocal
  • XoopsMediaUploader
  • XoopsMemberHandler
  • XoopsMembership
  • XoopsMembershipHandler
  • XoopsModelAbstract
  • XoopsModelFactory
  • XoopsModelJoint
  • XoopsModelRead
  • XoopsModelStats
  • XoopsModelSync
  • XoopsModelWrite
  • XoopsModule
  • XoopsModuleHandler
  • XoopsMultiMailer
  • XoopsMySQLDatabase
  • XoopsMySQLDatabaseProxy
  • XoopsMySQLDatabaseSafe
  • XoopsNotification
  • XoopsNotificationHandler
  • XoopsObject
  • XoopsObjectHandler
  • XoopsObjectTree
  • XoopsOnlineHandler
  • XoopsPageNav
  • XoopsPersistableObjectHandler
  • XoopsPreload
  • XoopsPreloadItem
  • XoopsPrivmessage
  • XoopsPrivmessageHandler
  • XoopsRank
  • XoopsRankHandler
  • XoopsRequest
  • XoopsSecurity
  • XoopsSessionHandler
  • XoopsSimpleForm
  • XoopsStory
  • XoopsSystemCpanel
  • XoopsSystemGui
  • XoopsTableForm
  • XoopsTarDownloader
  • XoopsThemeForm
  • XoopsThemeSetParser
  • XoopsTopic
  • XoopsTpl
  • XoopsTplfile
  • XoopsTplfileHandler
  • XoopsTplset
  • XoopsTplsetHandler
  • XoopsTree
  • XoopsUser
  • XoopsUserHandler
  • XoopsUserUtility
  • XoopsUtility
  • XoopsXmlRpcApi
  • XoopsXmlRpcArray
  • XoopsXmlRpcBase64
  • XoopsXmlRpcBoolean
  • XoopsXmlRpcDatetime
  • XoopsXmlRpcDocument
  • XoopsXmlRpcDouble
  • XoopsXmlRpcFault
  • XoopsXmlRpcInt
  • XoopsXmlRpcParser
  • XoopsXmlRpcRequest
  • XoopsXmlRpcResponse
  • XoopsXmlRpcString
  • XoopsXmlRpcStruct
  • XoopsXmlRpcTag
  • XoopsXmlRss2Parser
  • XoopsZipDownloader
  • xos_kernel_Xoops2
  • xos_logos_PageBuilder
  • xos_opal_AdminThemeFactory
  • xos_opal_Theme
  • xos_opal_ThemeFactory
  • XoUser
  • XoUserHandler
  • Zipfile

Interfaces

  • Xmf\Key\StorageInterface
  • XoopsFormRendererInterface

Exceptions

  • phpmailerException

Functions

  • __autoload
  • _recaptcha_aes_encrypt
  • _recaptcha_aes_pad
  • _recaptcha_http_post
  • _recaptcha_mailhide_email_parts
  • _recaptcha_mailhide_urlbase64
  • _recaptcha_qsencode
  • _smarty_regex_replace_check
  • _smarty_sort_length
  • admin_refcheck
  • b_system_comments_edit
  • b_system_comments_show
  • b_system_info_edit
  • b_system_info_show
  • b_system_login_show
  • b_system_main_show
  • b_system_newmembers_edit
  • b_system_newmembers_show
  • b_system_notification_show
  • b_system_online_show
  • b_system_search_show
  • b_system_themes_edit
  • b_system_themes_show
  • b_system_topposters_edit
  • b_system_topposters_show
  • b_system_user_show
  • b_system_waiting_show
  • bannerstats
  • change_banner_url_by_client
  • checkEmail
  • clickbanner
  • clientlogin
  • closeTable
  • closeThread
  • CloseWaitBox
  • Composer\Autoload\includeFile
  • composerRequire274e5fff219a4f27a346e611b0580d6a
  • createConfigform
  • createThemeform
  • doConditionalGet
  • emailStats
  • exit404BadReq
  • fatalPhpErrorHandler
  • file_get_contents
  • file_put_contents
  • findSharp
  • form_user
  • formatTimestamp
  • formatURL
  • gd_info
  • genPathCheckHtml
  • get_request_method
  • get_writeoks_from_protector
  • getcss
  • getDbCharsets
  • getDbCollations
  • getDirList
  • getMailer
  • getTheme
  • gif_getSize
  • gif_loadFile
  • gif_loadFileToGDimageResource
  • gif_outputAsBmp
  • gif_outputAsJpeg
  • gif_outputAsPng
  • HTMLPurifier
  • imagealphablending
  • imageBrowser
  • imageCreateCorners
  • imageFilenameCheck
  • imagesavealpha
  • install_acceptUser
  • install_finalize
  • is_executable
  • kses
  • langDropdown
  • load_functions
  • load_object
  • load_objectHandler
  • loadModuleAdminMenu
  • make_cblock
  • make_data
  • make_groups
  • make_sidebar
  • mod_clearCacheFile
  • mod_clearConfg
  • mod_clearConfig
  • mod_clearFile
  • mod_clearSmartyCache
  • mod_constant
  • mod_createCacheFile
  • mod_createCacheFile_byGroup
  • mod_createFile
  • mod_DB_prefix
  • mod_fetchConfg
  • mod_fetchConfig
  • mod_generateCacheId
  • mod_generateCacheId_byGroup
  • mod_getDirname
  • mod_getIP
  • mod_getMysqlVersion
  • mod_getUnameFromId
  • mod_getUnameFromIds
  • mod_isModuleAction
  • mod_loadCacheFile
  • mod_loadCacheFile_byGroup
  • mod_loadConfg
  • mod_loadConfig
  • mod_loadFile
  • mod_loadFunctions
  • mod_loadRenderer
  • mod_message
  • modify_chmod
  • myTextForm
  • notificationCategoryInfo
  • notificationCommentCategoryInfo
  • notificationEnabled
  • notificationEventEnabled
  • notificationEventInfo
  • notificationEvents
  • notificationGenerateConfig
  • notificationSubscribableCategoryInfo
  • openTable
  • openThread
  • OpenWaitBox
  • PHPMailerAutoload
  • phpThumbURL
  • preg_quote
  • profile_getFieldForm
  • profile_getRegisterForm
  • profile_getStepForm
  • profile_getUserForm
  • profile_install_addCategory
  • profile_install_addField
  • profile_install_addStep
  • profile_install_initializeProfiles
  • profile_install_setPermissions
  • protector_message_append_oninstall
  • protector_message_append_onuninstall
  • protector_message_append_onupdate
  • protector_notify_base
  • protector_oninstall_base
  • protector_onuninstall_base
  • protector_onupdate_base
  • protector_postcommon
  • protector_prepare
  • recaptcha_check_answer
  • recaptcha_get_html
  • recaptcha_get_signup_url
  • recaptcha_mailhide_html
  • recaptcha_mailhide_url
  • redirect_header
  • RedirectToCachedFile
  • SendSaveAsFileHeaderIfNeeded
  • showbanner
  • showThread
  • smarty_block_textformat
  • smarty_compiler_assign
  • smarty_compiler_foreachq
  • smarty_compiler_includeq
  • smarty_compiler_xoAdminIcons
  • smarty_compiler_xoAdminNav
  • smarty_compiler_xoAppUrl
  • smarty_compiler_xoImgUrl
  • smarty_compiler_xoModuleIcons16
  • smarty_compiler_xoModuleIcons32
  • smarty_compiler_xoModuleIconsBookmarks
  • smarty_core_assemble_plugin_filepath
  • smarty_core_assign_smarty_interface
  • smarty_core_create_dir_structure
  • smarty_core_display_debug_console
  • smarty_core_get_include_path
  • smarty_core_get_microtime
  • smarty_core_get_php_resource
  • smarty_core_is_secure
  • smarty_core_is_trusted
  • smarty_core_load_plugins
  • smarty_core_load_resource_plugin
  • smarty_core_process_cached_inserts
  • smarty_core_process_compiled_include
  • smarty_core_read_cache_file
  • smarty_core_rm_auto
  • smarty_core_rmdir
  • smarty_core_run_insert_handler
  • smarty_core_smarty_include_php
  • smarty_core_write_cache_file
  • smarty_core_write_compiled_include
  • smarty_core_write_compiled_resource
  • smarty_core_write_file
  • smarty_function_assign_debug_info
  • smarty_function_block
  • smarty_function_config_load
  • smarty_function_counter
  • smarty_function_cycle
  • smarty_function_debug
  • smarty_function_escape_special_chars
  • smarty_function_eval
  • smarty_function_fetch
  • smarty_function_html_checkboxes
  • smarty_function_html_checkboxes_output
  • smarty_function_html_image
  • smarty_function_html_options
  • smarty_function_html_options_optgroup
  • smarty_function_html_options_optoutput
  • smarty_function_html_radios
  • smarty_function_html_radios_output
  • smarty_function_html_select_date
  • smarty_function_html_select_time
  • smarty_function_html_table
  • smarty_function_html_table_cycle
  • smarty_function_mailto
  • smarty_function_math
  • smarty_function_popup
  • smarty_function_popup_init
  • smarty_function_securityToken
  • smarty_function_xoInboxCount
  • smarty_function_xoMemberInfo
  • smarty_function_xoops_link
  • smarty_function_xoPageNav
  • smarty_make_timestamp
  • smarty_modifier_capitalize
  • smarty_modifier_capitalize_ucfirst
  • smarty_modifier_cat
  • smarty_modifier_count_characters
  • smarty_modifier_count_paragraphs
  • smarty_modifier_count_sentences
  • smarty_modifier_count_words
  • smarty_modifier_date_format
  • smarty_modifier_debug_print_var
  • smarty_modifier_default
  • smarty_modifier_escape
  • smarty_modifier_indent
  • smarty_modifier_lower
  • smarty_modifier_nl2br
  • smarty_modifier_regex_replace
  • smarty_modifier_replace
  • smarty_modifier_spacify
  • smarty_modifier_string_format
  • smarty_modifier_strip
  • smarty_modifier_strip_tags
  • smarty_modifier_truncate
  • smarty_modifier_upper
  • smarty_modifier_wordwrap
  • smarty_outputfilter_trimwhitespace
  • smarty_outputfilter_trimwhitespace_replace
  • smarty_resource_db_secure
  • smarty_resource_db_source
  • smarty_resource_db_timestamp
  • smarty_resource_db_tplinfo
  • smarty_resource_db_trusted
  • synchronize
  • system_AdminIcons
  • system_adminVersion
  • system_CleanVars
  • system_loadLanguage
  • system_loadTemplate
  • themecenterposts
  • update_system_v211
  • userCheck
  • userTimeToServerTime
  • validateDbCharset
  • writeLicenseKey
  • xoBuildLicenceKey
  • xoDiag
  • xoDiagBoolSetting
  • xoDiagIfWritable
  • xoFormBlockCollation
  • xoFormField
  • xoFormFieldCharset
  • xoFormFieldCollation
  • xoFormSelect
  • xoops_aw_decode
  • xoops_aw_encode
  • xoops_bin2hex
  • xoops_comment_count
  • xoops_comment_delete
  • xoops_confirm
  • xoops_convert_decode
  • xoops_convert_encode
  • xoops_convert_encoding
  • xoops_cp_footer
  • xoops_cp_header
  • xoops_error
  • xoops_footer
  • xoops_getActiveModules
  • xoops_getbanner
  • xoops_getBaseDomain
  • xoops_getConfigOption
  • xoops_getcss
  • xoops_getenv
  • xoops_getHandler
  • xoops_getLinkedUnameFromId
  • xoops_getMailer
  • xoops_getModuleHandler
  • xoops_getModuleOption
  • xoops_getOption
  • xoops_getrank
  • xoops_getUrlDomain
  • xoops_getUserTimestamp
  • xoops_groupperm_deletebymoditem
  • xoops_header
  • xoops_hex2bin
  • xoops_isActiveModule
  • xoops_ishexstr
  • xoops_load
  • xoops_load_lang_file
  • xoops_loadLanguage
  • xoops_local
  • xoops_makepass
  • xoops_message
  • xoops_module_activate
  • xoops_module_change
  • xoops_module_deactivate
  • xoops_module_delayed_clean_cache
  • xoops_module_get_admin_menu
  • xoops_module_gettemplate
  • xoops_module_install
  • xoops_module_install_pm
  • xoops_module_install_profile
  • xoops_module_log_header
  • xoops_module_uninstall
  • xoops_module_update
  • xoops_module_update_pm
  • xoops_module_update_profile
  • xoops_module_update_system
  • xoops_module_write_admin_menu
  • xoops_notification_deletebyitem
  • xoops_notification_deletebymodule
  • xoops_notification_deletebyuser
  • xoops_refcheck
  • xoops_result
  • xoops_setActiveModules
  • xoops_setConfigOption
  • xoops_substr
  • xoops_template_clear_module_cache
  • xoops_template_touch
  • xoops_trim
  • xoops_utf8_encode
  • xoops_write_index_file
  • xoopsCodeTarea
  • xoopseditor_get_rootpath
  • XoopsErrorHandler_HandleError
  • xoopsfwrite
  • xoopsSmilies
  • xoPassField
  • xoPhpVersion
  • xoPutLicenseKey
  • xoStripeKey
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: /**
  3:  * See the enclosed file license.txt for licensing information.
  4:  * If you did not receive this file, get it at http://www.gnu.org/licenses/gpl-2.0.html
  5:  *
  6:  * @copyright    (c) 2000-2016 XOOPS Project (www.xoops.org)
  7:  * @license          GNU GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
  8:  * @package          installer
  9:  * @since            2.3.0
 10:  * @author           Haruki Setoyama  <haruki@planewave.org>
 11:  * @author           Kazumi Ono <webmaster@myweb.ne.jp>
 12:  * @author           Skalpa Keo <skalpa@xoops.org>
 13:  * @author           Taiwen Jiang <phppp@users.sourceforge.net>
 14:  * @author           DuGris (aka L. JEN) <dugris@frxoops.org>
 15:  * @param string $hash
 16:  * @return bool
 17:  */
 18: 
 19: function install_acceptUser($hash = '')
 20: {
 21:     $GLOBALS['xoopsUser'] = null;
 22:     $assertClaims = array(
 23:         'sub' => 'xoopsinstall',
 24:     );
 25:     $claims = \Xmf\Jwt\TokenReader::fromCookie('install', 'xo_install_user', $assertClaims);
 26:     if (false === $claims || empty($claims->uname)) {
 27:         return false;
 28:     }
 29:     $uname = $claims->uname;
 30:     /* @var $memberHandler XoopsMemberHandler */
 31:     $memberHandler = xoops_getHandler('member');
 32:     $user = array_pop($memberHandler->getUsers(new Criteria('uname', $uname)));
 33: 
 34:     if (is_object($GLOBALS['xoops']) && method_exists($GLOBALS['xoops'], 'acceptUser')) {
 35:         $res = $GLOBALS['xoops']->acceptUser($uname, true, '');
 36: 
 37:         return $res;
 38:     }
 39: 
 40:     $GLOBALS['xoopsUser']        = $user;
 41:     $_SESSION['xoopsUserId']     = $GLOBALS['xoopsUser']->getVar('uid');
 42:     $_SESSION['xoopsUserGroups'] = $GLOBALS['xoopsUser']->getGroups();
 43: 
 44:     return true;
 45: }
 46: 
 47: /**
 48:  * @param $installer_modified
 49:  */
 50: function install_finalize($installer_modified)
 51: {
 52:     // Set mainfile.php readonly
 53:     @chmod(XOOPS_ROOT_PATH . '/mainfile.php', 0444);
 54:     // Set Secure file readonly
 55:     @chmod(XOOPS_VAR_PATH . '/data/secure.php', 0444);
 56:     // Rename installer folder
 57:     @rename(XOOPS_ROOT_PATH . '/install', XOOPS_ROOT_PATH . '/' . $installer_modified);
 58: }
 59: 
 60: /**
 61:  * @param        $name
 62:  * @param        $value
 63:  * @param        $label
 64:  * @param string $help
 65:  */
 66: function xoFormField($name, $value, $label, $help = '')
 67: {
 68:     $myts  = MyTextSanitizer::getInstance();
 69:     $label = $myts->htmlspecialchars($label, ENT_QUOTES, _INSTALL_CHARSET, false);
 70:     $name  = $myts->htmlspecialchars($name, ENT_QUOTES, _INSTALL_CHARSET, false);
 71:     $value = $myts->htmlspecialchars($value, ENT_QUOTES);
 72:     echo '<div class="form-group">';
 73:     echo '<label class="xolabel" for="' . $name . '">' . $label . '</label>';
 74:     if ($help) {
 75:         echo '<div class="xoform-help alert alert-info">' . $help . '</div>';
 76:     }
 77:     echo '<input type="text" class="form-control" name="'.$name.'" id="'.$name.'" value="'.$value.'">';
 78:     echo '</div>';
 79: }
 80: 
 81: /**
 82:  * @param        $name
 83:  * @param        $value
 84:  * @param        $label
 85:  * @param string $help
 86:  */
 87: function xoPassField($name, $value, $label, $help = '')
 88: {
 89:     $myts  = MyTextSanitizer::getInstance();
 90:     $label = $myts->htmlspecialchars($label, ENT_QUOTES, _INSTALL_CHARSET, false);
 91:     $name  = $myts->htmlspecialchars($name, ENT_QUOTES, _INSTALL_CHARSET, false);
 92:     $value = $myts->htmlspecialchars($value, ENT_QUOTES);
 93:     echo '<div class="form-group">';
 94:     echo '<label class="xolabel" for="' . $name . '">' . $label . '</label>';
 95:     if ($help) {
 96:         echo '<div class="xoform-help alert alert-info">' . $help . '</div>';
 97:     }
 98:     if ($name === 'adminpass') {
 99:         echo '<input type="password" class="form-control" name="'.$name.'" id="'.$name.'" value="'.$value.'"  onkeyup="passwordStrength(this.value)">';
100:     } else {
101:         echo '<input type="password" class="form-control" name="'.$name.'" id="'.$name.'" value="'.$value.'">';
102:     }
103:     echo '</div>';
104: }
105: 
106: /**
107:  * @param        $name
108:  * @param        $value
109:  * @param        $label
110:  * @param array  $options
111:  * @param string $help
112:  * @param        $extra
113:  */
114: function xoFormSelect($name, $value, $label, $options, $help = '', $extra='')
115: {
116:     $myts  = MyTextSanitizer::getInstance();
117:     $label = $myts->htmlspecialchars($label, ENT_QUOTES, _INSTALL_CHARSET, false);
118:     $name  = $myts->htmlspecialchars($name, ENT_QUOTES, _INSTALL_CHARSET, false);
119:     $value = $myts->htmlspecialchars($value, ENT_QUOTES);
120:     echo '<div class="form-group">';
121:     echo '<label class="xolabel" for="' . $name . '">' . $label . '</label>';
122:     if ($help) {
123:         echo '<div class="xoform-help alert alert-info">' . $help . '</div>';
124:     }
125:     echo '<select class="form-control" name="'.$name.'" id="'.$name.'" value="'.$value.'" '.$extra.'>';
126:     foreach ($options as $optionValue => $optionReadable) {
127:         $selected = ($value === $optionValue) ? ' selected' : '';
128:         echo '<option value="'.$optionValue . '"' . $selected . '>' . $optionReadable . '</option>';
129:     }
130:     echo '</select>';
131:     echo '</div>';
132: }
133: 
134: /*
135:  * gets list of name of directories inside a directory
136:  */
137: /**
138:  * @param $dirname
139:  *
140:  * @return array
141:  */
142: function getDirList($dirname)
143: {
144:     $dirlist = array();
145:     if ($handle = opendir($dirname)) {
146:         while ($file = readdir($handle)) {
147:             if ($file{0} !== '.' && is_dir($dirname . $file)) {
148:                 $dirlist[] = $file;
149:             }
150:         }
151:         closedir($handle);
152:         asort($dirlist);
153:         reset($dirlist);
154:     }
155: 
156:     return $dirlist;
157: }
158: 
159: /**
160:  * @param        $status
161:  * @param string $str
162:  *
163:  * @return string
164:  */
165: function xoDiag($status = -1, $str = '')
166: {
167:     if ($status == -1) {
168:         $GLOBALS['error'] = true;
169:     }
170:     $classes = array(-1 => 'fa fa-fw fa-ban text-danger', 0 => 'fa fa-fw fa-square-o text-warning', 1 => 'fa fa-fw fa-check text-success');
171:     $strings = array(-1 => FAILED, 0 => WARNING, 1 => SUCCESS);
172:     if (empty($str)) {
173:         $str = $strings[$status];
174:     }
175: 
176:     return '<span class="' . $classes[$status] . '"></span>' . $str;
177: }
178: 
179: /**
180:  * @param      $name
181:  * @param bool $wanted
182:  * @param bool $severe
183:  *
184:  * @return string
185:  */
186: function xoDiagBoolSetting($name, $wanted = false, $severe = false)
187: {
188:     $setting = (bool) ini_get($name);
189:     if ($setting === (bool) $wanted) {
190:         return xoDiag(1, $setting ? 'ON' : 'OFF');
191:     } else {
192:         return xoDiag($severe ? -1 : 0, $setting ? 'ON' : 'OFF');
193:     }
194: }
195: 
196: /**
197:  * seems to only be used for license file?
198:  * @param string $path dir or file path
199:  *
200:  * @return string
201:  */
202: function xoDiagIfWritable($path)
203: {
204:     $path  = '../' . $path;
205:     $error = true;
206:     if (!is_dir($path)) {
207:         if (file_exists($path) && !is_writable($path)) {
208:             @chmod($path, 0664);
209:             $error = !is_writable($path);
210:         }
211:     } else {
212:         if (!is_writable($path)) {
213:             @chmod($path, 0775);
214:             $error = !is_writable($path);
215:         }
216:     }
217: 
218:     return xoDiag($error ? -1 : 1, $error ? ' ' : ' ');
219: }
220: 
221: /**
222:  * @return string
223:  */
224: function xoPhpVersion()
225: {
226:     if (version_compare(phpversion(), '5.3.7', '>=')) {
227:         return xoDiag(1, phpversion());
228:     //} elseif (version_compare(phpversion(), '5.3.7', '>=')) {
229:     //    return xoDiag(0, phpversion());
230:     } else {
231:         return xoDiag(-1, phpversion());
232:     }
233: }
234: 
235: /**
236:  * @param $path
237:  * @param $valid
238:  *
239:  * @return string
240:  */
241: function genPathCheckHtml($path, $valid)
242: {
243:     if ($valid) {
244:         switch ($path) {
245:             case 'root':
246:                 $msg = sprintf(XOOPS_FOUND, XOOPS_VERSION);
247:                 break;
248: 
249:             case 'lib':
250:             case 'data':
251:             default:
252:                 $msg = XOOPS_PATH_FOUND;
253:                 break;
254:         }
255: 
256:         return '<span class="pathmessage"><span class="fa fa-fw fa-check text-success"></span> ' . $msg . '</span>';
257:     } else {
258:         switch ($path) {
259:             case 'root':
260:                 $msg = ERR_NO_XOOPS_FOUND;
261:                 break;
262: 
263:             case 'lib':
264:             case 'data':
265:             default:
266:                 $msg = ERR_COULD_NOT_ACCESS;
267:                 break;
268:         }
269:         $GLOBALS['error'] = true;
270:         return '<div class="alert alert-danger"><span class="fa fa-fw fa-ban text-danger"></span> ' . $msg . '</div>';
271:     }
272: }
273: 
274: /**
275:  * @param $link
276:  *
277:  * @return mixed
278:  */
279: function getDbCharsets($link)
280: {
281:     static $charsets = array();
282:     if ($charsets) {
283:         return $charsets;
284:     }
285: 
286:     if ($result = mysqli_query($link, 'SHOW CHARSET')) {
287:         while ($row = mysqli_fetch_assoc($result)) {
288:             $charsets[$row['Charset']] = $row['Description'];
289:         }
290:     }
291: 
292:     return $charsets;
293: }
294: 
295: /**
296:  * @param $link
297:  * @param $charset
298:  *
299:  * @return mixed
300:  */
301: function getDbCollations($link, $charset)
302: {
303:     static $collations = array();
304:     if (!empty($collations[$charset])) {
305:         return $collations[$charset];
306:     }
307: 
308:     if ($result = mysqli_query($link, "SHOW COLLATION WHERE CHARSET = '" . mysqli_real_escape_string($link, $charset) . "'")) {
309:         while ($row = mysqli_fetch_assoc($result)) {
310:             $collations[$charset][$row['Collation']] = $row['Default'] ? 1 : 0;
311:         }
312:     }
313: 
314:     return $collations[$charset];
315: }
316: 
317: /**
318:  * @param $link
319:  * @param $charset
320:  * @param $collation
321:  *
322:  * @return null|string
323:  */
324: function validateDbCharset($link, &$charset, &$collation)
325: {
326:     $error = null;
327: 
328:     if (empty($charset)) {
329:         $collation = '';
330:     }
331:     if (empty($charset) && empty($collation)) {
332:         return $error;
333:     }
334: 
335:     $charsets = getDbCharsets($link);
336:     if (!isset($charsets[$charset])) {
337:         $error = sprintf(ERR_INVALID_DBCHARSET, $charset);
338:     } elseif (!empty($collation)) {
339:         $collations = getDbCollations($link, $charset);
340:         if (!isset($collations[$collation])) {
341:             $error = sprintf(ERR_INVALID_DBCOLLATION, $collation);
342:         }
343:     }
344: 
345:     return $error;
346: }
347: 
348: /**
349:  * @param $name
350:  * @param $value
351:  * @param $label
352:  * @param $help
353:  * @param $link
354:  * @param $charset
355:  *
356:  * @return string
357:  */
358: function xoFormFieldCollation($name, $value, $label, $help, $link, $charset)
359: {
360:     if (empty($charset) || !$collations = getDbCollations($link, $charset)) {
361:         return '';
362:     }
363: 
364:     $options           = array();
365:     foreach ($collations as $key => $isDefault) {
366:         $options[$key] = $key . (($isDefault) ? ' (Default)' : '');
367:     }
368: 
369:     return xoFormSelect($name, $value, $label, $options, $help);
370: }
371: 
372: /**
373:  * @param $name
374:  * @param $value
375:  * @param $label
376:  * @param $help
377:  * @param $link
378:  * @param $charset
379:  *
380:  * @return string
381:  */
382: function xoFormBlockCollation($name, $value, $label, $help, $link, $charset)
383: {
384:     return xoFormFieldCollation($name, $value, $label, $help, $link, $charset);
385: }
386: 
387: /**
388:  * @param        $name
389:  * @param        $value
390:  * @param        $label
391:  * @param string $help
392:  * @param        $link
393:  *
394:  * @return string
395:  */
396: function xoFormFieldCharset($name, $value, $label, $help = '', $link)
397: {
398:     if (!$charsets = getDbCharsets($link)) {
399:         return '';
400:     }
401:     foreach ($charsets as $k => $v) {
402:         $charsets[$k] = $v . ' (' . $k . ')';
403:     }
404:     asort($charsets);
405:     $myts  = MyTextSanitizer::getInstance();
406:     $label = $myts->htmlspecialchars($label, ENT_QUOTES, _INSTALL_CHARSET, false);
407:     $name  = $myts->htmlspecialchars($name, ENT_QUOTES, _INSTALL_CHARSET, false);
408:     $value = $myts->htmlspecialchars($value, ENT_QUOTES);
409:     $extra = 'onchange="setFormFieldCollation(\'DB_COLLATION\', this.value)"';
410:     return xoFormSelect($name, $value, $label, $charsets, $help, $extra);
411: }
412: 
413: /**
414:  * *#@+
415:  * Xoops Write Licence System Key
416:  * @param        $system_key
417:  * @param        $licensefile
418:  * @param string $license_file_dist
419:  * @return string
420:  */
421: function xoPutLicenseKey($system_key, $licensefile, $license_file_dist = 'license.dist.php')
422: {
423:     //chmod($licensefile, 0777);
424:     $fver     = fopen($licensefile, 'w');
425:     $fver_buf = file($license_file_dist);
426:     foreach ($fver_buf as $line => $value) {
427:         $ret = $value;
428:         if (strpos($value, 'XOOPS_LICENSE_KEY') > 0) {
429:             $ret = 'define(\'XOOPS_LICENSE_KEY\', \'' . $system_key . "');";
430:         }
431:         fwrite($fver, $ret, strlen($ret));
432:     }
433:     fclose($fver);
434:     chmod($licensefile, 0444);
435: 
436:     return sprintf(WRITTEN_LICENSE, XOOPS_LICENSE_CODE, $system_key);
437: }
438: 
439: /**
440:  * *#@+
441:  * Xoops Build Licence System Key
442:  */
443: function xoBuildLicenceKey()
444: {
445:     $xoops_serdat = array();
446:     mt_srand(((float)('0' . substr(microtime(), strpos(microtime(), ' ') + 1, strlen(microtime()) - strpos(microtime(), ' ') + 1))) * mt_rand(30, 99999));
447:     mt_srand(((float)('0' . substr(microtime(), strpos(microtime(), ' ') + 1, strlen(microtime()) - strpos(microtime(), ' ') + 1))) * mt_rand(30, 99999));
448:     $checksums = array(1 => 'md5', 2 => 'sha1');
449:     $type      = mt_rand(1, 2);
450:     $func      = $checksums[$type];
451: 
452:     error_reporting(0);
453: 
454:     // Public Key
455:     if ($xoops_serdat['version'] = $func(XOOPS_VERSION)) {
456:         $xoops_serdat['version'] = substr($xoops_serdat['version'], 0, 6);
457:     }
458:     if ($xoops_serdat['licence'] = $func(XOOPS_LICENSE_CODE)) {
459:         $xoops_serdat['licence'] = substr($xoops_serdat['licence'], 0, 2);
460:     }
461:     if ($xoops_serdat['license_text'] = $func(XOOPS_LICENSE_TEXT)) {
462:         $xoops_serdat['license_text'] = substr($xoops_serdat['license_text'], 0, 2);
463:     }
464: 
465:     if ($xoops_serdat['domain_host'] = $func($_SERVER['HTTP_HOST'])) {
466:         $xoops_serdat['domain_host'] = substr($xoops_serdat['domain_host'], 0, 2);
467:     }
468: 
469:     // Private Key
470:     $xoops_serdat['file']     = $func(__FILE__);
471:     $xoops_serdat['basename'] = $func(basename(__FILE__));
472:     $xoops_serdat['path']     = $func(__DIR__);
473: 
474:     foreach ($_SERVER as $key => $data) {
475:         $xoops_serdat[$key] = substr($func(serialize($data)), 0, 4);
476:     }
477: 
478:     $xoops_key = '';
479:     foreach ($xoops_serdat as $key => $data) {
480:         $xoops_key .= $data;
481:     }
482:     while (strlen($xoops_key) > 40) {
483:         $lpos      = mt_rand(18, strlen($xoops_key));
484:         $xoops_key = substr($xoops_key, 0, $lpos) . substr($xoops_key, $lpos + 1, strlen($xoops_key) - ($lpos + 1));
485:     }
486: 
487:     return xoStripeKey($xoops_key);
488: }
489: 
490: /**
491:  * *#@+
492:  * Xoops Stripe Licence System Key
493:  * @param $xoops_key
494:  * @return mixed|string
495:  */
496: function xoStripeKey($xoops_key)
497: {
498:     $uu     = 0;
499:     $num    = 6;
500:     $length = 30;
501:     $strip  = floor(strlen($xoops_key) / 6);
502:     $strlen = strlen($xoops_key);
503:     $ret = '';
504:     for ($i = 0; $i < $strlen; ++$i) {
505:         if ($i < $length) {
506:             ++$uu;
507:             if ($uu == $strip) {
508:                 $ret .= substr($xoops_key, $i, 1) . '-';
509:                 $uu = 0;
510:             } else {
511:                 if (substr($xoops_key, $i, 1) != '-') {
512:                     $ret .= substr($xoops_key, $i, 1);
513:                 } else {
514:                     $uu--;
515:                 }
516:             }
517:         }
518:     }
519:     $ret = str_replace('--', '-', $ret);
520:     if (substr($ret, 0, 1) == '-') {
521:         $ret = substr($ret, 2, strlen($ret));
522:     }
523:     if (substr($ret, strlen($ret) - 1, 1) == '-') {
524:         $ret = substr($ret, 0, strlen($ret) - 1);
525:     }
526: 
527:     return $ret;
528: }
529: 
530: 
531: /**
532:  * @return string
533:  */
534: function writeLicenseKey()
535: {
536:     return xoPutLicenseKey(xoBuildLicenceKey(), XOOPS_VAR_PATH . '/data/license.php', __DIR__ . '/license.dist.php');
537: }
538: 
API documentation generated by ApiGen