} else { define('IPHONE', false); $phptemp = new PHPtemp('/data/project/xtools/public_html/templates/main.tpl'); $content = new PHPtemp('/data/project/xtools/public_html/pcount/templates/pcount.tpl'); } $langlinks = $language->generateLangLinks(); if (is_file('/data/project/xtools/public_html/configs/' . $lang . '.conf')) { $phptemp->load_config('/data/project/xtools/public_html/configs/' . $lang . '.conf', 'main'); $content->load_config('/data/project/xtools/public_html/configs/' . $lang . '.conf', 'main'); } else { $phptemp->load_config('/data/project/xtools/public_html/configs/en.conf', 'main'); $content->load_config('/data/project/xtools/public_html/configs/en.conf', 'main'); } $phptemp->load_config('/data/project/xtools/public_html/pcount/configs/' . $lang . '.conf', 'pcount'); $content->load_config('/data/project/xtools/public_html/pcount/configs/' . $lang . '.conf', 'pcount'); $phptemp->assign("header", $phptemp->getConf('tool')); $phptemp->assign("curlang", $lang); $phptemp->assign("langlinks", $langlinks); $phptemp->assign("source2", "//tools.wmflabs.org/xtools/pcount/source.php"); $uselang = $lang == "en" ? "" : "&uselang={$lang}"; $phptemp->assign("translate", "//tools.wmflabs.org/xtools/translate/index.php?usetool=Editcounter" . $uselang); $siteNoticeClass = new siteNotice(); $sitenotice = $siteNoticeClass->checkSiteNoticeRaw(); if ($sitenotice) { $phptemp->assign("alert", $sitenotice); } require_once '/data/project/xtools/public_html/counter_commons/HTTP.php'; require_once '/data/project/xtools/public_html/counter_commons/Database.php'; require_once '/data/project/xtools/public_html/counter_commons/Functions.php'; require_once '/data/project/xtools/public_html/pcount/counter.php'; require_once '/data/project/xtools/Graph.php';
$wgDBPass, 'toolserver', true );*/ $res = Database::mysql2array($dbr->select('wiki', 'DISTINCT lang', array(array('is_meta', '!=', '1'), array('is_multilang', '!=', '1'), array('is_closed', '!=', '1')), array('ORDER BY' => 'lang ASC'))); $langs = array(); foreach ($res as $r) { $langs[] = $r['lang']; } $s = array_search('en-simple', $langs); unset($langs[$s]); $langs[] = 'simple'; sort($langs); $langs[] = 'qqq'; $dirs = null; $phptemp->assign("header", $phptemp->getConf('translation')); if (isset($_POST['title'])) { $content->assign("submitted", true); $diff = "[pcount]\n"; foreach ($_POST as $key => $get) { if ($key == "usedlanguage") { continue; } $diff .= $key . " = \"{$get}\"\n"; } //$diff = utf8_encode( html_entity_decode( $diff ) ); //echo getTextDiff( 'unified', implode( "\n", file_get_contents( '/data/project/xtools/public_html/pcount/configs/'.$_GET['usedlanguage'].'.conf' ) ), $diff ); if (is_file('/data/project/xtools/public_html/pcount/configs/' . $_POST['usedlanguage'] . '.conf')) { $diff .= "\n\n--------------\n\n" . getTextDiff('unified', file_get_contents('/data/project/xtools/public_html/pcount/configs/' . $_POST['usedlanguage'] . '.conf'), trim($diff)); } $email = new Email("*****@*****.**", "Translation Machine", "New translation in the {$_POST['usedlanguage']} language", $diff . "\n\n-----------\n\n//tools.wmflabs.org/xtools/pcount/translate2.php?passu=arghyry3738&uselang=" . $_POST['usedlanguage']);
error_reporting(E_ALL); ini_set("display_errors", 1); require_once '/data/project/xtools/public_html/phptemp/PHPtemp.php'; require_once '/data/project/xtools/public_html/phptemp/Language.php'; $phptemp = new PHPtemp('/data/project/xtools/public_html/templates/main.tpl'); $content = new PHPtemp('/data/project/xtools/public_html/pcount/templates/source.tpl'); $language = new Language(array('en')); $lang = $language->getLang(); $langlinks = $language->generateLangLinks(); $phptemp->load_config('/data/project/xtools/public_html/configs/' . $lang . '.conf', 'main'); $phptemp->load_config('/data/project/xtools/public_html/pcount/configs/' . $lang . '.conf', 'pcount'); $content->load_config('/data/project/xtools/public_html/configs/' . $lang . '.conf', 'main'); $content->load_config('/data/project/xtools/public_html/pcount/configs/' . $lang . '.conf', 'pcount'); $dirs = array('http' => '/data/project/xtools/public_html/counter_commons/HTTP.php', 'database' => '/data/project/xtools/public_html/counter_commons/Database.php', 'functions' => '/data/project/xtools/public_html/counter_commons/Functions.php', 'counter' => '/data/project/xtools/public_html/pcount/counter.php', 'index' => '/data/project/xtools/public_html/pcount/index.php', 'Language' => '/data/project/xtools/public_html/phptemp/Language.php', 'main.tpl' => '/data/project/xtools/public_html/templates/main.tpl', 'pcount.tpl' => '/data/project/xtools/public_html/pcount/templates/pcount.tpl'); if (!isset($_GET['path'])) { $phptemp->assign("header", $phptemp->getConf('sourceviewer')); $content->assign("form", "true"); } elseif (!isset($dirs[$_GET['path']])) { $phptemp->assign("header", $phptemp->getConf('sourceviewer')); $content->assign("error", $phptemp->getConf('sourceviewer')); $content->assign("form", "true"); } else { $pathname = $dirs[$_GET['path']]; $phptemp->assign("header", $phptemp->getConf('viewingsource', $pathname)); $content->assign("source", str_replace('<?php', '', highlight_file($pathname, true))); } $phptemp->assign("content", $content->display(true)); $phptemp->assign("curlang", $lang); $phptemp->assign("langlinks", $langlinks); //$phptemp->assign( "source", "count" ); $phptemp->display();
//Stat checking } unset($tool, $surl); require_once '/data/project/xtools/public_html/phptemp/PHPtemp.php'; require_once '/data/project/xtools/public_html/phptemp/Language.php'; require_once '/data/project/xtools/public_html/sitenotice.php'; $phptemp = new PHPtemp('/data/project/xtools/public_html/templates/main.tpl'); $content = new PHPtemp('/data/project/xtools/public_html/rangecontribs/templates/rangecontribs.tpl'); $language = new Language(array("en")); $lang = $language->getLang(); $langlinks = $language->generateLangLinks(); $phptemp->load_config('/data/project/xtools/public_html/configs/' . $lang . '.conf', 'main'); $phptemp->load_config('/data/project/xtools/public_html/rangecontribs/configs/' . $lang . '.conf', 'rangecontribs'); $content->load_config('/data/project/xtools/public_html/rangecontribs/configs/' . $lang . '.conf', 'rangecontribs'); $namespaces = array('0' => '', '1' => 'Talk:', '2' => 'User:'******'3' => 'User talk:', '4' => 'Wikipedia:', '5' => 'Wikipedia talk:', '6' => 'File:', '7' => 'File talk:', '8' => 'MediaWiki:', '9' => 'MediaWiki talk:', '10' => 'Template:', '11' => 'Template talk:', '12' => 'Help:', '13' => 'Help talk:', '14' => 'Category:', '15' => 'Category talk:', '100' => 'Portal:', '101' => 'Portal talk:', '108' => 'Book:', '109' => 'Book talk:', '446' => 'Education Program:', '447' => 'Education Program talk:', '710' => 'TimedText:', '711' => 'TimedText talk:', '828' => 'Module:', '829' => 'Module talk:'); $phptemp->assign("header", $phptemp->getConf('tool')); if (!isset($_GET['ips'])) { $content->assign("form", 'Welcome to X!\'s automated edits counter!<br /><br /> There are two ways to use this tool. <ol> <li>IP range: Enter a CIDR range into the box, in the format 0.0.0.0/0</li> <li>IP list: Enter a list of IPs into the box, separated by newlines.</li> </ol><br /> <form action="//tools.wmflabs.org/xtools/rangecontribs/index.php" method="get"> <table> <tr> <td align="center">IP range: <input type="radio" name="type" value="range" /></td> <td align="center">IP list: <input type="radio" name="type" value="list" /></td> </tr> <tr> <td colspan="2" align="center"><textarea name="ips" rows="10" cols="40"></textarea></td>