-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.php
50 lines (46 loc) · 1.82 KB
/
config.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
49
50
<?php
// ------- User Configurable Settings ------------
date_default_timezone_set('America/Chicago');
$DB_HOST = "localhost";
$DB_PORT = "3306";
$DB_USER = "YOURDBUSER";
$DB_PASS = "YOURPASSWORD";
$DB_NAME = "phpdvr";
//$DB_NAME = "webpvr";
// Schedules Direct user/password
$SD_USER = "YOURSDUSER";
$SD_PASS = "YOURPASSWORD";
// expected program paths
$FFMPEG_PATH = "/usr/bin/ffmpeg";
$HDHOMERUN_PATH = "/usr/local/bin/hdhomerun_config";
$CRON_PATH = "/usr/bin/crontab";
$MYSQL_PATH = "/usr/local/mysql/bin/mysql";
// ------------------------------------------------
// Global Variables
$ROOT_DIR = dirname(__FILE__) . "/";
$RECORDING_DIR = dirname(__FILE__) . "/recordings/";
$APPLICATION_NAME = "PHPDVR";
$RECORDING_SCRIPT = dirname(__FILE__) . "/mypvr_record.php";
$DAILY_SCRIPT = dirname(__FILE__) . "/mypvr_daily.php";
$TEMPLATE_DIR = dirname(__FILE__) . "/template/";
$LOG_DIR = dirname(__FILE__) . "/logs/";
$DO_INSTALL = dirname(__FILE__) . "/logs/install.txt";
// Require utility classes and functions
require_once(dirname(__FILE__) . "/inc/utility.php");
require_once(dirname(__FILE__) . "/inc/cron.php");
require_once(dirname(__FILE__) . "/inc/hdhomerun.php");
require_once(dirname(__FILE__) . "/inc/schedule_manager.php");
require_once(dirname(__FILE__) . "/inc/schedules_direct.php");
require_once(dirname(__FILE__) . "/inc/database.php");
// Connect to Database
// Switch to PDO
// see: http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/ for more info
if (file_exists($DO_INSTALL)) {
// specify the database - normal operation
$DB = new database($DB_USER, $DB_PASS, $DB_HOST, $DB_NAME );
} else {
// do not specify a database - used only to setup the application
$DB = new database($DB_USER, $DB_PASS, $DB_HOST);
}
// end of config.php
?>