2 /********************************************************************************\
3 * Copyright (C) ViCarePlus, Visolve (vicareplus_engg@visolve.com) *
5 * This program is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License *
7 * as published by the Free Software Foundation; either version 2 *
8 * of the License, or (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the Free Software *
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18 \********************************************************************************/
21 * Here /interface/globals.php is not referred, because it includes auth.inc.
22 * auth.inc verifies for user authentication information & login session variables.
23 * Pass these variables $webserver_root & $_GLOBALS[backup_log_dir] as parameters for CRON.
25 include_once ("$argv[1]/library/sqlconf.php");
26 $backuptime=date("Ymd_His");
27 $BACKUP_EVENTLOG_DIR = $argv[2] . "/emr_eventlog_backup";
28 if (!file_exists($BACKUP_EVENTLOG_DIR))
30 mkdir($BACKUP_EVENTLOG_DIR);
31 chmod($BACKUP_EVENTLOG_DIR,0777);
33 $BACKUP_EVENTLOG_DIR=$BACKUP_EVENTLOG_DIR.'/eventlog_'.$backuptime.'.sql';
34 $cmd=$argv[1].'/interface/main/backuplog.sh '.$sqlconf["login"].' '.$sqlconf["pass"].' '.$sqlconf["dbase"].' '.$BACKUP_EVENTLOG_DIR.' '.$sqlconf["host"];