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,123 @@
<?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
*/
class file_category
{
# Open the constructor for this mod
function file_category()
{
# name of this module:
$this->module = "file_category";
# 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"];
}
##############################
## ADD ##
##############################
function add($VAR)
{
$type = "add";
$this->method["$type"] = split(",", $this->method["$type"]);
$db = new CORE_database;
$db->add($VAR, $this, $type);
}
##############################
## VIEW ##
##############################
function view($VAR)
{
$type = "view";
$this->method["$type"] = split(",", $this->method["$type"]);
$db = new CORE_database;
$db->view($VAR, $this, $type);
}
##############################
## UPDATE ##
##############################
function update($VAR)
{
$type = "update";
$this->method["$type"] = split(",", $this->method["$type"]);
$db = new CORE_database;
$db->update($VAR, $this, $type);
}
##############################
## DELETE ##
##############################
function delete($VAR)
{
$db = new CORE_database;
$db->mass_delete($VAR, $this, "");
}
##############################
## SEARCH FORM ##
##############################
function search_form($VAR)
{
$type = "search";
$this->method["$type"] = split(",", $this->method["$type"]);
$db = new CORE_database;
$db->search_form($VAR, $this, $type);
}
##############################
## SEARCH ##
##############################
function search($VAR)
{
$type = "search";
$this->method["$type"] = split(",", $this->method["$type"]);
$db = new CORE_database;
$db->search($VAR, $this, $type);
}
##############################
## SEARCH SHOW ##
##############################
function search_show($VAR)
{
$type = "search";
$this->method["$type"] = split(",", $this->method["$type"]);
$db = new CORE_database;
$db->search_show($VAR, $this, $type);
}
}
?>

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<construct>
<!-- define the module name -->
<module>file_category</module>
<!-- define the module table name -->
<table>file_category</table>
<!-- define the module dependancy(s) -->
<dependancy>file</dependancy>
<!-- define the DB cache in seconds -->
<cache>0</cache>
<!-- define the default order_by field for SQL queries -->
<order_by>sort_order</order_by>
<!-- define the methods -->
<limit>35</limit>
<!-- define the fields -->
<field>
<id>
<type>I4</type>
<unique>1</unique>
<index>1</index>
</id>
<site_id>
<type>I4</type>
<index>1</index>
</site_id>
<date_orig>
<type>I8</type>
<convert>date-now</convert>
</date_orig>
<name>
<type>C(128)</type>
<min_len>1</min_len>
<max_len>128</max_len>
<validate>any</validate>
</name>
<description>
<type>X2</type>
</description>
<status>
<type>L</type>
</status>
<group_avail>
<type>C(255)</type>
<validate>any</validate>
<convert>array</convert>
</group_avail>
<sort_order>
<type>I4</type>
</sort_order>
</field>
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
<method>
<add>id,site_id,date_orig,name,description,status,group_avail,sort_order</add>
<update>id,site_id,date_orig,name,description,status,group_avail,sort_order</update>
<delete>id,site_id,date_orig,name,description,status,group_avail,sort_order</delete>
<view>id,site_id,date_orig,name,description,status,group_avail,sort_order</view>
<search>id,site_id,date_orig,name,description,status,group_avail,sort_order</search>
</method>
<!-- define the method triggers -->
<trigger>
</trigger>
</construct>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<!-- Define the main module properties -->
<module_properties>
<name>file_category</name>
<parent>file</parent>
<notes>This module allows you to manage the categories for your downloadable files.</notes>
<menu_display>1</menu_display>
<dependancy>file</dependancy>
<sub_modules></sub_modules>
</module_properties>
<!-- Define any methods for this module -->
<sql_inserts>
<module_method>
<search>
<name>search</name>
</search>
<view>
<name>view</name>
<notes>Allow users to view records</notes>
<page>core:search&amp;module=%%&amp;_escape=1&amp;_next_page_one=view</page>
<menu_display>1</menu_display>
</view>
<add>
<name>add</name>
<notes>Allow users to add records</notes>
<menu_display>1</menu_display>
</add>
<delete>
<name>delete</name>
</delete>
<update>
<name>update</name>
</update>
<search_show>
<name>search_show</name>
<notes>Allow users to view the search results</notes>
</search_show>
</module_method>
</sql_inserts>
</install>

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<install>
<file_category>
<id>1</id>
<site_id>1</site_id>
<date_orig>1069748554</date_orig>
<name>Registered Users</name>
<description>Only registered users can access this category</description>
<status>1</status>
<group_avail>a:4:{i:0;s:1:"2";i:1;s:1:"3";i:2;s:4:"1001";i:3;s:1:"4";}</group_avail>
<sort_order>2</sort_order>
</file_category>
<file_category>
<id>2</id>
<site_id>1</site_id>
<date_orig>1069748586</date_orig>
<name>All Users</name>
<description>All users can access these downloads</description>
<status>1</status>
<group_avail>a:4:{i:0;s:1:"2";i:1;s:1:"3";i:2;s:4:"1001";i:3;s:1:"4";}</group_avail>
<sort_order>1</sort_order>
</file_category>
<file_category_id>
<id>2</id>
</file_category_id>
</install>