Go to the source code of this file.
| enum CFG_JOURNAL_ADMIN |
Definition at line 33 of file base.inc.php.
| enum CFG_JOURNAL_CONTACTS |
Definition at line 32 of file base.inc.php.
| enum CFG_JOURNAL_DEBUG |
Definition at line 27 of file base.inc.php.
| enum CFG_JOURNAL_KB |
Definition at line 39 of file base.inc.php.
| enum CFG_JOURNAL_LOGIN |
Definition at line 28 of file base.inc.php.
Definition at line 35 of file base.inc.php.
| enum CFG_JOURNAL_OTHER |
Definition at line 37 of file base.inc.php.
| enum CFG_JOURNAL_PRODUCTS |
Definition at line 36 of file base.inc.php.
| enum CFG_JOURNAL_SALES |
Definition at line 30 of file base.inc.php.
| enum CFG_JOURNAL_SITES |
Definition at line 31 of file base.inc.php.
| enum CFG_JOURNAL_SUPPORT |
Definition at line 29 of file base.inc.php.
| enum CFG_JOURNAL_TASKS |
Definition at line 40 of file base.inc.php.
| enum CFG_JOURNAL_TRIGGERS |
Definition at line 38 of file base.inc.php.
| enum CFG_JOURNAL_USER |
Definition at line 34 of file base.inc.php.
| enum CFG_LOGGING_FULL |
Definition at line 24 of file base.inc.php.
| enum CFG_LOGGING_MAX |
Definition at line 25 of file base.inc.php.
| enum CFG_LOGGING_MIN |
Definition at line 22 of file base.inc.php.
| enum CFG_LOGGING_NORMAL |
Definition at line 23 of file base.inc.php.
| enum CFG_LOGGING_OFF |
Begin constant definitions
Definition at line 21 of file base.inc.php.
Definition at line 101 of file base.inc.php.
| enum CRITICAL_NOTICE_TYPE |
Definition at line 72 of file base.inc.php.
| enum HOL_APPROVAL_DENIED |
Definition at line 63 of file base.inc.php.
Definition at line 67 of file base.inc.php.
| enum HOL_APPROVAL_GRANTED |
Definition at line 62 of file base.inc.php.
Definition at line 66 of file base.inc.php.
| enum HOL_APPROVAL_NONE |
Definition at line 61 of file base.inc.php.
Definition at line 65 of file base.inc.php.
| enum HOL_FREE |
Definition at line 57 of file base.inc.php.
| enum HOL_HOLIDAY |
Definition at line 53 of file base.inc.php.
| enum HOL_PUBLIC |
Definition at line 59 of file base.inc.php.
| enum HOL_SICKNESS |
Definition at line 54 of file base.inc.php.
| enum HOL_TRAINING |
Definition at line 56 of file base.inc.php.
| enum HOL_WORKING_AWAY |
Definition at line 55 of file base.inc.php.
| enum LICENCE_EVALUATION |
Definition at line 113 of file base.inc.php.
| enum LICENCE_PER_SERVER |
Definition at line 111 of file base.inc.php.
| enum LICENCE_PER_USER |
Definition at line 109 of file base.inc.php.
Definition at line 110 of file base.inc.php.
| enum LICENCE_SITE |
Definition at line 112 of file base.inc.php.
| enum NO_BILLABLE_CONTRACT |
Definition at line 100 of file base.inc.php.
| enum NORMAL_NOTICE_TYPE |
Definition at line 70 of file base.inc.php.
| enum NOTE_TASK |
Definition at line 51 of file base.inc.php.
Definition at line 106 of file base.inc.php.
Definition at line 105 of file base.inc.php.
Definition at line 102 of file base.inc.php.
| enum STATUS_ACTIVE |
Definition at line 76 of file base.inc.php.
| enum STATUS_CLOSED |
Definition at line 77 of file base.inc.php.
| enum STATUS_CLOSING |
Definition at line 82 of file base.inc.php.
| enum STATUS_COLLEAGUE |
Definition at line 80 of file base.inc.php.
| enum STATUS_CUSTOMER |
Definition at line 83 of file base.inc.php.
| enum STATUS_LEFTMESSAGE |
Definition at line 79 of file base.inc.php.
| enum STATUS_RESEARCH |
Definition at line 78 of file base.inc.php.
| enum STATUS_SUPPORT |
Definition at line 81 of file base.inc.php.
| enum STATUS_UNASSIGNED |
Definition at line 85 of file base.inc.php.
| enum STATUS_UNSUPPORTED |
Definition at line 84 of file base.inc.php.
| enum TAG_CONTACT |
Definition at line 42 of file base.inc.php.
| enum TAG_INCIDENT |
Definition at line 43 of file base.inc.php.
| enum TAG_KB_ARTICLE |
Definition at line 48 of file base.inc.php.
| enum TAG_PRODUCT |
Definition at line 46 of file base.inc.php.
| enum TAG_REPORT |
Definition at line 49 of file base.inc.php.
| enum TAG_SITE |
Definition at line 44 of file base.inc.php.
| enum TAG_SKILL |
Definition at line 47 of file base.inc.php.
| enum TAG_TASK |
Definition at line 45 of file base.inc.php.
| enum TRIGGER_NOTICE_TYPE |
Definition at line 73 of file base.inc.php.
Definition at line 96 of file base.inc.php.
Definition at line 88 of file base.inc.php.
| enum USERSTATUS_AT_LUNCH |
Definition at line 92 of file base.inc.php.
Definition at line 91 of file base.inc.php.
| enum USERSTATUS_IN_OFFICE |
Definition at line 89 of file base.inc.php.
Definition at line 90 of file base.inc.php.
Definition at line 93 of file base.inc.php.
Definition at line 95 of file base.inc.php.
Definition at line 97 of file base.inc.php.
Definition at line 94 of file base.inc.php.
| enum WARNING_NOTICE_TYPE |
Definition at line 71 of file base.inc.php.
| available_languages | ( | $ | test = FALSE |
) |
Return an array of available languages codes by looking at the files in the i18n directory
| bool | $test - (optional) Include test language (zz) in results |
| array | Language codes |
Definition at line 394 of file base.inc.php.
References elseif, and i18n_code_to_name().
Referenced by cfgVarInput().
{
$i18nfiles = list_dir('.'.DIRECTORY_SEPARATOR.'i18n');
$i18nfiles = array_filter($i18nfiles, 'filter_i18n_filenames');
array_walk($i18nfiles, 'i18n_filename_to_code');
asort($i18nfiles);
foreach ($i18nfiles AS $code)
{
if ($code != 'zz')
{
$available[$code] = i18n_code_to_name($code);
}
elseif ($code == 'zz' AND $test === TRUE)
{
$available[$code] = 'Test Language (zz)';
}
}
return $available;
}
| clean_dbstring | ( | $ | string | ) |
Make an external variable safe for use in a database query
| mixed | $string variable to make safe |
Definition at line 319 of file base.inc.php.
Referenced by Contact::add(), User::add(), clean_username(), new_update(), process_add_contact(), sla_target_content(), and valid_username().
{
$string = strip_tags($string);
if (get_magic_quotes_gpc() == 1)
{
stripslashes($string);
}
$string = mysql_real_escape_string($string);
return $string;
}
| clean_fixed_list | ( | $ | string, | |
| $ | list, | |||
| $ | strict = FALSE | |||
| ) |
Make an external variable safe by ensuring the value is one of a list of predetermined values
| mixed | $string variable to make safe | |
| array | $list list of safe values | |
| bool | $strict, also check the types of the values in the list |
Definition at line 344 of file base.inc.php.
References E_USER_ERROR, and E_USER_WARNING.
{
if (is_array($list))
{
if (!in_array($string, $list, $strict))
{
if ($string != NULL AND $string != '')
{
trigger_error("Unexpected input", E_USER_WARNING);
}
$string = $list[0];
}
}
else
{
trigger_error("Could not understand list of predetermined values for fixed_list()", E_USER_ERROR);
return false;
}
return $string;
}
| clean_float | ( | $ | string | ) |
Make an external variable safe. Force it to be a float.
| mixed | $string variable to make safe |
Definition at line 300 of file base.inc.php.
References E_USER_WARNING.
{
if (!is_null($string) AND $string != '' AND !is_numeric($string))
{
trigger_error("Input was expected to be numeric but received string instead", E_USER_WARNING);
}
$var = floatval($string);
return $var;
}
| clean_int | ( | $ | string | ) |
Make an external variable safe. Force it to be an integer.
| mixed | $string variable to make safe |
Definition at line 281 of file base.inc.php.
References E_USER_WARNING.
Referenced by Contact::add(), User::add(), dashboard_watch_incidents_edit(), is_kb_article(), process_add_contact(), sla_target_content(), and tms_add_timeused_closing().
{
if (!is_null($string) AND $string != '' AND !is_numeric($string))
{
trigger_error("Input was expected to be numeric but received string instead", E_USER_WARNING);
}
$var = intval($string);
return $var;
}
| clean_username | ( | $ | string | ) |
Make an external username variable safe for use in a database This is seperate from the other clean functions as both ints and strings are supported
| mixed | $string Text the clean |
Definition at line 374 of file base.inc.php.
References clean_dbstring().
{
if (is_numeric($string))
{
return intval($string);
}
else
{
// We also support current, all and all usernames
return clean_dbstring($string);
}
}
| cleanvar | ( | $ | vars, | |
| $ | striphtml = TRUE, |
|||
| $ | transentities = FALSE, |
|||
| $ | mysqlescape = TRUE, |
|||
| $ | disallowedchars = array(), |
|||
| $ | replacechars = array(), |
|||
| $ | intval = FALSE | |||
| ) |
Make an external variable safe for database and HTML display
| mixed | $var variable to replace | |
| bool | $striphtml whether to strip html | |
| bool | $transentities whether to translate all aplicable chars (true) or just special chars (false) into html entites | |
| bool | $mysqlescape whether to mysql_escape() | |
| array | $disallowedchars array of chars to remove | |
| array | $replacechars array of chars to replace as $orig => $replace | |
| bool | $intval whether to get the integer value of the variable |
Definition at line 217 of file base.inc.php.
References trim.
Referenced by act_create_unknown_contact(), ajaxdata_add_action_function(), auto_create_tags_function(), change_skill_function(), choose_tag_form_function(), choose_tag_func(), create_trigger_notice(), dashboard_engineer(), dashboard_engineer_display(), dashboard_engineer_edit(), dashboard_links_edit(), dashboard_my_incidents_display(), dashboard_rss_edit(), draw_file_row(), process_add_contact(), Form::run(), send_trigger_email(), and show_add_contact().
{
if (is_array($vars))
{
foreach ($vars as $key => $singlevar)
{
$var[$key] = cleanvar($singlevar, $striphtml, $transentities, $mysqlescape,
$disallowedchars, $replacechars);
}
}
else
{
$var = $vars;
if ($striphtml === TRUE)
{
$var = strip_tags($var);
}
if (!empty($disallowedchars))
{
$var = str_replace($disallowedchars, '', $var);
}
if (!empty($replacechars))
{
foreach ($replacechars as $orig => $replace)
{
$var = str_replace($orig, $replace, $var);
}
}
if ($transentities)
{
$var = htmlentities($var, ENT_COMPAT, $GLOBALS['i18ncharset']);
}
else
{
$var = htmlspecialchars($var, ENT_COMPAT, $GLOBALS['i18ncharset']);
}
if ($mysqlescape)
{
$var = mysql_real_escape_string($var);
}
if ($intval)
{
$var = intval($val);
}
$var = trim($var);
}
return $var;
}
| stripslashes_array | ( | $ | data | ) |
Strip slashes from an array
| $data | an array |
Definition at line 187 of file base.inc.php.
References $data.
| $_SERVER['PHP_SELF'] |
End global variable definitions
Definition at line 158 of file base.inc.php.
Referenced by Form::__construct(), application_url(), nusoap_server::configureWSDL(), debug_log(), gravatar(), nusoap_server::nusoap_server(), nusoap_server::parse_http_headers(), nusoap_server::register(), nusoap_server::service(), setup_configure(), show_tag_cloud(), and wsdl::webDescription().
| $application_revision = 'p1' |
Definition at line 122 of file base.inc.php.
| $application_version = '3.64' |
Begin global variable definitions
Definition at line 119 of file base.inc.php.
Referenced by emailtype_replace_jobs_specials(), send_template_jobs_email(), setup_exec_sql(), and trigger_replace_specials().
| if ($application_revision== 'svn') $application_version_string = trim("v{$application_version} {$application_revision}") |
Definition at line 149 of file base.inc.php.
Referenced by application_version_string(), Feed::generate_feed_xml(), send_email(), send_email_template(), and trigger_replace_specials().
| $CONFIG['upload_max_filesize'] = return_bytes($CONFIG['upload_max_filesize']) |
Definition at line 137 of file base.inc.php.
| $fsdelim = DIRECTORY_SEPARATOR |
Definition at line 127 of file base.inc.php.
| $lastweek = $now - (7 * 86400) |
Definition at line 133 of file base.inc.php.
| $ldap_conn = "" |
Definition at line 151 of file base.inc.php.
Referenced by authenticateLDAP(), ldap_getDetails(), ldap_storeDetails(), ldapCheckGroupExists(), ldapOpen(), and saction_ldapSync().
Definition at line 130 of file base.inc.php.
| $oldeh = set_error_handler("sit_error_handler") |
Definition at line 164 of file base.inc.php.
| $siterrors = 0 |
Definition at line 125 of file base.inc.php.
Referenced by html_redirect(), and sit_error_handler().
| $startofsession = $now - ini_get("session.gc_maxlifetime") |
Definition at line 135 of file base.inc.php.
Referenced by draw_chart(), suggest_reassign_userid(), user_online(), and user_online_icon().
| $today = $now + (16 * 3600) |
Definition at line 132 of file base.inc.php.
| $todayrecent = $now -(16 * 3600) |
Definition at line 134 of file base.inc.php.
Referenced by dashboard_statistics_display(), and give_overview().
For more help developing with SiT! see http://sitracker.org/wiki/DevelopmentHowTo