Contains functions which are common to many tasks and very frequently used. More...
Go to the source code of this file.
Data Structures | |
class | messenger |
Namespaces | |
namespace | pragyan |
Widget Framework for Pragyan CMS (c) 2010 Pragyan Team http://www.gnu.org/licenses/ GNU Public License For more details, see README Add support for File Upload/Download via the widget's configurations Reload Widgets ,Get Widget Instances. see bottom. | |
Functions | |
connect () | |
disconnect () | |
prettyurl ($str) | |
convertUrif ($x, $attr) | |
convertUri ($x) | |
escape ($query) | |
URLSecurityCheck ($getvars) | |
safe_html ($html) | |
reloadTemplates () | |
reloadModules () | |
getGlobalSettings () | |
setGlobalSettings ($globals) | |
setGlobalSettingByAttribute ($attribute, $value) | |
displayerror ($error_desc) | |
displayinfo ($error_desc) | |
displaywarning ($error_desc) | |
arraytostring ($array) | |
getUserName ($userId) | |
getUserFullName ($userId) | |
getUserFullNameFromEmail ($email) | |
getUserEmail ($userId) | |
getUserIdFromEmail ($email) | |
getEffectivePageModule ($pageId) | |
getNextModuleComponentId ($modulename) | |
getDereferencedPageId ($pageId) | |
getPagePath ($pageid) | |
getPageModule ($pageId) | |
getPageTitle ($pageId) | |
getParentPage ($pageid) | |
getPageInfo ($pageid) | |
getPageModuleComponentId ($pageid) | |
getPageIdFromModuleComponentId ($moduleName, $moduleComponentId) | |
getModuleComponentIdFromPageId ($pageId, $moduleName) | |
getPageDepth ($pageId) | |
logInfo ($userEmail, $userId, $pageId, $pagePath, $permModule, $permAction, $accessIpAddress) | |
isRequiredMaintenance () | |
convertToHttps ($url) | |
convertToHttp ($url) | |
verifyHttps ($url) | |
selfURI () | |
hostURL () | |
replaceAction ($url, $old, $new) | |
strleft ($s1, $s2) | |
updateUserPassword ($user_email, $user_passwd) | |
getUserInfo ($user_email) | |
getAvailableTemplates () | |
getAvailableModules () | |
getTableFieldsName ($tablename, $exclude="user_profilepic") | |
getNextUserId () | |
showBreadcrumbSubmenu () | |
getFileActualPath ($moduleType, $moduleComponentId, $fileName) | |
iscurlinstalled () | |
censor_words ($text) | |
Variables | |
global | $sourceFolder |
global | $moduleFolder |
$curl_message = "cURL extention is not enabled/installed on your system. OpenID requires this extention to be loaded. Please enable cURL extention. (This can be done by uncommenting the line \"extension=curl.so\" in your php.ini file). OpenID can't be enabled until you enable cURL." |
Contains functions which are common to many tasks and very frequently used.
Definition in file common.lib.php.
arraytostring | ( | $ | array | ) |
Convert an array to a string recursively
$array | Array to convert |
Definition at line 255 of file common.lib.php.
censor_words | ( | $ | text | ) |
Definition at line 751 of file common.lib.php.
connect | ( | ) |
To connect to the database
Definition at line 26 of file common.lib.php.
convertToHttp | ( | $ | url | ) |
Replaces the protocol in a url with http://
$url | Url to be converted |
Definition at line 533 of file common.lib.php.
convertToHttps | ( | $ | url | ) |
Replaces the protocol in a url with https://
$url | Url to be converted |
Definition at line 521 of file common.lib.php.
convertUri | ( | $ | x | ) |
Definition at line 90 of file common.lib.php.
convertUrif | ( | $ | x, | |
$ | attr | |||
) |
Definition at line 65 of file common.lib.php.
disconnect | ( | ) |
To disconnect from the database once query is over
Definition at line 33 of file common.lib.php.
displayerror | ( | $ | error_desc | ) |
Used for error handling
Definition at line 232 of file common.lib.php.
displayinfo | ( | $ | error_desc | ) |
Used for giving info
Definition at line 238 of file common.lib.php.
displaywarning | ( | $ | error_desc | ) |
Used for giving warning
Definition at line 245 of file common.lib.php.
escape | ( | $ | query | ) |
Security Functions Begin, by Abhishek (For Usage, read Security Guidelines) To escape the database queries for avoiding SQL injection attacks
Definition at line 106 of file common.lib.php.
getAvailableModules | ( | ) |
Definition at line 671 of file common.lib.php.
getAvailableTemplates | ( | ) |
Definition at line 656 of file common.lib.php.
getDereferencedPageId | ( | $ | pageId | ) |
Determines the dereferenced Page Id of a given page
$pageid | Page id of the page (link) to be dereferenced |
Definition at line 380 of file common.lib.php.
getEffectivePageModule | ( | $ | pageId | ) |
Determines the module type of a given page
$pageid | Page id of the page, whose module name is to be determined |
Definition at line 350 of file common.lib.php.
getFileActualPath | ( | $ | moduleType, | |
$ | moduleComponentId, | |||
$ | fileName | |||
) |
Not checking if filetype adheres to uploadable filetype list beacuse this check can be performed in $moduleInstance->getFileAccessPermission.
Definition at line 721 of file common.lib.php.
getGlobalSettings | ( | ) |
To retrieve Global Settings from Database
Definition at line 199 of file common.lib.php.
getModuleComponentIdFromPageId | ( | $ | pageId, | |
$ | moduleName | |||
) |
Definition at line 452 of file common.lib.php.
getNextModuleComponentId | ( | $ | modulename | ) |
Gets the next module component id of a given module, which can be used for creating new instances of the same module.
$modulename | Name of the module |
Definition at line 363 of file common.lib.php.
getNextUserId | ( | ) |
Definition at line 706 of file common.lib.php.
getPageDepth | ( | $ | pageId | ) |
getPageIdFromModuleComponentId | ( | $ | moduleName, | |
$ | moduleComponentId | |||
) |
Definition at line 445 of file common.lib.php.
getPageInfo | ( | $ | pageid | ) |
Definition at line 433 of file common.lib.php.
getPageModule | ( | $ | pageId | ) |
Definition at line 407 of file common.lib.php.
getPageModuleComponentId | ( | $ | pageid | ) |
Definition at line 439 of file common.lib.php.
getPagePath | ( | $ | pageid | ) |
Definition at line 392 of file common.lib.php.
getPageTitle | ( | $ | pageId | ) |
Definition at line 413 of file common.lib.php.
getParentPage | ( | $ | pageid | ) |
Determines the page id of the parent of a given page
$pageid | Page id of the page, whose parent is to be determined |
Definition at line 427 of file common.lib.php.
getTableFieldsName | ( | $ | tablename, | |
$ | exclude = "user_profilepic" | |||
) |
Definition at line 686 of file common.lib.php.
getUserEmail | ( | $ | userId | ) |
Determines the Email-Id of a user, given his/her User Id
$userid | User Id of the user, whose E-mail address is to be determined |
Definition at line 323 of file common.lib.php.
getUserFullName | ( | $ | userId | ) |
Determines the Full Name of a user, given his/her User Id
$userId | User Id of the user, whose Full Name is to be determined |
Definition at line 297 of file common.lib.php.
getUserFullNameFromEmail | ( | $ | ) |
Determines the Full Name of a user, given his/her Email ID
Email Id of the user, whose Full Name is to be determined |
Definition at line 310 of file common.lib.php.
getUserIdFromEmail | ( | $ | ) |
Determines the User Id of a user, given his/her E-mail Id
E-mail address of the user, whose User Id is to be determined |
Definition at line 336 of file common.lib.php.
getUserInfo | ( | $ | user_email | ) |
Definition at line 593 of file common.lib.php.
getUserName | ( | $ | userId | ) |
Determines the User Name of a user, given his/her User Id
$userId | User Id of the user, whose User Name is to be determined |
Definition at line 284 of file common.lib.php.
hostURL | ( | ) |
Definition at line 559 of file common.lib.php.
iscurlinstalled | ( | ) |
Checks for presence of the cURL extension for OpenID.
Definition at line 742 of file common.lib.php.
isRequiredMaintenance | ( | ) |
Definition at line 497 of file common.lib.php.
logInfo | ( | $ | userEmail, | |
$ | userId, | |||
$ | pageId, | |||
$ | pagePath, | |||
$ | permModule, | |||
$ | permAction, | |||
$ | accessIpAddress | |||
) |
Definition at line 472 of file common.lib.php.
prettyurl | ( | $ | str | ) |
Definition at line 36 of file common.lib.php.
reloadModules | ( | ) |
Definition at line 165 of file common.lib.php.
reloadTemplates | ( | ) |
Security Functions Ends Load Templates into the database
Definition at line 136 of file common.lib.php.
replaceAction | ( | $ | url, | |
$ | old, | |||
$ | new | |||
) |
Replaces the action in the url to a new action
$url | Initial URL | |
$old | Old Action | |
$new | New Action |
Definition at line 578 of file common.lib.php.
safe_html | ( | $ | html | ) |
To prevent XSS attacks
Definition at line 128 of file common.lib.php.
selfURI | ( | ) |
Definition at line 552 of file common.lib.php.
setGlobalSettingByAttribute | ( | $ | attribute, | |
$ | value | |||
) |
To set Global Settings by attribute in Database
Definition at line 222 of file common.lib.php.
setGlobalSettings | ( | $ | globals | ) |
To set Global Settings in Database
Definition at line 211 of file common.lib.php.
showBreadcrumbSubmenu | ( | ) |
Definition at line 714 of file common.lib.php.
strleft | ( | $ | s1, | |
$ | s2 | |||
) |
Definition at line 584 of file common.lib.php.
updateUserPassword | ( | $ | user_email, | |
$ | user_passwd | |||
) |
Definition at line 588 of file common.lib.php.
URLSecurityCheck | ( | $ | getvars | ) |
To protect against writing dangerous URLs, Returns true if it detects a risk, More improvement to be done
Definition at line 116 of file common.lib.php.
verifyHttps | ( | $ | url | ) |
Definition at line 545 of file common.lib.php.
$curl_message = "cURL extention is not enabled/installed on your system. OpenID requires this extention to be loaded. Please enable cURL extention. (This can be done by uncommenting the line \"extension=curl.so\" in your php.ini file). OpenID can't be enabled until you enable cURL." |
Definition at line 750 of file common.lib.php.
global $moduleFolder |
Definition at line 21 of file common.lib.php.
global $sourceFolder |
Definition at line 21 of file common.lib.php.