<h3><?php echo app::lang('step6_title'); ?> </h3> <p style="text-align:center"> <?php echo app::lang('step6_txt1'); ?> <br><br> <a href="/index.php"><?php echo app::lang('step6_txt2'); ?> </a> </p>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="icon" href="/favicon.ico" type="image/x-icon" /> <title><?php echo app::lang('title'); ?> </title> <link rel="stylesheet" href="/install/style.css" type="text/css"> <script src="/libc/jquery/jquery.js" type="text/javascript"></script> </head> <body> <div id="page"> <div id="header"> <img src="/image.php?m=core&p=original&f=des/logo.jpg"> <div id="page_title"><?php echo app::lang('title'); ?> </div> </div> <div id="content"> <?php echo app::getVar('content'); ?> </div> </div> </body> </html>
<?php foreach ($f as $key => $arr) { echo '<div ' . ($arr['error'] ? 'class="no"' : '') . ' <td>' . $arr[$arr['error'] ? 'error' : 'label'] . (($arr['download'] and $arr['error']) ? '. <a href="' . $arr['download'] . '">' . app::lang('download') . '</a>' : '') . ' </td> </div>'; } ?> </div> <p style="margin-bottom:20px;<?php echo $hasErrors ? 'color:red;' : ''; ?> "> <?php echo app::lang('step2_txt' . ($hasErrors ? '2' : '1')); ?> </p> <form action="/install/<?php echo $hasErrors ? '2' : '3'; ?> " class="data-form" method="post"> <div class="submit"> <input type="submit" value="<?php echo app::lang($hasErrors ? 'refresh' : 'next'); ?> " class="button"> </div> </form>
4. <?php echo app::lang('step4_title'); ?> </h4> <form action="/install/4" class="data-form" method="post"> <div class="required_global"><?php echo app::lang('required_global'); ?> </div> <?php foreach ($f as $key => $arr) { echo '<div class="row' . ($arr['error'] ? ' error' : '') . '"> <label> <input type="text" name="' . $key . '" value="' . $arr['value'] . '" style="width:300px;"> <span class="title">' . $arr['label'] . ($arr['required'] ? '<span class="required">*</span>' : '') . ':</span> </label> <span class="msg">' . $arr['error'] . '</span> </div>'; } ?> <div class="submit" style="margin-top:20px;"> <input type="submit" value="<?php echo app::lang('next'); ?> " class="button"> </div> </form>
?> <form action="/install/5" class="data-form" method="post"> <input type="hidden" name="install" value="<?php echo empty($error) ? 'start' : 'restart'; ?> "> <div id="pre_install"> <p><?php echo empty($error) ? app::lang('step5_txt1') : ''; ?> </p> <input type="submit" value="<?php echo app::lang((!empty($error) ? 're' : '') . 'start'); ?> " class="button" onclick=" $('#error_install').hide(0); $('#pre_install').hide(0); $('#post_install').show(0); return true;"> </div> </form> <div id="post_install"> <?php echo app::lang('installation'); ?> <img src="/install/img/i.gif"> </div>
<h3><?php echo app::lang('start_greeting'); ?> </h3> <p><?php echo app::lang('start_txt1'); ?> </p> <ul id="select_language"> <li> <form action="/install/" class="data-form" method="post"> <input type="hidden" name="lang" value="ru"> <button type="submit"><img src="/image.php?m=core&p=language_medium&f=lang/2_lng7f263f544635e3cd184fb6fac223781c.gif" alt=""> Русский</button> </form> </li> <li> <form action="/install/" class="data-form" method="post"> <input type="hidden" name="lang" value="ukr"> <button type="submit"><img src="/image.php?m=core&p=language_medium&f=lang/29_lng6f47df546e1ecd5245fde4d9e28193e0.gif" alt=""> Український</button> </form> </li> <li> <form action="/install/" class="data-form" method="post"> <input type="hidden" name="lang" value="en"> <button type="submit"><img src="/image.php?m=core&p=language_medium&f=lang/29_lng6f47df546e1ecd5245fde4d9e28193e2.gif" alt=""> English</button> </form> </li> <li> <form action="/install/" class="data-form" method="post">
<input type="text" name="' . $key . '" value="' . $arr['value'] . '" style="width:300px;"> <span class="title">' . $arr['label'] . ($arr['required'] ? '<span class="required">*</span>' : '') . ':</span> </label> <span class="msg">' . $arr['error'] . '</span> </div>'; } ?> <div class="submit" style="margin-top:20px;"> <span style="display:none;" id="next_value"><?php echo app::lang('next'); ?> </span> <img src="/install/img/ajax.gif" alt="<?php echo app::lang('server_response'); ?> " style="margin-right:5px;display:none;" align="bottom" id="ajax_indication"> <span style="margin-right:5px;color:red;display:none;" id="error_msg"></span> <span style="margin-right:5px;color:green;display:none;" id="success_msg"><?php echo app::lang('test_successful'); ?> </span> <input type="submit" value="<?php echo app::lang('test_connection'); ?> " class="button test_connect"> </div> </form> <script src="/install/testConnect.js" type="text/javascript"></script>
/** * Detetermine Locale from current HTTP request */ protected function determineLocale() { if (isset($_COOKIE['locale']) && isset(self::$locales[$_COOKIE['locale']])) { $this->locale = $_COOKIE['locale']; } else { $this->locale = app::$config['localization']['default_language']; } setlocale(LC_ALL, $this->locale); date_default_timezone_set(app::$config['localization']['timezone']); $pathCache = 'var/cache/' . $this->locale . '-lang'; $lang = ''; if (is_file($pathCache . '.php')) { include $pathCache . '.php'; } else { foreach (app::$activeModules as $moduleName => $type) { if (is_file('modules/' . $moduleName . '/locale/' . $this->locale . '.php')) { include 'modules/' . $moduleName . '/locale/' . $this->locale . '.php'; } } $config = new \config($pathCache . '.php', TRUE); $config->setVariable('lang'); $config->saveConfig($lang); \tools::file_put_contents($pathCache . '.js', substr($config->getContent(), 5, false)); } app::$lang = $lang; }