Guest User

Untitled

a guest
May 20th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. <?php
  2.  
  3. // /social-profile/resources/modules.php
  4. if (!defined('SMF'))
  5.     die('Hacking attempt...');
  6.  
  7. function loadModule($module = array())
  8. {
  9.  
  10.     // No module?
  11.     if (empty($module) || !is_array($module))
  12.         fatal_error('Sorry, the intended module could not be loaded properly.', false); # !! Change to fatal_lang_error(); eventually.
  13.  
  14.     // The Controller.
  15.     global $sourcedir;
  16.     if (file_exists($sourcedir . '/social-profile/modules/' . $module['identifier'] . '.php') === true)
  17.         require_once($sourcedir . '/social-profile/modules/' . $module['identifier'] . '.php');
  18.     else
  19.         fatal_error('Sorry, the intended module controller could not be found.', false); # !! Change to fatal_lang_error(); eventually.
  20.  
  21.     echo '<pre>', var_dump( $module), '</pre>';
  22.  
  23. }
Add Comment
Please, Sign In to add comment