Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
functions [2020/04/06 12:13] aducomadmin [PHsPeed functions (general)] |
functions [2020/11/17 12:06] (current) aducomadmin |
||
---|---|---|---|
Line 3: | Line 3: | ||
Once you start building applications, | Once you start building applications, | ||
- | |function|description|prototype|returns|Notes| | + | ^function^description^prototype^returns^Notes| |
+ | |clean_html|Clean HTML string removing all element attributes and elements which are not in the provided whitelist (but keeping their allowed children).|function | ||
+ | |closeSession|Closes the session by unsetting it, destroying it, closes the write buffer and clears the session cookie.|function closeSession()|nothing| | | ||
+ | |download|Download a file|download($path, | ||
+ | |encryptpsw|Encrypts the password with the given method (none, md5, sha, php)|encryptpsw($passwrd, | ||
+ | |extractFieldName|Extract the fieldname of a table.field pair|extractFieldName($theField)|field name| | | ||
|getGUID|Retrieves a unique string|function getGUID()|string|Returns a string that can be used for validation situations, i.e. for confirming credentials etc. In PHsPeed this string is used to let users validate their account.| | |getGUID|Retrieves a unique string|function getGUID()|string|Returns a string that can be used for validation situations, i.e. for confirming credentials etc. In PHsPeed this string is used to let users validate their account.| | ||
- | |inPostState|Tests if the form has received form data or is in it's initials state|inPostState(); | + | |getHTMLColors|Retrieves an array of html colors|getHTMLColors()|html colors| | |
- | |isAjax|Tests if the current module takes part in an Ajax handler|isAjax()|true | + | |getProtocol|Returns the used protocol as HTTP:// or HTTPS:// |function getProtocol()|HTTP:// |
- | |isLoggedOn|Testst | + | |inPostState|Tests if the form has received form data or is in it's initials state|function |
- | |phspCrypt|Encrypts and Decrypts data.|phspCrypt($string, $mode)|string|available modes are: 'e' | + | |isAjax()|Tests if the form is called |
- | |PHP redirect|Redirects current form to another page.|phspRedirect($url, $origin='' | + | |isHTTPS|Verifies |
- | |rtrSubmitBtn|Retrieves the id of the button clicked|rtrSubmitBtn();|string|This function | + | |isTrue|Test |
- | |session_stop|Releases session variables and closes current | + | |getExternalSessionVar|Get a session var of another module|getExternalSessionVar($theVar, $default=, |
+ | |phspCreateLink|Create a valid link with an encrypted parameter list (including session variables)|function phspCreateLink($url, | ||
+ | |setSessionVar|Sets a session variable|function setSessionVar($theVar, $value)|nothing|This function sets a session variable that is maintained over the same session.| | ||
+ | |showMessage|Displays a modal message|showMessage($msg)|nothing|In general this function | ||
+ | |session_stop|Terminates a session|session_stop()| | | | ||
+ | |sessionVarExists| |sessionVarExists($theVar)|true, | ||
+ | |setFormMode($mode)|Set next form mode to edit, delete, update, create|setFormMode($mode)| |Use this funciton before redirecting to the required module| | ||
+ | |setSessionVar|Sets a session variable|function setSessionVar($theVar, | ||
+ | |unsetSessionVar|Unsets a session variable|unsetSessionVar($theVar)| | | | ||
+ | |toClass|Converts a table.field name into a table_field name class|toClass($strin)|. → _| | | ||
+ | | | | | | | | ||
- | ===== | + | ===== PHsPeed functions (Application object) |
- | \\ | + | ^function^description^prototype^returns^Notes| |
- | + | |findComponent|search component reference on component name|findComponentByName($theCompName)|component reference or false|Traverses the component tree to find the required component| | |
- | + | |login|wrapper around the root component to login|login($uid, $pwd)|true/ | |
- | ===== PHsPeed functions | + | |logoff|wrapper around the root component to logoff|logoff()|true/false| | |
- | + | |redirect|redirect to the given url|Redirect($theUrl, $origin, $parms=, | |
- | |function|description|prototype|returns|Notes| | + | |showMessage|Sets a session variable|showMessage($theMsg)|nothing|This function sets a session variable that is maintained over the same session.| |
- | |showMessage|Displays a modal message|showMessage($msg)|nothing| \\ In general this function can be used to submit and in ajax stage to display | + | |
| | | | | | | | | | | | | | ||