Ejemplo n.º 1
0
 function wfitem($wf)
 {
     if (wra_userscontext::isloged($wf) && wra_userscontext::hasright('adminpage')) {
         $wf->cp->baseico = true;
         $wf->cp->norobots();
         $wf->cp->bodyclass = "admin_login";
     } else {
         WRA::gotopage(WRA::base_url() . 'admin/login');
         $wf->nicedie();
     }
     $this->adminnodes = WRA_ENV::adminnodes();
     for ($i = 0; $i < count($this->adminnodes); $i++) {
         if ($_REQUEST['node'] == $this->adminnodes[$i]->link) {
             $this->curnode = $this->adminnodes[$i];
             $this->curadmin = new wfadmin($this->curnode->link);
             break;
         }
     }
     $this->art = json_decode(stripslashes($_REQUEST['ids']));
     if (!is_array($this->art)) {
         $this->art = array();
         $this->art[] = $_REQUEST['ids'];
     }
     $this->header = $this->curnode->name;
     if (!$this->curadmin->multilanguages) {
         $this->currows = $this->curadmin->getrows('', $this->page * $this->onpage, $this->onpage);
     } else {
         $this->currows = $this->curadmin->getrows('_' . WRA_CONF::$language, $this->page * $this->onpage, $this->onpage);
     }
 }
Ejemplo n.º 2
0
 function run()
 {
     parent::run();
     if (wra_userscontext::isloged($this->wf) || wra_u::islogin()) {
         WRA::gotopage(WRA::base_url());
         return;
     }
     $this->wf->cp->ogtitle = 'Fresh ukrainian news on the map ';
     $this->wf->cp->ogname = 'Map of war in Ukraine';
     $this->wf->cp->header = 'Map of Unrest in Ukraine';
     $this->wf->cp->description = 'Fresh news from Ukraine on the map, event of summer 2014, war between Russia and Ukraine, beginning of Third World War. 2014 pro-Russian conflict in Ukraine ';
     $this->wf->cp->keywords = 'Ukraine, Russia, Donetsk, war, artillery, war games, provocations, intelligence, USA, Eastern Europe';
     // $this->lastupdate=  wra_foursqvenues::lastupdate();
 }
Ejemplo n.º 3
0
 function wfitem($wf)
 {
     $this->noticecount = wra_adminnotices::getcount();
     if (wra_userscontext::isloged($wf) && wra_userscontext::hasright('adminpage')) {
         $wf->cp->baseico = true;
         $wf->cp->norobots();
         $wf->cp->bodyclass = "admin_login";
     } else {
         WRA::gotopage(WRA::base_url() . 'admin/login');
         $wf->nicedie();
     }
     $this->adminnodes = WRA_ENV::adminnodes();
     for ($i = 0; $i < count($this->adminnodes); $i++) {
         $r = wra_userscontext::getaccess($this->adminnodes[$i]->link);
         if ($wf->requestedpage == $this->adminnodes[$i]->link) {
             if (!$r) {
                 $wf->set404();
                 break;
             }
             $this->curnode = $this->adminnodes[$i];
             $this->curadmin = new wfadmin($this->curnode->link);
             break;
         }
         if (!$r) {
             unset($this->adminnodes[$i]);
         }
     }
     $this->header = $this->curnode->name;
     if (isset($_POST['btnclicked'])) {
         switch ($_POST['btnclicked']) {
             case 'btnfind':
                 $this->curadmin->search = addslashes($_REQUEST['txtfind']);
                 break;
         }
     }
     if (isset($_GET['page'])) {
         $this->page = intval($_GET['page']);
     }
     if (!$this->curadmin->multilanguages) {
         $this->currows = $this->curadmin->getrows('', $this->page + 1, $this->onpage);
         $this->totalcount = $this->curadmin->getcount();
     } else {
         $this->currows = $this->curadmin->getrows('_' . WRA_CONF::$language, $this->page + 1, $this->onpage);
         $this->totalcount = $this->curadmin->getcount('_' . WRA_CONF::$language);
     }
     $this->pagescount = $this->getcount();
     // WRA::debug($this->pagescount);
     // WRA::debug($this->totalcount);
 }
Ejemplo n.º 4
0
 function wfitem(wf $wf)
 {
     $this->header = 'Выйти';
     if (wra_userscontext::isloged()) {
         @wra_userscontext::logout();
         @wra_fbu::clearfbid();
         @wra_vku::clearvkid();
         if (!empty($_SERVER['HTTP_REFERER'])) {
             WRA::gotopage($_SERVER['HTTP_REFERER']);
         } else {
             // WRA::gotopage(WRA::base_url().'me');
             WRA::gotopage(WRA::base_url());
         }
         $wf->nicedie();
     }
 }
Ejemplo n.º 5
0
 function wfitem($wf)
 {
     //include  WRA_Path. '/modules/admin/admintable.php';
     //include WRA_Path.'/modules/admin/adminpages.php';
     $this->header = 'Администрирование';
     $this->adminnodes = WRA_ENV::adminnodes();
     $this->noticecount = wra_adminnotices::getcount();
     if (wra_userscontext::isloged($wf) && wra_userscontext::hasright('adminpage')) {
         $wf->cp->baseico = true;
         $wf->cp->norobots();
         $wf->cp->bodyclass = "admin_login";
     } else {
         WRA::gotopage(WRA::base_url() . 'admin/login');
         $wf->nicedie();
     }
     // wra_adminnotices:: message('hello','hello');
 }
Ejemplo n.º 6
0
 function wfitem($wf)
 {
     if (wra_userscontext::isloged($wf) && wra_userscontext::hasright('adminpage')) {
         $wf->cp->baseico = true;
         $wf->cp->norobots();
         $wf->cp->bodyclass = "admin_login";
     } else {
         WRA::gotopage(WRA::base_url() . 'admin/login');
         $wf->nicedie();
     }
     $this->adminnodes = WRA_ENV::adminnodes();
     for ($i = 0; $i < count($this->adminnodes); $i++) {
         $r = wra_userscontext::getaccess($this->adminnodes[$i]->link);
         if ($wf->requestedpage == $this->adminnodes[$i]->link . '/edit') {
             if (!$r) {
                 $wf->set404();
                 break;
             }
             $this->curnode = $this->adminnodes[$i];
             $this->curadmin = new wfadmin($this->curnode->link);
             // $this->load();
             break;
         }
         if (!$r) {
             unset($this->adminnodes[$i]);
         }
     }
     if (!empty($_REQUEST["id"])) {
         $this->curadmin->curid = intval($_REQUEST["id"]);
     } else {
         $this->curadmin->curid = -1;
     }
     $this->load($wf);
     if ($_REQUEST["act"] == "delete") {
         if ($this->curadmin->multilanguages) {
             foreach ($wf->languages as $v) {
                 $this->curadmin->deletefirst('_' . $v->alias);
             }
         } else {
             $this->curadmin->deletefirst('');
         }
         WRA::gotopage(WRA::base_url() . $this->curnode->link);
     }
     $this->header = $this->curnode->name;
 }
Ejemplo n.º 7
0
 function run()
 {
     $this->nofooter = true;
     $this->noheader = false;
     if (isset($_POST['admin_login'])) {
         $this->enter_try = -1;
         $isremember = false;
         if (isset($_POST['rememberme'])) {
             $isremember = true;
         }
         $login = addslashes($_POST['admin_login']);
         $pass = $_POST['admin_pass'];
         $this->enter_try = wra_userscontext::login($this->wf, $login, $pass, $isremember);
     }
     if (isset($_REQUEST['act'])) {
         // die($_REQUEST['act']);
         wra_userscontext::logout();
         if (@$_REQUEST['backurl'] == 'index.php') {
             WRA::gotopage('');
             $this->wf->nicedie();
         }
     }
     if (wra_userscontext::isloged($this->wf)) {
         switch (@$_POST['returnurl']) {
             case 'admin':
             default:
                 if (wra_userscontext::hasright('adminpage')) {
                     WRA::gotopage(WRA::base_url() . 'admin');
                     $this->wf->nicedie();
                 } else {
                     $this->enter_try = 3;
                 }
                 break;
         }
     } else {
         switch (@$_REQUEST['returnurl']) {
             case 'user':
                 WRA::gotopage(WRA::base_url());
                 $this->wf->nicedie();
                 break;
         }
     }
 }
Ejemplo n.º 8
0
<?php

defined("WERUA") or die('<div style="margin:0 0 auto;width:200px">Ошибка запуска. Contact </div>');
?>
<!--footer-->
<div class="footer">
<table width="100%">
  <tr>
    <td><div class="logo"><img src="<?php 
WRA::e(WRA::base_url());
?>
modules/admin/images/logo_workflower.png" width="201" height="44"></div></td>
    <td><div class="link_footer" align="center"><?php 
if (!wra_userscontext::isloged($this->wf)) {
    ?>
<a href="/admin/login">Вход</a><?php 
}
?>
</div></td>
    <td><div class="copy" style="text-align:right">&copy; <?php 
WRA::e(WRA::getcuryear($this->wf));
?>
 WorkFlower</div></td>
  </tr>
</table>
</div>



Ejemplo n.º 9
0
 function wf()
 {
     $this->models = WRA_ENV::models();
     for ($i = 0; $i < count($this->models); $i++) {
         require_once WRA_Path . '/' . $this->models[$i]->path;
     }
     $this->routes = wfroute::routetable();
     if (session_id() == '') {
         session_start();
     }
     if (WRA_CONF::$offline == 1) {
         WRA::e(WRA_CONF::$offline_text);
         WRA::nicedie();
     }
     $this->opendb();
     //$this->languages=wra_lang::getlist();
     // $this->loadoptions();
     // $this->options = wra_options::loadoptions();
     $this->cp = new wra_page();
     $this->isloged = wra_userscontext::isloged($this);
     if ($this->isloged) {
         $this->user = new wra_users();
         $userid = wra_userscontext::curuser();
         $this->user->load($userid);
         // WRA::debug($this->user);
     }
     $this->requestedpage = strtolower(WRA::getfullnoquestion());
     $this->requestedpage = ltrim(rtrim(str_replace(WRA_CONF::$rootpath, '', $this->requestedpage), '/'), '/');
     if ($this->requestedpage == '') {
         $this->requestedpage = 'index';
     }
     //$meta = new wra_meta();
     //$meta->getbypage($this->requestedpage);
     // WRA::debug($this->requestedpage);
     /*   
          if (!empty($meta->id)) {
              $this->cp->keywords = $meta->meta_keywords;
              $this->cp->description = $meta->meta_description;
              $this->cp->ogimage = $meta->og_image;
          } else {
              $this->cp->keywords = WRA_CONF::$keywords;
              $this->cp->description = WRA_CONF::$description;
              $this->cp->ogimage = WRA::base_url()."images/post.png";                            
          }
     */
     $cachename = 'link_' . $this->realpage . $this->cp->language;
     if (!wra_cacheflow::cacheexist($cachename)) {
         $this->realpage = $this->requestedpage;
         $this->ext0 = WRA::file_extension($this->requestedpage);
         $fileextimage = array('jpg', 'jpeg', 'png', 'gif');
         if (in_array($this->ext0, $fileextimage)) {
             WRA::htmlpic('/images/pixel.png');
             $this->nicedie();
         }
     } else {
         $this->requestedpage = 'proj';
     }
     if ($this->is404()) {
         $this->set404();
     } else {
         header('Status: 200 OK');
         if ($this->requestedpage == '/contacts' || strpos($this->requestedpage, 'admin') >= 0) {
             $this->caching = false;
         }
         $cachename = 'link_' . $this->realpage . $this->cp->language;
         $cache0 = new wra_cacheflow($cachename, $this->caching);
         if ($cache0->begin()) {
             $this->prepare();
             if (!$this->item->dont) {
                 if (!$this->item->noheader) {
                     if (!empty($meta->id)) {
                         $this->cp->pagehead = $meta->title;
                     }
                     include 'template/parts/_header.php';
                 }
                 $this->show();
                 if (!$this->item->nofooter) {
                     include 'template/parts/_footer.php';
                 }
             }
         }
         $cache0->end();
     }
     $this->closedb();
 }