Example #1
0
    /**
     * Shows body of html page
     *
     * @return void
     * @access private
     */
    protected function _showBody()
    {
        switch ($this->_displayMode) {
            case 'menu':
                echo '
					<body marginheight="0" background="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/fond_menu.gif" marginwidth="0" leftmargin="0" topmargin="0" class="admin">
						' . $this->_writeMenu() . '
					</body>
					';
                break;
            case 'frames':
                echo '
					<body>
					' . $this->_parseContent($this->_content) . '
					</body>
					';
                break;
            case 'frameChecker':
                echo '
					<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" class="frame" onLoad="initJavascript();">
					' . $this->_parseContent($this->_content) . '
					</body>
					';
                break;
            case 'arbo':
                echo '
					<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" class="frame">
						
					' . $this->_getTitleDesign($this->_title, "admin_frame", "picto_pages.gif") . '
					
					' . $this->_showMessage() . '
					' . $this->_parseContent($this->_content) . '
					</body>
				';
                break;
            case 'modules':
                echo '
					<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" class="frame">
						
					' . $this->_getTitleDesign($this->_title, "admin_frame", "picto_modules.gif") . '
					
					' . $this->_showMessage() . '
					' . $this->_parseContent($this->_content) . '
					</body>
				';
                break;
            default:
                $user = $this->_context->getUser();
                $language = $user->getLanguage();
                echo '<body marginheight="0" marginwidth="0" leftmargin="0" topmargin="0" class="admin" onLoad="initJavascript();">';
                //content is out of frames, so add Automne content header and do not display menu
                if ($this->_displayMode == 'out') {
                    echo '
					<table width="100%" height="72" border="0" cellpadding="0" cellspacing="0" style="background:url(' . PATH_ADMIN_IMAGES_WR . '/../v3/img/fond.gif) repeat-x bottom left;">
						<tr>
							<td width="562" height="72" valign="top" class="admin">
								<table width="562" height="30" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="472" height="30" class="admin_date">
											<!--&nbsp;&nbsp;<span class="admin_site_label">' . APPLICATION_LABEL . '</span> - <b>' . date($language->getDateFormat(), time()) . '</b>--></td>
										<td width="90" height="30" class="admin"><a href="http://www.automne-cms.org" target="_blank"><img src="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/powered.gif" border="0" /></a></td>
									</tr>
								</table>
								<table width="562" height="42" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="562" height="42" background="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/fond.gif" valign="center"><img src="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/pix_trans.gif" width="562" height="1" border="0" /><br />
											' . $this->_getSubMenu() . '
										</td>
									</tr>
								</table>
							</td>
							<td width="138" height="72"><a href="' . CMS_websitesCatalog::getMainURL() . '" target="_blank"><img src="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/logo.png" class="png" width="138" height="72" border="0" /></a></td>
							<td width="100%" height="72" valign="top" class="admin">
								<table width="100%" height="72" border="0" cellpadding="0" cellspacing="0">
									<tr>
										<td width="100%" height="30"><img src="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/pix_trans.gif" width="1" height="1" border="0" /></td>
									</tr>
									<tr>
										<td width="100%" height="42" background="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/fond.gif"><img src="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/pix_trans.gif" width="1" height="1" border="0" /></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>';
                } else {
                    echo $this->_getSubMenu();
                }
                //display content
                echo '
					<table width="100%" cellpadding="0" cellspacing="0" border="0">
						<tr>
							<td width="15"><img src="' . PATH_ADMIN_IMAGES_WR . '/../v3/img/pix_trans.gif" border="0" width="15" height="1" /></td>
							<td class="admin">';
                if ($this->_title) {
                    echo $this->_getTitleDesign($this->_title, "admin_h1", $this->_picto);
                }
                echo '<br />' . $this->_showMessage();
                $replace = array(PATH_ADMIN_WR => '', 'modules/' => '', '/' => '_', '.php' => '');
                if (io::strpos($_SERVER["SCRIPT_NAME"], '/polymod/') !== false && isset($_REQUEST['polymod'])) {
                    $replace['polymod'] = $_REQUEST['polymod'];
                }
                $filename = sensitiveIO::sanitizeAsciiString(str_replace(array_keys($replace), $replace, $_SERVER["SCRIPT_NAME"]));
                if (file_exists(PATH_ADMIN_FS . '/inc/' . $filename . "_" . $language->getCode() . ".inc.php")) {
                    include_once PATH_ADMIN_FS . '/inc/' . $filename . "_" . $language->getCode() . ".inc.php";
                }
                echo '
								' . $this->_parseContent($this->_content) . '
								<br />
							</td>
						</tr>
					</table>
					' . $this->_beforeBody;
                if ($this->_displayMode != "loading") {
                    echo '</body>';
                } else {
                    //add loading class
                    require_once "loadingDialog.php";
                    //start loading mode
                    CMS_LoadingDialog::startLoadingMode();
                }
                break;
        }
    }
Example #2
0
 /**
  * Send a text, flush and close dialog
  *
  * @var string $text : the text to send
  * @access public
  */
 function sendAndClose($text)
 {
     CMS_LoadingDialog::sendToUser($text);
     CMS_LoadingDialog::closeDialog();
 }