Example #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);
     }
 }
Example #2
0
 function run()
 {
     parent::run();
     $this->nofooter = true;
     $this->noheader = true;
     $this->wf->cp->ogimage = WRA::base_url() . 'images/500.png';
     $adminmark = '';
     if (wra_userscontext::hasright('adminpage')) {
         $adminmark = time();
     }
     $cache0 = new wra_cacheflow('p' . $this->wf->requestedpage . $adminmark, true);
     if ($cache0->begin()) {
         if (!empty($this->wf->currouteindex[0]['index'])) {
             if (count($this->wf->currouteindex) > 1) {
                 $this->linky = addslashes($this->wf->currouteindex[0]['index'] . '/' . $this->wf->currouteindex[1]['index']);
                 $id = wra_foursqvenues::getidbylink($this->linky);
                 if ($id) {
                     $this->cpid = $id;
                 }
             } else {
                 $this->cpid = intval($this->wf->currouteindex[0]['index']);
                 if ($this->cpid > wra_foursqvenues::$linknumber) {
                     $this->cpid = 0;
                 }
             }
         }
         $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';
         if ($this->cpid != 0) {
             $this->venue = new wra_foursqvenues();
             $this->venue->load($this->cpid);
             $this->wf->cp->header = $this->venue->name;
             $this->wf->cp->ogtitle = $this->venue->name;
             $this->wf->cp->pagehead = $this->venue->name;
         }
         if (!empty($_REQUEST['ll'])) {
             ini_set('display_errors', 'Off');
             $this->ll = explode(';', $_REQUEST['ll']);
             $this->ll[0] = floatval($this->ll[0]);
             $this->ll[1] = floatval($this->ll[1]);
         }
         if (!empty($_REQUEST['zoom'])) {
             $this->zoom = intval($_REQUEST['zoom']);
         }
         $this->cats = wra_cats::get_list();
         $this->venues = wra_foursqvenues::get_l30(time());
         $this->wf->includeheader();
         include WRA_Path . '/template/index.php';
         $this->wf->includefooter();
         // $this->lastupdate=  wra_foursqvenues::lastupdate();
     }
     $cache0->end();
     // $this->wf->nicedie();
 }
Example #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);
 }
Example #4
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');
 }
Example #5
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;
 }
Example #6
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;
         }
     }
 }
Example #7
0
<?php

defined('WERUA') or (include '../bad.php');
?>
    <script type="text/javascript">
  var coords=new Array(); var bermudaTriangle ;
    <?php 
if (wra_userscontext::hasright('adminpage')) {
    ?>
var count0=0;
        function addclicker(e){
        
              if($("#txttype").val()>1){
               var a={id:count0,lat:e.latLng.k,lng:e.latLng.B};
               count0++;
               coords.push(a);
           }
           $("#txtpoints").val($.toJSON(coords));
           var triangles=new Array();
           for(var i=0;i<coords.length;i++){
               triangles.push(new google.maps.LatLng(coords[i].lat,coords[i].lng));
           }
           switch(Math.round($("#txttype").val())){
               case 2:
                   break;
                    case 5:
                
  var line = new google.maps.Polyline({
    path: triangles, strokeWeight: 2,strokeOpacity: 0.8,  strokeColor: $("#txtcolor_border").val(),
   
    map: map