inc/toolkit.inc.php
changeset 74 43c31dc98305
parent 71 e1b918eaf69a
child 75 a53200a76f9d
equal deleted inserted replaced
73:8a239565e9b3 74:43c31dc98305
    19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    19  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    20  */
    20  */
    21 
    21 
    22 session_start();
    22 session_start();
    23 
    23 
       
    24 
       
    25 
       
    26 if(!@include_once("config.inc.php"))
       
    27 {
       
    28 	error( _('You have to create a config.inc.php!') );
       
    29 }
       
    30 
       
    31 if(is_file( dirname(__FILE__) . '/../install.php'))
       
    32 {
       
    33 	error( _('You have to remove install.php before this program will run') );
       
    34 }
       
    35 
       
    36 if(is_file( dirname(__FILE__) . '/../migrator.php'))
       
    37 {
       
    38         error( _('You have to remove migrator.php before this program will run') );
       
    39 }
       
    40 
    24 /*************
    41 /*************
    25  * Constants  *
    42  * Constants *
    26   *************/
    43  *************/
    27 
    44 define(ROWAMOUNT, $ROWAMOUNT);
    28 define(ROWAMOUNT, 50);
       
    29 
    45 
    30 if (isset($_GET["start"])) {
    46 if (isset($_GET["start"])) {
    31    define(ROWSTART, (($_GET["start"] - 1) * ROWAMOUNT));
    47    define(ROWSTART, (($_GET["start"] - 1) * ROWAMOUNT));
    32    } else {
    48    } else {
    33    define(ROWSTART, 0);
    49    define(ROWSTART, 0);
    38    $_SESSION["letter"] = $_GET["letter"];
    54    $_SESSION["letter"] = $_GET["letter"];
    39 } elseif(isset($_SESSION["letter"])) {
    55 } elseif(isset($_SESSION["letter"])) {
    40    define(LETTERSTART, $_SESSION["letter"]);
    56    define(LETTERSTART, $_SESSION["letter"]);
    41 } else {
    57 } else {
    42    define(LETTERSTART, "a");
    58    define(LETTERSTART, "a");
    43 }
       
    44 
       
    45 if(!@include_once("config.inc.php"))
       
    46 {
       
    47 	error( _('You have to create a config.inc.php!') );
       
    48 }
       
    49 
       
    50 if(is_file( dirname(__FILE__) . '/../install.php'))
       
    51 {
       
    52 	error( _('You have to remove install.php before this program will run') );
       
    53 }
       
    54 
       
    55 if(is_file( dirname(__FILE__) . '/../migrator.php'))
       
    56 {
       
    57         error( _('You have to remove migrator.php before this program will run') );
       
    58 }
    59 }
    59 
    60 
    60 /* Database connection */
    61 /* Database connection */
    61 
    62 
    62 require_once("database.inc.php");
    63 require_once("database.inc.php");