Advertisement
Guest User

Untitled

a guest
Feb 12th, 2013
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
  6. *
  7. * @ Version : 1.1.5.0
  8. * @ Author : DeZender
  9. * @ Release on : 09.06.2012
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. class Bootstrap extends JO_Application_Bootstrap_Bootstrap {
  15. function _initWWW() {
  16. $request = JO_Request::getinstance( );
  17. $domain = $request->getDomain( false );
  18.  
  19. if (strpos( strtolower( $domain ), 'www.' ) === 0) {
  20. $new_url = str_ireplace( 'www.', '', $request->getFullUrl( ) );
  21. JO_Action::getinstance( )->redirect( $new_url );
  22. }
  23.  
  24. }
  25.  
  26. function _initInstall() {
  27. $request = JO_Request::getinstance( );
  28.  
  29. if (!( ( is_array( JO_Registry::get( 'config_db' ) ) && JO_Registry::get( 'config_db' ) ))) {
  30. if ($request->getModule( ) != 'install') {
  31. JO_Action::getinstance( )->redirect( $request->getBaseUrl( ) . '?module=install' );
  32. }
  33. }
  34.  
  35. }
  36.  
  37. function _initRoute() {
  38. $request = JO_Request::getinstance( );
  39. $uri = $request->getUri( );
  40. $request->setParams( '_route_', trim( $uri, '/' ) );
  41.  
  42. if (isset( $_GET )) {
  43. if (is_array( $_GET )) {
  44. $request->setParams( $_GET );
  45. }
  46. }
  47.  
  48.  
  49. if ($request->getModule( ) == 'install') {
  50. return '';
  51. }
  52.  
  53. $pin_prefix = (Helper_Config::get( 'config_pin_prefix' ) ? Helper_Config::get( 'config_pin_prefix' ) : 'pin');
  54.  
  55. if (preg_match( '~^' . preg_quote( $pin_prefix ) . '/([0-9]{1,})/?~i', trim( $uri, '/' ), $m )) {
  56. $request->setController( 'pin' )->setAction( 'index' )->setParams( 'pin_id', $m[1] );
  57. } else {
  58. if (preg_match( '~^' . preg_quote( $pin_prefix ) . '/(\w+)/([0-9]{1,})/?~i', trim( $uri, '/' ), $m )) {
  59. $request->setController( 'pin' )->setAction( $m[1] )->setParams( 'pin_id', $m[2] );
  60. }
  61. }
  62.  
  63.  
  64. if ($uri) {
  65. if ($request->getModule( ) != 'admin') {
  66. WM_Router::route( $uri );
  67. }
  68. }
  69.  
  70. }
  71. ........................................................
  72. .............................
  73. .........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement