예제 #1
0
파일: links.php 프로젝트: gudwin/extasy
 /**
  * Возвращает код ссылки для удаления в станд. стиле
  * @param string $link
  */
 public function deleteLink($link = '#')
 {
     $strings = CMS_Strings::getInstance();
     $szDelete = $strings->getMessage('CMS_DELETE');
     $szResult = '<nobr><img alt="' . $szDelete . '" src="' . CMS::getResourcesUrl() . 'extasy/pic/icons/delete.gif" /><a href="' . $link . '" onclick="return confirm(\'' . $strings->getMessage('CMS_CONFIRM_DELETE') . '\')">' . $szDelete . '</a></nobr>' . "\r\n";
     return $szResult;
 }
예제 #2
0
파일: config.php 프로젝트: gudwin/extasy
 public function main()
 {
     $design = CMSDesign::getInstance();
     $strings = CMS_Strings::getInstance();
     $aData = $this->config->load($this->path);
     $aGenerated = $this->config->generate($aData);
     $aBegin = $this->aBegin;
     $szTitle = $this->szTitle;
     $design->begin($aBegin, $szTitle);
     $design->documentBegin();
     $design->header($szTitle);
     if (!empty($this->aButton)) {
         $design->buttons($this->aButton);
     }
     $this->outputComment();
     $design->formBegin();
     $design->submit('submit', $strings->getMessage('APPLY'));
     $design->tableBegin();
     foreach ($aGenerated as $key => $row) {
         $design->row2cell($aData[$key]['comment'], $row);
     }
     $design->tableEnd();
     $design->submit('submit', $strings->getMessage('APPLY'));
     $design->formEnd();
     $design->documentEnd();
     $design->End();
     $this->output();
 }
예제 #3
0
파일: Table.php 프로젝트: gudwin/extasy
 public function getAdminFormValue()
 {
     //
     //
     //
     $strings = \CMS_Strings::getInstance();
     $aParse = array('lang' => $strings->language, 'aTableHeader' => $this->fieldInfo['columns'], 'aData' => $this->aValue, 'szName' => $this->szFieldName, 'szComment' => '');
     return UParser::parsePHPFile(__DIR__ . DIRECTORY_SEPARATOR . 'table/admin-form.tpl', $aParse);
 }
예제 #4
0
파일: Route.php 프로젝트: gudwin/extasy
 public function prepareRequest()
 {
     parent::prepareRequest();
     if (!defined('CMS')) {
         define('CMS', 1);
     }
     // Activate CMS auth
     \CMS_Strings::getInstance()->setActiveLang('RUSSIAN');
     \EventController::callEvent('dashboardInit');
 }
예제 #5
0
 public function main()
 {
     $auth = CMSAuth::getInstance();
     $design = CMSDesign::getInstance();
     $strings = CMS_Strings::getInstance();
     $aData = $this->config->load($this->path);
     $aGenerated = $this->config->generate($aData);
     $aBegin = $this->aBegin;
     $szTitle = $this->szTitle;
     //
     $aTabSheet = $this->generateTabSheetContent($aData, $aGenerated);
     $aTabSheet[] = array('id' => 'tab_sitemap', 'title' => 'Свойства');
     $design->begin($aBegin, $szTitle);
     $design->documentBegin();
     $design->header($szTitle);
     if (!empty($this->aButton)) {
         $design->buttons($this->aButton);
     }
     $this->outputComment();
     $design->formBegin();
     $design->submit('submit', $strings->getMessage('APPLY'));
     $design->tabSheetBegin($aTabSheet);
     foreach ($aTabSheet as $key => $row) {
         // Если это не последняя вкладка, выводим из нее контент
         if ($key != sizeof($aTabSheet) - 1) {
             $design->tabContentBegin($aTabSheet[$key]['id']);
             $design->tableBegin();
             foreach ($row['item'] as $item) {
                 $design->row2cell($item['title'], $item['value']);
             }
             $design->tableEnd();
             $design->tabContentEnd();
         } else {
             SitemapCMSForms::outputSitemapTabSheet($this->aSitemap, $aTabSheet[$key]['id'], array('Путь к конфигу' => $this->path));
         }
     }
     $design->tabSheetEnd();
     $design->submit('submit', $strings->getMessage('APPLY'));
     $design->formEnd();
     $design->documentEnd();
     $design->End();
     $this->output();
 }
예제 #6
0
 public static function getInstance()
 {
     if (!is_object(self::$instance)) {
         self::$instance = new CMS_Strings();
     }
     return self::$instance;
 }
예제 #7
0
파일: layout.php 프로젝트: gudwin/extasy
    /**
     * @desc Выводит путь к текущему документу и верхушку страницы
     * @return
     */
    function Begin($aPath = array(), $szSiteName = '', $onLoad = '', $addToHead = '', $szHead = '')
    {
        $strings = CMS_Strings::getInstance();
        if (empty($szSiteName)) {
            $szSiteName = SITE_NAME;
        }
        $szPath = '';
        if (sizeof($aPath) > 0) {
            foreach ($aPath as $key => $value) {
                $aResult[] = '<a href="' . $value . '">' . $key . '</a>';
            }
            end($aResult);
            // Последнюю позицию заменяем на просто строку, вместо ссылки
            $aResult[sizeof($aResult) - 1] = '<b><i>' . $key . '</i></b> <img alt="" src="' . CMS::getResourcesUrl() . 'extasy/pic/icons/crumbs_cur.gif" />';
            $szPath = implode('<img alt="" src="' . CMS::getResourcesUrl() . 'extasy/pic/icons/crumbs_normal.gif" />', $aResult);
            // Добавляем иконку индексной страницы
            $szPath = '<a href="' . \Extasy\CMS::getDashboardWWWRoot() . '" id="admin_home_link"><img alt="" src="' . CMS::getResourcesUrl() . 'extasy/pic/layout/home.png"/></a> <img alt="" src="' . CMS::getResourcesUrl() . 'extasy/pic/icons/crumbs_normal.gif"/> ' . $szPath;
        }
        ?>
	<!DOCTYPE html>
	<html>
	<head>
		<meta charset="utf-8"/>
		<title><?php 
        echo SITE_NAME;
        ?>
 - <?php 
        echo $szSiteName;
        ?>
</title>
		<?php 
        $this->initialScriptsAndCSS();
        ?>
		<?php 
        echo $addToHead;
        ?>
		<script type="text/javascript">
			jQuery(function ($) {
				$('#cms_script_select').change(function () {
					if ($(this).val().length > 0) {
						window.location = $(this).val();
					}
				});
			});
		</script>
	</head>
	<body style="background: #4a97ce url('<?php 
        echo CMS::getResourcesUrl();
        ?>
extasy/pic/layout/bg.gif') 0% 0% repeat-x;" id="extasy_body" onload="<?php 
        echo $onLoad;
        ?>
">
	<table style="width:100%">
	<tr>
		<td class="LayoutTop">
			<table style="width:100%">
				<tr>
					<td class="SiteLogo"><p><!--  --></p>
					</td>
					<td style="width:20%"><!-- --></td>
					<?php 
        echo $szHead;
        ?>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
	<td>
	<div class="Crumbs"><?php 
        echo $szPath;
        ?>
</div>
	<br/>
	<table class="LayoutCenter" style="width:100%">
	<tr>
<?php 
    }
예제 #8
0
 public function getControl()
 {
     $strings = CMS_Strings::getInstance();
     $aParse = array('lang' => $strings->language, 'aTableHeader' => $this->aTableHeader, 'aData' => unserialize($this->szContent), 'szName' => $this->szName, 'szComment' => $this->szComment);
     return UParser::parsePHPFile(CONFIG_PATH . 'plugins/array_list/form.tpl', $aParse);
 }
예제 #9
0
파일: table.php 프로젝트: gudwin/extasy
 protected function buttonCell($type, $link, $return = false)
 {
     $strings = CMS_Strings::getInstance();
     $deleteConfirm = '';
     switch ($type) {
         case 'delete':
             $deleteConfirm = sprintf("onclick='return confirm(%s)' ", json_encode($strings->getMessage('CMS_CONFIRM_DELETE')));
             $image = 'delete.gif';
             $message = $strings->getMessage('CMS_DELETE');
             break;
         case 'edit':
             $image = 'edit.gif';
             $message = $strings->getMessage('CMS_EDIT');
             break;
         case 'view':
             $image = 'edit.gif';
             $message = $strings->getMessage('CMS_VIEW');
             break;
     }
     $resultTpl = '<td><nobr><img alt="%s" src="%sextasy/pic/icons/%s" /><a href="%s" %s>%s</a></nobr></td>' . "\r\n";
     $result = sprintf($resultTpl, $message, CMS::getResourcesUrl(), $image, $link, $deleteConfirm, $message);
     if ($return) {
         return $result;
     } else {
         print $result;
     }
 }