-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdisplayviewsformultiplemonths.php
62 lines (59 loc) · 3.9 KB
/
displayviewsformultiplemonths.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>Wikipedia Views: results</title>
<meta name="robots" content="noindex">
<?php
include("style/toggler.inc");
print '</head>';
include_once("backend/coreCode.inc");
$formdata = true;
$pageTypeAdvice = "multiplemonths";
include("retrieval/languageListRetrieval.inc");
include("retrieval/drilldownListRetrieval.inc");
include("retrieval/pageListRetrieval.inc");
include("retrieval/monthListRetrieval.inc");
include("retrieval/advancedOptionRetrieval.inc");
if ($pageSpecificationError == true or $monthSpecificationError == true) {
include("inputDisplay/".$pageTypeAdvice."dataentry.inc");
} else {
switch ($displayFormat) {
case 'htmltableautomatic' :
include("style/head.inc");
$permalinkUrl = "https://wikipediaviews.org/displayviewsfor".$pageTypeAdvice.".php?".$pageUrlComponent.$monthUrlComponent.$languageUrlComponent.$drilldownUrlComponent.$advancedOptionUrlComponent;
$cleanPermalinkUrl = str_replace("?&", "?", $permalinkUrl);
print 'Permalink URL: <a href="'.$cleanPermalinkUrl.'">'.$cleanPermalinkUrl.'</a><br/><br/>';
if (count($pageList) * count($languageList) * count($drilldownList) >= count($monthList)) {
$printStatus = printPageviewsForMonthOrYearListAsHtmlTable($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$sort,$tag);
} else {
$printStatus = printPageviewsForMonthOrYearListAsHtmlTableTransposed($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$sort,$tag);
}
if (count($monthList) > 1 or count($pageList) * count($languageList) * count($drilldownList) > 1) {
generateGraphs($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$tag,$cleanPermalinkUrl);
}
include("inputDisplay/multiplemonthsdataentry.inc");
break;
case 'htmltable' :
include("style/head.inc");
$permalinkUrl = "https://wikipediaviews.org/displayviewsfor".$pageTypeAdvice.".php?".$pageUrlComponent.$monthUrlComponent.$languageUrlComponent.$drilldownUrlComponent.$advancedOptionUrlComponent;
$cleanPermalinkUrl = str_replace("?&", "?", $permalinkUrl);
print 'Permalink URL: <a href="'.$cleanPermalinkUrl.'">'.$cleanPermalinkUrl.'</a><br/><br/>';
$printStatus = printPageviewsForMonthOrYearListAsHtmlTable($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$sort,$tag);
if (count($monthList) > 1 or count($pageList) * count($languageList) * count($drilldownList) > 1) {
generateGraphs($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$tag,$cleanPermalinUrl);
}
include("inputDisplay/multiplemonthsdataentry.inc");
break;
case 'htmltabletransposed' :
include("style/head.inc");
$permalinkUrl = "https://wikipediaviews.org/displayviewsfor".$pageTypeAdvice.".php?".$pageUrlComponent.$monthUrlComponent.$languageUrlComponent.$drilldownUrlComponent.$advancedOptionUrlComponent;
$cleanPermalinkUrl = str_replace("?&", "?", $permalinkUrl);
print 'Permalink URL: <a href="'.$cleanPermalinkUrl.'">'.$cleanPermalinkUrl.'</a><br/><br/>';
$printStatus = printPageviewsForMonthOrYearListAsHtmlTableTransposed($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$sort,$tag);
if (count($monthList) > 1 or count($pageList) * count($languageList) * count($drilldownList) > 1) {
generateGraphs($pageList,$languageList,$drilldownList,$monthList,$numericDisplayFormat,$normalization,'page','month',$tag,$cleanPermalinkUrl);
}
include("inputDisplay/multiplemonthsdataentry.inc");
break;
}
}
include_once('style/anchorjs.inc');
?>