Initial Commit of AgileBill Open Source
This commit is contained in:
64
install/config.inc
Normal file
64
install/config.inc
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
# Main path settings, iclude trailing slashes!
|
||||
define ('PATH_AGILE', '%%PATH_AGILE%%');
|
||||
|
||||
# Base site for cookies, example: '.domain.com'
|
||||
define ('AGILE_COOKIE', '');
|
||||
|
||||
# Enable multiple simultaneous sessions for a single user
|
||||
define ('ALLOW_MULTI_LOGIN', false);
|
||||
|
||||
# Database settings
|
||||
define ('AGILE_DB_LIMIT', '25' );
|
||||
define ('AGILE_DB_TYPE', '%%AGILE_DB_TYPE%%' );
|
||||
define ('AGILE_DB_HOST', '%%AGILE_DB_HOST%%' );
|
||||
define ('AGILE_DB_DATABASE', '%%AGILE_DB_DATABASE%%' );
|
||||
define ('AGILE_DB_USERNAME', '%%AGILE_DB_USERNAME%%' );
|
||||
define ('AGILE_DB_PASSWORD', '%%AGILE_DB_PASSWORD%%' );
|
||||
define ('AGILE_DB_PREFIX', '%%AGILE_DB_PREFIX%%' );
|
||||
define ('AGILE_DB_PORT', '' );
|
||||
define ('AGILE_DB_PCONNECT', false);
|
||||
|
||||
# No need to change anything after this line!
|
||||
define ('DEFAULT_SITE', '%%AGILE_DEFAULT_SITE%%');
|
||||
define ('DEF_THEME_N', 'default');
|
||||
define ('PATH_CORE', PATH_AGILE . 'modules/core/');
|
||||
define ('PATH_MODULES', PATH_AGILE . 'modules/');
|
||||
define ('PATH_LANGUAGE', PATH_AGILE . 'language/');
|
||||
define ('PATH_THEMES', PATH_AGILE . 'themes/');
|
||||
define ('PATH_PLUGINS', PATH_AGILE . 'plugins/');
|
||||
define ('PATH_INCLUDES', PATH_AGILE . 'includes/');
|
||||
define ('AGILE_PDF_INVOICE_PATH',PATH_AGILE . 'includes/files/');
|
||||
define ('PATH_FILES', PATH_AGILE . 'includes/files/');
|
||||
define ('PATH_IMAGES', PATH_AGILE . 'includes/images/');
|
||||
define ('URL_IMAGES', 'includes/images/');
|
||||
define ('PATH_ADODB', PATH_AGILE . 'includes/adodb/');
|
||||
$ADODB_CACHE_DIR = PATH_ADODB . 'cache';
|
||||
define ('PATH_FPDF', PATH_AGILE . 'includes/pdf/');
|
||||
define ('PATH_FPDF_TMP', PATH_AGILE . 'includes/pdf/tmp/');
|
||||
define ('FPDF_FONTPATH', PATH_AGILE . 'includes/pdf/font/');
|
||||
define ('PATH_SMARTY', PATH_AGILE . 'includes/smarty/');
|
||||
define ('PATH_GRAPH', PATH_AGILE . 'includes/jpgraph/');
|
||||
//define('SMARTY_DIR', PATH_SMARTY);
|
||||
|
||||
if (isset($REMOTE_ADDR)) define ('USER_IP', $REMOTE_ADDR);
|
||||
elseif (isset($REMOTE_HOST)) define ('USER_IP', $REMOTE_HOST);
|
||||
elseif (getenv('HTTP_X_FORWARDED_FOR')) define ('USER_IP', getenv('HTTP_X_FORWARD_FOR'));
|
||||
else define ('USER_IP', getenv('REMOTE_ADDR'));
|
||||
|
||||
if (!extension_loaded('gd')) define('GD', false);
|
||||
else define('GD', true);
|
||||
|
||||
$_PAGE_SHORTCUTS = Array ( Array ( 's' => '_news', 'p' => 'newsletter:newsletter' ),
|
||||
Array ( 's' => '_affiliate', 'p' => 'affiliate:affiliate' ),
|
||||
Array ( 's' => '_contact', 'p' => 'staff:staff' ),
|
||||
Array ( 's' => '_ticket', 'p' => 'ticket:ticket' ),
|
||||
Array ( 's' => '_account', 'p' => 'account:account' ),
|
||||
Array ( 's' => '_products', 'p' => 'product:cat' ),
|
||||
Array ( 's' => '_product', 'p' => 'product:details' ),
|
||||
Array ( 's' => '_cart', 'p' => 'cart:cart' ),
|
||||
Array ( 's' => '_checkout', 'p' => 'checkout:checkout' ),
|
||||
Array ( 's' => '_static', 'p' => 'static_page:show' )
|
||||
);
|
||||
?>
|
402
install/install.inc
Normal file
402
install/install.inc
Normal file
@@ -0,0 +1,402 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AgileBill - Open Billing Software
|
||||
*
|
||||
* This body of work is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Open AgileBill License
|
||||
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* @link http://www.agileco.com/
|
||||
* @copyright 2004-2008 Agileco, LLC.
|
||||
* @license http://www.agileco.com/agilebill/license1-4.txt
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @package AgileBill
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
global $VAR, $_SERVER, $HTTP_SERVER_VARS;
|
||||
|
||||
# get the file path
|
||||
if (is_file($_SERVER["PATH_TRANSLATED"])) {
|
||||
$path = $_SERVER["PATH_TRANSLATED"];
|
||||
} elseif (is_file($HTTP_SERVER_VARS["SCRIPT_FILENAME"])) {
|
||||
$path = $HTTP_SERVER_VARS["SCRIPT_FILENAME"];
|
||||
} else {
|
||||
$path = PATH_AGILE;
|
||||
}
|
||||
$path = eregi_replace('index.php', '', $path);
|
||||
$path = eregi_replace("[\\\\]", '/', $path);
|
||||
|
||||
# Get the current IP & Domain
|
||||
if(isset($_SERVER)) {
|
||||
$site_domain = @$_SERVER['HTTP_HOST'];
|
||||
$site_ip = @$_SERVER['SERVER_ADDR'];
|
||||
} else {
|
||||
$server = getallheaders();
|
||||
$site_domain = $server['Host'];
|
||||
$site_ip = false;
|
||||
}
|
||||
|
||||
# req writable files/paths
|
||||
$_FILES = Array ( Array('file', 'config.inc.php'),
|
||||
Array('dir', 'includes/smarty/templates/'),
|
||||
Array('dir', 'includes/files/'),
|
||||
Array('dir', 'includes/images/') );
|
||||
|
||||
# Modules to skip over (duplicate tables)
|
||||
$_SKIP_MODULES = Array ( 'account_admin' );
|
||||
|
||||
# Core modules needed
|
||||
$_CORE_MODULES = Array ( 'module', 'module_method', 'group_method');
|
||||
|
||||
# Base modules needed
|
||||
$_BASE_MODULES = Array ( 'setup',
|
||||
'account',
|
||||
'account_memo',
|
||||
'account_admin',
|
||||
'account_group',
|
||||
'account_billing',
|
||||
'backup',
|
||||
'blocked_email',
|
||||
'blocked_ip',
|
||||
'cart',
|
||||
'country',
|
||||
'currency',
|
||||
'checkout',
|
||||
'discount',
|
||||
'email_template',
|
||||
'email_template_translate',
|
||||
'group',
|
||||
'group_method',
|
||||
'invoice',
|
||||
'invoice_commission',
|
||||
'invoice_item',
|
||||
'invoice_item_tax',
|
||||
'invoice_item_discount',
|
||||
'invoice_memo',
|
||||
'invoice_setup',
|
||||
'login_lock',
|
||||
'login_log',
|
||||
'log_error',
|
||||
'module',
|
||||
'module_method',
|
||||
'newsletter',
|
||||
'net_term',
|
||||
'newsletter_subscriber',
|
||||
'product',
|
||||
'product_attr',
|
||||
'product_cat',
|
||||
'product_cat_translate',
|
||||
'product_img',
|
||||
'product_translate',
|
||||
'search',
|
||||
'search_saved',
|
||||
'session',
|
||||
'session_auth_cache',
|
||||
'setup_email',
|
||||
'setup_invoice',
|
||||
'service',
|
||||
'service_memo',
|
||||
'staff',
|
||||
'staff_department',
|
||||
'static_relation',
|
||||
'static_var',
|
||||
'static_var_record',
|
||||
'tax',
|
||||
'task',
|
||||
'temporary_data'
|
||||
);
|
||||
|
||||
# optional modules to check for
|
||||
$_CHK_MODULES = Array ( 'affiliate' => Array ('affiliate', 'affiliate_commission', 'affiliate_template'),
|
||||
'asset' => Array ('asset', 'asset_pool'),
|
||||
'campaign' => Array ('campaign'),
|
||||
'charge' => Array ('charge'),
|
||||
'db_mapping' => Array ('db_mapping'),
|
||||
'email_queue' => Array ('email_queue'),
|
||||
'file' => Array ('file', 'file_category'),
|
||||
'faq' => Array ('faq', 'faq_category', 'faq_translate'),
|
||||
'htaccess' => Array ('htaccess', 'htaccess_dir', 'htaccess_exclude'),
|
||||
'host_server' => Array ('host_server', 'host_registrar_plugin', 'host_tld'),
|
||||
'import' => Array ('import'),
|
||||
'login_share' => Array ('login_share'),
|
||||
'report' => Array ('report'),
|
||||
'radius' => Array ('radius','radius_service'),
|
||||
'static_page' => Array ('static_page', 'static_page_category','static_page_translate'),
|
||||
'ticket' => Array ('ticket', 'ticket_department', 'ticket_message','ticket_attachment'),
|
||||
'voip' => Array ('voip', 'voip_cdr', 'voip_did', 'voip_did_plugin', 'voip_fax','voip_fax_data', 'voip_in_network','voip_local_lookup','voip_pool','voip_rate','voip_rate_prod', 'voip_sip','voip_iax','voip_vm'),
|
||||
'voip_prepaid' => Array ('voip_prepaid') );
|
||||
|
||||
|
||||
# description of optional modules
|
||||
$_MODULE_DESC = Array ( 'affiliate' => '<u>Affiliate Module:</u> manage affiliates and commissions.',
|
||||
'asset' => '<u>Asset Management Module:</u> manage asset assignment status.',
|
||||
'campaign' => '<u>Campaign Module:</u> manage and track advertising campaigns.',
|
||||
'charge' => '<u>Charge Module:</u> manage incremental billing for accounts and services.',
|
||||
'db_mapping' => '<u>DB Mapping Module:</u> sync your users to 3rd party databases, such as forums, CMS, etc.',
|
||||
'email_queue' => '<u>E-mail Queue:</u> Store e-mails in a queue before sending to improve the speed of the user/admin interface.',
|
||||
'file' => '<u>File Module:</u> upload files that users can download based on their groups.',
|
||||
'faq' => '<u>FAQ Module:</u> manage a Frequently Asked Questions list and enables canned responses in the ticket module.',
|
||||
'htaccess' => '<u>Htaccess Module:</u> protect php files and/or entire directories with htaccess based on groups and sell access.',
|
||||
'import' => '<u>Import Module:</u> manage custom imports from other programs.',
|
||||
'host_server' => '<u>Hosting Module:</u> sell webhosting services, domains, and automate server provisioning and domain registration.',
|
||||
'login_share' => '<u>Login Sharing:</u> automatically detect and ban password sharing.',
|
||||
'report' => '<u>Report Module:</u> report generation for account, invoice, and other data.',
|
||||
'radius' => '<u>Radius Module:</u> provisioning control over Radius authentication data.',
|
||||
'static_page' => '<u>Static Page Module:</u> create and manage static pages on your site from your admin area.',
|
||||
'ticket' => '<u>Ticket Module:</u> support ticket management.',
|
||||
'voip' => '<u>VoIP Module:</u> the core VoIP specific AgileVoice functionality.',
|
||||
'voip_prepaid' => '<u>VoIP Prepaid Module:</u> the added VoIP Prepaid AgileVoice functionality.' );
|
||||
|
||||
|
||||
# define the default group to add all methods to
|
||||
$VAR["module_group"] = Array('1001');
|
||||
|
||||
|
||||
# action handler
|
||||
if (!empty($VAR['do']))
|
||||
{
|
||||
$do = $VAR['do'];
|
||||
switch ($VAR['do'])
|
||||
{
|
||||
# check file permissions:
|
||||
case 'step1':
|
||||
$files = test_files ($_FILES);
|
||||
$s_file = 'step1.php';
|
||||
break;
|
||||
|
||||
# write the new config vars
|
||||
case 'step2':
|
||||
$files = write_config($VAR);
|
||||
$s_file = 'step2.php';
|
||||
|
||||
# get the license code
|
||||
$filename = "License.txt";
|
||||
if(is_file($filename)) {
|
||||
$handle = fopen($filename, "r");
|
||||
$license_agreement = fread($handle, filesize($filename));
|
||||
fclose($handle);
|
||||
}
|
||||
|
||||
# check for available optional modules
|
||||
$i=0;
|
||||
if ($files === true) {
|
||||
while (list($n,$v) = each($_CHK_MODULES))
|
||||
{
|
||||
if(is_dir('modules/'. $n )) {
|
||||
$modules[$i]['name'] = $n;
|
||||
$modules[$i]['desc'] = $_MODULE_DESC[$n];
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
# test the database connection & select the modules to install
|
||||
case 'step3':
|
||||
$database = test_connection ();
|
||||
$s_file = 'step3.php';
|
||||
if($database === true) {
|
||||
require_once('install/install_db_core.inc');
|
||||
|
||||
$dbinst = new install_db;
|
||||
$dbinst->core_modules = $_CORE_MODULES;
|
||||
$dbinst->skip_modules = $_SKIP_MODULES;
|
||||
|
||||
# create core tables
|
||||
for($i=0; $i<count($_CORE_MODULES); $i++)
|
||||
$dbinst->install_sql_tbl($_CORE_MODULES[$i]);
|
||||
|
||||
# create base modules
|
||||
for($i=0; $i<count($_BASE_MODULES); $i++)
|
||||
$dbinst->install_sql($_BASE_MODULES[$i]);
|
||||
|
||||
# insert the data
|
||||
$dbinst->add_data($_BASE_MODULES);
|
||||
|
||||
# check for user-defined modules
|
||||
if(is_array(@$VAR['modules'])) {
|
||||
for($i=0; $i<count($VAR['modules']); $i++) {
|
||||
$n = $VAR['modules'][$i];
|
||||
if(!empty($n)) {
|
||||
$arr = $_CHK_MODULES[$n];
|
||||
for($ii=0; $ii<count($arr); $ii++)
|
||||
$dbinst->install_sql($arr[$ii]);
|
||||
$dbinst->add_data($arr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# insert license key and code into setup table
|
||||
$fields=Array('license_key'=> @$VAR['license_key'], 'license_code'=> @$VAR['license_code']);
|
||||
$db->Execute(sqlUpdate($db,"setup",$fields,"site_id=".DEFAULT_SITE));
|
||||
}
|
||||
break;
|
||||
|
||||
# select the database connection
|
||||
case 'step4':
|
||||
$s_file = 'step4.php';
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$do = 'step1';
|
||||
$files = test_files ($_FILES);
|
||||
$s_file = 'step1.php';
|
||||
}
|
||||
|
||||
# Load the template
|
||||
include('install/template.inc');
|
||||
|
||||
|
||||
|
||||
|
||||
#########################################################################################
|
||||
# Write the new config file
|
||||
#########################################################################################
|
||||
function write_config ($VAR)
|
||||
{
|
||||
# get the config template
|
||||
if ($file = fopen('install/config.inc', 'r'))
|
||||
{
|
||||
$data = '';
|
||||
while (!feof($file))
|
||||
$data .= fgetc($file);
|
||||
fclose($file);
|
||||
|
||||
# replace the user vars
|
||||
$data = ereg_replace('%%PATH_AGILE%%', @$VAR['path_agile'], $data);
|
||||
$data = ereg_replace('%%AGILE_DB_TYPE%%', @$VAR['db_type'], $data);
|
||||
$data = ereg_replace('%%AGILE_DB_HOST%%', @$VAR['db_host'], $data);
|
||||
$data = ereg_replace('%%AGILE_DB_DATABASE%%', @$VAR['db_database'], $data);
|
||||
$data = ereg_replace('%%AGILE_DB_USERNAME%%', @$VAR['db_username'], $data);
|
||||
$data = ereg_replace('%%AGILE_DB_PASSWORD%%', @$VAR['db_password'], $data);
|
||||
$data = ereg_replace('%%AGILE_DB_PREFIX%%', @$VAR['db_prefix'], $data);
|
||||
|
||||
if(!defined("DEFAULT_SITE")) define("DEFAULT_SITE", 1);
|
||||
$data = str_replace('%%AGILE_DEFAULT_SITE%%', DEFAULT_SITE, $data);
|
||||
|
||||
# write the new config file
|
||||
if ($file = fopen('config.inc.php', 'w')) {
|
||||
fputs($file, $data);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#########################################################################################
|
||||
# Check file/directory permissions
|
||||
#########################################################################################
|
||||
function test_files ($_arr_perm)
|
||||
{
|
||||
# check each file/dir
|
||||
$_perm_err = false;
|
||||
for($i=0; $i<count($_arr_perm); $i++)
|
||||
{
|
||||
if($_arr_perm[$i][0] == 'file')
|
||||
{
|
||||
if (!file_exists($_arr_perm[$i][1]) || !is_writable($_arr_perm[$i][1])) {
|
||||
$_perm_err .= "<br><br><b>File Permission Problem Detected:</b><br>".
|
||||
"The file `<u>". $_arr_perm[$i][1] . "</u>` must be set set to writable. [ERROR-1]";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!is_dir($_arr_perm[$i][1]) || !is_writable($_arr_perm[$i][1])) {
|
||||
$_perm_err .= "<br><br><b>Directory Permission Problem Detected:</b><br>".
|
||||
"The directory `<u>". $_arr_perm[$i][1] . "</u>` must be set set to writable. [ERROR-2]";
|
||||
}
|
||||
}
|
||||
}
|
||||
if(empty($_perm_err))
|
||||
return true;
|
||||
else
|
||||
return $_perm_err;
|
||||
}
|
||||
|
||||
|
||||
#########################################################################################
|
||||
# Check database connection
|
||||
#########################################################################################
|
||||
function test_connection()
|
||||
{
|
||||
if(AGILE_DB_PREFIX=="") {
|
||||
return "<br><br><b>Database Configration Problem Detected:</b><br>".
|
||||
"You must return to Step 1 of the installation process and enter a database prefix.";
|
||||
}
|
||||
|
||||
# Attempt to connect to the database
|
||||
$db = &DB();
|
||||
$err = @$db->ErrorMsg();
|
||||
if(!empty($err) )
|
||||
{
|
||||
if (eregi('No Database Selected', $err) || eregi('Unknown database', $err))
|
||||
{
|
||||
# attempt to create the database
|
||||
$result = $db->Execute('CREATE DATABASE '.AGILE_DB_DATABASE);
|
||||
if($result === false)
|
||||
return "<br><br><b>Database Problem Detected:</b><br>".
|
||||
"The database named `".AGILE_DB_DATABASE."` does not exist on `".AGILE_DB_HOST."`, ".
|
||||
"and the user/pass provided does not have permission to create it. [ERROR-3]";
|
||||
else
|
||||
$result = true;
|
||||
}
|
||||
elseif (eregi('Access denied', $err))
|
||||
{
|
||||
return "<br><br><b>Database Problem Detected:</b><br>".
|
||||
"The database `".AGILE_DB_DATABASE."` cannot be accessed with the user user/pass provided. [ERROR-4]";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "<br><br><b>Database Problem Detected:</b><br>".
|
||||
$err. " [ERROR-5]";
|
||||
}
|
||||
}
|
||||
|
||||
# drop table
|
||||
# $db->Execute('DROP TABLE '. AGILE_DB_DATABASE);
|
||||
|
||||
if(defined('DEFAULT_SITE') && DEFAULT_SITE == 1)
|
||||
{
|
||||
# attempt table creation:
|
||||
$db = &DB();
|
||||
$dict = NewDataDictionary($db);
|
||||
$flds = "col1 C(32), col2 C(32)";
|
||||
$sqlarray = $dict->CreateTableSQL('1st_delete_this', $flds);
|
||||
$result = $db->Execute($sqlarray[0]);
|
||||
if ($result === false) {
|
||||
echo $db->ErrorMsg();
|
||||
return "<br><br><b>Database Problem Detected:</b><br>".
|
||||
"You do not have the correct access to the database; unable to create tables. [ERROR-6]";
|
||||
}
|
||||
|
||||
# attempt index creation:
|
||||
$db = &DB();
|
||||
$idxflds = 'co11, col2';
|
||||
$sqlarray = $dict->CreateIndexSQL('id', '1st_delete_this', $idxflds);
|
||||
$dict->ExecuteSQLArray($sqlarray);
|
||||
if ($result === false) {
|
||||
return "<br><br><b>Database Problem Detected:</b><br>".
|
||||
"You do not have the correct access to the database; unable to create indexes. [ERROR-7]";
|
||||
}
|
||||
|
||||
# database tests passed:
|
||||
$db->Execute('DROP TABLE 1st_delete_this');
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
?>
|
486
install/install_db_core.inc
Normal file
486
install/install_db_core.inc
Normal file
@@ -0,0 +1,486 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* AgileBill - Open Billing Software
|
||||
*
|
||||
* This body of work is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the Open AgileBill License
|
||||
* License as published at http://www.agileco.com/agilebill/license1-4.txt
|
||||
*
|
||||
* For questions, help, comments, discussion, etc., please join the
|
||||
* Agileco community forums at http://forum.agileco.com/
|
||||
*
|
||||
* @link http://www.agileco.com/
|
||||
* @copyright 2004-2008 Agileco, LLC.
|
||||
* @license http://www.agileco.com/agilebill/license1-4.txt
|
||||
* @author Tony Landis <tony@agileco.com>
|
||||
* @package AgileBill
|
||||
* @version 1.4.93
|
||||
*/
|
||||
|
||||
##############################################
|
||||
# DB installation class
|
||||
##############################################
|
||||
class install_db
|
||||
{
|
||||
|
||||
##############################################
|
||||
## insert the default data
|
||||
##############################################
|
||||
function add_data ( $arr )
|
||||
{
|
||||
$db = &DB();
|
||||
for($i=0; $i<count($arr); $i++)
|
||||
{
|
||||
$this->install_sql_data($arr[$i]);
|
||||
|
||||
$sql = 'SELECT id FROM ' . AGILE_DB_PREFIX . '' . $arr[$i] . '_id';
|
||||
$result = $db->Execute($sql);
|
||||
if($result == true && $result->fields["id"] <= "0")
|
||||
{
|
||||
$sql = 'INSERT INTO ' . AGILE_DB_PREFIX . '' . $arr[$i] . '_id SET id = 1';
|
||||
$db->Execute($sql);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
##############################################
|
||||
## INSTALL DEFAULT DATA ##
|
||||
##############################################
|
||||
function install_sql_data($module)
|
||||
{
|
||||
# check the file:
|
||||
$f = PATH_MODULES . '' . $module . '/' . $module . '_install_data.xml';
|
||||
|
||||
if(is_file($f))
|
||||
{
|
||||
# open the XML backup file:
|
||||
$C_xml = new CORE_xml;
|
||||
$backup = $C_xml->xml_to_array($f);
|
||||
$db = &DB();
|
||||
$arr = $backup['install'];
|
||||
|
||||
# loop through each table in this array
|
||||
if(is_array($arr) )
|
||||
{
|
||||
while (list ($table,$records) = each ($arr))
|
||||
{
|
||||
$runsql = false;
|
||||
$sqls = 'INSERT INTO '.AGILE_DB_PREFIX.'' . $table . ' SET ';
|
||||
|
||||
if (is_array($records) )
|
||||
{
|
||||
# loop through each of the fields for this module
|
||||
$sql = '';
|
||||
$sqlcount = 0;
|
||||
while (list ($fld,$val) = each ($records))
|
||||
{
|
||||
if (is_array($val))
|
||||
{
|
||||
# loop through each of the fields for this module
|
||||
$sql = '';
|
||||
$sqlcount = 0;
|
||||
while (list ($fld2,$val2) = each ($val))
|
||||
{
|
||||
if ($sqlcount != 0) $sql .= ', ';
|
||||
$sql .= $fld2 .' = '.$db->qstr($val2);
|
||||
$sqlcount++;
|
||||
}
|
||||
## echo '<BR>' . $sqls. ' ' . $sql;
|
||||
$sql = ereg_replace("site_id = '1',", "site_id = ".DEFAULT_SITE.",",$sql);
|
||||
$result = $db->Execute($sqls. ' ' . $sql);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($sqlcount != 0) $sql .= ', ';
|
||||
$sql .= $fld .' = '.$db->qstr($val);
|
||||
$sqlcount++;
|
||||
$runsql = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($runsql)
|
||||
{
|
||||
$sql = ereg_replace("site_id = '1',", "site_id = ".DEFAULT_SITE.",",$sql);
|
||||
#echo '<BR>' . $sqls. ' ' . $sql;
|
||||
$result = $db->Execute($sqls. ' ' . $sql);
|
||||
if($result === false)
|
||||
@$this->error .= "<BR>". $sqls. ' ' . $sql;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
##############################################
|
||||
## INSTALL TABLES, FIELDS, & MODULES ##
|
||||
##############################################
|
||||
function install_sql($module)
|
||||
{
|
||||
global $VAR;
|
||||
|
||||
@$this->tables_created .= "<BR>Created Table `$module`";
|
||||
|
||||
###########################################
|
||||
### Load the install XML file...
|
||||
$C_xml = new CORE_xml;
|
||||
$xml_install = PATH_MODULES . "" . $module . "/" . $module . "_install.xml";
|
||||
$install = $C_xml->xml_to_array($xml_install);
|
||||
|
||||
###########################################
|
||||
### Load the construct XML file...
|
||||
$C_xml = new CORE_xml;
|
||||
$xml_construct = PATH_MODULES . "" . $module . "/" . $module . "_construct.xml";
|
||||
$construct = $C_xml->xml_to_array($xml_construct);
|
||||
|
||||
|
||||
### Check that this Module has any db installation required...
|
||||
if(isset($construct["construct"]["table"]))
|
||||
{
|
||||
### Create the module DB table
|
||||
$table = $construct["construct"]["table"];
|
||||
|
||||
### Create the module DB fields
|
||||
$arr_field = $construct["construct"]["field"];
|
||||
|
||||
### Loop through the fields to build the list:
|
||||
$index_flds = '';
|
||||
while (list ($key, $value) = each($arr_field))
|
||||
{
|
||||
$field = $key;
|
||||
$t_s = $arr_field["$key"]["type"];
|
||||
|
||||
if(ereg('[(]',$t_s))
|
||||
{
|
||||
$ts = split('[(]',$t_s);
|
||||
$type = $ts[0];
|
||||
$size = ereg_replace('[)]', '', $ts[1]);
|
||||
$flds[] = Array($field, $type, $size);
|
||||
}
|
||||
else
|
||||
{
|
||||
$flds[] = Array($field, $t_s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
### Check that the tables for this module have not been created already:
|
||||
$install_db = true;
|
||||
for($i=0; $i<count($this->core_modules); $i++)
|
||||
{
|
||||
if ($module == $this->core_modules[$i])
|
||||
$install_db = false;
|
||||
}
|
||||
for($i=0; $i<count($this->skip_modules); $i++)
|
||||
{
|
||||
if ($module == $this->skip_modules[$i])
|
||||
$install_db = false;
|
||||
}
|
||||
|
||||
### Check that this is not a site_id creation:
|
||||
if(defined('DEFAULT_SITE') && DEFAULT_SITE > 1) $install_db = false;
|
||||
|
||||
if ($install_db)
|
||||
{
|
||||
### Create the table & colums using the ADODB Data Dictionary functions:
|
||||
$db = &DB();
|
||||
$dict = NewDataDictionary($db);
|
||||
$table_options = array('mysql' => 'TYPE=MyISAM');
|
||||
$sqlarray = $dict->CreateTableSQL(AGILE_DB_PREFIX.''.$table, $flds, $table_options);
|
||||
$result = $db->Execute($sqlarray[0]);
|
||||
if ($result === false)
|
||||
{
|
||||
echo "<BR><BR>" . $sqlarray[0];
|
||||
echo "<BR>Error (install_sql-1): ". $db->ErrorMsg();
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
}
|
||||
|
||||
# create site_id index:
|
||||
$dbres = $db->Execute("CREATE UNIQUE INDEX IDS on ".AGILE_DB_PREFIX."$table (site_id, id)");
|
||||
if ($dbres === false)
|
||||
{
|
||||
echo "<BR><BR>" . $sqlarray[0];
|
||||
echo "<BR>Error (install_sql-2): ". $db->ErrorMsg();
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
}
|
||||
|
||||
# Create custom indexes
|
||||
if(@$new_indexes = $construct["construct"]["index"])
|
||||
{
|
||||
while (list ($index, $fields) = each($new_indexes))
|
||||
{
|
||||
if(!empty($index) && !empty($fields))
|
||||
{
|
||||
# create index
|
||||
$dict = NewDataDictionary($db);
|
||||
|
||||
if(eregi("fulltext", $index) && AGILE_DB_TYPE == 'mysql')
|
||||
$sqlarray = $dict->CreateIndexSQL($index, AGILE_DB_PREFIX.$table, $fields, array('FULLTEXT'));
|
||||
else
|
||||
$sqlarray = $dict->CreateIndexSQL($index, AGILE_DB_PREFIX.$table, $fields);
|
||||
|
||||
$dbres = $db->Execute($sqlarray[0]);
|
||||
if ($dbres === false)
|
||||
{
|
||||
echo "<BR><BR>" . $sqlarray[0];
|
||||
echo "<BR>Error (install_sql-3): ". $db->ErrorMsg();
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
### Create the starting auto-increment table
|
||||
$db->GenID(AGILE_DB_PREFIX . $table . '_id');
|
||||
$db->Execute('DELETE FROM ' . AGILE_DB_PREFIX . $table . '_id');
|
||||
}
|
||||
}
|
||||
|
||||
##################################################################
|
||||
### Get the module properties:
|
||||
|
||||
if(@$install["install"]["module_properties"]["menu_display"] == '0')
|
||||
$menu_display = '0';
|
||||
else if(@$install["install"]["module_properties"]["menu_display"] != '1')
|
||||
$menu_display = '0';
|
||||
else
|
||||
$menu_display = '1';
|
||||
|
||||
if(isset($install["install"]["module_properties"]["notes"]))
|
||||
$notes = $install["install"]["module_properties"]["notes"];
|
||||
else
|
||||
$notes = '';
|
||||
|
||||
###################################################################
|
||||
### Get the parent module...
|
||||
|
||||
$db = &DB();
|
||||
$module_id = $db->GenID(AGILE_DB_PREFIX . "" . 'module_id');
|
||||
if(isset($install["install"]["module_properties"]["parent"]))
|
||||
{
|
||||
$q = 'SELECT id FROM '.AGILE_DB_PREFIX.'module WHERE
|
||||
site_id = '.$db->qstr(DEFAULT_SITE).' AND
|
||||
name = '.$db->qstr($install["install"]["module_properties"]["parent"]);
|
||||
$result = $db->Execute($q);
|
||||
|
||||
# Error checking
|
||||
if ($result === false)
|
||||
{
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
#return false;
|
||||
}
|
||||
|
||||
if($result->fields["id"] == '')
|
||||
$parent_id = $module_id;
|
||||
else
|
||||
$parent_id = $result->fields["id"];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$parent_id = $module_id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
##################################################################
|
||||
### Create the module record, & get the module ID
|
||||
### get the ID of the parent, and create it as child if needed...
|
||||
### else the record is a child of itself...
|
||||
|
||||
$q = 'INSERT INTO '.AGILE_DB_PREFIX.'module SET
|
||||
id = ' .$db->qstr($module_id).',
|
||||
site_id = ' .$db->qstr(DEFAULT_SITE).',
|
||||
name = ' .$db->qstr($install["install"]["module_properties"]["name"]).',
|
||||
parent_id = ' .$db->qstr($parent_id).',
|
||||
notes = ' .$db->qstr($notes).',
|
||||
status = ' .$db->qstr('1').',
|
||||
date_orig = ' .$db->qstr(time()).',
|
||||
date_last = ' .$db->qstr(time()).',
|
||||
menu_display = '.$db->qstr($menu_display);
|
||||
$result = $db->Execute($q);
|
||||
|
||||
###################################################################
|
||||
### Create the module_method records, and get the ID for each one
|
||||
|
||||
$methods = $install["install"]["sql_inserts"]["module_method"];
|
||||
if (gettype($methods) == 'array')
|
||||
{
|
||||
while (list ($key, $value) = each($methods))
|
||||
{
|
||||
$name = $key;
|
||||
$method_id = $db->GenID(AGILE_DB_PREFIX . "" . 'module_method_id');
|
||||
|
||||
if(isset($methods[$key]["notes"]))
|
||||
$notes = $methods[$key]["notes"];
|
||||
else
|
||||
$notes = '';
|
||||
|
||||
if(isset($methods[$key]["page"]))
|
||||
$page = $methods[$key]["page"];
|
||||
else
|
||||
$page = '';
|
||||
|
||||
if(isset($methods[$key]["menu_display"]))
|
||||
$menu_display = '1';
|
||||
else
|
||||
$menu_display = '0';
|
||||
|
||||
$q = 'INSERT INTO '.AGILE_DB_PREFIX .'module_method SET
|
||||
id = '.$db->qstr($method_id).',
|
||||
site_id = '.$db->qstr(DEFAULT_SITE).',
|
||||
name = '.$db->qstr($name).',
|
||||
module_id = '.$db->qstr($module_id).',
|
||||
notes = '.$db->qstr($notes).',
|
||||
page = '.$db->qstr($page).',
|
||||
menu_display = '.$db->qstr($menu_display);
|
||||
|
||||
$result = $db->Execute($q);
|
||||
|
||||
# Error checking
|
||||
if ($result === false)
|
||||
{
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
#return false;
|
||||
}
|
||||
|
||||
|
||||
###############################################################
|
||||
### Create the group_method records, with the ID from each
|
||||
### of the above methods...
|
||||
### Get the groups to add to (FROM THE install.tpl form!)
|
||||
|
||||
for($i=0; $i<count($VAR["module_group"]); $i++)
|
||||
{
|
||||
$group_method_id = $db->GenID(AGILE_DB_PREFIX . 'group_method_id');
|
||||
$q = 'INSERT INTO '.AGILE_DB_PREFIX .'group_method SET
|
||||
id = '.$db->qstr($group_method_id).',
|
||||
site_id = '.$db->qstr(DEFAULT_SITE).',
|
||||
method_id = '.$db->qstr($method_id).',
|
||||
module_id = '.$db->qstr($module_id).',
|
||||
group_id = '.$db->qstr($VAR["module_group"][$i]);
|
||||
|
||||
$result = $db->Execute($q);
|
||||
|
||||
# Error checking
|
||||
if ($result === false)
|
||||
{
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
#return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# all done!
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
##############################################
|
||||
## INSTALL TABLES & FIELDS ONLY ##
|
||||
##############################################
|
||||
function install_sql_tbl($module)
|
||||
{
|
||||
###########################################
|
||||
### Load the install XML file...
|
||||
$C_xml = new CORE_xml;
|
||||
$xml_install = PATH_MODULES . "" . $module . "/" . $module . "_install.xml";
|
||||
$install = $C_xml->xml_to_array($xml_install);
|
||||
|
||||
###########################################
|
||||
### Load the construct XML file...
|
||||
$C_xml = new CORE_xml;
|
||||
$xml_construct = PATH_MODULES . "" . $module . "/" . $module . "_construct.xml";
|
||||
$construct = $C_xml->xml_to_array($xml_construct);
|
||||
|
||||
|
||||
### Check that this Module has any db installation required...
|
||||
if(isset($construct["construct"]["table"]))
|
||||
{
|
||||
### Create the module DB table
|
||||
$table = $construct["construct"]["table"];
|
||||
|
||||
### Create the module DB fields
|
||||
$arr_field = $construct["construct"]["field"];
|
||||
|
||||
### Loop through the fields to build the list:
|
||||
while (list ($key, $value) = each($arr_field))
|
||||
{
|
||||
$field = $key;
|
||||
$t_s = $arr_field["$key"]["type"];
|
||||
|
||||
|
||||
if(ereg('[(]',$t_s))
|
||||
{
|
||||
$ts = split('[(]',$t_s);
|
||||
$type = $ts[0];
|
||||
$size = ereg_replace('[)]', '', $ts[1]);
|
||||
$flds[] = Array($field, $type, $size);
|
||||
}
|
||||
else
|
||||
{
|
||||
$flds[] = Array($field, $t_s);
|
||||
}
|
||||
}
|
||||
|
||||
# Check this is not a multi site id install
|
||||
if( DEFAULT_SITE == 1)
|
||||
{
|
||||
### Create the table & colums using the ADODB Data Dictionary functions:
|
||||
$db = &DB();
|
||||
$dict = NewDataDictionary($db);
|
||||
$table_options = array('mysql' => 'TYPE=MyISAM');
|
||||
$sqlarray = $dict->CreateTableSQL(AGILE_DB_PREFIX.''.$table, $flds, $table_options);
|
||||
$result = $db->Execute($sqlarray[0]);
|
||||
if ($result === false)
|
||||
{
|
||||
echo "<BR><BR>". $sql[0];
|
||||
echo "<BR>5 Error: ". $db->ErrorMsg();
|
||||
@$this->error .= "<BR>Error (install_sql_tbl-1): ". $db->ErrorMsg();
|
||||
#return false;
|
||||
}
|
||||
|
||||
# Create unique index on site_id,id (mysql specific)
|
||||
$db->Execute("CREATE UNIQUE INDEX IDS on ".AGILE_DB_PREFIX."$table (site_id, id)");
|
||||
|
||||
# Create custom indexes
|
||||
if(@$new_indexes = $construct["construct"]["index"])
|
||||
{
|
||||
while (list ($index, $fields) = each($new_indexes))
|
||||
{
|
||||
if(!empty($index) && !empty($fields))
|
||||
{
|
||||
# create index
|
||||
$dict = NewDataDictionary($db);
|
||||
|
||||
if(eregi("fulltext", $index) && AGILE_DB_TYPE == 'mysql')
|
||||
$sqlarray = $dict->CreateIndexSQL($index, AGILE_DB_PREFIX.$table, $fields, array('FULLTEXT'));
|
||||
else
|
||||
$sqlarray = $dict->CreateIndexSQL($index, AGILE_DB_PREFIX.$table, $fields);
|
||||
|
||||
$dbres = $db->Execute($sqlarray[0]);
|
||||
if ($dbres === false)
|
||||
{
|
||||
echo "<BR><BR>" . $sqlarray[0];
|
||||
echo "<BR>Error (install_sql-3): ". $db->ErrorMsg();
|
||||
@$this->error .= "<BR>Error: ". $db->ErrorMsg();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
60
install/step1.php
Normal file
60
install/step1.php
Normal file
@@ -0,0 +1,60 @@
|
||||
|
||||
<p><b>Step 1:</b> Checking file permissions...
|
||||
<?php if($files === true) { ?>
|
||||
done!<br>
|
||||
<br>
|
||||
</p>
|
||||
<b>Please check the path and database settings below: </b> <br>
|
||||
|
||||
<form name="form1" method="post" action="">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="3">
|
||||
<tr>
|
||||
<td width="27%">Base Path:</td>
|
||||
<td width="73%"> <input type="text" name="path_agile" size="60" value="<?php echo $path ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%">Database Type:</td>
|
||||
<td width="73%"> <select name="db_type">
|
||||
<option value="mysqlt" selected>MySQL with Transactions (recommended)</option>
|
||||
<option value="mysql" selected>MySQL</option>
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%">Database Host:</td>
|
||||
<td width="73%"> <input type="text" name="db_host" value="<?php if(defined('AGILE_DB_HOST')) echo AGILE_DB_HOST; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%">Database Name:</td>
|
||||
<td width="73%"> <input type="text" name="db_database" value="<?php if(defined('AGILE_DB_DATABASE')) echo AGILE_DB_DATABASE ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%">Database Username:</td>
|
||||
<td width="73%"> <input type="text" name="db_username" value="<?php if(defined('AGILE_DB_USERNAME')) echo AGILE_DB_USERNAME ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%">Database Password:</td>
|
||||
<td width="73%"> <input type="text" name="db_password" value="<?php if(defined('AGILE_DB_PASSWORD')) echo AGILE_DB_PASSWORD ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%">Database Prefix</td>
|
||||
<td width="73%"> <input type="text" name="db_prefix" value="<?php if(defined('AGILE_DB_PREFIX') && AGILE_DB_PREFIX != "") echo AGILE_DB_PREFIX; else echo 'ab_'; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="27%"> </td>
|
||||
<td width="73%"> <input type="submit" name="Submit" value="Step 2">
|
||||
<input type="hidden" name="do" value="step2"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<p>
|
||||
<?php } else { ?>
|
||||
<b>failed!</b> <?php echo $files; ?> <br>
|
||||
<br>
|
||||
<b>To Resolve This Issue:</b><br>
|
||||
Please access the files/directories listed above and change their permissions to be writable. Then refresh this page in your browser.<br>
|
||||
<br>
|
||||
On Linux based systems, you can use an FTP program to change the CHMOD settings to '777', or you can use the <i>chmod</i> command from the command line.<br>
|
||||
<br>
|
||||
On Windows based systems, you should check that the file/directory is not set to "Read-only."<br>
|
||||
<?php } ?>
|
||||
</p>
|
51
install/step2.php
Normal file
51
install/step2.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<p> <b>Step 2:</b>
|
||||
Writing new configuration settings...
|
||||
|
||||
<?php if($files === true) { ?>
|
||||
done!<br><br>
|
||||
|
||||
|
||||
<?php if (is_array($modules)) { ?>
|
||||
<b>Please select any optional modules you wish to install</b></p>
|
||||
|
||||
<table width="100%" cellspacing="3" cellpadding="4" bordercolor="#FFFFFF">
|
||||
<?php for($i=0; $i<count($modules); $i++) { ?>
|
||||
<tr valign="top" bgcolor="#F3F3F3">
|
||||
<td width="2%" height="25" bgcolor="#F8F8F8">
|
||||
<input type="checkbox" name="modules[]" value="<?php echo $modules[$i]['name']; ?>">
|
||||
</td>
|
||||
<td width="98%" height="25" bgcolor="#F8F8F8">
|
||||
<?php echo $modules[$i]['desc']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
||||
<p>
|
||||
<?php } ?>
|
||||
<?php if (!empty($license_agreement)) { ?>
|
||||
<input type="submit" name="Submit" value="I Agree, Continue to Step 3">
|
||||
<?php } else { ?>
|
||||
<input type="submit" name="Submit" value="Step 3">
|
||||
<?php } ?>
|
||||
<input type="hidden" name="do" value="step3">
|
||||
</form>
|
||||
|
||||
<?php } else { ?>
|
||||
<b>failed!</b>
|
||||
<?php echo $database; ?>
|
||||
</p>
|
||||
<p> <br>
|
||||
<br>
|
||||
<b>To Resolve This Issue:</b><br>
|
||||
Please access the files/directories listed above and change their permissions
|
||||
to be writable. Then refresh this page in your browser.<br>
|
||||
<br>
|
||||
On Linux based systems, you can use an FTP program to change the CHMOD settings
|
||||
to '777', or you can use the <i>chmod</i> command from the command line.<br>
|
||||
<br>
|
||||
On Windows based systems, you should check that the file/directory is not set
|
||||
to "Read-only," and the web user has full access to the files.<br>
|
||||
<br>
|
||||
|
||||
<?php } ?>
|
||||
</p>
|
24
install/step3.php
Normal file
24
install/step3.php
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
<p><b>Step 3:</b> Installing modules and associated tables...
|
||||
<?php if($database === true) { ?>
|
||||
done!<br>
|
||||
<br>
|
||||
The installation installation is now complete, you can login with the following account:<br>
|
||||
<br>
|
||||
<b>Admin Acccount:</b> admin/admin <br>
|
||||
<br>
|
||||
Please <a href="?_page=core:search&module=setup&_login=1&_username=admin&_password=admin&tid=default_admin&_next_page_one=view&_escape=1"><b>CLICK HERE</b></a> to edit your site settings. This is required, you will need to edit your site URL, or your installation may not work!<br>
|
||||
<br>
|
||||
<?php echo @$dbinst->tables_created; ?> <?php echo @$dbinst->errors; ?> <br>
|
||||
<br>
|
||||
<?php } else { ?>
|
||||
<b>failed!</b> <?php echo $database; ?> <br>
|
||||
<br>
|
||||
<b>To Resolve This Issue:</b><br>
|
||||
[ERROR-3] The user you specified must have adequate permission to create the database in question, or you must manually create the database yourself. Most web hosts either offer a feature to create new databases in your hosting control panel, or will create the database for you if you request that they do so. When resolved, <a href="?do=step1">start the installation process over</a>.</p>
|
||||
<p>[ERROR-4] The user you specified is not authorized for the database you have specified, please double check with your host. When resolved, <a href="?do=step1">start the installation process over</a>.</p>
|
||||
<p>[ERROR-5] Other database error, paste the error generated and contact your hosting company for them to resolve the problem. When resolved, <a href="?do=step1">start the installation process over</a>.</p>
|
||||
<p>[ERROR-6] The user you specified is not authorized to create new tables in the database, please update your database permissions to include this priviledge, or contact your hosting company to do so if you do not know how. Then refesh this page or <a href="?do=step1">start the installation process over</a>.</p>
|
||||
<p>[ERROR-7] The user you specified is not authorized to create indexes on tables in the database, please update your database permissions to include this priviledge, or contact your hosting company to do so if you do not know how. Then refesh this page or <a href="?do=step1">start the installation process over</a>.<br>
|
||||
<?php } ?>
|
||||
</p>
|
71
install/template.inc
Normal file
71
install/template.inc
Normal file
@@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" >
|
||||
<title>AgileCo Product Installer</title>
|
||||
<head>
|
||||
<style type="text/css">
|
||||
@import url('themes/default/style.css');
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<table width="750" border="0" align="center">
|
||||
<tr>
|
||||
<td width="100%" align="center"><a href="http://www.agileco.com/" style="background: none;"><img src='themes/default/images/logo.gif' border='0' /></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="menu">
|
||||
|
||||
<?php if($do=='step1') { ?>
|
||||
<b>Step 1</b>
|
||||
<?php } else { ?>
|
||||
Step 1
|
||||
<?php } ?>
|
||||
|
|
||||
<?php if($do=='step2') { ?>
|
||||
<b>Step 2</b>
|
||||
<?php } else { ?>
|
||||
Step 2
|
||||
<?php } ?>
|
||||
|
|
||||
<?php if($do=='step3') { ?>
|
||||
<b>Step 3</b>
|
||||
<?php } else { ?>
|
||||
Step 3
|
||||
<?php } ?>
|
||||
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- Display the main block -->
|
||||
<div id="block">
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
if(is_file($s_file))
|
||||
include($s_file);
|
||||
elseif(is_file('install/'.$s_file))
|
||||
include('install/'.$s_file);
|
||||
elseif(is_file($path.$s_file))
|
||||
include($path.$s_file);
|
||||
?>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div id="copywrite">Copyright 2004-<?php echo date('Y') ?> <a href="http://www.agileco.com/" style="color: black; background: none; text-decoration: none; font-weight: normal;">Agileco, LLC</a>.</div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user