Initial Commit of AgileBill Open Source

This commit is contained in:
unknown
2008-11-26 14:50:40 -08:00
parent ae5a0fc25e
commit 02306ccc47
2954 changed files with 410976 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<?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
*/
/**
Sample use in tpl:
{if $list->is_installed('account_message')}
{$method->exe_noauth('account_message','view')}
<h2>System message on {$date}</h2>
<p>{$message|nl2br}</p>
{/if}
*/
class account_message
{
/** update system message */
function add($VAR) {
@$m=$VAR['message'];
$db=&DB();
$fields=Array('date_orig'=>time(), 'message'=>$m);
$db->Execute(sqlUpdate($db,"account_message",$fields,"id = 1"));
}
/** view system message */
function view($VAR) {
if(!SESS_LOGGED) return false;
$db=&DB();
$rs = $db->Execute(sqlSelect($db,"account_message","date_orig,message","id=1"));
if($rs && $rs->RecordCount()) {
global $smarty;
$smarty->assign('message', $rs->fields['message']);
$smarty->assign('date', date("m-d-Y", $rs->fields['date_orig']));
}
}
}
?>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<construct>
<module>account_message</module>
<table>account_message</table>
<dependancy/>
<cache>0</cache>
<order_by>date_orig</order_by>
<limit>30</limit>
<field>
<id>
<type>I8</type>
<unique>1</unique>
</id>
<site_id>
<type>I4</type>
</site_id>
<date_orig>
<type>I8</type>
</date_orig>
<account_id>
<type>I8</type>
</account_id>
<message>
<type>X2</type>
</message>
</field>
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
<method>
<add>id,date_orig,account_id,message</add>
<update>id,date_orig,account_id,message</update>
<view>id,date_orig,account_id,message</view>
</method>
<!-- define the method triggers -->
<trigger></trigger>
</construct>

View File

@@ -0,0 +1,17 @@
<install>
<module_properties>
<name>account_message</name>
<parent>account</parent>
<notes><![CDATA[Holds messages to accounts...]]></notes>
</module_properties>
<sql_inserts>
<module_method>
<add>
<name>add</name>
</add>
<add>
<name>view</name>
</add>
</module_method>
</sql_inserts>
</install>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<account_message>
<id>1</id>
<site_id>1</site_id>
<date_orig>1075175744</date_orig>
<account_id>0</account_id>
<message>Default system message...</message>
</account_message>
<account_message_id>
<id>2</id>
</account_message_id>
</install>

View File

@@ -0,0 +1,25 @@
<?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
*/
$auth_methods = Array
(
Array ('module' => 'account_message', 'method' => 'view')
);
?>