Example #1
0
    header('Location: ' . Jaws_Utils::getBaseURL('/') . 'install/index.php');
    exit;
} else {
    require $root . '/config/JawsConfig.php';
}
require_once JAWS_PATH . 'include/Jaws/InitApplication.php';
$IsIndex = false;
$objAction = null;
$IsReqActionStandAlone = false;
// Only registered user can access not global website
$AccessToWebsiteDenied = !$GLOBALS['app']->Session->Logged() && $GLOBALS['app']->Registry->fetch('global_website', 'Settings') == 'false';
// Get forwarded error from webserver
$ReqError = jaws()->request->fetch('http_error', 'get');
if (empty($ReqError) && $GLOBALS['app']->Map->Parse()) {
    $ReqGadget = Jaws_Gadget::filter(jaws()->request->fetch('gadget'));
    $ReqAction = Jaws_Gadget_Action::filter(jaws()->request->fetch('action'));
    if (empty($ReqGadget)) {
        $IsIndex = true;
        $ReqGadget = $GLOBALS['app']->Registry->fetchByUser($GLOBALS['app']->Session->GetAttribute('layout'), 'main_gadget', 'Settings');
    }
    if (!empty($ReqGadget)) {
        if (Jaws_Gadget::IsGadgetEnabled($ReqGadget)) {
            $objAction = Jaws_Gadget::getInstance($ReqGadget)->action->load();
            if (Jaws_Error::IsError($objAction)) {
                Jaws_Error::Fatal("Error loading gadget: {$ReqGadget}");
            }
            if (!$GLOBALS['app']->Session->GetPermission($ReqGadget, 'default')) {
                $ReqError = '403';
            }
            // check referrer host for internal action
            if ($objAction->getAttribute($ReqAction, 'internal') && !$GLOBALS['app']->Session->extraCheck()) {
Example #2
0
File: admin.php Project: uda/jaws
 * @license    http://www.gnu.org/copyleft/lesser.html
 */
define('JAWS_SCRIPT', 'admin');
define('BASE_SCRIPT', basename(__FILE__));
// Redirect to the installer if JawsConfig can't be found.
$root = dirname(__FILE__);
if (!file_exists($root . '/config/JawsConfig.php')) {
    require_once 'include/Jaws/Utils.php';
    header('Location: ' . Jaws_Utils::getBaseURL('/') . 'install/index.php');
    exit;
} else {
    require $root . '/config/JawsConfig.php';
}
require_once JAWS_PATH . 'include/Jaws/InitApplication.php';
$ReqGadget = Jaws_Gadget::filter(jaws()->request->fetch('gadget', array('post', 'get')));
$ReqAction = Jaws_Gadget_Action::filter(jaws()->request->fetch('action', array('post', 'get')));
if (empty($ReqGadget)) {
    $ReqGadget = 'ControlPanel';
    $ReqAction = '';
}
$httpAuthEnabled = $GLOBALS['app']->Registry->fetch('http_auth', 'Settings') == 'true';
if ($httpAuthEnabled) {
    require_once JAWS_PATH . 'include/Jaws/HTTPAuth.php';
    $httpAuth = new Jaws_HTTPAuth();
}
// Check for login action is requested
if (!$GLOBALS['app']->Session->Logged()) {
    $loginMsg = '';
    if ($ReqGadget == 'ControlPanel' && $ReqAction == 'Login' || $httpAuthEnabled && isset($_SERVER['PHP_AUTH_USER'])) {
        if ($httpAuthEnabled) {
            $httpAuth->AssignData();
Example #3
0
 /**
  * Constructor
  *
  * @access  public
  * @param   object $gadget Jaws_Gadget object
  * @return  void
  */
 function FeedReader_Actions_Admin_Ajax($gadget)
 {
     parent::__construct($gadget);
     $this->_Model = $this->gadget->model->loadAdmin('Feed');
 }
Example #4
0
 /**
  * Constructor
  *
  * @access  public
  * @param   object $gadget Jaws_Gadget object
  * @return  void
  */
 function Settings_Actions_Admin_Ajax($gadget)
 {
     parent::__construct($gadget);
     $this->_Model = $this->gadget->model->loadAdmin('Settings');
 }
Example #5
0
 /**
  * Constructor
  *
  * @access  public
  * @param   object $gadget Jaws_Gadget object
  * @return  void
  */
 function Users_Actions_Admin_Ajax($gadget)
 {
     parent::__construct($gadget);
     $this->_UserModel = new Jaws_User();
 }