php-windows Digest 4 Sep 2003 21:32:46 -0000 Issue 1900
Topics (messages 21318 through 21322):
Re: stuck with substr now ....... solved ! ! ! !
21318 by: toby z
Re: Cant get maths functions to work in class file
21319 by: Miha Nedok
problems with iframes?
21320 by: Croskerry, Dan
21321 by: Angelo Zanetti
A bd problem
21322 by: Carlos Castillo
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
thnxthnx for your reply
the problems has already been solved thnx to chris
n yeah i was screwing up the /r/n -> \r\n thinggy .....
:)
toby
--- DvDmanDT <[EMAIL PROTECTED]> wrote: > Are you sure you mean
/r/n? I think you mean \r\n which is a
> windows
> line-end..
>
> --
> // DvDmanDT
> MSN: [EMAIL PROTECTED]
> Mail: [EMAIL PROTECTED]
> "Toby z" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > hay guyz
> >
> > im stuck with substr now
> >
> > im sure i ve actually lost it ....
> >
> > i have a string being passed to a graph as its title
> > and the title is being retrieved from mysql db
> >
> > now whenever i store anything with <br> or /r/n
> > its displayed normally on the screen
> >
> > but this time i have to pass this to a jpeg chart being created
> by jd
> > library
> > which is then displayed on the screen
> >
> > and the title gets displayed as
> >
> > Medicine Reports /r/n (report generated for below 60% stocked
> > medicines)
> >
> > where its supposed to display
> >
> > Medicine Reports
> > (report generated for below 60% stocked medicines)
> >
> >
> > i have tried a few functions but none of them seem to be working
> >
> > i can, however pass two strings as title and sub-title to the
> graph
> > function call
> >
> > and for this i need to splitt the title retrieved from db to two
> > strings ......
> >
> >
> >
> > =================================================================
> >
> >
> > <?php
> >
> >
> >
> > //$pg='rprt_gf_py_3d_1';
> > // ma dta
> >
> > $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(850,600,"auto");
> > $graph->SetShadow();
> >
> >
> >
> > /*************************
> > trying 2 split title :P:P:P ! ! ! !
> > **************************/
> >
> >
> > $newStr="";
> > //Replacing \n with <br>
> > /*$tok = strtok($title,":P");
> > while ($tok) {
> > $newStr = $newStr.$tok."<br>";
> > $tok = strtok(":P");
> > }
> > */
> > $tok = split($title,":P");
> > //while ($tok) {
> > $newStr = $newStr.$tok."<br>";
> > //$tok = substr(":P");
> > //}
> >
> > echo ($newStr);
> >
> >
> > //$newStr = explode("\r\n","$title");
> > //$newStr = explode(chr(10),"$title");
> > //$newStr = preg_split("/[ \t]+/", $title);
> >
> >
> >
> >
> >
> >
> > // Set A title for the plot
> > $graph->title->Set("$newStr");
> > $graph->subtitle->Set("sub");
> > $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='1'>
> > <tr> <td align='right'>
> > <img src=abc.jpg>
> > </td> </tr>
> > </table>
> >
> > <br><br><br>
> > ");
> >
> >
> >
> > $table_text = "<table align=center border='0'><tr><td
> > align='center'> </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> </td></tr>
> >
> > <tr> <td>
> > <table border='4' align=center>
> > <tr>
> > <th width='50%' valign='center' style= \"font-family: $font\">
> > Total Records </th>
> > <td width='50%' valign='center' style= \"font-family: $font\">
> > $ttl_rkrdz </td>
> > </tr>
> > </table>
> > </td>
> > </tr>
> > <tr><td> </td></tr>
> > <tr><td> </td></tr>
> > <tr><td> </td></tr>
> > ";
> >
> > echo($table_text);
> >
> > ?>
> >
> >
> > =============================================================
> >
> >
> > will someone plz jerk me out of this ..... ?????
> >
> > thnx a million
> >
> > toby
> >
> >
>
________________________________________________________________________
> > Want to chat instantly with your online friends? Get the FREE
> Yahoo!
> > Messenger http://uk.messenger.yahoo.com/
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
--- End Message ---
--- Begin Message ---
or:
echo "price * two is ". ($this->UnitPrice*2) . "<br>";
-Mike
On Wed, 3 Sep 2003, Ignatius Reilly wrote:
> Date: Wed, 3 Sep 2003 17:31:25 +0200
> From: Ignatius Reilly <[EMAIL PROTECTED]>
> To: Win32 list PHP <[EMAIL PROTECTED]>,
> Mark Harrington <[EMAIL PROTECTED]>
> Subject: Re: [PHP-WIN] Cant get maths functions to work in class file
>
> echo() can interpolate a variable, but not an expression such as
> "$this->Unitprice*2"
>
> replace:
> echo " price * two is $this->Unitprice*2<BR>";
>
> by:
> $bytwo = $this->Unitprice*2 ;
> echo " price * two is $bytwo<BR>";
>
> HTH
> Ignatius
> _________________________
> ----- Original Message -----
> From: "Mark Harrington" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 03, 2003 4:54 PM
> Subject: [PHP-WIN] Cant get maths functions to work in class file
>
>
> > I have designed a class that multiplies one of the varibles by two but
> when
> > i pass the values to the contructor i cant get the answer out any ideas
> >
> > Here is the full script "If you can recognise the problem can you explain
> > why its wrong and why its not working "Ps learning the langauge "
> >
> > The Class File
> >
> > class purchase {
> >
> > var $PartNumber;
> > var $Description;
> > var $Unitprice ;
> >
> >
> > // this is the constuctor
> >
> > function purchase($partnumber,$desc,$price)
> > {
> > $this->PartNumber = $partnumber;
> > $this->Description =$desc;
> > $this->Unitprice =$price;
> > echo "Object created partNumber = $this->PartNumber <br>";
> > echo " This Objects Description = $this->Description <br>";
> > echo " This Objects Price is $this->Unitprice <BR>";
> > //this doesnt work why ??
> > echo " price * two is $this->Unitprice*2<BR>";
> > }// end constructor
> >
> >
> > }
> >
> >
> > $myObject = new purchase(1,"Speaker",23.00);
> >
> > ?>
> >
> >
> > [EMAIL PROTECTED]
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
I'm passing an url parm to 2 iframes that load within a third iframe. They
seem to load quickly enough and the pages in the iframes render fine but the
status meter in the status bar never completes. It gets to about 4 bars and
then stalls there. The message in the status bar, however, states "Done". My
code is quite simple and I am fairly sure there are no problems with it.
Perhaps I can just ignore this. I guess what I am wondering is has anyone
out there had any problems with calling/loading iframes dynamically?
Cheers,
Dan
--- End Message ---
--- Begin Message ---
not sure what your problem is but why dont you use Div's that scroll???
they seem to give less hassle than iframes. c
HTH angelo
-----Original Message-----
From: Croskerry, Dan [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 04, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] problems with iframes?
I'm passing an url parm to 2 iframes that load within a third iframe. They
seem to load quickly enough and the pages in the iframes render fine but the
status meter in the status bar never completes. It gets to about 4 bars and
then stalls there. The message in the status bar, however, states "Done". My
code is quite simple and I am fairly sure there are no problems with it.
Perhaps I can just ignore this. I guess what I am wondering is has anyone
out there had any problems with calling/loading iframes dynamically?
Cheers,
Dan
--- End Message ---
--- Begin Message ---
Title: Mensaje
HI, i have the following
problem
Im working with sql server 2000 in a windows
xp pc, then in the bd i have a table called "noticias" and a text type field,
when i insert into the field everything goes rigth, but when i try to get the
info of teh field, i can get all the info, is like the variable is not enough to
save all the info but im sure that all the info is in the bd, the code is the
following:
$consulta = new
BaseDatos; $consulta->connect(); $sql = "select * from
Noticias where Id=".$_GET["id"]; $res =
$consulta->query($sql); $not =
$consulta->fetch_row($res); $not["Descripcion"] =
eregi_replace(chr(13),"<br>",$not["Descripcion"]);
echo $not["Descripcion"];
when i do an echo for $not["Descripcion"] i
can see that it doesnt have all the info of the field Descripcion on the
table noticias.
can you help me please?, is
urgent!
thanks!
Carlos A.
Castillo. Ingeniero de desarrollo [EMAIL PROTECTED]____________________________________
![]()
Su Aliado Efectivo en Internet www.imagine.com.co(57
1)2182064 - (57 1)6163218 Bogotá - Colombia
____________________________________ - Soluciones web para Internet e
Intranet
- Soluciones para redes - Licenciamiento de
Software - Asesoría y Soporte
Técnico ____________________________________
|
--- End Message ---