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

File diff suppressed because it is too large Load Diff

View File

@@ -1,193 +1,309 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<construct>
<!-- define the module name -->
<module>account</module>
<!-- define the module table name -->
<table>account</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>last_name</order_by>
<!-- define the methods -->
<limit>30</limit>
<!-- define the fields -->
<field>
<id>
<type>I8</type>
<unique>1</unique>
</id>
<site_id>
<type>I4</type>
</site_id>
<date_orig>
<type>I8</type>
</date_orig>
<date_last>
<type>I8</type>
<convert>date-now</convert>
</date_last>
<date_expire>
<type>I8</type>
<convert>date</convert>
</date_expire>
<parent_id>
<type>I4</type>
</parent_id>
<language_id>
<type>C(32)</type>
</language_id>
<country_id>
<type>I4</type>
</country_id>
<affiliate_id>
<type>C(32)</type>
</affiliate_id>
<campaign_id>
<type>I4</type>
</campaign_id>
<reseller_id>
<type>I4</type>
</reseller_id>
<currency_id>
<type>I4</type>
</currency_id>
<theme_id>
<type>C(32)</type>
</theme_id>
<username>
<type>C(128)</type>
<min_len>4</min_len>
<max_len>12</max_len>
<validate>any</validate>
<unique>1</unique>
<index>1</index>
</username>
<password>
<type>C(128)</type>
<min_len>6</min_len>
<max_len>12</max_len>
<validate>password</validate>
<convert>md5</convert>
</password>
<inherit_group>
<type>L</type>
</inherit_group>
<misc>
<type>C2(128)</type>
</misc>
<status>
<type>I4</type>
</status>
<first_name>
<type>C(128)</type>
<min_len>1</min_len>
<max_len>128</max_len>
<validate>any</validate>
<index>1</index>
</first_name>
<middle_name>
<type>C(128)</type>
</middle_name>
<last_name>
<type>C(128)</type>
<min_len>1</min_len>
<max_len>128</max_len>
<validate>any</validate>
<index>1</index>
</last_name>
<title>
<type>C(128)</type>
</title>
<email>
<type>C(255)</type>
<min_len>4</min_len>
<max_len>128</max_len>
<validate>email</validate>
<unique>1</unique>
<index>1</index>
</email>
<company>
<type>C(255)</type>
</company>
<address1>
<type>C(128)</type>
<min_len>3</min_len>
<max_len>128</max_len>
<validate>any</validate>
</address1>
<address2>
<type>C(128)</type>
<max_len>128</max_len>
</address2>
<city>
<type>C(32)</type>
<min_len>2</min_len>
<max_len>32</max_len>
<validate>any</validate>
</city>
<state>
<type>C(32)</type>
<min_len>2</min_len>
<max_len>32</max_len>
<validate>any</validate>
</state>
<zip>
<type>C(16)</type>
<min_len>4</min_len>
<max_len>16</max_len>
<validate>any</validate>
</zip>
<email_type>
<type>L</type>
</email_type>
<invoice_delivery>
<type>I4</type>
</invoice_delivery>
<invoice_show_itemized>
<type>L</type>
<default>1</default>
</invoice_show_itemized>
<invoice_grace>
<type>I4</type>
</invoice_grace>
<invoice_advance_gen>
<type>I4</type>
</invoice_advance_gen>
<tax_id>
<type>C(64)</type>
</tax_id>
<max_child>
<type>I4</type>
</max_child>
</field>
<!-- define indexes -->
<index>
<login>username,password</login>
<search>first_name,middle_name,last_name</search>
<company>company</company>
<email>email</email>
<affiliate>affiliate_id</affiliate>
<campaign_id>campaign_id</campaign_id>
<country>country_id</country>
<region>city,state</region>
<city>city</city>
<state>state</state>
<postal>zip</postal>
<idmain>id,site_id</idmain>
<fulltext_user>first_name,last_name,email,company</fulltext_user>
</index>
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
<method>
<add>id,date_orig,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id</add>
<update>id,date_orig,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id</update>
<view>id,parent_id,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id,max_child</view>
</method>
<!-- define the method triggers -->
<trigger>
<add>
<success>account_admin:add_account_groups</success>
</add>
</trigger>
<!-- Module name -->
<module>account</module>
<!-- Module supporting database table -->
<table>account</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>last_name</order_by>
<!-- Default SQL limit for SQL queries -->
<limit>25</limit>
<!-- Schema version (used to determine if the schema has change during upgrades) -->
<version>1</version>
<!-- Database indexes -->
<index>
<login>username,password</login>
<search>first_name,middle_name,last_name</search>
<company>company</company>
<email>email</email>
<affiliate>affiliate_id</affiliate>
<campaign_id>campaign_id</campaign_id>
<country>country_id</country>
<region>city,state</region>
<city>city</city>
<state>state</state>
<postal>zip</postal>
<idmain>id,site_id</idmain>
<fulltext_user>first_name,last_name,email,company</fulltext_user>
</index>
<!-- Database fields -->
<field>
<!-- Record ID -->
<id>
<index>1</index>
<type>I8</type>
<unique>1</unique>
</id>
<!-- Site ID -->
<site_id>
<index>1</index>
<type>I4</type>
</site_id>
<!-- Date record created -->
<date_orig>
<convert>date-now</convert>
<display>Date Created</display>
<type>I8</type>
</date_orig>
<!-- Date record updated -->
<date_last>
<convert>date-now</convert>
<display>Date Updated</display>
<type>I8</type>
</date_last>
<date_expire>
<type>I8</type>
<convert>date</convert>
<display>Date Expire</display>
</date_expire>
<parent_id>
<type>I4</type>
<display>Parent Account</display>
</parent_id>
<language_id>
<type>C(32)</type>
<display>Language</display>
</language_id>
<country_id>
<type>I4</type>
<display>Country</display>
</country_id>
<affiliate_id>
<type>I4</type>
</affiliate_id>
<campaign_id>
<type>I4</type>
</campaign_id>
<reseller_id>
<type>I4</type>
</reseller_id>
<currency_id>
<type>I4</type>
<display>Currency</display>
</currency_id>
<theme_id>
<type>C(32)</type>
<display>Theme</display>
</theme_id>
<username>
<type>C(128)</type>
<min_len>4</min_len>
<max_len>128</max_len>
<validate>any</validate>
<unique>1</unique>
<index>1</index>
<display>User Name</display>
</username>
<password>
<type>C(128)</type>
<min_len>6</min_len>
<max_len>128</max_len>
<validate>password</validate>
<convert>md5</convert>
<display>Password</display>
</password>
<inherit_group>
<type>L</type>
</inherit_group>
<!-- @unknown? -->
<misc>
<type>C2(128)</type>
</misc>
<!-- Record active (BOOL)-->
<status>
<display>Active</display>
<type>I4</type>
</status>
<first_name>
<type>C(128)</type>
<min_len>1</min_len>
<max_len>128</max_len>
<validate>any</validate>
<index>1</index>
<display>First Name</display>
</first_name>
<middle_name>
<type>C(128)</type>
<display>Middle Name</display>
</middle_name>
<last_name>
<type>C(128)</type>
<min_len>1</min_len>
<max_len>128</max_len>
<validate>any</validate>
<index>1</index>
<display>Last Name</display>
</last_name>
<title>
<type>C(128)</type>
<display>Title</display>
</title>
<email>
<type>C(255)</type>
<min_len>4</min_len>
<max_len>128</max_len>
<validate>email</validate>
<unique>1</unique>
<index>1</index>
<display>Email</display>
</email>
<company>
<type>C(255)</type>
<display>Company</display>
</company>
<address1>
<type>C(128)</type>
<min_len>3</min_len>
<max_len>128</max_len>
<validate>any</validate>
<display>Address</display>
</address1>
<address2>
<type>C(128)</type>
<max_len>128</max_len>
<display>Address</display>
</address2>
<city>
<type>C(32)</type>
<min_len>2</min_len>
<max_len>32</max_len>
<validate>any</validate>
<display>City</display>
</city>
<state>
<type>C(32)</type>
<min_len>2</min_len>
<max_len>32</max_len>
<validate>any</validate>
<display>State</display>
</state>
<zip>
<type>C(16)</type>
<min_len>4</min_len>
<max_len>16</max_len>
<validate>any</validate>
<display>Postal Code</display>
</zip>
<email_type>
<type>L</type>
<display>HTML Email</display>
</email_type>
<invoice_delivery>
<type>I4</type>
<display>Invoice Delivery</display>
</invoice_delivery>
<invoice_show_itemized>
<type>L</type>
<default>1</default>
<display>Show Itemised Invoice</display>
</invoice_show_itemized>
<invoice_grace>
<type>I4</type>
<display>Invoice Grace Period</display>
</invoice_grace>
<invoice_advance_gen>
<type>I4</type>
<display>Invoice Advance Generation</display>
</invoice_advance_gen>
<tax_id>
<type>C(64)</type>
<display>Tax ID</display>
</tax_id>
<max_child>
<type>I4</type>
<display>Max Children</display>
</max_child>
<!-- Credit Terms applicable for this account -->
<net_term_id>
<type>I4</type>
<display>Net Terms</display>
</net_term_id>
</field>
<!-- Methods for this class, and the fields they have access to, if applicable -->
<method>
<user_add>date_orig,date_last,language_id,country_id,affiliate_id,reseller_id,campaign_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id,invoice_delivery,invoice_show_itemized,invoice_grace</user_add>
<user_update>id,date_orig,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id</user_update>
<user_view>id,parent_id,date_last,language_id,country_id,affiliate_id,reseller_id,currency_id,theme_id,username,password,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,email_type,tax_id,max_child</user_view>
<delete>id</delete>
<add>search,date_expire,language_id,country_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip</add>
<update>id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,inherit_group,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,invoice_delivery,invoice_show_itemized,invoice_grace,invoice_advance_gen,tax_id,max_child</update>
<view>id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,inherit_group,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,invoice_delivery,invoice_show_itemized,invoice_grace,invoice_advance_gen,tax_id,max_child</view>
<search>id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,invoice_delivery,invoice_show_itemized,invoice_grace,invoice_advance_gen,tax_id,max_child</search>
<search_export>id,date_orig,date_last,date_expire,parent_id,language_id,country_id,affiliate_id,campaign_id,reseller_id,currency_id,theme_id,username,password,inherit_group,misc,status,first_name,middle_name,last_name,title,email,email_type,company,address1,address2,city,state,zip,tax_id,max_child</search_export>
<export_excel>language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id</export_excel>
<export_xml>language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id</export_xml>
<export_csv>language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id</export_csv>
<export_tab>language_id,country_id,affiliate_id,campaign_id,currency_id,username,password,misc,status,first_name,middle_name,last_name,title,email,company,address1,address2,city,state,zip,tax_id</export_tab>
</method>
<!-- Method triggers -->
<trigger>
<add>
<success>account:add_account_groups</success>
</add>
<update>
<success>account:update_account_groups</success>
</update>
</trigger>
<!-- Template page display titles -->
<title>
<add>Register User Account</add>
<mail_one>Send Email to User</mail_one>
<merge>Merge User Accounts</merge>
<search_form>Search</search_form>
<user_add>Register User Account</user_add>
<user_view>Update User Account</user_view>
<user_password>Reset Password</user_password>
<user_password_reset>Reset Password</user_password_reset>
<user_verify>Enter Verification Code</user_verify>
<user_verify_resend>Resend Verification Email</user_verify_resend>
<view>Account</view>
</title>
<!-- Template helpers -->
<tpl>
<search_show>
<checkbox>
<field>id</field>
<type>checkbox</type>
<width>25px</width>
</checkbox>
<icon>
<field>status</field>
<type>bool_icon</type>
<width>20px</width>
</icon>
<last_name>
<field>last_name</field>
</last_name>
<first_name>
<field>first_name</field>
</first_name>
<username>
<field>username</field>
<truncate>25</truncate>
</username>
<email>
<field>email</field>
<truncate>25</truncate>
</email>
<last>
<type>literal</type>
<width>120px</width>
<data><![CDATA[<div style="text-align: center;">
<a href="?_page=account_admin:mail_one&amp;mail_account_id=%%id%%"><img title="Send E-mail" src="themes/default/images/icons/mail_16.gif" alt="Email" width="16" height="16" style="border: 0px;"/></a>
<a title="Services" href="?_page=core:search&amp;module=service&amp;service_account_id=%%id%%&amp;_next_page_one=view"><img src="themes/default/images/icons/tools_16.gif" alt="Service" width="16" height="16" style="border: 0px;"/></a>
<a title="Invoices" href="?_page=core:search&amp;module=invoice&amp;invoice_account_id=%%id%%&amp;_next_page_one=view"><img src="themes/default/images/icons/calc_16.gif" alt="Invoice" width="16" height="16" style="border: 0px;"/></a>
</div>]]></data>
</last>
</search_show>
</tpl>
</construct>

View File

@@ -1,14 +1,101 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<!-- Tree Menu Module Properties -->
<module_properties>
<!-- MODULE Dependancy, this module wont be installed if the dependant modules dont exist -->
<dependancy></dependancy>
<!-- Translated display to use on the tree -->
<display>Account</display>
<!-- Display a module in the menu tree -->
<menu_display>1</menu_display>
<!-- MODULE Name -->
<name>account</name>
<parent>account</parent>
<notes><![CDATA[This is the account module for all accounts...]]></notes>
<!-- MODULE Notes, these notes show up in the modules table, as a description of the module -->
<notes><![CDATA[This is the account module for all accounts and administrators.]]></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>
<install>
<name>install</name>
</install>
</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>
<add>
<display>Add</display>
<menu_display>1</menu_display>
<name>add</name>
<notes><![CDATA[Add records]]></notes>
</add>
<delete>
<name>delete</name>
<notes><![CDATA[Delete records]]></notes>
</delete>
<search>
<display>List</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_form>
<display>Search</display>
<menu_display>1</menu_display>
<name>search_form</name>
<notes><![CDATA[Search for records]]></notes>
</search_form>
<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>
<search_export>
<name>search_export</name>
</search_export>
<install>
<name>install</name>
</install>
<update_account_groups>
<name>update_account_groups</name>
<notes><![CDATA[This method is triggered to add the account to the specified groups when added]]></notes>
</update_account_groups>
<send_verify_email>
<name>send_verify_email</name>
<notes><![CDATA[Sends the user the change password instructions]]></notes>
</send_verify_email>
<send_password_email>
<name>send_password_email</name>
<notes><![CDATA[Sends the user the change password instructions]]></notes>
</send_password_email>
<mail_multi>
<name>mail_multi</name>
</mail_multi>
<mail_one>
<name>mail_one</name>
</mail_one>
<autoselect>
<name>autoselect</name>
</autoselect>
<login>
<name>login</name>
<notes><![CDATA[Login as another user with equal or lesser group access]]></notes>
</login>
<merge>
<name>merge</name>
</merge>
<group_search>
<name>group_search</name>
</group_search>
<product_search>
<name>product_search</name>
</product_search>
</module_method>
</install>

View File

@@ -1,33 +1,33 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<account>
<id>1</id>
<site_id>1</site_id>
<date_orig>1075175744</date_orig>
<date_last>1112335769</date_last>
<date_expire>0</date_expire>
<parent_id>0</parent_id>
<language_id>english</language_id>
<country_id>840</country_id>
<reseller_id>0</reseller_id>
<currency_id>1</currency_id>
<theme_id>default</theme_id>
<username>admin</username>
<password>21232f297a57a5a743894a0e4a801fc3</password>
<misc>Notes</misc>
<status>1</status>
<first_name>Admin</first_name>
<last_name>Admin</last_name>
<title>Mrs</title>
<email>email@company.com</email>
<address1><![CDATA[100 Street's]]></address1>
<city>City</city>
<state>State</state>
<zip>12345</zip>
<email_type>0</email_type>
<campaign_id>0</campaign_id>
</account>
<account_id>
<id>33</id>
</account_id>
</install>
<account>
<id>1</id>
<site_id>1</site_id>
<date_orig>1075175744</date_orig>
<date_last>1112335769</date_last>
<date_expire>0</date_expire>
<parent_id>0</parent_id>
<language_id>english</language_id>
<country_id>840</country_id>
<reseller_id>0</reseller_id>
<currency_id>1</currency_id>
<theme_id>default</theme_id>
<username>admin</username>
<password>21232f297a57a5a743894a0e4a801fc3</password>
<misc>Notes</misc>
<status>1</status>
<first_name>Admin</first_name>
<last_name>Admin</last_name>
<title>Mrs</title>
<email>email@company.com</email>
<address1><![CDATA[100 Street's]]></address1>
<city>City</city>
<state>State</state>
<zip>12345</zip>
<email_type>0</email_type>
<campaign_id>0</campaign_id>
</account>
<account_id>
<id>33</id>
</account_id>
</install>

View File

@@ -1,38 +1,37 @@
<?php
<?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:Account
*/
$auth_methods = Array
(
Array ('module' => 'account', 'method' => 'add'),
Array ('module' => 'account', 'method' => 'user_add'),
Array ('module' => 'account', 'method' => 'user_view'),
Array ('module' => 'account', 'method' => 'add'),
Array ('module' => 'account', 'method' => 'view'),
Array ('module' => 'account', 'method' => 'update'),
Array ('module' => 'account', 'method' => 'password'),
Array ('module' => 'account', 'method' => 'password_reset'),
Array ('module' => 'account', 'method' => 'static_var'),
Array ('module' => 'account', 'method' => 'verify'),
Array ('module' => 'account', 'method' => 'verify_resend'),
Array ('module' => 'account', 'method' => 'sub_account_add'),
Array ('module' => 'account', 'method' => 'sub_delete')
);
/**
* Public Account methods
*/
?>
$auth_methods = array(
array('module'=>'account','method'=>'user_add'),
array('module'=>'account','method'=>'user_view'),
array('module'=>'account','method'=>'user_password'),
array('module'=>'account','method'=>'user_password_reset'),
array('module'=>'account','method'=>'user_verify'),
array('module'=>'account','method'=>'user_verify_resend')
);
?>