Admidio API
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Packages

  • com
    • tecnick
      • tcpdf
  • None
  • PHPMailer
    • easypeasyics
  • PHPWavUtils
  • Securimage
    • classes

Classes

  • AutoLogin
  • Component
  • ComponentUpdate
  • ConditionParser
  • Database
  • DateTimeExtended
  • Email
  • Folder
  • FormValidation
  • FunctionClass
  • Htaccess
  • HtmlDiv
  • HtmlElement
  • HtmlForm
  • HtmlFormBasic
  • HtmlFormInstallation
  • HtmlList
  • HtmlNavbar
  • HtmlPage
  • HtmlTable
  • HtmlTableBasic
  • Image
  • Inventory
  • InventoryFields
  • Language
  • LanguageData
  • ListConfiguration
  • Menu
  • Message
  • ModuleAnnouncements
  • ModuleDates
  • ModuleLists
  • ModuleMenu
  • ModuleMessages
  • Modules
  • ModuleWeblinks
  • MyFiles
  • Navigation
  • ntlm_sasl_client_class
  • Organization
  • Participants
  • PasswordHash
  • PasswordHashing
  • ProfileFields
  • RoleDependency
  • RolesRights
  • RSSfeed
  • Session
  • SystemMail
  • TableAccess
  • TableAnnouncement
  • TableCategory
  • TableDate
  • TableFile
  • TableFolder
  • TableGuestbook
  • TableGuestbookComment
  • TableInventory
  • TableInventoryField
  • TableLists
  • TableMembers
  • TableMessage
  • TablePhotos
  • TableRoles
  • TableRooms
  • TableText
  • TableUserField
  • TableUsers
  • TableWeblink
  • UploadHandlerDownload
  • UploadHandlerPhoto
  • User
  • UserRegistration

Exceptions

  • AdmException
  • WavFileException
  • WavFormatException

Functions

  • admFuncAutoload
  • admFuncGeneratePagination
  • admFuncGetBytesFromSize
  • admFuncGetDirectoryEntries
  • admFuncMaxUploadSize
  • admFuncProcessableImageSize
  • admFuncShowCreateChangeInfoById
  • admFuncShowCreateChangeInfoByName
  • admFuncVariableIsValid
  • admReadTemplateFile
  • admStrIsValidFileName
  • admStrStripTagsSpecial
  • admStrToLower
  • admStrToUpper
  • bzip2Version
  • checkDatabaseVersion
  • checkPhpVersion
  • EmailAttachment
  • FileSizeNiceDisplay
  • FormattedTimeRemaining
  • FunctionIsDisabled
  • getFormerRolesFromDatabase
  • getFutureRolesFromDatabase
  • getmicrotime
  • getRoleMemberships
  • getRolesFromDatabase
  • gzipVersion
  • hasRole
  • hl_attrval
  • hl_bal
  • hl_cmtcd
  • hl_ent
  • hl_prot
  • hl_regex
  • hl_spec
  • hl_tag
  • hl_tag2
  • hl_tidy
  • hl_version
  • htmLawed
  • HTMLFilter
  • isGroupLeader
  • isMember
  • kses
  • kses_hook
  • MySQLdumpVersion
  • OutputInformation
  • SafeExec
  • showNotice
  • strAddSlashesDeep
  • strNextLetter
  • strStripSlashesDeep
  • strStripTags
  • strValidCharacters
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • version_compare_replacement
  • version_compare_replacement_sub

Class ModuleDates

Modules
Extended by ModuleDates
Copyright: 2004-2016 The Admidio Team
License: GNU General Public License v2.0 only **********************************************************************************************
Brief:

This class reads date recordsets from database

This class reads all available recordsets from table dates. and returns an Array with results, recordsets and validated parameters from $_GET Array.


Class: ModuleDates
Code:

array( [numResults] => 1 [limit] => 10 [totalCount] => 1 [recordset] => Array ( [0] => Array ( [0] => 10 [cat_id] => 10 [1] => 1 [cat_org_id] => 1 [2] => DAT [cat_type] => DAT [3] => COMMON [cat_name_intern] => COMMON [4] => Allgemein [cat_name] => Allgemein [5] => 0 [cat_hidden] => 0 [6] => 0 [cat_system] => 0 [7] => 0 [cat_default] => 0 [8] => 1 [cat_sequence] => 1 [9] => 1 [cat_usr_id_create] => 1 [10] => 2012-01-08 11:12:05 [cat_timestamp_create] => 2012-01-08 11:12:05 [11] => [cat_usr_id_change] => [12] => [cat_timestamp_change] => [13] => 9 [dat_id] => 9 [14] => 10 [dat_cat_id] => 10 [15] => [dat_rol_id] => [16] => [dat_room_id] => [17] => 0 [dat_global] => 0 [18] => 2013-09-21 21:00:00 [dat_begin] => 2013-09-21 21:00:00 [19] => 2013-09-21 22:00:00 [dat_end] => 2013-09-21 22:00:00 [20] => 0 [dat_all_day] => 0 [21] => 0 [dat_highlight] => 0 [22] => [dat_description] => [23] => [dat_location] => [24] => [dat_country] => [25] => eet [dat_headline] => eet [26] => 0 [dat_max_members] => 0 [27] => 1 [dat_usr_id_create] => 1 [28] => 2013-09-20 21:56:23 [dat_timestamp_create] => 2013-09-20 21:56:23 [29] => [dat_usr_id_change] => [30] => [dat_timestamp_change] => [31] => [member_date_role] => [32] => [mem_leader] => [33] => Paul Webmaster [create_name] => Paul Webmaster [34] => [change_name] => )

    )

[parameter] => Array
    (
        [active_role] => 1
        [calendar-selection] => 1
        [cat_id] => 0
        [category-selection] => 0,
        [date] =>
        [daterange] => Array
            (
                [english] => Array
                    (
                        [start_date] => 2013-09-21
                        [end_date] => 9999-12-31
                    )

                [system] => Array
                    (
                        [start_date] => 21.09.2013
                        [end_date] => 31.12.9999
                    )

            )

        [headline] => Termine
        [id] => 0
        [mode] => actual
        [order] => ASC
        [startelement] => 0
        [view_mode] => html
    )

)


Endcode
Par: Returned Array
Located at moduledates.php

Methods summary

public
# __construct( )

Constructor that will create an object of a parameter set needed in modules to get the recordsets. Initialize parameters

Constructor that will create an object of a parameter set needed in modules to get the recordsets. Initialize parameters

Overrides

Modules::__construct
private string|false
# formatDate( string $date )

Method validates all date inputs and formats them to date format 'Y-m-d' needed for database queries

Method validates all date inputs and formats them to date format 'Y-m-d' needed for database queries

Parameters

$date
Date to be validated and formated if needed

Returns

string|false
public array
# getDataSet( integer $startElement = 0, integer $limit = null )

SQL query returns an array with available dates.

SQL query returns an array with available dates.

Parameters

$startElement
Defines the offset of the query (default: 0)
$limit
Limit of query rows (default: 0)

Returns

array
Array with all results, dates and parameters.
public string
# getHeadline( string $headline )

Returns a module specific headline

Returns a module specific headline

Parameters

$headline
The initial headline of the module.

Returns

string
Returns the full headline of the module
public integer
# getDataSetCount( )

Get number of available dates.

Get number of available dates.

Returns

integer
public string|false
# getFormValue( string $date, string $reference )

Returns value for form field. This method compares a date value to a reference value and to date '1970-01-01'. Html output will be set regarding the parameters. If value matches the reference or date('1970-01-01'), the output value is cleared to get an empty string. This method can be used to fill a html form

Returns value for form field. This method compares a date value to a reference value and to date '1970-01-01'. Html output will be set regarding the parameters. If value matches the reference or date('1970-01-01'), the output value is cleared to get an empty string. This method can be used to fill a html form

Parameters

$date
Date is to be checked to reference and default date '1970-01-01'.
$reference
Reference date

Returns

string|false
String with date value, or an empty string, if $date is '1970-01-01' or reference date
public boolean
# setDateRange( string $dateRangeStart = '', string $dateRangeEnd = '' )

Set a date range in which the dates should be searched. The method will fill 4 parameters @b dateStartFormatEnglish, @b dateStartFormatEnglish,

Set a date range in which the dates should be searched. The method will fill 4 parameters @b dateStartFormatEnglish, @b dateStartFormatEnglish,

Parameters

$dateRangeStart
A date in english or Admidio format that will be the start date of the range.
$dateRangeEnd
A date in english or Admidio format that will be the end date of the range.

Returns

boolean
Returns false if invalid date format is submitted

Throws

AdmException
SYS_DATE_END_BEFORE_BEGIN

B

dateEndFormatEnglish and @b dateEndFormatAdmidio that could be read with getParameter and could be used in the script.


private string
# setFormValue( string $date, string $reference )

Check date value to reference and set html output. If value matches to reference, value is cleared to get an empty string.

Check date value to reference and set html output. If value matches to reference, value is cleared to get an empty string.

Parameters

$date
$reference

Returns

string
public string
# sqlAdditionalTablesGet( string $type = 'data' )

Get additional tables for sql statement

Get additional tables for sql statement

Parameters

$type

of sql statement: data: is joining tables to get more data from them count: is joining tables only to get the correct number of records (default: 'data')

Returns

string
String with the necessary joins
private string
# sqlConditionsGet( )

Prepare SQL Statement.

Prepare SQL Statement.

Returns

string

Methods inherited from Modules

getDaterange(), getId(), getMode(), getOrder(), getParameter(), getParameters(), getStartElement(), setId(), setMode(), setOrder(), setParameter(), setStartElement()

Constants summary

Constants inherited from Modules

HEADLINE

Properties summary

Properties inherited from Modules

$activeRole, $arrParameter, $catId, $daterange, $headline, $id, $mode, $order, $parameters, $properties, $start, $validModes

Admidio API API documentation generated by ApiGen