-
Notifications
You must be signed in to change notification settings - Fork 1
/
jpgraphSetup.php
executable file
·45 lines (40 loc) · 975 Bytes
/
jpgraphSetup.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
<?php
////////////////////////////////////////////////////
//
// WeatherOffice
//
// http://www.sourceforge.net/projects/weatheroffice
//
// Copyright (C) 04/2007 Mathias Zuckermann &
// Bernhard Heibler
//
// See COPYING for license info
//
////////////////////////////////////////////////////
function phpnum()
{
$version = explode('.',phpversion());
return (int) $version[0];
}
switch (phpnum()) {
case 4:
$jpgraphPath="./jpgraph_php4";
break;
case 5:
$jpgraphPath="./jpgraph_php5";
break;
case 7:
$jpgraphPath="./jpgraph_php72";
break;
default:
$jpgraphPath="./jpgraph_php5";
}
$oldIncludePath=get_cfg_var('include_path');
$newIncludePath=$jpgraphPath . PATH_SEPARATOR . $oldIncludePath;
ini_set('include_path',$newIncludePath);
include("jpgraph.php");
include("jpgraph_line.php");
include("jpgraph_date.php");
include("jpgraph_polar.php");
include ("weatherInclude.php");
?>