Advertisement
Guest User

Untitled

a guest
Feb 16th, 2013
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by deZender.Net
  5. * @ deZender (PHP5 Decoder for ionCube Encoder)
  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. function render($page, $vars, $layout = 'layout') {
  15. extract( $vars, EXTR_OVERWRITE );
  16. ob_start( );
  17. include( './views/' . $page . '.php' );
  18. $body = ob_get_contents( );
  19. ob_end_clean( );
  20. include( './views/' . $layout . '.php' );
  21. }
  22.  
  23. function partial($partialname, $vars = array( )) {
  24. extract( $vars, EXTR_OVERWRITE );
  25.  
  26. if (!$partialsubname) {
  27. include( VIEW_DIR . ( '' . '/_' . $partialname . '.php' ) );
  28. }
  29.  
  30. }
  31.  
  32. function esc($var) {
  33. return htmlspecialchars( $var );
  34. }
  35.  
  36. function get_config($cid) {
  37. if (file_exists( DATA_DIR . ( '' . '/' . $cid . '.js' ) )) {
  38. return json_decode( rc4( @file_get_contents( DATA_DIR . ( '' . '/' . $cid . '.js' ) ), LICENSE_KEY ), true );
  39. }
  40.  
  41. return array( );
  42. }
  43.  
  44. function config_array($array, $flatten = false, $level = 0) {
  45. if (!is_array( $array )) {
  46. return array( );
  47. }
  48.  
  49. foreach ($array as $key => $var) {
  50. if (is_string( $var )) {
  51. if (in_array( $key, array( 'enabled', 'self', 'keywords_enabled', 'redirect_enabled', 'post', 'autojack', 'force_mobile' ) )) {
  52. $array[$key] = ($var == 'true' ? true : false);
  53. continue;
  54. }
  55.  
  56.  
  57. if (!in_array( $key, array( 'content' ) )) {
  58. $array[$key] = (!$flatten ? explode( '|', $var ) : $var);
  59. continue;
  60. }
  61.  
  62. $array[$key] = $var;
  63. continue;
  64. }
  65.  
  66.  
  67. if (is_array( $var )) {
  68. if (( !$flatten || ( $flatten && in_array( $key, array( 'methods', 'post', 'event', 'photo', 'like', 'rsvp' ) ) ) )) {
  69. $array[$key] = config_array( $var, $flatten, $level + 1 );
  70. continue;
  71. }
  72.  
  73. $array[$key] = implode( '|', $var );
  74. continue;
  75. }
  76. }
  77.  
  78. return $array;
  79. }
  80. ................................................................
  81. .........................
  82. ........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement