forked from YetiForceCompany/YetiForcePortal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
33 lines (27 loc) · 1.49 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/* * *******************************************************************************
* The content of this file is subject to the MYC Vtiger Customer Portal license.
* ("License"); You may not use this file except in compliance with the License
* The Initial Developer of the Original Code is Proseguo s.l. - MakeYourCloud
* Portions created by Proseguo s.l. - MakeYourCloud are Copyright(C) Proseguo s.l. - MakeYourCloud
* All Rights Reserved.
* Contributor(s): YetiForce.com
* ****************************************************************************** */
//Require all files necessary for the application to start, including user settings, soap library for enstablish the connection, and the portal classes
require_once('config/config.php');
require_once('config/version.php');
require_once('lib/nusoap/lib/nusoap.php');
require_once('lib/htmlpurifier/library/HTMLPurifier.auto.php');
require_once('portal.php');
// Set session path
ini_set('session.save_path', 'sessions');
//Establish the connection with the crm and store it in a global variable
global $sclient;
$sclient = new nusoap_client($vtiger_path . '/api.php?service=yetiportal');
$sclient->soap_defencoding = $default_charset;
$sclient->decode_utf8 = false;
session_start();
//Check if there are stored variables then if the user is previously logged or if has sent some login/forgot request, else provide him a logging screen
User::check_login();
//If the login is passed analyze the REQUEST and call the requested action.
Router::start();