Ignore:
Timestamp:
Dec 18, 2005 12:16:03 AM (18 years ago)
Author:
scdev
Message:

detabbed all files ;P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/PageSequence.inc.php

    r41 r42  
    1010 * @version   1.01
    1111 */
    12  
     12
    1313require_once dirname(__FILE__) . '/Prefs.inc.php';
    1414
     
    1919    var $sequence_title = '';
    2020    var $seq = '_sequence_';
    21     var $idle_timeout; 
    22    
     21    var $idle_timeout;
     22
    2323    /**
    2424     * Constructor. Sets the title of this sequence and initializes session variables.
     
    3333            $this->seq .= $params['sequence_title'];
    3434        }
    35        
     35
    3636        // How long before resetting session? 60 minutes.
    3737        $this->idle_timeout = isset($params['idle_timeout']) ? $params['idle_timeout'] : 3600;
    38        
     38
    3939        // Where is user to be redirected after startOver function call?
    4040        $this->start_url = isset($params['start_url']) ? $params['start_url'] : $_SERVER['PHP_SELF'];
    41        
     41
    4242        // Initialize vars if not set.
    4343        if (!isset($_SESSION[$this->seq]['steps'])) {
     
    5050            $_SESSION[$this->seq]['defaults'] = array();
    5151        }
    52        
     52
    5353        // Manage timeout.
    5454        $this->_auto_timeout();
    5555    }
    56    
    57     /**
    58      * Create a new step at the end (or specified position) of the $steps array. 
     56
     57    /**
     58     * Create a new step at the end (or specified position) of the $steps array.
    5959     *
    6060     * @param  string $step_id      Uniqie identifyer for this step.
     
    8585        );
    8686    }
    87    
     87
    8888    /**
    8989     * Set the features of a step. Current step if step_id not specified.
     
    123123        }
    124124    }
    125        
     125
    126126    /**
    127127     * Set the current step id. Which step are we on?
     
    142142        }
    143143    }
    144    
     144
    145145    /**
    146146     * Get the current step id.
     
    157157        }
    158158    }
    159    
     159
    160160    /**
    161161     * Get the current step number.
     
    179179            foreach ($_SESSION[$this->seq]['steps'] as $pos=>$step) {
    180180                if ($step['id'] == $step_id) {
    181                     return $pos;   
     181                    return $pos;
    182182                }
    183183            }
     
    186186        }
    187187    }
    188    
     188
    189189    /**
    190190     * Returns the ID of the step with required=true and completed=false
    191      * and active=true that falls before specified step_id. 
     191     * and active=true that falls before specified step_id.
    192192     *
    193193     * @param  string $curr_step_id ID or number of current step.
     
    212212        return $curr_step_id;
    213213    }
    214    
     214
    215215    /**
    216216     * Returns the next step in the steps array or the first active required
     
    235235        return null;
    236236    }
    237    
     237
    238238    /**
    239239     * To set a set as 'completed'.
     
    246246        $_SESSION[$this->seq]['steps'][$pos]['completed'] = true;
    247247    }
    248    
     248
    249249    /**
    250250     * Prints the a link that returns to the form for a step.
     
    262262        }
    263263    }
    264    
     264
    265265    /**
    266266     * Saves given $step_data (usually coming from $_POST) into $_SESSION
     
    279279        }
    280280    }
    281    
     281
    282282    /**
    283283     * Returns the value saved in $_SESSION for a specific data key.
     
    297297        }
    298298    }
    299    
     299
    300300    /**
    301301     * Deletes all data saved in $_SESSION.
     
    330330        }
    331331    }
    332    
     332
    333333    /**
    334334     * Saves given array (usually coming from $_POST) into $_SESSION
     
    341341        $_SESSION[$this->seq]['data'] = array_merge($_SESSION[$this->seq]['data'], $step_data);
    342342    }
    343    
     343
    344344    /**
    345345     * Reset all vars.
     
    354354        $_SESSION[$this->seq]['last_access_time'] = time();
    355355    }
    356    
     356
    357357    /**
    358358     * Template function to be extended with custom SQL code.
     
    365365        return false;
    366366    }
    367    
     367
    368368    /**
    369369     * Template function to be extended with custom SQL code.
     
    376376        return false;
    377377    }
    378    
    379    
     378
     379
    380380} // END CLASS
    381381
Note: See TracChangeset for help on using the changeset viewer.