function show() { $cache0 = new wra_cacheflow('history', true); if ($cache0->begin()) { $this->venues = wra_foursqvenues::get_listall(time()); include WRA_Path . '/template/history.php'; } $cache0->end(); }
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 show() { $cache0 = new wra_cacheflow('sitemap', true); if ($cache0->begin()) { $this->items = wra_foursqvenues::get_listall(); WRA::e('<?'); ?> xml version="1.0" encoding="UTF-8"<?php WRA::e('?>'); ?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <url> <loc><?php WRA::e(WRA::base_url()); ?> </loc> <changefreq>hourly</changefreq> </url> <url> <loc><?php WRA::e(WRA::base_url()); ?> history</loc> <changefreq>hourly</changefreq> </url> <?php foreach ($this->items as $a0) { ?> <url> <loc><?php WRA::e($a0->getlink()); ?> </loc> <changefreq>yearly</changefreq> </url> <?php } ?> </urlset><?php } $cache0->end(); }
<?php defined('WERUA') or (include '../bad.php'); $cache0 = new wra_cacheflow('platinumfooter', $this->wf->caching); if ($cache0->begin()) { if (WRA_CONF::$usestat) { include 'analytics.php'; } } $cache0->end(); ?> </body></html>
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'; }*/ }
function show() { $cache0 = new wra_cacheflow('rss', true); if ($cache0->begin()) { $this->items = wra_foursqvenues::get_list(0, time(), 250); $this->items = array_reverse($this->items); if (count($this->items) < 30) { $enues = wra_foursqvenues::get_l30(intval(time())); $before = time(); if (count($this->items) > 0) { $before = $this->items[count($this->items) - 1]->time; } for ($i = 0; $i < 30 - count($this->items); $i++) { if ($enues[$i]->time < $before) { $this->items[] = $enues[$i]; } } } WRA::e('<?'); ?> xml version="1.0" encoding="UTF-8"<?php WRA::e('?>'); ?> <rss version="2.0"> <channel> <title>Liveuamap.com</title> <link>http://liveuamap.com/</link> <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 </description> <language>en-us</language> <pubDate><?php WRA::e(date('D, d M Y g:i:s O', time())); ?> </pubDate> <lastBuildDate><?php WRA::e(date('D, d M Y g:i:s O', time())); ?> </lastBuildDate> <docs>http://liveuamap.com/rss</docs> <generator>Liveuamap Feed</generator> <managingEditor>info@liveuamap.com</managingEditor> <webMaster>info@liveuamap.com</webMaster> <?php foreach ($this->items as $a0) { ?> <item> <title><?php WRA::e(htmlspecialchars($a0->name)); ?> </title> <link><?php WRA::e($a0->getlink()); ?> </link> <description><?php WRA::e(htmlspecialchars($a0->name)); ?> </description> <pubDate><?php WRA::e(date('D, d M Y g:i:s O', $a0->time)); ?> </pubDate> <guid><?php WRA::e($a0->getlink()); ?> </guid> <?php if (!empty($a0->picture)) { $ext = str_replace(':large', '', pathinfo($a0->picture, PATHINFO_EXTENSION)); $link = 'http://liveuamap.com/uploads/' . $a0->id . '.' . $ext; if (!file_exists(WRA_Path . '/uploads/' . $a0->id . '.' . $ext)) { $this->save_image($a0->picture, WRA_Path . '/uploads/' . $a0->id . '.' . $ext); } ?> <image> <url><?php WRA::e($link); ?> </url> <link><?php WRA::e($a0->getlink()); ?> </link> </image><?php } ?> </item> <?php } ?> </channel></rss><?php } $cache0->end(); }
<?php defined("WERUA") or die('<div style="margin:0 0 auto;width:200px">Ошибка запуска. Contact </div>'); $this->wf->cp->add_script("../modules/admin/scripts/options.js"); $this->wf->cp->add_script("../modules/admin/scripts/default.js"); if (isset($_REQUEST['clearcache'])) { wra_cacheflow::clearcache(); } if (isset($_POST['googleanalytics'])) { wra_options::updatevalue("googleanal", WRA::getpost('googleanalytics')); } if (isset($_POST['yandexmetrics'])) { wra_options::updatevalue("yandexmetrics", WRA::getpost('yandexmetrics')); } if (isset($_POST['facebook'])) { wra_options::updatevalue("facebook", WRA::getpost('facebook')); } if (isset($_POST['vkontakte'])) { wra_options::updatevalue("vkontakte", WRA::getpost('vkontakte')); } 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> </td></tr> <tr> <td colspan="2"><b>Общие настройки</b></td>
function run() { $this->nofooter = true; $this->noheader = true; $this->act = $_REQUEST['act']; $this->return = array(); // $this->query(addslashes($_SERVER['QUERY_STRING'])); switch ($this->act) { case 'pts': $time = intval($_GET['time']); $curid = intval($_GET['curid']); $last = intval($_GET['last']); if ($last == 0 && time() - 9600 < $time) { $time = time(); } $cache0 = new wra_cacheflow('p' . $last . intval($time / 50000), true); if ($cache0->begin()) { if (intval($_REQUEST['last']) == 0) { $this->venues = wra_foursqvenues::get_list(intval($_GET['curid']), intval($time), 250); $this->fieldsarrow = wra_foursqvenues::get_listfields(intval($_GET['curid']), intval($time), 250); if (count($this->venues) < 30) { $enues = wra_foursqvenues::get_l30(intval($time)); $before = time(); if (count($this->venues) > 0) { $before = $this->venues[count($this->venues) - 1]->time; } for ($i = 0; $i < 30 - count($this->venues); $i++) { if ($enues[$i]->time < $before) { $this->venues[] = $enues[$i]; } } } } else { $this->venues = wra_foursqvenues::get_listlast(intval($_REQUEST['last'])); } $this->cats = wra_cats::get_list(); foreach ($this->venues as $k => $v) { $this->venues[$k]->name = htmlspecialchars($this->venues[$k]->name); $this->venues[$k]->cat = $this->cats[$v->cat_id]; // if(time()-$v->time>86400) // $this->venues[$k]->time=date('d.m.Y H:i',$v->time); // else if (time() - $v->time < 60) { $this->venues[$k]->time = 'just now'; } else { $this->venues[$k]->time = $this->humanTiming($v->time); } $this->venues[$k]->sf = ''; if ($this->venues[$k]->id > wra_foursqvenues::$linknumber) { $this->venues[$k]->target = $this->venues[$k]->link; } $this->venues[$k]->link = ''; $this->venues[$k]->sel_link = ''; } $this->return['last'] = $_REQUEST['last']; $this->return['venues'] = $this->venues; $this->return['fields'] = $this->fieldsarrow; $this->return['cats'] = $this->cats; $this->return['datac'] = date('d', intval($_GET['time']) + 6400); $this->return['datam'] = date('F', intval($_GET['time']) + 6400); $this->return['datay'] = date('Y', intval($_GET['time']) + 6400); $this->return['amount'] = count($this->venues); WRA::e(json_encode($this->return, JSON_NUMERIC_CHECK)); } $cache0->end(false); /* if($curid==0) else{ $this->return= json_decode( $cache0->end(true)); $this->venue=new wra_foursqvenues(); $this->venue->load($curid); WRA::e(json_encode($this->return, JSON_NUMERIC_CHECK)); }*/ $this->wf->nicedie(); break; default: $this->return = array("err" => 1, "text" => "No action"); break; } }
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(); }