예제 #1
0
파일: load.php 프로젝트: hzhou9/coupon_deal
 private function admin_panel_language()
 {
     $language = \query\main::get_option('adminpanel_lang');
     $languages = \site\language::languages();
     if (file_exists($languages[$language]['location'])) {
         return array('name' => $languages[$language]['name'], 'location' => $languages[$language]['location']);
     }
     return array('name' => $languages[$language]['name'], 'location' => $languages[$language]['location']);
 }
예제 #2
0
function languages()
{
    return \site\language::languages();
}
예제 #3
0
<div class="row"><span>' . $LANG['settings_form_autovalprod'] . ':</span>
<div>
<select name="auvalid_prods">';
        $coupon_validate = (bool) \query\main::get_option('product_validate');
        foreach (array(0 => $LANG['no'], 1 => $LANG['yes']) as $k => $v) {
            echo '<option value="' . $k . '"' . ($k == $coupon_validate ? ' selected' : '') . '>' . $v . '</option>';
        }
        echo '</select>
</div></div>

<div class="row"><span>' . $LANG['settings_form_sitelang'] . ':</span>
<div>
<select name="site_lang">';
        $sitelang = \query\main::get_option('sitelang');
        foreach ($languages = \site\language::languages() as $k => $v) {
            echo '<option value="' . $k . '"' . ($k == $sitelang ? ' selected' : '') . '>' . htmlspecialchars($v['name']) . '</option>';
        }
        echo '</select>
</div></div>

<div class="row"><span>' . $LANG['settings_form_adminlang'] . ':</span>
<div>
<select name="adminpanel_lang">';
        $adminlang = \query\main::get_option('adminpanel_lang');
        foreach ($languages as $k => $v) {
            echo '<option value="' . $k . '"' . ($k == $adminlang ? ' selected' : '') . '>' . htmlspecialchars($v['name']) . '</option>';
        }
        echo '</select>
</div></div>