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:  * XOOPS news topic
  4:  *
  5:  * You may not change or alter any portion of this comment or credits
  6:  * of supporting developers from this source code or any supporting source code
  7:  * which is considered copyrighted (c) material of the original comment or credit authors.
  8:  * This program is distributed in the hope that it will be useful,
  9:  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 10:  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 11:  *
 12:  * @copyright       (c) 2000-2016 XOOPS Project (www.xoops.org)
 13:  * @license             GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html)
 14:  * @package             kernel
 15:  * @since               2.0.0
 16:  * @author              Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/
 17:  * @deprecated
 18:  */
 19: 
 20: defined('XOOPS_ROOT_PATH') || exit('Restricted access');
 21: 
 22: $GLOBALS['xoopsLogger']->addDeprecated("'/class/xoopstopic.php' is deprecated since XOOPS 2.5.4, please create your own class instead.");
 23: 
 24: include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
 25: 
 26: /**
 27:  * Class XoopsTopic
 28:  */
 29: class XoopsTopic
 30: {
 31:     public $table;
 32:     public $topic_id;
 33:     public $topic_pid;
 34:     public $topic_title;
 35:     public $topic_imgurl;
 36:     public $prefix; // only used in topic tree
 37:     public $use_permission = false;
 38:     public $mid; // module id used for setting permission
 39: 
 40:     /**
 41:      * @param     $table
 42:      * @param int|array $topicid
 43:      */
 44:     public function __construct($table, $topicid = 0)
 45:     {
 46:         $this->db    = XoopsDatabaseFactory::getDatabaseConnection();
 47:         $this->table = $table;
 48:         if (is_array($topicid)) {
 49:             $this->makeTopic($topicid);
 50:         } elseif ($topicid != 0) {
 51:             $this->getTopic((int)$topicid);
 52:         } else {
 53:             $this->topic_id = $topicid;
 54:         }
 55:     }
 56: 
 57:     /**
 58:      * @param $value
 59:      */
 60:     public function setTopicTitle($value)
 61:     {
 62:         $this->topic_title = $value;
 63:     }
 64: 
 65:     /**
 66:      * @param $value
 67:      */
 68:     public function setTopicImgurl($value)
 69:     {
 70:         $this->topic_imgurl = $value;
 71:     }
 72: 
 73:     /**
 74:      * @param $value
 75:      */
 76:     public function setTopicPid($value)
 77:     {
 78:         $this->topic_pid = $value;
 79:     }
 80: 
 81:     /**
 82:      * @param $topicid
 83:      */
 84:     public function getTopic($topicid)
 85:     {
 86:         $topicid = (int)$topicid;
 87:         $sql     = 'SELECT * FROM ' . $this->table . ' WHERE topic_id=' . $topicid . '';
 88:         $array   = $this->db->fetchArray($this->db->query($sql));
 89:         $this->makeTopic($array);
 90:     }
 91: 
 92:     /**
 93:      * @param $array
 94:      */
 95:     public function makeTopic($array)
 96:     {
 97:         foreach ($array as $key => $value) {
 98:             $this->$key = $value;
 99:         }
100:     }
101: 
102:     /**
103:      * @param $mid
104:      */
105:     public function usePermission($mid)
106:     {
107:         $this->mid            = $mid;
108:         $this->use_permission = true;
109:     }
110: 
111:     /**
112:      * @return bool
113:      */
114:     public function store()
115:     {
116:         $myts   = MyTextSanitizer::getInstance();
117:         $title  = '';
118:         $imgurl = '';
119:         if (isset($this->topic_title) && $this->topic_title != '') {
120:             $title = $myts->addSlashes($this->topic_title);
121:         }
122:         if (isset($this->topic_imgurl) && $this->topic_imgurl != '') {
123:             $imgurl = $myts->addSlashes($this->topic_imgurl);
124:         }
125:         if (!isset($this->topic_pid) || !is_numeric($this->topic_pid)) {
126:             $this->topic_pid = 0;
127:         }
128:         if (empty($this->topic_id)) {
129:             $this->topic_id = $this->db->genId($this->table . '_topic_id_seq');
130:             $sql            = sprintf("INSERT INTO %s (topic_id, topic_pid, topic_imgurl, topic_title) VALUES (%u, %u, '%s', '%s')", $this->table, $this->topic_id, $this->topic_pid, $imgurl, $title);
131:         } else {
132:             $sql = sprintf("UPDATE %s SET topic_pid = %u, topic_imgurl = '%s', topic_title = '%s' WHERE topic_id = %u", $this->table, $this->topic_pid, $imgurl, $title, $this->topic_id);
133:         }
134:         if (!$result = $this->db->query($sql)) {
135:             ErrorHandler::show('0022');
136:         }
137:         if ($this->use_permission == true) {
138:             if (empty($this->topic_id)) {
139:                 $this->topic_id = $this->db->getInsertId();
140:             }
141:             $xt            = new XoopsTree($this->table, 'topic_id', 'topic_pid');
142:             $parent_topics = $xt->getAllParentId($this->topic_id);
143:             if (!empty($this->m_groups) && is_array($this->m_groups)) {
144:                 foreach ($this->m_groups as $m_g) {
145:                     $moderate_topics = XoopsPerms::getPermitted($this->mid, 'ModInTopic', $m_g);
146:                     $add             = true;
147:                     // only grant this permission when the group has this permission in all parent topics of the created topic
148:                     foreach ($parent_topics as $p_topic) {
149:                         if (!in_array($p_topic, $moderate_topics)) {
150:                             $add = false;
151:                             continue;
152:                         }
153:                     }
154:                     if ($add == true) {
155:                         $xp = new XoopsPerms();
156:                         $xp->setModuleId($this->mid);
157:                         $xp->setName('ModInTopic');
158:                         $xp->setItemId($this->topic_id);
159:                         $xp->store();
160:                         $xp->addGroup($m_g);
161:                     }
162:                 }
163:             }
164:             if (!empty($this->s_groups) && is_array($this->s_groups)) {
165:                 foreach ($s_groups as $s_g) {
166:                     $submit_topics = XoopsPerms::getPermitted($this->mid, 'SubmitInTopic', $s_g);
167:                     $add           = true;
168:                     foreach ($parent_topics as $p_topic) {
169:                         if (!in_array($p_topic, $submit_topics)) {
170:                             $add = false;
171:                             continue;
172:                         }
173:                     }
174:                     if ($add == true) {
175:                         $xp = new XoopsPerms();
176:                         $xp->setModuleId($this->mid);
177:                         $xp->setName('SubmitInTopic');
178:                         $xp->setItemId($this->topic_id);
179:                         $xp->store();
180:                         $xp->addGroup($s_g);
181:                     }
182:                 }
183:             }
184:             if (!empty($this->r_groups) && is_array($this->r_groups)) {
185:                 foreach ($r_groups as $r_g) {
186:                     $read_topics = XoopsPerms::getPermitted($this->mid, 'ReadInTopic', $r_g);
187:                     $add         = true;
188:                     foreach ($parent_topics as $p_topic) {
189:                         if (!in_array($p_topic, $read_topics)) {
190:                             $add = false;
191:                             continue;
192:                         }
193:                     }
194:                     if ($add == true) {
195:                         $xp = new XoopsPerms();
196:                         $xp->setModuleId($this->mid);
197:                         $xp->setName('ReadInTopic');
198:                         $xp->setItemId($this->topic_id);
199:                         $xp->store();
200:                         $xp->addGroup($r_g);
201:                     }
202:                 }
203:             }
204:         }
205: 
206:         return true;
207:     }
208: 
209:     public function delete()
210:     {
211:         $sql = sprintf('DELETE FROM %s WHERE topic_id = %u', $this->table, $this->topic_id);
212:         $this->db->query($sql);
213:     }
214: 
215:     /**
216:      * @return int
217:      */
218:     public function topic_id()
219:     {
220:         return $this->topic_id;
221:     }
222: 
223:     public function topic_pid()
224:     {
225:         return $this->topic_pid;
226:     }
227: 
228:     /**
229:      * @param string $format
230:      *
231:      * @return mixed
232:      */
233:     public function topic_title($format = 'S')
234:     {
235:         $myts = MyTextSanitizer::getInstance();
236:         switch ($format) {
237:             case 'S':
238:             case 'E':
239:                 $title = $myts->htmlSpecialChars($this->topic_title);
240:                 break;
241:             case 'P':
242:             case 'F':
243:                 $title = $myts->htmlSpecialChars($myts->stripSlashesGPC($this->topic_title));
244:                 break;
245:         }
246: 
247:         return $title;
248:     }
249: 
250:     /**
251:      * @param string $format
252:      *
253:      * @return mixed
254:      */
255:     public function topic_imgurl($format = 'S')
256:     {
257:         $myts = MyTextSanitizer::getInstance();
258:         switch ($format) {
259:             case 'S':
260:             case 'E':
261:                 $imgurl = $myts->htmlSpecialChars($this->topic_imgurl);
262:                 break;
263:             case 'P':
264:             case 'F':
265:                 $imgurl = $myts->htmlSpecialChars($myts->stripSlashesGPC($this->topic_imgurl));
266:                 break;
267:         }
268: 
269:         return $imgurl;
270:     }
271: 
272:     public function prefix()
273:     {
274:         if (isset($this->prefix)) {
275:             return $this->prefix;
276:         }
277:         return null;
278:     }
279: 
280:     /**
281:      * @return array
282:      */
283:     public function getFirstChildTopics()
284:     {
285:         $ret       = array();
286:         $xt        = new XoopsTree($this->table, 'topic_id', 'topic_pid');
287:         $topic_arr = $xt->getFirstChild($this->topic_id, 'topic_title');
288:         if (is_array($topic_arr) && count($topic_arr)) {
289:             foreach ($topic_arr as $topic) {
290:                 $ret[] = new XoopsTopic($this->table, $topic);
291:             }
292:         }
293: 
294:         return $ret;
295:     }
296: 
297:     /**
298:      * @return array
299:      */
300:     public function getAllChildTopics()
301:     {
302:         $ret       = array();
303:         $xt        = new XoopsTree($this->table, 'topic_id', 'topic_pid');
304:         $topic_arr = $xt->getAllChild($this->topic_id, 'topic_title');
305:         if (is_array($topic_arr) && count($topic_arr)) {
306:             foreach ($topic_arr as $topic) {
307:                 $ret[] = new XoopsTopic($this->table, $topic);
308:             }
309:         }
310: 
311:         return $ret;
312:     }
313: 
314:     /**
315:      * @return array
316:      */
317:     public function getChildTopicsTreeArray()
318:     {
319:         $ret       = array();
320:         $xt        = new XoopsTree($this->table, 'topic_id', 'topic_pid');
321:         $topic_arr = $xt->getChildTreeArray($this->topic_id, 'topic_title');
322:         if (is_array($topic_arr) && count($topic_arr)) {
323:             foreach ($topic_arr as $topic) {
324:                 $ret[] = new XoopsTopic($this->table, $topic);
325:             }
326:         }
327: 
328:         return $ret;
329:     }
330: 
331:     /**
332:      * @param int    $none
333:      * @param        $seltopic
334:      * @param string $selname
335:      * @param string $onchange
336:      */
337:     public function makeTopicSelBox($none = 0, $seltopic = -1, $selname = '', $onchange = '')
338:     {
339:         $xt = new XoopsTree($this->table, 'topic_id', 'topic_pid');
340:         if ($seltopic != -1) {
341:             $xt->makeMySelBox('topic_title', 'topic_title', $seltopic, $none, $selname, $onchange);
342:         } elseif (!empty($this->topic_id)) {
343:             $xt->makeMySelBox('topic_title', 'topic_title', $this->topic_id, $none, $selname, $onchange);
344:         } else {
345:             $xt->makeMySelBox('topic_title', 'topic_title', 0, $none, $selname, $onchange);
346:         }
347:     }
348: 
349:     //generates nicely formatted linked path from the root id to a given id
350:     /**
351:      * @param $funcURL
352:      *
353:      * @return string
354:      */
355:     public function getNiceTopicPathFromId($funcURL)
356:     {
357:         $xt  = new XoopsTree($this->table, 'topic_id', 'topic_pid');
358:         $ret = $xt->getNicePathFromId($this->topic_id, 'topic_title', $funcURL);
359: 
360:         return $ret;
361:     }
362: 
363:     /**
364:      * @return array
365:      */
366:     public function getAllChildTopicsId()
367:     {
368:         $xt  = new XoopsTree($this->table, 'topic_id', 'topic_pid');
369:         $ret = $xt->getAllChildId($this->topic_id, 'topic_title');
370: 
371:         return $ret;
372:     }
373: 
374:     /**
375:      * @return array
376:      */
377:     public function getTopicsList()
378:     {
379:         $result = $this->db->query('SELECT topic_id, topic_pid, topic_title FROM ' . $this->table);
380:         $ret    = array();
381:         $myts   = MyTextSanitizer::getInstance();
382:         while ($myrow = $this->db->fetchArray($result)) {
383:             $ret[$myrow['topic_id']] = array('title' => $myts->htmlspecialchars($myrow['topic_title']), 'pid' => $myrow['topic_pid']);
384:         }
385: 
386:         return $ret;
387:     }
388: 
389:     /**
390:      * @param $pid
391:      * @param $title
392:      *
393:      * @return bool
394:      */
395:     public function topicExists($pid, $title)
396:     {
397:         $sql = 'SELECT COUNT(*) from ' . $this->table . ' WHERE topic_pid = ' . (int)$pid . " AND topic_title = '" . trim($title) . "'";
398:         $rs  = $this->db->query($sql);
399:         list($count) = $this->db->fetchRow($rs);
400:         if ($count > 0) {
401:             return true;
402:         } else {
403:             return false;
404:         }
405:     }
406: }
407: 
API documentation generated by ApiGen