Пример #1
0
 function run()
 {
     $this->nofooter = true;
     $this->noheader = true;
     if (isset($_REQUEST['clearcache'])) {
         wra_cacheflow::clearcache();
     }
     if (isset($_POST['btnclicked'])) {
         switch ($_POST['btnclicked']) {
             case 'btnsave':
                 wra_options::$options['phone'] = wra_admintable::getpost('phone');
                 wra_options::$options['email'] = wra_admintable::getpost('email');
                 wra_options::$options['fb'] = wra_admintable::getpost('fb');
                 wra_options::$options['vk'] = wra_admintable::getpost('vk');
                 wra_options::$options['insta'] = wra_admintable::getpost('insta');
                 wra_options::$options['lj'] = wra_admintable::getpost('lj');
                 wra_options::$options['blogger'] = wra_admintable::getpost('blogger');
                 wra_options::$options['flickr'] = wra_admintable::getpost('flickr');
                 wra_options::saveoptions();
                 $this->wf->options = wra_options::loadoptions();
                 break;
         }
     }
     /*
             if (WRA::ir('mod')) {
                 $this->cap->adminedit = @WRA::r('mod');
                 $this->currentlink='?mod='. $this->cap->adminedit;
                 if(strpos($this->cap->adminedit,'edit')){            
                     $this->cap->isedit=true;  
                     $this->cap->mod = str_replace("edit","", $this->cap->adminedit);
     
                 }else{
                     
                
                     $this->cap->mod =  $this->cap->adminedit;
                 }
                 
                 switch ($this->cap->mod) {
                     default :
                         if (wra_adminmenu::isexist($this->cap->mod)) {
                             $this->editlink_withoutid = '?mod='.$this->cap->mod;
                              $this->cap->getcurmenu();
                             if (WRA::ir('id'))
                                 $this->currentlink .= '&id=' . WRA::r('id');
     
                             if (WRA::ir('pid')) {
                                 $this->currentlink .= '&pid=' . WRA::r('pid');
                                 $this->editlink_withoutid .= '&pid=' . WRA::r('pid');
                             }
                             if (WRA::ir('type')) {
                                 $this->currentlink .= '&type=' . WRA::r('type');
                                 $this->editlink_withoutid .= '&type=' . WRA::r('type');
                             }
                            if ($this->cap->usenames) {
     
                                 $this->cap->getnames();
                             }
                             if(!$this->cap->isedit)
                             include WRA_Path. '/modules/admin/forms/list.php';
                             else
                             include WRA_Path. '/modules/admin/forms/edit.php';
                             
                             $this->cap->doedit($this->wf);
                         } else {
                             include WRA_Path. '/modules/admin/parts/default.php';
                         }
                         break;
                 }
             } else {
                 $this->useleftmenu = - 1;
                 //echo 'hi'; print_r($_SESSION);
                // die(session_id());
              
                 include WRA_Path. '/modules/admin/parts/main.php';
             }*/
 }
Пример #2
0
 static function updatevalue($key, $value)
 {
     if (wra_options::isexist($key)) {
         $wd = new wra_db();
         $wd->query = "UPDATE `" . WRA_CONF::$db_prefix . "options`\n                            SET `value`='{$value}' \n                            WHERE `key`='{$key}'";
         $wd->execute();
         $wd->close();
         unset($wd);
     } else {
         $newoption = new wra_options();
         $newoption->key = $key;
         $newoption->value = $value;
         $newoption->add();
     }
 }
Пример #3
0
function flushpage($currentlink, $cap)
{
    ?>
<div><h1>Администрирование сайта. Общие настройки</h1></br></div>
<div class="content_edit">
    <div class="input_edit">
        <table id="" width="100%" class="adminedittbl table_edit" cellpadding="0" cellspacing="0">
            <tbody>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td colspan="2"><b>Общие настройки</b></td>
                </tr>
                <tr >
                    <td style="width:120px"><?php 
    $googleanal = wra_options::getvalue('googleanal');
    ?>
                        <label>Код Google-Analytics</label></td>
                    <td><textarea name="googleanalytics" style="height:300px"><?php 
    WRA::e($googleanal);
    ?>
</textarea></td>
                </tr>
                <tr >
                    <td style="width:120px"><?php 
    $googleanal = wra_options::getvalue('yandexmetrics');
    ?>
                        <label>Код Яндекс-Метрики</label></td>
                    <td><textarea name="yandexmetrics" style="height:300px"><?php 
    WRA::e($googleanal);
    ?>
</textarea></td>
                </tr>
                <tr >  <td style="width:120px"><?php 
    $googleanal = wra_options::getvalue('banner330');
    ?>
                        <label>Баннер справа(330x128)</label></td>
                    <td><textarea name="banner330" style="height:200px"><?php 
    WRA::e($googleanal);
    ?>
</textarea></td>
                </tr>
              
                <tr >  <td style="width:120px"><?php 
    $googleanal = wra_options::getvalue('facebook');
    ?>
                        <label>Like Box Facebook</label></td>
                    <td><textarea name="facebook" style="height:200px"><?php 
    WRA::e($googleanal);
    ?>
</textarea></td>
                </tr>
                <tr >  <td style="width:120px"><?php 
    $googleanal = wra_options::getvalue('vkontakte');
    ?>
                        <label>Like Box Vkontakte</label></td>
                    <td><textarea name="vkontakte" style="height:200px"><?php 
    WRA::e($googleanal);
    ?>
</textarea></td>
                </tr>
              
                <tr >  <td style="width:120px">
                        <label>Кеширование</label></td>
                    <td><input type="button" value="Очистить Кеш" id="clearbutton"/></td></tr>
                <tr><td><br><a href="#" class="link_save" id="link-save">Сохранить</a></td><td></td></tr>
            </tbody></table></div>
</div>


    <?php 
}