Exemplo n.º 1
0
$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';
require_once '/data/project/xtools/database.inc';
$wgDBPort = 3306;
$wgDBUser = $toolserver_username;
$wgDBPass = $toolserver_password;
$fnc = new Functions();
if (!isset($_GET['name'])) {
    $content->assign('form', $lang);
    $fnc->assignContent();
}
$name = ucfirst(ltrim(rtrim(str_replace(array(''', '%20'), array('\'', ' '), $_GET['name']))));
$name = urldecode($name);
//$name = iconv("windows-1251","utf-16", $name);
$name = str_replace('_', ' ', $name);
$name = str_replace('<', '&lt', $name);
$name = str_replace('>', '&gt;', $name);
$name = str_replace('/', '', $name);
$wiki = $_GET['wiki'];
$lang = $_GET['lang'];
$lang = str_replace('/', '', $lang);
$wiki = str_replace('/', '', $wiki);
$url = $lang . '.' . $wiki . '.org';
if ($wiki == 'wikidata') {
Exemplo n.º 2
0
	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']);
    $email->addTarget("*****@*****.**", "Cyberpwoer678");
    $email->send();
Exemplo n.º 3
0
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();
Exemplo n.º 4
0
$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>
      </tr>
      <tr>
      <td align="center">Limit: <input type="text" name="limit" value="50" /></td> 
      </tr>
      <tr>
      <td colspan="2" align="center"><input type="submit" /></td>
      </tr>
      </table>
      </form><br />');
    assignContent();
}
flush();
$ts_pw = posix_getpwuid(posix_getuid());