Login   Register  
PHP Classes
elePHPant
Icontem

File: flashPash.firefly.demo.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Simon McKenna  >  flashPash  >  flashPash.firefly.demo.php  >  Download  
File: flashPash.firefly.demo.php
Role: Example script
Content type: text/plain
Description: PHP script for Firefly demo
Class: flashPash
Database automation for Flash and PHP
Author: By
Last change:
Date: 2003-07-15 12:11
Size: 2,221 bytes
 

Contents

Class file image Download
<?php

/*==-==-==-==-==-==-==-==-==-==-==-==-==-==-==+
 |   flashPash PHP script for firefly demo    |
 +==-==-==-==-==-==-==-==-==-==-==-==-==-==-==+
 |              version 1.0 *RC1*             |
 |                                            |
 | last update on 2003-07-02 by si*sshnug.com |
 |                                            |
 |     Copyright (c) 2003, Simon Mckenna      |
 |            All rights reserved             |
 +==-==-==-==-==-==-==-==-==-==-==-==-==-==-==+
 | source best viewed with tab space set to 2 |
 +==-==-==-==-==-==-==-==-==-==-==-==-==-==-==*/

/*
This is a demo of how you can use the FlashPashServerClass from a HTTP posted XML document.
See flashPash.PHP.demo.php for a demo of how to use flashPash from just within PHP.

for ease of use this demo is passing database access parameters over HTTP, you should *NOT* 
do this in a live production environment, it's an invitation to be hacked.

Please note this script assumes you have your PHP.INI pathed so it can 
see the flashPash root directory.   By default the flashPash directory
is installed into the PHP 'includes' directory.  eg. C:\PHP4\includes
So you need only set PHP.INI include_path to ..."C:\PHP4\includes"...
*/
require_once 'flashPash/flashPash.php'
require_once 
'flashPash/flashPash.firefly.php'

/* see if demo wants debugging on */
if ( isset( $_GET'debug' ] ) && ( $_GET'debug' ] ))
    
$debug FP_LOG_TEXT;

/* create new instance of flashPash */ 
$fpDemo = new FlashPashServerClassFP_SOURCE_XMLstripslashes$_GET['dbType'] ), 'localhost'stripslashes$_GET['dbName'] ), stripslashes$_GET['dbUser'] ), stripslashes$_GET['dbPass'] ), $debug );

/* see flashPash.roles.file for example XML and read checkRole property in PHP reference help */
$fpDemo->checkRole true;
$fpDemo->role 'fireflyDemo';
$fpDemo->errorReporting stripslashes$_GET['errorReporting'] );

/* point our logfile so the public can see it */
$fpDemo->logfile $_SERVER'DOCUMENT_ROOT' ] . '/flashPash/demo/logs/log.firefly.demo';

/* let flashPash do it's thang */
$fpDemo->execute();

/* return result back to client and you're done! */
$fpDemo->dumpXML();

?>