Location: PHPKode > projects > FiForms Framework > FiForms/scripts/index.php
<?php
/*  This file is part of the FiForms Framework
    Copyright (C) 2003-2008 by Daniel McFeeters,
    Licensed under the GNU GPL. 
    See LICENSE.txt for details. 
*/

//if the file localconfig.php exists, then include it
if(file_exists('localconfig.php'))
{
        include_once('localconfig.php');
}
else //else go to the the php file that edits and creates the localconfig.php file
{
        header('Location: editConfig.php');
}
if(!is_array($FIFORMS_CONFIG))
{
  die("No configuration array, although localconfig.php exists. Please check localconfig.php.");
}

require_once($FIFORMS_CONFIG['INCLUDE_PATH'].'FiForms_genericIcons.inc.php');
require_once($FIFORMS_CONFIG['INCLUDE_PATH'].'FiForms_global.inc.php');

require_once($FIFORMS_CONFIG['AUTH_MODULE']);
$auth = new FiFormsAuth();
if(!@mysql_connect($FIFORMS_CONFIG['DEFAULT_SERVER'],$auth->username,$auth->passwd))
{
        $auth->connectFailure();
        die();
}
mysql_close();


?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html >
<head>
<title>FiForms Applications</title>

 <link rel="stylesheet" href="<?php echo $FIFORMS_CONFIG['URI']; ?>themes/<?php echo $FIFORMS_CONFIG['ICON_SET']; ?>/fiform_style.css" /> 

<meta name="generator" 
    content="FiForms PHP Projects www.fiforms.org" >
<style type="text/css">
div.summary
{
font-style: italic;
padding-left: 16pt;
width: 400px;
padding-bottom: 16pt;
}
</style>
</head>
<body>
<h1>FiForms Applications</h1>
<ul>
<?php
if(is_array($FIFORMS_CONFIG['AVAILABLE_APPS']))
{
    foreach($FIFORMS_CONFIG['AVAILABLE_APPS'] as $app)
    {
        if(is_array($FIFORMS_CONFIG['AVAILABLE_APP_INFO'][$app]))
        {
            $appTitle = $FIFORMS_CONFIG['AVAILABLE_APP_INFO'][$app]['apptitle'];
            $appSummary = "<div class=\"summary\">".$FIFORMS_CONFIG['AVAILABLE_APP_INFO'][$app]['appsummary']."</div>";
        }
        else
        {
            //print_r($FIFORMS_AVAILABLE_APP_INFO);
            $appTitle = $app;
            $appSummary = "";
        }
        echo "<li><a href=\"".$FIFORMS_CONFIG['URI']."list.php?app=$app&index=main.xml\">$appTitle</a>$appSummary</li>";
    }
}
else
{
    echo "<li>No applications available. Please check your configuration.</li>";
}
        if($FIFORMS_CONFIG['UPDATE_HOST'] === "any" || ($FIFORMS_CONFIG['UPDATE_HOST'] === "localhost" && $_SERVER['REMOTE_ADDR'] === "127.0.0.1"))
        {
            ?><li><a href="<?php echo $FIFORMS_CONFIG['URI']; ?>createapp.php">Create an Application</a></li>
            <li><a href="<?php echo $FIFORMS_CONFIG['URI']; ?>update.php">Install More Applications</a></li>
          <li><a href="<?php echo $FIFORMS_CONFIG['URI']; ?>info.php">FiForms Info</a></li>
          <li><a href="<?php echo $FIFORMS_CONFIG['URI']; ?>editConfig.php">Configure FiForms</a></li>
        <?php
        }        
?>
<li><a href="http://www.fiforms.org/">FiForms Home</a></li>
</ul>
</body>
</html>
Return current item: FiForms Framework