Initial Commit of AgileBill Open Source
This commit is contained in:
126
modules/htaccess_exclude/htaccess_exclude.inc.php
Normal file
126
modules/htaccess_exclude/htaccess_exclude.inc.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?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 htaccess_exclude
|
||||
{
|
||||
|
||||
# Open the constructor for this mod
|
||||
function htaccess_exclude()
|
||||
{
|
||||
# name of this module:
|
||||
$this->module = "htaccess_exclude";
|
||||
|
||||
# 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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
49
modules/htaccess_exclude/htaccess_exclude_construct.xml
Normal file
49
modules/htaccess_exclude/htaccess_exclude_construct.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<construct>
|
||||
<!-- define the module name -->
|
||||
<module>htaccess_exclude</module>
|
||||
<!-- define the module table name -->
|
||||
<table>htaccess_exclude</table>
|
||||
<!-- define the module dependancy(s) -->
|
||||
<dependancy>htaccess</dependancy>
|
||||
<!-- define the DB cache in seconds -->
|
||||
<cache>0</cache>
|
||||
<!-- define the default order_by field for SQL queries -->
|
||||
<order_by>name</order_by>
|
||||
<!-- define the methods -->
|
||||
<limit>25</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>
|
||||
<name>
|
||||
<type>C(32)</type>
|
||||
<min_len>3</min_len>
|
||||
<max_len>24</max_len>
|
||||
<validate>any</validate>
|
||||
</name>
|
||||
<extension>
|
||||
<type>C(16)</type>
|
||||
<min_len>2</min_len>
|
||||
<max_len>4</max_len>
|
||||
<validate>alphanumeric</validate>
|
||||
</extension>
|
||||
</field>
|
||||
<!-- define all the methods for this class, and the fields they have access to, if applicable. -->
|
||||
<method>
|
||||
<add>id,site_id,name,extension</add>
|
||||
<update>id,site_id,name,extension</update>
|
||||
<delete>id,site_id,name,extension</delete>
|
||||
<view>id,site_id,name,extension</view>
|
||||
<search>id,site_id,name,extension</search>
|
||||
</method>
|
||||
<!-- define the method triggers -->
|
||||
<trigger>0</trigger>
|
||||
</construct>
|
36
modules/htaccess_exclude/htaccess_exclude_install.xml
Normal file
36
modules/htaccess_exclude/htaccess_exclude_install.xml
Normal file
@@ -0,0 +1,36 @@
|
||||
<install>
|
||||
<module_properties>
|
||||
<name>htaccess_exclude</name>
|
||||
<parent>htaccess</parent>
|
||||
<notes><![CDATA[This module controls the types of files that can be excluded from being protected by htaccess.]]></notes>
|
||||
<menu_display>1</menu_display>
|
||||
</module_properties>
|
||||
<sql_inserts>
|
||||
<module_method>
|
||||
<search>
|
||||
<name>search</name>
|
||||
</search>
|
||||
<view>
|
||||
<name>view</name>
|
||||
<notes><![CDATA[Allow users to view records]]></notes>
|
||||
<page><![CDATA[core:search&module=%%&_escape=1&_next_page_one=view]]></page>
|
||||
<menu_display>1</menu_display>
|
||||
</view>
|
||||
<add>
|
||||
<name>add</name>
|
||||
<notes><![CDATA[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><![CDATA[Allow users to view the search results]]></notes>
|
||||
</search_show>
|
||||
</module_method>
|
||||
</sql_inserts>
|
||||
</install>
|
153
modules/htaccess_exclude/htaccess_exclude_install_data.xml
Normal file
153
modules/htaccess_exclude/htaccess_exclude_install_data.xml
Normal file
@@ -0,0 +1,153 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
<install>
|
||||
<htaccess_exclude>
|
||||
<id>1</id>
|
||||
<site_id>1</site_id>
|
||||
<name>PHP</name>
|
||||
<extension>php</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>2</id>
|
||||
<site_id>1</site_id>
|
||||
<name>PHP3</name>
|
||||
<extension>php3</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>3</id>
|
||||
<site_id>1</site_id>
|
||||
<name>PHP4</name>
|
||||
<extension>php4</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>4</id>
|
||||
<site_id>1</site_id>
|
||||
<name>PHPS</name>
|
||||
<extension>phps</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>5</id>
|
||||
<site_id>1</site_id>
|
||||
<name>INC</name>
|
||||
<extension>inc</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>6</id>
|
||||
<site_id>1</site_id>
|
||||
<name>HTML</name>
|
||||
<extension>html</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>7</id>
|
||||
<site_id>1</site_id>
|
||||
<name>HTM</name>
|
||||
<extension>htm</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>8</id>
|
||||
<site_id>1</site_id>
|
||||
<name>JPG</name>
|
||||
<extension>jpg</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>9</id>
|
||||
<site_id>1</site_id>
|
||||
<name>JPEG</name>
|
||||
<extension>jpeg</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>10</id>
|
||||
<site_id>1</site_id>
|
||||
<name>GIF</name>
|
||||
<extension>gif</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>11</id>
|
||||
<site_id>1</site_id>
|
||||
<name>BMP</name>
|
||||
<extension>bmp</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>12</id>
|
||||
<site_id>1</site_id>
|
||||
<name>TIF</name>
|
||||
<extension>tif</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>13</id>
|
||||
<site_id>1</site_id>
|
||||
<name>JAVASCRIPT</name>
|
||||
<extension>js</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>14</id>
|
||||
<site_id>1</site_id>
|
||||
<name>CSS</name>
|
||||
<extension>css</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>15</id>
|
||||
<site_id>1</site_id>
|
||||
<name>PDF</name>
|
||||
<extension>pdf</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>16</id>
|
||||
<site_id>1</site_id>
|
||||
<name>MS WORD</name>
|
||||
<extension>doc</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>17</id>
|
||||
<site_id>1</site_id>
|
||||
<name>MS EXCEL</name>
|
||||
<extension>xls</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>18</id>
|
||||
<site_id>1</site_id>
|
||||
<name>CSV</name>
|
||||
<extension>csv</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>19</id>
|
||||
<site_id>1</site_id>
|
||||
<name>TEXT</name>
|
||||
<extension>txt</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>20</id>
|
||||
<site_id>1</site_id>
|
||||
<name>RICH TEXT</name>
|
||||
<extension>rtf</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>21</id>
|
||||
<site_id>1</site_id>
|
||||
<name>XML</name>
|
||||
<extension>xml</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>22</id>
|
||||
<site_id>1</site_id>
|
||||
<name>ZIP</name>
|
||||
<extension>zip</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>23</id>
|
||||
<site_id>1</site_id>
|
||||
<name>GZIP</name>
|
||||
<extension>gzip</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude>
|
||||
<id>24</id>
|
||||
<site_id>1</site_id>
|
||||
<name>TAR.GZ</name>
|
||||
<extension>gz</extension>
|
||||
</htaccess_exclude>
|
||||
<htaccess_exclude_id>
|
||||
<id>30</id>
|
||||
</htaccess_exclude_id>
|
||||
<htaccess_exclude_id>
|
||||
<id>1</id>
|
||||
</htaccess_exclude_id>
|
||||
</install>
|
Reference in New Issue
Block a user