function show_users_stats($template) { global $TPL; global $db; $stats = new stats(); $projects = $stats->project_stats(); $tasks = $stats->task_stats(); $comments = $stats->comment_stats(); $persons = array(); $query = "SELECT * FROM person ORDER BY username"; $db->query($query); while ($db->next_record()) { $person = new person(); $person->read_db_record($db); array_push($persons, $person->get_id()); } usort($persons, "compare"); for ($i = 0; $i < count($persons); $i++) { $person = new person(); $person->set_id($persons[$i]); $person->select(); $TPL["user_username"] = $person->get_value("username"); $TPL["user_projects_current"] = $projects["current"][$person->get_id()] + 0; $TPL["user_projects_total"] = $projects["current"][$person->get_id()] + $projects["archived"][$person->get_id()]; $TPL["user_tasks_current"] = $tasks["current"][$person->get_id()] + 0; $TPL["user_tasks_total"] = $tasks["current"][$person->get_id()] + $tasks["completed"][$person->get_id()]; $TPL["user_comments_total"] = $comments["total"][$person->get_id()] + 0; $TPL["user_graph"] = "<a href=\"" . $TPL["url_alloc_statsImage"] . "id=" . $person->get_id() . "&width=640&multiplier=8&labels=true\">"; $TPL["user_graph"] .= "<img alt=\"User graph\" src=\"" . $TPL["url_alloc_statsImage"] . "id=" . $person->get_id() . "&width=400&multiplier=2\"></a>"; if ($TPL["user_projects_total"] + $TPL["user_tasks_total"] + $TPL["user_comments_total"] > 0) { $TPL["odd_even"] = $TPL["odd_even"] == "odd" ? "even" : "odd"; include_template($template); } } }
function rex_addStatEntry($params) { global $REX, $REX_ARTICLE; $content = $params['subject']; $aid = (int) $REX_ARTICLE->getValue("article_id"); if ($REX['STATS'] == 1) { $log = new stats(); $log->writeLog($aid); } return $content; }
public static function getInstance() { if (!self::$me) { $class=new stats(); self::$me=$class; } return self::$me; }
/** * Вывод списка online-пользователей * @return null */ public function show_online() { $i = (int) config::o()->v('online_interval'); if (!$i) { $i = 15; } $time = time() - $i; $res = db::o()->p($time)->query('SELECT userdata FROM sessions WHERE time > ? GROUP BY IF(uid>0,uid,ip)'); $res = db::o()->fetch2array($res); tpl::o()->assign("res", $res); $c = count($res); $mo = stats::o()->read("max_online"); if (!intval($mo) || $mo < $c) { $mo = $c; stats::o()->write("max_online", $c); stats::o()->write("max_online_time", time()); } $mot = stats::o()->read("max_online_time"); tpl::o()->assign("record_total", $mo); tpl::o()->assign("record_time", $mot); /* @var $user user */ $user = plugins::o()->get_module("user"); lang::o()->get("profile"); tpl::o()->register_modifier("gau", array($user, "get_age")); tpl::o()->assign("bdl", $this->bd_list()); tpl::o()->display("blocks/contents/online.tpl"); }
function bind() { //page vars $form_action = $_SERVER['PHP_SELF']; $this->onloadscript = "setFocus('txtEmail');"; //smarty $smarty = new Smarty(); $smarty->force_compile = true; $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; $smarty->assign("stats", stats::get_stats()); $smarty->assign("menu_item", "signup"); $smarty->assign("postcode", $this->postcode); $smarty->assign("email", $this->email); $smarty->assign("alert_area_size", $this->alert_area_size); $smarty->assign("page_title", "Email alerts of planning applications near you"); $smarty->assign("warnings", $this->warnings); $smarty->assign("email_warn", $this->email_warn); $smarty->assign("postcode_warn", $this->postcode_warn); $smarty->assign("onloadscript", $this->onloadscript); $smarty->assign("small_zone_size", SMALL_ZONE_SIZE); $smarty->assign("medium_zone_size", MEDIUM_ZONE_SIZE); $smarty->assign("large_zone_size", LARGE_ZONE_SIZE); //Render $smarty->display('index.tpl'); }
function bind() { $smarty = new Smarty(); $smarty->force_compile = true; $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; $smarty->assign("stats", stats::get_stats()); $smarty->assign("page_title", "Donate to the Planning Alerts server fund"); $smarty->assign("menu_item", "signup"); $smarty->display('donate.tpl'); }
function redefrepo($reposelected = 0) { global $defrepo, $classes, $npackages; $defrepo = array(); $classes = array(); $repo = new repository(); $nrepos = $repo->find(); while ($repo->fetch()) { $id = $repo->id; $defrepo[$id] = (array) $repo; unset($defrepo[$id]["db"]); $defrepo[$id]['selected'] = $id == $reposelected; $classes[$repo->class]['class'] = $repo->class; $classes[$repo->class]['arch'] = $repo->arch; $classes[$repo->class]['version'] = $repo->version; $classes[$repo->class]['selected'] = $repo->class == $reposelected; $classes[$repo->class]['repo'][] = $repo->id; $npackages += $repo->npkgs; } echo "<table border='0' width='100%'>"; echo "<tr>"; echo "<td>"; echo "You are the " . $_SESSION['searcher_visitor'] . "st visitor<br />"; echo "Searched " . $GLOBALS['db']->counter_get('searches') . " packages from 24 Apr 2012<br /><br />"; echo "<code>{$nrepos} repositories ({$npackages} packages)</code><br><br>\n"; echo "</td>"; $stats = new stats(); $names = $stats->lastsearch(15); echo "<td>"; echo "<table border=1 cellspacing=0>"; echo "<tr><td colspan=3 align=center><code><b><a href='stats.php'>Recents</a></b></code></td></tr>"; echo "<tr><td><code>", $names[0] . "<br />" . $names[1] . "<br />" . $names[2] . "<br />" . $names[3] . "<br />" . $names[4] . "</code></td>"; echo "<td><code>", $names[5] . "<br />" . $names[6] . "<br />" . $names[7] . "<br />" . $names[8] . "<br />" . $names[9] . "</code></td>"; echo "<td><code>", $names[10] . "<br />" . $names[11] . "<br />" . $names[12] . "<br />" . $names[13] . "<br />" . $names[14] . "</code></td></tr>"; echo "</table>"; echo "</td>"; echo "<td>"; echo "<table border=1 cellspacing=0 cellpadding=0>"; echo "<tr><td><a href='stats.php'><img border=0 src='stats.php?gdaily&y=95&time=60&mid=0'></a></td></tr>"; echo "</table>"; echo "</tr></table>"; }
function bind() { $form_action = $_SERVER['PHP_SELF']; $smarty = new Smarty(); $smarty->force_compile = true; $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; $smarty->assign("stats", stats::get_stats()); $smarty->assign("page_title", "API"); $smarty->assign("menu_item", "api"); $smarty->display('apihowto.tpl'); }
function bind() { //page vars $form_action = $_SERVER['PHP_SELF']; //smarty $smarty = new Smarty(); $smarty->force_compile = true; $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; $smarty->assign("stats", stats::get_stats()); $smarty->assign("page_title", "Get involved"); $smarty->assign("menu_item", "getinvolved"); //Render $smarty->display('getinvolved.tpl'); }
function bind() { $form_action = $_SERVER['PHP_SELF']; //smarty $smarty = new Smarty(); $smarty->force_compile = true; $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; $smarty->assign("stats", stats::get_stats()); $smarty->assign("menu_item", "signup"); $smarty->assign("page_title", "Unsubscribed"); $smarty->assign("postcode", $this->postcode); $smarty->assign("alert_area_size", $this->alert_area_size); //Render $smarty->display('unsubscribed.tpl'); }
function bind() { //page vars $form_action = $_SERVER['PHP_SELF']; //smarty $smarty = new Smarty(); $smarty->force_compile = true; $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY; $smarty->assign("stats", stats::get_stats()); $smarty->assign("page_title", "About"); $smarty->assign("menu_item", "about"); $smarty->assign("authorities", $this->authorities); //Render $smarty->display('about.tpl'); }
$bcp = $char->GetValue('copper_bank'); //load guild name //rewritten because the guild id was removed from the profile 9/26/2014 $query = "SELECT guilds.name, guild_members.rank \r\n FROM guilds\r\n JOIN guild_members\r\n ON guilds.id = guild_members.guild_id\r\n WHERE guild_members.char_id = {$charID} LIMIT 1"; if (defined('DB_PERFORMANCE')) { dbp_query_stat('query', $query); } //added 9/28/2014 $results = mysql_query($query); if (mysql_num_rows($results) != 0) { $row = mysql_fetch_array($results); $guild_name = $row['name']; $guild_rank = $guildranks[$row['rank']]; } //place where all the items stats are added up $itemstats = new stats(); // pull characters inventory slotid is loaded as // "myslot" since items table also has a slotid field. $query = "SELECT items.*, character_inventory.augslot1, character_inventory.augslot2, character_inventory.augslot3, character_inventory.augslot4, character_inventory.augslot5, character_inventory.slotid AS myslot from items, character_inventory where character_inventory.id = '{$charID}' AND items.id = character_inventory.itemid"; if (defined('DB_PERFORMANCE')) { dbp_query_stat('query', $query); } //added 9/28/2014 $results = mysql_query($query); while ($row = mysql_fetch_array($results)) { $tempitem = new item($row); for ($i = 1; $i <= 5; $i++) { if ($row["augslot" . $i]) { $query = "SELECT * from items where id = " . $row["augslot" . $i] . " LIMIT 1"; if (defined('DB_PERFORMANCE')) { dbp_query_stat('query', $query);
function autocleanstats(){ $isbak = config::get('iscleanstats'); if($isbak){ $file = "./data/ctstats.db"; $str = @file_get_contents($file); $today = date('Y-m-d'); $obj = new stats(); switch ($isbak){ case 1: if($str != $today){ $obj->rec_delete("1=1"); file_put_contents($file, $today); } break; case 2: if($str != $today && date('w')=='0'){ $obj->rec_delete("1=1"); file_put_contents($file, $today); } break; } } }
/** * Remove stat * * @param \Miir\SummonerBundle\Entity\StatsSummoner $stat */ public function removeStat(\Miir\SummonerBundle\Entity\StatsSummoner $stat) { $this->stats->removeElement($stat); }
public function __user_agents_month($date) { $start_date; $start = date('Y-m-d H:i', strtotime($date['year'] . "-" . $date['month'] . "-01 00:00")); $final_date = $this->_plus_month($date); $end = date('Y-m-d H:i', strtotime($final_date['year'] . "-" . $final_date['month'] . "-01 00:00")); $html = ""; $referrers = stats::user_agents($start, $end); $chart = new GoogChart(); $dataMultiple = $referrers; /* # Chart 2 # */ $chart->setChartAttrs(array('type' => 'pie', 'title' => 'User Agents for ' . date('F Y', strtotime($start)), 'data' => $dataMultiple, 'size' => array(750, 400), 'legend' => false, 'color' => array('#e127aa', '#27aae1'))); // Print chart $html .= $chart; foreach ($referrers as $key => $val) { $html .= "<div><span style='float:right'>{$val}</span>{$key}</div>"; } return $html; }
<? require_once($cfg['path'] . '/configs/config_shopcoins.php'); require($cfg['path'].'/helpers/Paginator.php'); require_once $cfg['path'] . '/models/stats.php'; $stats_class = new stats($db_class,$tpl['user']['user_id'],session_id()); $tpl['pagenum'] = request('pagenum')?request('pagenum'):1; $per_page = 14; switch ($tpl['task']){ case 'coins':{ $title = "Последние просматриваемые монеты"; $per_page = 4; if($tpl['user']['user_id']) { $count = $cache->load("coinscount_user_".$tpl['user']['user_id']); } else $count = $cache->load("coinscount_ses_".session_id()); $tpl['catalog']['lastViewsStat'] = array(); $lastCoinsIds = $stats_class->getlastCoinsIds($tpl['pagenum']); if($lastCoinsIds){ $d = array(); $d_order = array(); foreach ($lastCoinsIds as $id){ $row = $shopcoins_class->getItem($id,true);
$testpro[$i] = account::GetStatOP(47, $fdate, $tdate); $prop2[$i] = account::GetPROStat($fdate, $tdate); $ppp[$i] = account::GetStatOP(array(8), $fdate, $tdate); $gpp[$i] = account::GetStatOP(array(16, 17, 18, 34, 35), $fdate, $tdate, "", "RIGHT JOIN present ON billing_from_id = account_operations.id"); $fpp[$i] = account::GetStatOP(array(10, 11), $fdate, $tdate); $fppc[$i] = account::GetStatOP(array(19), $fdate, $tdate); $fppci[$i] = account::GetStatOP(array(20), $fdate, $tdate); $cho[$i] = account::GetStatOP(array(21), $fdate, $tdate); $konkCodes = new_projects::getContestOpCodes(); $konk[$i] = account::GetStatOP($konkCodes, $fdate, $tdate); $upproj[$i] = account::GetStatOP(array(7), $fdate, $tdate); $transf[$i] = account::GetStatOP(array(23), $fdate, $tdate); $testbuypro[$i] = account::GetStatTestBuyPro($fdate, $tdate); $bonuses[$i] = account::GetStatBonuses($fdate, $tdate); // Статистика по регистрациям и привязке мобильных телефонов $regs = stats::getRegStats($fdate, $tdate); ?> <table border="1" cellspacing="2" cellpadding="2" class="brd-tbl"> <tr> <td width=200><strong>Проекты:</strong></td> <td> <?php $sql = "SELECT COUNT(*) as cnt FROM projects WHERE kind != 9 AND post_date >= ? AND post_date - '1 day'::interval < ?"; $s_project = $DB->rows($sql, $fdate, $tdate); ?> <?php echo $s_project[0]['cnt']; ?> </td> </tr>
* @lastmodified Februari 20, 2015 * */ defined('WB_PATH') or die(header('Location: ../index.php')); $time = time(); if (isset($_GET["m"]) && is_numeric($_GET["m"]) && $_GET["m"] >= 1 && $_GET["m"] <= 12) { $show_month = $_GET["m"]; } else { $show_month = date("n", $time); } if (isset($_GET["y"]) && is_numeric($_GET["y"]) && $_GET["y"] >= 2010 && $_GET["y"] <= 2100) { $show_year = $_GET["y"]; } else { $show_year = date("Y", $time); } $stats = new stats(); $r = $stats->getHistory($show_month, $show_year); //print_r($r); //Reset link $are = $TEXT['ARE_YOU_SURE']; $resetlink = "javascript: confirm_link('" . $are . "', '" . WB_URL . '/modules/wbstats/reset.php?rstc' . "')"; ?> <div class="wbstats_middle"> <h3><?php echo $WS['HISTORY']; ?> </h3> <table width="100%" border="0" cellpadding="5" cellspacing="0"> <tr valign="top">
<? require($cfg['path'].'/helpers/Paginator.php'); require $cfg['path'] . '/configs/config_shopcoins.php'; //require $cfg['path'] . '/models/search.php'; require_once $cfg['path'] . '/models/shopcoinsdetails.php'; $details_class = new model_shopcoins_details($db_class); require_once $cfg['path'] . '/models/stats.php'; $stats_class = new stats($db_class,$tpl['user']['user_id'],session_id()); $search = request('search'); if(isset($_REQUEST['group'])||isset($_REQUEST['materialtype'])){ //$search = ""; } if(contentHelper::get_encoding($search)=='windows-1251'){ $search = iconv( "CP1251//TRANSLIT//IGNORE","UTF8", $search); } $stats_class->saveSearch($search); $searchArray = explode(' ',$search); $words = array(); foreach ($searchArray as $s){ if(trim($s)){
<?php include 'inc/includes.inc.php'; $stats = new stats(); if (isset($_GET['gdaily'])) { # gdaily -> fa il grafico # time -> numero massimo di giorni (default = 365) # y -> altezza del grafico (default = 1px per ricerca) # x -> largezza del grafico (default = 6px per giorno) # scale -> disegna linee orizzontali ogni tot (default = max/5) # mid -> media calcolata sugli ultimi tot giorni (default = no medie, 0 = time define('DAY', 86400); $time = isset($_GET['time']) ? $_GET['time'] : 365; $days = $stats->numdays(); $time = $time < $days ? $time : $days; $date = array_reverse($stats->countbyday($time)); $maxmid = 0; $gmid = 0; if (isset($_GET['mid'])) { if (!$_GET['mid']) { $gmid = 1; } else { $maxmid = $_GET['mid']; } } $max = max($date); $scale = isset($_GET['scale']) ? $_GET['scale'] : round($max / 5); if (isset($_GET['y'])) { $multi = $_GET['y'] / $max; } else { $multi = 1;
<?php $stats = new stats(); $dbu = new db(); $stats->log_stats($rs_act["nama"], $act, $p_id, $sub, $step, $cat, $status, $tab); $app['nopage'] = $rs_act["action"]; $rscomm = $dbu->get_recordset($app[table][komunitas], "status ='aktif'"); include "fill/fill_faq.php";
/** * Отображение контента * @param int $id ID контента * @param bool $full детальный? * @param bool $fe от редактирования? * @param array $data категория/дата * @return null * @throws EngineException */ public function show($id = null, $full = null, $fe = false, $data = null) { lang::o()->get('content'); if (!$data) { $data = $_REQUEST; } $id = (int) $id; try { list($where, $cat, $orderby, $lj) = $this->show_prepare($data, $id, $full, $fe); $where = implode(" AND ", $where); $page = 'page'; if (!$full && !$fe) { $slj = $lj; //if ($this->tstate) // $lj = " LEFT JOIN content_torrents AS t ON t.cid=c.id"; $crow = db::o()->no_parse()->query('SELECT COUNT(*) FROM ' . db::table('content') . ' AS c ' . $slj . ($where ? ' WHERE ' . $where : "")); $count = db::o()->fetch_row($crow); $count = $count[0]; $perpage = config::o()->v('content_perpage'); $maxpage = intval($count / $perpage) + ($count % $perpage != 0 ? 1 : 0); list($pages, $limit) = display::o()->pages($count, $perpage, 'change_tpage', $page, '', true); tpl::o()->assign("pages", $pages); tpl::o()->assign('page', $_GET[$page]); tpl::o()->assign('maxpage', $maxpage); } elseif ($full) { $limit = 1; } $query = $this->show_query($full, $lj, $where, $orderby, $limit); $rows = db::o()->fetch2array(db::o()->no_parse()->query($query)); if ($full && !$rows) { throw new EngineException("content_not_exists"); } $last_clean = stats::o()->read('last_clean_rc'); if (!$fe && $full && !$rows[0]['readed'] && $rows[0]['posted_time'] > $last_clean) { $this->make_readed($id); } if (!$fe && $full) { $this->show_meta($rows[0]); } plugins::o()->pass_data(array('rows' => &$rows), true)->run_hook('content_show_end'); tpl::o()->register_modifier("show_image", array($this, 'show_image')); tpl::o()->register_modifier("prepend_title_icon", array($this, 'prepend_title_icon')); tpl::o()->register_modifier("content_prefilter", array($this, 'prefilter')); tpl::o()->assign('content_row', $rows); tpl::o()->assign('last_clean_rc', $last_clean); tpl::o()->assign('statuses', self::$status); n('rating'); // для display_rating //if ($full) { n("comments"); // для display_comments n('polls'); // для display_polls n('attachments'); // для display_attachments //} if (tpl::o()->template_exists('content/cats/' . $cat . ".tpl") && $cat) { tpl::o()->display('content/cats/' . $cat . ".tpl"); } else { tpl::o()->display('content/index.tpl'); } } catch (PReturn $e) { return $e->r(); } }
* * allocPSA is free software: you can redistribute it and/or modify it * under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or (at * your option) any later version. * * allocPSA is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public * License for more details. * * You should have received a copy of the GNU Affero General Public License * along with allocPSA. If not, see <http://www.gnu.org/licenses/>. */ require_once "../alloc.php"; $stats = new stats(); $projects = $stats->project_stats(); $tasks = $stats->task_stats(); $comments = $stats->comment_stats(); $id = $_GET["id"]; $width = $_GET["width"]; $multiplier = $_GET["multiplier"]; $labels = $_GET["labels"]; $db = new db_alloc(); $start_date = mktime(0, 0, 0, date("m") - 1, date("d"), date("Y")); $height = 0; $top_margin = 0; $bottom_margin = 0; $left_margin = 0; $right_margin = 0; for ($date = $start_date; $date < time(); $date += 86400) {
<? require_once($cfg['path'].'/helpers/Paginator.php'); require_once($cfg['path'].'/models/catalogshopcoinsrelation.php'); require_once $cfg['path'] . '/configs/config_shopcoins.php'; require_once $cfg['path'] . '/models/shopcoinsdetails.php'; $details_class = new model_shopcoins_details($db_class); require_once $cfg['path'] . '/models/stats.php'; $stats_class = new stats($db_class,$tpl['user']['user_id'],session_id()); $catalogshopcoinsrelation_class = new model_catalogshopcoinsrelation($db_class); //var_dump($_SERVER); $page = 'show'; $tpl['show']['lhreg'] = isset($_COOKIE['lhref'])?trim($_COOKIE['lhref']):(isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:'/shopcoins'); if(substr($tpl['show']['lhreg'],-1) =='?' ) $tpl['show']['lhreg'] = substr($tpl['show']['lhreg'],0,strlen($tpl['show']['lhreg'])-1); $arraynewcoins = Array(1=>date('Y')-2,2=>date('Y')-1,3=>date('Y')); $show50 = 0; $catalog=(integer)request('catalog'); $materialtype=(integer)request('materialtype'); $parent=(integer)request('parent'); if (!$materialtype) $materialtype = 1; if ($parent && !$catalog) $catalog = $parent; $orderusernow = 0; $ciclelink = "";
/** * * @category admintools * @package wbstats * @author Ruud Eisinga - Dev4me * @link http://www.dev4me.nl/ * @license http://www.gnu.org/licenses/gpl.html * @platform WebsiteBaker 2.8.x * @requirements PHP 5.2.2 and higher * @version 0.1.9 * @lastmodified Februari 20, 2015 * */ defined('WB_PATH') or die(header('Location: ../index.php')); $stats = new stats(); $r = $stats->getVisitors(); //print_r($r); ?> <div class="wbstats_middle wbstats_h265"> <h3><?php echo $WS['REFTOP10']; ?> </h3> <table width="100%" border="0" cellpadding="3" cellspacing="0"> <tr> <td width="30"><strong><?php echo $WS['NUMBER']; ?> </strong></td>
/** * Инициализация AJAX-части модуля * @return null */ public function init() { lang::o()->get('admin/pages/main'); if (!users::o()->perm('system')) { return; } $act = $_GET["act"]; users::o()->admin_mode(); /* @var $etc etc */ $etc = n("etc"); $all = false; switch ($act) { case "attachments": $all = true; case "unattachments": /* @var $attach attachments */ $attach = n("attachments"); $attach->clear(0, $all); break; case "sitemap": $this->sitemap(); ok(); break; case "cleanup": /* @var $cleanup cleanup */ $cleanup = n("cleanup"); $cleanup->execute(true); break; case "cache": cache::o()->clear(); break; case "cache_tpl": cache::o()->clear_tpl(); break; case "stats": $st = stats::o()->read(); foreach ($st as $s => $v) { stats::o()->write($s, 0); } break; case "logs": /* @var $logs logs_man_ajax */ $logs = plugins::o()->get_module('logs', 1, true); $logs->clear(); break; case "peers": db::o()->truncate_table('content_peers'); db::o()->update(array('leechers' => 0, 'seeders' => 0), 'content_torrents'); break; case "downloaded": db::o()->truncate_table('content_downloaded'); db::o()->update(array('downloaded' => 0), 'content_torrents'); break; case "chat": /* @var $chat chat */ $chat = plugins::o()->get_module('chat'); $chat->truncate(); break; case "pm": /* @var $pm messages_ajax */ $pm = plugins::o()->get_module('messages', false, true); $pm->clear(); break; case "ratings": $r = db::o()->query('SELECT toid, type FROM ratings GROUP BY toid, type'); /* @var $rating rating */ $rating = n("rating"); while ($row = db::o()->fetch_assoc($r)) { $rating->change_type($row['type'])->clear($row['toid']); } break; // Далее: Важная часть сайта, да // Далее: Важная часть сайта, да case "content": $r = db::o()->query('SELECT id FROM content'); while (list($id) = db::o()->fetch_row($r)) { try { $etc->delete_content($id); } catch (EngineException $e) { } } break; case "comments": /* @var $comments comments */ $comments = n("comments"); $comments->clear(null, true); break; case "polls": /* @var $polls polls */ $polls = n("polls"); $polls->clear(); break; case "news": /* @var $news news_ajax */ $news = plugins::o()->get_module('news', false, true); $news->clear(); break; case "bans": $r = db::o()->query('SELECT id FROM bans'); while (list($id) = db::o()->fetch_row($r)) { $etc->unban_user(null, $id); } break; case "warnings": $r = db::o()->query('SELECT id FROM warnings'); while (list($id) = db::o()->fetch_row($r)) { $etc->unwarn_user(null, null, $id); } break; } log_add('system_clean', 'admin', array(lang::o()->v('main_page_clear_' . $act), $act)); ok(); }
/** * Очистка таблиц перед вставкой * @return null */ private function truncate_tables() { $content = $this->convert_tables(); $c = preg_match_all('/\\s*?^table\\s+(\\w+)/miu', $content, $matches); for ($i = 0; $i < $c; $i++) { db::o()->truncate_table($matches[1][$i]); } stats::o()->remove(self::stfield); printf(lang::o()->v('convert_truncated_tables'), $c); }
include $REX['INCLUDE_PATH'] . "/layout/top.php"; rex_title($I18N_STATS->msg("stats_title"), " <a href=index.php?page=stats&sub=stats>" . $I18N_STATS->msg("statistics_header") . "</a> | <a href=index.php?page=stats&sub=auswertung>" . $I18N_STATS->msg("evaluation_header") . "</a>"); // // REACTING // if ($year == "") { $year = date("Y"); } if ($month == "") { $month = date("m"); } if ($funktion == 'evaluate') { // no time limit // set_time_limit(0); // doesnt work in safe_mode $a = new stats(); if ($a->evaluate($year, $month)) { $err_msg = $I18N_STATS->msg("eval_ok") . "<br>"; } else { $err_msg = $I18N_STATS->msg("eval_error") . "<br>"; } } // // suche monate und jahre für die wir logs haben $pfad = $REX['INCLUDE_PATH'] . "/addons/stats/logs/"; $months = array(); $years = array(); if (is_dir($pfad)) { if ($dh = opendir($pfad)) { while (($file = readdir($dh)) !== false) { if (strstr($file, ".log") == ".log") {
// @todo: пока автопродление не используется // @todo: кстати непонятно зачем отдельный метод если getPROEnding справяется с этой задачей? //$log->TRACE( payed::AlertPROEnding() ); //------------------------------------------------------------------------------ // Функция автоподьема проектов если в них в течении 2х дней не было ни одного ответа $log->TRACE(projects::autoSetTopProject()); // Раз в час пересчитываем счетчики сообществ (пересчитываем только сообщество "Общение") $log->TRACE(commune::recalcThemesCountCommunes(commune::COMMUNE_BLOGS_ID)); if (date('H') == 1) { $log->TRACE($mail->SendWarnings()); // Отправляет предупреждению юзеру о том, что аккаунт ПРО истекает в ближайшие дни. $temp = new users(); $rpath = ''; $log->TRACE($temp->DropInactive()); // Пишем статистику для админки #0003426 $log->TRACE(stats::writeGeneralStat()); // Пересчет цен работ фрилансеров в портфолио $log->TRACE(professions::calcAvgPrices()); } if (date('H') == 2) { $log->TRACE($mail->ContestReminder()); $log->TRACE($mail->ContestEndReminder()); // отмена не оплаченных заказов $log->TRACE(billing::checkOldReserve()); } //------------------------------------------------------------------------------ /** * Уведомления закреплений ТУ. */ require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/tservices/tservices_smail.php'; $tservices_smail = new tservices_smail();
* http://ifsoft.com.ua, http://ifsoft.co.uk * qascript@ifsoft.co.uk * * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk) */ include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php"; if (!admin::isSession()) { header("Location: /admin/login.php"); } $page_id = "search"; $error = false; $error_message = ''; $query = ''; $result = array(); $result['users'] = array(); $stats = new stats($dbo); $settings = new settings($dbo); $admin = new admin($dbo); if (isset($_GET['query'])) { $query = isset($_GET['query']) ? $_GET['query'] : ''; $query = helper::clearText($query); $query = helper::escapeText($query); if (strlen($query) > 2) { $result = $stats->searchAccounts(0, $query); } } helper::newAuthenticityToken(); $css_files = array("admin.css"); $page_title = "Users"; include_once $_SERVER['DOCUMENT_ROOT'] . "/common/header.inc.php"; ?>