public function attributeLabels() { if (isFree()) { $lang = tFile::getT('module_install', 'Site language'); } else { $lang = tFile::getT('module_install', 'Preferred site language'); } return array('agreeLicense' => tFile::getT('module_install', 'I agree with') . ' ' . CHtml::link(tFile::getT('module_install', 'License agreement'), '#', array('onclick' => '$("#licensewidget").dialog("open"); return false;')) . ($this->language == 'de' ? ' zu' : ''), 'dbHost' => tFile::getT('module_install', 'Database server'), 'dbPort' => tFile::getT('module_install', 'Database port'), 'dbUser' => tFile::getT('module_install', 'Database user name'), 'dbPass' => tFile::getT('module_install', 'Database user password'), 'dbName' => tFile::getT('module_install', 'Database name'), 'dbPrefix' => tFile::getT('module_install', 'Prefix for tables'), 'adminName' => tFile::getT('module_install', 'Administrator name'), 'adminPass' => tFile::getT('module_install', 'Administrator password'), 'adminEmail' => tFile::getT('module_install', 'Administrator email'), 'language' => $lang, 'siteName' => tFile::getT('module_install', 'siteName'), 'siteKeywords' => tFile::getT('module_install', 'siteKeywords'), 'siteDescription' => tFile::getT('module_install', 'siteDescription')); }
<?php $this->beginWidget('zii.widgets.jui.CJuiDialog', array('id' => 'licensewidget', 'cssFile' => 'jquery-ui-1.8.16.custom.css', 'theme' => 'redmond', 'themeUrl' => Yii::app()->theme->baseUrl . '/css/ui', 'options' => array('title' => tFile::getT('module_install', 'License_agreement_s'), 'autoOpen' => $this->autoOpen ? true : false, 'modal' => 'true', 'show' => 'puff', 'hide' => 'slide', 'width' => '920px', 'height' => 'auto', 'resizable' => false, 'buttons' => array(tFile::getT('module_install', 'Accept') => 'js:function() { $("#InstallForm_agreeLicense").attr("checked", "checked"); $(this).dialog("close"); }')))); ?> <h2><?php echo tFile::getT('module_install', 'License_agreement_s'); ?> </h2> <?php if (isFree()) { echo tFile::getT('module_install', 'freeLicenseText'); } else { echo tFile::getT('module_install', 'licenseText'); } $this->endWidget('zii.widgets.jui.CJuiDialog');
echo tFile::getT('module_install', 'Open Real Estate'); ?> " src="<?php echo Yii::app()->theme->baseUrl; ?> /images/pages/logo-open-ore.png" id="logo" /> </a> </div> <?php if (!isFree() && Yii::app()->controller->action->id != 'index') { $this->widget('application.modules.lang.components.langSelectorWidget', array('type' => 'links', 'languages' => array('en' => array('name_iso' => 'en', 'name' => 'English', 'flag_img' => 'us.png'), 'ru' => array('name_iso' => 'ru', 'name' => 'Русский', 'flag_img' => 'ru.png'), 'de' => array('name_iso' => 'de', 'name' => 'Deutsch', 'flag_img' => 'de.png')))); } ?> <div class="content"> <?php echo $content; ?> <div class="clear"></div> </div> <div class="footer"> <p class="slogan">© <?php echo tFile::getT('module_install', 'Open Real Estate') . ', ' . date('Y'); ?> </p> </div> </div> </body> </html>
</h2> <div class="row"> <?php echo $form->labelEx($model, 'language'); ?> <?php echo $form->dropDownList($model, 'language', $model->getLangs()); ?> <?php echo $form->error($model, 'language'); ?> </div> <?php } ?> </div> <div class="clearfix"></div> </div> <div class="row buttons"> <?php echo CHtml::submitButton(tFile::getT('module_install', 'Install'), array('style' => 'width: 100px; padding: 5px; font-size: 1.1em; font-weight: bold;')); ?> </div> <?php $this->endWidget(); ?> </div>
function checkRightFile() { $ds = DIRECTORY_SEPARATOR; if (!isFree()) { $aCheckDir = array(ROOT_PATH . $ds . 'assets', ROOT_PATH . $ds . 'protected' . $ds . 'config' . $ds . 'db.php', ROOT_PATH . $ds . 'protected' . $ds . 'runtime', ROOT_PATH . $ds . 'uploads', ROOT_PATH . $ds . 'uploads' . $ds . 'ava', ROOT_PATH . $ds . 'uploads' . $ds . 'editor', ROOT_PATH . $ds . 'uploads' . $ds . 'iconsmap', ROOT_PATH . $ds . 'uploads' . $ds . 'iecsv', ROOT_PATH . $ds . 'uploads' . $ds . 'messages', ROOT_PATH . $ds . 'uploads' . $ds . 'news', ROOT_PATH . $ds . 'uploads' . $ds . 'blog', ROOT_PATH . $ds . 'uploads' . $ds . 'objects', ROOT_PATH . $ds . 'uploads' . $ds . 'qrcodes', ROOT_PATH . $ds . 'uploads' . $ds . 'rkl', ROOT_PATH . $ds . 'uploads' . $ds . 'slider', ROOT_PATH . $ds . 'uploads' . $ds . 'slider' . $ds . 'thumb', ROOT_PATH . $ds . 'uploads' . $ds . 'video'); } else { $aCheckDir = array(ROOT_PATH . $ds . 'assets', ROOT_PATH . $ds . 'protected' . $ds . 'config' . $ds . 'db.php', ROOT_PATH . $ds . 'protected' . $ds . 'runtime', ROOT_PATH . $ds . 'uploads', ROOT_PATH . $ds . 'uploads' . $ds . 'ava', ROOT_PATH . $ds . 'uploads' . $ds . 'editor', ROOT_PATH . $ds . 'uploads' . $ds . 'iconsmap', ROOT_PATH . $ds . 'uploads' . $ds . 'news', ROOT_PATH . $ds . 'uploads' . $ds . 'blog', ROOT_PATH . $ds . 'uploads' . $ds . 'objects', ROOT_PATH . $ds . 'uploads' . $ds . 'qrcodes', ROOT_PATH . $ds . 'uploads' . $ds . 'video'); } $aCheckDirErr = array('err' => 0); foreach ($aCheckDir as $sDirPath) { if (is_writable($sDirPath)) { $aCheckDirErr['dirs'][$sDirPath] = 'ok'; } else { $aCheckDirErr['err']++; if (is_file($sDirPath)) { $aCheckDirErr['dirs'][$sDirPath] = tFile::getT('module_install', 'It is necessary to establish the rights') . ' 666'; } else { $aCheckDirErr['dirs'][$sDirPath] = tFile::getT('module_install', 'It is necessary to establish the rights') . ' 777'; } } } if ($aCheckDirErr['err'] > 0) { $this->render('right_file', array('aCheckDirErr' => $aCheckDirErr)); Yii::app()->end(); } else { return $aCheckDirErr; } }
<h2><?php echo tFile::getT('module_install', 'Necessary parameters for the CMS Open Real Estate installation'); ?> </h2> <table class="result"> <tr> <th><?php echo tFile::getT('module_install', 'Directory/file'); ?> </th> <th><?php echo tFile::getT('module_install', 'Comment'); ?> </th> </tr> <?php foreach ($aCheckDirErr['dirs'] as $sDirPath => $sRes) { ?> <tr> <td width="60%"><?php echo $sDirPath; ?> </td> <td class="<?php echo $sRes == 'ok' ? 'passed' : 'failed'; ?> "> <?php echo $sRes == 'ok' ? 'OK' : $sRes; ?> </td>
</th> <th><?php echo tFile::getT('module_install', 'Comment'); ?> </th> </tr> <?php foreach ($req['requirements'] as $requirement) { ?> <tr> <td width="200"><?php echo $requirement[0]; ?> </td> <td class="<?php echo $requirement[2] ? 'passed' : ($requirement[1] ? 'failed' : 'warning'); ?> "> <?php echo $requirement[2] ? tFile::getT('module_install', 'OK') : ($requirement[1] ? tFile::getT('module_install', 'Error') : tFile::getT('module_install', 'Warning')); ?> </td> <td><?php echo $requirement[4]; ?> </td> </tr> <?php } ?> </table>
<div> <?php echo tFile::getT('module_install', 'CMS Open Real Estate is successfully installed!'); ?> </div>