Location: PHPKode > projects > Work project > workproject/stats_graph.php
<?
include ("include_config.inc");
include ("include_profile_name.inc");
include ("include_project_name.inc");
include ("include_log_file.inc");
include ("include_delete_task.inc");
include ("include_delete_project.inc");
include ("include_delete_profile.inc");
include ("include_update_user.inc"); 
include ("include_delete_user.inc");
include ("include_list_user.inc");
include ("include_state_name.inc");
include ("include_user_name.inc");
include ("include_workload_project.inc");
include ("include_dates_project.inc");
include ("html_graphs.php3");

if ( isset( $HTTP_COOKIE_VARS[$g_string_cookie] ) ) {
	$g_string_cookie_val         = $HTTP_COOKIE_VARS[$g_string_cookie];
	write_log_user ($filename_log, "Cookie created 1.1: ".$g_string_cookie." -- ".$g_string_cookie_val);
}
if ( isset( $HTTP_COOKIE_VARS[$g_project_cookie] ) ) {
	$g_project_cookie_val        = $HTTP_COOKIE_VARS[$g_project_cookie];
	write_log_user ($filename_log, "Cookie created 2.1: ".$g_project_cookie." -- ".$g_project_cookie_val);
}

/* check the login for user */
login_cookie_check();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Your tasks - View user</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<? include ("include_css.inc"); ?>
<script src="main.js" type="text/javascript"></script>
<script src="tasks.js" type="text/javascript"></script>
<script src="nav.js" type="text/javascript"></script>

</head>
<BODY onload="init()">

<?
include ("include_main.inc");
?>

<?
/* database connection */
$link= mysql_connect( $g_hostname, $g_db_username, $g_db_password) or die("could not connect");
$result = mysql_select_db($g_database_name);

/* read of the user connected */
$connected_user = user_connected();
$profile_connected_user = user_profile($connected_user);
$name_connected_user = user_name($connected_user,$g_database_name);
$name_profile_connected_user = profile_name($profile_connected_user);
display_connected_user($name_connected_user,$name_profile_connected_user);
echo "<br>";

$tab = explode( ":", $data);
$tab1 = explode( ":", $data1);
$tab_name = explode( "/", $tabname);

$names   = $tab_name;
$values  = $tab;
for ($i=0;$i<sizeof($tab);$i++) { 
	$bars[$i]= $g_icon_path."hbar_blue.gif";
	$dbars[$i]= $g_icon_path."hbar_orange.gif";
}
$largest = max($values);
if ( $largest == 0 or $largest <= 1 ) $largest =10;
if ($type == "project") {
	$graph_vals = array("vlabel"=>"P<BR>r<BR>o<BR>j<br>e<BR>c<BR>t<BR>s",
                    "hlabel"=>"Number of Tasks and Users",
					"type"=>3,
                    "cellspacing"=>"5",
                    "vfstyle"=>"Verdana, Arial, Helvetica",
                    "hfstyle"=>"Verdana, Arial, Helvetica",
					"hfcolor"=>"#606090",
					"hbgcolor"=>"#FFA500",
					"vfcolor"=>"#606090",
					"vbgcolor"=>"#c8c8e8",
                    "scale"=>200/$largest,
                    "namefstyle"=>"Verdana, Arial, Helvetica");
					
					$title2= "Tasks";
					$title1= "Users";
} 
if ( $type == "user" ){
	$graph_vals = array("vlabel"=>"U<BR>s<BR>e<BR>r<br>s",
                    "hlabel"=>"Number of Tasks and Projects",
					"type"=>3,
                    "cellspacing"=>"5",
                    "vfstyle"=>"Verdana, Arial, Helvetica",
                    "hfstyle"=>"Verdana, Arial, Helvetica",
					"hfcolor"=>"#606090",
					"hbgcolor"=>"#FFA500",
					"vfcolor"=>"#606090",
					"vbgcolor"=>"#c8c8e8",					
                    "scale"=>200/$largest,
                    "namefstyle"=>"Verdana, Arial, Helvetica");
					
					$title2= "Tasks";
					$title1= "Projects";
}
if ( $type == "prospect" ){
	$graph_vals = array("vlabel"=>"M<BR>a<BR>n<BR>a<br>g<BR>e<BR>r<BR>s",
                    "hlabel"=>"Number of Prospects",
					"type"=>3,
                    "cellspacing"=>"5",
                    "vfstyle"=>"Verdana, Arial, Helvetica",
                    "hfstyle"=>"Verdana, Arial, Helvetica",
					"hfcolor"=>"#606090",
					"hbgcolor"=>"#FFA500",
					"vfcolor"=>"#606090",
					"vbgcolor"=>"#c8c8e8",					
                    "scale"=>200/$largest,
                    "namefstyle"=>"Verdana, Arial, Helvetica");
					
					$title2= " Prospects";
					$title1= " Won Prospects";
}
// Everything is set up so call the function.
html_graph($tab_name, $tab, $bars, $graph_vals, $tab1, $dbars);

?>
<table align="center">
<tr>
<td>
<?
$path1 =$g_icon_path."hbar_orange.gif";
$path2 =$g_icon_path."hbar_blue.gif";
echo "<img src='$path1' height=10 width=20>".$title1;
echo "<br>";
echo "<img src='$path2' height=10 width=20>".$title2;
?>
</td>
</tr>
</table>
<?
include ("include_bottom.inc");
?>

</BODY>
</HTML>

Return current item: Work project