| 1 | rodolico | 1 | <?php
 | 
        
           |  |  | 2 |   | 
        
           |  |  | 3 |    /* 
 | 
        
           |  |  | 4 |     * Example script for camp v2 configuration file
 | 
        
           |  |  | 5 |     * This should be stored in  the directory above web root
 | 
        
           |  |  | 6 |     * and named camp2_config.php
 | 
        
           |  |  | 7 |     * It is caled from header.php
 | 
        
           |  |  | 8 |    */
 | 
        
           |  |  | 9 |    global $loginScriptName;
 | 
        
           |  |  | 10 |   | 
        
           |  |  | 11 |     $loginScriptName = 'login.html'; // this is the name of the login script. If the user is not logged in, this will be called no matter what else is happening
 | 
        
           |  |  | 12 |   | 
        
           |  |  | 13 |   | 
        
           |  |  | 14 |    $common_cgi = '';
 | 
        
           |  |  | 15 |    mysql_connect( 'localhost', 'db user name', 'db password') or die(mysql_error());
 | 
        
           |  |  | 16 |    mysql_select_db('db name') or die(mysql_error());
 | 
        
           |  |  | 17 |   | 
        
           |  |  | 18 |    // pick up any functions defined by the program
 | 
        
           |  |  | 19 |    include_once('functions.php');
 | 
        
           |  |  | 20 |   | 
        
           |  |  | 21 |    /* 
 | 
        
           |  |  | 22 |     * Add smarty for template processing. Note in this case, smarty is a
 | 
        
           |  |  | 23 |     * global function. used  by more than one program and it is
 | 
        
           |  |  | 24 |     * stored outside the directory tree (ie, same level as documentroot)
 | 
        
           |  |  | 25 |    */
 | 
        
           |  |  | 26 |    define('SMARTY_DIR', realpath( $_SERVER['DOCUMENT_ROOT'] . '../smarty' ) . '/libs/' );
 | 
        
           |  |  | 27 |   | 
        
           |  |  | 28 |   | 
        
           |  |  | 29 | /*
 | 
        
           |  |  | 30 |    if ( basename($_SERVER['PHP_SELF']) != $loginScriptName && ! isset($_SESSION['login_id']) ) {
 | 
        
           |  |  | 31 |       redirectPage($loginScriptName);
 | 
        
           |  |  | 32 |    }
 | 
        
           |  |  | 33 | */
 | 
        
           |  |  | 34 |   | 
        
           |  |  | 35 | ?>
 |