2011-05-12 Miguel de Dios <miguel.dedios@artica.es>

* include/graphs/fgraph.php: added the function
	"include_graphs_dependencies".



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4343 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2011-05-12 11:38:14 +00:00
parent 33da2b1406
commit 53c03b7452
2 changed files with 75 additions and 23 deletions

View File

@ -1,3 +1,8 @@
2011-05-12 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/fgraph.php: added the function
"include_graphs_dependencies".
2011-05-12 Sergio Martin <sergio.martin@artica.es>
* images/policies_cog.png: Added new image to policies application

View File

@ -10,7 +10,25 @@
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
$ttl = 1;
$homeurl = '';
function include_graphs_dependencies($home_url = '', $serialize_ttl = 1) {
global $ttl;
global $homeurl;
$ttl = $serialize_ttl;
$homeurl = $home_url;
include_once($homeurl . 'include/functions.php');
include_once($homeurl . 'include/functions_html.php');
include_once($homeurl . 'include/graphs/functions_fsgraph.php');
include_once($homeurl . 'include/graphs/functions_gd.php');
include_once($homeurl . 'include/graphs/functions_utils.php');
}
/*
// If is called from index
if(file_exists('include/functions.php')) {
include_once('include/functions.php');
@ -25,10 +43,39 @@ else if(file_exists('../functions.php')) {
include_once('functions_utils.php');
}
include_once('functions_fsgraph.php');
include_once('functions_utils.php');
*/
$graph_type = get_parameter('graph_type', '');
if (isset($_GET['homeurl'])) {
$homeurl = $_GET['homeurl'];
}
else $homeurl = '';
if (isset($_GET['ttl'])) {
$ttl = $_GET['ttl'];
}
else $ttl_param = 1;
if (isset($_GET['graph_type'])) {
$graph_type = $_GET['graph_type'];
}
else $graph_type = '';
//$graph_type = get_parameter('graph_type', '');
//$ttl_param = get_parameter('ttl', 1);
//$homeurl_param = get_parameter('homeurl', '');
if (!empty($graph_type)) {
include_once($homeurl . 'include/functions.php');
include_once($homeurl . 'include/functions_html.php');
include_once($homeurl . 'include/graphs/functions_fsgraph.php');
include_once($homeurl . 'include/graphs/functions_gd.php');
include_once($homeurl . 'include/graphs/functions_utils.php');
}
switch($graph_type) {
case 'histogram':