Welcome, Guest. Please login or register.
Did you miss your activation email?
05/21/12, 04:31
Home Help Search Login Register
News: Parsley Flex framework review featuring quiz application, in our Flex frameworks series
Flex SDK 4.5 mobile roadmap: begin with your mobile development
Swiz Flex framework review featuring quiz application
New homepage we release our new Homepage, take a look ...

+  Flash-db
|-+  Recent Tutorial Support
| |-+  Flash Ecards (Moderators: Flash-db, vesa kortelainen, Ronald Wernecke, Mohsin Sumar, Jorge Solis)
| | |-+  Help with installation
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 Print
Author Topic: Help with installation  (Read 6428 times)
hoknight
Server what's that
*
Posts: 9


View Profile Email
« on: 11/01/06, 02:52 »

 ???Help! I am trying to install this application on our website. I am following the instructions and it didn't show the web page.
Please take a look and check for me what is the mistake?
http://www.tstscc.org/temp/Johnny/Ecards/SelectCard.php
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #1 on: 11/01/06, 09:31 »

Does your server support php? The page have basically nothing.

Jorge
Logged

hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #2 on: 11/01/06, 21:40 »

Yes, this server support php but the OS is Unix.
Our hosting support said enable php already.
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #3 on: 11/03/06, 02:46 »

Ok, I see. The script is very old, and servers currently have globals disabled (see http://www.flash-db.com/Board/index.php?topic=7713.0) Add something like this at the very beginning of the PHP script:

foreach($getvars as $var)
  if(isset($_GET[$var]))
     $$var = $_GET[$var];
foreach($getvars as $var)
  if(isset($_POST[$var]))
     $$var = $_POST[$var];

Jorge
Logged

hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #4 on: 11/06/06, 01:03 »

Sorry,would you please tell me more details?
What var in this case I should fill in the "$var"?
Logged
Jorge Solis
Administrator
Systems Administrator
*****
Posts: 14600


View Profile
« Reply #5 on: 11/06/06, 02:30 »

The script convert into variables each value that comes in $_POST and $_GET arrays, just put it

Jorge
Logged

hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #6 on: 11/06/06, 06:54 »

I just copy & paste your code at beginning of PHP script:

#!/usr/local/bin/php5

<HTML>
<HEAD>
<TITLE>Here's your Flash Ecard - from the Flash-dB.com Tutorial</TITLE>
<?
foreach($getvars as $var)
  if(isset($_GET[$var]))
     $$var = $_GET[$var];
foreach($getvars as $var)
  if(isset($_POST[$var]))
     $$var = $_POST[$var];
switch ($ENum) {

   case '1':
   $goto = "Ecard1.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=1";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '2':
   $goto = "Ecard2.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=2";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '3':
   $goto = "Ecard3.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=3";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '4':
   $goto = "Ecard4.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=4";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;

   case '5':
   $goto = "Ecard5.swf?EcardText=".$EcardText;
   $gotoFooter = "EcardFooter.swf?EcardText=".$EcardText."&EcardSelect=5";
   $Dimensions = "WIDTH=700 HEIGHT=525";
   $DimensionsFooter = "WIDTH=700 HEIGHT=250";
   break;
}

?>
</head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0">
<center>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
 <? print "$DimensionsFooter";?>>
    <param name="allowScriptAccess" value="sameDomain" />
    <PARAM NAME=movie VALUE="<? print "$gotoFooter";?>">
    <PARAM NAME=quality VALUE=high>
   <param name="bgcolor" value="#FFFFFF" />
    <EMBED src="<? print "$gotoFooter";?>" quality=high bgcolor="#FFFFFF" <? print "$DimensionsFooter";?> allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ></EMBED>
  </OBJECT>
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab"
 <? print "$DimensionsFooter";?>>
    <param name="allowScriptAccess" value="sameDomain" />
    <PARAM NAME=movie VALUE="<? print "$gotoFooter";?>">
    <PARAM NAME=quality VALUE=high>
   <param name="bgcolor" value="#FFFFFF" />
    <EMBED src="<? print "$gotoFooter";?>" quality=high bgcolor="#FFFFFF" <? print "$DimensionsFooter";?> allowScriptAccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" ></EMBED>
  </OBJECT>
</center>
</BODY>
</HTML>

Would you tell me what is the mistake here?
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #7 on: 11/06/06, 10:42 »

Hi,

one line missing....
the code block would be
$getvars = array('ENum','EcardText');
foreach($getvars as $var)
  if(isset($_GET[$var]))
     $$var = $_GET[$var];
foreach($getvars as $var)
  if(isset($_POST[$var]))
     $$var = $_POST[$var];

You can use this kind of script with other projects (e.g. email form) as well - jiust put a list of the variables that the script expects from flash

Musicman
Logged
hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #8 on: 11/06/06, 20:45 »

I added this line but the web page still can't show the flash.
http://www.tstscc.org/temp/Johnny/Ecards/SelectCard.php
How can I solve the problem in this case?
I also post SendEcard.php source code for try to check all process:

#!/usr/local/bin/php5

<?

$CreateEcard = date(U);

$filename = $CreateEcard.".txt";

$ToName = stripslashes($ToName);
$FromName = stripslashes($FromName);
$Greeting = stripslashes($Greeting);
$IntroMessage = stripslashes($IntroMessage);
$EndMessage = stripslashes($EndMessage);

$Today = (date ("l dS of F Y ( h:i:s A )",time()));

$Created="Ecard Created on $Today";

$EcardNum = $EcardSelect;

$EcardText = "ToName=$ToName&ToEmail=$ToEmail&FromName=$FromName&FromEmail=$FromEmail&Greeting=$Greeting&IntroMessage=$IntroMessage&Created=$Created";


$fp = fopen( "./dBText/$filename","w");
fwrite($fp, $EcardText, 10000);
fclose( $fp );

######Email Card########
## You can change the subject and the message part around.
## Make sure to change the Link as stated in the Tutorial.
## (Change from 'someSite' to your actual site - leave the rest the same


$ToSubject = "You have recieved a Flash Ecard from $FromName";
$Message = "$ToName,\nYou have recieved a Flash card from $FromName. \nClick the following link to view your card:\n\n http://www.tstscc.org/temp/Johnny/Ecards/SelectCard.php?EcardText=$CreateEcard&ENum=$EcardNum\n\n-----------------------------------\nHere is the message that was sent:\n$ToName,\n$Greeting\n$IntroMessage\n\n-$FromName\n\n\n-----------------------------------\nThis card was sent from www.flash-db.com/Ecards/\n\nThe Flash-dB Team.";


###################
## This line actually sends the email - you should not have to change this.

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FromName." <".$FromEmail.">");


## This next line returns a success message to the movie.
print "_root.Status=Success your Card Has Been Sent!";

#### End #########
## By: Jeffrey F. Hill
## www.flash-db.com

?>

Please help to check.
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #9 on: 11/07/06, 00:51 »

Hi,

you woukd need to add the same script to that php is well, but with a different list of variables (ToEmail, ToName,, EcrdSelect, ....)

M usicman
Logged
hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #10 on: 11/07/06, 01:12 »

You mean like that?

$getvars = array('ENum','EcardText');
$getvars = array('ToEmail','EcardText');
$getvars = array('ToName','EcardText');
$getvars = array('ToSubject','EcardText');
$getvars = array('Message','EcardText');

foreach($getvars as $var)
  if(isset($_GET[$var]))
     $$var = $_GET[$var];
foreach($getvars as $var)
  if(isset($_POST[$var]))
     $$var = $_POST[$var];

sorry for my stupid  Embarrassed
Logged
Musicman
Administrator
Systems Administrator
*****
Posts: 2685



View Profile WWW Email
« Reply #11 on: 11/08/06, 02:13 »

$getvars = array('ENum','EcardText,'ToEmail','ToName','ToSubject','Message');

Musicman
Logged
hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #12 on: 11/09/06, 01:22 »

The code changed:

$getvars = array('ENum','EcardText','ToEmail','ToName','ToSubject','Message');
foreach($getvars as $var)
  if(isset($_GET[$var]))
     $$var = $_GET[$var];
foreach($getvars as $var)
  if(isset($_POST[$var]))
     $$var = $_POST[$var];

However, the flash still can't load on page. If check the resoure in IE. I can't see the php script embed the var.

How to fix that?
Logged
hoknight
Server what's that
*
Posts: 9


View Profile Email
« Reply #13 on: 11/09/06, 20:24 »

I have try another server to run this script. Almost the same cannot insert the flash in webpage.
http://hoknight.homedns.org:5050/Ecards/SelectCard.php
Is it php script mistake?
Logged
mr-webcam
Server what's that
*
Posts: 27



View Profile WWW
« Reply #14 on: 11/15/06, 13:50 »

Looking at the source code on your page, i see that you havent entered a path or file name in the following
<EMBED src=""  for any of the flash files
you should be putting the path to your flash file between " "
example <EMBED src="myflashfile.swf" 
« Last Edit: 11/15/06, 13:52 by mr-webcam » Logged

http://www.mr-webcam.co.uk
live webcams and chat applications
Pages: [1] 2 Print 
« previous next »
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!