mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 09:48:55 +00:00
inital commit for nntmux installer
This commit is contained in:
+84
-72
@@ -1,102 +1,118 @@
|
||||
<?php
|
||||
namespace nntmux;
|
||||
|
||||
/**
|
||||
* Structure for holding data during install.
|
||||
*/
|
||||
class Install
|
||||
{
|
||||
public $DB_SYSTEM;
|
||||
public $DB_HOST = "localhost";
|
||||
public $DB_TYPE;
|
||||
public $DB_HOST = "127.0.0.1";
|
||||
public $DB_PORT;
|
||||
public $DB_SOCKET;
|
||||
public $DB_USER;
|
||||
public $DB_PORT = 3306;
|
||||
public $DB_PASSWORD;
|
||||
public $DB_NAME = "newznab";
|
||||
public $DB_INNODB = "false";
|
||||
|
||||
public $DB_NAME = "nntmux";
|
||||
public $NNTP_USERNAME;
|
||||
public $NNTP_PASSWORD;
|
||||
public $NNTP_SERVER;
|
||||
public $NNTP_PORT = 119;
|
||||
public $NNTP_SSLENABLED = false;
|
||||
|
||||
public $CACHE_TYPE = "none";
|
||||
|
||||
public $WWW_DIR;
|
||||
public $NNTP_PORT;
|
||||
public $NNTP_SSLENABLED;
|
||||
public $NNTP_SOCKET_TIMEOUT;
|
||||
public $NNTP_USERNAME_A;
|
||||
public $NNTP_PASSWORD_A;
|
||||
public $NNTP_SERVER_A;
|
||||
public $NNTP_PORT_A;
|
||||
public $NNTP_SSLENABLED_A;
|
||||
public $NNTP_SOCKET_TIMEOUT_A;
|
||||
public $COVERS_PATH;
|
||||
public $CONFIG_PATH;
|
||||
public $coverPathCheck = false;
|
||||
public $SMARTY_DIR;
|
||||
public $DB_DIR;
|
||||
public $MISC_DIR;
|
||||
public $INSTALL_DIR;
|
||||
|
||||
public $ADMIN_USER;
|
||||
public $ADMIN_FNAME;
|
||||
public $ADMIN_LNAME;
|
||||
public $ADMIN_PASS;
|
||||
public $ADMIN_EMAIL;
|
||||
|
||||
public $NZB_PATH;
|
||||
|
||||
public $TMP_PATH;
|
||||
public $UNRAR_PATH;
|
||||
public $WWW_TOP;
|
||||
public $COMPILED_CONFIG;
|
||||
|
||||
public $doCheck = false;
|
||||
|
||||
public $sha1Check;
|
||||
public $mysqlCheck;
|
||||
public $cryptCheck;
|
||||
public $iconvCheck;
|
||||
public $PDOCheck;
|
||||
public $gdCheck;
|
||||
public $curlCheck;
|
||||
public $cacheCheck;
|
||||
public $movieCoversCheck;
|
||||
public $animeCoversCheck;
|
||||
public $audioCoversCheck;
|
||||
public $audiosampleCoversCheck;
|
||||
public $bookCoversCheck;
|
||||
public $consoleCoversCheck;
|
||||
public $movieCoversCheck;
|
||||
public $musicCoversCheck;
|
||||
public $previewCoversCheck;
|
||||
public $sampleCoversCheck;
|
||||
public $videoCoversCheck;
|
||||
public $configCheck;
|
||||
public $lockCheck;
|
||||
public $pearCheck;
|
||||
public $schemaCheck;
|
||||
|
||||
/**
|
||||
* @var bool Is the PHP version higher than NN_MINIMUM_PHP_VERSION?
|
||||
*/
|
||||
public $phpCheck;
|
||||
public $minPhpVersion = NN_MINIMUM_PHP_VERSION;
|
||||
|
||||
public $timelimitCheck;
|
||||
public $memlimitCheck;
|
||||
public $rewriteCheck;
|
||||
public $opensslCheck;
|
||||
public $exifCheck;
|
||||
public $timezoneCheck;
|
||||
|
||||
public $dbConnCheck;
|
||||
public $dbNameCheck;
|
||||
public $dbCreateCheck;
|
||||
|
||||
public $emessage;
|
||||
public $nntpCheck;
|
||||
public $adminCheck;
|
||||
public $nzbPathCheck;
|
||||
|
||||
public $saveConfigCheck;
|
||||
public $saveLockCheck;
|
||||
|
||||
/* @public bool $weHasIconv */
|
||||
public $weHasIconv = false;
|
||||
|
||||
public $error = false;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
*/
|
||||
// Step 3 (openssl) properties.
|
||||
public $NN_SSL_CAFILE;
|
||||
public $NN_SSL_CAPATH;
|
||||
public $NN_SSL_VERIFY_PEER;
|
||||
public $NN_SSL_VERIFY_HOST;
|
||||
public $NN_SSL_ALLOW_SELF_SIGNED;
|
||||
|
||||
// Does the sessions save path have RW permissions?
|
||||
public $sessionsPathPermissions;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->WWW_DIR = dirname(realpath('.'));
|
||||
$this->SMARTY_DIR = $this->WWW_DIR.'/lib/smarty';
|
||||
$this->DB_DIR = dirname(realpath('..')).'/db';
|
||||
$this->MISC_DIR = dirname(realpath('..')).'/misc';
|
||||
$this->NZB_PATH = str_replace('\\', '/', dirname(realpath('..'))).'/nzbfiles/';
|
||||
$this->INSTALL_DIR = $this->WWW_DIR.'/install';
|
||||
$this->CONFIG_PATH = NN_CONFIGS;
|
||||
$this->COVERS_PATH = NN_RES . 'covers' . DS;
|
||||
$this->DB_DIR = NN_RES . 'db' . DS . 'schema' . DS;
|
||||
$this->SMARTY_COMPILED_TEMPLATES = NN_RES . 'smarty' . DS . 'templates_c' . DS;
|
||||
$this->INSTALL_DIR = NN_WWW . 'install';
|
||||
$this->NZB_PATH = NN_RES . 'nzb' . DS;
|
||||
$this->TMP_PATH = NN_RES . 'tmp' . DS;
|
||||
$this->UNRAR_PATH = $this->TMP_PATH . 'unrar' . DS;
|
||||
$this->WWW_TOP = NN_WWW;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save this structure in session.
|
||||
*/
|
||||
public function setSession()
|
||||
{
|
||||
$_SESSION['cfg'] = serialize($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return this structure from session.
|
||||
*/
|
||||
public function getSession()
|
||||
{
|
||||
$tmpCfg = unserialize($_SESSION['cfg']);
|
||||
@@ -105,69 +121,65 @@ class Install
|
||||
return $tmpCfg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this structure has been populated.
|
||||
*/
|
||||
public function isInitialized()
|
||||
{
|
||||
return (isset($_SESSION['cfg']) && is_object(unserialize($_SESSION['cfg'])));
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if this installation has already been installed, and .lock file is present.
|
||||
*/
|
||||
public function isLocked()
|
||||
{
|
||||
return (file_exists($this->INSTALL_DIR.'/install.lock') ? true : false);
|
||||
return (file_exists($this->INSTALL_DIR . '/install.lock') ? true : false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Populate default config values from provided string.
|
||||
*
|
||||
* @param $tmpCfg
|
||||
*/
|
||||
public function setConfig($tmpCfg)
|
||||
{
|
||||
preg_match_all('/define\((.*?)\)/i', $tmpCfg, $matches);
|
||||
$defines = $matches[1];
|
||||
foreach ($defines as $define)
|
||||
{
|
||||
foreach ($defines as $define) {
|
||||
$define = str_replace('\'', '', $define);
|
||||
list($defName,$defVal) = explode(',', $define);
|
||||
list($defName, $defVal) = explode(',', $define);
|
||||
$this->{$defName} = trim($defVal);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Write the config file to disk.
|
||||
*/
|
||||
public function saveConfig()
|
||||
{
|
||||
$tmpCfg = file_get_contents($this->INSTALL_DIR.'/config.php.tpl');
|
||||
$tmpCfg = file_get_contents($this->INSTALL_DIR . DS . 'config.php.tpl');
|
||||
$tmpCfg = str_replace('%%DB_SYSTEM%%', $this->DB_SYSTEM, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_HOST%%', $this->DB_HOST, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_USER%%', $this->DB_USER, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_PORT%%', $this->DB_PORT, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_SOCKET%%', $this->DB_SOCKET, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_USER%%', $this->DB_USER, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_PASSWORD%%', $this->DB_PASSWORD, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_NAME%%', $this->DB_NAME, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%DB_INNODB%%', $this->DB_INNODB, $tmpCfg);
|
||||
|
||||
$tmpCfg = str_replace('%%NNTP_USERNAME%%', $this->NNTP_USERNAME, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_PASSWORD%%', $this->NNTP_PASSWORD, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SERVER%%', $this->NNTP_SERVER, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_PORT%%', $this->NNTP_PORT, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SSLENABLED%%', ($this->NNTP_SSLENABLED?"true":"false"), $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SSLENABLED%%', ($this->NNTP_SSLENABLED ? "true" : "false"), $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SOCKET_TIMEOUT%%', $this->NNTP_SOCKET_TIMEOUT, $tmpCfg);
|
||||
|
||||
$tmpCfg = str_replace('%%CACHEOPT_METHOD%%', $this->CACHE_TYPE, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_USERNAME_A%%', $this->NNTP_USERNAME_A, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_PASSWORD_A%%', $this->NNTP_PASSWORD_A, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SERVER_A%%', $this->NNTP_SERVER_A, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_PORT_A%%', $this->NNTP_PORT_A, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SSLENABLED_A%%', ($this->NNTP_SSLENABLED_A ? "true" : "false"), $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NNTP_SOCKET_TIMEOUT_A%%', $this->NNTP_SOCKET_TIMEOUT_A, $tmpCfg);
|
||||
|
||||
$tmpCfg = str_replace('%%NN_SSL_CAFILE%%', $this->NN_SSL_CAFILE, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NN_SSL_CAPATH%%', $this->NN_SSL_CAPATH, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NN_SSL_VERIFY_PEER%%', $this->NN_SSL_VERIFY_PEER, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NN_SSL_VERIFY_HOST%%', $this->NN_SSL_VERIFY_HOST, $tmpCfg);
|
||||
$tmpCfg = str_replace('%%NN_SSL_ALLOW_SELF_SIGNED%%', $this->NN_SSL_ALLOW_SELF_SIGNED, $tmpCfg);
|
||||
|
||||
$this->COMPILED_CONFIG = $tmpCfg;
|
||||
return @file_put_contents($this->WWW_DIR.'/config.php', $tmpCfg);
|
||||
return @file_put_contents(NN_CONFIGS . DS . 'config.php', $tmpCfg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the installation lock file.
|
||||
*/
|
||||
public function saveInstallLock()
|
||||
{
|
||||
return @file_put_contents($this->INSTALL_DIR.'/install.lock', '');
|
||||
return @file_put_contents($this->INSTALL_DIR . DS . 'install.lock', '');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
id, title, url, body, metadescription, metakeywords, contenttype, showinmenu, status, ordinal, role
|
||||
1 Welcome to NNTmux. NULL <p>Since NNTmux is a fork of newznab/nZEDb, the API is compatible with sonarr, sickbeard, couchpotato, etc...</p> "" "" 3 0 1 0 0
|
||||
1 Welcome to NNTmux. NULL <p>Since NNTmux is a fork of newznab and nZEDb, the API is compatible with sonarr, sickbeard, couchpotato, etc...</p> "" "" 3 0 1 0 0
|
||||
2 example content /great/seo/content/page/ <p>this is an example content page</p> "" "" 1 2 1 1 0
|
||||
3 another example /another/great/seo/content/page/ <p>this is another example content page</p> "" "" 1 2 1 0 0
|
||||
|
||||
|
@@ -62,7 +62,7 @@ indexer ppa innerfileblacklist /setup\.exe|password\.url/i You can add a regex h
|
||||
newgroupmsgstoscan 100000 Posts newgroupmsgstoscan
|
||||
newgroupscanmethod 0 Scan back X (posts/days) for each new group? Use backfill to scan further. newgroupscanmethod
|
||||
nextppticket 0 nextppticket
|
||||
nntpproxy 0 Using the NNTP Proxy for nntmux can improve performance of nntmux dramatically. It uses connection pooling which not only give more control over the number of connections to use but also reduces time for connection setup/teardown. The proxy also takes care of compressed headers for you. To use this featrure you will need to install pynntp (sudo pip install pynntp or sudo easy_install pynntp) and socketpool (sudo pip install socketpool or sudo easy_install socketpool) (ensure python2 is default) and edit the configuration file (nntpproxy.conf and nntpproxy_a.conf) in the update_scripts/python_scripts/lib (copy sample) directory and finally edit your www/config.php file to use the proxy (username and password are ignored by the proxy - make then anything you like - the proxy doesn't use ssl either). Make sure you turn off the use compressed headers option here in site preferences (the proxy uses compressed headers by default and passes on decompressed data). nntpproxy
|
||||
nntpproxy 0 Using the NNTP Proxy for NNTmux can improve performance of NNTmux dramatically. It uses connection pooling which not only give more control over the number of connections to use but also reduces time for connection setup/teardown. The proxy also takes care of compressed headers for you. To use this featrure you will need to install pynntp (sudo pip install pynntp or sudo easy_install pynntp) and socketpool (sudo pip install socketpool or sudo easy_install socketpool) (ensure python2 is default) and edit the configuration file (nntpproxy.conf and nntpproxy_a.conf) in the update_scripts/python_scripts/lib (copy sample) directory and finally edit your www/config.php file to use the proxy (username and password are ignored by the proxy - make then anything you like - the proxy doesn't use ssl either). Make sure you turn off the use compressed headers option here in site preferences (the proxy uses compressed headers by default and passes on decompressed data). nntpproxy
|
||||
nntpretries 10 The maximum number of retry attmpts to connect to nntp provider. On error, each retry takes approximately 5 seconds nntp returns reply. (Default 10). nntpretries
|
||||
nzbpath /your/path/to/nzbs/ The directory where nzb files will be stored. nzbpath
|
||||
nzbsplitlevel 4 Levels deep to store the nzb Files. nzbsplitlevel
|
||||
@@ -84,11 +84,11 @@ indexer ppa innerfileblacklist /setup\.exe|password\.url/i You can add a regex h
|
||||
registerstatus 0 The status of registrations to the site. registerstatus
|
||||
releasecompletion 95 The minimum completion % to keep a release. Set to 0 to disable. releasecompletion
|
||||
releaseretentiondays 0 !!THIS IS NOT HEADER RETENTION!! The number of days releases will be retained for use throughout site. Set to 0 to disable. releaseretentiondays
|
||||
releasethreads 1 The number of threads for update_releases. This is only for tablepergroup. releasethreads
|
||||
releasesthreads 1 The number of threads for update_releases. This is only for tablepergroup. releasesthreads
|
||||
replacenzbs 0 NZBs that are crossposted, instead of deleting, replace with the nzb grabbed.(This is not necessary, was added before I understood how crossposted nzbs work). replacenzbs
|
||||
reqidthreads 1 The number of threads for local request id processing. reqidthreads
|
||||
request_hours 1 The maximum hours after a release is added to recheck for a Request ID match. request_hours
|
||||
request_url http://reqid.newznab-tmux.pw/index.php Optional URL to lookup Request IDs. request_url
|
||||
request_url http://reqid.nzedb.com/index.php Optional URL to lookup Request IDs. request_url
|
||||
safebackfilldate 2012-06-24 The target date for safe backfill. Format: YYYY-MM-DD safebackfilldate
|
||||
safepartrepair 0 Whether to put unreceived parts into partrepair table when running binaries(safe) or backfill scripts. safepartrepair
|
||||
segmentstodownload 2 The maximum number of segments to download to generate the sample video file. (Default 2) segmentstodownload
|
||||
@@ -139,7 +139,7 @@ site google adheader The banner slot in the header. adheader
|
||||
site google google_adsense_acc AdSense account: e.g. pub-123123123123123 google_adsense_acc
|
||||
site google google_adsense_search The ID of the google search ad panel displayed at the bottom of the left menu. google_adsense_search
|
||||
site google google_analytics_acc Analytic's account: e.g. UA-xxxxxx-x google_analytics_acc
|
||||
site main code nntmux A just for fun value, shown in debug and not on public pages. code
|
||||
site main code NNTmux A just for fun value, shown in debug and not on public pages. code
|
||||
site main coverspath /your/path/to/covers/ The absolute path to the place covers will be stored. coverspath
|
||||
site main dereferrer_link Optional URL to prepend to external links dereferrer_link
|
||||
site main email Shown in the contact us page, and where the contact html form is sent to. email
|
||||
@@ -152,7 +152,8 @@ site main metadescription A usenet indexing website Stem meta-description append
|
||||
site main metakeywords usenet,nzbs,cms,community Stem meta-keywords appended to all page meta keyword tags metakeywords
|
||||
site main metatitle An indexer Stem meta-tag appended to all page title tags. metatitle
|
||||
site main strapline A great usenet indexer Displayed in the header on every public page. strapline
|
||||
site main style Alpha The theme folder which will be loaded for css and images. style
|
||||
site main style Gentele The theme folder which will be loaded for css and images. style
|
||||
site main userselstyle 0 Are users allowed to change site theme userselstyle
|
||||
site main tandc <p>All information within this database is indexed by an automated process, without any human intervention. It is obtained from global Usenet newsgroups over which this site has no control. We cannot prevent that you might find obscene or objectionable material by using this service. If you do come across obscene, incorrect or objectionable results, let us know by using the contact form.</p> Text displayed in the terms and conditions page. tandc
|
||||
site main title nntmux Displayed around the site and contact form as the name for the site. title
|
||||
site trailers trailers_display 1 Display trailers on the details page? trailers_display
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 4 and column 214.
|
Regular → Executable
+2
-2
@@ -3,9 +3,9 @@ has decided to code the Fulltext searching within the site for MyISAM due to its
|
||||
full text search implementation is the stop word table. MyISAM's (seen below) consists of 543 entries while InnoDB's consists of only 36. This leads to greatly disparate results when
|
||||
searching the same data between the two engines. If you prefer your results using InnoDB's default stop word table, then ignore this file. If you wish to keep your search in-line with the
|
||||
way it was coded simply import this file into MySQL. Using this import constitutes (in general) a major change to the entire MySQL instance as the change is Global to use the new stop word
|
||||
table. Because of this, it is recommended you import this table into the mysql database, NOT nntmux. Do this with the following command (using an account that has access to the mysql database):
|
||||
table. Because of this, it is recommended you import this table into the mysql database, NOT nzedb. Do this with the following command (using an account that has access to the mysql database):
|
||||
|
||||
mysql -uroot mysql < /var/www/nntmux/resources/db/schema/innodb_5.6_stopword_tbl.sql
|
||||
mysql -uroot mysql < /var/www/nZEDb/resources/db/schema/innodb_5.6_stopword_tbl.sql
|
||||
|
||||
Once imported, it is recommended to set:
|
||||
|
||||
|
||||
Regular → Executable
+1160
-1146
File diff suppressed because it is too large
Load Diff
Executable
+1
@@ -0,0 +1 @@
|
||||
install.lock
|
||||
Executable
+40
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
//=========================
|
||||
// Config you must change - updated by installer.
|
||||
//=========================
|
||||
define('DB_SYSTEM', '%%DB_SYSTEM%%');
|
||||
define('DB_HOST', '%%DB_HOST%%');
|
||||
define('DB_PORT', '%%DB_PORT%%');
|
||||
define('DB_SOCKET', '%%DB_SOCKET%%');
|
||||
define('DB_USER', '%%DB_USER%%');
|
||||
define('DB_PASSWORD', '%%DB_PASSWORD%%');
|
||||
define('DB_NAME', '%%DB_NAME%%');
|
||||
define('DB_PCONNECT', false);
|
||||
|
||||
define('NNTP_USERNAME', '%%NNTP_USERNAME%%');
|
||||
define('NNTP_PASSWORD', '%%NNTP_PASSWORD%%');
|
||||
define('NNTP_SERVER', '%%NNTP_SERVER%%');
|
||||
define('NNTP_PORT', '%%NNTP_PORT%%');
|
||||
// If you want to use TLS or SSL on the NNTP connection (the NNTP_PORT must be able to support encryption).
|
||||
define('NNTP_SSLENABLED', %%NNTP_SSLENABLED%%);
|
||||
// If we lose connection to the NNTP server, this is the time in seconds to wait before giving up.
|
||||
define('NNTP_SOCKET_TIMEOUT', '%%NNTP_SOCKET_TIMEOUT%%');
|
||||
|
||||
define('NNTP_USERNAME_A', '%%NNTP_USERNAME_A%%');
|
||||
define('NNTP_PASSWORD_A', '%%NNTP_PASSWORD_A%%');
|
||||
define('NNTP_SERVER_A', '%%NNTP_SERVER_A%%');
|
||||
define('NNTP_PORT_A', '%%NNTP_PORT_A%%');
|
||||
define('NNTP_SSLENABLED_A', %%NNTP_SSLENABLED_A%%);
|
||||
define('NNTP_SOCKET_TIMEOUT_A', '%%NNTP_SOCKET_TIMEOUT_A%%');
|
||||
|
||||
// Location to CA bundle file on your system. You can download one here: http://curl.haxx.se/docs/caextract.html
|
||||
define('nZEDb_SSL_CAFILE', '%%nZEDb_SSL_CAFILE%%');
|
||||
// Path where openssl cert files are stored on your system, this is a fall back if the CAFILE is not found.
|
||||
define('nZEDb_SSL_CAPATH', '%%nZEDb_SSL_CAPATH%%');
|
||||
// Use the aforementioned CA bundle file to verify remote SSL certificates when connecting to a server using TLS/SSL.
|
||||
define('nZEDb_SSL_VERIFY_PEER', '%%nZEDb_SSL_VERIFY_PEER%%');
|
||||
// Verify the host is who they say they are.
|
||||
define('nZEDb_SSL_VERIFY_HOST', '%%nZEDb_SSL_VERIFY_HOST%%');
|
||||
// Allow self signed certificates. Note this does not work on CURL as CURL does not have this option.
|
||||
define('nZEDb_SSL_ALLOW_SELF_SIGNED', '%%nZEDb_SSL_ALLOW_SELF_SIGNED%%');
|
||||
Executable
+101
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
@session_start();
|
||||
require_once realpath(dirname(__DIR__) . DIRECTORY_SEPARATOR . 'smarty.php');
|
||||
|
||||
use nntmux\Install;
|
||||
|
||||
$page_title = "Welcome";
|
||||
|
||||
$cfg = new Install();
|
||||
if ($cfg->isLocked()) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->cacheCheck = is_writable(nZEDb_RES . 'smarty' . DS . 'templates_c');
|
||||
if ($cfg->cacheCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>
|
||||
<?php
|
||||
echo $page_title;
|
||||
?>
|
||||
</title>
|
||||
<link href="./templates/install.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link rel="shortcut icon" type="image/ico" href="../themes/shared/images/favicon.ico" />
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="logo">
|
||||
<images alt="NNTmux" src="../themes/shared/images/logo.png" />
|
||||
</h1>
|
||||
|
||||
<div class="content">
|
||||
<h2>Index Usenet. Now.</h2>
|
||||
|
||||
<p>Welcome to NNTmux.</p>
|
||||
<p>Before getting started, you need to make sure that the server meets the minimum requirements. You will also need...</p>
|
||||
<ol>
|
||||
<li>Your database credentials.</li>
|
||||
<li>Your news server credentials.</li>
|
||||
<li>SSH & root ability on your server (in case you need to install missing packages).</li>
|
||||
<li>You should consider copying nntmux/nntmux/config/settings.example.php to
|
||||
nntmux/nntmux/config/settings.php (Default settngs should be fine for installing).</li>
|
||||
</ol>
|
||||
<br/><br/>
|
||||
<p>
|
||||
<strong>
|
||||
<div style="color: #ff0000">WARNING: </div>
|
||||
This software is not practical for use on shared hosting. You should only use this on a server where YOU have the required privileges and knowledge to solve any challenges that might appear.
|
||||
</strong>
|
||||
</p>
|
||||
<div align="center">
|
||||
<?php
|
||||
if (!$cfg->error) {
|
||||
?>
|
||||
<form action="step1.php">
|
||||
<input type="submit" value="Go to step one: Pre flight check" />
|
||||
</form>
|
||||
<?php
|
||||
} else {
|
||||
if (!$cfg->cacheCheck) {
|
||||
?>
|
||||
<div class="error">
|
||||
The template compile dir must be writable.<br />A quick solution is to run: <br />
|
||||
<?php
|
||||
echo 'chmod 777 ' . nZEDb_RES . 'smarty' . DS . 'templates_c';
|
||||
if (extension_loaded('posix') && strtolower(substr(PHP_OS, 0, 3)) !== 'win') {
|
||||
$group = posix_getgrgid(posix_getgid());
|
||||
echo
|
||||
'<br /><br />Another solution is to run:<br />chown -R YourUnixUserName:' . $group['name'] . ' ' . nZEDb_ROOT .
|
||||
'<br />Then give your user access to the group:<br />usermod -a -G ' . $group['name'] . ' YourUnixUserName' .
|
||||
'<br />Finally give read/write access to your user/group:<br />chmod -R 774 ' . nZEDb_ROOT;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="error">Installation Locked! If reinstalling, please remove www/install/install.lock.</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
<p>
|
||||
<br />
|
||||
NN is released under GPL.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program (see LICENSE.txt in the base directory. If
|
||||
* not, see:
|
||||
*
|
||||
* @link <http://www.gnu.org/licenses/>.
|
||||
* @author niel
|
||||
* @copyright 2015 nZEDb
|
||||
*/
|
||||
|
||||
if (!defined('nZEDb_INSTALLER')) {
|
||||
define('nZEDb_INSTALLER', true);
|
||||
}
|
||||
require_once realpath(dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'bootstrap.php');
|
||||
|
||||
use nntmux\config\Configure;
|
||||
|
||||
$config = new Configure('install');
|
||||
|
||||
// Path to smarty files. (not prefixed with NNtmux as the name is needed in smarty files).
|
||||
define('SMARTY_DIR', NN_ROOT . 'app' . DS . 'libraries' . DS . 'smarty' . DS . 'smarty' . DS . 'libs' . DS);
|
||||
|
||||
$www_top = str_replace("\\", "/", dirname($_SERVER['PHP_SELF']));
|
||||
if (strlen($www_top) == 1) {
|
||||
$www_top = "";
|
||||
}
|
||||
|
||||
// Used everywhere an href is output, includes the full path to the NNTmux install.
|
||||
define('WWW_TOP', $www_top);
|
||||
|
||||
?>
|
||||
Executable
+201
@@ -0,0 +1,201 @@
|
||||
<?php
|
||||
/**
|
||||
* Remember!! Keeps these files simple until after the requirements checks are met.
|
||||
* No point having a check for PHP version if we can't get to that page because of higher version
|
||||
* requirements.
|
||||
*/
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
use nntmux\Install;
|
||||
|
||||
$page = new InstallPage();
|
||||
$page->title = "Preflight Checklist";
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$cfg->setSession();
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
// Start checks.
|
||||
$cfg->sessionsPathPermissions = true;
|
||||
$sessionPath = session_save_path();
|
||||
$sessionPath = empty($sessionPath) ? sys_get_temp_dir() : $sessionPath;
|
||||
$page->smarty->assign('sessionsSavePath', $sessionPath);
|
||||
if (!is_readable($sessionPath) || !is_writable($sessionPath)) {
|
||||
$cfg->error = true;
|
||||
$cfg->sessionsPathPermissions = false;
|
||||
}
|
||||
|
||||
$cfg->iconvCheck = function_exists('iconv');
|
||||
if ($cfg->iconvCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->cryptCheck = function_exists('crypt');
|
||||
if ($cfg->cryptCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->sha1Check = function_exists('sha1');
|
||||
if ($cfg->sha1Check === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->PDOCheck = extension_loaded('PDO');
|
||||
if ($cfg->PDOCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->jsonCheck = extension_loaded('json');
|
||||
if ($cfg->jsonCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->gdCheck = function_exists('imagecreatetruecolor');
|
||||
|
||||
$cfg->curlCheck = function_exists('curl_init');
|
||||
|
||||
if (extension_loaded('posix') && strtolower(substr(PHP_OS, 0, 3)) !== 'win') {
|
||||
$group = posix_getgrgid(posix_getgid());
|
||||
$fixString = '<br /><br />Another solution is to run:<br />chown -R YourUnixUserName:' . $group['name'] . ' ' . nZEDb_ROOT .
|
||||
'<br />Then give your user access to the group:<br />usermod -a -G ' . $group['name'] . ' YourUnixUserName' .
|
||||
'<br />Finally give read/write access to your user/group:<br />chmod -R 774 ' . nZEDb_ROOT;
|
||||
$page->smarty->assign('fixString', $fixString);
|
||||
$page->smarty->assign('unixGroup', $group['name']);
|
||||
$page->smarty->assign('rootPath', nZEDb_ROOT);
|
||||
} else {
|
||||
$page->smarty->assign('fixString', false);
|
||||
}
|
||||
|
||||
$cfg->cacheCheck = is_writable(nZEDb_RES . 'smarty' . DS . 'templates_c');
|
||||
if ($cfg->cacheCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->animeCoversCheck = is_writable($cfg->COVERS_PATH . 'anime');
|
||||
if ($cfg->animeCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->audioCoversCheck = is_writable($cfg->COVERS_PATH . 'audio');
|
||||
if ($cfg->audioCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->audiosampleCoversCheck = is_writable($cfg->COVERS_PATH . 'audiosample');
|
||||
if ($cfg->audiosampleCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->bookCoversCheck = is_writable($cfg->COVERS_PATH . 'book');
|
||||
if ($cfg->bookCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->consoleCoversCheck = is_writable($cfg->COVERS_PATH . 'console');
|
||||
if ($cfg->consoleCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->movieCoversCheck = is_writable($cfg->COVERS_PATH . 'movies');
|
||||
if ($cfg->movieCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->musicCoversCheck = is_writable($cfg->COVERS_PATH . 'music');
|
||||
if ($cfg->musicCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->previewCoversCheck = is_writable($cfg->COVERS_PATH . 'preview');
|
||||
if ($cfg->previewCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->sampleCoversCheck = is_writable($cfg->COVERS_PATH . 'sample');
|
||||
if ($cfg->sampleCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->videoCoversCheck = is_writable($cfg->COVERS_PATH . 'video');
|
||||
if ($cfg->videoCoversCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->configCheck = is_writable(nZEDb_CONFIGS);
|
||||
if ($cfg->configCheck === false) {
|
||||
$cfg->configCheck = is_file(nZEDb_CONFIGS);
|
||||
if ($cfg->configCheck === true) {
|
||||
$cfg->configCheck = false;
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
$cfg->configCheck = is_writable(nZEDb_CONFIGS);
|
||||
if ($cfg->configCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cfg->lockCheck = is_writable($cfg->INSTALL_DIR . 'install.lock');
|
||||
if ($cfg->lockCheck === false) {
|
||||
$cfg->lockCheck = is_file($cfg->INSTALL_DIR . 'install.lock');
|
||||
if ($cfg->lockCheck === true) {
|
||||
$cfg->lockCheck = false;
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
$cfg->lockCheck = is_writable($cfg->INSTALL_DIR);
|
||||
if ($cfg->lockCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$cfg->pearCheck = @include 'System.php';
|
||||
$cfg->pearCheck = class_exists('System');
|
||||
if (!$cfg->pearCheck) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->schemaCheck = false;
|
||||
if (is_readable($cfg->DB_DIR . 'mysql-ddl.sql')) {
|
||||
$cfg->schemaCheck = true;
|
||||
}
|
||||
if ($cfg->schemaCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
// Don't set error = true for these as we only want to display a warning.
|
||||
$cfg->phpCheck = (version_compare(PHP_VERSION, nZEDb_MINIMUM_PHP_VERSION, '>=')) ? true : false;
|
||||
$cfg->timelimitCheck = (ini_get('max_execution_time') >= 120) ? true : false;
|
||||
$cfg->memlimitCheck = (ini_get('memory_limit') >= 1024 || ini_get('memory_limit') == -1) ? true : false;
|
||||
$cfg->opensslCheck = extension_loaded("openssl");
|
||||
$cfg->exifCheck = extension_loaded("exif");
|
||||
$cfg->timezoneCheck = (ini_get('date.timezone') != "");
|
||||
|
||||
if (preg_match('/apache/i', $_SERVER['SERVER_SOFTWARE'])) {
|
||||
$cfg->rewriteCheck = (function_exists("apache_get_modules") && in_array("mod_rewrite", apache_get_modules())) ? true : false;
|
||||
} else {
|
||||
$cfg->rewriteCheck = true;
|
||||
}
|
||||
|
||||
// Load previous config.php.
|
||||
if (file_exists(nZEDb_CONFIGS . 'config.php') && is_readable(nZEDb_CONFIGS . 'config.php')) {
|
||||
$tmpCfg = file_get_contents(nZEDb_CONFIGS . 'config.php');
|
||||
$cfg->setConfig($tmpCfg);
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
|
||||
$page->smarty->assign('page', $page);
|
||||
|
||||
$page->content = $page->smarty->fetch('step1.tpl');
|
||||
$page->render();
|
||||
Executable
+222
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
|
||||
use app\extensions\util\Versions;
|
||||
use nntmux\db\DB;
|
||||
use nntmux\Install;
|
||||
|
||||
$page = new InstallPage();
|
||||
$page->title = "Database Setup";
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the database exists.
|
||||
*
|
||||
* @param string $dbName The name of the database to be checked.
|
||||
* @param string $dbType mysql
|
||||
* @param PDO $pdo Class PDO instance.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function databaseCheck($dbName, $dbType, $pdo)
|
||||
{
|
||||
// Return value.
|
||||
$retVal = false;
|
||||
|
||||
// Prepare queries.
|
||||
$stmt = ($dbType === "mysql" ? 'SHOW DATABASES' : 'SELECT datname AS Database FROM pg_database');
|
||||
$stmt = $pdo->prepare($stmt);
|
||||
$stmt->setFetchMode(PDO::FETCH_ASSOC);
|
||||
|
||||
// Run the query.
|
||||
$stmt->execute();
|
||||
$tables = $stmt->fetchAll();
|
||||
|
||||
// Store the query result as an array.
|
||||
$tablearr = [];
|
||||
foreach ($tables as $table) {
|
||||
$tablearr[] = $table;
|
||||
}
|
||||
|
||||
// Loop over the query result.
|
||||
foreach ($tablearr as $tab) {
|
||||
|
||||
// Check if the database is found.
|
||||
if (isset($tab["Database"])) {
|
||||
if ($tab["Database"] == $dbName) {
|
||||
$retVal = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($tab["database"])) {
|
||||
if ($tab["database"] == $dbName) {
|
||||
$retVal = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $retVal;
|
||||
}
|
||||
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
if ($page->isPostBack()) {
|
||||
$cfg->doCheck = true;
|
||||
|
||||
// Get the information the user typed into the website.
|
||||
$cfg->DB_HOST = trim($_POST['host']);
|
||||
$cfg->DB_PORT = trim($_POST['sql_port']);
|
||||
$cfg->DB_SOCKET = trim($_POST['sql_socket']);
|
||||
$cfg->DB_USER = trim($_POST['user']);
|
||||
$cfg->DB_PASSWORD = trim($_POST['pass']);
|
||||
$cfg->DB_NAME = trim($_POST['db']);
|
||||
$cfg->DB_SYSTEM = strtolower(trim($_POST['db_system']));
|
||||
$cfg->error = false;
|
||||
|
||||
// Check if user selected right DB type.
|
||||
if (!in_array($cfg->DB_SYSTEM, ['mysql'])) {
|
||||
$cfg->emessage = 'Invalid database system. Must be: mysql ; Not: ' . $cfg->DB_SYSTEM;
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
// Connect to the SQL server.
|
||||
try {
|
||||
// HAS to be DB because settings table does not exist yet.
|
||||
$pdo = new DB(
|
||||
[
|
||||
'checkVersion' => true,
|
||||
'createDb' => true,
|
||||
'dbhost' => $cfg->DB_HOST,
|
||||
'dbname' => $cfg->DB_NAME,
|
||||
'dbpass' => $cfg->DB_PASSWORD,
|
||||
'dbport' => $cfg->DB_PORT,
|
||||
'dbsock' => $cfg->DB_SOCKET,
|
||||
'dbtype' => $cfg->DB_SYSTEM,
|
||||
'dbuser' => $cfg->DB_USER,
|
||||
]
|
||||
);
|
||||
$cfg->dbConnCheck = true;
|
||||
} catch (\PDOException $e) {
|
||||
$cfg->emessage = 'Unable to connect to the SQL server.';
|
||||
$cfg->error = true;
|
||||
$cfg->dbConnCheck = false;
|
||||
} catch (\RuntimeException $e) {
|
||||
switch ($e->getCode()) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
$cfg->error = true;
|
||||
$cfg->emessage = $e->getMessage();
|
||||
break;
|
||||
default:
|
||||
var_dump($e);
|
||||
throw new \RuntimeException($e->getMessage(), $e->getCode(), $e);
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the MySQL version is correct.
|
||||
$goodVersion = false;
|
||||
if (!$cfg->error) {
|
||||
try {
|
||||
$goodVersion = $pdo->isDbVersionAtLeast(nZEDb_MINIMUM_MYSQL_VERSION);
|
||||
} catch (\PDOException $e) {
|
||||
$goodVersion = false;
|
||||
$cfg->error = true;
|
||||
$cfg->emessage = 'Could not get version from SQL server.';
|
||||
}
|
||||
|
||||
if ($goodVersion === false) {
|
||||
$cfg->error = true;
|
||||
$cfg->emessage =
|
||||
'You are using an unsupported version of ' .
|
||||
$cfg->DB_SYSTEM .
|
||||
' the minimum allowed version is ' .
|
||||
nZEDb_MINIMUM_MYSQL_VERSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Start inserting data into the DB.
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
|
||||
$DbSetup = new \nntmux\db\DbUpdate(
|
||||
[
|
||||
'backup' => false,
|
||||
'db' => $pdo,
|
||||
]
|
||||
);
|
||||
|
||||
try {
|
||||
$DbSetup->processSQLFile(); // Setup default schema
|
||||
$DbSetup->processSQLFile( // Process any custom stuff.
|
||||
[
|
||||
'filepath' => nZEDb_RES . 'db' . DS . 'schema' . DS . 'mysql-data.sql'
|
||||
]
|
||||
);
|
||||
$DbSetup->loadTables(); // Load default data files
|
||||
} catch (\PDOException $err) {
|
||||
$cfg->error = true;
|
||||
$cfg->emessage = "Error inserting: (" . $err->getMessage() . ")";
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
// Check one of the standard tables was created and has data.
|
||||
$dbInstallWorked = false;
|
||||
$reschk = $pdo->query("SELECT COUNT(id) AS num FROM tmux");
|
||||
if ($reschk === false) {
|
||||
$cfg->dbCreateCheck = false;
|
||||
$cfg->error = true;
|
||||
$cfg->emessage = 'Could not select data from your database, check that tables and data are properly created/inserted.';
|
||||
} else {
|
||||
foreach ($reschk as $row) {
|
||||
if ($row['num'] > 0) {
|
||||
$dbInstallWorked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ver = new Versions();
|
||||
$patch = $ver->getSQLPatchFromFile();
|
||||
|
||||
if ($dbInstallWorked) {
|
||||
if ($patch > 0) {
|
||||
$updateSettings = $pdo->exec(
|
||||
"UPDATE settings SET value = '$patch' WHERE section = '' AND subsection = '' AND name = 'sqlpatch'"
|
||||
);
|
||||
} else {
|
||||
$updateSettings = false;
|
||||
}
|
||||
|
||||
// If it all worked, move to the next page.
|
||||
if ($updateSettings) {
|
||||
header("Location: ?success");
|
||||
if (file_exists($cfg->DB_DIR . '/post_install.php')) {
|
||||
exec("php " . $cfg->DB_DIR . "/post_install.php ${pdo}");
|
||||
}
|
||||
exit();
|
||||
} else {
|
||||
$cfg->error = true;
|
||||
$cfg->emessage = "Could not update sqlpatch to '$patch' for your database.";
|
||||
}
|
||||
} else {
|
||||
$cfg->dbCreateCheck = false;
|
||||
$cfg->error = true;
|
||||
$cfg->emessage = 'Could not select data from your database.';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
$page->smarty->assign('page', $page);
|
||||
$page->content = $page->smarty->fetch('step2.tpl');
|
||||
$page->render();
|
||||
Executable
+80
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
use nntmux\Install;
|
||||
|
||||
$page = new InstallPage();
|
||||
$page->title = "OpenSSL Setup";
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
if ($page->isPostBack()) {
|
||||
$cfg->doCheck = true;
|
||||
|
||||
$cfg->nZEDb_SSL_CAFILE = trim($_POST['cafile']);
|
||||
$cfg->nZEDb_SSL_CAPATH = trim($_POST['capath']);
|
||||
$cfg->nZEDb_SSL_VERIFY_PEER = (isset($_POST['verifypeer']) ? (trim($_POST['verifypeer']) == '1' ? true : false) : false);
|
||||
$cfg->nZEDb_SSL_VERIFY_HOST = (isset($_POST['verifyhost']) ? (trim($_POST['verifyhost']) == '1' ? true : false) : false);
|
||||
$cfg->nZEDb_SSL_ALLOW_SELF_SIGNED = (isset($_POST['allowselfsigned']) ? (trim($_POST['allowselfsigned']) == '1' ? true : false) : false);
|
||||
|
||||
// If the user doesn't want to verify peer, disable everything.
|
||||
if (!$cfg->nZEDb_SSL_VERIFY_PEER) {
|
||||
$cfg->nZEDb_SSL_ALLOW_SELF_SIGNED = true;
|
||||
$cfg->nZEDb_SSL_VERIFY_HOST = false;
|
||||
$cfg->nZEDb_SSL_CAFILE = $cfg->nZEDb_SSL_CAPATH = '';
|
||||
}
|
||||
|
||||
// If both paths are empty, disable everything.
|
||||
if (!$cfg->nZEDb_SSL_CAPATH && !$cfg->nZEDb_SSL_CAFILE) {
|
||||
$cfg->nZEDb_SSL_VERIFY_PEER = $cfg->nZEDb_SSL_VERIFY_HOST = false;
|
||||
$cfg->nZEDb_SSL_ALLOW_SELF_SIGNED = true;
|
||||
$cfg->nZEDb_SSL_CAFILE = $cfg->nZEDb_SSL_CAPATH = '';
|
||||
}
|
||||
|
||||
// Make sure the files and all paths are readable.
|
||||
if ($cfg->nZEDb_SSL_CAFILE != '') {
|
||||
if (!checkPathsReadable($cfg->nZEDb_SSL_CAFILE)) {
|
||||
$cfg->error = 'Invalid ca file path or it is not readable or the folders up to it are not readable.';
|
||||
} else if (1) {
|
||||
|
||||
}
|
||||
}
|
||||
if ($cfg->nZEDb_SSL_CAPATH != '' && !checkPathsReadable($cfg->nZEDb_SSL_CAPATH)) {
|
||||
$cfg->error = 'Invalid ca folder path or it is not readable or the folders up to it are not readable.';
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
header("Location: ?success");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
$page->smarty->assign('page', $page);
|
||||
|
||||
$page->content = $page->smarty->fetch('step3.tpl');
|
||||
$page->render();
|
||||
|
||||
function checkPathsReadable($location)
|
||||
{
|
||||
$paths = preg_split('#\/#', $location);
|
||||
$directory = '';
|
||||
if ($paths && count($paths)) {
|
||||
foreach ($paths as $path) {
|
||||
$directory .= DS . $path;
|
||||
if (!is_readable($directory)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
use nntmux\Install;
|
||||
|
||||
$page = new InstallPage();
|
||||
$page->title = "News Server Setup";
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
if ($page->isPostBack()) {
|
||||
$cfg->doCheck = true;
|
||||
|
||||
$cfg->NNTP_SERVER = trim($_POST['server']);
|
||||
$cfg->NNTP_USERNAME = trim($_POST['user']);
|
||||
$cfg->NNTP_PASSWORD = trim($_POST['pass']);
|
||||
$cfg->NNTP_PORT = (trim($_POST['port']) == '') ? 119 : trim($_POST['port']);
|
||||
$cfg->NNTP_SSLENABLED = (isset($_POST['ssl']) ? (trim($_POST['ssl']) == '1' ? true : false) : false);
|
||||
$cfg->NNTP_SOCKET_TIMEOUT = (is_numeric(trim($_POST['socket_timeout'])) ? (int)trim($_POST['socket_timeout']) : 120);
|
||||
|
||||
$cfg->NNTP_SERVER_A = trim($_POST['servera']);
|
||||
$cfg->NNTP_USERNAME_A = trim($_POST['usera']);
|
||||
$cfg->NNTP_PASSWORD_A = trim($_POST['passa']);
|
||||
$cfg->NNTP_PORT_A = (trim($_POST['porta']) == '') ? 119 : trim($_POST['porta']);
|
||||
$cfg->NNTP_SSLENABLED_A = (isset($_POST['ssla']) ? (trim($_POST['ssla']) == '1' ? true : false) : false);
|
||||
$cfg->NNTP_SOCKET_TIMEOUT_A = (is_numeric(trim($_POST['socket_timeouta'])) ? (int)trim($_POST['socket_timeouta']) : 120);
|
||||
|
||||
$test = new Net_NNTP_Client();
|
||||
$pear_obj = new PEAR();
|
||||
|
||||
$enc = false;
|
||||
if ($cfg->NNTP_SSLENABLED) {
|
||||
$enc = "tls";
|
||||
}
|
||||
|
||||
// test connection
|
||||
$cfg->nntpCheck = $test->connect($cfg->NNTP_SERVER, $enc, $cfg->NNTP_PORT);
|
||||
if ($pear_obj->isError($cfg->nntpCheck)) {
|
||||
$cfg->nntpCheck->message = 'Connection error, check your server name, port and SSL: (' . $cfg->nntpCheck->getMessage() . ')';
|
||||
$cfg->error = true;
|
||||
} else if ($cfg->NNTP_USERNAME != '' && $cfg->NNTP_PASSWORD != '') {
|
||||
//test authentication if username and password are provided
|
||||
$cfg->nntpCheck = $test->authenticate($cfg->NNTP_USERNAME, $cfg->NNTP_PASSWORD);
|
||||
if ($pear_obj->isError($cfg->nntpCheck)) {
|
||||
$cfg->nntpCheck->message = 'Authentication error, check your username and password: (' . $cfg->nntpCheck->getMessage() . ')';
|
||||
$cfg->error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
header("Location: ?success");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
$page->smarty->assign('page', $page);
|
||||
|
||||
$page->content = $page->smarty->fetch('step4.tpl');
|
||||
$page->render();
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
use nntmux\Install;
|
||||
|
||||
$page = new InstallPage();
|
||||
$page->title = "Save Settings";
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
$cfg->saveConfigCheck = $cfg->saveConfig();
|
||||
if ($cfg->saveConfigCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$cfg->saveLockCheck = $cfg->saveInstallLock();
|
||||
if ($cfg->saveLockCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
$page->smarty->assign('page', $page);
|
||||
|
||||
$page->content = $page->smarty->fetch('step5.tpl');
|
||||
$page->render();
|
||||
Executable
+68
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
use nntmux\Install;
|
||||
use nntmux\Users;
|
||||
|
||||
$page = new InstallPage();
|
||||
$page->title = "Setup Admin User";
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
if ($page->isPostBack()) {
|
||||
$cfg->doCheck = true;
|
||||
|
||||
$cfg->ADMIN_USER = trim($_POST['user']);
|
||||
$cfg->ADMIN_FNAME = trim($_POST['fname']);
|
||||
$cfg->ADMIN_LNAME = trim($_POST['lname']);
|
||||
$cfg->ADMIN_PASS = trim($_POST['pass']);
|
||||
$cfg->ADMIN_EMAIL = trim($_POST['email']);
|
||||
|
||||
if ($cfg->ADMIN_USER == '' || $cfg->ADMIN_PASS == '' || $cfg->ADMIN_EMAIL == '') {
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
$user = new Users();
|
||||
if (!$user->isValidUsername($cfg->ADMIN_USER)) {
|
||||
$cfg->error = true;
|
||||
$cfg->ADMIN_USER = '';
|
||||
} else {
|
||||
$usrCheck = $user->getByUsername($cfg->ADMIN_USER);
|
||||
if ($usrCheck) {
|
||||
$cfg->error = true;
|
||||
$cfg->ADMIN_USER = '';
|
||||
}
|
||||
}
|
||||
if (!$user->isValidEmail($cfg->ADMIN_EMAIL)) {
|
||||
$cfg->error = true;
|
||||
$cfg->ADMIN_EMAIL = '';
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->adminCheck = $user->add($cfg->ADMIN_USER, $cfg->ADMIN_FNAME, $cfg->ADMIN_LNAME, $cfg->ADMIN_PASS, $cfg->ADMIN_EMAIL, 2, '');
|
||||
if (!is_numeric($cfg->adminCheck)) {
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
$user->login($cfg->adminCheck, "", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
header("Location: ?success");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
$page->smarty->assign('page', $page);
|
||||
|
||||
$page->content = $page->smarty->fetch('step6.tpl');
|
||||
$page->render();
|
||||
Executable
+113
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
require_once realpath(__DIR__ . DIRECTORY_SEPARATOR . 'install.php');
|
||||
|
||||
use nntmux\Install;
|
||||
|
||||
use nntmux\db\Settings;
|
||||
|
||||
$page = new InstallPage();
|
||||
|
||||
if (!isset($_REQUEST["success"])) {
|
||||
$page->title = "File Paths";
|
||||
}
|
||||
|
||||
$cfg = new Install();
|
||||
|
||||
if (!$cfg->isInitialized()) {
|
||||
header("Location: index.php");
|
||||
die();
|
||||
}
|
||||
|
||||
$cfg = $cfg->getSession();
|
||||
|
||||
if ($page->isPostBack()) {
|
||||
$cfg->doCheck = true;
|
||||
|
||||
$cfg->NZB_PATH = trim($_POST['nzbpath']);
|
||||
$cfg->COVERS_PATH = trim($_POST['coverspath']);
|
||||
$cfg->UNRAR_PATH = trim($_POST['tmpunrarpath']);
|
||||
|
||||
if (extension_loaded('posix') && strtolower(substr(PHP_OS, 0, 3)) !== 'win') {
|
||||
$group = posix_getgrgid(posix_getgid());
|
||||
$fixString = '<br /><br />Another solution is to run:<br />chown -R YourUnixUserName:' . $group['name'] . ' ' . nZEDb_ROOT .
|
||||
'<br />Then give your user access to the group:<br />usermod -a -G ' . $group['name'] . ' YourUnixUserName' .
|
||||
'<br />Finally give read/write access to your user/group:<br />chmod -R 774 ' . nZEDb_ROOT;
|
||||
$page->smarty->assign('fixString', $fixString);
|
||||
}
|
||||
|
||||
if ($cfg->NZB_PATH == '') {
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
$cfg->nzbPathCheck = is_writable($cfg->NZB_PATH);
|
||||
if ($cfg->nzbPathCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$lastchar = substr($cfg->NZB_PATH, strlen($cfg->NZB_PATH) - 1);
|
||||
if ($lastchar != "/") {
|
||||
$cfg->NZB_PATH = $cfg->NZB_PATH . "/";
|
||||
}
|
||||
}
|
||||
|
||||
if ($cfg->UNRAR_PATH == '') {
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
$cfg->unrarPathCheck = is_writable($cfg->NZB_PATH);
|
||||
if ($cfg->unrarPathCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
$lastchar = substr($cfg->UNRAR_PATH, strlen($cfg->UNRAR_PATH) - 1);
|
||||
if ($lastchar != "/") {
|
||||
$cfg->UNRAR_PATH = $cfg->UNRAR_PATH . "/";
|
||||
}
|
||||
}
|
||||
/*
|
||||
if ($cfg->COVERS_PATH == '') {
|
||||
$cfg->error = true;
|
||||
} else {
|
||||
\nntmux\utility\Misc::trailingSlash($cfg->COVERS_PATH);
|
||||
|
||||
$cfg->coverPathCheck = is_writable($cfg->COVERS_PATH);
|
||||
if ($cfg->coverPathCheck === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
if (!$cfg->error) {
|
||||
if (!file_exists($cfg->UNRAR_PATH)) {
|
||||
mkdir($cfg->UNRAR_PATH);
|
||||
}
|
||||
|
||||
$pdo = new Settings();
|
||||
$sql1 = sprintf("UPDATE settings SET value = %s WHERE setting = 'nzbpath'", $pdo->escapeString($cfg->NZB_PATH));
|
||||
$sql2 = sprintf("UPDATE settings SET value = %s WHERE setting = 'tmpunrarpath'", $pdo->escapeString($cfg->UNRAR_PATH));
|
||||
$sql3 = sprintf("UPDATE settings SET value = %s WHERE setting = 'coverspath'", $pdo->escapeString($cfg->COVERS_PATH));
|
||||
if ($pdo->queryExec($sql1) === false || $pdo->queryExec($sql2) === false || $pdo->queryExec($sql3) === false) {
|
||||
$cfg->error = true;
|
||||
}
|
||||
|
||||
if ($cfg->error !== true) {
|
||||
if ($cfg->COVERS_PATH != nZEDb_WWW . 'covers' . DS) {
|
||||
// TODO clean up old covers location if 'empty' (i.e. only contains the versioned files).
|
||||
}
|
||||
|
||||
if ($cfg->NZB_PATH != nZEDb_ROOT . 'nzbfiles' . DS) {
|
||||
// TODO clean up old nzbfiles location if 'empty' (i.e. only contains the versioned files).
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$cfg->error) {
|
||||
$cfg->setSession();
|
||||
header("Location: ?success");
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$page->smarty->assign('cfg', $cfg);
|
||||
$page->smarty->assign('page', $page);
|
||||
|
||||
$page->content = $page->smarty->fetch('step7.tpl');
|
||||
$page->render();
|
||||
Executable
+46
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
site wide html styles
|
||||
*/
|
||||
body { margin: 0; padding: 0; background: #FFFFFF url(../../themes/shared/images/menu.gif) repeat-x; font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px; color: #515151; }
|
||||
input, select, textarea { font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 14px;}
|
||||
a { text-decoration: none; color: blue; }
|
||||
h1, h2, h3 { margin: 0; font-weight: normal; color: #485459; }
|
||||
li { padding-top:10px; }
|
||||
textarea { font-family: Arial, Helvetica, sans-serif; height:100px; width:300px;}
|
||||
h1 { font-size: 3.0em; padding-bottom:10px;}
|
||||
h2 { font-size: 2.0em; padding-bottom:10px;}
|
||||
input[type=text], input[type=password], textarea, select { background: #fff; background: -webkit-gradient(linear, left top, left 25, from(#fff), color-stop(4%, #f0f0f0), to(#fff)); border: 1px solid #ccc; border-bottom-color: #999; border-right-color: #999; margin: 0; padding: 4px; color: #444; font-size: 100%; outline: none; width: 97%; }
|
||||
|
||||
|
||||
|
||||
/*
|
||||
page layout
|
||||
*/
|
||||
#logo { margin-left: 200px; margin-top: 30px; margin-bottom: 30px; }
|
||||
.content { border: 1px solid #515151; width: 35%; padding: 30px; margin-left: auto; margin-right: auto; background: #FFF; border:1px solid #EEE; -moz-box-shadow: 3px 6px 8px -4px #777; -webkit-box-shadow: 3px 6px 8px -4px #777; box-shadow: 3px 6px 8px -4px #777; }
|
||||
.footer { font-size: 10px; text-align: center; }
|
||||
|
||||
/*
|
||||
install warning message
|
||||
*/
|
||||
div.error { color: red; padding: 20px; }
|
||||
span.error { color: red; }
|
||||
span.warn { color: orange; }
|
||||
span.success { color: green; }
|
||||
|
||||
/*
|
||||
lists
|
||||
*/
|
||||
table.data { border-collapse:collapse; }
|
||||
table.data th { text-align:left; vertical-align:top; background-color:#DDD; border-color: #AAA; border-width: 1px; border-style: solid; padding:3px; font-style:bolder; text-transform:capitalize;}
|
||||
table.data td { white-space:normal; vertical-align:top; padding:5px; border-color: #AAA; border-width: 1px; border-style: solid; }
|
||||
table.data td.less { color: #888; font-size: 0.8em; white-space:nowrap; }
|
||||
table.data td.icons { white-space:nowrap; padding-left:0px; padding-right:0px; width:60px; }
|
||||
table.highlight tr:hover td { background-color: #E1F0D9; }
|
||||
table tr.alt { background-color: #EEE; }
|
||||
table.data em {font-weight:bolder; color:red;}
|
||||
div.hint, div.hint a {font-size:0.9em; font-style:italic; color:#999;}
|
||||
div.hint { margin-bottom:10px;}
|
||||
input.long {width:400px; }
|
||||
input.short { width:40px; }
|
||||
input.date { width:70px; }
|
||||
Executable
+21
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<title>{$page->title}</title>
|
||||
<link href="./templates/install.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
<link rel="shortcut icon" type="image/ico" href="../themes/shared/images/favicon.ico"/>
|
||||
{$page->head}
|
||||
</head>
|
||||
<body>
|
||||
<h1 id="logo"><img alt="NNTmux" src="../themes/shared/images/logo.png" /></h1>
|
||||
<div class="content">
|
||||
<h2>{$page->title}</h2>
|
||||
{$page->content}
|
||||
|
||||
<div class="footer">
|
||||
<p>NNTmux is released under GPL.</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Executable
+254
@@ -0,0 +1,254 @@
|
||||
<table width="100%" border="0" style="margin-top:10px;" class="data highlight">
|
||||
<tr>
|
||||
<th>check</th>
|
||||
<th style="width:75px;">status</th>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking for iconv support:{if !$cfg->iconvCheck}<br /><span class="error">The PHP installation lacks support for iconv.</span>{/if}</td>
|
||||
<td>{if $cfg->iconvCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking for Curl support:{if !$cfg->curlCheck}<br /><span class="error">The PHP installation lacks support for curl.</span>{/if}</td>
|
||||
<td>{if $cfg->curlCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking for sha1():{if !$cfg->sha1Check}<br /><span class="error">The PHP installation lacks support for sha1.</span>{/if}</td>
|
||||
<td>{if $cfg->sha1Check}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking for crypt():{if !$cfg->cryptCheck}<br /><span class="error">The PHP installation lacks support for crypt.</span>{/if}</td>
|
||||
<td>{if $cfg->sha1Check}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking PHP's version:{if !$cfg->phpCheck}<br /><span class="error">Your PHP version is lower than recommended ({$cfg->minPhpVersion}). You may encounter errors if you proceed.</span>{/if}</td>
|
||||
<td>{if $cfg->phpCheck}<span class="success">OK</span>{else}<span class="error">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking for Pear:{if !$cfg->pearCheck}<br /><span class="error">Cannot find PEAR. To install PEAR follow the instructions at <a href="http://pear.php.net/manual/en/installation.php" target="_blank">http://pear.php.net/manual/en/installation.php</a></span>{/if}</td>
|
||||
<td>{if $cfg->pearCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking PHP PDO extension:{if !$cfg->PDOCheck}<br /><span class="error">The PHP installation lacks support for PDO.</span>{/if}</td>
|
||||
<td>{if $cfg->PDOCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking PHP GD extension:{if !$cfg->gdCheck}<br /><span class="warn">The PHP installation lacks support for GD.</span>{/if}</td>
|
||||
<td>{if $cfg->gdCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking PHP OpenSSL Extension:{if !$cfg->opensslCheck}<br /><span class="warn">Your PHP installation does not have the openssl extension loaded. SSL Usenet connections will fail.</span>{/if}</td>
|
||||
<td>{if $cfg->opensslCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking PHP EXIF Extension:{if !$cfg->exifCheck}<br /><span class="warn">Your PHP installation does not have the exif extension loaded. It is required for NFO checking and various other functions.</span>{/if}</td>
|
||||
<td>{if $cfg->exifCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking PHP json extension:{if !$cfg->jsonCheck}<br /><span class="error">The PHP installation lacks support for json.</span>{/if}</td>
|
||||
<td>{if $cfg->jsonCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking PHP date.timezone:{if !$cfg->timezoneCheck}<br /><span class="warn">You have no default timezone set in php.ini. e.g date.timezone = America/New_York</span>{/if}</td>
|
||||
<td>{if $cfg->timezoneCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking PHP max_execution_time:{if !$cfg->timelimitCheck}<br /><span class="warn">Your PHP installation's max_execution_time setting is low, please consider increasing it >= 120</span>{/if}</td>
|
||||
<td>{if $cfg->timelimitCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking PHP memory_limit:{if !$cfg->memlimitCheck}<br /><span class="warn">Your PHP installation's memory_limit setting is low, please consider increasing it >= 1024M.</span>{/if}</td>
|
||||
<td>{if $cfg->memlimitCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the Smarty compile dir is writable:
|
||||
{if !$cfg->cacheCheck}<br />
|
||||
<span class="error">
|
||||
The template compile dir must be writable.<br /><br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->SMARTY_COMPILED_TEMPLATES}
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->cacheCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking if the anime covers dir is writable:
|
||||
{if !$cfg->animeCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/anime dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}anime
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->animeCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the audio covers dir is writable:
|
||||
{if !$cfg->audioCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/audio dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}audio
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->audioCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking if the audio sample dir is writable:
|
||||
{if !$cfg->audiosampleCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/audiosample dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}audiosample
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->audiosampleCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the book covers dir is writable:
|
||||
{if !$cfg->bookCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/book dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}book
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->bookCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking if the console covers dir is writable:
|
||||
{if !$cfg->consoleCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/console dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}console
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->consoleCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the movie covers dir is writable:
|
||||
{if !$cfg->movieCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/movies dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}movies
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->movieCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking if the music covers dir is writable:
|
||||
{if !$cfg->musicCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/music dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}music
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->musicCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the preview picture dir is writable:
|
||||
{if !$cfg->previewCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/preview dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}preview
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->previewCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking if the sample picture dir is writable:
|
||||
{if !$cfg->sampleCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/sample dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}sample
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->sampleCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the video sample dir is writable:
|
||||
{if !$cfg->videoCoversCheck}<br />
|
||||
<span class="error">
|
||||
The covers/video dir must be writable.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->COVERS_PATH}video
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->videoCoversCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking if the config.php file is writable:
|
||||
{if !$cfg->configCheck}<br />
|
||||
<span class="error">
|
||||
The installer cannot write to {$cfg->CONFIG_PATH}.<br />A quick solution is to run:<br />chmod 777 {$cfg->CONFIG_PATH}
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->configCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td>Checking if the install.lock file is writable:
|
||||
{if !$cfg->lockCheck}<br />
|
||||
<span class="error">
|
||||
The installer cannot write to {$cfg->INSTALL_DIR}/install.lock.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod 777 {$cfg->INSTALL_DIR}
|
||||
{$fixString}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>{if $cfg->lockCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking for schema files:{if !$cfg->schemaCheck}<br /><span class="error">One or all of the schema files are missing, please make sure they are placed placed in: {$cfg->DB_DIR}/</span>{/if}</td>
|
||||
<td>{if $cfg->schemaCheck}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
{if $smarty.server.SERVER_SOFTWARE|truncate:8:"" == 'lighttpd'}
|
||||
<td>Instructions for Lighttpd's mod_rewrite:<br /><span class="warn">It is not possible for me to check you have enabled this properly! YOU will need to ensure that "mod_rewrite" is included in server.modules, check lighttpd for this, also ensure the rewrite rules are installed for your host. See misc/urlrewriting/lighttpd.txt for examples.</span></td>
|
||||
<td><span class="warn">Warning</span></td>
|
||||
{else}
|
||||
<td>Checking for Apache's mod_rewrite:{if !$cfg->rewriteCheck}<br /><span class="warn">The Apache module mod_rewrite is not loaded. This module is required, please enable it if you are running Apache</span>{/if}</td>
|
||||
<td>{if $cfg->rewriteCheck}<span class="success">OK</span>{else}<span class="warn">Warning</span>{/if}</td>
|
||||
{/if}
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td>Checking PHP sessions path permissions:{if !$cfg->sessionsPathPermissions}<br /><span class="error">The PHP sessions path ({$sessionsSavePath}) does not have read or write access.</span>{/if}</td>
|
||||
<td>{if $cfg->sessionsPathPermissions}<span class="success">OK</span>{else}<span class="error">Error</span>{/if}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="text-align:center">
|
||||
{if !$cfg->error}
|
||||
<p>No problems were found and you are ready to install.</p>
|
||||
<form action="step2.php"><input type="submit" value="Step two: Set up the database" /></form>
|
||||
{else}
|
||||
<div class="error">Errors encountered - NNtmux will not function correctly unless these problems are solved.</div>
|
||||
{/if}
|
||||
</div>
|
||||
Executable
+78
@@ -0,0 +1,78 @@
|
||||
{if $page->isSuccess()}
|
||||
<div style="align=center">
|
||||
<p style="text-align:center">The database setup is correct, you may continue to the next step.</p>
|
||||
<form action="step3.php">
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
<input align="center" type="submit" value="Step three: Setup openssl" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{else}
|
||||
|
||||
<p>This page will attempt to use your database information provided below to connect to the database and create the required tables and initial data.</p>
|
||||
<ul>Notes:
|
||||
<li>If your database already exists, <span style="text-decoration:underline">it will be overwritten</span> with this version. If not it will be created.</li>
|
||||
<li>For the database system, use mysql. In the future other database systems might be supported.</li>
|
||||
<li>The default MySQL port is 3306, you can find this in my.cnf</li>
|
||||
<li>It is recommended to use the Socket path if you are using a unix based operating system, you can find the socket path in my.cnf</li>
|
||||
<li>Entering the Socket path will ignore the Hostname and Port.</li>
|
||||
<li>Using the root MySQL user is not recommended. Please create a MySQL user, read <a href="https://dev.mysql.com/doc/refman/5.6/en/adding-users.html">this</a> manual page for information.</li>
|
||||
<li>Granting the FILE permission to your user is <span style="text-decoration:underline">required</span>, GRANT ALL does not give you the FILE permission.</li>
|
||||
<li>It is recommended to secure your MySQL installation, please read <a href="https://dev.mysql.com/doc/refman/5.6/en/mysql-secure-installation.html">this</a> page.</li>
|
||||
</ul>
|
||||
|
||||
<form action="?" method="post">
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
{if $cfg->error}
|
||||
<div>
|
||||
The following error(s) were encountered:<br />
|
||||
{if $cfg->dbConnCheck === false}
|
||||
<span class="error">• Unable to connect to database:<br />{$cfg->emessage}</span><br />
|
||||
{elseif $cfg->dbNameCheck === false}
|
||||
<span class="error">• Unable to select database:<br />{$cfg->emessage}</span><br />
|
||||
{elseif $cfg->dbCreateCheck === false}
|
||||
<span class="error">• Unable to create database and data. Check permissions of your mysql user.</span><br />
|
||||
{else}
|
||||
<span class="error">{$cfg->emessage}</span><br />
|
||||
{/if}
|
||||
<br />
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<table border="0" style="margin-top:10px;width=100%" class="data highlight" align="center">
|
||||
<tr class="">
|
||||
<td><label for="host">Database System (type in mysql):</label></td>
|
||||
<td><input type="text" name="db_system" id="db_system" value="{$cfg->DB_SYSTEM}" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="host">Hostname:</label></td>
|
||||
<td><input type="text" name="host" id="host" value="{$cfg->DB_HOST}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="sql_port">Port Number:</label></td>
|
||||
<td><input type="text" name="sql_port" id="sql_port" value="{$cfg->DB_PORT}" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="sql_socket">Socket Path(optional):</label></td>
|
||||
<td><input type="text" name="sql_socket" id="sql_socket" value="{$cfg->DB_SOCKET}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="user">Username:</label></td>
|
||||
<td><input type="text" name="user" id="user" value="{$cfg->DB_USER}" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="pass">Password:</label></td>
|
||||
<td><input type="text" name="pass" id="pass" value="{$cfg->DB_PASSWORD}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="db">Database (to connect to):</label></td>
|
||||
<td><input type="text" name="db" id="db" value="{$cfg->DB_NAME}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
<input type="submit" value="Setup Database" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{/if}
|
||||
Executable
+82
@@ -0,0 +1,82 @@
|
||||
{if $page->isSuccess()}
|
||||
<div style="align=center">
|
||||
<p style="text-align:center">The openssl setup looks correct, you may continue to the next step.</p>
|
||||
<form action="step4.php">
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
<input type="submit" value="Step four: Setup news server connection" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{else}
|
||||
<form action="?" method="post">
|
||||
<p>An openssl CA bundle file is recommended to verify the authenticity of remote certificates when connecting to various servers using TLS/SSL.</p>
|
||||
<ul>
|
||||
<li>If you do not have a CA bundle, you can download one <a href="http://curl.haxx.se/docs/caextract.html">here</a>.</li>
|
||||
<li>You can place the CA bundle in the /etc/ssl/certs/ folder if you are on linux.</li>
|
||||
<li>The file must be readable by both your web user and your CLI user running scripts.</li>
|
||||
</ul>
|
||||
|
||||
<table border="0" style="width:100%;margin-top:10px;" class="data highlight">
|
||||
<tr class="">
|
||||
<td><label for="cafile">CA Bundle Path(Optional):</label></td>
|
||||
<td>
|
||||
<input type="text" name="cafile" id="cafile" value="{$cfg->nZEDb_SSL_CAFILE}" />
|
||||
<div>
|
||||
Location of Certificate Authority file on local filesystem which will be used if the Verify Peer option is enabled to authenticate the identity of the remote peer.
|
||||
<br />Example: /etc/ssl/certs/cacert.pem
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="capath">Certificate Folder(Optional):</label></td>
|
||||
<td>
|
||||
<input type="text" name="capath" id="capath" value="{$cfg->nZEDb_SSL_CAPATH}" />
|
||||
<div>
|
||||
If the ca bundle cert file is not specified or if the certificate is not found there, you can specify a directory here which will be searched for a suitable certificate.
|
||||
<br />Example: /etc/ssl/certs/</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="verifypeer">Verify peer:</label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="verifypeer" id="verifypeer" value="1" {if $cfg->nZEDb_SSL_VERIFY_PEER=="true"}checked="checked"{/if} />
|
||||
<div>
|
||||
Enabling this requires the ca bundle cert file path to be set.<br />
|
||||
Disabling this will disable TLS/SSL remote certificate verification which is not recommended.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="verifyhost">Verify host:</label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="verifyhost" id="verifyhost" value="1" {if $cfg->nZEDb_SSL_VERIFY_HOST=="true"}checked="checked"{/if} />
|
||||
<div>
|
||||
This makes sure the host is who they say they are.<br />
|
||||
See <a href="http://curl.haxx.se/libcurl/c/CURLOPT_SSL_VERIFYHOST.html">this</a> link for detailed info.<br />
|
||||
You might need to disable this as some providers are using the wrong CN in their certs (probably because they are cheap and re-using a cert and rely on people disabling host verification or lack knowledge).<br />
|
||||
Note that disabling this is a security risk and you should consider getting a usenet provider that has a proper certificate.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="allowselfsigned">Allow self signed certificates:</label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="allowselfsigned" id="allowselfsigned" value="1" {if $cfg->nZEDb_SSL_ALLOW_SELF_SIGNED=="true"}checked="checked"{/if} />
|
||||
<div>
|
||||
Enabling this will not verify self-signed openssl certificates.<br />
|
||||
Note that you will require non self-signed certificates for sabnzbd/nzbget/etc if you disable this.
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
{if $cfg->error}
|
||||
<div>
|
||||
The following error was encountered:<br />
|
||||
<span class="error">• {$cfg->error}</span><br /><br /><br />
|
||||
</div>
|
||||
{/if}
|
||||
<input type="submit" value="Verify openssl settings" />
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
Executable
+98
@@ -0,0 +1,98 @@
|
||||
{if $page->isSuccess()}
|
||||
<div style="text-align:center">
|
||||
<p>The news server setup is correct, you may continue to the next step.</p>
|
||||
<form action="step5.php"><input type="submit" value="Step five: Save Settings" /></form>
|
||||
</div>
|
||||
{else}
|
||||
<form action="?" method="post">
|
||||
<p>If you have a primary news server (NNTP), please provide the following information (make sure the information is correct, some servers do not check if the password is good):</p>
|
||||
<table border="0" style="width:100%;margin-top:10px;" class="data highlight">
|
||||
<tr class="">
|
||||
<td><label for="server">Server:</label></td>
|
||||
<td>
|
||||
<input type="text" name="server" id="server" value="{$cfg->NNTP_SERVER}" />
|
||||
<div class="hint">e.g. eu.news.astraweb.com</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="user">Username:</label></td>
|
||||
<td><input type="text" name="user" id="user" value="{$cfg->NNTP_USERNAME}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="pass">Password:</label></td>
|
||||
<td>
|
||||
<input type="text" name="pass" id="pass" value="{$cfg->NNTP_PASSWORD}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="port">Port:</label></td>
|
||||
<td>
|
||||
<input type="text" name="port" id="port" value="{$cfg->NNTP_PORT}" />
|
||||
<div class="hint">e.g. 119 or 443,563 for SSL</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ssl">SSL?:</label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="ssl" id="ssl" value="1" {if $cfg->NNTP_SSLENABLED=="true"}checked="checked"{/if} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="socket_timeout">Socket Timeout:</label></td>
|
||||
<td>
|
||||
<input type="text" name="socket_timeout" id="socket_timeout" value="{$cfg->NNTP_SOCKET_TIMEOUT}" />
|
||||
<div class="hint">Seconds to time out when we lost connection to usenet. Default is 120 seconds.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>(optional) If you have an alternate news server (NNTP), please provide the following information (make sure the information is correct, some servers do not check if the password is good):</p>
|
||||
<table border="0" style="width:100%;margin-top:10px;" class="data highlight">
|
||||
<tr class="">
|
||||
<td><label for="servera">Server:</label></td>
|
||||
<td>
|
||||
<input type="text" name="servera" id="servera" value="{$cfg->NNTP_SERVER_A}" />
|
||||
<div class="hint">e.g. eu.news.astraweb.com</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="usera">Username:</label></td>
|
||||
<td><input type="text" name="usera" id="usera" value="{$cfg->NNTP_USERNAME_A}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="passa">Password:</label></td>
|
||||
<td>
|
||||
<input type="text" name="passa" id="passa" value="{$cfg->NNTP_PASSWORD_A}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="porta">Port:</label></td>
|
||||
<td>
|
||||
<input type="text" name="porta" id="porta" value="{$cfg->NNTP_PORT_A}" />
|
||||
<div class="hint">e.g. 119 or 443,563 for SSL</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="ssla">SSL?:</label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="ssla" id="ssla" value="1" {if $cfg->NNTP_SSLENABLED_A=="true"}checked="checked"{/if} />
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="socket_timeouta">Socket Timeout:</label></td>
|
||||
<td>
|
||||
<input type="text" name="socket_timeouta" id="socket_timeouta" value="{$cfg->NNTP_SOCKET_TIMEOUT_A}" />
|
||||
<div class="hint">Seconds to time out when we lost connection to usenet. Default is 120 seconds.</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
{if $cfg->error}
|
||||
<div>
|
||||
The following error was encountered:<br />
|
||||
<span class="error">• {$cfg->error}</span><br /><br /><br />
|
||||
</div>
|
||||
{/if}
|
||||
<input type="submit" value="Test Primary Connection" />
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
Executable
+17
@@ -0,0 +1,17 @@
|
||||
<div style="text-align:center">
|
||||
{if !$cfg->error}
|
||||
<p>The configuration file has been saved, you may continue to the next step.</p>
|
||||
<form action="step6.php"><input type="submit" value="Step six: Setup admin user" /></form>
|
||||
{else}
|
||||
{if !$cfg->saveConfigCheck}
|
||||
<h3><span class="error">Error saving {$cfg->nZEDb_WWW}/config.php.</span></h3>
|
||||
<p>Please save the config.php yourself by creating:<br /><b>{$cfg->nZEDb_WWW}/config.php</b><br />and setting its contents to the following:</p>
|
||||
<p><textarea cols="100" rows="60">{$cfg->COMPILED_CONFIG}</textarea></p>
|
||||
{/if}
|
||||
{if !$cfg->saveLockCheck}
|
||||
<br />
|
||||
<h3><span class="error">Error saving {$cfg->INSTALL_DIR}/install.lock</span></h3>
|
||||
<p>Please save the install.lock yourself by creating:<br /><b>{$cfg->INSTALL_DIR}/install.lock</b></p>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
Executable
+54
@@ -0,0 +1,54 @@
|
||||
{if $page->isSuccess()}
|
||||
<div style="text-align:center">
|
||||
<p>The admin user has been setup, you may continue to the next step.</p>
|
||||
<form action="step7.php"><input type="submit" value="Step seven: Set file paths" /></form>
|
||||
</div>
|
||||
{else}
|
||||
|
||||
<p>This will set up an administrator account you can use to change site settings.</p>
|
||||
<ul>
|
||||
<li>The username must start with a letter followed by a letter or number, it must be 3 characters or longer.</li>
|
||||
<li>The real first name is optional.</li>
|
||||
<li>The real last name is optional.</li>
|
||||
<li>The password must be at least 6 characters long.</li>
|
||||
<li>The email address is used in case you forget your password.</li>
|
||||
</ul>
|
||||
<form action="?" method="post">
|
||||
<table border="0" style="width:100%;margin-top:10px;" class="data highlight">
|
||||
<tr class="alt">
|
||||
<td><label for="user">Username:</label></td>
|
||||
<td><input autocomplete="off" type="text" name="user" id="user" value="{$cfg->ADMIN_USER}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="user">Real First Name(Optional):</label></td>
|
||||
<td><input autocomplete="off" type="text" name="fname" id="fname" value="{$cfg->ADMIN_FNAME}" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="user">Real Last Name(Optional):</label></td>
|
||||
<td><input autocomplete="off" type="text" name="lname" id="lname" value="{$cfg->ADMIN_LNAME}" /></td>
|
||||
</tr>
|
||||
<tr class="">
|
||||
<td><label for="pass">Password:</label></td>
|
||||
<td><input autocomplete="off" type="text" name="pass" id="pass" value="{$cfg->ADMIN_PASS}" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="email">Email:</label> </td>
|
||||
<td><input autocomplete="off" type="text" name="email" id="email" value="{$cfg->ADMIN_EMAIL}" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
{if $cfg->error}
|
||||
<div>
|
||||
The following error(s) were encountered:<br />
|
||||
{if $cfg->ADMIN_USER == ''}<span class="error">• Invalid username</span><br />{/if}
|
||||
{if $cfg->ADMIN_PASS == ''}<span class="error">• Invalid password</span><br />{/if}
|
||||
{if $cfg->ADMIN_EMAIL == ''}<span class="error">• Invalid email</span><br />{/if}
|
||||
<br />
|
||||
</div>
|
||||
{/if}
|
||||
<input type="submit" value="Create Admin User" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{/if}
|
||||
Executable
+58
@@ -0,0 +1,58 @@
|
||||
{if $page->isSuccess()}
|
||||
<div style="text-align:center">
|
||||
<h1>Install Complete!</h1>
|
||||
<br/>
|
||||
<p>Continue to the <a href="../admin/">admin home page</a> to give your site a name and learn how to start indexing usenet.</p>
|
||||
</div>
|
||||
{else}
|
||||
|
||||
<p>You must accept or change these file paths. This is the location where your covers, NZB, and temporary files are stored:</p>
|
||||
<form action="?" method="post">
|
||||
<table border="0" style="width:100%;margin-top:10px;" class="data highlight">
|
||||
<tr class="alt">
|
||||
<td><label for="coverspath">Place to save Covers\Posters etc.:</label></td>
|
||||
<td><input type="text" name="coverspath" value="{$cfg->COVERS_PATH}" size="70" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="nzbpath">Place to create NZB files:</label></td>
|
||||
<td><input type="text" name="nzbpath" value="{$cfg->NZB_PATH}" size="70" /></td>
|
||||
</tr>
|
||||
<tr class="alt">
|
||||
<td><label for="tmpunrarpath">Place for unRARing/temp work:</label></td>
|
||||
<td><input type="text" name="tmpunrarpath" value="{$cfg->UNRAR_PATH}" size="70" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div style="padding-top:20px; text-align:center;">
|
||||
{if $cfg->error}
|
||||
<div>
|
||||
The following error was encountered:<br />
|
||||
<hr>
|
||||
{if !$cfg->nzbPathCheck}
|
||||
<span class="error">
|
||||
The installer cannot write to {$cfg->NZB_PATH}.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod -R 777 {$cfg->NZB_PATH}
|
||||
{$fixString} {$cfg->NZB_PATH}
|
||||
</span><br />
|
||||
<hr>
|
||||
{/if}
|
||||
{if !$cfg->coverPathCheck}<br /><span class="error">The installer cannot write to {$cfg->COVERS_PATH}. A quick solution is to run:<br />chmod -R 777 {$cfg->COVERS_PATH}</span><br />{/if}
|
||||
{if !$cfg->unrarPathCheck}
|
||||
<span class="error">
|
||||
The installer cannot write to {$cfg->UNRAR_PATH}.<br />
|
||||
A quick solution is to run:<br />
|
||||
chmod -R 777 {$cfg->UNRAR_PATH}
|
||||
{$fixString} {$cfg->UNRAR_PATH}
|
||||
</span><br />
|
||||
<hr>
|
||||
{/if}
|
||||
<br />
|
||||
</div>
|
||||
{/if}
|
||||
<input type="submit" value="Set file paths" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{/if}
|
||||
Reference in New Issue
Block a user