[PHP] passthru in IE: fullscreen display of SWF

2005-05-26 Thread dc

hi list-
(B
(BI am trying to display a SWF file fullscreen, but having problems with IE.
(B
(BThis is a SWF file that is sitting on the disc, and i want to do a simple  
(Bpassthru; works fine in opera, firefox, but not IE. Found some notes on  
(Bthis issue, realted to downloads, but not to full-screen display.

(B
(BAlso, do not see the same problems when doing dev from .net; so it is a  
(BPHP <> IE thing.

(B
(BI found a "content-disposition: inline" tip, but did not work.
(B
(BCode snip below
(B
(B
(Bfunction pass4($name) {
(B
(B // specify the REAL path for your file and not the URL
(B $path = getcwd()."./".$name;
(B
(B // "inline" to view file in browser
(B // or "attachment" to download to hard disk
(B $disposition = "inline";
(B
(B $mime = "application/x-shockwave-flash";
(B 
(B if (! $fd = fopen ($path, "rb")) {
(B die ("couldnt open $path");
(B } else {
(B $fsize=filesize($path);
(B // $fname= basename ($path);
(B
(B header("Cache-Control: no-cache, must-revalidate");
(B header("Pragma: no-cache");
(B header("Content-Type: $mime");
(B		header("Content-Disposition:$disposition;  
(Bfilename=\"".trim(htmlentities($name))."\"");

(B header("Content-Description: ".trim(htmlentities($name)));
(B header("Content-Length: ".(string)(filesize($path)));
(B header("Connection: close");
(B
(B fpassthru($fd);
(B }
(B}
(B
(B
(B-- 
(B___

(BDavid "DC" Collier
(Bmobile business creator $B!C%b%P%$%k!&%S%8%M%9!&%/%j%(!<%?!<(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)

(BTo unsubscribe, visit: http://www.php.net/unsub.php


[PHP] extending built in classes?

2004-10-09 Thread dc
Hi -
(B
(BI am trying to extend a built in class, but cannot seem to get my
(Bsubclass methods called.
(B
(Bclass movObj extends SWFMovie {
(B function init() {
(Becho("init");
(B }
(B}
(B
(B$m = new movObj();
(B$m->init();
(B
(BGives:::
(BFatal error: Call to undefined method SWFMovie::init() ...
(B
(BThis method call i would have hoped would pass up to the baseclass.
(B
(BBut if I add a constructor to my own subclass, the init method can be
(Bcalled. BUT i can now not call any of the SWFMovie methods. Like, it
(Bis not really extending the built in class, or there is no hierarchy.
(B
(BI messed with various versiosn of trying to call the super myself:
(B
(Bparent::method
(B$this->parent->method()
(B
(Bwithout much success.
(B
(BIs this a limitation of phps classes? We cannot subclass built in types
(B(perhaps they were built/not compatible with php5 object model)?
(B
(Bthanks!
(B 
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php

[PHP] move a record into a different table

2003-01-31 Thread DC
Hi all,

I want to delete a record from my table 1, but would like all the data for
that single record passed onto my (archive) table 2 at  the same time
Sounds easy!!

Any ideas??

Thanks

DC








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




[PHP] email a web page

2003-01-06 Thread DC
Hi all,

I have a newsletter ready to email to my database of customers.

The entire newsletter incl graphics , layout etc is enclosed within a form
which posts to a second page which s supposed to email the desired
page..but it does not work! The code is listed below

___

Unable to connect to the " .
"database server at this time." );

exit();

}

if (! @mysql_select_db("NameOfDataBase") )

{

echo( "Unable to locate the " .
"database at this time." );

exit();

}

?>

Error performing query: " .
  mysql_error() . "");
  exit();
 }
while ( $row = mysql_fetch_array($result) )
 {

 $message = "
 

::: Welcome to my Newsletter  :::






  



content content etc



  

  



";

  $email = $row["EmailAddress"];

  (line 79) $headers .= "From: My site.com<[EMAIL PROTECTED]>\n";
   $headers .= "X-Sender: <[EMAIL PROTECTED]>\n";
$headers .= "X-Mailer: testDC\n";
   $headers .= "Return-Path: <[EMAIL PROTECTED]>\n";
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
$subject = " Club Newsletter";
   (line 91) mail($email, $subject , $message, $headers);
$headers = "";

 }

echo("$message");

?>
_

and then I get this message each time.

Warning: Undefined variable: headers in
c:\www\cavalier\admin\newsletteremailcommand.php on line 79

Warning: Failed to Connect in
c:\www\cavalier\admin\newsletteremailcommand.php on line 91


Any quick and easy tips to get my newsletter happening? Even a new script or
easy tutorial in Englsih.


Thanks

DC





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




[PHP] connection

2002-09-29 Thread DC

Hi,

OK I have my first php/mysql web site complete & working on my computer
using apache server. When I transfer the files to web space, I receive
errors regarding connection to database. Obviously the various pieces of
code I have used to connect it all up eg


etc etc

needs to be changed to what to see the site working live ?

Any ideas or tips greatly appreciated!!!

Thanks

DC






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




[PHP] Word docs

2002-09-01 Thread DC

Hi,

I have 200 items in a mysql database.
Each has a word document with the path:

Assets/Reports/Docname.doc

How do I  open the word doc that is specific to the particular item?

Thanks

david
php novice





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




[PHP] Display criteria

2002-07-10 Thread DC

Hi

I want to display data based on the criteria selected by the user eg click
on size to display smallest to largest, or by price smallest to highest,
location etc etc

what is the code I need?

Thanks.

DC



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




[PHP] Date and time functions

2002-05-16 Thread DC

Hi all,

I am on the East Coast of Australia.

Do you know if by default if the date/time display will display only East
coast Australia time, or will display  from the user's time zone?
eg Will USA users see the Australian time or their own time?
Would this cause a issue with timestamping an order when it comes to writing
to a mySQL database?

Can someone suggest a script that may give me the option to offer both  time
zones to the user?

DC




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




[PHP] highlighting Search Results

2002-05-06 Thread DC

Hi all,

I have a mySQL database running with PHP4. I have constructed a search form
($searchSite) which returns results in a results page & now I want to have
the word that was entered in the search form highlight in the results page.

eg User enters a search for products using the word " gardening"

Results page might return:

"this shovel is a great gardening tool" and  "to be a expert in gardening,
you will need"...I want the word gardening to be bold wherever
it is displayed.

My results page has the following code to display search results: BTW it
works like a dream...I just want to jazz it up a bit.

");
echo("" . $row["Description"] . "");
echo("" . $row["ProductName"] . "");
echo("\$" . $row["RetailPrice"] . "");

?>

How do I do this to highlight my search words?

Thanks, any ideas much appreciated by this PHP newbie.

DC



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




[PHP] Re: javascript ?

2001-07-23 Thread dc

the second method should be hide()


"Dc" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> You will need to use DHTML with javascript. Try www.docjavascript.com and
> search for dhtml columns. I'm sure he has something about turning on and
off
> the display of items.
>
> The basic idea is you will change the display properties from none to
block
> and vice-versa.
>
> example
>
> function show() {
>
> rElement = document.getElementByID("ToGoDiv");
> rElement.setAttribute("display","block");
>
> }
>
> function show() {
>
> rElement = document.getElementByID("ToGoDiv");
> rElement.setAttribute("display","none");
>
> }
>
>
> "Angel Behar" <[EMAIL PROTECTED]> wrote in message
> 003101c113a7$7ae63d20$[EMAIL PROTECTED]">news:003101c113a7$7ae63d20$[EMAIL PROTECTED]...
> > Hi !!!
> >
> > I know maybe this is not the right place to make this question but I
have
> > been a PHP user for long time and this list had been very helpful.
> >
> > I want to create a form which once you select a radio button or a drop
> down
> > menu display the proper fields according to the selection.
> >
> > Let say that we have two options : To go and Pick Up. If the user select
> to
> > go then automatically display the address field, zip field etc, if the
> user
> > select pick up display the time field etc.
> >
> > I 've been looking a lot of javascript sites but can't find something
> > similar to that I want.
> >
> > Hope any of you can help me.
> >
> > Thanks in advance.
> >
> > Angel.
> >
> >
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: javascript ?

2001-07-23 Thread dc

You will need to use DHTML with javascript. Try www.docjavascript.com and
search for dhtml columns. I'm sure he has something about turning on and off
the display of items.

The basic idea is you will change the display properties from none to block
and vice-versa.

example

function show() {

rElement = document.getElementByID("ToGoDiv");
rElement.setAttribute("display","block");

}

function show() {

rElement = document.getElementByID("ToGoDiv");
rElement.setAttribute("display","none");

}


"Angel Behar" <[EMAIL PROTECTED]> wrote in message
003101c113a7$7ae63d20$[EMAIL PROTECTED]">news:003101c113a7$7ae63d20$[EMAIL PROTECTED]...
> Hi !!!
>
> I know maybe this is not the right place to make this question but I have
> been a PHP user for long time and this list had been very helpful.
>
> I want to create a form which once you select a radio button or a drop
down
> menu display the proper fields according to the selection.
>
> Let say that we have two options : To go and Pick Up. If the user select
to
> go then automatically display the address field, zip field etc, if the
user
> select pick up display the time field etc.
>
> I 've been looking a lot of javascript sites but can't find something
> similar to that I want.
>
> Hope any of you can help me.
>
> Thanks in advance.
>
> Angel.
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: how do you use a CLASS ???

2001-07-20 Thread dc

Class files should be independant of platform. However, that does not mean
it is not. For instance the class may query the database. So then it would
be dependant on the database, type of database, or whatever.

Your variables should not be the same name as your classes.
e.g.
$myCar = new Car()
$blueCar = new Car()
$redCar = new Car()

you should always have "new" and call the constructor (e.g. Car() ) when
creating a new instance or object.

"Sunny at wde" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ok, this must be the simplest question alive, but help me please??
>
> i've seen loads of classes all over the net, and i want to use them,
> but not sure where to start!
>
> are class files independent of platform??
> do you have to name your variables same as them?
>
> or do i just call it or something? they dont usually have
> documentation, so i'm a bit stumped :(
>
> /sunny
>
> 
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: how do you use a CLASS ???

2001-07-20 Thread dc

Lets say you have a class called Car.

You should see a "constructor in the class the same as the class name:

class Car {

function Car(possible params...) {

}

function start() {
...
}

function stop() {

}
}

To create a new car object you would do something like this:

$myCar = new Car(...possible params...);

Note that you should pass the parameters that the constructor expects (for
instance the constructor could have a parameter called type).

"Sunny at wde" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> ok, this must be the simplest question alive, but help me please??
>
> i've seen loads of classes all over the net, and i want to use them,
> but not sure where to start!
>
> are class files independent of platform??
> do you have to name your variables same as them?
>
> or do i just call it or something? they dont usually have
> documentation, so i'm a bit stumped :(
>
> /sunny
>
> 
> Do You Yahoo!?
> Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
> or your free @yahoo.ie address at http://mail.yahoo.ie



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] custom tag support

2001-07-09 Thread dc

I was simply looking for a way to easily develop re-usable components. I
know that functions can be used in php, however, the custom tag (xml type)
syntax is more clean and easy to view. I may try using xml with functions to
get what I desire.

I don't think custom tags will go away with functions. They exist in jsp
also and are good to use. In fact at Java One there was a push towards
removing all java code from the jsp. Simply use custom tags. This allows you
to divide your development team into java guru's and web guru's. The web
developers would not need to know all of the java code. They would simply
need a listing of the custom tags. This becomes handy if you have people
that are inexperienced in Java. You can give them a small pocket reference
of the tags you use in the jsp's rather than a 1-2 inch book on Java.

As for the C approach...I may try that also. I'll have to dust off my
Ritchie book.

Thanks for the help,
Dan


"Michael Kimsal" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> dc wrote:
>
> >I was curious if there was any custom tag support like jsp or cold fusion
in
> >php (or outside libraries). I'm looking at trying to make re-usuable
> >components and want to use something more than including simple classes
or
> >function calls.
> >
> >Thanks for your time,
> >
> If you know C, then yes.  You can write your own C libraries to be
> compiled in to PHP to give
> you new 'built in' functions.  Personally, I'm not good enough with C to
> do that, and am not sure that you'd
> get enough of a speed boost to justify it.  Probably in some cases you
> would, but is that the reason (speed?)
> you're asking?
>
> I wonder how many CF people will be writing custom tags still now that
> CF5 finally allows user-defined functions.;
>
> Michael Kimsal
> http://www.tapinternet.com/php/
> PHP Training Courses
> 734-480-9961
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] custom tag support

2001-07-06 Thread dc

I was curious if there was any custom tag support like jsp or cold fusion in
php (or outside libraries). I'm looking at trying to make re-usuable
components and want to use something more than including simple classes or
function calls.

Thanks for your time,




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]