Location: PHPKode > projects > interface preprocessor for php > ippfp-0.2.10/ippfp/ippfp.php
<?

    define("IPPFP_DEFAULTBROWSER","mozilla");
    define("IPPFP_DEFAULTIMAGEVIEWER","gimp");

    if(!START) define("START","start");

    if($_SERVER["argv"][1] == "GTK") define("FORMAT", "GTK");
    else if($_SERVER["argv"][1] == "NCURSES") define("FORMAT", "NCURSES");
    else define("FORMAT", "XHTML");

    require_once(dirname(__FILE__).'/application.php');

    $ippfp = new ippfp_application(FORMAT, "", "");

    if(FORMAT == "XHTML"){
	session_start();
	if(!session_id()) { echo "Session expired."; die(); }

	if(!$_POST["status"]){
	    $status=START;
	} else {
	    $status = $_POST["status"];
	}

    } else if(FORMAT == "NCURSES"){
	global $status;
	$status = START;
	$GLOBALS["status"] = START;
	$status = &$GLOBALS["status"];
    }  else if(FORMAT == "GTK"){
	global $status;
	$status = START;
	$GLOBALS["status"] = START;
	$status = &$GLOBALS["status"];
    }  else if(FORMAT == "PDF"){
	global $status;
	$status = START;
	$GLOBALS["status"] = START;
	$status = &$GLOBALS["status"];
    } else echo "no format specified.";

?>
Return current item: interface preprocessor for php