Initial Commit of AgileBill Open Source
This commit is contained in:
91
modules/asset_pool/asset_pool.inc.php
Normal file
91
modules/asset_pool/asset_pool.inc.php
Normal file
@@ -0,0 +1,91 @@
|
||||
<?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 asset_pool
|
||||
{
|
||||
# Open the constructor for this mod
|
||||
function construct()
|
||||
{
|
||||
$this->table = 'asset_pool';
|
||||
$this->module = 'asset_pool';
|
||||
$this->xml_construct = PATH_MODULES . $this->module . "/" . $this->module . "_construct.xml";
|
||||
$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->cache = $construct["construct"]["cache"];
|
||||
$this->order_by = $construct["construct"]["order_by"];
|
||||
$this->limit = $construct["construct"]["limit"];
|
||||
}
|
||||
|
||||
function add($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "add";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->add($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function view($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "view";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->view($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function update($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "update";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->update($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function delete($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$db = new CORE_database;
|
||||
$db->mass_delete($VAR, $this, "");
|
||||
}
|
||||
|
||||
function search($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "search";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search($VAR, $this, $type);
|
||||
}
|
||||
|
||||
function search_show($VAR)
|
||||
{
|
||||
$this->construct();
|
||||
$type = "search";
|
||||
$this->method["$type"] = split(",", $this->method["$type"]);
|
||||
$db = new CORE_database;
|
||||
$db->search_show($VAR, $this, $type);
|
||||
}
|
||||
}
|
||||
?>
|
33
modules/asset_pool/asset_pool_construct.xml
Normal file
33
modules/asset_pool/asset_pool_construct.xml
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<construct>
|
||||
<module>asset_pool</module>
|
||||
<name>asset_pool</name>
|
||||
<table>asset_pool</table>
|
||||
<dependancy>asset</dependancy>
|
||||
<cache>0</cache>
|
||||
<order_by>name</order_by>
|
||||
<limit>35</limit>
|
||||
<index>
|
||||
<main>id,site_id</main>
|
||||
</index>
|
||||
<field>
|
||||
<id>
|
||||
<type>I4</type>
|
||||
<unique>1</unique>
|
||||
</id>
|
||||
<site_id>
|
||||
<type>I4</type>
|
||||
</site_id>
|
||||
<name>
|
||||
<type>C(32)</type>
|
||||
</name>
|
||||
</field>
|
||||
<method>
|
||||
<add>id,site_id,name</add>
|
||||
<update>id,site_id,name</update>
|
||||
<delete>id,site_id,name</delete>
|
||||
<view>id,site_id,name</view>
|
||||
<search>id,site_id,name</search>
|
||||
</method>
|
||||
<trigger>0</trigger>
|
||||
</construct>
|
38
modules/asset_pool/asset_pool_install.xml
Normal file
38
modules/asset_pool/asset_pool_install.xml
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<install>
|
||||
<module_properties>
|
||||
<name>asset_pool</name>
|
||||
<table>asset_pool</table>
|
||||
<parent>asset</parent>
|
||||
<notes>Manage multiple pools of assets</notes>
|
||||
<menu_display>1</menu_display>
|
||||
<dependancy>asset</dependancy>
|
||||
<sub_modules></sub_modules>
|
||||
</module_properties>
|
||||
<sql_inserts>
|
||||
<module_method>
|
||||
<add>
|
||||
<name>add</name>
|
||||
<page>%%:add</page>
|
||||
<menu_display>1</menu_display>
|
||||
</add>
|
||||
<update>
|
||||
<name>update</name>
|
||||
</update>
|
||||
<search>
|
||||
<name>search</name>
|
||||
</search>
|
||||
<search_show>
|
||||
<name>search_show</name>
|
||||
</search_show>
|
||||
<delete>
|
||||
<name>delete</name>
|
||||
</delete>
|
||||
<view>
|
||||
<name>view</name>
|
||||
<page>core:search&module=%%&_escape=1</page>
|
||||
<menu_display>1</menu_display>
|
||||
</view>
|
||||
</module_method>
|
||||
</sql_inserts>
|
||||
</install>
|
Reference in New Issue
Block a user