-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.inc.php
238 lines (221 loc) · 9.73 KB
/
functions.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<?php
/* Misc functions:
----------------------------------------------------
function getNewEventId()
function feedback($msg,$type)
function feedbackblock($msg,$type)
function verifyCancelURL($httpreferer)
function redirect2URL($url)
function getFullCalendarURL($calendarid)
function sendemail2sponsor($sponsorname, $sponsoremail, $subject, $body)
function sendemail2user($useremail, $subject, $body)
function highlight_keyword($keyword, $text)
function make_clickable($text)
function removeslashes(&$event)
function checkURL($url)
function checkemail($email)
function setVar(&$var, $value, $type)
function lang($sTextKey, $htmlOk)
function escapeJavaScriptString($string) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['misc'])) {
require_once('functions-misc.inc.php');
}
/* IO functions:
----------------------------------------------------
function file_get_contents($filename, $flags=false, $resource_context=null, $offset=0, $maxlen=0)
function file_put_contents($filename, $content, $flags=null, $resource_context=null) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['io'])) {
require_once('functions-io.inc.php');
}
/* Generic database functions:
----------------------------------------------------
function DBopen()
function DBclose()
function DBQuery($query) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['db-generic'])) {
require_once('functions-db-generic.inc.php');
}
/* Functions that handle authentication:
----------------------------------------------------
function checknewpassword(&$user)
function checkoldpassword(&$user, $userid)
function displaylogin($errormsg="")
function displaymultiplelogin($errorMessage="")
function displaynotauthorized()
function userauthenticated($userid, $password)
function authorized()
function viewauthorized()
function logout() */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['authentication'])) {
require_once('functions-authentication.inc.php');
}
/* Get various information from the database:
----------------------------------------------------
function getCalendarData($calendarid)
function calendar_exists($calendarid)
function setCalendarPreferences()
function getNumCategories()
function getCategoryName($categoryid)
function getCalendarName($calendarid)
function getSponsorCalendarName($sponsorid)
function getSponsorName($sponsorid)
function getSponsorURL($sponsorid)
function num_unapprovedevents($repeatid)
function userExistsInDB($userid)
function isValidUser($userid) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['db-gets'])) {
require_once('functions-db-gets.inc.php');
}
/* Set various information to the database:
----------------------------------------------------
function AddMainAdmin($username)
function AddUser($username, $password) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['db-sets'])) {
require_once('functions-db-sets.inc.php');
}
/* VTCalendar specific date/time conversions and formatting:
----------------------------------------------------
function printeventdate(&$event)
function printeventtime(&$event)
function yearmonth2timestamp($year, $month)
function yearmonthday2timestamp($year, $month, $day)
function datetime2timestamp($year, $month, $day, $hour, $min, $ampm)
function timestamp2datetime($timestamp)
function timestamp2timenumber($timestamp)
function timenumber2timelabel($timenum)
function datetime2ISO8601datetime($year, $month, $day, $hour, $min, $ampm)
function ISO8601datetime2datetime($ISO8601datetime)
function disassemble_timestamp(&$event)
function settimeenddate2timebegindate(&$event)
function assemble_timestamp(&$event)
function timestring($hour, $min, $ampm)
function endingtime_specified(&$event) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['dates'])) {
require_once('functions-dates.inc.php');
}
/* Functions for generic date encoding/decoding, and formatting:
----------------------------------------------------
function JulianToJD($month, $day, $year)
function JDToJulian($jd)
function Day_of_Week($month, $day, $year)
function Day_of_Week_Abbreviation($dow)
function Delta_Days($m1, $d1, $y1, $m2, $d2, $y2)
function Decode_Date_US($datestr)
function Encode_Date_US($month, $day, $year)
function Add_Delta_Days($month, $day, $year, $delta)
function Month_to_Text($month)
function Month_to_Text_Abbreviation($month)
Function Day_of_Week_to_Text($dow)
function isDST($timestamp)
function EST2UTC($year, $month, $day, $hour, $min, $ampm)
function Timezone2UTC($offset, $year, $month, $day, $hour, $min, $ampm) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['dates-generic'])) {
require_once('functions-dates-generic.inc.php');
}
/* Functions that output the HTML for events:
----------------------------------------------------
function print_event($event, $linkfeatures=true)
function adminButtons($eventORshowdate, $buttons, $size, $orientation) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['event-content'])) {
require_once('functions-event-content.inc.php');
}
/* Functions that modify events in the DB:
----------------------------------------------------
function deletefromevent($eventid)
function deletefromevent_public($eventid)
function repeatdeletefromevent($repeatid)
function repeatdeletefromevent_public($repeatid)
function deletefromrepeat($repeatid)
function insertintoevent($eventid, &$event)
function insertintoeventsql($calendarid, $eventid, &$event)
function insertintoevent_public(&$event)
function updateevent($eventid, &$event)
function updateevent_public($eventid, &$event)
function insertintotemplate($template_name, &$event)
function updatetemplate($templateid, $template_name, &$event)
function insertintorepeat($repeatid, &$event, &$repeat)
function updaterepeat($repeatid, &$event, &$repeat)
function publicizeevent($eventid, &$event)
function repeatpublicizeevent($eventid, &$event) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['event-dates'])) {
require_once('functions-event-dates.inc.php');
}
/* Functions that deal with event-specific date processing/handling:
----------------------------------------------------
function inputdate($month, $monthvar, $day, $dayvar, $year, $yearvar)
function readinrepeat($repeatid, &$event, &$repeat)
function repeatinput2repeatdef(&$event, &$repeat)
function getfirstslice($s)
function repeatdefdisassemble($repeatdef, &$frequency, &$interval, &$frequencymodifier, &$endyear, &$endmonth, &$endday)
function printrecurrence($startyear, $startmonth, $startday, $repeatdef)
function repeatdefdisassembled2repeatlist($startyear, $startmonth, $startday, $frequency, $interval, $frequencymodifier, $endyear, $endmonth, $endday) {
function producerepeatlist(&$event, &$repeat)
function printrecurrencedetails(&$repeatlist)
function repeatdef2repeatinput($repeatdef, &$event, &$repeat) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['event-db'])) {
require_once('functions-event-db.inc.php');
}
/* Functions that output HTML for header/footer/sections:
----------------------------------------------------
function pageheader($title, $navbaractive) {
function contentsection_begin($headertext="", $showBackToMenuButton=false)
function contentsection_end()
function helpwindow_header()
function helpwindow_footer() */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['content'])) {
require_once('functions-content.inc.php');
}
/* Functions to verify and send e-mail:
----------------------------------------------------
function emailaddressok($email)
function sendemail($toName, $toAddress, $fromName, $fromAddress, $subject, $body) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['email'])) {
require_once('functions-email.inc.php');
}
/* Functions for validating input:
----------------------------------------------------
function isValidInput($value, $type)
function isDate($value)
function isTime($value) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['inputvalidation'])) {
require_once('functions-inputvalidation.inc.php');
}
/* Functions used to output the event input form and process data related to it.
----------------------------------------------------
function defaultevent(&$event, $sponsorid)
function checktime($hour, $min)
function checkeventdate(&$event, &$repeat)
function checkstartenddate($startdate_month, $startdate_day, $startdate_year, $enddate_month, $enddate_day, $enddate_year)
function checkeventtime(&$event)
function checkevent(&$event, &$repeat)
function inputrecurrences(&$event, &$repeat, $check)
function inputeventdata(&$event, $sponsorid, $inputrequired, $check, $displaydatetime, &$repeat, $copy) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['inputdata-event'])) {
require_once('functions-inputdata-event.inc.php');
}
/* Functions used to output the event template form and process data related to it.
----------------------------------------------------
function inputtemplatedata(&$event,$sponsorid,$check,$template_name) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['inputdata-template'])) {
require_once('functions-inputdata-template.inc.php');
}
/* Functions used to process XML
----------------------------------------------------
function parsexml($xmlfile, $xmlstartelementhandler, $xmlendelementhandler, $xmldatahandler, $xmlerrorhandler)
function xmlerror($xml_parser)
function xmlstartelement($parser, $element, $attrs)
function xmlendelement($parser, $element) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['xml'])) {
require_once('functions-xml.inc.php');
}
/* Functions export data into various formats
----------------------------------------------------
function GenerateRSS(&$result, $calendarID, $calendarTitle, $calendarurl, $timebegin)
function GenerateRSS1_0(&$result, $calendarID, $calendarTitle, $calendarurl, $timebegin)
function GenerateXML(&$result, $calendarID, $calendarTitle, $calendarurl, $timebegin)
function GenerateICal(&$result, $calendarID, $calendarName, $calendarurl)
function GenerateVXML(&$result) */
if (!isset($FUNCINCLUDE) || isset($FUNCINCLUDE['export'])) {
require_once('functions-export.inc.php');
}
?>