示例#1
0
//Requires
require_once '/data/project/xtools/public_html/WebTool.php';
require_once '/data/project/xtools/public_html/articleinfo/base.php';
ini_set("display_errors", 1);
ini_set("memory_limit", '512M');
//Load WebTool class
$wt = new WebTool('ArticleInfo', 'articleinfo');
/*Update me*/
$wtSource = "//code.google.com/p/soxred93tools/source/browse/trunk/web/articleinfo";
$wtTranslate = true;
WebTool::setMemLimit();
//Show form if &article parameter is not set (or empty)
if (!$wgRequest->getSafeVal('getBool', 'article')) {
    $content->assign('form', $curlang);
    WebTool::assignContent();
}
//Now load configs for the graph templates
$linegraph = new Smarty();
$sizegraph = new Smarty();
if (is_file('configs/' . $curlang . '.conf')) {
    $linegraph->config_load($curlang . '.conf', 'articleinfo');
    $sizegraph->config_load($curlang . '.conf', 'articleinfo');
} else {
    $linegraph->config_load('en.conf', 'articleinfo');
    $sizegraph->config_load('en.conf', 'articleinfo');
}
//Set the article variables
$article = trim(str_replace(array(''', '%20'), array('\'', ' '), $wgRequest->getSafeVal('article')));
$article = urldecode($article);
//Initialize Peachy