Пример #1
0
 /** exdoc
  * Takes care of all the specifics of either showing a sectional container or running an action.
  * @node Subsystems:Theme
  */
 public static function main()
 {
     global $db, $user;
     echo show_msg_queue();
     if (!defined('SOURCE_SELECTOR') || SOURCE_SELECTOR == 1) {
         $last_section = expSession::get("last_section");
         $section = $db->selectObject("section", "id=" . $last_section);
         // View authorization will be taken care of by the runAction and mainContainer functions
         if (self::inAction()) {
             self::runAction();
         } else {
             if ($section == null) {
                 self::goDefaultSection();
             } else {
                 self::mainContainer();
             }
         }
     } else {
         if (isset($_REQUEST['module'])) {
             include_once BASE . "framework/modules-1/containermodule/actions/orphans_content.php";
         } else {
             echo gt('Select a module');
         }
     }
 }
Пример #2
0
/**
 * Smarty {messagequeue} function plugin
 *
 * Type:     function<br>
 * Name:     messagequeue<br>
 * Purpose:  display 'flash' message queue
 *
 * @param         $params
 * @param \Smarty $smarty
 * @return bool
 */
function smarty_function_messagequeue($params, &$smarty)
{
    $name = empty($params['name']) ? null : $params['name'];
    echo show_msg_queue($name);
}