[2] | 1 | <?php
|
---|
| 2 |
|
---|
| 3 | /************************************************************************/
|
---|
| 4 | /* Eleonline */
|
---|
| 5 | /* ============================================ */
|
---|
| 6 | /* Installer was based on Joomla Installer */
|
---|
| 7 | /************************************************************************/
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | //if (file_exists( '../client/config.php' ) && filesize( '../client/config.php' ) > 300) {
|
---|
| 11 | // header( 'Location: ../index.php' );
|
---|
| 12 | // exit();
|
---|
| 13 | //}
|
---|
| 14 |
|
---|
| 15 | error_reporting( E_ALL );
|
---|
| 16 |
|
---|
| 17 | header ("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
---|
| 18 | header ("Pragma: no-cache"); // HTTP/1.0
|
---|
| 19 |
|
---|
| 20 | /**
|
---|
| 21 | * Utility function to return a value from a named array or a specified default
|
---|
| 22 | */
|
---|
| 23 | define( "_MOS_NOTRIM", 0x0001 );
|
---|
| 24 | define( "_MOS_ALLOWHTML", 0x0002 );
|
---|
| 25 | function mosGetParam( &$arr, $name, $def=null, $mask=0 ) {
|
---|
| 26 | $return = null;
|
---|
| 27 | if (isset( $arr[$name] )) {
|
---|
| 28 | if (is_string( $arr[$name] )) {
|
---|
| 29 | if (!($mask&_MOS_NOTRIM)) {
|
---|
| 30 | $arr[$name] = trim( $arr[$name] );
|
---|
| 31 | }
|
---|
| 32 | if (!($mask&_MOS_ALLOWHTML)) {
|
---|
| 33 | $arr[$name] = strip_tags( $arr[$name] );
|
---|
| 34 | }
|
---|
[336] | 35 | $arr[$name] = addslashes( $arr[$name] );
|
---|
[2] | 36 | }
|
---|
| 37 | return $arr[$name];
|
---|
| 38 | } else {
|
---|
| 39 | return $def;
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | function mosMakePassword($length) {
|
---|
| 44 | $salt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
|
---|
| 45 | $len = strlen($salt);
|
---|
| 46 | $makepass="";
|
---|
| 47 | mt_srand(10000000*(double)microtime());
|
---|
| 48 | for ($i = 0; $i < $length; $i++)
|
---|
| 49 | $makepass .= $salt[mt_rand(0,$len - 1)];
|
---|
| 50 | return $makepass;
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | ?>
|
---|