Exemplo n.º 1
0
<?php

/* generates dialog windows! */
if (!isset($_GET['dialog'])) {
    exit;
}
if (!defined('IN_WPRO')) {
    define('IN_WPRO', true);
}
require_once dirname(__FILE__) . '/config.inc.php';
require_once WPRO_DIR . 'core/libs/common.inc.php';
require_once WPRO_DIR . 'core/libs/wproDialog.class.php';
$DIALOG = new wproDialog();
$EDITOR->triggerEvent('onLoadDialog');
$pluginName = isset($_GET['dialog']) ? $_GET['dialog'] : '';
$DIALOG->loadPlugin($pluginName, true);
$DIALOG->runPluginAction($pluginName, isset($_GET['action']) ? $_GET['action'] : 'default', array_merge($_GET, $_POST));
$DIALOG->display();
Exemplo n.º 2
0
 function display()
 {
     global $EDITOR, $WPRO_EDITOR_URL;
     $this->_setDefaults();
     require_once WPRO_DIR . 'core/libs/wproTemplate.class.php';
     if (empty($this->options)) {
         $this->options = array(array('type' => 'submit', 'name' => 'ok', 'value' => $this->getLang('ok', 'OK')), array('type' => 'submit', 'name' => 'cancel', 'value' => $this->getLang('cancel', 'Cancel')));
     }
     if (empty($EDITOR)) {
         //exit ($_SERVER['REQUEST_URI']);
         $iframeDialogs = false;
         $frameID = 0;
         if (defined('WPRO_IN_ROUTE')) {
             $editorURL = wproRoute::getEditorURL();
         } else {
             $editorURL = $WPRO_EDITOR_URL;
         }
         $themeURL = $this->varReplace(WPRO_THEME_URL, array('EDITOR_URL' => $WPRO_EDITOR_URL)) . WPRO_THEME . '/wysiwygpro';
         $tpl = new wproTemplate();
         $tpl->path = WPRO_DIR . 'core/tpl/';
         if (isset($_GET['iframe'])) {
             $iframeDialogs = true;
         }
         if (isset($_GET['dialogFrameID'])) {
             $iframeDialogs = true;
             $frameID = intval($_GET['dialogFrameID']);
         }
         if (isset($_GET['dialogOpenerID'])) {
             $openerID = intval($_GET['dialogOpenerID']);
         } else {
             $openerID = null;
         }
     } else {
         require_once WPRO_DIR . 'core/libs/wproDialog.class.php';
         $DIALOG = new wproDialog();
         $tpl =& $DIALOG->template;
         $DIALOG->bodyInclude = WPRO_DIR . 'core/tpl/messageExitBody.tpl.php';
         $DIALOG->title = $this->title;
         $DIALOG->options = $this->options;
         $DIALOG->chromeless = $this->chromeless;
         if (isset($_GET['iframe'])) {
             $iframeDialogs = true;
         }
         if (isset($_GET['dialogFrameID'])) {
             $iframeDialogs = true;
             $DIALOG->frameID = intval($_GET['dialogFrameID']);
         }
         if (isset($_GET['dialogOpenerID'])) {
             $DIALOG->openerID = intval($_GET['dialogOpenerID']);
         }
         $editorURL = $EDITOR->editorURL;
         $themeURL = $EDITOR->themeFolderURL . $EDITOR->theme . '/wysiwygpro';
         $iframeDialogs = $EDITOR->iframeDialogs;
         $frameID = $DIALOG->frameID;
         $openerID = $DIALOG->openerID;
     }
     $tpl->bulkAssign(array('iframeDialogs' => $iframeDialogs, 'frameID' => $frameID, 'openerID' => $openerID, 'editorURL' => $editorURL, 'themeURL' => $themeURL, 'hidden' => $this->hidden, 'jsAction' => $this->jsAction, 'action' => $this->action, 'title' => $this->title, 'icon' => $this->icon, 'options' => $this->options, 'msg' => $this->msg));
     /**  
      * Echo the results.  
      */
     if (empty($EDITOR)) {
         $tpl->display('messageExit.tpl.php');
     } else {
         $DIALOG->display();
     }
     exit;
 }