Home Page: | https://github.com/craigk5n/webcalendar |
WebCalendar Version: | v1.3.0 |
Last updated: | 04-Mar-2005 |
Look for URLs in the given text, and make them into links.Parameters:
The text altered to have HTML links for any web links (http or https)Location:
functions.php, line 3275
Add something to the activity log for an event. The information will be saved to the webcal_entry_log table.Parameters:
The value used in the HTML form (or URL)Location:
functions.php, line 771
Creates the CSS for using gradient.php, if the appropriate GD functions are available. A one-pixel wide image will be used for the background image.Parameters:
Note The gd library module needs to be available to use gradient images. If it is not available, a single background color will be used instead.
The style sheet text to useLocation:
functions.php, line 4433
Check the boss user preferences to see if the boss must approve events added to their calendar.Parameters:
true if the boss must approve new eventsLocation:
functions.php, line 3810
Check the boss user preferences to see if the boss wants to be notified via email on changes to their calendar.Parameters:
true if the boss wants email notificationsLocation:
functions.php, line 3794
Build the HTML for the event popup (but don't print it yet since we don't want this HTML to go inside the table for the month).Parameters:
The HTML for the event popupLocation:
functions.php, line 1084
Calculate which row/slot this time represents. This is used in day and week views where hours of the time are separated into different cells in a table.Parameters:
The time slot indexLocation:
functions.php, line 2655
Check for conflicts. Find overlaps between an array of dates and the other dates in the database.Parameters:
Limits on number of appointments: if enabled in System Settings ($LIMIT_APPTS global variable), too many appointments can also generate a scheduling conflict.
TODO Update this to handle exceptions to repeating events
Return empty string for no conflicts or return the HTML of the conflicts when one or more are found.Location:
functions.php, line 2461
Replace unsafe characters with HTML encoded equivalentsParameters:
the cleaned textLocation:
functions.php, line 4363
Remove non-digits from the specified textParameters:
the converted textLocation:
functions.php, line 4392
Remove whitespace from the specified textParameters:
the converted textLocation:
functions.php, line 4404
Remove non-word characters from the specified textParameters:
the converted textLocation:
functions.php, line 4380
Draws a daily outlook style availability grid showing events that are approved and awaiting approval.Parameters:
NothingLocation:
functions.php, line 4474
Print out a date selection for use in a form.Parameters:
The value used in the HTML form (or URL)Location:
functions.php, line 1152
Convert a date in YYYYMMDD format into "Friday, December 31, 1999", "Friday, 12-31-1999" or whatever format the user prefers.Parameters:
The query result resource on queries (which can then be passed to the dbi_fetch_row function to obtain the results), or true/false on insert or delete queries.Location:
functions.php, line 3430
Returns the number of rows affected by the last INSERT, UPDATE or DELETE.Parameters:
Note Use the dbi_error function to get error information if the connection fails.
The number or database rows affected.Location:
php-dbi.php, line 358
Close a database connection. (Not necessary for any database that uses pooled connections such as MySQL, but a good programming practice.)Parameters:
true on success, false on errorLocation:
php-dbi.php, line 187
Open up a database connection. Use a pooled connection if the db supports it and the db_persistent setting is enabled.Parameters:
Notes
- The database type is determined by the global variable db_type
- For ODBC, $host is ignored, $database = DSN
- For Oracle, $database = tnsnames name
- Use the dbi_error function to get error information if the connection fails
The connectionLocation:
php-dbi.php, line 66
Get the latest database error message.Parameters:
The text of the last database error. (The type of information varies depending on the which type of database is being used.)Location:
php-dbi.php, line 428
Display a fatal database error and abort execution.Parameters:
NothingLocation:
php-dbi.php, line 461
Retrieve a single row from the database and return it as an array.Parameters:
Note we don't use the more useful xxx_fetch_array because not all databases support this function.
Note Use the dbi_error function to get error information if the connection fails.
An array of database columns representing a single row in the query result or false on an error.Location:
php-dbi.php, line 305
Free a result set.Parameters:
true on successLocation:
php-dbi.php, line 395
Execute a SQL query.Parameters:
Note Use the dbi_error function to get error information if the connection fails.
The query result resource on queries (which can then be passed to the dbi_fetch_row function to obtain the results), or true/false on insert or delete queries.Location:
php-dbi.php, line 230
Extract a user's name from a session id. This prevents users from begin able to edit their cookies.txt file and set the username in plain text.Parameters:
The decoded stringLocation:
functions.php, line 3530
Print a fatal error message to the user along with a link to the Troubleshooting section of the WebCalendar System Administrator's Guide. Execution is aborted.Parameters:
NothingLocation:
config.php, line 39
Prints out a minicalendar for a monthParameters:
NothingLocation:
functions.php, line 1195
Display a time in either 12 or 24 hour format. The global variable $TZ_OFFSET to adjust the time. Note that this is somewhat of a kludge for timezone support. If an event is set for 11PM server time and the user is 2 hours ahead, it will show up as 1AM, but the date will not be adjusted to the next day.Parameters:
The query result resource on queries (which can then be passed to the dbi_fetch_row function to obtain the results), or true/false on insert or delete queries.Location:
functions.php, line 3292
Check for any unaproved events. If any are found, display a link to the unapproved events (where they can be approved). If the user is an admin user, also count up any public events. If the user is a nonuser admin, count up events on the nonuser calendar.Parameters:
NothingLocation:
functions.php, line 3222
Log a debug message. Generally, we do not leave calls to this function in the code. It is used for debugging only.Parameters:
NothingLocation:
functions.php, line 410
Send a redirect to the specified page. The database connection is closed and execution terminates in this function.Parameters:
Note: MS IIS/PWS has a bug in which it does not allow us to send a cookie and a redirect in the same HTTP header. When we detect that the web server is IIS, we accomplish the redirect using meta-refresh. See the following for more info on the IIS bug:http://www.faqts.com/knowledge_base/view.phtml/aid/9316/fid/4
NothingLocation:
functions.php, line 483
Take an input string and encode it into a slightly encoded hexval that we can use as a session cookie.Parameters:
the encoded textLocation:
functions.php, line 3564
Translate text and remove and HTML from it. This is useful for tooltips, which barf on HTML.Parameters:
Note The tooltip function will return the result rather than print the value.
NothingLocation:
translate.php, line 176
Translate text and print it. This is just an abbreviation for: echo translate ( $str )Parameters:
NothingLocation:
translate.php, line 147
Get the list of external users for an event from the webcal_entry_ext_user table in an HTML format.Parameters:
The list of external users for an event formatted in HTML.Location:
functions.php, line 729
Get the value resulting from an HTTP GET method.Parameters:
Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file. If you need to enforce a specific input format (such as numeric input), then use the getValue function.
The value used in the HTML form (or URL)Location:
functions.php, line 190
Get an integer value resulting from an HTTP GET or HTTP POST method.Parameters:
Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.
The value used in the HTML form (or URL)Location:
functions.php, line 257
Get the value resulting from an HTTP POST method.Parameters:
Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.
the value used in the HTML formLocation:
functions.php, line 168
Get the value resulting from either HTTP GET method or HTTP POST method.Parameters:
Note: The return value will be affected by the value of magic_quotes_gpc in the php.ini file.
Note: If you need to get an integer value, you can use the getIntValue function.
The value used in the HTML form (or URL)Location:
functions.php, line 215
Returns all the dates a specific event will fall on accounting for the repeating. Any event with no end will be assigned one.Parameters:
An array of dates (in UNIX time format)Location:
functions.php, line 1856
Get all the events for a specific date from the array of pre-loaded events (which was loaded all at once to improve performance). The returned events will be sorted by time of day.Parameters:
An array of eventsLocation:
functions.php, line 1594
Get the last page stored using the remember_this_view function. Return empty string if we don't know.Parameters:
The URL of the last view or an empty string if it cannot be determined.Location:
functions.php, line 586
Get the Monday of the week that the specified date is in. (If the date specified is a Monday, then that date is returned.)Parameters:
The date (in unix time format)Location:
functions.php, line 2238
Get a list of users. If groups are enabled, this will restrict the list of users to only those users who are in the same group(s) as the user (unless the user is an admin user). We allow admin users to see all users because they can also edit someone else's events (so they may need access to users who are not in the same groups that they are in).Parameters:
An array of users, where each element in the array is an array with the following keys:Location:
- cal_login
- cal_lastname
- cal_firstname
- cal_is_admin
- cal_is_admin
- cal_email
- cal_password
- cal_fullname
functions.php, line 826
Get a list of nonuser calendars and return info in an array.Parameters:
An array of nonuser cals, where each is an array with the following fields:Location:
- cal_login
- cal_lastname
- cal_firstname
- cal_admin
- cal_fullname
functions.php, line 4107
Get a preference setting for the specified user. If no value is found in the database, then the system default setting will be returned.Parameters:
The value found in the webcal_user_pref table for the specified setting or the system default if no user settings was found.Location:
functions.php, line 901
Get user's preferred view. The user's preferred view is stored in the $STARTVIEW global variable. This is loaded from the user preferences (or system settings if there are no user preferences.)Parameters:
NothingLocation:
functions.php, line 425
Get all the repeating events for the specified data and return them in an array (which is sorted by time of day).Parameters:
Note The global variable $repeated_events needs to be set by calling the read_repeated_events function first.
The query result resource on queries (which can then be passed to the dbi_fetch_row function to obtain the results), or true/false on insert or delete queries.Location:
functions.php, line 2039
Get any site-specific fields for an entry that are stored in the database in the webcal_site_extras table.Parameters:
Return an array of array with the keys as follows:Location:
- cal_name
- cal_type
- cal_date
- cal_remind
- cal_data
functions.php, line 1475
Get the Sunday of the week that the specified date is in. (If the date specified is a Sunday, then that date is returned.)Parameters:
The date (in unix time format)Location:
functions.php, line 2221
Generate the HTML for an icon to add a new event.Parameters:
The HTML for the add event iconLocation:
functions.php, line 2690
Generate the HTML for an event to be viewed in the day-at-glance (day.php). The HTML will be stored in an array ($hour_arr) indexed on the event's starting hour.Parameters:
NothingLocation:
functions.php, line 2871
Generate the HTML for an event to be viewed in the week-at-glance (week.php). The HTML will be stored in an array (global variable $hour_arr) indexed on the event's starting hour.Parameters:
NothingLocation:
functions.php, line 2722
Convert HTML entities in 8bit.Parameters:
Note Only supported for PHP4 (not PHP3).
The converted textLocation:
functions.php, line 3692
Converts language names to their abbreviationParameters:
The abbreviation ("fr" for "French")Location:
functions.php, line 4416
Load default system settings (which can be updated via admin.php) System settings are stored in the webcal_config table.Parameters:
Note: If the setting for "server_url" is not set, the value will be calculated and stored in the database.
NothingLocation:
functions.php, line 276
Loads nonuser preferences from the webcal_user_pref table if on a nonuser admin page.Parameters:
NothingLocation:
functions.php, line 4218
Load all the language translation into an array for quick lookup.Parameters:
Note There is no need to call this manually. It will be invoked by the translate function the first time it is called.
NothingLocation:
translate.php, line 71
Load current user's category info and stuff it into category global variable.Parameters:
NothingLocation:
functions.php, line 3624
Load current user's layer info and stuff it into layer global variable. If the system setting $ALLOW_VIEW_OTHER is not set to 'Y', then we ignore all layer functionality. If $force is 0, we only load layers if the current user preferences have layers turned on.Parameters:
NothingLocation:
functions.php, line 963
Load the current user's preferences as global variables from the webcal_user_pref table. Also load the list of views for this user (not really a preference, but this is a convenient place to put this...)Parameters:
Notes
- If the $ALLOW_COLOR_CUSTOMIZATION is set to 'N', then we ignore any color preferences.
- Other default values will also be set if the user has not saved a preference and no global value has been set by the administrator in the system settings.
The value used in the HTML form (or URL)Location:
functions.php, line 622
Return the full name of the specified month. Use the month_short_name function to get the abbreviated name of the month.Parameters:
The full name of the specified monthLocation:
functions.php, line 3330
Return the abbreviated name of the specified month (such as "Jan"). Use the month_name function to get the full name of the month.Parameters:
The abbreviated name of the specified month (example: "Jan")Location:
functions.php, line 3358
Loads nonuser variables (login, firstname, etc.) The following variables will be set:Parameters:
- login
- firstname
- lastname
- fullname
- admin
NothingLocation:
functions.php, line 4149
Print dropdown HTML for categories.Parameters:
NothingLocation:
functions.php, line 3657
Print all the calendar entries for the specified user for the specified date. If we are displaying data from someone other than the logged in user, then check the access permission of the entry.Parameters:
NothingLocation:
functions.php, line 2296
Print all the entries in a time bar format for the specified user for the specified date. If we are displaying data from someone other than the logged in user, then check the access permission of the entry.Parameters:
NothingLocation:
functions.php, line 3834
Print out a date selection for use in a form.Parameters:
The value used in the HTML form (or URL)Location:
functions.php, line 1139
Print all the calendar entries for the specified user for the specified date in day-at-a-glance format. If we are displaying data from someone other than the logged in user, then check the access permission of the entry.Parameters:
NothingLocation:
functions.php, line 3026
Print the HTML for one day's events in the month view.Parameters:
NothingLocation:
functions.php, line 1350
Print the HTML for an events with a timebar.Parameters:
NothingLocation:
functions.php, line 3914
Prints the HTML header and opening HTML body tag.Parameters:
NothingLocation:
init.php, line 213
Print the header for the timebar.Parameters:
NothingLocation:
functions.php, line 4069
Print the common trailer.Parameters:
NothingLocation:
init.php, line 334
Read events visible to a user (including layers and possibly public access if enabled); Return results in an array sorted by time of day.Parameters:
An array of eventsLocation:
functions.php, line 1676
Read all the events for a user for the specified range of dates. This is only called once per page request to improve performance. All the events get loaded into the array $events sorted by time of day (not date).Parameters:
An array of eventsLocation:
functions.php, line 1512
Read all the repeated events for a user. This is only called once per page request to improve performance. All the events get loaded into the array $repeated_events sorted by time of day (not date). This will load all the repeated events into memory.Parameters:
Notes
- To get which events repeat on a specific date, use the get_repeating_entries function.
- To get all the dates that one specific event repeats on, the get_all_dates function should be called.
An array of repeating eventsLocation:
functions.php, line 1828
Generate a cookie that saves the last calendar view (month, week, day) based on the current $REQUEST_URI so we can return to this same page after a user edits/deletes/etc an event.Parameters:
NothingLocation:
functions.php, line 567
Returns a boolean stating whether or not the event passed in will fall on the date passed.Parameters:
true or falseLocation:
functions.php, line 2073
Unload translations so we can switch languages and translate into a different language).Parameters:
NothingLocation:
translate.php, line 48
Send an HTTP login request to the browser and stop execution.Parameters:
NothingLocation:
functions.php, line 534
Send header stuff that tells the browser not to cache this page. Different browser use different mechanisms for this, so a series of HTTP header directives are sent.Parameters:
Note This function needs to be called before any HTML output is sent to the browser.
NothingLocation:
functions.php, line 606
Send a redirect to the user's preferred view. The user's preferred view is stored in the $STARTVIEW global variable. This is loaded from the user preferences (or system settings if there are no user preferences.)Parameters:
NothingLocation:
functions.php, line 467
Determines what the day is after the $TZ_OFFSET and sets it globally. The following global variables will be set:Parameters:
- $thisyear
- $thismonth
- $thisday
- $thisdate
- $today
NothingLocation:
functions.php, line 4246
Generate the HTML used in an event popup for the site_extras fields of an event.Parameters:
The HTML to be used within the event popup for any site_extra fields found for the specified eventLocation:
functions.php, line 1011
Convert a time format HHMMSS (like 131000 for 1PM) into number of minutes past midnight.Parameters:
The number of minutes since midnightLocation:
functions.php, line 2639
Check to see if two events overlap.Parameters:
true if the two times overlap, false if they do notLocation:
functions.php, line 2428
Translate text and remove and HTML from it. This is useful for tooltips, which barf on HTML.Parameters:
Note The etooltip function will print the result rather than return the value.
The translated text with all HTML removedLocation:
translate.php, line 158
Translate a string from the default English usage to some other language. The first time that this is called, the translation file will be loaded (with the load_translation_text function).Parameters:
The translated text, if available. If no translation is available, then the original untranslated text is returned.Location:
translate.php, line 115
Get a list of an assistant's boss from the webcal_asst table.Parameters:
An array of bosses, where each boss is an array with the following fields:Location:
- cal_login
- cal_fullname
functions.php, line 3714
Check the webcal_asst table to see if the specified user login has any bosses associated with it.Parameters:
true if the user is an assistant to one or more bossesLocation:
functions.php, line 3773
Return true if $user is $boss assistant by checking in the webcal_asst table.Parameters:
true or falseLocation:
functions.php, line 3748
Check the webcal_nonuser_cals table to determine if the user is the administrator for the nonuser calendar.Parameters:
true if the user is the administrator for the nonuser calendarLocation:
functions.php, line 4195
Returns week number for specified date. depending from week numbering settings.Parameters:
The week number of the specified dateLocation:
functions.php, line 2258
Return the full weekday name. Use the weekday_short_name function to get the abbreviated weekday name.Parameters:
the full weekday name ("Sunday")Location:
functions.php, line 3386
Return the abbreviated weekday name. Use the weekday_name function to get the full weekday name.Parameters:
the abbreviated weekday name ("Sun")Location:
functions.php, line 3408