Ejemplo n.º 1
0
 private function checkserver()
 {
     if (empty($this->server)) {
         $this->server = \query\main::get_option('feedserver');
     }
     $server = \site\feed::server($this->server);
     if (!$server) {
         throw new Exception($this->lang('feed_e_invalid'));
     }
     if (!file_exists(DIR . '/' . $server['config'])) {
         throw new Exception($this->lang['feed_e_configmiss']);
     }
     @(include DIR . '/' . $server['config']);
     if (!isset($server['COUPON_URL']) || !isset($server['COUPONS_URL']) || !isset($server['STORE_URL']) || !isset($server['STORES_URL']) || !isset($server['CATEGORIES_URL'])) {
         throw new Exception($this->lang['feed_e_serverr']);
     }
     return $server;
 }
Ejemplo n.º 2
0
</div>

<div class="title" style="margin-top: 15px;">

<h2>Feed Server</h2>

</div>

<div class="form-table">

<div class="row"><span>' . $LANG['settings_form_feedserver'] . ':</span>
<div>
<select name="feed_server">';
        $myserver = strtolower(\query\main::get_option('feedserver'));
        foreach (\site\feed::servers() as $k => $v) {
            echo '<option value="' . $k . '"' . ($k == $myserver ? ' selected' : '') . '>' . htmlspecialchars($v['name']) . '</option>';
        }
        echo '</select>
</div></div>

<div class="row"><span>' . $LANG['settings_form_ggid'] . ':</span><div><input type="text" name="ggcid" value="' . htmlspecialchars(\query\main::get_option('feedserver_ID')) . '" /></div></div>
<div class="row"><span>' . $LANG['settings_form_ggsecret'] . ':</span><div><input type="text" name="ggcsecret" value="' . htmlspecialchars(\query\main::get_option('feedserver_secret')) . '" /></div></div>

</div>';
        echo '<input type="hidden" name="csrf" value="' . $csrf . '" />
<button class="btn">' . $LANG['settings_save_button'] . '</button>

</form>';
        break;
        /** SEO LINKS */