PHP   45

Global include file for every PHP page

Guest on 25th April 2022 01:24:54 AM

  1. <?php
  2. //
  3. //    ------------------------------------------------------------------------------------
  4. //    Copyright (c) HOMEMEETING INC. All rights reserved.
  5. //    ------------------------------------------------------------------------------------
  6. //    This source file is subject to HomeMeeting license,
  7. //    that is bundled with this package in the file "license.txt".
  8. //    ------------------------------------------------------------------------------------
  9. //
  10. //
  11. //    Global include file for every PHP page
  12. //
  13.  
  14.         header("Access-Control-Allow-Origin: *");
  15.  
  16.         // declare $_mcuApiMMC to TRUE to enable code block of assignments in "include_mcu/mcu_api.php"
  17.         $_mcuApiMMC = true;
  18.        
  19.         session_start();
  20.         error_reporting(E_ALL);
  21.  
  22.         require_once("config.php");
  23.         require_once("log.php");
  24.         require_once("decl.php");
  25.         require_once("url.php");
  26.         require_once("error.php");
  27.         require_once("message.php");
  28.         require_once("role.php");
  29.         require_once("login.php");
  30.         require_once("datetime.php");
  31.         require_once("entry.php");
  32.  
  33.         if ($_appConfig->productionMode) {
  34.                 error_reporting(E_ALL & ~E_NOTICE);
  35.         }
  36.        
  37.         /*
  38.          * assign value to the variable $_loginCheckType, before including this file, to change Login Check Type
  39.          * default Login Check Type is 0 and function loginRedirect() will be called
  40.          * other values are negative (-1) for not checking at all, or positive (1) for calling loginVerify()
  41.          */
  42.  
  43.         if (empty($_loginCheckType)) {
  44.                 loginRedirect();
  45.         } else {
  46.                 if ($_loginCheckType > 0) {
  47.                         loginVerify();
  48.                 }
  49.         }
  50.  
  51.         errorSetMsg();
  52.  
  53.         loginGetUser();
  54. ?>

Raw Paste


Login or Register to edit or fork this paste. It's free.