-
Notifications
You must be signed in to change notification settings - Fork 4
/
synchro.php
48 lines (42 loc) · 1.12 KB
/
synchro.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
require_once("db.inc.php");
require_once('authenticate_tools.inc.php');
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
ini_set('xdebug.collect_vars', 'on');
ini_set('xdebug.collect_params', '4');
ini_set('xdebug.dump_globals', 'off');
ini_set('xdebug.dump.SERVER', 'REQUEST_URI');
ini_set('xdebug.show_local_vars', 'on');
ini_set('xdebug.halt_level', E_WARNING|E_NOTICE|E_USER_WARNING|E_USER_NOTICE);
ini_set("session.gc_maxlifetime", 3600);
session_start();
try
{
db_connect($servername,marmottedbname,$serverlogin,$serverpassword);
}
catch(Exception $e)
{
echo "Failed to connect to database: ".$e."</h1>";
die(0);
}
addCredentials("admin", "",true);
$_SESSION['REMOTE_USER'] = "admin";
authenticate();
init_filter_session();
// $_SESSION['filter_section'] = '0';
require_once('synchro.inc.php');
$email = true;
set_config("maintenance", "on");
try
{
synchronize_with_evaluation("",true,$email);
}
catch(Exception $e)
{
echo "Synchro failed with exception <br/>".$e->getMessage()."<br/>";
}
set_config("maintenance", "off");
db_disconnect();
?>