Re: clearing cache ...... still not workin out

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



heres my code pitor 
for generate_graph.php

this file is included in all query files ...... 


=======================


// ma data 

$max_data = count($gfData);

for ($k = 0; $k < $max_data; $k++)
{
	//$arrData[$k] = $gfData[$k] * $factor ;
	$data[$k] = $gfData[$k]  ;
}




// Create the Pie Graph.
$graph = new PieGraph(650,400,"auto");
$graph->SetShadow();


//split title :P:P:P  ! ! ! !

$newStr=""; 

$newStr = explode( "/r/n", $title );

$graph->title->Set("$newStr[0]");
$graph->subtitle->Set("$newStr[1]");
$graph->title->SetFont(FF_VERDANA,FS_BOLD,18); 
$graph->title->SetColor("darkblue");
$graph->legend->Pos(0.1,0.2);

// Create 3D pie plot
$p1 = new PiePlot3d($data);
$p1->SetTheme("sand");
$p1->SetCenter(0.4);
$p1->SetSize(150);

// Adjust projection angle
$p1->SetAngle(45);

// Adjsut angle for first slice
$p1->SetStartAngle(45);

// Display the slice values
$p1->value->SetFont(FF_ARIAL,FS_BOLD,11);
$p1->value->SetColor("navy");

// Add colored edges to the 3D pie
// NOTE: You can't have exploded slices with edges!
$p1->SetEdge("navy");


for ($i = 0; $i < $max_data; $i++)
{
	if ($arrData[$i] > $max_value)
		$max_value = $arrData[$i];

	if ( strlen($label[$i]) > $max_label_width )
		$max_label_width = strlen($label[$i]);

$p1->SetLegends($label);

$ttl_rkrdz = array_sum($gfData);
}


$graph->Add($p1);
$graph->Stroke("abc.jpg");
	
	echo("
			<table width='100%' border='0'>
			
				<tr><td>&nbsp;</td></tr>
				<tr><td>&nbsp;</td></tr>
				<tr> <td align='center'>
					<img src=abc.jpg>
				</td> </tr>
			</table>
			
			<br><br><br>
	");
	


$table_text = "<table align='center' border='0'><tr><td
align='center'>&nbsp;</td></tr>
				
				<tr><td align='center'></td></tr><tr><td align=center ><br><table
border=4><tr>";



for ($i = 0; $i < $max_data; $i++)
{
	if ($arrData[$i] > $max_value)
		$max_value = $arrData[$i];

	if ( strlen($label[$i]) > $max_label_width )
		$max_label_width = strlen($label[$i]);

	$table_text = $table_text . "<th> " . $label[$i] . " </th>";
	$ttl_rkrdz = array_sum($gfData);

}
$table_text = $table_text . "</tr>";
$table_text = $table_text . "<tr>";


for ($i = 0; $i < $max_data; $i++)
{

	$table_text = $table_text . "<td style= \"font-family: $font\" >" .
$gfData[$i] . "</td>";
	
	
}
$table_text = $table_text . "</tr>
		</table></td></tr>
		<tr>
			<td style= \"font-family: $font\"> </td> 
		</tr>
				<tr><td>&nbsp;</td></tr>
				
		<tr> <td>
		<table border='4' align=center> 
		<tr>
			<th width='50%' valign='center' style= \"font-family: $font\">
Total Records&nbsp; </th>
			<td width='50%' valign='center' style= \"font-family: $font\">
$ttl_rkrdz </td> 
		</tr>
		</table>
		</td>
		</tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td>&nbsp;</td></tr>
		<tr><td>&nbsp;</td></tr>				
		";
		
echo($table_text);


=========================================


thnx a mill again

toby


--- Piotr Pluciennik <ppluciennik@yahoo.com> wrote: > How do you send
this file generated graph to the
> client browser? 
> Are you using one of the functions ImagePNG(),
> ImageWBMP(), ImageJPEG() 
> or 
> are you presenting a link to your graph in php
> generated html output? 
> 
> Piotr
> 
> --- toby z <blue_myth_1@yahoo.com> wrote:
> > thnx guyz
> > 
> > but i have tried 
> > 
> > header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");   
> > // Date in the
> > past
> > header("Last-Modified: " . gmdate("D, d M Y H:i:s")
> > . " GMT");   //
> > always modified
> > header("Cache-Control: no-store, no-cache,
> > must-revalidate");  //
> > HTTP/1.1
> > header("Cache-Control: post-check=0, pre-check=0",
> > false);
> > header("Pragma: no-cache");                        
> > // HTTP/1.0
> > 
> > 
> > and it aint working either .....
> > 
> > its still the same .... have to refresh the dammed
> > page .....
> > 
> > i must be scewing something somewhere .....
> > cant figure out what n where .....
> > 
> > anyother ideas anyone .....
> > 
> > thanx a mill ....
> > 
> > toby
> > 
> >  --- Piotr Pluciennik <ppluciennik@yahoo.com> wrote:
> > > Before sending
> > your graph with: 
> > > 
> > > Imagegif($im);
> > > 
> > > try things like that:
> > > 
> > > Header("Expires: Fri, 10 Jun 1976 07:00:00 GMT");
> > > 
> > > HTH
> > > Piotr
> > > 
> > > --- toby z <blue_myth_1@yahoo.com> wrote:
> > > > hay guyz
> > > > 
> > > > this is a rather silly thing
> > > > but its starting to drive me now
> > > > 
> > > > i have a page with a million switches ....
> > checkin
> > > > and including
> > > > files for each case .....
> > > > 
> > > > the files on their turn run a few queries 
> > > > and then each calls a file generate graph 
> > > > which generates a graph for the query rum
> > earlier in
> > > > the caller file
> > > > 
> > > > u know the works .....
> > > > 
> > > > the problem is
> > > > 
> > > > each file passes to the grapgh file the data
> > fetched
> > > > and the title of
> > > > the graph
> > > > 
> > > > unless i re-fresh the page the graph displayed
> > last
> > > > keeps appearing
> > > > and re-appearing 
> > > > with the old title n old data u know .....
> > > > caching the old one ...... :S
> > > > 
> > > > i stumbled upon clearstatcache()
> > > > but it aint seem to be workin either
> > > > 
> > > > 
> > > > and another thing
> > > > this screwup happens only on remote machines not
> > on
> > > > ma own 
> > > > not on the server u know ......
> > > > 
> > > > what else can i do to clear the cache without
> > having
> > > > to tell ma
> > > > clients to refresh the page each time 
> > > > (they cant even turn the compu on properly
> > ...... :)
> > > > )
> > > > 
> > > > will sumbdy plz tell me .....
> > > > as im pretty lost in the cache clearing thinggy
> > > > .....
> > > > 
> > > > 
> > > > thnx a mill guyz
> > > > 
> > > > toby


________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux