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); } }
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(); }
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(); }
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); }
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(); } }
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'); }
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; }
function add() { //добавление нового объекта if (!isset($this->creator_id)) { $this->creator_id = wra_userscontext::curuser(); } $wd = new wra_db(); if (!isset($this->id)) { $this->id = WRA::getnewkey('' . WRA_CONF::$db_prefix . 'usersrights'); } $wd->query = "INSERT INTO `" . WRA_CONF::$db_prefix . "usersrights` (\n `id`,\n `user_id`,\n `right_id`\n )VALUES(\n '{$this->id}',\n '{$this->user_id}',\n '{$this->right_id}'\n )"; $wd->execute(); if (!WRA_CONF::$usegetkey) { $this->id = $wd->getlastkey(); } $wd->close(); unset($wd); }
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; } } }
static function userlogin($wf, $username, $password, $rememberme) { $result = 0; if (!$username || !$password) { return 0; } $username = trim($username); $password = trim($password); $md5pass = md5($password); $userid = wra_users::getidbyemail($wf, $username); $r0 = wra_userscontext::confirm_user($userid, $md5pass); if ($r0 != 0) { return $r0; } $username = stripslashes($username); $_SESSION['uid'] = $userid; $_SESSION['passs'] = $md5pass; $result = 5; if ($rememberme) { setcookie('uid', $_SESSION['uid'], time() + WRA_CONF::$remembertime, '/'); setcookie('passs', $_SESSION['passs'], time() + WRA_CONF::$remembertime, '/'); } return $result; }
function add() { //добавление нового объекта if (!isset($this->creator_id)) { $this->creator_id = wra_userscontext::curuser(); } $wd = new wra_db(); $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'virtualpage'); $wd->query = "INSERT INTO `" . WRA_CONF::$db_prefix . "virtualpage` (\n `id`,\n `header`,\n `content`,\n `link`,\n `menuid`,\n `infoid`\n )VALUES(\n '{$this->id}',\n '{$this->header}',\n '{$this->content}',\n '{$this->link}',\n '{$this->menuid}',\n '{$this->infoid}'\n )"; $wd->execute(); if (!WRA_CONF::$usegetkey) { $this->id = $wd->getlastkey(); } $wd->close(); unset($wd); $this->currentobjid = wra_objects::addnewobject("wra_virtualpage", $this->id, $this->objectadres); }
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(); }
<?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
function run() { wra_userscontext::logout(); WRA::gotopage('../admin/login'); $this->wf->nicedie(); }
static function curuser() { // возвращаем текущего пользователя return wra_userscontext::curuser(); }
<?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">© <?php WRA::e(WRA::getcuryear($this->wf)); ?> WorkFlower</div></td> </tr> </table> </div>
function delete() { //удаление пользователя if (wra_userscontext::curuser() != $this->id) { $wd = new wra_db($wf); $wd->query = 'DELETE FROM `' . WRA_CONF::$db_prefix . "users`\n \t\t WHERE `id`='{$this->id}' \n\t\t\t\t "; $wd->execute(); $wd->close(); unset($wd); return true; } return false; }
function add() { //добавление нового объекта if (!isset($this->creator_id)) { $this->creator_id = wra_userscontext::curuser(); } $reg_date = time(); $wd = new wra_db(); $this->id = WRA::getnewkey("" . WRA_CONF::$db_prefix . 'fbu'); $wd->query = 'INSERT INTO `' . WRA_CONF::$db_prefix . "fbu` (\n `id`,\n `userid`,\n `fbuserid`,\n `display_name`,\n `regdate`,\n `username`,\n `usersurname`,\n `link`,\n `gender`,\n `photo`,\n `points`,\n `access_token`,\n `email`,\n `phone`,\n `adres`,\n `reg_date`\n )VALUES(\n '{$this->id}',\n '{$this->userid}',\n '{$this->fbuserid}',\n '{$this->display_name}',\n '{$this->regdate}',\n '{$this->username}',\n '{$this->usersurname}',\n '{$this->link}',\n '{$this->gender}',\n '{$this->photo}',\n '{$this->points}',\n '{$this->access_token}',\n '{$this->email}',\n '{$this->phone}',\n '{$this->adres}',\n '{$reg_date}'\n )"; $wd->execute(); if (!WRA_CONF::$usegetkey) { $this->id = $wd->getlastkey(); } $wd->close(); // $this->currentobjid = wra_objects::addnewobject('wra_fbu', $this->id, $this->objectadres); unset($wd); }