Пример #1
0
        }
    }
    return $var;
}
$db =& JFactory::getDBO();
$language =& JFactory::getLanguage();
$url = wpro_stripTrailingSlash($mainframe->isAdmin() ? $mainframe->getSiteURL() : JURI::base());
$path = wpro_stripTrailingSlash($mainframe->isAdmin() ? JPATH_SITE : JPATH_BASE);
$adminside = $mainframe->isAdmin() ? 1 : 0;
define('WPRO_DIR', $path . '/plugins/editors/wysiwygPro3/wysiwygPro/');
switch (JRequest::getCmd('task')) {
    // routing
    case 'route':
        ob_end_clean();
        include_once WPRO_DIR . 'wproRoute.class.php';
        wproRoute::processRequests();
        exit;
        break;
        // list content items
    // list content items
    case 'content':
        ob_end_clean();
        define('IN_WPRO', true);
        include_once WPRO_DIR . 'wysiwygPro.class.php';
        include_once $path . '/plugins/editors/wysiwygPro3/wysiwygPro/core/libs/wproTemplate.class.php';
        // get WP params
        $query = "SELECT params FROM #__plugins WHERE element = 'WysiwygPro3' AND folder = 'editors'";
        $db->setQuery($query);
        $params = $db->loadResult();
        $params =& new JParameter($params);
        $wp_sef = $params->get('seo_links', 0);
Пример #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;
 }