Annotation of /mambo/branches/4.6/includes/mambofunc.php
Parent Directory
|
Revision Log
Revision 215 - (view) (download)
| 1 : | counterpoi | 82 | t <?php |
| 2 : | t | ||
| 3 : | t /** | ||
| 4 : | t * Sorts an Array of objects | ||
| 5 : | t * sort_direction [1 = Ascending] [-1 = Descending] | ||
| 6 : | t */ | ||
| 7 : | t function SortArrayObjects( &$a, $k, $sort_direction=1 ) { | ||
| 8 : | counterpoi | 89 | t $sorter =& new mosObjectSorter($a, $k, $sort_direction); |
| 9 : | counterpoi | 82 | t } |
| 10 : | t | ||
| 11 : | t /** | ||
| 12 : | t * Sends mail to admin | ||
| 13 : | counterpoi | 89 | t * Deprecated - not used in Mambo (code copied into weblinks.php) |
| 14 : | t * Could do with a better facility that works out who to send it to as well | ||
| 15 : | t * Note the "email" parameter was not used in the earlier version | ||
| 16 : | counterpoi | 82 | t */ |
| 17 : | t function mosSendAdminMail( $adminName, $adminEmail, $email, $type, $title, $author ) { | ||
| 18 : | counterpoi | 89 | t $mosConfig_live_site = mamboCore::get('mosConfig_live_site'); |
| 19 : | t $from = mamboCore::get('mosConfig_mailfrom'); | ||
| 20 : | t $fromname = mamboCore::get('mosConfig_fromname'); | ||
| 21 : | csouza | 183 | $subject = sprintf(T_("User Submitted '%s'"), $type); |
| 22 : | $message = sprintf(T_('Hello %s,\n\n\nA user submitted %s:\n [ %s ]\n has been just been submitted by user:\n [ %s ]\n' | ||
| 23 : | .' for %.\n\n\n\n' | ||
| 24 : | .'Please go to %s/administrator to view and approve this %s.\n\n' | ||
| 25 : | .'Please do not respond to this message as it is automatically generated and is for information purposes only\n'),$adminName ,$type, $title, $author, $mosConfig_live_site, $mosConfig_live_site, $type); | ||
| 26 : | counterpoi | 89 | t require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php'); |
| 27 : | t $mail =& new mosMailer ($from, $fromname, $subject, $message); | ||
| 28 : | t return $mail->mosMail($adminEmail); | ||
| 29 : | counterpoi | 82 | t } |
| 30 : | t | ||
| 31 : | t /* | ||
| 32 : | t * Includes pathway file | ||
| 33 : | counterpoi | 89 | t * Needed by templates |
| 34 : | counterpoi | 82 | t */ |
| 35 : | t function mosPathWay() { | ||
| 36 : | counterpoi | 89 | t $pathway = mosPathway::getInstance(); |
| 37 : | t echo $pathway->makePathway(); | ||
| 38 : | counterpoi | 82 | t } |
| 39 : | t | ||
| 40 : | t /** | ||
| 41 : | t * Displays a not authorised message | ||
| 42 : | t * | ||
| 43 : | t * If the user is not logged in then an addition message is displayed. | ||
| 44 : | t */ | ||
| 45 : | t function mosNotAuth() { | ||
| 46 : | t global $my; | ||
| 47 : | t | ||
| 48 : | csouza | 183 | echo T_('You are not authorized to view this resource.'); |
| 49 : | counterpoi | 82 | t if ($my->id < 1) { |
| 50 : | csouza | 183 | echo "<br />" . T_('You need to login.'); |
| 51 : | counterpoi | 82 | t } |
| 52 : | t } | ||
| 53 : | t | ||
| 54 : | t /** | ||
| 55 : | t * Replaces & with & for xhtml compliance | ||
| 56 : | t * | ||
| 57 : | t * Needed to handle unicode conflicts due to unicode conflicts | ||
| 58 : | counterpoi | 89 | t * Deprecated - simply code the line below |
| 59 : | counterpoi | 82 | t */ |
| 60 : | t function ampReplace( $text ) { | ||
| 61 : | counterpoi | 89 | t return preg_replace('/(&)([^#]|$)/','&$2', $text); |
| 62 : | counterpoi | 82 | t } |
| 63 : | t | ||
| 64 : | t /** | ||
| 65 : | t * Chmods files and directories recursively to given permissions. Available from 4.5.2 up. | ||
| 66 : | t * @param path The starting file or directory (no trailing slash) | ||
| 67 : | t * @param filemode Integer value to chmod files. NULL = dont chmod files. | ||
| 68 : | t * @param dirmode Integer value to chmod directories. NULL = dont chmod directories. | ||
| 69 : | t * @return TRUE=all succeeded FALSE=one or more chmods failed | ||
| 70 : | t */ | ||
| 71 : | t function mosChmodRecursive($path, $filemode=NULL, $dirmode=NULL) | ||
| 72 : | t { | ||
| 73 : | counterpoi | 89 | t $fileman = mosFileManager::getInstance(); |
| 74 : | t return $fileman->mosChmodRecursive($path, $filemode, $dirmode); | ||
| 75 : | t } | ||
| 76 : | counterpoi | 82 | t |
| 77 : | t /** | ||
| 78 : | t * Chmods files and directories recursively to mos global permissions. Available from 4.5.2 up. | ||
| 79 : | t * @param path The starting file or directory (no trailing slash) | ||
| 80 : | t * @param filemode Integer value to chmod files. NULL = dont chmod files. | ||
| 81 : | t * @param dirmode Integer value to chmod directories. NULL = dont chmod directories. | ||
| 82 : | t * @return TRUE=all succeeded FALSE=one or more chmods failed | ||
| 83 : | t */ | ||
| 84 : | t function mosChmod($path) | ||
| 85 : | t { | ||
| 86 : | counterpoi | 89 | t $fileman = mosFileManager::getInstance(); |
| 87 : | t return $fileman->mosChmod($path); | ||
| 88 : | counterpoi | 82 | t } // mosChmod |
| 89 : | t | ||
| 90 : | t /** | ||
| 91 : | t * Function to convert array to integer values | ||
| 92 : | counterpoi | 89 | t * Deprecated - not used within Mambo |
| 93 : | counterpoi | 82 | t */ |
| 94 : | t function mosArrayToInts( &$array, $default=null ) { | ||
| 95 : | t if (is_array( $array )) { | ||
| 96 : | t $n = count( $array ); | ||
| 97 : | t for ($i = 0; $i < $n; $i++) { | ||
| 98 : | t $array[$i] = intval( $array[$i] ); | ||
| 99 : | t } | ||
| 100 : | t } else { | ||
| 101 : | t if (is_null( $default )) { | ||
| 102 : | t return array(); | ||
| 103 : | t } else { | ||
| 104 : | t return array( $default ); | ||
| 105 : | t } | ||
| 106 : | t } | ||
| 107 : | t } | ||
| 108 : | t | ||
| 109 : | t /** | ||
| 110 : | t * Strip slashes from strings or arrays of strings | ||
| 111 : | t * @param value the input string or array | ||
| 112 : | t */ | ||
| 113 : | t function mosStripslashes(&$value) | ||
| 114 : | t { | ||
| 115 : | counterpoi | 89 | t $database = mamboDatabase::getInstance(); |
| 116 : | t return $database->mosStripslashes($value); | ||
| 117 : | t } | ||
| 118 : | counterpoi | 82 | t |
| 119 : | t /** | ||
| 120 : | t * Copy the named array content into the object as properties | ||
| 121 : | t * only existing properties of object are filled. when undefined in hash, properties wont be deleted | ||
| 122 : | t * @param array the input array | ||
| 123 : | t * @param obj byref the object to fill of any class | ||
| 124 : | t * @param string | ||
| 125 : | t * @param boolean | ||
| 126 : | t */ | ||
| 127 : | t function mosBindArrayToObject( $array, &$obj, $ignore='', $prefix=NULL, $checkSlashes=true ) { | ||
| 128 : | t $database = mamboDatabase::getInstance(); | ||
| 129 : | t return $database->mosBindArrayToOBject($array, $obj, $ignore='', $prefix=NULL, $checkSlashes=true); | ||
| 130 : | t } | ||
| 131 : | t | ||
| 132 : | t /** | ||
| 133 : | t * Utility function to read the files in a directory | ||
| 134 : | t * @param string The file system path | ||
| 135 : | t * @param string A filter for the names | ||
| 136 : | t * @param boolean Recurse search into sub-directories | ||
| 137 : | t * @param boolean True if to prepend the full path to the file name | ||
| 138 : | t */ | ||
| 139 : | t function mosReadDirectory( $path, $filter='.', $recurse=false, $fullpath=false ) { | ||
| 140 : | counterpoi | 89 | t if (@is_dir($path)) { |
| 141 : | t $dir =& new mosDirectory($path); | ||
| 142 : | counterpoi | 96 | t $arr = $dir->listFiles ($filter, $type='both', $recurse, $fullpath); |
| 143 : | counterpoi | 82 | t } |
| 144 : | counterpoi | 89 | t else $arr = array(); |
| 145 : | counterpoi | 82 | t return $arr; |
| 146 : | t } | ||
| 147 : | counterpoi | 89 | t |
| 148 : | counterpoi | 82 | t /** |
| 149 : | t * Utility function redirect the browser location to another url | ||
| 150 : | t * | ||
| 151 : | t * Can optionally provide a message. | ||
| 152 : | t * @param string The file system path | ||
| 153 : | t * @param string A filter for the names | ||
| 154 : | t */ | ||
| 155 : | t function mosRedirect( $url, $msg='' ) { | ||
| 156 : | t mamboCore::redirect($url, $msg); | ||
| 157 : | t } | ||
| 158 : | t | ||
| 159 : | t /** | ||
| 160 : | t * Function to strip additional / or \ in a path name | ||
| 161 : | t * @param string The path | ||
| 162 : | t * @param boolean Add trailing slash | ||
| 163 : | t */ | ||
| 164 : | t function mosPathName($p_path,$p_addtrailingslash = true) { | ||
| 165 : | counterpoi | 89 | t $fileman = mosFileManager::getInstance(); |
| 166 : | t return $fileman->mosPathName($p_path,$p_addtrailingslash); | ||
| 167 : | counterpoi | 82 | t } |
| 168 : | t | ||
| 169 : | t /** | ||
| 170 : | t * Checks the user agent string against known browsers | ||
| 171 : | t */ | ||
| 172 : | t function mosGetBrowser( $agent ) { | ||
| 173 : | t require( "includes/agent_browser.php" ); | ||
| 174 : | t | ||
| 175 : | t if (preg_match( "/msie[\/\sa-z]*([\d\.]*)/i", $agent, $m ) | ||
| 176 : | t && !preg_match( "/webtv/i", $agent ) | ||
| 177 : | t && !preg_match( "/omniweb/i", $agent ) | ||
| 178 : | t && !preg_match( "/opera/i", $agent )) { | ||
| 179 : | t // IE | ||
| 180 : | t return "MS Internet Explorer $m[1]"; | ||
| 181 : | t } else if (preg_match( "/netscape.?\/([\d\.]*)/i", $agent, $m )) { | ||
| 182 : | t // Netscape 6.x, 7.x ... | ||
| 183 : | t return "Netscape $m[1]"; | ||
| 184 : | t } else if ( preg_match( "/mozilla[\/\sa-z]*([\d\.]*)/i", $agent, $m ) | ||
| 185 : | t && !preg_match( "/gecko/i", $agent ) | ||
| 186 : | t && !preg_match( "/compatible/i", $agent ) | ||
| 187 : | t && !preg_match( "/opera/i", $agent ) | ||
| 188 : | t && !preg_match( "/galeon/i", $agent ) | ||
| 189 : | t && !preg_match( "/safari/i", $agent )) { | ||
| 190 : | t // Netscape 3.x, 4.x ... | ||
| 191 : | t return "Netscape $m[2]"; | ||
| 192 : | t } else { | ||
| 193 : | t // Other | ||
| 194 : | t $found = false; | ||
| 195 : | t foreach ($browserSearchOrder as $key) { | ||
| 196 : | t if (preg_match( "/$key.?\/([\d\.]*)/i", $agent, $m )) { | ||
| 197 : | t $name = "$browsersAlias[$key] $m[1]"; | ||
| 198 : | t return $name; | ||
| 199 : | t break; | ||
| 200 : | t } | ||
| 201 : | t } | ||
| 202 : | t } | ||
| 203 : | t | ||
| 204 : | t return 'Unknown'; | ||
| 205 : | t } | ||
| 206 : | t | ||
| 207 : | t /** | ||
| 208 : | t * Checks the user agent string against known operating systems | ||
| 209 : | t */ | ||
| 210 : | t function mosGetOS( $agent ) { | ||
| 211 : | t require( "includes/agent_os.php" ); | ||
| 212 : | t | ||
| 213 : | t foreach ($osSearchOrder as $key) { | ||
| 214 : | t if (preg_match( "/$key/i", $agent )) { | ||
| 215 : | t return $osAlias[$key]; | ||
| 216 : | t break; | ||
| 217 : | t } | ||
| 218 : | t } | ||
| 219 : | t | ||
| 220 : | t return 'Unknown'; | ||
| 221 : | t } | ||
| 222 : | t | ||
| 223 : | t /** | ||
| 224 : | t * Makes a variable safe to display in forms | ||
| 225 : | t * | ||
| 226 : | t * Object parameters that are non-string, array, object or start with underscore | ||
| 227 : | t * will be converted | ||
| 228 : | t * @param object An object to be parsed | ||
| 229 : | t * @param int The optional quote style for the htmlspecialchars function | ||
| 230 : | t * @param string|array An optional single field name or array of field names not | ||
| 231 : | t * to be parsed (eg, for a textarea) | ||
| 232 : | t */ | ||
| 233 : | t function mosMakeHtmlSafe( &$mixed, $quote_style=ENT_QUOTES, $exclude_keys='' ) { | ||
| 234 : | t if (is_object( $mixed )) { | ||
| 235 : | t foreach (get_object_vars( $mixed ) as $k => $v) { | ||
| 236 : | t if (is_array( $v ) || is_object( $v ) || $v == NULL || substr( $k, 1, 1 ) == '_' ) { | ||
| 237 : | t continue; | ||
| 238 : | t } | ||
| 239 : | t if (is_string( $exclude_keys ) && $k == $exclude_keys) { | ||
| 240 : | t continue; | ||
| 241 : | t } else if (is_array( $exclude_keys ) && in_array( $k, $exclude_keys )) { | ||
| 242 : | t continue; | ||
| 243 : | t } | ||
| 244 : | t $mixed->$k = htmlspecialchars( $v, $quote_style ); | ||
| 245 : | t } | ||
| 246 : | t } | ||
| 247 : | t } | ||
| 248 : | t | ||
| 249 : | t /** | ||
| 250 : | t * Checks whether a menu option is within the users access level | ||
| 251 : | t * @param int Item id number | ||
| 252 : | t * @param string The menu option | ||
| 253 : | t * @param int The users group ID number | ||
| 254 : | t * @param database A database connector object | ||
| 255 : | t * @return boolean True if the visitor's group at least equal to the menu access | ||
| 256 : | t */ | ||
| 257 : | t function mosMenuCheck( $Itemid, $menu_option, $task, $gid ) { | ||
| 258 : | t $menuhandler = mosMenuHandler::getInstance(); | ||
| 259 : | t return $menuhandler->menuCheck($Itemid, $menu_option, $task, $gid); | ||
| 260 : | t } | ||
| 261 : | t | ||
| 262 : | t /** | ||
| 263 : | t * Returns formated date according to current local and adds time offset | ||
| 264 : | t * @param string date in datetime format | ||
| 265 : | t * @param string format optional format for strftime | ||
| 266 : | t * @param offset time offset if different than global one | ||
| 267 : | t * @returns formated date | ||
| 268 : | t */ | ||
| 269 : | t function mosFormatDate( $date, $format="", $offset="" ){ | ||
| 270 : | csouza | 215 | $core = mamboCore::getMamboCore(); |
| 271 : | counterpoi | 82 | t if ( $format == '' ) { |
| 272 : | t // %Y-%m-%d %H:%M:%S | ||
| 273 : | csouza | 215 | $format = $core->language['dateformat']; |
| 274 : | counterpoi | 82 | t } |
| 275 : | t if ( $offset == '' ) { | ||
| 276 : | csouza | 215 | $offset = $core->language['offset']; |
| 277 : | counterpoi | 82 | t } |
| 278 : | t if ( $date && ereg( "([0-9]{4})-([0-9]{2})-([0-9]{2})[ ]([0-9]{2}):([0-9]{2}):([0-9]{2})", $date, $regs ) ) { | ||
| 279 : | csouza | 215 | $date = mktime( $regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1] ); |
| 280 : | counterpoi | 82 | t $date = $date > -1 ? strftime( $format, $date + ($offset*60*60) ) : '-'; |
| 281 : | t } | ||
| 282 : | t return $date; | ||
| 283 : | t } | ||
| 284 : | t | ||
| 285 : | t /** | ||
| 286 : | t * Returns current date according to current local and time offset | ||
| 287 : | t * @param string format optional format for strftime | ||
| 288 : | t * @returns current date | ||
| 289 : | t */ | ||
| 290 : | t function mosCurrentDate( $format="" ) { | ||
| 291 : | csouza | 215 | $core = mamboCore::getMamboCore(); |
| 292 : | $offset = $core->language['offset']; | ||
| 293 : | counterpoi | 82 | t if ($format=="") { |
| 294 : | csouza | 215 | $format = $format = $core->language['dateformat']; |
| 295 : | counterpoi | 82 | t } |
| 296 : | csouza | 215 | $date = utf8_encode(strftime( $format, time() + ($offset*60*60) )); |
| 297 : | counterpoi | 82 | t return $date; |
| 298 : | t } | ||
| 299 : | t | ||
| 300 : | t /** | ||
| 301 : | t * Utility function to provide ToolTips | ||
| 302 : | t * @param string ToolTip text | ||
| 303 : | t * @param string Box title | ||
| 304 : | t * @returns HTML code for ToolTip | ||
| 305 : | t */ | ||
| 306 : | t function mosToolTip( $tooltip, $title='', $width='', $image='tooltip.png', $text='', $href='#' ) { | ||
| 307 : | t global $mosConfig_live_site; | ||
| 308 : | t | ||
| 309 : | t if ( $width ) { | ||
| 310 : | t $width = ', WIDTH, \''.$width .'\''; | ||
| 311 : | t } | ||
| 312 : | t if ( $title ) { | ||
| 313 : | t $title = ', CAPTION, \''.$title .'\''; | ||
| 314 : | t } | ||
| 315 : | t if ( !$text ) { | ||
| 316 : | t $image = $mosConfig_live_site . '/includes/js/ThemeOffice/'. $image; | ||
| 317 : | t $text = '<img src="'. $image .'" border="0" />'; | ||
| 318 : | t } | ||
| 319 : | t $style = 'style="text-decoration: none; color: #333;"'; | ||
| 320 : | t if ( $href ) { | ||
| 321 : | t $style = ''; | ||
| 322 : | t } | ||
| 323 : | t $tip = "<a href=\"". $href ."\" onMouseOver=\"return overlib('" . $tooltip . "'". $title .", BELOW, RIGHT". $width .");\" onmouseout=\"return nd();\" ". $style .">". $text ."</a>"; | ||
| 324 : | t return $tip; | ||
| 325 : | t } | ||
| 326 : | t | ||
| 327 : | t /** | ||
| 328 : | t * Utility function to provide Warning Icons | ||
| 329 : | t * @param string Warning text | ||
| 330 : | t * @param string Box title | ||
| 331 : | t * @returns HTML code for Warning | ||
| 332 : | t */ | ||
| 333 : | csouza | 183 | function mosWarning($warning, $title=null) { |
| 334 : | if (is_null($title)) $title = T_('Mambo Warning'); | ||
| 335 : | $mosConfig_live_site = mamboCore::get('mosConfig_live_site'); | ||
| 336 : | counterpoi | 82 | t $tip = "<a href=\"#\" onMouseOver=\"return overlib('" . $warning . "', CAPTION, '$title', BELOW, RIGHT);\" onmouseout=\"return nd();\"><img src=\"" . $mosConfig_live_site . "/includes/js/ThemeOffice/warning.png\" border=\"0\" /></a>"; |
| 337 : | t return $tip; | ||
| 338 : | t } | ||
| 339 : | t | ||
| 340 : | t function mosCreateGUID(){ | ||
| 341 : | t srand((double)microtime()*1000000); | ||
| 342 : | t $r = rand ; | ||
| 343 : | t $u = uniqid(getmypid() . $r . (double)microtime()*1000000,1); | ||
| 344 : | t $m = md5 ($u); | ||
| 345 : | t return($m); | ||
| 346 : | t } | ||
| 347 : | t | ||
| 348 : | t function mosCompressID( $ID ){ | ||
| 349 : | t return(Base64_encode(pack("H*",$ID))); | ||
| 350 : | t } | ||
| 351 : | t | ||
| 352 : | t function mosExpandID( $ID ) { | ||
| 353 : | t return ( implode(unpack("H*",Base64_decode($ID)), '') ); | ||
| 354 : | t } | ||
| 355 : | t | ||
| 356 : | t /** | ||
| 357 : | t * Mail function (uses phpMailer) | ||
| 358 : | t * @param string From e-mail address | ||
| 359 : | t * @param string From name | ||
| 360 : | t * @param string/array Recipient e-mail address(es) | ||
| 361 : | t * @param string E-mail subject | ||
| 362 : | t * @param string Message body | ||
| 363 : | t * @param boolean false = plain text, true = HTML | ||
| 364 : | t * @param string/array CC e-mail address(es) | ||
| 365 : | t * @param string/array BCC e-mail address(es) | ||
| 366 : | t * @param string/array Attachment file name(s) | ||
| 367 : | t * @param string/array Reply-to e-mail address | ||
| 368 : | t * @param string/array Reply-to name | ||
| 369 : | t */ | ||
| 370 : | t function mosMail($from, $fromname, $recipient, $subject, $body, $mode=0, $cc=NULL, $bcc=NULL, $attachment=NULL, $replyto=NULL, $replytoname=NULL ) { | ||
| 371 : | counterpoi | 83 | t require_once(mamboCore::get('mosConfig_absolute_path').'/includes/phpmailer/class.phpmailer.php'); |
| 372 : | t $mail =& new mosMailer ($from, $fromname, $subject, $body); | ||
| 373 : | t $result = $mail->mosMail($recipient, $mode, $cc, $bcc, $attachment, $replyto, $replytoname); | ||
| 374 : | t return $result; | ||
| 375 : | counterpoi | 82 | t } // mosMail |
| 376 : | t | ||
| 377 : | t /** | ||
| 378 : | t * Random password generator | ||
| 379 : | t * @return password | ||
| 380 : | t */ | ||
| 381 : | t function mosMakePassword() { | ||
| 382 : | counterpoi | 89 | t require_once(mamboCore::get('mosConfig_absolute_path').'/includes/authenticator.php'); |
| 383 : | t $authenticator = mamboAuthenticator::getInstance(); | ||
| 384 : | t return $authenticator->mosMakePassword(); | ||
| 385 : | counterpoi | 82 | t } |
| 386 : | t | ||
| 387 : | t if (!function_exists('html_entity_decode')) { | ||
| 388 : | t /** | ||
| 389 : | t * html_entity_decode function for backward compatability in PHP | ||
| 390 : | t * @param string | ||
| 391 : | t * @param string | ||
| 392 : | t */ | ||
| 393 : | t function html_entity_decode ($string, $opt = ENT_COMPAT) { | ||
| 394 : | t | ||
| 395 : | t $trans_tbl = get_html_translation_table (HTML_ENTITIES); | ||
| 396 : | t $trans_tbl = array_flip ($trans_tbl); | ||
| 397 : | t | ||
| 398 : | t if ($opt & 1) { // Translating single quotes | ||
| 399 : | t // Add single quote to translation table; | ||
| 400 : | t // doesn't appear to be there by default | ||
| 401 : | t $trans_tbl["'"] = "'"; | ||
| 402 : | t } | ||
| 403 : | t | ||
| 404 : | t if (!($opt & 2)) { // Not translating double quotes | ||
| 405 : | t // Remove double quote from translation table | ||
| 406 : | t unset($trans_tbl["""]); | ||
| 407 : | t } | ||
| 408 : | t | ||
| 409 : | t return strtr ($string, $trans_tbl); | ||
| 410 : | t } | ||
| 411 : | t } | ||
| 412 : | t | ||
| 413 : | counterpoi | 99 | t /** |
| 414 : | csouza | 151 | * @param string |
| 415 : | * @return string | ||
| 416 : | * Deprecated - use the code within this function instead - not used in Mambo | ||
| 417 : | counterpoi | 99 | t */ |
| 418 : | csouza | 151 | function mosParseParams( $txt ) { |
| 419 : | $pparser = new mosParameters($txt); | ||
| 420 : | return $pparser->getParams(); | ||
| 421 : | } | ||
| 422 : | counterpoi | 99 | t |
| 423 : | csouza | 151 | class mosEmpty { |
| 424 : | function def( $key, $value='' ) { | ||
| 425 : | return 1; | ||
| 426 : | counterpoi | 99 | t } |
| 427 : | csouza | 151 | function get( $key, $default='' ) { |
| 428 : | return 1; | ||
| 429 : | counterpoi | 99 | t } |
| 430 : | t } | ||
| 431 : | t | ||
| 432 : | counterpoi | 82 | t ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

