Changes to AgileBill

This commit is contained in:
Deon George
2009-08-03 14:10:16 +10:00
parent 0a22cfe22c
commit 27aee719b0
1051 changed files with 219109 additions and 117219 deletions

View File

@@ -1,152 +1,77 @@
<?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/
*
* Originally authored by Tony Landis, AgileBill LLC
*
* Recent modifications by Deon George
*
* @author Deon George <deonATleenooksDOTnet>
* @copyright 2009 Deon George
* @link http://osb.leenooks.net
*
* @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>
* @author Tony Landis <tony@agileco.com>
* @package AgileBill
* @version 1.4.93
* @subpackage Modules:Setup
*/
class setup
{
# Open the constructor for this mod
function setup()
{
# name of this module:
$this->module = "setup";
# location of the construct XML file:
$this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml";
# open the construct file for parsing
$C_xml = new CORE_xml;
$construct = $C_xml->xml_to_array($this->xml_construct);
$this->method = $construct["construct"]["method"];
$this->trigger = $construct["construct"]["trigger"];
$this->field = $construct["construct"]["field"];
$this->table = $construct["construct"]["table"];
$this->module = $construct["construct"]["module"];
$this->cache = $construct["construct"]["cache"];
$this->order_by = $construct["construct"]["order_by"];
$this->limit = $construct["construct"]["limit"];
}
##############################
## SEARCH ##
##############################
function search($VAR)
{
$type = "search";
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->search($VAR, $this, $type);
}
##############################
## SEARCH SHOW ##
##############################
function search_show($VAR)
{
$type = "search";
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->search_show($VAR, $this, $type);
}
##############################
## VIEW ##
##############################
function view($VAR)
{
$type = "view";
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);
}
##############################
## UPDATE ##
##############################
function update($VAR)
{
/**
* The main AgileBill Setup Class
*
* @package AgileBill
* @subpackage Modules:Setup
*/
class setup extends OSB_module {
/**
* Update the Database with setup configuration
*/
public function update($VAR) {
if ($VAR['setup_currency_id'] != DEFAULT_CURRENCY)
$curr = true;
else
$curr = false;
$curr = false;
# make sure the index.php file is not included at the end:
if(!empty($VAR['setup_ssl_url']))
$VAR['setup_ssl_url'] = eregi_replace('index.php', '', $VAR['setup_ssl_url']);
if(!empty($VAR['setup_nonssl_url']))
$VAR['setup_nonssl_url'] = eregi_replace('index.php', '', $VAR['setup_nonssl_url']);
foreach (array('setup_ssl_url','setup_nonssl_url') as $index) {
# Make sure the index.php file is not included at the end:
if (! empty($VAR[$index]))
$VAR[$index] = preg_replace('/index.php$/','',$VAR[$index]);
# Validate trailing slash is on the end of the URL:
if(!empty($VAR['setup_ssl_url']) && !ereg('/$', $VAR['setup_ssl_url']))
$VAR['setup_ssl_url'] .= '/';
# Validate trailing slash is on the end of the URL:
if(!empty($VAR['setup_nonssl_url']) && !ereg('/$', $VAR['setup_nonssl_url']))
$VAR['setup_nonssl_url'] .= '/';
# Validate trailing slash is on the end of the URL:
if (! empty($VAR[$index]) && ! preg_match('#/$#',$VAR[$index]))
$VAR[$index] .= '/';
}
$type = "update";
$this->method["$type"] = explode(",", $this->method["$type"]);
$db = new CORE_database;
$rs = $db->update($VAR, $this, $type);
$result = parent::update($VAR);
if($rs && $curr)
{
/* Start: Update all sessions & accounts */
# Start: Update all sessions & accounts
if ($result && $curr) {
$db = &DB();
$sql = "UPDATE ".AGILE_DB_PREFIX."session
SET
currency_id = ".$db->qstr($VAR['setup_currency_id'])."
WHERE
site_id = ".$db->qstr(DEFAULT_SITE)." AND
currency_id != ".$db->qstr($VAR['setup_currency_id']);
$rs = $db->Execute($sql);
$sql = "UPDATE ".AGILE_DB_PREFIX."account
SET
currency_id = ".$db->qstr($VAR['setup_currency_id'])."
WHERE
site_id = ".$db->qstr(DEFAULT_SITE)." AND
currency_id != ".$db->qstr($VAR['setup_currency_id']);
$rs = $db->Execute($sql);
/* End: SQL Insert Statement */
$rs = $db->Execute(sqlUpdate($db,'session',array('currency_id'=>$VAR['setup_currency_id']),sprintf('currency_id !=',$VAR['setup_currency_id'])));
$rs = $db->Execute(sqlUpdate($db,'account',array('currency_id'=>$VAR['setup_currency_id']),sprintf('currency_id !=',$VAR['setup_currency_id'])));
}
# Clear out the cache entry
if (defined("AGILE_CORE_CACHE_DIR") && AGILE_CORE_CACHE_DIR != '') {
if (defined('AGILE_CORE_CACHE_DIR') && AGILE_CORE_CACHE_DIR != '') {
$tfile = AGILE_CORE_CACHE_DIR."core-setup";
if (file_exists($tfile)) {
unlink(AGILE_CORE_CACHE_DIR."core-setup");
}
if (file_exists($tfile))
unlink(AGILE_CORE_CACHE_DIR.'core-setup');
}
}
##############################
## PHP_INFO ##
##############################
function _php_info() {
/**
* Call PHP Info
*/
public function _php_info() {
phpinfo();
}
}
?>
?>

View File

@@ -1,266 +1,372 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<construct>
<!-- define the module name -->
<module>setup</module>
<!-- define the module table name -->
<table>setup</table>
<!-- define the module dependancy(s) -->
<dependancy/>
<!-- define the DB cache in seconds -->
<cache>0</cache>
<!-- define the default order_by field for SQL queries -->
<order_by>site_id</order_by>
<!-- define the methods -->
<limit>10</limit>
<!-- define the fields -->
<field>
<id>
<type>I4</type>
<unique>1</unique>
<index>1</index>
</id>
<site_id>
<type>I4</type>
<unique>1</unique>
<index>1</index>
</site_id>
<country_id>
<type>I4</type>
</country_id>
<language_id>
<type>C(16)</type>
</language_id>
<currency_id>
<type>I4</type>
</currency_id>
<weight_id>
<type>I4</type>
</weight_id>
<theme_id>
<type>C(16)</type>
<default>default</default>
</theme_id>
<admin_theme_id>
<type>C(16)</type>
<default>default_admin</default>
</admin_theme_id>
<group_id>
<type>I4</type>
<default>1</default>
</group_id>
<affiliate_template_id>
<type>I4</type>
</affiliate_template_id>
<affiliate_id>
<type>I4</type>
</affiliate_id>
<reseller_id>
<type>I4</type>
</reseller_id>
<setup_email_id>
<type>I4</type>
</setup_email_id>
<ssl_url>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>any</validate>
</ssl_url>
<nonssl_url>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>any</validate>
</nonssl_url>
<login_expire>
<type>I4</type>
<min_len>1</min_len>
<max_len>999999</max_len>
<validate>numeric</validate>
</login_expire>
<cookie_name>
<type>C(32)</type>
<min_len>1</min_len>
<max_len>32</max_len>
</cookie_name>
<cookie_expire>
<type>I4</type>
<min_len>1</min_len>
<max_len>999999</max_len>
<validate>numeric</validate>
</cookie_expire>
<session_ip_match>
<type>L</type>
<default>0</default>
</session_ip_match>
<error_reporting>
<type>C(16)</type>
<default>1</default>
</error_reporting>
<site_name>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>any</validate>
</site_name>
<site_email>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>email</validate>
</site_email>
<time_format>
<type>X</type>
</time_format>
<date_format>
<type>X</type>
<validate>any</validate>
<convert>array</convert>
</date_format>
<date_time_format>
<type>C(128)</type>
<convert>array</convert>
</date_time_format>
<decimal_place>
<type>I4</type>
<min_len>1</min_len>
<max_len>100</max_len>
<validate>numeric</validate>
</decimal_place>
<debug>
<type>L</type>
</debug>
<login_attempt_try>
<type>I4</type>
<min_len>1</min_len>
<max_len>100000</max_len>
<validate>numeric</validate>
</login_attempt_try>
<login_attempt_time>
<type>I4</type>
<min_len>1</min_len>
<max_len>100000</max_len>
<validate>numeric</validate>
</login_attempt_time>
<login_attempt_lock>
<type>I4</type>
<min_len>1</min_len>
<max_len>100000000</max_len>
<validate>numeric</validate>
</login_attempt_lock>
<search_expire>
<type>I4</type>
<min_len>1</min_len>
<max_len>1000000000</max_len>
<validate>numeric</validate>
</search_expire>
<db_cache>
<type>L</type>
</db_cache>
<newsletter_registration>
<type>L</type>
</newsletter_registration>
<default_account_status>
<type>L</type>
</default_account_status>
<cache_sessions>
<type>L</type>
</cache_sessions>
<weblog>
<type>L</type>
</weblog>
<site_address>
<type>C(128)</type>
</site_address>
<site_city>
<type>C(32)</type>
</site_city>
<site_state>
<type>C(16)</type>
</site_state>
<site_zip>
<type>C(16)</type>
</site_zip>
<site_phone>
<type>C(32)</type>
</site_phone>
<site_fax>
<type>C(32)</type>
</site_fax>
<os>
<type>L</type>
</os>
<auto_affiliate>
<type>L</type>
</auto_affiliate>
<path_curl>
<type>C(64)</type>
</path_curl>
<show_ticket_link>
<type>L</type>
</show_ticket_link>
<show_affiliate_link>
<type>L</type>
</show_affiliate_link>
<show_newsletter_link>
<type>L</type>
</show_newsletter_link>
<show_domain_link>
<type>L</type>
</show_domain_link>
<show_contact_link>
<type>L</type>
</show_contact_link>
<show_cart_link>
<type>L</type>
</show_cart_link>
<show_checkout_link>
<type>L</type>
</show_checkout_link>
<show_product_link>
<type>L</type>
</show_product_link>
<show_cat_block>
<type>L</type>
</show_cat_block>
<show_file_block>
<type>L</type>
</show_file_block>
<show_static_block>
<type>L</type>
</show_static_block>
<show_affiliate_code>
<type>L</type>
</show_affiliate_code>
<show_discount_code>
<type>L</type>
</show_discount_code>
<billing_weekday>
<type>C(2)</type>
</billing_weekday>
<grace_period>
<type>C(2)</type>
</grace_period>
<max_billing_notice>
<type>C(2)</type>
</max_billing_notice>
<max_inv_gen_period>
<type>C(2)</type>
</max_inv_gen_period>
<license_key>
<type>C(128)</type>
</license_key>
<license_code>
<type>X2</type>
</license_code>
</field>
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
<method>
<update>id,db_cache,newsletter_registration,default_account_status,cache_sessions,site_id,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,affiliate_template_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,cookie_expire,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,license_key,license_code,site_address,site_city,site_state,site_zip,site_phone,site_fax,os,path_curl,show_affiliate_link,show_ticket_link,show_newsletter_link,show_contact_link,show_domain_link,show_cart_link,show_checkout_link,show_cat_block,show_product_link,show_file_block,show_static_block,show_affiliate_code,show_discount_code,billing_weekday,grace_period,max_billing_notice,max_inv_gen_period,auto_affiliate</update>
<view>id,db_cache,newsletter_registration,default_account_status,cache_sessions,site_id,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,affiliate_template_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,cookie_expire,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,license_key,license_code,site_address,site_city,site_state,site_zip,site_phone,site_fax,os,path_curl,show_affiliate_link,show_ticket_link,show_newsletter_link,show_contact_link,show_domain_link,show_cart_link,show_checkout_link,show_cat_block,show_file_block,show_product_link,show_static_block,show_affiliate_code,show_discount_code,billing_weekday,grace_period,max_billing_notice,max_inv_gen_period,auto_affiliate</view>
<search>id,site_id,newsletter_registration,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,cookie_expire,affiliate_template_id,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,license_key,license_code,max_inv_gen_period</search>
<search_show>id,site_id,newsletter_registration,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,affiliate_template_id,cookie_expire,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,license_key,license_code,max_inv_gen_period</search_show>
</method>
<!-- define the method triggers -->
<trigger>0</trigger>
<!-- Module name -->
<module>setup</module>
<!-- Module supporting database table -->
<table>setup</table>
<!-- Module dependancy(s) (module wont install if these modules are not yet installed) -->
<dependancy></dependancy>
<!-- DB cache in seconds -->
<cache>0</cache>
<!-- Default order_by field for SQL queries -->
<order_by>site_id</order_by>
<!-- Default SQL limit for SQL queries -->
<limit>10</limit>
<!-- Schema version (used to determine if the schema has change during upgrades) -->
<version>1</version>
<!-- Database indexes -->
<index>
</index>
<!-- Database fields -->
<field>
<!-- Record ID -->
<id>
<index>1</index>
<type>I4</type>
<unique>1</unique>
</id>
<!-- Site ID -->
<site_id>
<index>1</index>
<type>I4</type>
<unique>1</unique>
</site_id>
<!-- Date record created -->
<date_orig>
<convert>date-now</convert>
<display>Date Created</display>
<type>I8</type>
</date_orig>
<!-- Record active (BOOL)-->
<status>
<display>Active</display>
<type>L</type>
</status>
<country_id>
<type>I4</type>
<display>Country Name</display>
</country_id>
<language_id>
<type>C(16)</type>
<display>Language</display>
</language_id>
<currency_id>
<type>I4</type>
<display>Currency</display>
</currency_id>
<weight_id>
<type>I4</type>
<display>Weight Unit</display>
</weight_id>
<theme_id>
<type>C(16)</type>
<default>default</default>
<display>Theme</display>
</theme_id>
<admin_theme_id>
<type>C(16)</type>
<default>default_admin</default>
<display>Admin Theme</display>
</admin_theme_id>
<group_id>
<type>I4</type>
<default>1</default>
<display>Default Group for New Users</display>
</group_id>
<!-- @todo Unknown -->
<affiliate_template_id>
<type>I4</type>
</affiliate_template_id>
<!-- @todo Unknown -->
<affiliate_id>
<type>I4</type>
</affiliate_id>
<!-- @todo Unknown -->
<reseller_id>
<type>I4</type>
</reseller_id>
<!-- @todo Unknown -->
<setup_email_id>
<type>I4</type>
</setup_email_id>
<ssl_url>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>any</validate>
<display>SSL URL for Site</display>
</ssl_url>
<nonssl_url>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>any</validate>
<display>NON SSL URL for Site</display>
</nonssl_url>
<login_expire>
<type>I4</type>
<min_len>1</min_len>
<max_len>999999</max_len>
<validate>numeric</validate>
<display>Login Expire Time</display>
</login_expire>
<cookie_name>
<type>C(32)</type>
<min_len>1</min_len>
<max_len>32</max_len>
<display>Cookie Name</display>
</cookie_name>
<cookie_expire>
<type>I4</type>
<min_len>1</min_len>
<max_len>999999</max_len>
<validate>numeric</validate>
<display>Cookie Expire Time</display>
</cookie_expire>
<!-- @todo Unknown -->
<session_ip_match>
<type>L</type>
<default>0</default>
</session_ip_match>
<error_reporting>
<type>C(16)</type>
<default>1</default>
<display>Debug Error Reporting</display>
</error_reporting>
<site_name>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>any</validate>
<display>Company Name</display>
</site_name>
<site_email>
<type>X</type>
<min_len>1</min_len>
<max_len>255</max_len>
<validate>email</validate>
<display>Site Email Address</display>
</site_email>
<time_format>
<type>X</type>
<display>Time Format</display>
</time_format>
<date_format>
<type>X</type>
<validate>any</validate>
<convert>array</convert>
<display>Date Format</display>
</date_format>
<!-- @todo Unkonwn -->
<date_time_format>
<type>C(128)</type>
<convert>array</convert>
</date_time_format>
<decimal_place>
<type>I4</type>
<min_len>1</min_len>
<max_len>100</max_len>
<validate>numeric</validate>
<display>Decimal Places</display>
<description>Decimal Places to use when showing currency on the website</description>
</decimal_place>
<debug>
<type>L</type>
<display>Debugging Enabled</display>
</debug>
<login_attempt_try>
<type>I4</type>
<min_len>1</min_len>
<max_len>100000</max_len>
<validate>numeric</validate>
<display>Allows Login Attempts</display>
</login_attempt_try>
<login_attempt_time>
<type>I4</type>
<min_len>1</min_len>
<max_len>100000</max_len>
<validate>numeric</validate>
<display>Allows Login Attempt Time</display>
</login_attempt_time>
<login_attempt_lock>
<type>I4</type>
<min_len>1</min_len>
<max_len>100000000</max_len>
<validate>numeric</validate>
<display>Account Lock Time</display>
</login_attempt_lock>
<search_expire>
<type>I4</type>
<min_len>1</min_len>
<max_len>1000000000</max_len>
<validate>numeric</validate>
<display>Search Expire Time</display>
</search_expire>
<db_cache>
<type>L</type>
<display>Cache DB Connections</display>
</db_cache>
<newsletter_registration>
<type>L</type>
<display>Newsletter Registration</display>
<description>Show Newsletter registration on the Register Page</description>
</newsletter_registration>
<default_account_status>
<type>L</type>
<display>Accounts Require Verification</display>
<description>Users who register will need to verify their account by clicking on a URL that is sent to them via email</description>
</default_account_status>
<cache_sessions>
<type>L</type>
<display>Cache Sessions</display>
</cache_sessions>
<!-- @todo Unknown -->
<weblog>
<type>L</type>
</weblog>
<site_address>
<type>C(128)</type>
<display>Site Address</display>
</site_address>
<site_city>
<type>C(32)</type>
<display>Site City</display>
</site_city>
<site_state>
<type>C(16)</type>
<display>Site State</display>
</site_state>
<site_zip>
<type>C(16)</type>
<display>Site Postal Code</display>
</site_zip>
<site_phone>
<type>C(32)</type>
<display>Site Phone Number</display>
</site_phone>
<site_fax>
<type>C(32)</type>
<display>Site Fax Number</display>
</site_fax>
<os>
<type>L</type>
<display>Site Operating System</display>
</os>
<auto_affiliate>
<type>L</type>
<display>Automatically make new users affliates</display>
</auto_affiliate>
<!-- Path to CURL -->
<path_curl>
<type>C(64)</type>
<display>Path to CURL</display>
</path_curl>
<!-- Show Afflicate Link -->
<show_affiliate_link>
<type>L</type>
</show_affiliate_link>
<show_newsletter_link>
<type>L</type>
<display>Show Newsletter Link</display>
<description>Show Newsletter Link on Registration Page</description>
</show_newsletter_link>
<show_domain_link>
<type>L</type>
<display>Show Domain Link</display>
</show_domain_link>
<show_contact_link>
<type>L</type>
<display>Show Contact Us Link</display>
</show_contact_link>
<show_cart_link>
<type>L</type>
<display>Show Cart Link</display>
</show_cart_link>
<show_checkout_link>
<type>L</type>
<display>Show Checkout Link</display>
</show_checkout_link>
<show_product_link>
<type>L</type>
<display>Show Product Link</display>
</show_product_link>
<show_cat_block>
<type>L</type>
<display>Show Product Category Block</display>
</show_cat_block>
<show_static_block>
<type>L</type>
<display>Show Static Page Block</display>
</show_static_block>
<!-- @todo Unknown -->
<show_affiliate_code>
<type>L</type>
</show_affiliate_code>
<!-- @todo Unknown -->
<show_discount_code>
<type>L</type>
</show_discount_code>
<!-- @todo Unknown - appears unused (const BILLING_WEEKDAY) -->
<billing_weekday>
<type>C(2)</type>
</billing_weekday>
<!-- @todo @deprecate System Grace Days after invoice created before nagging (Can be overriden by account) - merge with setup_invoice:invoice_gace)-->
<grace_period>
<type>C(2)</type>
</grace_period>
<!-- XX @todo Appears Unused? -->
<max_billing_notice>
<type>C(2)</type>
</max_billing_notice>
<!-- @todo @deprecate Number of days before a service is due to generate an invoice. -->
<max_inv_gen_period>
<type>C(2)</type>
</max_inv_gen_period>
<!-- @deprecated -->
<license_key>
<type>C(128)</type>
</license_key>
<!-- @deprecated -->
<license_code>
<type>X2</type>
</license_code>
</field>
<!-- Methods for this class, and the fields they have access to, if applicable -->
<method>
<update>id,db_cache,newsletter_registration,default_account_status,cache_sessions,site_id,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,affiliate_template_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,cookie_expire,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,site_address,site_city,site_state,site_zip,site_phone,site_fax,os,path_curl,show_affiliate_link,show_newsletter_link,show_contact_link,show_domain_link,show_cart_link,show_checkout_link,show_cat_block,show_product_link,show_static_block,show_affiliate_code,show_discount_code,billing_weekday,grace_period,max_billing_notice,max_inv_gen_period,auto_affiliate</update>
<view>id,db_cache,newsletter_registration,default_account_status,cache_sessions,site_id,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,affiliate_template_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,cookie_expire,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,site_address,site_city,site_state,site_zip,site_phone,site_fax,os,path_curl,show_affiliate_link,show_newsletter_link,show_contact_link,show_domain_link,show_cart_link,show_checkout_link,show_cat_block,show_product_link,show_static_block,show_affiliate_code,show_discount_code,billing_weekday,grace_period,max_billing_notice,max_inv_gen_period,auto_affiliate</view>
<search>id,site_id,newsletter_registration,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,cookie_expire,affiliate_template_id,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,max_inv_gen_period</search>
<search_show>id,site_id,newsletter_registration,setup_email_id,country_id,language_id,currency_id,weight_id,theme_id,group_id,affiliate_id,reseller_id,ssl_url,nonssl_url,login_expire,cookie_name,affiliate_template_id,cookie_expire,session_ip_match,error_reporting,site_name,site_email,time_format,date_format,date_time_format,decimal_place,debug,login_attempt_try,login_attempt_time,login_attempt_lock,search_expire,weblog,admin_theme_id,max_inv_gen_period</search_show>
</method>
<!-- Method triggers -->
<trigger></trigger>
<!-- Template page display titles -->
<title>
<view>Setup Company</view>
</title>
<!-- Template helpers -->
<tpl>
<search_show>
<checkbox>
<field>id</field>
<type>checkbox</type>
<width>25px</width>
</checkbox>
<id>
<field>id</field>
</id>
<site_name>
<field>site_name</field>
</site_name>
<nonssl_url>
<field>nonssl_url</field>
</nonssl_url>
</search_show>
</tpl>
</construct>

View File

@@ -1,31 +1,52 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<!-- Tree Menu Module Properties -->
<module_properties>
<name>setup</name>
<parent>setup</parent>
<notes><![CDATA[Control the site setup]]></notes>
<!-- MODULE Dependancy, this module wont be installed if the dependant modules dont exist -->
<dependancy></dependancy>
<!-- Translated display to use on the tree -->
<display>Setup</display>
<!-- Display a module in the menu tree -->
<menu_display>1</menu_display>
<!-- MODULE Name -->
<name>setup</name>
<!-- MODULE Notes, these notes show up in the modules table, as a description of the module -->
<notes><![CDATA[Control the site setup]]></notes>
<!-- MODULE Parent, the parent node in the tree -->
<parent></parent>
<!-- SUB Modules to install with this one -->
<sub_modules></sub_modules>
<!-- MODULE Type (core|base), core modules cannot be deleted, unrecognised types are ignored. -->
<type>base</type>
</module_properties>
<sql_inserts>
<module_method>
<search>
<name>search</name>
</search>
<view>
<name>view</name>
</view>
<update>
<name>update</name>
<page><![CDATA[core:search&module=%%&_escape=1&_next_page_one=view]]></page>
<menu_display>1</menu_display>
</update>
<search_show>
<name>search_show</name>
</search_show>
<_php_info>
<name>_php_info</name>
<page><![CDATA[%%:_php_info&_escape=true]]></page>
<menu_display>1</menu_display>
</_php_info>
</module_method>
</sql_inserts>
</install>
<!-- Tree Menu & Module Methods to load, they will be assigned the group permissions on install time, as selected by the user. -->
<module_method>
<search>
<display>Update</display>
<menu_display>1</menu_display>
<name>search</name>
<notes><![CDATA[List records]]></notes>
<page><![CDATA[core:search&module=%%&_next_page_one=view]]></page>
</search>
<search_show>
<name>search_show</name>
<notes><![CDATA[Show the results of a search]]></notes>
</search_show>
<update>
<name>update</name>
<notes><![CDATA[Update a record]]></notes>
</update>
<view>
<name>view</name>
<notes><![CDATA[View a record]]></notes>
</view>
<_php_info>
<display>PHP Info</display>
<menu_display>1</menu_display>
<name>_php_info</name>
<notes><![CDATA[Show PHP informtion]]></notes>
<page><![CDATA[%%:_php_info]]></page>
</_php_info>
</module_method>
</install>

View File

@@ -1,64 +1,68 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<setup>
<id>1</id>
<site_id>1</site_id>
<country_id>840</country_id>
<language_id>english</language_id>
<currency_id>1</currency_id>
<weight_id>1</weight_id>
<theme_id>default</theme_id>
<admin_theme_id>default_admin</admin_theme_id>
<group_id>2</group_id>
<affiliate_template_id>1</affiliate_template_id>
<affiliate_id>0</affiliate_id>
<reseller_id>0</reseller_id>
<setup_email_id>1</setup_email_id>
<ssl_url></ssl_url>
<nonssl_url></nonssl_url>
<login_expire>86400</login_expire>
<cookie_name>CookieName</cookie_name>
<cookie_expire>0</cookie_expire>
<session_ip_match>0</session_ip_match>
<error_reporting>E_ALL</error_reporting>
<site_name>Company.com</site_name>
<site_email>sales@company.com</site_email>
<time_format>g:i A</time_format>
<date_format><![CDATA[a:4:{i:0;s:1:"m";i:1;s:1:"d";i:2;s:1:"Y";i:3;s:1:"-";}]]></date_format>
<date_time_format><![CDATA[a:1:{i:0;s:0:"";}]]></date_time_format>
<decimal_place>2</decimal_place>
<debug>1</debug>
<login_attempt_try>10</login_attempt_try>
<login_attempt_time>60</login_attempt_time>
<login_attempt_lock>60</login_attempt_lock>
<search_expire>600</search_expire>
<db_cache>0</db_cache>
<newsletter_registration>1</newsletter_registration>
<default_account_status>0</default_account_status>
<cache_sessions>1</cache_sessions>
<weblog>0</weblog>
<os>0</os>
<show_ticket_link>0</show_ticket_link>
<show_affiliate_link>0</show_affiliate_link>
<show_newsletter_link>1</show_newsletter_link>
<show_domain_link>0</show_domain_link>
<show_contact_link>1</show_contact_link>
<show_cart_link>1</show_cart_link>
<show_checkout_link>1</show_checkout_link>
<show_product_link>1</show_product_link>
<show_cat_block>1</show_cat_block>
<show_file_block>0</show_file_block>
<show_static_block>0</show_static_block>
<show_affiliate_code>0</show_affiliate_code>
<show_discount_code>1</show_discount_code>
<billing_weekday>1</billing_weekday>
<grace_period>3</grace_period>
<max_billing_notice>3</max_billing_notice>
<max_inv_gen_period>7</max_inv_gen_period>
<license_key>63689401-9161-10043421</license_key>
<auto_affiliate>0</auto_affiliate>
</setup>
<setup_id>
<id>2</id>
</setup_id>
</install>
<setup>
<id>1</id>
<site_id>1</site_id>
<country_id>61</country_id>
<language_id>english</language_id>
<currency_id>6</currency_id>
<weight_id>1</weight_id>
<theme_id>default</theme_id>
<admin_theme_id>default_admin</admin_theme_id>
<group_id>2</group_id>
<affiliate_template_id></affiliate_template_id>
<affiliate_id></affiliate_id>
<reseller_id></reseller_id>
<setup_email_id></setup_email_id>
<ssl_url></ssl_url>
<nonssl_url></nonssl_url>
<login_expire>86400</login_expire>
<cookie_name>CookieName</cookie_name>
<cookie_expire>0</cookie_expire>
<session_ip_match>0</session_ip_match>
<error_reporting>E_ALL</error_reporting>
<site_name>ACME Web Billing</site_name>
<site_email>sales@example.com</site_email>
<site_address>100 Street Road</site_address>
<site_city>Melbourne</site_city>
<site_state>VIC</site_state>
<site_zip>3000</site_zip>
<site_phone>+61 3 1234 5678</site_phone>
<site_fax>+61 3 1234 5679</site_fax>
<time_format>g:i A</time_format>
<date_format><![CDATA[a:4:{i:0;s:1:"d";i:1;s:1:"m";i:2;s:1:"Y";i:3;s:1:"-";}]]></date_format>
<date_time_format><![CDATA[a:1:{i:0;s:0:"";}]]></date_time_format>
<decimal_place>2</decimal_place>
<debug>1</debug>
<login_attempt_try>10</login_attempt_try>
<login_attempt_time>60</login_attempt_time>
<login_attempt_lock>60</login_attempt_lock>
<search_expire>600</search_expire>
<db_cache>0</db_cache>
<newsletter_registration>0</newsletter_registration>
<default_account_status>0</default_account_status>
<cache_sessions>1</cache_sessions>
<weblog>0</weblog>
<os>0</os>
<show_affiliate_link>0</show_affiliate_link>
<show_newsletter_link>0</show_newsletter_link>
<show_domain_link>0</show_domain_link>
<show_contact_link>1</show_contact_link>
<show_cart_link>1</show_cart_link>
<show_checkout_link>1</show_checkout_link>
<show_product_link>0</show_product_link>
<show_cat_block>0</show_cat_block>
<show_static_block>0</show_static_block>
<show_affiliate_code>0</show_affiliate_code>
<show_discount_code>0</show_discount_code>
<billing_weekday>1</billing_weekday>
<grace_period>3</grace_period>
<max_billing_notice>3</max_billing_notice>
<max_inv_gen_period>7</max_inv_gen_period>
<license_key>63689401-9161-10043421</license_key>
<auto_affiliate>0</auto_affiliate>
</setup>
<setup_id>
<id>2</id>
</setup_id>
</install>