diff --git a/README b/README deleted file mode 100644 index 2148b14a..00000000 --- a/README +++ /dev/null @@ -1,29 +0,0 @@ -AgileBill is a Flexible Billing and Invoicing Application for a number of -markets, including Web Hosts, ISPs, VoIP Providers, and membership/subscription -type models. - -It features numerious plugins for payment processing, provisioning, and interfacing -with a variety of 3rd-party applications and services. - -Development began as early as 2002, and initially released commercially in 2004. - -The project was released to open source in November 26, 2008. - -The project homepage is located here: - http://agileco.com/agilebill-open-source-billing-software.htm - -The bug tracking and feature requests are located here: - http://tony_landis.lighthouseapp.com/projects/20914-agilebill/tickets - -The developer's personal website is: - http://www.tonylandis.com - -For a full list of features, see these version release announcement: - http://forum.agileco.com/forumdisplay.php?s=&f=26&page=1&pp=20&sort=lastpost&order=desc&daysprune=-1 - -The user community is located at: - http://forum.agileco.com - -This software includes the functionality the two projects AgileVoice and AgileISP, websites: - http://www.agilevoice.com - http://www.agileisp.com diff --git a/admin.php b/admin.php deleted file mode 100644 index 7f6de066..00000000 --- a/admin.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Core - */ - -/** - * The main AgileBill Entry Page - */ - -if(! isset($_POST['default_admin']) && ! isset($_POST['default_admin'])) - DEFINE('ADMIN_FORCE',true); - -include_once('index.php'); -?> diff --git a/ajax.php b/ajax.php deleted file mode 100644 index 43992d95..00000000 --- a/ajax.php +++ /dev/null @@ -1,61 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Core - */ - -/** - * The main AgileBill AJAX rendering - */ - -ob_start(); -define('AJAX',1); - -require_once('config.inc.php'); -require_once('modules/module.inc.php'); -require_once('modules/core/vars.inc.php'); -$C_vars = new CORE_vars; -$VAR = $C_vars->f; - -require_once('includes/adodb/adodb.inc.php'); -require_once(PATH_CORE.'auth.inc.php'); -require_once(PATH_CORE.'database.inc.php'); -require_once(PATH_CORE.'method_ajax.inc.php'); -require_once(PATH_CORE.'session.inc.php'); -require_once(PATH_CORE.'setup.inc.php'); -require_once(PATH_CORE.'xml.inc.php'); - -$C_debug = new CORE_debugger; -$C_setup = new CORE_setup; -$C_sess = new CORE_session; -$C_sess->session_constant(); -$C_method = new CORE_method; - -if ((isset($VAR['_login'])) && (isset($VAR['_username'])) && (isset($VAR['_password']))) { - require_once(PATH_CORE.'login.inc.php'); - $C_login = new CORE_login_handler(); - $C_login->login($VAR); -} - -$C_sess->session_constant_log(); -$C_auth = new CORE_auth(false); -$C_method->do_all(); -ob_end_flush(); -?> diff --git a/includes/cron/cron.inc.php b/includes/cron/cron.inc.php deleted file mode 100644 index dd425f1e..00000000 --- a/includes/cron/cron.inc.php +++ /dev/null @@ -1,221 +0,0 @@ - ** -** Project home..: http://klaus_p.pieper.bei.t-online.de/ ** -** Filename......: class.cron.inc ** -** Copyright(C)..: 2002 Klaus P. Pieper ** -** Last changed..: 12 August 2002 ** -** License.......: GNU Lesser General Public License (see below) ** -** ** -** This library is free software; you can redistribute it and/or ** -** modify it under the terms of the GNU Lesser General Public ** -** License as published by the Free Software Foundation; either ** -** version 2.1 of the License, or (at your option) any later version. ** -** ** -** This library is distributed in the hope that it will be useful, ** -** but WITHOUT ANY WARRANTY; without even the implied warranty of ** -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ** -** Lesser General Public License for more details. ** - ** -** You should have received a copy of the GNU Lesser General Public ** -** License along with this library; if not, write to the Free Software ** -** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** -*******************************************************************************/ - -/******************************************************************************* -** Version history: -** 0.2.7: 08-Aug-2002: yet another minor bug fix in the decision logic -** 0.2.7: 08-Aug-2002: another minor bug fix in the decision logic -** 0.2.6: 29-Jul-2002: minor bug fix in the decision logic -** 0.2.5: 26-Jul-2002: decision logic in procedure due completely -** re-written, carry over principle omitted -** 0.2.4: 25-Jul-2002: more minor bug in carry over procedure -** 0.2.3: 25-Jul-2002: minor bug fixes, -** - specifying weekdays -** - carry over flag added -** - arCFOffset added for the carry over function -** 0.2.2: 18-Jul-2002: added FALSE return for $tLast == NULL -** 0.2.1: 15-Jul-2002: first published version -*******************************************************************************/ - -class cron { - - // this is the heart of the class - // $tLast: last time at which the command was completed - // $tNow: the reference time, usually the current time stamp - // $sSpec: the specifier in the usual crontab format - // returns TRUE if a timestamp exists between $tLast and $tNow - // fulfilling the $sSpec criteria. - // returns FALSE otherwise - - function due($tLast, $tNow, $sSpec) - { - - // this array describes the classic crontab format - // for internal use the elements are listed in reverse order - $arSeg = array("wday", "mon", - "mday", "hours", - "minutes"); - // alternate crontab format includes year - // this format is internally not (yet) supported!!! - /* $arSeg = array("year", "wday", - "mon", "mday", - "hours", "minutes"); - */ - - // this array contains the offset in case for the carry over status - // see below for the determination of the carry over status - $arPeriod = array("wday" => 7, - "mon" => 12, - "mday" => - array(31, 28, 31, 30, 31, 30, - 31, 31, 30, 31, 30, 31), - "hours" => 24, - "minutes" => 60); - - $arTime = array("wday" => 604800, // 7 * 24 * 60 * 60 - "mon" => 31536000, // 365 * 24 * 60 * 60 - "mday" => - array(31 * 86400, // 31 * 24 * 60 * 60 - 28 * 86400, - 31 * 86400, - 30 * 86400, - 31 * 86400, - 30 * 86400, - 31 * 86400, - 31 * 86400, - 30 * 86400, - 31 * 86400, - 30 * 86400, - 31 * 86400), - "hours" => 86400, // 24 * 60 * 60 - "minutes" => 3600); // 60 * 60 - - - $iSeg = 0; // segment index - $iCmpVal = 0; // compare value - - // these lines added in 0.2.5 - $bStatus = FALSE; // procedure status - $iPFaktor = 0; // period factor - $iTFaktor = 0; // time factor - - if ($tNow == NULL) $tNow = time(); - // this line added in version 0.2.2 - if ($tLast == NULL) return FALSE; - - // convert strings to time - if (is_string($tLast)) $tLast = strtotime($tLast); - if (is_string($tNow)) $tNow = strtotime($tNow); - - if ($tNow < $tLast) return FALSE; - - // convert time variables to arrays - $arLast = getdate($tLast); - $arNow = getdate($tNow); - $arSpec = array_reverse(explode(" ", $sSpec)); - - // walk through segments of crontab specifier - for ($iSeg = 0; $iSeg < count($arSeg); $iSeg ++) { - // obtain segment key - $sSeg = $arSeg[$iSeg]; - // does specifier segment contain '*'? - if (strstr($arSpec[$iSeg], "*") != FALSE) { - // week days need special treatment - if ($sSeg == "wday") $iCmpVal = $arLast[$sSeg]; - // use same segment of time reference - else $iCmpVal = $arNow[$sSeg]; - // specifier segment contains specific criteria - } else { - // get reference value - $iCmpVal = cron::_nextLowerVal($arSpec[$iSeg], $arNow[$sSeg]); - } /* endif */ - - // this section completely changed in 0.2.5 - // obtain period factor - $iPFactor = $arPeriod[$sSeg]; - // numbers of days per month are always different ... - if ($sSeg == "mday") - @$iPFactor = $iPFactor[$arLast["mon"]]; - - // obtain period time factor - $iTFactor = $arTime[$sSeg]; - // numbers of days per month are always different ... - if ($sSeg == "mday") - @$iTFactor = $iTFactor[$arLast["mon"]]; - - // this is the decisive part of the function: - if ($arLast[$sSeg] < $iCmpVal && - $iCmpVal <= $arNow[$sSeg]) - { $bStatus = TRUE; } - - if (strstr($arSpec[$iSeg], "*") == FALSE) { - // next two lines changed in 0.2.7 - if ((($bStatus == TRUE && $arNow[$sSeg] == $arLast[$sSeg]) || - $arNow[$sSeg] < $arLast[$sSeg]) && - $arLast[$sSeg] < $iCmpVal + $iPFactor && - $iCmpVal + $iPFactor <= $arNow[$sSeg] + $iPFactor && - $iCmpVal >= 0) - { $bStatus = TRUE; } - else if ($tNow > $tLast + $iTFactor) - { $bStatus = TRUE; } - // note that this condition causes a premature return: - else if ($arLast[$sSeg] > $iCmpVal) - { return FALSE; } - else if ($iCmpVal < $arNow[$sSeg] && $iCmpVal == $arLast[$sSeg] ) - { return FALSE; } - } /* endif */ - // end of section - - } /* endfor */ - - return $bStatus; - } - - // this function determines the highest number specified in the - // crontab segment but smaller than the reference - // $sSpec: segment of crontab specifier - // $iRef: the reference number - // returns the number as described above, -1 if no number was found - function _nextLowerVal($sSpec, $iRef) - { - $arSpec1 = explode(",", $sSpec); // divide segment into details - $arInt = array(); // array of potential integers - $arSpec2 = array(); // array of details if - // specified as range - $i = 0; - $sEl = ""; - - // walk through list of details - foreach($arSpec1 as $sEl) { - // specified as range? - if(strchr($sEl, "-") != FALSE) { - // split again - $arSpec2 = explode("-", $sEl); - // add all numbers within range to list of integers - for ($i = $arSpec2[0]; $i <= $arSpec2[1]; $i ++) - array_push($arInt, $i); - } else { // not a range, add directly to list of integers - array_push($arInt, $sEl); - } /* endif */ - } /* endfor */ - - // sort reverse, highest number is now 1st element - rsort($arInt); - // walk backwards through list - foreach($arInt as $iEl) { - // if element is smaller than reference, return element - if ($iEl <= $iRef) return $iEl; - } /* endfor */ - - // no element found - return -1; - } - -} /* end of class definition */ - -?> \ No newline at end of file diff --git a/includes/cron/lgpl.txt b/includes/cron/lgpl.txt deleted file mode 100644 index b1e3f5a2..00000000 --- a/includes/cron/lgpl.txt +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/includes/files/.htaccess b/includes/files/.htaccess deleted file mode 100644 index 4bce4876..00000000 --- a/includes/files/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ - - order deny,allow - deny from all - allow from localhost - allow from 127.0.0.1 - satisfy any - diff --git a/includes/files/reports/.htaccess b/includes/files/reports/.htaccess deleted file mode 100644 index 558d8ef9..00000000 --- a/includes/files/reports/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ - - order deny,allow - allow from all - satisfy any - \ No newline at end of file diff --git a/includes/fpdf/font/courier.php b/includes/fpdf/font/courier.php deleted file mode 100755 index 913f9a45..00000000 --- a/includes/fpdf/font/courier.php +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/includes/fpdf/font/desktop.ini b/includes/fpdf/font/desktop.ini deleted file mode 100755 index 8a96fbb7..00000000 --- a/includes/fpdf/font/desktop.ini +++ /dev/null @@ -1,4 +0,0 @@ -[ViewState] -Mode= -Vid= -FolderType=NotSpecified diff --git a/includes/fpdf/font/helvetica.php b/includes/fpdf/font/helvetica.php deleted file mode 100755 index ca94cdf2..00000000 --- a/includes/fpdf/font/helvetica.php +++ /dev/null @@ -1,15 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, - 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, - chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, - chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); -?> diff --git a/includes/fpdf/font/helveticab.php b/includes/fpdf/font/helveticab.php deleted file mode 100755 index 276cfa8c..00000000 --- a/includes/fpdf/font/helveticab.php +++ /dev/null @@ -1,15 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, - 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, - 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, - chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, - chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); -?> diff --git a/includes/fpdf/font/helveticabi.php b/includes/fpdf/font/helveticabi.php deleted file mode 100755 index 8d217743..00000000 --- a/includes/fpdf/font/helveticabi.php +++ /dev/null @@ -1,15 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, - 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, - 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, - chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, - chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); -?> diff --git a/includes/fpdf/font/helveticai.php b/includes/fpdf/font/helveticai.php deleted file mode 100755 index 88bf4371..00000000 --- a/includes/fpdf/font/helveticai.php +++ /dev/null @@ -1,15 +0,0 @@ -278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, - chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, - ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, - 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, - 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, - chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, - chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, - chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); -?> diff --git a/includes/fpdf/font/makefont/cp1250.map b/includes/fpdf/font/makefont/cp1250.map deleted file mode 100755 index ec110af0..00000000 --- a/includes/fpdf/font/makefont/cp1250.map +++ /dev/null @@ -1,251 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+015A Sacute -!8D U+0164 Tcaron -!8E U+017D Zcaron -!8F U+0179 Zacute -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+015B sacute -!9D U+0165 tcaron -!9E U+017E zcaron -!9F U+017A zacute -!A0 U+00A0 space -!A1 U+02C7 caron -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+0104 Aogonek -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+015E Scedilla -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+0105 aogonek -!BA U+015F scedilla -!BB U+00BB guillemotright -!BC U+013D Lcaron -!BD U+02DD hungarumlaut -!BE U+013E lcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent diff --git a/includes/fpdf/font/makefont/cp1251.map b/includes/fpdf/font/makefont/cp1251.map deleted file mode 100755 index de6a198d..00000000 --- a/includes/fpdf/font/makefont/cp1251.map +++ /dev/null @@ -1,255 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0402 afii10051 -!81 U+0403 afii10052 -!82 U+201A quotesinglbase -!83 U+0453 afii10100 -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+20AC Euro -!89 U+2030 perthousand -!8A U+0409 afii10058 -!8B U+2039 guilsinglleft -!8C U+040A afii10059 -!8D U+040C afii10061 -!8E U+040B afii10060 -!8F U+040F afii10145 -!90 U+0452 afii10099 -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9A U+0459 afii10106 -!9B U+203A guilsinglright -!9C U+045A afii10107 -!9D U+045C afii10109 -!9E U+045B afii10108 -!9F U+045F afii10193 -!A0 U+00A0 space -!A1 U+040E afii10062 -!A2 U+045E afii10110 -!A3 U+0408 afii10057 -!A4 U+00A4 currency -!A5 U+0490 afii10050 -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+0401 afii10023 -!A9 U+00A9 copyright -!AA U+0404 afii10053 -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+0407 afii10056 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+0406 afii10055 -!B3 U+0456 afii10103 -!B4 U+0491 afii10098 -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+0451 afii10071 -!B9 U+2116 afii61352 -!BA U+0454 afii10101 -!BB U+00BB guillemotright -!BC U+0458 afii10105 -!BD U+0405 afii10054 -!BE U+0455 afii10102 -!BF U+0457 afii10104 -!C0 U+0410 afii10017 -!C1 U+0411 afii10018 -!C2 U+0412 afii10019 -!C3 U+0413 afii10020 -!C4 U+0414 afii10021 -!C5 U+0415 afii10022 -!C6 U+0416 afii10024 -!C7 U+0417 afii10025 -!C8 U+0418 afii10026 -!C9 U+0419 afii10027 -!CA U+041A afii10028 -!CB U+041B afii10029 -!CC U+041C afii10030 -!CD U+041D afii10031 -!CE U+041E afii10032 -!CF U+041F afii10033 -!D0 U+0420 afii10034 -!D1 U+0421 afii10035 -!D2 U+0422 afii10036 -!D3 U+0423 afii10037 -!D4 U+0424 afii10038 -!D5 U+0425 afii10039 -!D6 U+0426 afii10040 -!D7 U+0427 afii10041 -!D8 U+0428 afii10042 -!D9 U+0429 afii10043 -!DA U+042A afii10044 -!DB U+042B afii10045 -!DC U+042C afii10046 -!DD U+042D afii10047 -!DE U+042E afii10048 -!DF U+042F afii10049 -!E0 U+0430 afii10065 -!E1 U+0431 afii10066 -!E2 U+0432 afii10067 -!E3 U+0433 afii10068 -!E4 U+0434 afii10069 -!E5 U+0435 afii10070 -!E6 U+0436 afii10072 -!E7 U+0437 afii10073 -!E8 U+0438 afii10074 -!E9 U+0439 afii10075 -!EA U+043A afii10076 -!EB U+043B afii10077 -!EC U+043C afii10078 -!ED U+043D afii10079 -!EE U+043E afii10080 -!EF U+043F afii10081 -!F0 U+0440 afii10082 -!F1 U+0441 afii10083 -!F2 U+0442 afii10084 -!F3 U+0443 afii10085 -!F4 U+0444 afii10086 -!F5 U+0445 afii10087 -!F6 U+0446 afii10088 -!F7 U+0447 afii10089 -!F8 U+0448 afii10090 -!F9 U+0449 afii10091 -!FA U+044A afii10092 -!FB U+044B afii10093 -!FC U+044C afii10094 -!FD U+044D afii10095 -!FE U+044E afii10096 -!FF U+044F afii10097 diff --git a/includes/fpdf/font/makefont/cp1252.map b/includes/fpdf/font/makefont/cp1252.map deleted file mode 100755 index dd490e59..00000000 --- a/includes/fpdf/font/makefont/cp1252.map +++ /dev/null @@ -1,251 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!8E U+017D Zcaron -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9E U+017E zcaron -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/cp1253.map b/includes/fpdf/font/makefont/cp1253.map deleted file mode 100755 index 4bd826fb..00000000 --- a/includes/fpdf/font/makefont/cp1253.map +++ /dev/null @@ -1,239 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9B U+203A guilsinglright -!A0 U+00A0 space -!A1 U+0385 dieresistonos -!A2 U+0386 Alphatonos -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+2015 afii00208 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+0384 tonos -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+0388 Epsilontonos -!B9 U+0389 Etatonos -!BA U+038A Iotatonos -!BB U+00BB guillemotright -!BC U+038C Omicrontonos -!BD U+00BD onehalf -!BE U+038E Upsilontonos -!BF U+038F Omegatonos -!C0 U+0390 iotadieresistonos -!C1 U+0391 Alpha -!C2 U+0392 Beta -!C3 U+0393 Gamma -!C4 U+0394 Delta -!C5 U+0395 Epsilon -!C6 U+0396 Zeta -!C7 U+0397 Eta -!C8 U+0398 Theta -!C9 U+0399 Iota -!CA U+039A Kappa -!CB U+039B Lambda -!CC U+039C Mu -!CD U+039D Nu -!CE U+039E Xi -!CF U+039F Omicron -!D0 U+03A0 Pi -!D1 U+03A1 Rho -!D3 U+03A3 Sigma -!D4 U+03A4 Tau -!D5 U+03A5 Upsilon -!D6 U+03A6 Phi -!D7 U+03A7 Chi -!D8 U+03A8 Psi -!D9 U+03A9 Omega -!DA U+03AA Iotadieresis -!DB U+03AB Upsilondieresis -!DC U+03AC alphatonos -!DD U+03AD epsilontonos -!DE U+03AE etatonos -!DF U+03AF iotatonos -!E0 U+03B0 upsilondieresistonos -!E1 U+03B1 alpha -!E2 U+03B2 beta -!E3 U+03B3 gamma -!E4 U+03B4 delta -!E5 U+03B5 epsilon -!E6 U+03B6 zeta -!E7 U+03B7 eta -!E8 U+03B8 theta -!E9 U+03B9 iota -!EA U+03BA kappa -!EB U+03BB lambda -!EC U+03BC mu -!ED U+03BD nu -!EE U+03BE xi -!EF U+03BF omicron -!F0 U+03C0 pi -!F1 U+03C1 rho -!F2 U+03C2 sigma1 -!F3 U+03C3 sigma -!F4 U+03C4 tau -!F5 U+03C5 upsilon -!F6 U+03C6 phi -!F7 U+03C7 chi -!F8 U+03C8 psi -!F9 U+03C9 omega -!FA U+03CA iotadieresis -!FB U+03CB upsilondieresis -!FC U+03CC omicrontonos -!FD U+03CD upsilontonos -!FE U+03CE omegatonos diff --git a/includes/fpdf/font/makefont/cp1254.map b/includes/fpdf/font/makefont/cp1254.map deleted file mode 100755 index 829473b2..00000000 --- a/includes/fpdf/font/makefont/cp1254.map +++ /dev/null @@ -1,249 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8A U+0160 Scaron -!8B U+2039 guilsinglleft -!8C U+0152 OE -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9A U+0161 scaron -!9B U+203A guilsinglright -!9C U+0153 oe -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+011E Gbreve -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0130 Idotaccent -!DE U+015E Scedilla -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+011F gbreve -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0131 dotlessi -!FE U+015F scedilla -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/cp1255.map b/includes/fpdf/font/makefont/cp1255.map deleted file mode 100755 index 079e10c6..00000000 --- a/includes/fpdf/font/makefont/cp1255.map +++ /dev/null @@ -1,233 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9B U+203A guilsinglright -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+20AA afii57636 -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00D7 multiply -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD sfthyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 middot -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00F7 divide -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+05B0 afii57799 -!C1 U+05B1 afii57801 -!C2 U+05B2 afii57800 -!C3 U+05B3 afii57802 -!C4 U+05B4 afii57793 -!C5 U+05B5 afii57794 -!C6 U+05B6 afii57795 -!C7 U+05B7 afii57798 -!C8 U+05B8 afii57797 -!C9 U+05B9 afii57806 -!CB U+05BB afii57796 -!CC U+05BC afii57807 -!CD U+05BD afii57839 -!CE U+05BE afii57645 -!CF U+05BF afii57841 -!D0 U+05C0 afii57842 -!D1 U+05C1 afii57804 -!D2 U+05C2 afii57803 -!D3 U+05C3 afii57658 -!D4 U+05F0 afii57716 -!D5 U+05F1 afii57717 -!D6 U+05F2 afii57718 -!D7 U+05F3 gereshhebrew -!D8 U+05F4 gershayimhebrew -!E0 U+05D0 afii57664 -!E1 U+05D1 afii57665 -!E2 U+05D2 afii57666 -!E3 U+05D3 afii57667 -!E4 U+05D4 afii57668 -!E5 U+05D5 afii57669 -!E6 U+05D6 afii57670 -!E7 U+05D7 afii57671 -!E8 U+05D8 afii57672 -!E9 U+05D9 afii57673 -!EA U+05DA afii57674 -!EB U+05DB afii57675 -!EC U+05DC afii57676 -!ED U+05DD afii57677 -!EE U+05DE afii57678 -!EF U+05DF afii57679 -!F0 U+05E0 afii57680 -!F1 U+05E1 afii57681 -!F2 U+05E2 afii57682 -!F3 U+05E3 afii57683 -!F4 U+05E4 afii57684 -!F5 U+05E5 afii57685 -!F6 U+05E6 afii57686 -!F7 U+05E7 afii57687 -!F8 U+05E8 afii57688 -!F9 U+05E9 afii57689 -!FA U+05EA afii57690 -!FD U+200E afii299 -!FE U+200F afii300 diff --git a/includes/fpdf/font/makefont/cp1257.map b/includes/fpdf/font/makefont/cp1257.map deleted file mode 100755 index 2f2ecfa2..00000000 --- a/includes/fpdf/font/makefont/cp1257.map +++ /dev/null @@ -1,244 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!8D U+00A8 dieresis -!8E U+02C7 caron -!8F U+00B8 cedilla -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!99 U+2122 trademark -!9B U+203A guilsinglright -!9D U+00AF macron -!9E U+02DB ogonek -!A0 U+00A0 space -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00D8 Oslash -!A9 U+00A9 copyright -!AA U+0156 Rcommaaccent -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00C6 AE -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00F8 oslash -!B9 U+00B9 onesuperior -!BA U+0157 rcommaaccent -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00E6 ae -!C0 U+0104 Aogonek -!C1 U+012E Iogonek -!C2 U+0100 Amacron -!C3 U+0106 Cacute -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+0118 Eogonek -!C7 U+0112 Emacron -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0179 Zacute -!CB U+0116 Edotaccent -!CC U+0122 Gcommaaccent -!CD U+0136 Kcommaaccent -!CE U+012A Imacron -!CF U+013B Lcommaaccent -!D0 U+0160 Scaron -!D1 U+0143 Nacute -!D2 U+0145 Ncommaaccent -!D3 U+00D3 Oacute -!D4 U+014C Omacron -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0172 Uogonek -!D9 U+0141 Lslash -!DA U+015A Sacute -!DB U+016A Umacron -!DC U+00DC Udieresis -!DD U+017B Zdotaccent -!DE U+017D Zcaron -!DF U+00DF germandbls -!E0 U+0105 aogonek -!E1 U+012F iogonek -!E2 U+0101 amacron -!E3 U+0107 cacute -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+0119 eogonek -!E7 U+0113 emacron -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+017A zacute -!EB U+0117 edotaccent -!EC U+0123 gcommaaccent -!ED U+0137 kcommaaccent -!EE U+012B imacron -!EF U+013C lcommaaccent -!F0 U+0161 scaron -!F1 U+0144 nacute -!F2 U+0146 ncommaaccent -!F3 U+00F3 oacute -!F4 U+014D omacron -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0173 uogonek -!F9 U+0142 lslash -!FA U+015B sacute -!FB U+016B umacron -!FC U+00FC udieresis -!FD U+017C zdotaccent -!FE U+017E zcaron -!FF U+02D9 dotaccent diff --git a/includes/fpdf/font/makefont/cp1258.map b/includes/fpdf/font/makefont/cp1258.map deleted file mode 100755 index fed915f7..00000000 --- a/includes/fpdf/font/makefont/cp1258.map +++ /dev/null @@ -1,247 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!82 U+201A quotesinglbase -!83 U+0192 florin -!84 U+201E quotedblbase -!85 U+2026 ellipsis -!86 U+2020 dagger -!87 U+2021 daggerdbl -!88 U+02C6 circumflex -!89 U+2030 perthousand -!8B U+2039 guilsinglleft -!8C U+0152 OE -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!98 U+02DC tilde -!99 U+2122 trademark -!9B U+203A guilsinglright -!9C U+0153 oe -!9F U+0178 Ydieresis -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+0300 gravecomb -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+0110 Dcroat -!D1 U+00D1 Ntilde -!D2 U+0309 hookabovecomb -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+01A0 Ohorn -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+01AF Uhorn -!DE U+0303 tildecomb -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+0301 acutecomb -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+0111 dcroat -!F1 U+00F1 ntilde -!F2 U+0323 dotbelowcomb -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+01A1 ohorn -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+01B0 uhorn -!FE U+20AB dong -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/cp874.map b/includes/fpdf/font/makefont/cp874.map deleted file mode 100755 index 1006e6b1..00000000 --- a/includes/fpdf/font/makefont/cp874.map +++ /dev/null @@ -1,225 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+20AC Euro -!85 U+2026 ellipsis -!91 U+2018 quoteleft -!92 U+2019 quoteright -!93 U+201C quotedblleft -!94 U+201D quotedblright -!95 U+2022 bullet -!96 U+2013 endash -!97 U+2014 emdash -!A0 U+00A0 space -!A1 U+0E01 kokaithai -!A2 U+0E02 khokhaithai -!A3 U+0E03 khokhuatthai -!A4 U+0E04 khokhwaithai -!A5 U+0E05 khokhonthai -!A6 U+0E06 khorakhangthai -!A7 U+0E07 ngonguthai -!A8 U+0E08 chochanthai -!A9 U+0E09 chochingthai -!AA U+0E0A chochangthai -!AB U+0E0B sosothai -!AC U+0E0C chochoethai -!AD U+0E0D yoyingthai -!AE U+0E0E dochadathai -!AF U+0E0F topatakthai -!B0 U+0E10 thothanthai -!B1 U+0E11 thonangmonthothai -!B2 U+0E12 thophuthaothai -!B3 U+0E13 nonenthai -!B4 U+0E14 dodekthai -!B5 U+0E15 totaothai -!B6 U+0E16 thothungthai -!B7 U+0E17 thothahanthai -!B8 U+0E18 thothongthai -!B9 U+0E19 nonuthai -!BA U+0E1A bobaimaithai -!BB U+0E1B poplathai -!BC U+0E1C phophungthai -!BD U+0E1D fofathai -!BE U+0E1E phophanthai -!BF U+0E1F fofanthai -!C0 U+0E20 phosamphaothai -!C1 U+0E21 momathai -!C2 U+0E22 yoyakthai -!C3 U+0E23 roruathai -!C4 U+0E24 ruthai -!C5 U+0E25 lolingthai -!C6 U+0E26 luthai -!C7 U+0E27 wowaenthai -!C8 U+0E28 sosalathai -!C9 U+0E29 sorusithai -!CA U+0E2A sosuathai -!CB U+0E2B hohipthai -!CC U+0E2C lochulathai -!CD U+0E2D oangthai -!CE U+0E2E honokhukthai -!CF U+0E2F paiyannoithai -!D0 U+0E30 saraathai -!D1 U+0E31 maihanakatthai -!D2 U+0E32 saraaathai -!D3 U+0E33 saraamthai -!D4 U+0E34 saraithai -!D5 U+0E35 saraiithai -!D6 U+0E36 sarauethai -!D7 U+0E37 saraueethai -!D8 U+0E38 sarauthai -!D9 U+0E39 sarauuthai -!DA U+0E3A phinthuthai -!DF U+0E3F bahtthai -!E0 U+0E40 saraethai -!E1 U+0E41 saraaethai -!E2 U+0E42 saraothai -!E3 U+0E43 saraaimaimuanthai -!E4 U+0E44 saraaimaimalaithai -!E5 U+0E45 lakkhangyaothai -!E6 U+0E46 maiyamokthai -!E7 U+0E47 maitaikhuthai -!E8 U+0E48 maiekthai -!E9 U+0E49 maithothai -!EA U+0E4A maitrithai -!EB U+0E4B maichattawathai -!EC U+0E4C thanthakhatthai -!ED U+0E4D nikhahitthai -!EE U+0E4E yamakkanthai -!EF U+0E4F fongmanthai -!F0 U+0E50 zerothai -!F1 U+0E51 onethai -!F2 U+0E52 twothai -!F3 U+0E53 threethai -!F4 U+0E54 fourthai -!F5 U+0E55 fivethai -!F6 U+0E56 sixthai -!F7 U+0E57 seventhai -!F8 U+0E58 eightthai -!F9 U+0E59 ninethai -!FA U+0E5A angkhankhuthai -!FB U+0E5B khomutthai diff --git a/includes/fpdf/font/makefont/iso-8859-1.map b/includes/fpdf/font/makefont/iso-8859-1.map deleted file mode 100755 index 61740a38..00000000 --- a/includes/fpdf/font/makefont/iso-8859-1.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/iso-8859-11.map b/includes/fpdf/font/makefont/iso-8859-11.map deleted file mode 100755 index 91688120..00000000 --- a/includes/fpdf/font/makefont/iso-8859-11.map +++ /dev/null @@ -1,248 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0E01 kokaithai -!A2 U+0E02 khokhaithai -!A3 U+0E03 khokhuatthai -!A4 U+0E04 khokhwaithai -!A5 U+0E05 khokhonthai -!A6 U+0E06 khorakhangthai -!A7 U+0E07 ngonguthai -!A8 U+0E08 chochanthai -!A9 U+0E09 chochingthai -!AA U+0E0A chochangthai -!AB U+0E0B sosothai -!AC U+0E0C chochoethai -!AD U+0E0D yoyingthai -!AE U+0E0E dochadathai -!AF U+0E0F topatakthai -!B0 U+0E10 thothanthai -!B1 U+0E11 thonangmonthothai -!B2 U+0E12 thophuthaothai -!B3 U+0E13 nonenthai -!B4 U+0E14 dodekthai -!B5 U+0E15 totaothai -!B6 U+0E16 thothungthai -!B7 U+0E17 thothahanthai -!B8 U+0E18 thothongthai -!B9 U+0E19 nonuthai -!BA U+0E1A bobaimaithai -!BB U+0E1B poplathai -!BC U+0E1C phophungthai -!BD U+0E1D fofathai -!BE U+0E1E phophanthai -!BF U+0E1F fofanthai -!C0 U+0E20 phosamphaothai -!C1 U+0E21 momathai -!C2 U+0E22 yoyakthai -!C3 U+0E23 roruathai -!C4 U+0E24 ruthai -!C5 U+0E25 lolingthai -!C6 U+0E26 luthai -!C7 U+0E27 wowaenthai -!C8 U+0E28 sosalathai -!C9 U+0E29 sorusithai -!CA U+0E2A sosuathai -!CB U+0E2B hohipthai -!CC U+0E2C lochulathai -!CD U+0E2D oangthai -!CE U+0E2E honokhukthai -!CF U+0E2F paiyannoithai -!D0 U+0E30 saraathai -!D1 U+0E31 maihanakatthai -!D2 U+0E32 saraaathai -!D3 U+0E33 saraamthai -!D4 U+0E34 saraithai -!D5 U+0E35 saraiithai -!D6 U+0E36 sarauethai -!D7 U+0E37 saraueethai -!D8 U+0E38 sarauthai -!D9 U+0E39 sarauuthai -!DA U+0E3A phinthuthai -!DF U+0E3F bahtthai -!E0 U+0E40 saraethai -!E1 U+0E41 saraaethai -!E2 U+0E42 saraothai -!E3 U+0E43 saraaimaimuanthai -!E4 U+0E44 saraaimaimalaithai -!E5 U+0E45 lakkhangyaothai -!E6 U+0E46 maiyamokthai -!E7 U+0E47 maitaikhuthai -!E8 U+0E48 maiekthai -!E9 U+0E49 maithothai -!EA U+0E4A maitrithai -!EB U+0E4B maichattawathai -!EC U+0E4C thanthakhatthai -!ED U+0E4D nikhahitthai -!EE U+0E4E yamakkanthai -!EF U+0E4F fongmanthai -!F0 U+0E50 zerothai -!F1 U+0E51 onethai -!F2 U+0E52 twothai -!F3 U+0E53 threethai -!F4 U+0E54 fourthai -!F5 U+0E55 fivethai -!F6 U+0E56 sixthai -!F7 U+0E57 seventhai -!F8 U+0E58 eightthai -!F9 U+0E59 ninethai -!FA U+0E5A angkhankhuthai -!FB U+0E5B khomutthai diff --git a/includes/fpdf/font/makefont/iso-8859-15.map b/includes/fpdf/font/makefont/iso-8859-15.map deleted file mode 100755 index 6c2b5712..00000000 --- a/includes/fpdf/font/makefont/iso-8859-15.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+20AC Euro -!A5 U+00A5 yen -!A6 U+0160 Scaron -!A7 U+00A7 section -!A8 U+0161 scaron -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+017D Zcaron -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+017E zcaron -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+0152 OE -!BD U+0153 oe -!BE U+0178 Ydieresis -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+00D0 Eth -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+00DE Thorn -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+00F0 eth -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+00FE thorn -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/iso-8859-16.map b/includes/fpdf/font/makefont/iso-8859-16.map deleted file mode 100755 index 202c8fe5..00000000 --- a/includes/fpdf/font/makefont/iso-8859-16.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+0105 aogonek -!A3 U+0141 Lslash -!A4 U+20AC Euro -!A5 U+201E quotedblbase -!A6 U+0160 Scaron -!A7 U+00A7 section -!A8 U+0161 scaron -!A9 U+00A9 copyright -!AA U+0218 Scommaaccent -!AB U+00AB guillemotleft -!AC U+0179 Zacute -!AD U+00AD hyphen -!AE U+017A zacute -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+010C Ccaron -!B3 U+0142 lslash -!B4 U+017D Zcaron -!B5 U+201D quotedblright -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+017E zcaron -!B9 U+010D ccaron -!BA U+0219 scommaaccent -!BB U+00BB guillemotright -!BC U+0152 OE -!BD U+0153 oe -!BE U+0178 Ydieresis -!BF U+017C zdotaccent -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0106 Cacute -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+015A Sacute -!D8 U+0170 Uhungarumlaut -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0118 Eogonek -!DE U+021A Tcommaaccent -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+0107 cacute -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+015B sacute -!F8 U+0171 uhungarumlaut -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0119 eogonek -!FE U+021B tcommaaccent -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/iso-8859-2.map b/includes/fpdf/font/makefont/iso-8859-2.map deleted file mode 100755 index 65ae09f9..00000000 --- a/includes/fpdf/font/makefont/iso-8859-2.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+02D8 breve -!A3 U+0141 Lslash -!A4 U+00A4 currency -!A5 U+013D Lcaron -!A6 U+015A Sacute -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+015E Scedilla -!AB U+0164 Tcaron -!AC U+0179 Zacute -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+017B Zdotaccent -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0142 lslash -!B4 U+00B4 acute -!B5 U+013E lcaron -!B6 U+015B sacute -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+015F scedilla -!BB U+0165 tcaron -!BC U+017A zacute -!BD U+02DD hungarumlaut -!BE U+017E zcaron -!BF U+017C zdotaccent -!C0 U+0154 Racute -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+0102 Abreve -!C4 U+00C4 Adieresis -!C5 U+0139 Lacute -!C6 U+0106 Cacute -!C7 U+00C7 Ccedilla -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+011A Ecaron -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+010E Dcaron -!D0 U+0110 Dcroat -!D1 U+0143 Nacute -!D2 U+0147 Ncaron -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+0150 Ohungarumlaut -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+0158 Rcaron -!D9 U+016E Uring -!DA U+00DA Uacute -!DB U+0170 Uhungarumlaut -!DC U+00DC Udieresis -!DD U+00DD Yacute -!DE U+0162 Tcommaaccent -!DF U+00DF germandbls -!E0 U+0155 racute -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+0103 abreve -!E4 U+00E4 adieresis -!E5 U+013A lacute -!E6 U+0107 cacute -!E7 U+00E7 ccedilla -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+011B ecaron -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+010F dcaron -!F0 U+0111 dcroat -!F1 U+0144 nacute -!F2 U+0148 ncaron -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+0151 ohungarumlaut -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+0159 rcaron -!F9 U+016F uring -!FA U+00FA uacute -!FB U+0171 uhungarumlaut -!FC U+00FC udieresis -!FD U+00FD yacute -!FE U+0163 tcommaaccent -!FF U+02D9 dotaccent diff --git a/includes/fpdf/font/makefont/iso-8859-4.map b/includes/fpdf/font/makefont/iso-8859-4.map deleted file mode 100755 index a7d87bf3..00000000 --- a/includes/fpdf/font/makefont/iso-8859-4.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0104 Aogonek -!A2 U+0138 kgreenlandic -!A3 U+0156 Rcommaaccent -!A4 U+00A4 currency -!A5 U+0128 Itilde -!A6 U+013B Lcommaaccent -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+0160 Scaron -!AA U+0112 Emacron -!AB U+0122 Gcommaaccent -!AC U+0166 Tbar -!AD U+00AD hyphen -!AE U+017D Zcaron -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+0105 aogonek -!B2 U+02DB ogonek -!B3 U+0157 rcommaaccent -!B4 U+00B4 acute -!B5 U+0129 itilde -!B6 U+013C lcommaaccent -!B7 U+02C7 caron -!B8 U+00B8 cedilla -!B9 U+0161 scaron -!BA U+0113 emacron -!BB U+0123 gcommaaccent -!BC U+0167 tbar -!BD U+014A Eng -!BE U+017E zcaron -!BF U+014B eng -!C0 U+0100 Amacron -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+012E Iogonek -!C8 U+010C Ccaron -!C9 U+00C9 Eacute -!CA U+0118 Eogonek -!CB U+00CB Edieresis -!CC U+0116 Edotaccent -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+012A Imacron -!D0 U+0110 Dcroat -!D1 U+0145 Ncommaaccent -!D2 U+014C Omacron -!D3 U+0136 Kcommaaccent -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+0172 Uogonek -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0168 Utilde -!DE U+016A Umacron -!DF U+00DF germandbls -!E0 U+0101 amacron -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+012F iogonek -!E8 U+010D ccaron -!E9 U+00E9 eacute -!EA U+0119 eogonek -!EB U+00EB edieresis -!EC U+0117 edotaccent -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+012B imacron -!F0 U+0111 dcroat -!F1 U+0146 ncommaaccent -!F2 U+014D omacron -!F3 U+0137 kcommaaccent -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+0173 uogonek -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0169 utilde -!FE U+016B umacron -!FF U+02D9 dotaccent diff --git a/includes/fpdf/font/makefont/iso-8859-5.map b/includes/fpdf/font/makefont/iso-8859-5.map deleted file mode 100755 index f9cd4edc..00000000 --- a/includes/fpdf/font/makefont/iso-8859-5.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+0401 afii10023 -!A2 U+0402 afii10051 -!A3 U+0403 afii10052 -!A4 U+0404 afii10053 -!A5 U+0405 afii10054 -!A6 U+0406 afii10055 -!A7 U+0407 afii10056 -!A8 U+0408 afii10057 -!A9 U+0409 afii10058 -!AA U+040A afii10059 -!AB U+040B afii10060 -!AC U+040C afii10061 -!AD U+00AD hyphen -!AE U+040E afii10062 -!AF U+040F afii10145 -!B0 U+0410 afii10017 -!B1 U+0411 afii10018 -!B2 U+0412 afii10019 -!B3 U+0413 afii10020 -!B4 U+0414 afii10021 -!B5 U+0415 afii10022 -!B6 U+0416 afii10024 -!B7 U+0417 afii10025 -!B8 U+0418 afii10026 -!B9 U+0419 afii10027 -!BA U+041A afii10028 -!BB U+041B afii10029 -!BC U+041C afii10030 -!BD U+041D afii10031 -!BE U+041E afii10032 -!BF U+041F afii10033 -!C0 U+0420 afii10034 -!C1 U+0421 afii10035 -!C2 U+0422 afii10036 -!C3 U+0423 afii10037 -!C4 U+0424 afii10038 -!C5 U+0425 afii10039 -!C6 U+0426 afii10040 -!C7 U+0427 afii10041 -!C8 U+0428 afii10042 -!C9 U+0429 afii10043 -!CA U+042A afii10044 -!CB U+042B afii10045 -!CC U+042C afii10046 -!CD U+042D afii10047 -!CE U+042E afii10048 -!CF U+042F afii10049 -!D0 U+0430 afii10065 -!D1 U+0431 afii10066 -!D2 U+0432 afii10067 -!D3 U+0433 afii10068 -!D4 U+0434 afii10069 -!D5 U+0435 afii10070 -!D6 U+0436 afii10072 -!D7 U+0437 afii10073 -!D8 U+0438 afii10074 -!D9 U+0439 afii10075 -!DA U+043A afii10076 -!DB U+043B afii10077 -!DC U+043C afii10078 -!DD U+043D afii10079 -!DE U+043E afii10080 -!DF U+043F afii10081 -!E0 U+0440 afii10082 -!E1 U+0441 afii10083 -!E2 U+0442 afii10084 -!E3 U+0443 afii10085 -!E4 U+0444 afii10086 -!E5 U+0445 afii10087 -!E6 U+0446 afii10088 -!E7 U+0447 afii10089 -!E8 U+0448 afii10090 -!E9 U+0449 afii10091 -!EA U+044A afii10092 -!EB U+044B afii10093 -!EC U+044C afii10094 -!ED U+044D afii10095 -!EE U+044E afii10096 -!EF U+044F afii10097 -!F0 U+2116 afii61352 -!F1 U+0451 afii10071 -!F2 U+0452 afii10099 -!F3 U+0453 afii10100 -!F4 U+0454 afii10101 -!F5 U+0455 afii10102 -!F6 U+0456 afii10103 -!F7 U+0457 afii10104 -!F8 U+0458 afii10105 -!F9 U+0459 afii10106 -!FA U+045A afii10107 -!FB U+045B afii10108 -!FC U+045C afii10109 -!FD U+00A7 section -!FE U+045E afii10110 -!FF U+045F afii10193 diff --git a/includes/fpdf/font/makefont/iso-8859-7.map b/includes/fpdf/font/makefont/iso-8859-7.map deleted file mode 100755 index e163796b..00000000 --- a/includes/fpdf/font/makefont/iso-8859-7.map +++ /dev/null @@ -1,250 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+2018 quoteleft -!A2 U+2019 quoteright -!A3 U+00A3 sterling -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AF U+2015 afii00208 -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+0384 tonos -!B5 U+0385 dieresistonos -!B6 U+0386 Alphatonos -!B7 U+00B7 periodcentered -!B8 U+0388 Epsilontonos -!B9 U+0389 Etatonos -!BA U+038A Iotatonos -!BB U+00BB guillemotright -!BC U+038C Omicrontonos -!BD U+00BD onehalf -!BE U+038E Upsilontonos -!BF U+038F Omegatonos -!C0 U+0390 iotadieresistonos -!C1 U+0391 Alpha -!C2 U+0392 Beta -!C3 U+0393 Gamma -!C4 U+0394 Delta -!C5 U+0395 Epsilon -!C6 U+0396 Zeta -!C7 U+0397 Eta -!C8 U+0398 Theta -!C9 U+0399 Iota -!CA U+039A Kappa -!CB U+039B Lambda -!CC U+039C Mu -!CD U+039D Nu -!CE U+039E Xi -!CF U+039F Omicron -!D0 U+03A0 Pi -!D1 U+03A1 Rho -!D3 U+03A3 Sigma -!D4 U+03A4 Tau -!D5 U+03A5 Upsilon -!D6 U+03A6 Phi -!D7 U+03A7 Chi -!D8 U+03A8 Psi -!D9 U+03A9 Omega -!DA U+03AA Iotadieresis -!DB U+03AB Upsilondieresis -!DC U+03AC alphatonos -!DD U+03AD epsilontonos -!DE U+03AE etatonos -!DF U+03AF iotatonos -!E0 U+03B0 upsilondieresistonos -!E1 U+03B1 alpha -!E2 U+03B2 beta -!E3 U+03B3 gamma -!E4 U+03B4 delta -!E5 U+03B5 epsilon -!E6 U+03B6 zeta -!E7 U+03B7 eta -!E8 U+03B8 theta -!E9 U+03B9 iota -!EA U+03BA kappa -!EB U+03BB lambda -!EC U+03BC mu -!ED U+03BD nu -!EE U+03BE xi -!EF U+03BF omicron -!F0 U+03C0 pi -!F1 U+03C1 rho -!F2 U+03C2 sigma1 -!F3 U+03C3 sigma -!F4 U+03C4 tau -!F5 U+03C5 upsilon -!F6 U+03C6 phi -!F7 U+03C7 chi -!F8 U+03C8 psi -!F9 U+03C9 omega -!FA U+03CA iotadieresis -!FB U+03CB upsilondieresis -!FC U+03CC omicrontonos -!FD U+03CD upsilontonos -!FE U+03CE omegatonos diff --git a/includes/fpdf/font/makefont/iso-8859-9.map b/includes/fpdf/font/makefont/iso-8859-9.map deleted file mode 100755 index 48c123ae..00000000 --- a/includes/fpdf/font/makefont/iso-8859-9.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+0080 .notdef -!81 U+0081 .notdef -!82 U+0082 .notdef -!83 U+0083 .notdef -!84 U+0084 .notdef -!85 U+0085 .notdef -!86 U+0086 .notdef -!87 U+0087 .notdef -!88 U+0088 .notdef -!89 U+0089 .notdef -!8A U+008A .notdef -!8B U+008B .notdef -!8C U+008C .notdef -!8D U+008D .notdef -!8E U+008E .notdef -!8F U+008F .notdef -!90 U+0090 .notdef -!91 U+0091 .notdef -!92 U+0092 .notdef -!93 U+0093 .notdef -!94 U+0094 .notdef -!95 U+0095 .notdef -!96 U+0096 .notdef -!97 U+0097 .notdef -!98 U+0098 .notdef -!99 U+0099 .notdef -!9A U+009A .notdef -!9B U+009B .notdef -!9C U+009C .notdef -!9D U+009D .notdef -!9E U+009E .notdef -!9F U+009F .notdef -!A0 U+00A0 space -!A1 U+00A1 exclamdown -!A2 U+00A2 cent -!A3 U+00A3 sterling -!A4 U+00A4 currency -!A5 U+00A5 yen -!A6 U+00A6 brokenbar -!A7 U+00A7 section -!A8 U+00A8 dieresis -!A9 U+00A9 copyright -!AA U+00AA ordfeminine -!AB U+00AB guillemotleft -!AC U+00AC logicalnot -!AD U+00AD hyphen -!AE U+00AE registered -!AF U+00AF macron -!B0 U+00B0 degree -!B1 U+00B1 plusminus -!B2 U+00B2 twosuperior -!B3 U+00B3 threesuperior -!B4 U+00B4 acute -!B5 U+00B5 mu -!B6 U+00B6 paragraph -!B7 U+00B7 periodcentered -!B8 U+00B8 cedilla -!B9 U+00B9 onesuperior -!BA U+00BA ordmasculine -!BB U+00BB guillemotright -!BC U+00BC onequarter -!BD U+00BD onehalf -!BE U+00BE threequarters -!BF U+00BF questiondown -!C0 U+00C0 Agrave -!C1 U+00C1 Aacute -!C2 U+00C2 Acircumflex -!C3 U+00C3 Atilde -!C4 U+00C4 Adieresis -!C5 U+00C5 Aring -!C6 U+00C6 AE -!C7 U+00C7 Ccedilla -!C8 U+00C8 Egrave -!C9 U+00C9 Eacute -!CA U+00CA Ecircumflex -!CB U+00CB Edieresis -!CC U+00CC Igrave -!CD U+00CD Iacute -!CE U+00CE Icircumflex -!CF U+00CF Idieresis -!D0 U+011E Gbreve -!D1 U+00D1 Ntilde -!D2 U+00D2 Ograve -!D3 U+00D3 Oacute -!D4 U+00D4 Ocircumflex -!D5 U+00D5 Otilde -!D6 U+00D6 Odieresis -!D7 U+00D7 multiply -!D8 U+00D8 Oslash -!D9 U+00D9 Ugrave -!DA U+00DA Uacute -!DB U+00DB Ucircumflex -!DC U+00DC Udieresis -!DD U+0130 Idotaccent -!DE U+015E Scedilla -!DF U+00DF germandbls -!E0 U+00E0 agrave -!E1 U+00E1 aacute -!E2 U+00E2 acircumflex -!E3 U+00E3 atilde -!E4 U+00E4 adieresis -!E5 U+00E5 aring -!E6 U+00E6 ae -!E7 U+00E7 ccedilla -!E8 U+00E8 egrave -!E9 U+00E9 eacute -!EA U+00EA ecircumflex -!EB U+00EB edieresis -!EC U+00EC igrave -!ED U+00ED iacute -!EE U+00EE icircumflex -!EF U+00EF idieresis -!F0 U+011F gbreve -!F1 U+00F1 ntilde -!F2 U+00F2 ograve -!F3 U+00F3 oacute -!F4 U+00F4 ocircumflex -!F5 U+00F5 otilde -!F6 U+00F6 odieresis -!F7 U+00F7 divide -!F8 U+00F8 oslash -!F9 U+00F9 ugrave -!FA U+00FA uacute -!FB U+00FB ucircumflex -!FC U+00FC udieresis -!FD U+0131 dotlessi -!FE U+015F scedilla -!FF U+00FF ydieresis diff --git a/includes/fpdf/font/makefont/koi8-r.map b/includes/fpdf/font/makefont/koi8-r.map deleted file mode 100755 index 6ad5d05d..00000000 --- a/includes/fpdf/font/makefont/koi8-r.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+2500 SF100000 -!81 U+2502 SF110000 -!82 U+250C SF010000 -!83 U+2510 SF030000 -!84 U+2514 SF020000 -!85 U+2518 SF040000 -!86 U+251C SF080000 -!87 U+2524 SF090000 -!88 U+252C SF060000 -!89 U+2534 SF070000 -!8A U+253C SF050000 -!8B U+2580 upblock -!8C U+2584 dnblock -!8D U+2588 block -!8E U+258C lfblock -!8F U+2590 rtblock -!90 U+2591 ltshade -!91 U+2592 shade -!92 U+2593 dkshade -!93 U+2320 integraltp -!94 U+25A0 filledbox -!95 U+2219 periodcentered -!96 U+221A radical -!97 U+2248 approxequal -!98 U+2264 lessequal -!99 U+2265 greaterequal -!9A U+00A0 space -!9B U+2321 integralbt -!9C U+00B0 degree -!9D U+00B2 twosuperior -!9E U+00B7 periodcentered -!9F U+00F7 divide -!A0 U+2550 SF430000 -!A1 U+2551 SF240000 -!A2 U+2552 SF510000 -!A3 U+0451 afii10071 -!A4 U+2553 SF520000 -!A5 U+2554 SF390000 -!A6 U+2555 SF220000 -!A7 U+2556 SF210000 -!A8 U+2557 SF250000 -!A9 U+2558 SF500000 -!AA U+2559 SF490000 -!AB U+255A SF380000 -!AC U+255B SF280000 -!AD U+255C SF270000 -!AE U+255D SF260000 -!AF U+255E SF360000 -!B0 U+255F SF370000 -!B1 U+2560 SF420000 -!B2 U+2561 SF190000 -!B3 U+0401 afii10023 -!B4 U+2562 SF200000 -!B5 U+2563 SF230000 -!B6 U+2564 SF470000 -!B7 U+2565 SF480000 -!B8 U+2566 SF410000 -!B9 U+2567 SF450000 -!BA U+2568 SF460000 -!BB U+2569 SF400000 -!BC U+256A SF540000 -!BD U+256B SF530000 -!BE U+256C SF440000 -!BF U+00A9 copyright -!C0 U+044E afii10096 -!C1 U+0430 afii10065 -!C2 U+0431 afii10066 -!C3 U+0446 afii10088 -!C4 U+0434 afii10069 -!C5 U+0435 afii10070 -!C6 U+0444 afii10086 -!C7 U+0433 afii10068 -!C8 U+0445 afii10087 -!C9 U+0438 afii10074 -!CA U+0439 afii10075 -!CB U+043A afii10076 -!CC U+043B afii10077 -!CD U+043C afii10078 -!CE U+043D afii10079 -!CF U+043E afii10080 -!D0 U+043F afii10081 -!D1 U+044F afii10097 -!D2 U+0440 afii10082 -!D3 U+0441 afii10083 -!D4 U+0442 afii10084 -!D5 U+0443 afii10085 -!D6 U+0436 afii10072 -!D7 U+0432 afii10067 -!D8 U+044C afii10094 -!D9 U+044B afii10093 -!DA U+0437 afii10073 -!DB U+0448 afii10090 -!DC U+044D afii10095 -!DD U+0449 afii10091 -!DE U+0447 afii10089 -!DF U+044A afii10092 -!E0 U+042E afii10048 -!E1 U+0410 afii10017 -!E2 U+0411 afii10018 -!E3 U+0426 afii10040 -!E4 U+0414 afii10021 -!E5 U+0415 afii10022 -!E6 U+0424 afii10038 -!E7 U+0413 afii10020 -!E8 U+0425 afii10039 -!E9 U+0418 afii10026 -!EA U+0419 afii10027 -!EB U+041A afii10028 -!EC U+041B afii10029 -!ED U+041C afii10030 -!EE U+041D afii10031 -!EF U+041E afii10032 -!F0 U+041F afii10033 -!F1 U+042F afii10049 -!F2 U+0420 afii10034 -!F3 U+0421 afii10035 -!F4 U+0422 afii10036 -!F5 U+0423 afii10037 -!F6 U+0416 afii10024 -!F7 U+0412 afii10019 -!F8 U+042C afii10046 -!F9 U+042B afii10045 -!FA U+0417 afii10025 -!FB U+0428 afii10042 -!FC U+042D afii10047 -!FD U+0429 afii10043 -!FE U+0427 afii10041 -!FF U+042A afii10044 diff --git a/includes/fpdf/font/makefont/koi8-u.map b/includes/fpdf/font/makefont/koi8-u.map deleted file mode 100755 index 40a7e4fd..00000000 --- a/includes/fpdf/font/makefont/koi8-u.map +++ /dev/null @@ -1,256 +0,0 @@ -!00 U+0000 .notdef -!01 U+0001 .notdef -!02 U+0002 .notdef -!03 U+0003 .notdef -!04 U+0004 .notdef -!05 U+0005 .notdef -!06 U+0006 .notdef -!07 U+0007 .notdef -!08 U+0008 .notdef -!09 U+0009 .notdef -!0A U+000A .notdef -!0B U+000B .notdef -!0C U+000C .notdef -!0D U+000D .notdef -!0E U+000E .notdef -!0F U+000F .notdef -!10 U+0010 .notdef -!11 U+0011 .notdef -!12 U+0012 .notdef -!13 U+0013 .notdef -!14 U+0014 .notdef -!15 U+0015 .notdef -!16 U+0016 .notdef -!17 U+0017 .notdef -!18 U+0018 .notdef -!19 U+0019 .notdef -!1A U+001A .notdef -!1B U+001B .notdef -!1C U+001C .notdef -!1D U+001D .notdef -!1E U+001E .notdef -!1F U+001F .notdef -!20 U+0020 space -!21 U+0021 exclam -!22 U+0022 quotedbl -!23 U+0023 numbersign -!24 U+0024 dollar -!25 U+0025 percent -!26 U+0026 ampersand -!27 U+0027 quotesingle -!28 U+0028 parenleft -!29 U+0029 parenright -!2A U+002A asterisk -!2B U+002B plus -!2C U+002C comma -!2D U+002D hyphen -!2E U+002E period -!2F U+002F slash -!30 U+0030 zero -!31 U+0031 one -!32 U+0032 two -!33 U+0033 three -!34 U+0034 four -!35 U+0035 five -!36 U+0036 six -!37 U+0037 seven -!38 U+0038 eight -!39 U+0039 nine -!3A U+003A colon -!3B U+003B semicolon -!3C U+003C less -!3D U+003D equal -!3E U+003E greater -!3F U+003F question -!40 U+0040 at -!41 U+0041 A -!42 U+0042 B -!43 U+0043 C -!44 U+0044 D -!45 U+0045 E -!46 U+0046 F -!47 U+0047 G -!48 U+0048 H -!49 U+0049 I -!4A U+004A J -!4B U+004B K -!4C U+004C L -!4D U+004D M -!4E U+004E N -!4F U+004F O -!50 U+0050 P -!51 U+0051 Q -!52 U+0052 R -!53 U+0053 S -!54 U+0054 T -!55 U+0055 U -!56 U+0056 V -!57 U+0057 W -!58 U+0058 X -!59 U+0059 Y -!5A U+005A Z -!5B U+005B bracketleft -!5C U+005C backslash -!5D U+005D bracketright -!5E U+005E asciicircum -!5F U+005F underscore -!60 U+0060 grave -!61 U+0061 a -!62 U+0062 b -!63 U+0063 c -!64 U+0064 d -!65 U+0065 e -!66 U+0066 f -!67 U+0067 g -!68 U+0068 h -!69 U+0069 i -!6A U+006A j -!6B U+006B k -!6C U+006C l -!6D U+006D m -!6E U+006E n -!6F U+006F o -!70 U+0070 p -!71 U+0071 q -!72 U+0072 r -!73 U+0073 s -!74 U+0074 t -!75 U+0075 u -!76 U+0076 v -!77 U+0077 w -!78 U+0078 x -!79 U+0079 y -!7A U+007A z -!7B U+007B braceleft -!7C U+007C bar -!7D U+007D braceright -!7E U+007E asciitilde -!7F U+007F .notdef -!80 U+2500 SF100000 -!81 U+2502 SF110000 -!82 U+250C SF010000 -!83 U+2510 SF030000 -!84 U+2514 SF020000 -!85 U+2518 SF040000 -!86 U+251C SF080000 -!87 U+2524 SF090000 -!88 U+252C SF060000 -!89 U+2534 SF070000 -!8A U+253C SF050000 -!8B U+2580 upblock -!8C U+2584 dnblock -!8D U+2588 block -!8E U+258C lfblock -!8F U+2590 rtblock -!90 U+2591 ltshade -!91 U+2592 shade -!92 U+2593 dkshade -!93 U+2320 integraltp -!94 U+25A0 filledbox -!95 U+2022 bullet -!96 U+221A radical -!97 U+2248 approxequal -!98 U+2264 lessequal -!99 U+2265 greaterequal -!9A U+00A0 space -!9B U+2321 integralbt -!9C U+00B0 degree -!9D U+00B2 twosuperior -!9E U+00B7 periodcentered -!9F U+00F7 divide -!A0 U+2550 SF430000 -!A1 U+2551 SF240000 -!A2 U+2552 SF510000 -!A3 U+0451 afii10071 -!A4 U+0454 afii10101 -!A5 U+2554 SF390000 -!A6 U+0456 afii10103 -!A7 U+0457 afii10104 -!A8 U+2557 SF250000 -!A9 U+2558 SF500000 -!AA U+2559 SF490000 -!AB U+255A SF380000 -!AC U+255B SF280000 -!AD U+0491 afii10098 -!AE U+255D SF260000 -!AF U+255E SF360000 -!B0 U+255F SF370000 -!B1 U+2560 SF420000 -!B2 U+2561 SF190000 -!B3 U+0401 afii10023 -!B4 U+0404 afii10053 -!B5 U+2563 SF230000 -!B6 U+0406 afii10055 -!B7 U+0407 afii10056 -!B8 U+2566 SF410000 -!B9 U+2567 SF450000 -!BA U+2568 SF460000 -!BB U+2569 SF400000 -!BC U+256A SF540000 -!BD U+0490 afii10050 -!BE U+256C SF440000 -!BF U+00A9 copyright -!C0 U+044E afii10096 -!C1 U+0430 afii10065 -!C2 U+0431 afii10066 -!C3 U+0446 afii10088 -!C4 U+0434 afii10069 -!C5 U+0435 afii10070 -!C6 U+0444 afii10086 -!C7 U+0433 afii10068 -!C8 U+0445 afii10087 -!C9 U+0438 afii10074 -!CA U+0439 afii10075 -!CB U+043A afii10076 -!CC U+043B afii10077 -!CD U+043C afii10078 -!CE U+043D afii10079 -!CF U+043E afii10080 -!D0 U+043F afii10081 -!D1 U+044F afii10097 -!D2 U+0440 afii10082 -!D3 U+0441 afii10083 -!D4 U+0442 afii10084 -!D5 U+0443 afii10085 -!D6 U+0436 afii10072 -!D7 U+0432 afii10067 -!D8 U+044C afii10094 -!D9 U+044B afii10093 -!DA U+0437 afii10073 -!DB U+0448 afii10090 -!DC U+044D afii10095 -!DD U+0449 afii10091 -!DE U+0447 afii10089 -!DF U+044A afii10092 -!E0 U+042E afii10048 -!E1 U+0410 afii10017 -!E2 U+0411 afii10018 -!E3 U+0426 afii10040 -!E4 U+0414 afii10021 -!E5 U+0415 afii10022 -!E6 U+0424 afii10038 -!E7 U+0413 afii10020 -!E8 U+0425 afii10039 -!E9 U+0418 afii10026 -!EA U+0419 afii10027 -!EB U+041A afii10028 -!EC U+041B afii10029 -!ED U+041C afii10030 -!EE U+041D afii10031 -!EF U+041E afii10032 -!F0 U+041F afii10033 -!F1 U+042F afii10049 -!F2 U+0420 afii10034 -!F3 U+0421 afii10035 -!F4 U+0422 afii10036 -!F5 U+0423 afii10037 -!F6 U+0416 afii10024 -!F7 U+0412 afii10019 -!F8 U+042C afii10046 -!F9 U+042B afii10045 -!FA U+0417 afii10025 -!FB U+0428 afii10042 -!FC U+042D afii10047 -!FD U+0429 afii10043 -!FE U+0427 afii10041 -!FF U+042A afii10044 diff --git a/includes/fpdf/font/makefont/makefont.php b/includes/fpdf/font/makefont/makefont.php deleted file mode 100755 index 7e7ed564..00000000 --- a/includes/fpdf/font/makefont/makefont.php +++ /dev/null @@ -1,419 +0,0 @@ -Error: encoding not found: '.$enc); - $cc2gn=array(); - foreach($a as $l) - { - if($l[0]=='!') - { - $e=preg_split('/[ \\t]+/',rtrim($l)); - $cc=hexdec(substr($e[0],1)); - $gn=$e[2]; - $cc2gn[$cc]=$gn; - } - } - for($i=0;$i<=255;$i++) - { - if(!isset($cc2gn[$i])) - $cc2gn[$i]='.notdef'; - } - return $cc2gn; -} - -function ReadAFM($file, &$map) -{ - //Read a font metric file - $a=file($file); - if(empty($a)) - die('File not found'); - $widths=array(); - $fm=array(); - $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent', - 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut', - 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent', - 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent', - 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent', - 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat', - 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb', - 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong'); - foreach($a as $l) - { - $e=explode(' ',rtrim($l)); - if(count($e)<2) - continue; - $code=$e[0]; - $param=$e[1]; - if($code=='C') - { - //Character metrics - $cc=(int)$e[1]; - $w=$e[4]; - $gn=$e[7]; - if(substr($gn,-4)=='20AC') - $gn='Euro'; - if(isset($fix[$gn])) - { - //Fix incorrect glyph name - foreach($map as $c=>$n) - { - if($n==$fix[$gn]) - $map[$c]=$gn; - } - } - if(empty($map)) - { - //Symbolic font: use built-in encoding - $widths[$cc]=$w; - } - else - { - $widths[$gn]=$w; - if($gn=='X') - $fm['CapXHeight']=$e[13]; - } - if($gn=='.notdef') - $fm['MissingWidth']=$w; - } - elseif($code=='FontName') - $fm['FontName']=$param; - elseif($code=='Weight') - $fm['Weight']=$param; - elseif($code=='ItalicAngle') - $fm['ItalicAngle']=(double)$param; - elseif($code=='Ascender') - $fm['Ascender']=(int)$param; - elseif($code=='Descender') - $fm['Descender']=(int)$param; - elseif($code=='UnderlineThickness') - $fm['UnderlineThickness']=(int)$param; - elseif($code=='UnderlinePosition') - $fm['UnderlinePosition']=(int)$param; - elseif($code=='IsFixedPitch') - $fm['IsFixedPitch']=($param=='true'); - elseif($code=='FontBBox') - $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); - elseif($code=='CapHeight') - $fm['CapHeight']=(int)$param; - elseif($code=='StdVW') - $fm['StdVW']=(int)$param; - } - if(!isset($fm['FontName'])) - die('FontName not found'); - if(!empty($map)) - { - if(!isset($widths['.notdef'])) - $widths['.notdef']=600; - if(!isset($widths['Delta']) && isset($widths['increment'])) - $widths['Delta']=$widths['increment']; - //Order widths according to map - for($i=0;$i<=255;$i++) - { - if(!isset($widths[$map[$i]])) - { - echo 'Warning: character '.$map[$i].' is missing
'; - $widths[$i]=$widths['.notdef']; - } - else - $widths[$i]=$widths[$map[$i]]; - } - } - $fm['Widths']=$widths; - return $fm; -} - -function MakeFontDescriptor($fm, $symbolic) -{ - //Ascent - $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); - $fd="array('Ascent'=>".$asc; - //Descent - $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); - $fd.=",'Descent'=>".$desc; - //CapHeight - if(isset($fm['CapHeight'])) - $ch=$fm['CapHeight']; - elseif(isset($fm['CapXHeight'])) - $ch=$fm['CapXHeight']; - else - $ch=$asc; - $fd.=",'CapHeight'=>".$ch; - //Flags - $flags=0; - if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch']) - $flags+=1<<0; - if($symbolic) - $flags+=1<<2; - if(!$symbolic) - $flags+=1<<5; - if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0) - $flags+=1<<6; - $fd.=",'Flags'=>".$flags; - //FontBBox - if(isset($fm['FontBBox'])) - $fbb=$fm['FontBBox']; - else - $fbb=array(0,$desc-100,1000,$asc+100); - $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; - //ItalicAngle - $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); - $fd.=",'ItalicAngle'=>".$ia; - //StemV - if(isset($fm['StdVW'])) - $stemv=$fm['StdVW']; - elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight'])) - $stemv=120; - else - $stemv=70; - $fd.=",'StemV'=>".$stemv; - //MissingWidth - if(isset($fm['MissingWidth'])) - $fd.=",'MissingWidth'=>".$fm['MissingWidth']; - $fd.=')'; - return $fd; -} - -function MakeWidthArray($fm) -{ - //Make character width array - $s="array(\n\t"; - $cw=$fm['Widths']; - for($i=0;$i<=255;$i++) - { - if(chr($i)=="'") - $s.="'\\''"; - elseif(chr($i)=="\\") - $s.="'\\\\'"; - elseif($i>=32 && $i<=126) - $s.="'".chr($i)."'"; - else - $s.="chr($i)"; - $s.='=>'.$fm['Widths'][$i]; - if($i<255) - $s.=','; - if(($i+1)%22==0) - $s.="\n\t"; - } - $s.=')'; - return $s; -} - -function MakeFontEncoding($map) -{ - //Build differences from reference encoding - $ref=ReadMap('cp1252'); - $s=''; - $last=0; - for($i=32;$i<=255;$i++) - { - if($map[$i]!=$ref[$i]) - { - if($i!=$last+1) - $s.=$i.' '; - $last=$i; - $s.='/'.$map[$i].' '; - } - } - return rtrim($s); -} - -function SaveToFile($file, $s, $mode) -{ - $f=fopen($file,'w'.$mode); - if(!$f) - die('Can\'t write to file '.$file); - fwrite($f,$s,strlen($s)); - fclose($f); -} - -function ReadShort($f) -{ - $a=unpack('n1n',fread($f,2)); - return $a['n']; -} - -function ReadLong($f) -{ - $a=unpack('N1N',fread($f,4)); - return $a['N']; -} - -function CheckTTF($file) -{ - //Check if font license allows embedding - $f=fopen($file,'rb'); - if(!$f) - die('Error: Can\'t open '.$file); - //Extract number of tables - fseek($f,4,SEEK_CUR); - $nb=ReadShort($f); - fseek($f,6,SEEK_CUR); - //Seek OS/2 table - $found=false; - for($i=0;$i<$nb;$i++) - { - if(fread($f,4)=='OS/2') - { - $found=true; - break; - } - fseek($f,12,SEEK_CUR); - } - if(!$found) - { - fclose($f); - return; - } - fseek($f,4,SEEK_CUR); - $offset=ReadLong($f); - fseek($f,$offset,SEEK_SET); - //Extract fsType flags - fseek($f,8,SEEK_CUR); - $fsType=ReadShort($f); - $rl=($fsType & 0x02)!=0; - $pp=($fsType & 0x04)!=0; - $e=($fsType & 0x08)!=0; - fclose($f); - if($rl && !$pp && !$e) - echo 'Warning: font license does not allow embedding'; -} - -/******************************************************************************* -* fontfile: path to TTF file (or empty string if not to be embedded) * -* afmfile: path to AFM file * -* enc: font encoding (or empty string for symbolic fonts) * -* patch: optional patch for encoding * -* type: font type if fontfile is empty * -*******************************************************************************/ -function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType') -{ - //Generate a font definition file - if(get_magic_quotes_runtime()) - @set_magic_quotes_runtime(0); - ini_set('auto_detect_line_endings','1'); - if($enc) - { - $map=ReadMap($enc); - foreach($patch as $cc=>$gn) - $map[$cc]=$gn; - } - else - $map=array(); - if(!file_exists($afmfile)) - die('Error: AFM file not found: '.$afmfile); - $fm=ReadAFM($afmfile,$map); - if($enc) - $diff=MakeFontEncoding($map); - else - $diff=''; - $fd=MakeFontDescriptor($fm,empty($map)); - //Find font type - if($fontfile) - { - $ext=strtolower(substr($fontfile,-3)); - if($ext=='ttf') - $type='TrueType'; - elseif($ext=='pfb') - $type='Type1'; - else - die('Error: unrecognized font file extension: '.$ext); - } - else - { - if($type!='TrueType' && $type!='Type1') - die('Error: incorrect font type: '.$type); - } - //Start generation - $s='Error: font file not found: '.$fontfile); - if($type=='TrueType') - CheckTTF($fontfile); - $f=fopen($fontfile,'rb'); - if(!$f) - die('Error: Can\'t open '.$fontfile); - $file=fread($f,filesize($fontfile)); - fclose($f); - if($type=='Type1') - { - //Find first two sections and discard third one - $header=(ord($file[0])==128); - if($header) - { - //Strip first binary header - $file=substr($file,6); - } - $pos=strpos($file,'eexec'); - if(!$pos) - die('Error: font file does not seem to be valid Type1'); - $size1=$pos+6; - if($header && ord($file[$size1])==128) - { - //Strip second binary header - $file=substr($file,0,$size1).substr($file,$size1+6); - } - $pos=strpos($file,'00000000'); - if(!$pos) - die('Error: font file does not seem to be valid Type1'); - $size2=$pos-$size1; - $file=substr($file,0,$size1+$size2); - } - if(function_exists('gzcompress')) - { - $cmp=$basename.'.z'; - SaveToFile($cmp,gzcompress($file),'b'); - $s.='$file=\''.$cmp."';\n"; - echo 'Font file compressed ('.$cmp.')
'; - } - else - { - $s.='$file=\''.basename($fontfile)."';\n"; - echo 'Notice: font file could not be compressed (zlib extension not available)
'; - } - if($type=='Type1') - { - $s.='$size1='.$size1.";\n"; - $s.='$size2='.$size2.";\n"; - } - else - $s.='$originalsize='.filesize($fontfile).";\n"; - } - else - { - //Not embedded font - $s.='$file='."'';\n"; - } - $s.="?>\n"; - SaveToFile($basename.'.php',$s,'t'); - echo 'Font definition file generated ('.$basename.'.php'.')
'; -} -?> diff --git a/includes/fpdf/font/symbol.php b/includes/fpdf/font/symbol.php deleted file mode 100755 index 43b50e45..00000000 --- a/includes/fpdf/font/symbol.php +++ /dev/null @@ -1,15 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, - ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, - 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, - 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, - 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, - chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, - chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, - chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, - chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, - chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, - chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); -?> diff --git a/includes/fpdf/font/times.php b/includes/fpdf/font/times.php deleted file mode 100755 index 837c706e..00000000 --- a/includes/fpdf/font/times.php +++ /dev/null @@ -1,15 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, - 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, - 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, - 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, - chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, - chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); -?> diff --git a/includes/fpdf/font/timesb.php b/includes/fpdf/font/timesb.php deleted file mode 100755 index 09cff86a..00000000 --- a/includes/fpdf/font/timesb.php +++ /dev/null @@ -1,15 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, - 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, - 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, - 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333, - chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, - chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); -?> diff --git a/includes/fpdf/font/timesbi.php b/includes/fpdf/font/timesbi.php deleted file mode 100755 index b4e38d76..00000000 --- a/includes/fpdf/font/timesbi.php +++ /dev/null @@ -1,15 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, - 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, - 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, - 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, - chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, - chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, - chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444); -?> diff --git a/includes/fpdf/font/timesi.php b/includes/fpdf/font/timesi.php deleted file mode 100755 index 0ba2b777..00000000 --- a/includes/fpdf/font/timesi.php +++ /dev/null @@ -1,15 +0,0 @@ -250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, - chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, - ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, - 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, - 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, - 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, - chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980, - chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333, - chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611, - chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, - chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, - chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444); -?> diff --git a/includes/fpdf/font/zapfdingbats.php b/includes/fpdf/font/zapfdingbats.php deleted file mode 100755 index 1f926a8c..00000000 --- a/includes/fpdf/font/zapfdingbats.php +++ /dev/null @@ -1,15 +0,0 @@ -0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, - chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, - ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, - 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, - 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, - 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, - chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, - chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, - chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, - chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, - chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, - chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); -?> diff --git a/includes/fpdf/fpdf.php b/includes/fpdf/fpdf.php deleted file mode 100755 index b27ca6df..00000000 --- a/includes/fpdf/fpdf.php +++ /dev/null @@ -1,1732 +0,0 @@ -_dochecks(); - //Initialization of properties - $this->page=0; - $this->n=2; - $this->buffer=''; - $this->pages=array(); - $this->PageSizes=array(); - $this->state=0; - $this->fonts=array(); - $this->FontFiles=array(); - $this->diffs=array(); - $this->images=array(); - $this->links=array(); - $this->InHeader=false; - $this->InFooter=false; - $this->lasth=0; - $this->FontFamily=''; - $this->FontStyle=''; - $this->FontSizePt=12; - $this->underline=false; - $this->DrawColor='0 G'; - $this->FillColor='0 g'; - $this->TextColor='0 g'; - $this->ColorFlag=false; - $this->ws=0; - //Standard fonts - $this->CoreFonts=array('courier'=>'Courier', 'courierB'=>'Courier-Bold', 'courierI'=>'Courier-Oblique', 'courierBI'=>'Courier-BoldOblique', - 'helvetica'=>'Helvetica', 'helveticaB'=>'Helvetica-Bold', 'helveticaI'=>'Helvetica-Oblique', 'helveticaBI'=>'Helvetica-BoldOblique', - 'times'=>'Times-Roman', 'timesB'=>'Times-Bold', 'timesI'=>'Times-Italic', 'timesBI'=>'Times-BoldItalic', - 'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats'); - //Scale factor - if($unit=='pt') - $this->k=1; - elseif($unit=='mm') - $this->k=72/25.4; - elseif($unit=='cm') - $this->k=72/2.54; - elseif($unit=='in') - $this->k=72; - else - $this->Error('Incorrect unit: '.$unit); - //Page format - $this->PageFormats=array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), - 'letter'=>array(612,792), 'legal'=>array(612,1008)); - if(is_string($format)) - $format=$this->_getpageformat($format); - $this->DefPageFormat=$format; - $this->CurPageFormat=$format; - //Page orientation - $orientation=strtolower($orientation); - if($orientation=='p' || $orientation=='portrait') - { - $this->DefOrientation='P'; - $this->w=$this->DefPageFormat[0]; - $this->h=$this->DefPageFormat[1]; - } - elseif($orientation=='l' || $orientation=='landscape') - { - $this->DefOrientation='L'; - $this->w=$this->DefPageFormat[1]; - $this->h=$this->DefPageFormat[0]; - } - else - $this->Error('Incorrect orientation: '.$orientation); - $this->CurOrientation=$this->DefOrientation; - $this->wPt=$this->w*$this->k; - $this->hPt=$this->h*$this->k; - //Page margins (1 cm) - $margin=28.35/$this->k; - $this->SetMargins($margin,$margin); - //Interior cell margin (1 mm) - $this->cMargin=$margin/10; - //Line width (0.2 mm) - $this->LineWidth=.567/$this->k; - //Automatic page break - $this->SetAutoPageBreak(true,2*$margin); - //Full width display mode - $this->SetDisplayMode('fullwidth'); - //Enable compression - $this->SetCompression(true); - //Set default PDF version number - $this->PDFVersion='1.3'; -} - -function SetMargins($left, $top, $right=null) -{ - //Set left, top and right margins - $this->lMargin=$left; - $this->tMargin=$top; - if($right===null) - $right=$left; - $this->rMargin=$right; -} - -function SetLeftMargin($margin) -{ - //Set left margin - $this->lMargin=$margin; - if($this->page>0 && $this->x<$margin) - $this->x=$margin; -} - -function SetTopMargin($margin) -{ - //Set top margin - $this->tMargin=$margin; -} - -function SetRightMargin($margin) -{ - //Set right margin - $this->rMargin=$margin; -} - -function SetAutoPageBreak($auto, $margin=0) -{ - //Set auto page break mode and triggering margin - $this->AutoPageBreak=$auto; - $this->bMargin=$margin; - $this->PageBreakTrigger=$this->h-$margin; -} - -function SetDisplayMode($zoom, $layout='continuous') -{ - //Set display mode in viewer - if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) - $this->ZoomMode=$zoom; - else - $this->Error('Incorrect zoom display mode: '.$zoom); - if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') - $this->LayoutMode=$layout; - else - $this->Error('Incorrect layout display mode: '.$layout); -} - -function SetCompression($compress) -{ - //Set page compression - if(function_exists('gzcompress')) - $this->compress=$compress; - else - $this->compress=false; -} - -function SetTitle($title, $isUTF8=false) -{ - //Title of document - if($isUTF8) - $title=$this->_UTF8toUTF16($title); - $this->title=$title; -} - -function SetSubject($subject, $isUTF8=false) -{ - //Subject of document - if($isUTF8) - $subject=$this->_UTF8toUTF16($subject); - $this->subject=$subject; -} - -function SetAuthor($author, $isUTF8=false) -{ - //Author of document - if($isUTF8) - $author=$this->_UTF8toUTF16($author); - $this->author=$author; -} - -function SetKeywords($keywords, $isUTF8=false) -{ - //Keywords of document - if($isUTF8) - $keywords=$this->_UTF8toUTF16($keywords); - $this->keywords=$keywords; -} - -function SetCreator($creator, $isUTF8=false) -{ - //Creator of document - if($isUTF8) - $creator=$this->_UTF8toUTF16($creator); - $this->creator=$creator; -} - -function AliasNbPages($alias='{nb}') -{ - //Define an alias for total number of pages - $this->AliasNbPages=$alias; -} - -function Error($msg) -{ - //Fatal error - die('FPDF error: '.$msg); -} - -function Open() -{ - //Begin document - $this->state=1; -} - -function Close() -{ - //Terminate document - if($this->state==3) - return; - if($this->page==0) - $this->AddPage(); - //Page footer - $this->InFooter=true; - $this->Footer(); - $this->InFooter=false; - //Close page - $this->_endpage(); - //Close document - $this->_enddoc(); -} - -function AddPage($orientation='', $format='') -{ - //Start a new page - if($this->state==0) - $this->Open(); - $family=$this->FontFamily; - $style=$this->FontStyle.($this->underline ? 'U' : ''); - $size=$this->FontSizePt; - $lw=$this->LineWidth; - $dc=$this->DrawColor; - $fc=$this->FillColor; - $tc=$this->TextColor; - $cf=$this->ColorFlag; - if($this->page>0) - { - //Page footer - $this->InFooter=true; - $this->Footer(); - $this->InFooter=false; - //Close page - $this->_endpage(); - } - //Start new page - $this->_beginpage($orientation,$format); - //Set line cap style to square - $this->_out('2 J'); - //Set line width - $this->LineWidth=$lw; - $this->_out(sprintf('%.2F w',$lw*$this->k)); - //Set font - if($family) - $this->SetFont($family,$style,$size); - //Set colors - $this->DrawColor=$dc; - if($dc!='0 G') - $this->_out($dc); - $this->FillColor=$fc; - if($fc!='0 g') - $this->_out($fc); - $this->TextColor=$tc; - $this->ColorFlag=$cf; - //Page header - $this->InHeader=true; - $this->Header(); - $this->InHeader=false; - //Restore line width - if($this->LineWidth!=$lw) - { - $this->LineWidth=$lw; - $this->_out(sprintf('%.2F w',$lw*$this->k)); - } - //Restore font - if($family) - $this->SetFont($family,$style,$size); - //Restore colors - if($this->DrawColor!=$dc) - { - $this->DrawColor=$dc; - $this->_out($dc); - } - if($this->FillColor!=$fc) - { - $this->FillColor=$fc; - $this->_out($fc); - } - $this->TextColor=$tc; - $this->ColorFlag=$cf; -} - -function Header() -{ - //To be implemented in your own inherited class -} - -function Footer() -{ - //To be implemented in your own inherited class -} - -function PageNo() -{ - //Get current page number - return $this->page; -} - -function SetDrawColor($r, $g=null, $b=null) -{ - //Set color for all stroking operations - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->DrawColor=sprintf('%.3F G',$r/255); - else - $this->DrawColor=sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); - if($this->page>0) - $this->_out($this->DrawColor); -} - -function SetFillColor($r, $g=null, $b=null) -{ - //Set color for all filling operations - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->FillColor=sprintf('%.3F g',$r/255); - else - $this->FillColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); - $this->ColorFlag=($this->FillColor!=$this->TextColor); - if($this->page>0) - $this->_out($this->FillColor); -} - -function SetTextColor($r, $g=null, $b=null) -{ - //Set color for text - if(($r==0 && $g==0 && $b==0) || $g===null) - $this->TextColor=sprintf('%.3F g',$r/255); - else - $this->TextColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); - $this->ColorFlag=($this->FillColor!=$this->TextColor); -} - -function GetStringWidth($s) -{ - //Get width of a string in the current font - $s=(string)$s; - $cw=&$this->CurrentFont['cw']; - $w=0; - $l=strlen($s); - for($i=0;$i<$l;$i++) - $w+=$cw[$s[$i]]; - return $w*$this->FontSize/1000; -} - -function SetLineWidth($width) -{ - //Set line width - $this->LineWidth=$width; - if($this->page>0) - $this->_out(sprintf('%.2F w',$width*$this->k)); -} - -function Line($x1, $y1, $x2, $y2) -{ - //Draw a line - $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); -} - -function Rect($x, $y, $w, $h, $style='') -{ - //Draw a rectangle - if($style=='F') - $op='f'; - elseif($style=='FD' || $style=='DF') - $op='B'; - else - $op='S'; - $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); -} - -function AddFont($family, $style='', $file='') -{ - //Add a TrueType or Type1 font - $family=strtolower($family); - if($file=='') - $file=str_replace(' ','',$family).strtolower($style).'.php'; - if($family=='arial') - $family='helvetica'; - $style=strtoupper($style); - if($style=='IB') - $style='BI'; - $fontkey=$family.$style; - if(isset($this->fonts[$fontkey])) - return; - include($this->_getfontpath().$file); - if(!isset($name)) - $this->Error('Could not include font definition file'); - $i=count($this->fonts)+1; - $this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file); - if($diff) - { - //Search existing encodings - $d=0; - $nb=count($this->diffs); - for($i=1;$i<=$nb;$i++) - { - if($this->diffs[$i]==$diff) - { - $d=$i; - break; - } - } - if($d==0) - { - $d=$nb+1; - $this->diffs[$d]=$diff; - } - $this->fonts[$fontkey]['diff']=$d; - } - if($file) - { - if($type=='TrueType') - $this->FontFiles[$file]=array('length1'=>$originalsize); - else - $this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2); - } -} - -function SetFont($family, $style='', $size=0) -{ - //Select a font; size given in points - global $fpdf_charwidths; - - $family=strtolower($family); - if($family=='') - $family=$this->FontFamily; - if($family=='arial') - $family='helvetica'; - elseif($family=='symbol' || $family=='zapfdingbats') - $style=''; - $style=strtoupper($style); - if(strpos($style,'U')!==false) - { - $this->underline=true; - $style=str_replace('U','',$style); - } - else - $this->underline=false; - if($style=='IB') - $style='BI'; - if($size==0) - $size=$this->FontSizePt; - //Test if font is already selected - if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) - return; - //Test if used for the first time - $fontkey=$family.$style; - if(!isset($this->fonts[$fontkey])) - { - //Check if one of the standard fonts - if(isset($this->CoreFonts[$fontkey])) - { - if(!isset($fpdf_charwidths[$fontkey])) - { - //Load metric file - $file=$family; - if($family=='times' || $family=='helvetica') - $file.=strtolower($style); - include($this->_getfontpath().$file.'.php'); - if(!isset($fpdf_charwidths[$fontkey])) - $this->Error('Could not include font metric file'); - } - $i=count($this->fonts)+1; - $name=$this->CoreFonts[$fontkey]; - $cw=$fpdf_charwidths[$fontkey]; - $this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw); - } - else - $this->Error('Undefined font: '.$family.' '.$style); - } - //Select it - $this->FontFamily=$family; - $this->FontStyle=$style; - $this->FontSizePt=$size; - $this->FontSize=$size/$this->k; - $this->CurrentFont=&$this->fonts[$fontkey]; - if($this->page>0) - $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); -} - -function SetFontSize($size) -{ - //Set font size in points - if($this->FontSizePt==$size) - return; - $this->FontSizePt=$size; - $this->FontSize=$size/$this->k; - if($this->page>0) - $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); -} - -function AddLink() -{ - //Create a new internal link - $n=count($this->links)+1; - $this->links[$n]=array(0, 0); - return $n; -} - -function SetLink($link, $y=0, $page=-1) -{ - //Set destination of internal link - if($y==-1) - $y=$this->y; - if($page==-1) - $page=$this->page; - $this->links[$link]=array($page, $y); -} - -function Link($x, $y, $w, $h, $link) -{ - //Put a link on the page - $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); -} - -function Text($x, $y, $txt) -{ - //Output a string - $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); - if($this->underline && $txt!='') - $s.=' '.$this->_dounderline($x,$y,$txt); - if($this->ColorFlag) - $s='q '.$this->TextColor.' '.$s.' Q'; - $this->_out($s); -} - -function AcceptPageBreak() -{ - //Accept automatic page break or not - return $this->AutoPageBreak; -} - -function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') -{ - //Output a cell - $k=$this->k; - if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) - { - //Automatic page break - $x=$this->x; - $ws=$this->ws; - if($ws>0) - { - $this->ws=0; - $this->_out('0 Tw'); - } - $this->AddPage($this->CurOrientation,$this->CurPageFormat); - $this->x=$x; - if($ws>0) - { - $this->ws=$ws; - $this->_out(sprintf('%.3F Tw',$ws*$k)); - } - } - if($w==0) - $w=$this->w-$this->rMargin-$this->x; - $s=''; - if($fill || $border==1) - { - if($fill) - $op=($border==1) ? 'B' : 'f'; - else - $op='S'; - $s=sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); - } - if(is_string($border)) - { - $x=$this->x; - $y=$this->y; - if(strpos($border,'L')!==false) - $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); - if(strpos($border,'T')!==false) - $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); - if(strpos($border,'R')!==false) - $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); - if(strpos($border,'B')!==false) - $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); - } - if($txt!=='') - { - if($align=='R') - $dx=$w-$this->cMargin-$this->GetStringWidth($txt); - elseif($align=='C') - $dx=($w-$this->GetStringWidth($txt))/2; - else - $dx=$this->cMargin; - if($this->ColorFlag) - $s.='q '.$this->TextColor.' '; - $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); - $s.=sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); - if($this->underline) - $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); - if($this->ColorFlag) - $s.=' Q'; - if($link) - $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); - } - if($s) - $this->_out($s); - $this->lasth=$h; - if($ln>0) - { - //Go to next line - $this->y+=$h; - if($ln==1) - $this->x=$this->lMargin; - } - else - $this->x+=$w; -} - -function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) -{ - //Output text with automatic or explicit line breaks - $cw=&$this->CurrentFont['cw']; - if($w==0) - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - $s=str_replace("\r",'',$txt); - $nb=strlen($s); - if($nb>0 && $s[$nb-1]=="\n") - $nb--; - $b=0; - if($border) - { - if($border==1) - { - $border='LTRB'; - $b='LRT'; - $b2='LR'; - } - else - { - $b2=''; - if(strpos($border,'L')!==false) - $b2.='L'; - if(strpos($border,'R')!==false) - $b2.='R'; - $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2; - } - } - $sep=-1; - $i=0; - $j=0; - $l=0; - $ns=0; - $nl=1; - while($i<$nb) - { - //Get next character - $c=$s[$i]; - if($c=="\n") - { - //Explicit line break - if($this->ws>0) - { - $this->ws=0; - $this->_out('0 Tw'); - } - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - $i++; - $sep=-1; - $j=$i; - $l=0; - $ns=0; - $nl++; - if($border && $nl==2) - $b=$b2; - continue; - } - if($c==' ') - { - $sep=$i; - $ls=$l; - $ns++; - } - $l+=$cw[$c]; - if($l>$wmax) - { - //Automatic line break - if($sep==-1) - { - if($i==$j) - $i++; - if($this->ws>0) - { - $this->ws=0; - $this->_out('0 Tw'); - } - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - } - else - { - if($align=='J') - { - $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; - $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); - } - $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); - $i=$sep+1; - } - $sep=-1; - $j=$i; - $l=0; - $ns=0; - $nl++; - if($border && $nl==2) - $b=$b2; - } - else - $i++; - } - //Last chunk - if($this->ws>0) - { - $this->ws=0; - $this->_out('0 Tw'); - } - if($border && strpos($border,'B')!==false) - $b.='B'; - $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); - $this->x=$this->lMargin; -} - -function Write($h, $txt, $link='') -{ - //Output text in flowing mode - $cw=&$this->CurrentFont['cw']; - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - $s=str_replace("\r",'',$txt); - $nb=strlen($s); - $sep=-1; - $i=0; - $j=0; - $l=0; - $nl=1; - while($i<$nb) - { - //Get next character - $c=$s[$i]; - if($c=="\n") - { - //Explicit line break - $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); - $i++; - $sep=-1; - $j=$i; - $l=0; - if($nl==1) - { - $this->x=$this->lMargin; - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - } - $nl++; - continue; - } - if($c==' ') - $sep=$i; - $l+=$cw[$c]; - if($l>$wmax) - { - //Automatic line break - if($sep==-1) - { - if($this->x>$this->lMargin) - { - //Move to next line - $this->x=$this->lMargin; - $this->y+=$h; - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - $i++; - $nl++; - continue; - } - if($i==$j) - $i++; - $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); - } - else - { - $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); - $i=$sep+1; - } - $sep=-1; - $j=$i; - $l=0; - if($nl==1) - { - $this->x=$this->lMargin; - $w=$this->w-$this->rMargin-$this->x; - $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; - } - $nl++; - } - else - $i++; - } - //Last chunk - if($i!=$j) - $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); -} - -function Ln($h=null) -{ - //Line feed; default value is last cell height - $this->x=$this->lMargin; - if($h===null) - $this->y+=$this->lasth; - else - $this->y+=$h; -} - -function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') -{ - //Put an image on the page - if(!isset($this->images[$file])) - { - //First use of this image, get info - if($type=='') - { - $pos=strrpos($file,'.'); - if(!$pos) - $this->Error('Image file has no extension and no type was specified: '.$file); - $type=substr($file,$pos+1); - } - $type=strtolower($type); - if($type=='jpeg') - $type='jpg'; - $mtd='_parse'.$type; - if(!method_exists($this,$mtd)) - $this->Error('Unsupported image type: '.$type); - $info=$this->$mtd($file); - $info['i']=count($this->images)+1; - $this->images[$file]=$info; - } - else - $info=$this->images[$file]; - //Automatic width and height calculation if needed - if($w==0 && $h==0) - { - //Put image at 72 dpi - $w=$info['w']/$this->k; - $h=$info['h']/$this->k; - } - elseif($w==0) - $w=$h*$info['w']/$info['h']; - elseif($h==0) - $h=$w*$info['h']/$info['w']; - //Flowing mode - if($y===null) - { - if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) - { - //Automatic page break - $x2=$this->x; - $this->AddPage($this->CurOrientation,$this->CurPageFormat); - $this->x=$x2; - } - $y=$this->y; - $this->y+=$h; - } - if($x===null) - $x=$this->x; - $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); - if($link) - $this->Link($x,$y,$w,$h,$link); -} - -function GetX() -{ - //Get x position - return $this->x; -} - -function SetX($x) -{ - //Set x position - if($x>=0) - $this->x=$x; - else - $this->x=$this->w+$x; -} - -function GetY() -{ - //Get y position - return $this->y; -} - -function SetY($y) -{ - //Set y position and reset x - $this->x=$this->lMargin; - if($y>=0) - $this->y=$y; - else - $this->y=$this->h+$y; -} - -function SetXY($x, $y) -{ - //Set x and y positions - $this->SetY($y); - $this->SetX($x); -} - -function Output($name='', $dest='') -{ - //Output PDF to some destination - if($this->state<3) - $this->Close(); - $dest=strtoupper($dest); - if($dest=='') - { - if($name=='') - { - $name='doc.pdf'; - $dest='I'; - } - else - $dest='F'; - } - switch($dest) - { - case 'I': - //Send to standard output - if(ob_get_length()) - $this->Error('Some data has already been output, can\'t send PDF file'); - if(php_sapi_name()!='cli') - { - //We send to a browser - header('Content-Type: application/pdf'); - if(headers_sent()) - $this->Error('Some data has already been output, can\'t send PDF file'); - header('Content-Length: '.strlen($this->buffer)); - header('Content-Disposition: inline; filename="'.$name.'"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - ini_set('zlib.output_compression','0'); - } - echo $this->buffer; - break; - case 'D': - //Download file - if(ob_get_length()) - $this->Error('Some data has already been output, can\'t send PDF file'); - header('Content-Type: application/x-download'); - if(headers_sent()) - $this->Error('Some data has already been output, can\'t send PDF file'); - header('Content-Length: '.strlen($this->buffer)); - header('Content-Disposition: attachment; filename="'.$name.'"'); - header('Cache-Control: private, max-age=0, must-revalidate'); - header('Pragma: public'); - ini_set('zlib.output_compression','0'); - echo $this->buffer; - break; - case 'F': - //Save to local file - $f=fopen($name,'wb'); - if(!$f) - $this->Error('Unable to create output file: '.$name); - fwrite($f,$this->buffer,strlen($this->buffer)); - fclose($f); - break; - case 'S': - //Return as a string - return $this->buffer; - default: - $this->Error('Incorrect output destination: '.$dest); - } - return ''; -} - -/******************************************************************************* -* * -* Protected methods * -* * -*******************************************************************************/ -function _dochecks() -{ - //Check availability of %F - if(sprintf('%.1F',1.0)!='1.0') - $this->Error('This version of PHP is not supported'); - //Check mbstring overloading - if(ini_get('mbstring.func_overload') & 2) - $this->Error('mbstring overloading must be disabled'); - //Disable runtime magic quotes - if(get_magic_quotes_runtime()) - @set_magic_quotes_runtime(0); -} - -function _getpageformat($format) -{ - $format=strtolower($format); - if(!isset($this->PageFormats[$format])) - $this->Error('Unknown page format: '.$format); - $a=$this->PageFormats[$format]; - return array($a[0]/$this->k, $a[1]/$this->k); -} - -function _getfontpath() -{ - if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font')) - define('FPDF_FONTPATH',dirname(__FILE__).'/font/'); - return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : ''; -} - -function _beginpage($orientation, $format) -{ - $this->page++; - $this->pages[$this->page]=''; - $this->state=2; - $this->x=$this->lMargin; - $this->y=$this->tMargin; - $this->FontFamily=''; - //Check page size - if($orientation=='') - $orientation=$this->DefOrientation; - else - $orientation=strtoupper($orientation[0]); - if($format=='') - $format=$this->DefPageFormat; - else - { - if(is_string($format)) - $format=$this->_getpageformat($format); - } - if($orientation!=$this->CurOrientation || $format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1]) - { - //New size - if($orientation=='P') - { - $this->w=$format[0]; - $this->h=$format[1]; - } - else - { - $this->w=$format[1]; - $this->h=$format[0]; - } - $this->wPt=$this->w*$this->k; - $this->hPt=$this->h*$this->k; - $this->PageBreakTrigger=$this->h-$this->bMargin; - $this->CurOrientation=$orientation; - $this->CurPageFormat=$format; - } - if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1]) - $this->PageSizes[$this->page]=array($this->wPt, $this->hPt); -} - -function _endpage() -{ - $this->state=1; -} - -function _escape($s) -{ - //Escape special characters in strings - $s=str_replace('\\','\\\\',$s); - $s=str_replace('(','\\(',$s); - $s=str_replace(')','\\)',$s); - $s=str_replace("\r",'\\r',$s); - return $s; -} - -function _textstring($s) -{ - //Format a text string - return '('.$this->_escape($s).')'; -} - -function _UTF8toUTF16($s) -{ - //Convert UTF-8 to UTF-16BE with BOM - $res="\xFE\xFF"; - $nb=strlen($s); - $i=0; - while($i<$nb) - { - $c1=ord($s[$i++]); - if($c1>=224) - { - //3-byte character - $c2=ord($s[$i++]); - $c3=ord($s[$i++]); - $res.=chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); - $res.=chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); - } - elseif($c1>=192) - { - //2-byte character - $c2=ord($s[$i++]); - $res.=chr(($c1 & 0x1C)>>2); - $res.=chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); - } - else - { - //Single-byte character - $res.="\0".chr($c1); - } - } - return $res; -} - -function _dounderline($x, $y, $txt) -{ - //Underline text - $up=$this->CurrentFont['up']; - $ut=$this->CurrentFont['ut']; - $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); - return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); -} - -function _parsejpg($file) -{ - //Extract info from a JPEG file - $a=GetImageSize($file); - if(!$a) - $this->Error('Missing or incorrect image file: '.$file); - if($a[2]!=2) - $this->Error('Not a JPEG file: '.$file); - if(!isset($a['channels']) || $a['channels']==3) - $colspace='DeviceRGB'; - elseif($a['channels']==4) - $colspace='DeviceCMYK'; - else - $colspace='DeviceGray'; - $bpc=isset($a['bits']) ? $a['bits'] : 8; - //Read whole file - $f=fopen($file,'rb'); - $data=''; - while(!feof($f)) - $data.=fread($f,8192); - fclose($f); - return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); -} - -function _parsepng($file) -{ - //Extract info from a PNG file - $f=fopen($file,'rb'); - if(!$f) - $this->Error('Can\'t open image file: '.$file); - //Check signature - if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) - $this->Error('Not a PNG file: '.$file); - //Read header chunk - $this->_readstream($f,4); - if($this->_readstream($f,4)!='IHDR') - $this->Error('Incorrect PNG file: '.$file); - $w=$this->_readint($f); - $h=$this->_readint($f); - $bpc=ord($this->_readstream($f,1)); - if($bpc>8) - $this->Error('16-bit depth not supported: '.$file); - $ct=ord($this->_readstream($f,1)); - if($ct==0) - $colspace='DeviceGray'; - elseif($ct==2) - $colspace='DeviceRGB'; - elseif($ct==3) - $colspace='Indexed'; - else - $this->Error('Alpha channel not supported: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Unknown compression method: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Unknown filter method: '.$file); - if(ord($this->_readstream($f,1))!=0) - $this->Error('Interlacing not supported: '.$file); - $this->_readstream($f,4); - $parms='/DecodeParms <>'; - //Scan chunks looking for palette, transparency and image data - $pal=''; - $trns=''; - $data=''; - do - { - $n=$this->_readint($f); - $type=$this->_readstream($f,4); - if($type=='PLTE') - { - //Read palette - $pal=$this->_readstream($f,$n); - $this->_readstream($f,4); - } - elseif($type=='tRNS') - { - //Read transparency info - $t=$this->_readstream($f,$n); - if($ct==0) - $trns=array(ord(substr($t,1,1))); - elseif($ct==2) - $trns=array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); - else - { - $pos=strpos($t,chr(0)); - if($pos!==false) - $trns=array($pos); - } - $this->_readstream($f,4); - } - elseif($type=='IDAT') - { - //Read image data block - $data.=$this->_readstream($f,$n); - $this->_readstream($f,4); - } - elseif($type=='IEND') - break; - else - $this->_readstream($f,$n+4); - } - while($n); - if($colspace=='Indexed' && empty($pal)) - $this->Error('Missing palette in '.$file); - fclose($f); - return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data); -} - -function _readstream($f, $n) -{ - //Read n bytes from stream - $res=''; - while($n>0 && !feof($f)) - { - $s=fread($f,$n); - if($s===false) - $this->Error('Error while reading stream'); - $n-=strlen($s); - $res.=$s; - } - if($n>0) - $this->Error('Unexpected end of stream'); - return $res; -} - -function _readint($f) -{ - //Read a 4-byte integer from stream - $a=unpack('Ni',$this->_readstream($f,4)); - return $a['i']; -} - -function _parsegif($file) -{ - //Extract info from a GIF file (via PNG conversion) - if(!function_exists('imagepng')) - $this->Error('GD extension is required for GIF support'); - if(!function_exists('imagecreatefromgif')) - $this->Error('GD has no GIF read support'); - $im=imagecreatefromgif($file); - if(!$im) - $this->Error('Missing or incorrect image file: '.$file); - imageinterlace($im,0); - $tmp=tempnam('.','gif'); - if(!$tmp) - $this->Error('Unable to create a temporary file'); - if(!imagepng($im,$tmp)) - $this->Error('Error while saving to temporary file'); - imagedestroy($im); - $info=$this->_parsepng($tmp); - unlink($tmp); - return $info; -} - -function _newobj() -{ - //Begin a new object - $this->n++; - $this->offsets[$this->n]=strlen($this->buffer); - $this->_out($this->n.' 0 obj'); -} - -function _putstream($s) -{ - $this->_out('stream'); - $this->_out($s); - $this->_out('endstream'); -} - -function _out($s) -{ - //Add a line to the document - if($this->state==2) - $this->pages[$this->page].=$s."\n"; - else - $this->buffer.=$s."\n"; -} - -function _putpages() -{ - $nb=$this->page; - if(!empty($this->AliasNbPages)) - { - //Replace number of pages - for($n=1;$n<=$nb;$n++) - $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); - } - if($this->DefOrientation=='P') - { - $wPt=$this->DefPageFormat[0]*$this->k; - $hPt=$this->DefPageFormat[1]*$this->k; - } - else - { - $wPt=$this->DefPageFormat[1]*$this->k; - $hPt=$this->DefPageFormat[0]*$this->k; - } - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; - for($n=1;$n<=$nb;$n++) - { - //Page - $this->_newobj(); - $this->_out('<_out('/Parent 1 0 R'); - if(isset($this->PageSizes[$n])) - $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); - $this->_out('/Resources 2 0 R'); - if(isset($this->PageLinks[$n])) - { - //Links - $annots='/Annots ['; - foreach($this->PageLinks[$n] as $pl) - { - $rect=sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); - $annots.='<_textstring($pl[4]).'>>>>'; - else - { - $l=$this->links[$pl[4]]; - $h=isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; - $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); - } - } - $this->_out($annots.']'); - } - $this->_out('/Contents '.($this->n+1).' 0 R>>'); - $this->_out('endobj'); - //Page content - $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; - $this->_newobj(); - $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); - $this->_putstream($p); - $this->_out('endobj'); - } - //Pages root - $this->offsets[1]=strlen($this->buffer); - $this->_out('1 0 obj'); - $this->_out('<_out($kids.']'); - $this->_out('/Count '.$nb); - $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); - $this->_out('>>'); - $this->_out('endobj'); -} - -function _putfonts() -{ - $nf=$this->n; - foreach($this->diffs as $diff) - { - //Encodings - $this->_newobj(); - $this->_out('<>'); - $this->_out('endobj'); - } - foreach($this->FontFiles as $file=>$info) - { - //Font file embedding - $this->_newobj(); - $this->FontFiles[$file]['n']=$this->n; - $font=''; - $f=fopen($this->_getfontpath().$file,'rb',1); - if(!$f) - $this->Error('Font file not found'); - while(!feof($f)) - $font.=fread($f,8192); - fclose($f); - $compressed=(substr($file,-2)=='.z'); - if(!$compressed && isset($info['length2'])) - { - $header=(ord($font[0])==128); - if($header) - { - //Strip first binary header - $font=substr($font,6); - } - if($header && ord($font[$info['length1']])==128) - { - //Strip second binary header - $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6); - } - } - $this->_out('<_out('/Filter /FlateDecode'); - $this->_out('/Length1 '.$info['length1']); - if(isset($info['length2'])) - $this->_out('/Length2 '.$info['length2'].' /Length3 0'); - $this->_out('>>'); - $this->_putstream($font); - $this->_out('endobj'); - } - foreach($this->fonts as $k=>$font) - { - //Font objects - $this->fonts[$k]['n']=$this->n+1; - $type=$font['type']; - $name=$font['name']; - if($type=='core') - { - //Standard font - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /Type1'); - if($name!='Symbol' && $name!='ZapfDingbats') - $this->_out('/Encoding /WinAnsiEncoding'); - $this->_out('>>'); - $this->_out('endobj'); - } - elseif($type=='Type1' || $type=='TrueType') - { - //Additional Type1 or TrueType font - $this->_newobj(); - $this->_out('<_out('/BaseFont /'.$name); - $this->_out('/Subtype /'.$type); - $this->_out('/FirstChar 32 /LastChar 255'); - $this->_out('/Widths '.($this->n+1).' 0 R'); - $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); - if($font['enc']) - { - if(isset($font['diff'])) - $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); - else - $this->_out('/Encoding /WinAnsiEncoding'); - } - $this->_out('>>'); - $this->_out('endobj'); - //Widths - $this->_newobj(); - $cw=&$font['cw']; - $s='['; - for($i=32;$i<=255;$i++) - $s.=$cw[chr($i)].' '; - $this->_out($s.']'); - $this->_out('endobj'); - //Descriptor - $this->_newobj(); - $s='<$v) - $s.=' /'.$k.' '.$v; - $file=$font['file']; - if($file) - $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; - $this->_out($s.'>>'); - $this->_out('endobj'); - } - else - { - //Allow for additional types - $mtd='_put'.strtolower($type); - if(!method_exists($this,$mtd)) - $this->Error('Unsupported font type: '.$type); - $this->$mtd($font); - } - } -} - -function _putimages() -{ - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; - reset($this->images); - while(list($file,$info)=each($this->images)) - { - $this->_newobj(); - $this->images[$file]['n']=$this->n; - $this->_out('<_out('/Subtype /Image'); - $this->_out('/Width '.$info['w']); - $this->_out('/Height '.$info['h']); - if($info['cs']=='Indexed') - $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); - else - { - $this->_out('/ColorSpace /'.$info['cs']); - if($info['cs']=='DeviceCMYK') - $this->_out('/Decode [1 0 1 0 1 0 1 0]'); - } - $this->_out('/BitsPerComponent '.$info['bpc']); - if(isset($info['f'])) - $this->_out('/Filter /'.$info['f']); - if(isset($info['parms'])) - $this->_out($info['parms']); - if(isset($info['trns']) && is_array($info['trns'])) - { - $trns=''; - for($i=0;$i_out('/Mask ['.$trns.']'); - } - $this->_out('/Length '.strlen($info['data']).'>>'); - $this->_putstream($info['data']); - unset($this->images[$file]['data']); - $this->_out('endobj'); - //Palette - if($info['cs']=='Indexed') - { - $this->_newobj(); - $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal']; - $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); - $this->_putstream($pal); - $this->_out('endobj'); - } - } -} - -function _putxobjectdict() -{ - foreach($this->images as $image) - $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); -} - -function _putresourcedict() -{ - $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); - $this->_out('/Font <<'); - foreach($this->fonts as $font) - $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); - $this->_out('>>'); - $this->_out('/XObject <<'); - $this->_putxobjectdict(); - $this->_out('>>'); -} - -function _putresources() -{ - $this->_putfonts(); - $this->_putimages(); - //Resource dictionary - $this->offsets[2]=strlen($this->buffer); - $this->_out('2 0 obj'); - $this->_out('<<'); - $this->_putresourcedict(); - $this->_out('>>'); - $this->_out('endobj'); -} - -function _putinfo() -{ - $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); - if(!empty($this->title)) - $this->_out('/Title '.$this->_textstring($this->title)); - if(!empty($this->subject)) - $this->_out('/Subject '.$this->_textstring($this->subject)); - if(!empty($this->author)) - $this->_out('/Author '.$this->_textstring($this->author)); - if(!empty($this->keywords)) - $this->_out('/Keywords '.$this->_textstring($this->keywords)); - if(!empty($this->creator)) - $this->_out('/Creator '.$this->_textstring($this->creator)); - $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); -} - -function _putcatalog() -{ - $this->_out('/Type /Catalog'); - $this->_out('/Pages 1 0 R'); - if($this->ZoomMode=='fullpage') - $this->_out('/OpenAction [3 0 R /Fit]'); - elseif($this->ZoomMode=='fullwidth') - $this->_out('/OpenAction [3 0 R /FitH null]'); - elseif($this->ZoomMode=='real') - $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); - elseif(!is_string($this->ZoomMode)) - $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']'); - if($this->LayoutMode=='single') - $this->_out('/PageLayout /SinglePage'); - elseif($this->LayoutMode=='continuous') - $this->_out('/PageLayout /OneColumn'); - elseif($this->LayoutMode=='two') - $this->_out('/PageLayout /TwoColumnLeft'); -} - -function _putheader() -{ - $this->_out('%PDF-'.$this->PDFVersion); -} - -function _puttrailer() -{ - $this->_out('/Size '.($this->n+1)); - $this->_out('/Root '.$this->n.' 0 R'); - $this->_out('/Info '.($this->n-1).' 0 R'); -} - -function _enddoc() -{ - $this->_putheader(); - $this->_putpages(); - $this->_putresources(); - //Info - $this->_newobj(); - $this->_out('<<'); - $this->_putinfo(); - $this->_out('>>'); - $this->_out('endobj'); - //Catalog - $this->_newobj(); - $this->_out('<<'); - $this->_putcatalog(); - $this->_out('>>'); - $this->_out('endobj'); - //Cross-ref - $o=strlen($this->buffer); - $this->_out('xref'); - $this->_out('0 '.($this->n+1)); - $this->_out('0000000000 65535 f '); - for($i=1;$i<=$this->n;$i++) - $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); - //Trailer - $this->_out('trailer'); - $this->_out('<<'); - $this->_puttrailer(); - $this->_out('>>'); - $this->_out('startxref'); - $this->_out($o); - $this->_out('%%EOF'); - $this->state=3; -} -//End of class -} - -//Handle special IE contype request -if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') -{ - header('Content-Type: application/pdf'); - exit; -} - -?> diff --git a/includes/fpdf/license.txt b/includes/fpdf/license.txt deleted file mode 100755 index fd811c6f..00000000 --- a/includes/fpdf/license.txt +++ /dev/null @@ -1,6 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software to use, copy, modify, distribute, sublicense, and/or sell -copies of the software, and to permit persons to whom the software is furnished -to do so. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. \ No newline at end of file diff --git a/includes/javascript/MIT-LICENSE b/includes/javascript/MIT-LICENSE deleted file mode 100644 index 36af55c2..00000000 --- a/includes/javascript/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/includes/javascript/controls.js b/includes/javascript/controls.js deleted file mode 100644 index bf24ddc3..00000000 --- a/includes/javascript/controls.js +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -Element.collectTextNodesIgnoreClass = function(element, ignoreclass1, ignoreclass2) { - var children = $(element).childNodes; - var text = ""; - - var classtest1 = new RegExp("^([^ ]+ )*" + ignoreclass1+ "( [^ ]+)*$","i"); // agileco mod - var classtest2 = new RegExp("^([^ ]+ )*" + ignoreclass2+ "( [^ ]+)*$","i"); // agileco add - - for (var i = 0; i < children.length; i++) { - if(children[i].nodeType==3) { - text+=children[i].nodeValue; - } else { - if((!children[i].className.match(classtest1)) && (!children[i].className.match(classtest2)) && children[i].hasChildNodes()) // agileco mod - text += Element.collectTextNodesIgnoreClass(children[i], ignoreclass1, ignoreclass2); - } - } - return text; -} - -Ajax.Autocompleter = Class.create(); -Ajax.Autocompleter.prototype = (new Ajax.Base()).extend({ - initialize: function(element, update, url, options) { - this.element = $(element); - this.hidden = element+'_hidden'; //agileco add - this.update = $(update); - this.has_focus = false; - this.changed = false; - this.active = false; - this.index = 0; - this.entry_count = 0; - this.url = url; - - this.setOptions(options); - this.options.asynchronous = true; - this.options.onComplete = this.onComplete.bind(this) - this.options.frequency = this.options.frequency || 0.4; - this.options.min_chars = this.options.min_chars || 1; - this.options.method = 'post'; - - this.options.onShow = this.options.onShow || - function(element, update){ - if(!update.style.position || update.style.position=='absolute') { - update.style.position = 'absolute'; - var offsets = Position.cumulativeOffset(element); - update.style.left = offsets[0] + 'px'; - update.style.top = (offsets[1] + element.offsetHeight) + 'px'; - update.style.width = element.offsetWidth + 'px'; - } - new Effect.Appear(update,{duration:0.3}); - }; - this.options.onHide = this.options.onHide || - function(element, update){ new Effect.Fade(update,{duration:0.3}) }; - - - if(this.options.indicator) - this.indicator = $(this.options.indicator); - - this.observer = null; - - Element.hide(this.update); - - Event.observe(this.element, "blur", this.onBlur.bindAsEventListener(this)); - Event.observe(this.element, "keypress", this.onKeyPress.bindAsEventListener(this)); - }, - - show: function() { - if(this.update.style.display=='none') this.options.onShow(this.element, this.update); - if(!this.iefix && (navigator.appVersion.indexOf('MSIE')>0) && this.update.style.position=='absolute') { - new Insertion.After(this.update, - ''); - this.iefix = $(this.update.id+'_iefix'); - } - if(this.iefix) { - Position.clone(this.update, this.iefix); - this.iefix.style.zIndex = 1; - this.update.style.zIndex = 2; - Element.show(this.iefix); - } - }, - - hide: function() { - if(this.update.style.display=='') this.options.onHide(this.element, this.update); - if(this.iefix) Element.hide(this.iefix); - }, - - startIndicator: function() { - if(this.indicator) Element.show(this.indicator); - }, - - stopIndicator: function() { - if(this.indicator) Element.hide(this.indicator); - }, - - onObserverEvent: function() { - this.changed = false; - if(this.element.value.length>=this.options.min_chars) { - this.startIndicator(); - this.options.parameters = this.options.callback ? - this.options.callback(this.element, Form.Element.getValue(this.element)) : - Form.Element.serialize(this.element); - new Ajax.Request(this.url, this.options); - } else { - this.active = false; - this.hide(); - } - }, - - addObservers: function(element) { - Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this)); - Event.observe(element, "click", this.onClick.bindAsEventListener(this)); - }, - - onComplete: function(request) { - if(!this.changed && this.has_focus) { - this.update.innerHTML = request.responseText; - Element.cleanWhitespace(this.update); - Element.cleanWhitespace(this.update.firstChild); - - if(this.update.firstChild && this.update.firstChild.childNodes) { - this.entry_count = - this.update.firstChild.childNodes.length; - for (var i = 0; i < this.entry_count; i++) { - entry = this.get_entry(i); - entry.autocompleteIndex = i; - this.addObservers(entry); - } - } else { - this.entry_count = 0; - } - - this.stopIndicator(); - - this.index = 0; - this.render(); - } - }, - - onKeyPress: function(event) { - if(this.active) - switch(event.keyCode) { - case Event.KEY_TAB: - case Event.KEY_RETURN: - this.select_entry(); - Event.stop(event); - case Event.KEY_ESC: - this.hide(); - this.active = false; - return; - case Event.KEY_LEFT: - case Event.KEY_RIGHT: - return; - case Event.KEY_UP: - this.mark_previous(); - this.render(); - if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); - return; - case Event.KEY_DOWN: - this.mark_next(); - this.render(); - if(navigator.appVersion.indexOf('AppleWebKit')>0) Event.stop(event); - return; - } - else - if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN) - return; - - this.changed = true; - this.has_focus = true; - - if(this.observer) clearTimeout(this.observer); - this.observer = - setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000); - }, - - onHover: function(event) { - var element = Event.findElement(event, 'LI'); - if(this.index != element.autocompleteIndex) - { - this.index = element.autocompleteIndex; - this.render(); - } - Event.stop(event); - }, - - onClick: function(event) { - var element = Event.findElement(event, 'LI'); - this.index = element.autocompleteIndex; - this.select_entry(); - Event.stop(event); - }, - - onBlur: function(event) { - // needed to make click events working - setTimeout(this.hide.bind(this), 250); - this.has_focus = false; - this.active = false; - }, - - render: function() { - if(this.entry_count > 0) { - for (var i = 0; i < this.entry_count; i++) - this.index==i ? - Element.addClassName(this.get_entry(i),"selected") : - Element.removeClassName(this.get_entry(i),"selected"); - - if(this.has_focus) { - if(this.get_current_entry().scrollIntoView) - this.get_current_entry().scrollIntoView(false); - - this.show(); - this.active = true; - } - } else this.hide(); - }, - - mark_previous: function() { - if(this.index > 0) this.index-- - else this.index = this.entry_count-1; - }, - - mark_next: function() { - if(this.index < this.entry_count-1) this.index++ - else this.index = 0; - }, - - get_entry: function(index) { - return this.update.firstChild.childNodes[index]; - }, - - get_current_entry: function() { - return this.get_entry(this.index); - }, - - select_entry: function() { //agileco - this.active = false; - value = Element.collectTextNodesIgnoreClass(this.get_current_entry(), 'informal', 'index').unescapeHTML(); // agileco mod - this.element.value = value; - this.element.focus(); - id = Element.collectTextNodesIgnoreClass(this.get_current_entry(), 'name', 'informal' ).unescapeHTML(); // agileco add - document.getElementById(this.hidden).value = id; // agileco add - } -}); diff --git a/includes/javascript/dragdrop.js b/includes/javascript/dragdrop.js deleted file mode 100644 index 20432a3c..00000000 --- a/includes/javascript/dragdrop.js +++ /dev/null @@ -1,476 +0,0 @@ -// Copyright (c) 2005 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// -// Element.Class part Copyright (c) 2005 by Rick Olson -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Element.Class = { - // Element.toggleClass(element, className) toggles the class being on/off - // Element.toggleClass(element, className1, className2) toggles between both classes, - // defaulting to className1 if neither exist - toggle: function(element, className) { - if(Element.Class.has(element, className)) { - Element.Class.remove(element, className); - if(arguments.length == 3) Element.Class.add(element, arguments[2]); - } else { - Element.Class.add(element, className); - if(arguments.length == 3) Element.Class.remove(element, arguments[2]); - } - }, - - // gets space-delimited classnames of an element as an array - get: function(element) { - element = $(element); - return element.className.split(' '); - }, - - // functions adapted from original functions by Gavin Kistner - remove: function(element) { - element = $(element); - var regEx; - for(var i = 1; i < arguments.length; i++) { - regEx = new RegExp("^" + arguments[i] + "\\b\\s*|\\s*\\b" + arguments[i] + "\\b", 'g'); - element.className = element.className.replace(regEx, '') - } - }, - - add: function(element) { - element = $(element); - for(var i = 1; i < arguments.length; i++) { - Element.Class.remove(element, arguments[i]); - element.className += (element.className.length > 0 ? ' ' : '') + arguments[i]; - } - }, - - // returns true if all given classes exist in said element - has: function(element) { - element = $(element); - if(!element || !element.className) return false; - var regEx; - for(var i = 1; i < arguments.length; i++) { - regEx = new RegExp("\\b" + arguments[i] + "\\b"); - if(!regEx.test(element.className)) return false; - } - return true; - }, - - // expects arrays of strings and/or strings as optional paramters - // Element.Class.has_any(element, ['classA','classB','classC'], 'classD') - has_any: function(element) { - element = $(element); - if(!element || !element.className) return false; - var regEx; - for(var i = 1; i < arguments.length; i++) { - if((typeof arguments[i] == 'object') && - (arguments[i].constructor == Array)) { - for(var j = 0; j < arguments[i].length; j++) { - regEx = new RegExp("\\b" + arguments[i][j] + "\\b"); - if(regEx.test(element.className)) return true; - } - } else { - regEx = new RegExp("\\b" + arguments[i] + "\\b"); - if(regEx.test(element.className)) return true; - } - } - return false; - }, - - childrenWith: function(element, className) { - var children = $(element).getElementsByTagName('*'); - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - if (Element.Class.has(children[i], className)) { - elements.push(children[i]); - break; - } - } - - return elements; - } -} - -/*--------------------------------------------------------------------------*/ - -var Droppables = { - drops: false, - - add: function(element) { - var element = $(element); - var options = { - greedy: true, - hoverclass: null - }.extend(arguments[1] || {}); - - // cache containers - if(options.containment) { - options._containers = new Array(); - var containment = options.containment; - if((typeof containment == 'object') && - (containment.constructor == Array)) { - for(var i=0; i0) window.scrollBy(0,0); - - Event.stop(event); - } - } -} - -/*--------------------------------------------------------------------------*/ - -SortableObserver = Class.create(); -SortableObserver.prototype = { - initialize: function(element, observer) { - this.element = $(element); - this.observer = observer; - this.lastValue = Sortable.serialize(this.element); - }, - onStart: function() { - this.lastValue = Sortable.serialize(this.element); - }, - onEnd: function() { - if(this.lastValue != Sortable.serialize(this.element)) - this.observer(this.element) - } -} - -Sortable = { - create: function(element) { - var element = $(element); - var options = { - tag: 'li', // assumes li children, override with tag: 'tagname' - overlap: 'vertical', // one of 'vertical', 'horizontal' - constraint: 'vertical', // one of 'vertical', 'horizontal', false - containment: element, // also takes array of elements (or id's); or false - handle: false, // or a CSS class - only: false, - hoverclass: null, - onChange: function() {}, - onUpdate: function() {} - }.extend(arguments[1] || {}); - element.sortable = options; - - // build options for the draggables - var options_for_draggable = { - revert: true, - constraint: options.constraint, - handle: handle }; - if(options.starteffect) - options_for_draggable.starteffect = options.starteffect; - if(options.reverteffect) - options_for_draggable.reverteffect = options.reverteffect; - if(options.endeffect) - options_for_draggable.endeffect = options.endeffect; - if(options.zindex) - options_for_draggable.zindex = options.zindex; - - // build options for the droppables - var options_for_droppable = { - overlap: options.overlap, - containment: options.containment, - hoverclass: options.hoverclass, - onHover: function(element, dropon, overlap) { - if(overlap>0.5) { - if(dropon.previousSibling != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, dropon); - if(dropon.parentNode!=oldParentNode && oldParentNode.sortable) - oldParentNode.sortable.onChange(element); - if(dropon.parentNode.sortable) - dropon.parentNode.sortable.onChange(element); - } - } else { - var nextElement = dropon.nextSibling || null; - if(nextElement != element) { - var oldParentNode = element.parentNode; - element.style.visibility = "hidden"; // fix gecko rendering - dropon.parentNode.insertBefore(element, nextElement); - if(dropon.parentNode!=oldParentNode && oldParentNode.sortable) - oldParentNode.sortable.onChange(element); - if(dropon.parentNode.sortable) - dropon.parentNode.sortable.onChange(element); - } - } - } - } - - // fix for gecko engine - Element.cleanWhitespace(element); - - // for onupdate - Draggables.addObserver(new SortableObserver(element, options.onUpdate)); - - // make it so - var elements = element.childNodes; - for (var i = 0; i < elements.length; i++) - if(elements[i].tagName && elements[i].tagName==options.tag.toUpperCase() && - (!options.only || (Element.Class.has(elements[i], options.only)))) { - - // handles are per-draggable - var handle = options.handle ? - Element.Class.childrenWith(elements[i], options.handle)[0] : elements[i]; - - new Draggable(elements[i], options_for_draggable.extend({ handle: handle })); - Droppables.add(elements[i], options_for_droppable); - } - - }, - serialize: function(element) { - var element = $(element); - var options = { - tag: element.sortable.tag, - only: element.sortable.only, - name: element.id - }.extend(arguments[1] || {}); - - var items = $(element).childNodes; - var queryComponents = new Array(); - - for(var i=0; i= this.finishOn) { - this.render(this.options.to); - if(this.finish) this.finish(); - if(this.options.afterFinish) this.options.afterFinish(this); - return; - } - pos = (timePos - this.startOn) / (this.finishOn - this.startOn); - frame = Math.round(pos * this.options.fps * this.options.duration); - if(frame > this.currentFrame) { - this.render(pos); - this.currentFrame = frame; - } - this.timeout = setTimeout(this.loop.bind(this), 10); - }, - render: function(pos) { - if(this.options.transition) pos = this.options.transition(pos); - pos = pos * (this.options.to-this.options.from); - pos += this.options.from; - if(this.options.beforeUpdate) this.options.beforeUpdate(this); - if(this.update) this.update(pos); - if(this.options.afterUpdate) this.options.afterUpdate(this); - }, - cancel: function() { - if(this.timeout) clearTimeout(this.timeout); - } -} - -Effect.Parallel = Class.create(); - Effect.Parallel.prototype = (new Effect.Base()).extend({ - initialize: function(effects) { - this.effects = effects || []; - this.start(arguments[1]); - }, - update: function(position) { - for (var i = 0; i < this.effects.length; i++) - this.effects[i].render(position); - }, - finish: function(position) { - for (var i = 0; i < this.effects.length; i++) - if(this.effects[i].finish) this.effects[i].finish(position); - } - }); - -// Internet Explorer caveat: works only on elements the have -// a 'layout', meaning having a given width or height. -// There is no way to safely set this automatically. -Effect.Opacity = Class.create(); -Effect.Opacity.prototype = (new Effect.Base()).extend({ - initialize: function(element) { - this.element = $(element); - options = { - from: 0.0, - to: 1.0 - }.extend(arguments[1] || {}); - this.start(options); - }, - update: function(position) { - this.setOpacity(position); - }, - setOpacity: function(opacity) { - opacity = (opacity == 1) ? 0.99999 : opacity; - this.element.style.opacity = opacity; - this.element.style.filter = "alpha(opacity:"+opacity*100+")"; - } -}); - -Effect.MoveBy = Class.create(); - Effect.MoveBy.prototype = (new Effect.Base()).extend({ - initialize: function(element, toTop, toLeft) { - this.element = $(element); - this.originalTop = parseFloat(this.element.style.top || '0'); - this.originalLeft = parseFloat(this.element.style.left || '0'); - this.toTop = toTop; - this.toLeft = toLeft; - if(this.element.style.position == "") - this.element.style.position = "relative"; - this.start(arguments[3]); - }, - update: function(position) { - topd = this.toTop * position + this.originalTop; - leftd = this.toLeft * position + this.originalLeft; - this.setPosition(topd, leftd); - }, - setPosition: function(topd, leftd) { - this.element.style.top = topd + "px"; - this.element.style.left = leftd + "px"; - } -}); - -Effect.Scale = Class.create(); -Effect.Scale.prototype = (new Effect.Base()).extend({ - initialize: function(element, percent) { - this.element = $(element) - options = { - scaleX: true, - scaleY: true, - scaleContent: true, - scaleFromCenter: false, - scaleMode: 'box', // 'box' or 'contents' or {} with provided values - scaleFrom: 100.0 - }.extend(arguments[2] || {}); - this.originalTop = this.element.offsetTop; - this.originalLeft = this.element.offsetLeft; - if (this.element.style.fontSize=="") this.sizeEm = 1.0; - if (this.element.style.fontSize && this.element.style.fontSize.indexOf("em")>0) - this.sizeEm = parseFloat(this.element.style.fontSize); - this.factor = (percent/100.0) - (options.scaleFrom/100.0); - if(options.scaleMode=='box') { - this.originalHeight = this.element.clientHeight; - this.originalWidth = this.element.clientWidth; - } else - if(options.scaleMode=='contents') { - this.originalHeight = this.element.scrollHeight; - this.originalWidth = this.element.scrollWidth; - } else { - this.originalHeight = options.scaleMode.originalHeight; - this.originalWidth = options.scaleMode.originalWidth; - } - this.start(options); - }, - - update: function(position) { - currentScale = (this.options.scaleFrom/100.0) + (this.factor * position); - if(this.options.scaleContent && this.sizeEm) - this.element.style.fontSize = this.sizeEm*currentScale + "em"; - this.setDimensions( - this.originalWidth * currentScale, - this.originalHeight * currentScale); - }, - - setDimensions: function(width, height) { - if(this.options.scaleX) this.element.style.width = width + 'px'; - if(this.options.scaleY) this.element.style.height = height + 'px'; - if(this.options.scaleFromCenter) { - topd = (height - this.originalHeight)/2; - leftd = (width - this.originalWidth)/2; - if(this.element.style.position=='absolute') { - if(this.options.scaleY) this.element.style.top = this.originalTop-topd + "px"; - if(this.options.scaleX) this.element.style.left = this.originalLeft-leftd + "px"; - } else { - if(this.options.scaleY) this.element.style.top = -topd + "px"; - if(this.options.scaleX) this.element.style.left = -leftd + "px"; - } - } - } -}); - -Effect.Highlight = Class.create(); -Effect.Highlight.prototype = (new Effect.Base()).extend({ - initialize: function(element) { - this.element = $(element); - - // try to parse current background color as default for endcolor - // browser stores this as: "rgb(255, 255, 255)", convert to "#ffffff" format - var endcolor = "#ffffff"; - var current = this.element.style.backgroundColor; - if(current && current.slice(0,4) == "rgb(") { - endcolor = "#"; - var cols = current.slice(4,current.length-1).split(','); - var i=0; do { endcolor += parseInt(cols[i]).toColorPart() } while (++i<3); } - - var options = { - startcolor: "#ffff99", - endcolor: endcolor - }.extend(arguments[1] || {}); - - // init color calculations - this.colors_base = [ - parseInt(options.startcolor.slice(1,3),16), - parseInt(options.startcolor.slice(3,5),16), - parseInt(options.startcolor.slice(5),16) ]; - this.colors_delta = [ - parseInt(options.endcolor.slice(1,3),16)-this.colors_base[0], - parseInt(options.endcolor.slice(3,5),16)-this.colors_base[1], - parseInt(options.endcolor.slice(5),16)-this.colors_base[2] ]; - - this.start(options); - }, - update: function(position) { - var colors = [ - Math.round(this.colors_base[0]+(this.colors_delta[0]*position)), - Math.round(this.colors_base[1]+(this.colors_delta[1]*position)), - Math.round(this.colors_base[2]+(this.colors_delta[2]*position)) ]; - this.element.style.backgroundColor = "#" + - colors[0].toColorPart() + colors[1].toColorPart() + colors[2].toColorPart(); - } -}); - - -/* ------------- prepackaged effects ------------- */ - -Effect.Fade = function(element) { - options = { - from: 1.0, - to: 0.0, - afterFinish: function(effect) - { Element.hide(effect.element); - effect.setOpacity(1); } - }.extend(arguments[1] || {}); - new Effect.Opacity(element,options); -} - -Effect.Appear = function(element) { - options = { - from: 0.0, - to: 1.0, - beforeStart: function(effect) - { effect.setOpacity(0); - Element.show(effect.element); }, - afterUpdate: function(effect) - { Element.show(effect.element); } - }.extend(arguments[1] || {}); - new Effect.Opacity(element,options); -} - -Effect.Puff = function(element) { - new Effect.Parallel( - [ new Effect.Scale(element, 200, { sync: true, scaleFromCenter: true }), - new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], - { duration: 1.0, - afterUpdate: function(effect) - { effect.effects[0].element.style.position = 'absolute'; }, - afterFinish: function(effect) - { Element.hide(effect.effects[0].element); } - } - ); -} - -Effect.BlindUp = function(element) { - $(element)._overflow = $(element).style.overflow || 'visible'; - $(element).style.overflow = 'hidden'; - new Effect.Scale(element, 0, - { scaleContent: false, - scaleX: false, - afterFinish: function(effect) - { - Element.hide(effect.element); - effect.element.style.overflow = effect.element._overflow; - } - }.extend(arguments[1] || {}) - ); -} - -Effect.BlindDown = function(element) { - $(element).style.height = '0px'; - $(element)._overflow = $(element).style.overflow || 'visible'; - $(element).style.overflow = 'hidden'; - Element.show(element); - new Effect.Scale(element, 100, - { scaleContent: false, - scaleX: false, - scaleMode: 'contents', - scaleFrom: 0, - afterFinish: function(effect) { - effect.element.style.overflow = effect.element._overflow; - } - }.extend(arguments[1] || {}) - ); -} - -Effect.SwitchOff = function(element) { - new Effect.Appear(element, - { duration: 0.4, - transition: Effect.Transitions.flicker, - afterFinish: function(effect) - { effect.element.style.overflow = 'hidden'; - new Effect.Scale(effect.element, 1, - { duration: 0.3, scaleFromCenter: true, - scaleX: false, scaleContent: false, - afterUpdate: function(effect) { - if(effect.element.style.position=="") - effect.element.style.position = 'relative'; }, - afterFinish: function(effect) { Element.hide(effect.element); } - } ) - } - } ) -} - -Effect.DropOut = function(element) { - new Effect.Parallel( - [ new Effect.MoveBy(element, 100, 0, { sync: true }), - new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0 } ) ], - { duration: 0.5, - afterFinish: function(effect) - { Element.hide(effect.effects[0].element); } - }); -} - -Effect.Shake = function(element) { - new Effect.MoveBy(element, 0, 20, - { duration: 0.05, afterFinish: function(effect) { - new Effect.MoveBy(effect.element, 0, -40, - { duration: 0.1, afterFinish: function(effect) { - new Effect.MoveBy(effect.element, 0, 40, - { duration: 0.1, afterFinish: function(effect) { - new Effect.MoveBy(effect.element, 0, -40, - { duration: 0.1, afterFinish: function(effect) { - new Effect.MoveBy(effect.element, 0, 40, - { duration: 0.1, afterFinish: function(effect) { - new Effect.MoveBy(effect.element, 0, -20, - { duration: 0.05, afterFinish: function(effect) { - }}) }}) }}) }}) }}) }}); -} - -Effect.SlideDown = function(element) { - $(element)._overflow = $(element).style.overflow || 'visible'; - $(element).style.height = '0px'; - $(element).style.overflow = 'hidden'; - $(element).firstChild.style.position = 'relative'; - Element.show(element); - new Effect.Scale(element, 100, - { scaleContent: false, - scaleX: false, - scaleMode: 'contents', - scaleFrom: 0, - afterUpdate: function(effect) - { effect.element.firstChild.style.bottom = - (effect.originalHeight - effect.element.clientHeight) + 'px'; }, - afterFinish: function(effect) - { effect.element.style.overflow = effect.element._overflow; } - }.extend(arguments[1] || {}) - ); -} - -Effect.SlideUp = function(element) { - $(element)._overflow = $(element).style.overflow || 'visible'; - $(element).style.overflow = 'hidden'; - $(element).firstChild.style.position = 'relative'; - Element.show(element); - new Effect.Scale(element, 0, - { scaleContent: false, - scaleX: false, - afterUpdate: function(effect) - { effect.element.firstChild.style.bottom = - (effect.originalHeight - effect.element.clientHeight) + 'px'; }, - afterFinish: function(effect) - { - Element.hide(effect.element); - effect.element.style.overflow = effect.element._overflow; - } - }.extend(arguments[1] || {}) - ); -} - -Effect.Squish = function(element) { - new Effect.Scale(element, 0, - { afterFinish: function(effect) { Element.hide(effect.element); } }); -} - -Effect.Grow = function(element) { - element = $(element); - var options = arguments[1] || {}; - - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - element.style.overflow = 'hidden'; - Element.show(element); - - var direction = options.direction || 'center'; - var moveTransition = options.moveTransition || Effect.Transitions.sinoidal; - var scaleTransition = options.scaleTransition || Effect.Transitions.sinoidal; - var opacityTransition = options.opacityTransition || Effect.Transitions.full; - - var initialMoveX, initialMoveY; - var moveX, moveY; - - switch (direction) { - case 'top-left': - initialMoveX = initialMoveY = moveX = moveY = 0; - break; - case 'top-right': - initialMoveX = originalWidth; - initialMoveY = moveY = 0; - moveX = -originalWidth; - break; - case 'bottom-left': - initialMoveX = moveX = 0; - initialMoveY = originalHeight; - moveY = -originalHeight; - break; - case 'bottom-right': - initialMoveX = originalWidth; - initialMoveY = originalHeight; - moveX = -originalWidth; - moveY = -originalHeight; - break; - case 'center': - initialMoveX = originalWidth / 2; - initialMoveY = originalHeight / 2; - moveX = -originalWidth / 2; - moveY = -originalHeight / 2; - break; - } - - new Effect.MoveBy(element, initialMoveY, initialMoveX, { - duration: 0.01, - beforeUpdate: function(effect) { $(element).style.height = '0px'; }, - afterFinish: function(effect) { - new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 1.0, from: 0.0, transition: opacityTransition }), - new Effect.MoveBy(element, moveY, moveX, { sync: true, transition: moveTransition }), - new Effect.Scale(element, 100, { - scaleMode: { originalHeight: originalHeight, originalWidth: originalWidth }, - sync: true, scaleFrom: 0, scaleTo: 100, transition: scaleTransition })], - options); } - }); -} - -Effect.Shrink = function(element) { - element = $(element); - var options = arguments[1] || {}; - - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - element.style.overflow = 'hidden'; - Element.show(element); - - var direction = options.direction || 'center'; - var moveTransition = options.moveTransition || Effect.Transitions.sinoidal; - var scaleTransition = options.scaleTransition || Effect.Transitions.sinoidal; - var opacityTransition = options.opacityTransition || Effect.Transitions.none; - - var moveX, moveY; - - switch (direction) { - case 'top-left': - moveX = moveY = 0; - break; - case 'top-right': - moveX = originalWidth; - moveY = 0; - break; - case 'bottom-left': - moveX = 0; - moveY = originalHeight; - break; - case 'bottom-right': - moveX = originalWidth; - moveY = originalHeight; - break; - case 'center': - moveX = originalWidth / 2; - moveY = originalHeight / 2; - break; - } - - new Effect.Parallel( - [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: opacityTransition }), - new Effect.Scale(element, 0, { sync: true, transition: moveTransition }), - new Effect.MoveBy(element, moveY, moveX, { sync: true, transition: scaleTransition }) ], - options); -} - -Effect.Pulsate = function(element) { - var options = arguments[1] || {}; - var transition = options.transition || Effect.Transitions.sinoidal; - var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos)) }; - reverser.bind(transition); - new Effect.Opacity(element, - { duration: 3.0, - afterFinish: function(effect) { Element.show(effect.element); } - }.extend(options).extend({transition: reverser})); -} - -Effect.Fold = function(element) { - $(element).style.overflow = 'hidden'; - new Effect.Scale(element, 5, { - scaleContent: false, - scaleTo: 100, - scaleX: false, - afterFinish: function(effect) { - new Effect.Scale(element, 1, { - scaleContent: false, - scaleTo: 0, - scaleY: false, - afterFinish: function(effect) { Element.hide(effect.element) } }); - }}.extend(arguments[1] || {})); -} - -// old: new Effect.ContentZoom(element, percent) -// new: Element.setContentZoom(element, percent) - -Element.setContentZoom = function(element, percent) { - var element = $(element); - element.style.fontSize = (percent/100) + "em"; - if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); -} diff --git a/includes/javascript/prototype.js b/includes/javascript/prototype.js deleted file mode 100644 index 54d22c75..00000000 --- a/includes/javascript/prototype.js +++ /dev/null @@ -1,1027 +0,0 @@ -/* Prototype JavaScript framework, version 1.3.0 - * (c) 2005 Sam Stephenson - * - * THIS FILE IS AUTOMATICALLY GENERATED. When sending patches, please diff - * against the source tree, available from the Prototype darcs repository. - * - * Prototype is freely distributable under the terms of an MIT-style license. - * - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.3.0', - emptyFunction: function() {} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.prototype.extend = function(object) { - return Object.extend.apply(this, [this, object]); -} - -Function.prototype.bind = function(object) { - var __method = this; - return function() { - __method.apply(object, arguments); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - __method.call(object, event || window.event); - } -} - -Number.prototype.toColorPart = function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; -} - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} - -if (!Array.prototype.push) { - Array.prototype.push = function() { - var startLength = this.length; - for (var i = 0; i < arguments.length; i++) - this[startLength + i] = arguments[i]; - return this.length; - } -} - -if (!Function.prototype.apply) { - // Based on code from http://www.youngpup.net/ - Function.prototype.apply = function(object, parameters) { - var parameterStrings = new Array(); - if (!object) object = window; - if (!parameters) parameters = new Array(); - - for (var i = 0; i < parameters.length; i++) - parameterStrings[i] = 'parameters[' + i + ']'; - - object.__apply__ = this; - var result = eval('object.__apply__(' + - parameterStrings[i].join(', ') + ')'); - object.__apply__ = null; - - return result; - } -} - -String.prototype.extend({ - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0].nodeValue; - } -}); - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - } -} - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - }.extend(options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = (new Ajax.Base()).extend({ - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - if (this.options.method == 'get') - url += '?' + parameters; - - this.transport.open(this.options.method, url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - - if (event == 'Complete' && this.responseIsFailure()) - (this.options['on' + this.transport.status] - || this.options.onFailure - || Prototype.emptyFunction)(this.transport); - - (this.options['on' + event] || Prototype.emptyFunction)(this.transport); - } -}); - -Ajax.Updater = Class.create(); -Ajax.Updater.ScriptFragment = '(?:)((\n|.)*?)(?:<\/script>)'; - -Ajax.Updater.prototype.extend(Ajax.Request.prototype).extend({ - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function() { - this.updateContent(); - onComplete(this.transport); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - - var match = new RegExp(Ajax.Updater.ScriptFragment, 'img'); - var response = this.transport.responseText.replace(match, ''); - var scripts = this.transport.responseText.match(match); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - receiver.innerHTML = response; - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout((function() {this.onComplete( - this.transport)}).bind(this), 10); - } - - if (this.options.evalScripts && scripts) { - match = new RegExp(Ajax.Updater.ScriptFragment, 'im'); - setTimeout((function() { - for (var i = 0; i < scripts.length; i++) - eval(scripts[i].match(match)[1]); - }).bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = (new Ajax.Base()).extend({ - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = 1; - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Ajax.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); - -document.getElementsByClassName = function(className) { - var children = document.getElementsByTagName('*') || document.all; - var elements = new Array(); - - for (var i = 0; i < children.length; i++) { - var child = children[i]; - var classNames = child.className.split(' '); - for (var j = 0; j < classNames.length; j++) { - if (classNames[j] == className) { - elements.push(child); - break; - } - } - } - - return elements; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = - (element.style.display == 'none' ? '' : 'none'); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - hasClassName: function(element, className) { - element = $(element); - if (!element) - return; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] == className) - return true; - } - return false; - }, - - addClassName: function(element, className) { - element = $(element); - Element.removeClassName(element, className); - element.className += ' ' + className; - }, - - removeClassName: function(element, className) { - element = $(element); - if (!element) - return; - var newClassName = ''; - var a = element.className.split(' '); - for (var i = 0; i < a.length; i++) { - if (a[i] != className) { - if (i > 0) - newClassName += ' '; - newClassName += a[i]; - } - } - element.className = newClassName; - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - var element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content; - - if (this.adjacency && this.element.insertAdjacentHTML) { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.fragment = this.range.createContextualFragment(this.content); - this.insertContent(); - } - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = (new Abstract.Insertion('beforeBegin')).extend({ - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, this.element); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = (new Abstract.Insertion('afterBegin')).extend({ - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function() { - this.element.insertBefore(this.fragment, this.element.firstChild); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = (new Abstract.Insertion('beforeEnd')).extend({ - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function() { - this.element.appendChild(this.fragment); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = (new Abstract.Insertion('afterEnd')).extend({ - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function() { - this.element.parentNode.insertBefore(this.fragment, - this.element.nextSibling); - } -}); - -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - $(element).focus(); - $(element).select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - var form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - var form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - focusFirstElement: function(form) { - var form = $(form); - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - if (element.type != 'hidden' && !element.disabled) { - Field.activate(element); - break; - } - } - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return encodeURIComponent(parameter[0]) + '=' + - encodeURIComponent(parameter[1]); - }, - - getValue: function(element) { - var element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - var value = ''; - if (element.type == 'select-one') { - var index = element.selectedIndex; - if (index >= 0) - value = element.options[index].value || element.options[index].text; - } else { - value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) - value.push(opt.value || opt.text); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = (new Abstract.TimedObserver()).extend({ - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = (new Abstract.TimedObserver()).extend({ - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - element.target = this; - element.prev_onclick = element.onclick || Prototype.emptyFunction; - element.onclick = function() { - this.prev_onclick(); - this.target.onElementEvent(); - } - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - element.target = this; - element.prev_onchange = element.onchange || Prototype.emptyFunction; - element.onchange = function() { - this.prev_onchange(); - this.target.onElementEvent(); - } - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = (new Abstract.EventObserver()).extend({ - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = (new Abstract.EventObserver()).extend({ - getValue: function() { - return Form.serialize(this.element); - } -}); - - -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observe: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress') { - if (navigator.appVersion.indexOf('AppleWebKit') > 0) { - element.addEventListener('keydown', observer, useCapture); - return; - } - if (element.addEventListener) { - element.addEventListener('keypress', observer, useCapture); - } else if (element.attachEvent) { - element.attachEvent('onkeydown', observer); - } - } else { - if (element.addEventListener) { - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - element.attachEvent('on' + name, observer); - } - } - }, - - stopObserving: function(element, name, observer, useCapture) { - var element = $(element); - useCapture = useCapture || false; - - if (name == 'keypress') { - if (navigator.appVersion.indexOf('AppleWebKit') > 0) { - element.removeEventListener('keydown', observer, useCapture); - return; - } - if (element.removeEventListener) { - element.removeEventListener('keypress', observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('onkeydown', observer); - } - } else { - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } - } -}); - -var Position = { - - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - } -} \ No newline at end of file diff --git a/includes/jscalendar/README.txt b/includes/jscalendar/README.txt deleted file mode 100644 index 455ab3d4..00000000 --- a/includes/jscalendar/README.txt +++ /dev/null @@ -1,33 +0,0 @@ -The DHTML Calendar -------------------- - - Author: Mihai Bazon, - http://dynarch.com/mishoo/ - - This program is free software published under the - terms of the GNU Lesser General Public License. - - For the entire license text please refer to - http://www.gnu.org/licenses/lgpl.html - -Contents ---------- - - calendar.js -- the main program file - lang/*.js -- internalization files - *.css -- color themes - cal.html -- example usage file - doc/ -- documentation, in PDF and HTML - simple-1.html -- quick setup examples [popup calendars] - simple-2.html -- quick setup example for flat calendar - calendar.php -- PHP wrapper - test.php -- test file for the PHP wrapper - -Homepage ---------- - - For details and latest versions please refer to calendar - homepage, located on my website: - - http://dynarch.com/mishoo/calendar.epl - diff --git a/includes/jscalendar/calendar-blue.css b/includes/jscalendar/calendar-blue.css deleted file mode 100644 index ca33cde0..00000000 --- a/includes/jscalendar/calendar-blue.css +++ /dev/null @@ -1,232 +0,0 @@ -/* The main calendar widget. DIV containing a table. */ - -div.calendar { position: relative; } - -.calendar, .calendar table { - border: 1px solid #556; - font-size: 11px; - color: #000; - cursor: default; - background: #eef; - font-family: tahoma,verdana,sans-serif; -} - -/* Header part -- contains navigation buttons and day names. */ - -.calendar .button { /* "<<", "<", ">", ">>" buttons have this class */ - text-align: center; /* They are the navigation buttons */ - padding: 2px; /* Make the buttons seem like they're pressing */ -} - -.calendar .nav { - background: #778 url(menuarrow.gif) no-repeat 100% 100%; -} - -.calendar thead .title { /* This holds the current "month, year" */ - font-weight: bold; /* Pressing it will take you to the current date */ - text-align: center; - background: #fff; - color: #000; - padding: 2px; -} - -.calendar thead .headrow { /* Row containing navigation buttons */ - background: #778; - color: #fff; -} - -.calendar thead .daynames { /* Row containing the day names */ - background: #bdf; -} - -.calendar thead .name { /* Cells containing the day names */ - border-bottom: 1px solid #556; - padding: 2px; - text-align: center; - color: #000; -} - -.calendar thead .weekend { /* How a weekend day name shows in header */ - color: #a66; -} - -.calendar thead .hilite { /* How do the buttons in header appear when hover */ - background-color: #aaf; - color: #000; - border: 1px solid #04f; - padding: 1px; -} - -.calendar thead .active { /* Active (pressed) buttons in header */ - background-color: #77c; - padding: 2px 0px 0px 2px; -} - -/* The body part -- contains all the days in month. */ - -.calendar tbody .day { /* Cells containing month days dates */ - width: 2em; - color: #456; - text-align: right; - padding: 2px 4px 2px 2px; -} -.calendar tbody .day.othermonth { - font-size: 80%; - color: #bbb; -} -.calendar tbody .day.othermonth.oweekend { - color: #fbb; -} - -.calendar table .wn { - padding: 2px 3px 2px 2px; - border-right: 1px solid #000; - background: #bdf; -} - -.calendar tbody .rowhilite td { - background: #def; -} - -.calendar tbody .rowhilite td.wn { - background: #eef; -} - -.calendar tbody td.hilite { /* Hovered cells */ - background: #def; - padding: 1px 3px 1px 1px; - border: 1px solid #bbb; -} - -.calendar tbody td.active { /* Active (pressed) cells */ - background: #cde; - padding: 2px 2px 0px 2px; -} - -.calendar tbody td.selected { /* Cell showing today date */ - font-weight: bold; - border: 1px solid #000; - padding: 1px 3px 1px 1px; - background: #fff; - color: #000; -} - -.calendar tbody td.weekend { /* Cells showing weekend days */ - color: #a66; -} - -.calendar tbody td.today { /* Cell showing selected date */ - font-weight: bold; - color: #00f; -} - -.calendar tbody .disabled { color: #999; } - -.calendar tbody .emptycell { /* Empty cells (the best is to hide them) */ - visibility: hidden; -} - -.calendar tbody .emptyrow { /* Empty row (some months need less than 6 rows) */ - display: none; -} - -/* The footer part -- status bar and "Close" button */ - -.calendar tfoot .footrow { /* The in footer (only one right now) */ - text-align: center; - background: #556; - color: #fff; -} - -.calendar tfoot .ttip { /* Tooltip (status bar) cell */ - background: #fff; - color: #445; - border-top: 1px solid #556; - padding: 1px; -} - -.calendar tfoot .hilite { /* Hover style for buttons in footer */ - background: #aaf; - border: 1px solid #04f; - color: #000; - padding: 1px; -} - -.calendar tfoot .active { /* Active (pressed) style for buttons in footer */ - background: #77c; - padding: 2px 0px 0px 2px; -} - -/* Combo boxes (menus that display months/years for direct selection) */ - -.calendar .combo { - position: absolute; - display: none; - top: 0px; - left: 0px; - width: 4em; - cursor: default; - border: 1px solid #655; - background: #def; - color: #000; - font-size: 90%; - z-index: 100; -} - -.calendar .combo .label, -.calendar .combo .label-IEfix { - text-align: center; - padding: 1px; -} - -.calendar .combo .label-IEfix { - width: 4em; -} - -.calendar .combo .hilite { - background: #acf; -} - -.calendar .combo .active { - border-top: 1px solid #46a; - border-bottom: 1px solid #46a; - background: #eef; - font-weight: bold; -} - -.calendar td.time { - border-top: 1px solid #000; - padding: 1px 0px; - text-align: center; - background-color: #f4f0e8; -} - -.calendar td.time .hour, -.calendar td.time .minute, -.calendar td.time .ampm { - padding: 0px 3px 0px 4px; - border: 1px solid #889; - font-weight: bold; - background-color: #fff; -} - -.calendar td.time .ampm { - text-align: center; -} - -.calendar td.time .colon { - padding: 0px 2px 0px 3px; - font-weight: bold; -} - -.calendar td.time span.hilite { - border-color: #000; - background-color: #667; - color: #fff; -} - -.calendar td.time span.active { - border-color: #f00; - background-color: #000; - color: #0f0; -} diff --git a/includes/jscalendar/calendar-setup_stripped.js b/includes/jscalendar/calendar-setup_stripped.js deleted file mode 100644 index 75b2b10a..00000000 --- a/includes/jscalendar/calendar-setup_stripped.js +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright Mihai Bazon, 2002, 2003 | http://dynarch.com/mishoo/ - * --------------------------------------------------------------------------- - * - * The DHTML Calendar - * - * Details and latest version at: - * http://dynarch.com/mishoo/calendar.epl - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - * - * This file defines helper functions for setting up the calendar. They are - * intended to help non-programmers get a working calendar on their site - * quickly. This script should not be seen as part of the calendar. It just - * shows you what one can do with the calendar, while in the same time - * providing a quick and simple method for setting it up. If you need - * exhaustive customization of the calendar creation process feel free to - * modify this code to suit your needs (this is recommended and much better - * than modifying calendar.js itself). - */ - Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateTooltipFunc",null);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",true);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",true);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",true);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n Nothing to setup (no fields found). Please check your code");return false;}function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")p.inputField.onchange();}if(update&&p.displayArea)p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")p.flatCallback(cal);}if(update&&p.singleClick&&cal.dateClicked)cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n Flat specified but can't find parent.");return false;}var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.setDateToolTipHandler(params.dateTooltipFunc);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}cal.create(params.flat);cal.show();return false;}var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&¶ms.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.setDateToolTipHandler(params.dateTooltipFunc);cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)cal.setDate(params.date);cal.hide();}if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)cal.create();cal.refresh();if(!params.position)cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else cal.showAt(params.position[0],params.position[1]);return false;};return cal;}; diff --git a/includes/jscalendar/calendar_stripped.js b/includes/jscalendar/calendar_stripped.js deleted file mode 100644 index 1df50c99..00000000 --- a/includes/jscalendar/calendar_stripped.js +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright Mihai Bazon, 2002-2005 | www.bazon.net/mishoo - * ----------------------------------------------------------- - * - * The DHTML Calendar, version 1.0 "It is happening again" - * - * Details and latest version at: - * www.dynarch.com/projects/calendar - * - * This script is developed by Dynarch.com. Visit us at www.dynarch.com. - * - * This script is distributed under the GNU Lesser General Public License. - * Read the entire license text here: http://www.gnu.org/licenses/lgpl.html - */ - Calendar=function(firstDayOfWeek,dateStr,onSelected,onClose){this.activeDiv=null;this.currentDateEl=null;this.getDateStatus=null;this.getDateToolTip=null;this.getDateText=null;this.timeout=null;this.onSelected=onSelected||null;this.onClose=onClose||null;this.dragging=false;this.hidden=false;this.minYear=1970;this.maxYear=2050;this.dateFormat=Calendar._TT["DEF_DATE_FORMAT"];this.ttDateFormat=Calendar._TT["TT_DATE_FORMAT"];this.isPopup=true;this.weekNumbers=true;this.firstDayOfWeek=typeof firstDayOfWeek=="number"?firstDayOfWeek:Calendar._FD;this.showsOtherMonths=false;this.dateStr=dateStr;this.ar_days=null;this.showsTime=false;this.time24=true;this.yearStep=2;this.hiliteToday=true;this.multiple=null;this.table=null;this.element=null;this.tbody=null;this.firstdayname=null;this.monthsCombo=null;this.yearsCombo=null;this.hilitedMonth=null;this.activeMonth=null;this.hilitedYear=null;this.activeYear=null;this.dateClicked=false;if(typeof Calendar._SDN=="undefined"){if(typeof Calendar._SDN_len=="undefined")Calendar._SDN_len=3;var ar=new Array();for(var i=8;i>0;){ar[--i]=Calendar._DN[i].substr(0,Calendar._SDN_len);}Calendar._SDN=ar;if(typeof Calendar._SMN_len=="undefined")Calendar._SMN_len=3;ar=new Array();for(var i=12;i>0;){ar[--i]=Calendar._MN[i].substr(0,Calendar._SMN_len);}Calendar._SMN=ar;}};Calendar._C=null;Calendar.is_ie=(/msie/i.test(navigator.userAgent)&&!/opera/i.test(navigator.userAgent));Calendar.is_ie5=(Calendar.is_ie&&/msie 5\.0/i.test(navigator.userAgent));Calendar.is_opera=/opera/i.test(navigator.userAgent);Calendar.is_khtml=/Konqueror|Safari|KHTML/i.test(navigator.userAgent);Calendar.getAbsolutePos=function(el){var SL=0,ST=0;var is_div=/^div$/i.test(el.tagName);if(is_div&&el.scrollLeft)SL=el.scrollLeft;if(is_div&&el.scrollTop)ST=el.scrollTop;var r={x:el.offsetLeft-SL,y:el.offsetTop-ST};if(el.offsetParent){var tmp=this.getAbsolutePos(el.offsetParent);r.x+=tmp.x;r.y+=tmp.y;}return r;};Calendar.isRelated=function(el,evt){var related=evt.relatedTarget;if(!related){var type=evt.type;if(type=="mouseover"){related=evt.fromElement;}else if(type=="mouseout"){related=evt.toElement;}}while(related){if(related==el){return true;}related=related.parentNode;}return false;};Calendar.removeClass=function(el,className){if(!(el&&el.className)){return;}var cls=el.className.split(" ");var ar=new Array();for(var i=cls.length;i>0;){if(cls[--i]!=className){ar[ar.length]=cls[i];}}el.className=ar.join(" ");};Calendar.addClass=function(el,className){Calendar.removeClass(el,className);el.className+=" "+className;};Calendar.getElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.currentTarget;while(f.nodeType!=1||/^div$/i.test(f.tagName))f=f.parentNode;return f;};Calendar.getTargetElement=function(ev){var f=Calendar.is_ie?window.event.srcElement:ev.target;while(f.nodeType!=1)f=f.parentNode;return f;};Calendar.stopEvent=function(ev){ev||(ev=window.event);if(Calendar.is_ie){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}return false;};Calendar.addEvent=function(el,evname,func){if(el.attachEvent){el.attachEvent("on"+evname,func);}else if(el.addEventListener){el.addEventListener(evname,func,true);}else{el["on"+evname]=func;}};Calendar.removeEvent=function(el,evname,func){if(el.detachEvent){el.detachEvent("on"+evname,func);}else if(el.removeEventListener){el.removeEventListener(evname,func,true);}else{el["on"+evname]=null;}};Calendar.createElement=function(type,parent){var el=null;if(document.createElementNS){el=document.createElementNS("http://www.w3.org/1999/xhtml",type);}else{el=document.createElement(type);}if(typeof parent!="undefined"){parent.appendChild(el);}return el;};Calendar._add_evs=function(el){with(Calendar){addEvent(el,"mouseover",dayMouseOver);addEvent(el,"mousedown",dayMouseDown);addEvent(el,"mouseout",dayMouseOut);if(is_ie){addEvent(el,"dblclick",dayMouseDblClick);el.setAttribute("unselectable",true);}}};Calendar.findMonth=function(el){if(typeof el.month!="undefined"){return el;}else if(typeof el.parentNode.month!="undefined"){return el.parentNode;}return null;};Calendar.findYear=function(el){if(typeof el.year!="undefined"){return el;}else if(typeof el.parentNode.year!="undefined"){return el.parentNode;}return null;};Calendar.showMonthsCombo=function(){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var mc=cal.monthsCombo;if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}if(cal.activeMonth){Calendar.removeClass(cal.activeMonth,"active");}var mon=cal.monthsCombo.getElementsByTagName("div")[cal.date.getMonth()];Calendar.addClass(mon,"active");cal.activeMonth=mon;var s=mc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var mcw=mc.offsetWidth;if(typeof mcw=="undefined")mcw=50;s.left=(cd.offsetLeft+cd.offsetWidth-mcw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";};Calendar.showYearsCombo=function(fwd){var cal=Calendar._C;if(!cal){return false;}var cal=cal;var cd=cal.activeDiv;var yc=cal.yearsCombo;if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}if(cal.activeYear){Calendar.removeClass(cal.activeYear,"active");}cal.activeYear=null;var Y=cal.date.getFullYear()+(fwd?1:-1);var yr=yc.firstChild;var show=false;for(var i=12;i>0;--i){if(Y>=cal.minYear&&Y<=cal.maxYear){yr.innerHTML=Y;yr.year=Y;yr.style.display="block";show=true;}else{yr.style.display="none";}yr=yr.nextSibling;Y+=fwd?cal.yearStep:-cal.yearStep;}if(show){var s=yc.style;s.display="block";if(cd.navtype<0)s.left=cd.offsetLeft+"px";else{var ycw=yc.offsetWidth;if(typeof ycw=="undefined")ycw=50;s.left=(cd.offsetLeft+cd.offsetWidth-ycw)+"px";}s.top=(cd.offsetTop+cd.offsetHeight)+"px";}};Calendar.tableMouseUp=function(ev){var cal=Calendar._C;if(!cal){return false;}if(cal.timeout){clearTimeout(cal.timeout);}var el=cal.activeDiv;if(!el){return false;}var target=Calendar.getTargetElement(ev);ev||(ev=window.event);Calendar.removeClass(el,"active");if(target==el||target.parentNode==el){Calendar.cellClick(el,ev);}var mon=Calendar.findMonth(target);var date=null;if(mon){date=new Date(cal.date);if(mon.month!=date.getMonth()){date.setMonth(mon.month);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}else{var year=Calendar.findYear(target);if(year){date=new Date(cal.date);if(year.year!=date.getFullYear()){date.setFullYear(year.year);cal.setDate(date);cal.dateClicked=false;cal.callHandler();}}}with(Calendar){removeEvent(document,"mouseup",tableMouseUp);removeEvent(document,"mouseover",tableMouseOver);removeEvent(document,"mousemove",tableMouseOver);cal._hideCombos();_C=null;return stopEvent(ev);}};Calendar.tableMouseOver=function(ev){var cal=Calendar._C;if(!cal){return;}var el=cal.activeDiv;var target=Calendar.getTargetElement(ev);if(target==el||target.parentNode==el){Calendar.addClass(el,"hilite active");Calendar.addClass(el.parentNode,"rowhilite");}else{if(typeof el.navtype=="undefined"||(el.navtype!=50&&(el.navtype==0||Math.abs(el.navtype)>2)))Calendar.removeClass(el,"active");Calendar.removeClass(el,"hilite");Calendar.removeClass(el.parentNode,"rowhilite");}ev||(ev=window.event);if(el.navtype==50&&target!=el){var pos=Calendar.getAbsolutePos(el);var w=el.offsetWidth;var x=ev.clientX;var dx;var decrease=true;if(x>pos.x+w){dx=x-pos.x-w;decrease=false;}else dx=pos.x-x;if(dx<0)dx=0;var range=el._range;var current=el._current;var count=Math.floor(dx/10)%range.length;for(var i=range.length;--i>=0;)if(range[i]==current)break;while(count-->0)if(decrease){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();}var mon=Calendar.findMonth(target);if(mon){if(mon.month!=cal.date.getMonth()){if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}Calendar.addClass(mon,"hilite");cal.hilitedMonth=mon;}else if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}}else{if(cal.hilitedMonth){Calendar.removeClass(cal.hilitedMonth,"hilite");}var year=Calendar.findYear(target);if(year){if(year.year!=cal.date.getFullYear()){if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}Calendar.addClass(year,"hilite");cal.hilitedYear=year;}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}else if(cal.hilitedYear){Calendar.removeClass(cal.hilitedYear,"hilite");}}return Calendar.stopEvent(ev);};Calendar.tableMouseDown=function(ev){if(Calendar.getTargetElement(ev)==Calendar.getElement(ev)){return Calendar.stopEvent(ev);}};Calendar.calDragIt=function(ev){var cal=Calendar._C;if(!(cal&&cal.dragging)){return false;}var posX;var posY;if(Calendar.is_ie){posY=window.event.clientY+document.body.scrollTop;posX=window.event.clientX+document.body.scrollLeft;}else{posX=ev.pageX;posY=ev.pageY;}cal.hideShowCovered();var st=cal.element.style;st.left=(posX-cal.xOffs)+"px";st.top=(posY-cal.yOffs)+"px";return Calendar.stopEvent(ev);};Calendar.calDragEnd=function(ev){var cal=Calendar._C;if(!cal){return false;}cal.dragging=false;with(Calendar){removeEvent(document,"mousemove",calDragIt);removeEvent(document,"mouseup",calDragEnd);tableMouseUp(ev);}cal.hideShowCovered();};Calendar.dayMouseDown=function(ev){var el=Calendar.getElement(ev);if(el.disabled){return false;}var cal=el.calendar;cal.activeDiv=el;Calendar._C=cal;if(el.navtype!=300)with(Calendar){if(el.navtype==50){el._current=el.innerHTML;addEvent(document,"mousemove",tableMouseOver);}else addEvent(document,Calendar.is_ie5?"mousemove":"mouseover",tableMouseOver);addClass(el,"hilite active");addEvent(document,"mouseup",tableMouseUp);}else if(cal.isPopup){cal._dragStart(ev);}if(el.navtype==-1||el.navtype==1){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout("Calendar.showMonthsCombo()",250);}else if(el.navtype==-2||el.navtype==2){if(cal.timeout)clearTimeout(cal.timeout);cal.timeout=setTimeout((el.navtype>0)?"Calendar.showYearsCombo(true)":"Calendar.showYearsCombo(false)",250);}else{cal.timeout=null;}return Calendar.stopEvent(ev);};Calendar.dayMouseDblClick=function(ev){Calendar.cellClick(Calendar.getElement(ev),ev||window.event);if(Calendar.is_ie){document.selection.empty();}};Calendar.dayMouseOver=function(ev){var el=Calendar.getElement(ev);if(Calendar.isRelated(el,ev)||Calendar._C||el.disabled){return false;}if(el.ttip){if(el.ttip.substr(0,1)=="_"){el.ttip=el.caldate.print(el.calendar.ttDateFormat)+el.ttip.substr(1);}el.calendar.tooltips.innerHTML=el.ttip;}if(el.navtype!=300){Calendar.addClass(el,"hilite");if(el.caldate){Calendar.addClass(el.parentNode,"rowhilite");var cal=el.calendar;if(cal&&cal.getDateToolTip){var d=el.caldate;window.status=d;el.title=cal.getDateToolTip(d,d.getFullYear(),d.getMonth(),d.getDate());}}}return Calendar.stopEvent(ev);};Calendar.dayMouseOut=function(ev){with(Calendar){var el=getElement(ev);if(isRelated(el,ev)||_C||el.disabled)return false;removeClass(el,"hilite");if(el.caldate)removeClass(el.parentNode,"rowhilite");if(el.calendar)el.calendar.tooltips.innerHTML=_TT["SEL_DATE"];}};Calendar.cellClick=function(el,ev){var cal=el.calendar;var closing=false;var newdate=false;var date=null;if(typeof el.navtype=="undefined"){if(cal.currentDateEl){Calendar.removeClass(cal.currentDateEl,"selected");Calendar.addClass(el,"selected");closing=(cal.currentDateEl==el);if(!closing){cal.currentDateEl=el;}}cal.date.setDateOnly(el.caldate);date=cal.date;var other_month=!(cal.dateClicked=!el.otherMonth);if(!other_month&&!cal.currentDateEl&&cal.multiple)cal._toggleMultipleDate(new Date(date));else newdate=!el.disabled;if(other_month)cal._init(cal.firstDayOfWeek,date);}else{if(el.navtype==200){Calendar.removeClass(el,"hilite");cal.callCloseHandler();return;}date=new Date(cal.date);if(el.navtype==0)date.setDateOnly(new Date());cal.dateClicked=false;var year=date.getFullYear();var mon=date.getMonth();function setMonth(m){var day=date.getDate();var max=date.getMonthDays(m);if(day>max){date.setDate(max);}date.setMonth(m);};switch(el.navtype){case 400:Calendar.removeClass(el,"hilite");var text=Calendar._TT["ABOUT"];if(typeof text!="undefined"){text+=cal.showsTime?Calendar._TT["ABOUT_TIME"]:"";}else{text="Help and about box text is not translated into this language.\n"+"If you know this language and you feel generous please update\n"+"the corresponding file in \"lang\" subdir to match calendar-en.js\n"+"and send it back to to get it into the distribution ;-)\n\n"+"Thank you!\n"+"http://dynarch.com/mishoo/calendar.epl\n";}alert(text);return;case-2:if(year>cal.minYear){date.setFullYear(year-1);}break;case-1:if(mon>0){setMonth(mon-1);}else if(year-->cal.minYear){date.setFullYear(year);setMonth(11);}break;case 1:if(mon<11){setMonth(mon+1);}else if(year=0;)if(range[i]==current)break;if(ev&&ev.shiftKey){if(--i<0)i=range.length-1;}else if(++i>=range.length)i=0;var newval=range[i];el.innerHTML=newval;cal.onUpdateTime();return;case 0:if((typeof cal.getDateStatus=="function")&&cal.getDateStatus(date,date.getFullYear(),date.getMonth(),date.getDate())){return false;}break;}if(!date.equalsTo(cal.date)){cal.setDate(date);newdate=true;}else if(el.navtype==0)newdate=closing=true;}if(newdate){ev&&cal.callHandler();}if(closing){Calendar.removeClass(el,"hilite");ev&&cal.callCloseHandler();}};Calendar.prototype.create=function(_par){var parent=null;if(!_par){parent=document.getElementsByTagName("body")[0];this.isPopup=true;}else{parent=_par;this.isPopup=false;}this.date=this.dateStr?new Date(this.dateStr):new Date();var table=Calendar.createElement("table");this.table=table;table.cellSpacing=0;table.cellPadding=0;table.calendar=this;Calendar.addEvent(table,"mousedown",Calendar.tableMouseDown);var div=Calendar.createElement("div");this.element=div;div.className="calendar";if(this.isPopup){div.style.position="absolute";div.style.display="none";}div.appendChild(table);var thead=Calendar.createElement("thead",table);var cell=null;var row=null;var cal=this;var hh=function(text,cs,navtype){cell=Calendar.createElement("td",row);cell.colSpan=cs;cell.className="button";if(navtype!=0&&Math.abs(navtype)<=2)cell.className+=" nav";Calendar._add_evs(cell);cell.calendar=cal;cell.navtype=navtype;cell.innerHTML="
"+text+"
";return cell;};row=Calendar.createElement("tr",thead);var title_length=6;(this.isPopup)&&--title_length;(this.weekNumbers)&&++title_length;hh("?",1,400).ttip=Calendar._TT["INFO"];this.title=hh("",title_length,300);this.title.className="title";if(this.isPopup){this.title.ttip=Calendar._TT["DRAG_TO_MOVE"];this.title.style.cursor="move";hh("×",1,200).ttip=Calendar._TT["CLOSE"];}row=Calendar.createElement("tr",thead);row.className="headrow";this._nav_py=hh("«",1,-2);this._nav_py.ttip=Calendar._TT["PREV_YEAR"];this._nav_pm=hh("‹",1,-1);this._nav_pm.ttip=Calendar._TT["PREV_MONTH"];this._nav_now=hh(Calendar._TT["TODAY"],this.weekNumbers?4:3,0);this._nav_now.ttip=Calendar._TT["GO_TODAY"];this._nav_nm=hh("›",1,1);this._nav_nm.ttip=Calendar._TT["NEXT_MONTH"];this._nav_ny=hh("»",1,2);this._nav_ny.ttip=Calendar._TT["NEXT_YEAR"];row=Calendar.createElement("tr",thead);row.className="daynames";if(this.weekNumbers){cell=Calendar.createElement("td",row);cell.className="name wn";cell.innerHTML=Calendar._TT["WK"];}for(var i=7;i>0;--i){cell=Calendar.createElement("td",row);if(!i){cell.navtype=100;cell.calendar=this;Calendar._add_evs(cell);}}this.firstdayname=(this.weekNumbers)?row.firstChild.nextSibling:row.firstChild;this._displayWeekdays();var tbody=Calendar.createElement("tbody",table);this.tbody=tbody;for(i=6;i>0;--i){row=Calendar.createElement("tr",tbody);if(this.weekNumbers){cell=Calendar.createElement("td",row);}for(var j=7;j>0;--j){cell=Calendar.createElement("td",row);cell.calendar=this;Calendar._add_evs(cell);}}if(this.showsTime){row=Calendar.createElement("tr",tbody);row.className="time";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;cell.innerHTML=Calendar._TT["TIME"]||" ";cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=this.weekNumbers?4:3;(function(){function makeTimePart(className,init,range_start,range_end){var part=Calendar.createElement("span",cell);part.className=className;part.innerHTML=init;part.calendar=cal;part.ttip=Calendar._TT["TIME_PART"];part.navtype=50;part._range=[];if(typeof range_start!="number")part._range=range_start;else{for(var i=range_start;i<=range_end;++i){var txt;if(i<10&&range_end>=10)txt='0'+i;else txt=''+i;part._range[part._range.length]=txt;}}Calendar._add_evs(part);return part;};var hrs=cal.date.getHours();var mins=cal.date.getMinutes();var t12=!cal.time24;var pm=(hrs>12);if(t12&&pm)hrs-=12;var H=makeTimePart("hour",hrs,t12?1:0,t12?12:23);var span=Calendar.createElement("span",cell);span.innerHTML=":";span.className="colon";var M=makeTimePart("minute",mins,0,59);var AP=null;cell=Calendar.createElement("td",row);cell.className="time";cell.colSpan=2;if(t12)AP=makeTimePart("ampm",pm?"pm":"am",["am","pm"]);else cell.innerHTML=" ";cal.onSetTime=function(){var pm,hrs=this.date.getHours(),mins=this.date.getMinutes();if(t12){pm=(hrs>=12);if(pm)hrs-=12;if(hrs==0)hrs=12;AP.innerHTML=pm?"pm":"am";}H.innerHTML=(hrs<10)?("0"+hrs):hrs;M.innerHTML=(mins<10)?("0"+mins):mins;};cal.onUpdateTime=function(){var date=this.date;var h=parseInt(H.innerHTML,10);if(t12){if(/pm/i.test(AP.innerHTML)&&h<12)h+=12;else if(/am/i.test(AP.innerHTML)&&h==12)h=0;}var d=date.getDate();var m=date.getMonth();var y=date.getFullYear();date.setHours(h);date.setMinutes(parseInt(M.innerHTML,10));date.setFullYear(y);date.setMonth(m);date.setDate(d);this.dateClicked=false;this.callHandler();};})();}else{this.onSetTime=this.onUpdateTime=function(){};}var tfoot=Calendar.createElement("tfoot",table);row=Calendar.createElement("tr",tfoot);row.className="footrow";cell=hh(Calendar._TT["SEL_DATE"],this.weekNumbers?8:7,300);cell.className="ttip";if(this.isPopup){cell.ttip=Calendar._TT["DRAG_TO_MOVE"];cell.style.cursor="move";}this.tooltips=cell;div=Calendar.createElement("div",this.element);this.monthsCombo=div;div.className="combo";for(i=0;i0;--i){var yr=Calendar.createElement("div");yr.className=Calendar.is_ie?"label-IEfix":"label";div.appendChild(yr);}this._init(this.firstDayOfWeek,this.date);parent.appendChild(this.element);};Calendar._keyEvent=function(ev){var cal=window._dynarch_popupCalendar;if(!cal||cal.multiple)return false;(Calendar.is_ie)&&(ev=window.event);var act=(Calendar.is_ie||ev.type=="keypress"),K=ev.keyCode;if(ev.ctrlKey){switch(K){case 37:act&&Calendar.cellClick(cal._nav_pm);break;case 38:act&&Calendar.cellClick(cal._nav_py);break;case 39:act&&Calendar.cellClick(cal._nav_nm);break;case 40:act&&Calendar.cellClick(cal._nav_ny);break;default:return false;}}else switch(K){case 32:Calendar.cellClick(cal._nav_now);break;case 27:act&&cal.callCloseHandler();break;case 37:case 38:case 39:case 40:if(act){var prev,x,y,ne,el,step;prev=K==37||K==38;step=(K==37||K==39)?1:7;function setVars(){el=cal.currentDateEl;var p=el.pos;x=p&15;y=p>>4;ne=cal.ar_days[y][x];};setVars();function prevMonth(){var date=new Date(cal.date);date.setDate(date.getDate()-step);cal.setDate(date);};function nextMonth(){var date=new Date(cal.date);date.setDate(date.getDate()+step);cal.setDate(date);};while(1){switch(K){case 37:if(--x>=0)ne=cal.ar_days[y][x];else{x=6;K=38;continue;}break;case 38:if(--y>=0)ne=cal.ar_days[y][x];else{prevMonth();setVars();}break;case 39:if(++x<7)ne=cal.ar_days[y][x];else{x=0;K=40;continue;}break;case 40:if(++ythis.maxYear){year=this.maxYear;date.setFullYear(year);}this.firstDayOfWeek=firstDayOfWeek;this.date=new Date(date);var month=date.getMonth();var mday=date.getDate();var no_days=date.getMonthDays();date.setDate(1);var day1=(date.getDay()-this.firstDayOfWeek)%7;if(day1<0)day1+=7;date.setDate(-day1);date.setDate(date.getDate()+1);var row=this.tbody.firstChild;var MN=Calendar._SMN[month];var ar_days=this.ar_days=new Array();var weekend=Calendar._TT["WEEKEND"];var dates=this.multiple?(this.datesCells={}):null;for(var i=0;i<6;++i,row=row.nextSibling){var cell=row.firstChild;if(this.weekNumbers){cell.className="day wn";cell.innerHTML=date.getWeekNumber();cell=cell.nextSibling;}row.className="daysrow";var hasdays=false,iday,dpos=ar_days[i]=[];for(var j=0;j<7;++j,cell=cell.nextSibling,date.setDate(iday+1)){iday=date.getDate();var wday=date.getDay();cell.className="day";cell.pos=i<<4|j;dpos[j]=cell;var current_month=(date.getMonth()==month);if(!current_month){if(this.showsOtherMonths){cell.className+=" othermonth";cell.otherMonth=true;}else{cell.className="emptycell";cell.innerHTML=" ";cell.disabled=true;continue;}}else{cell.otherMonth=false;hasdays=true;}cell.disabled=false;cell.innerHTML=this.getDateText?this.getDateText(date,iday):iday;if(dates)dates[date.print("%Y%m%d")]=cell;if(this.getDateStatus){var status=this.getDateStatus(date,year,month,iday);if(status===true){cell.className+=" disabled";cell.disabled=true;}else{if(/disabled/i.test(status))cell.disabled=true;cell.className+=" "+status;}}if(!cell.disabled){cell.caldate=new Date(date);cell.ttip="_";if(!this.multiple&¤t_month&&iday==mday&&this.hiliteToday){cell.className+=" selected";this.currentDateEl=cell;}if(date.getFullYear()==TY&&date.getMonth()==TM&&iday==TD){cell.className+=" today";cell.ttip+=Calendar._TT["PART_TODAY"];}if(weekend.indexOf(wday.toString())!=-1)cell.className+=cell.otherMonth?" oweekend":" weekend";}}if(!(hasdays||this.showsOtherMonths))row.className="emptyrow";}this.title.innerHTML=Calendar._MN[month]+", "+year;this.onSetTime();this.table.style.visibility="visible";this._initMultipleDates();};Calendar.prototype._initMultipleDates=function(){if(this.multiple){for(var i in this.multiple){var cell=this.datesCells[i];var d=this.multiple[i];if(!d)continue;if(cell)cell.className+=" selected";}}};Calendar.prototype._toggleMultipleDate=function(date){if(this.multiple){var ds=date.print("%Y%m%d");var cell=this.datesCells[ds];if(cell){var d=this.multiple[ds];if(!d){Calendar.addClass(cell,"selected");this.multiple[ds]=date;}else{Calendar.removeClass(cell,"selected");delete this.multiple[ds];}}}};Calendar.prototype.setDateToolTipHandler=function(unaryFunction){this.getDateToolTip=unaryFunction;};Calendar.prototype.setDate=function(date){if(!date.equalsTo(this.date)){this._init(this.firstDayOfWeek,date);}};Calendar.prototype.refresh=function(){this._init(this.firstDayOfWeek,this.date);};Calendar.prototype.setFirstDayOfWeek=function(firstDayOfWeek){this._init(firstDayOfWeek,this.date);this._displayWeekdays();};Calendar.prototype.setDateStatusHandler=Calendar.prototype.setDisabledHandler=function(unaryFunction){this.getDateStatus=unaryFunction;};Calendar.prototype.setRange=function(a,z){this.minYear=a;this.maxYear=z;};Calendar.prototype.callHandler=function(){if(this.onSelected){this.onSelected(this,this.date.print(this.dateFormat));}};Calendar.prototype.callCloseHandler=function(){if(this.onClose){this.onClose(this);}this.hideShowCovered();};Calendar.prototype.destroy=function(){var el=this.element.parentNode;el.removeChild(this.element);Calendar._C=null;window._dynarch_popupCalendar=null;};Calendar.prototype.reparent=function(new_parent){var el=this.element;el.parentNode.removeChild(el);new_parent.appendChild(el);};Calendar._checkCalendar=function(ev){var calendar=window._dynarch_popupCalendar;if(!calendar){return false;}var el=Calendar.is_ie?Calendar.getElement(ev):Calendar.getTargetElement(ev);for(;el!=null&&el!=calendar.element;el=el.parentNode);if(el==null){window._dynarch_popupCalendar.callCloseHandler();return Calendar.stopEvent(ev);}};Calendar.prototype.show=function(){var rows=this.table.getElementsByTagName("tr");for(var i=rows.length;i>0;){var row=rows[--i];Calendar.removeClass(row,"rowhilite");var cells=row.getElementsByTagName("td");for(var j=cells.length;j>0;){var cell=cells[--j];Calendar.removeClass(cell,"hilite");Calendar.removeClass(cell,"active");}}this.element.style.display="block";this.hidden=false;if(this.isPopup){window._dynarch_popupCalendar=this;Calendar.addEvent(document,"keydown",Calendar._keyEvent);Calendar.addEvent(document,"keypress",Calendar._keyEvent);Calendar.addEvent(document,"mousedown",Calendar._checkCalendar);}this.hideShowCovered();};Calendar.prototype.hide=function(){if(this.isPopup){Calendar.removeEvent(document,"keydown",Calendar._keyEvent);Calendar.removeEvent(document,"keypress",Calendar._keyEvent);Calendar.removeEvent(document,"mousedown",Calendar._checkCalendar);}this.element.style.display="none";this.hidden=true;this.hideShowCovered();};Calendar.prototype.showAt=function(x,y){var s=this.element.style;s.left=x+"px";s.top=y+"px";this.show();};Calendar.prototype.showAtElement=function(el,opts){var self=this;var p=Calendar.getAbsolutePos(el);if(!opts||typeof opts!="string"){this.showAt(p.x,p.y+el.offsetHeight);return true;}function fixPosition(box){if(box.x<0)box.x=0;if(box.y<0)box.y=0;var cp=document.createElement("div");var s=cp.style;s.position="absolute";s.right=s.bottom=s.width=s.height="0px";document.body.appendChild(cp);var br=Calendar.getAbsolutePos(cp);document.body.removeChild(cp);if(Calendar.is_ie){br.y+=document.body.scrollTop;br.x+=document.body.scrollLeft;}else{br.y+=window.scrollY;br.x+=window.scrollX;}var tmp=box.x+box.width-br.x;if(tmp>0)box.x-=tmp;tmp=box.y+box.height-br.y;if(tmp>0)box.y-=tmp;};this.element.style.display="block";Calendar.continuation_for_the_fucking_khtml_browser=function(){var w=self.element.offsetWidth;var h=self.element.offsetHeight;self.element.style.display="none";var valign=opts.substr(0,1);var halign="l";if(opts.length>1){halign=opts.substr(1,1);}switch(valign){case "T":p.y-=h;break;case "B":p.y+=el.offsetHeight;break;case "C":p.y+=(el.offsetHeight-h)/2;break;case "t":p.y+=el.offsetHeight-h;break;case "b":break;}switch(halign){case "L":p.x-=w;break;case "R":p.x+=el.offsetWidth;break;case "C":p.x+=(el.offsetWidth-w)/2;break;case "l":p.x+=el.offsetWidth-w;break;case "r":break;}p.width=w;p.height=h+40;self.monthsCombo.style.display="none";fixPosition(p);self.showAt(p.x,p.y);};if(Calendar.is_khtml)setTimeout("Calendar.continuation_for_the_fucking_khtml_browser()",10);else Calendar.continuation_for_the_fucking_khtml_browser();};Calendar.prototype.setDateFormat=function(str){this.dateFormat=str;};Calendar.prototype.setTtDateFormat=function(str){this.ttDateFormat=str;};Calendar.prototype.parseDate=function(str,fmt){if(!fmt)fmt=this.dateFormat;this.setDate(Date.parseDate(str,fmt));};Calendar.prototype.hideShowCovered=function(){if(!Calendar.is_ie&&!Calendar.is_opera)return;function getVisib(obj){var value=obj.style.visibility;if(!value){if(document.defaultView&&typeof(document.defaultView.getComputedStyle)=="function"){if(!Calendar.is_khtml)value=document.defaultView. getComputedStyle(obj,"").getPropertyValue("visibility");else value='';}else if(obj.currentStyle){value=obj.currentStyle.visibility;}else value='';}return value;};var tags=new Array("applet","iframe","select");var el=this.element;var p=Calendar.getAbsolutePos(el);var EX1=p.x;var EX2=el.offsetWidth+EX1;var EY1=p.y;var EY2=el.offsetHeight+EY1;for(var k=tags.length;k>0;){var ar=document.getElementsByTagName(tags[--k]);var cc=null;for(var i=ar.length;i>0;){cc=ar[--i];p=Calendar.getAbsolutePos(cc);var CX1=p.x;var CX2=cc.offsetWidth+CX1;var CY1=p.y;var CY2=cc.offsetHeight+CY1;if(this.hidden||(CX1>EX2)||(CX2EY2)||(CY229)?1900:2000);break;case "%b":case "%B":for(j=0;j<12;++j){if(Calendar._MN[j].substr(0,a[i].length).toLowerCase()==a[i].toLowerCase()){m=j;break;}}break;case "%H":case "%I":case "%k":case "%l":hr=parseInt(a[i],10);break;case "%P":case "%p":if(/pm/i.test(a[i])&&hr<12)hr+=12;else if(/am/i.test(a[i])&&hr>=12)hr-=12;break;case "%M":min=parseInt(a[i],10);break;}}if(isNaN(y))y=today.getFullYear();if(isNaN(m))m=today.getMonth();if(isNaN(d))d=today.getDate();if(isNaN(hr))hr=today.getHours();if(isNaN(min))min=today.getMinutes();if(y!=0&&m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);y=0;m=-1;d=0;for(i=0;i31&&y==0){y=parseInt(a[i],10);(y<100)&&(y+=(y>29)?1900:2000);}else if(d==0){d=a[i];}}if(y==0)y=today.getFullYear();if(m!=-1&&d!=0)return new Date(y,m,d,hr,min,0);return today;};Date.prototype.getMonthDays=function(month){var year=this.getFullYear();if(typeof month=="undefined"){month=this.getMonth();}if(((0==(year%4))&&((0!=(year%100))||(0==(year%400))))&&month==1){return 29;}else{return Date._MD[month];}};Date.prototype.getDayOfYear=function(){var now=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var then=new Date(this.getFullYear(),0,0,0,0,0);var time=now-then;return Math.floor(time/Date.DAY);};Date.prototype.getWeekNumber=function(){var d=new Date(this.getFullYear(),this.getMonth(),this.getDate(),0,0,0);var DoW=d.getDay();d.setDate(d.getDate()-(DoW+6)%7+3);var ms=d.valueOf();d.setMonth(0);d.setDate(4);return Math.round((ms-d.valueOf())/(7*864e5))+1;};Date.prototype.equalsTo=function(date){return((this.getFullYear()==date.getFullYear())&&(this.getMonth()==date.getMonth())&&(this.getDate()==date.getDate())&&(this.getHours()==date.getHours())&&(this.getMinutes()==date.getMinutes()));};Date.prototype.setDateOnly=function(date){var tmp=new Date(date);this.setDate(1);this.setFullYear(tmp.getFullYear());this.setMonth(tmp.getMonth());this.setDate(tmp.getDate());};Date.prototype.print=function(str){var m=this.getMonth();var d=this.getDate();var y=this.getFullYear();var wn=this.getWeekNumber();var w=this.getDay();var s={};var hr=this.getHours();var pm=(hr>=12);var ir=(pm)?(hr-12):hr;var dy=this.getDayOfYear();if(ir==0)ir=12;var min=this.getMinutes();var sec=this.getSeconds();s["%a"]=Calendar._SDN[w];s["%A"]=Calendar._DN[w];s["%b"]=Calendar._SMN[m];s["%B"]=Calendar._MN[m];s["%C"]=1+Math.floor(y/100);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(hr<10)?("0"+hr):hr;s["%I"]=(ir<10)?("0"+ir):ir;s["%j"]=(dy<100)?((dy<10)?("00"+dy):("0"+dy)):dy;s["%k"]=hr;s["%l"]=ir;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(min<10)?("0"+min):min;s["%n"]="\n";s["%p"]=pm?"PM":"AM";s["%P"]=pm?"pm":"am";s["%s"]=Math.floor(this.getTime()/1000);s["%S"]=(sec<10)?("0"+sec):sec;s["%t"]="\t";s["%U"]=s["%W"]=s["%V"]=(wn<10)?("0"+wn):wn;s["%u"]=w+1;s["%w"]=w;s["%y"]=(''+y).substr(2,2);s["%Y"]=y;s["%%"]="%";var re=/%./g;if(!Calendar.is_ie5&&!Calendar.is_khtml)return str.replace(re,function(par){return s[par]||par;});var a=str.match(re);for(var i=0;i -// Translator: Valentin Sheiretsky, -// Encoding: Windows-1251 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Íåäåëÿ", - "Ïîíåäåëíèê", - "Âòîðíèê", - "Ñðÿäà", - "×åòâúðòúê", - "Ïåòúê", - "Ñúáîòà", - "Íåäåëÿ"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Íåä", - "Ïîí", - "Âòî", - "Ñðÿ", - "×åò", - "Ïåò", - "Ñúá", - "Íåä"); - -// full month names -Calendar._MN = new Array -("ßíóàðè", - "Ôåâðóàðè", - "Ìàðò", - "Àïðèë", - "Ìàé", - "Þíè", - "Þëè", - "Àâãóñò", - "Ñåïòåìâðè", - "Îêòîìâðè", - "Íîåìâðè", - "Äåêåìâðè"); - -// short month names -Calendar._SMN = new Array -("ßíó", - "Ôåâ", - "Ìàð", - "Àïð", - "Ìàé", - "Þíè", - "Þëè", - "Àâã", - "Ñåï", - "Îêò", - "Íîå", - "Äåê"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Èíôîðìàöèÿ çà êàëåíäàðà"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Date selection:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + -"- Hold mouse button on any of the above buttons for faster selection."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- Click on any of the time parts to increase it\n" + -"- or Shift-click to decrease it\n" + -"- or click and drag for faster selection."; - -Calendar._TT["PREV_YEAR"] = "Ïðåäíà ãîäèíà (çàäðúæòå çà ìåíþ)"; -Calendar._TT["PREV_MONTH"] = "Ïðåäåí ìåñåö (çàäðúæòå çà ìåíþ)"; -Calendar._TT["GO_TODAY"] = "Èçáåðåòå äíåñ"; -Calendar._TT["NEXT_MONTH"] = "Ñëåäâàù ìåñåö (çàäðúæòå çà ìåíþ)"; -Calendar._TT["NEXT_YEAR"] = "Ñëåäâàùà ãîäèíà (çàäðúæòå çà ìåíþ)"; -Calendar._TT["SEL_DATE"] = "Èçáåðåòå äàòà"; -Calendar._TT["DRAG_TO_MOVE"] = "Ïðåìåñòâàíå"; -Calendar._TT["PART_TODAY"] = " (äíåñ)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s êàòî ïúðâè äåí"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Çàòâîðåòå"; -Calendar._TT["TODAY"] = "Äíåñ"; -Calendar._TT["TIME_PART"] = "(Shift-)Click èëè drag çà äà ïðîìåíèòå ñòîéíîñòòà"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A - %e %B %Y"; - -Calendar._TT["WK"] = "Ñåäì"; -Calendar._TT["TIME"] = "×àñ:"; diff --git a/includes/jscalendar/lang/calendar-big5-utf8.js b/includes/jscalendar/lang/calendar-big5-utf8.js deleted file mode 100644 index 14e0d5dd..00000000 --- a/includes/jscalendar/lang/calendar-big5-utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar big5-utf8 language -// Author: Gary Fu, -// Encoding: utf8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("星期日", - "星期一", - "星期二", - "星期三", - "星期四", - "星期五", - "星期六", - "星期日"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("æ—¥", - "一", - "二", - "三", - "å››", - "五", - "å…­", - "æ—¥"); - -// full month names -Calendar._MN = new Array -("一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "ä¹æœˆ", - "å月", - "å一月", - "å二月"); - -// short month names -Calendar._SMN = new Array -("一月", - "二月", - "三月", - "四月", - "五月", - "六月", - "七月", - "八月", - "ä¹æœˆ", - "å月", - "å一月", - "å二月"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "關於"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"日期é¸æ“‡æ–¹æ³•:\n" + -"- 使用 \xab, \xbb 按鈕å¯é¸æ“‡å¹´ä»½\n" + -"- 使用 " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " 按鈕å¯é¸æ“‡æœˆä»½\n" + -"- 按ä½ä¸Šé¢çš„按鈕å¯ä»¥åŠ å¿«é¸å–"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"時間é¸æ“‡æ–¹æ³•:\n" + -"- 點擊任何的時間部份å¯å¢žåŠ å…¶å€¼\n" + -"- åŒæ™‚按Shiftéµå†é»žæ“Šå¯æ¸›å°‘其值\n" + -"- 點擊並拖曳å¯åŠ å¿«æ”¹è®Šçš„值"; - -Calendar._TT["PREV_YEAR"] = "上一年 (按ä½é¸å–®)"; -Calendar._TT["PREV_MONTH"] = "下一年 (按ä½é¸å–®)"; -Calendar._TT["GO_TODAY"] = "到今日"; -Calendar._TT["NEXT_MONTH"] = "上一月 (按ä½é¸å–®)"; -Calendar._TT["NEXT_YEAR"] = "下一月 (按ä½é¸å–®)"; -Calendar._TT["SEL_DATE"] = "é¸æ“‡æ—¥æœŸ"; -Calendar._TT["DRAG_TO_MOVE"] = "拖曳"; -Calendar._TT["PART_TODAY"] = " (今日)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "å°‡ %s 顯示在å‰"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "關閉"; -Calendar._TT["TODAY"] = "今日"; -Calendar._TT["TIME_PART"] = "點擊or拖曳å¯æ”¹è®Šæ™‚é–“(åŒæ™‚按Shift為減)"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "週"; -Calendar._TT["TIME"] = "Time:"; diff --git a/includes/jscalendar/lang/calendar-big5.js b/includes/jscalendar/lang/calendar-big5.js deleted file mode 100644 index a5893587..00000000 --- a/includes/jscalendar/lang/calendar-big5.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar big5 language -// Author: Gary Fu, -// Encoding: big5 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("¬P´Á¤é", - "¬P´Á¤@", - "¬P´Á¤G", - "¬P´Á¤T", - "¬P´Á¥|", - "¬P´Á¤­", - "¬P´Á¤»", - "¬P´Á¤é"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("¤é", - "¤@", - "¤G", - "¤T", - "¥|", - "¤­", - "¤»", - "¤é"); - -// full month names -Calendar._MN = new Array -("¤@¤ë", - "¤G¤ë", - "¤T¤ë", - "¥|¤ë", - "¤­¤ë", - "¤»¤ë", - "¤C¤ë", - "¤K¤ë", - "¤E¤ë", - "¤Q¤ë", - "¤Q¤@¤ë", - "¤Q¤G¤ë"); - -// short month names -Calendar._SMN = new Array -("¤@¤ë", - "¤G¤ë", - "¤T¤ë", - "¥|¤ë", - "¤­¤ë", - "¤»¤ë", - "¤C¤ë", - "¤K¤ë", - "¤E¤ë", - "¤Q¤ë", - "¤Q¤@¤ë", - "¤Q¤G¤ë"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Ãö©ó"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"¤é´Á¿ï¾Ü¤èªk:\n" + -"- ¨Ï¥Î \xab, \xbb «ö¶s¥i¿ï¾Ü¦~¥÷\n" + -"- ¨Ï¥Î " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " «ö¶s¥i¿ï¾Ü¤ë¥÷\n" + -"- «ö¦í¤W­±ªº«ö¶s¥i¥H¥[§Ö¿ï¨ú"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"®É¶¡¿ï¾Ü¤èªk:\n" + -"- ÂIÀ»¥ô¦óªº®É¶¡³¡¥÷¥i¼W¥[¨ä­È\n" + -"- ¦P®É«öShiftÁä¦AÂIÀ»¥i´î¤Ö¨ä­È\n" + -"- ÂIÀ»¨Ã©ì¦²¥i¥[§Ö§ïÅܪº­È"; - -Calendar._TT["PREV_YEAR"] = "¤W¤@¦~ («ö¦í¿ï³æ)"; -Calendar._TT["PREV_MONTH"] = "¤U¤@¦~ («ö¦í¿ï³æ)"; -Calendar._TT["GO_TODAY"] = "¨ì¤µ¤é"; -Calendar._TT["NEXT_MONTH"] = "¤W¤@¤ë («ö¦í¿ï³æ)"; -Calendar._TT["NEXT_YEAR"] = "¤U¤@¤ë («ö¦í¿ï³æ)"; -Calendar._TT["SEL_DATE"] = "¿ï¾Ü¤é´Á"; -Calendar._TT["DRAG_TO_MOVE"] = "©ì¦²"; -Calendar._TT["PART_TODAY"] = " (¤µ¤é)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "±N %s Åã¥Ü¦b«e"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Ãö³¬"; -Calendar._TT["TODAY"] = "¤µ¤é"; -Calendar._TT["TIME_PART"] = "ÂIÀ»or©ì¦²¥i§ïÅܮɶ¡(¦P®É«öShift¬°´î)"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "¶g"; -Calendar._TT["TIME"] = "Time:"; diff --git a/includes/jscalendar/lang/calendar-br.js b/includes/jscalendar/lang/calendar-br.js deleted file mode 100644 index bfb07471..00000000 --- a/includes/jscalendar/lang/calendar-br.js +++ /dev/null @@ -1,108 +0,0 @@ -// ** I18N - -// Calendar pt-BR language -// Author: Fernando Dourado, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Segunda", - "Terça", - "Quarta", - "Quinta", - "Sexta", - "Sabádo", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -// [No changes using default values] - -// full month names -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Março", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// short month names -// [No changes using default values] - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre o calendário"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Translate to portuguese Brazil (pt-BR) by Fernando Dourado (fernando.dourado@ig.com.br)\n" + -"Tradução para o português Brasil (pt-BR) por Fernando Dourado (fernando.dourado@ig.com.br)" + -"\n\n" + -"Selecionar data:\n" + -"- Use as teclas \xab, \xbb para selecionar o ano\n" + -"- Use as teclas " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mês\n" + -"- Clique e segure com o mouse em qualquer botão para selecionar rapidamente."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecionar hora:\n" + -"- Clique em qualquer uma das partes da hora para aumentar\n" + -"- ou Shift-clique para diminuir\n" + -"- ou clique e arraste para selecionar rapidamente."; - -Calendar._TT["PREV_YEAR"] = "Ano anterior (clique e segure para menu)"; -Calendar._TT["PREV_MONTH"] = "Mês anterior (clique e segure para menu)"; -Calendar._TT["GO_TODAY"] = "Ir para a data atual"; -Calendar._TT["NEXT_MONTH"] = "Próximo mês (clique e segure para menu)"; -Calendar._TT["NEXT_YEAR"] = "Próximo ano (clique e segure para menu)"; -Calendar._TT["SEL_DATE"] = "Selecione uma data"; -Calendar._TT["DRAG_TO_MOVE"] = "Clique e segure para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Exibir %s primeiro"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; -Calendar._TT["TIME_PART"] = "(Shift-)Clique ou arraste para mudar o valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%d de %B de %Y"; - -Calendar._TT["WK"] = "sem"; -Calendar._TT["TIME"] = "Hora:"; - diff --git a/includes/jscalendar/lang/calendar-ca.js b/includes/jscalendar/lang/calendar-ca.js deleted file mode 100644 index a2121bcb..00000000 --- a/includes/jscalendar/lang/calendar-ca.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar CA language -// Author: Mihai Bazon, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Diumenge", - "Dilluns", - "Dimarts", - "Dimecres", - "Dijous", - "Divendres", - "Dissabte", - "Diumenge"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Diu", - "Dil", - "Dmt", - "Dmc", - "Dij", - "Div", - "Dis", - "Diu"); - -// full month names -Calendar._MN = new Array -("Gener", - "Febrer", - "Març", - "Abril", - "Maig", - "Juny", - "Juliol", - "Agost", - "Setembre", - "Octubre", - "Novembre", - "Desembre"); - -// short month names -Calendar._SMN = new Array -("Gen", - "Feb", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Oct", - "Nov", - "Des"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre el calendari"; - -Calendar._TT["ABOUT"] = -"DHTML Selector de Data/Hora\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Sel.lecció de Dates:\n" + -"- Fes servir els botons \xab, \xbb per sel.leccionar l'any\n" + -"- Fes servir els botons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per se.lecciconar el mes\n" + -"- Manté el ratolí apretat en qualsevol dels anteriors per sel.lecció ràpida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- claca en qualsevol de les parts de la hora per augmentar-les\n" + -"- o Shift-click per decrementar-la\n" + -"- or click and arrastra per sel.lecció ràpida."; - -Calendar._TT["PREV_YEAR"] = "Any anterior (Mantenir per menu)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (Mantenir per menu)"; -Calendar._TT["GO_TODAY"] = "Anar a avui"; -Calendar._TT["NEXT_MONTH"] = "Mes següent (Mantenir per menu)"; -Calendar._TT["NEXT_YEAR"] = "Any següent (Mantenir per menu)"; -Calendar._TT["SEL_DATE"] = "Sel.leccionar data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar per moure"; -Calendar._TT["PART_TODAY"] = " (avui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostra %s primer"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Tanca"; -Calendar._TT["TODAY"] = "Avui"; -Calendar._TT["TIME_PART"] = "(Shift-)Click a arrastra per canviar el valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "st"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/includes/jscalendar/lang/calendar-cs-utf8.js b/includes/jscalendar/lang/calendar-cs-utf8.js deleted file mode 100644 index 41a9c89a..00000000 --- a/includes/jscalendar/lang/calendar-cs-utf8.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) - Jan Uhlir (espinosa@centrum.cz) -*/ - -// ** I18N -Calendar._DN = new Array('NedÄ›le','PondÄ›lí','Úterý','StÅ™eda','ÄŒtvrtek','Pátek','Sobota','NedÄ›le'); -Calendar._SDN = new Array('Ne','Po','Út','St','ÄŒt','Pá','So','Ne'); -Calendar._MN = new Array('Leden','Únor','BÅ™ezen','Duben','KvÄ›ten','ÄŒerven','ÄŒervenec','Srpen','Září','Říjen','Listopad','Prosinec'); -Calendar._SMN = new Array('Led','Úno','BÅ™e','Dub','KvÄ›','ÄŒrv','ÄŒvc','Srp','Zář','Říj','Lis','Pro'); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O komponentÄ› kalendář"; -Calendar._TT["TOGGLE"] = "ZmÄ›na prvního dne v týdnu"; -Calendar._TT["PREV_YEAR"] = "PÅ™edchozí rok (pÅ™idrž pro menu)"; -Calendar._TT["PREV_MONTH"] = "PÅ™edchozí mÄ›síc (pÅ™idrž pro menu)"; -Calendar._TT["GO_TODAY"] = "DneÅ¡ní datum"; -Calendar._TT["NEXT_MONTH"] = "Další mÄ›síc (pÅ™idrž pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Další rok (pÅ™idrž pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "ChyÅ¥ a táhni, pro pÅ™esun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Ukaž jako první PondÄ›lí"; -//Calendar._TT["SUN_FIRST"] = "Ukaž jako první NedÄ›li"; - -Calendar._TT["ABOUT"] = -"DHTML Kalendář\n" + -"(c) dynarch.com 2002-2005 / Autor: Mihai Bazon\n" + // don't translate this this ;-) -"Aktuální verzi najdete na: http://www.dynarch.com/projects/calendar/\n" + -"Distribuováno pod licencí GNU LGPL. Viz. http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"VýbÄ›r datumu:\n" + -"- Použijte \xab, \xbb tlaÄítka k výbÄ›ru roku\n" + -"- Použijte tlaÄítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výbÄ›ru mÄ›síce\n" + -"- Podržte tlaÄítko myÅ¡i na jakémkoliv z tÄ›ch tlaÄítek pro rychlejší výbÄ›r."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"VýbÄ›r Äasu:\n" + -"- KliknÄ›te na jakoukoliv z Äástí výbÄ›ru Äasu pro zvýšení.\n" + -"- nebo Shift-click pro snížení\n" + -"- nebo kliknÄ›te a táhnÄ›te pro rychlejší výbÄ›r."; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Zobraz %s první"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zavřít"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro zmÄ›nu hodnoty"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "ÄŒas:"; - diff --git a/includes/jscalendar/lang/calendar-cs-win.js b/includes/jscalendar/lang/calendar-cs-win.js deleted file mode 100644 index 41e332d9..00000000 --- a/includes/jscalendar/lang/calendar-cs-win.js +++ /dev/null @@ -1,70 +0,0 @@ -/* - calendar-cs-win.js - language: Czech - encoding: windows-1250 - author: Lubos Jerabek (xnet@seznam.cz) - Jan Uhlir (espinosa@centrum.cz) -*/ - -// ** I18N -Calendar._DN = new Array('Nedìle','Pondìlí','Úterý','Støeda','Ètvrtek','Pátek','Sobota','Nedìle'); -Calendar._SDN = new Array('Ne','Po','Út','St','Èt','Pá','So','Ne'); -Calendar._MN = new Array('Leden','Únor','Bøezen','Duben','Kvìten','Èerven','Èervenec','Srpen','Záøí','Øíjen','Listopad','Prosinec'); -Calendar._SMN = new Array('Led','Úno','Bøe','Dub','Kvì','Èrv','Èvc','Srp','Záø','Øíj','Lis','Pro'); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O komponentì kalendáø"; -Calendar._TT["TOGGLE"] = "Zmìna prvního dne v týdnu"; -Calendar._TT["PREV_YEAR"] = "Pøedchozí rok (pøidrž pro menu)"; -Calendar._TT["PREV_MONTH"] = "Pøedchozí mìsíc (pøidrž pro menu)"; -Calendar._TT["GO_TODAY"] = "Dnešní datum"; -Calendar._TT["NEXT_MONTH"] = "Další mìsíc (pøidrž pro menu)"; -Calendar._TT["NEXT_YEAR"] = "Další rok (pøidrž pro menu)"; -Calendar._TT["SEL_DATE"] = "Vyber datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Chy a táhni, pro pøesun"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "Ukaž jako první Pondìlí"; -//Calendar._TT["SUN_FIRST"] = "Ukaž jako první Nedìli"; - -Calendar._TT["ABOUT"] = -"DHTML Kalendáø\n" + -"(c) dynarch.com 2002-2005 / Autor: Mihai Bazon\n" + // don't translate this this ;-) -"Aktuální verzi najdete na: http://www.dynarch.com/projects/calendar/\n" + -"Distribuováno pod licencí GNU LGPL. Viz. http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Výbìr datumu:\n" + -"- Použijte \xab, \xbb tlaèítka k výbìru roku\n" + -"- Použijte tlaèítka " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " k výbìru mìsíce\n" + -"- Podržte tlaèítko myši na jakémkoliv z tìch tlaèítek pro rychlejší výbìr."; - -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Výbìr èasu:\n" + -"- Kliknìte na jakoukoliv z èástí výbìru èasu pro zvýšení.\n" + -"- nebo Shift-click pro snížení\n" + -"- nebo kliknìte a táhnìte pro rychlejší výbìr."; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Zobraz %s první"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zavøít"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikni nebo táhni pro zmìnu hodnoty"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "d.m.yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Èas:"; - diff --git a/includes/jscalendar/lang/calendar-da.js b/includes/jscalendar/lang/calendar-da.js deleted file mode 100644 index a99b598f..00000000 --- a/includes/jscalendar/lang/calendar-da.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar DA language -// Author: Michael Thingmand Henriksen, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Søndag", -"Mandag", -"Tirsdag", -"Onsdag", -"Torsdag", -"Fredag", -"Lørdag", -"Søndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Søn", -"Man", -"Tir", -"Ons", -"Tor", -"Fre", -"Lør", -"Søn"); - -// full month names -Calendar._MN = new Array -("Januar", -"Februar", -"Marts", -"April", -"Maj", -"Juni", -"Juli", -"August", -"September", -"Oktober", -"November", -"December"); - -// short month names -Calendar._SMN = new Array -("Jan", -"Feb", -"Mar", -"Apr", -"Maj", -"Jun", -"Jul", -"Aug", -"Sep", -"Okt", -"Nov", -"Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om Kalenderen"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For den seneste version besøg: http://www.dynarch.com/projects/calendar/\n"; + -"Distribueret under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detajler." + -"\n\n" + -"Valg af dato:\n" + -"- Brug \xab, \xbb knapperne for at vælge Ã¥r\n" + -"- Brug " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knapperne for at vælge mÃ¥ned\n" + -"- Hold knappen pÃ¥ musen nede pÃ¥ knapperne ovenfor for hurtigere valg."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Valg af tid:\n" + -"- Klik pÃ¥ en vilkÃ¥rlig del for større værdi\n" + -"- eller Shift-klik for for mindre værdi\n" + -"- eller klik og træk for hurtigere valg."; - -Calendar._TT["PREV_YEAR"] = "Ét Ã¥r tilbage (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Én mÃ¥ned tilbage (hold for menu)"; -Calendar._TT["GO_TODAY"] = "GÃ¥ til i dag"; -Calendar._TT["NEXT_MONTH"] = "Én mÃ¥ned frem (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Ét Ã¥r frem (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Vælg dag"; -Calendar._TT["DRAG_TO_MOVE"] = "Træk vinduet"; -Calendar._TT["PART_TODAY"] = " (i dag)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Vis %s først"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Luk"; -Calendar._TT["TODAY"] = "I dag"; -Calendar._TT["TIME_PART"] = "(Shift-)klik eller træk for at ændre værdi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Uge"; -Calendar._TT["TIME"] = "Tid:"; diff --git a/includes/jscalendar/lang/calendar-de.js b/includes/jscalendar/lang/calendar-de.js deleted file mode 100644 index 4bc1137c..00000000 --- a/includes/jscalendar/lang/calendar-de.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar DE language -// Author: Jack (tR), -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sonntag", - "Montag", - "Dienstag", - "Mittwoch", - "Donnerstag", - "Freitag", - "Samstag", - "Sonntag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("So", - "Mo", - "Di", - "Mi", - "Do", - "Fr", - "Sa", - "So"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "M\u00e4rz", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Dezember"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "M\u00e4r", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Okt", - "Nov", - "Dez"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "\u00DCber dieses Kalendarmodul"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Datum ausw\u00e4hlen:\n" + -"- Benutzen Sie die \xab, \xbb Buttons um das Jahr zu w\u00e4hlen\n" + -"- Benutzen Sie die " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " Buttons um den Monat zu w\u00e4hlen\n" + -"- F\u00fcr eine Schnellauswahl halten Sie die Maustaste \u00fcber diesen Buttons fest."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Zeit ausw\u00e4hlen:\n" + -"- Klicken Sie auf die Teile der Uhrzeit, um diese zu erh\u00F6hen\n" + -"- oder klicken Sie mit festgehaltener Shift-Taste um diese zu verringern\n" + -"- oder klicken und festhalten f\u00fcr Schnellauswahl."; - -Calendar._TT["TOGGLE"] = "Ersten Tag der Woche w\u00e4hlen"; -Calendar._TT["PREV_YEAR"] = "Voriges Jahr (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["PREV_MONTH"] = "Voriger Monat (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["GO_TODAY"] = "Heute ausw\u00e4hlen"; -Calendar._TT["NEXT_MONTH"] = "N\u00e4chst. Monat (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["NEXT_YEAR"] = "N\u00e4chst. Jahr (Festhalten f\u00fcr Schnellauswahl)"; -Calendar._TT["SEL_DATE"] = "Datum ausw\u00e4hlen"; -Calendar._TT["DRAG_TO_MOVE"] = "Zum Bewegen festhalten"; -Calendar._TT["PART_TODAY"] = " (Heute)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Woche beginnt mit %s "; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Schlie\u00dfen"; -Calendar._TT["TODAY"] = "Heute"; -Calendar._TT["TIME_PART"] = "(Shift-)Klick oder Festhalten und Ziehen um den Wert zu \u00e4ndern"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Zeit:"; diff --git a/includes/jscalendar/lang/calendar-du.js b/includes/jscalendar/lang/calendar-du.js deleted file mode 100644 index 22004480..00000000 --- a/includes/jscalendar/lang/calendar-du.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Toggle startdag van de week"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (indrukken voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige month (indrukken voor menu)"; -Calendar._TT["GO_TODAY"] = "Naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende Maand (indrukken voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (indrukken voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "Vandaag"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "D, M d"; - -Calendar._TT["WK"] = "wk"; diff --git a/includes/jscalendar/lang/calendar-el.js b/includes/jscalendar/lang/calendar-el.js deleted file mode 100644 index 43a9b2ce..00000000 --- a/includes/jscalendar/lang/calendar-el.js +++ /dev/null @@ -1,89 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("ΚυÏιακή", - "ΔευτέÏα", - "ΤÏίτη", - "ΤετάÏτη", - "Πέμπτη", - "ΠαÏασκευή", - "Σάββατο", - "ΚυÏιακή"); - -Calendar._SDN = new Array -("Κυ", - "Δε", - "TÏ", - "Τε", - "Πε", - "Πα", - "Σα", - "Κυ"); - -Calendar._MN = new Array -("ΙανουάÏιος", - "ΦεβÏουάÏιος", - "ΜάÏτιος", - "ΑπÏίλιος", - "Μάϊος", - "ΙοÏνιος", - "ΙοÏλιος", - "ΑÏγουστος", - "ΣεπτέμβÏιος", - "ΟκτώβÏιος", - "ÎοέμβÏιος", - "ΔεκέμβÏιος"); - -Calendar._SMN = new Array -("Ιαν", - "Φεβ", - "ΜαÏ", - "ΑπÏ", - "Μαι", - "Ιουν", - "Ιουλ", - "Αυγ", - "Σεπ", - "Οκτ", - "Îοε", - "Δεκ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Για το ημεÏολόγιο"; - -Calendar._TT["ABOUT"] = -"Επιλογέας ημεÏομηνίας/ÏŽÏας σε DHTML\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Για τελευταία έκδοση: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Επιλογή ημεÏομηνίας:\n" + -"- ΧÏησιμοποιείστε τα κουμπιά \xab, \xbb για επιλογή έτους\n" + -"- ΧÏησιμοποιείστε τα κουμπιά " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " για επιλογή μήνα\n" + -"- ΚÏατήστε κουμπί Ï€Î¿Î½Ï„Î¹ÎºÎ¿Ï Ï€Î±Ï„Î·Î¼Î­Î½Î¿ στα παÏαπάνω κουμπιά για πιο γÏήγοÏη επιλογή."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Επιλογή ÏŽÏας:\n" + -"- Κάντε κλικ σε ένα από τα μέÏη της ÏŽÏας για αÏξηση\n" + -"- ή Shift-κλικ για μείωση\n" + -"- ή κλικ και μετακίνηση για πιο γÏήγοÏη επιλογή."; -Calendar._TT["TOGGLE"] = "ΜπάÏα Ï€Ïώτης ημέÏας της εβδομάδας"; -Calendar._TT["PREV_YEAR"] = "ΠÏοηγ. έτος (κÏατήστε για το μενοÏ)"; -Calendar._TT["PREV_MONTH"] = "ΠÏοηγ. μήνας (κÏατήστε για το μενοÏ)"; -Calendar._TT["GO_TODAY"] = "ΣήμεÏα"; -Calendar._TT["NEXT_MONTH"] = "Επόμενος μήνας (κÏατήστε για το μενοÏ)"; -Calendar._TT["NEXT_YEAR"] = "Επόμενο έτος (κÏατήστε για το μενοÏ)"; -Calendar._TT["SEL_DATE"] = "Επιλέξτε ημεÏομηνία"; -Calendar._TT["DRAG_TO_MOVE"] = "ΣÏÏτε για να μετακινήσετε"; -Calendar._TT["PART_TODAY"] = " (σήμεÏα)"; -Calendar._TT["MON_FIRST"] = "Εμφάνιση ΔευτέÏας Ï€Ïώτα"; -Calendar._TT["SUN_FIRST"] = "Εμφάνιση ΚυÏιακής Ï€Ïώτα"; -Calendar._TT["CLOSE"] = "Κλείσιμο"; -Calendar._TT["TODAY"] = "ΣήμεÏα"; -Calendar._TT["TIME_PART"] = "(Shift-)κλικ ή μετακίνηση για αλλαγή"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "D, d M"; - -Calendar._TT["WK"] = "εβδ"; - diff --git a/includes/jscalendar/lang/calendar-en.js b/includes/jscalendar/lang/calendar-en.js deleted file mode 100644 index 0dbde793..00000000 --- a/includes/jscalendar/lang/calendar-en.js +++ /dev/null @@ -1,127 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - "Sunday"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - "Sun"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// full month names -Calendar._MN = new Array -("January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "About the calendar"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Date selection:\n" + -"- Use the \xab, \xbb buttons to select year\n" + -"- Use the " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " buttons to select month\n" + -"- Hold mouse button on any of the above buttons for faster selection."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Time selection:\n" + -"- Click on any of the time parts to increase it\n" + -"- or Shift-click to decrease it\n" + -"- or click and drag for faster selection."; - -Calendar._TT["PREV_YEAR"] = "Prev. year (hold for menu)"; -Calendar._TT["PREV_MONTH"] = "Prev. month (hold for menu)"; -Calendar._TT["GO_TODAY"] = "Go Today"; -Calendar._TT["NEXT_MONTH"] = "Next month (hold for menu)"; -Calendar._TT["NEXT_YEAR"] = "Next year (hold for menu)"; -Calendar._TT["SEL_DATE"] = "Select date"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag to move"; -Calendar._TT["PART_TODAY"] = " (today)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Display %s first"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Close"; -Calendar._TT["TODAY"] = "Today"; -Calendar._TT["TIME_PART"] = "(Shift-)Click or drag to change value"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Time:"; diff --git a/includes/jscalendar/lang/calendar-es.js b/includes/jscalendar/lang/calendar-es.js deleted file mode 100644 index 19c1b30b..00000000 --- a/includes/jscalendar/lang/calendar-es.js +++ /dev/null @@ -1,129 +0,0 @@ -// ** I18N - -// Calendar ES (spanish) language -// Author: Mihai Bazon, -// Updater: Servilio Afre Puentes -// Updated: 2004-06-03 -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Miércoles", - "Jueves", - "Viernes", - "Sábado", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mié", - "Jue", - "Vie", - "Sáb", - "Dom"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 1; - -// full month names -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// short month names -Calendar._SMN = new Array -("Ene", - "Feb", - "Mar", - "Abr", - "May", - "Jun", - "Jul", - "Ago", - "Sep", - "Oct", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Acerca del calendario"; - -Calendar._TT["ABOUT"] = -"Selector DHTML de Fecha/Hora\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Para conseguir la última versión visite: http://www.dynarch.com/projects/calendar/\n" + -"Distribuido bajo licencia GNU LGPL. Visite http://gnu.org/licenses/lgpl.html para más detalles." + -"\n\n" + -"Selección de fecha:\n" + -"- Use los botones \xab, \xbb para seleccionar el año\n" + -"- Use los botones " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + -"- Mantenga pulsado el ratón en cualquiera de estos botones para una selección rápida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selección de hora:\n" + -"- Pulse en cualquiera de las partes de la hora para incrementarla\n" + -"- o pulse las mayúsculas mientras hace clic para decrementarla\n" + -"- o haga clic y arrastre el ratón para una selección más rápida."; - -Calendar._TT["PREV_YEAR"] = "Año anterior (mantener para menú)"; -Calendar._TT["PREV_MONTH"] = "Mes anterior (mantener para menú)"; -Calendar._TT["GO_TODAY"] = "Ir a hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes siguiente (mantener para menú)"; -Calendar._TT["NEXT_YEAR"] = "Año siguiente (mantener para menú)"; -Calendar._TT["SEL_DATE"] = "Seleccionar fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastrar para mover"; -Calendar._TT["PART_TODAY"] = " (hoy)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Hacer %s primer día de la semana"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; -Calendar._TT["TIME_PART"] = "(Mayúscula-)Clic o arrastre para cambiar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; - -Calendar._TT["WK"] = "sem"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/includes/jscalendar/lang/calendar-eu.js b/includes/jscalendar/lang/calendar-eu.js deleted file mode 100644 index 18deb336..00000000 --- a/includes/jscalendar/lang/calendar-eu.js +++ /dev/null @@ -1,129 +0,0 @@ -// ** I18N - -// Calendar EU (basque) language -// Author: Xabier Bayon -// Updater: Xabier Bayon -// Updated: 2005-04-05 -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Igandea", - "Astelehena", - "Asteartea", - "Asteazkena", - "Osteguna", - "Ostirala", - "Larunbata", - "Igandea"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Ig", - "Al", - "Ar", - "Az", - "Os", - "Ol", - "La", - "Ig"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 1; - -// full month names -Calendar._MN = new Array -("Urtarrila", - "Otsaila", - "Martxoa", - "Apirila", - "Maiatza", - "Ekaina", - "Uztaila", - "Abuztua", - "Iraila", - "Urria", - "Azaroa", - "Abendua"); - -// short month names -Calendar._SMN = new Array -("Urt", - "Ots", - "Mar", - "Apr", - "Mai", - "Eka", - "Uzt", - "Abu", - "Ira", - "Urr", - "Aza", - "Abe"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Egutegiari buruz"; - -Calendar._TT["ABOUT"] = -"Data/ordua DHTML hautatzailea\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Bertsio berriena eskuratzeko: http://www.dynarch.com/projects/calendar/\n" + -"GNU LGPL baimenpean banatua. http://gnu.org/licenses/lgpl.html orrira joan zehaztasun gehiagotarako." + -"\n\n" + -"Data nola aukeratu:\n" + -"- \xab, \xbb botoiak erabili urtea aukeratzeko\n" + -"- " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " botoiak erabili hilabetea aukeratzeko\n" + -"- Aukera azkar burutzeko saguaren botoia sakatuta mantendu."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Ordua nola aukeratu:\n" + -"- Orduan sakatu gehitzeko\n" + -"- Maiuskula sakatuta ordu kopurua gutxituko da\n" + -"- Saguaren botoia sakatu eta arrastatuz arinago burutuko da."; - -Calendar._TT["PREV_YEAR"] = "Aurreko urtea (Menurako mantendu)"; -Calendar._TT["PREV_MONTH"] = "Aurreko hilabetea (Menurako mantendu)"; -Calendar._TT["GO_TODAY"] = "Gaurkora jo"; -Calendar._TT["NEXT_MONTH"] = "Hurrengo hilabetea (Menurako mantendu)"; -Calendar._TT["NEXT_YEAR"] = "Hurrengo urtea (Menurako mantendu)"; -Calendar._TT["SEL_DATE"] = "Data aukeratu"; -Calendar._TT["DRAG_TO_MOVE"] = "Mugitzeko arrastatu"; -Calendar._TT["PART_TODAY"] = " (gaur)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s asteko lehenengo eguna bihurtu"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Itxi"; -Calendar._TT["TODAY"] = "Gaur"; -Calendar._TT["TIME_PART"] = "(Mayúscula-)Clic o arrastre para cambiar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y/%m/%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%Yko %Bren %e, %A"; - -Calendar._TT["WK"] = "ast"; -Calendar._TT["TIME"] = "Ordua:"; diff --git a/includes/jscalendar/lang/calendar-fi.js b/includes/jscalendar/lang/calendar-fi.js deleted file mode 100644 index 328eabb3..00000000 --- a/includes/jscalendar/lang/calendar-fi.js +++ /dev/null @@ -1,98 +0,0 @@ -// ** I18N - -// Calendar FI language (Finnish, Suomi) -// Author: Jarno Käyhkö, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("Sunnuntai", - "Maanantai", - "Tiistai", - "Keskiviikko", - "Torstai", - "Perjantai", - "Lauantai", - "Sunnuntai"); - -// short day names -Calendar._SDN = new Array -("Su", - "Ma", - "Ti", - "Ke", - "To", - "Pe", - "La", - "Su"); - -// full month names -Calendar._MN = new Array -("Tammikuu", - "Helmikuu", - "Maaliskuu", - "Huhtikuu", - "Toukokuu", - "Kesäkuu", - "Heinäkuu", - "Elokuu", - "Syyskuu", - "Lokakuu", - "Marraskuu", - "Joulukuu"); - -// short month names -Calendar._SMN = new Array -("Tam", - "Hel", - "Maa", - "Huh", - "Tou", - "Kes", - "Hei", - "Elo", - "Syy", - "Lok", - "Mar", - "Jou"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Tietoja kalenterista"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Uusin versio osoitteessa: http://www.dynarch.com/projects/calendar/\n" + -"Julkaistu GNU LGPL lisenssin alaisuudessa. Lisätietoja osoitteessa http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Päivämäärä valinta:\n" + -"- Käytä \xab, \xbb painikkeita valitaksesi vuosi\n" + -"- Käytä " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " painikkeita valitaksesi kuukausi\n" + -"- Pitämällä hiiren painiketta minkä tahansa yllä olevan painikkeen kohdalla, saat näkyviin valikon nopeampaan siirtymiseen."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Ajan valinta:\n" + -"- Klikkaa kellonajan numeroita lisätäksesi aikaa\n" + -"- tai pitämällä Shift-näppäintä pohjassa saat aikaa taaksepäin\n" + -"- tai klikkaa ja pidä hiiren painike pohjassa sekä liikuta hiirtä muuttaaksesi aikaa nopeasti eteen- ja taaksepäin."; - -Calendar._TT["PREV_YEAR"] = "Edell. vuosi (paina hetki, näet valikon)"; -Calendar._TT["PREV_MONTH"] = "Edell. kuukausi (paina hetki, näet valikon)"; -Calendar._TT["GO_TODAY"] = "Siirry tähän päivään"; -Calendar._TT["NEXT_MONTH"] = "Seur. kuukausi (paina hetki, näet valikon)"; -Calendar._TT["NEXT_YEAR"] = "Seur. vuosi (paina hetki, näet valikon)"; -Calendar._TT["SEL_DATE"] = "Valitse päivämäärä"; -Calendar._TT["DRAG_TO_MOVE"] = "Siirrä kalenterin paikkaa"; -Calendar._TT["PART_TODAY"] = " (tänään)"; -Calendar._TT["MON_FIRST"] = "Näytä maanantai ensimmäisenä"; -Calendar._TT["SUN_FIRST"] = "Näytä sunnuntai ensimmäisenä"; -Calendar._TT["CLOSE"] = "Sulje"; -Calendar._TT["TODAY"] = "Tänään"; -Calendar._TT["TIME_PART"] = "(Shift-) Klikkaa tai liikuta muuttaaksesi aikaa"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%d.%m.%Y"; - -Calendar._TT["WK"] = "Vko"; diff --git a/includes/jscalendar/lang/calendar-fr.js b/includes/jscalendar/lang/calendar-fr.js deleted file mode 100644 index 4b535bc0..00000000 --- a/includes/jscalendar/lang/calendar-fr.js +++ /dev/null @@ -1,129 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// Translator: André Liechti, (2006-01-04) from scratch for version 1.x - -// full day names -Calendar._DN = new Array -("Dimanche", - "Lundi", - "Mardi", - "Mercredi", - "Jeudi", - "Vendredi", - "Samedi", - "Dimanche"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dim", - "Lun", - "Mar", - "Mer", - "Jeu", - "Ven", - "Sam", - "Dim"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 1; - -// full month names -Calendar._MN = new Array -("Janvier", - "Février", - "Mars", - "Avril", - "Mai", - "Juin", - "Juillet", - "Août", - "Septembre", - "Octobre", - "Novembre", - "Décembre"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fév", - "Mar", - "Avr", - "Mai", - "Juin", - "Juil", - "Aou", - "Sep", - "Oct", - "Nov", - "Déc"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "À propos du calendrier"; - -Calendar._TT["ABOUT"] = -"Sélecteur DHTML de date/heure\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pour la version actuelle, visitez: http://www.dynarch.com/projects/calendar/\n" + -"Distribué sous licence GNU LGPL. Voir http://gnu.org/licenses/lgpl.html pour les détails." + "\n(licence traduite en français: http://www.rodage.org/lgpl.fr.html)" + -"\n\n" + -"Sélection de la date:\n" + -"- Utiliser les boutons \xab, \xbb pour sélectionner l'année\n" + -"- Utiliser les boutons " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pour sélectionner le mois\n" + -"- En conservant pressé le bouton de la souris sur l'un de ces boutons, la sélection devient plus rapide."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Sélection de l\'heure:\n" + -"- Cliquer sur l'une des parties du temps pour l'augmenter\n" + -"- ou Maj-clic pour le diminuer\n" + -"- ou faire un cliquer-déplacer horizontal pour une modification plus rapide."; - -Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour afficher menu)"; -Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour afficher menu)"; -Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; -Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour afficher menu)"; -Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour afficher menu)"; -Calendar._TT["SEL_DATE"] = "Sélectionner une date"; -Calendar._TT["DRAG_TO_MOVE"] = "Glisser pour déplacer"; -Calendar._TT["PART_TODAY"] = " (aujourd'hui)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fermer"; -Calendar._TT["TODAY"] = "Aujourd'hui"; -Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour changer la valeur"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e %B"; - -Calendar._TT["WK"] = "sem."; -Calendar._TT["TIME"] = "Heure:"; diff --git a/includes/jscalendar/lang/calendar-he-utf8.js b/includes/jscalendar/lang/calendar-he-utf8.js deleted file mode 100644 index 7861217b..00000000 --- a/includes/jscalendar/lang/calendar-he-utf8.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Idan Sofer, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("ר×שון", - "שני", - "שלישי", - "רביעי", - "חמישי", - "שישי", - "שבת", - "ר×שון"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("×", - "ב", - "×’", - "ד", - "×”", - "ו", - "ש", - "×"); - -// full month names -Calendar._MN = new Array -("ינו×ר", - "פברו×ר", - "מרץ", - "×פריל", - "מ××™", - "יוני", - "יולי", - "×וגוסט", - "ספטמבר", - "×וקטובר", - "נובמבר", - "דצמבר"); - -// short month names -Calendar._SMN = new Array -("×™× ×", - "פבר", - "מרץ", - "×פר", - "מ××™", - "יונ", - "יול", - "×וג", - "ספט", - "×וק", - "נוב", - "דצמ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "×ודות השנתון"; - -Calendar._TT["ABOUT"] = -"בחרן ת×ריך/שעה DHTML\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"×”×’×™×¨×¡× ×”×חרונה זמינה ב: http://www.dynarch.com/projects/calendar/\n" + -"מופץ תחת זיכיון ×” GNU LGPL. עיין ב http://gnu.org/licenses/lgpl.html ×œ×¤×¨×˜×™× × ×•×¡×¤×™×." + -"\n\n" + -בחירת ת×ריך:\n" + -"- השתמש ×‘×›×¤×ª×•×¨×™× \xab, \xbb לבחירת שנה\n" + -"- השתמש ×‘×›×¤×ª×•×¨×™× " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " לבחירת חודש\n" + -"- החזק העכבר לחוץ מעל ×”×›×¤×ª×•×¨×™× ×”×ž×•×–×›×¨×™× ×œ×¢×™×œ לבחירה מהירה יותר."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"בחירת זמן:\n" + -"- לחץ על כל ×חד מחלקי הזמן כדי להוסיף\n" + -"- ×ו shift בשילוב ×¢× ×œ×—×™×¦×” כדי להחסיר\n" + -"- ×ו לחץ וגרור לפעולה מהירה יותר."; - -Calendar._TT["PREV_YEAR"] = "שנה קודמת - החזק לקבלת תפריט"; -Calendar._TT["PREV_MONTH"] = "חודש ×§×•×“× - החזק לקבלת תפריט"; -Calendar._TT["GO_TODAY"] = "עבור להיו×"; -Calendar._TT["NEXT_MONTH"] = "חודש ×”×‘× - החזק לתפריט"; -Calendar._TT["NEXT_YEAR"] = "שנה הב××” - החזק לתפריט"; -Calendar._TT["SEL_DATE"] = "בחר ת×ריך"; -Calendar._TT["DRAG_TO_MOVE"] = "גרור להזזה"; -Calendar._TT["PART_TODAY"] = " )היו×("; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "הצג %s קוד×"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "6"; - -Calendar._TT["CLOSE"] = "סגור"; -Calendar._TT["TODAY"] = "היו×"; -Calendar._TT["TIME_PART"] = "(שיפט-)לחץ וגרור כדי לשנות ערך"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "שעה::"; diff --git a/includes/jscalendar/lang/calendar-hr-utf8.js b/includes/jscalendar/lang/calendar-hr-utf8.js deleted file mode 100644 index d569cfd9..00000000 --- a/includes/jscalendar/lang/calendar-hr-utf8.js +++ /dev/null @@ -1,49 +0,0 @@ -/* Croatian language file for the DHTML Calendar version 0.9.2 -* Author Krunoslav Zubrinic , June 2003. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ -Calendar._DN = new Array -("Nedjelja", - "Ponedjeljak", - "Utorak", - "Srijeda", - "ÄŒetvrtak", - "Petak", - "Subota", - "Nedjelja"); -Calendar._MN = new Array -("SijeÄanj", - "VeljaÄa", - "Ožujak", - "Travanj", - "Svibanj", - "Lipanj", - "Srpanj", - "Kolovoz", - "Rujan", - "Listopad", - "Studeni", - "Prosinac"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Promjeni dan s kojim poÄinje tjedan"; -Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; -Calendar._TT["PREV_MONTH"] = "Prethodni mjesec (dugi pritisak za meni)"; -Calendar._TT["GO_TODAY"] = "Idi na tekući dan"; -Calendar._TT["NEXT_MONTH"] = "Slijedeći mjesec (dugi pritisak za meni)"; -Calendar._TT["NEXT_YEAR"] = "Slijedeća godina (dugi pritisak za meni)"; -Calendar._TT["SEL_DATE"] = "Izaberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i povuci za promjenu pozicije"; -Calendar._TT["PART_TODAY"] = " (today)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedjeljak kao prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedjelju kao prvi dan"; -Calendar._TT["CLOSE"] = "Zatvori"; -Calendar._TT["TODAY"] = "Danas"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "DD, dd.mm.y"; - -Calendar._TT["WK"] = "Tje"; \ No newline at end of file diff --git a/includes/jscalendar/lang/calendar-hr.js b/includes/jscalendar/lang/calendar-hr.js deleted file mode 100644 index 6c27f60c..00000000 Binary files a/includes/jscalendar/lang/calendar-hr.js and /dev/null differ diff --git a/includes/jscalendar/lang/calendar-hu.js b/includes/jscalendar/lang/calendar-hu.js deleted file mode 100644 index f5bf057e..00000000 --- a/includes/jscalendar/lang/calendar-hu.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar HU language -// Author: ??? -// Modifier: KARASZI Istvan, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Vasárnap", - "Hétfõ", - "Kedd", - "Szerda", - "Csütörtök", - "Péntek", - "Szombat", - "Vasárnap"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("v", - "h", - "k", - "sze", - "cs", - "p", - "szo", - "v"); - -// full month names -Calendar._MN = new Array -("január", - "február", - "március", - "április", - "május", - "június", - "július", - "augusztus", - "szeptember", - "október", - "november", - "december"); - -// short month names -Calendar._SMN = new Array -("jan", - "feb", - "már", - "ápr", - "máj", - "jún", - "júl", - "aug", - "sze", - "okt", - "nov", - "dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "A kalendáriumról"; - -Calendar._TT["ABOUT"] = -"DHTML dátum/idõ kiválasztó\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"a legfrissebb verzió megtalálható: http://www.dynarch.com/projects/calendar/\n" + -"GNU LGPL alatt terjesztve. Lásd a http://gnu.org/licenses/lgpl.html oldalt a részletekhez." + -"\n\n" + -"Dátum választás:\n" + -"- használja a \xab, \xbb gombokat az év kiválasztásához\n" + -"- használja a " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gombokat a hónap kiválasztásához\n" + -"- tartsa lenyomva az egérgombot a gyors választáshoz."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Idõ választás:\n" + -"- kattintva növelheti az idõt\n" + -"- shift-tel kattintva csökkentheti\n" + -"- lenyomva tartva és húzva gyorsabban kiválaszthatja."; - -Calendar._TT["PREV_YEAR"] = "Elõzõ év (tartsa nyomva a menühöz)"; -Calendar._TT["PREV_MONTH"] = "Elõzõ hónap (tartsa nyomva a menühöz)"; -Calendar._TT["GO_TODAY"] = "Mai napra ugrás"; -Calendar._TT["NEXT_MONTH"] = "Köv. hónap (tartsa nyomva a menühöz)"; -Calendar._TT["NEXT_YEAR"] = "Köv. év (tartsa nyomva a menühöz)"; -Calendar._TT["SEL_DATE"] = "Válasszon dátumot"; -Calendar._TT["DRAG_TO_MOVE"] = "Húzza a mozgatáshoz"; -Calendar._TT["PART_TODAY"] = " (ma)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s legyen a hét elsõ napja"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Bezár"; -Calendar._TT["TODAY"] = "Ma"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikk vagy húzás az érték változtatásához"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b %e, %a"; - -Calendar._TT["WK"] = "hét"; -Calendar._TT["TIME"] = "idõ:"; diff --git a/includes/jscalendar/lang/calendar-it.js b/includes/jscalendar/lang/calendar-it.js deleted file mode 100644 index 7f84cde0..00000000 --- a/includes/jscalendar/lang/calendar-it.js +++ /dev/null @@ -1,124 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Translator: Fabio Di Bernardini, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domenica", - "Lunedì", - "Martedì", - "Mercoledì", - "Giovedì", - "Venerdì", - "Sabato", - "Domenica"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mer", - "Gio", - "Ven", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Gennaio", - "Febbraio", - "Marzo", - "Aprile", - "Maggio", - "Giugno", - "Luglio", - "Augosto", - "Settembre", - "Ottobre", - "Novembre", - "Dicembre"); - -// short month names -Calendar._SMN = new Array -("Gen", - "Feb", - "Mar", - "Apr", - "Mag", - "Giu", - "Lug", - "Ago", - "Set", - "Ott", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Informazioni sul calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Per gli aggiornamenti: http://www.dynarch.com/projects/calendar/\n" + -"Distribuito sotto licenza GNU LGPL. Vedi http://gnu.org/licenses/lgpl.html per i dettagli." + -"\n\n" + -"Selezione data:\n" + -"- Usa \xab, \xbb per selezionare l'anno\n" + -"- Usa " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " per i mesi\n" + -"- Tieni premuto a lungo il mouse per accedere alle funzioni di selezione veloce."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selezione orario:\n" + -"- Clicca sul numero per incrementarlo\n" + -"- o Shift+click per decrementarlo\n" + -"- o click e sinistra o destra per variarlo."; - -Calendar._TT["PREV_YEAR"] = "Anno prec.(clicca a lungo per il menù)"; -Calendar._TT["PREV_MONTH"] = "Mese prec. (clicca a lungo per il menù)"; -Calendar._TT["GO_TODAY"] = "Oggi"; -Calendar._TT["NEXT_MONTH"] = "Pross. mese (clicca a lungo per il menù)"; -Calendar._TT["NEXT_YEAR"] = "Pross. anno (clicca a lungo per il menù)"; -Calendar._TT["SEL_DATE"] = "Seleziona data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trascina per spostarlo"; -Calendar._TT["PART_TODAY"] = " (oggi)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostra prima %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Chiudi"; -Calendar._TT["TODAY"] = "Oggi"; -Calendar._TT["TIME_PART"] = "(Shift-)Click o trascina per cambiare il valore"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a:%b:%e"; - -Calendar._TT["WK"] = "set"; -Calendar._TT["TIME"] = "Ora:"; diff --git a/includes/jscalendar/lang/calendar-jp.js b/includes/jscalendar/lang/calendar-jp.js deleted file mode 100644 index 3bca7ebf..00000000 --- a/includes/jscalendar/lang/calendar-jp.js +++ /dev/null @@ -1,45 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("“ú", - "ŒŽ", - "‰Î", - "…", - "–Ø", - "‹à", - "“y", - "“ú"); -Calendar._MN = new Array -("1ŒŽ", - "2ŒŽ", - "3ŒŽ", - "4ŒŽ", - "5ŒŽ", - "6ŒŽ", - "7ŒŽ", - "8ŒŽ", - "9ŒŽ", - "10ŒŽ", - "11ŒŽ", - "12ŒŽ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "T‚Ìʼn‚Ì—j“ú‚ðØ‚è‘Ö‚¦"; -Calendar._TT["PREV_YEAR"] = "‘O”N"; -Calendar._TT["PREV_MONTH"] = "‘OŒŽ"; -Calendar._TT["GO_TODAY"] = "¡“ú"; -Calendar._TT["NEXT_MONTH"] = "—‚ŒŽ"; -Calendar._TT["NEXT_YEAR"] = "—‚”N"; -Calendar._TT["SEL_DATE"] = "“ú•t‘I‘ð"; -Calendar._TT["DRAG_TO_MOVE"] = "ƒEƒBƒ“ƒhƒE‚̈ړ®"; -Calendar._TT["PART_TODAY"] = " (¡“ú)"; -Calendar._TT["MON_FIRST"] = "ŒŽ—j“ú‚ð擪‚É"; -Calendar._TT["SUN_FIRST"] = "“ú—j“ú‚ð擪‚É"; -Calendar._TT["CLOSE"] = "•Â‚¶‚é"; -Calendar._TT["TODAY"] = "¡“ú"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "y-mm-dd"; -Calendar._TT["TT_DATE_FORMAT"] = "%mŒŽ %d“ú (%a)"; - -Calendar._TT["WK"] = "T"; diff --git a/includes/jscalendar/lang/calendar-ko-utf8.js b/includes/jscalendar/lang/calendar-ko-utf8.js deleted file mode 100644 index 035dd748..00000000 --- a/includes/jscalendar/lang/calendar-ko-utf8.js +++ /dev/null @@ -1,120 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Translation: Yourim Yi -// Encoding: EUC-KR -// lang : ko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names - -Calendar._DN = new Array -("ì¼ìš”ì¼", - "월요ì¼", - "화요ì¼", - "수요ì¼", - "목요ì¼", - "금요ì¼", - "토요ì¼", - "ì¼ìš”ì¼"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("ì¼", - "ì›”", - "í™”", - "수", - "목", - "금", - "토", - "ì¼"); - -// full month names -Calendar._MN = new Array -("1ì›”", - "2ì›”", - "3ì›”", - "4ì›”", - "5ì›”", - "6ì›”", - "7ì›”", - "8ì›”", - "9ì›”", - "10ì›”", - "11ì›”", - "12ì›”"); - -// short month names -Calendar._SMN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "calendar ì— ëŒ€í•´ì„œ"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"\n"+ -"최신 ë²„ì „ì„ ë°›ìœ¼ì‹œë ¤ë©´ http://www.dynarch.com/projects/calendar/ ì— ë°©ë¬¸í•˜ì„¸ìš”\n" + -"\n"+ -"GNU LGPL ë¼ì´ì„¼ìŠ¤ë¡œ ë°°í¬ë©ë‹ˆë‹¤. \n"+ -"ë¼ì´ì„¼ìŠ¤ì— 대한 ìžì„¸í•œ ë‚´ìš©ì€ http://gnu.org/licenses/lgpl.html ì„ ì½ìœ¼ì„¸ìš”." + -"\n\n" + -"날짜 ì„ íƒ:\n" + -"- ì—°ë„를 ì„ íƒí•˜ë ¤ë©´ \xab, \xbb ë²„íŠ¼ì„ ì‚¬ìš©í•©ë‹ˆë‹¤\n" + -"- ë‹¬ì„ ì„ íƒí•˜ë ¤ë©´ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ë²„íŠ¼ì„ ëˆ„ë¥´ì„¸ìš”\n" + -"- ê³„ì† ëˆ„ë¥´ê³  있으면 위 ê°’ë“¤ì„ ë¹ ë¥´ê²Œ ì„ íƒí•˜ì‹¤ 수 있습니다."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"시간 ì„ íƒ:\n" + -"- 마우스로 누르면 ì‹œê°„ì´ ì¦ê°€í•©ë‹ˆë‹¤\n" + -"- Shift 키와 함께 누르면 ê°ì†Œí•©ë‹ˆë‹¤\n" + -"- 누른 ìƒíƒœì—ì„œ 마우스를 움ì§ì´ë©´ 좀 ë” ë¹ ë¥´ê²Œ ê°’ì´ ë³€í•©ë‹ˆë‹¤.\n"; - -Calendar._TT["PREV_YEAR"] = "지난 í•´ (길게 누르면 목ë¡)"; -Calendar._TT["PREV_MONTH"] = "지난 달 (길게 누르면 목ë¡)"; -Calendar._TT["GO_TODAY"] = "오늘 날짜로"; -Calendar._TT["NEXT_MONTH"] = "ë‹¤ìŒ ë‹¬ (길게 누르면 목ë¡)"; -Calendar._TT["NEXT_YEAR"] = "ë‹¤ìŒ í•´ (길게 누르면 목ë¡)"; -Calendar._TT["SEL_DATE"] = "날짜를 ì„ íƒí•˜ì„¸ìš”"; -Calendar._TT["DRAG_TO_MOVE"] = "마우스 드래그로 ì´ë™ 하세요"; -Calendar._TT["PART_TODAY"] = " (오늘)"; -Calendar._TT["MON_FIRST"] = "월요ì¼ì„ í•œ ì£¼ì˜ ì‹œìž‘ ìš”ì¼ë¡œ"; -Calendar._TT["SUN_FIRST"] = "ì¼ìš”ì¼ì„ í•œ ì£¼ì˜ ì‹œìž‘ ìš”ì¼ë¡œ"; -Calendar._TT["CLOSE"] = "닫기"; -Calendar._TT["TODAY"] = "오늘"; -Calendar._TT["TIME_PART"] = "(Shift-)í´ë¦­ ë˜ëŠ” 드래그 하세요"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; - -Calendar._TT["WK"] = "주"; diff --git a/includes/jscalendar/lang/calendar-ko.js b/includes/jscalendar/lang/calendar-ko.js deleted file mode 100644 index 8cddf586..00000000 --- a/includes/jscalendar/lang/calendar-ko.js +++ /dev/null @@ -1,120 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Translation: Yourim Yi -// Encoding: EUC-KR -// lang : ko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names - -Calendar._DN = new Array -("ÀÏ¿äÀÏ", - "¿ù¿äÀÏ", - "È­¿äÀÏ", - "¼ö¿äÀÏ", - "¸ñ¿äÀÏ", - "±Ý¿äÀÏ", - "Åä¿äÀÏ", - "ÀÏ¿äÀÏ"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("ÀÏ", - "¿ù", - "È­", - "¼ö", - "¸ñ", - "±Ý", - "Åä", - "ÀÏ"); - -// full month names -Calendar._MN = new Array -("1¿ù", - "2¿ù", - "3¿ù", - "4¿ù", - "5¿ù", - "6¿ù", - "7¿ù", - "8¿ù", - "9¿ù", - "10¿ù", - "11¿ù", - "12¿ù"); - -// short month names -Calendar._SMN = new Array -("1", - "2", - "3", - "4", - "5", - "6", - "7", - "8", - "9", - "10", - "11", - "12"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "calendar ¿¡ ´ëÇؼ­"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"\n"+ -"ÃֽŠ¹öÀüÀ» ¹ÞÀ¸½Ã·Á¸é http://www.dynarch.com/projects/calendar/ ¿¡ ¹æ¹®Çϼ¼¿ä\n" + -"\n"+ -"GNU LGPL ¶óÀ̼¾½º·Î ¹èÆ÷µË´Ï´Ù. \n"+ -"¶óÀ̼¾½º¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ ³»¿ëÀº http://gnu.org/licenses/lgpl.html À» ÀÐÀ¸¼¼¿ä." + -"\n\n" + -"³¯Â¥ ¼±ÅÃ:\n" + -"- ¿¬µµ¸¦ ¼±ÅÃÇÏ·Á¸é \xab, \xbb ¹öÆ°À» »ç¿ëÇÕ´Ï´Ù\n" + -"- ´ÞÀ» ¼±ÅÃÇÏ·Á¸é " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ¹öÆ°À» ´©¸£¼¼¿ä\n" + -"- °è¼Ó ´©¸£°í ÀÖÀ¸¸é À§ °ªµéÀ» ºü¸£°Ô ¼±ÅÃÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"½Ã°£ ¼±ÅÃ:\n" + -"- ¸¶¿ì½º·Î ´©¸£¸é ½Ã°£ÀÌ Áõ°¡ÇÕ´Ï´Ù\n" + -"- Shift Å°¿Í ÇÔ²² ´©¸£¸é °¨¼ÒÇÕ´Ï´Ù\n" + -"- ´©¸¥ »óÅ¿¡¼­ ¸¶¿ì½º¸¦ ¿òÁ÷À̸é Á» ´õ ºü¸£°Ô °ªÀÌ º¯ÇÕ´Ï´Ù.\n"; - -Calendar._TT["PREV_YEAR"] = "Áö³­ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; -Calendar._TT["PREV_MONTH"] = "Áö³­ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; -Calendar._TT["GO_TODAY"] = "¿À´Ã ³¯Â¥·Î"; -Calendar._TT["NEXT_MONTH"] = "´ÙÀ½ ´Þ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; -Calendar._TT["NEXT_YEAR"] = "´ÙÀ½ ÇØ (±æ°Ô ´©¸£¸é ¸ñ·Ï)"; -Calendar._TT["SEL_DATE"] = "³¯Â¥¸¦ ¼±ÅÃÇϼ¼¿ä"; -Calendar._TT["DRAG_TO_MOVE"] = "¸¶¿ì½º µå·¡±×·Î À̵¿ Çϼ¼¿ä"; -Calendar._TT["PART_TODAY"] = " (¿À´Ã)"; -Calendar._TT["MON_FIRST"] = "¿ù¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î"; -Calendar._TT["SUN_FIRST"] = "ÀÏ¿äÀÏÀ» ÇÑ ÁÖÀÇ ½ÃÀÛ ¿äÀÏ·Î"; -Calendar._TT["CLOSE"] = "´Ý±â"; -Calendar._TT["TODAY"] = "¿À´Ã"; -Calendar._TT["TIME_PART"] = "(Shift-)Ŭ¸¯ ¶Ç´Â µå·¡±× Çϼ¼¿ä"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%b/%e [%a]"; - -Calendar._TT["WK"] = "ÁÖ"; diff --git a/includes/jscalendar/lang/calendar-lt-utf8.js b/includes/jscalendar/lang/calendar-lt-utf8.js deleted file mode 100644 index d39653be..00000000 --- a/includes/jscalendar/lang/calendar-lt-utf8.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar LT language -// Author: Martynas Majeris, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sekmadienis", - "Pirmadienis", - "Antradienis", - "TreÄiadienis", - "Ketvirtadienis", - "Pentadienis", - "Å eÅ¡tadienis", - "Sekmadienis"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sek", - "Pir", - "Ant", - "Tre", - "Ket", - "Pen", - "Å eÅ¡", - "Sek"); - -// full month names -Calendar._MN = new Array -("Sausis", - "Vasaris", - "Kovas", - "Balandis", - "Gegužė", - "Birželis", - "Liepa", - "RugpjÅ«tis", - "RugsÄ—jis", - "Spalis", - "Lapkritis", - "Gruodis"); - -// short month names -Calendar._SMN = new Array -("Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Apie kalendorių"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"NaujausiÄ… versijÄ… rasite: http://www.dynarch.com/projects/calendar/\n" + -"Platinamas pagal GNU LGPL licencijÄ…. Aplankykite http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Datos pasirinkimas:\n" + -"- Metų pasirinkimas: \xab, \xbb\n" + -"- MÄ—nesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- Nuspauskite ir laikykite pelÄ—s klaviÅ¡Ä… greitesniam pasirinkimui."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laiko pasirinkimas:\n" + -"- Spustelkite ant valandų arba minuÄių - skaiÄius padidÄ—s vienetu.\n" + -"- Jei spausite kartu su Shift, skaiÄius sumažės.\n" + -"- Greitam pasirinkimui spustelkite ir pajudinkite pelÄ™."; - -Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; -Calendar._TT["PREV_MONTH"] = "Ankstesnis mÄ—nuo (laikykite, jei norite meniu)"; -Calendar._TT["GO_TODAY"] = "Pasirinkti Å¡iandienÄ…"; -Calendar._TT["NEXT_MONTH"] = "Kitas mÄ—nuo (laikykite, jei norite meniu)"; -Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; -Calendar._TT["SEL_DATE"] = "Pasirinkite datÄ…"; -Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; -Calendar._TT["PART_TODAY"] = " (Å¡iandien)"; -Calendar._TT["MON_FIRST"] = "Pirma savaitÄ—s diena - pirmadienis"; -Calendar._TT["SUN_FIRST"] = "Pirma savaitÄ—s diena - sekmadienis"; -Calendar._TT["CLOSE"] = "Uždaryti"; -Calendar._TT["TODAY"] = "Å iandien"; -Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; - -Calendar._TT["WK"] = "sav"; diff --git a/includes/jscalendar/lang/calendar-lt.js b/includes/jscalendar/lang/calendar-lt.js deleted file mode 100644 index 43b93d68..00000000 --- a/includes/jscalendar/lang/calendar-lt.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar LT language -// Author: Martynas Majeris, -// Encoding: Windows-1257 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Sekmadienis", - "Pirmadienis", - "Antradienis", - "Treèiadienis", - "Ketvirtadienis", - "Pentadienis", - "Ðeðtadienis", - "Sekmadienis"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sek", - "Pir", - "Ant", - "Tre", - "Ket", - "Pen", - "Ðeð", - "Sek"); - -// full month names -Calendar._MN = new Array -("Sausis", - "Vasaris", - "Kovas", - "Balandis", - "Geguþë", - "Birþelis", - "Liepa", - "Rugpjûtis", - "Rugsëjis", - "Spalis", - "Lapkritis", - "Gruodis"); - -// short month names -Calendar._SMN = new Array -("Sau", - "Vas", - "Kov", - "Bal", - "Geg", - "Bir", - "Lie", - "Rgp", - "Rgs", - "Spa", - "Lap", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Apie kalendoriø"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Naujausià versijà rasite: http://www.dynarch.com/projects/calendar/\n" + -"Platinamas pagal GNU LGPL licencijà. Aplankykite http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"Datos pasirinkimas:\n" + -"- Metø pasirinkimas: \xab, \xbb\n" + -"- Mënesio pasirinkimas: " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- Nuspauskite ir laikykite pelës klaviðà greitesniam pasirinkimui."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laiko pasirinkimas:\n" + -"- Spustelkite ant valandø arba minuèiø - skaièus padidës vienetu.\n" + -"- Jei spausite kartu su Shift, skaièius sumaþës.\n" + -"- Greitam pasirinkimui spustelkite ir pajudinkite pelæ."; - -Calendar._TT["PREV_YEAR"] = "Ankstesni metai (laikykite, jei norite meniu)"; -Calendar._TT["PREV_MONTH"] = "Ankstesnis mënuo (laikykite, jei norite meniu)"; -Calendar._TT["GO_TODAY"] = "Pasirinkti ðiandienà"; -Calendar._TT["NEXT_MONTH"] = "Kitas mënuo (laikykite, jei norite meniu)"; -Calendar._TT["NEXT_YEAR"] = "Kiti metai (laikykite, jei norite meniu)"; -Calendar._TT["SEL_DATE"] = "Pasirinkite datà"; -Calendar._TT["DRAG_TO_MOVE"] = "Tempkite"; -Calendar._TT["PART_TODAY"] = " (ðiandien)"; -Calendar._TT["MON_FIRST"] = "Pirma savaitës diena - pirmadienis"; -Calendar._TT["SUN_FIRST"] = "Pirma savaitës diena - sekmadienis"; -Calendar._TT["CLOSE"] = "Uþdaryti"; -Calendar._TT["TODAY"] = "Ðiandien"; -Calendar._TT["TIME_PART"] = "Spustelkite arba tempkite jei norite pakeisti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %Y-%m-%d"; - -Calendar._TT["WK"] = "sav"; diff --git a/includes/jscalendar/lang/calendar-lv.js b/includes/jscalendar/lang/calendar-lv.js deleted file mode 100644 index 407699d3..00000000 --- a/includes/jscalendar/lang/calendar-lv.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar LV language -// Author: Juris Valdovskis, -// Encoding: cp1257 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Svçtdiena", - "Pirmdiena", - "Otrdiena", - "Treðdiena", - "Ceturdiena", - "Piektdiena", - "Sestdiena", - "Svçtdiena"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Sv", - "Pr", - "Ot", - "Tr", - "Ce", - "Pk", - "Se", - "Sv"); - -// full month names -Calendar._MN = new Array -("Janvâris", - "Februâris", - "Marts", - "Aprîlis", - "Maijs", - "Jûnijs", - "Jûlijs", - "Augusts", - "Septembris", - "Oktobris", - "Novembris", - "Decembris"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Mai", - "Jûn", - "Jûl", - "Aug", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Par kalendâru"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Datuma izvçle:\n" + -"- Izmanto \xab, \xbb pogas, lai izvçlçtos gadu\n" + -"- Izmanto " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "pogas, lai izvçlçtos mçnesi\n" + -"- Turi nospiestu peles pogu uz jebkuru no augstâk minçtajâm pogâm, lai paâtrinâtu izvçli."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Laika izvçle:\n" + -"- Uzklikðíini uz jebkuru no laika daïâm, lai palielinâtu to\n" + -"- vai Shift-klikðíis, lai samazinâtu to\n" + -"- vai noklikðíini un velc uz attiecîgo virzienu lai mainîtu âtrâk."; - -Calendar._TT["PREV_YEAR"] = "Iepr. gads (turi izvçlnei)"; -Calendar._TT["PREV_MONTH"] = "Iepr. mçnesis (turi izvçlnei)"; -Calendar._TT["GO_TODAY"] = "Ðodien"; -Calendar._TT["NEXT_MONTH"] = "Nâkoðais mçnesis (turi izvçlnei)"; -Calendar._TT["NEXT_YEAR"] = "Nâkoðais gads (turi izvçlnei)"; -Calendar._TT["SEL_DATE"] = "Izvçlies datumu"; -Calendar._TT["DRAG_TO_MOVE"] = "Velc, lai pârvietotu"; -Calendar._TT["PART_TODAY"] = " (ðodien)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Attçlot %s kâ pirmo"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "1,7"; - -Calendar._TT["CLOSE"] = "Aizvçrt"; -Calendar._TT["TODAY"] = "Ðodien"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikðíis vai pârvieto, lai mainîtu"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Laiks:"; diff --git a/includes/jscalendar/lang/calendar-nl.js b/includes/jscalendar/lang/calendar-nl.js deleted file mode 100644 index a1dea94b..00000000 --- a/includes/jscalendar/lang/calendar-nl.js +++ /dev/null @@ -1,73 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Zondag", - "Maandag", - "Dinsdag", - "Woensdag", - "Donderdag", - "Vrijdag", - "Zaterdag", - "Zondag"); - -Calendar._SDN_len = 2; - -Calendar._MN = new Array -("Januari", - "Februari", - "Maart", - "April", - "Mei", - "Juni", - "Juli", - "Augustus", - "September", - "Oktober", - "November", - "December"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Info"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/Tijd Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"Ga voor de meest recente versie naar: http://www.dynarch.com/projects/calendar/\n" + -"Verspreid onder de GNU LGPL. Zie http://gnu.org/licenses/lgpl.html voor details." + -"\n\n" + -"Datum selectie:\n" + -"- Gebruik de \xab \xbb knoppen om een jaar te selecteren\n" + -"- Gebruik de " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " knoppen om een maand te selecteren\n" + -"- Houd de muis ingedrukt op de genoemde knoppen voor een snellere selectie."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tijd selectie:\n" + -"- Klik op een willekeurig onderdeel van het tijd gedeelte om het te verhogen\n" + -"- of Shift-klik om het te verlagen\n" + -"- of klik en sleep voor een snellere selectie."; - -//Calendar._TT["TOGGLE"] = "Selecteer de eerste week-dag"; -Calendar._TT["PREV_YEAR"] = "Vorig jaar (ingedrukt voor menu)"; -Calendar._TT["PREV_MONTH"] = "Vorige maand (ingedrukt voor menu)"; -Calendar._TT["GO_TODAY"] = "Ga naar Vandaag"; -Calendar._TT["NEXT_MONTH"] = "Volgende maand (ingedrukt voor menu)"; -Calendar._TT["NEXT_YEAR"] = "Volgend jaar (ingedrukt voor menu)"; -Calendar._TT["SEL_DATE"] = "Selecteer datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Klik en sleep om te verplaatsen"; -Calendar._TT["PART_TODAY"] = " (vandaag)"; -//Calendar._TT["MON_FIRST"] = "Toon Maandag eerst"; -//Calendar._TT["SUN_FIRST"] = "Toon Zondag eerst"; - -Calendar._TT["DAY_FIRST"] = "Toon %s eerst"; - -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Sluiten"; -Calendar._TT["TODAY"] = "(vandaag)"; -Calendar._TT["TIME_PART"] = "(Shift-)Klik of sleep om de waarde te veranderen"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b %Y"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Tijd:"; \ No newline at end of file diff --git a/includes/jscalendar/lang/calendar-no.js b/includes/jscalendar/lang/calendar-no.js deleted file mode 100644 index d9297d17..00000000 --- a/includes/jscalendar/lang/calendar-no.js +++ /dev/null @@ -1,114 +0,0 @@ -// ** I18N - -// Calendar NO language -// Author: Daniel Holmen, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Søndag", - "Mandag", - "Tirsdag", - "Onsdag", - "Torsdag", - "Fredag", - "Lørdag", - "Søndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Søn", - "Man", - "Tir", - "Ons", - "Tor", - "Fre", - "Lør", - "Søn"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Mars", - "April", - "Mai", - "Juni", - "Juli", - "August", - "September", - "Oktober", - "November", - "Desember"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Mai", - "Jun", - "Jul", - "Aug", - "Sep", - "Okt", - "Nov", - "Des"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om kalenderen"; - -Calendar._TT["ABOUT"] = -"DHTML Dato-/Tidsvelger\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For nyeste versjon, gÃ¥ til: http://www.dynarch.com/projects/calendar/\n" + -"Distribuert under GNU LGPL. Se http://gnu.org/licenses/lgpl.html for detaljer." + -"\n\n" + -"Datovalg:\n" + -"- Bruk knappene \xab og \xbb for Ã¥ velge Ã¥r\n" + -"- Bruk knappene " + String.fromCharCode(0x2039) + " og " + String.fromCharCode(0x203a) + " for Ã¥ velge mÃ¥ned\n" + -"- Hold inne musknappen eller knappene over for raskere valg."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Tidsvalg:\n" + -"- Klikk pÃ¥ en av tidsdelene for Ã¥ øke den\n" + -"- eller Shift-klikk for Ã¥ senke verdien\n" + -"- eller klikk-og-dra for raskere valg.."; - -Calendar._TT["PREV_YEAR"] = "Forrige. Ã¥r (hold for meny)"; -Calendar._TT["PREV_MONTH"] = "Forrige. mÃ¥ned (hold for meny)"; -Calendar._TT["GO_TODAY"] = "GÃ¥ til idag"; -Calendar._TT["NEXT_MONTH"] = "Neste mÃ¥ned (hold for meny)"; -Calendar._TT["NEXT_YEAR"] = "Neste Ã¥r (hold for meny)"; -Calendar._TT["SEL_DATE"] = "Velg dato"; -Calendar._TT["DRAG_TO_MOVE"] = "Dra for Ã¥ flytte"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Vis mandag først"; -Calendar._TT["SUN_FIRST"] = "Vis søndag først"; -Calendar._TT["CLOSE"] = "Lukk"; -Calendar._TT["TODAY"] = "Idag"; -Calendar._TT["TIME_PART"] = "(Shift-)Klikk eller dra for Ã¥ endre verdi"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "uke"; \ No newline at end of file diff --git a/includes/jscalendar/lang/calendar-pl-utf8.js b/includes/jscalendar/lang/calendar-pl-utf8.js deleted file mode 100644 index 6b8ca67a..00000000 --- a/includes/jscalendar/lang/calendar-pl-utf8.js +++ /dev/null @@ -1,93 +0,0 @@ -// ** I18N - -// Calendar PL language -// Author: Dariusz Pietrzak, -// Author: Janusz Piwowarski, -// Encoding: utf-8 -// Distributed under the same terms as the calendar itself. - -Calendar._DN = new Array -("Niedziela", - "PoniedziaÅ‚ek", - "Wtorek", - "Åšroda", - "Czwartek", - "PiÄ…tek", - "Sobota", - "Niedziela"); -Calendar._SDN = new Array -("Nie", - "Pn", - "Wt", - "Åšr", - "Cz", - "Pt", - "So", - "Nie"); -Calendar._MN = new Array -("StyczeÅ„", - "Luty", - "Marzec", - "KwiecieÅ„", - "Maj", - "Czerwiec", - "Lipiec", - "SierpieÅ„", - "WrzesieÅ„", - "Październik", - "Listopad", - "GrudzieÅ„"); -Calendar._SMN = new Array -("Sty", - "Lut", - "Mar", - "Kwi", - "Maj", - "Cze", - "Lip", - "Sie", - "Wrz", - "Paź", - "Lis", - "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendarzu"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Aby pobrać najnowszÄ… wersjÄ™, odwiedź: http://www.dynarch.com/projects/calendar/\n" + -"DostÄ™pny na licencji GNU LGPL. Zobacz szczegóły na http://gnu.org/licenses/lgpl.html." + -"\n\n" + -"Wybór daty:\n" + -"- Użyj przycisków \xab, \xbb by wybrać rok\n" + -"- Użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " by wybrać miesiÄ…c\n" + -"- Przytrzymaj klawisz myszy nad jednym z powyższych przycisków dla szybszego wyboru."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Wybór czasu:\n" + -"- Kliknij na jednym z pól czasu by zwiÄ™kszyć jego wartość\n" + -"- lub kliknij trzymajÄ…c Shift by zmiejszyć jego wartość\n" + -"- lub kliknij i przeciÄ…gnij dla szybszego wyboru."; - -//Calendar._TT["TOGGLE"] = "ZmieÅ„ pierwszy dzieÅ„ tygodnia"; -Calendar._TT["PREV_YEAR"] = "Poprzedni rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprzedni miesiÄ…c (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Idź do dzisiaj"; -Calendar._TT["NEXT_MONTH"] = "NastÄ™pny miesiÄ…c (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "NastÄ™pny rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz datÄ™"; -Calendar._TT["DRAG_TO_MOVE"] = "PrzeciÄ…gnij by przesunąć"; -Calendar._TT["PART_TODAY"] = " (dzisiaj)"; -Calendar._TT["MON_FIRST"] = "WyÅ›wietl poniedziaÅ‚ek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "WyÅ›wietl niedzielÄ™ jako pierwszÄ…"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "Dzisiaj"; -Calendar._TT["TIME_PART"] = "(Shift-)Kliknij lub przeciÄ…gnij by zmienić wartość"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %B, %A"; - -Calendar._TT["WK"] = "ty"; diff --git a/includes/jscalendar/lang/calendar-pl.js b/includes/jscalendar/lang/calendar-pl.js deleted file mode 100644 index 76e0551a..00000000 --- a/includes/jscalendar/lang/calendar-pl.js +++ /dev/null @@ -1,56 +0,0 @@ -// ** I18N -// Calendar PL language -// Author: Artur Filipiak, -// January, 2004 -// Encoding: UTF-8 -Calendar._DN = new Array -("Niedziela", "PoniedziaÅ‚ek", "Wtorek", "Åšroda", "Czwartek", "PiÄ…tek", "Sobota", "Niedziela"); - -Calendar._SDN = new Array -("N", "Pn", "Wt", "Åšr", "Cz", "Pt", "So", "N"); - -Calendar._MN = new Array -("StyczeÅ„", "Luty", "Marzec", "KwiecieÅ„", "Maj", "Czerwiec", "Lipiec", "SierpieÅ„", "WrzesieÅ„", "Październik", "Listopad", "GrudzieÅ„"); - -Calendar._SMN = new Array -("Sty", "Lut", "Mar", "Kwi", "Maj", "Cze", "Lip", "Sie", "Wrz", "Paź", "Lis", "Gru"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendarzu"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Wybór daty:\n" + -"- aby wybrać rok użyj przycisków \xab, \xbb\n" + -"- aby wybrać miesiÄ…c użyj przycisków " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + "\n" + -"- aby przyspieszyć wybór przytrzymaj wciÅ›niÄ™ty przycisk myszy nad ww. przyciskami."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Wybór czasu:\n" + -"- aby zwiÄ™kszyć wartość kliknij na dowolnym elemencie selekcji czasu\n" + -"- aby zmniejszyć wartość użyj dodatkowo klawisza Shift\n" + -"- możesz również poruszać myszkÄ™ w lewo i prawo wraz z wciÅ›niÄ™tym lewym klawiszem."; - -Calendar._TT["PREV_YEAR"] = "Poprz. rok (przytrzymaj dla menu)"; -Calendar._TT["PREV_MONTH"] = "Poprz. miesiÄ…c (przytrzymaj dla menu)"; -Calendar._TT["GO_TODAY"] = "Pokaż dziÅ›"; -Calendar._TT["NEXT_MONTH"] = "Nast. miesiÄ…c (przytrzymaj dla menu)"; -Calendar._TT["NEXT_YEAR"] = "Nast. rok (przytrzymaj dla menu)"; -Calendar._TT["SEL_DATE"] = "Wybierz datÄ™"; -Calendar._TT["DRAG_TO_MOVE"] = "PrzesuÅ„ okienko"; -Calendar._TT["PART_TODAY"] = " (dziÅ›)"; -Calendar._TT["MON_FIRST"] = "Pokaż PoniedziaÅ‚ek jako pierwszy"; -Calendar._TT["SUN_FIRST"] = "Pokaż NiedzielÄ™ jako pierwszÄ…"; -Calendar._TT["CLOSE"] = "Zamknij"; -Calendar._TT["TODAY"] = "DziÅ›"; -Calendar._TT["TIME_PART"] = "(Shift-)klik | drag, aby zmienić wartość"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y.%m.%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "wk"; \ No newline at end of file diff --git a/includes/jscalendar/lang/calendar-pt.js b/includes/jscalendar/lang/calendar-pt.js deleted file mode 100644 index deee8a19..00000000 --- a/includes/jscalendar/lang/calendar-pt.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar pt_BR language -// Author: Adalberto Machado, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Segunda", - "Terca", - "Quarta", - "Quinta", - "Sexta", - "Sabado", - "Domingo"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Dom", - "Seg", - "Ter", - "Qua", - "Qui", - "Sex", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Janeiro", - "Fevereiro", - "Marco", - "Abril", - "Maio", - "Junho", - "Julho", - "Agosto", - "Setembro", - "Outubro", - "Novembro", - "Dezembro"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Fev", - "Mar", - "Abr", - "Mai", - "Jun", - "Jul", - "Ago", - "Set", - "Out", - "Nov", - "Dez"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Sobre o calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Ultima versao visite: http://www.dynarch.com/projects/calendar/\n" + -"Distribuido sobre GNU LGPL. Veja http://gnu.org/licenses/lgpl.html para detalhes." + -"\n\n" + -"Selecao de data:\n" + -"- Use os botoes \xab, \xbb para selecionar o ano\n" + -"- Use os botoes " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para selecionar o mes\n" + -"- Segure o botao do mouse em qualquer um desses botoes para selecao rapida."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selecao de hora:\n" + -"- Clique em qualquer parte da hora para incrementar\n" + -"- ou Shift-click para decrementar\n" + -"- ou clique e segure para selecao rapida."; - -Calendar._TT["PREV_YEAR"] = "Ant. ano (segure para menu)"; -Calendar._TT["PREV_MONTH"] = "Ant. mes (segure para menu)"; -Calendar._TT["GO_TODAY"] = "Hoje"; -Calendar._TT["NEXT_MONTH"] = "Prox. mes (segure para menu)"; -Calendar._TT["NEXT_YEAR"] = "Prox. ano (segure para menu)"; -Calendar._TT["SEL_DATE"] = "Selecione a data"; -Calendar._TT["DRAG_TO_MOVE"] = "Arraste para mover"; -Calendar._TT["PART_TODAY"] = " (hoje)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostre %s primeiro"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Fechar"; -Calendar._TT["TODAY"] = "Hoje"; -Calendar._TT["TIME_PART"] = "(Shift-)Click ou arraste para mudar valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e %b"; - -Calendar._TT["WK"] = "sm"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/includes/jscalendar/lang/calendar-ro.js b/includes/jscalendar/lang/calendar-ro.js deleted file mode 100644 index 116e358b..00000000 --- a/includes/jscalendar/lang/calendar-ro.js +++ /dev/null @@ -1,66 +0,0 @@ -// ** I18N -Calendar._DN = new Array -("Duminică", - "Luni", - "MarÅ£i", - "Miercuri", - "Joi", - "Vineri", - "Sâmbătă", - "Duminică"); -Calendar._SDN_len = 2; -Calendar._MN = new Array -("Ianuarie", - "Februarie", - "Martie", - "Aprilie", - "Mai", - "Iunie", - "Iulie", - "August", - "Septembrie", - "Octombrie", - "Noiembrie", - "Decembrie"); - -// tooltips -Calendar._TT = {}; - -Calendar._TT["INFO"] = "Despre calendar"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Pentru ultima versiune vizitaÅ£i: http://www.dynarch.com/projects/calendar/\n" + -"Distribuit sub GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"SelecÅ£ia datei:\n" + -"- FolosiÅ£i butoanele \xab, \xbb pentru a selecta anul\n" + -"- FolosiÅ£i butoanele " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pentru a selecta luna\n" + -"- TineÅ£i butonul mouse-ului apăsat pentru selecÅ£ie mai rapidă."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"SelecÅ£ia orei:\n" + -"- Click pe ora sau minut pentru a mări valoarea cu 1\n" + -"- Sau Shift-Click pentru a micÅŸora valoarea cu 1\n" + -"- Sau Click ÅŸi drag pentru a selecta mai repede."; - -Calendar._TT["PREV_YEAR"] = "Anul precedent (lung pt menu)"; -Calendar._TT["PREV_MONTH"] = "Luna precedentă (lung pt menu)"; -Calendar._TT["GO_TODAY"] = "Data de azi"; -Calendar._TT["NEXT_MONTH"] = "Luna următoare (lung pt menu)"; -Calendar._TT["NEXT_YEAR"] = "Anul următor (lung pt menu)"; -Calendar._TT["SEL_DATE"] = "Selectează data"; -Calendar._TT["DRAG_TO_MOVE"] = "Trage pentru a miÅŸca"; -Calendar._TT["PART_TODAY"] = " (astăzi)"; -Calendar._TT["DAY_FIRST"] = "AfiÅŸează %s prima zi"; -Calendar._TT["WEEKEND"] = "0,6"; -Calendar._TT["CLOSE"] = "ÃŽnchide"; -Calendar._TT["TODAY"] = "Astăzi"; -Calendar._TT["TIME_PART"] = "(Shift-)Click sau drag pentru a selecta"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %d %B"; - -Calendar._TT["WK"] = "spt"; -Calendar._TT["TIME"] = "Ora:"; diff --git a/includes/jscalendar/lang/calendar-ru-UTF.js b/includes/jscalendar/lang/calendar-ru-UTF.js deleted file mode 100644 index 1d9c142d..00000000 --- a/includes/jscalendar/lang/calendar-ru-UTF.js +++ /dev/null @@ -1,122 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Oleg Marchuk, -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("ВоÑкреÑенье", - "Понедельник", - "Вторник", - "Среда", - "Четверг", - "ПÑтница", - "Суббота", - "ВоÑреÑение"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("Ð’Ñк", - "Пнд", - "Ð’Ñ‚Ñ€", - "Срд", - "Чтв", - "Птн", - "Сбт", - "Ð’Ñк"); -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 1; - -// full month names -Calendar._MN = new Array -("Январь", - "Февраль", - "Март", - "Ðпрель", - "Май", - "Июнь", - "Июль", - "ÐвгуÑÑ‚", - "СентÑбрь", - "ОктÑбрь", - "ÐоÑбрь", - "Декабрь"); - -// short month names -Calendar._SMN = new Array -("Янв", - "Фев", - "Мар", - "Ðпр", - "Май", - "Июн", - "Июл", - "Ðвг", - "Сен", - "Окт", - "ÐоÑ", - "Дек"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Об календаре"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) -"For latest version visit: http://dynarch.com/mishoo/calendar.epl\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Как выбрать дату:\n" + -"- При помощи кнопок \xab, \xbb можно выбрать год\n" + -"- При помощи кнопок " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " можно выбрать меÑÑц\n" + -"- Подержите Ñти кнопки нажатыми, чтобы поÑвилоÑÑŒ меню быÑтрого выбора."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Как выбрать времÑ:\n" + -"- При клике на чаÑах или минутах они увеличиваютÑÑ\n" + -"- При клике Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишей Shift они уменьшаютÑÑ.\n" + -"- ЕÑли нажать и двигать мышкой влево/вправо, они будут менÑÑ‚ÑŒÑÑ Ð±Ñ‹Ñтрее."; - -Calendar._TT["PREV_YEAR"] = "Пред. год"; -Calendar._TT["PREV_MONTH"] = "Пред. меÑÑц"; -Calendar._TT["GO_TODAY"] = "СегоднÑ"; -Calendar._TT["NEXT_MONTH"] = "След. меÑÑц"; -Calendar._TT["NEXT_YEAR"] = "След. год"; -Calendar._TT["SEL_DATE"] = "Выберите дату"; -Calendar._TT["DRAG_TO_MOVE"] = "ПеретаÑкивать"; -Calendar._TT["PART_TODAY"] = " (ÑегоднÑ)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Показывать %s первым"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Закрыть"; -Calendar._TT["TODAY"] = "СегоднÑ"; -Calendar._TT["TIME_PART"] = "(Shift-)клик или нажать и двигать"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d.%m.%y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "нед"; -Calendar._TT["TIME"] = "ВремÑ:"; diff --git a/includes/jscalendar/lang/calendar-ru.js b/includes/jscalendar/lang/calendar-ru.js deleted file mode 100644 index 9f75a6a4..00000000 --- a/includes/jscalendar/lang/calendar-ru.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar RU language -// Translation: Sly Golovanov, http://golovanov.net, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("воÑкреÑенье", - "понедельник", - "вторник", - "Ñреда", - "четверг", - "пÑтница", - "Ñуббота", - "воÑкреÑенье"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("вÑк", - "пон", - "втр", - "Ñрд", - "чет", - "пÑÑ‚", - "Ñуб", - "вÑк"); - -// full month names -Calendar._MN = new Array -("Ñнварь", - "февраль", - "март", - "апрель", - "май", - "июнь", - "июль", - "авгуÑÑ‚", - "ÑентÑбрь", - "октÑбрь", - "ноÑбрь", - "декабрь"); - -// short month names -Calendar._SMN = new Array -("Ñнв", - "фев", - "мар", - "апр", - "май", - "июн", - "июл", - "авг", - "Ñен", - "окт", - "ноÑ", - "дек"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "О календаре..."; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Как выбрать дату:\n" + -"- При помощи кнопок \xab, \xbb можно выбрать год\n" + -"- При помощи кнопок " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " можно выбрать меÑÑц\n" + -"- Подержите Ñти кнопки нажатыми, чтобы поÑвилоÑÑŒ меню быÑтрого выбора."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Как выбрать времÑ:\n" + -"- При клике на чаÑах или минутах они увеличиваютÑÑ\n" + -"- при клике Ñ Ð½Ð°Ð¶Ð°Ñ‚Ð¾Ð¹ клавишей Shift они уменьшаютÑÑ\n" + -"- еÑли нажать и двигать мышкой влево/вправо, они будут менÑÑ‚ÑŒÑÑ Ð±Ñ‹Ñтрее."; - -Calendar._TT["PREV_YEAR"] = "Ðа год назад (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; -Calendar._TT["PREV_MONTH"] = "Ðа меÑÑц назад (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; -Calendar._TT["GO_TODAY"] = "СегоднÑ"; -Calendar._TT["NEXT_MONTH"] = "Ðа меÑÑц вперед (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; -Calendar._TT["NEXT_YEAR"] = "Ðа год вперед (удерживать Ð´Ð»Ñ Ð¼ÐµÐ½ÑŽ)"; -Calendar._TT["SEL_DATE"] = "Выберите дату"; -Calendar._TT["DRAG_TO_MOVE"] = "ПеретаÑкивайте мышкой"; -Calendar._TT["PART_TODAY"] = " (ÑегоднÑ)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Первый день недели будет %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Закрыть"; -Calendar._TT["TODAY"] = "СегоднÑ"; -Calendar._TT["TIME_PART"] = "(Shift-)клик или нажать и двигать"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; - -Calendar._TT["WK"] = "нед"; -Calendar._TT["TIME"] = "ВремÑ:"; diff --git a/includes/jscalendar/lang/calendar-ru_win_.js b/includes/jscalendar/lang/calendar-ru_win_.js deleted file mode 100644 index de455afa..00000000 --- a/includes/jscalendar/lang/calendar-ru_win_.js +++ /dev/null @@ -1,123 +0,0 @@ -// ** I18N - -// Calendar RU language -// Translation: Sly Golovanov, http://golovanov.net, -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("âîñêðåñåíüå", - "ïîíåäåëüíèê", - "âòîðíèê", - "ñðåäà", - "÷åòâåðã", - "ïÿòíèöà", - "ñóááîòà", - "âîñêðåñåíüå"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("âñê", - "ïîí", - "âòð", - "ñðä", - "÷åò", - "ïÿò", - "ñóá", - "âñê"); - -// full month names -Calendar._MN = new Array -("ÿíâàðü", - "ôåâðàëü", - "ìàðò", - "àïðåëü", - "ìàé", - "èþíü", - "èþëü", - "àâãóñò", - "ñåíòÿáðü", - "îêòÿáðü", - "íîÿáðü", - "äåêàáðü"); - -// short month names -Calendar._SMN = new Array -("ÿíâ", - "ôåâ", - "ìàð", - "àïð", - "ìàé", - "èþí", - "èþë", - "àâã", - "ñåí", - "îêò", - "íîÿ", - "äåê"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Î êàëåíäàðå..."; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Êàê âûáðàòü äàòó:\n" + -"- Ïðè ïîìîùè êíîïîê \xab, \xbb ìîæíî âûáðàòü ãîä\n" + -"- Ïðè ïîìîùè êíîïîê " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " ìîæíî âûáðàòü ìåñÿö\n" + -"- Ïîäåðæèòå ýòè êíîïêè íàæàòûìè, ÷òîáû ïîÿâèëîñü ìåíþ áûñòðîãî âûáîðà."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Êàê âûáðàòü âðåìÿ:\n" + -"- Ïðè êëèêå íà ÷àñàõ èëè ìèíóòàõ îíè óâåëè÷èâàþòñÿ\n" + -"- ïðè êëèêå ñ íàæàòîé êëàâèøåé Shift îíè óìåíüøàþòñÿ\n" + -"- åñëè íàæàòü è äâèãàòü ìûøêîé âëåâî/âïðàâî, îíè áóäóò ìåíÿòüñÿ áûñòðåå."; - -Calendar._TT["PREV_YEAR"] = "Íà ãîä íàçàä (óäåðæèâàòü äëÿ ìåíþ)"; -Calendar._TT["PREV_MONTH"] = "Íà ìåñÿö íàçàä (óäåðæèâàòü äëÿ ìåíþ)"; -Calendar._TT["GO_TODAY"] = "Ñåãîäíÿ"; -Calendar._TT["NEXT_MONTH"] = "Íà ìåñÿö âïåðåä (óäåðæèâàòü äëÿ ìåíþ)"; -Calendar._TT["NEXT_YEAR"] = "Íà ãîä âïåðåä (óäåðæèâàòü äëÿ ìåíþ)"; -Calendar._TT["SEL_DATE"] = "Âûáåðèòå äàòó"; -Calendar._TT["DRAG_TO_MOVE"] = "Ïåðåòàñêèâàéòå ìûøêîé"; -Calendar._TT["PART_TODAY"] = " (ñåãîäíÿ)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Ïåðâûé äåíü íåäåëè áóäåò %s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Çàêðûòü"; -Calendar._TT["TODAY"] = "Ñåãîäíÿ"; -Calendar._TT["TIME_PART"] = "(Shift-)êëèê èëè íàæàòü è äâèãàòü"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%e %b, %a"; - -Calendar._TT["WK"] = "íåä"; -Calendar._TT["TIME"] = "Âðåìÿ:"; diff --git a/includes/jscalendar/lang/calendar-si.js b/includes/jscalendar/lang/calendar-si.js deleted file mode 100644 index cb3dfb9f..00000000 --- a/includes/jscalendar/lang/calendar-si.js +++ /dev/null @@ -1,94 +0,0 @@ -/* Slovenian language file for the DHTML Calendar version 0.9.2 -* Author David Milost , January 2004. -* Feel free to use this script under the terms of the GNU Lesser General -* Public License, as long as you do not remove or alter this notice. -*/ - // full day names -Calendar._DN = new Array -("Nedelja", - "Ponedeljek", - "Torek", - "Sreda", - "ÄŒetrtek", - "Petek", - "Sobota", - "Nedelja"); - // short day names - Calendar._SDN = new Array -("Ned", - "Pon", - "Tor", - "Sre", - "ÄŒet", - "Pet", - "Sob", - "Ned"); -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Maj", - "Jun", - "Jul", - "Avg", - "Sep", - "Okt", - "Nov", - "Dec"); - // full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Marec", - "April", - "Maj", - "Junij", - "Julij", - "Avgust", - "September", - "Oktober", - "November", - "December"); - -// tooltips -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O koledarju"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Za zadnjo verzijo pojdine na naslov: http://www.dynarch.com/projects/calendar/\n" + -"Distribuirano pod GNU LGPL. Poglejte http://gnu.org/licenses/lgpl.html za podrobnosti." + -"\n\n" + -"Izbor datuma:\n" + -"- Uporabite \xab, \xbb gumbe za izbor leta\n" + -"- Uporabite " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " gumbe za izbor meseca\n" + -"- Zadržite klik na kateremkoli od zgornjih gumbov za hiter izbor."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Izbor ćasa:\n" + -"- Kliknite na katerikoli del ćasa za poveć. le-tega\n" + -"- ali Shift-click za zmanj. le-tega\n" + -"- ali kliknite in povlecite za hiter izbor."; - -Calendar._TT["TOGGLE"] = "Spremeni dan s katerim se prićne teden"; -Calendar._TT["PREV_YEAR"] = "Predhodnje leto (dolg klik za meni)"; -Calendar._TT["PREV_MONTH"] = "Predhodnji mesec (dolg klik za meni)"; -Calendar._TT["GO_TODAY"] = "Pojdi na tekoći dan"; -Calendar._TT["NEXT_MONTH"] = "Naslednji mesec (dolg klik za meni)"; -Calendar._TT["NEXT_YEAR"] = "Naslednje leto (dolg klik za meni)"; -Calendar._TT["SEL_DATE"] = "Izberite datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni in povleci za spremembo pozicije"; -Calendar._TT["PART_TODAY"] = " (danes)"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedeljek kot prvi dan"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedeljo kot prvi dan"; -Calendar._TT["CLOSE"] = "Zapri"; -Calendar._TT["TODAY"] = "Danes"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; - -Calendar._TT["WK"] = "Ted"; \ No newline at end of file diff --git a/includes/jscalendar/lang/calendar-sk.js b/includes/jscalendar/lang/calendar-sk.js deleted file mode 100644 index 4fe6a3c8..00000000 --- a/includes/jscalendar/lang/calendar-sk.js +++ /dev/null @@ -1,99 +0,0 @@ -// ** I18N - -// Calendar SK language -// Author: Peter Valach (pvalach@gmx.net) -// Encoding: utf-8 -// Last update: 2003/10/29 -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("NedeÄľa", - "Pondelok", - "Utorok", - "Streda", - "Ĺ tvrtok", - "Piatok", - "Sobota", - "NedeÄľa"); - -// short day names -Calendar._SDN = new Array -("Ned", - "Pon", - "Uto", - "Str", - "Ĺ tv", - "Pia", - "Sob", - "Ned"); - -// full month names -Calendar._MN = new Array -("Január", - "Február", - "Marec", - "AprĂ­l", - "Máj", - "JÄ‚ÅŸn", - "JÄ‚ÅŸl", - "August", - "September", - "OktÄ‚Å‚ber", - "November", - "December"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Máj", - "JÄ‚ÅŸn", - "JÄ‚ÅŸl", - "Aug", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendári"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + -"PoslednÄ‚ÅŸ verziu nájdete na: http://www.dynarch.com/projects/calendar/\n" + -"DistribuovanĂ© pod GNU LGPL. ViÄŹ http://gnu.org/licenses/lgpl.html pre detaily." + -"\n\n" + -"VÄ‚Ëber dátumu:\n" + -"- PouĹľite tlaÄŤidlá \xab, \xbb pre vÄ‚Ëber roku\n" + -"- PouĹľite tlaÄŤidlá " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " pre vÄ‚Ëber mesiaca\n" + -"- Ak ktorĂ©koÄľvek z tÄ‚Ëchto tlaÄŤidiel podržíte dlhšie, zobrazĂ­ sa rÄ‚Ëchly vÄ‚Ëber."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"VÄ‚Ëber ÄŤasu:\n" + -"- Kliknutie na niektorÄ‚ÅŸ poloĹľku ÄŤasu ju zvÄ‚Ëši\n" + -"- Shift-klik ju znĂ­Ĺľi\n" + -"- Ak podržíte tlaÄŤĂ­tko stlaÄŤenĂ©, posÄ‚ÅŸvanĂ­m menĂ­te hodnotu."; - -Calendar._TT["PREV_YEAR"] = "PredošlÄ‚Ë rok (podrĹľte pre menu)"; -Calendar._TT["PREV_MONTH"] = "PredošlÄ‚Ë mesiac (podrĹľte pre menu)"; -Calendar._TT["GO_TODAY"] = "PrejsĹĄ na dnešok"; -Calendar._TT["NEXT_MONTH"] = "Nasl. mesiac (podrĹľte pre menu)"; -Calendar._TT["NEXT_YEAR"] = "Nasl. rok (podrĹľte pre menu)"; -Calendar._TT["SEL_DATE"] = "ZvoÄľte dátum"; -Calendar._TT["DRAG_TO_MOVE"] = "PodrĹľanĂ­m tlaÄŤĂ­tka zmenĂ­te polohu"; -Calendar._TT["PART_TODAY"] = " (dnes)"; -Calendar._TT["MON_FIRST"] = "ZobraziĹĄ pondelok ako prvÄ‚Ë"; -Calendar._TT["SUN_FIRST"] = "ZobraziĹĄ nedeÄľu ako prvÄ‚ÅŸ"; -Calendar._TT["CLOSE"] = "ZavrieĹĄ"; -Calendar._TT["TODAY"] = "Dnes"; -Calendar._TT["TIME_PART"] = "(Shift-)klik/ĹĄahanie zmenĂ­ hodnotu"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "$d. %m. %Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %e. %b"; - -Calendar._TT["WK"] = "tÄ‚ËĹľ"; diff --git a/includes/jscalendar/lang/calendar-sp.js b/includes/jscalendar/lang/calendar-sp.js deleted file mode 100644 index 239d1b3b..00000000 --- a/includes/jscalendar/lang/calendar-sp.js +++ /dev/null @@ -1,110 +0,0 @@ -// ** I18N - -// Calendar SP language -// Author: Rafael Velasco -// Encoding: any -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("Domingo", - "Lunes", - "Martes", - "Miercoles", - "Jueves", - "Viernes", - "Sabado", - "Domingo"); - -Calendar._SDN = new Array -("Dom", - "Lun", - "Mar", - "Mie", - "Jue", - "Vie", - "Sab", - "Dom"); - -// full month names -Calendar._MN = new Array -("Enero", - "Febrero", - "Marzo", - "Abril", - "Mayo", - "Junio", - "Julio", - "Agosto", - "Septiembre", - "Octubre", - "Noviembre", - "Diciembre"); - -// short month names -Calendar._SMN = new Array -("Ene", - "Feb", - "Mar", - "Abr", - "May", - "Jun", - "Jul", - "Ago", - "Sep", - "Oct", - "Nov", - "Dic"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Información del Calendario"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"Nuevas versiones en: http://www.dynarch.com/projects/calendar/\n" + -"Distribuida bajo licencia GNU LGPL. Para detalles vea http://gnu.org/licenses/lgpl.html ." + -"\n\n" + -"Selección de Fechas:\n" + -"- Use \xab, \xbb para seleccionar el año\n" + -"- Use " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " para seleccionar el mes\n" + -"- Mantenga presionado el botón del ratón en cualquiera de las opciones superiores para un acceso rapido ."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Selección del Reloj:\n" + -"- Seleccione la hora para cambiar el reloj\n" + -"- o presione Shift-click para disminuirlo\n" + -"- o presione click y arrastre del ratón para una selección rapida."; - -Calendar._TT["PREV_YEAR"] = "Año anterior (Presione para menu)"; -Calendar._TT["PREV_MONTH"] = "Mes Anterior (Presione para menu)"; -Calendar._TT["GO_TODAY"] = "Ir a Hoy"; -Calendar._TT["NEXT_MONTH"] = "Mes Siguiente (Presione para menu)"; -Calendar._TT["NEXT_YEAR"] = "Año Siguiente (Presione para menu)"; -Calendar._TT["SEL_DATE"] = "Seleccione fecha"; -Calendar._TT["DRAG_TO_MOVE"] = "Arrastre y mueva"; -Calendar._TT["PART_TODAY"] = " (Hoy)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Mostrar %s primero"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Cerrar"; -Calendar._TT["TODAY"] = "Hoy"; -Calendar._TT["TIME_PART"] = "(Shift-)Click o arrastra para cambar el valor"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%dd-%mm-%yy"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %e de %B de %Y"; - -Calendar._TT["WK"] = "Sm"; -Calendar._TT["TIME"] = "Hora:"; diff --git a/includes/jscalendar/lang/calendar-sr-utf8.js b/includes/jscalendar/lang/calendar-sr-utf8.js deleted file mode 100644 index 23536b9c..00000000 --- a/includes/jscalendar/lang/calendar-sr-utf8.js +++ /dev/null @@ -1,107 +0,0 @@ -// ** I18N - -// Calendar SR language Serbian (Latin) -// Author: Mihai Bazon, -// Translation: Nenad Nikolic -// Encoding: UTF-8 -// Feel free to use / redistribute under the GNU LGPL. - -// full day names -Calendar._DN = new Array -("Nedelja", - "Ponedeljak", - "Utorak", - "Sreda", - "ÄŒetvrtak", - "Petak", - "Subota", - "Nedelja"); - -// short day names -Calendar._SDN = new Array -("Ned", - "Pon", - "Uto", - "Sre", - "ÄŒet", - "Pet", - "Sub", - "Ned"); - -// full month names -Calendar._MN = new Array -("Januar", - "Februar", - "Mart", - "April", - "Maj", - "Jun", - "Jul", - "Avgust", - "Septembar", - "Oktobar", - "Novembar", - "Decembar"); - -// short month names -Calendar._SMN = new Array -("Jan", - "Feb", - "Mar", - "Apr", - "Maj", - "Jun", - "Jul", - "Avg", - "Sep", - "Okt", - "Nov", - "Dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "O kalendaru"; - -Calendar._TT["ABOUT"] = -"DHTML Kalendar\n" + -"(c) dynarch.com 2002-2003\n" + // don't translate this this ;-) -"Najnovija verzija kontrole nalazi se http://dynarch.com/mishoo/calendar.epl\n" + -"Distribuirano po GNU LGPL licencom. Za detalje pogledaj http://gnu.org/licenses/lgpl.html." + -"\n\n" + -"Izbor datuma:\n" + -"- Koristi dugmiće \xab, \xbb za izbor godine\n" + -"- Koristi dugmiće " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " za izbor meseca\n" + -"- Za brži izbor, držati pritisnut taster miÅ¡a iznad bilo kog od pomenutih dugmića"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Izbor vremena:\n" + -"- Kliktaj na sate ili minute povećava njihove vrednosti\n" + -"- Shift-klik smanjuje njihove vrednosti\n" + -"- klikni i vuci za brži izbor."; - -Calendar._TT["PREV_YEAR"] = "Prethodna godina (dugi pritisak za meni)"; -Calendar._TT["PREV_MONTH"] = "Prethodni mesec (dugi pritisak za meni)"; -Calendar._TT["GO_TODAY"] = "Idi na danaÅ¡nji dan"; -Calendar._TT["NEXT_MONTH"] = "Sledeći mesec (dugi pritisak za meni)"; -Calendar._TT["NEXT_YEAR"] = "Sledeća godina (dugi pritisak za meni)"; -Calendar._TT["SEL_DATE"] = "Izaberi datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Pritisni i vuci za promenu pozicije"; -Calendar._TT["PART_TODAY"] = " (danas)"; - -// Choose first day of week. -Calendar._TT["DAY_FIRST"] = "%s kao prvi dan u nedelji"; -Calendar._TT["MON_FIRST"] = "Prikaži ponedeljak kao prvi dan nedelje"; -Calendar._TT["SUN_FIRST"] = "Prikaži nedelju kao prvi dan nedelje"; - -// Weekend is usual: Sunday (0) and Saturday (6). -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "Zatvori"; -Calendar._TT["TODAY"] = "Danas"; -Calendar._TT["TIME_PART"] = "(Shift-)klikni i vuci za promenu vrednosti"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%d-%m-%Y"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %B %e"; - -Calendar._TT["WK"] = "wk"; -Calendar._TT["TIME"] = "Time:"; diff --git a/includes/jscalendar/lang/calendar-sr.js b/includes/jscalendar/lang/calendar-sr.js deleted file mode 100644 index 3fd501b7..00000000 Binary files a/includes/jscalendar/lang/calendar-sr.js and /dev/null differ diff --git a/includes/jscalendar/lang/calendar-sv.js b/includes/jscalendar/lang/calendar-sv.js deleted file mode 100644 index a88183b5..00000000 --- a/includes/jscalendar/lang/calendar-sv.js +++ /dev/null @@ -1,132 +0,0 @@ -// ** I18N - -// Calendar SV language (Swedish, svenska) -// Author: Mihai Bazon, -// Translation team: -// Translator: Leonard NorrgÃ¥rd -// Last translator: Emil Ljungdahl -// Encoding: UTF-8 -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("söndag", - "mÃ¥ndag", - "tisdag", - "onsdag", - "torsdag", - "fredag", - "lördag", - "söndag"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("sön", - "mÃ¥n", - "tis", - "ons", - "tor", - "fre", - "lör", - "sön"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// full month names -Calendar._MN = new Array -("januari", - "februari", - "mars", - "april", - "maj", - "juni", - "juli", - "augusti", - "september", - "oktober", - "november", - "december"); - -// short month names -Calendar._SMN = new Array -("jan", - "feb", - "mar", - "apr", - "maj", - "jun", - "jul", - "aug", - "sep", - "okt", - "nov", - "dec"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "Om kalendern"; - -Calendar._TT["ABOUT"] = -"DHTML Datum/tid-väljare\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"För senaste version gÃ¥ till: http://www.dynarch.com/projects/calendar/\n" + -"Distribueras under GNU LGPL. Se http://gnu.org/licenses/lgpl.html för detaljer." + -"\n\n" + -"Val av datum:\n" + -"- Använd knapparna \xab, \xbb för att välja Ã¥r\n" + -"- Använd knapparna " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " för att välja mÃ¥nad\n" + -"- HÃ¥ll musknappen nedtryckt pÃ¥ nÃ¥gon av ovanstÃ¥ende knappar för snabbare val."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Val av tid:\n" + -"- Klicka pÃ¥ en del av tiden för att öka den delen\n" + -"- eller skift-klicka för att minska den\n" + -"- eller klicka och drag för snabbare val."; - -Calendar._TT["PREV_YEAR"] = "FöregÃ¥ende Ã¥r (hÃ¥ll för menu)"; -Calendar._TT["PREV_MONTH"] = "FöregÃ¥ende mÃ¥nad (hÃ¥ll för menu)"; -Calendar._TT["GO_TODAY"] = "GÃ¥ till dagens datum"; -Calendar._TT["NEXT_MONTH"] = "Följande mÃ¥nad (hÃ¥ll för menu)"; -Calendar._TT["NEXT_YEAR"] = "Följande Ã¥r (hÃ¥ll för menu)"; -Calendar._TT["SEL_DATE"] = "Välj datum"; -Calendar._TT["DRAG_TO_MOVE"] = "Drag för att flytta"; -Calendar._TT["PART_TODAY"] = " (idag)"; -Calendar._TT["MON_FIRST"] = "Visa mÃ¥ndag först"; -Calendar._TT["SUN_FIRST"] = "Visa söndag först"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "Visa %s först"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0"; - -Calendar._TT["CLOSE"] = "Stäng"; -Calendar._TT["TODAY"] = "Idag"; -Calendar._TT["TIME_PART"] = "(Skift-)klicka eller drag för att ändra tid"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A %d %b %Y"; - -Calendar._TT["WK"] = "vecka"; -Calendar._TT["TIME"] = "Tid:"; diff --git a/includes/jscalendar/lang/calendar-tr.js b/includes/jscalendar/lang/calendar-tr.js deleted file mode 100644 index 2164687f..00000000 --- a/includes/jscalendar/lang/calendar-tr.js +++ /dev/null @@ -1,58 +0,0 @@ -////////////////////////////////////////////////////////////////////////////////////////////// -// Turkish Translation by Nuri AKMAN -// Location: Ankara/TURKEY -// e-mail : nuriakman@hotmail.com -// Date : April, 9 2003 -// -// Note: if Turkish Characters does not shown on you screen -// please include falowing line your html code: -// -// -// -////////////////////////////////////////////////////////////////////////////////////////////// - -// ** I18N -Calendar._DN = new Array -("Pazar", - "Pazartesi", - "Salý", - "Çarþamba", - "Perþembe", - "Cuma", - "Cumartesi", - "Pazar"); -Calendar._MN = new Array -("Ocak", - "Þubat", - "Mart", - "Nisan", - "Mayýs", - "Haziran", - "Temmuz", - "Aðustos", - "Eylül", - "Ekim", - "Kasým", - "Aralýk"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["TOGGLE"] = "Haftanýn ilk gününü kaydýr"; -Calendar._TT["PREV_YEAR"] = "Önceki Yýl (Menü için basýlý tutunuz)"; -Calendar._TT["PREV_MONTH"] = "Önceki Ay (Menü için basýlý tutunuz)"; -Calendar._TT["GO_TODAY"] = "Bugün'e git"; -Calendar._TT["NEXT_MONTH"] = "Sonraki Ay (Menü için basýlý tutunuz)"; -Calendar._TT["NEXT_YEAR"] = "Sonraki Yýl (Menü için basýlý tutunuz)"; -Calendar._TT["SEL_DATE"] = "Tarih seçiniz"; -Calendar._TT["DRAG_TO_MOVE"] = "Taþýmak için sürükleyiniz"; -Calendar._TT["PART_TODAY"] = " (bugün)"; -Calendar._TT["MON_FIRST"] = "Takvim Pazartesi gününden baþlasýn"; -Calendar._TT["SUN_FIRST"] = "Takvim Pazar gününden baþlasýn"; -Calendar._TT["CLOSE"] = "Kapat"; -Calendar._TT["TODAY"] = "Bugün"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "dd-mm-y"; -Calendar._TT["TT_DATE_FORMAT"] = "d MM y, DD"; - -Calendar._TT["WK"] = "Hafta"; diff --git a/includes/jscalendar/lang/calendar-zh.js b/includes/jscalendar/lang/calendar-zh.js deleted file mode 100644 index 4a0feb6b..00000000 --- a/includes/jscalendar/lang/calendar-zh.js +++ /dev/null @@ -1,119 +0,0 @@ -// ** I18N - -// Calendar ZH language -// Author: muziq, -// Encoding: GB2312 or GBK -// Distributed under the same terms as the calendar itself. - -// full day names -Calendar._DN = new Array -("ÐÇÆÚÈÕ", - "ÐÇÆÚÒ»", - "ÐÇÆÚ¶þ", - "ÐÇÆÚÈý", - "ÐÇÆÚËÄ", - "ÐÇÆÚÎå", - "ÐÇÆÚÁù", - "ÐÇÆÚÈÕ"); - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("ÈÕ", - "Ò»", - "¶þ", - "Èý", - "ËÄ", - "Îå", - "Áù", - "ÈÕ"); - -// full month names -Calendar._MN = new Array -("Ò»ÔÂ", - "¶þÔÂ", - "ÈýÔÂ", - "ËÄÔÂ", - "ÎåÔÂ", - "ÁùÔÂ", - "ÆßÔÂ", - "°ËÔÂ", - "¾ÅÔÂ", - "Ê®ÔÂ", - "ʮһÔÂ", - "Ê®¶þÔÂ"); - -// short month names -Calendar._SMN = new Array -("Ò»ÔÂ", - "¶þÔÂ", - "ÈýÔÂ", - "ËÄÔÂ", - "ÎåÔÂ", - "ÁùÔÂ", - "ÆßÔÂ", - "°ËÔÂ", - "¾ÅÔÂ", - "Ê®ÔÂ", - "ʮһÔÂ", - "Ê®¶þÔÂ"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "°ïÖú"; - -Calendar._TT["ABOUT"] = -"DHTML Date/Time Selector\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: http://www.dynarch.com/projects/calendar/\n" + -"Distributed under GNU LGPL. See http://gnu.org/licenses/lgpl.html for details." + -"\n\n" + -"Ñ¡ÔñÈÕÆÚ:\n" + -"- µã»÷ \xab, \xbb °´Å¥Ñ¡ÔñÄê·Ý\n" + -"- µã»÷ " + String.fromCharCode(0x2039) + ", " + String.fromCharCode(0x203a) + " °´Å¥Ñ¡ÔñÔ·Ý\n" + -"- ³¤°´ÒÔÉÏ°´Å¥¿É´Ó²Ëµ¥ÖпìËÙÑ¡ÔñÄê·Ý»òÔ·Ý"; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"Ñ¡Ôñʱ¼ä:\n" + -"- µã»÷Сʱ»ò·ÖÖÓ¿Éʹ¸ÄÊýÖµ¼ÓÒ»\n" + -"- °´×¡Shift¼üµã»÷Сʱ»ò·ÖÖÓ¿Éʹ¸ÄÊýÖµ¼õÒ»\n" + -"- µã»÷Í϶¯Êó±ê¿É½øÐпìËÙÑ¡Ôñ"; - -Calendar._TT["PREV_YEAR"] = "ÉÏÒ»Äê (°´×¡³ö²Ëµ¥)"; -Calendar._TT["PREV_MONTH"] = "ÉÏÒ»Ô (°´×¡³ö²Ëµ¥)"; -Calendar._TT["GO_TODAY"] = "תµ½½ñÈÕ"; -Calendar._TT["NEXT_MONTH"] = "ÏÂÒ»Ô (°´×¡³ö²Ëµ¥)"; -Calendar._TT["NEXT_YEAR"] = "ÏÂÒ»Äê (°´×¡³ö²Ëµ¥)"; -Calendar._TT["SEL_DATE"] = "Ñ¡ÔñÈÕÆÚ"; -Calendar._TT["DRAG_TO_MOVE"] = "Í϶¯"; -Calendar._TT["PART_TODAY"] = " (½ñÈÕ)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "×î×ó±ßÏÔʾ%s"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "¹Ø±Õ"; -Calendar._TT["TODAY"] = "½ñÈÕ"; -Calendar._TT["TIME_PART"] = "(Shift-)µã»÷Êó±ê»òÍ϶¯¸Ä±äÖµ"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%A, %b %eÈÕ"; - -Calendar._TT["WK"] = "ÖÜ"; -Calendar._TT["TIME"] = "ʱ¼ä:"; diff --git a/includes/jscalendar/lang/cn_utf8.js b/includes/jscalendar/lang/cn_utf8.js deleted file mode 100644 index e3d838e9..00000000 --- a/includes/jscalendar/lang/cn_utf8.js +++ /dev/null @@ -1,127 +0,0 @@ -// ** I18N - -// Calendar EN language -// Author: Mihai Bazon, -// Encoding: any -// Translator : Niko -// Distributed under the same terms as the calendar itself. - -// For translators: please use UTF-8 if possible. We strongly believe that -// Unicode is the answer to a real internationalized world. Also please -// include your contact information in the header, as can be seen above. - -// full day names -Calendar._DN = new Array -("\u5468\u65e5",//\u5468\u65e5 - "\u5468\u4e00",//\u5468\u4e00 - "\u5468\u4e8c",//\u5468\u4e8c - "\u5468\u4e09",//\u5468\u4e09 - "\u5468\u56db",//\u5468\u56db - "\u5468\u4e94",//\u5468\u4e94 - "\u5468\u516d",//\u5468\u516d - "\u5468\u65e5");//\u5468\u65e5 - -// Please note that the following array of short day names (and the same goes -// for short month names, _SMN) isn't absolutely necessary. We give it here -// for exemplification on how one can customize the short day names, but if -// they are simply the first N letters of the full name you can simply say: -// -// Calendar._SDN_len = N; // short day name length -// Calendar._SMN_len = N; // short month name length -// -// If N = 3 then this is not needed either since we assume a value of 3 if not -// present, to be compatible with translation files that were written before -// this feature. - -// short day names -Calendar._SDN = new Array -("\u5468\u65e5", - "\u5468\u4e00", - "\u5468\u4e8c", - "\u5468\u4e09", - "\u5468\u56db", - "\u5468\u4e94", - "\u5468\u516d", - "\u5468\u65e5"); - -// First day of the week. "0" means display Sunday first, "1" means display -// Monday first, etc. -Calendar._FD = 0; - -// full month names -Calendar._MN = new Array -("\u4e00\u6708", - "\u4e8c\u6708", - "\u4e09\u6708", - "\u56db\u6708", - "\u4e94\u6708", - "\u516d\u6708", - "\u4e03\u6708", - "\u516b\u6708", - "\u4e5d\u6708", - "\u5341\u6708", - "\u5341\u4e00\u6708", - "\u5341\u4e8c\u6708"); - -// short month names -Calendar._SMN = new Array -("\u4e00\u6708", - "\u4e8c\u6708", - "\u4e09\u6708", - "\u56db\u6708", - "\u4e94\u6708", - "\u516d\u6708", - "\u4e03\u6708", - "\u516b\u6708", - "\u4e5d\u6708", - "\u5341\u6708", - "\u5341\u4e00\u6708", - "\u5341\u4e8c\u6708"); - -// tooltips -Calendar._TT = {}; -Calendar._TT["INFO"] = "\u5173\u4e8e"; - -Calendar._TT["ABOUT"] = -" DHTML \u65e5\u8d77/\u65f6\u95f4\u9009\u62e9\u63a7\u4ef6\n" + -"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n" + // don't translate this this ;-) -"For latest version visit: \u6700\u65b0\u7248\u672c\u8bf7\u767b\u9646http://www.dynarch.com/projects/calendar/\u5bdf\u770b\n" + -"\u9075\u5faaGNU LGPL. \u7ec6\u8282\u53c2\u9605 http://gnu.org/licenses/lgpl.html" + -"\n\n" + -"\u65e5\u671f\u9009\u62e9:\n" + -"- \u70b9\u51fb\xab(\xbb)\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e00\u5e74\u5ea6.\n" + -"- \u70b9\u51fb" + String.fromCharCode(0x2039) + "(" + String.fromCharCode(0x203a) + ")\u6309\u94ae\u9009\u62e9\u4e0a(\u4e0b)\u4e2a\u6708\u4efd.\n" + -"- \u957f\u65f6\u95f4\u6309\u7740\u6309\u94ae\u5c06\u51fa\u73b0\u66f4\u591a\u9009\u62e9\u9879."; -Calendar._TT["ABOUT_TIME"] = "\n\n" + -"\u65f6\u95f4\u9009\u62e9:\n" + -"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u589e\u52a0\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\n" + -"-\u5728\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)\u4e0a\u6309\u4f4fShift\u952e\u540e\u5355\u51fb\u9f20\u6807\u5de6\u952e\u6765\u51cf\u5c11\u5f53\u524d\u65f6\u95f4\u90e8\u5206(\u5206\u6216\u8005\u79d2)."; - -Calendar._TT["PREV_YEAR"] = "\u4e0a\u4e00\u5e74"; -Calendar._TT["PREV_MONTH"] = "\u4e0a\u4e2a\u6708"; -Calendar._TT["GO_TODAY"] = "\u5230\u4eca\u5929"; -Calendar._TT["NEXT_MONTH"] = "\u4e0b\u4e2a\u6708"; -Calendar._TT["NEXT_YEAR"] = "\u4e0b\u4e00\u5e74"; -Calendar._TT["SEL_DATE"] = "\u9009\u62e9\u65e5\u671f"; -Calendar._TT["DRAG_TO_MOVE"] = "\u62d6\u52a8"; -Calendar._TT["PART_TODAY"] = " (\u4eca\u5929)"; - -// the following is to inform that "%s" is to be the first day of week -// %s will be replaced with the day name. -Calendar._TT["DAY_FIRST"] = "%s\u4e3a\u8fd9\u5468\u7684\u7b2c\u4e00\u5929"; - -// This may be locale-dependent. It specifies the week-end days, as an array -// of comma-separated numbers. The numbers are from 0 to 6: 0 means Sunday, 1 -// means Monday, etc. -Calendar._TT["WEEKEND"] = "0,6"; - -Calendar._TT["CLOSE"] = "\u5173\u95ed"; -Calendar._TT["TODAY"] = "\u4eca\u5929"; -Calendar._TT["TIME_PART"] = "(\u6309\u7740Shift\u952e)\u5355\u51fb\u6216\u62d6\u52a8\u6539\u53d8\u503c"; - -// date formats -Calendar._TT["DEF_DATE_FORMAT"] = "%Y-%m-%d"; -Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e\u65e5"; - -Calendar._TT["WK"] = "\u5468"; -Calendar._TT["TIME"] = "\u65f6\u95f4:"; diff --git a/includes/jscalendar/menuarrow.gif b/includes/jscalendar/menuarrow.gif deleted file mode 100644 index ed2dee0e..00000000 Binary files a/includes/jscalendar/menuarrow.gif and /dev/null differ diff --git a/includes/overlib/mini/overlib_anchor_mini.js b/includes/overlib/mini/overlib_anchor_mini.js deleted file mode 100644 index 69c3059d..00000000 --- a/includes/overlib/mini/overlib_anchor_mini.js +++ /dev/null @@ -1,146 +0,0 @@ -//\///// -//\ overLIB Anchor Plugin -//\ This file requires overLIB 4.00 or later. -//\ -//\ overLIB 4.05 - You may not remove or change this notice. -//\ Copyright Erik Bosrup 1998-2004. All rights reserved. -//\ Contributors are listed on the homepage. -//\ See http://www.bosrup.com/web/overlib/ for details. -//\///// -if (typeof olInfo=='undefined'||olInfo.simpleversion<400) alert('overLIB 4.00 or later is required for the Anchor Plugin.');registerCommands('anchor,anchorx,anchory,noanchorwarn,anchoralign'); -if (typeof ol_anchor=='undefined') var ol_anchor='';if (typeof ol_anchorx=='undefined') var ol_anchorx=0;if (typeof ol_anchory=='undefined') var ol_anchory=0;if (typeof ol_noanchorwarn=='undefined') var ol_noanchorwarn=1;if (typeof ol_anchoralign=='undefined') var ol_anchoralign='UL'; -var o3_anchor="";var o3_anchorx=0;var o3_anchory=0;var o3_noanchorwarn=1;var o3_anchoralign='UL';var mrkObj, rmrkPosition; -function setAnchorVariables() {o3_anchor=ol_anchor;o3_anchorx=ol_anchorx;o3_anchory=ol_anchory;o3_noanchorwarn=ol_noanchorwarn;o3_anchoralign=ol_anchoralign;mrkObj=null;} -function parseAnchorExtras(pf,i,ar) {var v, k=i; -if (k-1||o3_relx!=null) { -placeX=(o3_relx!=null?( o3_relx<0?winoffset+o3_relx+iwidth-parsedWidth-widthFix:winoffset+o3_relx):o3_fixx);} else { -if (o3_hauto==1) {if ((o3_x-winoffset)>(iwidth/2)) {o3_hpos=LEFT;} else {o3_hpos=RIGHT;} -} -if (o3_hpos==CENTER) {placeX=o3_x+o3_offsetx-(parsedWidth/2); -if (placeX(winoffset+iwidth-widthFix)) {placeX=iwidth+winoffset-parsedWidth-widthFix;if (placeX<0) placeX=0;} -} -if (o3_hpos==LEFT) {placeX=o3_x-o3_offsetx-parsedWidth;if (placeX1) {var snapping=placeX % o3_snapx; -if (o3_hpos==LEFT) {placeX=placeX-(o3_snapx+snapping);} else { -placeX=placeX+(o3_snapx-snapping);} -if (placeX-1||o3_rely!=null) { -placeY=(o3_rely!=null?(o3_rely<0?scrolloffset+o3_rely+iheight-parsedHeight:scrolloffset+o3_rely):o3_fixy);} else { -if (o3_vauto==1) {if ((o3_y-scrolloffset)>(iheight/2)) {o3_vpos=ABOVE;} else {o3_vpos=BELOW;} -} -if (o3_vpos==ABOVE) {if (o3_aboveheight==0) o3_aboveheight=parsedHeight; -placeY=o3_y-(o3_aboveheight+o3_offsety);if (placeY1) {var snapping=placeY % o3_snapy; -if (o3_aboveheight>0&&o3_vpos==ABOVE) {placeY=placeY-(o3_snapy+snapping);} else {placeY=placeY+(o3_snapy-snapping);} -if (placeY1) {mkObj=mlyr[0] -offsets[0]+=mlyr[0].x+mlyr[1].pageX -offsets[1]+=mlyr[0].y+mlyr[1].pageY -} else {if(mlyr.toString().indexOf('Image')!=-1||mlyr.toString().indexOf('Anchor')!=-1){offsets[0]+=mlyr.x -offsets[1]+=mlyr.y -} else {offsets[0]+=mlyr.pageX -offsets[1]+=mlyr.pageY -} -} -} else {offsets[0]+=pageLocation(mlyr, 'Left') -offsets[1]+=pageLocation(mlyr, 'Top') -} -of=getAnchorOffsets(mkObj) -if (typeof o3_dragimg!='undefined'&& o3_dragimg) {olImgLeft=offsets[0];olImgTop=offsets[1];} -offsets[0]+=of[0] -offsets[1]+=of[1] -if (typeof o3_dragimg!='undefined'&& o3_dragimg) {olImgRight=offsets[0];olImgBottom=offsets[1];return;} -return offsets;} -function getAnchorOffsets(mkObj){var fx=fy=0, mp, puc, mkAry, sx=sy=0, w=o3_anchoralign -var mW=mH=pW=pH=0 -var off=[0, 0] -mkAry=w.split(','); -if (mkAry.length<3) {mp=mkAry[0].toUpperCase();puc=(mkAry.length==1)?mp:mkAry[1].toUpperCase();} else if (mkAry.length==3) {if (!isNaN(mkAry[0])) {mp=mkAry.slice(0, 2);puc=mkAry[2].toUpperCase();} else {mp=mkAry[0].toUpperCase();puc=mkAry.slice(1);} -} else {mp=mkAry.slice(0, 2);puc=mkAry.slice(2);} -var shdwPresent=typeof o3_shadow!='undefined'&& o3_shadow -if (shdwPresent) {sx=Math.abs(o3_shadowx);sy=Math.abs(o3_shadowy);} -pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth)) -pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight)) -if (olOp&& o3_wrap) {pW=(shdwPresent?parseInt(o3_width):(olNs4?over.clip.width:over.offsetWidth)) -pH=(shdwPresent?parseInt(o3_aboveheight):(olNs4?over.clip.height:over.offsetHeight)) -} -if (!olOp&& mkObj.toString().indexOf('Image')!=-1){mW=mkObj.width -mH=mkObj.height -} else if (!olOp&& mkObj.toString().indexOf('Anchor')!=-1) {mp='UL' -} else {mW=(olNs4)?mkObj.clip.width:mkObj.offsetWidth -mH=(olNs4)?mkObj.clip.height:mkObj.offsetHeight -} -if (!isNaN(mp)||typeof mp=='object') {if (typeof mp=='object') {fx=parseFloat(mp[0]);fy=parseFloat(mp[1]);} else -fx=fy=parseFloat(mp);off=[Math.round(fx*mW), Math.round(fy*mH)];} else {if (mp=='UR') off=[mW, 0] -else if (mp=='LL') off=[0, mH] -else if (mp=='LR') off=[mW, mH] -} -if (typeof o3_dragimg!='undefined'&& o3_dragimg) return off;else {if (!isNaN(puc)||typeof puc=='object' ) {if (typeof puc=='object') {fx=parseFloat(puc[0]);fy=parseFloat(puc[1]);} else -fx=fy=parseFloat(puc);off[0]-=Math.round(fx*(pW-sx));off[1]-=Math.round(fy*(pH-sy));} else {if (puc=='UR') {off[0]-=(pW-sx);off[1]-=sy -} else if (puc=='LL') {off[0]-=sx;off[1]-=(pH-sy) -} else if (puc=='LR') {off[0]-=(pW-sx);off[1]-=(pH-sy) -} -} -return off -} -} -function pageLocation(o, t){var x=0 -while(o.offsetParent){x+=o['offset'+t] -o=o.offsetParent -} -x+=o['offset'+t] -return x -} -function getRefById(l, d){var r="", j -d=(d||document) -if (d.all) return d.all[l] -else if (d.getElementById) return d.getElementById(l) -else if (d.layers&& d.layers.length>0) {if (d.layers[l]) return d.layers[l] -for (j=0; j0) {for (j=0; j0) return r -else if (r) return [r, d.layers[j]] -} -} -return null -} -registerHook("placeLayer", anchorPlaceLayer, FREPLACE);registerRunTimeFunction(setAnchorVariables);registerCmdLineFunction(parseAnchorExtras);registerPostParseFunction(checkAnchorObject);registerHook("createPopup", anchorPreface, FAFTER); diff --git a/includes/overlib/mini/overlib_crossframe_mini.js b/includes/overlib/mini/overlib_crossframe_mini.js deleted file mode 100644 index a4dd8752..00000000 --- a/includes/overlib/mini/overlib_crossframe_mini.js +++ /dev/null @@ -1,44 +0,0 @@ -//\///// -//\ overLIB Crossframe Support Plugin -//\ This file requires overLIB 4.00 or later. -//\ -//\ overLIB 4.05 - You may not remove or change this notice. -//\ Copyright Erik Bosrup 1998-2004. All rights reserved. -//\ Contributors are listed on the homepage. -//\ See http://www.bosrup.com/web/overlib/ for details. -//\///// -if (typeof olInfo=='undefined'||olInfo.simpleversion<400) alert('overLIB 4.00 or later is required for the Cross Frame Support Plugin.');registerCommands('frame'); -function parseFrameExtras(pf,i,ar) {var k=i,v; -if (k0) {retVal=frmDepth(thisFrame[i],ofrm);if (retVal=='') continue;} else if (thisFrame[i]!=ofrm) continue;retVal='['+i+']'+retVal;break;} -return retVal;} -function getFrmRef(srcFrm,tgetFrm) {var rtnVal='' -if (tgetFrm!=srcFrm) {var tFrm=frmDepth(top.frames,tgetFrm) -var sFrm=frmDepth(top.frames,srcFrm) -if (sFrm.length==tFrm.length) {l=tFrm.lastIndexOf('[') -if (l) {while ( sFrm.substring(0,l)!=tFrm.substring(0,l) ) -l=tFrm.lastIndexOf('[',l-1) -tFrm=tFrm.substr(l) -sFrm=sFrm.substr(l) -} -} -var cnt=0, p='',str=tFrm -while ((k=str.lastIndexOf('['))!=-1) {cnt++ -str=str.substring(0,k) -} -for (var i=0; i
'+text+'
';set_background(""); -return txt;} -function ol_content_caption_cssstyle(text, title, close) {var nameId;closing="";closeevent="onMouseOver"; -if (o3_closeclick==1) closeevent=(o3_closetitle?"title='"+o3_closetitle+"'":"")+" onClick"; -if (o3_capicon!="") {nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';if (typeof o3_dragimg!='undefined'&&o3_dragimg) nameId=' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';o3_capicon='';} -if (close!="") {closing=''+close+'';} -txt='
'+closing+'
'+o3_capicon+title+'
'+text+'
';set_background(""); -return txt;} -function ol_content_background_cssstyle(text, picture, hasfullhtml) {if (hasfullhtml) {txt=text;} else {var pU, hU, wU;pU=(o3_padunit=='%'?'%':'');hU=(o3_heightunit=='%'?'%':'');wU=(o3_widthunit=='%'?'%':'');txt='
'+text+'
';} -set_background(picture); -return txt;} -registerRunTimeFunction(setCSSStyleVariables);registerCmdLineFunction(parseCSSStyleExtras);registerHook("ol_content_simple", ol_content_simple_cssstyle, FALTERNATE, CSSSTYLE);registerHook("ol_content_caption", ol_content_caption_cssstyle, FALTERNATE, CSSSTYLE);registerHook("ol_content_background", ol_content_background_cssstyle, FALTERNATE, CSSSTYLE); \ No newline at end of file diff --git a/includes/overlib/mini/overlib_exclusive_mini.js b/includes/overlib/mini/overlib_exclusive_mini.js deleted file mode 100644 index 96b534c5..00000000 --- a/includes/overlib/mini/overlib_exclusive_mini.js +++ /dev/null @@ -1,33 +0,0 @@ -//\///// -//\ overLIB Exclusive Plugin -//\ This file requires overLIB 4.00 or later. -//\ -//\ overLIB 4.05 - You may not remove or change this notice. -//\ Copyright Erik Bosrup 1998-2004. All rights reserved. -//\ Contributors are listed on the homepage. -//\ See http://www.bosrup.com/web/overlib/ for details. -//\///// -if (typeof olInfo=='undefined'||olInfo.simpleversion<400) alert('overLIB 4.00 or later is required for the Debug Plugin.');registerCommands('exclusive,exclusivestatus,exclusiveoverride');var olOverrideIsSet; -if (typeof ol_exclusive=='undefined') var ol_exclusive=0;if (typeof ol_exclusivestatus=='undefined') var ol_exclusivestatus='Please close open popup first.'; -var o3_exclusive=0;var o3_exclusivestatus=''; -function setExclusiveVariables() {o3_exclusive=ol_exclusive;o3_exclusivestatus=ol_exclusivestatus;} -function parseExclusiveExtras(pf,i,ar) {var k=i,v; -olOverrideIsSet=false; -if (k-1||o3_relx!=null) { -placeX=(o3_relx!=null?( o3_relx<0?winoffset+o3_relx+iwidth-parsedWidth-widthFix:winoffset+o3_relx):o3_fixx);} else { -if (o3_hauto==1) {if ((o3_x-winoffset)>(iwidth/2)) {o3_hpos=LEFT;} else {o3_hpos=RIGHT;} -} -if (o3_hpos==CENTER) {placeX=o3_x+o3_offsetx-(parsedWidth/2); -if (placeX(winoffset+iwidth-widthFix)) {placeX=iwidth+winoffset-parsedWidth-widthFix;if (placeX<0) placeX=0;} -} -if (o3_hpos==LEFT) {placeX=o3_x-o3_offsetx-parsedWidth;if (placeX1) {var snapping=placeX % o3_snapx; -if (o3_hpos==LEFT) {placeX=placeX-(o3_snapx+snapping);} else { -placeX=placeX+(o3_snapx-snapping);} -if (placeX-1||o3_rely!=null) { -placeY=(o3_rely!=null?(o3_rely<0?scrolloffset+o3_rely+iheight-parsedHeight:scrolloffset+o3_rely):o3_fixy);} else { -if (o3_vauto==1) {if ((o3_y-scrolloffset)>(iheight/2)) {o3_vpos=ABOVE;} else {o3_vpos=BELOW;} -} -if (o3_vpos==ABOVE) {if (o3_aboveheight==0) o3_aboveheight=parsedHeight; -placeY=o3_y-(o3_aboveheight+o3_offsety);if (placeY1) {var snapping=placeY % o3_snapy; -if (o3_aboveheight>0&&o3_vpos==ABOVE) {placeY=placeY-(o3_snapy+snapping);} else {placeY=placeY+(o3_snapy-snapping);} -if (placeY'+content+'';layerWrite(txt);} -function bckDropSrc(width, height, Z) {return '';} -function hideSelectBox() {if(olNs4||olOp||olIe55) return;var px, py, pw, ph, sx, sw, sy, sh, selEl, v; -if(olIe4) v=0;else {v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v) return;v=parseInt(v[1]);} -if (v<20030624) {px=parseInt(over.style.left);py=parseInt(over.style.top);pw=o3_width;ph=(o3_aboveheight?parseInt(o3_aboveheight):over.offsetHeight);selEl=(olIe4)?o3_frame.document.all.tags("SELECT"):o3_frame.document.getElementsByTagName("SELECT");for (var i=0; i(sx+sw)||(py+ph)(sy+sh)) continue;selEl[i].isHidden=1;selEl[i].style.visibility='hidden';} -} -} -function showSelectBox() {if(olNs4||olOp||olIe55) return;var selEl, v; -if(olIe4) v=0;else {v=navigator.userAgent.match(/Gecko\/(\d{8})/i);if(!v) return;v=parseInt(v[1]);} -if(v<20030624) {selEl=(olIe4)?o3_frame.document.all.tags("SELECT"):o3_frame.document.getElementsByTagName("SELECT");for (var i=0; i\n\n');} -f=capExtent.onmousemove.toString().match(/function[ ]+(\w*)\(/);if (f&&f[1]!='annoymous') capExtent.onmousemove=olMouseMove;} -registerHook("createPopup",generatePopUp,FAFTER);registerHook("hideObject",showSelectBox,FAFTER);olHideForm=1; \ No newline at end of file diff --git a/includes/overlib/mini/overlib_mini.js b/includes/overlib/mini/overlib_mini.js deleted file mode 100644 index 6afb273b..00000000 --- a/includes/overlib/mini/overlib_mini.js +++ /dev/null @@ -1,337 +0,0 @@ -//\///// -//\ overLIB 4.06 - You may not remove or change this notice. -//\ Copyright Erik Bosrup 1998-2004. All rights reserved. -//\ -//\ Contributors are listed on the homepage. -//\ This file might be old, always check for the latest version at: -//\ http://www.bosrup.com/web/overlib/ -//\ -//\ Please read the license agreement (available through the link above) -//\ before using overLIB. Direct any licensing questions to erik@bosrup.com. -//\ -//\ Do not sell this as your own work or remove this copyright notice. -//\ For full details on copying or changing this script please read the -//\ license agreement at the link above. Please give credit on sites that -//\ use overLIB and submit changes of the script so other people can use -//\ them as well. -//\///// -//\ THIS IS A VERY MODIFIED VERSION. DO NOT EDIT OR PUBLISH. GET THE ORIGINAL! -var olLoaded=0;var pmStart=10000000; var pmUpper=10001000; var pmCount=pmStart+1; var pms=new Array(); var olInfo=new Info('4.06', 1);var FREPLACE=0; var FBEFORE=1; var FAFTER=2; var FALTERNATE=3;var olHideForm=0;registerCommands('donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,mouseoff,closetitle,cssoff,compatmode,cssclass,fgclass,bgclass,textfontclass,captionfontclass,closefontclass'); -if (typeof ol_fgcolor=='undefined') var ol_fgcolor="#CCCCFF";if (typeof ol_bgcolor=='undefined') var ol_bgcolor="#333399";if (typeof ol_textcolor=='undefined') var ol_textcolor="#000000";if (typeof ol_capcolor=='undefined') var ol_capcolor="#FFFFFF";if (typeof ol_closecolor=='undefined') var ol_closecolor="#9999FF";if (typeof ol_textfont=='undefined') var ol_textfont="Verdana,Arial,Helvetica";if (typeof ol_captionfont=='undefined') var ol_captionfont="Verdana,Arial,Helvetica";if (typeof ol_closefont=='undefined') var ol_closefont="Verdana,Arial,Helvetica";if (typeof ol_textsize=='undefined') var ol_textsize="1";if (typeof ol_captionsize=='undefined') var ol_captionsize="1";if (typeof ol_closesize=='undefined') var ol_closesize="1";if (typeof ol_width=='undefined') var ol_width="200";if (typeof ol_border=='undefined') var ol_border="1";if (typeof ol_cellpad=='undefined') var ol_cellpad=2;if (typeof ol_offsetx=='undefined') var ol_offsetx=10;if (typeof ol_offsety=='undefined') var ol_offsety=10;if (typeof ol_text=='undefined') var ol_text="Default Text";if (typeof ol_cap=='undefined') var ol_cap="";if (typeof ol_sticky=='undefined') var ol_sticky=0;if (typeof ol_background=='undefined') var ol_background="";if (typeof ol_close=='undefined') var ol_close="Close";if (typeof ol_hpos=='undefined') var ol_hpos=RIGHT;if (typeof ol_status=='undefined') var ol_status="";if (typeof ol_autostatus=='undefined') var ol_autostatus=0;if (typeof ol_height=='undefined') var ol_height=-1;if (typeof ol_snapx=='undefined') var ol_snapx=0;if (typeof ol_snapy=='undefined') var ol_snapy=0;if (typeof ol_fixx=='undefined') var ol_fixx=-1;if (typeof ol_fixy=='undefined') var ol_fixy=-1;if (typeof ol_relx=='undefined') var ol_relx=null;if (typeof ol_rely=='undefined') var ol_rely=null;if (typeof ol_fgbackground=='undefined') var ol_fgbackground="";if (typeof ol_bgbackground=='undefined') var ol_bgbackground="";if (typeof ol_padxl=='undefined') var ol_padxl=1;if (typeof ol_padxr=='undefined') var ol_padxr=1;if (typeof ol_padyt=='undefined') var ol_padyt=1;if (typeof ol_padyb=='undefined') var ol_padyb=1;if (typeof ol_fullhtml=='undefined') var ol_fullhtml=0;if (typeof ol_vpos=='undefined') var ol_vpos=BELOW;if (typeof ol_aboveheight=='undefined') var ol_aboveheight=0;if (typeof ol_capicon=='undefined') var ol_capicon="";if (typeof ol_frame=='undefined') var ol_frame=self;if (typeof ol_timeout=='undefined') var ol_timeout=0;if (typeof ol_function=='undefined') var ol_function=null;if (typeof ol_delay=='undefined') var ol_delay=0;if (typeof ol_hauto=='undefined') var ol_hauto=0;if (typeof ol_vauto=='undefined') var ol_vauto=0;if (typeof ol_closeclick=='undefined') var ol_closeclick=0;if (typeof ol_wrap=='undefined') var ol_wrap=0;if (typeof ol_followmouse=='undefined') var ol_followmouse=1;if (typeof ol_mouseoff=='undefined') var ol_mouseoff=0;if (typeof ol_closetitle=='undefined') var ol_closetitle='Close';if (typeof ol_compatmode=='undefined') var ol_compatmode=0;if (typeof ol_css=='undefined') var ol_css=CSSOFF;if (typeof ol_fgclass=='undefined') var ol_fgclass="";if (typeof ol_bgclass=='undefined') var ol_bgclass="";if (typeof ol_textfontclass=='undefined') var ol_textfontclass="";if (typeof ol_captionfontclass=='undefined') var ol_captionfontclass="";if (typeof ol_closefontclass=='undefined') var ol_closefontclass=""; -if (typeof ol_texts=='undefined') var ol_texts=new Array("Text 0", "Text 1");if (typeof ol_caps=='undefined') var ol_caps=new Array("Caption 0", "Caption 1"); -var o3_text="";var o3_cap="";var o3_sticky=0;var o3_background="";var o3_close="Close";var o3_hpos=RIGHT;var o3_offsetx=2;var o3_offsety=2;var o3_fgcolor="";var o3_bgcolor="";var o3_textcolor="";var o3_capcolor="";var o3_closecolor="";var o3_width=100;var o3_border=1;var o3_cellpad=2;var o3_status="";var o3_autostatus=0;var o3_height=-1;var o3_snapx=0;var o3_snapy=0;var o3_fixx=-1;var o3_fixy=-1;var o3_relx=null;var o3_rely=null;var o3_fgbackground="";var o3_bgbackground="";var o3_padxl=0;var o3_padxr=0;var o3_padyt=0;var o3_padyb=0;var o3_fullhtml=0;var o3_vpos=BELOW;var o3_aboveheight=0;var o3_capicon="";var o3_textfont="Verdana,Arial,Helvetica";var o3_captionfont="Verdana,Arial,Helvetica";var o3_closefont="Verdana,Arial,Helvetica";var o3_textsize="1";var o3_captionsize="1";var o3_closesize="1";var o3_frame=self;var o3_timeout=0;var o3_timerid=0;var o3_allowmove=0;var o3_function=null;var o3_delay=0;var o3_delayid=0;var o3_hauto=0;var o3_vauto=0;var o3_closeclick=0;var o3_wrap=0;var o3_followmouse=1;var o3_mouseoff=0;var o3_closetitle='';var o3_compatmode=0;var o3_css=CSSOFF;var o3_fgclass="";var o3_bgclass="";var o3_textfontclass="";var o3_captionfontclass="";var o3_closefontclass=""; -var o3_x=0;var o3_y=0;var o3_showingsticky=0;var o3_removecounter=0; -var over=null;var fnRef, hoveringSwitch=false; -var isMac=(navigator.userAgent.indexOf("Mac")!=-1);var olOp=(navigator.userAgent.toLowerCase().indexOf('opera')>-1&&document.createTextNode);var olNs4=(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==4);var olNs6=(document.getElementById)?true:false;var olIe4=(document.all)?true:false;var olIe5=false;var olIe55=false;var docRoot='document.body'; -if (olNs4) {var oW=window.innerWidth;var oH=window.innerHeight;window.onresize=function() { if (oW!=window.innerWidth||oH!=window.innerHeight) location.reload(); } -} -if (olIe4) {var agent=navigator.userAgent;if (/MSIE/.test(agent)) {var versNum=parseFloat(agent.match(/MSIE (\d\.\d+)\.*/)[1]);if (versNum>=5){olIe5=true;olIe55=(versNum>=5.5&&!olOp)?true:false;if (olNs6) olNs6=false;} -} -if (olNs6) olIe4=false;} -if (document.compatMode&&document.compatMode=='CSS1Compat') {docRoot=((olIe4&&!olOp)?'document.documentElement':docRoot);} -if(window.addEventListener) window.addEventListener("load",OLonLoad_handler,false);else if (window.attachEvent) window.attachEvent("onload",OLonLoad_handler); -var olCheckMouseCapture=true;if ((olNs4||olNs6||olIe4)) {olMouseCapture();} else {overlib=no_overlib;nd=no_overlib;ver3fix=true;} -function overlib() {if (!olLoaded||isExclusive(overlib.arguments)) return true;if (olCheckMouseCapture) olMouseCapture();if (over) cClick(); -o3_text=ol_text;o3_cap=ol_cap;o3_sticky=ol_sticky;o3_background=ol_background;o3_close=ol_close;o3_hpos=ol_hpos;o3_offsetx=ol_offsetx;o3_offsety=ol_offsety;o3_fgcolor=ol_fgcolor;o3_bgcolor=ol_bgcolor;o3_textcolor=ol_textcolor;o3_capcolor=ol_capcolor;o3_closecolor=ol_closecolor;o3_width=ol_width;o3_border=ol_border;o3_cellpad=ol_cellpad;o3_status=ol_status;o3_autostatus=ol_autostatus;o3_height=ol_height;o3_snapx=ol_snapx;o3_snapy=ol_snapy;o3_fixx=ol_fixx;o3_fixy=ol_fixy;o3_relx=ol_relx;o3_rely=ol_rely;o3_fgbackground=ol_fgbackground;o3_bgbackground=ol_bgbackground;o3_padxl=ol_padxl;o3_padxr=ol_padxr;o3_padyt=ol_padyt;o3_padyb=ol_padyb;o3_fullhtml=ol_fullhtml;o3_vpos=ol_vpos;o3_aboveheight=ol_aboveheight;o3_capicon=ol_capicon;o3_textfont=ol_textfont;o3_captionfont=ol_captionfont;o3_closefont=ol_closefont;o3_textsize=ol_textsize;o3_captionsize=ol_captionsize;o3_closesize=ol_closesize;o3_timeout=ol_timeout;o3_function=ol_function;o3_delay=ol_delay;o3_hauto=ol_hauto;o3_vauto=ol_vauto;o3_closeclick=ol_closeclick;o3_wrap=ol_wrap;o3_followmouse=ol_followmouse;o3_mouseoff=ol_mouseoff;o3_closetitle=ol_closetitle;o3_css=ol_css;o3_compatmode=ol_compatmode;o3_fgclass=ol_fgclass;o3_bgclass=ol_bgclass;o3_textfontclass=ol_textfontclass;o3_captionfontclass=ol_captionfontclass;o3_closefontclass=ol_closefontclass; -setRunTimeVariables(); -fnRef=''; -o3_frame=ol_frame; -if (olNs4) {over=o3_frame.document.layers['overDiv'];} else if (document.all) {over=o3_frame.document.all['overDiv'];} else if (document.getElementById) {over=o3_frame.document.getElementById("overDiv");} -parseTokens('o3_', overlib.arguments);if (!postParseChecks()) return false; -if (o3_delay==0) {return runHook("olMain", FREPLACE);} else {o3_delayid=setTimeout("runHook('olMain', FREPLACE)", o3_delay);return false;} -} -function nd(time) {if (olLoaded&&!isExclusive()) {if (time&&!o3_delay) {if (o3_timerid>0) clearTimeout(o3_timerid); -o3_timerid=setTimeout("cClick()",(o3_timeout=time));} -if (o3_removecounter>=1) { o3_showingsticky=0 }; -if (o3_showingsticky==0) {o3_allowmove=0;if (over!=null&&o3_timerid==0) runHook("hideObject", FREPLACE, over);} else {o3_removecounter++;} -} -return true;} -function cClick() {if (olLoaded) {runHook("hideObject", FREPLACE, over);o3_showingsticky=0;} -return false;} -function overlib_pagedefaults() {parseTokens('ol_', overlib_pagedefaults.arguments);} -function olMain() {var layerhtml, styleType;runHook("olMain", FBEFORE); -if (o3_background!=""||o3_fullhtml) { -layerhtml=runHook('ol_content_background', FALTERNATE, o3_css, o3_text, o3_background, o3_fullhtml);} else { -styleType=(pms[o3_css-1-pmStart]=="cssoff"||pms[o3_css-1-pmStart]=="cssclass"); -if (o3_fgbackground!="") o3_fgbackground="background=\""+o3_fgbackground+"\"";if (o3_bgbackground!="") o3_bgbackground=(styleType?"background=\""+o3_bgbackground+"\"":o3_bgbackground); -if (o3_fgcolor!="") o3_fgcolor=(styleType?"bgcolor=\""+o3_fgcolor+"\"":o3_fgcolor);if (o3_bgcolor!="") o3_bgcolor=(styleType?"bgcolor=\""+o3_bgcolor+"\"":o3_bgcolor); -if (o3_height>0) o3_height=(styleType?"height=\""+o3_height+"\"":o3_height);else o3_height=""; -if (o3_cap=="") { -layerhtml=runHook('ol_content_simple', FALTERNATE, o3_css, o3_text);} else { -if (o3_sticky) { -layerhtml=runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, o3_close);} else { -layerhtml=runHook('ol_content_caption', FALTERNATE, o3_css, o3_text, o3_cap, "");} -} -} -if (o3_sticky) {if (o3_timerid>0) {clearTimeout(o3_timerid);o3_timerid=0;} -o3_showingsticky=1;o3_removecounter=0;} -if (!runHook("createPopup", FREPLACE, layerhtml)) return false; -if (o3_autostatus>0) {o3_status=o3_text;if (o3_autostatus>1) o3_status=o3_cap;} -o3_allowmove=0; -if (o3_timeout>0) {if (o3_timerid>0) clearTimeout(o3_timerid);o3_timerid=setTimeout("cClick()", o3_timeout);} -runHook("disp", FREPLACE, o3_status);runHook("olMain", FAFTER); -return (olOp&&event&&event.type=='mouseover'&&!o3_status)?'':(o3_status!='');} -function ol_content_simple(text) {txt='
':'>')+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'
'; -set_background("");return txt;} -function ol_content_caption(text,title,close) {var nameId;closing="";closeevent="onmouseover";if (o3_closeclick==1) closeevent=(o3_closetitle?"title='"+o3_closetitle+"'":"")+" onclick";if (o3_capicon!="") {nameId=' hspace=\"5\"'+' align=\"middle\" alt=\"\"';if (typeof o3_dragimg!='undefined'&&o3_dragimg) nameId=' hspace=\"5\"'+' name=\"'+o3_dragimg+'\" id=\"'+o3_dragimg+'\" align=\"middle\" alt=\"Drag Enabled\" title=\"Drag Enabled\"';o3_capicon='';} -if (close!="") -closing=''+(o3_closefontclass?'':wrapStr(0,o3_closesize,'close'))+close+(o3_closefontclass?'':wrapStr(1,o3_closesize,'close'))+'';txt='
':'>')+(o3_captionfontclass?'':''+wrapStr(0,o3_captionsize,'caption'))+o3_capicon+title+(o3_captionfontclass?'':wrapStr(1,o3_captionsize)+'')+''+closing+'
' :'>')+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'
'; -set_background("");return txt;} -function ol_content_background(text,picture,hasfullhtml) {if (hasfullhtml) {txt=text;} else {txt='
'+(o3_textfontclass?'':wrapStr(0,o3_textsize,'text'))+text+(o3_textfontclass?'':wrapStr(1,o3_textsize))+'
';} -set_background(picture);return txt;} -function set_background(pic) {if (pic=="") {if (olNs4) {over.background.src=null;} else if (over.style) {over.style.backgroundImage="none";} -} else {if (olNs4) {over.background.src=pic;} else if (over.style) {over.style.backgroundImage="url("+pic+")";} -} -} -var olShowId=-1; -function disp(statustext) {runHook("disp", FBEFORE); -if (o3_allowmove==0) {runHook("placeLayer", FREPLACE);(olNs6&&olShowId<0)?olShowId=setTimeout("runHook('showObject', FREPLACE, over)", 1):runHook("showObject", FREPLACE, over);o3_allowmove=(o3_sticky||o3_followmouse==0)?0:1;} -runHook("disp", FAFTER); -if (statustext!="") self.status=statustext;} -function createPopup(lyrContent){runHook("createPopup", FBEFORE); -if (o3_wrap&&!(olNs4||olOp)) {if (olIe4) {over.style.pixelWidth=0;} else if (olNs6) {repositionTo(over, 0,-over.offsetHeight);} -} -layerWrite(lyrContent); -if (o3_wrap) o3_width=(olNs4?over.clip.width:over.offsetWidth); -runHook("createPopup", FAFTER, lyrContent); -return true;} -function placeLayer() {var placeX, placeY, widthFix=0; -if (eval('o3_frame.'+docRoot)&&eval("typeof o3_frame."+docRoot+".clientWidth=='number'")&&eval('o3_frame.'+docRoot+'.clientWidth')) {iwidth=eval('o3_frame.'+docRoot+'.clientWidth');} else if (typeof(o3_frame.innerWidth)=='number') {widthFix=Math.ceil(1.2*(o3_frame.outerWidth-o3_frame.innerWidth));iwidth=o3_frame.innerWidth;} -winoffset=(olIe4)?eval('o3_frame.'+docRoot+'.scrollLeft'):o3_frame.pageXOffset;var parsedWidth=parseInt(o3_width); -if (o3_fixx>-1||o3_relx!=null) { -placeX=(o3_relx!=null?( o3_relx<0?winoffset+o3_relx+iwidth-parsedWidth-widthFix:winoffset+o3_relx):o3_fixx);} else { -if (o3_hauto==1) {if ((o3_x-winoffset)>(iwidth/2)) {o3_hpos=LEFT;} else {o3_hpos=RIGHT;} -} -if (o3_hpos==CENTER) {placeX=o3_x+o3_offsetx-(parsedWidth/2); -if (placeX(winoffset+iwidth-widthFix)) {placeX=iwidth+winoffset-parsedWidth-widthFix;if (placeX<0) placeX=0;} -} -if (o3_hpos==LEFT) {placeX=o3_x-o3_offsetx-parsedWidth;if (placeX1) {var snapping=placeX % o3_snapx; -if (o3_hpos==LEFT) {placeX=placeX-(o3_snapx+snapping);} else { -placeX=placeX+(o3_snapx-snapping);} -if (placeX-1||o3_rely!=null) { -placeY=(o3_rely!=null?(o3_rely<0?scrolloffset+o3_rely+iheight-parsedHeight:scrolloffset+o3_rely):o3_fixy);} else { -if (o3_vauto==1) {if ((o3_y-scrolloffset)>(iheight/2)) {o3_vpos=ABOVE;} else {o3_vpos=BELOW;} -} -if (o3_vpos==ABOVE) {if (o3_aboveheight==0) o3_aboveheight=parsedHeight; -placeY=o3_y-(o3_aboveheight+o3_offsety);if (placeY1) {var snapping=placeY % o3_snapy; -if (o3_aboveheight>0&&o3_vpos==ABOVE) {placeY=placeY-(o3_snapy+snapping);} else {placeY=placeY+(o3_snapy-snapping);} -if (placeYpmStart&&ar[i]=pmCount||ar[i]==DONOTHING) { continue; } -if (ar[i]==INARRAY) { fnMark=0; eval(pf+'text=ol_texts['+ar[++i]+'].toString()'); continue; } -if (ar[i]==CAPARRAY) { eval(pf+'cap=ol_caps['+ar[++i]+'].toString()'); continue; } -if (ar[i]==STICKY) { if (pf!='ol_') eval(pf+'sticky=1'); continue; } -if (ar[i]==BACKGROUND) { eval(pf+'background="'+ar[++i]+'"'); continue; } -if (ar[i]==NOCLOSE) { if (pf!='ol_') opt_NOCLOSE(); continue; } -if (ar[i]==CAPTION) { eval(pf+"cap='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==CENTER||ar[i]==LEFT||ar[i]==RIGHT) { eval(pf+'hpos='+ar[i]); continue; } -if (ar[i]==OFFSETX) { eval(pf+'offsetx='+ar[++i]); continue; } -if (ar[i]==OFFSETY) { eval(pf+'offsety='+ar[++i]); continue; } -if (ar[i]==FGCOLOR) { eval(pf+'fgcolor="'+ar[++i]+'"'); continue; } -if (ar[i]==BGCOLOR) { eval(pf+'bgcolor="'+ar[++i]+'"'); continue; } -if (ar[i]==TEXTCOLOR) { eval(pf+'textcolor="'+ar[++i]+'"'); continue; } -if (ar[i]==CAPCOLOR) { eval(pf+'capcolor="'+ar[++i]+'"'); continue; } -if (ar[i]==CLOSECOLOR) { eval(pf+'closecolor="'+ar[++i]+'"'); continue; } -if (ar[i]==WIDTH) { eval(pf+'width='+ar[++i]); continue; } -if (ar[i]==BORDER) { eval(pf+'border='+ar[++i]); continue; } -if (ar[i]==CELLPAD) { i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad')); continue; } -if (ar[i]==STATUS) { eval(pf+"status='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==AUTOSTATUS) { eval(pf+'autostatus=('+pf+'autostatus==1)?0:1'); continue; } -if (ar[i]==AUTOSTATUSCAP) { eval(pf+'autostatus=('+pf+'autostatus==2)?0:2'); continue; } -if (ar[i]==HEIGHT) { eval(pf+'height='+pf+'aboveheight='+ar[++i]); continue; } -if (ar[i]==CLOSETEXT) { eval(pf+"close='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==SNAPX) { eval(pf+'snapx='+ar[++i]); continue; } -if (ar[i]==SNAPY) { eval(pf+'snapy='+ar[++i]); continue; } -if (ar[i]==FIXX) { eval(pf+'fixx='+ar[++i]); continue; } -if (ar[i]==FIXY) { eval(pf+'fixy='+ar[++i]); continue; } -if (ar[i]==RELX) { eval(pf+'relx='+ar[++i]); continue; } -if (ar[i]==RELY) { eval(pf+'rely='+ar[++i]); continue; } -if (ar[i]==FGBACKGROUND) { eval(pf+'fgbackground="'+ar[++i]+'"'); continue; } -if (ar[i]==BGBACKGROUND) { eval(pf+'bgbackground="'+ar[++i]+'"'); continue; } -if (ar[i]==PADX) { eval(pf+'padxl='+ar[++i]); eval(pf+'padxr='+ar[++i]); continue; } -if (ar[i]==PADY) { eval(pf+'padyt='+ar[++i]); eval(pf+'padyb='+ar[++i]); continue; } -if (ar[i]==FULLHTML) { if (pf!='ol_') eval(pf+'fullhtml=1'); continue; } -if (ar[i]==BELOW||ar[i]==ABOVE) { eval(pf+'vpos='+ar[i]); continue; } -if (ar[i]==CAPICON) { eval(pf+'capicon="'+ar[++i]+'"'); continue; } -if (ar[i]==TEXTFONT) { eval(pf+"textfont='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==CAPTIONFONT) { eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==CLOSEFONT) { eval(pf+"closefont='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==TEXTSIZE) { eval(pf+'textsize="'+ar[++i]+'"'); continue; } -if (ar[i]==CAPTIONSIZE) { eval(pf+'captionsize="'+ar[++i]+'"'); continue; } -if (ar[i]==CLOSESIZE) { eval(pf+'closesize="'+ar[++i]+'"'); continue; } -if (ar[i]==TIMEOUT) { eval(pf+'timeout='+ar[++i]); continue; } -if (ar[i]==FUNCTION) { if (pf=='ol_') { if (typeof ar[i+1]!='number') { v=ar[++i]; ol_function=(typeof v=='function'?v:null); }} else {fnMark=0; v=null; if (typeof ar[i+1]!='number') v=ar[++i]; opt_FUNCTION(v); } continue; } -if (ar[i]==DELAY) { eval(pf+'delay='+ar[++i]); continue; } -if (ar[i]==HAUTO) { eval(pf+'hauto=('+pf+'hauto==0)?1:0'); continue; } -if (ar[i]==VAUTO) { eval(pf+'vauto=('+pf+'vauto==0)?1:0'); continue; } -if (ar[i]==CLOSECLICK) { eval(pf+'closeclick=('+pf+'closeclick==0)?1:0'); continue; } -if (ar[i]==WRAP) { eval(pf+'wrap=('+pf+'wrap==0)?1:0'); continue; } -if (ar[i]==FOLLOWMOUSE) { eval(pf+'followmouse=('+pf+'followmouse==1)?0:1'); continue; } -if (ar[i]==MOUSEOFF) { eval(pf+'mouseoff=('+pf+'mouseoff==0)?1:0'); continue; } -if (ar[i]==CLOSETITLE) { eval(pf+"closetitle='"+escSglQuote(ar[++i])+"'"); continue; } -if (ar[i]==CSSOFF||ar[i]==CSSCLASS) { eval(pf+'css='+ar[i]); continue; } -if (ar[i]==COMPATMODE) { eval(pf+'compatmode=('+pf+'compatmode==0)?1:0'); continue; } -if (ar[i]==FGCLASS) { eval(pf+'fgclass="'+ar[++i]+'"'); continue; } -if (ar[i]==BGCLASS) { eval(pf+'bgclass="'+ar[++i]+'"'); continue; } -if (ar[i]==TEXTFONTCLASS) { eval(pf+'textfontclass="'+ar[++i]+'"'); continue; } -if (ar[i]==CAPTIONFONTCLASS) { eval(pf+'captionfontclass="'+ar[++i]+'"'); continue; } -if (ar[i]==CLOSEFONTCLASS) { eval(pf+'closefontclass="'+ar[++i]+'"'); continue; } -i=parseCmdLine(pf, i, ar);} -} -if (fnMark&&o3_function) o3_text=o3_function(); -if ((pf=='o3_')&&o3_wrap) {o3_width=0; -if (olOp||(olIe4&&isMac)) {var tReg=/<.*\n*>/ig;if (!tReg.test(o3_text)) o3_text=o3_text.replace(/[ ]+/g, ' ');if (!tReg.test(o3_cap))o3_cap=o3_cap.replace(/[ ]+/g, ' ');} -} -if ((pf=='o3_')&&o3_sticky) {if (!o3_close&&(o3_frame!=ol_frame)) o3_close=ol_close;if (o3_mouseoff&&(o3_frame==ol_frame)) opt_NOCLOSE(' ');} -} -function layerWrite(txt) {txt+="\n";if (olNs4) {var lyr=o3_frame.document.overDiv.document -lyr.write(txt) -lyr.close() -} else if (typeof over.innerHTML!='undefined') {if (olIe5&&isMac) over.innerHTML='';over.innerHTML=txt;} else {range=o3_frame.document.createRange();range.setStartAfter(over);domfrag=range.createContextualFragment(txt); -while (over.hasChildNodes()) {over.removeChild(over.lastChild);} -over.appendChild(domfrag);} -} -function showObject(obj) {runHook("showObject", FBEFORE); -var theObj=(olNs4?obj:obj.style);theObj.visibility='visible'; -runHook("showObject", FAFTER);} -function hideObject(obj) {runHook("hideObject", FBEFORE); -var theObj=(olNs4?obj:obj.style);if (olNs6&&olShowId>0) { clearTimeout(olShowId); olShowId=0; } -theObj.visibility='hidden'; -if (o3_timerid>0) clearTimeout(o3_timerid);if (o3_delayid>0) clearTimeout(o3_delayid); -o3_timerid=0;o3_delayid=0;self.status=""; -if (over.onmouseout||over.onmouseover) {if (olNs4) over.releaseEvents(Event.MOUSEOUT||Event.MOUSEOVER);over.onmouseout=over.onmouseover=null;} -runHook("hideObject", FAFTER);} -function repositionTo(obj, xL, yL) {var theObj=(olNs4?obj:obj.style);theObj.left=xL+(!olNs4?'px':0);theObj.top=yL+(!olNs4?'px':0);} -function cursorOff() {var left=parseInt(over.style.left);var top=parseInt(over.style.top);var right=left+(over.offsetWidth>=parseInt(o3_width)?over.offsetWidth:parseInt(o3_width));var bottom=top+(over.offsetHeight>=o3_aboveheight?over.offsetHeight:o3_aboveheight); -if (o3_xright||o3_ybottom) return true; -return false;} -function opt_FUNCTION(callme) {o3_text=(callme?(typeof callme=='string'?(/.+\(.*\)/.test(callme)?eval(callme):callme):callme()):(o3_function?o3_function():'No Function')); -return 0;} -function opt_NOCLOSE(unused) {if (!unused) o3_close=""; -if (olNs4) {over.captureEvents(Event.MOUSEOUT||Event.MOUSEOVER);over.onmouseover=function () { if (o3_timerid>0) { clearTimeout(o3_timerid); o3_timerid=0; } } -over.onmouseout=cClick;} else {over.onmouseover=function () {hoveringSwitch=true; if (o3_timerid>0) { clearTimeout(o3_timerid); o3_timerid=0; } } -} -return 0;} -function opt_MULTIPLEARGS(i, args, parameter) {var k=i, l, re, pV, str=''; -for(k=i; kpmStart) break;} -if(k>=args.length) l=str.length-1;else {re=eval('/,'+args[k]+'/');l=str.search(re);} -k--;str=str.substring(0, l);pV=(olNs4&&/cellpad/i.test(parameter))?str.split(',')[0]:str;eval(parameter+'="'+pV+'"'); -return k;} -function nbspCleanup() {if (o3_wrap&&(olOp||(olIe4&&isMac))) {o3_text=o3_text.replace(/\ /g, ' ');o3_cap=o3_cap.replace(/\ /g, ' ');} -} -function escSglQuote(str) {return str.toString().replace(/'/g,"\\'");} -function OLonLoad_handler(e) {var re=/\w+\(.*\)[;\s]+/g, olre=/overlib\(|nd\(|cClick\(/, fn, l, i; -if(!olLoaded) olLoaded=1; -if(window.removeEventListener&&e.eventPhase==3) window.removeEventListener("load",OLonLoad_handler,false);else if(window.detachEvent) {window.detachEvent("onload",OLonLoad_handler);var fN=document.body.getAttribute('onload');if (fN) {fN=fN.toString().match(re);if (fN&&fN.length) {for (i=0; i':''):'';else {fontStr='o3_'+whichString+'font';fontColor='o3_'+((whichString=='caption')? 'cap':whichString)+'color';return (hasDims&&!olNs4)?(isClose?'':'
'):'';} -} -function quoteMultiNameFonts(theFont) {var v, pM=theFont.split(',');for (var i=0; i-1) {i=j;break;} -} -} -return i;} -function postParseChecks(){if (typeof postParse!='undefined'&&postParse.length) {for (var k=0; k-1) hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef; -} else if (hookType==FBEFORE||hookType==FAFTER) {var hookPt=(hookType==1?hookPt.before:hookPt.after); -if (typeof fnRef=='object') {hookPt=hookPt.concat(fnRef);} else {hookPt[hookPt.length++]=fnRef;} -if (optPm) hookPt=reOrder(hookPt, fnRef, optPm); -} else if (hookType==FALTERNATE) {if (last=='number') hookPt.alt[pms[optPm-1-pmStart]]=fnRef;} -return;} -} -function registerRunTimeFunction(fn) {if (isFunction(fn)) {if (typeof runTime=='undefined') runTime=new Array();if (typeof fn=='object') {runTime=runTime.concat(fn);} else {runTime[runTime.length++]=fn;} -} -} -function registerCmdLineFunction(fn){if (isFunction(fn)) {if (typeof cmdLine=='undefined') cmdLine=new Array();if (typeof fn=='object') {cmdLine=cmdLine.concat(fn);} else {cmdLine[cmdLine.length++]=fn;} -} -} -function registerPostParseFunction(fn){if (isFunction(fn)) {if (typeof postParse=='undefined') postParse=new Array();if (typeof fn=='object') {postParse=postParse.concat(fn);} else {postParse[postParse.length++]=fn;} -} -} -function runHook(fnHookTo, hookType) {var l=hookPts[fnHookTo], optPm, arS, ar=runHook.arguments; -if (hookType==FREPLACE) {arS=argToString(ar, 2); -if (typeof l=='undefined'||!(l=l.ovload)) return eval(fnHookTo+'('+arS+')');else return eval('l('+arS+')'); -} else if (hookType==FBEFORE||hookType==FAFTER) {if (typeof l=='undefined') return;l=(hookType==1?l.before:l.after); -if (!l.length) return; -arS=argToString(ar, 2);for (var k=0; kjS) {for (var k=jS; k0) {posStr[0]=' left:0; top: '+Y+'px';posStr[1]=' left:0; top:0';} -} else if (o3_shadowy==0) {if (o3_shadowx<0) {posStr[0]=' left:0; top: 0';posStr[1]=' left: '+X+'px';} else if (o3_shadowx>0) {posStr[0]=' left: '+X+'px; top: 0';posStr[1]=' left:0; top:0';} -} else if (o3_shadowx>0) {if (o3_shadowy>0) {posStr[0]=' left:'+X+'px; top:'+Y+'px';posStr[1]=' left:0; top:0';} else if (o3_shadowy<0) {posStr[0]=' left:'+X+'px; top:0';posStr[1]=' left:0; top: '+Y+'px';} -} else if (o3_shadowx<0) {if (o3_shadowy>0) {posStr[0]=' left:0; top:'+Y+'px';posStr[1]=' left:'+X+'px; top:0';} else if (o3_shadowy<0) {posStr[0]=' left:0; top:0';posStr[1]=' left:'+X+'px; top:'+Y+'px';} -} -txt=(olNs4)?'
':((olIe55&&olHideForm)?bckDropSrc(wd+X,ht+Y,zIdx++):'')+'
'+content+'
';} else {txt+=bS+'">
'+content+'
';} -layerWrite(txt); -if (olNs4&&bkSet) {dpObj=over.document.layers['backdrop'];if (typeof dpObj=='undefined') return; -puObj=over.document.layers['PUContent'];wd=puObj.clip.width;ht=puObj.clip.height;aPos=posStr[0].split(';'); -dpObj.clip.width=wd;dpObj.clip.height=ht;dpObj.left=parseInt(aPos[0].split(':')[1]);dpObj.top=parseInt(aPos[1].split(':')[1]); -dpObj.bgColor=(bkSet==1)?null:o3_shadowcolor;dpObj.background.src=(bkSet==2)?null:o3_shadowimage;dpObj.zIndex=0; -aPos=posStr[1].split(';');puObj.left=parseInt(aPos[0].split(':')[1]);puObj.top=parseInt(aPos[1].split(':')[1]);puObj.zIndex=1; -} else {puObj=(olIe4?o3_frame.document.all['PUContent']:o3_frame.document.getElementById('PUContent'));dpObj=(olIe4?o3_frame.document.all['backdrop']:o3_frame.document.getElementById('backdrop'));ht=puObj.offsetHeight;dpObj.style.height=ht+'px'; -if (o3_shadowopacity) {var op=o3_shadowopacity;op=(op<=100?op:100); -if (olIe4&&!isMac) {dpObj.style.filter='Beta(Opacity='+op+')';dpObj.filters.Beta.enabled=true;} else {if (typeof(dpObj.style.MozOpacity)=='string') dpObj.style.MozOpacity=op/100;} -} -} -o3_width=wd+X;o3_aboveheight=ht+Y;} -function cleanUpShadowEffects() {if (olNs4) return;else {var dpObj=(olIe4?o3_frame.document.all['backdrop']:o3_frame.document.getElementById('backdrop'));if (olIe4&&!isMac&&dpObj.filters.Beta) dpObj.filters.Beta.enabled=false;else if (typeof(dpObj.style.MozOpacity)=='string') dpObj.style.MozOpacity=1.0;} -} -function shadowAdjust() {if (!olNs4) return;var fac=ol_shadowadjust;if (olNs4) {document.write(' - - -
- - - - - - - - - - - - - - - - -
- -
 
- -
- -
-
-
- Copyright 2004-2008 Agileco, LLC. - Open Source Billing Software Enhanced by OSB. Copyright 2009 -
-
-
- - diff --git a/language/Makefile b/language/Makefile deleted file mode 100644 index 5a33334c..00000000 --- a/language/Makefile +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/bash -# -# osBilling - Open Billing Software -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# Originally authored by Deon George -# -# @author Deon George -# @copyright 2009 Deon George -# @link http://osb.leenooks.net -# @license http://www.gnu.org/licenses/ -# @package AgileBill -# @subpackage Language -# -# Makefile Utility to manipulate PO and POT files -# -# Current target list: -# -# all display target -# all-mo compile .mo files from .po translation available -# pot create a update main POT file -# all-merge merge last POT with each current translations (re-create POT) -# all-merge-pot merge last POT with each current translations - -LOCALEDIR = . -TEMPLATEFILES=`find ../../templates -iname *xml -exec echo -m {} \;` -EXPORTFILE = $(shell echo $${EXPORTFILE:-/tmp/launchpad-export.tgz}) - -all: - @echo Please, specify a target [pot, xml-pot, all-mo, all-merge, all-merge-pot, launchpad-export] - -all-mo: - @for i in `ls -1 $(LOCALEDIR)` ; \ - do \ - if ls $(LOCALEDIR)/$$i/LC_MESSAGES/*.po >/dev/null 2>&1; then \ - echo Processing: $$i ; \ - for j in $(LOCALEDIR)/$$i/LC_MESSAGES/*.po; do \ - x=$$(echo $$j|sed -e 's/.po$$/.mo/'); \ - echo " - $$j => $$x"; \ - msgfmt -v -c --statistics $$j -o $$x; \ - done ; \ - fi \ - done - -pot: - @echo TO TEST; exit 1; - @po4a-gettextize -o tags=" <description> <display>" -o tagsonly=1 -f xml $(TEMPLATEFILES) -p messages.pot - @find ../../ -name *.php -exec xgettext --keyword=_ -L PHP -j --omit-header -o messages.pot -s {} \; - @find ../../ -name *.inc -exec xgettext --keyword=_ -L PHP -j --omit-header -o messages.pot -s {} \; - @echo messages.pot created, you might like to change the header with contents of messages.header - -all-merge: pot -all-merge-pot: - @echo TO TEST; exit 1; - @for i in `ls -1 $(LOCALEDIR)` ; \ - do \ - if [ -f $(LOCALEDIR)/$$i/LC_MESSAGES/messages.po ]; then \ - echo Processing: $$i ; \ - msgmerge -v $(LOCALEDIR)/$$i/LC_MESSAGES/messages.po messages.pot -o $$i.po; \ - mv $$i.po $(LOCALEDIR)/$$i/LC_MESSAGES/messages.po; \ - fi \ - done - -launchpad-extract: - @echo TO TEST; exit 1; - @[ ! -r $(EXPORTFILE) ] && echo "No export file [$(EXPORTFILE)] found?" && exit 1 || true - @cd $(LOCALEDIR); tar xzf $(EXPORTFILE) - @rm -f $(LOCALEDIR)/phpldapadmin/phpldapadmin-uk.po - @rm -f $(LOCALEDIR)/phpldapadmin/phpldapadmin.pot - @find $(LOCALEDIR) -name phpldapadmin-\*.po | while read i; do newi=$$(echo $$i| sed -r 's/phpldapadmin-(.*).po/..\/\1\*\/LC_MESSAGES\/messages.po/'); mv $$i $$newi; done - rmdir $(LOCALEDIR)/phpldapadmin - -launchpad-export: launchpad-extract all-mo diff --git a/language/account/english_account.xml b/language/account/english_account.xml deleted file mode 100644 index 35291834..00000000 --- a/language/account/english_account.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>account_admin</name> - - <!-- define the block title translations --> - <title_add>Register for Account</title_add> - <title_update>Update Account Details</title_update> - <title_view>My Account Details</title_view> - <title_password_reset>Retrieve Lost Password</title_password_reset> - <title_password_new>Reset Your Password</title_password_new> - <title_verify_resend>Resend Verification Email</title_verify_resend> - <title_verification_code>Enter Verification Code</title_verification_code> - <title_view_sub_account>Manage Sub-Accounts</title_view_sub_account> - <title_add_sub_account>Add Sub-Account</title_add_sub_account> - - <!-- define the menu label translations --> - <menu>My Account</menu> - <menu_add>Register for Account</menu_add> - <menu_view>My Account Details</menu_view> - - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Update</field_date_last> - <field_date_expire>Expiration Date</field_date_expire> - <field_parent_id>Parent Account</field_parent_id> - <field_language_id>Language</field_language_id> - <field_country_id>Country</field_country_id> - <field_affiliate_id>Affiliate</field_affiliate_id> - <field_reseller_id>Reseller</field_reseller_id> - <field_currency_id>Currency</field_currency_id> - <field_theme_id>Theme</field_theme_id> - <field_username>Username</field_username> - <field_password>Password</field_password> - <field_update_password>Enter New Password</field_update_password> - <field_confirm_password>Confirm Password</field_confirm_password> - <field_change_username>Update Username Requested</field_change_username> - <field_change_password>Update Password Requested</field_change_password> - <field_change_key>Username/Password Update Key</field_change_key> - <field_secret_question>Secret Question</field_secret_question> - <field_secret_answer>Secret Answer</field_secret_answer> - <field_inherit_group>Child Accounts Inherit Parent's Groups?</field_inherit_group> - <field_misc>Account Notes</field_misc> - <field_status>Account Active?</field_status> - <field_first_name>First Name</field_first_name> - <field_middle_name>Middle Name</field_middle_name> - <field_last_name>Last Name</field_last_name> - <field_title>Title/Suffix</field_title> - <field_email>E-mail Address</field_email> - <field_email_html>HTML E-mail OK?</field_email_html> - <field_address1>Address</field_address1> - <field_address2>Address 2</field_address2> - <field_city>City</field_city> - <field_state>State/Province</field_state> - <field_zip>Zip/Postal</field_zip> - <field_company>Company</field_company> - - <!-- define any custom resources --> - <ip_address>IP Address</ip_address> - <mr>Mr.</mr> - <ms>Ms.</ms> - <mrs>Mrs.</mrs> - <miss>Miss</miss> - <dr>Dr.</dr> - <prof>Prof</prof> - <password_change_match> - The new password you provided was not entered the same in the confirm field, please try again. - </password_change_match> - <password_changed> - Your password has been changed to the new password you submitted. - </password_changed> - <password_reset> - If you have forgotten your password, we can issue you a temporary access code - via email that will allow you to change your password. To start this process, - please enter either your e-mail address or username to begin. Please do not enter - both, simply providing one or the other will do just fine. - </password_reset> - <password_reset_req>You must provide either your e-mail address or username in order to retrieve your password</password_reset_req> - <password_reset_spam_limit>You have already submitted the password reset request for this account within the past %limit% seconds, please wait to try again</password_reset_spam_limit> - <password_reset_no_match>Sorry, we cannot find any matching accounts for the criteria you submitted, please double check your information and try again</password_reset_no_match> - <password_reset_sent> - Thank you, we have sent an email to your email address on file with a link for changing your password. - The link is valid for 15 minutes only, so be sure to check your email right away. - </password_reset_sent> - <password_reset_bad_url> - The link you followed has either expired, or been malformed by your email reader. - If you suspect that it did not copy correctly from your email reader, please paste the - entire link from your email reader to the address bar in your browser. - Otherwise, you can restart your password reset request by clicking the link below: - </password_reset_bad_url> - <password_update_success>Your password has been updated successfully!</password_update_success> - <password_reset_instructions> - Please enter the new password for your account below. - </password_reset_instructions> - <password_reset_reqq>You must enter a new password</password_reset_reqq> - <user_add_active_welcome> - Thank you for registering, your account has been successfully registered and - you have been logged in. - </user_add_active_welcome> - <user_add_inactive_welcome><![CDATA[ - Thank you for taking the first step of the registration process. - To finish the registration process, please check your e-mail. - We have sent you a link - once you visit the link in the e-mail, - your account status will be updated to active and there will be - nothing left for you to do. - <BR><BR> - If you do not receive the verification email shortly, you can click - the "Verify Account" link to request that we resend the verification - email.]]> - </user_add_inactive_welcome> - <verify_resend_instructions> - If you are having trouble with the verification code, or never received the verification email, - you can use this form to request that we resend the verification email to you. - Please enter either your username or email address, not both. - </verify_resend_instructions> - <validate_success> - Thank you, your account is now validated and you can login! - </validate_success> - <validate_fail> - Oops, there was a problem with the url you followed, please enter the verification - code from your email in the box below - </validate_fail> - <verification_code>Verification Code</verification_code> - <verification_code_instructions> - Please enter the verification code from the email you recieved below. If you - have not recieved the verification email, or are having trouble, you can use - the form below to request that the verification email be resent. - </verification_code_instructions> - <verify_resend_req> - You must enter either your username or e-mail address in order for the - verification e-mail to be resent. - </verify_resend_req> - <verify_resend_active> - Your account is already active... you can login now. - </verify_resend_active> - <subscribe_newsletters>Newsletters</subscribe_newsletters> - <billing_link>Manage Billing Details</billing_link> - <account_link>Manage Account Details</account_link> - <discount_link>Manage Discounts</discount_link> - <affiliate_link>Manage Affiliate Details</affiliate_link> - <newsletter_link>Manage Newsletters</newsletter_link> -</translate> \ No newline at end of file diff --git a/language/account_admin/english_account_admin.xml b/language/account_admin/english_account_admin.xml deleted file mode 100644 index 5e5d3389..00000000 --- a/language/account_admin/english_account_admin.xml +++ /dev/null @@ -1,151 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>account_admin</name> - - <!-- define the block title translations --> - <title_add>Add Account</title_add> - <title_update>Update Account</title_update> - <title_delete>Delete Account</title_delete> - <title_view>View Account</title_view> - <title_search>Search Accounts</title_search> - <title_list>List All Accounts</title_list> - <title_import>Import Accounts</title_import> - <title_mail>Send E-mail</title_mail> - - <!-- define the menu lable translations --> - <menu>Accounts</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_list>List All Accounts</menu_list> - <menu_import>Import Accounts</menu_import> - <menu_mail_one>Send E-mail</menu_mail_one> - - <!-- define the field translations --> - <field_id>Acount ID</field_id> - <field_site_id>Site ID</field_site_id> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Update</field_date_last> - <field_date_expire>Expiration Date</field_date_expire> - <field_parent_id>Parent Account</field_parent_id> - <field_language_id>Language</field_language_id> - <field_country_id>Country</field_country_id> - <field_affiliate_id>Affiliate</field_affiliate_id> - <field_campaign_id>Campaign</field_campaign_id> - <field_reseller_id>Reseller</field_reseller_id> - <field_currency_id>Currency</field_currency_id> - <field_theme_id>Theme</field_theme_id> - <field_username>Username</field_username> - <field_password>Password</field_password> - <field_change_username>Update Username Requested</field_change_username> - <field_change_password>Update Password Requested</field_change_password> - <field_change_key>Username/Password Update Key</field_change_key> - <field_secret_question>Secret Question</field_secret_question> - <field_secret_answer>Secret Answer</field_secret_answer> - <field_inherit_group>Child Accounts Inherit Parent's Groups?</field_inherit_group> - <field_misc>Account Notes</field_misc> - <field_status>Account Active?</field_status> - <field_first_name>First Name</field_first_name> - <field_middle_name>Middle Name</field_middle_name> - <field_last_name>Last Name</field_last_name> - <field_title>Title/Suffix</field_title> - <field_email>E-mail Address</field_email> - <field_email_html>HTML E-mail OK?</field_email_html> - <field_address1>Street Address</field_address1> - <field_address2>Street Address 2</field_address2> - <field_city>City</field_city> - <field_state>State/Province</field_state> - <field_zip>Zip/Postal Code</field_zip> - <field_company>Company</field_company> - <field_invoice_delivery>Default Invoice Delivery Method</field_invoice_delivery> - <field_invoice_show_itemized>Show itemized detail pages</field_invoice_show_itemized> - <field_invoice_grace>Invoice Grace Period (days)</field_invoice_grace> - <field_invoice_advance_gen>Invoice Advance Generation (days)</field_invoice_advance_gen> - <field_max_child>Max Child Accounts</field_max_child> - - <!-- define the help file --> - <overview>Statistics</overview> - - <!-- define any custom resources --> - <mr>Mr.</mr> - <ms>Ms.</ms> - <mrs>Mrs.</mrs> - <miss>Miss.</miss> - <dr>Dr.</dr> - <prof>Prof</prof> - <staff_add_active>The user has been added, and the account has been set as active.</staff_add_active> - <staff_add_inactive>The user has been added, and the account has been set as inactive.</staff_add_inactive> - <password_change_instructions>The user has been e-mailed the password reset link and instructions</password_change_instructions> - <account_verify_instructions>The user has been e-mailed the account verification link and instructions</account_verify_instructions> - <resend_verify_email>Resend user verification e-mail</resend_verify_email> - <send_password_reset>Send user password reset link</send_password_reset> - <statistics_new_accounts>New Accounts Created: %%count%%</statistics_new_accounts> - <mail_from>From Account</mail_from> - <mail_to>To Account</mail_to> - <mail_subject>Subject</mail_subject> - <mail_message>Message</mail_message> - <mail_priority>High Priority?</mail_priority> - <mail_sent>The e-mail was sent to the specified account(s)</mail_sent> - <mail_multi>Send to all search results</mail_multi> - <account_nonexist>The specified account does not exist!</account_nonexist> - <account_group>Account Member of Group</account_group> - <account_non_group>Account Non-member of Group</account_non_group> - <graph_top>Top User Sales</graph_top> - <blank_to_autogen>Leave blank to allow the system auto-generate</blank_to_autogen> - <welcome_email>Send user welcome email?</welcome_email> - - <menu_overview>Account Overview</menu_overview> - <menu_details><![CDATA[Login & Contact Details]]></menu_details> - <menu_settings>Account Settings</menu_settings> - <menu_custom_fields>Custom Fields</menu_custom_fields> - <menu_notes>Notes</menu_notes> - <restore_overview>Click here to restore account overview...</restore_overview> - <last_activity>Last Activity</last_activity> - <none>None</none> - <invoice_overview>Invoice Overview</invoice_overview> - <service_overview>Service Overview</service_overview> - <invoice_duesoon>Services Billed Soon</invoice_duesoon> - - <jump><![CDATA[ ---- QUICK ACTIONS ---- ]]></jump> - <jump_become>Become User</jump_become> - <jump_merge>Merge User Accounts</jump_merge> - <jump_email>Send E-mail to User</jump_email> - <jump_verify_email>Resend Verification E-mail</jump_verify_email> - <jump_pw>Password Reminder</jump_pw> - <jump_suspend>Suspend User Login</jump_suspend> - <jump_unsuspend>Unsuspend User Login</jump_unsuspend> - <jump_refresh>Refresh View</jump_refresh> - - <jump_view><![CDATA[ ----- QUICK VIEW ----- ]]></jump_view> - <jump_memos>Memos</jump_memos> - <jump_login_logs>Login Logs</jump_login_logs> - <jump_sessions>Sessions</jump_sessions> - <jump_invoices>Invoices</jump_invoices> - <jump_services>Services</jump_services> - <jump_billing>Billing Details</jump_billing> - <jump_discounts>Discounts</jump_discounts> - <jump_affiliate>Affiliate Details</jump_affiliate> - <jump_subaccount>Sub-Accounts</jump_subaccount> - <jump_parentaccount>Parent Account</jump_parentaccount> - - <jump_add><![CDATA[ ----- QUICK ADD ----- ]]></jump_add> - <jump_add_memo>Memo</jump_add_memo> - <jump_add_invoice>Invoice</jump_add_invoice> - <jump_add_service>Service</jump_add_service> - <jump_add_billing>Billing Details</jump_add_billing> - <jump_add_discount>Discount</jump_add_discount> - <jump_add_affiliate>Affiliate</jump_add_affiliate> - <jump_add_subaccount>Sub-Account</jump_add_subaccount> - - <title_merge>Merge Account</title_merge> - <merge_account><![CDATA[ - Select the account you wish to merge with the current account. - <br><br> - This action will delete the selected account and associate all its - invoices, services, logs, and other records with the current account. - <br><br> - <b>Warning:</b> This action cannot be undone! - ]]></merge_account> - <merge_err>An error occurred - unable to merge the selected accounts</merge_err> - <merge_ok>The selected accounts have been merged!</merge_ok> -</translate> diff --git a/language/account_billing/english_account_billing.xml b/language/account_billing/english_account_billing.xml deleted file mode 100644 index 540ebf43..00000000 --- a/language/account_billing/english_account_billing.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>billing_account</name> - - <!-- define the block title translations --> - <title_add>Add Billing Details</title_add> - <title_update>Edit Billing Details</title_update> - <title_view>Modify Billing Details</title_view> - <title_search>Search By Billing Details</title_search> - - <!-- define the menu lable translations --> - <menu>Billing Records</menu> - <menu_add>Add</menu_add> - <menu_search>Search</menu_search> - - <!-- invoices --> - <due_invoices>Due Invoices</due_invoices> - <paid_invoices>Paid Invoices</paid_invoices> - <all_invoices>All Invoices</all_invoices> - - <!-- services --> - <active_services>Active Services</active_services> - <inactive_services>Inactive Services</inactive_services> - <all_services>All Services</all_services> - - <!-- define the field translations --> - <field_account_id>Account</field_account_id> - <field_checkout_plugin_id>Checkout Plugin</field_checkout_plugin_id> - <field_name>Nickname</field_name> - <field_card_type>Account Type</field_card_type> - <field_card_num>Card Number</field_card_num> - <field_card_num4>Last 4 Digits of Current Account</field_card_num4> - <field_card_exp_month>Expires (month)</field_card_exp_month> - <field_card_exp_year>Expires (year)</field_card_exp_year> - <field_card_start_month>Issued (month)</field_card_start_month> - <field_card_start_year>Issued (year)</field_card_start_year> - - <field_eft_check_acct_type>Check Type</field_eft_check_acct_type> - <field_eft_trn>Routing No.</field_eft_trn> - <field_eft_check_acct>Account No.</field_eft_check_acct> - <field_eft_check_checkno>Check Number</field_eft_check_checkno> - <field_ssn>SSN</field_ssn> - <field_dl_no>Drivers License No.</field_dl_no> - <field_dob>Date of Birth</field_dob> - - <field_first_name>First Name</field_first_name> - <field_last_name>Last Name</field_last_name> - <field_address1>Primary Address</field_address1> - <field_address2>Secondary Address</field_address2> - <field_city>City</field_city> - <field_state>State/Province</field_state> - <field_zip>Zip/Postal</field_zip> - <field_country_id>Country</field_country_id> - <field_phone>Phone No.</field_phone> - <field_email>E-mail</field_email> - <field_company>Company</field_company> - - <!-- define the help text --> - <help_file>This module contains the encrypted billing records.</help_file> - - <!-- define any custom resources --> - <val_missing>Missing required data, please check the form and try again</val_missing> - <val_exp>Expiration date invalid/expired, please check the form and try again</val_exp> - <val_cc>Invalid credit card details submitted, please check the form and try again</val_cc> - <card_num_current>Current card on file</card_num_current> - <card_num_new>Change card number to</card_num_new> - <card_in_use>Can not remove a card that is already in use</card_in_use> - <card_removed>Credit card has been removed</card_removed> - - <eft_change_routing>New Routing Number</eft_change_routing> - <eft_change_account>New Bank Account Number</eft_change_account> -</translate> diff --git a/language/account_memo/english_account_memo.xml b/language/account_memo/english_account_memo.xml deleted file mode 100644 index f967f06b..00000000 --- a/language/account_memo/english_account_memo.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>account_memo</name> - <!-- define the block title translations --> - <title_add>Add Memo</title_add> - <title_view>View Memo</title_view> - <title_search>Search Memos</title_search> - <!-- define the menu lable translations --> - <menu>Account Memos</menu> - <menu_add>Add Memo</menu_add> - <menu_view>View Memos</menu_view> - <menu_search>Search Memos</menu_search> - <!-- define the field translations --> - <field_date_orig>Date</field_date_orig> - <field_staff_id>Staff/Admin</field_staff_id> - <field_account_id>Account</field_account_id> - <field_type>Memo Type</field_type> - <field_memo>Memo</field_memo> - <field_misc>Misc</field_misc> - <!-- define any custom resources --> - <system>System</system> - <admin>Staff/Admin Memo</admin> -</translate> diff --git a/language/affiliate/english_affiliate.xml b/language/affiliate/english_affiliate.xml deleted file mode 100644 index 09ffd55c..00000000 --- a/language/affiliate/english_affiliate.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>affiliate</name> - - <!-- define the block title translations --> - <title_add>Add New Affiliate</title_add> - <title_view>Affiliate Details</title_view> - <title_search>Search Affiliates</title_search> - <title_user_add>Affiliate Registration Form</title_user_add> - <title_statistics>Affiliate Statistics</title_statistics> - <title_campaigns><![CDATA[Affiliate Links & Banners]]></title_campaigns> - - <!-- define the menu lable translations --> - <menu>Affiliates</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <overview>Statistics</overview> - - <!-- define the field translations --> - <field_id>Affiliate ID</field_id> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Change</field_date_last> - <field_status>Active?</field_status> - <field_account_id>Account</field_account_id> - <field_avail_campaign_id>Available Campaigns</field_avail_campaign_id> - <field_affiliate_plugin>Commission Payout Type</field_affiliate_plugin> - <field_parent_affiliate_id>Referring Affiliate</field_parent_affiliate_id> - <field_max_tiers>Maximum Tiers</field_max_tiers> - <field_commission_minimum>Minimum Commission Required</field_commission_minimum> - <field_new_commission_type>Commission Type for New Charges</field_new_commission_type> - <field_new_commission_rate>Commissions for New Charges</field_new_commission_rate> - <field_recurr_commission_type>Commission Type for Recurring Charges</field_recurr_commission_type> - <field_recurr_commission_rate>Commissions for Recurring Charges</field_recurr_commission_rate> - <field_recurr_max_commission_periods>Maximum Recurring Periods Commission Paid</field_recurr_max_commission_periods> - <field_plugin_data>Commission Payout Details</field_plugin_data> - - <!-- define the help text --> - <help_file> - This module controls the various affiliate accounts and settings, commissions, etc. - </help_file> - - <user_add_instruct> - Thank you for your interest in our affiliate program. Please read our commission rates and Payout options - below before proceeding. - </user_add_instruct> - <user_add_active> - Thank you for registering for an affiliate account. At this time your account has been - added and you may start referring new customers at once! - </user_add_active> - <user_add_inactive> - Thank you for your application for an affiliate account with us. We have recieved your - request and will notify you at once when it has been approved. - </user_add_inactive> - - <!-- define any custom resources --> - <error_acct_req>You must specify an account, please go back and fix this.</error_acct_req> - <error_template_invalid>The affiliate template you specified is not valid, please go back and fix this.</error_template_invalid> - <error_acct_aff_exist>The account you specified already has an affiliate account!</error_acct_aff_exist> - <error_not_authorized>The specified affiliate account no longer exists or you do not have permission to update it.</error_not_authorized> - - <none>No Commission</none> - <flat>Fixed Rate Commission</flat> - <percent>Percentage Based Commission</percent> - <affiliate_template>Affiliate Template</affiliate_template> - - <!-- define any plugin resources --> - <plugin_paypal_email>PayPal E-mail</plugin_paypal_email> - <plugin_moneybookers_email>MoneyBookers E-mail</plugin_moneybookers_email> - <plugin_ebullion_acct>E-Bullion Account Number</plugin_ebullion_acct> - - <plugin_mail_check_payee>Make Commission Checks Payable To</plugin_mail_check_payee> - <plugin_mail_check_address>Address</plugin_mail_check_address> - <plugin_mail_check_city>City</plugin_mail_check_city> - <plugin_mail_check_state>State/Province</plugin_mail_check_state> - <plugin_mail_check_zip>Zip/Postal Code</plugin_mail_check_zip> - <plugin_mail_check_email>Contact E-mail</plugin_mail_check_email> - - <sessions>Sessions Referred</sessions> - <accounts>Accounts Referred</accounts> - <invoices>Invoices Referred</invoices> - <commissions>Commissions Paid</commissions> - <commissions_due>Invoices Outstanding</commissions_due> - - <campaign_code>Get HTML Code</campaign_code> - <statistics_new_affiliates>New Affiliates</statistics_new_affiliates> - <graph_top>Top Affiliate Sales</graph_top> - <tier>Tier Number</tier> - -</translate> \ No newline at end of file diff --git a/language/affiliate_commission/english_affiliate_commission.xml b/language/affiliate_commission/english_affiliate_commission.xml deleted file mode 100644 index 86ed13c5..00000000 --- a/language/affiliate_commission/english_affiliate_commission.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>affiliate</name> - - <!-- define the block title translations --> - <title_add>Generate Affiliate Commissions</title_add> - <title_search>Search Affiliate Commissions</title_search> - <title_view>Export Affiliate Commissions</title_view> - - <!-- define the menu lable translations --> - <menu>Commissions</menu> - <menu_add>Generate Commissions</menu_add> - <menu_search>Search Commissions</menu_search> - - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_begin>Commission Period, Starting Date</field_date_begin> - <field_date_end>Commission Period, End Date</field_date_end> - <field_commissions>Total Commissions</field_commissions> - <field_notes_admin>Notes (for Admin)</field_notes_admin> - <field_notes_affiliate>Notes (for Affiliate)</field_notes_affiliate> - <field_status>Commissions Paid?</field_status> - - <!-- define the help text --> - <help_file> - This module stores the affiliate commissions paid. - </help_file> - - <!-- define any custom resources --> - <commissions>Commission(s)</commissions> - <export>Run commission payment tool</export> - <do_nothing>Nothing to do...</do_nothing> - <generated>No more commissions left to generate, please click submit to export the commission data...</generated> - <no_results>There are no commissions to be generated for the selected date range.</no_results> - <continue> - <![CDATA[ - Processed records %%start%% - %%stop%%, please - <a href="?_page=core:blank&do[]=affiliate_commission:add&amp;GenID=%%genid%%&page=%%page%%">click here</a> to proceed... - ]]> - </continue> - -</translate> diff --git a/language/affiliate_template/english_affiliate_template.xml b/language/affiliate_template/english_affiliate_template.xml deleted file mode 100644 index 784786f6..00000000 --- a/language/affiliate_template/english_affiliate_template.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>affiliate_template</name> - - <!-- define the block title translations --> - <title_add>Add an Affiliate Template</title_add> - <title_view>View All Affiliate Templates</title_view> - - <!-- define the menu lable translations --> - <menu>Configuration</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - - <!-- define the field translations --> - <field_affiliate_plugin>Commission Payout Type</field_affiliate_plugin> - <field_avail_campaign_id>Available Campaigns</field_avail_campaign_id> - <field_status>Active?</field_status> - <field_name>Name</field_name> - <field_notes>Notes</field_notes> - <field_max_tiers>Maximum Tiers</field_max_tiers> - <field_commission_minimum>Minimum Commission Required</field_commission_minimum> - <field_new_commission_type>Commission Type for New Charges</field_new_commission_type> - <field_new_commission_rate>Commissions for New Charges</field_new_commission_rate> - <field_recurr_commission_type>Commission Type for Recurring Charges</field_recurr_commission_type> - <field_recurr_commission_rate>Commissions for Recurring Charges</field_recurr_commission_rate> - <field_recurr_max_commission_periods>Maximum Recurring Periods Commission Paid</field_recurr_max_commission_periods> - - <!-- define the help text --> - <help_file> - This module controls the default affiliate settings. - </help_file> - - <!-- define any custom resources --> -</translate> diff --git a/language/asset/english_asset.xml b/language/asset/english_asset.xml deleted file mode 100644 index a6d7f2e1..00000000 --- a/language/asset/english_asset.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add</title_add> - <title_view>View</title_view> - <title_search>Search</title_search> - <title_import>Import Assets</title_import> - - <menu>Assets</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_import>Import</menu_import> - - <field_id>ID</field_id> - <field_date_orig>Date Added</field_date_orig> - <field_date_last>Last Modified</field_date_last> - <field_status>Assigned</field_status> - <field_service_id>Service ID</field_service_id> - <field_pool_id>Pool ID</field_pool_id> - <field_asset>Asset</field_asset> - <field_misc>Misc Notes</field_misc> - - <field_filename>File to Import</field_filename> - <pool>Select the Asset Pool to place the imported assets in.</pool> - <help_import> - Select a file to import below. - The file must contain a single asset per line. Optional: a second column with a value for the 'misc' field. - Example line in import file: 'asset,misc text' - Duplicates will not be imported. - </help_import> - -</translate> \ No newline at end of file diff --git a/language/asset_invoice/english_asset_invoice.xml b/language/asset_invoice/english_asset_invoice.xml deleted file mode 100644 index 7f282a10..00000000 --- a/language/asset_invoice/english_asset_invoice.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add New Asset Pool</title_add> - <title_view>View Asset Pool</title_view> - - <menu>Asset Invoice Assignment</menu> - <menu_search>Assign Now</menu_search> - <menu_view>List</menu_view> - -</translate> \ No newline at end of file diff --git a/language/asset_pool/english_asset_pool.xml b/language/asset_pool/english_asset_pool.xml deleted file mode 100644 index 7de996d4..00000000 --- a/language/asset_pool/english_asset_pool.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add New Asset Pool</title_add> - <title_update></title_update> - <title_delete></title_delete> - <title_view>Vew Asset Pool</title_view> - - <menu>Asset Pools</menu> - <menu_add>Add</menu_add> - <menu_update></menu_update> - <menu_delete></menu_delete> - <menu_view>List</menu_view> - - <field_id>ID</field_id> - <field_site_id></field_site_id> - <field_name>Pool Name</field_name> -</translate> \ No newline at end of file diff --git a/language/backup/english_backup.xml b/language/backup/english_backup.xml deleted file mode 100644 index 725a6aad..00000000 --- a/language/backup/english_backup.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>backup</name> - - <!-- define the block title translations --> - <title_add>Backup Database</title_add> - <title_view>Restore Database</title_view> - <title_manual>Manual Backup</title_manual> - - <!-- define the menu lable translations --> - <menu>Backup</menu> - <menu_add>Backup</menu_add> - <menu_view>Restore</menu_view> - - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_expire>Scheduled Deletion Date</field_date_expire> - <field_notes>Notes</field_notes> - <field_modules>Modules to backup</field_modules> - <field_manual>File Name</field_manual> - - <!-- define the help text --> - <help_file> - This module enables you to create backups of the database for later restoration. - </help_file> - - <!-- define any custom resources --> - <manual_instructions> - If you have previously downloaded a backup, and it has been since been deleted, - you can use the manual backup feature to put it back in the restore list - so it can be used. You must upload it (via FTP or another method) to your - /includes/files/ directory, and then enter the name of the file below once - you have uploaded it. - Example: backup_10.xml - </manual_instructions> - <manual_file_req>You must enter the filename, please go back and correct this.</manual_file_req> - <manual_file_miss>The filename you entered does not exist or is not writable, please correct this and try again.</manual_file_miss> - <download>Download Backup File</download> - <restore>Restore</restore> - <restore_instructions> - If you choose to restore this backup, all you current data in the modules in this backup - WILL BE LOST, and all data and settings will be as they were at the time that this - backup was made. If you are sure you wish to continue, press the button below. - </restore_instructions> - <backing_up>Currently backing up %%mod%%</backing_up> - <backup_complete>Database Backup Complete!</backup_complete> - <restore_complete>Database Restore Complete!</restore_complete> -</translate> diff --git a/language/blocked_email/english_blocked_email.xml b/language/blocked_email/english_blocked_email.xml deleted file mode 100644 index 0e696874..00000000 --- a/language/blocked_email/english_blocked_email.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>blocked_email</name> - <!-- define the block title translations --> - <title_add>Add Blocked Email</title_add> - <title_update>Update Blocked Email</title_update> - <title_view>View Blocked Emails</title_view> - <title_search>Search Blocked Emails</title_search> - <!-- define the menu lable translations --> - <menu>Blocked Domains</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Update</field_date_last> - <field_email>Email or Domain</field_email> - <field_notes>Notes</field_notes> - <!-- define any custom resources --> -</translate> diff --git a/language/blocked_ip/english_blocked_ip.xml b/language/blocked_ip/english_blocked_ip.xml deleted file mode 100644 index 5b9b26ea..00000000 --- a/language/blocked_ip/english_blocked_ip.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>blocked_ip</name> - <!-- define the block title translations --> - <title_add>Add a Blocked IP</title_add> - <title_update>Update a Blocked IP</title_update> - <title_view>View Blocked IPs</title_view> - <title_search>Search Blocked IPs</title_search> - <!-- define the menu lable translations --> - <menu>Blocked IPs</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Update</field_date_last> - <field_ip>IP Address or Subnet</field_ip> - <field_notes>Notes</field_notes> - <!-- define any custom resources --> -</translate> diff --git a/language/campaign/english_campaign.xml b/language/campaign/english_campaign.xml deleted file mode 100644 index c5be966a..00000000 --- a/language/campaign/english_campaign.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>campaign</name> - <!-- define the block title translations --> - <title_add>Add Campaign</title_add> - <title_view>View Campaigns</title_view> - <title_search>Search Campaigns</title_search> - <!-- define the menu lable translations --> - <menu>Campaigns</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Last Update</field_date_last> - <field_date_start>Start Date</field_date_start> - <field_date_expire>Expire Date</field_date_expire> - <field_status>Active?</field_status> - <field_name>Campaign</field_name> - <field_description>Campaign Description</field_description> - <field_budget>Cost for Campaign</field_budget> - <field_target_conversion>Target Conversion Rate</field_target_conversion> - <field_url>Campaign Destination Url (blank for home page)</field_url> - <!-- define any custom resources --> - <files> Select up to four banners, Flash, or HTML files to rotate through for this campaign. </files> - <conversion_tip>Example: enter 10 for 10 percent</conversion_tip> - <add_one>Advertisement One</add_one> - <add_two>Advertisement Two</add_two> - <add_three>Advertisement Three</add_three> - <add_four>Advertisement Four</add_four> - <add_five>Advertisement Five</add_five> - <add_six>Advertisement Six</add_six> - <add_seven>Advertisement Seven</add_seven> - <add_eight>Advertisement Eight</add_eight> - <add_nine>Advertisement Nine</add_nine> - <add_ten>Advertisement Ten</add_ten> - <add_eleven>Advertisement Eleven</add_eleven> - <add_twelve>Advertisement Twelve</add_twelve> - <impressions>Impressions</impressions> - <clicks>Clicks</clicks> - <cost>Cost</cost> - <conversion>CTR</conversion> - <delete_file>Delete this file from rotation</delete_file> - <random_code> Insert the random code below into your html file(s) where you would like the - advertisements to be displayed. All the advertisements for this campaign will be randomly - cycled... If you want to force a specfic advertisement, use the code below the advertisement - above in your html instead. </random_code> - <referred_invoices>Invoices Referred</referred_invoices> - <revenue_generated>Revenue Generated</revenue_generated> - <avg_cost_conversion>Average Cost Per Conversion</avg_cost_conversion> - <avg_sale>Average Sale Amount</avg_sale> - <roi>Return on Investment (ROI)</roi> - <referred_accounts>Accounts Referred</referred_accounts> - <avg_cpi>Avg. CPI (Cost Per Impression)</avg_cpi> - <avg_cpc>Avg CPC (Cost Per Click)</avg_cpc> - <impr_to_buy>Impression to Buy Ratio</impr_to_buy> - <click_to_buy>Click to Buy Ratio</click_to_buy> - <impr>Impr.</impr> - <cpc>Avg. CPC</cpc> - <cpi>Avg. CPI</cpi> - <cost_conv>Cost/Conv.</cost_conv> - <roi_s>ROI</roi_s> - <avg_sale_s>Avg. Sale</avg_sale_s> - <revenue>Revenue</revenue> -</translate> diff --git a/language/cart/english_cart.xml b/language/cart/english_cart.xml deleted file mode 100644 index a86f85e0..00000000 --- a/language/cart/english_cart.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>cart</name> - <!-- define any custom resources --> - <err_no_prod> The product you have attempted to add to the cart is not available at this time. </err_no_prod> - <err_assoc_login> The product requires associated product(s) in order to be purchased. If you have - already purchased the associated products, please login so the required products can be - verified against your account.</err_assoc_login> - <err_assoc_req>The selected product requires other associated product(s) in order to be purchased.</err_assoc_req> - <assoc_one><![CDATA[You must add one of the following items to your cart in order to purchase the item you selected:<br>%%items%%]]></assoc_one> - <assoc_all><![CDATA[You must add all of the following items to your cart in order to purchase the item you selected:<br>%%items%%]]></assoc_all> - <err_prod_already> The product you have attempted to add to the cart cannot be added, as it is already in the cart. </err_prod_already> - <quantity>Quantity</quantity> - <host_type_domain>For your existing domain </host_type_domain> - <host_type_ip>This is an IP based hosting plan, IP address to be assigned.</host_type_ip> - <domain_term>Domain Term</domain_term> - <host_type_register>Domain registration for hosting plan </host_type_register> - <host_type_transfer>Domain transfer for hosting plan </host_type_transfer> - <register>New domain registration</register> - <transfer>Domain Transfer</transfer> - <renew>Renew Domain</renew> - <park>Park Domain</park> - <price_type>Pricing Structure</price_type> - <price_type_one>One-time Charge</price_type_one> - <price_type_recurr>Recurring Membership/Subscription</price_type_recurr> - <price_type_trial>Trial for Membership/Subscription</price_type_trial> - <setup>Setup</setup> - <recurr_week>Weekly Billing Schedule</recurr_week> - <recurr_month>Monthly Billing Schedule</recurr_month> - <recurr_quarter>Quarterly Billing Schedule</recurr_quarter> - <recurr_semianual>Semi-annual Billing Schedule</recurr_semianual> - <recurr_anual>Annual Billing Schedule</recurr_anual> - <recurr_twoyear>Two-year Billing Schedule</recurr_twoyear> - <recurr_threeyear>Three-year Billing Schedule</recurr_threeyear> - <payment_option>Please Select Your Preferred Payment Option</payment_option> - <admin_create_invoice>Create Invoice Now</admin_create_invoice> - <manual_discount>Manual Discount</manual_discount> - <empty>Your cart is empty, please select one or more products to continue...</empty> - <base_price>Base Price</base_price> - <setup_price>Setup Price</setup_price> - <subtotal>Sub-total</subtotal> - <discount>Discount</discount> - <total>Total</total> - <remove_items>To edit or remove items, click here.</remove_items> - <view_items>Click here for an itemized list of items in this purchase.</view_items> - <hide_items>Click here to hide itemized list.</hide_items> - <no_checkout_options> - Sorry, no online payment option has been defined for this order type. - Please contact customer service for ordering details. - </no_checkout_options> - <ad_hoc_heading>Ad Hoc Item</ad_hoc_heading> - <ad_hoc_sku>SKU</ad_hoc_sku> - <ad_hoc_name>Item Name</ad_hoc_name> - <ad_hoc_amount>Item Price</ad_hoc_amount> - <ad_hoc_taxable>Taxable?</ad_hoc_taxable> - <ad_hoc_attr>Attributes (up to 10)</ad_hoc_attr> - <ad_hoc_err>The SKU, Item Name, and Item Price must all be entered, please go back and correct.</ad_hoc_err> - <service_upgrade>Upgrade for Service ID %%service%%</service_upgrade> -</translate> diff --git a/language/charge/english_charge.xml b/language/charge/english_charge.xml deleted file mode 100644 index 7892d4df..00000000 --- a/language/charge/english_charge.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>charge</name> - <!-- define the block title translations --> - <title_add>Add Charge</title_add> - <title_update>View/Edit Charge</title_update> - <title_view>View/Edit Charge</title_view> - <title_search>Search Charges</title_search> - <!-- define the menu lable translations --> - <menu>Charges</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_import>Import</menu_import> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_status>Invoiced?</field_status> - <field_sweep_type>Sweep Type</field_sweep_type> - <field_account_id>Account</field_account_id> - <field_product_id>Product SKU</field_product_id> - <field_service_id>Service</field_service_id> - <field_amount>Amount</field_amount> - <field_quantity>Quantity</field_quantity> - <field_taxable>Taxable</field_taxable> - <field_attributes>Attributes</field_attributes> - <!-- define any custom resources --> -</translate> diff --git a/language/checkout/english_checkout.xml b/language/checkout/english_checkout.xml deleted file mode 100644 index e07a6403..00000000 --- a/language/checkout/english_checkout.xml +++ /dev/null @@ -1,114 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>checkout</name> - <!-- define the block title translations --> - <title_add>Add A Checkout Option</title_add> - <title_view>View Checkout Option</title_view> - <!-- define the menu lable translations --> - <menu>Checkout Plugins</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_name>Name</field_name> - <field_description>Description</field_description> - <field_active>Active?</field_active> - <field_checkout_plugin>Checkout Plugin</field_checkout_plugin> - <field_plugin_data>Plugin Configuration</field_plugin_data> - <field_allow_recurring>Allow Recurring Charges?</field_allow_recurring> - <field_allow_new>Allow One-time Charges?</field_allow_new> - <field_allow_trial>Allow Trials?</field_allow_trial> - <field_total_minimum>Minimum Purchase Amount Allowed</field_total_minimum> - <field_total_maximum>Maximum Purchase Amount Allowed</field_total_maximum> - <field_max_decline_attempts>Maximum Failed Order Attempts Allowed</field_max_decline_attempts> - <field_manual_approval_all>Require Manual Approval of all new Purchases?</field_manual_approval_all> - <field_manual_approval_recur>Require Manual Approval af all Automatically Generated Invoices for Recurring Services?</field_manual_approval_recur> - <field_manual_approval_country>Manual Approval Required for Countries</field_manual_approval_country> - <field_manual_approval_group>Manual Approval Required for Groups</field_manual_approval_group> - <field_manual_approval_amount>Manual Approval Required for any new Purchase Greater Than</field_manual_approval_amount> - <field_manual_approval_currency>Manual Approval Required for Currencies</field_manual_approval_currency> - <field_default_when_currency>Default Checkout Option for Currencies</field_default_when_currency> - <field_default_when_country>Default Checkout Option for Countries</field_default_when_country> - <field_default_when_group>Default Checkout Option for Groups</field_default_when_group> - <field_default_when_amount>Default Checkout Option for Amounts Greater Than</field_default_when_amount> - <field_allowed_currencies>Currencies Supported</field_allowed_currencies> - <field_email_template>Special Instructions to E-mail User</field_email_template> - <field_required_groups>Require one of the following groups to access this checkout option</field_required_groups> - <field_excluded_products>Excluded orders that include any of the following products from accessing this checkout option</field_excluded_products> - <field_graphic_url>Checkout Graphic URL</field_graphic_url> - - <!-- define any custom resources --> - <invalid_discount>The discount code was entered incorrectly or is not valid.</invalid_discount> - <discounts>Enter Discount Code</discounts> - <totals>Purchase Totals</totals> - <affiliate>Enter Referrer Code</affiliate> - <redirect_html><![CDATA[If you are not redirected shortly, please <a href="#" onClick="checkoutNow();">click here to redirect</a>.]]></redirect_html> - <redirect>Thank you! We will now finalize your purchase and forward you to the secure payment area.</redirect> - <redirect_cancel>Please select your preferred payment option above when you are ready to continue.</redirect_cancel> - <bad_checkout_option>This checkout option is currently disabled, please select another.</bad_checkout_option> - <mode>Processing Mode</mode> - <mode_test>Test Mode</mode_test> - <mode_live>Live Mode</mode_live> - <currency_not_supported> Sorry, the selected payment processor does not support the currency you have selected. Please change your currency to %%currency%%, or try another payment option.</currency_not_supported> - <prorated_not_supported> Sorry, this payment processor can not handle pro-rated subscriptions - please select another payment option.</prorated_not_supported> - <avs_address_only>Address (street) matches, Zip does not</avs_address_only> - <avs_error>AVS Error</avs_error> - <avs_no_match>No match on street or zip</avs_no_match> - <avs_na>AVS not applicable to this transaction</avs_na> - <avs_retry>Retry - system unavailable or timed out</avs_retry> - <avs_not_supported>Service not supported by issuer</avs_not_supported> - <avs_address_unavail>Address information unavailable</avs_address_unavail> - <avs_fullzip_only>9 digit zip matches, address does not</avs_fullzip_only> - <avs_exact>Exact AVS match</avs_exact> - <avs_address_zip>Address and 5 digit zip match</avs_address_zip> - <avs_partzip_only>5 digit zip match, no street match</avs_partzip_only> - <enter_card>Please enter your billing details below</enter_card> - <enter_card_onfile>Please select a billing record on file to use</enter_card_onfile> - <card_no>Credit Card No.</card_no> - <card_type>Card Type</card_type> - <card_type_visa>Visa</card_type_visa> - <card_type_mc>Mastercard</card_type_mc> - <card_type_amex>Amex</card_type_amex> - <card_type_discover>Discover</card_type_discover> - <card_type_delta>Delta</card_type_delta> - <card_type_solo>Solo</card_type_solo> - <card_type_switch>Switch</card_type_switch> - <card_type_jcb>JCB</card_type_jcb> - <card_type_diners>Diners Club</card_type_diners> - <card_type_carteblanche>Carte Blanche</card_type_carteblanche> - <card_type_enroute>enRoute</card_type_enroute> - <card_type_eft>eCheck</card_type_eft> - <exp_date>Expiration Date</exp_date> - <exp_month>Expiration Month</exp_month> - <exp_year>Expiration Year</exp_year> - <process_ord>Process Order</process_ord> - <ccv>Security No. ?</ccv> - <ccv_visa_mc>FOR VISA/MASTER CARD HOLDERS</ccv_visa_mc> - <ccv_visa_mc_full> For your safety and security, we require that you enter your card's - verification number. The verification number is a 3-digit number printed on the back of your - card. It appears after and to the right of your card number </ccv_visa_mc_full> - <ccv_amex>FOR AMERICAN EXPRESS CARD HOLDERS</ccv_amex> - <ccv_amex_full> For your safety and security, we require that you enter your card's verification - number. The American Express verification number is a small 4-digit number printed on the - front of your card on the right hand side. </ccv_amex_full> - <manual_alert> Thank you, your billing details have been stored for manual review and - verification of funds. Once we have reviewed and successfully debited the account provided, we - will update the invoice status. In the meanwhile, your invoice will be continue to be - displayed as due, you can ignore this unless we contact you stating otherwise. </manual_alert> - <remit_alert> Thank you, invoice billing status will be displayed as due until reciept and - verification of your funds. In the meanwhile, your invoice will be continue to be displayed - as due, you can ignore this unless we contact you stating otherwise. </remit_alert> - <card_invalid>The credit card details entered are invalid!</card_invalid> - <card_exp_invalid>The expiration details entered are invalid!</card_exp_invalid> - <enter_new_card>Enter a new billing details</enter_new_card> - <missing_fields>Missing required billing details</missing_fields> - <eft_check_checkno>Check Number</eft_check_checkno> - <eft_check_acct_type>Check Type</eft_check_acct_type> - <eft_type_b>Business</eft_type_b> - <eft_type_p>Personal</eft_type_p> - <eft_trn>Routing No.</eft_trn> - <eft_check_acct>Account No.</eft_check_acct> - <dob>Date of Birth</dob> - <dl_no>Driver's License No.</dl_no> - <ssn>SSN</ssn> - <phone>Phone No.</phone> -</translate> diff --git a/language/core/en_core.xml b/language/core/en_core.xml deleted file mode 100644 index 4ad4b8ed..00000000 --- a/language/core/en_core.xml +++ /dev/null @@ -1,181 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <window_close>Close</window_close> - <contact>Contact Us</contact> - <verify_txt>Verify your account here:</verify_txt> - <verify>Verify Account</verify> - <logout>Logout</logout> - <login>Login</login> - <cart>Cart</cart> - <checkout>Checkout</checkout> - <update_account>Update Account</update_account> - <admin>Administration</admin> - <newsletter>Newsletters</newsletter> - <reset_password>Reset password</reset_password> - <static_page>Site Content</static_page> - <account_login>Account Login</account_login> - <products>Our Products</products> - <account>Account Options</account> - <invoice>My Invoices</invoice> - <main>Site Options</main> - <username>Username</username> - <password>Password</password> - <authorized_groups>Authorized Groups</authorized_groups> - <back>Back</back> - <refresh>Refresh</refresh> - <home>Home</home> - <register>Register</register> - <true>Yes</true> - <false>No</false> - <none>None</none> - <cancel>Cancel</cancel> - <submit>Submit</submit> - <view>View</view> - <add>Add</add> - <search>Search</search> - <list>List</list> - <help>Help</help> - <select>Select</select> - <clear>Clear</clear> - <delete>Delete</delete> - <processing>Processing...</processing> - <hide>Hide</hide> - <close>Close</close> - <save>Save</save> - <edit>Edit</edit> - <select_all>Select All</select_all> - <deselect_all>Deselect All</deselect_all> - <range_select>Range Select</range_select> - <view_edit>View / Edit</view_edit> - <export>Export</export> - <error>Error</error> - <alert>Alert</alert> - <free>FREE</free> - <currency>Currency Options</currency> - <overview>Overview</overview> - <day>Day(s)</day> - <week>Week(s)</week> - <month>Month(s)</month> - <year>Year(s)</year> - <jan>Jan</jan> - <feb>Feb</feb> - <mar>Mar</mar> - <apr>Apr</apr> - <may>May</may> - <jun>Jun</jun> - <jul>Jul</jul> - <aug>Aug</aug> - <sep>Sep</sep> - <oct>Oct</oct> - <nov>Nov</nov> - <dec>Dec</dec> - <login_enter_both>You must enter both your username and password.</login_enter_both> - <login_required>You must be logged in to access this area.</login_required> - <login_un_pw_failed>The username or password you have provided does not match our records.</login_un_pw_failed> - <login_un_failed>The username you provided does not exist in our database.</login_un_failed> - <login_pw_failed>The password you provided is incorrect.</login_pw_failed> - <login_locked>You have exceeded the allowed login attempts, your account has been temporarily locked.</login_locked> - <login_inactive>Your account is currently inactive.</login_inactive> - <login_success>You have been successfully logged in.</login_success> - <login_renew>Stay logged in</login_renew> - <login_renewed>Your session has been renewed and will remain active.</login_renewed> - <login_sess_timout>Your session is set to expire in 60 seconds.</login_sess_timout> - <login_user_add>Register for a client account</login_user_add> - <login_log_success>Last successful login was on %date% from %ip%</login_log_success> - <logout_success>You have been logged out.</logout_success> - <logout_notify>Your session has expired, and you have been logged out.</logout_notify> - <alert_print>Print this page now?</alert_print> - <alert_session_timeout>Session Timout Alert</alert_session_timeout> - <alert_refresh_click>If this page does not automaticaly refresh within a few seconds, please click below to continue.</alert_refresh_click> - <alert_click>Click here to continue</alert_click> - <alert_delete>Are you sure you wish to delete this record?</alert_delete> - <alert_delete_id>%%module%% record Id %%id%% has been deleted.</alert_delete_id> - <alert_delete_ids>The %%module_name%% record(s) you specified have been deleted.</alert_delete_ids> - <module_non_existant>The required %%module_name%% module does not exist.</module_non_existant> - <module_non_auth>Your account is not authorized for the %%module_name%% module.</module_non_auth> - <method_non_existant>The required %%module_name%% method does not exist.</method_non_existant> - <method_invalid>%%module_name%% method is not a valid method.</method_invalid> - <validate_min_length>The minimum length of this field is %%min_length%% characters.</validate_min_length> - <validate_max_length>The maximum length of this field is %%max_length%% characters.</validate_max_length> - <validate_email>The email address you have provided is invalid.</validate_email> - <validate_date>The date you have provided is invalid.</validate_date> - <validate_address>The address you have provided is invalid.</validate_address> - <validate_zip>The zip code you have provided is invalid.</validate_zip> - <validate_phone>The phone number you have provided is invalid. eg: 123-456-7890</validate_phone> - <validate_fax>The fax number you have provided is invalid. eg: 123-456-7890</validate_fax> - <validate_cc>The credit card number you have provided is invalid.</validate_cc> - <validate_check>The check account number you have provided is invalid.</validate_check> - <validate_numeric>This field can contain only numeric characters.</validate_numeric> - <validate_float>This field can contain only numbers with up to one decimal.</validate_float> - <validate_alphanumeric>This field can contain only alphanumeric characters</validate_alphanumeric> - <validate_non_numeric>This field cannot contain numeric characters.</validate_non_numeric> - <validate_any>This field is required and cannot be left blank.</validate_any> - <validate_unique>The value you have entered is already in use, please try again.</validate_unique> - <validate_banned_ip>Sorry, we are presently not accepting new registrations from your area</validate_banned_ip> - <validate_banned_email>Sorry, we cannot accept new registrations from the e-mail address you provided</validate_banned_email> - <validate_ip>Sorry, the domain you specified is invalid and cannot be licensed.</validate_ip> - <validate_domain>Sorry, the IP address you specified is invalid and cannot be licensed.</validate_domain> - <validate_general>Sorry, the value you entered is not valid.</validate_general> - <validate_password>Must include both numbers and letters, cannot be your initials, and cannot include your first or last name, your username, or your email.</validate_password> - <export_format>Export Format</export_format> - <export_format_csv>Comma Separated Value</export_format_csv> - <export_format_excel>Excel</export_format_excel> - <export_format_pdf>Adobe Acrobat</export_format_pdf> - <export_format_tab>Tab Separated Value</export_format_tab> - <export_format_xml>Extensible Markup Language</export_format_xml> - <export_pages>Export Pages</export_pages> - <export_pages_all>All Pages</export_pages_all> - <export_pages_current>Current Pages</export_pages_current> - <export_to>Export To</export_to> - <export_to_browser>Display in browser</export_to_browser> - <export_to_download>Download to local computer</export_to_download> - <export_to_email>Email to user/list</export_to_email> - <export_to_public>Save to public area</export_to_public> - <search_recent>Your Recent Searches</search_recent> - <search_saved_l>Your Saved Searches</search_saved_l> - <search_save>Save Search</search_save> - <search_saved>Your search has been saved.</search_saved> - <search_save_nickname>Enter a nickname for this search:</search_save_nickname> - <search_no_results>No results for your search were found.</search_no_results> - <search_results>Your search has been completed sucessfully.</search_results> - <search_results_per>Results per page</search_results_per> - <search_order_by>Order results by</search_order_by> - <search_partial>"%" for partial match</search_partial> - <search_export_image>Export these search results to XML, PDF, Excel, Comma or Tab Separated Values.</search_export_image> - <search_print_image>View a printer friendly page with these search results.</search_print_image> - <search_save_image>Save this search for later retrieval.</search_save_image> - <search_new_image>Create a new search.</search_new_image> - <search_result_count>%%results%% record was found.</search_result_count> - <search_results_count>%%results%% records were found.</search_results_count> - <debug_groups>Authorized Groups</debug_groups> - <debug_methods>Authorized Methods</debug_methods> - <debug_execution>Execution Timing</debug_execution> - <debug_general>General Debug Details</debug_general> - <debug_execution_time>Execution Time</debug_execution_time> - <debug_session>Session ID</debug_session> - <debug_sql_queries>Total SQL Queries</debug_sql_queries> - <reset_password_txt>Reset your lost password here:</reset_password_txt> - <newsletter_txt>Manage your newsletters here:</newsletter_txt> - <newsletter_subscribe>Enter e-mail to subscribe:</newsletter_subscribe> - <accounts>Accounts</accounts> - <campaigns>Campaigns</campaigns> - <email_templates>Email Templates</email_templates> - <files>Files</files> - <groups>User Groups</groups> - <modules>Modules</modules> - <newsletters>Newsletters</newsletters> - <site_configuration>Site Configuration</site_configuration> - <newsletter_subscribers>Newsletter Subscribers</newsletter_subscribers> - <static_pages>Static Pages</static_pages> - <web_logs>Web Logs</web_logs> - <import>Import</import> - <products_services><![CDATA[Products & Services]]></products_services> - <invoices_billing><![CDATA[Invoices & Billing]]></invoices_billing> - <affiliates>Affiliates</affiliates> - <backup_restore><![CDATA[Backup & Restore]]></backup_restore> - <login_logs>Login Logs</login_logs> - <sessions>Sessions</sessions> - <domain_search>Domain Names</domain_search> - <faqs>FAQs</faqs> - <lists_none_defined>None Defined</lists_none_defined> -</translate> diff --git a/language/currency/english_currency.xml b/language/currency/english_currency.xml deleted file mode 100644 index 0b4b1b58..00000000 --- a/language/currency/english_currency.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>currency</name> - <!-- define the block title translations --> - <title_add>Add Currency</title_add> - <title_update>Update Currency</title_update> - <title_view>View Currencies</title_view> - <title_search>Search Currencies</title_search> - <!-- define the menu lable translations --> - <menu>Currencies</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_id>ID</field_id> - <field_site_id>Site ID</field_site_id> - <field_name>Currency Name</field_name> - <field_status>Accepted?</field_status> - <field_convert_array> Currency Conversion Rates <br><br> Click - the currency flag icon to get the latest currency exchange rates from XE.com </field_convert_array> - <field_notes>Notes</field_notes> - <field_symbol>Symbol</field_symbol> - <field_three_digit>Three Digit Currency Code</field_three_digit> - <!-- define any custom resources --> -</translate> diff --git a/language/discount/english_discount.xml b/language/discount/english_discount.xml deleted file mode 100644 index c5c2b2db..00000000 --- a/language/discount/english_discount.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>discount</name> - <!-- define the block title translations --> - <title_add>Add Discount</title_add> - <title_view>View All Discounts</title_view> - <title_search>Search Discounts</title_search> - <!-- define the menu lable translations --> - <menu>Discounts</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_start>Start Date</field_date_start> - <field_date_expire>Expiration Date</field_date_expire> - <field_status>Active?</field_status> - <field_name>Coupon Code</field_name> - <field_notes>Notes</field_notes> - <field_max_usage_account>Maximum Uses per Account (blank for unlimited)</field_max_usage_account> - <field_max_usage_global>Uses Allowed Globally (blank for unlimited)</field_max_usage_global> - <field_avail_account_id>Available only to account</field_avail_account_id> - <field_avail_product_id>Available only to product(s)</field_avail_product_id> - <field_avail_group_id>Available only to group(s)</field_avail_group_id> - <field_avail_tld_id>Available only to TLD(s)</field_avail_tld_id> - <field_new_status>Valid for new orders?</field_new_status> - <field_new_type>Type of Discount for new orders</field_new_type> - <field_new_rate>Discount rate for new orders</field_new_rate> - <field_new_max_discount>Maximum discount for new orders</field_new_max_discount> - <field_new_min_cost>Minimum order total required</field_new_min_cost> - <field_recurr_status>Valid for recurring charges?</field_recurr_status> - <field_recurr_type>Discount type for recurring charges</field_recurr_type> - <field_recurr_rate>Discount rate for recurring charges</field_recurr_rate> - <field_recurr_max_discount>Maximum discount for recurring charges</field_recurr_max_discount> - <field_recurr_min_cost>Minimum recurring charge amount for discount to apply</field_recurr_min_cost> - <!-- define any custom resources --> - <percent>Percentage of Total</percent> - <flat>Flat Rate</flat> - <discount_restrictions><![CDATA[Discount Restrictions & Limitations]]></discount_restrictions> - <discount_new><![CDATA[Settings for new Charges & Orders]]></discount_new> - <discount_recurr>Settings for Recurring Charges</discount_recurr> - <invoice_count>Invoice Count</invoice_count> - <revenue>Revenue</revenue> - <savings>Customer Savings</savings> -</translate> diff --git a/language/email_log/english_email_log.xml b/language/email_log/english_email_log.xml deleted file mode 100644 index c97b8ea0..00000000 --- a/language/email_log/english_email_log.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - - <!-- define the block title translations --> - <title_update>Email Log</title_update> - <title_view>List</title_view> - <title_search>Search</title_search> - <title_user_list>E-mail Logs</title_user_list> - <title_user_view>E-mail Log Detail</title_user_view> - - <!-- define the menu lable translations --> - <menu>Email Logs</menu> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <!-- define the field translations --> - <field_date_orig>Date</field_date_orig> - <field_account_id>Account</field_account_id> - <field_email>E-mail</field_email> - <field_subject>Subject</field_subject> - <field_message>Message</field_message> - <field_html>HTML</field_html> - <field_urgent>Urgent</field_urgent> - <field_userread>User userread?</field_userread> -</translate> \ No newline at end of file diff --git a/language/email_queue/english_email_queue.xml b/language/email_queue/english_email_queue.xml deleted file mode 100644 index e458bec4..00000000 --- a/language/email_queue/english_email_queue.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>email_queue</name> - - <!-- define the block title translations --> - <title_add></title_add> - <title_update></title_update> - <title_delete></title_delete> - <title_view></title_view> - <title_search></title_search> - - <!-- define the menu lable translations --> - <menu>Email Queue</menu> - <menu_add></menu_add> - <menu_update></menu_update> - <menu_delete></menu_delete> - <menu_view></menu_view> - <menu_search></menu_search> - - <!-- define the field translations --> - <field_id></field_id> - <field_site_id></field_site_id> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Last Update</field_date_last> - <field_status>E-mail Sent?</field_status> - <field_account_id>Account</field_account_id> - <field_email_template>Email Template</field_email_template> - <field_sql1>SQL 1</field_sql1> - <field_sql2>SQL 2</field_sql2> - <field_sql3>SQL 3</field_sql3> - <field_sql4>SQL 4</field_sql4> - <field_sql5>SQL 5</field_sql5> - <field_var>VARS</field_var> -</translate> \ No newline at end of file diff --git a/language/email_template/english_email_template.xml b/language/email_template/english_email_template.xml deleted file mode 100644 index 837577b4..00000000 --- a/language/email_template/english_email_template.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>email_template</name> - <!-- define the block title translations --> - <title_add>Add Email Template</title_add> - <title_update/> - <title_delete/> - <title_view>View Email Templates</title_view> - <title_search/> - <!-- define the menu lable translations --> - <menu>Email Templates</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_setup_email_id>Email Setup to Use</field_setup_email_id> - <field_name>Template Name</field_name> - <field_status>Enabled?</field_status> - <field_priority>High Priority?</field_priority> - <field_shortcuts>Available Shortcuts</field_shortcuts> - <field_notes>Notes</field_notes> - <field_sql_1>Custom SQL 1</field_sql_1> - <field_sql_2>Custom SQL 2</field_sql_2> - <field_sql_3>Custom SQL 3</field_sql_3> - <!-- define any custom resources --> - <view_translations>View Translations for this email template</view_translations> - <add_translation>Add Translation for this email template</add_translation> -</translate> diff --git a/language/email_template_translate/english_email_template_translate.xml b/language/email_template_translate/english_email_template_translate.xml deleted file mode 100644 index 8484f3d4..00000000 --- a/language/email_template_translate/english_email_template_translate.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>email_template_translate</name> - <!-- define the block title translations --> - <title_add>Add Email Template Translation</title_add> - <title_view>View Email Template Translations</title_view> - <title_search>Search Email Template Translations</title_search> - <!-- define the menu lable translations --> - <menu>Translations</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_email_template_id>Email Template</field_email_template_id> - <field_language_id>Language</field_language_id> - <field_subject>Template Subject</field_subject> - <field_message_text>Text Message</field_message_text> - <field_message_html>HTML Message</field_message_html> -</translate> diff --git a/language/faq/english_faq.xml b/language/faq/english_faq.xml deleted file mode 100644 index 3078ebe0..00000000 --- a/language/faq/english_faq.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>faq</name> - - <!-- define the block title translations --> - <title_add>Add Page</title_add> - <title_view>View Pages</title_view> - <title_search>Search Pages</title_search> - - <!-- define the menu lable translations --> - <menu>FAQs</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <!-- define the field translations --> - <field_faq_category_id>Show in Category</field_faq_category_id> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Update</field_date_last> - <field_date_expire>Expiration Date</field_date_expire> - <field_status>Active?</field_status> - <field_name>Name</field_name> - <field_date_start>Start Date</field_date_start> - <field_sort_order>Display Sort Order</field_sort_order> - - - <!-- define any custom resources --> - <questions>Questions</questions> - <answers>Answers</answers> - <faqs>FAQ Categories</faqs> - <preview>Preview page</preview> - - <goup>Go up</goup> - <add_translation>Add a translations for this FAQ</add_translation> - <no_faqs> - Sorry, no FAQs were found in this category, or your account is not authorized for this category. - </no_faqs> - <faq_not_found> - Sorry, the requested page was not found, or you do not have the required level of authorization to view it. - </faq_not_found> - - <admin_no_match>No matches...</admin_no_match> - <admin_no_match_help>Submit at least a 4 character search...</admin_no_match_help> - - - -</translate> diff --git a/language/faq_category/english_faq_category.xml b/language/faq_category/english_faq_category.xml deleted file mode 100644 index 21a38365..00000000 --- a/language/faq_category/english_faq_category.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>faq_category</name> - - <!-- define the block title translations --> - <title_add>Add FAQ Category</title_add> - <title_view>View FAQ Categories</title_view> - - <!-- define the menu lable translations --> - <menu>Categories</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - - <!-- define the field translations --> - <field_sort_order>Sort Order</field_sort_order> - <field_date_orig>Date of Creation</field_date_orig> - <field_group_avail>Groups that can access this category</field_group_avail> - <field_name>Name of Category</field_name> - <field_description>Category Description</field_description> - <field_status>Active?</field_status> - - <!-- define any custom resources --> - <categories>Categories</categories> -</translate> diff --git a/language/faq_translate/english_faq_translate.xml b/language/faq_translate/english_faq_translate.xml deleted file mode 100644 index 92e4be70..00000000 --- a/language/faq_translate/english_faq_translate.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>faq_translate</name> - - <!-- define the block title translations --> - <title_add>Add Translation</title_add> - <title_view>View Translations</title_view> - <title_search>Search Translations</title_search> - - <!-- define the menu lable translations --> - <menu>Translation Administration</menu> - <menu_add>Add Translation</menu_add> - <menu_view>View Translations</menu_view> - <menu_search>Search Translations</menu_search> - - <!-- define the field translations --> - <field_id></field_id> - <field_site_id></field_site_id> - <field_date_orig>Date of Creation</field_date_orig> - <field_date_last></field_date_last> - <field_faq_id>FAQ</field_faq_id> - <field_language_id>Translation Language</field_language_id> - <field_answer>Answer</field_answer> - <field_question>Question</field_question> - - <!-- define the help text --> - <help_file> - This module allows you to view/edit/add translations into other languages for your Frequently Asked questions (and their answers).<br><br>Add Translation: add a new FAQ translation<br><br>View Translations: view all existing FAQ translations<br><br>Search Translations: search all existing FAQ translations - </help_file> - - <!-- define any custom resources --> - <view_all>View all translations for this FAQ </view_all> - <return>Return to main page view</return> - -</translate> diff --git a/language/host_provision_plugin/english_host_provision_plugin.xml b/language/host_provision_plugin/english_host_provision_plugin.xml deleted file mode 100644 index 3e59db79..00000000 --- a/language/host_provision_plugin/english_host_provision_plugin.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <!-- define any custom resources --> - <service>Service</service> - <enabled>Enabled?</enabled> - <options>Options</options> - <notes>Notes</notes> - <assoc_plan>Name of Associated Plan on Server - Required!</assoc_plan> - <!-- Ensim Windows and Linux --> - <bandwidth_threshold>Bandwidth Threshold, in bytes</bandwidth_threshold> - <bandwidth_rollover>Bandwidth Rollover Day of Month</bandwidth_rollover> - <backup>Backup Manager</backup> - <files>File Manager</files> - <analog>Analog Stats</analog> - <ipinfo_namebased>Hosting Type</ipinfo_namebased> - <diskquota>Disk Space Quota</diskquota> - <telnet>Telnet</telnet> - <ssh>SSH</ssh> - <imap>Imap</imap> - <bind>Bind</bind> - <anonftp>Anonymous FTP</anonftp> - <openssl>OpenSSL</openssl> - <ssi>SSI</ssi> - <weblogs>Weblogs</weblogs> - <vacation>Vacation Autoresponders</vacation> - <majordomo>Majordomo</majordomo> - <sqmail>Squirrel Mail</sqmail> - <frontpage>Frontpage</frontpage> - <mivamerchant>Mivamerchant</mivamerchant> - <maxusers>Maximum number of users</maxusers> - <odbc>ODBC</odbc> - <coldfusion>ColdFusion</coldfusion> - <perl>Perl</perl> - <php>PHP</php> - <mysql>MySQL</mysql> - <urchin>Urchin</urchin> - <msftpsvc>MS FTP Service</msftpsvc> - <cgi>CGI</cgi> - <sslc>SSL</sslc> - <w3svc>w3svc Service</w3svc> - <allowanonymous>Allow Anonymous FTP logins?</allowanonymous> - <logtype>Enable IIS Logging?</logtype> - <ftp_maxconnections>Maximum FTP connections</ftp_maxconnections> - <ftp_maxconnectionsunlimited>Allow Unlimited FTP connections?</ftp_maxconnectionsunlimited> - <enablebandwidthquota>Enable Bandwidth Quota?</enablebandwidthquota> - <cpuquota>Enable CPU Quota?</cpuquota> - <w3svc_maxconnections>w3svc service maximum connections</w3svc_maxconnections> - <w3svc_maxconnectionsunlimited>Allow Unlimited w3svc connections?</w3svc_maxconnectionsunlimited> - <serversize>Server Size</serversize> - <winmail>Enable Winmail service?</winmail> - <userforwards>Allow user forwards?</userforwards> - <autoresponder>Enable autoresponders</autoresponder> - <datadrive>Drive where data will be stored</datadrive> - <style_name>Color scheme to use</style_name> - <mailscanner>Mailscanner</mailscanner> - <mailscanner_in>Scan Incoming</mailscanner_in> - <mailscanner_out>Scan Outgoing</mailscanner_out> - <scriptsmgr>Scripts Manager</scriptsmgr> - <aspmgr>ASP Manager</aspmgr> - <logrotate>Rotate Logs</logrotate> - <vhbackup>Allow Backup</vhbackup> - <tomcat4>Tomcat 4</tomcat4> - <subdomain>Allow Subdomains</subdomain> - <sendmail>Sendmail</sendmail> - <proftpd>ProFTPd</proftpd> - <max_submdomain>Max Subdomains</max_submdomain> - <apache_jail>Apache Jail (high security)</apache_jail> - <spam_filter>Spam Filter</spam_filter> - <webalizer>Webalizer</webalizer> - <develenv>Development Environment</develenv> - <!-- WHM --> - <whm_plan>Enter the name of the WHM plan to grant this user</whm_plan> - <!-- Plesk 5,6,7 --> - <hst_type>Hosting Type</hst_type> - <space>Available disk space</space> - <max_box>Limit Mailboxes</max_box> - <boxquota>Mailbox quota limit</boxquota> - <max_redir>Limit Redirects</max_redir> - <max_mg>Limit mail groups</max_mg> - <max_aresp>Limit Mail autoresponders</max_aresp> - <max_wu>Limit web users</max_wu> - <max_db>Limit databases</max_db> - <traffic>Available bandwidth per month</traffic> - <keep_traf_stat>Months to keep traffic stats</keep_traf_stat> - <log_bysize>Rotate logs by size</log_bysize> - <log_max_num>Maximum number of log files</log_max_num> - <ssi>SSI Support</ssi> - <dns>DNS on?</dns> - <www>Allow WWW redirect</www> - <hosting>Hosting</hosting> - <fp>Frontpage support</fp> - <fp_ssl>Frontpage authorization</fp_ssl> - <fpauth>Frontpage SSL support</fpauth> - <cgi>CGI</cgi> - <perl>Perl</perl> - <asp>ASP</asp> - <err_docs>Error docs supported</err_docs> - <log_compress>Compress the logfiles</log_compress> - <wuscripts>Allow scripting</wuscripts> - <webmail>WebMail</webmail> - <ssl>SSL</ssl> - <shell>Available shells</shell> - <hard_quota>Hard disk quota (0 is unlimited)</hard_quota> - <disk_space>Available disk space</disk_space> - <mail_service>Mail service</mail_service> - <mbox_quota>Mailbox quota</mbox_quota> - <python>Python</python> - <webstat>Webalizer</webstat> - <max_resp>Available mail autoresponders</max_resp> - <max_subdom>Available Subdomains</max_subdom> - <max_maillists>Available mailing lists</max_maillists> - <max_webapps>Available web applications</max_webapps> -</translate> diff --git a/language/host_registrar_plugin/english_host_registrar_plugin.xml b/language/host_registrar_plugin/english_host_registrar_plugin.xml deleted file mode 100644 index e62f8449..00000000 --- a/language/host_registrar_plugin/english_host_registrar_plugin.xml +++ /dev/null @@ -1,63 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>host_registrar_plugin</name> - <!-- define the block title translations --> - <title_add>Install Plugin</title_add> - <title_view>Manage Registrar Plugins</title_view> - <!-- define the menu lable translations --> - <menu>Registrar Plugins</menu> - <menu_view>Configure</menu_view> - <!-- define the field translations --> - <field_status>Active?</field_status> - <field_name>Registrar Nickname</field_name> - <field_file>File Name</field_file> - <field_plugin_data/> - <!-- define the help text --> - <help_file> This module controls the settings for the registrar plugins </help_file> - <!-- define any custom resources --> - <install>Install Plugin</install> - <view>View / Edit Plugin</view> - <debug>Show Debug Details?</debug> - <primary_ns>Primary NameServer</primary_ns> - <secondary_ns>Secondary NameServer</secondary_ns> - <primary_nsip>Primary NameServer IP</primary_nsip> - <secondary_nsip>Secondary NameServer IP</secondary_nsip> - <!-- Total Registrations--> - <tr_partnerno>TotalRegistration Partner Number</tr_partnerno> - <tr_pass>TotalRegistration Password</tr_pass> - <!-- OpenSRS --> - <osrs_user>OpenSRS Username</osrs_user> - <osrs_testkey>Test Key</osrs_testkey> - <osrs_livekey>Live Key</osrs_livekey> - <osrs_enviroment>Live Mode?</osrs_enviroment> - <!-- Nominet --> - <nominet_tag>Nominet Tag</nominet_tag> - <pgp_emailto>E-mail to Forward to for PGP Encryption</pgp_emailto> - <!-- MelbourneIT --> - <melbourne_user>MelbourneIT Username</melbourne_user> - <melbourne_pass>MelbourneIT Password</melbourne_pass> - <melbourne_pgpemail>E-mail to forward requests to for PGP encryption</melbourne_pgpemail> - <melbourne_mode>Live Mode?</melbourne_mode> - <!-- Enom --> - <enom_user>Enom Username</enom_user> - <enom_pass>Enom Password</enom_pass> - <enom_mode>Live Mode?</enom_mode> - <!-- Manual --> - <manual_add_email>E-mail to notify of new registrations</manual_add_email> - <manual_renew_email>E-mail to notify of renewals</manual_renew_email> - <manual_transfer_email>E-mail to notify of transfers</manual_transfer_email> - <manual_park_email>E-mail to notify of renewals</manual_park_email> - <!-- BulkRegister --> - <br_user>BulkRegister Username</br_user> - <br_pass>BulkRegister Password</br_pass> - <br_pgpemail>E-mail to forward requests to for PGP encryption</br_pgpemail> - <br_mode>Live Mode?</br_mode> - <!-- Directi --> - <directi_user>Directi Username</directi_user> - <directi_pass>Directi Password</directi_pass> - <directi_mode>Live Mode?</directi_mode> - <!-- GoDaddy --> - <gd_user>GoDaddy Username</gd_user> - <gd_pass>GoDaddy Password</gd_pass> - <gd_mode>Live Mode?</gd_mode> -</translate> diff --git a/language/host_server/english_host_server.xml b/language/host_server/english_host_server.xml deleted file mode 100644 index e44194c3..00000000 --- a/language/host_server/english_host_server.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>host_server</name> - <!-- define the block title translations --> - <title_add>Add New Server</title_add> - <title_view>View Server</title_view> - <!-- define the menu lable translations --> - <menu>Hosting Setup</menu> - <menu_add>Add Server</menu_add> - <menu_view>List Servers</menu_view> - <!-- define the field translations --> - <field_status>Active?</field_status> - <field_debug>Show Debug Results?</field_debug> - <field_name>Server Nickname</field_name> - <field_notes>Server Notes</field_notes> - <field_email_template_id>Email Template</field_email_template_id> - <field_provision_plugin>Provisioning Plugin</field_provision_plugin> - <field_provision_plugin_data/> - <field_max_accounts>Maximum Accounts</field_max_accounts> - <field_next_host_server_id>Next Server (when this one is full)</field_next_host_server_id> - <field_name_based>Allow Name Based Accounts?</field_name_based> - <field_name_based_ip>IP For Name Based Accounts</field_name_based_ip> - <field_ip_based>Allow IP Based Accounts?</field_ip_based> - <field_ip_based_ip>IP List (separate w/new line)</field_ip_based_ip> - <field_keycode>Security Keycode</field_keycode> - <!-- define any custom resources --> - <ftp>FTP Method (recommended)</ftp> - <http>HTTP Method</http> - <connection_mode>Connection Mode</connection_mode> - <host>Host Name</host> - <path>File Path</path> - <username>Remote Username</username> - <password>Remote Password</password> - <email>Email to notify for required changes</email> -</translate> diff --git a/language/host_tld/english_host_tld.xml b/language/host_tld/english_host_tld.xml deleted file mode 100644 index fb26d7ed..00000000 --- a/language/host_tld/english_host_tld.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>host_tld</name> - <!-- define the block title translations --> - <title_add>Add New TLD</title_add> - <title_view>View All TLDs</title_view> - <!-- define the menu lable translations --> - <menu>TLD Setup</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_status>Accepted?</field_status> - <field_name>Extension Name</field_name> - <field_taxable>Taxable</field_taxable> - <field_whois_plugin>Whois Plugin</field_whois_plugin> - <field_whois_plugin_data/> - <field_registrar_plugin_id>Registrar Plugin</field_registrar_plugin_id> - <field_registrar_plugin_data/> - <field_auto_search>Auto Search?</field_auto_search> - <field_default_term_new>Default Registration Length (years)</field_default_term_new> - <field_price_group>Group Pricing Schedule</field_price_group> - <!-- define any custom resources --> - <parking>Offer domain parking for this TLD?</parking> - <year1>Offer 1 year purchase options for this TLD?</year1> - <year2>Offer 2 year purchase options for this TLD?</year2> - <year3>Offer 3 year purchase options for this TLD?</year3> - <year4>Offer 4 year purchase options for this TLD?</year4> - <year5>Offer 5 year purchase options for this TLD?</year5> - <year6>Offer 6 year purchase options for this TLD?</year6> - <year7>Offer 7 year purchase options for this TLD?</year7> - <year8>Offer 8 year purchase options for this TLD?</year8> - <year9>Offer 9 year purchase options for this TLD?</year9> - <year10>Offer 10 year purchase options for this TLD?</year10> - <ns_transfer_instructions> Please enter the domain name and extension below </ns_transfer_instructions> - <register_instructions> Please enter the name and select an extension below </register_instructions> - <register_instructions_s> Please enter the desired domain name and select an extension above </register_instructions_s> - <searching>Checking domain availibility, please hold....</searching> - <domain_unavail>The specified domain is invalid or not available, please try another...</domain_unavail> - <domain_avail>Congratulations! The domain is available, you can purchase this hosting plan now.</domain_avail> - <domain_avail_s>Congratulations! The domain is available, you can purchase it now.</domain_avail_s> - <transfer_searching>Checking if domain can be transferred, please hold....</transfer_searching> - <transfer_unavail> The specified domain is invalid, unregistered, or unsupported by our - registrar, please try another domain or select the "update nameserver" option above - instead...</transfer_unavail> - <transfer_avail> Congratulations! The domain can be transferred to our registrar, you may now - purchase this hosting plan. </transfer_avail> - <transfer_avail_s> Congratulations! The domain can be transferred to our registrar, you may now - continue the transfer. </transfer_avail_s> - <transfer_cart>Complete Domain Transfer</transfer_cart> - <register_cart>Register this domain name</register_cart> - <park_cart>Park this domain name</park_cart> - <domain_register>Register or Park a new domain</domain_register> - <domain_transfer>Transfer an existing domain</domain_transfer> - <suggest_available>Available!</suggest_available> - <suggest_reserved>Reserved</suggest_reserved> - <suggest_searching>Searching...</suggest_searching> - <suggest_purchase>Continue with Purchase</suggest_purchase> - <suggest_other>Show More Domain Suggestions</suggest_other> - <suggest_heading>Suggest Domains</suggest_heading> - <suggest_select>Please make your selection(s) from the list above then press continue</suggest_select> - <search_mass>Bulk Domain Registration Form</search_mass> - <search_mass_header>Bulk Domain Registration Form</search_mass_header> - <search_mass_instructions><![CDATA[ - Please enter the list of domains to search on the left, separated by a new line. - <BR><BR> - <u>Example:</u> - <BR><BR> - domain123.com<BR> - domain345.net<BR> - domain456.org<BR> - ]]></search_mass_instructions> - <search_mass_err_tld>The TLD %%tld%% is not accepted and the domain %%domain%% has been removed.</search_mass_err_tld> - <search_mass_err_dom>The domain %%domain%% is not available and has been removed.</search_mass_err_dom> -</translate> diff --git a/language/host_whois_plugin/english_host_whois_plugin.xml b/language/host_whois_plugin/english_host_whois_plugin.xml deleted file mode 100644 index c5dedb13..00000000 --- a/language/host_whois_plugin/english_host_whois_plugin.xml +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>host_whois_plugin</name> - <!-- define any custom resources --> - <whois_server>Whois Server (eg: whios.networksolutions.com)</whois_server> - <avail_response>Available Response String (eg: AVAIL, NOT TAKEN, etc)</avail_response> -</translate> diff --git a/language/invoice/english_invoice.xml b/language/invoice/english_invoice.xml deleted file mode 100644 index 41829609..00000000 --- a/language/invoice/english_invoice.xml +++ /dev/null @@ -1,147 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>invoice</name> - <!-- define the block title translations --> - <title_add>Add Invoice</title_add> - <title_view>Invoice Number </title_view> - <title_search>Search Invoices</title_search> - <title_reconcile>Reconcile Invoice Number</title_reconcile> - <title_refund>Refund Invoice Number</title_refund> - - <!-- define the menu lable translations --> - <menu>Invoices</menu> - <overview>Statistics</overview> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_invoicesoon>Invoice Soon</menu_invoicesoon> - - <!-- define the field translations --> - <field_id>Invoice Number</field_id> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Last Updated</field_date_last> - <field_process_status>Approved?</field_process_status> - <field_billing_status>Balance Due</field_billing_status> - <field_refund_status>Refunded?</field_refund_status> - <field_print_status>Printed?</field_print_status> - <field_account_id>Account</field_account_id> - <field_account_billing_id>Billing Details</field_account_billing_id> - <field_affiliate_id>Affiliate ID</field_affiliate_id> - <field_campaign_id>Campaign</field_campaign_id> - <field_reseller_id>Reseller</field_reseller_id> - <field_checkout_plugin_id>Checkout Plugin</field_checkout_plugin_id> - <field_checkout_plugin_data>Gateway Response</field_checkout_plugin_data> - <field_tax_id>Tax Zone</field_tax_id> - <field_tax_amt>Tax Amount</field_tax_amt> - <field_discount_arr>Discount(s)</field_discount_arr> - <field_discount_amt>Discount Amount</field_discount_amt> - <field_total_amt>Invoice Total</field_total_amt> - <field_billed_amt>Billed Amount</field_billed_amt> - <field_billed_currency_id>Billing Currency</field_billed_currency_id> - <field_actual_billed_amt>Actual Billed Amount</field_actual_billed_amt> - <field_actual_billed_currency_id>Actual Billing Currency</field_actual_billed_currency_id> - <field_notice_count>Due Notices Sent</field_notice_count> - <field_notice_max>Max Due Notices</field_notice_max> - <field_notice_next_date>Next Notice Date</field_notice_next_date> - <field_grace_period>Grace Period (days)</field_grace_period> - <field_due_date>Due Date</field_due_date> - <field_suspend_billing>Suspend Billing Activity?</field_suspend_billing> - <!-- define the help text --> - <help_file> This module controls the invoicing </help_file> - <!-- define any custom resources --> - <statistics_new_invoices>New Invoices Created: %%count%%</statistics_new_invoices> - <affiliate_commissions>Affiliate Commissions</affiliate_commissions> - <products_ordered>Products/Services Ordered</products_ordered> - <print_invoice>View Printer Friendly Version</print_invoice> - <pay_invoice>Select Your Preferred Payment Option</pay_invoice> - <sales>Sales</sales> - <forcast>Forecast</forcast> - <quota>Quota</quota> - <arcredits>AR Credits</arcredits> - <arbalance>AR Balance</arbalance> - <users>Users</users> - <affiliatesales>Affiliate Sales</affiliatesales> - <indicator>Indicator</indicator> - <period>Period</period> - <current>Current</current> - <previous>Previous</previous> - <change>Change</change> - <thisyear>This Year</thisyear> - <thismonth>This Month</thismonth> - <thisweek>This Week</thisweek> - <lastyear>Last Year</lastyear> - <lastmonth>Last Month</lastmonth> - <lastweek>Last Week</lastweek> - <today>Today</today> - <vs>vs</vs> - <weekly>Weekly</weekly> - <monthly>Monthly</monthly> - <yearly>Yearly</yearly> - <pay_amt>Payment Amount</pay_amt> - <ref_amt>Refund Amount</ref_amt> - <memo>Memo</memo> - <ref_comp>Invoice Refund Completed</ref_comp> - <rec_comp>Invoice Reconciliation Completed</rec_comp> - <rec_over>Customer overpaid by %%amt%%, please create a discount or apply this amount to another invoice to balance this customer to balance the account.</rec_over> - <add_discount>Discount User</add_discount> - <add_view_items>View Items</add_view_items> - <add_finalize>Finalize Invoice</add_finalize> - <search_result_amount><![CDATA[The total amount of the Invoices dispayed on this page is <u>%%amount%%</u>.]]></search_result_amount> - <bill_force>Attempt Billing Now</bill_force> - - <search_memo>Memo Text</search_memo> - <thank_you>Thank You!</thank_you> - <invoice_link>Click here to review your order details...</invoice_link> - <account_link>Click here to return to your account center...</account_link> - <thank_you_text><![CDATA[ -<p>We want to take this opportunity to thank you for your purchase! <br/><br/> -Please stick around a while and explore the rest of our product line while you are on our site! </p> -<p><a href="?_page=product:cat">We have so much to offer you... click here for more of our products and services. </a></p> -]]></thank_you_text> - <add_product>Select SKU of Product to add</add_product> - <add_domain>Add a Domain to Invoice</add_domain> - <add_ad_hoc>Add ad hoc item to Invioce</add_ad_hoc> - <recur_date_range>Billing Period: %%start%% - %%stop%%</recur_date_range> - <billing_pending>Pending Billing</billing_pending> - <paid>Paid in full</paid> - <due_invoices_notice><![CDATA[ -<p>You presently have unpaid invoices totaling <b>%%total%%</b>. </p> -<p>To pay all unpaid invoices now, please <a href="?_page=invoice:checkout_multiple"><b>CLICK HERE</b></a>.</p> -<p>To select the invoices you wish to pay, please <a href="?_page=core:user_search&module=invoice&_next_page=user_search_show&invoice_refund_status=0&invoice_billing_status=0&_next_page_one=user_view">CLICK HERE</>.</p> - ]]></due_invoices_notice> - <due_invoices_pay><![CDATA[ -<p>The selected invoices total <b>%%total%%</b>. </p> -<p>To make payment, please select a payment option below.</p> - ]]></due_invoices_pay> - <pay_selected>Pay Selected Invoices</pay_selected> - - <title_items>Items Purchased</title_items> - <title_billing>Billing Details</title_billing> - <title_service>Services</title_service> - <title_affiliate><![CDATA[Affiliate & Campaign Details]]></title_affiliate> - <title_memo>Memos</title_memo> - - <jump_pdf>Print Invoice</jump_pdf> - <jump_bill_force>Attempt Auto-billing Now</jump_bill_force> - <jump_refund>Refund Invoice</jump_refund> - <jump_reconcile>Reconcile Invoice</jump_reconcile> - <jump_void><![CDATA[Void Invoice & Services]]></jump_void> - <jump_approve><![CDATA[Approve Invoice & Services]]></jump_approve> - - <pdf_discounts>DISCOUNTS</pdf_discounts> - <pdf_total>TOTAL</pdf_total> - <pdf_paid>PAID</pdf_paid> - <pdf_due>DUE</pdf_due> - <pdf_date_due>DATE DUE</pdf_date_due> - <pdf_payment_status>PAYMENT STATUS</pdf_payment_status> - <pdf_invoice_number>INVOICE NUMBER</pdf_invoice_number> - <pdf_page>PAGE</pdf_page> - <pdf_date>DATE</pdf_date> - <pdf_invoice>INVOICE</pdf_invoice> - <pdf_sku_no>SKU NO</pdf_sku_no> - <pdf_description>DESCRIPTION</pdf_description> - <pdf_qty>QTY</pdf_qty> - <pdf_unit_cost>UNIT COST</pdf_unit_cost> - <pdf_total_cost>TOTAL COST</pdf_total_cost> - <pdf_tax>TAX</pdf_tax> -</translate> diff --git a/language/invoice_commission/english_invoice_commission.xml b/language/invoice_commission/english_invoice_commission.xml deleted file mode 100644 index 03f30eb8..00000000 --- a/language/invoice_commission/english_invoice_commission.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>invoice_commission</name> -</translate> diff --git a/language/invoice_item/english_invoice_item.xml b/language/invoice_item/english_invoice_item.xml deleted file mode 100644 index c10401c3..00000000 --- a/language/invoice_item/english_invoice_item.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>invoice_item</name> - <!-- define the menu lable translations --> - <menu>Invoice Items</menu> - <!-- define the field translations --> - <field_sku>SKU</field_sku> - <field_item_type>Item Type</field_item_type> - <field_product_attr>Product Attributes</field_product_attr> - <field_price_base>Base Price</field_price_base> - <field_price_setup>Setup Price</field_price_setup> - <field_recurring_schedule>Recurring Schedule</field_recurring_schedule> - <field_domain_name>Domain Name</field_domain_name> - <field_domain_term>Domain Term</field_domain_term> - <field_domain_type>Domain Type</field_domain_type> - <!-- define any custom resources --> -</translate> diff --git a/language/invoice_memo/english_invoice_memo.xml b/language/invoice_memo/english_invoice_memo.xml deleted file mode 100644 index 2b1d2730..00000000 --- a/language/invoice_memo/english_invoice_memo.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>invoice_memo</name> - <!-- define the block title translations --> - <title_add>Add Memo</title_add> - <title_view>View Memo</title_view> - <title_search>Search Memos</title_search> - <!-- define the menu lable translations --> - <menu>Invoice Memos</menu> - <menu_add>Add Memo</menu_add> - <menu_view>View Memos</menu_view> - <menu_search>Search Memos</menu_search> - <!-- define the field translations --> - <field_date_orig>Date</field_date_orig> - <field_invoice_id>Invoice Number</field_invoice_id> - <field_account_id>Account</field_account_id> - <field_type>Memo Type</field_type> - <field_memo>Memo</field_memo> - <field_misc>Misc</field_misc> - <!-- define any custom resources --> - <system>System</system> - <admin>Staff/Admin Memo</admin> - <postback>Payment Postback</postback> - <approval>Invoice Approval</approval> - <void>Invoice Voided</void> - <reconcile>Invoice Reconciled</reconcile> - <refund>Invoice Refunded</refund> - <usercancel>User Canceled</usercancel> -</translate> diff --git a/language/license/english_license.xml b/language/license/english_license.xml deleted file mode 100644 index 578d3d98..00000000 --- a/language/license/english_license.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>license</name> - <!-- define the block title translations --> - <title_add>Add License</title_add> - <title_view>View License</title_view> - <title_search>Search</title_search> - <!-- define the menu lable translations --> - <menu>Licensing</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Last Modified</field_date_last> - <field_date_expire>Expiry Date</field_date_expire> - <field_date_perm>Permanant License Date</field_date_perm> - <field_account_id>Account</field_account_id> - <field_invoice_id>Invoice No.</field_invoice_id> - <field_license_key>License Key</field_license_key> - <field_license_code>License Code</field_license_code> - <field_status>Permanent Status</field_status> - <field_type>License Type</field_type> - <field_term>Trial/Temporary Term (days)</field_term> - <field_domain>Domain Authorized</field_domain> - <field_ip>IP Authorized</field_ip> - <field_change_domain>Domain Change Requested</field_change_domain> - <field_change_ip>IP Change Requested</field_change_ip> - <field_change_status>Change Status</field_change_status> - <!-- define any custom resources --> -</translate> diff --git a/language/messages.header b/language/messages.header deleted file mode 100644 index e1c97077..00000000 --- a/language/messages.header +++ /dev/null @@ -1,15 +0,0 @@ -# phpLDAPadmim -# - -msgid "" -msgstr "" -"Project-Id-Version: Open Source Billing Messages\n" -"Report-Msgid-Bugs-To: nobody@example.com\n" -"POT-Creation-Date: 2009-11-15 17:45+0200\n" -"PO-Revision-Date: 2009-11-15 17:45+0200\n" -"Last-Translator: PUT YOUR NAME <myname@example.com>\n" -"Language-Team: <nobody@example.com>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - diff --git a/language/module/english_module.xml b/language/module/english_module.xml deleted file mode 100644 index ddd8b2e5..00000000 --- a/language/module/english_module.xml +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>Module</name> - <title_add>Add a new Module record</title_add> - <title_view>View/Edit Module</title_view> - <title_search>Search for a specific Module record</title_search> - <title_install>Install New Module</title_install> - <title_upgrade>Database and Method Consistancy Check</title_upgrade> - <menu>Modules</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_install>Install</menu_install> - <menu_admin_add>Add</menu_admin_add> - <menu_admin_list>List</menu_admin_list> - <menu_admin_search>Search</menu_admin_search> - <menu_dev_add>Development</menu_dev_add> - <menu_dev_install_gen>Generate Install Files</menu_dev_install_gen> - <menu_translate>Translate Modules</menu_translate> - <menu_upgrade>Upgrade</menu_upgrade> - <field_name>Name</field_name> - <field_notes>Notes</field_notes> - <field_status>Module Installed?</field_status> - <field_menu_display>Show In Modules Menu?</field_menu_display> - <field_parent_id>Display as child of module</field_parent_id> - <field_date_orig>Date of creation</field_date_orig> - <field_date_last>Date of last update</field_date_last> - <!-- define the menu objects --> - <install_name>Module Name</install_name> - <install_group>Authorized Groups</install_group> - <install_sub_module_err>Unable to install required sub-module %%sub_module%%</install_sub_module_err> - <install_failed>The Module Installation Failed!</install_failed> - <install_enter_name>You must enter a module name</install_enter_name> - <install_select_group>You must select at least one group to be authorized for this module</install_select_group> - <install_module_exists>This module already exists in the database</install_module_exists> - <install_missing_dir>The specified module directory does not exist</install_missing_dir> - <install_missing_class>The specified module class file does not exist</install_missing_class> - <install_missing_construct>The specified module construct file does not exist</install_missing_construct> - <install_missing_install>The specified module installation file does not exist</install_missing_install> - <install_module_depend>This module already requires that the %%$depend%% module be installed - first</install_module_depend> - <install_install_complete>The module installation has completed!</install_install_complete> - - <uninstall>Uninstall Module</uninstall> - <module_installed>Install Complete</module_installed> - <view_methods>View all methods for this module</view_methods> - <add_methods>Add a method for this module</add_methods> - <upgrademodules>Select all modules to check for upgrades</upgrademodules> - <default_groups>Select a default group to add any new methods to</default_groups> - - <consistancy_file>Version and File Consistancy Check</consistancy_file> - <current_version>Latest Version</current_version> - <current_ab_version>Your Installation Version</current_ab_version> - <encoding_version>Your Encoding Version</encoding_version> - <optional_modules>Your Optional Modules Installed</optional_modules> - <consistancy_submit>Check file consistancy</consistancy_submit> - - <modified_files>Modified Files:</modified_files> - <missing_files>Missing Files:</missing_files> - <no_modified_files>No modified files.</no_modified_files> - <no_missing_files>No missing files.</no_missing_files> - <mis_files_count>%%mis%% file(s) are missing from your current installation.</mis_files_count> - <md5_files_count>%%md5%% files(s) are corrupt or modified in your current installation.</md5_files_count> - -</translate> diff --git a/language/module_method/english_module_method.xml b/language/module_method/english_module_method.xml deleted file mode 100644 index 80d53178..00000000 --- a/language/module_method/english_module_method.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>module_method</name> - <!-- define the block title translations --> - <title_add>Add a Method</title_add> - <title_update>Update Method</title_update> - <title_view>View Methods</title_view> - <title_search>Search Methods</title_search> - <!-- define the menu lable translations --> - <menu>Methods</menu> - <menu_add>Add</menu_add> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_module_id>Module Name</field_module_id> - <field_name>Method Name</field_name> - <field_notes>Notes</field_notes> - <field_page>Menu Page Link</field_page> - <field_menu_display>Display In Menu?</field_menu_display> - <!-- define any custom resources --> - <authorized>Add to Group?</authorized> - <update_relation>Update Group Authorizations</update_relation> - <delete_all>Delete All Methods for this Group</delete_all> - <group_back>Go Back to Group Details</group_back> - <note_inherit>Note - Checkboxes that are greyed out indicate inheritance from parent - groups</note_inherit> -</translate> diff --git a/language/net_term/english_net_term.xml b/language/net_term/english_net_term.xml deleted file mode 100644 index 6333295a..00000000 --- a/language/net_term/english_net_term.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add Net Terms</title_add> - <title_view>View Net Terms</title_view> - - <menu>Net Terms</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - - <field_status>Enabled?</field_status> - <field_group_avail>Available to Groups</field_group_avail> - <field_checkout_id>Limit to Checkout Plugin</field_checkout_id> - <field_name>Name</field_name> - <field_fee_type>Fee Type</field_fee_type> - <field_fee>Late Fee</field_fee> - <field_fee_day>Late Fee Start Day</field_fee_day> - <field_terms>Terms (eg: 15,30,90)</field_terms> - <field_suspend_day>Suspend Day</field_suspend_day> - <field_enable_emails>Enable E-mails?</field_enable_emails> - <field_sweep_type>Charge Sweep Type</field_sweep_type> -</translate> diff --git a/language/newsletter/english_newsletter.xml b/language/newsletter/english_newsletter.xml deleted file mode 100644 index 3401e571..00000000 --- a/language/newsletter/english_newsletter.xml +++ /dev/null @@ -1,67 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>newsletter</name> - <!-- define the block title translations --> - <title_add>Add Newsletter</title_add> - <title_view>View Newsletters</title_view> - <title_search>Search Newsletters</title_search> - <!-- define the menu lable translations --> - <menu>Newsletters</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_send>Send</menu_send> - <overview>Statistics</overview> - <!-- define the field translations --> - <field_group_avail>Available to Group(s)</field_group_avail> - <field_name>Newsletter Name</field_name> - <field_description>Description</field_description> - <field_notes>Notes</field_notes> - <field_active>Active?</field_active> - <field_display_signup>Display at Signup?</field_display_signup> - <!-- define any custom resources --> - <view_subscribers>View all subscribers of this newsletter</view_subscribers> - <send_newsletters>Send To Newsletter Subscribers</send_newsletters> - <send_from_email>Send Using Email Setup</send_from_email> - <send_subject>Message Subject</send_subject> - <send_body_text>Message Body, Text Version</send_body_text> - <send_body_html>Message Body, HTML Version</send_body_html> - <send_high_priority>Set as High Priority?</send_high_priority> - <send_test>Test Only?</send_test> - <send_alert_message>You must enter a subject for the message!</send_alert_message> - <send_alert_body_text>You must enter the text body for the message!</send_alert_body_text> - <send_alert_body_html>You must enter the html body for the message!</send_alert_body_html> - <send_alert_fail>Could not send the newsletter!</send_alert_fail> - <send_alert_success>The newsletter mailing has been completed!</send_alert_success> - <send_alert_no_results>No subscribers found for the selected newsletters(s)</send_alert_no_results> - <send_alert_success>The selected newsletters have been sent</send_alert_success> - <submit_subscribe>Subscribe Now</submit_subscribe> - <submit_unsubscribe>Unsubscribe Now</submit_unsubscribe> - <subscribe_newsletters>Select newsletters to receive:</subscribe_newsletters> - <subscribe_name_req>You must enter your name, please go back and fill in your name.</subscribe_name_req> - <subscribe_newsletter_req>You must select at least one newsletter to subscribe to.</subscribe_newsletter_req> - <subscribe_email_req>You must enter a valid email address, please go back and correct this.</subscribe_email_req> - <subscribe_spam_limit>You have already submitted a request within the last %limit% seconds, - please wait before you try again.</subscribe_spam_limit> - <subscribe_confirm> Thank you for subscribing! Futher action on your part is required; we have - sent an email to the address you provided requesting your confirmation. Once you confirm as - explained in your email, no further action on your part will be required. </subscribe_confirm> - <subscribe_confirm_fail> The confirmation link you followed is older than 72 hours and has - expired, or has been malformed by your email reader and therefore does not work. Please - check that the full link shown in your email reader has displayed in browser address bar, or - you can start the newsletter subscription process again by clicking "Submit" below: %here%. </subscribe_confirm_fail> - <subscribe_confirm_success> We have confirmed your email, and you have been subscribed for the - selected newsletters. Any newsletter emails you recieve in the future will have a link for - removing yourself from the newsletters you are currently subscribed to. </subscribe_confirm_success> - <subscribe_subj>Newsletter Confirmation Required</subscribe_subj> - <subscribe_body>Hello %name%, To confirm your newsletter subscription, you will need to click - the link below. Once you do this no further action on your part will be required. Click: - %confirm_url% If the text above does not show up as a link in your browser, you can paste it - to your browser. Thank you, %site_name%</subscribe_body> - <unsubscribe_newsletters> The form above allows you to subscribe to our newsletters, and the - form below is for removing any current newsletter subscriptions that you no longer wish to - receive. </unsubscribe_newsletters> - <unsubscribe_newsletter>Select newsletters to unsubscribe</unsubscribe_newsletter> - <unsubscribe_success>You have been unsubscribed from the selected - newsletters</unsubscribe_success> -</translate> diff --git a/language/newsletter_subscriber/english_newsletter_subscriber.xml b/language/newsletter_subscriber/english_newsletter_subscriber.xml deleted file mode 100644 index 4650be99..00000000 --- a/language/newsletter_subscriber/english_newsletter_subscriber.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>newsletter_subscriber</name> - <!-- define the block title translations --> - <title_add>Add Newsletter Subscriber</title_add> - <title_view>View Newsletter Subscribers</title_view> - <title_search>Search Newsletter Subscriber</title_search> - <!-- define the menu lable translations --> - <menu>Subscribers</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_newsletter_id>Newsletter</field_newsletter_id> - <field_email>Email Address</field_email> - <field_html>HTML Email Accepted?</field_html> - <field_first_name>First Name</field_first_name> - <field_last_name>Last Name</field_last_name> - <!-- define any custom resources --> - <statistics>Active Newsletter Subscribers: %%count%%</statistics> -</translate> diff --git a/language/product/english_product.xml b/language/product/english_product.xml deleted file mode 100644 index 35659f1f..00000000 --- a/language/product/english_product.xml +++ /dev/null @@ -1,116 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>product</name> - <!-- define the block title translations --> - <title_add>Add New Product</title_add> - <title_view>View Product</title_view> - <title_search>Search All Products</title_search> - <!-- define the menu lable translations --> - <menu>Products</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Last Update</field_date_last> - <field_sku>Product SKU</field_sku> - <field_taxable>Taxable?</field_taxable> - <field_active>Active?</field_active> - <field_position>Position/Ranking</field_position> - <field_cart_multiple>User can add to cart multiple times for one purchase?</field_cart_multiple> - <field_group_avail>Available to Group(s)</field_group_avail> - <field_avail_category_id>Display in Category(s)</field_avail_category_id> - <field_discount>Automatically Generate Discount Code When This Product Is Ordered?</field_discount> - <field_discount_amount>Discount Amount to Create</field_discount_amount> - <field_price_type>Pricing Structure</field_price_type> - <field_price_base>Base Price</field_price_base> - <field_price_setup>Setup Price</field_price_setup> - <field_price_group>Group Pricing Structure</field_price_group> - <field_price_recurr_type>Recurring Billing Schedule</field_price_recurr_type> - <field_price_recurr_weekday>Day of Month to Bill</field_price_recurr_weekday> - <field_price_recurr_week>Week Number</field_price_recurr_week> - <field_price_recurr_schedule>Allow Change of Billing Schedule?</field_price_recurr_schedule> - <field_price_recurr_cancel>Allow Cancelation of Service?</field_price_recurr_cancel> - <field_price_trial_length_type>Trial Period Type</field_price_trial_length_type> - <field_price_trial_length>Trial Length</field_price_trial_length> - <field_price_trial_prod>Trial For Product</field_price_trial_prod> - <field_assoc_req_prod>Product(s) Required for Access to This Product</field_assoc_req_prod> - <field_assoc_req_prod_type>Match Type for Required Products</field_assoc_req_prod_type> - <field_assoc_grant_prod>Purchasing This Product Grants Access to the Following Product(s)</field_assoc_grant_prod> - <field_assoc_grant_group>Purchasing This Product Grants Access to the Following Group(s)</field_assoc_grant_group> - <field_assoc_grant_group_type>Type of Group Access Granted</field_assoc_grant_group_type> - <field_assoc_grant_group_days>Grant access to the selected group(s) for X days</field_assoc_grant_group_days> - <field_thumbnail>Product Thumbnail</field_thumbnail> - <field_price_recurr_default>Default Billing Schedule</field_price_recurr_default> - <field_host>Set up a hosting account when this product is ordered?</field_host> - <field_host_server_id>Target Server</field_host_server_id> - <field_host_allow_domain>Allow Domain Purchases with this Hosting Plan?</field_host_allow_domain> - <field_host_allow_host_only>Allow Purchases without a domain?</field_host_allow_host_only> - <field_host_discount_tld>Discount the following TLDs</field_host_discount_tld> - <field_host_discount_tld_amount>Domain Purchase Discount Amount</field_host_discount_tld_amount> - <field_price_recurr_modify>Allow Modification of Service?</field_price_recurr_modify> - <field_modify_waive_setup>Waive setup fee when modifying service?</field_modify_waive_setup> - <!-- define any custom resources --> - <setup>Setup</setup> - <domain_options>Domain Transfer / Registrations Options</domain_options> - <domain_register>Register new domain name</domain_register> - <domain_transfer>Transfer existing domain name</domain_transfer> - <domain_ns_transfer>I will use an existing domain name and update my nameservers only.</domain_ns_transfer> - <domain_ip>All I need is an IP based hosting plan.</domain_ip> - <user_options>Options Available to Subscribers</user_options> - <price_type_one>One-time Charge</price_type_one> - <price_type_recurr>Recurring Membership/Subscription</price_type_recurr> - <price_type_trial>Trial for Membership/Subscription</price_type_trial> - <recurr_type_aniv>Bill on Aniversary Date of Subscription</recurr_type_aniv> - <recurr_type_fixed>Bill on Fixed Schedule</recurr_type_fixed> - <weekly>Offer weekly billing schedule for this product?</weekly> - <monthly>Offer monthly billing schedule for this product?</monthly> - <quarterly>Offer quarterly billing schedule for this product?</quarterly> - <semianually>Offer semi-annual billing schedule for this product?</semianually> - <anually>Offer annual billing schedule for this product?</anually> - <twoyear>Offer two-year billing schedule for this product?</twoyear> - <threeyear>Offer three-year billing schedule for this product?</threeyear> - <recurr_week>Weekly Billing Schedule</recurr_week> - <recurr_month>Monthly Billing Schedule</recurr_month> - <recurr_quarter>Quarterly Billing Schedule</recurr_quarter> - <recurr_semianual>Semi-annual Billing Schedule</recurr_semianual> - <recurr_anual>Annual Billing Schedule</recurr_anual> - <recurr_twoyear>Two-year Billing Schedule</recurr_twoyear> - <recurr_threeyear>Three-year Billing Schedule</recurr_threeyear> - <assoc_req_all>Require All Selected Products</assoc_req_all> - <assoc_req_one>Require Any One Selected Product</assoc_req_one> - <assoc_group_limited>Grant access for specified amount of days:</assoc_group_limited> - <assoc_group_subscription>Grant access while associated subscription is active</assoc_group_subscription> - <assoc_group_forever>Grant access forerver</assoc_group_forever> - <tld_discount_desc>(example: 0.10 = 10%)</tld_discount_desc> - <trial_desc> This product is a trial for SKU %%sku%%, which can be viewed in detail here: </trial_desc> - <trial_bill_desc> If you wish to cancel prior to the trial expiring, you may do so and you will not - be billed for SKU %%sku2%%. </trial_bill_desc> - <trial_length_days> This trial will last for %%length%% days before it expires and you are - billed for the full cost of SKU %%sku1%%. </trial_length_days> - <trial_length_months> This trial will last for %%length%% months before it expires and you are - billed for the full cost of SKU %%sku1%%. </trial_length_months> - <trial_length_weeks> This trial will last for %%length%% weeks before it expires and you are - billed for the full cost of SKU %%sku1%%. </trial_length_weeks> - <host_domain_opt>You must choose a 'Domain Transfer / Registration Option' to continue.</host_domain_opt> - <host_domain_inv>You must select a valid domain name to continue.</host_domain_inv> - <graph_top>Top Product Sales</graph_top> - <cart>Add to Cart</cart> - <checkout>Add to Cart and Checkout</checkout> - <manage_images>Manage Images</manage_images> - <attributes>Attributes</attributes> - <advanced_billing>Advanced Billing</advanced_billing> - <associations>Associations</associations> - <discounts>Discounts</discounts> - <hosting>Hosting</hosting> - <product_plugins>Product Plugins</product_plugins> - <link>Link</link> - <clone>Clone</clone> - <clone_error>Please enter a unique SKU for the newly cloned product</clone_error> - <clone_success>The product has been cloned, click here to view it now</clone_success> - <wizard_finalize_purchase>Finalize Purchase</wizard_finalize_purchase> - <wizard_login>Login and review purchase</wizard_login> - <wizard_checkout_login>Login to existing client account</wizard_checkout_login> - <wizard_checkout_register>Register for new client account</wizard_checkout_register> - <wizard_checkout>Proceed to checkout</wizard_checkout> -</translate> diff --git a/language/product_attr/english_product_attr.xml b/language/product_attr/english_product_attr.xml deleted file mode 100644 index 2ab79a22..00000000 --- a/language/product_attr/english_product_attr.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>product_attr</name> - <!-- define the block title translations --> - <title_add>Add New Product Attribute</title_add> - <title_delete>Delete This Attribute</title_delete> - <!-- define the field translations --> - <field_name>Name</field_name> - <field_description>Description</field_description> - <field_type>Type</field_type> - <field_collect_type>Attribute Input Type</field_collect_type> - <field_collect_default>Default Input Value</field_collect_default> - <field_price_base>Base Price</field_price_base> - <field_price_setup>Setup Price</field_price_setup> - <field_price_group>Group Pricing Schedule</field_price_group> - <!-- define any custom resources --> - <type_checkbox>Checkbox (yes/no)</type_checkbox> - <type_text>Text Input Field</type_text> - <type_menu>Multiple Choice Menu</type_menu> - <type_textarea>Textarea Input Field</type_textarea> - <input_req>User input required to add product to cart</input_req> -</translate> diff --git a/language/product_cat_translate/english_product_cat_translate.xml b/language/product_cat_translate/english_product_cat_translate.xml deleted file mode 100644 index e82878e2..00000000 --- a/language/product_cat_translate/english_product_cat_translate.xml +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>product_cat_translate</name> - <!-- define the block title translations --> - <title_add>Add Product Category Translation</title_add> - <title_view>Edit Product Category Translation</title_view> - <!-- define the menu lable translations --> - <menu>Product Category Translations</menu> - <menu_add>Add Category Translation</menu_add> - <menu_search>View All Translations</menu_search> - <!-- define the field translations --> - <field_product_cat_id>Product Category</field_product_cat_id> - <field_language_id>Language</field_language_id> - <field_name>Name</field_name> - <field_description>Description</field_description> - <!-- define any custom resources --> -</translate> diff --git a/language/product_img/english_product_img.xml b/language/product_img/english_product_img.xml deleted file mode 100644 index e6524e37..00000000 --- a/language/product_img/english_product_img.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>product_img</name> - <!-- define the block title translations --> - <title_add>Add Product Image</title_add> - <title_view>View Product Image</title_view> - <title_delete>Delete This Image</title_delete> - <!-- define the field translations --> - <field_product_id>Product SKU</field_product_id> - <field_type>Image Type</field_type> - <field_url>URL</field_url> - <field_name>Name</field_name> - <!-- define any custom resources --> - <upload>Upload a file from your computer:</upload> - <url>...Or, enter the URL of the image: http://domain.com/image.gif</url> - <local>Saved Image</local> - <remote>Remote Image</remote> -</translate> diff --git a/language/product_translate/english_product_translate.xml b/language/product_translate/english_product_translate.xml deleted file mode 100644 index ff630ab2..00000000 --- a/language/product_translate/english_product_translate.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>product_translate</name> - <!-- define the block title translations --> - <title_add>Add Product Translation</title_add> - <title_view>View Product Translation</title_view> - <title_search>Search Product Translations</title_search> - <!-- define the menu lable translations --> - <menu>Product Translations</menu> - <menu_search>Search Product Translations</menu_search> - <!-- define the field translations --> - <field_product_id>Product</field_product_id> - <field_language_id>Language</field_language_id> - <field_name>Product Name</field_name> - <field_description_short>Short Description</field_description_short> - <field_description_full>Full Description</field_description_full> - <field_email_template>Extra E-mail Instructions</field_email_template> - <!-- define any custom resources --> -</translate> diff --git a/language/radius/english_radius.xml b/language/radius/english_radius.xml deleted file mode 100644 index c1b84ebd..00000000 --- a/language/radius/english_radius.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <!-- define the block title translations --> - <title_add>Add</title_add> - <title_view>List</title_view> - <title_search>Search</title_search> - - <!-- define the menu lable translations --> - <menu>Radius</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <!-- define the field translations --> - <field_id>ID</field_id> - <field_site_id></field_site_id> - <field_account_id>Account</field_account_id> - <field_service_id>Service Id</field_service_id> - <field_active>Active?</field_active> - <field_sku>SKU</field_sku> - <field_max>Remove This</field_max> - <field_auth>Auth Type</field_auth> - <field_username>Username</field_username> - <field_password>Password</field_password> - <field_service_type>Service Type</field_service_type> - <field_session_limit>Session Limit</field_session_limit> - <field_idle_limit>Idle Limit</field_idle_limit> - <field_port_limit>Port Limit</field_port_limit> - <field_analog>Analog?</field_analog> - <field_digital>Digital</field_digital> - <field_filter_id>Filter ID</field_filter_id> - <field_netmask>Netmask</field_netmask> - <field_framed_route>Framed Route</field_framed_route> - <field_speed_limit>Speed Limit</field_speed_limit> - <field_static_ip>Static IP</field_static_ip> - <field_profiles>Profiles</field_profiles> - <field_time_bank>Time Bank</field_time_bank> - - <old_logins>Existing Authentication Management</old_logins> - <new_logins>Assign Available Authentication </new_logins> - <mac>MAC Address</mac> - <user>Username</user> - <pass>Password</pass> - - <err_login>The username/password "%%user%%/%%pass%%" combo is not valid or is already in use, example username/password: "user1965/MySecret29".</err_login> - <err_wireless>"The MAC ID "%%user%%" is not valid or is already in use, example MAC ID: "00 0A E4 3A 18 13".</err_wireless> -</translate> \ No newline at end of file diff --git a/language/realestate/english_realestate.xml b/language/realestate/english_realestate.xml deleted file mode 100644 index 57cfc88c..00000000 --- a/language/realestate/english_realestate.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add Property</title_add> - <title_view>View Properties</title_view> - <title_search>Search Properties</title_search> - - <menu>Realestate</menu> - <menu_config>Configuration</menu_config> - <menu_add>Add Property</menu_add> - <menu_view>List Properties</menu_view> - <menu_search>Search Properties</menu_search> - - <user_menu>My Voice Center</user_menu> - <user_features>Features</user_features> - <user_overview>Overview</user_overview> - <user_activity>Activity</user_activity> - <user_fax>Faxes</user_fax> - <user_voicemail>Voicemail</user_voicemail> - <user_blacklist>Blacklist</user_blacklist> - <user_blacklist_add>Add a Blacklist</user_blacklist_add> - <user_blacklist_list>List all Blacklists</user_blacklist_list> - <user_callforwarding>Call Forwarding</user_callforwarding> - <user_busycallforwarding>Busy Call Forwarding</user_busycallforwarding> - <user_faxing>Faxing</user_faxing> - <user_failover>Failover Number</user_failover> - <user_remote_callforward>Remote Call Forwarding</user_remote_callforward> - <user_callwaiting>Call Waiting</user_callwaiting> - - <mls>MLS Number</mls> - <price>Price</price> - <address>Address</address> -</translate> \ No newline at end of file diff --git a/language/report/english_report.xml b/language/report/english_report.xml deleted file mode 100644 index ac324b0b..00000000 --- a/language/report/english_report.xml +++ /dev/null @@ -1,35 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>reports</name> - - <!-- define the block title translations --> - <title_add>Generate New Report</title_add> - <title_update></title_update> - <title_delete>Delete Saved Report</title_delete> - <title_view>Report Administration</title_view> - <title_search>Locate Saved Report(s)</title_search> - - <!-- define the menu lable translations --> - <menu>Reports</menu> - <menu_add></menu_add> - <menu_update></menu_update> - <menu_delete></menu_delete> - <menu_view>Report Administration</menu_view> - <menu_search></menu_search> - - <!-- define the field translations --> - <field_id></field_id> - <field_date_orig>Date Generated</field_date_orig> - <field_date_last>Date Last Run</field_date_last> - <field_template>Report Template</field_template> - <field_nickname>Nickname</field_nickname> - <field_criteria>Criteria</field_criteria> - <field_site_id>Company or Reseller</field_site_id> - - <!-- custom translations --> - <report_select>Select A Report</report_select> - <module_select>Select A Report Category</module_select> - <no_reports>No Reports for this Module</no_reports> - <view>View</view> - <update_sql>Update Query</update_sql> -</translate> \ No newline at end of file diff --git a/language/service/english_service.xml b/language/service/english_service.xml deleted file mode 100644 index c2e27f8b..00000000 --- a/language/service/english_service.xml +++ /dev/null @@ -1,106 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>service</name> - <!-- define the block title translations --> - <title_add>Add Service</title_add> - <title_view>View Service</title_view> - <title_search>Search Services</title_search> - <title_recurring>Recurring Details</title_recurring> - <title_group>Group Details</title_group> - <title_domain>Domain Details</title_domain> - <title_hosting>Hosting Details</title_hosting> - <title_product>Product Plugin</title_product> - <title_memo>Memos</title_memo> - <title_modify>Modify Service</title_modify> - <title_suspended_billing>Billing Suspended</title_suspended_billing> - - <!-- define the menu lable translations --> - <menu>Services</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_id>Service Number</field_id> - <field_date_orig>Date Created</field_date_orig> - <field_date_last>Date Last Modified</field_date_last> - <field_parent_id>Parent Service</field_parent_id> - <field_invoice_id>Invoice Number</field_invoice_id> - <field_invoice_item_id>Invoice Item Number</field_invoice_item_id> - <field_account_id>Account</field_account_id> - <field_account_billing_id>Billing Details</field_account_billing_id> - <field_product_id>Product ID</field_product_id> - <field_sku>Product SKU</field_sku> - <field_active>Active?</field_active> - <field_bind>Bind Services</field_bind> - <field_type>Type</field_type> - <field_price>Price</field_price> - <field_price_type>Price Type</field_price_type> - <field_taxable>Taxable?</field_taxable> - <field_queue>Queue Status</field_queue> - <field_date_last_invoice>Last Invoiced</field_date_last_invoice> - <field_date_next_invoice>Next Invoice</field_date_next_invoice> - <field_recur_type>Recurring Type</field_recur_type> - <field_recur_schedule>Recurring Schedule</field_recur_schedule> - <field_recur_weekday>Recurring Day of Month</field_recur_weekday> - <field_recur_week>Recurring Week</field_recur_week> - <field_recur_schedule_change>User May Change Schedule?</field_recur_schedule_change> - <field_recur_cancel>User May Cancel</field_recur_cancel> - <field_recur_modify>User May Modify</field_recur_modify> - <field_group_grant>Associated Groups to Grant</field_group_grant> - <field_group_type>Group Access Type</field_group_type> - <field_group_days>Group Access Period (Days)</field_group_days> - <field_host_server_id>Host Server</field_host_server_id> - <field_host_provision_plugin_data>Host Provisioning Data</field_host_provision_plugin_data> - <field_host_ip>Hosting IP</field_host_ip> - <field_host_username>Host Username</field_host_username> - <field_host_password>Host Password</field_host_password> - <field_domain_name>Domain Name</field_domain_name> - <field_domain_tld>Domain TLD</field_domain_tld> - <field_domain_term>Domain Registration Term</field_domain_term> - <field_domain_type>Domain Type</field_domain_type> - <field_domain_date_expire>Date Domain Expires</field_domain_date_expire> - <field_domain_host_tld_id>Domain TLD</field_domain_host_tld_id> - <field_domain_host_registrar_id>Domain Registrar</field_domain_host_registrar_id> - <field_suspend_billing>Suspend Billing Activity?</field_suspend_billing> - <field_service_did>Phone Number</field_service_did> - - <!-- define any custom resources --> - <host>Hosting</host> - <host_group>Hosting + Group Access</host_group> - <none>Recurring Only</none> - <group>Group Access</group> - <domain>Domain Name</domain> - <product>Product Plugin</product> - <product_group>Group Access + Product Plugin</product_group> - - <new>Add New</new> - <active>Activate</active> - <inactive>Deactivate</inactive> - <delete>Delete</delete> - <edit>Edit/Update</edit> - <queue_none>None</queue_none> - <force_queue>Force Current Queue</force_queue> - - <confirm_cancel>Are you sure you wish to cancel this service?</confirm_cancel> - <confirm_changeschedule>Are you sure you wish to change the billing scheudle of this service? If so, your subscription price will be modified accordingly and you will be billed at the new rate on your next invoice date.</confirm_changeschedule> - <changeservice_msg>Your request has been sent to our customer service department for review, thank you!</changeservice_msg> - <cancelservice_auth>Your account is not authorized to cancel this service.</cancelservice_auth> - <changeservice_auth>Your account is not authorized to change the billing schedule of this service.</changeservice_auth> - <resend_email>Resend hosting details e-mail</resend_email> - <hosting_email_sent>The hosting details have been resent to the customer's e-mail address on file.</hosting_email_sent> - <search_result_amount><![CDATA[The total amount of the Services dispayed on this page is <u>%%amount%%</u>.]]></search_result_amount> - <find_recur_invoices>Find Recurring Invoices</find_recur_invoices> - <cancel>Cancel This Subscription</cancel> - <product_plugin>Plugin</product_plugin> - <invoice_history>Retrieve all Invoices for service %%service%%...</invoice_history> - <modify_explain><![CDATA[ - This service can be modified by selecting another product from our offering. <br> - This will allow you to effectively upgrade or downgrade your current service. <br> - To select another product, <b><a href="?_page=service:user_modify&service_id=%%id%%">please click here</a></b>. - ]]></modify_explain> - <modify_select>Please select a product</modify_select> - <modify_submit>Modify My Service Now</modify_submit> - <modify_service>Modify Service to Another Product</modify_service> - <reactivate>Reactivate This Service</reactivate> - <suspended_billing_explain>The billing for this service has been suspended and service will expire on </suspended_billing_explain> -</translate> diff --git a/language/service_memo/english_service_memo.xml b/language/service_memo/english_service_memo.xml deleted file mode 100644 index 8be0473e..00000000 --- a/language/service_memo/english_service_memo.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>service_memo</name> - <!-- define the block title translations --> - <title_add>Add Memo</title_add> - <title_view>View Memo</title_view> - <title_search>Search Memos</title_search> - <!-- define the menu lable translations --> - <menu>Service Memos</menu> - <menu_add>Add Memo</menu_add> - <menu_view>View Memos</menu_view> - <menu_search>Search Memos</menu_search> - <!-- define the field translations --> - <field_date_orig>Date</field_date_orig> - <field_staff_id>Staff/Admin</field_staff_id> - <field_service_id>Service ID</field_service_id> - <field_type>Memo Type</field_type> - <field_memo>Memo</field_memo> - <field_misc>Misc</field_misc> - <!-- define any custom resources --> - <system>System</system> - <admin>Staff/Admin Memo</admin> -</translate> diff --git a/language/session/english_session.xml b/language/session/english_session.xml deleted file mode 100644 index a8f6d732..00000000 --- a/language/session/english_session.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>session</name> - <!-- define the block title translations --> - <title_view>View Sessions</title_view> - <title_search>Search Sessions</title_search> - <!-- define the menu lable translations --> - <menu>Sessions</menu> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Last Used Date</field_date_last> - <field_date_expire>Date of Expiration</field_date_expire> - <field_logged>User Logged In?</field_logged> - <field_ip>IP Address</field_ip> - <field_theme_id>Theme</field_theme_id> - <field_country_id>Country</field_country_id> - <field_language_id>Language</field_language_id> - <field_currency_id>Currency</field_currency_id> - <field_weight_id>Weight Unit</field_weight_id> - <field_account_id>Account</field_account_id> - <field_reseller_id>Reseller Account</field_reseller_id> - <field_affiliate_id>Affilliate Account</field_affiliate_id> - <!-- define any custom resources --> - <statistics>User Sessions: %%count%%</statistics> -</translate> diff --git a/language/setup/english_setup.xml b/language/setup/english_setup.xml deleted file mode 100644 index 172e855e..00000000 --- a/language/setup/english_setup.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>setup</name> - <!-- define the block title translations --> - <title_update>Main Setup</title_update> - <title_view>Main Setup</title_view> - <!-- define the menu lable translations --> - <menu>Setup</menu> - <menu_update>Site Setup</menu_update> - <menu__php_info>PHP Details</menu__php_info> - <!-- define the field translations --> - <field_id>ID</field_id> - <field_site_id>Site ID</field_site_id> - <field_country_id>Default Country</field_country_id> - <field_language_id>Default Language</field_language_id> - <field_currency_id>Default Currency</field_currency_id> - <field_weight_id>Default Weight </field_weight_id> - <field_theme_id>Default User Theme</field_theme_id> - <field_admin_theme_id>Default Admin Theme</field_admin_theme_id> - <field_group_id>Default Group</field_group_id> - <field_affiliate_template_id>Default Affiliate Template</field_affiliate_template_id> - <field_affiliate_id>Default Affiliate</field_affiliate_id> - <field_reseller_id>Default Reseller</field_reseller_id> - <field_setup_email_id>Default Email Setup</field_setup_email_id> - <field_ssl_url>SSL URL</field_ssl_url> - <field_nonssl_url>NON-SSL URL</field_nonssl_url> - <field_login_expire>Login Expiration Time (seconds)</field_login_expire> - <field_cookie_name>Cookie Name</field_cookie_name> - <field_cookie_expire>Cookie Expiration Time (seconds)</field_cookie_expire> - <field_session_ip_match>IP Matching For Sessions</field_session_ip_match> - <field_error_reporting>Error Reporting</field_error_reporting> - <field_site_name>Site Name</field_site_name> - <field_site_email>Site Email</field_site_email> - <field_time_format>Default Time Format</field_time_format> - <field_date_format>Default Date Format</field_date_format> - <field_date_time_format>Default Date-Time Format</field_date_time_format> - <field_decimal_place>Decimal Placement</field_decimal_place> - <field_debug>Debug</field_debug> - <field_login_attempt_try>Allowed Login Attempts</field_login_attempt_try> - <field_login_attempt_time>Login Attempt Period (in seconds)</field_login_attempt_time> - <field_login_attempt_lock>Login Lock Period (in seconds)</field_login_attempt_lock> - <field_search_expire>Search Expiration (in seconds)</field_search_expire> - <field_db_cache>Cache DB Queries?</field_db_cache> - <field_newsletter_registration>Show Newsletter Form on Registration page?</field_newsletter_registration> - <field_default_account_status>Require email validation on new accounts?</field_default_account_status> - <field_cache_sessions>Cache Sessions?</field_cache_sessions> - <field_weblog>Store Weblogs?</field_weblog> - <field_auto_affiliate>Auto Create Affiliate Account on new Account creation?</field_auto_affiliate> - <field_show_newsletter_link>Display newsletter link?</field_show_newsletter_link> - <field_show_contact_link>Display contact us link?</field_show_contact_link> - <field_show_domain_link>Display domain link?</field_show_domain_link> - <field_show_cart_link>Display cart link?</field_show_cart_link> - <field_show_checkout_link>Display checkout link?</field_show_checkout_link> - <field_show_product_link>Display products link?</field_show_product_link> - <field_show_cat_block>Display product categories block?</field_show_cat_block> - <field_show_file_block>Display file module block?</field_show_file_block> - <field_show_static_block>Display static page module block?</field_show_static_block> - <field_show_affiliate_link>Display affiliate link?</field_show_affiliate_link> - <field_show_affiliate_code>Display affiliate input block at checkout?</field_show_affiliate_code> - <field_show_discount_code>Display discount code block at checkout?</field_show_discount_code> - <field_os>Operating System</field_os> - <field_path_curl>Curl Path (if using binary version)</field_path_curl> - <field_billing_weekday>Default Billing Day of Month</field_billing_weekday> - <field_grace_period>Grace Period (days)</field_grace_period> - <field_max_billing_notice>Default Max Billing Notices</field_max_billing_notice> - <field_max_inv_gen_period>Generate Invoices how Long Prior to Due Date (days)</field_max_inv_gen_period> - <field_site_address>Company Address</field_site_address> - <field_site_city>Company City</field_site_city> - <field_site_state>Company State/Province</field_site_state> - <field_site_zip>Company Postal/ZIP code</field_site_zip> - <field_site_phone>Company Phone</field_site_phone> - <field_site_fax>Company Fax</field_site_fax> - <field_license_key>License Key</field_license_key> - <field_license_code>License Code</field_license_code> - <!-- error handling --> - <e_none>Error Reporting Off</e_none> - <e_error>Fatal errors that occur at runtime</e_error> - <e_warning>Non-fatal errors that occur at runtime</e_warning> - <e_parse>Parse errors (caused by invalid syntax)</e_parse> - <e_notice>Non-critical errors </e_notice> - <e_core_error>Fatal errors that occur at PHP engine startup</e_core_error> - <e_core_warning>Non-fatal errors that occur at PHP engine startup</e_core_warning> - <e_compile_error>Fatal errors that occur at script compile-time</e_compile_error> - <e_compile_warning>Non-fatal errors that occur at script compile-time</e_compile_warning> - <e_user_error>User-thrown fatal error</e_user_error> - <e_user_warning>User-thrown non-fatal error</e_user_warning> - <e_user_notice>User-thrown non-critical error</e_user_notice> - <e_all>The combined value of all available error levels</e_all> - <!-- date menu options --> - <date_option>select option</date_option> - <date_month_day>Day (01..31)</date_month_day> - <date_abbr_weekday>Abbr. Weekday (Mon)</date_abbr_weekday> - <date_full_weekday>Full Weekday (Monday)</date_full_weekday> - <date_month>Month (01..12)</date_month> - <date_abbr_month>Abbr Month (Mar)</date_abbr_month> - <date_full_month>Full Month (March)</date_full_month> - <date_year_two>Year (00..99)</date_year_two> - <date_year_four>Year (2004)</date_year_four> - <!-- date separator options --> - <sep_space>space</sep_space> - <sep_dash>dash</sep_dash> - <sep_slash>slash</sep_slash> - <sep_period>period</sep_period> - <sep_comma>comma</sep_comma> -</translate> diff --git a/language/setup_email/english_setup_email.xml b/language/setup_email/english_setup_email.xml deleted file mode 100644 index b58379d4..00000000 --- a/language/setup_email/english_setup_email.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>setup_email</name> - <!-- define the block title translations --> - <title_add>Add Email Setup</title_add> - <title_view>View Email Setups</title_view> - <!-- define the menu lable translations --> - <menu>Email Setup</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_account_id>Account</field_account_id> - <field_name>Email Setup Name</field_name> - <field_notes>Notes</field_notes> - <field_type>SMTP Account?</field_type> - <field_from_name>From Name</field_from_name> - <field_from_email>From Email</field_from_email> - <field_cc_list>CC List (cc@mail.com,ccme@mail.com)</field_cc_list> - <field_bcc_list>BCC List (bcc@mail.com,bccme@mail.com)</field_bcc_list> - <field_server>Server (required only for SMTP - smtp.srv1.com;mail.srv2.com)</field_server> - <field_username>Username (required only for SMTP)</field_username> - <field_password>Password (required only for SMTP)</field_password> - <field_piping>Message Retrieval Method</field_piping> - <field_piping_host>Host for Message Retrieval</field_piping_host> - <field_piping_username>Username</field_piping_username> - <field_piping_password>Password</field_piping_password> - <field_piping_action>Action after Message Retrieval</field_piping_action> - <field_queue>Queue E-mails?</field_queue> - <!-- define any custom resources --> - <smtp_help><![CDATA[If you select 'Yes', you will need to enter your SMTP server & login details below. ]]></smtp_help> - <piping_action_leave>Leave message in mailbox</piping_action_leave> - <piping_action_delete>Delete message from mailbox</piping_action_delete> -</translate> diff --git a/language/setup_invoice/english_setup_invoice.xml b/language/setup_invoice/english_setup_invoice.xml deleted file mode 100644 index b35da74d..00000000 --- a/language/setup_invoice/english_setup_invoice.xml +++ /dev/null @@ -1,59 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>setup_invoice</name> - <!-- define the block title translations --> - <title_update>Invoice Setup</title_update> - <title_view>Invoice Setup</title_view> - <!-- define the menu lable translations --> - <menu>Invoice Setup</menu> - <menu_view>Invoice Setup</menu_view> - - <!-- define the field translations --> - <field_id>ID</field_id> - <field_site_id>Site ID</field_site_id> - <field_bill_to_company>Bill to company name</field_bill_to_company> - <field_invoice_currency>Currency Symbol</field_invoice_currency> - <field_invoice_decimals>Currency Decimal Precision</field_invoice_decimals> - <field_items_summary_max>Number of items to display in summary</field_items_summary_max> - <field_news>News you can use</field_news> - <field_page_type>Page Print Template</field_page_type> - <field_invoice_delivery>Default Invoice Delivery Method</field_invoice_delivery> - <field_invoice_show_itemized>Show itemized detail pages</field_invoice_show_itemized> - <field_invoice_terms>Default Net Terms for All System Generated Invoices</field_invoice_terms> - <field_invoice_pdf_plugin>PDF Invoice Plugin</field_invoice_pdf_plugin> - <field_contact_us_url>Contact Us URL</field_contact_us_url> - <field_contact_us_phone>Contact Us Phone Number</field_contact_us_phone> - <field_invoice_show_service_dates>Show service date ranges on invoice overview</field_invoice_show_service_dates> - <field_invoice_advance_gen>Generate Invoices how Long Prior to Due Date (days)</field_invoice_advance_gen> - <field_advance_notice>Send advance billing notice how many days before invoice generation? (0 = disabled)</field_advance_notice> - - <pdf_service_range_month>Monthly Services for</pdf_service_range_month> - <pdf_summary>The above is just a summary. To view a detailed list of charges, please visit our website.</pdf_summary> - <pdf_cur_charge_summary>Current Charges Summary for</pdf_cur_charge_summary> - <pdf_combine_minutes> Combined Minutes Used</pdf_combine_minutes> - <pdf_payment_remit>Payment Remittence</pdf_payment_remit> - <pdf_return1>Please return this portion with your cheque or money</pdf_return1> - <pdf_return2>order made payable to</pdf_return2> - <pdf_account_number>Account Number</pdf_account_number> - <pdf_account_username>Username</pdf_account_username> - <pdf_contact>Contact Us:</pdf_contact> - <pdf_contact_online>Online:</pdf_contact_online> - <pdf_contact_phone>Phone:</pdf_contact_phone> - <pdf_invoice_number>Invoice Number</pdf_invoice_number> - <pdf_invoice_number_small>Invoice #</pdf_invoice_number_small> - <pdf_billing_date>Billing Date</pdf_billing_date> - <pdf_bill_date>Issue Date</pdf_bill_date> - <pdf_current_charges>Current Charges</pdf_current_charges> - <pdf_amount_due_by>Amount Due</pdf_amount_due_by> - <pdf_make_check>MAKE CHEQUE PAYABLE TO</pdf_make_check> - <pdf_itemized_charges>Itemised Charges</pdf_itemized_charges> - <pdf_itemized_calls>Itemised Calls</pdf_itemized_calls> - <pdf_page>Page #</pdf_page> - <pdf_item_description>Description</pdf_item_description> - <pdf_item_quantity>Quantity</pdf_item_quantity> - <pdf_item_min>Min./Quan.</pdf_item_min> - <pdf_item_cost>Unit Cost</pdf_item_cost> - <pdf_item_amount>Amount</pdf_item_amount> - <pdf_item_to>To</pdf_item_to> - <pdf_item_from>From</pdf_item_from> -</translate> diff --git a/language/staff/english_staff.xml b/language/staff/english_staff.xml deleted file mode 100644 index c77e5517..00000000 --- a/language/staff/english_staff.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>staff</name> - <!-- define the block title translations --> - <title_add>Add Staff</title_add> - <title_view>View Staff</title_view> - <title_search>Search Staff</title_search> - <title_contact>Contact our Staff</title_contact> - <!-- define the menu lable translations --> - <menu>Staff</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_date_orig>Creation Date</field_date_orig> - <field_account_id>Account</field_account_id> - <field_department_avail>Can Access Ticket Departments</field_department_avail> - <field_nickname>Staff Nickname</field_nickname> - <field_notify_new>Notify of New Tickets</field_notify_new> - <field_notify_change>Notify of Changes to Tickets</field_notify_change> - <field_signature>Signature for Ticket Replies</field_signature> - <!-- define any custom resources --> - <contact_options> To contact our staff, you may select their staff nickname below. If you do not - know any staff in the department you wish to correspond with, simply select the recipient - department instead, and your message will be forwarded to the appropriate staff member when - you send your message. You do not need to select both a recipient department and recipient - staff member; please just select one or the other. </contact_options> - <contact_staff>Recipient Staff Nickname</contact_staff> - <contact_department>Recipient Department</contact_department> - <contact_name>Your Name</contact_name> - <contact_email>Your E-mail</contact_email> - <error_req_fields>You must fill in all the required fields in order send your message, please - try again.</error_req_fields> - <error_staff_non_exist>Sorry, the specified recipient staff member does not exist any longer.</error_staff_non_exist> - <error_dept_non_exist>Sorry, the specified recipient department does not exist any longer.</error_dept_non_exist> - <error_staff_dept>You must specify either the recipient staff member or department, please try - again.</error_staff_dept> - <mail_sent> Thank you, we have sent your message to the specified recipient. If a response is in - order, we will do so as soon as possible. </mail_sent> -</translate> diff --git a/language/static_page/english_static_page.xml b/language/static_page/english_static_page.xml deleted file mode 100644 index dcd2cf7e..00000000 --- a/language/static_page/english_static_page.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>static_page</name> - <!-- define the block title translations --> - <title_add>Add Page</title_add> - <title_view>View Pages</title_view> - <title_search>Search Pages</title_search> - <!-- define the menu lable translations --> - <menu>Static Pages</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <!-- define the field translations --> - <field_static_page_category_id>Show in Category</field_static_page_category_id> - <field_date_orig>Creation Date</field_date_orig> - <field_date_last>Date of Last Update</field_date_last> - <field_date_expire>Expiration Date</field_date_expire> - <field_status>Active?</field_status> - <field_name>Page Name</field_name> - <field_description>Page Description</field_description> - <field_date_start>Start Date</field_date_start> - <field_sort_order>Display Sort Order</field_sort_order> - <!-- define any custom resources --> - <view_all>View all translations for this page </view_all> - <add_translation>Add a translations for this page</add_translation> - <read_more>Read more ... </read_more> - <no_pages> Sorry, no pages were found in this category, or your account is not authorized for - this category. </no_pages> - <page_not_found> Sorry, the requested page was not found, or you do not have the required level - of authorization to view it. </page_not_found> - <preview>Preview page</preview> -</translate> diff --git a/language/static_page_category/english_static_page_category.xml b/language/static_page_category/english_static_page_category.xml deleted file mode 100644 index c6659bef..00000000 --- a/language/static_page_category/english_static_page_category.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>static_page_category</name> - <!-- define the block title translations --> - <title_add>Add Static Page Category</title_add> - <title_view>View Static Page Categories</title_view> - <!-- define the menu lable translations --> - <menu>Categories</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_sort_order>Sort Order</field_sort_order> - <field_date_orig>Date of Creation</field_date_orig> - <field_group_avail>Groups that can access this category</field_group_avail> - <field_name>Name of Category</field_name> - <field_description>Category Description</field_description> - <field_status>Active?</field_status> - <!-- define any custom resources --> -</translate> diff --git a/language/static_page_translate/english_static_page_translate.xml b/language/static_page_translate/english_static_page_translate.xml deleted file mode 100644 index 3ce9e0e2..00000000 --- a/language/static_page_translate/english_static_page_translate.xml +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>static_page_translate</name> - <!-- define the block title translations --> - <title_add>Add Translation</title_add> - <title_view>View Translations</title_view> - <title_search>Search Translations</title_search> - <!-- define the menu lable translations --> - <menu>Translation Administration</menu> - <menu_add>Add Translation</menu_add> - <menu_view>View Translations</menu_view> - <menu_search>Search Translations</menu_search> - <!-- define the field translations --> - <field_id/> - <field_site_id/> - <field_date_orig>Date of Creation</field_date_orig> - <field_date_last/> - <field_static_page_id>Static Page</field_static_page_id> - <field_language_id>Translation Language</field_language_id> - <field_body_intro>Intro Text</field_body_intro> - <field_body_full>Full Text</field_body_full> - <field_title>Page Title</field_title> - <!-- define any custom resources --> - <view_all>View all translations for this page </view_all> - <return>Return to main page view</return> -</translate> diff --git a/language/task_log/english_task_log.xml b/language/task_log/english_task_log.xml deleted file mode 100644 index b28ccaf0..00000000 --- a/language/task_log/english_task_log.xml +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>task_log</name> - <!-- define the block title translations --> - <title_view>View Task Logs</title_view> - <title_search>Search Task Logs</title_search> - <!-- define the menu lable translations --> - <menu>Task Logs</menu> - <menu_view>View Task Logs</menu_view> - <menu_search>Search Task Logs</menu_search> - <!-- define the field translations --> - <field_id/> - <field_site_id/> - <field_task_id>Task</field_task_id> - <field_date_orig>Date</field_date_orig> - <field_result>Success?</field_result> - <field_message>Task Message</field_message> - <!-- define any custom resources --> -</translate> diff --git a/language/tax/english_tax.xml b/language/tax/english_tax.xml deleted file mode 100644 index 767fe42f..00000000 --- a/language/tax/english_tax.xml +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>tax</name> - <!-- define the block title translations --> - <title_add>Add Tax Zone</title_add> - <title_view>View Tax Zones</title_view> - <!-- define the menu lable translations --> - <menu>Tax Zones</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <!-- define the field translations --> - <field_country_id>Country</field_country_id> - <field_zone>Tax Zone</field_zone> - <field_description>Tax Description</field_description> - <field_rate>Tax Rate</field_rate> - <field_tax_id_collect>Collect Tax ID?</field_tax_id_collect> - <field_tax_id_name>Tax ID Descriptor</field_tax_id_name> - <field_tax_id_exempt>Allow Exempt Status?</field_tax_id_exempt> - <field_tax_id_req>Require Tax ID Input?</field_tax_id_req> - <field_tax_id_regex>REGEX for Tax Id Number Validation</field_tax_id_regex> -</translate> diff --git a/language/temporary_data/english_temporary_data.xml b/language/temporary_data/english_temporary_data.xml deleted file mode 100644 index 5b6cd939..00000000 --- a/language/temporary_data/english_temporary_data.xml +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>temporary_data</name> -</translate> diff --git a/language/voip/english_voip.xml b/language/voip/english_voip.xml deleted file mode 100644 index 13540f68..00000000 --- a/language/voip/english_voip.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <menu>VoIP</menu> - <menu_config>VoIP Configuration</menu_config> - - <field_date_orig>Date</field_date_orig> - <field_status>Invoiced?</field_status> - <field_sweep_type>Sweep Type</field_sweep_type> - <field_account_id>Account</field_account_id> - <field_product_id>Product SKU</field_product_id> - <field_service_id>Service</field_service_id> - <field_amount>Amount</field_amount> - <field_quantity>Quantity</field_quantity> - <field_taxable>Taxable</field_taxable> - <field_attributes>Attributes</field_attributes> - <field_dst>From</field_dst> - <field_src>To</field_src> - <field_amount>Amount</field_amount> - <field_duration>Duration</field_duration> - <field_default_prefix>Default NPA prepended to US 7 digit dialing</field_default_prefix> - <field_prepaid_low_balance>Amount at which prepaid low balance email notifications are sent</field_prepaid_low_balance> - <field_auth_domain>Provisioning Auth Domain (eg: SER SIP domain)</field_auth_domain> - - <user_menu>My Voice Center</user_menu> - <user_features>Features</user_features> - <user_overview>Overview</user_overview> - <user_activity>Activity</user_activity> - <user_fax>Faxes</user_fax> - <user_voicemail>Voicemail</user_voicemail> - <user_blacklist>Blacklist</user_blacklist> - <user_blacklist_add>Add a Blacklist</user_blacklist_add> - <user_blacklist_list>List all Blacklists</user_blacklist_list> - <user_callforwarding>Call Forwarding</user_callforwarding> - <user_busycallforwarding>Busy Call Forwarding</user_busycallforwarding> - <user_faxing>Faxing</user_faxing> - <user_failover>Failover Number</user_failover> - <user_remote_callforward>Remote Call Forwarding</user_remote_callforward> - <user_callwaiting>Call Waiting</user_callwaiting> - - <out_calls>Placed Calls</out_calls> - <in_calls>Received Calls</in_calls> - <no_calls>No calls for this period</no_calls> - <out_calls_last>Last 25 Placed Calls</out_calls_last> - <in_calls_last>Last 25 Received Calls</in_calls_last> - <color_guide>Incoming call color guide</color_guide> - <color_a>Call answered</color_a> - <color_v>Call routed to voicemail</color_v> - <color_f>Call routed to fax</color_f> - <color_c>Prepaid Call</color_c> - - <phoneno>Phone Number</phoneno> - <vm1>Forward calls to voicemail after</vm1> - <seconds>seconds</seconds> - <vmemail>Send email notification to</vmemail> - <ringfor>Will ring for</ringfor> - <secbefore>seconds before being forwarded to</secbefore> - <busyforward>If this line is busy, then will forward the call to</busyforward> - <emailfaxes>Send new faxes for this line to e-mail address</emailfaxes> - <outageno>In the event of Internet outage, redirect calls for this line to</outageno> - <remoteforwardline>Forward calls for this line to</remoteforwardline> - <view_blacklist>View Blacklisted Numbers</view_blacklist> - <add_blacklist>Add Blacklisted Number</add_blacklist> - <callwaiting>Enable Call waiting. Note: In order for Busy Call Forwarding to work, you must disable Call Waiting.</callwaiting> - - <title_config>VoIP Configuration</title_config> - <type_random>Randomly Generated</type_random> - <type_reverse>Reverse of the DID assigned</type_reverse> - <type_same>Same as the DID assigned</type_same> - <field_default_vm_passwd>Default Voicemail PIN/Passcode</field_default_vm_passwd> - <field_secret_generation>Method used for SIP/IAX secret provisioning</field_secret_generation> - <field_intrastate_npas>Your Intrastate NPAs for calculations</field_intrastate_npas> - <field_intrastate_npas_note>(comma separated)</field_intrastate_npas_note> - <field_postpaid_only>(for post-paid rating only)</field_postpaid_only> - <field_perform_normalization>Perform CDR normalization</field_perform_normalization> - <field_normalization_min_len>Minimum length for a number to be normalized</field_normalization_min_len> -</translate> \ No newline at end of file diff --git a/language/voip_blacklist/english_voip_blacklist.xml b/language/voip_blacklist/english_voip_blacklist.xml deleted file mode 100644 index 136a0703..00000000 --- a/language/voip_blacklist/english_voip_blacklist.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add Blacklist</title_add> - <title_view>View Blacklist</title_view> - <title_search>Search Blacklists</title_search> - - <menu>Blacklists</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <field_voip_did_id>DID</field_voip_did_id> - <field_account_id>Account</field_account_id> - <field_src>Phone Number</field_src> - <field_dst>Destination</field_dst> -</translate> \ No newline at end of file diff --git a/language/voip_cdr/english_voip_cdr.xml b/language/voip_cdr/english_voip_cdr.xml deleted file mode 100644 index 447e427e..00000000 --- a/language/voip_cdr/english_voip_cdr.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_view>View CDR</title_view> - <title_search>Search CDRs</title_search> - - <menu>CDRs</menu> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <field_date_orig>Date Created</field_date_orig> - <field_account_id>Account</field_account_id> - <field_voip_rate_id>Rate ID</field_voip_rate_id> - <field_clid>CLID</field_clid> - <field_src>Source</field_src> - <field_dst>Destination</field_dst> - <field_dcontext>Dest Context</field_dcontext> - <field_channel>Channel</field_channel> - <field_dstchannel>Dest Channel</field_dstchannel> - <field_lastapp>Last App</field_lastapp> - <field_lastdata>Last Data</field_lastdata> - <field_duration>Duration</field_duration> - <field_billsec>Bill Seconds</field_billsec> - <field_disposition>Disposition</field_disposition> - <field_amaflags>AMA Flags</field_amaflags> - <field_accountcode>Account Code</field_accountcode> - <field_uniqueid>Unique ID</field_uniqueid> - <field_cdrid>CDRID</field_cdrid> - <field_amount>Amount</field_amount> - <field_calltype>Call Type</field_calltype> - <field_id>ID</field_id> - <field_rated>Rating Status</field_rated> - <field_adjbillinterval>Adjusted Bill Interval</field_adjbillinterval> -</translate> \ No newline at end of file diff --git a/language/voip_did/english_voip_did.xml b/language/voip_did/english_voip_did.xml deleted file mode 100644 index 061b3158..00000000 --- a/language/voip_did/english_voip_did.xml +++ /dev/null @@ -1,50 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add DID</title_add> - <title_view>View DIDs</title_view> - <title_search>Search DIDs</title_search> - - <menu>DID</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <field_account_id>Account</field_account_id> - <field_service_id>Service ID</field_service_id> - <field_service_parent_id>Parent Service ID</field_service_parent_id> - <field_did>DID</field_did> - <field_callingrateid>Calling Rate ID</field_callingrateid> - <field_calledrateid>Called Rate ID</field_calledrateid> - <field_planid>Plan ID</field_planid> - <field_cnam>Calling Name Display</field_cnam> - <field_blacklist>Blacklisting</field_blacklist> - <field_anirouting>ANI-based routing</field_anirouting> - <field_faxdetection>FAX detection</field_faxdetection> - <field_channel>Channel</field_channel> - <field_channelarg>Channel Arguments</field_channelarg> - <field_voicemailenabled>Voice Mail Enabled?</field_voicemailenabled> - <field_callforwardingenabled>Call Forwarding Enabled?</field_callforwardingenabled> - <field_busycallforwardingenabled>Busy Call Forwarding Enabled?</field_busycallforwardingenabled> - <field_voicemailafter>Voice Mail After?</field_voicemailafter> - <field_cfringfor>Call Forwarding Ring For?</field_cfringfor> - <field_cfnumber>Call Forwarding Number</field_cfnumber> - <field_bcfnumber>Busy Call Forwarding Number</field_bcfnumber> - <field_rxfax>Fax Enabled?</field_rxfax> - <field_faxemail>Fax To Email</field_faxemail> - <field_active>Active?</field_active> - <field_conf>Conferencing Enabled?</field_conf> - <field_conflimit>Conference Limit</field_conflimit> - <field_failover>Failover?</field_failover> - <field_failovernumber>Failover Number</field_failovernumber> - <field_remotecallforward>Remote Call Forwarding?</field_remotecallforward> - <field_remotecallforwardnumber>Remote Call Forwarding Number</field_remotecallforwardnumber> - <field_callerid>Caller ID</field_callerid> - <field_username>VoIP Registration Username</field_username> - <field_secret>VoIP Registration Password</field_secret> - <field_qualify>NAT Qualification/Monitoring</field_qualify> - <field_mailbox>Voicemail Box</field_mailbox> - <field_incominglimit>Incoming Call Limit</field_incominglimit> - <field_dtmfmode>DTMF Mode</field_dtmfmode> - <field_canreinvite>Can Re-Invite</field_canreinvite> - <field_nat>NAT</field_nat> -</translate> \ No newline at end of file diff --git a/language/voip_did_plugin/english_voip_did_plugin.xml b/language/voip_did_plugin/english_voip_did_plugin.xml deleted file mode 100644 index 7128e67a..00000000 --- a/language/voip_did_plugin/english_voip_did_plugin.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>voip_did_plugin</name> - - <!-- define the block title translations --> - <title_add>New DID Plugin Setup</title_add> - <title_update></title_update> - <title_delete></title_delete> - <title_view>View DID Plugin Setups</title_view> - <title_search></title_search> - - <!-- define the menu lable translations --> - <menu>DID Plugin Setup</menu> - <menu_add>Add</menu_add> - <menu_update></menu_update> - <menu_delete></menu_delete> - <menu_view>List</menu_view> - <menu_search></menu_search> - - <!-- define the field translations --> - <field_id></field_id> - <field_site_id></field_site_id> - <field_name>Plugin Setup Name</field_name> - <field_plugin>Use Plugin</field_plugin> - <field_avail_countries>Available for Countries</field_avail_countries> - <field_release_minutes>Release reserved DIDs after (minutes)</field_release_minutes> - <field_plugin_data></field_plugin_data> -</translate> \ No newline at end of file diff --git a/language/voip_fax/english_voip_fax.xml b/language/voip_fax/english_voip_fax.xml deleted file mode 100644 index 5f964023..00000000 --- a/language/voip_fax/english_voip_fax.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_view>View Fax</title_view> - <title_search>Search Faxes</title_search> - - <menu>Faxes</menu> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <field_account_id>Account</field_account_id> - <field_date_orig>Date</field_date_orig> - <field_clid>CLID</field_clid> - <field_src>Source</field_src> - <field_dst>Destination</field_dst> - <field_pages>Pages</field_pages> - <field_image_size>Image Size</field_image_size> - <field_image_resolution>Image Resolution</field_image_resolution> - <field_transfer_rate>Transfer Rate</field_transfer_rate> - <field_image_bytes>Image Bytes</field_image_bytes> - <field_bad_rows>Bad Rows</field_bad_rows> - <field_mime_type>Mime Type</field_mime_type> - - <view>View</view> - -</translate> \ No newline at end of file diff --git a/language/voip_pool/english_voip_pool.xml b/language/voip_pool/english_voip_pool.xml deleted file mode 100644 index 935aaf4b..00000000 --- a/language/voip_pool/english_voip_pool.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>voip_pool</name> - - <title_add>Add DID Pool</title_add> - <title_update>View DID Pool</title_update> - <title_view>List DID Pools</title_view> - <title_search>Search DID Pool</title_search> - <title_import>Import DIDs</title_import> - - <menu>DID POOL</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - <menu_import>Import</menu_import> - - <field_account_id>Account</field_account_id> - <field_npa>NPA</field_npa> - <field_nxx>NXX</field_nxx> - <field_station>Station</field_station> - <field_filename>File to import</field_filename> - <field_did_plugin>DID Pool to associate imported DIDs with</field_did_plugin> - - <help_import>Select a file to import below. The file must contain a single phone number per line, in E.164 format. Duplicates will not be imported.</help_import> -</translate> \ No newline at end of file diff --git a/language/voip_prepaid/english_voip_prepaid.xml b/language/voip_prepaid/english_voip_prepaid.xml deleted file mode 100644 index bb67fa61..00000000 --- a/language/voip_prepaid/english_voip_prepaid.xml +++ /dev/null @@ -1,25 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add Prepaid Pin</title_add> - <title_add_bulk>Generate Bulk Prepaid Pins</title_add_bulk> - <title_view>View Prepaid Pin</title_view> - <title_search>Search Prepaid Pins</title_search> - - <menu>Prepaid Pins</menu> - <menu_add>Add</menu_add> - <menu_add_batch>Add Batch</menu_add_batch> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <field_account_id>Account</field_account_id> - <field_product_id>Product</field_product_id> - <field_pin>Pin Number</field_pin> - <field_balance>Balance</field_balance> - <field_in_use>In Use?</field_in_use> - <field_date_expire>Pin expires on</field_date_expire> - <field_bulk>Batch Reference Code</field_bulk> - - <bulk_qty>Batch Quantity</bulk_qty> - <bulk_ref>Batch Reference Code</bulk_ref> - -</translate> \ No newline at end of file diff --git a/language/voip_rate/english_voip_rate.xml b/language/voip_rate/english_voip_rate.xml deleted file mode 100644 index 4d540742..00000000 --- a/language/voip_rate/english_voip_rate.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>voip_rate</name> - - <title_add>Add Rate</title_add> - <title_view>View Rates</title_view> - <title_search>Search Rates</title_search> - - <menu>Rates</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_products>Product Associations</menu_products> - <menu_import>Import</menu_import> - - <field_date_added>Date Added</field_date_added> - <field_name>Name</field_name> - <field_pattern>Digit Match Pattern (regex - separate with a semicolon for multiples)</field_pattern> - <field_connect_fee>Price for Connecting</field_connect_fee> - <field_increment_seconds>Billing Increment Seconds</field_increment_seconds> - <field_seconds_included>Seconds Included/Free</field_seconds_included> - <field_amount>Price per minute</field_amount> - <field_type>Rating Type</field_type> - <field_direction>Call Direction</field_direction> - <field_min>Minimum Minutes</field_min> - <field_max>Maximum Minutes</field_max> - <field_combine>Combine Minutes?</field_combine> - <field_percall>Price is per Call</field_percall> - - <type_yes>Yes</type_yes> - <type_no>No</type_no> - - <type_innetwork>In Network</type_innetwork> - <type_local>Local Calling</type_local> - <type_regular>Regular</type_regular> - <type_default>Default/Match All</type_default> - - <direction_inbound>In-bound</direction_inbound> - <direction_outbound>Out-bound</direction_outbound> - <direction_both>Both In/Out-bound</direction_both> - - <run>Run Rating Now</run> -</translate> diff --git a/language/voip_rate_prod/english_voip_rate_prod.xml b/language/voip_rate_prod/english_voip_rate_prod.xml deleted file mode 100644 index 8f8c9c9e..00000000 --- a/language/voip_rate_prod/english_voip_rate_prod.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <name>voip_rate_prod</name> - - <title_add>Add Product Rate Association</title_add> - <title_view>View Product Rate Association</title_view> - - <field_product_id>Product SKU</field_product_id> - <field_voip_rate_id>Rate Name</field_voip_rate_id> - -</translate> diff --git a/language/voip_vm/english_voip_vm.xml b/language/voip_vm/english_voip_vm.xml deleted file mode 100644 index 1d345e53..00000000 --- a/language/voip_vm/english_voip_vm.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<translate> - <title_add>Add Voicemail</title_add> - <title_view>View Voicemail</title_view> - <title_search>Search Voicemail</title_search> - - <menu>Voicemail</menu> - <menu_add>Add</menu_add> - <menu_view>List</menu_view> - <menu_search>Search</menu_search> - - <field_account_id>Account</field_account_id> - <field_context>Context</field_context> - <field_mailbox>Mailbox</field_mailbox> - <field_password>Password</field_password> - <field_fullname>Full Name</field_fullname> - <field_email>E-mail</field_email> - <field_pager>Pager</field_pager> - <field_options>Options</field_options> - - <listen>Listen</listen> - <delete>Delete</delete> - <date>Date</date> - <from>From</from> - <filesize>File Size</filesize> - <length>Length</length> - -</translate> \ No newline at end of file diff --git a/modules/account/account.inc.php b/modules/account/account.inc.php deleted file mode 100644 index ba3592e6..00000000 --- a/modules/account/account.inc.php +++ /dev/null @@ -1,2079 +0,0 @@ -<?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 - * - * 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> - * @package AgileBill - * @subpackage Modules:Account - */ - -/** - * The main AgileBill Account Class - * - * @package AgileBill - * @subpackage Modules:Account - */ -class account extends OSB_module { - private $parent_id; - # Has account passed validation - public $validated = true; - - /** SUB ACCOUNTS **/ - - /** - * Add sub account - */ - public function user_sub_account_add($VAR) { - global $C_debug; - - if (! SESS_LOGGED) - return false; - - $this->parent_id = SESS_ACCOUNT; - - if ($this->add($VAR,$this)) { - # Add any additional groups - if (! empty($VAR['groups']) && is_array($VAR['groups'])) - $this->add_account_groups($VAR['groups'],$this->account_id,false); - - define('FORCE_PAGE','account:account'); - - $C_debug->alert('The sub-account has been added'); - } - } - - /** - * Delete sub account - * - * @uses account_admin - */ - public function user_sub_delete($VAR) { - # Verify perms - if (empty($VAR['id']) || !$this->isParentAccount($VAR['id'])) - return false; - - # OK, do deletion - include_once(PATH_MODULES.'account_admin/account_admin.inc.php'); - $aa = new account_admin; - - $VAR['account_admin_id'] = $VAR['id']; - $aa->delete($VAR); - } - - /** - * Check if sub account auth - */ - private function isParentAccount($sub_account_id) { - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'account','parent_id', - sprintf("id=%s AND parent_id != 0 AND parent_id IS NOT NULL AND parent_id != '' AND parent_id = %s",$sub_account_id,SESS_ACCOUNT))); - - if ($rs && $rs->RecordCount()) - return true; - else - return false; - } - - /** SMARTY METHODS **/ - - /** - * Get a list of groups to which an account is a member of - * - * Accounts are always a member of group 0/2 (All Un & Registered Users) - */ - public function sAccountGroups($account_id) { - static $CACHE = array(); - - if (! isset($CACHE[$account_id])) { - $db = &DB(); - - $rs = $db->Execute(sqlSelect($db,'account_group','group_id',sprintf('group_id>2 AND active=1 AND account_id=%s',$account_id))); - $CACHE[$account_id] = array(0,2); - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - array_push($CACHE[$account_id],$rs->fields['group_id']); - $rs->MoveNext(); - } - } - } - - return $CACHE[$account_id]; - } - - // @todo Use sAccountGroups() in this method - public function user_get_auth_groups($VAR) { - global $smarty,$C_auth; - - $db = &DB(); - $groups = array(); - - # Get groups for this account - $authgrp = array(); - if (! empty($VAR['id'])) { - $rs = $db->Execute(sqlSelect($db,'account_group','group_id',sprintf('group_id>2 AND active=1 AND account_id=%s',$VAR['id']))); - - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $authgrp[$rs->fields['group_id']] = true; - $rs->MoveNext(); - } - } - } - $rs = $db->Execute(sqlSelect($db,'group','id,name',sprintf('id IN (%s) AND id > 2',implode(',',$C_auth->group)))); - - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $gid = $rs->fields['id']; - - if ((! empty($VAR['groups']) && is_array($VAR['groups']) && ! empty($VAR['groups'][$gid])) || (! empty($authgrp[$gid]))) - $rs->fields['checked'] = true; - - array_push($groups,$rs->fields); - $rs->MoveNext(); - } - } - - $smarty->assign('groups',$groups); - } - - /** ACCOUNT MANAGEMENT **/ - - /** - * Add new accounts - * - * @uses blocked_email - * @uses blocked_ip - * @uses account_password_history - * @uses email_template - * @uses newsletter - * @uses CORE_auth - * @uses affiliate - */ - public function user_add($VAR) { - global $C_list,$C_translate,$C_debug,$smarty; - - # Set the hidden values - $VAR[$this->module.'_date_orig'] = time(); - $VAR[$this->module.'_date_last'] = time(); - - if (defined('SESS_LANGUAGE')) - $VAR[$this->module.'_language_id'] = SESS_LANGUAGE; - else - $VAR[$this->module.'_language_id'] = DEFAULT_LANGUAGE; - - if (defined('SESS_AFFILIATE')) - $VAR[$this->module.'_affiliate_id']= SESS_AFFILIATE; - else - $VAR[$this->module.'_affiliate_id']= DEFAULT_AFFILIATE; - - if (defined('SESS_RESELLER')) - $VAR[$this->module.'_reseller_id'] = SESS_RESELLER; - else - $VAR[$this->module.'_reseller_id'] = DEFAULT_RESELLER; - - if (defined('SESS_CURRENCY')) - $VAR[$this->module.'_currency_id'] = SESS_CURRENCY; - else - $VAR[$this->module.'_currency_id'] = DEFAULT_CURRENCY; - - if (defined('SESS_THEME')) - $VAR[$this->module.'_theme_id'] = SESS_THEME; - else - $VAR[$this->module.'_theme_id'] = DEFAULT_THEME; - - if (defined('SESS_CAMPAIGN')) - $VAR[$this->module.'_campaign_id'] = SESS_CAMPAIGN; - else - $VAR[$this->module.'_campaign_id'] = 0; - - if (! isset($VAR[$this->module.'_email_type'])) - $VAR[$this->module.'_email_type'] = '0'; - - # Determine the proper account status - if (! isset($VAR[$this->module.'_status'])) - if (defined('DEFAULT_ACCOUNT_STATUS')) - # This constant is negative, ie: when 1 it requires validation - $VAR[$this->module.'_status'] = ! DEFAULT_ACCOUNT_STATUS; - else - $VAR[$this->module.'_status'] = 0; - - $VAR[$this->module.'_tax_id'] = $this->validate_tax($VAR); - - # Get default invoice options - $db = &DB(); - $invopt = $db->Execute(sqlSelect($db,'setup_invoice','*','')); - if ($invopt && $invopt->RecordCount()) { - $VAR[$this->module.'_invoice_delivery'] = $invopt->fields['invoice_delivery']; - $VAR[$this->module.'_invoice_show_itemized'] = $invopt->fields['invoice_show_itemized']; - - } else { - $VAR[$this->module.'_invoice_delivery'] = 0; - $VAR[$this->module.'_invoice_show_itemized'] = 0; - } - - $VAR[$this->module.'_invoice_grace'] = GRACE_PERIOD; - - # If we are called by a child object, then can skip this part - if (get_class($this) == 'account') { - # Validate the password - if (isset($VAR['account_password']) && $VAR['account_password'] != '') { - if (isset($VAR['confirm_password']) && $VAR['account_password'] == $VAR['confirm_password']) { - $password = $VAR['account_password']; - $smarty->assign('confirm_account_password',$VAR['account_password']); - - } else { - # ERROR: The passwords provided do not match! - $smarty->assign('confirm_account_password',''); - $this->validated = false; - array_push($this->val_error,array( - 'field'=>sprintf('%s_%s',$this->module,'_confirm_password'), - 'field_trans'=>$C_translate->translate('field_confirm_password',$this->module,''), - 'error'=>$C_translate->translate('password_change_match',$this->module,'') - )); - } - - } else { - $smarty->assign('confirm_account_password',''); - } - - # Validate that the user's IP & E-mail are not banned! - if ($this->validated) { - if ($C_list->is_installed('blocked_email')) { - require_once(PATH_MODULES.'blocked_email/blocked_email.inc.php'); - $blocked_email = new blocked_email; - - if ($blocked_email->is_blocked($VAR['account_email'])) - array_push($this->val_error,array( - 'field'=>sprintf('%s_%s',$this->module,'email'), - 'field_trans'=>$C_translate->translate('field_email',$this->module,''), - 'error'=>$C_translate->translate('validate_banned_email','','') - )); - } - - if ($C_list->is_installed('blocked_ip')) { - require_once(PATH_MODULES.'blocked_ip/blocked_ip.inc.php'); - $blocked_ip = new blocked_ip; - - if ($blocked_ip->is_blocked(USER_IP)) - array_push($this->val_error,array( - 'field'=>'IP Address', - 'field_trans'=>$C_translate->translate('ip_address',$this->module,''), - 'error'=>$C_translate->translate('validate_banned_ip','','') - )); - } - } - - # Dont set the redirect - $VAR['_noredirect'] = true; - } - - # Add the record - if (! $this->account_id = parent::user_add($VAR)) - return; - - # Password logging class - if ($C_list->is_installed('account_password_history')) { - include_once(PATH_MODULES.'account_password_history/account_password_history.inc.php'); - $accountHistory = new account_password_history(); - - $accountHistory->setNewPassword($this->account_id,$VAR[$this->module.'_password']); - } - - # OK, if we are called by a child, we can return here - if (get_class($this) != 'account') - return $this->account_id; - - # Add the account to the default group - $this->add_account_groups(array(),$this->account_id,false); - - # Mail the user the new_account email template - if ($C_list->is_installed('email_template')) { - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - $my = new email_template; - - if ($VAR['account_status'] == '1') - $my->send('account_registration_active',$this->account_id,$this->account_id,'',''); - else - $my->send('account_registration_inactive',$this->account_id,'','',$this->validation_str($this->account_id)); - } - - # Add the newsletters - if (NEWSLETTER_REGISTRATION == '1') { - $VAR['newsletter_html'] = $VAR['account_email_type']; - $VAR['newsletter_email'] = $VAR['account_email']; - $VAR['newsletter_first_name'] = $VAR['account_first_name']; - $VAR['newsletter_last_name'] = $VAR['account_last_name']; - - require_once(PATH_MODULES.'newsletter/newsletter.inc.php'); - $newsletter = new newsletter; - - $newsletter->subscribe($VAR,$this); - } - - # Log in the user & display the welcome message - if ($VAR['account_status'] == '1') { - if ($this->parent_id == $this->account_id || empty($this->parent_id)) { - $C_debug->alert($C_translate->translate('user_add_active_welcome',$this->module,'')); - - if (SESSION_EXPIRE == 0) - $exp = 99999; - else - $exp = SESSION_EXPIRE; - - $date_expire = (time()+(SESSION_EXPIRE*60)); - - # Update the session - $db = &DB(); - $result = $db->Execute( - sqlUpdate($db,'session',array('ip'=>USER_IP,'date_expire'=>$date_expire,'logged'=>1,'account_id'=>$this->account_id),sprintf('id=::%s::',SESS))); - - # Constants - define('FORCE_SESS_ACCOUNT',$this->account_id); - define('FORCE_SESS_LOGGED',1); - - # Reload the session auth cache - if (CACHE_SESSIONS == '1') { - $force = true; - $C_auth = new CORE_auth($force); - - global $C_auth2; - - $C_auth2 = $C_auth; - } - - if (isset($VAR['_page_next'])) - define('REDIRECT_PAGE','?_page='.$VAR['_page_next']); - elseif (isset($VAR['_page'])) - define('REDIRECT_PAGE','?_page='.$VAR['_page']); - } - - # Affiliate Auto Creation - if (AUTO_AFFILIATE == 1 && $C_list->is_installed('affiliate')) { - $VAR['affiliate_account_id'] = $this->account_id; - $VAR['affiliate_template_id'] = DEFAULT_AFFILIATE_TEMPLATE; - - include_once(PATH_MODULES.'affiliate/affiliate.inc.php'); - $affiliate = new affiliate; - - $affiliate->add($VAR,$affiliate); - } - - } else { - $C_debug->alert($C_translate->translate('user_add_inactive_welcome',$this->module,'')); - define('FORCE_PAGE','core:blank'); - } - } - - /** - * View Account Information - */ - public function user_view($VAR) { - # Check that user is logged in - if (SESS_LOGGED != '1') { - echo 'Sorry, you must be logged in!'; - - return false; - } - - # If we are called from a child class, just return the results from the parent - if (get_class($this) != 'account') - return parent::view($VAR); - - # Check for sub account - if (! empty($VAR['id']) && $VAR['id'] != SESS_ACCOUNT) { - if ($this->isParentAccount($VAR['id'])) { - global $smarty; - - $VAR['account_id'] = $VAR['id']; - $smarty->assign('issubaccount',true); - - } else { - return false; - } - - } else { - $VAR['id'] = SESS_ACCOUNT; - $VAR['account_id'] = SESS_ACCOUNT; - } - - # Retrieve the record - $smart = parent::view($VAR); - - # Get child accounts - $child = array(); - if (empty($smart['parent_id']) || $smart['parent_id']==$smart['id']) { - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'account','id,first_name,last_name,email,username',sprintf('parent_id=%s',SESS_ACCOUNT))); - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - array_push($child,$rs->fields); - $rs->MoveNext(); - } - - global $smarty; - $smarty->assign('subaccount',$child); - } - } - - return $smart; - } - - /** - * Update an account record - * - * @uses account_password_history - * @uses CORE_static_var - */ - public function user_update($VAR) { - global $VAR; - - # Check that user is logged in - if (SESS_LOGGED != '1') { - echo 'Sorry, you must be logged in!'; - - return false; - } - - # Some special processing for account object - if (get_class($this) == 'account') { - # Check for sub account - $issubaccount = false; - if (! empty($VAR['account_id']) && $VAR['account_id'] != SESS_ACCOUNT) { - if ($this->isParentAccount($VAR['account_id'])) { - global $smarty; - - $VAR['id'] = $VAR['account_id']; - $issubaccount = true; - - } else { - return false; - } - - } else { - $VAR['id'] = SESS_ACCOUNT; - $VAR['account_id'] = SESS_ACCOUNT; - } - - # Change password - $password_changed = false; - if (isset($VAR['account_password']) && $VAR['account_password'] != '') { - if (isset($VAR['confirm_password']) && $VAR['account_password'] == $VAR['confirm_password']) { - # Alert: the password has been changed! - global $C_debug,$C_translate; - - $C_debug->alert($C_translate->translate('password_changed',$this->module,'')); - $password_changed = true; - - # Check if new password is ok - global $C_list; - - if ($C_list->is_installed('account_password_history')) { - include_once(PATH_MODULES.'account_password_history/account_password_history.inc.php'); - $accountHistory = new account_password_history(); - - if (! $accountHistory->getIsPasswordOk(SESS_ACCOUNT,$VAR['account_password'],false)) { - $C_debug->alert('The password you have selected has been used recently and cannot be used again at this time for security purposes.'); - unset($VAR['account_password']); - $password_changed=false; - } - } - - } else { - # ERROR: The passwords provided do not match! - global $C_debug,$C_translate; - - $C_debug->alert($C_translate->translate('password_change_match',$this->module,'')); - unset($VAR['account_password']); - } - - } else { - unset($VAR['account_password']); - } - } - - $VAR[$this->module.'_date_last'] = time(); - - # Get required static_Vars and validate them... return an array w/ ALL errors - require_once(PATH_CORE.'static_var.inc.php'); - $static_var = new CORE_static_var; - - $all_error = $static_var->validate_form($this->module,$this->val_error); - - if (! $this->validated || ($all_error != false && gettype($all_error) == 'array')) - $this->validated = false; - else - $this->validated = true; - - /** - * If validation was failed, skip the db insert & - * set the errors & origonal fields as Smarty objects, - * and change the page to be loaded.*/ - - if (! $this->validated) { - global $smarty; - - # set the errors as a Smarty Object - $smarty->assign('form_validation',$all_error); - - # set the page to be loaded - if (! defined('FORCE_PAGE')) - define('FORCE_PAGE',$VAR['_page_current']); - - return; - } - - # Change theme - if (isset($VAR['tid']) && $VAR['tid'] != '') - $VAR[$this->module.'_theme_id'] = $VAR['tid']; - - # Change Language - if (isset($VAR['lid']) && $VAR['lid'] != '') - $VAR[$this->module.'_language_id'] = $VAR['lid']; - - # Change country - if (isset($VAR['cid']) && $VAR['cid'] != '') - $VAR[$this->module.'_country_id'] = $VAR['cid']; - - # Change currency - if (isset($VAR['cyid']) && $VAR['cyid'] != '') - $VAR[$this->module.'_currency_id'] = $VAR['cyid']; - - $VAR[$this->module.'_tax_id'] = $this->validate_tax($VAR); - - # Update the record - $update = parent::update($VAR); - - # Password logging class - if ($password_changed && is_object($accountHistory)) - $accountHistory->setNewPassword(SESS_ACCOUNT,$VAR[$this->module.'_password'],false); - - # Update the static vars - $static_var->update($VAR,$this->module,SESS_ACCOUNT); - - # If we were called from a child class, we can return now - if (get_class($this) != 'account') - return $update; - - # Update groups for subaccount - if ($issubaccount) { - $db = &DB(); - $db->Execute(sqlDelete($db,'account_group',sprintf("group_id>2 AND (service_id IS NULL OR service_id=0 OR service_id='') AND account_id=%s",$VAR['account_id']))); - - if (! empty($VAR['groups'])) { - global $C_auth; - - foreach ($VAR['groups'] as $gid => $val) - if ($gid==$val && $C_auth->auth_group_by_id($gid)) - $db->Execute(sqlInsert($db,'account_group',array('account_id'=>$VAR['account_id'],'group_id'=>$gid,'active'=>1,'date_orig'=>time()))); - } - } - } - - /** - * Password Reset - * - * @uses email_template - */ - public function user_password($VAR) { - global $C_translate,$C_debug; - - # Set the max time between password requests - $LIMIT_SECONDS = 120; //2 minutes - $EXPIRE_TIME = 60*15; //15 minutes - - # Is the username & email both set? - if ((! isset($VAR['account_email']) && ! isset($VAR['account_username'])) || - ((trim($VAR['account_email']) == '' && trim($VAR['account_username']) == '')) || - (($VAR['account_email'] && $VAR['account_username']))) { - - # ERROR: You must enter either your username or e-mail address! - $C_debug->alert($C_translate->translate('password_reset_req',$this->module,'')); - return; - } - - $db = &DB(); - - if ($VAR['account_email']) - $sql = sqlSelect($db,'account','id,email,first_name,last_name',sprintf('email=::%s::',$VAR['account_email'])); - elseif ($VAR['account_username']) - $sql = sqlSelect($db,'account','id,email,first_name,last_name',sprintf('username=::%s::',$VAR['account_username'])); - else - $sql = ''; - - $result = $db->Execute($sql); - - if (! $result || $result->RecordCount() == 0) { - # ERROR: No matches found! - $C_debug->alert($C_translate->translate('password_reset_no_match',$this->module,'')); - - return; - } - - $account = $result->fields['id']; - - # Check that this email has not been requested already in the last LIMIT_SECONDS seconds - $result = $db->Execute(sqlSelect($db,'temporary_data','*',sprintf('field1=::%s::',$account))); - if ($result->RecordCount() > 0) { - $limit = $result->fields['date_orig']+$LIMIT_SECONDS; - - if ($limit>time()) { - $C_debug->alert(sprintf(_('You have already submitted the password reset request for this account within the past %s seconds, please wait to try again'),$LIMIT_SECONDS)); - - return; - - } else { - # Delete the old request - $db->Execute(sqlDelete($db,'temporary_data',sprintf('field1=::%s::',$account))); - } - } - - # Ok to continue - $now = md5(microtime()); - $expire = time()+$EXPIRE_TIME; - - # Create the temporary DB Record - $result = $db->Execute(sqlInsert($db,'temporary_data',array( - 'date_orig'=>time(), - 'date_expire'=>$expire, - 'field1'=>$account, - 'field2'=>$now - ))); - - # Send the password reset email template - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - $my = new email_template; - - $my->send('account_reset_password',$account,'','',$now,false); - - # ALERT: we have sent an email to you.... - $C_debug->alert(_('Thank you, we have sent an email to your email address on file with a link for changing your password. The link is valid for 15 minutes only, so be sure to check your email right away.')); - } - - /** - * Password Reset - * - * @uses account_password_history - */ - public function user_password_reset($VAR) { - global $C_translate,$C_debug,$smarty; - - # Validate that the password && confirm password is set - if (! isset($VAR['account_password']) || ! isset($VAR['confirm_password']) || $VAR['account_password'] == '') { - # ERROR - $message = $C_translate->translate('password_reset_reqq',$this->module,''); - $C_debug->alert($message); - - return; - - } else if ($VAR['account_password'] != $VAR['confirm_password']) { - # ERROR - $message = $C_translate->translate('password_change_match',$this->module,''); - $C_debug->alert($message); - - return; - - } else { - # Hash the password - if (defined('PASSWORD_ENCODING_SHA')) - $password = sha1($VAR['account_password']); - else - $password = md5($VAR['account_password']); - } - - if (! isset($VAR['validate']) || $VAR['validate'] == '') { - # ERROR: bad link.... - $url = sprintf('<br><a href="%s?_page=account:user_password">%s</a>',URL,$C_translate->translate('submit','CORE','')); - $message = $C_translate->translate('password_reset_bad_url',$this->module,''); - $C_debug->alert($message.$url); - - return; - } - - # Get the temporary record from the database - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'temporary_data','field1,field2',sprintf('date_expire>=%s AND field2=::%s::',time(),$VAR['validate']))); - - if ($result->RecordCount() == 0) { - # ERROR: no match for submitted link, invalid or expired. - $url = sprintf('<br><a href="%s?_page=account:user_password">%s</a>',URL,$C_translate->translate('submit','CORE','')); - $message = $C_translate->translate('password_reset_bad_url',$this->module,''); - $C_debug->alert($message.$url); - - return; - } - - $account_id = $result->fields['field1']; - - # Check if new password is ok - global $C_list; - - if ($C_list->is_installed('account_password_history')) { - include_once(PATH_MODULES.'account_password_history/account_password_history.inc.php'); - $accountHistory = new account_password_history(); - - if (! $accountHistory->getIsPasswordOk($account_id,$password)) { - $C_debug->alert('The password you have selected has been used recently and cannot be used again at this time for security purposes.'); - - return; - } - } - - # Delete the temporary record - $db->Execute(sqlDelete($db,'temporary_data',sprintf('field2=::%s::',$VAR['validate']))); - - # Update the password record - $db->Execute(sqlUpdate($db,'account',array('date_last'=>time(),'password'=>$password),sprintf('id=%s',$account_id))); - - # Password logging class - if (! empty($accountHistory) && is_object($accountHistory)) - $accountHistory->setNewPassword($account_id,$password); - - # Return the success message - $C_debug->alert($C_translate->translate('password_update_success',$this->module,'')); - $smarty->assign('pw_changed',true); - } - - /** - * Verify and activate an account - */ - public function user_verify($VAR) { - global $C_debug,$C_translate,$smarty; - - # Validate $verify is set - if (! isset($VAR['verify']) || $VAR['verify'] == '') { - # Error: please use the form below ... - $smarty->assign('verify_results',false); - $C_debug->alert($C_translate->translate('validate_fail',$this->module)); - - return; - } - - $verify = explode(':',$VAR['verify']); - - # Validate the $verify string. - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'account','id,username,status',array('id'=>$verify[1],'date_orig'=>$verify[0]))); - if ($result->RecordCount() == 0) { - # Error: please use the form below ... - $smarty->assign('verify_results',false); - $C_debug->alert($C_translate->translate('validate_fail',$this->module,'')); - - return; - } - - # Check the status - $status = $result->fields['status']; - $username = $result->fields['username']; - if ($status == '1') { - # Account already active! - $smarty->assign('verify_results',true); - - return; - } - - # Update the account status - $db->Execute(sqlUpdate($db,'account',array('status'=>1),array('id'=>$verify[1]))); - - # Account now active! - $smarty->assign('verify_results',true); - - # Return the success message - $C_debug->alert($C_translate->translate('password_update_success',$this->module,'')); - } - - /** - * Resend Verify Code - * - * @uses email_template - */ - public function user_verify_resend($VAR) { - global $C_translate,$C_debug; - - # Is the username & email both set? - if ((! isset($VAR['account_email']) && ! isset($VAR['account_username'])) || - ((trim($VAR['account_email']) == '' && trim($VAR['account_username']) == '')) || - (($VAR['account_email'] && $VAR['account_username']))) { - - # ERROR: You must enter either your username or e-mail address! - $C_debug->alert($C_translate->translate('verify_resend_req',$this->module,'')); - - return; - } - - $db = &DB(); - - if ($VAR['account_email']) - $sql = sqlSelect($db,'account','id,date_orig,status,email,first_name,last_name',array('email'=>$VAR['account_email'])); - elseif ($VAR['account_username']) - $sql = sqlSelect($db,'account','id,date_orig,status,email,first_name,last_name',array('username'=>$VAR['account_username'])); - else - $sql = ''; - - $result = $db->Execute($sql); - - if (! $result || $result->RecordCount() == 0) { - # ERROR: No matches found! - $C_debug->alert($C_translate->translate('password_reset_no_match',$this->module,'')); - - return; - } - - $account = $result->fields['id']; - - if ($result->fields['status'] == '1') { - # ERROR: This account is already active! - $C_debug->alert($C_translate->translate('verify_resend_active',$this->module,'')); - - return; - } - - # Resend the pending email - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - $my = new email_template; - - $my->send('account_registration_inactive',$account,$account,'',$this->validation_str($account)); - - # Notice that the email is sent - $C_debug->alert($C_translate->translate('user_add_inactive_welcome',$this->module,'')); - } - - /** - * Validate the Tax ID - * - * @uses tax - */ - private function validate_tax($VAR) { - # Validate the tax_id - require_once(PATH_MODULES.'tax/tax.inc.php'); - $taxObj = new tax; - - $tif = $this->module.'_tax_id'; - $tef = $this->module.'_tax_id_exempt'; - $cid = $this->module.'_country_id'; - if (isset($VAR[$tif]) && isset($VAR[$cid]) && is_array($VAR[$tif])) { - foreach ($VAR[$tif] as $country_id => $tax_id) { - if ($country_id == $VAR[$cid]) { - - $exempt = @$VAR[$tef][$country_id]; - - if (! $txRs = $taxObj->TaxIdsValidate($country_id,$tax_id,$exempt)) { - $this->validated = false; - - global $C_translate; - array_push($this->val_error,array( - 'field'=>$tif, - 'field_trans'=>$taxObj->errField, - 'error'=>$C_translate->translate('validate_general','','') - )); - } - - if ($exempt) - return false; - else - return $tax_id; - } - } - } - - return false; - } - - /** - * Return validation string - */ - private function validation_str($id) { - $db = &DB(); - - $rs = $db->Execute(sqlSelect($db,'account','date_orig',array('id'=>$id))); - if ($rs && $rs->RecordCount()) - return sprintf('%s:%s',$rs->fields['date_orig'],$id); - else - return false; - } - - protected function add_account_groups($groups,$account,$expire) { - global $C_auth,$C_debug; - - $db = &DB(); - $addDefault = true; - - # Loop through the array to add each account_group record - for ($i=0; $i<count($groups); $i++) { - # Verify the admin adding this account is authorized for this group themselves, otherwise skip - if ($C_auth->auth_group_by_id($groups[$i])) { - $result = $db->Execute(sqlInsert($db,'account_group',array('date_orig'=>time(),'date_expire'=>$expire,'group_id'=>$groups[$i],'account_id'=>$account,'active'=>1))); - $addDefault = false; - - # Error reporting - if ($result === false) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - } - - # Add default group - if ($addDefault) { - $result = $db->Execute(sqlInsert($db,'account_group',array('date_orig'=>time(),'date_expire'=>$expire,'group_id'=>DEFAULT_GROUP,'account_id'=>$account,'active'=>1))); - - # Error reporting - if ($result === false) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - } - - public function __construct($id=null) { - if (! defined('AJAX')) - parent::__construct($id); - } - - /** - * Account Custom Group Search - */ - public function group_search($VAR) { - # Get date ranges - $sql = $this->sql_search_date($VAR,'A'); - - # Get group(s) - $sql2 = $this->sql_build($VAR,'groups','group_id'); - - if (! empty($sql2)) { - if (! empty($sql)) - $sql .= ' AND '; - - $sql .= sprintf('(%s) AND (A.id=B.account_id AND B.active=1)',$sql2); - } - - # Assemble SQL - $q = sprintf('SELECT DISTINCT A.* FROM %saccount AS A, %saccount_group AS B WHERE (A.site_id=%s AND B.site_id =%s)', - AGILE_DB_PREFIX,AGILE_DB_PREFIX,DEFAULT_SITE,DEFAULT_SITE); - - if (! empty($sql)) - $q .= sprintf(' AND %s',$sql); - - $db = &DB(); - $rs = $db->Execute($q); - - echo '<pre>'; - - # Print results in text format - if ($rs && $rs->RecordCount() > 0) { - while (! $rs->EOF) { - printf("%s %s, %s, %s\r\n",$rs->fields['first_name'],$rs->fields['last_name'],$rs->fields['email'],$rs->fields['company']); - $rs->MoveNext(); - } - - } else { - echo '<B>No matches</B>!'; - } - - echo '</pre>'; - } - - /** - * Account Custom Product Search - */ - public function product_search($VAR) { - # Get date ranges - $sql = $this->sql_search_date($VAR,'B'); - - # Get group(s) - $sql2 = $this->sql_build($VAR,'products','product_id'); - - if (! empty($sql2)) { - if (! empty($sql)) - $sql .= ' AND '; - - $sql .= sprintf('(%s) AND (A.id=C.account_id AND C.id=B.invoice_id) ',$sql2); - } - - # Assemble SQL - $q = sprintf('SELECT DISTINCT A.* FROM %saccount as A, %sinvoice_item as B, %sinvoice as C WHERE (A.site_id=%s AND C.site_id=%s AND B.site_id=%s)', - AGILE_DB_PREFIX,AGILE_DB_PREFIX,AGILE_DB_PREFIX,DEFAULT_SITE,DEFAULT_SITE,DEFAULT_SITE); - - if (! empty($sql)) - $q .= sprintf(' AND %s',$sql); - - $db = &DB(); - $rs = $db->Execute($q); - - echo '<pre>'; - - # Print results in text format - if ($rs && $rs->RecordCount() > 0) { - while (! $rs->EOF) { - printf("%s %s, %s, %s\r\n",$rs->fields['first_name'],$rs->fields['last_name'],$rs->fields['email'],$rs->fields['company']); - $rs->MoveNext(); - } - - } else { - echo '<B>No matches</B>!'; - } - - echo '</pre>'; - } - - /** - * Return the SQL that create the search dates for a custom search - * - * @uses CORE_validate - */ - private function sql_search_date($VAR,$table) { - include_once(PATH_CORE.'validate.inc.php'); - $validate = new CORE_validate; - $sql = ''; - - # Get date ranges - if (isset($VAR['dates']['val']) && is_array($VAR['dates']['val'])) - foreach($VAR['dates']['val'] as $cond => $val) { - if ($val > 0) { - $exp = $VAR['dates']['expr'][$cond]; - - if (! empty($sql)) - $sql .= ' AND '; - - $sql .= sprintf('%s.date_orig %s %s',$table,$exp,$validate->convert_date($val)); - } - } - - if (! empty($sql)) - $sql = sprintf('(%s)',$sql); - - return $sql; - } - - /** - * SQL query builder - */ - private function sql_build($VAR,$index,$field) { - $sql = ''; - - if (! empty($VAR[$index])) { - foreach($VAR[$index] as $a) { - if ($a != 0) { - if (! empty($sql)) - $sql .= ' OR '; - - $sql .= sprintf('B.%s=%s',$field,$a); - } - } - } - - return $sql; - } - - /** - * AJAX selector - * Renders the account details in field before submit - */ - public function autoselect($VAR) { - if (! isset($VAR['return']) || ! isset($VAR['field'])) - return; - - $return = $VAR['return']; - $field = sprintf('autosearch_%s',$VAR['field']); - $fieldlist = 'email,first_name,last_name,username'; - $sort = 'first_name,last_name'; - - if (empty($VAR[$field])) - $where = 'id > 0'; - - elseif (is_numeric($VAR[$field])) - $where = sprintf('id LIKE "%s%%"',$VAR[$field]); - - elseif (preg_match('/ /',$VAR[$field])) { - $arr = explode(' ',$VAR[$field]); - $where = sprintf('(first_name LIKE "%s%%" AND last_name LIKE "%s%%") OR (company LIKE "%s%%")',$arr[0],$arr[1],$VAR[$field]); - - } elseif (preg_match('/@/',$VAR[$field])) - $where = sprintf('email LIKE "%%%s%%"',$VAR[$field]); - - else - $where = sprintf('(username LIKE "%s%%" OR first_name LIKE "%s%%" OR last_name LIKE "%s%%" OR company LIKE "%s%%")', - $VAR[$field],$VAR[$field],$VAR[$field],$VAR[$field]); - - $where .= 'AND status=1'; - - if (! preg_match("/{$return}/",$fieldlist)) - $fieldlist .= ','.$return; - - $db = &DB(); - $result = $db->SelectLimit(sqlSelect($db,'account',$fieldlist,$where,$sort),10); - - # Render the results - echo '<ul>'; - - if ($result->RecordCount() > 0) { - while (! $result->EOF) { - printf('<li><div class="name"><b>%s %s (%s)</b></div><div class="email"><span class="informal">%s</span></div><div class="index" style="display:none">%s</div></li>', - $result->fields['first_name'],$result->fields['last_name'],$result->fields['username'],$result->fields['email'],$result->fields[$return]); - - $result->MoveNext(); - } - } - - echo '</ul>'; - } - - /** - * Login as user - * Called by "Become User" - * - * @uses CORE_login_handler - */ - public function login($VAR) { - global $C_auth; - - $db = &DB(); - - # Check for target user - $display_this = false; - if (! empty($VAR['account_id'])) { - # Get any authorized groups of the target account - $groups = $db->Execute(sqlSelect($db,'account_group','group_id',sprintf('account_id=%s AND active=1',$VAR['account_id']),'group_id')); - - $group = array(); - while (! $groups->EOF) { - array_push($group,$groups->fields['group_id']); - $groups->MoveNext(); - } - - # Verify the user has access to view this account - if (SESS_ACCOUNT != $VAR['account_id']) { - $display_this = true; - - for ($ix=0; $ix<count($group); $ix++) - if (! $C_auth->auth_group_by_id($group[$ix])) - $display_this = false; - - } else { - return false; - } - - } else { - return false; - } - - # Logout current user and login as the target user - if ($display_this) { - $acct = $db->Execute(sqlSelect($db,'account','username,password',sprintf('id=%s',$VAR['account_id']))); - $arr['_username'] = $acct->fields['username']; - $arr['_password'] = $acct->fields['password']; - - include_once(PATH_CORE.'login.inc.php'); - $login = new CORE_login_handler; - - $login->logout($VAR); - $login->login($arr,$md5=false); - define('REDIRECT_PAGE',sprintf('?_page=account:account&tid=%s',DEFAULT_THEME)); - } - } - - #@todo appears to be unused - private function popup_search($VAR) - { - $db = &DB(); - if (empty($VAR['search'])) { - $where = ''; - } elseif (eregi(" ", $VAR['search'])) { - $arr = explode(" ", $VAR['search']); - $where = "first_name = ".$db->qstr($arr[0])." AND ". - "last_name LIKE ".$db->qstr('%'.$arr[1].'%')." AND "; - } else { - $where = "username LIKE ".$db->qstr('%'.$VAR['search'].'%')." OR ". - "first_name LIKE ".$db->qstr('%'.$VAR['search'].'%')." OR ". - "first_name LIKE ".$db->qstr('%'.$VAR['search'].'%')." OR ". - "company LIKE ". $db->qstr('%'.$VAR['search'].'%')." AND "; - } - - $q = "SELECT id,first_name,last_name - FROM ".AGILE_DB_PREFIX."account - WHERE $where - site_id = '" . DEFAULT_SITE . "'"; - - $q_save = "SELECT * FROM ".AGILE_DB_PREFIX."account WHERE $where %%whereList%% "; - $result = $db->Execute($q); - - /// DEBUG //// - // echo "<PRE>$q</PRE>"; - - # get the result count - $results = $result->RecordCount(); - - # Create the alert for no records found - if ($results == 0) - { - $id = $result->fields['id']; - $name = $result->fields['first_name'].' '.$result->fields['last_name']; - $val = $id.'|'.$name; - $res = ' - <script language=\'javascript\'> - window.parent.popup_clear_'.$VAR['field'].'(true); - alert("No matches found"); - window.close(); - </script> '; - echo $res; - } - else if ($results == 1) - { - $id = $result->fields['id']; - $name = $result->fields['first_name'].' '.$result->fields['last_name']; - $val = $id.'|'.$name; - $res = ' - <script language=\'javascript\'> - window.parent.popup_fill_'.$VAR['field'].'("'.$val.'"); - window.close(); - </script> '; - echo $res; - } - else - { - # create the search record - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $arr['module'] = $this->module; - $arr['sql'] = $q_save; - $arr['limit'] = '30'; - $arr['order_by'] = 'last_name'; - $arr['results'] = $results; - $search->add($arr); - - global $smarty; - $smarty->assign('search_id', $search->id); - $smarty->assign('page', '1'); - $smarty->assign('limit', $limit); - $smarty->assign('order_by', $order_by); - $smarty->assign('results', $results); - - $res = ' - <script language=\'javascript\'> - function popup_fill(val) { - window.parent.popup_fill_'.$VAR['field'].'(val); - } - window.open("?_page=account:iframe_search_show&_escape=1&search_id='.$search->id.'&page=1","account_select_popup","toolbar=no,status=no,width=400,height=500"); - </script> '; - - echo $res; - - } - } - - ########################################### - ### Top Accounts Graph - ########################################### - #@todo appears to be redundant ?page=core:graphview - private function top($VAR) - { - global $smarty, $C_translate, $C_auth; - - # Get the period type, default to month - if (empty($VAR['period'])) - $p = 'm'; - else - $p = $VAR['period']; - - # Load the jpgraph class - include(PATH_GRAPH."jpgraph.php"); - include(PATH_GRAPH."jpgraph_bar.php"); - - # check the validation for this function - if(!$C_auth->auth_method_by_name($this->module,'search')) { - $error = $C_translate->translate('module_non_auth','',''); - include(PATH_GRAPH."jpgraph_canvas.php"); - $graph = new CanvasGraph(460,55,"auto"); - $t1 = new Text($error); - $t1->Pos(0.2,0.5); - $t1->SetOrientation("h"); - $t1->SetBox("white","black",'gray'); - $t1->SetFont(FF_FONT1,FS_NORMAL); - $t1->SetColor("black"); - $graph->AddText($t1); - $graph->Stroke(); - exit; - } - - # Get the period start & end - switch ($p) - { - # By Weeks - case 'w': - $interval = "1"; - $width = ".9"; - $title = 'Top Accounts for Last Last Week'; - $dow = date('w'); - $start_str = mktime(0,0,0,date('m'), date('d')-$dow, date('y')); - $end_str = mktime(23,59,59,date('m'), date('d'), date('y')); - break; - - # By Months - case 'm': - $interval = "3"; - $width = ".6"; - $title = 'Top Accounts for Last Last Month'; - $start_str = mktime(0,0,0,date('m'), 1, date('y')); - $end_str = mktime(23,59,59,date('m'), date('d'), date('y')); - break; - - # By Years - case 'y': - $interval = "1"; - $width = ".8"; - $title = 'Top Accounts for Last Last Year'; - $start_str = mktime(0,0,0,1,1, date('y')); - $end_str = mktime(23,59,59, date('m'), date('d'), date('y')); - break; - } - - - ##############################@@@@@@@@ - # Get accounts & sales for this period - ##############################@@@@@@@@ - $db = &DB(); - $sql = 'SELECT account_id,total_amt FROM ' . AGILE_DB_PREFIX . 'invoice WHERE - date_orig >= ' . $db->qstr( $start_str ) . ' AND date_orig <= ' . $db->qstr( $end_str ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - if(@$result->RecordCount() == 0) { - $file = fopen( PATH_THEMES.'default_admin/images/invisible.gif', 'r'); - fpassthru($file); - exit; - } - - while(!$result->EOF) - { - $amt = $result->fields['total_amt']; - $acct = $result->fields['account_id']; - if(!isset( $arr[$acct] )) $arr[$acct] = 0; - $arr[$acct] += $amt; - $result->MoveNext(); - } - - $i = 0; - while(list($key, $var) = each(@$arr)) { - # Get the user name - $sql = 'SELECT first_name,last_name FROM ' . AGILE_DB_PREFIX . 'account WHERE - id = ' . $db->qstr( $key ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - - $_lbl[] = strtoupper(substr($rs->fields['first_name'],0,1)) . ". " . $rs->fields['last_name']; - $_datay[] = $var; - $i++; - } - - - ### Sort the arrays - array_multisort($_datay,SORT_DESC, SORT_NUMERIC, $_lbl); - - ### Limit the results to 10 or less - for($i=0; $i<count($_lbl); $i++) { - $lbl[$i] = $_lbl[$i]; - $datay[$i] = $_datay[$i]; - if($i>=9) $i = count($_lbl); - } - - $i = count($lbl); - - - # Get the Currency - $sql = 'SELECT symbol FROM ' . AGILE_DB_PREFIX . 'currency WHERE - id = ' . $db->qstr( DEFAULT_CURRENCY ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - $currency_iso = $rs->fields['symbol']; - - // Size of graph - $width=265; - $height=75 + ($i*15); - - // Set the basic parameters of the graph - $graph = new Graph($width,$height,'auto'); - $graph->SetScale("textlin"); - $graph->yaxis->scale->SetGrace(50); - $graph->SetMarginColor('#F9F9F9'); - $graph->SetFrame(true,'#CCCCCC',1); - $graph->SetColor('#FFFFFF'); - - $top = 45; - $bottom = 10; - $left = 95; - $right = 15; - $graph->Set90AndMargin($left,$right,$top,$bottom); - - // Label align for X-axis - $graph->xaxis->SetLabelAlign('right','center','right'); - - // Label align for Y-axis - $graph->yaxis->SetLabelAlign('center','bottom'); - $graph->xaxis->SetTickLabels($lbl); - - // Titles - $graph->title->SetFont(FF_FONT1,FS_BOLD,9.5); - $title = $C_translate->translate('graph_top','account_admin',''); - $graph->title->Set($title); - - // Create a bar pot - $bplot = new BarPlot($datay); - $bplot->SetFillColor("#506DC7"); - $bplot->SetWidth(0.2); - - // Show the values - $bplot->value->Show(); - $bplot->value->SetFont(FF_FONT1,FS_NORMAL,8); - $bplot->value->SetAlign('center','center'); - $bplot->value->SetColor("black","darkred"); - $bplot->value->SetFormat($currency_iso.'%.2f'); - - $graph->Add($bplot); - $graph->Stroke(); - - return; - } - - /** - * Send an email to an account - * - * @uses CORE_email - */ - public function mail_one($VAR) { - global $C_translate,$C_debug; - - # Validate the required vars (account_id, message, subject) - if (@$VAR['mail_account_id'] != '' && @$VAR['mail_subject'] != '' && @$VAR['mail_message'] != '') { - # Verify the specified account - $db = &DB(); - $account = $db->Execute(sqlSelect($db,'account','email,first_name,last_name',sprintf('id=%s',$VAR['mail_account_id']))); - - if ($account->RecordCount() == 0) { - # Error message - $C_debug->alert($C_translate->translate('account_non_exist',$this->module,'')); - - return; - } - - # OK to send the email - $db = &DB(); - $setup_email = $db->Execute(sqlSelect($db,'setup_email','*',sprintf('id=%s',$VAR['mail_email_id']))); - - $E['priority'] = $VAR['mail_priority']; - $E['html'] = '0'; - $E['subject'] = $VAR['mail_subject']; - $E['body_text'] = $VAR['mail_message']; - $E['to_email'] = $account->fields['email']; - $E['to_name'] = sprintf('%s %s',$account->fields['first_name'],$account->fields['last_name']); - - if ($setup_email->fields['type'] == 0) { - $type = 0; - - } else { - $type = 1; - $E['server'] = $setup_email->fields['server']; - $E['account'] = $setup_email->fields['username']; - $E['password'] = $setup_email->fields['password']; - } - - $E['from_name'] = $setup_email->fields['from_name']; - $E['from_email'] = $setup_email->fields['from_email']; - - if ($setup_email->fields['cc_list'] != '') - $E['cc_list'] = explode(',',$setup_email->fields['cc_list']); - - if ($setup_email->fields['bcc_list'] != '') - $E['bcc_list'] = explode(',',$setup_email->fields['bcc_list']); - - # Call the mail class - require_once(PATH_CORE.'email.inc.php'); - $email = new CORE_email; - - if ($type == 0) - $email->PHP_Mail($E); - else - $email->SMTP_Mail($E); - - } else { - global $C_vars; - - # Error message - $C_debug->alert($C_translate->translate('validate_any','','')); - $C_vars->strip_slashes_all(); - - return; - } - - global $C_vars; - - # Success message - $C_debug->alert($C_translate->translate('mail_sent',$this->module,'')); - $C_vars->strip_slashes_all(); - } - - /** - * Send a mail to multiple recipients - * Send email to the receipients found from a search - * - * @uses CORE_email - * @uses CORE_search - */ - public function mail_multi($VAR) { - global $C_translate, $C_debug; - - # Validate the required vars (account_id, message, subject) - if (@$VAR['search_id'] != '' && @$VAR['mail_subject'] != '' && @$VAR['mail_message'] != '') { - - # Get the search details - if (isset($VAR['search_id'])) { - include_once(PATH_CORE.'search.inc.php'); - $search = new CORE_search; - - $search->get($VAR['search_id']); - } else { - # Invalid search! - # @todo Translate - echo '<BR> The search terms submitted were invalid!'; - - return; - } - - # Generate the full query - $field_list = sprintf('%saccount.email,%saccount.first_name,%saccount.last_name',AGILE_DB_PREFIX,AGILE_DB_PREFIX,AGILE_DB_PREFIX); - - $q = str_replace('%%fieldList%%',$field_list,$search->sql); - $q = str_replace('%%tableList%%',AGILE_DB_PREFIX.'account',$q); - $q = str_replace('%%whereList%%','',$q); - - $q .= sprintf('%saccount.site_id=%s',AGILE_DB_PREFIX,DEFAULT_SITE); - $db = &DB(); - $account = $db->Execute($q); - - # Check results - if ($account->RecordCount() == 0) { - $C_debug->alert($C_translate->translate('account_non_exist',$this->module,'')); - - return; - } - - # Get the selected email setup details - $db = &DB(); - $setup_email = $db->Execute(sqlSelect($db,'setup_email','*',sprintf('id=%s',$VAR['mail_email_id']))); - if ($setup_email->fields['type'] == 0) { - $type = 0; - - } else { - $type = 1; - - $E['server'] = $setup_email->fields['server']; - $E['account'] = $setup_email->fields['username']; - $E['password'] = $setup_email->fields['password']; - } - - $E['priority'] = $VAR['mail_priority']; - $E['html'] = '0'; - $E['subject'] = $VAR['mail_subject']; - $E['body_text'] = $VAR['mail_message']; - $E['from_name'] = $setup_email->fields['from_name']; - $E['from_email'] = $setup_email->fields['from_email']; - - # Loop to send each e-mail - while (! $account->EOF) { - $E['to_email'] = $account->fields['email']; - $E['to_name'] = sprintf('%s %s',$account->fields['first_name'],$account->fields['last_name']); - - # Call the mail class - require_once(PATH_CORE.'email.inc.php'); - $email = new CORE_email; - - if ($type == 0) - $email->PHP_Mail($E); - else - $email->SMTP_Mail($E); - - # Next record - $account->MoveNext(); - } - - } else { - global $C_vars; - - # Error message - $C_debug->alert($C_translate->translate('validate_any','','')); - $C_vars->strip_slashes_all(); - - return; - } - - global $C_vars; - - # Success message - $C_debug->alert($C_translate->translate('mail_sent',$this->module,'')); - $C_vars->strip_slashes_all(); - } - - /** - * Send Password Reminder - * - * @uses email_template - */ - public function send_password_email($VAR) { - global $C_translate,$C_debug; - - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - $my = new email_template; - - $my->send('password_change_instructions',@$VAR['id'],'','',''); - echo $C_translate->translate('password_change_instructions',$this->module,''); - } - - /** - * Send users verification email - * - * @uses email_template - */ - public function send_verify_email($VAR) { - global $C_translate,$C_debug; - - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - $my = new email_template; - - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'account','date_orig',sprintf('id=%s',$VAR['id']))); - - $my->send('account_registration_inactive',$VAR['id'],$VAR['id'],'',$this->validation_str($VAR['id'])); - echo $C_translate->translate('account_verify_instructions',$this->module,''); - } - - /** - * Add new accounts - * - * @uses CORE_validate - * @uses email_template - * @uses affiliate - */ - public function add($VAR) { - global $C_list,$C_translate,$C_debug,$smarty; - - if (! empty($VAR['account_date_expire'])) { - include_once(PATH_CORE.'validate.inc.php'); - $val = new CORE_validate($VAR); - - $VAR['account_date_expire'] = $val->convert_date($VAR['account_date_expire']); - } else { - $VAR['account_date_expire'] = 0; - } - - # If the username is blank, auto generate one - if (empty($VAR['account_username'])) { - $VAR['account_username'] = ''; - $length = 4; - srand((double)microtime()*1000000); - $vowels = array('a','e','i','o','u'); - $cons = array('b','c','d','g','h','j','k','l','m','n','p','r','s','t','u','v','w','tr','cr','br','fr','th','dr','ch','ph','wr','st','sp','sw','pr','sl','cl'); - - $num_vowels = count($vowels); - $num_cons = count($cons); - for ($i=0; $i<$length; $i++) - $VAR['account_username'] .= $cons[rand(0,$num_cons-1)].$vowels[rand(0,$num_vowels-1)]; - } - - # If the password is blank, auto generate one - if (empty($VAR['account_password'])) { - $passwd = '********'; - - srand((double)microtime() * 1000000); - $UniqID = md5(uniqid(rand())); - $VAR['account_password'] = substr(md5(uniqid(rand())),0,10); - - } else { - $passwd = $VAR['account_password']; - } - - # Add the record - if (! $this->account_id = parent::add($VAR)) - return; - - # Add the account to the groups - $this->add_account_groups($VAR['groups'],$this->account_id,$VAR['account_date_expire']); - - # Mail the new user - if (! empty($VAR['welcome_email'])) { - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - $my = new email_template; - - if ($VAR['account_status'] == '1') - $my->send('account_add_staff_active',$this->account_id,'','',$passwd); - - else - $my->send('account_add_staff_inactive',$this->account_id,$this->account_id,'',$this->validation_str($this->account_id)); - } - - # Display the welcome message - if ($VAR['account_status'] == '1') - $C_debug->alert($C_translate->translate('staff_add_active',$this->module,'')); - else - $C_debug->alert($C_translate->translate('staff_add_inactive',$this->module,'')); - - # Affiliate Auto Creation - if (AUTO_AFFILIATE == 1 && $C_list->is_installed('affiliate')) { - $VAR['affiliate_account_id'] = $this->account_id; - $VAR['affiliate_template_id'] = DEFAULT_AFFILIATE_TEMPLATE; - $VAR['affiliate_parent_affiliate_id'] = $VAR['account_affiliate_id']; - - include_once(PATH_MODULES.'affiliate/affiliate.inc.php'); - $affiliate = new affiliate; - - $affiliate->add($VAR,$affiliate); - } - - return; - } - - /** - * View an Account - */ - public function view($VAR) { - global $C_auth; - - $db = &DB(); - - # Get our results - $smart = parent::view($VAR); - - if ($smart) { - # Get any authorized groups - $view = $db->Execute(sqlSelect($db,'account_group','service_id,group_id',array('account_id'=>$VAR['id'],'active'=>1),'group_id')); - - while (! $view->EOF) { - $smart['groups'] = array(); - - if ($view->fields['service_id'] == '') - array_push($smart['groups'],$view->fields['group_id']); - - $view->MoveNext(); - } - - # Verify the user has access to view this account - if (SESS_ACCOUNT != $VAR['id']) { - $smart['own_account'] = false; - - $display_this = true; - for ($ix=0; $ix<count($group); $ix++) - if (!$C_auth->auth_group_by_id($group[$ix])) - $display_this = false; - - } else { - $display_this = true; - $smart['own_account'] = true; - } - - # define the results - if (! $display_this) { - unset($smart); - echo 'You have selected an account for which you are not authorized, your permission settings are to low!<br/><br/>'; - - continue; - } - - # Get the last activity date/IP - $view = $db->SelectLimit(sqlSelect($db,'login_log','*',array('account_id'=>$VAR['id']),'date_orig DESC'),1); - - if ($view && $view->RecordCount() == 1) { - $smart['last_activity'] = $view->fields['date_orig']; - $smart['last_ip'] = $view->fields['ip']; - } else { - $smart['last_activity'] = ''; - $smart['last_ip'] = ''; - } - - # Get invoice details for this account - $view = $db->SelectLimit(sqlSelect($db,'invoice','id,date_orig,total_amt,IFNULL(credit_amt,0) as credit_amt,status,billed_amt,process_status',array('account_id'=>$VAR['id']),'id DESC'),10); - if ($view && $view->RecordCount() > 0) { - $smart['invoice'] = array(); - - while (! $view->EOF) { - if ($view->fields['total_amt'] > $view->fields['billed_amt'] && $view->fields['suspend_billing'] != 1) - $view->fields['due'] = round($view->fields['total_amt']-$view->fields['billed_amt']-$view->fields['credit_amt'],2); - - array_push($smart['invoice'],$view->fields); - $view->MoveNext(); - } - } - - # Get service details for this account - $view = $db->SelectLimit(sqlSelect($db,'service','id,sku,price,active,type,domain_name,domain_tld',array('account_id'=>$VAR['id']),'id DESC'),10); - if ($view && $view->RecordCount() > 0) { - $smart['service'] = array(); - - while (! $view->EOF) { - array_push($smart['service'],$view->fields); - $view->MoveNext(); - } - } - - # Get payment details for this account - $rs = $db->SelectLimit(sqlSelect($db,array('payment','payment_item'),'A.id,A.date_payment,A.total_amt,SUM(B.alloc_amt) AS alloc_amt', - sprintf('A.account_id=%s AND B.payment_id=A.id',$VAR['id']),'A.date_payment DESC','','','B.payment_id'),10); - if ($rs && $rs->RecordCount() > 0) { - $smart['payment'] = array(); - - while (! $rs->EOF) { - array_push($smart['payment'],$rs->fields); - $rs->MoveNext(); - } - } - - # Get invoices to be generated for this account - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - $invoice = new invoice; - - $view = $db->Execute($invoice->sql_invoice_soon(null,null,$VAR['id'])); - if ($view && $view->RecordCount() > 0) { - $smart['duesoon'] = array(); - - while (! $view->EOF) { - array_push($smart['duesoon'],$view->fields); - $view->MoveNext(); - } - } - - # No results - } else { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,'The selected record does not exist any longer, or your account is not authorized to view it'); - - return; - } - - global $smarty; - $smarty->assign('record',$smart); - } - - /** - * Update an account - */ - public function update($VAR) { - if (isset($VAR['process_account_password']) && $VAR['process_account_password']) - $VAR['account_password'] = $VAR['process_account_password']; - - $ok = parent::update($VAR); - - if ($ok) { - # Remove login lock - if ($VAR['account_status']) { - $db = &DB(); - $delrs = $db->Execute(sqlDelete($db,'login_lock',sprintf('account_id=%s',$VAR['account_id']))); - $delrs = $db->Execute(sqlDelete($db,'login_log',sprintf('account_id=%s AND status=0',$VAR['account_id']))); - } - - return true; - } - } - - /** - * Merge two accounts together - * - * @uses CORE_auth - */ - public function merge($VAR) { - global $C_auth,$C_list,$C_translate,$C_debug; - - $db = &DB(); - - if (empty($VAR['id']) || empty($VAR['merge_acct_id'])) { - $C_debug->alert($C_translate->translate('merge_err',$this->module,'')); - - return false; - } - - $acct_id = $VAR['id']; - $merge_acct_id = $VAR['merge_acct_id']; - - # Get merged account_group - $rs = $db->Execute(sqlSelect($db,'account_group','*',sprintf("(service_id = '' OR service_id = 0 OR service_id IS NULL) AND account_id=%s",$acct_id))); - if ($rs === false) { - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - } else { - while (! $rs->EOF) { - $Cauth = new CORE_auth(true); - - if ($Cauth->auth_group_by_account_id($merge_acct_id,$rs->fields['group_id'])) - # Duplicate group, delete - $db->Execute(sqlDelete($db,'account_group',sprintf('id=%s',$rs->fields['id']))); - - $rs->MoveNext(); - } - } - - # Default table - $merge = array( - 'account_group'=>'account_id', - 'account_billing'=>'account_id', - 'cart'=>'account_id', - 'charge'=>'account_id', - 'discount'=>'avail_account_id', - 'invoice'=>'account_id', - 'log_error'=>'account_id', - 'login_lock'=>'account_id', - 'login_log'=>'account_id', - 'search'=>'account_id', - 'service'=>'account_id', - 'session'=>'account_id', - 'staff'=>'account_id' - ); - - # Affiliate - if ($C_list->is_installed('affiliate')) - $merge['affiliate'] = 'account_id'; - - foreach ($merge as $table => $field) { - $rs = $db->Execute(sqlUpdate($db,$table,array($field=>$acct_id),sprintf('%s=%s',$field,$merge_acct_id))); - - if ($rs === false) - $C_debug->error(__FILE__,sprintf('%s::%s',__METHOD__,$table),$db->ErrorMsg()); - } - - # Delete account - $rs = $db->Execute(sqlDelete($db,'account',sprintf('id=%s',$merge_acct_id))); - if ($rs === false) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - $C_debug->alert($C_translate->translate('merge_ok',$this->module,'')); - - return; - } - - /** - * Delete an account - * - * @uses invoice - */ - public function delete($VAR) { - global $C_list; - - $db = &DB(); - - # Generate the list of ID's - $id_list = ''; - $account_id_list = ''; - $discount_id_list = ''; - - if (isset($VAR['delete_id'])) - $ids = explode(',',preg_replace('/,$/','',$VAR['delete_id'])); - elseif (isset($VAR['id'])) - $ids = explode(',',preg_replace('/,$/','',$VAR['id'])); - - # Verify this is not the admin account or the current user's account - if (($i = array_search(SESS_ACCOUNT,$ids)) || ($i = array_search(1,$ids))) - unset($ids[$i]); - - $this->associated_DELETE = array(); - array_push($this->associated_DELETE,array('table'=>'session','field'=>'account_id')); - array_push($this->associated_DELETE,array('table'=>'account_billing','field'=>'account_id')); - array_push($this->associated_DELETE,array('table'=>'account_group','field'=>'account_id')); - array_push($this->associated_DELETE,array('table'=>'cart','field'=>'account_id')); - array_push($this->associated_DELETE,array('table'=>'search','field'=>'account_id')); - array_push($this->associated_DELETE,array('table'=>'staff','field'=>'account_id')); - array_push($this->associated_DELETE,array('table'=>'discount','field'=>'account_id')); - if ($C_list->is_installed('affiliate')) - array_push($this->associated_DELETE,array('table'=>'affiliate','field'=>'account_id')); - - $result = parent::delete($VAR); - - if ($result) { - # Generate the full query (invoice) - $invoice = $db->Execute(sqlSelect($db,'invoice','id',array('account_id'=>$ids))); - if ($invoice && $invoice->RecordCount() > 0 ) { - while (! $invoice->EOF) { - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - $inv = new invoice; - - $arr['id'] = $invoice->fields['id']; - $inv->delete($arr,$inv); - - $invoice->MoveNext(); - } - } - - # Error reporting - if ($result === false) { - global $C_debug; - $C_debug->error('account_admin.inc.php','delete', $db->ErrorMsg()); - - } else { - # Alert delete message - global $C_debug, $C_translate; - $C_translate->value['CORE']['module_name'] = $C_translate->translate('name',$this->table,''); - $message = $C_translate->translate('alert_delete_ids','CORE',''); - $C_debug->alert($message); - } - } - } - - /** - * Update account groups - * - * This method is a trigger, called when an account is added from account() - * - * @uses CORE_validate - */ - public function update_account_groups($VAR) { - global $C_auth; - - $db = &DB(); - @$account = $VAR['account_id']; - - # If there are no groups to modify, just return - if (! is_array($VAR['groups']) || ! count($VAR['groups'])) - return false; - - $groups = $VAR['groups']; - - # Admin accounts groups cannot be altered user cannot modify their own groups - if ($account == '1' || SESS_ACCOUNT == $account) - return false; - - # Drop the current groups for this account - $result = $db->Execute(sqlDelete($db,'account_group',sprintf('service_id IS NULL AND account_id=%s',$account))); - - # Verify the admin adding this account is authorized for this group themselves, otherwise skip - foreach ($groups as $i => $group) - if (! $C_auth->auth_group_by_id($groups[$i])) - unset($groups[$i]); - - if (! count($group)) - return false; - - # Determine the expiration - if (! empty($VAR['account_date_expire'])) { - include_once(PATH_CORE.'validate.inc.php'); - $validate = new CORE_validate; - - $expire = $validate->convert_date($VAR['account_date_expire'],DEFAULT_DATE_FORMAT); - } else { - $expire = 0; - } - - $this->add_account_groups($groups,$account,$expire); - - # Remove the user's session_auth_cache so it is regenerated on user's next pageview - $rss = $db->Execute(sqlSelect($db,'session','id',array('account_id'=>$account))); - - while (! $rss->EOF) { - $db->Execute(sqlDelete($db,'session_auth_cache',sprintf('session_id=::%s::',$rss->fields['id']))); - $rss->MoveNext(); - } - } -} -?> diff --git a/modules/account/account_xmlrpc.php b/modules/account/account_xmlrpc.php deleted file mode 100644 index 9d40cddc..00000000 --- a/modules/account/account_xmlrpc.php +++ /dev/null @@ -1,155 +0,0 @@ -<?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 - */ - -ob_start(); - -include_once('../../config.inc.php'); -require_once(PATH_ADODB . 'adodb.inc.php'); -require_once(PATH_CORE . 'database.inc.php'); -require_once(PATH_CORE . 'setup.inc.php'); -require_once(PATH_CORE . 'vars.inc.php'); -require_once(PATH_CORE . 'translate.inc.php'); -require_once(PATH_CORE . 'xml.inc.php'); -include_once(PATH_INCLUDES . "xml-rpc/xml-rpc.php"); -$C_debug = new CORE_debugger; -$C_setup = new CORE_setup; -$C_translate= new CORE_translate; - -class AccountServer extends IXR_Server { - - var $account_id; - var $account_parent_id=false; - var $username; - var $password; - var $login_error; - - function AccountServer() { - $this->IXR_Server(array( - 'account.details' => 'this:getAccountDetails' - )); - } - - function getAccountDetails($args) { - $this->username = $args[0]; - $this->password = $args[1]; - if(!$this->getAccountAuth()) return array('auth'=> false, 'reason'=>$this->login_error); - $return = array( - 'auth' => true, - 'acct' => $this->account_id, - 'info' => $this->getAccountInfo(), - 'skus' => $this->getAccountSKUs(), - 'grps' => $this->getAccountGroups() - ); - return $return; - } - - function getAccountAuth() { - // select from account where username = $this_username and password = $this->password - include_once(PATH_CORE.'login.inc.php'); - $login = new CORE_login_handler(); - if(!$login->login(array("_username"=> $this->username, "_password"=> $this->password), true)) { - $this->login_error = $login->error; - return false; - } else { - $db=&DB(); - $rs = $db->Execute(sqlSelect($db,"account","id","username = ::$this->username::")); - $this->account_id = $rs->fields['id']; - return true; - } - } - - function getAccountInfo() { - $db=&DB(); - $rs = $db->Execute(sqlSelect($db,"account","*","id = ::$this->account_id::")); - if(!empty($rs->fields['parent_id'])) $this->account_parent_id = $rs->fields['parent_id']; - $ret = Array( - 'company' => $rs->fields['company'], - 'first_name' => $rs->fields['first_name'], - 'last_name' => $rs->fields['last_name'], - 'address1' => $rs->fields['address1'], - 'address2' => $rs->fields['address2'], - 'city' => $rs->fields['city'], - 'state' => $rs->fields['state'], - 'zip' => $rs->fields['zip'], - 'email' => $rs->fields['email'], - 'acct_parent_id' => $rs->fields['parent_id'] - ); - $rs = $db->Execute(sqlSelect($db,"module","id","name=::account::")); - $account_module=$rs->fields['id']; - /* get custom fields*/ - $sql = "SELECT DISTINCT A.value, B.name FROM ".AGILE_DB_PREFIX."static_var as B - LEFT JOIN ".AGILE_DB_PREFIX."static_var_record as A on (B.id=A.static_var_id AND A.record_id = ".$db->qstr($this->account_id).") - WHERE A.module_id=$account_module "; - $rs=$db->Execute($sql); - if($rs &&$rs->RecordCount()) { - while(!$rs->EOF) { - $fld = substr(strtolower(ereg_replace(" ",'_', $rs->fields['name'])),0,32); - @$ret["$fld"]=$rs->fields['value']; - $rs->MoveNext(); - } - } - return $ret; - } - - function getAccountSKUs() { - // select from invoice_item where id = $this->account_id - $db=&DB(); - $p=AGILE_DB_PREFIX; - $s=DEFAULT_SITE; - $arr=false; - $q = "SELECT DISTINCT A.sku FROM {$p}invoice_item A - JOIN {$p}invoice B on ((B.account_id={$this->account_id} "; - if($this->account_parent_id) - $q.= " OR B.account_id = {$this->account_parent_id} "; - $q.= ") AND B.id=A.invoice_id AND B.site_id={$s} AND billing_status=1 AND process_status=1) - WHERE A.site_id = {$s}"; - $rs = $db->Execute($q); - if($rs && $rs->RecordCount()) { - while(!$rs->EOF) { - $arr[] = $rs->fields['sku']; - $rs->MoveNext(); - } - } - return $arr; - } - - function getAccountGroups() { - // select from account_group where account_id = $this->account_id - $db=&DB(); - $p=AGILE_DB_PREFIX; - $s=DEFAULT_SITE; - $arr=false; - $q = "SELECT DISTINCT group_id FROM {$p}account_group WHERE account_id={$this->account_id} AND site_id={$s} AND (active=1 OR active!='' or active!=0 or active is not null)"; - $rs = $db->Execute($q); - if($rs && $rs->RecordCount()) { - while(!$rs->EOF) { - $arr[] = $rs->fields['group_id']; - $rs->MoveNext(); - } - } - return $arr; - } - -} -$server = new AccountServer(); - -ob_end_flush(); - -?> \ No newline at end of file diff --git a/modules/account/auth.inc.php b/modules/account/auth.inc.php deleted file mode 100644 index 098fc3a9..00000000 --- a/modules/account/auth.inc.php +++ /dev/null @@ -1,37 +0,0 @@ -<?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 - * - * 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> - * @package AgileBill - * @subpackage Modules:Account - */ - -/** - * 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') -); -?> diff --git a/modules/account_billing/account_billing.inc.php b/modules/account_billing/account_billing.inc.php deleted file mode 100644 index 79da82df..00000000 --- a/modules/account_billing/account_billing.inc.php +++ /dev/null @@ -1,411 +0,0 @@ -<?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 account_billing -{ - /** - * Return a list of options for the drop-down menus - */ - function cardMenuArr(&$result, $selected=false) { - global $C_translate; - if($result && $result->RecordCount()) { - while (!$result->EOF) { - $arr["{$result->fields["id"]}"] = $C_translate->translate('card_type_'.$result->fields["card_type"],'checkout','') . - ' ...' . $result->fields["card_num4"]; - if($result->fields['card_type'] != 'eft') - $arr["{$result->fields["id"]}"] .= ' | Exp: ' . $result->fields["card_exp_month"] . '/' . $result->fields["card_exp_year"]; - $result->MoveNext(); - } - return $arr; - } - return false; - } - - /** - * Get a list of cards of file for a specific user and checkout plugin - */ - function list_on_file($VAR) { - global $C_auth; - if(!empty($VAR['account_id']) && $C_auth->auth_method_by_name('checkout','admin_checkoutnow')) $account_id=$VAR['account_id']; else $account_id=SESS_ACCOUNT; - if(empty($VAR['option'])) return false; else $checkout_plugin_id=$VAR['option']; - $db=&DB(); - $year = preg_replace("/^20/", "", date("Y")); - $result = $db->Execute($sql=sqlSelect($db,"account_billing","id,card_type,card_num4,card_exp_month,card_exp_year", - "(card_exp_year>=::$year:: or card_type='eft') AND account_id=::$account_id:: AND checkout_plugin_id=::$checkout_plugin_id::")); - $arr = $this->cardMenuArr($result); - if($arr) { - global $smarty; - $smarty->assign('onfile', $arr); - } - } - - /** - * Generate an admin menu of the list of cards on file... - */ - function menu_admin($field, $account, $default, $class, $user) { - global $C_translate; - if(empty($field)) $field = 'ccnum'; - $input_id = '1'; - $return = '<select id="'. $field .'_'. $input_id .'" name="'. $field .'">'; - $db = &DB(); - $sql= "SELECT * FROM ". AGILE_DB_PREFIX."account_billing WHERE site_id = ".$db->qstr(DEFAULT_SITE)." AND account_id = ".$db->qstr($account)." ORDER BY card_num4"; - $result = $db->Execute($sql); - $arr = $this->cardMenuArr($result); - if($arr) { - if($id == "all") $return .= '<option value="" selected></option>'; - foreach($arr as $id=>$val) { - $return .= '<option value="'.$id.'"'; - if($default==$id) $return .= " selected"; - $return .= '>' . $val . '</option>'; - } - $return .= '</select>'; - if(!$user) { - $return .= ' <img src="themes/' . THEME_NAME . '/images/icons/zoomi_16.gif" border="0" width="16" height="16" onclick="menu_item_view(\'account_billing\',\''.$field .'_'.$input_id.'\');">'; - $return .= ' <img src="themes/' . THEME_NAME . '/images/icons/add_16.gif" border="0" width="16" height="16" onclick="menu_item_add(\'account_billing\',\''.$field .'_'.$input_id.'\');">'; - } else { - $return .= ' <img src="themes/' . THEME_NAME . '/images/icons/zoomi_16.gif" border="0" width="16" height="16" onclick="document.location=\''.SSL_URL.'?_page=account_billing:user_view&id='.$default.',\';">'; - } - } else { - $return .= '<option value="">'. $C_translate->translate('lists_none_defined','CORE','').'</option>'; - $return .= '</select>'; - } - echo $return; - } - - /** - * Allow user to delete a card on file - */ - function user_delete($VAR) - { - # Verify the current account owns this billing record - $dbx = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'account_billing WHERE - id = ' . $dbx->qstr( @$VAR['id'] ) . ' AND - account_id = ' . $dbx->qstr( SESS_ACCOUNT ) . ' AND - site_id = ' . $dbx->qstr(DEFAULT_SITE); - $rs = $dbx->Execute($sql); - if (@$rs->RecordCount() == 0) return false; - - global $C_debug, $C_translate; - - # Validate this isn't the only card on file - $rs = $dbx->Execute(sqlSelect($dbx,"account_billing","id","id=::".$VAR['id']."::")); - if($rs && $rs->RecordCount()) { - $msg = $C_translate->translate('card_in_use','account_billing',''); - $C_debug->alert($msg); - return false; - } - - # Validate the card isn't in use - $rs = $dbx->Execute(sqlSelect($dbx,"service","id","account_billing_id=::".$VAR['id'].":: AND account_id=::".SESS_ACCOUNT.":: AND active=1")); - if($rs && $rs->RecordCount()) { - $msg = $C_translate->translate('card_in_use','account_billing',''); - $C_debug->alert($msg); - return false; - } - - # Delete the card - $sql = sqlDelete($dbx,"account_billing","id=::".$VAR['id'].":: AND account_id=::".SESS_ACCOUNT."::"); - $dbx->Execute($sql); - $msg = $C_translate->translate('card_removed','account_billing',''); - $C_debug->alert($msg); - - return true; - } - - /** - * Task to detect credit cards that are expiring soon and e-mail the user a notice to update the card - */ - function task($VAR) { - include_once(PATH_MODULES.'email_template/email_template.inc.php'); - $sql =''; - - for($i=1; $i<3; $i++) { - $exp = mktime(0,0,0,date('m')+$i,date('d'),date('Y')); - $month = date("m",$exp); - $year = ereg_replace("^20", "", date("Y",$exp)); - if(!empty($sql)) $sql .= " OR "; - $sql .= " ( card_exp_month = '$month' AND card_exp_year = '$year' ) "; - } - - $db = &DB(); - $rs = $db->Execute($qq=sqlSelect($db,"account_billing", "id,account_id,notify_count", " ( $sql ) AND notify_count < 4")); - if($rs && $rs->RecordCount()) { - while(!$rs->EOF) { - $email = new email_template; - $email->send('account_billing_exp_soon', $rs->fields['account_id'], $rs->fields['id'],'',''); - $fields=Array('notify_count'=> $rs->fields["notify_count"]+1); - $db->Execute(sqlUpdate($db,"account_billing", $fields, "id = {$rs->fields['id']}")); - $rs->MoveNext(); - } - } - } - - - /** Get most recent account billing id */ - function default_billing($account_id) - { - $db = &DB(); - $sql = "SELECT id,checkout_plugin_id FROM ".AGILE_DB_PREFIX."account_billing WHERE - account_id = " . $db->qstr($account_id) . " AND - site_id = " . $db->qstr(DEFAULT_SITE); - $billing = $db->Execute($sql); - if($billing->RecordCount() > 0) - { - $ret['billing_id'] = $billing->fields['id']; - $ret['checkout_plugin_id'] = $billing->fields['checkout_plugin_id']; - } else { - $ret['billing_id'] = false; - $ret['checkout_plugin_id'] = false; - } - return $ret; - } - - - function add($VAR) - { - global $C_debug, $C_translate; - - # Get the last 4 digits of the cc: - @$VAR['account_billing_card_num4'] = substr($VAR['account_billing_card_num'],(strlen($VAR['account_billing_card_num']) - 4),4); - - # Validate the req fields - if(empty($VAR['account_billing_card_exp_month']) || empty($VAR['account_billing_card_exp_year']) || empty($VAR['account_billing_card_num'])) - { - $msg = $C_translate->translate('val_missing','account_billing',''); - $C_debug->alert($msg); - return false; - } - - # Validate the exp date - if(mktime(0,0,0,$VAR['account_billing_card_exp_month'], date('d'), $VAR['account_billing_card_exp_year']) <= time()) - { - $msg = $C_translate->translate('val_exp','account_billing',''); - $C_debug->alert($msg); - return false; - } - - # Validate the card against the card type - include_once(PATH_CORE.'validate.inc.php'); - $validate = new CORE_validate; - if(!$validate->validate_cc( $VAR['account_billing_card_num'], 'card_num', $VAR['account_billing_card_type'], false ) ) - { - $msg = $C_translate->translate('val_cc','account_billing',''); - $C_debug->alert($msg); - return false; - } - - $this->construct(); - $type = "add"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->add($VAR, $this, $type); - } - - function view($VAR) - { - global $C_debug, $C_translate; - $this->construct(); - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - function update($VAR) - { - global $C_translate,$C_debug; - - /* load database object */ - $db = new CORE_database; - $this->construct(); - $type = "update"; - - /* conditional fields for cc/eft */ - $dbx=&DB(); - $rs = $dbx->Execute(sqlSelect($dbx,"account_billing","card_type,id,checkout_plugin_id","id=::{$VAR['id']}::")); - if(!$rs || !$rs->RecordCount()) return false; - - $billing_id = $rs->fields['id']; - $checkout_plugin_id = $rs->fields['checkout_plugin_id']; - - if($rs->fields['card_type'] == 'eft') { - /* EFT */ - $this->method["$type"] = $db->ignore_fields( - array('card_exp_month', 'card_exp_year', 'card_num' ), - $this->method["$type"] - ); - - /* last four */ - @$VAR['account_billing_card_num4'] = substr($VAR['account_billing_eft_check_acct'],(strlen($VAR['account_billing_eft_check_acct']) - 4),4); - - } else { - /* CC */ - - # Validate the exp date - if(mktime(0,0,0,$VAR['account_billing_card_exp_month'], date('d'), $VAR['account_billing_card_exp_year']) <= time()) - { - $msg = $C_translate->translate('val_exp','account_billing',''); - $C_debug->alert($msg); - return false; - } - - # Validate the card against the card type - include_once(PATH_CORE.'validate.inc.php'); - $validate = new CORE_validate; - if(!$validate->validate_cc( @$VAR['account_billing_card_num'], 'card_num', @$VAR['account_billing_card_type'], false ) ) - { - $msg = $C_translate->translate('val_cc','account_billing',''); - $C_debug->alert($msg); - return false; - } - - $this->method["$type"] = $db->ignore_fields( - array('eft_trn', 'eft_check_acct'), - $this->method["$type"] - ); - - /* last four */ - @$VAR['account_billing_card_num4'] = substr($VAR['account_billing_card_num'],(strlen($VAR['account_billing_card_num']) - 4),4); - } - - if( $db->update($VAR, $this, $type) ) - { - # Update any invoices using this billing record - $dba = &DB(); - $sql = "UPDATE ".AGILE_DB_PREFIX."invoice SET - checkout_plugin_id = " . $dba->qstr($checkout_plugin_id) . " - WHERE site_id = " . $dba->qstr(DEFAULT_SITE) . " - AND account_billing_id = " . $dba->qstr($billing_id); - $result = $dba->Execute($sql); - return true; - } - return false; - } - - function delete($VAR) { - $this->construct(); - $db = new CORE_database; - $db->mass_delete($VAR, $this, ""); - } - - function search_form($VAR) { - $this->construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_form($VAR, $this, $type); - } - - function search($VAR) { - $this->construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search($VAR, $this, $type); - } - - function user_search($VAR) { - # Lock the user only for his billing_records: - if(!SESS_LOGGED) return false; - - # Lock the account_id - $VAR['account_billing_account_id'] = SESS_ACCOUNT; - - $this->construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search($VAR, $this, $type); - } - - function search_show($VAR) { - $this->construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_show($VAR, $this, $type); - } - - function user_search_show($VAR) { - # Lock the user only for his billing_records: - if(!SESS_LOGGED) return false; - $this->construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_show($VAR, $this, $type); - } - - function user_view($VAR) { - # Check that the correct account owns this billing record - $dbx = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'account_billing WHERE - id = ' . $dbx->qstr( @$VAR['id'] ) . ' AND - account_id = ' . $dbx->qstr( SESS_ACCOUNT ) . ' AND - site_id = ' . $dbx->qstr(DEFAULT_SITE); - $rs = $dbx->Execute($sql); - if (@$rs->RecordCount() == 0) return false; - - $this->construct(); - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - function user_update($VAR) { - if(!SESS_LOGGED) return false; - $db=&DB(); - $rs = $db->Execute(sqlSelect($db,"account_billing","card_type","id=::{$VAR['id']}:: and account_id=".SESS_ACCOUNT)); - if(!$rs || !$rs->RecordCount()) return false; - $result=$this->update($VAR, $this); - global $VAR; $VAR['_page'] = 'account_billing:user_view'; - if($result) { - global $C_debug; - $C_debug->alert("Your billing details have been updated."); - } - } - - - # Open the constructor for this mod - function construct() - { - # name of this module: - $this->module = "account_billing"; - - # 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"]; - } -} -?> \ No newline at end of file diff --git a/modules/account_billing/account_billing_construct.xml b/modules/account_billing/account_billing_construct.xml deleted file mode 100644 index 2aea4e0e..00000000 --- a/modules/account_billing/account_billing_construct.xml +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<construct> - <module>account_billing</module> - <table>account_billing</table> - <dependancy/> - <cache>0</cache> - <order_by>account_id</order_by> - <limit>25</limit> - <index> - <account_id>site_id,account_id</account_id> - <checkout_plugin>site_id,checkout_plugin_id</checkout_plugin> - <card_type>site_id,card_type</card_type> - <eft_type>site_id,eft_check_acct_type</eft_type> - </index> - <field> - <id> - <type>I4</type> - <unique>1</unique> - </id> - <site_id> - <type>I4</type> - </site_id> - <account_id> - <type>I8</type> - <asso_table>account</asso_table> - <asso_field>username</asso_field> - </account_id> - <checkout_plugin_id> - <type>C(32)</type> - <asso_table>checkout</asso_table> - <asso_field>name</asso_field> - </checkout_plugin_id> - <plugin_data> - <type>X</type> - <convert>array</convert> - </plugin_data> - <name> - <type>C(32)</type> - </name> - <notes> - <type>C(128)</type> - </notes> - <notify_count> - <type>I4</type> - </notify_count> - <card_type> - <type>C(16)</type> - </card_type> - <card_num> - <type>X</type> - <convert>encrypt</convert> - <validate>any</validate> - </card_num> - <card_num4> - <type>C(16)</type> - </card_num4> - <card_exp_month> - <type>C(16)</type> - <validate>numeric</validate> - <min_len>2</min_len> - <max_len>2</max_len> - </card_exp_month> - <card_exp_year> - <type>C(16)</type> - <validate>numeric</validate> - <min_len>2</min_len> - <max_len>2</max_len> - </card_exp_year> - <card_start_month> - <type>C(16)</type> - </card_start_month> - <card_start_year> - <type>C(16)</type> - </card_start_year> - <eft_check_acct_type> - <type>C(16)</type> - </eft_check_acct_type> - <eft_trn> - <type>C(255)</type> - <convert>encrypt</convert> - <validate>numeric</validate> - <min_len>6</min_len> - <max_len>16</max_len> - </eft_trn> - <eft_check_acct> - <type>C(255)</type> - <convert>encrypt</convert> - <validate>numeric</validate> - <min_len>6</min_len> - <max_len>16</max_len> - </eft_check_acct> - <eft_check_checkno> - <type>I8</type> - </eft_check_checkno> - <first_name> - <type>C(16)</type> - <validate>any</validate> - </first_name> - <last_name> - <type>C(16)</type> - <validate>any</validate> - </last_name> - <address1> - <type>C(32)</type> - <validate>any</validate> - </address1> - <address2> - <type>C(32)</type> - <min_len>3</min_len> - </address2> - <city> - <type>C(16)</type> - <validate>any</validate> - </city> - <state> - <type>C(16)</type> - <validate>any</validate> - </state> - <zip> - <type>C(16)</type> - <validate>any</validate> - </zip> - <country_id> - <type>C(16)</type> - <validate>any</validate> - </country_id> - <phone> - <type>C(16)</type> - </phone> - <email> - <type>C(128)</type> - </email> - <company> - <type>C(32)</type> - </company> - <ssn> - <type>C(255)</type> - <convert>encrypt</convert> - </ssn> - <dl_no> - <type>C(255)</type> - <convert>encrypt</convert> - </dl_no> - <dob> - <type>C(255)</type> - <convert>encrypt</convert> - </dob> - </field> - <method> - <add>id,site_id,account_id,checkout_plugin_id,plugin_data,name,notes,card_type,card_num,card_exp_month,card_exp_year,card_start_month,card_start_year,card_num4,eft_trn,eft_check_acct,eft_check_acct_type,eft_check_checkno,first_name,last_name,address1,address2,city,state,zip,country_id,phone,email,company,ssn,dl_no,dob,eft_trn,eft_check_acct </add> - <update>id,site_id,account_id,checkout_plugin_id,plugin_data,name,notes,card_type,card_num,card_exp_month,card_exp_year,card_start_month,card_start_year,card_num4,eft_trn,eft_check_acct,eft_check_acct_type,eft_check_checkno,first_name,last_name,address1,address2,city,state,zip,country_id,phone,email,company,ssn,dl_no,dob,eft_trn,eft_check_acct </update> - <delete>id</delete> - <view>id,site_id,account_id,checkout_plugin_id,plugin_data,name,notes,card_type,card_num,card_exp_month,card_exp_year,card_start_month,card_start_year,card_num4,eft_trn,eft_check_acct,eft_check_acct_type,eft_check_checkno,first_name,last_name,address1,address2,city,state,zip,country_id,phone,email,company,ssn,dl_no,dob,eft_trn,eft_check_acct</view> - <search>id,site_id,account_id,checkout_plugin_id,plugin_data,name,notes,card_type,card_num,card_exp_month,card_exp_year,card_start_month,card_start_year,card_num4,eft_trn,eft_check_acct,eft_check_acct_type,eft_check_checkno,first_name,last_name,address1,address2,city,state,zip,country_id,phone,email,company,ssn,dl_no,dob,eft_trn,eft_check_acct</search> - <user_update>id,site_id,account_id,checkout_plugin_id,plugin_data,name,notes,card_type,card_num,card_exp_month,card_exp_year,card_start_month,card_start_year,card_num4,eft_trn,eft_check_acct,eft_check_acct_type,eft_check_checkno,first_name,last_name,address1,address2,city,state,zip,country_id,phone,email,company,ssn,dl_no,dob,eft_trn,eft_check_acct</user_update> - </method> - <trigger>0</trigger> -</construct> diff --git a/modules/account_billing/account_billing_install.xml b/modules/account_billing/account_billing_install.xml deleted file mode 100644 index 293ef817..00000000 --- a/modules/account_billing/account_billing_install.xml +++ /dev/null @@ -1,34 +0,0 @@ -<install> - <module_properties> - <name>account_billing</name> - <parent>account</parent> - <notes><![CDATA[This module contains the encrypted billing data.]]></notes> - </module_properties> - <sql_inserts> - <module_method> - <add> - <name>add</name> - </add> - <update> - <name>update</name> - </update> - <delete> - <name>delete</name> - </delete> - <view> - <name>view</name> - </view> - <search> - <name>search</name> - </search> - <search_form> - <name>search_form</name> - <notes><![CDATA[Allow users to view the search form]]></notes> - </search_form> - <search_show> - <name>search_show</name> - <notes><![CDATA[Allow users to view the search results]]></notes> - </search_show> - </module_method> - </sql_inserts> -</install> diff --git a/modules/account_billing/auth.inc.php b/modules/account_billing/auth.inc.php deleted file mode 100644 index 191d9ecf..00000000 --- a/modules/account_billing/auth.inc.php +++ /dev/null @@ -1,30 +0,0 @@ -<?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_billing', 'method' => 'user_search'), - Array ('module' => 'account_billing', 'method' => 'user_view'), - Array ('module' => 'account_billing', 'method' => 'user_search_show'), - Array ('module' => 'account_billing', 'method' => 'user_update'), - Array ('module' => 'account_billing', 'method' => 'user_delete'), - Array ('module' => 'account_billing', 'method' => 'list_on_file') -); -?> \ No newline at end of file diff --git a/modules/account_fee/account_fee.inc.php b/modules/account_fee/account_fee.inc.php deleted file mode 100644 index 40508fcc..00000000 --- a/modules/account_fee/account_fee.inc.php +++ /dev/null @@ -1,71 +0,0 @@ -<?php -/** - * osBilling - Open Billing Software - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * Originally authored by Deon George - * - * @author Deon George <deonATleenooksDOTnet> - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * @license http://www.gnu.org/licenses/ - * @package AgileBill - * @subpackage Modules:Payment - */ - -/** - * The main AgileBill Account Fee Class - * - * @package AgileBill - * @subpackage Modules:AccountFee - */ -class account_fee extends OSB_module { - /** - * Calculate the account fee for an account - * - * @param $account_id The account ID to calculate - * @param $period Invoice period being calculated - * @uses account - */ - public function sAccountFee($account_id,$period) { - static $CACHE = array(); - - if (! isset($CACHE[$account_id][$period])) { - $db = &DB(); - - include_once(PATH_MODULES.'account/account.inc.php'); - $ao = new account; - - # Load the account fees - $rs = $db->Execute(sqlSelect('account_fee','*',array('where'=>array('active=1')))); - - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $gf = unserialize($rs->fields['groups_fee']); - if (isset($gf[$period]) && $gf[$period]['show']) - foreach ($ao->sAccountGroups($account_id) as $gid) - if (isset($gf[$period]['group'][$gid]) - && (! isset($CACHE[$account_id][$period]) || $CACHE[$account_id][$period] > $gf[$period]['group'][$gid]['fee'])) - $CACHE[$account_id][$period] = $gf[$period]['group'][$gid]['fee']; - - $rs->MoveNext(); - } - } - } - - return $CACHE[$account_id][$period]; - } -} -?> diff --git a/modules/account_fee/account_fee_construct.xml b/modules/account_fee/account_fee_construct.xml deleted file mode 100644 index 9ec6a454..00000000 --- a/modules/account_fee/account_fee_construct.xml +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<construct> - <!-- Module name --> - <module>account_fee</module> - <!-- Module supporting database table --> - <table>account_fee</table> - <!-- Module dependancy(s) (module wont install if these modules are not yet installed) --> - <dependancy>account</dependancy> - <!-- DB cache in seconds --> - <cache>0</cache> - <!-- Default order_by field for SQL queries --> - <order_by>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> - </index> - - <!-- Database fields --> - <field> - <!-- Record ID --> - <id> - <index>1</index> - <type>I4</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> - <!-- Record active (BOOL)--> - <status> - <display>Active</display> - <type>L</type> - </status> - <name> - <type>C(32)</type> - <validate>any</validate> - </name> - <groups_fee> - <convert>array</convert> - <type>X2</type> - </groups_fee> - </field> - - <!-- Methods for this class, and the fields they have access to, if applicable --> - <method> - <add>name,groups_fee</add> - <search>name</search> - <update>name,groups_fee</update> - <view>id,name,groups_fee</view> - </method> - - <!-- Method triggers --> - <trigger></trigger> - - <!-- Template page display titles --> - <title> - <add>Add Account Fee</add> - - - - - - - id - checkbox - 25px - - - name - - - - diff --git a/modules/account_fee/account_fee_install.xml b/modules/account_fee/account_fee_install.xml deleted file mode 100644 index ae3287d4..00000000 --- a/modules/account_fee/account_fee_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - account - - Account Fees - - 1 - - account_fee - - - - account - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/account_group/account_group_construct.xml b/modules/account_group/account_group_construct.xml deleted file mode 100644 index 40732652..00000000 --- a/modules/account_group/account_group_construct.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - account_group - account_group
- account - 0 - - 25 - - - date_start,date_expire - active,account_id,group_id - service_id - - - - - I8 - - - I4 - 1 - - - I8 - - - I8 - - - I8 - - - I4 - 1 - - - I8 - 1 - - - I8 - - - L - - - - - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - - - 0 -
diff --git a/modules/account_group/account_group_install.xml b/modules/account_group/account_group_install.xml deleted file mode 100644 index e2a19825..00000000 --- a/modules/account_group/account_group_install.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - account_group - account - - base - - - - - - - diff --git a/modules/account_group/account_group_install_data.xml b/modules/account_group/account_group_install_data.xml deleted file mode 100644 index 1406e20a..00000000 --- a/modules/account_group/account_group_install_data.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - 0 - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - - - 210 - 1 - 1099624291 - 0 - 2 - 1 - 1 - - - 211 - 1 - 1099624291 - 0 - 1001 - 1 - 1 - - - 212 - 1 - 1099624291 - 0 - 4 - 1 - 1 - - - - 502 - - diff --git a/modules/account_memo/account_memo.inc.php b/modules/account_memo/account_memo.inc.php deleted file mode 100644 index 00005476..00000000 --- a/modules/account_memo/account_memo.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Account - */ - -/** - * The main AgileBill Account Memo Class - * - * @package AgileBill - * @subpackage Module:Account - */ -class account_memo extends OSB_module { -} -?> diff --git a/modules/account_memo/account_memo_construct.xml b/modules/account_memo/account_memo_construct.xml deleted file mode 100644 index 65bc166f..00000000 --- a/modules/account_memo/account_memo_construct.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - account_memo - - account_memo
- - account - - 0 - - date_orig - - 25 - - - - account_id - memo - - - - - <add>Add Account Memo</add> - <view>Account Memo</view> - - - - - - I8 - - - I4 - - - Date - I8 - date-time - date-now - - - Staff - I8 - account - username - - - Account - I8 - - - Type - C(32) - any - - - Memo - C(255) - any - - - C(32) - - - - - - staff_id,account_id,type,memo - id,site_id,date_orig,staff_id,account_id,type,memo - id,site_id,date_orig,staff_id,account_id,type,memo - id,site_id,date_orig,staff_id,account_id,type,memo - id,site_id,date_orig,staff_id,account_id,type,memo - - - - 0 - - - - - - id - 25px - - - date_orig - - - staff_id - - - type - - - memo - - - -
diff --git a/modules/account_memo/account_memo_install.xml b/modules/account_memo/account_memo_install.xml deleted file mode 100644 index 3cc0ab1e..00000000 --- a/modules/account_memo/account_memo_install.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - account_memo - account - - account - - - - - - add - - - update - - - delete - - - view - - - search - - - search_form - - - search_show - - - - diff --git a/modules/account_message/account_message.inc.php b/modules/account_message/account_message.inc.php deleted file mode 100644 index 7ec1bd94..00000000 --- a/modules/account_message/account_message.inc.php +++ /dev/null @@ -1,54 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -/** - -Sample use in tpl: - -{if $list->is_installed('account_message')} -{$method->exe_noauth('account_message','view')} -

System message on {$date}

-

{$message|nl2br}

-{/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'])); - } - } -} -?> \ No newline at end of file diff --git a/modules/account_message/account_message_construct.xml b/modules/account_message/account_message_construct.xml deleted file mode 100644 index 485f9d2e..00000000 --- a/modules/account_message/account_message_construct.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - account_message - account_message
- - 0 - date_orig - 30 - - - I8 - 1 - - - I4 - - - I8 - - - I8 - - - X2 - - - - - id,date_orig,account_id,message - id,date_orig,account_id,message - id,date_orig,account_id,message - - - -
diff --git a/modules/account_message/account_message_install.xml b/modules/account_message/account_message_install.xml deleted file mode 100644 index 23ae6325..00000000 --- a/modules/account_message/account_message_install.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - account_message - account - - - - - - add - - - view - - - - \ No newline at end of file diff --git a/modules/account_message/account_message_install_data.xml b/modules/account_message/account_message_install_data.xml deleted file mode 100644 index caab92ed..00000000 --- a/modules/account_message/account_message_install_data.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - 1 - 1 - 1075175744 - 0 - Default system message... - - - 2 - - \ No newline at end of file diff --git a/modules/account_message/auth.inc.php b/modules/account_message/auth.inc.php deleted file mode 100644 index fe4425a0..00000000 --- a/modules/account_message/auth.inc.php +++ /dev/null @@ -1,25 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -$auth_methods = Array -( - Array ('module' => 'account_message', 'method' => 'view') -); -?> \ No newline at end of file diff --git a/modules/account_password_history/account_password_history.inc.php b/modules/account_password_history/account_password_history.inc.php deleted file mode 100644 index 81638de4..00000000 --- a/modules/account_password_history/account_password_history.inc.php +++ /dev/null @@ -1,104 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -/* strict password changing enforcement */ -class account_password_history -{ - var $duplicateAfter=720; /* number of days between time identical password can be used */ - var $forceChangeAfter=60; /* number of days between forced password change */ - - /* determine if forced change is due for specified account */ - function getForceChangeDue($account_id) { - $db=&DB(); - - - /* not updated in last X days? */ - $date = (time() - (86400*$this->forceChangeAfter)); - $rs = $db->Execute(sqlSelect($db,"account_password_history","id", "account_id=$account_id and date_orig <= $date and date_last = 0")); - if($rs && $rs->RecordCount()) return true; - - return false; - } - - /* determine if new password is permissible */ - function getIsPasswordOk($account_id, $password, $hashed=true) { - - if(!$hashed) $this->hashPassword($password); - - $db=&DB(); - - /* currently used or used in duplicatePeriod? */ - $date = (time() - (86400*$this->duplicateAfter)); - $rs = $db->Execute(sqlSelect($db,"account_password_history","id", - "account_id=$account_id and password=::$password:: and (date_last=0 OR (date_last > $date OR date_orig > $date))")); - if($rs && $rs->RecordCount()) return false; - - return true; - } - - /* log the password change */ - function setNewPassword($account_id, $password, $hashed=true) { - $db=&DB(); - - if(!$hashed) $this->hashPassword($password); - - /* update last_date in existing passwords to indicate they are no longer in use */ - $fields['date_last'] = time(); - $db->Execute($sql="update ".AGILE_DB_PREFIX."account_password_history set date_last = ". time() . " where account_id = $account_id"); - - /* insert new password */ - $fields=Array('date_orig'=>time(), 'date_last'=>0, 'account_id'=>$account_id, 'password' => $password, 'ip' => USER_IP ); - $db->Execute(sqlInsert($db, "account_password_history", $fields)); - } - - - /* hash the password */ - function hashPassword(&$password) { - if(defined('PASSWORD_ENCODING_SHA')) - $password = sha1($password); - else - $password = md5($password); - } - - /* insert temp data for password reset */ - function resetPassword($account) { - - /* Delete the old request */ - $db=&DB(); - $sql = 'DELETE FROM ' . AGILE_DB_PREFIX . 'temporary_data WHERE site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND field1 = ' . $db->qstr($account); - $db->Execute($sql); - - $now = md5(microtime()); - $expire = time() + (20*60); - - /* Create the temporary DB Record */ - $id = $db->GenID(AGILE_DB_PREFIX . 'temporary_data_id'); - $sql = 'INSERT INTO ' . AGILE_DB_PREFIX . 'temporary_data SET - site_id = ' . $db->qstr(DEFAULT_SITE) . ', - id = ' . $db->qstr($id) . ', - date_orig = ' . $db->qstr(time()) . ', - date_expire = ' . $db->qstr($expire) . ', - field1 = ' . $db->qstr($account) . ', - field2 = ' . $db->qstr($now); - $result = $db->Execute($sql); - return $now; - } -} -?> \ No newline at end of file diff --git a/modules/account_password_history/account_password_history_construct.xml b/modules/account_password_history/account_password_history_construct.xml deleted file mode 100644 index e2b0a015..00000000 --- a/modules/account_password_history/account_password_history_construct.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - account_password_history - account_password_history
- account - 0 - date_orig - 25 - - site_id,account_id - - - - I8 - - - I4 - - - I8 - - - I8 - - - I8 - - - C(32) - - - C(16) - - - 0 - 0 -
diff --git a/modules/account_password_history/account_password_history_install.xml b/modules/account_password_history/account_password_history_install.xml deleted file mode 100644 index f828af0a..00000000 --- a/modules/account_password_history/account_password_history_install.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - account_password_history - account_admin - - account - - - - - - \ No newline at end of file diff --git a/modules/affiliate/affiliate.inc.php b/modules/affiliate/affiliate.inc.php deleted file mode 100644 index bcb17b4b..00000000 --- a/modules/affiliate/affiliate.inc.php +++ /dev/null @@ -1,1760 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class affiliate extends OSB_module { - private $id_prefix = 'AB-'; - - ########################################### - ### AJAX Auto-selector - ########################################### - - function autoselect($VAR) - { - - $db = &DB(); - $p = AGILE_DB_PREFIX; - - if (empty($VAR['affiliate_search'])) { - $where = "{$p}affiliate.id > 0"; - $type = 1; - } elseif (is_numeric($VAR['affiliate_search'])) { - $where = "{$p}affiliate.id LIKE ".$db->qstr($VAR['search']."%") ; - $type = 1; - } elseif (eregi(" ", $VAR['affiliate_search'])) { - $arr = explode(" ", $VAR['affiliate_search']); - $where = "{$p}account.first_name = ".$db->qstr($arr[0])." AND ". - "{$p}account.last_name LIKE ".$db->qstr($arr[1].'%') ; - $type = 2; - } elseif (eregi("@", $VAR['affiliate_search'])) { - $where = "{$p}account.email LIKE ".$db->qstr('%'.$VAR['affiliate_search'].'%') ; - $type = 3; - } else { - $where = "{$p}account.username LIKE ".$db->qstr($VAR['affiliate_search'].'%')." OR ". - "{$p}account.first_name LIKE ".$db->qstr($VAR['affiliate_search'].'%')." OR ". - "{$p}account.last_name LIKE ".$db->qstr($VAR['affiliate_search'].'%'); - $type = 4; - } - - $q = "SELECT DISTINCT - {$p}affiliate.id, - {$p}account.first_name, - {$p}account.last_name, - {$p}account.username, - {$p}account.email - FROM - {$p}account - LEFT JOIN - {$p}affiliate - ON - {$p}account.id = {$p}affiliate.account_id - WHERE - ( $where ) - AND - {$p}affiliate.id IS NOT NULL AND - {$p}affiliate.site_id = " . DEFAULT_SITE . " AND - {$p}account.site_id = " . DEFAULT_SITE." - ORDER BY {$p}account.first_name,{$p}account.last_name"; - $result = $db->SelectLimit($q, 10); - - echo '
    '; - # Create the alert for no records found - if ($result->RecordCount() > 0) { - $i=0; - while(!$result->EOF) - { - echo '
  • ' . $result->fields['first_name'].' '.$result->fields['last_name'] . '
    '. - ''. - '
  • ' . "\r\n"; - $result->MoveNext(); - $i++; - } - } - echo "
"; - return; - } - - - - ########################################### - ### Top Sales Affiliates Graph: - ########################################### - function top($VAR) - { - global $smarty, $C_translate, $C_auth; - - # Get the period type, default to month - if (empty($VAR['period'])) - $p = 'm'; - else - $p = $VAR['period']; - - # Load the jpgraph class - include (PATH_GRAPH."jpgraph.php"); - include (PATH_GRAPH."jpgraph_bar.php"); - - # check the validation for this function - if(!$C_auth->auth_method_by_name('affiliate','search')) { - $error = $C_translate->translate('module_non_auth','',''); - include (PATH_GRAPH."jpgraph_canvas.php"); - $graph = new CanvasGraph(460,55,"auto"); - $t1 = new Text($error); - $t1->Pos(0.2,0.5); - $t1->SetOrientation("h"); - $t1->SetBox("white","black",'gray'); - $t1->SetFont(FF_FONT1,FS_NORMAL); - $t1->SetColor("black"); - $graph->AddText($t1); - $graph->Stroke(); - exit; - } - - # Get the period start & end - switch ($p) - { - # By Weeks: - case 'w': - $dow = date('w'); - $start_str = mktime(0,0,0,date('m'), date('d')-$dow, date('y')); - $end_str = mktime(23,59,59,date('m'), date('d'), date('y')); - break; - - # By Months: - case 'm': - $start_str = mktime(0,0,0,date('m'), 1, date('y')); - $end_str = mktime(23,59,59,date('m'), date('d'), date('y')); - break; - - # By Years: - case 'y': - $start_str = mktime(0,0,0,1,1, date('y')); - $end_str = mktime(23,59,59, date('m'), date('d'), date('y')); - break; - } - - - ###################################### - # Get accounts & sales for this period - ###################################### - $db = &DB(); - $sql = 'SELECT affiliate_id,total_amt FROM ' . AGILE_DB_PREFIX . 'invoice WHERE - date_orig >= ' . $db->qstr( $start_str ) . ' AND date_orig <= ' . $db->qstr( $end_str ) . ' AND - affiliate_id != ' .$db->qstr( '0' ). ' AND affiliate_id != '.$db->qstr( '' ).' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - while(!$result->EOF) - { - $amt = $result->fields['total_amt']; - $aid = $result->fields['affiliate_id']; - if(!isset( $arr[$aid] )) $arr[$aid] = 0; - $arr[$aid] += $amt; - $result->MoveNext(); - } - - $i = 0; - $_datay = false; - $_lbl = false; - - if(isset($arr) && is_array($arr)) { - while(list($key, $var) = each($arr)) { - if($i<5) - { - $_lbl[] = strtoupper($key); - $_datay[] = $var; - $i++; - } - } - } else { - $file = fopen( PATH_THEMES.'default_admin/images/invisible.gif', 'r'); - fpassthru($file); - exit; - } - - ### Sort the arrays - array_multisort($_datay,SORT_DESC, SORT_NUMERIC, $_lbl); - - ### Limit the results to 10 or less - for($i=0; $i=9) $i = count($_lbl); - } - - $i = count($lbl); - - # Get the Currency - $sql = 'SELECT symbol FROM ' . AGILE_DB_PREFIX . 'currency WHERE - id = ' . $db->qstr( DEFAULT_CURRENCY ) . ' AND - site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - $currency_iso = $rs->fields['symbol']; - - // Size of graph - $width=265; - $height=75 + ($i*15); - - // Set the basic parameters of the graph - $graph = new Graph($width,$height,'auto'); - $graph->SetScale("textlin"); - $graph->yaxis->scale->SetGrace(50); - $graph->SetMarginColor('#F9F9F9'); - $graph->SetFrame(true,'#CCCCCC',1); - $graph->SetColor('#FFFFFF'); - - $top = 45; - $bottom = 10; - $left = 85; - $right = 15; - $graph->Set90AndMargin($left,$right,$top,$bottom); - - // Label align for X-axis - $graph->xaxis->SetLabelAlign('right','center','right'); - - // Label align for Y-axis - $graph->yaxis->SetLabelAlign('center','bottom'); - $graph->xaxis->SetTickLabels($lbl); - - // Titles - $graph->title->SetFont(FF_FONT1,FS_BOLD,10); - $title = $C_translate->translate('graph_top','affiliate',''); - $graph->title->Set($title); - - // Create a bar pot - $bplot = new BarPlot($datay); - $bplot->SetFillColor("#506DC7"); - $bplot->SetWidth(0.2); - - // Show the values - $bplot->value->Show(); - $bplot->value->SetFont(FF_FONT1,FS_NORMAL,7); - $bplot->value->SetAlign('center','center'); - $bplot->value->SetColor("black","darkred"); - $bplot->value->SetFormat($currency_iso.'%.2f'); - - $graph->Add($bplot); - $graph->Stroke(); - return; - } - - - ############################## - ## MAIL MULTI ACCOUNTS ## - ############################## - function mail_multi($VAR) - { - global $C_translate, $C_debug; - - ## Validate the required vars (account_id, message, subject) - if(@$VAR['search_id'] != "" && @$VAR['mail_subject'] != "" && @$VAR['mail_message'] != "") - { - - ## Get the specified accounts: - # get the search details: - if(isset($VAR['search_id'])) { - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $search->get($VAR['search_id']); - } else { - # invalid search! - echo '
The search terms submitted were invalid!'; # translate... # alert - return; - } - - # generate the full query - $field_list = AGILE_DB_PREFIX."affiliate.account_id"; - - $q = eregi_replace("%%fieldList%%", $field_list, $search->sql); - $q = eregi_replace("%%tableList%%", AGILE_DB_PREFIX."affiliate", $q); - $q = eregi_replace("%%whereList%%", "", $q); - $q .= " site_id = '" . DEFAULT_SITE . "'"; - - $db = &DB(); - $affiliate = $db->Execute($q); - - // check results - if($affiliate->RecordCount() == 0) { - $C_debug->alert($C_translate->translate('account_non_exist','account_admin','')); - return; - } - - // load the mail class - require_once(PATH_CORE . 'email.inc.php'); - $email = new CORE_email; - - // get the selected email setup details - $db = &DB(); - $q = "SELECT * FROM ".AGILE_DB_PREFIX."setup_email WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($VAR['mail_email_id']); - $setup_email = $db->Execute($q); - if($setup_email->fields['type'] == 0) { - $type = 0; - } else { - $type = 1; - $E['server'] = $setup_email->fields['server']; - $E['account'] = $setup_email->fields['username']; - $E['password'] = $setup_email->fields['password']; - } - - // loop to send each e-mail - while ( !$affiliate->EOF ) { - - // get the account details - $q = "SELECT email,first_name,last_name FROM ".AGILE_DB_PREFIX."account ". - "WHERE site_id = ". - $db->qstr(DEFAULT_SITE). - "AND id = ". - $db->qstr($affiliate->fields['account_id']); - $account = $db->Execute($q); - - $E['priority'] = $VAR['mail_priority']; - $E['html'] = '0'; - $E['subject'] = $VAR['mail_subject']; - $E['body_text'] = $VAR['mail_message']; - $E['to_email'] = $account->fields['email']; - $E['to_name'] = $account->fields['first_name'] . ' ' . $account->fields['last_name']; - $E['from_name'] = $setup_email->fields['from_name']; - $E['from_email'] = $setup_email->fields['from_email']; - - ### Call the mail() or smtp() function to send - if($type == 0) - $email->PHP_Mail($E); - else - $email->SMTP_Mail($E); - - ### Next record - $affiliate->MoveNext(); - } - - } else { - ## Error message: - $C_debug->alert($C_translate->translate('validate_any','','')); - return; - } - - ## Success message: - $C_debug->alert($C_translate->translate('mail_sent','account_admin','')); - } - - - - ############################## - ## USER VIEW ## - ############################## - function user_view($VAR) - { - global $smarty; - - # check if this affiliate account exists - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'affiliate WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - account_id = ' . $db->qstr(SESS_ACCOUNT); - if(!empty($this->id_prefix)) - $sql .= " AND id LIKE ".$db->qstr($this->id_prefix."%"); - - $result = $db->Execute($sql); - if($result == true && $result->RecordCount() > 0) - { - ### Get the name of the plugin file to include: - $sql1 = "SELECT file FROM ".AGILE_DB_PREFIX."affiliate_plugin WHERE - id = ". $db->qstr($result->fields['affiliate_plugin_id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $plgn = $db->Execute($sql1); - $plugin = "affiliate:plugin_" . $plgn->fields["file"]; - - - ### Get the static vars: - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - $arr = $static_var->update_form('affiliate', 'update', $result->fields['id']); - - $smarty->assign('static_var', $arr); - $smarty->assign('affiliate', $result->fields); - $smarty->assign('plugin_data', unserialize($result->fields['plugin_data'])); - $smarty->assign('affiliate_plugin_file', $plugin); - $smarty->assign('affiliate_user_view', true); - - ############################################################################ - ### START AFFILIATE STATISTICS ################## - - ### Get the sessions referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."session WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart["stats_sessions"] = $result2->RecordCount(); - - - ### Get the accounts referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."account WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart["stats_accounts"] = $result2->RecordCount(); - - ### Get the invoices referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."invoice WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart["stats_invoices"] = $result2->RecordCount(); - - - ### Get the commissions issued to this affiliate: - $sql2 = "SELECT commission FROM ".AGILE_DB_PREFIX."invoice_commission WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $total = 0; - while(!$result2->EOF) { - $total += $result2->fields['commission']; - $result2->MoveNext(); - } - $smart["stats_commissions"] = $total; - - ### Get the commissions (outstanding) to be issued to this affiliate: - $smart["commissions_due"] = $this->commission_due($result->fields['id']) ; - - ### END AFFILIATE STATISTICS #################### - ############################################################################# - - - ### Get available affiliate campaign details: - $campaigns = unserialize($result->fields["avail_campaign_id"]); - if(count($campaigns) > 0) - { - $where=' WHERE '; - $num=0; - for ($i=0; $i 0) $where = " OR "; - $where .= " id = ". $db->qstr($campaigns[$i]); - $num++; - } - } - - if($num > 0) - { - $sql2 = "SELECT id,name FROM ".AGILE_DB_PREFIX."campaign - $where - AND site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $i=0; - if($result2 != false && $result2->RecordCount() > 0) { - while(!$result2->EOF) { - $campaigns[$i] = $result2->fields; - $i++; - $result2->MoveNext(); - } - } - $smarty->assign('affiliate_campaign', $campaigns); - } - } - $smarty->assign('affiliate_stats', $smart); - return; - } - else - { - # Get the affiliate template settings for the template - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'affiliate_template WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(DEFAULT_AFFILIATE_TEMPLATE); - $temp = $db->Execute($sql); - - - ### Get the static vars: - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - $arr = $static_var->generate_form('affiliate', 'add', 'update'); - if(gettype($arr) == 'array') - $smarty->assign('static_var', $arr); - - - # assign the smarty vars: - //$smarty->assign('affiliate_plugin', $plugin); - $smarty->assign('affiliate_template', $temp->fields); - $smarty->assign('affiliate_user_view', false); - return; - } - return; - } - - - ############################## - ## USER ADD ## - ############################## - function user_add($VAR) - { - global $C_debug, $C_translate; - - # check if this affiliate account exists - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'affiliate WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - account_id = ' . $db->qstr(SESS_ACCOUNT); - $result = $db->Execute($sql); - if($result != false && @$result->RecordCount() > 0) - { - $C_debug->alert($C_translate->translate('error_acct_aff_exist','affiliate','')); - return; - } - - ## Get the affiliate template details: - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'affiliate_template WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(DEFAULT_AFFILIATE_TEMPLATE); - $result = $db->Execute($sql); - if($result->RecordCount() == 0) - { - $C_debug->alert($C_translate->translate('error_template_invalid','affiliate','')); - return; - } - - - #################################################################### - ### Get required static_Vars and validate them... return an array - ### w/ ALL errors... - #################################################################### - - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - if(!isset($this->val_error)) $this->val_error = false; - $all_error = $static_var->validate_form('affiliate', $this->val_error); - - if($all_error != false && gettype($all_error) == 'array') - $this->validated = false; - else - $this->validated = true; - - #################################################################### - # If validation was failed, skip the db insert & - # set the errors & origonal fields as Smarty objects, - # and change the page to be loaded. - #################################################################### - - if(!$this->validated) - { - global $smarty; - - # set the errors as a Smarty Object - $smarty->assign('form_validation', $all_error); - - # set the page to be loaded - if(!defined("FORCE_PAGE")) - { - define('FORCE_PAGE', $VAR['_page_current']); - } - return; - } - - ## Get the affiliate id that referred this account: - $sql = 'SELECT affiliate_id FROM ' . AGILE_DB_PREFIX . 'account WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(SESS_ACCOUNT); - $ref = $db->Execute($sql); - - ## Create the record - $this->record_id = $db->GenID(AGILE_DB_PREFIX . "" . 'affiliate_id'); - $this->record_id = $this->id_prefix . "" . $this->record_id; - - ## Generate the full query - $sql = "INSERT INTO ".AGILE_DB_PREFIX."affiliate - SET - id = ". $db->qstr($this->record_id).", - site_id = ". $db->qstr(DEFAULT_SITE) . ", - account_id = ". $db->qstr(SESS_ACCOUNT) .", - parent_affiliate_id = ". $db->qstr($ref->fields['affiliate_id']) .", - status = ". $db->qstr($result->fields['status']) .", - affiliate_plugin = ". $db->qstr(@$VAR['affiliate_affiliate_plugin']) .", - avail_campaign_id = ". $db->qstr($result->fields['avail_campaign_id']) .", - max_tiers = ". $db->qstr($result->fields['max_tiers']) .", - commission_minimum = ". $db->qstr($result->fields['commission_minimum']) .", - new_commission_type = ". $db->qstr($result->fields['new_commission_type']) .", - new_commission_rate = ". $db->qstr($result->fields['new_commission_rate']) .", - recurr_commission_type =". $db->qstr($result->fields['recurr_commission_type']) .", - recurr_commission_rate =". $db->qstr($result->fields['recurr_commission_rate']) .", - recurr_max_commission_periods = ". $db->qstr($result->fields['recurr_max_commission_periods']) .", - date_orig = ". $db->qstr(time()) .", - date_last = ". $db->qstr(time()); - $result2 = $db->Execute($sql); - if($result2 != false) - { - ## Insert the static vars: - $static_var->add($VAR, $this->module, $this->record_id); - - ## Load the affiliate plugin and run the "Add" method: - $file = strtoupper(eregi_replace('[^0-9a-z_-]{1,}', '', @$VAR['affiliate_affiliate_plugin'])); - - $pluginfile = PATH_PLUGINS . 'affiliate/' . $file . '.php'; - if(@include_once($pluginfile)) - { - eval ( '$_PLGN_AFF = new plgn_aff_'. strtoupper ( $file ) . ';' ); - $_PLGN_AFF->add(SESS_ACCOUNT, $this->record_id); - } - - ## Send the affiliate e-mail: - require_once(PATH_MODULES . 'email_template/email_template.inc.php'); - if($result->fields['status'] == "1") - { - $my1 = new email_template; - $my1->send('affiliate_user_add_active', SESS_ACCOUNT, '', '', $this->record_id); - $C_debug->alert($C_translate->translate('user_add_active','affiliate','')); - } - else - { - $my1 = new email_template; - $my1->send('affiliate_user_add_pending', SESS_ACCOUNT, '', '', $this->record_id); - $my2 = new email_template; - $my2->send('affiliate_user_add_staff_notify', SESS_ACCOUNT, '', '', $this->record_id); - $C_debug->alert($C_translate->translate('user_add_inactive','affiliate','')); - } - - global $VAR; - $VAR['id'] = $this->record_id; - define('FORCE_PAGE', $VAR['_page_current']); - } - else - { - $C_debug->alert('There was an error and the affiliate account could not be added.'); - define('FORCE_PAGE', $VAR['_page_current']); - } - } - - - - ############################## - ## USER UPDATE ## - ############################## - function user_update($VAR) - { - global $C_debug, $C_translate; - - # check if this affiliate account exists - $db = &DB(); - $sql = 'SELECT id FROM ' . AGILE_DB_PREFIX . 'affiliate WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - account_id = ' . $db->qstr(SESS_ACCOUNT); - $result = $db->Execute($sql); - if($result == false || @$result->RecordCount() == 0) - { - $C_debug->alert($C_translate->translate('error_not_authorized','affiliate','')); - return; - } - - $VAR["affiliate_id"] = $result->fields["id"]; - - #################################################################### - ### Get required static_Vars and validate them... return an array - ### w/ ALL errors... - #################################################################### - - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - if(!isset($this->val_error)) $this->val_error = false; - $all_error = $static_var->validate_form('affiliate', $this->val_error); - - if($all_error != false && gettype($all_error) == 'array') - $this->validated = false; - else - $this->validated = true; - - #################################################################### - # If validation was failed, skip the db insert & - # set the errors & origonal fields as Smarty objects, - # and change the page to be loaded. - #################################################################### - - if(!$this->validated) - { - global $smarty; - - # set the errors as a Smarty Object - $smarty->assign('form_validation', $all_error); - - # set the page to be loaded - if(!defined("FORCE_PAGE")) - { - define('FORCE_PAGE', $VAR['_page_current']); - } - - global $C_vars; - $C_vars->strip_slashes_all(); - return; - } - - # special handling for the affiliate data array - if(isset($VAR['affiliate_plugin_data']) && is_array($VAR['affiliate_plugin_data'])) { - while (list($key,$val) = each($VAR['affiliate_plugin_data'])) { - if(get_magic_quotes_gpc()) { - $VAR['affiliate_plugin_data']["$key"] = htmlentities(stripcslashes($val), ENT_QUOTES); - } - } - } - - $type = "user_update"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->update($VAR, $this, $type); - - ### Update the static vars: - $static_var->update($VAR, 'affiliate', $VAR['affiliate_id']); - - } - - - - - - - ############################## - ## ADD ## - ############################## - function add($VAR) - { - global $C_debug, $C_translate; - - ## Verify the account id passed: - if(empty($VAR['affiliate_account_id'])) - { - $C_debug->alert($C_translate->translate('error_acct_req','affiliate','')); - return; - } - - ## Get the affiliate template details: - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'affiliate_template WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr($VAR['affiliate_template_id']); - $result = $db->Execute($sql); - if($result->RecordCount() == 0) - { - $C_debug->alert($C_translate->translate('error_template_invalid','affiliate','')); - return; - } - - ## Verify that this account does not have an affiliate account already: - $sql = 'SELECT account_id FROM ' . AGILE_DB_PREFIX . 'affiliate WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - account_id = ' . $db->qstr($VAR['affiliate_account_id']); - $acctc = $db->Execute($sql); - if($acctc->RecordCount() > 0) - { - $C_debug->alert($C_translate->translate('error_acct_aff_exist','affiliate','')); - return; - } - - ## Get the affiliate id that referred this account: - $sql = 'SELECT affiliate_id FROM ' . AGILE_DB_PREFIX . 'account WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr($VAR['affiliate_account_id']); - $ref = $db->Execute($sql); - - ## Create the record - $this->record_id = $db->GenID(AGILE_DB_PREFIX . "" . 'affiliate_id'); - $this->record_id = $this->id_prefix . "" . $this->record_id; - - ## Generate the full query - $sql = "INSERT INTO ".AGILE_DB_PREFIX."affiliate - SET - id = ". $db->qstr($this->record_id).", - site_id = ". $db->qstr(DEFAULT_SITE) . ", - account_id = ". $db->qstr($VAR['affiliate_account_id']) .", - parent_affiliate_id = ". $db->qstr($ref->fields['affiliate_id']) .", - status = ". $db->qstr("1") .", - affiliate_plugin = ". $db->qstr($result->fields['affiliate_plugin']) .", - avail_campaign_id = ". $db->qstr($result->fields['avail_campaign_id']) .", - max_tiers = ". $db->qstr($result->fields['max_tiers']) .", - commission_minimum = ". $db->qstr($result->fields['commission_minimum']) .", - new_commission_type = ". $db->qstr($result->fields['new_commission_type']) .", - new_commission_rate = ". $db->qstr($result->fields['new_commission_rate']) .", - recurr_commission_type =". $db->qstr($result->fields['recurr_commission_type']) .", - recurr_commission_rate =". $db->qstr($result->fields['recurr_commission_rate']) .", - recurr_max_commission_periods = ". $db->qstr($result->fields['recurr_max_commission_periods']) .", - date_orig = ". $db->qstr(time()) .", - date_last = ". $db->qstr(time()); - $result2 = $db->Execute($sql); - if($result != false) - { - ## Load the affiliate plugin and run the "Add" method: - $sql = "SELECT file FROM ".AGILE_DB_PREFIX."affiliate_plugin WHERE - id = ". $db->qstr($result->fields['affiliate_plugin'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $plgn = $db->Execute($sql); - @$pluginfile = PATH_PLUGINS . 'affiliate/' . $plgn->fields['file'] . '.php'; - if(@include_once($pluginfile)) - { - eval ( '$_PLGN_AFF = new plgn_aff_'. strtoupper ( $plgn->fields['file'] ) . ';' ); - $_PLGN_AFF->add(SESS_ACCOUNT, $this->record_id); - } - - ## Send the affiliate e-mail: - require_once(PATH_MODULES . 'email_template/email_template.inc.php'); - $my = new email_template; - $my->send('affiliate_staff_add', $VAR['affiliate_account_id'], '', '', $this->record_id); - - ## Redirect - global $VAR; - $VAR['id'] = $this->record_id; - define('FORCE_PAGE', $VAR['_page']); - } - else - { - $C_debug->alert('There was an error and the affiliate account could not be added.'); - define('FORCE_PAGE', $VAR['_page_current']); - } - } - - - - ############################## - ## VIEW ## - ############################## - function view($VAR) { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - - # set the field list for this method: - $db = &DB(); - $arr = $this->method[$type]; - if(isset($VAR["id"])) - { - $id = explode(',',$VAR["id"]); - for($i=0; $iqstr($id[$i])." "; - $ii++; - } - else - { - $id_list .= " OR id = " .$db->qstr($id[$i]). " "; - $ii++; - } - } - } - } - - if($ii>0) - { - # generate the full query - $q = "SELECT * FROM - ".AGILE_DB_PREFIX."affiliate - WHERE - $id_list - AND site_id = '" . DEFAULT_SITE . "'"; - $result = $db->Execute($q); - - # error reporting - if ($result === false) - { - global $C_debug; - $C_debug->error('affiliate.inc.php','view', $db->ErrorMsg() . ' ' . $q); - return; - } - - - # put the results into a smarty accessable array - $i=0; - $class_name = TRUE; - while (!$result->EOF) - { - $smart[$i] = $result->fields; - - if($class_name) - { - $smart[$i]["i"] = $i; - } else { - $smart[$i]["i"] = $i; - } - - $plugin_data = unserialize($result->fields["plugin_data"]); - - ### Get the name of the plugin file to include: - $sql1 = "SELECT file FROM ".AGILE_DB_PREFIX."affiliate_plugin WHERE - id = ". $db->qstr($result->fields['affiliate_plugin_id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $plgn = $db->Execute($sql1); - $smart[$i]["plugin_file"] = "affiliate:plugin_" . $plgn->fields["file"]; - - - ### Get the static vars: - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - $arr = $static_var->update_form('affiliate', 'update', $result->fields['id']); - if(gettype($arr) == 'array') - { - $smart[$i]["static_var"] = $arr; - } - - ############################################################################ - ### START AFFILIATE STATISTICS ################## - - ### Get the sessions referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."session WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart[$i]["stats_sessions"] = $result2->RecordCount(); - - - ### Get the accounts referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."account WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart[$i]["stats_accounts"] = $result2->RecordCount(); - - ### Get the invoices referred by this affiliate: - $sql2 = "SELECT id,total_amt FROM ".AGILE_DB_PREFIX."invoice WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart[$i]["stats_invoices"] = $result2->RecordCount(); - $total = 0; - while(!$result2->EOF) { - $total += $result2->fields['total_amt']; - $result2->MoveNext(); - } - $smart[$i]["stats_invoices_amt"] = $total; - - ### Get the commissions issued to this affiliate: - $sql2 = "SELECT commission FROM ".AGILE_DB_PREFIX."invoice_commission WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $total = 0; - while(!$result2->EOF) { - $total += $result2->fields['commission']; - $result2->MoveNext(); - } - $smart[$i]["stats_commissions"] = $total; - - ### Get the commissions (outstanding) to be issued to this affiliate: - $smart[$i]["commissions_due"] = $this->commission_due($result->fields['id']) ; - - - - ### END AFFILIATE STATISTICS #################### - ############################################################################# - - - $i++; - $result->MoveNext(); - } - - # get the result count: - $results = $i; - - ### No results: - if($i == 0) - { - global $C_debug; - $C_debug->error("CORE:affiliate.inc.php", "view()", " - The selected affiliate does not exist any longer!"); - return; - } - - global $smarty; - $smarty->assign('record', array_pop($smart)); - $smarty->assign('plugin_data', $plugin_data); - $smarty->assign('results', $search->results); - } - } - - - function commission_due($affiliate_id) - { - $db = &DB(); - $sql2 = "SELECT invoice_id FROM ".AGILE_DB_PREFIX."invoice_commission WHERE - affiliate_id = ". $db->qstr($affiliate_id)." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $sqla = ''; - while(!$result2->EOF) - { - $sqla .= " AND id != " . $result2->fields['invoice_id']; - $result2->MoveNext(); - } - $sql = "SELECT total_amt FROM ".AGILE_DB_PREFIX."invoice WHERE - affiliate_id = ". $db->qstr($affiliate_id)." AND - billing_status = 1 - {$sqla} - AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql); - $total = 0; - while(!$result2->EOF) { - $total += $result2->fields['total_amt']; - $result2->MoveNext(); - } - - return $total; - } - - - - - - ############################## - ## UPDATE ## - ############################## - function update($VAR) - { - #################################################################### - ### Get required static_Vars and validate them... return an array - ### w/ ALL errors... - #################################################################### - - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - if(!isset($this->val_error)) $this->val_error = false; - $all_error = $static_var->validate_form('affiliate', $this->val_error); - - if($all_error != false && gettype($all_error) == 'array') - $this->validated = false; - else - $this->validated = true; - - #################################################################### - # If validation was failed, skip the db insert & - # set the errors & origonal fields as Smarty objects, - # and change the page to be loaded. - #################################################################### - - if(!$this->validated) - { - global $smarty; - - # set the errors as a Smarty Object - $smarty->assign('form_validation', $all_error); - - # set the page to be loaded - if(!defined("FORCE_PAGE")) - { - define('FORCE_PAGE', $VAR['_page_current']); - } - return; - } - - # special handling for the affiliate data array - if(isset($VAR['affiliate_plugin_data']) && is_array($VAR['affiliate_plugin_data'])) { - while (list($key,$val) = each($VAR['affiliate_plugin_data'])) { - if(get_magic_quotes_gpc()) { - $VAR['affiliate_plugin_data']["$key"] = htmlentities(stripcslashes($val), ENT_QUOTES); - } - } - } - - $type = "update"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->update($VAR, $this, $type); - - ### Update the static vars: - $static_var->update($VAR, 'affiliate', $VAR['affiliate_id']); - - } - - - - - - - ############################## - ## MASS DELETE ## - ############################## - function delete($VAR) - { - $id_list = ''; - $ii=0; - - if(isset($VAR["delete_id"])) - { - $id = explode(',',$VAR["delete_id"]); - } - elseif (isset($VAR["id"])) - { - $id = explode(',',$VAR["id"]); - } - - for($i=0; $idelete_one($id[$i]); - } - } - - if($ret) - { - # Alert delete message - global $C_debug, $C_translate; - $C_translate->value["CORE"]["module_name"] = $C_translate->translate('name',$this->module,""); - $message = $C_translate->translate('alert_delete_ids',"CORE",""); - $C_debug->alert($message); - } - } - - - - ############################## - ## MASS DELETE ## - ############################## - function delete_one($id) - { - # get the parent affiliate id for this account, if any - $db = &DB(); - $sql = 'SELECT parent_affiliate_id FROM ' . AGILE_DB_PREFIX . 'affiliate WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id= ' . $db->qstr($id); - $result = $db->Execute($sql); - if($result->RecordCount() > 0) - { - if(!empty($result->fields['parent_affiliate_id'])) - { - ## update all affiliates one this affiliate's main tier - ## to assume the position this affiliate was in: - $sql = 'UPDATE ' . AGILE_DB_PREFIX . 'affiliate - SET - parent_affiliate_id = ' . $db->qstr($result->fields['parent_affiliate_id']) . ' - WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - parent_affiliate_id= ' . $db->qstr($id); - $db->Execute($sql); - } - } - # delete any commission records for this affiliate: - $sql = 'DELETE FROM ' . AGILE_DB_PREFIX . 'affiliate - WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr($id); - $db->Execute($sql); - return true; - } - - - ############################## - ## SEARCH EXPORT ## - ############################## - function search_export($VAR) - { - # require the export class - require_once (PATH_CORE . "export.inc.php"); - - # Call the correct export function for inline browser display, download, email, or web save. - if($VAR["format"] == "excel") - { - $type = "export_excel"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_excel($VAR, $this, $type); - } - - else if ($VAR["format"] == "pdf") - { - $type = "export_pdf"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_pdf($VAR, $this, $type); - } - - else if ($VAR["format"] == "xml") - { - $type = "export_xml"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_xml($VAR, $this, $type); - } - - else if ($VAR["format"] == "csv") - { - $type = "export_csv"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_csv($VAR, $this, $type); - } - - else if ($VAR["format"] == "tab") - { - $type = "export_tab"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_tab($VAR, $this, $type); - } - } - - ############################## - ## SEARCH ## - ############################## - function xsearch($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - - $db = &DB(); - - include_once(PATH_CORE . 'validate.inc.php'); - $validate = new CORE_validate; - - # set the search criteria array - $arr = $VAR; - - # loop through the submitted field_names to get the WHERE statement - $where_list = ''; - $i=0; - while (list ($key, $value) = each ($arr)) - { - if($i == 0) - { - if($value != '') - { - $pat = "^" . $this->module . "_"; - if(eregi($pat, $key)) - { - $field = eregi_replace($pat,"",$key); - if(eregi('%',$value)) - { - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value = $validate->convert($field, $value, $this->field["$field"]["convert"]); - } - - $where_list .= " WHERE ".AGILE_DB_PREFIX."affiliate.".$field . " LIKE " . $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - else - { - # check if array - if(is_array($value)) - { - for($i_arr=0; $i_arr < count($value); $i_arr++) - { - if($value["$i_arr"] != '') - { - # determine any field options (=, >, <, etc...) - $f_opt = '='; - $pat_field = $this->module.'_'.$field; - $VAR['field_option']["$pat_field"]["$i_arr"]; - if(isset($VAR['field_option']["$pat_field"]["$i_arr"])) - { - $f_opt = $VAR['field_option']["$pat_field"]["$i_arr"]; - # error checking, safety precaution - if($f_opt != '=' && $f_opt != '>' && $f_opt != '<' && $f_opt != '>=' && $f_opt != '<=' && $f_opt != '!=') - $f_opt = '='; - } - - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value["$i_arr"] = $validate->convert($field, $value["$i_arr"], $this->field["$field"]["convert"]); - } - - - if($i_arr == 0) - { - $where_list .= " WHERE ".AGILE_DB_PREFIX."affiliate.".$field . " $f_opt " . $db->qstr($value["$i_arr"], get_magic_quotes_gpc()); - $i++; - } - else - { - $where_list .= " AND ".AGILE_DB_PREFIX."affiliate.".$field . " $f_opt " . $db->qstr($value["$i_arr"], get_magic_quotes_gpc()); - $i++; - } - } - } - } - else - { - $where_list .= " WHERE ".AGILE_DB_PREFIX."affiliate.".$field . " = " . $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - } - } - } - } - else - { - if($value != '') - { - $pat = "^" . $this->module . "_"; - if(eregi($pat, $key)) - { - $field = eregi_replace($pat,"",$key); - if(eregi('%',$value)) - { - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value = $validate->convert($field, $value, $this->field["$field"]["convert"]); - } - - $where_list .= " AND ".AGILE_DB_PREFIX."affiliate.".$field . " LIKE " . $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - else - { - # check if array - if(is_array($value)) - { - for($i_arr=0; $i_arr < count($value); $i_arr++) - { - if($value["$i_arr"] != '') - { - # determine any field options (=, >, <, etc...) - $f_opt = '='; - $pat_field = $this->module.'_'.$field; - if(isset($VAR['field_option']["$pat_field"]["$i_arr"])) - { - $f_opt = $VAR['field_option']["$pat_field"]["$i_arr"]; - - # error checking, safety precaution - if($f_opt != '=' && $f_opt != '>' && $f_opt != '<' && $f_opt != '>=' && $f_opt != '<=' && $f_opt != '!=') - $f_opt = '='; - } - - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value["$i_arr"] = $validate->convert($field, $value["$i_arr"], $this->field["$field"]["convert"]); - } - - $where_list .= " AND ".AGILE_DB_PREFIX."affiliate.". $field . " $f_opt " . $db->qstr($value["$i_arr"], get_magic_quotes_gpc()); - $i++; - } - } - } - else - { - $where_list .= " AND ".AGILE_DB_PREFIX."affiliate.". $field . " = ". $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - } - } - } - } - } - - - #### finalize the WHERE statement - if($where_list == '') - { - $where_list .= ' WHERE '; - } - else - { - $where_list .= ' AND '; - } - - - # get limit type - if(isset($VAR['limit'])) - { - $limit = $VAR['limit']; - } - else - { - $limit = $this->limit; - } - - # get order by - if(isset($VAR['order_by'])) - { - $order_by = $VAR['order_by']; - } - else - { - $order_by = $this->order_by; - } - - $pre = AGILE_DB_PREFIX; - $q = "SELECT DISTINCT {$pre}affiliate.id FROM {$pre}affiliate "; - $q_save = "SELECT DISTINCT - {$pre}account.first_name, - {$pre}account.last_name, - {$pre}account.username, - {$pre}account.email, - %%fieldList%% - FROM - {$pre}affiliate - LEFT JOIN - {$pre}account - ON - {$pre}affiliate.account_id = {$pre}account.id "; - - - ######## GET ANY STATIC VARS TO SEARCH ########## - $join_list = ''; - if(!empty($VAR["static_relation"]) && count( $VAR["static_relation"] > 0 )) { - while(list($idx, $value) = each ($VAR["static_relation"])) { - if($value != "") { - - $join_list .= " INNER JOIN {$pre}static_var_record AS s{$idx} ON - ( - s{$idx}.record_id = {$pre}{$this->table}.id - AND - s{$idx}.static_var_relation_id = '{$idx}' - AND - s{$idx}.site_id = ".$db->qstr(DEFAULT_SITE)." - AND"; - if(ereg("%", $value)) - $join_list .= " s{$idx}.value LIKE ".$db->qstr($VAR["static_relation"]["$idx"]); - else - $join_list .= " s{$idx}.value = ".$db->qstr($VAR["static_relation"]["$idx"]); - $join_list .= " ) "; - } - } - } - ######## END STATIC VAR SEARCH ################## - - - # standard where list - $q .= $join_list . $where_list ." ".AGILE_DB_PREFIX."affiliate.site_id = " . $db->qstr(DEFAULT_SITE); - $q_save .= $join_list . $where_list ." %%whereList%% "; - - - ################## DEBUG ################## - #echo "
" . $q;
-		#echo "

" . $q_save; - #exit; - - # run the database query - $result = $db->Execute($q); - - # error reporting - if ($result === false) - { - global $C_debug; - $C_debug->error('affiliate.inc.php','search', $db->ErrorMsg()); - return false; - } - - # get the result count: - $results = $result->RecordCount(); - - # get the first record id: - if($results == 1) $record_id = $result->fields['id']; - - # define the DB vars as a Smarty accessible block - global $smarty; - - # Create the definition for fast-forwarding to a single record: - if ($results == 1 && !isset($this->fast_forward)) - { - $smarty->assign('record_id', $record_id); - } - - # create the search record: - if($results > 0) - { - # create the search record - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $arr['module'] = $this->module; - $arr['sql'] = $q_save; - $arr['limit'] = $limit; - $arr['order_by']= $order_by; - $arr['results'] = $results; - $search->add($arr); - - # define the search id and other parameters for Smarty - $smarty->assign('search_id', $search->id); - - # page: - $smarty->assign('page', '1'); - - # limit: - $smarty->assign('limit', $limit); - - # order_by: - $smarty->assign('order_by', $order_by); - } - - # define the result count - $smarty->assign('results', $results); - } - - - - ############################## - ## SEARCH SHOW ## - ############################## - - function xsearch_show($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - - # set the field list for this method: - $arr = $this->method[$type]; - - $field_list = ''; - $i=0; - while (list ($key, $value) = each ($arr)) - { - if($i == 0) - { - $field_var = $this->table . '_' . $value; - $field_list .= AGILE_DB_PREFIX . "affiliate" . "." . $value; - - // determine if this record is linked to another table/field - if($this->field[$value]["asso_table"] != "") - { - $this->linked[] = array('field' => $value, 'link_table' => $this->field[$value]["asso_table"], 'link_field' => $this->field[$value]["asso_field"]); - } - } - else - { - $field_var = $this->table . '_' . $value; - $field_list .= "," . AGILE_DB_PREFIX . "affiliate" . "." . $value; - - // determine if this record is linked to another table/field - if($this->field[$value]["asso_table"] != "") - { - $this->linked[] = array('field' => $value, 'link_table' => $this->field[$value]["asso_table"], 'link_field' => $this->field[$value]["asso_field"]); - } - } - $i++; - } - - - # get the search details: - if(isset($VAR['search_id'])) { - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $search->get($VAR['search_id']); - } else { - # invalid search! - echo '
The search terms submitted were invalid!'; # translate... # alert - - if(isset($this->trigger["$type"])) { - include_once(PATH_CORE . 'trigger.inc.php'); - $trigger = new CORE_trigger; - $trigger->trigger($this->trigger["$type"], 0, $VAR); - } - } - - # get the sort order details: - if(isset($VAR['order_by']) && $VAR['order_by'] != "") { - $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . 'affiliate.'.$VAR['order_by']; - $smarty_order = $VAR['order_by']; - } else { - $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . 'affiliate.'.$this->order_by; - $smarty_order = $search->order_by; - } - - - # determine the sort order - if(isset($VAR['desc'])) { - $order_by .= ' DESC'; - $smarty_sort = 'desc='; - } else if(isset($VAR['asc'])) { - $order_by .= ' ASC'; - $smarty_sort = 'asc='; - } else { - if (!eregi('date',$smarty_order)) { - $order_by .= ' ASC'; - $smarty_sort = 'asc='; - } else { - $order_by .= ' DESC'; - $smarty_sort = 'desc='; - } - } - - # generate the full query - $db = &DB(); - $q = eregi_replace("%%fieldList%%", $field_list, $search->sql); - $q = eregi_replace("%%tableList%%", AGILE_DB_PREFIX.$construct->table, $q); - $q = eregi_replace("%%whereList%%", "", $q); - $q .= " ".AGILE_DB_PREFIX . "affiliate."."site_id = " . $db->qstr(DEFAULT_SITE); - $q .= $order_by; - - ////////////////// - #echo "
 $q 

"; - $current_page=1; - $offset=-1; - if (!empty($VAR['page'])) $current_page = $VAR['page']; - if (empty($search->limit)) $search->limit=25; - if($current_page>1) $offset = (($current_page * $search->limit) - $search->limit); - $result = $db->SelectLimit($q, $search->limit, $offset); - - # error reporting - if ($result === false) - { - global $C_debug; - $C_debug->error('affiliate.inc.php','search_show', $db->ErrorMsg()); - - if(isset($this->trigger["$type"])) - { - include_once(PATH_CORE . 'trigger.inc.php'); - $trigger = new CORE_trigger; - $trigger->trigger($this->trigger["$type"], 0, $VAR); - } - return; - } - - - # put the results into a smarty accessable array - $i=0; - $class_name = TRUE; - while (!$result->EOF) { - $smart[$i] = $result->fields; - - if($class_name) - { - $smart[$i]['_C'] = 'row1'; - $class_name = FALSE; - } else { - $smart[$i]['_C'] = 'row2'; - $class_name = TRUE; - } - - ### Get the sessions referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."session WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart[$i]["stats_sessions"] = $result2->RecordCount(); - - - ### Get the accounts referred by this affiliate: - $sql2 = "SELECT id FROM ".AGILE_DB_PREFIX."account WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart[$i]["stats_accounts"] = $result2->RecordCount(); - - ### Get the invoices referred by this affiliate: - $sql2 = "SELECT id,total_amt FROM ".AGILE_DB_PREFIX."invoice WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $smart[$i]["stats_invoices"] = $result2->RecordCount(); - $total = 0; - while(!$result2->EOF) { - $total += $result2->fields['total_amt']; - $result2->MoveNext(); - } - $smart[$i]["stats_invoices_amt"] = $total; - - ### Get the commissions issued to this affiliate: - $sql2 = "SELECT commission FROM ".AGILE_DB_PREFIX."invoice_commission WHERE - affiliate_id = ". $db->qstr($result->fields['id'])." AND - site_id = ". $db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql2); - $total = 0; - while(!$result2->EOF) { - $total += $result2->fields['commission']; - $result2->MoveNext(); - } - $smart[$i]["stats_commissions"] = $total; - - $result->MoveNext(); - $i++; - } - - - # get any linked fields - if($i > 0) - { - $db_join = new CORE_database; - $this->result = $db_join->join_fields($smart, $this->linked); - } - else - { - $this->result = $smart; - } - - # get the result count: - $results = $result->RecordCount(); - - # define the DB vars as a Smarty accessible block - global $smarty; - - # define the results - $smarty->assign($this->table, $this->result); - $smarty->assign('page', $VAR['page']); - $smarty->assign('order', $smarty_order); - $smarty->assign('sort', $smarty_sort); - $smarty->assign('limit', $search->limit); - $smarty->assign('search_id',$search->id); - $smarty->assign('results', $search->results); - - # get the total pages for this search: - if(empty($search->limit)) - $this->pages = 1; - else - $this->pages = intval($search->results / $search->limit); - if ($search->results % $search->limit) $this->pages++; - - # total pages - $smarty->assign('pages', $this->pages); - - # current page - $smarty->assign('page', $current_page); - $page_arr = ''; - for($i=0; $i <= $this->pages; $i++) - { - if ($this->page != $i) $page_arr[] = $i; - } - - # page array for menu - $smarty->assign('page_arr', $page_arr); - } - - - ############################## - ## STATIC VARS ## - ############################## - - function static_var($VAR) - { - global $smarty; - - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - - if(ereg('search', $VAR['_page'])) - $arr = $static_var->generate_form($this->module, 'add', 'search'); - else - $arr = $static_var->generate_form($this->module, 'add', 'update'); - - if(gettype($arr) == 'array') - { - ### Set everything as a smarty array, and return: - $smarty->assign('show_static_var', true); - $smarty->assign('static_var', $arr); - return true; - } - else - { - ### Or if no results: - $smarty->assign('show_static_var', false); - return false; - } - } -} -?> diff --git a/modules/affiliate/affiliate_construct.xml b/modules/affiliate/affiliate_construct.xml deleted file mode 100644 index 34a60242..00000000 --- a/modules/affiliate/affiliate_construct.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - affiliate - - affiliate
- - - - 0 - - id - - 25 - - 0 - - - - account_id - parent_affiliate_id - - - - - - - 1 - C(32) - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Active - L - - - I8 - any - - - X2 - array - - - C(32) - - - C(16) - affiliate - id - - - I4 - - - F - - - L - - - X2 - array - - - L - - - X2 - array - - - I4 - - - X2 - array - - - - - - id,site_id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods,plugin_data - id,site_id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods,plugin_data - id,site_id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods,plugin_data - id,site_id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods,plugin_data - id,site_id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods,plugin_data - date_last,affiliate_plugin,plugin_data - id,site_id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - id,date_orig,date_last,status,account_id,avail_campaign_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - id,date_orig,date_last,status,account_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,recurr_commission_type,recurr_max_commission_periods - id,date_orig,date_last,status,account_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,recurr_commission_type,recurr_max_commission_periods - id,date_orig,date_last,status,account_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,recurr_commission_type,recurr_max_commission_periods - id,date_orig,date_last,status,account_id,affiliate_plugin,parent_affiliate_id,max_tiers,commission_minimum,new_commission_type,recurr_commission_type,recurr_max_commission_periods - - - - - - - - <new_tier_iframe>Commissions New Charges</new_tier_iframe> - <recurr_tier_iframe>Commissions Recurring Charges</recurr_tier_iframe> - - - - - - - id - checkbox - 25px - - - id - - - sessions - - - accounts - - - invoices - - - commissions - - - status - 20px - - - - - -
diff --git a/modules/affiliate/affiliate_install.xml b/modules/affiliate/affiliate_install.xml deleted file mode 100644 index 8908dc41..00000000 --- a/modules/affiliate/affiliate_install.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - Affiliates - - 1 - - affiliate - - - - account - - affiliate_commission,affiliate_template,campaign - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - search_export - - - mail_multi - - - autoselect - - - diff --git a/modules/affiliate/auth.inc.php b/modules/affiliate/auth.inc.php deleted file mode 100644 index f39c8c70..00000000 --- a/modules/affiliate/auth.inc.php +++ /dev/null @@ -1,28 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -$auth_methods = Array -( - Array ('module' => 'affiliate', 'method' => 'user_add'), - Array ('module' => 'affiliate', 'method' => 'user_update'), - Array ('module' => 'affiliate', 'method' => 'user_view'), - Array ('module' => 'affiliate', 'method' => 'static_var') -); -?> \ No newline at end of file diff --git a/modules/affiliate_commission/affiliate_commission.inc.php b/modules/affiliate_commission/affiliate_commission.inc.php deleted file mode 100644 index b3f2ed5c..00000000 --- a/modules/affiliate_commission/affiliate_commission.inc.php +++ /dev/null @@ -1,471 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:AffiliateCommission - */ - -/** - * The main AgileBill Affilicate Commissions Class - * - * @package AgileBill - * @subpackage Module:AffiliateCommission - */ -class affiliate_commission extends OSB_module { - ############################## - ## ADD ## - ############################## - function add($VAR) - { - $search_limit = 50; - - global $C_debug, $C_translate; - include_once(PATH_CORE . 'validate.inc.php'); - $validate = new CORE_validate; - - $this->start_date = false; - if(!empty($VAR['affiliate_commission_start_date'])) $this->start_date = $validate->convert('', $VAR['affiliate_commission_start_date'], 'date'); - - $this->end_date=false; - if(!empty($VAR['affiliate_commission_end_date'])) $this->end_date = $validate->convert('', $VAR['affiliate_commission_end_date'], 'date'); - - # determine the offset & limit - if(!empty($VAR['page'])) { - $current_page = $VAR['page']; - } else { - $current_page = '1'; - } - - # determine the offset & limit - $offset=-1; - if($current_page == 1) { - $offset = 0; - } else { - $offset = (($current_page * $search_limit) - $search_limit); - } - - $db = &DB(); - if($current_page == 1) - $this->GenID = $db->GenID(AGILE_DB_PREFIX . 'affiliate_commission_id'); - else - $this->GenID = @$VAR['GenID']; - - # Generate the SQL for this commission generation session: - $sql = "SELECT id,affiliate_id,total_amt,tax_amt,type FROM ".AGILE_DB_PREFIX."invoice WHERE site_id = ".$db->qstr(DEFAULT_SITE)." AND - process_status = 1 AND billing_status = 1 AND - ( affiliate_id IS NOT NULL AND affiliate_id !='' ) AND - total_amt > 0 "; - if($this->start_date) $sql .= " AND date_orig >= ".$db->qstr($this->start_date); - if($this->end_date) $sql .= " AND date_orig <= ".$db->qstr($this->end_date); - $result = $db->SelectLimit($sql, $search_limit, $offset); - - #echo $sql; - #echo "

"; - #print_r($result->fields); - #exit; - - # No more results - print link to export data: - if($result->RecordCount() == 0 && $current_page > 1) { - $msg = $C_translate->translate('generated','affiliate_commission',''); - $msg .= '    '.$C_translate->translate('submit','','').''; - $msg .= ''; - - $C_debug->alert($msg); - return; - } - - # Loop through the results: - $count = 0; - while (!$result->EOF) - { - $do = true; - $level = 1; - unset($affiliate_arr); - $affiliate_id = $result->fields["affiliate_id"]; - - # check if the commissions for this invoice have already been issued... - $sql = "SELECT id FROM ".AGILE_DB_PREFIX."invoice_commission WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - invoice_id = ".$db->qstr($result->fields["id"]); - $result2 = $db->Execute($sql); - if ($result2->RecordCount() == 0) - { - - # loop through all affiliate levels to generate the commissions... - while ( $level < 100 && @$affiliate_id) - { - for($i=0; $ifields["id"]} - GROUP BY invoice_id"; - $rsi=$db->Execute($sqli); - if($rsi && $rsi->RecordCount()) { - $invoice_amount = $rsi->fields["invoice_amount"]; - $arr = $this->calc_commission($affiliate_id, $invoice_amount, $result->fields["type"], $level); - if (@$arr["amount"] > 0) - $this->add_invoice_commission($arr['amount'], $affiliate_id, $result->fields["id"]); - unset($affiliate_id); - if (isset($arr["affiliate_id"])) - $affiliate_id = $arr['affiliate_id']; - - $count++; - } - } - $level++; - } - } - - # add this invoice to the processed list... - $result->MoveNext(); - } - - # Create the affiliate_commission record: - if($count == 0) - { - $msg = $C_translate->translate('no_results','affiliate_commission',''); - $C_debug->alert($msg); - } - else - { - $start = ($search_limit * $current_page) - $search_limit; - $stop = ($search_limit * $current_page); - $page = $current_page + 1; - $C_translate->value['affiliate_commission']['start'] = $start; - $C_translate->value['affiliate_commission']['stop'] = $stop; - $C_translate->value['affiliate_commission']['genid'] = $this->GenID; - $C_translate->value['affiliate_commission']['page'] = $page; - $C_translate->value['affiliate_commission']['unixtime_start_date'] = $this->start_date; - $C_translate->value['affiliate_commission']['unixtime_stop_date'] = $this->end_date; - - $msg = $C_translate->translate('continue','affiliate_commission',''); - $url = '?_page=core:blank&do[]=affiliate_commission:add&GenID='.$this->GenID. - '&page='.$page. - '&affiliate_commission_start_date='.@$VAR['affiliate_commission_start_date']. - '&affiliate_commission_start_date='.@$VAR['affiliate_commission_start_date']; - $msg .= '    '.$C_translate->translate('submit','','').''; - $msg .= ''; - $C_debug->alert($msg); - } - } - - - ############################## - ## CALCULATE COMMISSIONS ## - ############################## - function calc_commission( $affiliate_id, $amount, $type, $level ) - { - $db = &DB(); - $sql = "SELECT * FROM ".AGILE_DB_PREFIX."affiliate WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($affiliate_id); - $result = $db->Execute($sql); - if ($result->RecordCount() == 0) return false; - - # can affiliate recieve commissions from this level? - if($result->fields['max_tiers'] >= $level) - { - ## Order Type: 0 = new, 1 = recurring charge - if($type == 0) { - $rate = unserialize($result->fields['new_commission_rate']); - $calc = $result->fields['new_commission_type']; - } else { - $rate = unserialize($result->fields['recurr_commission_rate']); - $calc = $result->fields['recurr_commission_type']; - } - $i = $level - 1; - $amount2 = $rate[$i] * $amount; - $ret['amount'] = $amount2; - } - else - { - $ret['amount'] = false; - } - - # get the parent affiliate id, if any: - if ( $result->fields['parent_affiliate_id'] != $affiliate_id) - $ret['affiliate_id'] = $result->fields['parent_affiliate_id']; - - return $ret; - } - - - ############################## - ## INCREMENT COMMISSION ## - ############################## - function add_invoice_commission( $amount, $affiliate_id, $invoice_id ) - { - $db = &DB(); - $id = $db->GenID(AGILE_DB_PREFIX . 'invoice_commission_id'); - $sql = "INSERT INTO ".AGILE_DB_PREFIX."invoice_commission SET - id = ".$db->qstr($id).", - site_id = ".$db->qstr(DEFAULT_SITE).", - date_orig = ".$db->qstr(time()).", - date_last = ".$db->qstr(time()).", - affiliate_commission_id = ".$db->qstr($this->GenID).", - invoice_id = ".$db->qstr($invoice_id).", - affiliate_id = ".$db->qstr($affiliate_id).", - commission = ".$db->qstr($amount).", - status = ".$db->qstr("0"); - $result = $db->Execute($sql); - - ### Increment the affiliate_commission totals: - $sql = "SELECT commissions FROM ".AGILE_DB_PREFIX."affiliate_commission WHERE - id = ".$db->qstr($this->GenID)." AND - site_id = ".$db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - if($result->RecordCount() > 0) - { - ### Update the affiliate_commission total: - if( $result->fields['commissions'] > 0 ) - $current = $result->fields['commissions'] + $amount; - else - $current = $amount; - - $sql = "UPDATE ".AGILE_DB_PREFIX."affiliate_commission - SET - commissions = ".$db->qstr($current)." - WHERE - id = ".$db->qstr($this->GenID)." AND - site_id = ".$db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - } - else - { - ### Create new affiliate_commission record - $sql = "INSERT INTO ".AGILE_DB_PREFIX."affiliate_commission SET - id = ".$db->qstr($this->GenID).", - site_id = ".$db->qstr(DEFAULT_SITE).", - date_orig = ".$db->qstr(time()).", - date_begin = ".$db->qstr($this->start_date).", - date_end = ".$db->qstr($this->end_date).", - commissions = ".$db->qstr($amount); - $result = $db->Execute($sql); - } - } - - - - - ############################## - ## GET ARRAY OF AFFILIATES ## - ############################## - function plugin_affiliate_list($plugin_name, $affiliate_commission_id) - { - # Get each affiliate in this commission: - $db = &DB(); - $sql = "SELECT DISTINCT affiliate_id FROM ".AGILE_DB_PREFIX."invoice_commission WHERE - affiliate_commission_id = ".$db->qstr($affiliate_commission_id)." AND - site_id = ".$db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - if ($result->RecordCount() == 0) return false; - while(!$result->EOF) { - # check if the affiliate is using plugin_name specified: - $sql = "SELECT id FROM ".AGILE_DB_PREFIX."affiliate WHERE - id = ".$db->qstr($result->fields['affiliate_id'])." AND - affiliate_plugin = ".$db->qstr($plugin_name)." AND - site_id = ".$db->qstr(DEFAULT_SITE); - $result2 = $db->Execute($sql); - if ($result2->RecordCount() >= 1) { - $arr[] = $result->fields['affiliate_id']; - } - $result->MoveNext(); - } - if(count(@$arr) > 0) - return $arr; - else - return false; - } - - - - ############################## - ## VIEW ## - ############################## - function view($VAR) - { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - - - ################################################# - # Get the data for each affiliate plugin: - global $C_translate, $smarty; - $id = @$VAR['id']; - - $path = PATH_PLUGINS . '/affiliate/'; - $pre = ''; - $ext = '.php'; - - $count = 0; - chdir($path); - $dir = opendir($path); - while ($file_name = readdir($dir)) - { - $display = true; - if($file_name != '..' && $file_name != '.') - { - if(!empty($ext)) - { - $cute = eregi_replace($ext.'$', "", $file_name); - if(!eregi($ext.'$', $file_name)) $display = false; - } - if(!empty($pre)) - { - $cute = eregi_replace('^'.$pre, "", $cute); - if(!eregi('^'.$pre, $file_name)) $display = false; - } - if($display) - { - $name = $cute; - if($arr_count = $this->plugin_affiliate_list($cute, $id)) - $count = count($arr_count); - else - $count = 0; - $cute = eregi_replace("_"," ",$cute); - $cute = eregi_replace("-"," ",$cute); - - $smart[] = Array ( 'name' => $cute, - 'plugin' => $name, - 'count' => $count); - $count++; - } - } - } - - $smarty->assign('plugindata', $smart); - } - - - ############################## - ## RUN AFFILIATE PLUGIN ## - ############################## - function export($VAR) - { - # make sure the required vars are set: id, plugin, - if(!isset($VAR['id']) || !isset($VAR['plugin'])) - echo "Invalid parameters passed.."; - - # Load the plugin - $file = $VAR['plugin']; - include_once(PATH_PLUGINS . 'affiliate/'. $file.'.php'); - eval ( '$_PLUGIN = new plgn_aff_'. strtoupper ( $file ) . ';' ); - - # Get each affiliate to be paid a commisson for this affiliate_commission ID - $db = &DB(); - $export=''; - if($arr_count = $this->plugin_affiliate_list($VAR['plugin'], $VAR['id'])) { - for($i=0; $iExecute($sql); - - # Run PLUGIN->commission to add the data to the return text - if($result && $result->RecordCount() && $result->fields['commission'] > 0) - $export .= $_PLUGIN->commission(round($result->fields['commission'],2), $arr_count[$i], $VAR['id']); - } - - # Run the PLUGIN->header method to set any req. headers. - $_PLUGIN->header(); - - # include detailed commission details? - $detail = ''; - if(is_callable($_PLUGIN->commission_detailed)) - { - $sql = "SELECT comm.affiliate_id, comm.invoice_id, comm.commission, invoice.date_orig, invoice.total_amt, account.first_name, account.last_name, affiliate.plugin_data from ".AGILE_DB_PREFIX."invoice_commission as comm - join ".AGILE_DB_PREFIX."invoice as invoice on (invoice.id=comm.invoice_id) - join ".AGILE_DB_PREFIX."account as account on (account.id=invoice.account_id) - join ".AGILE_DB_PREFIX."affiliate as affiliate on (affiliate.id=comm.affiliate_id) - WHERE - comm.affiliate_commission_id = ".$db->qstr($VAR['id'])." AND - comm.site_id = ".$db->qstr(DEFAULT_SITE)." - order by comm.affiliate_id"; - /* SELECT affiliate_id,sum(commission) as commission from ab_invoice_commission group by affiliate_id */ - $result = $db->Execute($sql); - - # Run PLUGIN->commission to add the data to the return text - if($result && $result->RecordCount()) $detail = $_PLUGIN->commission_detailed($result); - } - - # Print the data - echo $export . "\r\n\r\n". $detail; - - } else { - echo 'An error occurred: no affiliates are associated with this plugin'; - } - } - - - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $this->associated_DELETE[] = Array ('table' => 'invoice_commission', 'field' => 'affiliate_commission_id'); - $db = new CORE_database; - $db->mass_delete($VAR, $this, ""); - - # Delete all associated discounts: - if(isset($VAR['id'])) - { - $id = $VAR['id']; - for($i=0; $iqstr($q)." AND - site_id = ".$db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - } - } - } - else - { - $id = $VAR['delete_id']; - $q = '%Affiliate Commission ID '. $id.'%'; - $db = &DB(); - $sql = "DELETE FROM ".AGILE_DB_PREFIX."discount WHERE - notes LIKE ".$db->qstr($q)." AND - site_id = ".$db->qstr(DEFAULT_SITE); - $result = $db->Execute($sql); - } - } -} -?> diff --git a/modules/affiliate_commission/affiliate_commission_construct.xml b/modules/affiliate_commission/affiliate_commission_construct.xml deleted file mode 100644 index 13064f7f..00000000 --- a/modules/affiliate_commission/affiliate_commission_construct.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - affiliate_commission - - affiliate_commission
- - affiliate - - 0 - - date_orig - - 25 - - 0 - - - - date_begin - date_end - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - Active - L - - - date - I8 - - - I8 - date - - - F - - - X2 - - - X2 - - - - - - id,site_id,date_orig,date_begin,date_end,commissions,notes_admin,notes_affiliate,status - id,site_id,date_orig,date_begin,date_end,commissions,notes_admin,notes_affiliate,status - id,site_id - id,site_id,date_orig,date_begin,date_end,commissions,notes_admin,notes_affiliate,status - id,site_id,date_orig,date_begin,date_end,commissions,notes_admin,notes_affiliate,status - - - - - - - - - - - - - - id - checkbox - 25px - - - date_orig - date - - - date_begin - date - - - date_end - date - - - commissions - - - status - bool_icon - 20px - - - -
diff --git a/modules/affiliate_commission/affiliate_commission_install.xml b/modules/affiliate_commission/affiliate_commission_install.xml deleted file mode 100644 index ca36588d..00000000 --- a/modules/affiliate_commission/affiliate_commission_install.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - affiliate - - Affiliate Commissions - - 1 - - affiliate_commission - - - - affiliate - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - export - - - diff --git a/modules/affiliate_template/affiliate_template.inc.php b/modules/affiliate_template/affiliate_template.inc.php deleted file mode 100644 index a5369346..00000000 --- a/modules/affiliate_template/affiliate_template.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:AffiliateTemplate - */ - -/** - * The main AgileBill Module:Affiliate Template Class - * - * @package AgileBill - * @subpackage Module:AffiliateTemplate - */ -class affiliate_template extends OSB_module { -} -?> diff --git a/modules/affiliate_template/affiliate_template_construct.xml b/modules/affiliate_template/affiliate_template_construct.xml deleted file mode 100644 index bb6198e3..00000000 --- a/modules/affiliate_template/affiliate_template_construct.xml +++ /dev/null @@ -1,127 +0,0 @@ - - - - affiliate_template - - affiliate_template
- - affiliate - - 0 - - name - - 25 - - 0 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - Active - L - - - C(32) - - - X2 - array - - - C(32) - 2 - 32 - any - - - X2 - - - I4 - 1 - 2 - numeric - - - F - 1 - 12 - float - - - L - - - X2 - array - - - L - - - X2 - array - - - I4 - - - - - - affiliate_plugin,avail_campaign_id,status,name,notes,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - id,site_id,affiliate_plugin,avail_campaign_id,status,name,notes,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - id,site_id,affiliate_plugin,avail_campaign_id,status,name,notes,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - id,site_id,affiliate_plugin,avail_campaign_id,status,name,notes,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - id,site_id,affiliate_plugin,avail_campaign_id,status,name,notes,max_tiers,commission_minimum,new_commission_type,new_commission_rate,recurr_commission_type,recurr_commission_rate,recurr_max_commission_periods - - - - - - - - - - - - - - id - checkbox - 25px - - - name - - - max_tiers - - - commission_minimum - - - status - bool_icon - 20px - - - -
diff --git a/modules/affiliate_template/affiliate_template_install.xml b/modules/affiliate_template/affiliate_template_install.xml deleted file mode 100644 index 1bf4de8b..00000000 --- a/modules/affiliate_template/affiliate_template_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - affiliate - - Affiliate Templates - - 1 - - affiliate_template - - - - affiliate - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/affiliate_template/affiliate_template_install_data.xml b/modules/affiliate_template/affiliate_template_install_data.xml deleted file mode 100644 index feae42d7..00000000 --- a/modules/affiliate_template/affiliate_template_install_data.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - 1 - 1 - ACCOUNT_DISCOUNT - - 1 - Default - 1 - 10 - 1 - - 1 - - 5 - - - 1 - - diff --git a/modules/asset/asset.inc.php b/modules/asset/asset.inc.php deleted file mode 100644 index de34f7e2..00000000 --- a/modules/asset/asset.inc.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Asset - */ - -/** - * The main AgileBill Asset Class - * - * @package AgileBill - * @subpackage Module:Asset - */ -class asset extends OSB_module { - /* check availibility */ - function available($assetPoolId, $qty=1) { - $db=&DB(); - $rs = $db->Execute($sql=sqlSelect($db,"asset","id","(status=0 or status is null) and pool_id=::$assetPoolId::")); - if($rs && $rs->RecordCount() >= $qty) - return true; - else - return false; - } - - /* assign a asset to a specific service id from a specific asset pool */ - function assign($serviceId, $assetPoolId) { - // check if any available - $db=&DB(); - $rs = $db->Execute(sqlSelect($db,"asset","id,asset","(status=0 or status is null) and pool_id=::$assetPoolId::","",1)); - if($rs && $rs->RecordCount()) { - $id = $rs->fields['id']; - $asset = $rs->fields['asset']; - $fields=Array('service_id'=>$serviceId, 'status'=>1, 'date_last'=>time()); - $db->Execute($sql=sqlUpdate($db,"asset",$fields,"id = $id")); - return $asset; - } - return false; - } - - /** assign a known asset */ - function assignKnown($serviceId, $assetId) { - $fields=Array('service_id'=>$serviceId, 'status'=>1, 'date_last'=>time()); - $db=&DB(); - $sql=sqlUpdate($db,"asset",$fields,"id = ::$assetId::"); - $db->Execute($sql); - } - - /* un-assign a specific asset */ - function unAssign($assetId) { - $db=&DB(); - $db->Execute($sql="UPDATE ".AGILE_DB_PREFIX."asset SET status='0',date_last='".time()."',service_id='0' WHERE id='$assetId'"); - return true; - } - - /* un-assign all assets for a specific service */ - function unAssignAll($serviceId) { - $db=&DB(); - $db->Execute($sql="UPDATE ".AGILE_DB_PREFIX."asset SET status='0',date_last='".time()."',service_id='0' WHERE service_id='$serviceId'"); - return true; - } - - - /* import assets */ - function import($VAR) { - global $C_debug; - if(empty($VAR['asset_pool_id'])) { - $C_debug->alert("No asset pool specified"); - return; - } - - $db =& DB(); - if (is_uploaded_file($_FILES['datafile']['tmp_name'])) { - # Got a file to import - $fp = fopen($_FILES['datafile']['tmp_name'],"r"); - if ($fp) { - $counter = 0; $skipped = 0; - while (!feof($fp)) { - $line = fgets($fp,128); - $cols=explode(",", $line); - if(!empty($cols[0])) { - $fields = Array( - 'date_orig'=>time(), - 'date_last'=>time(), - 'status'=>0, - 'service_id'=>0, - 'pool_id'=> $VAR['asset_pool_id'], - 'asset'=>@$cols[0], - 'misc'=>@$cols[1]); - $db->Execute( sqlInsert($db, "asset", $fields) ); - $counter++; - } else { - $skipped++; - } - } - $C_debug->alert("Imported $counter new Asset(s) and skipped $skipped Asset(s)!"); - } else { - $C_debug->alert('Unable to fopen the file sent.'); - } - } else { - $C_debug->alert('Unable to process the uploaded file.'); - } - } -} -?> diff --git a/modules/asset/asset_construct.xml b/modules/asset/asset_construct.xml deleted file mode 100644 index ac253c8c..00000000 --- a/modules/asset/asset_construct.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - asset - - asset
- - - - 0 - - asset - - 25 - - 0 - - - - id,site_id - pool_id - service_id - asset - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Active - L - - - Service ID - I8 - - - Pool - asset_pool - name - I4 - any - - - Asset - 1 - 128 - C(128) - - - Notes - C(255) - - - - - - status,pool_id,asset,misc - id,status,service_id,pool_id,asset,misc - id - id,date_orig,date_last,status,service_id,pool_id,asset,misc - id,date_orig,date_last,status,service_id,pool_id,asset,misc - - - - - - - - <add>Add Asset</add> - <view>View Asset</view> - - - - - - - id - checkbox - 25px - - - date_last - date - - - status - bool_icon - - - pool_id - - - asset - - - -
diff --git a/modules/asset/asset_install.xml b/modules/asset/asset_install.xml deleted file mode 100644 index 03816920..00000000 --- a/modules/asset/asset_install.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - Asset - - 1 - - asset - - - - - - asset_pool - - - - - - - - Add - 1 - add - - - - delete - - - - List - search - 1 - - - - - search_form - - - - search_show - - - - update - - - - view - - - - Import - 1 - import - - - diff --git a/modules/asset/generator.php b/modules/asset/generator.php deleted file mode 100644 index 88498dcb..00000000 --- a/modules/asset/generator.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -/* -USAGE: - -url/to/modules/asset/generator.php?prefix=MyPrefix&start=1&end=100 - -Where prefix a text prefix (defaults to asset- ) -Where start is the start of the count -Where end is the end of the count - -Paste to a text file and save for loading into the asset import tool. - -*/ - -$prefix='asset-'; -$start=0; -$end=1000; - -@$prefix = $_GET['prefix']; -@$start = $_GET['start']; -@$end = $_GET['end']; - -echo "
";
-
-while($start < $end) {
-	echo $prefix.$start."\r\n";
-	$start++;
-}
-
-?>
\ No newline at end of file
diff --git a/modules/asset_invoice/asset_invoice.inc.php b/modules/asset_invoice/asset_invoice.inc.php
deleted file mode 100644
index 387c200d..00000000
--- a/modules/asset_invoice/asset_invoice.inc.php
+++ /dev/null
@@ -1,209 +0,0 @@
- 
- * @package AgileBill
- * @version 1.4.93
- */
-	
-class asset_invoice
-{	
-	/** get menu of asset pools */
-	function main($var) {
-		
-		$db=&DB();
-		$p=AGILE_DB_PREFIX;
-		$rs = $db->Execute("select id,name from {$p}asset_pool");
-		if($rs && $rs->RecordCount()) {		
-			global $smarty;
-			$pools=array();
-			while(!$rs->EOF) {
-				array_push($pools, $rs->fields);
-				$rs->MoveNext();
-			}
-			$smarty->assign('pools', $pools);		
-		} 
-	}
-	
-	/** show pending invoices */
-	function invoice($v) {
-		
-		// verify pool
-		if(empty($v['pool_id'])) 
-			return false;
-		else 
-			$pool_id = $v['pool_id'];
-			
-		$db=&DB();
-		$p=AGILE_DB_PREFIX;
- 
-		// get all products ids set for manual assignment or this pool
-		$prodIds=array();
-		$prod = $db->Execute("select id,prod_plugin_data from {$p}product 
-				WHERE prod_plugin = 1 and prod_plugin_file = 'ASSET'");
-		if($prod && $prod->RecordCount()) {
-			while(!$prod->EOF) { 
-				@$d = unserialize($prod->fields['prod_plugin_data']);
-				
-				// is this asset pool
-				if(!empty($d['AssetPool']) && $d['AssetPool'] == $pool_id) {
-					
-					array_push($prodIds, $prod->fields['id']);
-				
-				// is manual enabled	
-				} elseif(!empty($d['manual']) && $d['manual'] == '1') {
-					
-					array_push($prodIds, $prod->fields['id']);					
-				} 
-				$prod->MoveNext();
-			}
-		} 
-		
-		if(count($prodIds)==0) {
-			echo '
No products defined for the selected asset pool or manual assignment.
'; - return false; - } - - $rs = $db->Execute($sql="select distinct a.*, - b.first_name, b.last_name, b.city, b.state, b.zip from {$p}invoice a - join {$p}account b on (a.account_id = b.id) - WHERE - a.billing_status = 1 AND a.process_status <> 1 AND a.refund_status <> 1 - AND a.id in - ( select c.invoice_id from {$p}invoice_item c where - c.product_id - in (".implode(',', $prodIds).") - ) "); - if($rs && $rs->RecordCount()) { - $invoices=array(); - global $smarty; - while(!$rs->EOF) { - - /** select invoice items */ - $rs2 = $db->Execute("select distinct a.id,a.product_id,a.sku,a.quantity, b.name - from {$p}invoice_item a - left join {$p}product_translate b on (a.product_id=b.product_id and language_id='".DEFAULT_LANGUAGE."') - where a.invoice_id = {$rs->fields['id']} - and a.product_id in (".implode(',', $prodIds).") - "); - - $itemsJs = ''; - if($rs2 && $rs2->RecordCount()) { - $i=0; - $jname = 'items_'. $rs->fields['id']; - while(!$rs2->EOF) { - - $itemsJs .= "{$jname}[{$i}] = {'id':{$rs2->fields['id']}, 'value':0}; \r\n"; - - $rs->fields['items'][] = $rs2->fields; - $rs2->MoveNext(); - $i++; - } - } - $rs->fields['itemsJs'] = $itemsJs; - - array_push($invoices, $rs->fields); - $rs->MoveNext(); - } - $smarty->assign('invoices', $invoices); - - /** get available assets for this category */ - $rs = $db->Execute("select id,asset as name from {$p}asset where status <> 1 and pool_id = ".$db->qstr($pool_id)); - if($rs && $rs->RecordCount()) { - $assets=array(); - while(!$rs->EOF) { - array_push($assets, $rs->fields); - $rs->MoveNext(); - } - $smarty->assign('assets', $assets); - } - } - } - - /** define asset ids for services and approve invoice */ - function assign($v) { - - @$id = $v['invoice_id']; - @$items = $v['items']; - - /** input valid? */ - if(empty($id) || empty($items) || !is_array($items)) { - echo 'Invalid data passed'; - return false; - } - - $db=&DB(); - $p=AGILE_DB_PREFIX; - - // validate all items set - foreach ($items as $key=>$item) { - if(empty($item) || $item=='0') { - echo 'All items must be assigned'; - return false; - } - - // validate that asset is available - $assetRs=$db->Execute("select a.id,a.asset,b.name as poolName from {$p}asset a, {$p}asset_pool b where a.pool_id=b.id and a.status <> 1 and a.id = ".$db->qstr($item)); - if(!$assetRs || !$assetRs->RecordCount()) { - echo "Asset $item is already assigned or non-existant!"; - return false; - } else { - $assets[] = array('item'=>$key, 'value'=>$item, 'asset'=> $assetRs->fields['asset'], 'poolname'=>$assetRs->fields['poolName'],); - } - } - - // loop through each line item and update the product_attr_cart field - foreach ($assets as $asset) { - - $item = $asset['item']; - $value = $asset['value']; - $name = $asset['asset']; - $pool = $asset['poolname']; - - $s = $db->GetOne($sql="select product_attr_cart from {$p}invoice_item where id = ".$db->qstr($item)." and invoice_id = ".$db->qstr($id) ); - if(empty($s)) { - $s['AssetId']=$value; - } else { - $s = unserialize($s); - $s['AssetId']=$value; - } - - @$ss=serialize($s); - - /** formatting for invoice view */ - $old=''; - $oldAttr = $db->Execute("select product_attr from {$p}invoice_item where id = ".$db->qstr($item)." and invoice_id = ".$db->qstr($id) ); - if($oldAttr && $oldAttr->RecordCount()) $old = $oldAttr->fields['product_attr']; - $product_attr = "{$pool}=={$name} (ID: {$value})\r\n".$old; - - /** update invoice */ - $db->Execute("update {$p}invoice_item set product_attr=".$db->qstr($product_attr).", product_attr_cart=".$db->qstr($ss)." where id = ".$db->qstr($item)." and invoice_id = ".$db->qstr($id) ); - - /** update service if exists */ - $db->Execute("update {$p}service set prod_attr=".$db->qstr($product_attr).", prod_attr_cart=".$db->qstr($ss)." where invoice_item_id = ".$db->qstr($item)." and invoice_id = ".$db->qstr($id) ); - } - - // process invoice => service - require_once(PATH_MODULES.'invoice/invoice.inc.php'); - $inv = new invoice(); - $result = $inv->approveInvoice(array('id'=>$id),&$inv); - - if($result) - echo 'true'; - else - echo 'Error occurred while approving invoice.'; - } -} -?> \ No newline at end of file diff --git a/modules/asset_invoice/asset_invoice_construct.xml b/modules/asset_invoice/asset_invoice_construct.xml deleted file mode 100644 index 7ee8e5c3..00000000 --- a/modules/asset_invoice/asset_invoice_construct.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - asset_invoice - asset_invoice - asset_invoice
- asset - 0 - name - 35 - - - I4 - 1 - - - C(32) - - - 0 - 0 -
\ No newline at end of file diff --git a/modules/asset_invoice/asset_invoice_install.xml b/modules/asset_invoice/asset_invoice_install.xml deleted file mode 100644 index 9b998523..00000000 --- a/modules/asset_invoice/asset_invoice_install.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - asset_invoice - asset_invoice
- asset - Assign assets to pending invoices - 1 - asset - -
- - - - search - %%:main - 1 - - - invoice - - - assign - - - -
\ No newline at end of file diff --git a/modules/asset_invoice/auth.inc.php b/modules/asset_invoice/auth.inc.php deleted file mode 100644 index 62620684..00000000 --- a/modules/asset_invoice/auth.inc.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -$auth_methods = Array -( - Array ('module' => 'asset_invoice', 'method' => 'main'), - Array ('module' => 'asset_invoice', 'method' => 'invoice'), - Array ('module' => 'asset_invoice', 'method' => 'assign') -); -?> \ No newline at end of file diff --git a/modules/asset_pool/asset_pool.inc.php b/modules/asset_pool/asset_pool.inc.php deleted file mode 100644 index 5a90615a..00000000 --- a/modules/asset_pool/asset_pool.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:AssetPool - */ - -/** - * The main AgileBill Asset Pool Class - * - * @package AgileBill - * @subpackage Module:AssetPool - */ -class asset_pool extends OSB_module { -} -?> diff --git a/modules/asset_pool/asset_pool_construct.xml b/modules/asset_pool/asset_pool_construct.xml deleted file mode 100644 index e4c942a1..00000000 --- a/modules/asset_pool/asset_pool_construct.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - asset_pool - - asset_pool
- - asset - - 0 - - NAME - - 25 - - 0 - - - -
id,site_id
-
- - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - Name - C(32) - - - - - - name - id,name - id - id,name - id,name - - - - - - - - <add>Add Asset Pool</add> - <view>View Asset Pool</view> - - - - - - - id - checkbox - 25px - - - name - - - -
diff --git a/modules/asset_pool/asset_pool_install.xml b/modules/asset_pool/asset_pool_install.xml deleted file mode 100644 index c933ff4a..00000000 --- a/modules/asset_pool/asset_pool_install.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - asset - - Asset Pool - - 1 - - asset_pool - - - - asset - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/blocked_email/blocked_email.inc.php b/modules/blocked_email/blocked_email.inc.php deleted file mode 100644 index 518b0c74..00000000 --- a/modules/blocked_email/blocked_email.inc.php +++ /dev/null @@ -1,48 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:BlockedEmail - */ - -/** - * The main AgileBill Blocked Email Class - * - * @package AgileBill - * @subpackage Module:BlockedEmail - */ -class blocked_email extends OSB_module { - /** - * Is Email Blocked? - */ - public function is_blocked($email) { - if ($email && ! preg_match('/@/',$email)) - return true; - - $dom = explode('@',$email); - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'blocked_email','id',sprintf('email=::%s:: OR email=::%s::',$email,$dom[1]))); - if ($result && $result->RecordCount() > 0) - return true; - - return false; - } -} -?> diff --git a/modules/blocked_email/blocked_email_construct.xml b/modules/blocked_email/blocked_email_construct.xml deleted file mode 100644 index f4580df9..00000000 --- a/modules/blocked_email/blocked_email_construct.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - blocked_email - - blocked_email
- - - - 0 - - email - - 25 - - 1 - - - - email - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - Email - C(128) - 1 - 128 - any - 1 - - - X2 - - - - - - date_orig,date_last,email,notes - id,site_id,date_orig,date_last,email,notes - id,site_id,date_orig,date_last,email,notes - id,site_id,date_orig,date_last,email,notes - id,site_id,date_orig,date_last,email,notes - - - - - - - - - - - - - - id - checkbox - 25px - - - date_orig - date - 150px - - - email - - - -
diff --git a/modules/blocked_email/blocked_email_install.xml b/modules/blocked_email/blocked_email_install.xml deleted file mode 100644 index 8526c938..00000000 --- a/modules/blocked_email/blocked_email_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Blocked Email - - 1 - - blocked_email - - - - setup - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/blocked_ip/blocked_ip.inc.php b/modules/blocked_ip/blocked_ip.inc.php deleted file mode 100644 index d1519d2b..00000000 --- a/modules/blocked_ip/blocked_ip.inc.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:BlockedIP - */ - -/** - * The main AgileBill Blocked IP Class - * - * @package AgileBill - * @subpackage Module:BlockedIP - */ -class blocked_ip extends OSB_module { - /** - * Is IP Blocked? - */ - public function is_blocked($ip) { - if ($ip && ! preg_match('/\./',$ip)) - return true; - - $ip_oct = explode('.',$ip); - $db = &DB(); - $result = $db->Execute($q=sqlSelect($db,'blocked_ip','id',sprintf('ip IN (::%s::,::%s.%s::,::%s.%s.%s::,::%s::)', - $ip_oct[0],$ip_oct[0],@$ip_oct[1],$ip_oct[0],@$ip_oct[1],@$ip_oct[2],$ip))); - - if ($result->RecordCount() > 0) - return true; - - return false; - } -} -?> diff --git a/modules/blocked_ip/blocked_ip_construct.xml b/modules/blocked_ip/blocked_ip_construct.xml deleted file mode 100644 index 908d871e..00000000 --- a/modules/blocked_ip/blocked_ip_construct.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - blocked_ip - - blocked_ip
- - - - 0 - - ip - - 25 - - 1 - - - - ip - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - IP Address - C(128) - 1 - 128 - any - 1 - - - X2 - - - - - - date_orig,date_last,ip,notes - id,site_id,date_orig,date_last,ip,notes - id,site_id,date_orig,date_last,ip,notes - id,site_id,date_orig,date_last,ip,notes - id,site_id,date_orig,date_last,ip,notes - - - - - - - - - - - - - - id - checkbox - 25px - - - date_orig - date - 150px - - - ip - - - -
diff --git a/modules/blocked_ip/blocked_ip_install.xml b/modules/blocked_ip/blocked_ip_install.xml deleted file mode 100644 index 8c3f35d9..00000000 --- a/modules/blocked_ip/blocked_ip_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Blocked IP - - 1 - - blocked_ip - - - - setup - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/campaign/auth.inc.php b/modules/campaign/auth.inc.php deleted file mode 100644 index cff58579..00000000 --- a/modules/campaign/auth.inc.php +++ /dev/null @@ -1,27 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -$auth_methods = Array -( - Array ('module' => 'campaign', 'method' => 'display'), - Array ('module' => 'campaign', 'method' => 'click'), - Array ('module' => 'campaign', 'method' => 'affiliate') -); -?> \ No newline at end of file diff --git a/modules/campaign/campaign.inc.php b/modules/campaign/campaign.inc.php deleted file mode 100644 index 02ce8e23..00000000 --- a/modules/campaign/campaign.inc.php +++ /dev/null @@ -1,634 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class campaign extends OSB_module { - ############################## - ## CLICK ## - ############################## - function click($VAR) - { - ### Set the forward URL - if(!empty($VAR['caid'])) - { - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'campaign WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(@$VAR['caid']); - $result = $db->Execute($sql); - if (strlen($result->fields['url']) >= 1) $url = $result->fields['url']; - } - if(empty($url)) $url = URL; - - echo ''; - - ### LOG the click - if(!isset($VAR['_log']) && !empty($VAR['caid'])) - { - if(isset($VAR['file'])) - $file_no = $VAR['file']; - else - $file_no = '1'; - $count_field= 'clicked'.$file_no; - $count = $result->fields[$count_field] + 1; - $sql = 'UPDATE ' . AGILE_DB_PREFIX . 'campaign SET - '.$count_field.' = ' . $db->qstr($count) . ' WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(@$VAR['caid']); - $result = $db->Execute($sql); - } - } - - - - ############################## - ## DISPLAY ## - ############################## - function display($VAR) - { - - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'campaign WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(@$VAR['id']); - $result = $db->Execute($sql); - if(isset($VAR['file'])) - $file_no = $VAR['file']; - else - $file_no = '1'; - $file = PATH_FILES . 'campaign_' . $VAR['id'] . '_' . $file_no .'.dat'; - $type = 'type'.$file_no; - $name = 'file'.$file_no; - $count_field= 'served'.$file_no; - $count = $result->fields[$count_field] + 1; - - if($result->RecordCount() > 0) - { - ### Open the file - if (@$file=fopen($file, 'r')) - { - ### Display the correct headers: - header ("Content-type: " . $result->fields[$type]); - header ("Content-Disposition: inline; filename=" . $result->fields[$name]); - header ("Content-Description: PHP/INTERBASE Generated Data" ); - fpassthru($file); - ### Increment the file - if(!isset($VAR['_log'])) - { - $sql = 'UPDATE ' . AGILE_DB_PREFIX . 'campaign SET - '.$count_field.' = ' . $db->qstr($count) . ' WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr(@$VAR['id']); - $result = $db->Execute($sql); - } - exit; - } - } - echo 'Sorry, the campaign or required file does not exist!'; - } - - - - ############################## - ## ADD ## - ############################## - function xadd($VAR) - { - global $_FILES; - - - # Validate the files - for($i=1; $i<=12; $i++) { - if(isset($_FILES['upload_file'.$i]) && $_FILES['upload_file'.$i]['size'] > 0) { - $VAR['campaign_type'.$i] = $_FILES['upload_file'.$i]['type']; - $VAR['campaign_file'.$i] = $_FILES['upload_file'.$i]['name']; - } - } - - - ## Attempt to add the record: - $type = "add"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $campaign_id = $db->add($VAR, $this, $type); - - - ### Copy the files & delete temp files - if($campaign_id > 0) { - for($i=1; $i<=12; $i++) { - if(isset($_FILES['upload_file'.$i]) && $_FILES['upload_file'.$i]['size'] > 0) - { - if(!copy($_FILES['upload_file'.$i]['tmp_name'], PATH_FILES . 'campaign_'.$campaign_id.'_'.$i.'.dat')) - { - ### ERROR: - } - - #unlink any temp files - unlink($_FILES['upload_file'.$i]['tmp_name']); - } - } - } - } - - /** - * View a record - */ - public function view($VAR) { - $smart = parent::view($VAR); - - # Get the stats for each advertisement: - $budget = $smart['budget']; - - # Total Impressions, Total Clicks, & Accounts referred - $smart['impressions_total'] = 0; - $smart['clicks_total'] = 0; - $smart['accounts_referred'] = $this->referred_accounts($smart['id']); - - # Invoices referred - $inv = $this->referred_invoices($smart['id']); - $smart['invoices_referred'] = $inv[0]; - $smart['invoices_revenue'] = round($inv[1],2); - - # Total impressions & clicks: - $impressions_total = 0; - $clicks_total = 0; - - for ($ii=1; $ii<=12; $ii++) { - $smart['results'][$ii]['served'] = $smart['served'.$ii]; - $smart['results'][$ii]['clicked'] = $smart['clicked'.$ii]; - $smart['results'][$ii]['file'] = $smart['file'.$ii]; - - $impressions_total += $smart['results'][$ii]['served']; - $clicks_total += $smart['results'][$ii]['clicked']; - - if (empty($smart['results'][$ii]['served'])) - $smart['results'][$ii]['show'] = false; - else - $smart['results'][$ii]['show'] = true; - } - - $smart['impressions_total'] = $impressions_total; - $smart['clicks_total'] = $clicks_total; - - # Impr. percentage, Clicks percentage, CTR - $ctr_count = 0; - $ctr_amt = 0; - for ($ii=1; $ii<=12; $ii++) { - if ($smart['results'][$ii]['show']) { - # Impression percentage - $impressions_percentage = $smart['results'][$ii]['served']/$impressions_total; - $smart['results'][$ii]['impressions_percentage'] = sprintf('(%s%%)',round($impressions_percentage*100)); - - # Clicks percentage - $clicks_percentage = $smart['results'][$ii]['clicked']/$clicks_total; - $smart['results'][$ii]['clicks_percentage'] = sprintf('(%s%%)',round($clicks_percentage*100)); - - # Cost - $impressions_percentage = $smart['results'][$ii]['served']/$impressions_total; - $smart['results'][$ii]['cost'] = round($budget*$impressions_percentage,2); - - # CTR - $ctr = ($smart['results'][$ii]['clicked']/$smart['results'][$ii]['served'])*100; - if ($ctr < 0) - $smart['results'][$ii]['ctr'] = round($ctr).'%'; - else - $smart['results'][$ii]['ctr'] = round($ctr,1).'%'; - - $ctr_amt += $ctr; - - } else { - $smart['results'][$ii]['impressions_percentage'] = ''; - $smart['results'][$ii]['clicks_percentage'] = ''; - $smart['results'][$ii]['cost'] = 0; - $smart['results'][$ii]['ctr'] = '0%'; - } - $ctr_count++; - } - - # CTR Avg: - if ($ctr_count > 0) - $smart['ctr_avg'] = round($ctr_amt/$ctr_count,2).'%'; - else - $smart['ctr_avg'] = '0%'; - - # CPC Avg: - if ($clicks_total > 0) { - $cpc_avg = $budget / $clicks_total; - - if ($cpc_avg < .1) - $smart['cpc_avg'] = round($cpc_avg,3); - else - $smart['cpc_avg'] = round($cpc_avg,2); - } else { - $smart['cpc_avg'] = 0; - } - - # CPI Avg: - if ($impressions_total > 0) { - $cpi_avg = $budget / $impressions_total; - - if ($cpi_avg < .1) - $smart['cpi_avg'] = round($cpi_avg,3); - else - $smart['cpi_avg'] = round($cpi_avg,2); - - } else { - $smart['cpi_avg'] = 0; - } - - # Cost per Conversion: - if ($inv[0] > 0) - $smart['conversion_cost'] = round($budget/$inv[0],2); - else - $smart['conversion_cost'] = 0; - - # Avg sales amount: - if($inv[0] > 0 && $budget > 0) - $smart['invoice_avg'] = round($inv[1]/$inv[0],2); - else - $smart['invoice_avg'] = 0; - - # ROI - if ($inv[0] > 0 && $budget > 0) - $smart['roi'] = round(($inv[1]/$budget)*100).'%'; - else - $smart['roi'] = '---'; - - # Impression to Buy Ratio - if($inv[0] > 0 && $impressions_total > 0) { - $ratio = round($impressions_total/$inv[0]); - $percent = round(($inv[0]/$impressions_total)*100,3); - $smart['impr_to_buy'] = sprintf('%s / 1 (%s)%%',$ratio,$percent); - - } else { - $smart['impr_to_buy'] = '---'; - } - - # Click-thru to Buy ratio - if ($inv[0] > 0 && $clicks_total > 0) { - $ratio = round($clicks_total/$inv[0]); - $percent = round(($inv[0]/$clicks_total)*100,2); - $smart['click_to_buy'] = sprintf('%s / 1 (%s)%%',$ratio,$percent); - - } else { - $smart['click_to_buy'] = '---'; - } - - global $smarty; - $smarty->assign('record',$smart); - } - - ### Get the number of referred accounts: - function referred_accounts ($id) { - $dba = new CORE_database; - $db = &DB(); - $sql = $dba->sql_select("account","id","campaign_id = $id", false, $db); - $rs = $db->Execute($sql); - return $rs->RecordCount(); - } - - ### Get the number of referred invoices: - function referred_invoices ($id) { - $dba = new CORE_database; - $db = &DB(); - $sql = $dba->sql_select("invoice","id,total_amt","campaign_id = $id", false, $db); - $rs = $db->Execute($sql); - if ($rs->RecordCount() == 0) { - return Array(0,0); - } else { - $total = 0; - while(!$rs->EOF) { - $total += $rs->fields['total_amt']; - $rs->MoveNext(); - } - } - return Array($rs->RecordCount(), $total); - } - - ############################## - ## AFFILIATE VIEW ## - ############################## - function affiliate($VAR) - { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - ############################## - ## UPDATE ## - ############################## - function update($VAR) - { - # Validate the files - for($i=1; $i<=12; $i++) { - if(isset($_FILES['upload_file'.$i]) && $_FILES['upload_file'.$i]['size'] > 0) { - $VAR['campaign_type'.$i] = $_FILES['upload_file'.$i]['type']; - $VAR['campaign_file'.$i] = $_FILES['upload_file'.$i]['name']; - } - } - - # Store the record - $type = "update"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $rs = $db->update($VAR, $this, $type); - - ### Copy the files - if($rs) { - for($i=1; $i<=12; $i++) { - if(isset($_FILES['upload_file'.$i]) && $_FILES['upload_file'.$i]['size'] > 0) - { - if(!copy($_FILES['upload_file'.$i]['tmp_name'], PATH_FILES . 'campaign_'.$VAR['campaign_id'].'_'.$i.'.dat')) - { - ### ERROR: - } - } - } - } - } - - ############################## - ## DELETE ADDs ## - ############################## - function delete_add($VAR) - { - $field = 'file'.$VAR['file']; - $db = &DB(); - $sql = 'UPDATE ' . AGILE_DB_PREFIX . 'campaign - SET - '.$field.' = \'\' - WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr($VAR["campaign_id"]); - $result = $db->Execute($sql); - - error_reporting(0); - if(!unlink(PATH_FILES . 'campaign_'.$VAR["campaign_id"].'_' . $VAR['file'] . '.dat')) - { - global $C_debug; - $C_debug->error('file.inc.php','delete', PATH_FILES . 'file_'.$id[$i]. - '.dat does not exist for deletion. File could not be deleted.'); - } - # Restore the proper error level - $error_reporting_eval = 'error_reporting('.ERROR_REPORTING.');'; - eval($error_reporting_eval); - } - - - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $db = &DB(); - $id = $this->table . '_id'; - - # generate the list of ID's - $id_list = ''; - $ii=0; - - if(isset($VAR["delete_id"])) - { - $id = explode(',',$VAR["delete_id"]); - } - elseif (isset($VAR["id"])) - { - $id = explode(',',$VAR["id"]); - } - - for($i=0; $iqstr($id[$i]) . " "; - $ii++; - } - else - { - $id_list .= " OR id = " . $db->qstr($id[$i]) . " "; - $ii++; - } - } - } - - - if($ii>0) - { - # generate the full query - $q = "DELETE FROM - ".AGILE_DB_PREFIX."$this->table - WHERE - $id_list - AND - site_id = '" . DEFAULT_SITE . "'"; - # execute the query - $result = $db->Execute($q); - - - # error reporting - if ($result === false) - { - global $C_debug; - $C_debug->error('campaign.inc.php','delete', $db->ErrorMsg()); - } - else - { - for($i=0; $ivalue["CORE"]["module_name"] = $C_translate->translate('name',$this->module,""); - $message = $C_translate->translate('alert_delete_ids',"CORE",""); - $C_debug->alert($message); - - } - } - } - - ############################## - ## SEARCH SHOW ## - ############################## - function search_show($VAR) { - $smart = parent::search_show($VAR); - - for($i=0; $ireferred_invoices($smart[$i]['id']); - $smart[$i]['invoices_referred'] = $inv[0]; - $smart[$i]['invoices_revenue'] = $inv[1]; - @$smart[$i]['invoice_avg'] = $inv[1] / $inv[0]; - - # total impressions & clicks: - $impressions_total=0; - $clicks_total=0; - for($ii=1; $ii<=12; $ii++) - { - $impressions_total += $smart[$i]["served".$ii]; - $clicks_total += $smart[$i]["clicked".$ii]; - - if(empty($smart[$i]["served".$ii]) && empty($smart[$i]["served".$ii]) && empty($smart[$i]["served".$ii])) - $smart[$i]["show".$ii] = false; - else - $smart[$i]["show".$ii] = true; - } - $smart[$i]['impressions_total'] = $impressions_total; - $smart[$i]['clicks_total'] = $clicks_total; - - - # Impr. percentage, Clicks percentage, CTR - $ctr_count = 0; - $ctr_amt = 0; - for($ii=1; $ii<=12; $ii++) - { - # CTR - if( $smart[$i]["show".$ii] ) { - $ctr = ( $smart[$i]["clicked".$ii] / $smart[$i]["served".$ii] ) * 100; - if($ctr < 0) - $smart[$i]['ctr'.$ii] = round($ctr).'%'; - else - $smart[$i]['ctr'.$ii] = round($ctr,1).'%'; - $ctr_count++; - $ctr_amt += $ctr; - } else { - $smart[$i]['ctr'.$ii] = "0%"; - $ctr_count++; - } - } - - # CTR Avg: - if($ctr_count > 0) - $smart[$i]['ctr_avg'] = round( $ctr_amt / $ctr_count, 2) .'%'; - else - $smart[$i]['ctr_avg'] = "0%"; - - - # CPC Avg: - if($clicks_total > 0) { - $cpc_avg = $budget / $clicks_total; - if($cpc_avg < .1) - $smart[$i]['cpc_avg'] = round($cpc_avg,3); - else - $smart[$i]['cpc_avg'] = round($cpc_avg,2); - } else { - $smart[$i]['cpc_avg'] = 0; - } - - # CPI Avg: - if($impressions_total > 0) { - $cpi_avg = $budget / $impressions_total; - if($cpi_avg < .1) - $smart[$i]['cpi_avg'] = round($cpi_avg,3); - else - $smart[$i]['cpi_avg'] = round($cpi_avg,2); - } else { - $smart[$i]['cpi_avg'] = 0; - } - - # Cost per Conversion: - if($inv[0] > 0 && $budget > 0) - $smart[$i]['conversion_cost'] = round($budget / $inv[0], 2); - else - $smart[$i]['conversion_cost'] = 0; - - # ROI - if($inv[0] > 0 && $budget > 0) - $smart[$i]['roi'] = round(($inv[1] / $budget) * 100).'%'; - else - $smart[$i]['roi'] = '---'; - } - - global $smarty; - $smarty->assign('search_show',$smart); - } - - ############################## - ## SEARCH EXPORT ## - ############################## - function search_export($VAR) - { - # require the export class - require_once (PATH_CORE . "export.inc.php"); - - # Call the correct export function for inline browser display, download, email, or web save. - if($VAR["format"] == "excel") - { - $type = "export_excel"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_excel($VAR, $this, $type); - } - - else if ($VAR["format"] == "pdf") - { - $type = "export_pdf"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_pdf($VAR, $this, $type); - } - - else if ($VAR["format"] == "xml") - { - $type = "export_xml"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_xml($VAR, $this, $type); - } - - else if ($VAR["format"] == "csv") - { - $type = "export_csv"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_csv($VAR, $this, $type); - } - - else if ($VAR["format"] == "tab") - { - $type = "export_tab"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_tab($VAR, $this, $type); - } - } -} -?> diff --git a/modules/campaign/campaign_construct.xml b/modules/campaign/campaign_construct.xml deleted file mode 100644 index 23a3459d..00000000 --- a/modules/campaign/campaign_construct.xml +++ /dev/null @@ -1,299 +0,0 @@ - - - - campaign - - campaign
- - - - 0 - - name - - 25 - - 0 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Active - 30 - L - - - C(16) - date - - - C(16) - date - - - Name - C(128) - 1 - 128 - any - 1 - 30 - - - X2 - - - F - 30 - - - F - 30 - - - C(128) - 1 - 128 - any - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - C(128) - - - C(128) - - - I4 - - - I4 - - - I4 - - - C(128) - - - - - - date_start,date_expire,status,name,description,budget,url - id,site_id,date_orig,date_last,date_start,date_expire,status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12,url - id,site_id,date_orig,date_last,date_start,date_expire,status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12,url - id,site_id,date_orig,date_last,date_start,date_expire,status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12,url - id,site_id,date_orig,date_last,date_start,date_expire,status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12,url - status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12 - status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12 - status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12 - status,name,description,budget,target_conversion,file1,type1,served1,clicked1,file2,type2,served2,clicked2,file3,type3,served3,clicked3,file4,type4,served4,clicked4,file5,type5,served5,clicked5,file6,type6,served6,clicked6,file7,type7,served7,clicked7,file8,type8,served8,clicked8,file9,type9,served9,clicked9,file10,type10,served10,clicked10,file11,type11,served11,clicked11,file12,type12,served12,clicked12 - - - - - - - - - - - - - - id - checkbox - 25px - - - name - - - cost - - - impressions - - - clicks - - - cpc - - - cpi - - - conversion - - - cost_conv - - - roi_s - - - avg_sale_s - - - revenue - - - -
diff --git a/modules/campaign/campaign_install.xml b/modules/campaign/campaign_install.xml deleted file mode 100644 index 5db7c4bd..00000000 --- a/modules/campaign/campaign_install.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - Campaigns - - 1 - - campaign - - - - affiliate - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - delete_add - - - - search_export - - - export_excel - - - export_pdf - - - export_csv - - - export_tab - - - diff --git a/modules/campaign/index.php b/modules/campaign/index.php deleted file mode 100644 index 526d9ad7..00000000 --- a/modules/campaign/index.php +++ /dev/null @@ -1,102 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Campaign - */ - -/** - * The main AgileBill Campaign Class - * - * @package AgileBill - * @subpackage Module:Campaign - */ - -ob_start(); - -# Required includes: -require_once('../../config.inc.php'); -require_once(PATH_ADODB.'adodb.inc.php'); -require_once(PATH_CORE.'database.inc.php'); -require_once(PATH_CORE.'vars.inc.php'); - -$C_debug = new CORE_debugger; -$C_vars = new CORE_vars; -$VAR = $C_vars->f; - -if (! isset($VAR['id'])) - exit; - -$db = &DB(); -$result = $db->Execute(sqlSelect($db,'campaign','*',array('id'=>$VAR['id']))); - -if (! $result || ! $result->RecordCount()) - exit; - -if ($VAR['file']) { - $file_no = $VAR['file']; - -} else { - # Random file: - $last = $result->fields['last_served']; - if (empty($last)) - $last = 1; - - $next = false; - - for ($i=1; $i<=12; $i++) { - if (! empty($result->fields['file'.$i]) && ! $next) { - if ($i == $last) - $next = true; - } elseif (! empty($result->fields['file'.$i]) && $next) { - $file_no = $i; - $i = 20; - } - } -} - -if (empty($file_no)) - $file_no = '1'; - -$file = sprintf(PATH_FILES.'campaign_%s_%s.dat',$VAR['id'],$file_no); -$type = 'type'.$file_no; -$name = 'file'.$file_no; -$count_field= 'served'.$file_no; -$count = $result->fields[$count_field]+1; - -# Open the file -if ($fh=fopen($file,'r')) { - # Display the correct headers: - header('Content-type: '.$result->fields[$type]); - header('Content-Disposition: inline; filename='.$result->fields[$name]); - header('Content-Description: PHP/INTERBASE Generated Data'); - fpassthru($fh); - - # Increment the file - if (! isset($VAR['_log'])) - $result = $db->Execute(sqlUpdate($db,'campaign',array('last_served'=>$file_no,$count_field=>$count),array('id'=>$VAR['id']))); - - exit; -} - -echo _('Sorry, the campaign or required file does not exist!'); - -ob_end_flush(); -?> diff --git a/modules/cart/auth.inc.php b/modules/cart/auth.inc.php deleted file mode 100644 index 156c29b7..00000000 --- a/modules/cart/auth.inc.php +++ /dev/null @@ -1,29 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -$auth_methods = Array -( - Array ('module' => 'cart', 'method' => 'add'), - Array ('module' => 'cart', 'method' => 'view'), - Array ('module' => 'cart', 'method' => 'delete'), - Array ('module' => 'cart', 'method' => 'changeqty'), - Array ('module' => 'cart', 'method' => 'update') -); -?> \ No newline at end of file diff --git a/modules/cart/cart.inc.php b/modules/cart/cart.inc.php deleted file mode 100644 index d3cec7ed..00000000 --- a/modules/cart/cart.inc.php +++ /dev/null @@ -1,704 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Cart - */ - -/** - * The main AgileBill Module Cart Class - * - * @package AgileBill - * @subpackage Module:Cart - */ -class cart extends OSB_module { - /** - * Admin View Cart Contents - */ - function admin_view($VAR) { - if(!empty($VAR['account_id'])) { - $this->account_id = $VAR['account_id']; - } else { - return false; - } - $this->admin_view = true; - $this->user_view($VAR,$this); - } - - /** - * Admin Add Cart Contents - */ - function admin_add($VAR) { - if(!empty($VAR['account_id'])) { - $this->account_id = $VAR['account_id']; - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,"session","id","account_id=$this->account_id")); - if($rs && $rs->RecordCount()) { - $this->session_id = $rs->fields['id']; - } else { - $this->session_id = SESS; - } - } else { - return false; - } - $this->add($VAR,$this); - } - - /** - * Admin change cart qty - */ - function admin_changeqty($VAR) { - if(!empty($VAR['account_id'])) { - $this->account_id = $VAR['account_id']; - } else { - return false; - } - $this->admin = true; - $this->changeqty($VAR,$this); - } - - /** - * Change the quantity of an item - */ - function changeqty($VAR) { - if(empty($this->account_id)) $this->account_id = SESS_ACCOUNT; - if(empty($this->session_id)) $this->session_id = SESS; - - @$id = $VAR['id']; - @$qty = $VAR['qty']; - if ($id <= 0 ) return; - - $db = &DB(); - if ($qty == '0') { - # Product Plugin Level deletion - $cartid = & $db->Execute($sql=sqlSelect($db,"cart","*","id=::{$id}:: AND session_id = ::{$this->session_id}::")); - if($cartid) $product = & $db->Execute($sql=sqlSelect($db,"product","*","id=::{$cartid->fields['product_id']}::")); - if(!empty($product->fields['prod_plugin']) && !empty($product->fields['prod_plugin_data'])) { - $prodplgfile = PATH_PLUGINS.'product/'. $product->fields['prod_plugin_file'] . '.php'; - if(is_file($prodplgfile)) { - include_once(PATH_PLUGINS.'product/'. $product->fields['prod_plugin_file'] . '.php'); - eval('$prodplg = new plgn_prov_'. $product->fields['prod_plugin_file'] .';'); - if(is_object($prodplg)) { - if(is_callable(array($prodplg,'delete_cart'))) { - $prodplg->delete_cart($VAR,$cartid->fields); - } - } - } - } - - # delete main cart items & subitems: - $sql=''; - if(empty($this->admin)) $sql = "AND session_id = ::{$this->session_id}::"; - $rs = & $db->Execute($sql=sqlDelete($db,"cart","(id=::{$id}:: OR cart_parent_id=::{$id}:: ) $sql")); - - global $smarty; - $smarty->assign('js',false); - return false; - } - - # update the quantity: - if(!eregi("^[0-9]{1,5}$",$qty)) $qty = 1; - if($qty < 1) $qty = 1; - - if(!$this->admin) $sql_extra = " AND session_id=::$this->session_id::"; else $sql_extra=''; - if($VAR["type"] == 1) { - $fields=Array('quantity'=>$qty); - $db->Execute($sql=sqlUpdate($db,"cart",$fields,"id=::$id:: $sql_extra")); - } else if ($VAR["type"] == 2) { - $fields=Array('recurr_schedule'=>$VAR["schedule"]); - $db->Execute($sql=sqlUpdate($db,"cart",$fields,"id=::$id:: $sql_extra")); - } else if ($VAR["type"] == 3) { - # change domain term - $fields=Array('domain_term'=>$VAR["term"]); - $db->Execute($sql=sqlUpdate($db,"cart",$fields,"id=::$id:: $sql_extra")); - } - - # get the product id: - $result = $db->Execute(sqlSelect($db,"cart","*","id=$id $sql_extra","cart_type,date_orig")); - - # get the product details: - $product = $db->Execute(sqlSelect($db,"product","*","id={$result->fields["product_id"]}")); - - if($result->fields["cart_type"] == "2") { - # domain name, get pricing - include_once(PATH_MODULES.'host_tld/host_tld.inc.php'); - $tldObj=new host_tld; - $tldprice = $tldObj->price_tld_arr($result->fields['domain_tld'],$result->fields['host_type'],false,false,false,$this->account_id); - $qty = $result->fields['domain_term']; - $base_price = $tldprice[$qty]; - $setup_price = 0; - } else if($result->fields["cart_type"] == "3") { - # ad-hoc, get price - $base_price = $result->fields["ad_hoc_amount"] * $result->fields["quantity"]; - $setup_price = $result->fields["ad_hoc_setup"] * $result->fields["quantity"]; - } else { - include_once(PATH_MODULES.'product/product.inc.php'); - $productObj=new product; - - # get pricing for this product: - $prod_price = $productObj->price_prod($product->fields,$result->fields["recurr_schedule"],$this->account); - $setup_price = $prod_price["setup"] * $result->fields["quantity"]; - $base_price = $prod_price["base"] * $result->fields["quantity"]; - - # get pricing for any attributes: - $attr_price = $productObj->price_attr($product->fields,$result->fields["product_attr"],$result->fields["recurr_schedule"],$this->account); - $setup_price += ($attr_price["setup"] * $result->fields["quantity"]); - $base_price += ($attr_price["base"] * $result->fields["quantity"]); - - # get the qty - $qty = $result->fields["quantity"]; - } - - # set the smarty fields: - global $smarty; - $smarty->assign('qty',$qty); - $smarty->assign('base',$base_price); - $smarty->assign('setup',$setup_price); - $smarty->assign('js',true); - return; - } - - /** - * Get cart contents and return adodb rs - */ - public function sGetContents() { - return $this->sql_GetRecords(array('where'=>array('session_id'=>SESS))); - } - - /** - * View Cart Contents - * - * @uses invoice - */ - public function user_view($VAR) { - global $smarty; - - # Get cart contents - if (! count($results = $this->sGetContents())) { - $smarty->assign('result','0'); - - return false; - } - - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - $invoice = new invoice; - $invoice->setRecordAttr('account_id',SESS_ACCOUNT); - - foreach ($results as $result) { - $invoice->aaddItem(array( - 'cart_id'=>$result['id'], - 'domain_name'=>$result['domain_name'], - 'domain_term'=>$result['domain_term'], - 'domain_tld'=>$result['domain_tld'], - 'domain_type'=>$result['domain_type'], - 'item_type'=>0, - 'product_id'=>$result['product_id'], - 'quantity'=>$result['quantity'], - 'recurr_schedule'=>$result['recurr_schedule'], - 'product_attr'=>$result['product_attr'], - 'product_attr_cart'=>$result['product_attr'], - 'host_type'=>$result['host_type'], - 'type'=>in_array($result['host_type'],array('register')) ? 'domain' : null - )); - } - - $smarty->assign('results',$invoice->sCountItems()); - $smarty->assign('cart',$invoice->getItems()); - } - - /** - * Start add to cart process - */ - public function add($VAR) { - # Set the current account - if (empty($this->account_id)) - $this->account_id = SESS_ACCOUNT; - if (empty($this->session_id)) - $this->session_id = SESS; - - # Determine the type to be added to the domain: (domain or product) - if (! empty($VAR['product_id'])) { - if ($this->validate_product($VAR,$VAR['product_id'],$this->account_id)) { - # Add hosting / domain - if (! empty($VAR['domain_type'])) - $this->product_add_host($VAR); - # Standard product (no hosting or domain) - else - $this->product_add($VAR); - - return true; - } - - } elseif (! empty($VAR['domain_name']) && ! empty($VAR['domain_tld'])) { - # Add Domain only: - # @todo Remove the is_array test, and have 1 set of code - if (is_array($VAR['domain_name'])) { - for ($i=0;$ivalidate_domain($VAR['domain_name'][$i],$VAR['domain_tld'][$i])) { - $this->domain_add($VAR['domain_name'][$i],$VAR['domain_tld'][$i],@$VAR['host_type'][$i],@$VAR['domain_term'][$i]); - } - } - - } else { - if($this->validate_domain($VAR['domain_name'],$VAR['domain_tld'])) { - $this->domain_add($VAR['domain_name'],$VAR['domain_tld'],@$VAR['host_type'],@$VAR['domain_term']); - } - } - } - } - - /** - * Add a domain name to cart - * - * @param string $domain - * @param string $tld - * @param int $type - * @param int $term - */ - private function domain_add($domain,$tld,$type,$term=false) { - if (empty($type)) - return false; - - $db = &DB(); - - if (! $term || empty($term) || ! is_numeric($term)) { - # Get the default term for this domain: - $rs = $db->Execute(sqlSelect($db,'host_tld','default_term_new',array('name'=>$tld))); - if ($rs === false || empty($rs->fields['default_term_new'])) - $term = 1; - else - $term = $rs->fields['default_term_new']; - } - - # Insert into cart - $fields =array( - 'date_orig' => time(), - 'session_id' => $this->session_id, - 'account_id' => $this->account_id, - 'cart_type' => 2, - 'host_type' => $type, - 'domain_term' => $term, - 'domain_name' => $domain, - 'domain_tld' => $tld); - - $db->Execute(sqlInsert($db,'cart',$fields)); - } - - /** - * Add an ad-hoc line item to the cart - */ - public function ad_hoc($VAR) { - $db = &DB(); - if (! empty($VAR['account_id'])) { - $rs = $db->Execute(sqlSelect($db,'session','id',array('account_id'=>$VAR['account_id']))); - if ($rs && $rs->RecordCount() ==1) - $this->session_id = $rs->fields['id']; - else - $this->session_id = SESS; - - } else { - return false; - } - - if (empty($VAR['ad_hoc_sku']) || empty($VAR['ad_hoc_name']) || $VAR['ad_hoc_amount'] == '') { - global $C_debug,$C_translate; - - $C_debug->alert($C_translate->translate('ad_hoc_err','cart','')); - - return false; - } - - if (empty($VAR['quantity'])) - $qty = 1; - else - $qty = $VAR['quantity']; - - if (empty($VAR['ad_hoc_taxable'])) - $VAR['ad_hoc_taxable'] = 0; - - # Attribs: (ad_hoc_attr_var & ad_hoc_attr_val) - foreach ($VAR['ad_hoc_attr_var'] as $key => $value) - if ($value && $VAR['ad_hoc_attr_val'][$key]) - $attr[$value] = $VAR['ad_hoc_attr_val'][$key]; - - if (count($attr)) - $attrib = serialize($attr); - else - $attrib = ''; - - # Create the record - $fields = array( - 'date_orig' => time(), - 'session_id' => $this->session_id, - 'account_id' => $VAR['account_id'], - 'product_attr' => $attrib, - 'cart_type' => 3, - 'quantity' => $qty, - 'ad_hoc_sku' => $VAR['ad_hoc_sku'], - 'ad_hoc_name' => $VAR['ad_hoc_name'], - 'ad_hoc_amount' => $VAR['ad_hoc_amount'], - 'ad_hoc_taxable' => $VAR['ad_hoc_taxable']); - - $db->Execute(sqlInsert($db,'cart',$fields)); - } - - /** - * Add a product to the cart - */ - private function product_add($VAR) { - if (empty($VAR['quantity'])) - $qty = 1; - else - $qty = $VAR['quantity']; - - if (!empty($VAR['attr'])) - @$attr = serialize($VAR['attr']); - else - $attr = ''; - - # Create the Main DB Record: - $db = &DB(); - $fields = array( - 'date_orig' => time(), - 'session_id' => $this->session_id, - 'account_id' => @$VAR['account_id'], - 'product_attr' => $attr, - 'cart_type' => 0, - 'quantity' => $qty, - 'product_id' => $VAR['product_id'], - 'recurr_schedule' => @$VAR['recurr_schedule'], - 'service_id' => @$VAR['service_id']); - - $db->Execute(sqlInsert($db,'cart',$fields)); - } - - /** - * Add an assoc required product - * - * @param int $product_id - * @todo Unused, calling code is commented out. - */ - private function product_req_add($product_id) { - $db = &DB(); - $fields = array( - 'date_orig' => time(), - 'session_id' => $this->session_id, - 'account_id' => $this->account_id, - 'cart_type' => 0, - 'quantity' => 1, - 'product_id' => $product_id); - - $db->Execute(sqlInsert($db,'cart',$fields)); - } - - /** - * Add a product to the cart - */ - private function product_add_host($VAR) { - if (! empty($VAR['attr'])) - @$attr = serialize($VAR['attr']); - else - $attr = serialize(array('')); - - $db = &DB(); - $fields = array( - 'date_orig' => time(), - 'session_id' => $this->session_id, - 'account_id' => @$VAR['account_id'], - 'product_attr' => $attr, - 'cart_type' => 1, - 'quantity' => 1, - 'product_id' => $VAR['product_id'], - 'recurr_schedule' => @$VAR['recurr_schedule'], - 'service_id' => @$VAR['service_id'], - 'host_type' => $VAR['domain_type'], - 'domain_name' => $VAR['domain_name'], - 'domain_tld' => $VAR['domain_tld']); - - $id = sqlGenID($db,'cart'); - $db->Execute(sqlInsert($db,'cart',$fields,$id)); - - # Get the default domain registration length: - if ($VAR['domain_type'] == 'transfer' || $VAR['domain_type'] == 'register') { - $domain_term = 1; - - $result = $db->Execute(sqlSelect($db,'host_tld','default_term_new',array('name'=>$VAR['domain_tld']))); - if ($result && ! empty($result->fields['default_term_new'])) - $domain_term = $result->fields['default_term_new']; - - # Add child domain if register or transfer - $fields = array( - 'date_orig' => time(), - 'session_id' => $this->session_id, - 'account_id' => @$VAR['account_id'], - 'product_attr' => $attr, - 'cart_type' => 2, - 'quantity' => 1, - 'host_type' => $VAR['domain_type'], - 'domain_name' => $VAR['domain_name'], - 'domain_tld' => $VAR['domain_tld'], - 'domain_term' => $domain_term, - 'cart_parent_id' => $id); - - $db->Execute(sqlInsert($db,'cart',$fields)); - } - } - - /** - * Validate A Domain - * - * @param string $domain - * @param string $tld - * @return bool - */ - private function validate_domain($domain,$tld) { - # Check that it is not already in the user's cart: - $db = &DB(); - - $result = $db->Execute(sqlSelect($db,'cart','id',sprintf("(session_id=::%s:: OR account_id=) AND domain_name=:: AND domain_tld=::%s::", - $this->session_id,SESS_ACCOUNT,$tld))); - - if ($result && $result->RecordCount()) { - global $C_debug,$C_translate; - $C_debug->alert($C_translate->translate('err_prod_already','cart','')); - - return false; - - } else { - return true; - } - } - - /** - * Validate A Product - * - * @param array $VAR - * @param int $product_id - * @param int $account_id - * @return bool - */ - private function validate_product($VAR,$product_id,$account_id) { - global $C_translate,$C_debug,$C_auth; - $db = &DB(); - - # Can user add inactive items - if ($C_auth->auth_method_by_name('invoice','add')) - $active = array(); - else - $active = array('active'=>1); - - # Validate that product exists - $result = $db->Execute(sqlSelect($db,'product','*',array_merge(array('id'=>$product_id),$active))); - if (! $result || $result->RecordCount() == 0) { - $C_debug->alert($C_translate->translate('err_no_prod','cart','')); - - return false; - } - - # Check that product is not already in cart - if ($result->fields['cart_multiple'] != '1' && empty($VAR['service_id'])) { - $rs = $db->Execute(sqlSelect($db,'cart','id',array('product_id'=>$product_id,'session_id'=>$this->session_id))); - if(! $rs || $rs->RecordCount() > 0) { - $C_debug->alert($C_translate->translate('err_prod_already','cart','')); - - return false; - } - } - - # Validate groups: - $groups = unserialize($result->fields['group_avail']); - $auth = false; - for ($ii=0; $iiauth_group_by_id($groups[$ii])) { - $auth = true; - break; - } - } - - if (! $auth) - return false; - - # Validate any required products: - if (! empty($result->fields['assoc_req_prod'])) - $reqarr = unserialize($result->fields["assoc_req_prod"]); - else - $reqarr = false; - - $reqtype = $result->fields['assoc_req_prod_type']; - $assoc = true; - - if (is_array($reqarr) && ! empty($reqarr[0])) { - /* - if($reqtype == 0 && is_array($reqarr)) { - # ALL are required - for($i=0; $iassoc_prod($reqarr[$i])) { - $assoc = false; - - # Add the required product: - $this->product_req_add($reqarr[$i]); - } - } elseif ($reqtype == 1 && is_array($reqarr)) { - # ONE is required - $assoc = false; - for($i=0; $iassoc_prod($reqarr[$i])) { - $assoc = true; - $i = count( $reqarr ); - } else { - # add the required product: - $this->product_req_add($reqarr[$i]); - } - } - }*/ - - if(! SESS_LOGGED) { - $C_debug->alert($C_translate->translate('err_assoc_login','cart','')); - - return false; - } - - $items='
'; - foreach ($reqarr as $prod_id) { - $prodrs = $db->Execute(sqlSelect($db,'product_translate','*',array('product_id'=>$prod_id,'language_id'=>SESS_LANGUAGE))); - if ($prodrs && $prodrs->RecordCount()) - $items .= sprintf('- %s
',$prod_id,$prodrs->fields['name']); - } - - $C_translate->value('cart','items',$items); - $msg = $C_translate->translate('err_assoc_req','cart',''); - - if ($reqtype == 0) - $C_debug->alert(sprintf('%s %s',$msg,$C_translate->translate('assoc_all','cart',''))); - else - $C_debug->alert(sprintf('%s %s',$msg,$C_translate->translate('assoc_one','cart',''))); - - return false; - } - - # Product Plugin Level Validation - $product = $result; - if (! empty($product->fields['prod_plugin']) && !empty($product->fields['prod_plugin_data'])) { - $prodplgfile = sprintf('%sproduct/%s.php',PATH_PLUGINS,$product->fields['prod_plugin_file']); - - if (is_file($prodplgfile)) { - include_once($prodplgfile); - eval('$prodplg = new plgn_prov_'.$product->fields['prod_plugin_file'].';'); - if (is_object($prodplg)) { - if (is_callable(array($prodplg,'validate_cart'))) { - $result = $prodplg->validate_cart($VAR,$product); - if (! $result) { - $C_debug->alert($result); - return false; - } - } - } - } - } - - # Service upgrade - if (! empty($VAR['service_id'])) { - # Validate account logged in - if (SESS_LOGGED == false) - return false; - - $dbm = new CORE_database; - - # Validate account owns service, service is modifyable, active, not canceled, and exists - $rs = $db->Execute(sqlSelect($db,'service','*',sprintf('recur_modify=1 AND active=1 AND (suspend_billing IS NULL OR suspend_billing=0) AND account_id=%s AND id=%s', - SESS_ACCOUNT,$VAR['service_id']))); - if (! $rs || $rs->RecordCount() == 0) - return false; - - # Validate selected product_id is in allowed modify array for selected service - if (empty($rs->fields['product_id'])) - return false; - - $product_id = $rs->fields['product_id']; - $prod = $db->Execute(sqlSelect($db,'product','*',array('id'=>$product_id))); - if (! $prod || $prod->RecordCount() == 0) - return false; - - $arr = unserialize($prod->fields['modify_product_arr']); - if (! is_array($arr) || count($arr) == 0 || empty($arr[0])) - return false; - - $do = false; - foreach ($arr as $pid) - if ($pid == $VAR['product_id']) { - $do = true; - break; - } - - if (!$do) - return false; - - # Make sure this service is not in the cart - $sql = 'DELETE FROM ' . AGILE_DB_PREFIX . 'cart WHERE site_id='.$db->qstr(DEFAULT_SITE).' AND service_id='.$db->qstr($VAR['service_id']) ; - $rs = $db->Execute($sql); - - # Make sure this service has no outstanding invoices: - $p = AGILE_DB_PREFIX; - $sql = "SELECT DISTINCT {$p}invoice.id, {$p}invoice_item.id - FROM {$p}invoice,{$p}invoice_item - WHERE {$p}invoice.site_id = ".DEFAULT_SITE." AND {$p}invoice_item.site_id = ".DEFAULT_SITE." - AND {$p}invoice_item.service_id = ".$db->qstr($VAR['service_id'])." - AND {$p}invoice_item.invoice_id = {$p}invoice.id AND {$p}invoice.billing_status != 1"; - $rs = $db->Execute($sql); - if ($rs && $rs->RecordCount() > 0) { - echo "Invoice(s) in unpaid status for selected service ID {$VAR['service_id']}, cannot upgrade"; - return false; - } - } - - return true; - } - - /** - * Validate Associated Prod Req. - * - * @param int $product_id - * @return bool - * @todo Unused, calling code is commented out. - */ - function assoc_prod($product_id) { - # check if required assoc product is in cart - $db = &DB(); - $p = AGILE_DB_PREFIX; - $rs = $db->Execute(sqlSelect($db,"cart","*","product_id=::$product_id:: AND session_id=::".SESS."::")); - if($rs->RecordCount() > 0) { - return true; - } else if (SESS_LOGGED) { - # check if required assoc product has been purchased - $sql ="SELECT {$p}invoice.account_id, {$p}invoice_item.product_id - FROM {$p}invoice_item LEFT JOIN {$p}invoice ON {$p}invoice_item.invoice_id = {$p}invoice.id - WHERE {$p}invoice.account_id = " . $db->qstr(SESS_ACCOUNT) . " - AND {$p}invoice_item.product_id = " . $db->qstr( $product_id ) . " - AND {$p}invoice.process_status = " . $db->qstr( "1" ) . " - AND {$p}invoice.site_id = " . $db->qstr(DEFAULT_SITE) . " - AND {$p}invoice_item.site_id = " . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - $rs->RecordCount(); - if($rs->RecordCount() > 0) return true; - } - return false; - } -} -?> diff --git a/modules/cart/cart_construct.xml b/modules/cart/cart_construct.xml deleted file mode 100644 index 002ed375..00000000 --- a/modules/cart/cart_construct.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - cart - - cart
- - - - 0 - - date_orig - - 25 - - 1 - - - - account_id - session_id - cart_parent_id - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - I8 - - - C(32) - - - - I4 - - - I4 - - - X2 - array - - - I4 - - - C(16) - - - I4 - - - C(16) - - - I4 - - - C(128) - - - C(16) - - - I4 - - - I4 - - - C(16) - - - C(128) - - - C(255) - - - F - - - F - - - F - - - L - - - I8 - - - - - - - - - - - - <ad_hoc>Ad Hoc Item</ad_hoc> - - - - - -
diff --git a/modules/cart/cart_install.xml b/modules/cart/cart_install.xml deleted file mode 100644 index b34e4f33..00000000 --- a/modules/cart/cart_install.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - 0 - - cart - - - - cart - - - - - - - - - - admin_view - - - admin_add - - - admin_changeqty - - - ad_hoc - - - diff --git a/modules/charge/charge.inc.php b/modules/charge/charge.inc.php deleted file mode 100644 index 7b473643..00000000 --- a/modules/charge/charge.inc.php +++ /dev/null @@ -1,359 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Charge - */ - -/** - * The main AgileBill Charge Class - * - * @package AgileBill - * @subpackage Module:Charge - */ -class charge extends OSB_module { - private $xmlrpc = false; - - public function task_SweepDaily() { - $this->sweep(0); - } - - public function task_SweepWeekly() { - $this->sweep(1); - } - - public function task_SweepMonthly() { - $this->sweep(2); - } - - public function task_SweepQuarterly() { - $this->sweep(3); - } - - public function task_SweepSemiAnnually() { - $this->sweep(4); - } - - public function task_SweepAnnually() { - $this->sweep(5); - } - - private function sweep($type) { - global $C_list; - - # Load required elements - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - include_once(PATH_MODULES.'account/account.inc.php'); - - $account_billing = false; - if ($C_list->is_installed('account_billing')) { - include_once(PATH_MODULES.'account_billing/account_billing.inc.php'); - $abo = new account_billing; - } - - $charges = $this->sql_GetRecords(array('where'=>array('status'=>0,'sweep_type'=>$type),'orderby'=>'account_id,date_orig')); - - # No charges - if (! count($charges)) - return true; - - # Start a transaction - $db = &DB(); - if (AGILE_DB_TYPE == 'mysqlt') { - $db->StartTrans(); - - if (! $db->hasTransactions) { - global $C_debug; - - $msg = "Transactions not supported in 'mysql' driver. Use 'mysqlt' or 'mysqli' driver"; - $C_debug->alert($msg); - $C_debug->error(__FILE__,__METHOD__,$msg); - - return false; - } - } - - $ao = false; - $io = false; - foreach ($charges as $charge) { - # First Run - if (! $ao) { - $ao = new account($charge['account_id']); - } - - # Next run, are we onto a new account? - if ($ao->getRecordAttr('id') != $charge['account_id']) { - $rs = $io->sql_SaveRecord(true); - - if (! $rs) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - $db->FailTrans(); - - return false; - } - - if (AGILE_DB_TYPE == 'mysqlt') - $db->CompleteTrans(); - - # Start next invoice - $io = false; - - # Load our new account object - $ao = new account($charge['account_id']); - } - - if (! $io) { - # Generate an invoice id - $io = new invoice(); - $io->setRecordAttr('id',sqlGenID($db,'invoice')); - $io->setRecordAttr('account_id',$charge['account_id']); - $io->setRecordAttr('billed_currency_id',$ao->getRecordAttr('currency_id')); - $io->setRecordAttr('actual_billed_currency_id',DEFAULT_CURRENCY); - $io->setRecordAttr('reseller_id',$ao->getRecordAttr('reseller_id')); - $io->setRecordAttr('checkout_plugin_id',$ao->getRecordAttr('checkout_plugin_id')); - $io->setRecordAttr('checkout_plugin_data',$ao->getRecordAttr('checkout_plugin_data')); - $io->setRecordAttr('grace_period',$ao->getRecordAttr('invoice_grace')); - $io->setRecordAttr('affiliate_id',$ao->getRecordAttr('affiliate_id')); - $io->setRecordAttr('campaign_id',null); - $io->setRecordAttr('notice_next_date',time()); - $io->setRecordAttr('billing_status',0); - $io->setRecordAttr('print_status',0); - $io->setRecordAttr('process_status',0); - $io->setRecordAttr('status',1); -// $io->setRecordAttr('suspend_billing',0); - $io->setRecordAttr('billed_amt',0); - $io->setRecordAttr('actual_billed_amt',0); - $io->setRecordAttr('notice_count',0); - $io->setRecordAttr('type',1); - $io->setRecordAttr('notice_max',MAX_BILLING_NOTICE); - $io->setRecordAttr('account_billing_id',null); - - # @todo this should be a system default - $io->setRecordAttr('due_date',time()+7*86400); - } - - $io->aaddItem(array( - 'charge_id'=>$charge['id'], - 'date_start'=>$charge['date_orig'], - 'date_stop'=>$charge['date_orig'], - 'domain_name'=>null, - 'domain_tld'=>null, - 'domain_type'=>null, - 'domain_term'=>null, - 'item_type'=>5, - 'price_setup'=>0, - 'price_base'=>$charge['amount'], - 'price_type'=>3, - 'product_id'=>$charge['product_id'], - 'product_name'=>$charge['description'], - 'product_attr'=>$charge['attributes'], - 'product_attr_cart'=>null, - 'quantity'=>$charge['quantity'], - 'recurring_schedule'=>null, - 'service_id'=>$charge['service_id'], - 'sku'=>null - )); - - # @todo Move this update, need to incase the charge add fails. - $db->Execute(sqlUpdate($db,'charge',array('status'=>1),array('id'=>$charge['id']))); - } - - # Save invoice - if ($io) { - $rs = $io->sql_SaveRecord(true); - - if (! $rs) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - $db->FailTrans(); - - return false; - } - - if (AGILE_DB_TYPE == 'mysqlt') - $db->CompleteTrans(); - } - } - - function api($VAR) { - $db = &DB(); - - # amount - if(@$VAR['amount'] <= 0) { - return $this->api_return(0,'','Invalid value supplied for the \'amount\' parameter, must be greater than 0'); - } else { - $amount = $VAR['amount']; - } - - # sweep_type - if(@$VAR['sweep_type'] <= 6) { - $sweep_type = $VAR['sweep_type']; - } else { - return $this->api_return(0,'','Invalid value supplied for the \'sweep_type\' parameter, must be 0-6'); - } - - # account_id OR service_id - if(empty($VAR['account_id']) && empty($VAR['service_id'])) { - return $this->api_return(0,'','Either the \'account_id\' or \'service_id\' parameter must be provided'); - } else { - - # check the account id - if(!empty($VAR['account_id'])) { - $sql = "SELECT * FROM ".AGILE_DB_PREFIX."account WHERE - id = " . $db->qstr($VAR['account_id']) . " OR - username = " . $db->qstr($VAR['account_id']) . " AND - site_id = " . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - if ($rs === false) { - global $C_debug; - $C_debug->error('charge.inc.php','charge :: api()', $db->ErrorMsg(). "\r\n\r\n". $sql); - } - if($rs->RecordCount() == 1) { - $account_id = $rs->fields['id']; - } else { - return $this->api_return(0,'','The \'account_id\' value provided does not exist'); - } - - # check the service id - } elseif(!empty($VAR['service_id'])) { - $sql = "SELECT id,account_id FROM ".AGILE_DB_PREFIX."service WHERE - site_id = " . $db->qstr(DEFAULT_SITE) . " AND - id = " . $db->qstr($VAR['service_id']); - $rs = $db->Execute($sql); - if ($rs === false) { - global $C_debug; - $C_debug->error('charge.inc.php','charge :: api()', $db->ErrorMsg(). "\r\n\r\n". $sql); - } - if($rs->RecordCount() == 1) { - $service_id = $VAR['service_id']; - $account_id = $rs->fields['account_id']; - } else { - return $this->api_return(0,'','The \'service_id\' value provided does not exist'); - } - } - } - - # taxable - if(empty($VAR['taxable'])) - $taxable = 0; - else - $taxable = $VAR['taxable']; - - # attributes - if(!empty($VAR['attributes'])) { - @$attributes = ereg_replace("@@", "\r\n", $VAR['attributes']); - @$attributes = ereg_replace("--", "==", $attributes); - } else { - $attributes = false; - } - - # quantity - if(empty($VAR['quantity'])) - $quantity = 1; - else - $quantity = $VAR['quantity']; - - # product id - if(empty($VAR['product_id'])) { - $product_id = false; - } else { - $product_id = $VAR['product_id']; - } - - # description - if(empty($VAR['description'])) { - $description = false; - } else { - $description = $VAR['description']; - } - - /* Start: SQL Insert Statement */ - $sql = "SELECT * FROM ".AGILE_DB_PREFIX."charge WHERE id = -1"; - $rs = $db->Execute($sql); - - $id = $db->GenID(AGILE_DB_PREFIX . 'charge_id'); - $insert = Array ( 'id' => $id, - 'site_id' => DEFAULT_SITE, - 'date_orig' => time(), - 'status' => 0, - 'sweep_type' => $sweep_type, - 'account_id' => @$account_id, - 'service_id' => @$service_id, - 'product_id' => @$product_id, - 'amount' => $amount, - 'quantity' => $quantity, - 'taxable' => $taxable, - 'attributes' => $attributes, - 'description' => $description ); - $sql = $db->GetInsertSQL($rs, $insert); - $result = $db->Execute($sql); - if ($result === false) { - global $C_debug; - $C_debug->error('charge.inc.php','charge :: api()', $db->ErrorMsg(). "\r\n\r\n". $sql); - return $this->api_return(0,'','The SQL insert failed!'); - } else { - return $this->api_return(1,$id,''); - } - return true; - } - - function api_return($status=0,$id='',$error='') { - if (! $this->xmlrpc) { - echo "status=={$status}++charge_id={$id}++error=={$error}"; - } else { - $arr = array('status'=>$status, 'charge_id'=>$id, 'error'=> $error); - return $arr; - } - } - - /** - * Add a record - */ - public function add($VAR) { - if (! empty($VAR['attributes'])) { - $attr = ''; - - for ($i=0; $ido_import($VAR,$this); - else - $import->prepare_import($VAR,$this); - } -} -?> diff --git a/modules/charge/charge_construct.xml b/modules/charge/charge_construct.xml deleted file mode 100644 index 05639b50..00000000 --- a/modules/charge/charge_construct.xml +++ /dev/null @@ -1,143 +0,0 @@ - - - - charge - - charge
- - - - 0 - - date_orig - - 25 - - 0 - - - - sweep_type,status - account_id,service_id - site_id,service_id,status - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - Processed - 1 - L - - - Charge Schedule - I4 - - - account - username - Account - I8 - any - - - product - sku - Product - I4 - - - Service - I4 - I4 - - - Amount - F - float - - - Quantity - F - float - - - Taxable - L - - - Attributes - X2 - - - Description - C(32) - - - - - - status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes,description - id - id,status,sweep_type,amount,quantity,taxable,attributes,description - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes,description - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - id,date_orig,status,sweep_type,account_id,product_id,service_id,amount,quantity,taxable,attributes - - - - - - - - - - - - - - id - checkbox - 25px - - - date_orig - date - - - account_id - - - status - bool - - - amount - currency - - - -
diff --git a/modules/charge/charge_install.xml b/modules/charge/charge_install.xml deleted file mode 100644 index 79ea690d..00000000 --- a/modules/charge/charge_install.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - invoice - - Charges - - 1 - - charge - - - - invoice - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - api - - - export_csv - - - export_excel - - - export_tab - - - export_xml - - - search_export - - - import - - 1 - - - diff --git a/modules/charge/xmlrpc.php b/modules/charge/xmlrpc.php deleted file mode 100644 index 832a7c0e..00000000 --- a/modules/charge/xmlrpc.php +++ /dev/null @@ -1,84 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -include_once('../../config.inc.php'); -require_once(PATH_ADODB . 'adodb.inc.php'); -require_once(PATH_CORE . 'database.inc.php'); -require_once(PATH_CORE . 'setup.inc.php'); -require_once(PATH_CORE . 'vars.inc.php'); -include_once(PATH_INCLUDES.'xml-rpc/xml-rpc.php'); -include_once(PATH_MODULES .'charge/charge.inc.php'); -$C_debug = new CORE_debugger; -$C_vars = new CORE_vars; -$VAR = $C_vars->f; -$C_db = &DB(); -$C_setup = new CORE_setup; - -class ChargeServer extends IXR_Server { - - var $account_id; - var $username; - var $password; - - function ChargeServer() { - $this->IXR_Server(array( - 'charge.add' => 'this:add' - )); - } - - function add($args) { - $this->username = $args[0]; - $this->password = $args[1]; - if(!$this->validate()) return array('status'=>false, 'charge_id'=>false, 'error'=> "Authentication failed"); - - @$var['account_id'] = $args[2]; - @$var['service_id'] = $args[3]; - @$var['amount'] = $args[4]; - @$var['sweep_type'] = $args[5]; - @$var['taxable'] = $args[6]; - @$var['quantity'] = $args[7]; - @$var['product_id'] = $args[8]; - @$var['description'] = $args[9]; - @$var['attributes'] = $args[10]; - - $charge = new charge; - $charge->xmlrpc=true; - $ret = $charge->api($var, $charge); - - return $ret; - - } - - function validate() { - if(empty($this->username) || empty($this->password)) return false; - $p=AGILE_DB_PREFIX; - $s=DEFAULT_SITE; - $db=&DB(); - $sql = "SELECT DISTINCT A.id,A.username FROM {$p}account as A, {$p}account_group as AG - WHERE A.username=".$db->qstr($this->username)." AND A.password=MD5(".$db->qstr($this->password).") - AND A.status=1 AND AG.account_id = A.id AND A.site_id={$s} AND AG.site_id={$s} - AND AG.group_id in ( SELECT DISTINCT GM.group_id FROM _group_method GM JOIN {$p}module M on (M.name='charge' and M.site_id={$s}) JOIN {$p}module_method MM on (MM.name='api' AND MM.module_id=M.id and MM.site_id={$s}))"; - $rs=$db->Execute($sql); - if(!$rs || !$rs->RecordCount()) return false; - else return true; - } -} -$server = new ChargeServer(); -?> \ No newline at end of file diff --git a/modules/checkout/auth.inc.php b/modules/checkout/auth.inc.php deleted file mode 100644 index 8907ed60..00000000 --- a/modules/checkout/auth.inc.php +++ /dev/null @@ -1,8 +0,0 @@ - 'checkout', 'method' => 'preview'), -Array ('module' => 'checkout', 'method' => 'checkoutoption'), -Array ('module' => 'checkout', 'method' => 'checkoutnow') -); -?> diff --git a/modules/checkout/base_checkout_plugin.class.php b/modules/checkout/base_checkout_plugin.class.php deleted file mode 100644 index 11a7bf60..00000000 --- a/modules/checkout/base_checkout_plugin.class.php +++ /dev/null @@ -1,451 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -/** - * Base checkout plugin class - * - */ -class base_checkout_plugin -{ - protected $checkout_id; /* current checkout plugin id */ - protected $name; /* plugin name */ - var $type; /* redirect, gateway, or other */ - var $recurr_only=false; /* bool */ - var $return_url; /* return url */ - var $success_url; /* decline url */ - var $support_cur; /* supported currency array */ - var $cfg; - protected $flds; - var $eft; /* true if checkout plugin type is eft */ - var $req_all_flds=true; /* require all account fields (first/last name, address1, state/province, zip) */ - var $req_fields_arr=false; /* if req_all_fields=false, use this array to define which fields will be required */ - var $billing; /* the billing details */ - var $account; /* the account level details */ - - /** - * Get the checkout plugin settings from the database - */ - protected function getDetails($checkout_id) { - if (! $checkout_id) - return; - - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'checkout','*',array('id'=>$checkout_id))); - if ($rs && $rs->RecordCount()) { - @$this->cfg = unserialize($rs->fields['plugin_data']); - $this->flds = $rs->fields; - $this->checkout_id = $rs->fields['id']; - } - } - - /** - * Get the checkout plugin settings from the database - */ - protected function getDetailsName($checkout_name) { - if (! $checkout_name) - return; - - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'checkout','*',array('name'=>$checkout_name))); - if ($rs && $rs->RecordCount()) { - @$this->cfg = unserialize($rs->fields['plugin_data']); - $this->flds = $rs->fields; - $this->checkout_id = $rs->fields['id']; - } - } - - public function getName() { - return $this->name; - } - - /** - * Get country name, - * - * @param string $field name, two_code, or three_code - */ - function getCountry($field, $country_id) { - $db = &DB(); - $sql= 'SELECT '.$field.' FROM '.AGILE_DB_PREFIX.'country WHERE site_id='.DEFAULT_SITE.' AND id='.$country_id; - $rs = $db->Execute($sql); - if($rs == false || $rs->RecordCount() == 0) - return "Not Defined"; - else - return $rs->fields["$field"]; - } - - /** - * Validate the current currency is allowed - * - * @return bool - */ - function validate_currency($currency_iso) { - $do = false; - for($i=0; $isupport_cur); $i++) - if ($currency_iso == $this->support_cur[$i]) - $do = true; - if ( !$do ) { - global $C_list, $C_translate; - $C_translate->value['checkout']['currency'] = $C_list->currency_iso(DEFAULT_CURRENCY); - $msg = $C_translate->translate('currency_not_supported','checkout',''); - $this->redirect=''; - return false; - } - return true; - } - - /** - * Validate the current credit card details - */ - function validate_card_details(&$ret) { - - // validate input fields - if($this->req_all_flds) $this->req_fields_arr = Array('first_name','last_name', 'address1', 'state', 'zip'); - if (is_array($this->req_fields_arr)) { - $validate=true; - global $VAR; - foreach($this->req_fields_arr as $fld) { - if(empty($this->billing["$fld"]) && empty($this->account["$fld"]) ) { - $VAR["{$fld}_error"]=true; - $validate=false; - } - } - if(!$validate) { - global $C_translate; - $ret['status'] = 0; - $ret['msg'] = $C_translate->translate('missing_fields','checkout',''); - return false; - } - } - - // validate actual credit card details - include_once(PATH_CORE . 'validate.inc.php'); - $validate = new CORE_validate; - $this->billing["cc_no"] == preg_replace('/^[0-9]/', '', $this->billing["cc_no"]); - if (!$validate->validate_cc( $this->billing["cc_no"], false, $this->billing["card_type"], $this->cfg['card_type'] )) { - $ret['status'] = 0; - global $C_translate; - $ret['msg'] = $C_translate->translate('card_invalid','checkout',''); - } elseif (!$validate->validate_cc_exp(@$this->billing["exp_month"],@$this->billing["exp_year"])) { - $ret['status'] = 0; - global $C_translate; - $ret['msg'] = $C_translate->translate('card_exp_invalid','checkout',''); - } else { - $ret['status'] = 1; - return true; - } - return false; - } - - - /** - * Validate the current eft card details - */ - function validate_eft_details(&$ret) { - // validate input fields - if($this->req_all_flds) $this->req_fields_arr = Array('first_name','last_name', 'address1', 'city', 'state', 'zip', 'eft_check_acct_type', 'eft_trn', 'eft_check_acct', 'phone'); - if (is_array($this->req_fields_arr)) { - $validate=true; - global $VAR; - foreach($this->req_fields_arr as $fld) { - if(empty($this->billing["$fld"]) && empty($this->account["$fld"]) ) { - $VAR["{$fld}_error"]=true; - $validate=false; - } - } - if(!$validate) { - global $C_translate; - $ret['status'] = 0; - $ret['msg'] = $C_translate->translate('missing_fields','checkout',''); - return false; - } - } - $ret['status'] = 1; - return true; - } - - - /** - * Set the redirect URL and form values - * - * @param string $url - * @param string $vals - */ - function post_vars($url,$vals) { - $ret = '
'; - foreach($vals as $v) - $ret .=''; - $ret .= ''; - $this->redirect=$ret; - } - - /** - * Set array for processing order with a stored billing record - * "getStoredArray" - */ - function setBillingFromDB($account_id, $account_billing_id, $checkout_plugin_id,$rebilling=false) { - $db=&DB(); - $ccrs=$db->Execute($sql=sqlSelect($db,"account_billing","*","account_id=::$account_id:: AND id=::$account_billing_id:: AND checkout_plugin_id=::$checkout_plugin_id::")); - return $this->setBillingFromDBObj($ccrs); - } - - /** - * Get stored array by passing in database object - */ - function setBillingFromDBObj(&$ccrs,$rebilling=false) { - if($ccrs && $ccrs->RecordCount()) { - - // account fields - if(empty($ccrs->fields['address1'])) { - if(!$this->setAccountFromDB($ccrs->fields['account_id'])) return false; - } else { - $this->account = Array( - 'first_name'=> $ccrs->fields['first_name'], - 'last_name'=> $ccrs->fields['last_name'], - 'company'=> $ccrs->fields['company'], - 'address1'=> $ccrs->fields['address1'], - 'address2'=> $ccrs->fields['address2'], - 'city'=> $ccrs->fields['city'], - 'state'=> $ccrs->fields['state'], - 'zip'=> $ccrs->fields['zip'], - 'country_id'=> $ccrs->fields['country_id'], - 'phone'=> $ccrs->fields['phone'], - 'company' => $ccrs->fields['company'], - 'email' => $ccrs->fields['email'] - ); - } - - // get the card or eft details & decrypt - include_once(PATH_CORE.'crypt.inc.php'); - $this->billing['card_type'] = $ccrs->fields['card_type']; - $this->billing['rebilling'] = $rebilling; - if($this->eft || $ccrs->fields['card_type']=='eft') { - // stored eft - $this->billing['eft_check_acct_type'] = $ccrs->fields['eft_check_acct_type']; - $this->billing['eft_check_checkno'] = false; - $this->billing['eft_check_acct'] = CORE_decrypt($ccrs->fields['eft_check_acct']); - $this->billing['eft_trn'] = CORE_decrypt($ccrs->fields['eft_trn']); - if(!empty($ccrs->fields['ssn'])) $this->billing['ssn'] = CORE_decrypt($ccrs->fields['ssn']); - if(!empty($ccrs->fields['dob'])) $this->billing['dob'] = CORE_decrypt($ccrs->fields['dob']); - if(!empty($ccrs->fields['dl_no'])) $this->billing['dl_no'] = CORE_decrypt($ccrs->fields['dl_no']); - } else { - // stored card - $this->billing['cc_no'] = CORE_decrypt($ccrs->fields['card_num']); - $this->billing['exp_month'] = $ccrs->fields['card_exp_month']; - $this->billing['exp_year'] = $ccrs->fields['card_exp_year']; - } - - /* write back params to global */ - $this->setBillingParams(); - - return true; - } else { - return false; - } - } - - /** - * Set account from account db table - */ - function setAccountFromDB($id) { - $db=&DB(); - $rs = $db->Execute(sqlSelect($db,"account","first_name,last_name,company,address1,address2,city,state,zip,country_id","id=::$id::")); - if($rs&&$rs->RecordCount()) { - $this->account = $rs->fields; - return true; - } - return false; - } - - /** - * Set account and billing details from $VAR (user params) - */ - function setBillingFromParams($VAR) { - global $VAR; - @$a = $VAR['checkout_plugin_data']; - - @$this->billing = Array( - 'card_type' => $a['card_type'], - 'cc_no' => $a['cc_no'], - 'ccv' => $a['ccv'], - 'exp_month' => $a['exp_month'], - 'exp_year' => $a['exp_year'], - 'eft_check_acct_type' => $a['eft_check_acct_type'], - 'eft_check_checkno' => $a['eft_check_checkno'], - 'eft_check_acct' => $a['eft_check_acct'], - 'eft_trn' => $a['eft_trn'], - 'ssn' => $a['ssn'], - 'dob' => $a['dob'], - 'dl_no' => $a['dl_no'] - ); - - @$this->account = Array( - 'first_name' => stripslashes($a['first_name']), - 'last_name' => stripslashes($a['last_name']), - 'address1' => stripslashes($a['address1']), - 'address2' => stripslashes($a['address2']), - 'city' => stripslashes($a['city']), - 'state' => stripslashes($a['state']), - 'zip' => stripslashes($a['zip']), - 'country_id' => stripslashes($a['country_id']), - 'phone' => stripslashes($a['phone']), - 'company' => stripslashes($a['company']), - 'email' => stripslashes($a['email']) - ); - - /* write back params for global */ - $this->setBillingParams(); - } - - /** - * Write the vars back to the global VAR for availibilty on the checkout plugin templates - */ - function setBillingParams() { - global $VAR; - foreach($this->billing as $key=>$val) $VAR["$key"]=$val; - foreach($this->account as $key=>$val) $VAR["$key"]=$val; - } - - - /** - * Store the billing credit card entered - */ - function saveCreditCardDetails($VAR) { - global $C_auth; - if(!empty($VAR['account_id']) && $C_auth->auth_method_by_name('checkout','admin_checkoutnow')) - $account_id=$VAR['account_id']; - else - $account_id=SESS_ACCOUNT; - - # Check if this card is already on file: - $last_four = substr($this->billing['cc_no'],(strlen($this->billing['cc_no'])-4),4); - $db = &DB(); - $q = "SELECT id,card_exp_month,card_exp_year FROM ".AGILE_DB_PREFIX."account_billing WHERE - site_id = ".$db->qstr(DEFAULT_SITE) ." AND - account_id = ".$db->qstr($account_id) ." AND - card_num4 = ".$db->qstr($last_four) ." AND - checkout_plugin_id = ".$db->qstr($this->checkout_id) ." AND - card_type = ".$db->qstr($this->billing['card_type']); - $rs = $db->Execute($q); - if($rs && $rs->RecordCount()) { - $fields=Array('card_exp_month'=>$this->billing['exp_month'], 'card_exp_year'=>$this->billing['exp_year']); - $db->Execute(sqlUpdate($db,"account_billing",$fields,"id = {$rs->fields['id']}")); - return $rs->fields['id']; - } - - include_once(PATH_CORE.'crypt.inc.php'); - $card_num = CORE_encrypt ($this->billing['cc_no']); - $id = $db->GenID(AGILE_DB_PREFIX . 'account_billing_id'); - $sql = "INSERT INTO ".AGILE_DB_PREFIX."account_billing SET - id = " . $db->qstr($id) . ", - site_id = " . $db->qstr(DEFAULT_SITE) . ", - account_id = " . $db->qstr(@$account_id) . ", - checkout_plugin_id = " . $db->qstr(@$this->checkout_id) . ", - card_type = " . $db->qstr(@$this->billing['card_type']) . ", - card_num = " . $db->qstr(@$card_num) . ", - card_num4 = " . $db->qstr(@$last_four) . ", - card_exp_month = " . $db->qstr(@$this->billing['exp_month']) . ", - card_exp_year = " . $db->qstr(@$this->billing['exp_year']) . ", - card_start_month = " . $db->qstr(@$this->billing['start_month']) . ", - card_start_year = " . $db->qstr(@$this->billing['start_year']) . ", - first_name = " . $db->qstr(@$this->account['first_name']) . ", - last_name = " . $db->qstr(@$this->account['last_name']) . ", - address1 = " . $db->qstr(@$this->account['address1']) . ", - address2 = " . $db->qstr(@$this->account['address2']) . ", - city = " . $db->qstr(@$this->account['city']) . ", - state = " . $db->qstr(@$this->account['state']) . ", - zip = " . $db->qstr(@$this->account['zip']) . ", - country_id = " . $db->qstr(@$this->account['country_id']) . ", - phone = " . $db->qstr(@$this->account['phone']) . ", - email = " . $db->qstr(@$this->account['email']) . ", - company = " . $db->qstr(@$this->account['company']) ; - $result = $db->Execute($sql); - if ($result) return $id; - return false; - } - - - /** - * Store the billing EFT details entered - */ - function saveEFTDetails($VAR) { - global $C_auth; - if(!empty($VAR['account_id']) && $C_auth->auth_method_by_name('checkout','admin_checkoutnow')) - $account_id=$VAR['account_id']; - else - $account_id=SESS_ACCOUNT; - - # Check if this card is already on file: - $last_four = substr($this->billing['eft_check_acct'],(strlen($this->billing['eft_check_acct']) - 4),4); - $db = &DB(); - $q = "SELECT id,card_exp_month,card_exp_year FROM ".AGILE_DB_PREFIX."account_billing WHERE - site_id = ".$db->qstr(DEFAULT_SITE) ." AND - account_id = ".$db->qstr($account_id) ." AND - card_num4 = ".$db->qstr($last_four) ." AND - checkout_plugin_id = ".$db->qstr($this->checkout_id) ." AND - card_type = ".$db->qstr($this->billing['card_type']); - $rs = $db->Execute($q); - if($rs && $rs->RecordCount()) { - return $rs->fields['id']; - } - - include_once(PATH_CORE.'crypt.inc.php'); - $ssn=false; - $dob=false; - $dl_no=false; - if(!empty($this->billing['dob'])) $dob = CORE_encrypt ($this->billing['dob']); - if(!empty($this->billing['ssn'])) $ssn = CORE_encrypt ($this->billing['ssn']); - if(!empty($this->billing['dl_no'])) $dl_no = CORE_encrypt ($this->billing['dl_no']); - $check_acct = CORE_encrypt ($this->billing['eft_check_acct']); - $trn = CORE_encrypt ($this->billing['eft_trn']); - - $id = $db->GenID(AGILE_DB_PREFIX . 'account_billing_id'); - $sql = "INSERT INTO ".AGILE_DB_PREFIX."account_billing SET - id = " . $db->qstr($id) . ", - site_id = " . $db->qstr(DEFAULT_SITE) . ", - account_id = " . $db->qstr($account_id) . ", - checkout_plugin_id = " . $db->qstr($this->checkout_id) . ", - card_num4 = " . $db->qstr($last_four) . ", - card_type = " . $db->qstr(@$this->billing['card_type']) . ", - eft_check_checkno = " . $db->qstr($this->billing['eft_check_checkno']) . ", - eft_check_acct_type = " . $db->qstr($this->billing['eft_check_acct_type']) . ", - eft_trn = " . $db->qstr($trn) . ", - eft_check_acct = " . $db->qstr($check_acct) . ", - dob = " . $db->qstr($dob) . ", - dl_no = " . $db->qstr($dl_no) . ", - ssn = " . $db->qstr($ssn) . ", - first_name = " . $db->qstr(@$this->account['first_name']) . ", - last_name = " . $db->qstr(@$this->account['last_name']) . ", - address1 = " . $db->qstr(@$this->account['address1']) . ", - address2 = " . $db->qstr(@$this->account['address2']) . ", - city = " . $db->qstr(@$this->account['city']) . ", - state = " . $db->qstr(@$this->account['state']) . ", - zip = " . $db->qstr(@$this->account['zip']) . ", - country_id = " . $db->qstr(@$this->account['country_id']) . ", - phone = " . $db->qstr(@$this->account['phone']) . ", - email = " . $db->qstr(@$this->account['email']) . ", - company = " . $db->qstr(@$this->account['company']); - $result = $db->Execute($sql); - if ($result) return $id; - return false; - } -} -?> diff --git a/modules/checkout/checkout.inc.php b/modules/checkout/checkout.inc.php deleted file mode 100644 index 18a4468b..00000000 --- a/modules/checkout/checkout.inc.php +++ /dev/null @@ -1,906 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Checkout - */ - -/** - * The main AgileBill Checkout Class - * - * @package AgileBill - * @subpackage Module:Checkout - */ -class checkout extends OSB_module { - var $admin_view=false; - var $admin_checkout=false; - var $admin_checkout_option=false; - - /** - * Add Discount for Admin Checkout - */ - function admin_adddiscount($VAR) { - if(empty($VAR['amount'])) return false; - if(empty($VAR['id'])) return false; - $db=&DB(); - $fields=Array('ad_hoc_discount'=>round($VAR['amount'],2)); - $db->Execute(sqlUpdate($db,"cart",$fields,"id = ::{$VAR['id']}:: ")); - return true; - } - - /** - * Admin Create the Invoice Record - */ - function admin_checkoutnow($VAR) - { - # Get the account id & session_id - if(!empty($VAR['account_id'])) - { - $this->account_id = $VAR['account_id']; - $db = &DB(); - $sql = 'SELECT id FROM ' . AGILE_DB_PREFIX . 'session WHERE account_id = ' . $db->qstr( $this->account_id ) . ' AND site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - if(!empty($rs->fields['id'])) { - $this->session_id = $rs->fields['id']; - } else { - $this->session_id = SESS; - } - } else { - return false; - } - - # Get the affiliate details - global $C_list; - if(!$C_list->is_installed('affiliate')) { - $this->affiliate_id = ''; - } else { - if(SESS_AFFILIATE != "") { - $this->affiliate_id = SESS_AFFILIATE; - } else { - # Get the affiliate details for this account - $db = &DB(); - $sql = 'SELECT affiliate_id FROM ' . AGILE_DB_PREFIX . 'account WHERE id = ' . $db->qstr( $this->account_id ) . ' AND site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - if(!empty($rs->fields['affiliate_id'])) - { - $this->affiliate_id = $rs->fields['affiliate_id']; - } else { - # Get the affiliate account for the admin creating this invoice - $db = &DB(); - $sql = 'SELECT id FROM ' . AGILE_DB_PREFIX . 'affiliate WHERE account_id = ' . $db->qstr( SESS_ACCOUNT ) . ' AND site_id = ' . $db->qstr(DEFAULT_SITE); - $rs = $db->Execute($sql); - if(!empty($rs->fields['id'])) - $this->affiliate_id = $rs->fields['id']; - else - $this->affiliate_id = ''; - } - } - } - $this->redirect = true; - $this->admin_checkout = true; - - # Is processor free checkout? - if(@$VAR['option'] == '999') $this->admin_checkout_option = true; - - # Checkout - if($this->checkoutnow($VAR, $this)) { - echo ''; - } - } - - /** - * Get available checkout option - * - * @param int $account_id - * @param float $total - * @param array $product_arr Array of product_ids being purchased - * @param bool $any_new - * @param bool $any_trial - * @param bool $any_recurring - * @return array - * @uses account - */ - function get_checkout_options($account_id,$total=0,$product_arr=false,$any_new=false,$any_trial=false,$any_recurring=false) { - $options = ''; - if ($any_trial) - $options .= ' AND allow_trial=1'; - if ($any_recurring) - $options .= ' AND allow_recurring=1'; - if ($any_new) - $options .= ' AND allow_new=1'; - - if (! $options) - return false; - - include_once(PATH_MODULES.'account/account.inc.php'); - $ao = new account($account_id); - $country_id = $ao->getRecordAttr('country_id'); - - $db = &DB(); - $chopt = $db->Execute(sqlSelect($db,'checkout','*',sprintf('active=1 %s',$options))); - if($chopt && $chopt->RecordCount()) { - while( !$chopt->EOF ) { - $show = true; - # Check that the cart total is not to low: - if ( $show == true && $chopt->fields["total_minimum"] != "" && $total < $chopt->fields["total_minimum"] ) $show = false; - # Check that the cart total is not to high: - if ( $show == true && $chopt->fields["total_maximum"] != "" && $total > $chopt->fields["total_maximum"] ) { - $show = false; - } elseif ($chopt->fields["total_maximum"] == '0' && $total > 0) { - $show = false; - } - # Check that the group requirement is met: - if ( $show == true && !$this->admin_view && !empty ( $chopt->fields["required_groups"] ) ) { - global $C_auth; - $arr = unserialize ( $chopt->fields["required_groups"] ); - if(count($arr) > 0 && !empty($arr[0])) $show = false; - for ( $i=0; $iauth_group_by_id($arr[$i])) { - $show = true; - $i=count($arr); - } - } - } - # Check that the customer is not ordering a blocked SKU: - if ( $show == true && !$this->admin_view && !empty ( $chopt->fields["excluded_products"] ) && $product_arr ) { - $arr = unserialize ( $chopt->fields["excluded_products"] ); - if(count($arr) > 0) { - for($i=0; $ifields["default_when_amount"] ) ) { - @$arr = unserialize ( $chopt->fields["default_when_amount"] ); - for ( $i=0; $i= $arr[$i] ) $list_ord--; $i=count($arr); - } - # By Currency - if ( !empty ( $chopt->fields["default_when_currency"] ) ) { - @$arr = unserialize ( $chopt->fields["default_when_currency"] ); - for ( $i=0; $ifields["default_when_group"] ) ) { - @$arr = unserialize ( $chopt->fields["default_when_group"] ); - global $C_auth; - for ( $i=0; $iauth_group_by_account_id( $account_id, $arr[$i] ) ) $list_ord--; $i=count($arr); - } - # By Country - if ( !empty ( $chopt->fields["default_when_country"] ) ) { - @$arr = unserialize ( $chopt->fields["default_when_country"] ); - for ( $i=0; $i$list_ord, 'fields'=>$chopt->fields); - } - $chopt->MoveNext(); - } - # Sort the checkout_options array by the [fields] element - if(count($checkout_options) > 0 ) { - foreach ( $checkout_options as $key => $row ) $sort[$key] = $row["sort"]; - array_multisort ( $sort, SORT_ASC, $checkout_options ); - return $checkout_options; - } - } else { - return false; - } - return false; - } - - - /** - * Admin View Preview / Confirm prior to checkout - */ - function admin_preview($VAR) { - global $C_auth; - if(!empty($VAR['account_id']) && $C_auth->auth_method_by_name('checkout','admin_checkoutnow')) { - $this->account_id=$VAR['account_id']; - $this->admin_view = true; - } else { - $this->account_id=SESS_ACCOUNT; - } - $this->preview($VAR, $this); - } - - /** - * Preview / Confirm prior to checkout - * - * @uses account - * @uses cart - */ - public function preview($VAR,$object,$returnInvoice=false) { - if (! SESS_LOGGED) - return false; - - if (empty($this->account_id)) - $this->account_id = SESS_ACCOUNT; - - # Load the cart - include_once(PATH_MODULES.'/cart/cart.inc.php'); - $co = new cart(); - - if (! $results = $co->sGetContents()) - return false; - - # Load invoice object - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - $invoice = new invoice(); - - $invoice->setRecordAttr('account_id',$this->account_id); - - # Put the cart items into an invoice - foreach ($results as $result) { - $invoice->aaddItem(array( - 'charge_id'=>null, - 'domain_name'=>$result['domain_name'], - 'domain_term'=>$result['domain_term'], - 'domain_type'=>$result['domain_type'], - 'domain_tld'=>$result['domain_tld'], - 'host_type'=>$result['host_type'], - 'item_type'=>0, - 'service_id'=>null, - 'cart_id'=>$result['id'], - 'product_id'=>$result['product_id'], - 'quantity'=>isset($result['quantity']) ? $result['quantity'] : 1, - 'recurr_schedule'=>$result['recurr_schedule'], - 'product_attr'=>$result['product_attr'], - 'product_attr_cart'=>$result['product_attr'], - 'type'=>in_array($result['host_type'],array('register')) ? 'domain' : null - )); - } - - # If we are being called by checkout, then we use the preview code to build our invoice. - if ($returnInvoice) - return $invoice; - - global $smarty; - - $smarty->assign('results',$invoice->sCountItems()); - $smarty->assign('cart',$invoice->getItems()); - $smarty->assign('sub_total',$invoice->sSubTotal()); - $smarty->assign('discounttotal',$invoice->sTotalDiscount(true)); - $smarty->assign('discount',$invoice->getDiscountDetails(true)); - $smarty->assign('taxtotal',$invoice->sTotalTax(true)); - $smarty->assign('tax',$invoice->getTaxDetails()); - $smarty->assign('total',$invoice->sTotal(true)); - - # Get our checkout options - $checkout_options = $this->get_checkout_options($this->account_id,$invoice->sTotal(),$invoice->getProductItems(), - (is_null($invoice->getRecordAttr('id'))), - in_array(2,$invoice->getProductItemTypes()),(! is_null($invoice->getRecordAttr('id')))); - $checkout_c = count($checkout_options); - - $smarty->assign('checkout',$checkout_options); - $smarty->assign('checkout_c',$checkout_c); - $checkout_c--; - $smarty->assign('last_checkout_id',$checkout_options[$checkout_c]['fields']['id']); - } - - /** - * Create the Invoice Record and send user to checkout - * - * @uses account - * @uses currency - */ - public function checkoutnow($VAR) { - global $C_translate,$C_list,$smarty; - - # Validate user is logged in: - if (! SESS_LOGGED) { - printf('', - _('You must be logged in to complete this purchase! Please refresh this page in your browser to login now.')); - - return false; - } - - $db = &DB(); - - # Check for admin - if (! $this->admin_checkout && ! empty($VAR['account_id'])) { - global $C_auth; - - if (! empty($VAR['account_id']) && $C_auth->auth_method_by_name('checkout','admin_checkoutnow')) { - $this->account_id = $VAR['account_id']; - $this->admin_checkout = true; - - } else { - $this->account_id = SESS_ACCOUNT; - } - } - - $invoice = $this->preview($VAR,null,true); - - # Set some defaults - $invoice->setRecordAttr('actual_billed_amt',0); - $invoice->setRecordAttr('billed_amt',0); - $invoice->setRecordAttr('billing_status',0); - $invoice->setRecordAttr('due_date',time()); - $invoice->setRecordAttr('grace_period',0); - $invoice->setRecordAttr('notice_count',0); - $invoice->setRecordAttr('notice_max',0); - $invoice->setRecordAttr('notice_next_date',null); - $invoice->setRecordAttr('print_status',0); - $invoice->setRecordAttr('process_status',0); - $invoice->setRecordAttr('status',1); - $invoice->setRecordAttr('suspend_billing',0); - $invoice->setRecordAttr('reseller_id',0); - $invoice->setRecordAttr('type',0); - - # (Re)Calculate our discounts and taxes - $invoice->setRecordAttr('discount_amt',$invoice->sTotalDiscount(true)); - $invoice->setRecordAttr('tax_amt',$invoice->sTotalTax(true)); - $invoice->setRecordAttr('total_amt',$invoice->sTotal(true)); - - // Validate and init a checkout plugin - $checkout = false; - if ($this->admin_checkout_option) { - # Admin checkout option specified - include_once(PATH_MODULES.'checkout/checkout_admin.inc.php'); - $PLG = new checkout_admin; - - $checkout = true; - $invoice->setRecordAttr('checkout_plugin_id',false); - - } else { - # Get available checkout options and check against the one provided - $invoice->setRecordAttr('checkout_plugin_id',$VAR['option']); - - $checkout_options = $this->get_checkout_options($this->account_id,$invoice->sTotal(),$invoice->getProductItems(), - (is_null($invoice->getRecordAttr('id'))), - in_array(2,$invoice->getProductItemTypes()),in_array(1,$invoice->getProductItemTypes())); - if ($checkout_options) { - foreach ($checkout_options as $a) { - if ($a['fields']['id'] == $invoice->getRecordAttr('checkout_plugin_id')) { - # Load the selected checkout plugin and run pre-validation - $checkout_plugin = $a['fields']['checkout_plugin']; - include_once(sprintf('%scheckout/%s.php',PATH_PLUGINS,$checkout_plugin)); - eval (sprintf('$PLG = new plg_chout_%s("%s");',$checkout_plugin,$invoice->getRecordAttr('checkout_plugin_id'))); - - $plugin_validate = $PLG->validate($VAR,$this); - if ($plugin_validate != true) { - echo $plugin_validate; - return false; - } - - $checkout=true; - break; - } - } - } - } - - # If we werent able to checkout, then return here - if (! $checkout) { - echo ''; - - return false; - } - - // validate credit card on file details - global $VAR; - if (! empty($VAR['account_billing_id']) && @$VAR['new_card']==2) { - $invoice->setRecordAttr('account_billing_id',$VAR['account_billing_id']); - /* validate credit card on file details */ - if(!$PLG->setBillingFromDB($this->account_id,$VAR['account_billing_id'],$invoice->checkout_plugin_id)) { - global $C_debug; - $C_debug->alert("Sorry, we cannot use that billing record for this purchase."); - return false; - } - - } else { - /* use passed in vars */ - $PLG->setBillingFromParams($VAR); - } - - // validate recurring processing options - if ($PLG->recurr_only) { - if ($invoice->recur_amt<=0) { - echo ' '; - return false; - } - - if(is_array($invoice->recur_arr) && count($invoice->recur_arr)>1) { - $recurring = true; - // validate recur day and recurring schedule are the same for both products - foreach($invoice->recur_arr as $a) { - foreach($invoice->recur_arr as $b) { - foreach($b as $key=>$val) { - if($key != 'price' && $key != 'recurr_week' && $a[$key] != $val) { - $recurring=false; - break; - } - } - } - } - if (!$recurring) { - echo ' '; - return false; - } - } - } - - # Load account object - include_once(PATH_MODULES.'account/account.inc.php'); - $ao = new account($this->account_id); - - # Affiliate - if (is_null($invoice->getRecordAttr('affiliate_id'))) - $invoice->setRecordAttr('affiliate_id', - (! is_null($ao->getRecordAttr('affiliate_id'))) ? $ao->getRecordAttr('affiliate_id') : SESS_AFFILIATE); - - # Campaign - if (is_null($invoice->getRecordAttr('campaign_id'))) - $invoice->setRecordAttr('campaign_id', - (! is_null($ao->getRecordAttr('campaign_id'))) ? $ao->getRecordAttr('campaign_id') : SESS_CAMPAIGN); - - $invoice->setRecordAttr('actual_billed_currency_id',SESS_CURRENCY); - $invoice->setRecordAttr('billed_currency_id',DEFAULT_CURRENCY); - $invoice->checkout_type = $PLG->type; - $invoice->setRecordAttr('id',sqlGenID($db,'invoice')); - - # Initial invoice status - if ($invoice->sTotal() == 0 || $PLG->type == 'gateway') { - $invoice->setRecordAttr('billing_status',1); - $invoice->actual_billed_amt = $C_list->format_currency_decimal($invoice->sTotal(),SESS_CURRENCY); - $invoice->billed_amt = $invoice->sTotal(); - } - - # Currency conversion - if (SESS_CURRENCY != DEFAULT_CURRENCY) { - $bill_amt = $C_list->format_currency_decimal($invoice->sTotal(),SESS_CURRENCY); - $recur_amt = is_null($invoice->sRecurAmt()) ? null : $C_list->format_currency_decimal($invoice->sRecurAmt(),SESS_CURRENCY); - } else { - $bill_amt = round($invoice->sTotal(),2); - $recur_amt = is_null($invoice->sRecurAmt()) ? null : round($invoice->sRecurAmt(),2); - } - - # Get currency ISO (three_digit) for checkout plugin - include_once(PATH_MODULES.'currency/currency.inc.php'); - $cuo = new currency(); - - $currencies = $cuo->sql_GetRecords(array('where'=>array('id'=>SESS_CURRENCY))); - if ($currencies) - $currency_iso = $currencies[0]['three_digit']; - else - $currency_iso = $C_list->currency_iso(SESS_CURRENCY); - - # Run the plugin bill_checkout() method: - $invoice->setRecordAttr('checkout_plugin_data', - $PLG->bill_checkout($bill_amt,$invoice->getRecordAttr('id'),$currency_iso,$ao->getRecord(),$recur_amt,$invoice->recur_arr)); - if ($invoice->getRecordAttr('checkout_plugin_data') === false || $invoice->getRecordAttr('checkout_plugin_data') == '' ) { - if (! empty($PLG->redirect)) - echo $PLG->redirect; - - return false; - - } elseif ($PLG->type == 'gateway' || empty($PLG->redirect)) { - $VAR['id'] = $invoice->getRecordAttr('id'); - if (! $this->admin_checkout) - $VAR['_page'] = 'invoice:thankyou'; - - $invoice->setRecordAttr('checkout_plugin_data',false); - - } elseif (! $this->admin_checkout) { - echo "
Please wait while we redirect you to the secure payment site.... {$PLG->redirect}
"; - } - - # Call the Plugin method for storing the checkout data: - $invoice->setRecordAttr('account_billing_id',$PLG->store_billing($VAR,$invoice->account_id)); - - # Clear user discounts - $db->Execute(sqlUpdate($db,'session',array('discounts'=>null),array('id'=>SESS))); - - # admin options - $email = true; - if ($this->admin_checkout) { - if (empty($VAR['send_email']) || $VAR['send_email']=='false') - $email=false; - else - $email=true; - - if (! empty($VAR['due_date'])) - $invoice->due_date=$this->getInputDate($VAR['due_date']); - - if (! empty($VAR['grace_period'])) - $invoice->grace_period=$VAR['grace_period']; - - if (! empty($VAR['notice_max'])) - $invoice->notice_max=$VAR['notice_max']; - } - - if ($invoice->sql_SaveRecord(true)) { - # Delete all cart items - $db->Execute(sqlDelete($db,'cart',sprintf('(session_id=::%s:: OR account_id=%s)',SESS,$invoice->getRecordAttr('account_id')))); - - # Admin redirect - if ($this->admin_checkout) - printf('',URL,$invoice->getRecordAttr('id')); - } - - return false; - } - - /** Convert a localized d,m,y string to epoch timestamp - */ - function getInputDate($date) { - - $Arr_format = explode(DEFAULT_DATE_DIVIDER, UNIX_DATE_FORMAT); - $Arr_date = explode(DEFAULT_DATE_DIVIDER, $date); - for($i=0; $i<3; $i++) - { - if($Arr_format[$i] == 'd') $day = $Arr_date[$i]; - if($Arr_format[$i] == 'm') $month = $Arr_date[$i]; - if($Arr_format[$i] == 'Y') $year = $Arr_date[$i]; - } - $timestamp = mktime(0, 0, 0, $month, $day, $year); - return $timestamp; - - return time(); - } - - /** - * Manage postback for multiple invoices - */ - function postback_multiple($arr) { - $db=&DB(); - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - $invoice=new invoice; - - // get multi-invoice details - $total = $invoice->multiple_invoice_total($arr['invoice_id']); - if(!$total) return false; - - $amt = $arr['amount']; - - foreach($invoice->invoice_id as $id) - { - if($amt > 0) - { - // get total due for this invoice: - $rs=sqlSelect($db, "invoice","SUM(total_amt-billed_amt-IFNULL(credit_amt,0)) as total","id=$id"); - if($rs && $rs->RecordCount()) { - $thisamt = $rs->fields["total"]; - - if($thisamt > $amt) - $arr['amount'] = $amt; - else - $arr['amount'] = $thisamt; - $arr["invoice_id"] = $id; - - $this->postback($arr); - $amt -= $thisamt; - } - } - } - } - - /** - * Postback Payment Processing - * This function will handle the postback processing from a payment processor - * - * @param array $arr Incoming payment information - * @uses invoice - * @uses invoice_item - */ - public function postback($arr) { - global $C_debug,$C_list; - - # Minimum incoming values to continue - if (empty($arr['invoice_id'])) - return false; - if (empty($arr['transaction_id'])) - return false; - if (empty($arr['amount'])) - return false; - - # Does this postback pay multiple invoices? - if (preg_match('/^MULTI-/',$arr['invoice_id'])) - return $this->postback_multiple($arr); - - $db = &DB(); - - include_once(PATH_MODULES.'invoice/invoice.inc.php'); - $io = new invoice(); - - # Get the latest invoice information - $invoices = $io->sql_GetRecords(array( - 'where'=>sprintf('(parent_id=%s OR id=%s%s)',$arr['invoice_id'],$arr['invoice_id'], - (! empty($arr['subscription_id']) && trim($arr['subscription_id'])) ? sprintf(' OR checkout_plugin_data=%s',trim($arr['subscription_id'])) : ''), - 'limit'=>'0,1')); - - if (! count($invoices)) { - $C_debug->error(__FILE__,__METHOD__,sprintf('No invoice records, unable to process payment for: %s',$arr['invoice_id'])); - - return false; - } - - # Get our invoice object, that this payment is for. - $invoice = array_pop($invoices); - - # If we are not passed a currency, we can only assume it is the same as that used to bill the invoice. - if (! isset($arr['currency']) || ! trim($arr['currency'])) { - $this->billed_amt = $arr['amount']+$invoice['billed_amt']; - $this->actual_billed_amt = $arr['amount']+$invoice['billed_amt']; - $this->actual_billed_currency_id = $invoice['billed_currency_id']; - - } else { - # Get the actual billed currency id currency info - $rs = $db->Execute(sqlSelect('currency','*',array('where'=>array('three_digit'=>$arr['currency'])))); - - if (! $rs) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - # No currency information, assume the currency of the invoice - elseif (! $rs->RecordCount()) { - $C_debug->error(__FILE__,__METHOD__,sprintf('No currency: %s?',$arr['currency'])); - - $this->billed_amt = $arr['amount']+$invoice['billed_amt']; - $this->actual_billed_amt = $arr['amount']+$invoice['billed_amt']; - $this->actual_billed_currency_id = $invoice['billed_currency_id']; - - } else { - $this->actual_billed_currency_id = $rs->fields['id']; - - if (is_string($rs->fields['convert_array'])) - $convert = unserialize($rs->fields['convert_array']); - else - $convert = false; - - $this->format_currency[$this->actual_billed_currency_id] = array( - 'symbol'=>$rs->fields['symbol'], - 'convert'=>$convert, - 'iso'=>$rs->fields['three_digit']); - - # Get the billed currency id currency info: - $rs = $db->Execute(sqlSelect('currency','*',array('where'=>array('id'=>$invoice['billed_currency_id'])))); - - if (! $rs) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - $this->format_currency[$invoice['billed_currency_id']] = array( - 'symbol'=>$rs->fields['symbol'], - 'convert'=>unserialize($rs->fields['convert_array']), - 'iso'=>$rs->fields['three_digit']); - - # Convert the invoice amount to the actual billed currency amount - $conversion = $this->format_currency[$invoice['billed_currency_id']]['convert'][$this->actual_billed_currency_id]['rate']; - - $this->billed_amt = $invoice['billed_amt']+($arr['amount']/$conversion); - $this->actual_billed_amt = $invoice['actual_billed_amt']+$arr['amount']; - } - } - - # Check for any subscription_id - if (! empty($arr['subscription_id'])) - $this->subscription_id = trim($arr['subscription_id']); - else - $this->subscription_id = trim($invoice['checkout_plugin_data']); - - $this->checkout_id = $this->getRecordAttr('id'); - - # Check for the billing status: - if ($this->billed_amt >= $invoice['total_amt']) - $this->billing_status = '1'; - else - $this->billing_status = '0'; - - # Check if this transaction_id has already been processed: - $rs = $db->Execute( - sqlSelect('invoice_memo','id', - array('where'=>array('invoice_id'=>$invoice['id'],'type'=>'postback','memo'=>sprintf('%s-%s',$this->getRecordAttr('id'),$arr['transaction_id']))))); - - if (! $rs) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - # Transaction ID already exists - elseif ($rs->RecordCount()) { - # Duplicate post: - $C_debug->error(__FILE__,__METHOD__, - sprintf('Duplicate postback for invoice %s & transaction id %s-%s',$arr['invoice_id'],$this->getRecordAttr('id'),$arr['transaction_id'])); - - # Record new transaction ID - } else { - # Create the invoice memo - # @todo should get the account_id - $rs = $db->Execute( - sqlInsert($db,'invoice_memo', - array('date_orig'=>time(),'invoice_id'=>$invoice['id'],'account_id'=>null, - 'type'=>'postback','memo'=>sprintf('%s-%s',$this->getRecordAttr('id'),$arr['transaction_id'])))); - - if (! $rs) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - $io = new invoice($invoice['id']); - - # Update the invoice approval status - if (! isset($arr['status']) || ! $arr['status']) { - $rs = $db->Execute( - sqlInsert($db,'invoice_memo', - array('date_orig'=>time(),'invoice_id'=>$invoice['id'], - 'account_id'=>null,'type'=>'void','memo'=>sprintf('%s: %s-%s',_('Voided due to postback'),$this->getRecordAttr('id'),$arr['transaction_id'])))); - - if (! $rs) - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - # Void - $io->voidInvoice(array('id'=>$invoice['id'])); - - } else { - # Check the items, see if there is a payment fee to add to the invoice - if (isset($arr['items']) && is_array($arr['items'])) { - include_once(PATH_MODULES.'invoice_item/invoice_item.inc.php'); - - foreach ($arr['items'] as $k => $v) { - if (isset($v['item_number']) && $v['item_number'] == 'PAYFEE') { - $ito = new invoice_item(); - - $ito->setRecordAttr('invoice_id',$invoice['id']); - $ito->setRecordAttr('account_id',0); - $ito->setRecordAttr('service_id',null); - $ito->setRecordAttr('charge_id',null); - $ito->setRecordAttr('product_name',sprintf('Payment Fee: %s',$this->getRecordAttr('name'))); - $ito->setRecordAttr('product_id',null); - $ito->setRecordAttr('product_attr',null); - $ito->setRecordAttr('product_attr_cart',null); - $ito->setRecordAttr('sku','PAYFEE'); - $ito->setRecordAttr('quantity',1); - $ito->setRecordAttr('item_type',0); - $ito->setRecordAttr('price_setup',0); - $ito->setRecordAttr('domain_name',null); - $ito->setRecordAttr('domain_tld',null); - $ito->setRecordAttr('domain_type',null); - $ito->setRecordAttr('domain_term',null); - $ito->setRecordAttr('price_type',null); - $ito->setRecordAttr('recurring_schedule',null); - $ito->setRecordAttr('date_start',null); - $ito->setRecordAttr('date_stop',null); - $ito->setRecordAttr('price_base',$v['mc_gross_']); - # @todo need to retro work out the tax amount. - $ito->setRecordAttr('tax_amt',0); - $item = $ito->sql_SaveRecord(); - - $io->setRecordAttr('total_amt',$io->getRecordAttr('total_amt')+$ito->getRecordAttr('total_amt')); - $io->setRecordAttr('tax_amt',$io->getRecordAttr('tax_amt')+$ito->getRecordAttr('tax_amt')); - } - } - } - - $io->setRecordAttr('billing_status',$this->billing_status); - $io->setRecordAttr('checkout_plugin_id',$this->getRecordAttr('id')); - $io->setRecordAttr('checkout_plugin_data',$this->subscription_id); - $io->setRecordAttr('billed_amt',$this->billed_amt); - $io->setRecordAttr('actual_billed_amt',$this->actual_billed_amt); - $io->setRecordAttr('actual_billed_currency_id',$this->actual_billed_currency_id); - $rs = $io->sql_SaveRecord(); - - # If the payment module is installed, record the payment item. - if ($C_list->is_installed('payment')) { - include_once(PATH_MODULES.'payment/payment.inc.php'); - include_once(PATH_MODULES.'payment_item/payment_item.inc.php'); - - $po = new payment(); - - $po->setRecordAttr('account_id',$io->getRecordAttr('account_id')); - $po->setRecordAttr('date_payment',time()); - $po->setRecordAttr('checkout_plugin_id',$this->getRecordAttr('id')); - $po->setRecordAttr('total_amt',$arr['amount']); - $po->setRecordAttr('fees_amt',(isset($arr['fee']) ? $arr['fee'] : 0)); - $po->setRecordAttr('notes',print_r($_POST,true)); - $po->setRecordAttr('source_id',$io->getRecordAttr('account_id')); - $pid = $po->sql_SaveRecord(true); - $po->sql_LoadRecord($pid); - - # Mark this payment pending - # @todo Make this a global configuration option to auto mark payments as pending, so they can be reviewed. - $po->setRecordAttr('pending_status',1); - $po->sql_SaveRecord(); - - $pio = new payment_item(); - - $pio->setRecordAttr('payment_id',$pid); - $pio->setRecordAttr('invoice_id',$io->getRecordAttr('id')); - $pio->setRecordAttr('alloc_amt',$arr['amount']); - $pio->sql_SaveRecord(); - } - - # Approve - $io->autoApproveInvoice($invoice['id']); - - # User invoice payment confirmation - include_once(PATH_MODULES.'email_template/email_template.inc.php'); - $email = new email_template; - $email->send('invoice_paid_user',$invoice['account_id'],$invoice['id'],DEFAULT_CURRENCY,''); - - # Admin alert of payment processed - $email = new email_template; - $email->send('admin->invoice_paid_admin',$invoice['account_id'],$invoice['id'],DEFAULT_CURRENCY,''); - } - } - - return true; - } - - /** - * Display Checkout Data Form - */ - function checkoutoption($VAR) { - global $VAR,$C_translate,$C_auth,$C_vars,$smarty; - - if (SESS_LOGGED != '1') { - $smarty->assign('plugin_template',false); - return false; - } - - # Normal checkout - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'checkout','*',array('id'=>$VAR['option']))); - if (! $rs || $rs->RecordCount() == 0) { - $smarty->assign('plugin_template',false); - return false; - } - - # Determine account id - if (! empty($VAR['account_id']) && $C_auth->auth_method_by_name('checkout','admin_checkoutnow')) { - $this->account_id = $VAR['account_id']; - $this->admin_view = true; - } else { - $this->account_id=SESS_ACCOUNT; - } - - # Set account options && seed VAR with defaults - if (empty($VAR['detailsnocopy'])) { - $acct = $db->Execute(sqlSelect($db,'account','first_name,last_name,address1,address2,city,state,zip,country_id,email,company',array('id'=>$this->account_id))); - - if ($acct && $acct->RecordCount()) - foreach ($acct->fields as $key=>$val) - if(!is_numeric($key) && empty($VAR[$key])) - $VAR[$key]=stripslashes($acct->fields[$key]); - } - - $C_vars->strip_slashes_all(); - $smarty->assign('VAR',$VAR); - $smarty->assign('plugin_template','checkout_plugin:plugin_ord_'.$rs->fields['checkout_plugin']); - } - - public function tpl_get_plugindata($VAR) { - global $smarty; - - # Normal checkout - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'checkout','plugin_data',array('id'=>$VAR['checkout_id']))); - if ($rs || $rs->RecordCount() == 1) - $smarty->assign('plugin_data',$rs->fields['plugin_data']); - } -} -?> diff --git a/modules/checkout/checkout_admin.inc.php b/modules/checkout/checkout_admin.inc.php deleted file mode 100644 index c9fa32dd..00000000 --- a/modules/checkout/checkout_admin.inc.php +++ /dev/null @@ -1,64 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -include_once(PATH_MODULES.'checkout/base_checkout_plugin.class.php'); - -class checkout_admin extends base_checkout_plugin - -{ - # Get the config values for this checkout plugin: - function checkout_admin($checkout_id=false) { - - $this->name = 'NONE'; - $this->type = 'redirect'; - $this->recurr_only = false; - } - - # Validate the user submitted billing details at checkout: - function validate($VAR) { - return true; - } - - # Perform the checkout transaction (new purchase): - function bill_checkout( $amount, $invoice, $currency_iso, $acct_fields, $total_recurring=false, $recurr_bill_arr=false) { - return true; - } - - # Stores new billing details, & return account_billing_id (gateway only) - function store_billing($VAR) { - return 0; - } - - # Perform a transaction for an (new invoice): - function bill_invoice($VAR) { - return true; - } - - # Issue a refund for a paid invoice (captured charges w/gateway) - function refund($VAR) { - return true; - } - - # Void a authorized charge (gateways only) - function void($VAR) { - return true; - } -} -?> \ No newline at end of file diff --git a/modules/checkout/checkout_construct.xml b/modules/checkout/checkout_construct.xml deleted file mode 100644 index f5bb2386..00000000 --- a/modules/checkout/checkout_construct.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - checkout - - checkout
- - - - 15 - - name - - 25 - - 1 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - Active - L - - - C(32) - 1 - 32 - any - - - C(255) - - - C(32) - any - - - X2 - array - 1 - - - L - - - L - - - L - - - F - - - F - - - I4 - - - L - - - L - - - X2 - array - 1 - - - X2 - array - 1 - - - F - - - X2 - array - 1 - - - X2 - array - 1 - - - X2 - array - 1 - - - X2 - array - 1 - - - F - - - X2 - array - 1 - any - - - X2 - - - X2 - array - 1 - - - X2 - array - 1 - - - C(128) - - - - - - name,description,active,checkout_plugin,allow_recurring,allow_new,allow_trial,total_minimum,total_maximum,max_decline_attempts,manual_approval_all,manual_approval_recur,manual_approval_amount,default_when_amount,allowed_currencies,email_template,required_groups,graphic_url - id - id,name,description,active,checkout_plugin,plugin_data,allow_recurring,allow_new,allow_trial,total_minimum,total_maximum,max_decline_attempts,manual_approval_all,manual_approval_recur,manual_approval_country,manual_approval_group,manual_approval_amount,manual_approval_currency,default_when_currency,default_when_country,default_when_group,default_when_amount,allowed_currencies,email_template,excluded_products,required_groups - id,name,description,active,checkout_plugin,plugin_data,allow_recurring,allow_new,allow_trial,total_minimum,total_maximum,max_decline_attempts,manual_approval_all,manual_approval_recur,manual_approval_country,manual_approval_group,manual_approval_amount,manual_approval_currency,default_when_currency,default_when_country,default_when_group,default_when_amount,allowed_currencies,email_template,excluded_products,required_groups,graphic_url - id,name,description,active,checkout_plugin,plugin_data,allow_recurring,allow_new,allow_trial,total_minimum,total_maximum,max_decline_attempts,manual_approval_all,manual_approval_recur,manual_approval_country,manual_approval_group,manual_approval_amount,manual_approval_currency,default_when_currency,default_when_country,default_when_group,default_when_amount,allowed_currencies,email_template,excluded_products,required_groups,graphic_url - - - - - - - - - - - - - id - checkbox - 25px - - - name - - - checkout_plugin - - - active - bool_icon - 20px - - - -
diff --git a/modules/checkout/checkout_install.xml b/modules/checkout/checkout_install.xml deleted file mode 100644 index 3daa48bb..00000000 --- a/modules/checkout/checkout_install.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - Checkout - - 1 - - checkout - - - - setup - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - admin_checkoutnow - - - admin_adddiscount - - - admin_preview - - - diff --git a/modules/checkout/checkout_install_data.xml b/modules/checkout/checkout_install_data.xml deleted file mode 100644 index 8a973166..00000000 --- a/modules/checkout/checkout_install_data.xml +++ /dev/null @@ -1,981 +0,0 @@ - - - - 1 - 1 - Free Order Processing - There are no charges associated with this purchase, so no billing details are required to complete your order. - 1 - FREE - - 1 - 1 - 1 - 0 - 0 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 2 - 1 - Direct Debit - Pay by automatic bank direct debit. - 1 - DIRECT_DEBIT - - 1 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 3 - 1 - PayPal (Subscription) - This payment option will create a subscription in your PayPal account so you will be billed automatically for any recurring charges. - 0 - PAYPAL_RECURRING - - 1 - 0 - 0 - 0.01 - 10000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 6 - 1 - PayPal - Pay with your PayPal.com account and gain instant access to your order online. - 0 - PAYPAL - - 0 - 1 - 1 - 0.01 - 10000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 7 - 1 - 2Checkout.com - Pay at 2Checkout.com with your credit card. - 0 - 2CHECKOUT - - 1 - 1 - 1 - 0.01 - 10000 - 0 - 1 - - - 0 - - - - - 0 - - You have ordered via 2checkout.com, which may take up to 24 hours to complete their fraud tests. Once this process is complete, you will be contacted with instructions. - - - 8 - 1 - Nochex - Pay with your Nochex.com account. - 0 - NOCHEXS - - 1 - 1 - 1 - 0.01 - 10000 - 0 - 1 - - - 0 - - - - - 0 - - - - 9 - 1 - NetPayments - Pay at the NetPayments.com secure site. - 0 - NETPAYMENTS - - 1 - 1 - 1 - 0.01 - 10000 - 0 - 1 - 0 - - - 0 - - - - - 0 - - - - - - 10 - 1 - Worldpay - Pay at the secure WorldPay.com site... - 0 - WORLDPAY - - 0 - 1 - 1 - 0.01 - 10000 - 0 - 1 - 0 - - - 0 - - - - - 0 - - - - - - 15 - 1 - MoneyBookers - Pay with your MoneyBookers account. - 0 - MONEYBOOKERS - - 1 - 1 - 1 - 0.01 - 100000 - 0 - 1 - 0 - - - 0 - - - - - 0 - - - - - - 16 - 1 - MoneyBookers (subscription) - Pay with MoneyBookers and create and automatic subscription for future charges. - 0 - MONEYBOOKERS_RECURRING - - 1 - 0 - 0 - 0.1 - 100000 - 0 - 1 - 0 - - - 0 - - - - - 0 - - - - 17 - 1 - StormPay - Pay with your StormPay account - 0 - STORMPAY - - 0 - 1 - 1 - 0.01 - 100000 - 0 - 1 - 0 - - - 0 - - - - - 0 - - - - - - 19 - 1 - StormPay (subscription) - Pay with your StormPay account. - 0 - STORMPAY_RECURRING - - 1 - 0 - 0 - 0.01 - 100000 - 0 - 1 - 0 - - - 0 - - - - - 0 - - - - 23 - 1 - Manual Card - Collect cards to charge manually later - 1 - MANUAL - - 1 - 1 - 1 - 0 - 100000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - Your credit card details have been stored for manual review and verification of funds. Once we have reviewed and successfully debited the credit card, we will update the invoice status. In the meanwhile, your invoice will be displayed as due, so you can ignore this unless we contact you stating otherwise. - - - - - 27 - 1 - Paysystems Pro - Paysystems TTP Pro - 0 - PAYSYSTEMS_PRO - - 0 - 1 - 1 - 0.01 - 100000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - 28 - 1 - Paysystems Recurring - Pay for this recurring transaction at Paysystems.com with a credit card - 0 - PAYSYSTEMS_RECURRING - - 1 - 0 - 0 - 0.01 - 100000 - 0 - 0 - - - 0 - - - - - 0 - - - - 29 - 1 - Paysystems Check - Pay with an e-check at paystems.com - 0 - PAYSYSTEMS_CHECK - - 0 - 1 - 1 - 0.01 - 100000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 31 - 1 - Paysystems Check Recur - Create a recurring e-check at paysystems.com - 0 - PAYSYSTEMS_CHECK_RECUR - - 1 - 0 - 0 - 0.01 - 100000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 32 - 1 - WorldPay Futurepay - Create a recurring subscription at WorldPay.com - 0 - WORLDPAY_FUTUREPAY - - 1 - 0 - 0 - 0.01 - 100000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 33 - 1 - Remit Bank Wire - Remit a bank wire for this invoice - 0 - REMIT_BANK_WIRE - - 1 - 1 - 0 - 0.01 - 1000000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 34 - 1 - Remit Check - Remit a company or certified check for this invoice - 0 - REMIT_CHECK - - 1 - 1 - 0 - 10 - 1000000000 - 0 - 0 - - - 0 - - - - - 0 - - - - 35 - 1 - Authorize.net - Pay with your credit card through our realtime connection with authorize.net - 0 - AUTHORIZE_NET - - 1 - 1 - 1 - 0 - 100000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 36 - 1 - SWREG - Pay with your credit card at SWREG. - 0 - SWREG_ADVANCED - - 1 - 1 - 1 - 0.01 - 10000000 - 0 - 0 - - - 0 - - - - - 0 - - - - - 37 - 1 - Eway - Pay with a credit card at Eway.com.au - 0 - EWAY - - 1 - 1 - 1 - 0.01 - 10000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 39 - 1 - PaySwiss - Payswiss payment option - 0 - PAYSWISS - - 0 - 1 - 1 - 0.01 - 10000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - 40 - 1 - PaySwiss (recurring) - Setup a subscript at payswiss.com - 0 - PAYSWISS_RECURRING - - 1 - 0 - 0 - 0.01 - 10000 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - 41 - 1 - TrustCommerce - tc - 0 - TRUSTCOMMERCE - - 1 - 1 - 1 - 0.01 - 99999999999 - 0 - 0 - 0 - 0 - 0 - - - - 42 - 1 - EFTSecure - EFTSecure - 0 - EFT_SECURE - - 1 - 1 - 1 - 0.01 - 99999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 43 - 1 - USA ePAY - USA ePAY - 0 - USA_EPAY - - 1 - 1 - 1 - 1 - 9999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 45 - 1 - PAYMATE - PAYMATE.com - 0 - PAYMATE - - 1 - 1 - 1 - 0.01 - 99999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 46 - 1 - Internetsecure - InternetSecure - 0 - INTERNETSECURE - - 1 - 1 - 1 - 5 - 9999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 47 - 1 - Verisign - 0 - VERISIGN_PFPRO - 0 - 0 - 0 - 0 - 9 - 0 - 0 - 0 - 0 - 0 - - - - - 48 - 1 - CommercePayment.com - CommercePayment.com - 0 - COMMERCEPAYMENTWINDOW - - 1 - 1 - 1 - 0.01 - 9999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 49 - 1 - OptimalPayments - OptimalPayments - 0 - OPTIMALPAYMENTS - - 1 - 1 - 1 - 0.01 - 9999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 50 - 1 - SkipJack - Cards... - 0 - SKIPJACK - - 1 - 1 - 1 - 0.01 - 999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 51 - 1 - PayFuse - Checkout with creditcard - 0 - PAYFUSE - - 1 - 1 - 1 - 0.01 - 99999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 52 - 1 - Protx - Protx - 1 - PROTX - - 1 - 1 - 1 - 0.01 - 999999 - 0 - 0 - 0 - - - 0 - - - - - 0 - - - - - - 52 - - diff --git a/modules/core/static_var.inc.php b/modules/core/static_var.inc.php index 07cc9a09..2fe5ef46 100644 --- a/modules/core/static_var.inc.php +++ b/modules/core/static_var.inc.php @@ -441,6 +441,7 @@ class CORE_static_var $module_id = $result->fields['id']; +return false; #################################################################### ### Get all the associated STATIC RELATION records diff --git a/modules/country/country.inc.php b/modules/country/country.inc.php deleted file mode 100644 index f5af3d4e..00000000 --- a/modules/country/country.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Country - */ - -/** - * The main AgileBill CountryClass - * - * @package AgileBill - * @subpackage Module:Country - */ -class country extends OSB_module { -} -?> diff --git a/modules/country/country_construct.xml b/modules/country/country_construct.xml deleted file mode 100644 index 203e249d..00000000 --- a/modules/country/country_construct.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - country - - country
- - - - 0 - - name - - 25 - - 0 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - Name - C(128) - 1 - 128 - any - 1 - - - Description - C2(128) - - - Notes - C2(128) - - - TWO Letter Code - C(16) - 2 - 2 - any - 1 - - - THREE Letter Code - C(16) - 3 - 3 - any - 1 - - - - - - name,description,notes,two_code,three_code - id,site_id,name,description,notes,two_code,three_code - id,site_id,name,description,notes,two_code,three_code - id,site_id,name,description,notes,two_code,three_code - id,site_id,name,description,notes,two_code,three_code - id,site_id,name,description,notes,two_code,three_code - - - - - - - - <add>Add Country</add> - - - - - - - id - checkbox - 25px - - - name - - - two_code - - - three_code - - - -
diff --git a/modules/country/country_install.xml b/modules/country/country_install.xml deleted file mode 100644 index 82577b1b..00000000 --- a/modules/country/country_install.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - Country - - 1 - - country - - - - setup - - base - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/country/country_install_data.xml b/modules/country/country_install_data.xml deleted file mode 100644 index 1c059d9d..00000000 --- a/modules/country/country_install_data.xml +++ /dev/null @@ -1,1682 +0,0 @@ - - - - 8 - 1 - Albania - AL - ALB - - - 10 - 1 - Antarctica - AQ - ATA - - - 12 - 1 - Algeria - DZ - DZA - - - 16 - 1 - American Samoa - AS - ASM - - - 20 - 1 - Andorra - AD - AND - - - 24 - 1 - Angola - AO - AGO - - - 28 - 1 - Antigua And Barbuda - AG - ATG - - - 31 - 1 - Azerbaijan - AZ - AZE - - - 32 - 1 - Argentina - AR - ARG - - - 61 - 1 - Australia - AU - AUS - - - 40 - 1 - Austria - AT - AUT - - - 44 - 1 - Bahamas - BS - BHS - - - 48 - 1 - Bahrain - BH - BHR - - - 50 - 1 - Bangladesh - BD - BGD - - - 51 - 1 - Armenia - AM - ARM - - - 52 - 1 - Barbados - BB - BRB - - - 56 - 1 - Belgium - BE - BEL - - - 60 - 1 - Bermuda - BM - BMU - - - 554 - 1 - Bhutan - BT - BTN - - - 68 - 1 - Bolivia - BO - BOL - - - 70 - 1 - Bosnia And Herzegowina - BA - BIH - - - 72 - 1 - Botswana - BW - BWA - - - 74 - 1 - Bouvet Island - BV - BVT - - - 76 - 1 - Brazil - BR - BRA - - - 84 - 1 - Belize - BZ - BLZ - - - 86 - 1 - British Indian Ocean Territory - IO - IOT - - - 90 - 1 - Solomon Islands - SB - SLB - - - 92 - 1 - Virgin Islands (british) - VG - VGB - - - 96 - 1 - Brunei Darussalam - BN - BRN - - - 100 - 1 - Bulgaria - BG - BGR - - - 104 - 1 - Myanmar - MM - MMR - - - 108 - 1 - Burundi - BI - BDI - - - 112 - 1 - Belarus - BY - BLR - - - 116 - 1 - Cambodia - KH - KHM - - - 120 - 1 - Cameroon - CM - CMR - - - 124 - 1 - Canada - CA - CAN - - - 132 - 1 - Cape Verde - CV - CPV - - - 136 - 1 - Cayman Islands - KY - CYM - - - 140 - 1 - Central African Republic - CF - CAF - - - 144 - 1 - Sri Lanka - LK - LKA - - - 148 - 1 - Chad - TD - TCD - - - 152 - 1 - Chile - CL - CHL - - - 156 - 1 - China - CN - CHN - - - 158 - 1 - Taiwan, Province Of China - TW - TWN - - - 162 - 1 - Christmas Island - CX - CXR - - - 166 - 1 - Cocos Islands - CC - CCK - - - 170 - 1 - Colombia - CO - COL - - - 174 - 1 - Comoros - KM - COM - - - 175 - 1 - Mayotte - YT - MYT - - - 178 - 1 - Congo - CG - COG - - - 180 - 1 - Congo, Democratic Republic Of - CD - COD - - - 184 - 1 - Cook Islands - CK - COK - - - 188 - 1 - Costa Rica - CR - CRI - - - 191 - 1 - Croatia - HR - HRV - - - 192 - 1 - Cuba - CU - CUB - - - 196 - 1 - Cyprus - CY - CYP - - - 203 - 1 - Czech Republic - CZ - CZE - - - 204 - 1 - Benin - BJ - BEN - - - 208 - 1 - Denmark - DK - DNK - - - 212 - 1 - Dominica - DM - DMA - - - 214 - 1 - Dominican Republic - DO - DOM - - - 218 - 1 - Ecuador - EC - ECU - - - 222 - 1 - El Salvador - SV - SLV - - - 226 - 1 - Equatorial Guinea - GQ - GNQ - - - 231 - 1 - Ethiopia - ET - ETH - - - 232 - 1 - Eritrea - ER - ERI - - - 233 - 1 - Estonia - EE - EST - - - 234 - 1 - Faroe Islands - FO - FRO - - - 238 - 1 - Falkland Islands - FK - FLK - - - 239 - 1 - - GS - SGS - - - 242 - 1 - Fiji - FJ - FJI - - - 246 - 1 - Finland - FI - FIN - - - 249 - 1 - France, Metropolitan - FX - FXX - - - 250 - 1 - France - FR - FRA - - - 254 - 1 - French Guiana - GF - GUF - - - 258 - 1 - French Polynesia - PF - PYF - - - 260 - 1 - French Southern Territories - TF - ATF - - - 262 - 1 - Djibouti - DJ - DJI - - - 266 - 1 - Gabon - GA - GAB - - - 268 - 1 - Georgia - GE - GEO - - - 270 - 1 - Gambia - GM - GMB - - - 275 - 1 - Palestinian Territory - P - - - 276 - 1 - Germany - DE - DEU - - - 288 - 1 - Ghana - GH - GHA - - - 292 - 1 - Gibraltar - GI - GIB - - - 296 - 1 - Kiribati - KI - KIR - - - 300 - 1 - Greece - GR - GRC - - - 304 - 1 - Greenland - GL - GRL - - - 308 - 1 - Grenada - GD - GRD - - - 312 - 1 - Guadeloupe - GP - GLP - - - 316 - 1 - Guam - GU - GUM - - - 320 - 1 - Guatemala - GT - GTM - - - 324 - 1 - Guinea - GN - GIN - - - 328 - 1 - Guyana - GY - GUY - - - 332 - 1 - Haiti - HT - HTI - - - 334 - 1 - Heard And Mc Donald Islands - HM - HMD - - - 336 - 1 - Holy See (Vatican City State) - VA - VAT - - - 340 - 1 - Honduras - HN - HND - - - 344 - 1 - Hong Kong - HK - HKG - - - 348 - 1 - Hungary - HU - HUN - - - 352 - 1 - Iceland - IS - ISL - - - 356 - 1 - India - IN - IND - - - 360 - 1 - Indonesia - ID - IDN - - - 364 - 1 - Iran - IR - IRN - - - 368 - 1 - Iraq - IQ - IRQ - - - 372 - 1 - Ireland - IE - IRL - - - 376 - 1 - Israel - IL - ISR - - - 380 - 1 - Italy - IT - ITA - - - 384 - 1 - - CI - CIV - - - 388 - 1 - Jamaica - JM - JAM - - - 392 - 1 - Japan - JP - JPN - - - 398 - 1 - Kazakhstan - KZ - KAZ - - - 400 - 1 - Jordan - JO - JOR - - - 404 - 1 - Kenya - KE - KEN - - - 408 - 1 - - KP - PRK - - - 410 - 1 - Korea, Republic Of - KR - KOR - - - 414 - 1 - Kuwait - KW - KWT - - - 417 - 1 - Kyrgyzstan - KG - KGZ - - - 418 - 1 - - LA - LAO - - - 422 - 1 - Lebanon - LB - LBN - - - 426 - 1 - Lesotho - LS - LSO - - - 428 - 1 - Latvia - LV - LVA - - - 430 - 1 - Liberia - LR - LBR - - - 434 - 1 - Libyan Arab Jamahiriya - LY - LBY - - - 438 - 1 - Liechtenstein - LI - LIE - - - 440 - 1 - Lithuania - LT - LTU - - - 442 - 1 - Luxembourg - LU - LUX - - - 446 - 1 - Macau - MO - MAC - - - 450 - 1 - Madagascar - MG - MDG - - - 454 - 1 - Malawi - MW - MWI - - - 458 - 1 - Malaysia - MY - MYS - - - 462 - 1 - Maldives - MV - MDV - - - 466 - 1 - Mali - ML - MLI - - - 470 - 1 - Malta - MT - MLT - - - 474 - 1 - Martinique - MQ - MTQ - - - 478 - 1 - Mauritania - MR - MRT - - - 480 - 1 - Mauritius - MU - MUS - - - 484 - 1 - Mexico - MX - MEX - - - 492 - 1 - Monaco - MC - MCO - - - 496 - 1 - Mongolia - MN - MNG - - - 498 - 1 - Moldova, Republic Of - MD - MDA - - - 500 - 1 - Montserrat - MS - MSR - - - 504 - 1 - Morocco - MA - MAR - - - 508 - 1 - Mozambique - MZ - MOZ - - - 512 - 1 - Oman - OM - OMN - - - 516 - 1 - Namibia - NA - NAM - - - 520 - 1 - Nauru - NR - NRU - - - 524 - 1 - Nepal - NP - NPL - - - 528 - 1 - Netherlands - NL - NLD - - - 530 - 1 - Netherlands Antilles - AN - ANT - - - 533 - 1 - Aruba - AW - ABW - - - 540 - 1 - New Caledonia - NC - NCL - - - 548 - 1 - Vanuatu - VU - VUT - - - 64 - 1 - New Zealand - NZ - NZL - - - 558 - 1 - Nicaragua - NI - NIC - - - 562 - 1 - Niger - NE - NER - - - 566 - 1 - Nigeria - NG - NGA - - - 570 - 1 - Niue - NU - NIU - - - 574 - 1 - Norfolk Island - NF - NFK - - - 578 - 1 - Norway - NO - NOR - - - 580 - 1 - Northern Mariana Islands - MP - MNP - - - 581 - 1 - United States Outlying Islands - UM - UMI - - - 583 - 1 - Micronesia - FM - FSM - - - 584 - 1 - Marshall Islands - MH - MHL - - - 585 - 1 - Palau - PW - PLW - - - 586 - 1 - Pakistan - PK - PAK - - - 591 - 1 - Panama - PA - PAN - - - 598 - 1 - Papua New Guinea - PG - PNG - - - 600 - 1 - Paraguay - PY - PRY - - - 604 - 1 - Peru - PE - PER - - - 608 - 1 - Philippines - PH - PHL - - - 612 - 1 - Pitcairn - PN - PCN - - - 616 - 1 - Poland - PL - POL - - - 620 - 1 - Portugal - PT - PRT - - - 624 - 1 - Guinea-bissau - GW - GNB - - - 626 - 1 - East Timor - TP - TMP - - - 630 - 1 - Puerto Rico - PR - PRI - - - 634 - 1 - Qatar - QA - QAT - - - 638 - 1 - Reunion - RE - REU - - - 642 - 1 - Romania - RO - ROM - - - 643 - 1 - Russian Federation - RU - RUS - - - 646 - 1 - Rwanda - RW - RWA - - - 654 - 1 - St. Helena - SH - SHN - - - 659 - 1 - Saint Kitts And Nevis - KN - KNA - - - 660 - 1 - Anguilla - AI - AIA - - - 662 - 1 - Saint Lucia - LC - LCA - - - 666 - 1 - St. Pierre And Miquelon - PM - SPM - - - 670 - 1 - Saint Vincent / Grenadines - VC - VCT - - - 674 - 1 - San Marino - SM - SMR - - - 678 - 1 - Sao Tome And Principe - ST - STP - - - 682 - 1 - Saudi Arabia - SA - SAU - - - 686 - 1 - Senegal - SN - SEN - - - 690 - 1 - Seychelles - SC - SYC - - - 694 - 1 - Sierra Leone - SL - SLE - - - 702 - 1 - Singapore - SG - SGP - - - 703 - 1 - Slovakia (Slovak Republic) - SK - SVK - - - 704 - 1 - Viet Nam - VN - VNM - - - 705 - 1 - Slovenia - SI - SVN - - - 706 - 1 - Somalia - SO - SOM - - - 710 - 1 - South Africa - ZA - ZAF - - - 716 - 1 - Zimbabwe - ZW - ZWE - - - 724 - 1 - Spain - ES - ESP - - - 732 - 1 - Western Sahara - EH - ESH - - - 736 - 1 - Sudan - SD - SDN - - - 740 - 1 - Suriname - SR - SUR - - - 744 - 1 - Svalbard And Jan Mayen Islands - SJ - SJM - - - 748 - 1 - Swaziland - SZ - SWZ - - - 752 - 1 - Sweden - SE - SWE - - - 756 - 1 - Switzerland - CH - CHE - - - 760 - 1 - Syrian Arab Republic - SY - SYR - - - 762 - 1 - Tajikistan - TJ - TJK - - - 764 - 1 - Thailand - TH - THA - - - 768 - 1 - Togo - TG - TGO - - - 772 - 1 - Tokelau - TK - TKL - - - 776 - 1 - Tonga - TO - TON - - - 780 - 1 - Trinidad And Tobago - TT - TTO - - - 784 - 1 - United Arab Emirates - AE - ARE - - - 788 - 1 - Tunisia - TN - TUN - - - 792 - 1 - Turkey - TR - TUR - - - 795 - 1 - Turkmenistan - TM - TKM - - - 796 - 1 - Turks And Caicos Islands - TC - TCA - - - 798 - 1 - Tuvalu - TV - TUV - - - 800 - 1 - Uganda - UG - UGA - - - 804 - 1 - Ukraine - UA - UKR - - - 807 - 1 - Macedonia, Republic Of - MK - MKD - - - 818 - 1 - Egypt - EG - EGY - - - 826 - 1 - United Kingdom - GB - GBR - - - 834 - 1 - Tanzania, United Republic Of - TZ - TZA - - - 840 - 1 - United States - US - USA - - - 850 - 1 - Virgin Islands (U.S.) - VI - VIR - - - 854 - 1 - Burkina Faso - BF - BFA - - - 858 - 1 - Uruguay - UY - URY - - - 860 - 1 - Uzbekistan - UZ - UZB - - - 862 - 1 - Venezuela - VE - VEN - - - 876 - 1 - Wallis And Futuna Islands - WF - WLF - - - 882 - 1 - Samoa - WS - WSM - - - 887 - 1 - Yemen - YE - YEM - - - 891 - 1 - Yugoslavia - YU - YUG - - - 894 - 1 - Zambia - ZM - ZMB - - - - 7 - - - 1000 - - diff --git a/modules/country/media/img/country/AU.gif b/modules/country/media/img/country/AU.gif deleted file mode 100644 index 1ad3d030..00000000 Binary files a/modules/country/media/img/country/AU.gif and /dev/null differ diff --git a/modules/country/media/img/country/CA.gif b/modules/country/media/img/country/CA.gif deleted file mode 100644 index 999a9347..00000000 Binary files a/modules/country/media/img/country/CA.gif and /dev/null differ diff --git a/modules/country/media/img/country/CH.gif b/modules/country/media/img/country/CH.gif deleted file mode 100644 index e0433b91..00000000 Binary files a/modules/country/media/img/country/CH.gif and /dev/null differ diff --git a/modules/country/media/img/country/DK.gif b/modules/country/media/img/country/DK.gif deleted file mode 100644 index f3abd742..00000000 Binary files a/modules/country/media/img/country/DK.gif and /dev/null differ diff --git a/modules/country/media/img/country/EU.gif b/modules/country/media/img/country/EU.gif deleted file mode 100644 index 07b8c909..00000000 Binary files a/modules/country/media/img/country/EU.gif and /dev/null differ diff --git a/modules/country/media/img/country/GB.gif b/modules/country/media/img/country/GB.gif deleted file mode 100644 index 82ca244f..00000000 Binary files a/modules/country/media/img/country/GB.gif and /dev/null differ diff --git a/modules/country/media/img/country/HK.gif b/modules/country/media/img/country/HK.gif deleted file mode 100644 index 9f6f0448..00000000 Binary files a/modules/country/media/img/country/HK.gif and /dev/null differ diff --git a/modules/country/media/img/country/JP.gif b/modules/country/media/img/country/JP.gif deleted file mode 100644 index d77baf4d..00000000 Binary files a/modules/country/media/img/country/JP.gif and /dev/null differ diff --git a/modules/country/media/img/country/MX.gif b/modules/country/media/img/country/MX.gif deleted file mode 100644 index 54d2ee76..00000000 Binary files a/modules/country/media/img/country/MX.gif and /dev/null differ diff --git a/modules/country/media/img/country/MY.gif b/modules/country/media/img/country/MY.gif deleted file mode 100644 index 7745361a..00000000 Binary files a/modules/country/media/img/country/MY.gif and /dev/null differ diff --git a/modules/country/media/img/country/NO.gif b/modules/country/media/img/country/NO.gif deleted file mode 100644 index 87bf5f43..00000000 Binary files a/modules/country/media/img/country/NO.gif and /dev/null differ diff --git a/modules/country/media/img/country/NZ.gif b/modules/country/media/img/country/NZ.gif deleted file mode 100644 index 76f5cd8e..00000000 Binary files a/modules/country/media/img/country/NZ.gif and /dev/null differ diff --git a/modules/country/media/img/country/RU.gif b/modules/country/media/img/country/RU.gif deleted file mode 100644 index 2d3a723a..00000000 Binary files a/modules/country/media/img/country/RU.gif and /dev/null differ diff --git a/modules/country/media/img/country/SE.gif b/modules/country/media/img/country/SE.gif deleted file mode 100644 index b77b888f..00000000 Binary files a/modules/country/media/img/country/SE.gif and /dev/null differ diff --git a/modules/country/media/img/country/US.gif b/modules/country/media/img/country/US.gif deleted file mode 100644 index 401b0a1a..00000000 Binary files a/modules/country/media/img/country/US.gif and /dev/null differ diff --git a/modules/country/media/img/country/ZA.gif b/modules/country/media/img/country/ZA.gif deleted file mode 100644 index 2ae0850d..00000000 Binary files a/modules/country/media/img/country/ZA.gif and /dev/null differ diff --git a/modules/currency/currency.inc.php b/modules/currency/currency.inc.php deleted file mode 100644 index 4d9708d8..00000000 --- a/modules/currency/currency.inc.php +++ /dev/null @@ -1,81 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Currency - */ - -/** - * The main AgileBill Currency Class - * - * @package AgileBill - * @subpackage Module:Currency - */ -class currency extends OSB_module { - /** - * Update currency rates - */ - public function task($VAR) { - $db = &DB(); - - # Fetch all active currencies - $currencies = array(); - $rs = $db->Execute(sqlSelect($db,'currency','*',array('status'=>1))); - if ($rs) { - while (!$rs->EOF) { - $currencies[$rs->fields['id']] = $rs->fields; - $rs->MoveNext(); - } - - $rs->Close(); - } - - foreach ($currencies as $currFrom) { - $conversions = array(); - - foreach ($currencies as $currTo) { - # Get currency conversion - if ($currFrom['three_digit'] != $currTo['three_digit']) { - $ch = curl_init(sprintf('http://www.xe.net/ucc/convert.cgi?Amount=1&From=%s&To=%s',$currFrom['three_digit'],$currTo['three_digit'])); - curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); - curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); - curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,3); - curl_setopt($ch,CURLOPT_CRLF,true); - $resp = curl_exec ($ch); - curl_close ($ch); - - $m = array(); - preg_match('/[0-9.]+\s*'.$currFrom['three_digit'].'\s*=\s*([0-9.]+)\s*'.$currTo['three_digit'].'/',$resp,$m); - - } else { - # Conversion to/from same currency is always 1. - $m = array(1=>'1'); - } - - if (sizeof($m) > 0) - $conversions[$currTo['id']] = array('rate'=>$m[1],'iso'=>$currTo['three_digit']); - } - - # Update conversions array - $db->Execute(sqlUpdate($db,'currency',array('convert_array'=>serialize($conversions)),array('id'=>$currFrom['id']))); - } - } -} -?> diff --git a/modules/currency/currency_construct.xml b/modules/currency/currency_construct.xml deleted file mode 100644 index 14a21849..00000000 --- a/modules/currency/currency_construct.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - currency - - currency
- - - - 0 - - name - - 25 - - - - <add>Add Currency</add> - <view>Currency</view> - - - - - - I4 - 1 - 1 - - - I4 - 1 - - - Name - C(128) - 1 - 128 - any - 1 - - - Active - L - - - Exchange Rate - X2 - array - - - Notes - C2(128) - - - Symbol - C(16) - 1 - 16 - any - - - THREE Digit Code - C(3) - 3 - 3 - any - 1 - - - - - - id,site_id,name,convert_array,status,notes,symbol,three_digit - id,site_id,name,convert_array,status,notes,symbol,three_digit - id,site_id,name,convert_array,status,notes,symbol,three_digit - id,site_id,name,convert_array,status,notes,symbol,three_digit - id,site_id,name,convert_array,status,notes,symbol,three_digit - id,site_id,name,convert_array,status,notes,symbol,three_digit - - - - 0 - - - - - - id - checkbox - 25px - - - name - - - three_digit - - - -
diff --git a/modules/currency/currency_install.xml b/modules/currency/currency_install.xml deleted file mode 100644 index 331a9ff8..00000000 --- a/modules/currency/currency_install.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - Currency - currency - setup - - 1 - - - - - - search - - - List - view - - - 1 - - - Add - add - - 1 - - - delete - - - update - - - search_show - - - - - diff --git a/modules/currency/currency_install_data.xml b/modules/currency/currency_install_data.xml deleted file mode 100644 index 95de8cf7..00000000 --- a/modules/currency/currency_install_data.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - 1 - 1 - United States Dollars - 1 - - Notes - $ - USD - - - 3 - 1 - Japanese Yen - 0 - - ¥ - JPY - - - 4 - 1 - United Kingdom Pounds - 0 - - £ - GBP - - - 5 - 1 - Canada Dollars - 0 - - $ - CAD - - - 6 - 1 - Australia Dollars - 0 - - $ - AUD - - - 7 - 1 - Switzerland Francs - $ - CHF - - - 8 - 1 - Denmark Kroner - 0 - - ¤ - DKK - - - 9 - 1 - Hong Kong Dollars - $ - HKD - - - 10 - 1 - Norway Kroner - ¤ - NOK - - - 11 - 1 - Sweden Kroner - ¤ - SEK - - - 12 - 1 - New Zealand Dollars - $ - NZD - - - 13 - 1 - Russian Rubles - $ - RUR - - - 14 - 1 - South Africa Rand - $ - ZAR - - - 15 - 1 - Mexican Pesos - 0 - - $ - MXN - - - 16 - 1 - Euro - 0 - - - EUR - - - - 16 - - diff --git a/modules/discount/auth.inc.php b/modules/discount/auth.inc.php deleted file mode 100644 index a75d19e2..00000000 --- a/modules/discount/auth.inc.php +++ /dev/null @@ -1,11 +0,0 @@ - 'discount', 'method' => 'add_cart_discount'), - Array ('module' => 'discount', 'method' => 'user_search'), - Array ('module' => 'discount', 'method' => 'user_search_show') - ); -?> diff --git a/modules/discount/discount.inc.php b/modules/discount/discount.inc.php deleted file mode 100644 index 1915b493..00000000 --- a/modules/discount/discount.inc.php +++ /dev/null @@ -1,408 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Discount - */ - -/** - * The main AgileBill Discount Class - * - * @package AgileBill - * @subpackage Module:Discount - */ -class discount extends OSB_module { - # Array of available discounts - private $discounts = array(); - # The cumulative amount of the current discount - private $discount_total = 0; - # The array of discounts applied to the line_items - public $discount_arr = array(); - # Array that contains list of discount plugins in the /plugins/discount/ directory to load - private $plugins = array(); - - /** - * Load a specific discount plugin and validate the results - * - * @param string $plugin The plugin name - * @param string $discount The discount code - * @return bool - */ - private function plugin_validate($plugin,$code) { - $plugin_file = sprintf('%sdiscount/%s.php',PATH_PLUGINS,$plugin); - - if (is_file($plugin_file)) { - include_once($plugin_file); - eval('$plg = new plgn_discount_'. $plugin .';'); - - if (is_object($plg) && is_callable(array($plg,'validate'))) { - $plg->discount = $code; - - return $plg->validate($code); - } - } - - return false; - } - - /** - * Add a discount code to our session record, it'll be used/evaluated later to calculate the discounts. - * - * @param array $VAR - * @return bool - * @uses session - */ - public function add_cart_discount($VAR) { - global $C_debug, $C_translate, $smarty; - $db = &DB(); - - # Validate input - if (empty($VAR['discount'])) { - $C_debug->alert(_('The discount code was entered incorrectly or is not valid.')); - - return false; - } - - $discount_code = $VAR['discount']; - - # Check the supplied discount - $check = $this->sql_GetRecords( - array('where'=>sprintf('(date_start IS NULL OR date_start=0 OR date_start>%s) AND date_expire<=%s AND name=::%s::',time(),time(),$discount_code))); - - # Local check failed, attempt any discount plugins - if (! $check || count($check)>1 || $check[0]['status'] != '1') { - $plg = false; - - foreach ($this->plugins as $plugin) { - if ($discount_code = $this->plugin_validate($plugin,$discount_code)) { - $plg = true; - - break; - } - } - - # No plugins returned true... - if (! $plg) { - $C_debug->alert(_('The discount code was entered incorrectly or is not valid.')); - - return false; - } - } - - # Get existing discounts: - require_once(PATH_MODULES.'session/session.inc.php'); - $seo = new session(SESS); - - $arr = array(); - if (is_string($seo->getRecordAttr('discounts'))) - $arr = unserialize($seo->getRecordAttr('discounts')); - - # Check for duplicates - if (is_array($arr)) - foreach ($arr as $key=>$discount) - if ($discount == $discount_code) - return true; - - # Update session data - array_push($arr,$discount_code); - $seo->setRecordAttr('discounts',serialize($arr)); - $seo->sql_SaveRecord(true,true); - - return true; - } - - /** - * Commit current discounts to the database (call after creating an invoice_item record) - */ - public function invoice_item($invoice_id,$invoice_item_id,$account_id,$discount_arr=false) { - if ($discount_arr && is_array($discount_arr)) - $this->discount_arr = $discount_arr; - - if (is_array($this->discount_arr)) { - $db =& DB(); - - foreach ($this->discount_arr as $dsc) - $db->Execute(sqlInsert($db,'invoice_item_discount', - array('invoice_id'=>$invoice_id,'account_id'=>$account_id,'invoice_item_id'=>$invoice_item_id,'discount'=>$dsc['discount'],'amount'=>$dsc['amount']))); - } - } - - /** - * Get the avialable discounts for an account, session, or service - * - * @param $account - * @param $type 0=initial order, 1=recurring charge - */ - private function available_discounts($account,$type=0,$invoice=false) { - $db =& DB(); - - # Get account specific discounts - if ($type) - $sqltype = 'recurr_status=1'; - else - $sqltype = 'new_status=1'; - - foreach ($this->sql_GetRecords(array('where'=>sprintf('avail_account_id=%s AND status=1 AND %s',$account,$sqltype))) as $record) - $this->discounts[$record['name']] = $record; - - # Get session discounts from cart - if ($type == 0) { - $rs = $db->Execute( - sqlSelect('session','discounts',array('where'=>sprintf('(account_id=%s OR id=::%s::) AND discounts!=:::: AND discounts IS NOT NULL',$account,SESS)))); - - if ($rs && $rs->RecordCount()) { - $arr = unserialize($rs->fields['discounts']); - - if (is_array($arr)) - foreach ($arr as $discount) - if (! empty($discount)) - foreach ($this->sql_GetRecords(array('where'=>sprintf('name=%s AND status=1',$discount))) as $record) - $this->discounts[$record['name']] = $record; - - } - - # Get recurring discounts - } elseif ($type==1 && $invoice) { - $rs = $db->Execute( - sqlSelect($db,array('invoice_item_discount','discount'),'B.*',sprintf('A.invoice_id=%s AND A.discount=B.name AND status=1 AND %s',$invoice,$sqltype))); - - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $this->discounts[$rs->fields['name']] = $rs->fields; - $rs->MoveNext(); - } - } - } - } - - /** - * Calculate all applicable discounts for the current line item - * - * @param $type bool 0=initial product, 1=recurring product, 2=initial_domain, 3=recurring domain - * @param $invoice_item_id int The invoice item id for the discount - * @param $product_id int The product ID if type=0,1 or The TLD if type = 2,3 - * @param $account_id int The account ID - * @param $invoice_amt float The cumulative invoice amount - * @param $prod_amt float The product price before any discounts - */ - public function calc_all_discounts($type=0,$pid,$pamt,$aid,$iamt) { - # Populate our discounts - $this->available_discounts($aid,$type,$iamt); - - if (! count($this->discounts)) - return array(); - - foreach ($this->discounts as $did => $discount) { - $amt = $this->calc_item_discount($type,$did,$pid,$aid,$iamt,$pamt); - - if ($amt > 0) - array_push($this->discount_arr,array('discount'=>$discount['name'],'amount'=>$amt)); - } - - return $this->discount_arr; - } - - /** - * Calculate Recurring Discount - * - * @param $type bool 0=initial product, 1=recurring product, 2=initial_domain, 3=recurring domain - * @param $did string The Discount ID (must be set to $this->discount["$discounts"] containing the fields of the discount) - * @param $pid int The product ID if type=0,1 or The TLD if type = 2,3 - * @param $aid int The account ID - * @param $iamt float The cumulative invoice amount - * @param $pamt float The product price before any discounts - */ - private function calc_item_discount($type,$did,$pid,$aid,$iamt,$pamt) { - if (empty($this->discounts[$did])) - return false; - - $discount = $this->discounts[$did]; - - if ($type == 0 || $type == 2) { - $rate_type = $discount['new_type']; - $rate = $discount['new_rate']; - $min_cost = $discount['new_min_cost']; - $max_usage_amt = $discount['new_max_discount']; - - } else { - $rate_type = $discount['recurr_type']; - $rate = $discount['recurr_rate']; - $min_cost = $discount['recurr_min_cost']; - $max_usage_amt = $discount['recurr_max_discount']; - } - - if ((! empty($discount['date_start']) && $discount['date_start']>time()) || - (! empty($discount['date_expire']) && $discount['date_expire'] $iamt)) - return 0; - - if (($discount['max_usage_account']>0 || $discount['max_usage_global']>0) && - (! $this->discount_check_usage($discount['max_usage_account'],$discount['max_usage_global'],$aid,$did))) - return 0; - - if (! empty($discount['avail_account_id']) && $discount['avail_account_id'] != $aid) - return 0; - - if ($type==0 || $type==2) { - if (! empty($discount['avail_account_id']) && $discount['avail_account_id'] != $aid) { - return 0; - - } else { - if (! empty($discount['avail_group_id'])) { - $arr = unserialize($discount['avail_group_id']); - - if (is_array($arr) && count($arr) > 0 && ! empty($arr[0])) { - global $C_auth; - $do = false; - - for ($i=0; $iauth_group_by_id($arr[$i])) { - $do=true; - $i=count($arr); - } - } - - if (! $do) - return 0; - } - } - } - } - - if ($type<2 && ! empty($pid) && ! empty($discount['avail_product_id'])) { - $arr = unserialize($discount['avail_product_id']); - - if (is_array($arr) && count($arr)>0 && ! in_array($pid,$arr)) - return 0; - - } elseif ($type>1) { - if (! empty($discount['avail_tld_id'])) { - $do = false; - $tld = $pid; - $db = &DB(); - $rstld = $db->Execute(sqlSelect($db,"host_tld","id","name=::$tld::")); - - if($rstld && $rstld->RecordCount()) { - $tld_id = $rstld->fields['id']; - $arr = unserialize($discount['avail_tld_id']); - - if (is_array($arr) && count($arr) > 0 && ! empty($arr[0])) { - for ($i=0; $i $max_usage_amt) - $discount_amt = $max_usage_amt; - - } else { - $discount_amt = $rate; - } - - if (! empty($max_usage_amt)) { - if ($discount_amt+$this->discount_total > $max_usage_amt) - $discount_amt = $max_usage_amt-$this->discount_total; - } - - $this->discount_total += $discount_amt; - - return round($discount_amt,2); - } - - /** - * Check discount usage for account/global restrictions - */ - private function discount_check_usage($max_acct,$max_global,$account_id,$did) { - if (! isset($this->discounts[$did])) - return 0; - - $db = &DB(); - - $rs = $db->Execute( - sqlSelect('invoice_item_discount','account_id,COUNT(account_id) AS count', - array('where'=>array('discount'=>$this->discounts[$did]['name']),'groupby'=>'account_id'))); - - if ($rs && $rs->RecordCount()) { - # Check global usage - if (! empty($max_global) && $max_global>0 && $rs->RecordCount()>=$max_global) - return false; - - # Check usage by this account - if (! empty($max_acct) && $max_acct>0) { - $i = 0; - while (! $rs->EOF) { - if ($rs->fields['account_id'] == $account_id && $rs->fields['count']>=$max_acct) - return false; - - $rs->MoveNext(); - } - } - } - - return true; - } - - public function search_show($VAR) { - $db =& DB(); - $smart = parent::search_show($VAR); - - for ($i=0; $iExecute(sqlSelect(array('invoice','invoice_item_discount'),'SUM(A.total_amt) as sum', - array('where'=>sprintf('B.invoice_id=A.id AND A.billing_status=1 AND B.discount=::%s::',$smart[$i]['name']),'distinct'=>true))); - - if ($rs && $rs->RecordCount()) - $smart[$i]['revenue'] = $rs->fields['sum']; - - $rs = $db->Execute(sqlSelect('invoice_item_discount','invoice_id,amount',array('where'=>sprintf('discount=::%s::',$smart[$i]['name'])))); - if ($rs && $rs->RecordCount()>0) { - while (! $rs->EOF) { - $smart[$i]['savings'] += $rs->fields['amount']; - - if (empty($invoices[$rs->fields['invoice_id']])) { - $smart[$i]['orders']++; - $invoices[$rs->fields['invoice_id']]=true; - } - - $rs->MoveNext(); - } - } - } - - global $smarty; - $smarty->clear_assign('discount'); - $smarty->assign('discount',$smart); - } -} -?> diff --git a/modules/discount/discount_construct.xml b/modules/discount/discount_construct.xml deleted file mode 100644 index cf53d74e..00000000 --- a/modules/discount/discount_construct.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - discount - - discount
- - - - 0 - - name - - 25 - - 0 - - - - date_start - date_expire - status - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - Active - L - - - date - Date Start - I8 - - - date - Date End - I8 - - - Name - 2 - 32 - C(64) - any - - - Notes - X2 - - - I4 - - - I4 - - - Account - I8 - - - Product - X2 - country - name - array - - - array - Group - X2 - - - array - Domain - X2 - - - New Items - L - - - L - - - F - - - F - - - F - - - Recurring Items - L - - - L - - - F - - - F - - - F - - - - - - date_start,date_expire,status,name,notes,max_usage_account,max_usage_global,avail_account_id,avail_product_id,avail_group_id,new_status,new_type,new_rate,new_max_discount,new_min_cost,recurr_status,recurr_type,recurr_rate,recurr_max_discount,recurr_min_cost - id - id,site_id,date_orig,date_start,date_expire,status,name,notes,max_usage_account,max_usage_global,avail_account_id,new_status,new_type,new_rate,new_max_discount,new_min_cost,recurr_status,recurr_type,recurr_rate,recurr_max_discount,recurr_min_cost - id,site_id,date_orig,date_start,date_expire,status,name,notes,max_usage_account,max_usage_global,avail_account_id,avail_product_id,avail_group_id,avail_tld_id,new_status,new_type,new_rate,new_max_discount,new_min_cost,recurr_status,recurr_type,recurr_rate,recurr_max_discount,recurr_min_cost - id - id,site_id,date_orig,date_start,date_expire,status,name,notes,max_usage_account,max_usage_global,avail_account_id,avail_product_id,avail_group_id,avail_tld_id,new_status,new_type,new_rate,new_max_discount,new_min_cost,recurr_status,recurr_type,recurr_rate,recurr_max_discount,recurr_min_cost - - - - - - - - - - - - - - id - checkbox - 25px - - - name - - - status - - - orders - invoice_count - - - revenue - revenue - - - savings - savings - - - new_type - - - - - id - checkbox - 25px - - - name - - - status - - - new_status - - - recurr_status - - - -
diff --git a/modules/discount/discount_install.xml b/modules/discount/discount_install.xml deleted file mode 100644 index 888494f1..00000000 --- a/modules/discount/discount_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Discounts - - 1 - - discount - - - - account - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/email_log/auth.inc.php b/modules/email_log/auth.inc.php deleted file mode 100644 index 32a64445..00000000 --- a/modules/email_log/auth.inc.php +++ /dev/null @@ -1,7 +0,0 @@ - 'email_log', 'method' => 'user_list'), -Array ('module' => 'email_log', 'method' => 'user_view') -); -?> \ No newline at end of file diff --git a/modules/email_log/email_log.inc.php b/modules/email_log/email_log.inc.php deleted file mode 100644 index 1d6b765c..00000000 --- a/modules/email_log/email_log.inc.php +++ /dev/null @@ -1,79 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:EmailLog - */ - -/** - * The main AgileBill Email Log Class - * - * @package AgileBill - * @subpackage Modules:EmailLog - */ -class email_log extends OSB_module { - var $user_view_count = 25; /* show last X email logs for user */ - - public function user_list($VAR) { - if (! SESS_LOGGED) - return false; - - $db = &DB(); - - $email = $db->GetOne(sqlSelect($db,'account','email',array('id'=>SESS_ACCOUNT))); - $rs = $db->Execute( - sqlSelect($db,'email_log','id,email,date_orig,subject,urgent,userread',array('email'=>$email,'account_id'=>SESS_ACCOUNT),'date_orig',$this->user_view_count)); - - if ($rs && $rs->RecordCount()) { - $smart = array(); - while (! $rs->EOF) { - array_push($smart,$rs->fields); - $rs->MoveNext(); - } - - global $smarty; - $smarty->assign('email_log',$smart); - } - } - - public function user_view($VAR) { - if (! SESS_LOGGED || empty($VAR['id'])) - return false; - - $db = &DB(); - - $rs = $db->Execute(sqlSelect($db,'email_log','*',array('id'=>$VAR['id'],'account_id'=>SESS_ACCOUNT))); - if ($rs && $rs->RecordCount()) { - global $smarty; - - $smarty->assign('email_log',$rs->fields); - # Update to read - if ($rs->fields['userread'] != 1) - $db->Execute(sqlUpdate($db,'email_log',array('userread'=>1),array('id'=>$rs->fields['id']))); - } - } - - function add($account_id, $subject, $message, $email, $html=0, $urgent=0) { - $db=&DB(); - $fields=Array('date_orig'=>time(), 'account_id'=>$account_id, 'subject'=>$subject, 'message'=>$message, 'email'=>$email, 'html'=>$html, 'urgent'=>$urgent, 'userread'=>0); - $id = & $db->Execute(sqlInsert($db,"email_log",$fields)); - } -} -?> diff --git a/modules/email_log/email_log_construct.xml b/modules/email_log/email_log_construct.xml deleted file mode 100644 index 34a8ffac..00000000 --- a/modules/email_log/email_log_construct.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - email_log - - email_log
- - setup - - 0 - - date_orig - - 25 - - 1 - - - - id,site_id,account_id - email - html,urgent,userread - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - I4 - any - - - Email Address - C(128) - - - Subject - C(128) - - - Message - X2 - - - L - - - L - - - L - - - - - - id,site_id,date_orig,account_id,email,subject,message,html,urgent,userread - id,site_id,date_orig,account_id,email,subject,message,html,urgent,userread - id,site_id,date_orig,account_id,email,subject,message,html,urgent,userread - - - - - - - - <user_list>Emails</user_list> - <user_view>Email</user_view> - - - - - - - id - checkbox - 25px - - - date_orig - date - - - email - - - subject - - - -
diff --git a/modules/email_log/email_log_install.xml b/modules/email_log/email_log_install.xml deleted file mode 100644 index acee29f1..00000000 --- a/modules/email_log/email_log_install.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - setup - - Email Log - - 1 - - email_log - - - - setup - - - - - - - - - - delete - - - - List - 1 - search - - - - - Search - 1 - search_form - - - - search_show - - - - view - - - - diff --git a/modules/email_queue/email_queue.inc.php b/modules/email_queue/email_queue.inc.php deleted file mode 100644 index f2fc2d1a..00000000 --- a/modules/email_queue/email_queue.inc.php +++ /dev/null @@ -1,67 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:EmailQueue - */ - -/** - * The main AgileBill Email Queue Class - * - * @package AgileBill - * @subpackage Module:EmailQueue - */ -class email_queue extends OSB_module { - /** - * Send mails in the queue - */ - public function send($VAR) { - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'email_queue','*',array('status'=>0))); - - if ($rs && $rs->RecordCount()) { - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - - while (! $rs->EOF) { - # Get values - $sql = array(); - $sql[1] = $rs->fields['sql1']; - $sql[2] = $rs->fields['sql2']; - $sql[3] = $rs->fields['sql3']; - - # Unserialize the SQL data if required. - foreach ($sql as $i) - if (preg_match('/^a:/',$sql[$i]) && is_array($a = unserialize($sql[$a]))) - $sql[$i] = $a; - - # Send email - $mail = new email_template; - $result = $mail->send($rs->fields['email_template'],$rs->fields['account_id'],$sql[1],$sql[2],$sql[3],false); - - # Update to sent status - if ($result) - $db->Execute(sqlUpdate($db,'email_queue',array('status'=>1),array('id'=>$rs->fields['id']))); - - $rs->MoveNext(); - } - } - } -} -?> diff --git a/modules/email_queue/email_queue_construct.xml b/modules/email_queue/email_queue_construct.xml deleted file mode 100644 index 77f7ff44..00000000 --- a/modules/email_queue/email_queue_construct.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - email_queue - - email_queue
- - - - 0 - - id - - 25 - - 0 - - - - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Processed - L - - - Account - C(128) - - - Email Template - C(128) - - - Data Field 1 - C(128) - - - Data Field 2 - C(128) - - - Data Field 3 - C(128) - - - Data Field 4 - C(128) - - - Data Field 5 - C(128) - - - Data Variables - X2 - - - - - - id,site_id,date_orig,date_last,status,account_id,email_template,sql1,sql2,sql3,sql4,sql5,var - id,site_id,date_orig,date_last,status,account_id,email_template,sql1,sql2,sql3,sql4,sql5,var - id,site_id,date_orig,date_last,status,account_id,email_template,sql1,sql2,sql3,sql4,sql5,var - id,site_id,date_orig,date_last,status,account_id,email_template,sql1,sql2,sql3,sql4,sql5,var - id,site_id,date_orig,date_last,status,account_id,email_template,sql1,sql2,sql3,sql4,sql5,var - - - - - - - - - - - - - - id - checkbox - 25px - - - date_orig - date - - - account_id - - - email_template - - - status - bool - - - -
diff --git a/modules/email_queue/email_queue_install.xml b/modules/email_queue/email_queue_install.xml deleted file mode 100644 index 2be54409..00000000 --- a/modules/email_queue/email_queue_install.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - 0 - - email_queue - - - - email_queue - - - - - - - - - - add - - - diff --git a/modules/email_template/email_template.inc.php b/modules/email_template/email_template.inc.php deleted file mode 100644 index 831b09fb..00000000 --- a/modules/email_template/email_template.inc.php +++ /dev/null @@ -1,329 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Mail - */ - -/** - * The main AgileBill Mail Template Class - * - * include_once(PATH_MODULES.'email_template/email_template.inc.php'); - * $my = new email_template; - * $my->send('newsletter_subscribe','4d1800b401f5d340f022688de0ac2687','f1714072da3c05a220ac3b60a3a57d88','2','3'); - * - * @package AgileBill - * @subpackage Module:Mail - */ -class email_template extends OSB_module { - /** - * Send or Queue template based email - * - * Prefixing the template with "admin->" will result in the mail being - * sent to the admin only. - * - * @param string $template_name Name of template to use - * @param int $acct Account ID or email address - */ - public function send($template_name,$acct,$sql1,$sql2,$sql3,$queue=true) { - global $VAR,$C_debug,$C_list; - $db = &DB(); - - # Send to admin only? - $admin_only = false; - if (preg_match('/^admin->/',$template_name)) { - $admin_only = true; - $template_name = preg_replace('/^admin->/','',$template_name); - } - - $template = $db->Execute(sqlselect($db,'email_template','*',array('name'=>$template_name))); - - # If the template is not active, return. - if (! $template || $template->fields['active'] != '1') - return; - - # Setup our Email - $E = array(); - - # Email Priority - $E['priority'] = $template->fields['priority']; - - # Get the setup_email settings - if (empty($template->fields['setup_email_id'])) - $setup_email_id = DEFAULT_SETUP_EMAIL; - else - $setup_email_id = $template->fields['setup_email_id']; - - $setup_email = $db->Execute(sqlSelect($db,'setup_email','*',array('id'=>$setup_email_id))); - - # Queue the email - if ($queue && $C_list->is_installed('email_queue') && $setup_email->fields['queue']) { - # Set sql vars - if (is_array($sql1)) - $sql1 = serialize($sql1); - if (is_array($sql2)) - $sql2 = serialize($sql2); - if (is_array($sql3)) - $sql3 = serialize($sql3); - if (is_array($VAR)) - $var = serialize($VAR); - - # If this was an admin only email, we need to rewrite the template name again. - if ($admin_only) - $sql_template = sprintf('admin->%s',$template->fields['name']); - else - $sql_template = $template->fields['name']; - - # Check that this email is not already in the queue - $duplicates = $db->Execute(sqlSelect($db,'email_queue','id', - array('status'=>0,'account_id'=>$acct,'email_template'=>$sql_template,'sql1'=>$sql1,'sql2'=>$sql2,'sql3'=>$sql3) - )); - if ($duplicates != false && $duplicates->RecordCount() > 0) - return; - - # Queue this Email - $db->Execute(sqlInsert($db,'email_queue',array( - 'date_orig'=>time(), - 'date_last'=>time(), - 'status'=>0, - 'account_id'=>$acct, - 'email_template'=>$sql_template, - 'sql1'=>$sql1, - 'sql2'=>$sql2, - 'sql3'=>$sql3, - 'var'=>$var) - )); - return; - } - - # Is this an SMTP connection - if ($setup_email->fields['type'] == 1) { - $E['server'] = $setup_email->fields['server']; - $E['account'] = $setup_email->fields['username']; - $E['password'] = $setup_email->fields['password']; - } - - $E['from_name'] = $setup_email->fields['from_name']; - $E['from_email'] = $setup_email->fields['from_email']; - - if ($setup_email->fields['cc_list']) - $E['cc_list'] = explode(',',$setup_email->fields['cc_list']); - - if ($setup_email->fields['bcc_list']) - $E['bcc_list'] = explode(',',$setup_email->fields['bcc_list']); - - # Get the account settings - $account = $db->Execute($q=sqlSelect($db,'account','*',sprintf('(email=::%s:: OR id=::%s::)',$acct,$acct))); - if (! $account) { - $C_debug->error(__FILE__,__METHOD__,sprintf('%s %s',$db->ErrorMsg(),$q)); - - return false; - } - - if ($admin_only) { - $E['to_email'] = $setup_email->fields['from_email']; - $E['to_name'] = $setup_email->fields['from_name']; - $ab_account = true; - - } else { - if ($account->RecordCount() > 0) { - $E['to_email'] = $account->fields['email']; - $E['to_name'] = sprintf('%s %s',$account->fields['first_name'],$account->fields['last_name']); - $ab_account = true; - - } else { - $E['to_email'] = $acct; - $E['to_name'] = $acct; - $ab_account = false; - } - } - - # Get the template translation for the specified account for text/htm - if ($ab_account && $account->fields['language_id']) - $language_id = $account->fields['language_id']; - else - $language_id = DEFAULT_LANGUAGE; - - $email_template_translate = $db->Execute(sqlSelect($db,'email_template_translate','*',array('language_id'=>$language_id,'email_template_id'=>$template->fields['id']))); - - # If there is no translation, get the default translation for this email - if (! $email_template_translate || ! $email_template_translate->RecordCount()) - $email_template_translate = $db->Execute(sqlSelect($db,'email_template_translate','*',array('language_id'=>DEFAULT_LANGUAGE,'email_template_id'=>$template->fields['id']))); - - # Unable to locate translation? - if (! $email_template_translate || ! $email_template_translate->RecordCount()) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__, - sprintf('Unable to locate translation for Email Template %s and Language %s OR %s',$template->fields['name'],$language_id,DEFAULT_LANGUAGE)); - - return; - } - - # Set the subject: - $E['subject'] = $email_template_translate->fields['subject']; - - # Determine whether to send HTML or not... - if ($ab_account && $account->fields['email_type'] == 1) { - if (! empty($email_template_translate->fields['message_html'])) { - $E['body_html'] = $email_template_translate->fields['message_html']; - $E['html'] = '1'; - - } else { - $E['body_html'] = false; - $E['html'] = '0'; - } - - } else { - $E['html'] = '0'; - } - - $E['body_text'] = $email_template_translate->fields['message_text']; - - # Get the date-time - include_once(PATH_CORE.'list.inc.php'); - $cl = new CORE_list; - - $date = $cl->date_time(time()); - - # Url formatting. - if ($admin_only) { - $site_url = URL.'admin.php'; - $site_ssl_url = SSL_URL.'admin.php'; - - } else { - $site_url = URL; - $site_ssl_url = SSL_URL; - } - - # Get the replace vars from the email template: - $replace = array( - '%site_name%' => $E['from_name'], - '%site_email%' => $E['from_email'], - '%url%' => $site_url, - '%date%' => $date, - '%ssl_url%' => $site_ssl_url); - - # Include the replace vars from the $VAR variable: - foreach ($VAR as $key => $value) { - $re_this = sprintf('%%var_%s%%',$key); - $replace[$re_this] = $value; - } - - # Get the replace vars from the account - $replace['%acct_id%'] = $acct; - if ($ab_account) - foreach ($account->fields as $key => $value) { - $re_this = sprintf('%%acct_%s%%',$key); - $replace[$re_this] = $value; - } - - # Get the SQL1/2/3 Query/Arrays - foreach (array(1,2,3) as $i) - if ($template->fields['sql_'.$i] && $sql1 && ! is_array($sql1)) { - # Set our DB prefix - $sql = str_replace('%DB_PREFIX%',AGILE_DB_PREFIX,$template->fields['sql_'.$i]); - - # Set the SQL - $sql = str_replace('%SQL1%',$db->qstr($sql1),$sql); - if ($sql2 && ! is_array($sql2)) - $sql = str_replace('%SQL2%',$db->qstr($sql2),$sql); - if ($sql3 && ! is_array($sql3)) - $sql = str_replace('%SQL3%',$db->qstr($sql3),$sql); - - $sql .= sprintf(' AND site_id=%s',DEFAULT_SITE); - - $SQL = $db->Execute($sql); - - if (! $SQL) { - # Return the error message - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,sprintf('%s %s',$db->ErrorMsg(),$sql)); - - } elseif ($SQL->RecordCount() > 0) { - # Get the replace vars from the sql results: - foreach ($SQL->fields as $key => $value) { - $re_this = sprintf('%%sql%s_%s%%',$i,$key); - $replace[$re_this] = $value; - } - } - } - - if (is_array($sql1)) { - echo '
1a.HOW DID I GET HERE??? (WHAT SHOULD THIS DO??)';debug_print_backtrace();die();
-			while(list($key,$value) = each($sql1))
-				$replace[$key] = $value;
-
-		} elseif ($sql1 && ! $template->fields['sql_1']) {
-			$replace['%sql1%'] = $sql1;
-		}
-
-		if (is_array($sql2)) {
-			echo '
2a.HOW DID I GET HERE??? (WHAT SHOULD THIS DO??)';debug_print_backtrace();die();
-			while(list($key,$value) = each($sql2))
-				$replace[$key] = $value;
-
-		} elseif ($sql2 && ! $template->fields['sql_2']) {
-			$replace['%sql2%'] = $sql2;
-		}
-
-		if (is_array($sql3)) {
-			echo '
3a.HOW DID I GET HERE??? (WHAT SHOULD THIS DO??)';debug_print_backtrace();die();
-			while(list($key,$value) = each($sql3))
-				$replace[$key] = $value;
-
-		} elseif ($sql3 && ! $template->fields['sql_3']) {
-			$replace['%sql3%'] = $sql3;
-		}
-
-		foreach (array('subject','body_text','body_html') as $i)
-			if (! empty($E[$i])) {
-				# Replace the $replace vars in the body and subject
-				foreach ($replace as $key => $value)
-					$E[$i] = str_replace($key,$value,$E[$i]);
-
-				# Remove any unparsed vars from the body text and html:
-				if (preg_match('/%/',$E[$i]))
-					$E[$i] = preg_replace('/%[a-zA-Z0-9_]{1,}%/','',$E[$i]);
-			}
-
-		# Set any attachments (not currently supported)
-		$E['attatchments'] = '';
-
-		# Email log?
-		if ($C_list->is_installed('email_log')) {
-			include_once(PATH_MODULES.'email_log/email_log.inc.php');
-			$log = new email_log;
-
-			$log->add($acct,$E['subject'],$E['body_text'],$E['to_email'],false,$E['priority']);
-		}
-
-		# Call the mail class
-		require_once(PATH_CORE.'email.inc.php');
-		$email = new CORE_email;
-
-		if ($setup_email->fields['type'] == 1)
-			return $email->SMTP_Mail($E);
-		else
-			return $email->PHP_Mail($E);
-	}
-}
-?>
diff --git a/modules/email_template/email_template_construct.xml b/modules/email_template/email_template_construct.xml
deleted file mode 100644
index 4234cafb..00000000
--- a/modules/email_template/email_template_construct.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-
-
-	
-	email_template
-	
-	email_template
- - - - 0 - - name - - 25 - - 0 - - - - name - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - Active - L - - - setup_email - name - Setup Email - 1 - I4 - - - Name - C(128) - 4 - 128 - any - - - Priority - L - - - X2 - - - Notes - X2 - - - SQL 1 - X2 - - - SQL 2 - X2 - - - SQL 3 - X2 - - - - - - id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status - id,site_id,setup_email_id,priority,shortcuts,notes,sql_1,sql_2,sql_3,status - id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status - id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status - id,site_id,setup_email_id,name,priority,shortcuts,notes,sql_1,sql_2,sql_3,status - - - - - - - - - - - - - - id - checkbox - 25px - - - name - - - priority - bool - - - status - bool_icon - 20px - - - -
diff --git a/modules/email_template/email_template_install.xml b/modules/email_template/email_template_install.xml deleted file mode 100644 index 3151fd6b..00000000 --- a/modules/email_template/email_template_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - 1 - - email_template - - - - setup - - - - base - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/email_template/email_template_install_data.xml b/modules/email_template/email_template_install_data.xml deleted file mode 100644 index c33bcf5d..00000000 --- a/modules/email_template/email_template_install_data.xml +++ /dev/null @@ -1,501 +0,0 @@ - - - - 11 - 1 - 1 - account_reset_password - 1 - all - This email is sent to the user when they use the password retrieval program - 1 - - - 12 - 1 - 1 - account_registration_active - 0 - all - - 1 - - - 14 - 1 - 1 - account_registration_inactive - 1 - all - This email is sent to the user after account registration, if email verification is required. - 1 - - - 15 - 1 - 1 - account_add_staff_active - 0 - all - This is the email a user recieves when the staff adds their new account as active - 1 - - - 16 - 1 - 1 - account_add_staff_inactive - 0 - all - This email is sent to users when a staff-member creates their account as inactive - 1 - - - 17 - 1 - 1 - password_change_instructions - 0 - all - This email is sent by the administrator / staff to resend the change password instructions... - 1 - - - 18 - 1 - 1 - affiliate_staff_add - 0 - * - This e-mail template is sent when staff/admin adds a new affiliate account. - 1 - - - 19 - 1 - 1 - affiliate_user_add_active - 0 - * - This e-mail template is sent when the user signs up for an affiliate account and is automatically approved. - 1 - - - 20 - 1 - 1 - affiliate_user_add_pending - 0 - * - This e-mail template is sent when an affiliate signs up for an account and it requires admin approval. - 1 - - - 21 - 1 - 1 - affiliate_user_add_staff_notify - 0 - * - This e-mail template is sent to the staff when a pending affiliate application is received. - 1 - - - 22 - 1 - 1 - invoice_confirm_user - 0 - all - - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - SELECT email_template FROM %DB_PREFIX%checkout WHERE id = %SQL2% - 1 - - - 23 - 1 - 1 - invoice_confirm_admin - 0 - all - Sends the admin an new invoice alert. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - SELECT email_template FROM %DB_PREFIX%checkout WHERE id = %SQL2% - 1 - - - 24 - 1 - 1 - invoice_due_user - 0 - all - Sends the user a due invoice alert when new invoice is created or they pay via a 3rd party method. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 25 - 1 - 1 - invoice_due_admin - 0 - all - Alert sent to admin when manual payment needs processed. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 26 - 1 - 1 - invoice_paid_user - 0 - all - Notify user of payment recieved for an invoice. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - SELECT * FROM %DB_PREFIX%currency WHERE id = %SQL2% - 1 - - - 27 - 1 - 1 - invoice_paid_admin - 0 - all - Notify admin of payment recieved for an invoice. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - SELECT * FROM %DB_PREFIX%currency WHERE id = %SQL2% - 1 - - - 28 - 1 - 1 - invoice_resend - 0 - all - Resends payment due alert.... - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 29 - 1 - 1 - invoice_manual_auth_admin - 0 - all - Sends admin alert that an invoice requires manual approval - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - SELECT checkout_plugin FROM %DB_PREFIX%checkout WHERE id = %SQL2% - 1 - - - 30 - 1 - 1 - invoice_approved_user - 0 - all - Sent to user when invoice status is updated to approved - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 31 - 1 - 1 - registrar_manual_admin - 0 - All - Sends selected staff member an alert to manually renew, register, transfer, or park a domain name. - SELECT * FROM %DB_PREFIX%account WHERE id = %SQL1% - 1 - - - 32 - 1 - 1 - registrar_bulkregister_admin - 0 - All - - 1 - - - 33 - 1 - 1 - registrar_nominet_admin - 0 - all - 1 - - - 35 - 1 - 1 - invoice_recur_user - 0 - all - Sends the user notification of new invoice created for a recurring service - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 36 - 1 - 1 - invoice_recur_admin - 0 - all - Sends the admin notification of new invoice created for a recurring service - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 37 - 1 - 1 - service_suspend_user - 0 - all - Sends the user notice that service(s) have been suspended due to non-payment. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 38 - 1 - 1 - service_suspend_admin - 0 - all - Sends the admin notice that service(s) have been suspended due to non-payment. - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 39 - 1 - 1 - host_new_user - 0 - all - This e-mail is sent to the user when their hosting account is provisioned - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 40 - 1 - 1 - host_edit_user - 0 - all - This e-mail is sent to the user when their hosting account is edited - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 41 - 1 - 1 - host_new_admin - 0 - all - Email sent to admin to notify of new manual provisioning required. - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 42 - 1 - 1 - host_edit_admin - 0 - all - Email sent to admin to notify that edit of manual provisioning required. - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 43 - 1 - 1 - host_inactive_admin - 0 - all - Email sent to admin to notify that edit of manual suspend required. - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 44 - 1 - 1 - host_active_admin - 0 - all - Email sent to admin to notify that edit of manual activation required. - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 45 - 1 - 1 - host_delete_admin - 0 - all - Email sent to admin to notify that edit of manual deletion required. - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 46 - 1 - 1 - service_cancel_user - 0 - all - Notify user of service cancelation - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 47 - 1 - 1 - service_cancel_admin - 0 - all - Notify admin of service cancelation - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 48 - 1 - 1 - service_changeschedule_admin - 0 - all - Sends admin notice that user has selected a different billing schedule. - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - 1 - - - 638 - 1 - 1 - login_share_ban_user - 1 - 1 - - - 639 - 1 - 1 - login_share_ban_admin - 0 - 1 - - - 640 - 1 - 1 - account_billing_exp_soon - 0 - Sent when a credit card is set to expire soon, triggered by the account_billing::task - SELECT * FROM %DB_PREFIX%account_billing WHERE id = %SQL1% - 1 - - - 651 - 1 - 1 - net_term_suspend - 0 - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 652 - 1 - 1 - net_term_late_notice - 0 - SELECT * FROM %DB_PREFIX%invoice WHERE id = %SQL1% - 1 - - - 653 - 1 - 1 - voip_balance_prepaid - 0 - SELECT * FROM %DB_PREFIX%voip_prepaid WHERE id = %SQL1% - 1 - - - 654 - 1 - 1 - voip_manual - 0 - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - - 1 - - - 655 - 1 - 1 - voip_new_prepaid_ani - 0 - SELECT * FROM %DB_PREFIX%voip_prepaid WHERE id=%SQL1% - 1 - - - 656 - 1 - 1 - voip_new_prepaid_pin - 0 - SELECT * FROM %DB_PREFIX%voip_prepaid WHERE id=%SQL1% - - 1 - - - 657 - 1 - 1 - voip_new_service - 0 - SELECT * FROM %DB_PREFIX%service WHERE id = %SQL1% - - SELECT * FROM %DB_PREFIX%voip_vm WHERE mailbox=%SQL3% - 1 - - - 668 - 1 - 1 - invoice_pregen_notice - 0 - Sends out a notice to user prior to generating invoices - SELECT sum(price) as price FROM %DB_PREFIX%service WHERE id in (%SQL1%) - SELECT symbol,three_digit FROM %DB_PREFIX%currency WHERE id = %SQL2% - 1 - - - 668 - - - 668 - - diff --git a/modules/email_template_translate/email_template_translate.inc.php b/modules/email_template_translate/email_template_translate.inc.php deleted file mode 100644 index f2935734..00000000 --- a/modules/email_template_translate/email_template_translate.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:EmailTemplateTranslation - */ - -/** - * The main AgileBill Email Template Translation Class - * - * @package AgileBill - * @subpackage Module:EmailTemplateTranslation - */ -class email_template_translate extends OSB_module { -} -?> diff --git a/modules/email_template_translate/email_template_translate_construct.xml b/modules/email_template_translate/email_template_translate_construct.xml deleted file mode 100644 index fea30508..00000000 --- a/modules/email_template_translate/email_template_translate_construct.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - email_template_translate - - email_template_translate
- - email_template - - 0 - - email_template_id - - 25 - - 1 - - - - email_template_id - language_id - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - I8 - email_template - name - - - C(16) - - - C(255) - 1 - 255 - any - - - X2 - any - 1 - - - X2 - 1 - - - - - - email_template_id,language_id,subject,message_text,message_html - id,site_id,email_template_id,language_id,subject,message_text,message_html - id,site_id,email_template_id,language_id,subject,message_text,message_html - id,site_id,email_template_id,language_id,subject,message_text,message_html - id,site_id,email_template_id,language_id,subject,message_text,message_html - - - - 1 - - - - - - - - - - id - checkbox - 25px - - - email_template_id - - - language_id - - - subject - - - -
diff --git a/modules/email_template_translate/email_template_translate_install.xml b/modules/email_template_translate/email_template_translate_install.xml deleted file mode 100644 index 8c2ad50f..00000000 --- a/modules/email_template_translate/email_template_translate_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - 0 - - email_template_translate - - - - email_template - - - - base - - - - - - add - - - - delete - - - - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/email_template_translate/email_template_translate_install_data.xml b/modules/email_template_translate/email_template_translate_install_data.xml deleted file mode 100644 index e7e9b4f0..00000000 --- a/modules/email_template_translate/email_template_translate_install_data.xml +++ /dev/null @@ -1,1026 +0,0 @@ - - - - 9 - 1 - 11 - en - Password Retrieval Link for %site_name% - - Dear %acct_first_name%,

You (or someone who knows your email or username) has recently submitted a password retrieval request at our site.

If this was you, you can click the link below to change your password.
The link expires in 15 minutes so be sure to do this right away:

%ssl_url%?_page=account:user_password_reset&validate=%sql3%

If the link above does not display as a link in your browser, you will need to paste it into the address bar of your browser instead.

If you did not request a password retrieval at our site, then you can safetly ignore and delete this email.

Thank you,
%site_name%

]]>
-
- - 10 - 1 - 12 - en - %site_name%: User Registration Complete - Dear %acct_first_name%, - -Thank you for registering with us! - -You can login to your account any time here: -%ssl_url%?_page=account:account - -Thanks! -%site_name% - Dear %acct_first_name%,

Thank you for registering with us!

You can login to your account any time here:
%ssl_url%?_page=account:account

Thanks!
%site_name%

]]>
-
- - 11 - 1 - 14 - en - %site_name%: Verification Required - - Dear %acct_first_name%,

We have received your registration, but further action on your part is requested in order to activate your account.

Please click the link below in order to activate your account:
%ssl_url%?_page=account:user_verify&verify=%sql3%

If the text above does not show up as a clickable link, you can paste it to the address bar of your web browser. If you are not sure how to do this, or it does not work, then do the following:

Go to %ssl_url%

Click 'Verify Account'

Enter the following code into the verification form:

%sql3%

Thank you!
%site_name%

]]>
-
- - 12 - 1 - 15 - en - New Account Created - Dear %acct_first_name%, - -One of our staff members has just added your account to our system. - -The username assigned to your account is: %acct_username% - -For security reasons, you must choose your own password here: -%ssl_url%?_page=account:user_password - -Once you set your password, you will be able to login to your account. - -Thank you, -%site_name% - Dear %acct_first_name%,

-

One of our staff members has just added your account to our system.

-

The username assigned to your account is: %acct_username%

-

For security reasons, you must choose your own password here:
%ssl_url%?_page=account:user_password

-

Once you set your password, you will be able to login to your account.

-

Thank you,
%site_name%

]]>
-
- - 13 - 1 - 16 - en - New Account Created - - Dear %acct_first_name%,

One of our staff members has just added your account to our system. Futher action on your part is required to validate your account.

To validate your account, please click the link below:
%ssl_url%?_page=account:user_verify&verify=%sql3%

The username assigned to your account is: %acct_username%

For security reasons, you must choose your own password here:
%ssl_url%?_page=account:user_password

Once you set your password and verify your account, you will be able to login to your account.

Thank you,
%site_name%

]]>
-
- - 14 - 1 - 17 - en - How to change your %site_name% password - Dear %acct_first_name%, - -We are sending you this e-mail because you indicated to our staff that you would like to change your account password. - -If you would like to change your password, just click this link: -%ssl_url%?_page=account:user_password - -You can then enter either your username or e-mail address, and we will send you a link where you can change your password. - -Thank you, -%site_name% - Dear %acct_first_name%,

We are sending you this e-mail because you indicated to our staff that you would like to change your account password.

If you would like to change your password, just click this link:
%ssl_url%?_page=account:user_password

You can then enter either your username or e-mail address, and we will send you a link where you can change your password.

Thank you,
%site_name%

]]>
-
- - 15 - 1 - 18 - en - Your Affiliate Account Complete - Hello %acct_first_name%, - -This e-mail is to let you know that a member of our staff has set up an affiliate account on your behalf. - -For future reference, your Affiliate Id is %SQL3% - -You can visit the affiliate center at the link below to edit your account details, as well as view statistics, referrals, and commissions. - -%url%?_page=affiliate:affiliate - -Thank you, -%site_name% - Hello %acct_first_name%,

This -e-mail is to let you know that a member of our staff has set up an -affiliate account on your behalf. For future reference, your Affiliate -Id is %SQL3% You can visit the affiliate center at the link below to -edit your account details, as well as view statistics, referrals, and -commissions.

%url%?_page=affiliate:affiliate

Thank you,
%site_name%

]]>
-
- - 16 - 1 - 19 - en - Your affiliate account is ready - Hello %acct_first_name%, - -This e-mail is to let you know that your affiliate account has been setup. - -For future reference, your affiliate Id is: %SQL3% - -You can visit the affiliate center at the link below to edit your account details, as well as view statistics, referrals, and commissions. - -%url%?_page=affiliate:affiliate - -Thank you, -%site_name% - Â Hello %acct_first_name%,

This e-mail is to let you know that your affiliate account has been setup.

For future reference, your affiliate Id is: %SQL3%

You -can visit the affiliate center at the link below to edit your account -details, as well as view statistics, referrals, and commissions.

%url%?_page=affiliate:affiliate

Thank you,
%site_name%

]]>
-
- - 17 - 1 - 20 - en - Your affiliate application received - Hello %acct_first_name%, - -This e-mail is to let you know that your affiliate account application has been recieved. - -You can visit the affiliate center at the link below to view the status of your application from time to time. We will also send you an e-mail when your affiliate account is activated. - -%url%?_page=affiliate:affiliate - -Thank you, -%site_name% - Hello %acct_first_name%,

This e-mail is to let you know that your affiliate account application has been recieved.

You -can visit the affiliate center at the link below to view the status of -your application from time to time. We will also send you an e-mail -when your affiliate account is activated.

%url%?_page=affiliate:affiliate

Thank you,
%site_name%

]]>
-
- - 18 - 1 - 21 - en - Affiliate Application Received - - A user has just submitted an affiliate application, you can view it here:

%url%?_page=affiliate:view&id=%SQL3%

]]>
-
- - 19 - 1 - 22 - en - %site_name% Order Confirmation - - Dear %acct_first_name%,

This e-mail is to confirm that we have received your order dated %date%.

The order number is %sql1_id%, and can be viewed online HERE:

View Printable Invoice HERE:

==============================================================
Products Ordered
==============================================================
%products%
==============================================================
Order Total: %sql1_total_amt% %currency%
==============================================================
%sql2_email_template%

Thank you,
%site_name%

]]>
-
- - 20 - 1 - 23 - en - New Invoice Alert [%sql1_id%] - %url%?_page=invoice:view&id=%sql1_id%&tid=default_admin - -Print Invoice: --> %url%?_page=invoice:pdf&id=%sql1_id%&_escape=true&tid=default_admin - -User Details: --> %url%?_page=account_admin:view&id=%acct_id%&tid=default_admin -]]> - A new invoice has been created for %acct_first_name% %acct_last_name% on %date%.

==============================================================
Products Ordered
==============================================================
%products%
==============================================================
Order Total:   %sql1_total_amt% %currency%
==============================================================

Invoice Details | Print Invoice | User Details  

]]>
-
- - 21 - 1 - 24 - en - Invoice Due Notification [%sql1_id%] - - %acct_first_name%,

This e-mail is to remind you that payment is due for invoice %sql1_id% by %sql3%.

If you have already paid for this invoice, you may ignore this e-mail.

Otherwise, please follow the link below to view the invoice details and make payment.

%ssl_url%?_page=invoice:user_view&id=%sql1_id%

Thank you,
%site_name%

]]>
-
- - 22 - 1 - 25 - en - Invoice Manual Processing [%sql1_id%] - %url%?_page=invoice:view&id=%sql1_id%&tid=default_admin - -Account Details: -> %url%?_page=account_admin:view&id=%acct_id%&tid=default_admin -]]> - This alert is to notify you that manual processing/verification is required for invoice number %sql1_id%, which is due on %sql3%.

Invoice Details | Account Details

]]>
-
- - 23 - 1 - 26 - en - Payment Received for Invoice %sql1_id% - - Dear %acct_first_name%,

This e-mail is to notify you that we have recieved your payment for invoice number %sql1_id%.

The total amount of the invoice is %sql1_total_amt%. To date, you have paid %sql1_billed_amt%.

For more details on this invoice, you can view it online at the link below:
%url%?_page=invoice:user_view&id=%sql1_id%

Thank you,
%site_name%

]]>
-
- - 24 - 1 - 27 - en - Payment Received for Invoice %sql1_id% - %url%?_page=invoice:view&id=%sql1_id%&tid=default_admin - -User Details: -> %url%?_page=account_admin:view&id=%acct_id%&tid=default_admin - -Thank you, -%site_name%]]> - This e-mail is to alert you that %acct_first_name% %acct_last_name% made a payment for invoice number %sql1_id%.

Payment in the amount of %sql1_billed_amt% %sql2_three_digit% of the %sql1_total_amt% %sql2_three_digit% has been made.

Invoice Details | User Details

]]>
-
- - 25 - 1 - 28 - en - Notice: Invoice %sql1_id% Due! - - Dear %acct_first_name%,

Invoice number %sql1_id% is now overdue, please visit the link below for payment options.

%ssl_url%?_page=invoice:user_view&id=%sql1_id%

Thank you,
%site_name%

]]>
-
- - 26 - 1 - 29 - en - Manual Approval Required for Invoice Number %sql1_id% - - This -message is to notify you that payment has been recieved for invoice -number %sql1_id% via %sql2_checkout_plugin% and manual approval is -required.

-

%url%admin.php?_page=invoice:view&id=%sql1_id%

]]>
-
- - 27 - 1 - 30 - en - Invoice Approved - - Dear %acct_first_name%,

This alert is to notify you that invoice number %sql1_id% has been updated to approved status.

You can view the details of this invoice below:
%url%?_page=invoice:user_view&id=%sql1_id%

Thank you,
%site_name%

]]>
-
- - 28 - 1 - 31 - en - Manual Registrar Action Required - %sql3% - -Account Details: -%sql1_first_name% %sql1_middle_name% %sql1_last_name% -%sql1_address1% %sql1_address2% -%sql1_city%, %sql1_state% %sql1_zip% -%sql1_email% - %sql3%

Account Details:
%sql1_first_name% %sql1_middle_name% %sql1_last_name%
%sql1_address1% %sql1_address2%
%sql1_city%, %sql1_state% %sql1_zip%
%sql1_email%

]]>
-
- - 29 - 1 - 32 - en - - %sql3% - %sql3%
]]> - - - 30 - 1 - 33 - en - TAG (%sql2%) Domain Request - %sql3% - %sql3%
]]> - - - 32 - 1 - 35 - en - New Invoice Created [%sql1_id%] - - %acct_first_name%,

This e-mail is a friendly reminder that invoice %sql1_id% has been automatically generated for the amount of %sql2% and that payment is due  by %sql3%.

If you have already paid for this invoice, you may ignore this e-mail.

Otherwise, please follow the link below to view the invoice details and make payment.

%url%?_page=invoice:user_view&id=%sql1_id%

Thank you,
%site_name%

]]>
-
- - 33 - 1 - 36 - en - New Invoice Created [%sql1_id%] - - This e-mail is to remind you that a new invoice numbered %sql1_id% has been generated for the amount of %sql2% and is due by %sql3%.

%url%?_page=invoice:view&id=%sql1_id%&tid=default_admin

]]>
-
- - 34 - 1 - 37 - en - Service Suspended for Invoice [%sql1_id%] - - %acct_first_name%,

This e-mail is a friendly notice that service(s) for invoice %sql1_id% have been suspended due to nonpayment by %sql3%.

Please follow the link below to view the invoice details and make payment.

%ssl_url%?_page=invoice:user_view&id=%sql1_id%

Thank you,
%site_name%

]]>
-
- - 35 - 1 - 38 - en - Service Suspended for Invoice [%sql1_id%] - - This e-mail is notice that service(s) for invoice %sql1_id% have been suspended due to nonpayment by %sql3%.

%url%?_page=invoice:view&id=%sql1_id%&tid=default_admin

]]>
-
- - 36 - 1 - 39 - en - Hosting Details - %acct_first_name%, - -This e-mail is to alert you that your hosting account has been setup. The details are as follows: - -Username: %sql1_host_username% -Password: %sql1_host_password% - -Thank you, -%site_name% - %acct_first_name%,

This e-mail is to alert you that your hosting account has been setup. The details are as follows:
 
Username: %sql1_host_username%
Password: %sql1_host_password%

Thank you,
%site_name%

]]>
-
- - 37 - 1 - 40 - en - Hosting Updated - %acct_first_name%, - -This e-mail is to alert you that your hosting account has been modified. The details are as follows: - -Username: %sql1_host_username% -Password: %sql1_host_password% - -Thank you, -%site_name% - %acct_first_name%,

This e-mail is to alert you that your hosting account has been modified. The details are as follows:
 
Username: %sql1_host_username%
Password: %sql1_host_password%

Thank you,
%site_name%

]]>
-
- - 38 - 1 - 41 - en - Manual Provisioning: New Account - - This e-mail is to notify you that a new hosting service has been created that requires manual provisioning.

Invoice No.: %sql1_invoice_id%
Plan SKU: %sql1_sku%
Username: %sql1_host_username%
Password: %sql1_host_password%
Ip Address: %sql1_host_ip%

View the service:
%url%?_page=service:view&id=%sql1_id%&tid=default_admin

]]>
-
- - 39 - 1 - 42 - en - Manual Provisioning: Edit - - This e-mail is to notify you that a hosting service has been modified and may require manual provisioning.

Invoice No.: %sql1_invoice_id%
Plan SKU: %sql1_sku%
Username: %sql1_host_username%
Password: %sql1_host_password%
Ip Address: %sql1_host_ip%

View the service:
%url%?_page=service:view&id=%sql1_id%&tid=default_admin

]]>
-
- - 40 - 1 - 43 - en - Manual Provisioing: Suspend - - This e-mail is to notify you that a hosting service has been deactivated and requires manual provisioning.

Invoice No.: %sql1_invoice_id%
Plan SKU: %sql1_sku%
Username: %sql1_host_username%
Password: %sql1_host_password%
Ip Address: %sql1_host_ip%

View the service:
%url%?_page=service:view&id=%sql1_id%&tid=default_admin

]]>
-
- - 41 - 1 - 44 - en - Manual Provisioning: Activate - - This e-mail is to notify you that a hosting service has been activated and requires manual provisioning.

Invoice No.: %sql1_invoice_id%
Plan SKU: %sql1_sku%
Username: %sql1_host_username%
Password: %sql1_host_password%
Ip Address: %sql1_host_ip%

View the service:
%url%?_page=service:view&id=%sql1_id%&tid=default_admin

]]>
-
- - 42 - 1 - 45 - en - Manual Provisioning: Delete - This e-mail is to notify you that a hosting service has been deleted and requires manual provisioning. - -Invoice No.: %sql1_invoice_id% -Plan SKU: %sql1_sku% -Username: %sql1_host_username% -Password: %sql1_host_password% -Ip Address: %sql1_host_ip% -Domain: %sql1_domain_name%.%sql1_domain_tld% - This e-mail is to notify you that a hosting service has been deleted and requires manual provisioning.

Invoice No.: %sql1_invoice_id%
Plan SKU: %sql1_sku%
Username: %sql1_host_username%
Password: %sql1_host_password%
Ip Address: %sql1_host_ip%
Domain: %sql1_domain_name%.%sql1_domain_tld%

]]>
-
- - 43 - 1 - 46 - en - Service Cancelation Confirmation - %acct_first_name%, - -This e-mail is to notify you that your service id %sql1_id% for SKU %sql1_sku% has been canceled. - -Thank you, -%site_name% - %acct_first_name%,

This e-mail is to notify you that your service id %sql1_id% for SKU %sql1_sku% has been canceled.

Thank you,
%site_name%

]]>
-
- - 44 - 1 - 47 - en - Service Cancelation - - This e-mail is to notify you that %acct_first_name% %acct_last_name%'s service id %sql1_id% for SKU %sql1_sku% has been canceled.
]]> - - - 45 - 1 - 48 - en - Service Billing Schedule Change Requested - - This e-mail is to notify you that %acct_first_name% %acct_last_name% has requested a change of billing schedule for service id %sql1_id%.

Current Billing Schedule: %sql2%
Requested Billing Schedule: %sql3%

View service details | View account details | View invoice details

]]>
-
- - 11626 - 1 - 638 - en - Your %site_name% Account - %acct_first_name%, - -Your account has been blocked due to a high volume of logins from multiple IP addresses. - -Our system monitors all logins to ensure passwords are not shared with non-members. We have logged your username being used from %sql3% separate locations, which exceeds our limit of %sql2%. - -If you feel this is in error, please contact our customer service department. - -Thank you, -%site_name% -%url% - %acct_first_name%,
-
-Your account has been blocked due to a high volume of logins from multiple IP addresses.
-
-Our system monitors all logins to ensure passwords are not shared with -non-members. We have logged your username being used from %sql3% -separate locations, which exceeds our limit of %sql2%.
-
-If you feel this is in error, please contact our customer service department.
-
-Thank you,
-%site_name%
-%url%
]]>
-
- - 11627 - 1 - 639 - en - Banned User %acct_first_name% %acct_last_name% - - -
-%sql3% separate IPs have been logged for this account.
-
-User Details
-]]>
-
- - 11628 - 1 - 640 - en - Your Credit Card Expires Soon - - -
-Your %sql1_cart_type% on file ending with %sql2_card_num4% expires on %sql1_%/%sql1_%.
-
-Please login at the link below to update it so your service is not suspended.
-
-%ssl_url%?_page=account_billing:user_view&id=%sql1_id%
-
-Thank you,
-%site_name%]]>
-
- - 111633 - 1 - 651 - en - Invoice %sql1_id% suspended for non-payment - - - - -
- - -This e-mail is to inform you that Invoice # %sql1_id% and associated services have been suspended for non-payment.
- - -
- - -This invoice was being billed on net terms and %sql3% intervals have passed and the invoice has not been paid in full.
- - -
- - -You can visit login to your account and view the invoice at %url%?_page=invoice:view&id=%sql1_id% to review the invoice and make payment.
- - -
- - -Regards,
- - -%site_name%]]>
-
- - 111634 - 1 - 652 - en - Late Fees for Invoice %sql1_id% - - - - -
- - -This is a friendly notice to inform you that a late charge in the -amount of %sql2% has been applied to your account. These charges are -for invoice # %sql1_id%, which is presently being billed on net terms.
- - -
- - -You have %sql3% intervals remaining before the services associated with -this invoice are suspended and collection activity may occur. In the -meanwhile, we will continue to apply the late charges to your next -invoice on each remaining interval.
- - -
- - -You may login to your account at and view your invoice at -%url%?_page=invoice:user_view&id=%sql1_id% to make payment -arrangements.
- - -
- - -Thank you,
- - -%site_name%]]>
-
- - 111635 - 1 - 653 - en - Prepaid Pin Balance Low - Dear %acct_first_name%, - -Your prepaid balance for Pin # %sql1_pin% is low. - -The balance is currently %sql3%. - -To replenish this card, please visit %url%?_page=product_cat:menu - -Thank you, -%site_name% - - -
- -Your prepaid balance for Pin # %sql1_pin% is low.
- -
- -The balance is currently %sql3%.
- -
- -To replenish this card, please visit %url%?_page=product_cat:menu
-

- -Thank you,
- -%site_name%
-]]>
-
- - 111636 - 1 - 654 - en - Manual VoIP Provisioning [%sql3%] - This e-mail is to inform you that we that the following action is needed for service id %sql1_id%: %sql3%. - -Service Details: - -Product SKU: %sql1_sku% -Authenticate Username: %sql2_sip% -Phone Number: %sql2_sip% -Password: %sql2_data% - This e-mail is to inform you that we that the following action is needed for service id %sql1_id%: %sql3%.
-
-Service Details:
-
-Product SKU: %sql1_sku%
-Authenticate Username: %sql2_sip%
-Phone Number: %sql2_sip%
-Password: %sql2_data%

-]]>
-
- - 111637 - 1 - 655 - en - New Prepaid Account - Dear %acct_first_name%, - -This e-mail is to inform you that your new prepaid account has been setup. - -To use this prepaid account, please call %sql3% and from your phone number entered when you ordered ( %sql1_pin% ). - -Your balance for prepaid account number %sql1_pin% is presently %sql1_balance%. - -Thank you, -%site_name% - - -
- -This e-mail is to inform you that your new prepaid account has been setup.
- -
- -To use this prepaid account, please call %sql3% and from your phone number entered when you ordered ( %sql1_pin% ).
- -
- -Your balance for prepaid account number %sql1_pin% is presently %sql1_balance%.
- -
- -Thank you,
- -%site_name%
-]]>
-
- - 111638 - 1 - 656 - en - New Pin Number Added - Dear %acct_first_name%, - -This e-mail is to inform you that your new pin number has been setup. - -To use this pin number, please call toll-free %sql3% and enter the pin code as %sql1_pin% when prompted. - -Your balance for pin # %sql1_pin% is presently %sql1_balance%. - -Thank you, -%site_name% - - -
- -This e-mail is to inform you that your new pin number has been setup.
- -
- -To use this pin number, please call toll-free %sql3% and enter the pin code as %sql1_pin% when prompted.
- -
- -Your balance for pin # %sql1_pin% is presently %sql1_balance%.
- -
- -Thank you,
- -%site_name%
-]]>
-
- - 111639 - 1 - 657 - en - New VoIP Service Creation Notice - Dear %acct_first_name%, - -This e-mail is to inform you that we have created a new VoIP service. - -Product SKU: %sql1_sku% -Your Authenticate Username: %sql2_sip% -Your Phone Number: %sql2_sip% -Your Password: %sql2_data% -Your Voicemail PIN: %sql3_password% - -Thank you, -%site_name% - Dear %acct_first_name%,

This e-mail is to inform you that we have created a new VoIP service.

Product SKU: %sql1_sku%
Your Authenticate Username: %sql2_sip%
Your Phone Number: %sql2_sip%
Your Password: %sql2_data%
Your Voicemail PIN: %sql3_password%

-

Thank you,
-%site_name%
-

-]]>
-
- - 1111644 - 1 - 668 - en - Advance Billing Notification from %site_name% - Dear %acct_first_name%, - -This message is a friendly alert that an invoice in the amount of %sql2_symbol%%sql1_price% %sql2_three_digit% is set to generate shortly and will be due on %sql3%. - -(This amount does not reflect any appicable discounts, taxes, and usage charges, if any) - -If you wish to modify your service(s) with us prior to the automatic generation, please visit your account area at %url%. Please make sure your billing information is up to date so we can process the invoice without any service delays. - -Thank you, -%site_name% - Dear %acct_first_name%,


-This message is a friendly alert that an invoice in the amount of -%sql2_symbol%%sql1_price% %sql2_three_digit% is set to generate shortly -and will be due on %sql3%.
-
-(This amount does not reflect any appicable discounts, taxes, and usage charges, if any)
-
-If you wish to modify your service(s) with us prior to the automatic generation, please visit your account area at %url%. Please make sure your billing information is up to date so we can process the invoice without any service delays.
-
-Thank you,
-%site_name%

]]>
-
- - 1111644 - - - 1111644 - - diff --git a/modules/export/export.inc.php b/modules/export/export.inc.php deleted file mode 100644 index 35ebfac6..00000000 --- a/modules/export/export.inc.php +++ /dev/null @@ -1,65 +0,0 @@ -. - * - * Originally authored by Deon George - * - * @author Deon George - * @copyright 2009 Deon George - * @link http://osb.leenooks.net - * @license http://www.gnu.org/licenses/ - * @package AgileBill - * @subpackage Modules:Payment - */ - -/** - * The main AgileBill Export Class - * - * @package AgileBill - * @subpackage Modules:Export - */ -class export extends OSB_module { - /** - * @uses module - */ - public function add($VAR) { - if (isset($VAR[$this->table.'_module_id']) && empty($VAR[$this->table.'_map_data'])) { - global $VAR; - $VAR['_page'] = 'export:add'; - - require_once(PATH_MODULES.'module/module.inc.php'); - $mo = new module($VAR[$this->table.'_module_id']); - $VAR['module_name'] = $mo->getRecordAttr('name'); - - return; - } - - parent::add($VAR); - } - - public function view($VAR) { - global $smarty; - - $s = parent::view($VAR); - if (isset($s['module_id'])) { - require_once(PATH_MODULES.'module/module.inc.php'); - $mo = new module($s['module_id']); - - $smarty->assign('module_name',$mo->getRecordAttr('name')); - } - } -} -?> diff --git a/modules/export/export_construct.xml b/modules/export/export_construct.xml deleted file mode 100644 index dab9d247..00000000 --- a/modules/export/export_construct.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - export - - export
- - - - 0 - - plugin_name - - 25 - - 1 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Active - L - - - - Plugin - C(128) - any - - - - Module - I4 - numeric - - - - Item - I4 - numeric - 1 - - - - array - Map Data - C(128) - any - - - - - - plugin_name,module_id,item_id,map_data - id - id,plugin_name,module_id,item_id,map_data - id,plugin_name,module_id,item_id,map_data - id,plugin_name,module_id,item_id,map_data - item_id,map_data - - - - - - - - <add>Add Map Item</add> - - - - - - - id - checkbox - 25px - - - plugin_name - - - module_id - - - item_id - - - status - bool_icon - 20px - - - -
diff --git a/modules/export/export_install.xml b/modules/export/export_install.xml deleted file mode 100644 index 4d286b86..00000000 --- a/modules/export/export_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Export - - 1 - - export - - - - setup - - - - base - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/faq/auth.inc.php b/modules/faq/auth.inc.php deleted file mode 100644 index 07053e2b..00000000 --- a/modules/faq/auth.inc.php +++ /dev/null @@ -1,35 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Account - */ - -/** - * Public FAQ methods - */ - -$auth_methods = array( - array('module'=>'faq','method'=>'faq_categories'), - array('module'=>'faq','method'=>'faq_show'), - array('module'=>'faq','method'=>'autofill'), - array('module'=>'faq','method'=>'faq_search') -); -?> diff --git a/modules/faq/faq.inc.php b/modules/faq/faq.inc.php deleted file mode 100644 index 7271acc6..00000000 --- a/modules/faq/faq.inc.php +++ /dev/null @@ -1,230 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:FAQ - */ - -/** - * The main AgileBill FAQ Class - * - * @package AgileBill - * @subpackage Module:FAQ - */ -class faq extends OSB_module { - ### autofill for admin 'canned messages' in ticket reply - function autofill($VAR) - { - $db = &DB(); - if(!empty($VAR['faq_autofill']) && strlen($VAR['faq_autofill']) > 3) { - $result = $db->Execute( - $sql = sqlSelect( - $db, - Array( 'faq_translate', 'faq' ), - Array( 'A.*', 'B.name' ), - " A.faq_id = B.id AND MATCH(A.question, A.answer) AGAINST(".$db->qstr($VAR['faq_autofill'].'*')." IN BOOLEAN MODE)", - "" - ) - ); - } - - echo '
    '; - # Create the alert for no records found - if (@$result != false && $result->RecordCount() > 0) { - $i=0; - while(!$result->EOF && $i < 10) { - echo '
  • ' . stripcslashes( substr( ereg_replace("\r\n", " ", $result->fields['question']), 0, 65 ) ). '
    '. - ''. - '
  • '). "\r\n"; - $result->MoveNext(); - $i++; - } - } else { - include_once(PATH_CORE.'translate.inc.php'); - include_once(PATH_CORE.'xml.inc.php'); - $C_translate = new CORE_translate; - echo '
  • '. $C_translate->translate('admin_no_match','faq') .'
    ' . - ''. - '
  • ' . "\r\n"; - } - echo "
"; - - } - - - ### Get the faq details: - function faq_show($VAR) - { - if (!empty($VAR['id'])) { - $db = &DB(); - $rs = $db->Execute( - $sql = sqlSelect( - $db, - Array( 'faq_translate', 'faq', 'faq_category' ), - Array( 'A.*', 'B.name', 'C.group_avail' ), - " B.id = ::".$VAR['id'].":: AND B.id = A.faq_id AND A.language_id = '".SESS_LANGUAGE."' AND B.status = 1 AND C.status = 1 ", - "" - ) - ); - } - - global $C_auth; - if( !$rs || $rs->RecordCount() == 0 || !$C_auth->auth_group_by_id( unserialize( $rs->fields['group_avail'] ))) { - include_once(PATH_CORE.'translate.inc.php'); - include_once(PATH_CORE.'xml.inc.php'); - $C_translate = new CORE_translate; - echo $C_translate->translate('no_faqs','faq'); - } else { - echo '

' . ereg_replace("\r\n", "
", stripcslashes( htmlentities( $rs->fields['question']) ) ). '

' . - '

' . ereg_replace("\r\n", "
", $this->linkalize(stripcslashes( htmlentities( $rs->fields['answer']) ) ) ). '

'; - } - } - - - ### Get the faq translation: - function faq_search($VAR) - { - $db = &DB(); - if(!empty($VAR['search']) && strlen($VAR['search']) > 3) { - $result = $db->Execute( - $sql = sqlSelect( - $db, - Array( 'faq_translate', 'faq', 'faq_category' ), - Array( 'A.*', 'B.name', 'C.group_avail' ), - " A.faq_id = B.id AND B.faq_category_id = C.id AND MATCH(A.question, A.answer) AGAINST(".$db->qstr($VAR['search'].'*')." IN BOOLEAN MODE) AND B.status = 1 AND C.status=1", - "" - ) - ); - } elseif (!empty($VAR['category_id'])) { - $result = $db->Execute( - $sql = sqlSelect( - $db, - Array( 'faq_translate', 'faq', 'faq_category' ), - Array( 'A.*', 'B.name', 'C.group_avail' ), - " B.faq_category_id = ::".$VAR['category_id'].":: AND B.id = A.faq_id AND B.faq_category_id = C.id AND A.language_id = '".SESS_LANGUAGE."' AND B.status = 1 AND C.status=1", - "" - ) - ); - } - - echo '
    '; - if (@$result != false && $result->RecordCount() > 0) { - $i=0; - while(!$result->EOF) { - global $C_auth; - if( $C_auth->auth_group_by_id( unserialize($result->fields['group_avail'] ))) { - echo '
  • '. "\r\n"; - $i++; - } - $result->MoveNext(); - } - } else { - include_once(PATH_CORE.'translate.inc.php'); - include_once(PATH_CORE.'xml.inc.php'); - $C_translate = new CORE_translate; - echo '
  • '. $C_translate->translate('admin_no_match','faq') .'
  • ' . "\r\n"; - } - echo "
"; - } - - - - ### Get the authorized/active categories - function faq_categories($VAR) - { - $db = &DB(); - $rs = $db->Execute( $sql= - $sql = sqlSelect( - $db, - 'faq_category', - '*' , - " status=1 ", - "sort_order,name,date_orig" - ) - ); - - if(!$rs || $rs->RecordCount() == 0) { - // - } else { - while(!$rs->EOF) { - // validate groups - global $C_auth; - if( $C_auth->auth_group_by_id( unserialize($rs->fields['group_avail']) )) { - $smart[] = $rs->fields; - } - $rs->MoveNext(); - } - } - - global $smarty; - $smarty->assign('faq_category_list', @$smart); - } - - /** - * Add a entry to the database - */ - public function add($VAR) { - global $VAR; - - if (empty($VAR['faq_translate_question'])) - return false; - - $q = $VAR['faq_translate_question']; - unset($VAR['faq_translate_question']); - - $a = ''; - if (isset($VAR['faq_translate_answer'])) { - $a = $VAR['faq_translate_answer']; - unset($VAR['faq_translate_answer']); - } - - $id = parent::add($VAR); - - # Insert translation - if ($id) { - $db = &DB(); - $db->Execute(sqlInsert($db,'faq_translate',array('faq_id'=>$id,'date_orig'=>time(),'date_last'=>time(),'language_id'=>DEFAULT_LANGUAGE,'question'=>$q,'answer'=>$a))); - } - } - - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $this->associated_DELETE[] = - Array( - 'table' => 'faq_translate', - 'field' => 'faq_id' - ); - - $db = new CORE_database; - $db->mass_delete($VAR, $this, ""); - } - - function linkalize($text) - { - $text = preg_replace("/([^\w\/])(www\.[a-z0-9\-]+\.[a-z0-9\-]+)/i", "$1http://$2", $text); - $text = preg_replace("/([\w]+:\/\/[\w-?&;#~=\.\/\@]+[\w\/])/i", "$1", $text); //make all URLs links - $text = preg_replace("/[\w-\.]+@(\w+[\w-]+\.){0,3}\w+[\w-]+\.[a-zA-Z]{2,4}\b/i","$0",$text); - return $text; - } -} -?> diff --git a/modules/faq/faq_construct.xml b/modules/faq/faq_construct.xml deleted file mode 100644 index a5107c1f..00000000 --- a/modules/faq/faq_construct.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - faq - - faq
- - - - 0 - - sort_order,date_orig,name - - 25 - - 0 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - Category - I4 - faq_category - name - - - Date Start - I8 - date - - - Date Expire - I8 - date - - - Sort Order - I4 - - - Active - L - - - Name - C(255) - 1 - 255 - any - 1 - - - - - - faq_category_id,date_orig,sort_order,status,name - id,site_id,faq_category_id,date_orig,date_last,date_start,date_expire,sort_order,status,name - id,site_id,faq_category_id,date_orig,date_last,date_start,date_expire,sort_order,status,name - id,site_id,faq_category_id,date_orig,date_last,date_start,date_expire,sort_order,status,name - id,site_id,faq_category_id,date_orig,date_last,date_start,date_expire,sort_order,status,name - - - - - - - - <add>Add FAQ</add> - <search_form>Search FAQ</search_form> - <view>FAQ</view> - - - - - - - id - checkbox - 25px - - - name - - - faq_category_id - - - -
diff --git a/modules/faq/faq_install.xml b/modules/faq/faq_install.xml deleted file mode 100644 index 332a5725..00000000 --- a/modules/faq/faq_install.xml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - FAQ - - 1 - - faq - - - - faq - - faq_category,faq_translate - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - Search - 1 - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/faq_category/auth.inc.php b/modules/faq_category/auth.inc.php deleted file mode 100644 index aeffe7e3..00000000 --- a/modules/faq_category/auth.inc.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Account - */ - -/** - * Public FAQ Category methods - */ - -$auth_methods = array( - array('module'=>'faq_category','method'=>'category_list') -); -?> diff --git a/modules/faq_category/faq_category.inc.php b/modules/faq_category/faq_category.inc.php deleted file mode 100644 index 0c4b5044..00000000 --- a/modules/faq_category/faq_category.inc.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:FAQ - */ - -/** - * The main AgileBill FAQ Category Class - * - * @package AgileBill - * @subpackage Modules:FAQ - */ -class faq_category extends OSB_module { - ############################## - ## GET AUTH CATEGORIES ## - ############################## - function category_list($VAR) - { - - /* check if current session is authorized for any ticket departments.. - and return true/false... - */ - global $smarty; - $db = &DB(); - $sql = 'SELECT DISTINCT fc.id,fc.name,fc.group_avail,count(f.id) children, fc.site_id, fc.status - FROM - ' . AGILE_DB_PREFIX . 'faq_category fc - INNER JOIN - ' . AGILE_DB_PREFIX . 'faq f ON f.faq_category_id = fc.id - GROUP BY (fc.id) - HAVING - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - status = ' . $db->qstr('1') .' - ORDER BY fc.sort_order,fc.name'; - - $result = $db->Execute($sql); - - if($result->RecordCount() == 0) - { - $smarty->assign('faq_category_list_display', false); - return false; - } - - global $C_auth; - $ii = 0; - - while(!$result->EOF) - { - @$arr = unserialize($result->fields['group_avail']); - - for($i=0; $iauth_group_by_id($arr[$i])) - { - ### Add to the array - $ii++; - $arr_smarty[] = Array( 'name' => $result->fields['name'], - 'id' => $result->fields['id'], - 'children' => $result->fields['children']); - - $i=count($arr); - } - } - $result->MoveNext(); - } - - if($ii == "0") - { - $smarty->assign('faq_category_list_display', false); - return false; - } - else - { - $smarty->assign('faq_category_list_display', true); - $smarty->assign('faq_category_list_results', $arr_smarty); - return true; - } - } -} -?> diff --git a/modules/faq_category/faq_category_construct.xml b/modules/faq_category/faq_category_construct.xml deleted file mode 100644 index 4b3b4921..00000000 --- a/modules/faq_category/faq_category_construct.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - faq_category - - faq_category
- - faq - - 0 - - sort_order,name - - 25 - - 1 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - Groups that can access this category - C(255) - any - array - - - Name - C(128) - 1 - 128 - any - 1 - - - Description - X2 - - - Active - L - - - Sort Order - I4 - - - - - - date_orig,group_avail,name,description,status,sort_order - id,site_id,date_orig,group_avail,name,description,status,sort_order - id,site_id,date_orig,group_avail,name,description,status,sort_order - id,site_id,date_orig,group_avail,name,description,status,sort_order - id,site_id,date_orig,group_avail,name,description,status,sort_order - - - - - - - - <add>Add FAQ Category</add> - <view>FAQ Category</view> - - - - - - - id - checkbox - 25px - - - status - bool_icon - 20px - - - name - - - sort_order - - - -
diff --git a/modules/faq_category/faq_category_install.xml b/modules/faq_category/faq_category_install.xml deleted file mode 100644 index d424a903..00000000 --- a/modules/faq_category/faq_category_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - FAQ Categories - - 1 - - faq_category - - - - faq - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/faq_translate/faq_translate.inc.php b/modules/faq_translate/faq_translate.inc.php deleted file mode 100644 index 610ebe13..00000000 --- a/modules/faq_translate/faq_translate.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:FAQ - */ - -/** - * The main AgileBill FAQ Class - * - * @package AgileBill - * @subpackage Modules:FAQ - */ -class faq_translate extends OSB_module { -} -?> diff --git a/modules/faq_translate/faq_translate_construct.xml b/modules/faq_translate/faq_translate_construct.xml deleted file mode 100644 index 7acf3890..00000000 --- a/modules/faq_translate/faq_translate_construct.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - faq_translate - - faq_translate
- - faq - - 0 - - faq_id - - 25 - - 0 - - - - answer,question - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - I4 - faq - name - - - C(16) - - - X2 - 1 - 1 - - - X2 - 1 - 255 - any - - - - - - date_orig,faq_id,language_id,answer,question - id,site_id,date_orig,date_last,faq_id,language_id,answer,question - id,site_id,date_orig,date_last,faq_id,language_id,answer,question - id,site_id,date_orig,date_last,faq_id,language_id,answer,question - id,site_id,date_orig,date_last,faq_id,language_id,answer,question - - - - - - - - <add>Add XXX</add> - - - - - - - id - checkbox - 25px - - - faq_id - - - language_id - - - question - - - -
diff --git a/modules/faq_translate/faq_translate_install.xml b/modules/faq_translate/faq_translate_install.xml deleted file mode 100644 index 9a0e5bf0..00000000 --- a/modules/faq_translate/faq_translate_install.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - 0 - - faq_translate - - - - faq - - - - - - - - - - add - - - - delete - - - - search - - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/group/group.inc.php b/modules/group/group.inc.php deleted file mode 100644 index be954af5..00000000 --- a/modules/group/group.inc.php +++ /dev/null @@ -1,161 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Group - */ - -/** - * The main AgileBill Group Class - * - * @package AgileBill - * @subpackage Module:Group - */ -class group extends OSB_module { - /** - * Add a record - */ - public function add($VAR) { - $group_id = parent::add($VAR); - - if ($group_id) { - # Add the new group to the account_group table: - $db = &DB(); - $result = $db->Execute(sqlInsert($db,'account_group',array('date_orig'=>time(),'group_id'=>$group_id,'account_id'=>SESS_ACCOUNT,'acive'=>1))); - if ($result === false) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - return; - } - - } else - return false; - - # Update the current user's authentication so the newly added group appears - # as available to them - global $C_auth; - $C_auth->auth_update(); - - return; - } - - private function isAuthorised($VAR) { - # Remove any group ids <= 1001 from the VAR array: - global $C_debug,$C_auth; - - $id = array(); - - if (isset($VAR['id'])) - $id = explode(',',$VAR['id']); - - for ($i=0; $i 1001) { - - # Check if group allowed: - if (! $C_auth->auth_group_by_id($id[$i])) { - $C_debug->alert('The selected group cannot be modified as your account is not authorized for it.'); - - return true; - } - - } else { - $C_debug->alert('The selected group is part of the CORE and cannot be edited or deleted.'); - - return true; - } - } - } - - /** - * Update an entry - */ - public function update($VAR) { - if (! $this->isAuthorised($VAR)) - return parent::update($VAR); - } - - /** - * Delete a record - */ - public function delete($VAR) { - $this->associated_DELETE = array(); - - array_push($this->associated_DELETE,array('table'=>'account_group','field'=>'group_id')); - array_push($this->associated_DELETE,array('table'=>'group_method','field'=>'group_id')); - - if (! $this->isAuthorised($VAR)) - return parent::delete($VAR); - } - - /** - * Draw the group layout - */ - public function tpl_visual_layout() { - $class = 'form_field'; - - # Get the default group - if (! isset($default)) - $default = unserialize(DEFAULT_GROUP); - - for ($i=0; $iExecute(sqlSelect($db,'group','id,name,parent_id','id!=0','parent_id,name')); - - # Error handling - if (! $result) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - - # Number of results - if ($result->RecordCount() > 0) - echo $this->build_nested_list($result->GetArray(),0,0); - else - echo _('No groups available!'); - } - - /** - * This function will build a nested option list - * showing the heirachy of the groups - * - * @see tpl_visual_layout - */ - private function build_nested_list($arr,$level,$current) { - $ret = ''; - - for ($i=0; $i < count($arr); $i++) { - if ($arr[$i]['parent_id'] == $current) { - if ($level) - $ret .= sprintf('%s|__ ',str_repeat('   ',$level)); - - $ret .= sprintf('  %s   %s
',$arr[$i]['name'],$arr[$i]['id'],_('Edit')); - $ret .= $this->build_nested_list($arr,$level+1,$arr[$i]['id']); - } - } - - return $ret; - } -} -?> diff --git a/modules/group/group_construct.xml b/modules/group/group_construct.xml deleted file mode 100644 index 2e0e6455..00000000 --- a/modules/group/group_construct.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - group - - group
- - - - 0 - - parent_id,name - - 25 - - 0 - - - - date_expire - status,parent_id,date_start,date_expire - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - I8 - date-time - Date Start - - - I8 - date-time - Date End - - - I4 - Parent - - - - Active - L - - - L - Group Pricing - - - C(128) - any - 3 - 64 - 1 - Name - - - X2 - Notes - - - - - - date_start,date_expire,name,notes,status,pricing,parent_id - date_start,date_expire,name,notes,status,pricing,parent_id - id - id,date_orig,date_start,date_expire,name,notes,status,pricing,parent_id - name - - - - - - - - <add>Add Group</add> - <search_show>Groups</search_show> - <tpl_title_visual>Group Layout Visualisation</tpl_title_visual> - <view>Modify Group</view> - - - - - -
diff --git a/modules/group/group_install.xml b/modules/group/group_install.xml deleted file mode 100644 index 722b1535..00000000 --- a/modules/group/group_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Groups - - 1 - - group - - - - setup - - - - core - - - - - - Add - 1 - add - - - - delete - - - - 1 - List - search - - - - - search_show - - - - update - - - - view - - - - tpl_visual_layout - - - - diff --git a/modules/group/group_install_data.xml b/modules/group/group_install_data.xml deleted file mode 100644 index 4d899f38..00000000 --- a/modules/group/group_install_data.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - 0 - 1 - 0 - 0 - 0 - 0 - 1 - 1 - All Users - All unregistered users will have access to this. - - - 2 - 1 - 0 - 0 - 0 - 0 - 1 - 1 - Registered Users - - - 4 - 1 - 0 - 0 - 0 - 2 - 1 - 0 - Staff - - - 1001 - 1 - 0 - 0 - 0 - 2 - 1 - 0 - Root - - - 1016 - - diff --git a/modules/group_method/group_method_construct.xml b/modules/group_method/group_method_construct.xml deleted file mode 100644 index 4ecacac1..00000000 --- a/modules/group_method/group_method_construct.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - group_method - - group_method
- - - - 0 - - group_id - - 25 - - - group_id - module_id,method_id - - - - - I4 - 1 - 1 - - - I4 - 1 - - - I4 - module_method - name - any - - - I4 - group - name - any - - - I4 - module - name - any - - - - - id,site_id,method_id,group_id,module_id - id,site_id,method_id,group_id,module_id - id,site_id,method_id,group_id,module_id - id,site_id,method_id,group_id,module_id - id,site_id,method_id,group_id,module_id - - - 0 -
diff --git a/modules/group_method/group_method_install.xml b/modules/group_method/group_method_install.xml deleted file mode 100644 index 0b1f24f4..00000000 --- a/modules/group_method/group_method_install.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - group_method - group - module_method - - core - - - - - search - - - view - - - add - - - delete - - - update - - - search_show - - - - diff --git a/modules/import/import.inc.php b/modules/import/import.inc.php deleted file mode 100644 index 56566476..00000000 --- a/modules/import/import.inc.php +++ /dev/null @@ -1,319 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Import - */ - -/** - * The main AgileBill Import Class - * - * @package AgileBill - * @subpackage Modules:Import - */ -class import extends OSB_module { - protected $actions = array(); - - /** - * Test remote database connectivity - */ - protected function test() { - global $C_debug,$VAR; - - # Connect to the remote DB - $dbr = &NewADOConnection($this->type); - $dbr->Connect($this->host,$this->user,$this->pass,$this->db); - - if (! empty($dbr->_errorMsg)) - $C_debug->alert(sprintf('Failed: %s',$dbr->_errorMsg)); - else - $this->pre_test(); - - # Return to main import page - printf("",$VAR['plugin']); - } - - /** - * Record pre-setup tests - */ - protected function pre_test() { - global $C_debug,$VAR; - - $C_debug->alert('Marked Done!'); - - $db = &DB(); - - # Insert the import record - $this->import_transaction($this->plugin,$VAR['action'],null,null,null,null,$db); - - # Return to main import page - printf("",$VAR['plugin']); - } - - # Store import id - protected function import_transaction($plugin,$action,$ab_table,$ab_id,$remote_table,$remote_id,&$db) { - # Check that this record has not already been imported: - $sql = sqlSelect($db,'import','id', - sprintf('plugin = %s AND action = %s AND ab_table = %s AND ab_id = %s AND remote_table = %s AND remote_id = %s', - $db->qstr($plugin), - $db->qstr($action), - $db->qstr($ab_table), - $db->qstr($ab_id), - $db->qstr($remote_table), - $db->qstr($remote_id) - )); - $rs = $db->Execute($sql); - - # Check results - if ($rs === false || $rs->RecordCount() > 0) { - $db->FailTrans(); - return false; - } - - # Insert the record - $update = array( - 'date_orig'=>time(), - 'plugin'=>$plugin, - 'action'=>$action, - 'ab_table'=>$ab_table, - 'ab_id'=>$ab_id, - 'remote_table'=>$remote_table, - 'remote_id'=>$remote_id); - - $db->Execute(sqlInsert($db,'import',$update)); - - return true; - } - - # Do an action for a specific plugin: - public function do_action($VAR) { - # Load the plugin - if (! is_file($file = sprintf('%simport/%s.php',PATH_PLUGINS,$VAR['plugin']))) - return false; - - # New instance - include_once($file); - $import_plugin = new import_plugin; - - # Call the required method - call_user_func(array($import_plugin,$VAR['action']),$VAR,$import_plugin); - } - - # Do an action for a specific plugin: - public function undo_action($VAR) { - $db = &DB(); - - # Make sure this action is done... - $rs = $db->Execute(sqlSelect($db,'import','ab_table,ab_id',sprintf('plugin=::%s:: AND action=::%s::',$VAR['plugin'],$VAR['action']))); - - if ($rs->RecordCount() == 0) { - echo 'There is nothing to undo!'; - - return; - } - - while (! $rs->EOF) { - if (trim($rs->fields['ab_table']) && trim($rs->fields['ab_id'])) - $db->Execute(sqlDelete($db,$rs->fields['ab_table'],sprintf('id=%s',$rs->fields['ab_id']))); - $rs->MoveNext(); - } - - # Delete the selected action - $db->Execute(sqlDelete($db,'import',sprintf('plugin=::%s:: AND action=::%s::',$VAR['plugin'],$VAR['action']))); - } - - /** - * View import plugins - */ - public function view($VAR) { - # Load the plugin - if (! is_file($file = sprintf('%simport/%s.php',PATH_PLUGINS,$VAR['plugin']))) - return false; - - $db = &DB(); - - include_once($file); - $import_plugin = new import_plugin; - - # Loop through each action to determine its availibility status - $actions = $import_plugin->actions; - $done = false; - - for ($i=0; $iExecute(sqlSelect($db,'import','id',sprintf('plugin=::%s:: AND action=::%s::',$import_plugin->name,$actions[$i]['name']))); - - if ($rs->RecordCount() > 0) { - $actions[$i]['status'] = 'done'; - $actions[$i]['records'] = $rs->RecordCount(); - $done[$actions[$i]['name']] = true; - } - } - } - - global $smarty; - $smarty->assign('name',$import_plugin->name); - $smarty->assign('instructions',$import_plugin->instructions); - $smarty->assign('import',$actions); - } - - /** - * Search for available plugs - * - * @uses CORE_search - */ - public function search($VAR) { - # Read the contents of the directory - $count = 0; - $dir = opendir(PATH_PLUGINS.'import'); - while ($file_name = readdir($dir)) - if (! in_array($file_name,array('.','..')) && ! preg_match('/^_/',$file_name) && preg_match('/.php$/',$file_name)) - $count++; - - # Define the DB vars as a Smarty accessible block - global $smarty; - - # create the search record: - if ($count > 0) { - # create the search record - include_once(PATH_CORE.'search.inc.php'); - $search = new CORE_search; - - $arr['module'] = $this->module; - $arr['sql'] = ''; - $arr['limit'] = '999'; - $arr['order_by'] = 'name'; - $arr['results'] = $count; - $search->add($arr); - - # define the search id and other parameters for Smarty - $smarty->assign('search_id',$search->id); - - # page - $smarty->assign('page','1'); - - # limit - $smarty->assign('limit','999'); - - # order_by - $smarty->assign('order_by','name'); - - # define the result count - $smarty->assign('results',$count); - } - } - - /** - * Show search results - */ - public function search_show($VAR) { - # Read the contents of the directory - $count = 0; - $dir = opendir(PATH_PLUGINS.'import'); - while ($file_name = readdir($dir)) { - if (! in_array($file_name,array('.','..')) && ! preg_match('/^_/',$file_name) && preg_match('/.php$/',$file_name)) { - $result[$count]['name'] = preg_replace('/.php$/','',$file_name); - $result[$count]['id'] = $count; - $count++; - } - } - - $class_name = true; - for ($i=0; $iassign('search_show',$smart); - $smarty->assign('page',$VAR['page']); - $smarty->assign('order',$smarty_order); - $smarty->assign('sort',$smarty_sort); - $smarty->assign('limit',$search->limit); - $smarty->assign('search_id',$search->id); - $smarty->assign('results',$count); - - # total pages - $smarty->assign('pages',1); - - # current page - $smarty->assign('page',1); - - # page array for menu - $smarty->assign('page_arr',''); - } - - /** - * Read a plugin map file, for some default values - * - * @uses CORE_xml; - */ - protected function read_map() { - # If there is a map file, open it - $pmap = array(); - - if (file_exists($mapfile = sprintf('%simport/%s_map.xml',PATH_PLUGINS,$this->plugin))) { - $C_xml = new CORE_xml; - $map = $C_xml->xml_to_array($mapfile); - - if (isset($map['map'])) - foreach ($map['map'] as $index => $details) - foreach ($map['map'][$index] as $values) { - $a = $values['id']; - unset($values['id']); - $pmap[$index][$a] = $values; - } - } - - return $pmap; - } -} -?> diff --git a/modules/import/import_construct.xml b/modules/import/import_construct.xml deleted file mode 100644 index 6a688ad8..00000000 --- a/modules/import/import_construct.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - import - - import
- - - - 0 - - plugin - - 25 - - 1 - - - - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - I8 - - - C(32) - - - C(32) - - - C(32) - - - C(32) - - - I8 - - - I8 - - - - - - id,site_id,date_orig,plugin,local_table,ab_table,remote_id,ab_id - id,site_id,date_orig,plugin,local_table,ab_table,remote_id,ab_id - id,site_id,date_orig,plugin,local_table,ab_table,remote_id,ab_id - id,site_id,date_orig,plugin,local_table,ab_table,remote_id,ab_id - id,site_id,date_orig,plugin,local_table,ab_table,remote_id,ab_id - - - - - - - - <view>Import</view> - - - - - - - none - plugin - 90px - - - 10px - - - -
diff --git a/modules/import/import_install.xml b/modules/import/import_install.xml deleted file mode 100644 index 63a4f660..00000000 --- a/modules/import/import_install.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - Import - - 1 - - import - - ]]> - - setup - - - - - - - - - - List - 1 - search - - - - - search_show - - - - view - - - - do_action - - - undo_action - - - diff --git a/modules/invoice/PDF/pdf_invoice_itemised-fpdf.inc.php b/modules/invoice/PDF/pdf_invoice_itemised-fpdf.inc.php deleted file mode 100644 index 176d535c..00000000 --- a/modules/invoice/PDF/pdf_invoice_itemised-fpdf.inc.php +++ /dev/null @@ -1,621 +0,0 @@ -Image($logo,$x,$y,$size); - } - - /** - * Draw the Company Address - */ - public function drawCompanyAddress($inv) { - global $C_translate; - - # Add the company address next to the logo - $x = 40; $y = 9; - - $this->SetFont('arial','B',10); - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['NAME']); $y += 4; - - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['TAXID']); $y += 6; - - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['ADDRESS']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['site']['CITY'],$inv->print['site']['STATE'],$inv->print['site']['ZIP'])); $y += 4; - - $y += 2; - $this->SetXY($x,$y); $this->Cell(0,0,'Phone:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['PHONE']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,'Fax:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['FAX']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,'Web:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['URL']); $y += 4; - } - - public function drawRemittenceStub($inv) { - global $C_translate; - - # Draw the remittance line - $this->Line(9,195,200,195); - - $x = 18; $y = 200; - - $this->SetFont('arial','B',13); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_payment_remit','setup_invoice')); $y +=5; - - $this->SetFont('arial','',8); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_return1','setup_invoice')); $y +=3; - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_return2','setup_invoice').' '.$inv->print['site']['NAME']); - - # Due Date - $x = 110; $y = 200; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_bill_date','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['date_orig']),0,0,'R'); - - # Account ID - $y = 205; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_account_number','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->print['account']['id']),0,0,'R'); - - # Invoice number - $y = 210; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->getPrintInvoiceNum()),0,0,'R'); - - # Company Address - $y = 216; - $this->SetFont('arial','',10); - $this->SetXY(18,$y); $this->Cell(0,0,$inv->print['site']['NAME']); $y += 4; - $this->SetXY(18,$y); $this->Cell(0,0,$inv->print['site']['ADDRESS']); $y += 4; - $this->SetXY(18,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['site']['CITY'],$inv->print['site']['STATE'],$inv->print['site']['ZIP'])); $y += 4; - - # Previous Due - $y = 215; - $this->SetFont('arial','',9); - $this->SetXY($x,$y); $this->Cell(0,0,'Previous Due'); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()),0,0,'R'); - - $y = 219; - $this->SetFont('arial','',9); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_amount_due_by','setup_invoice').' '.date(UNIX_DATE_FORMAT,$inv->print['invoice']['due_date'])); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - - # Total Due - $y = 224; - $this->SetFont('arial','B',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Total Due'); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()+$inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - - # Draw the Customers Address - $x = 25; $y = 248; - - $this->SetFont('arial','B',12); - - if ($this->billToCompany && ! empty($inv->print['account']['company'])) - $name = $inv->print['account']['company']; - else - $name = sprintf('%s %s',$inv->print['account']['first_name'],$inv->print['account']['last_name']); - - $this->SetXY($x,$y); $this->Cell(0,0,html_entity_decode($name,ENT_NOQUOTES)); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s %s ',$inv->print['account']['address1'],$inv->print['account']['address2'])); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['account']['city'],$inv->print['account']['state'],$inv->print['account']['zip'])); $y += 5; - } - - public function drawInvoiceHeader($inv) { - global $C_translate; - - $x = 125; $y = 10; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-3); $this->Cell(0,35+($inv->print['invoice']['billed_amt'] ? 5 : 0),'',1,0,'',1); - - # Draw a box around the invoice due date and amount due. - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,'TAX INVOICE'); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->getPrintInvoiceNum()),0,0,'R'); - - # Invoice number at top of page. - $y += 7; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_bill_date','setup_invoice')); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_amount_due_by','setup_invoice')); - $this->SetFont('arial','B',11); - - $y -= 5; - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['date_orig']),0,0,'R'); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['due_date']),0,0,'R'); - - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Previous Due'); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()),0,0,'R'); - - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_current_charges','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']),0,0,'R'); - - if ($inv->print['invoice']['billed_amt']) { - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Payments Received'); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['billed_amt']),0,0,'R'); - } - - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Total Payable'); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()+$inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - } - - #@todo Limit the size of the news to 6 lines - public function drawNews($news) { - global $C_translate; - - if (! $news) - return; - - $x = 9; $y = 170; - - # Draw a box. - $this->SetFillColor(243); - $this->SetXY($x-1,$y-3); $this->Cell(0,20,'',1,0,'',1); - - $this->SetFont('arial','',8); - $this->SetXY($x,$y); $this->MultiCell(0,3,str_replace('\n',"\n",$news),0,'L',0); - } - - #@todo make this list dynamic - public function drawPaymentMethods($inv) { - $x = 110; $y = 242; - - # Draw a box. - $this->SetFillColor(235); - $this->SetXY($x-1,$y-3); $this->Cell(0,32,'',1,0,'',1); - - $this->SetFont('arial','B',8); - $this->SetXY($x,$y); $this->Cell(0,0,'This invoice can also be paid by:'); $y += 4; - - # Direct Debit - $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-dd.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('arial','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Credit to our Bank Account'); $y += 3; - $this->SetFont('arial','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'BSB:'); $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'ACCOUNT:'); $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'REF:'); $y += 3; - - $y -= 9; - $this->SetFont('arial','B',8); - $this->SetXY($x+30,$y); $this->Cell(0,0,'633-000'); $y += 3; - $this->SetXY($x+30,$y); $this->Cell(0,0,'120 440 821'); $y += 3; - $this->SetXY($x+30,$y); $this->Cell(0,0,$inv->getPrintInvoiceID()); $y += 3; - - # Direct Debit - $y += 3; - $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-dd.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('arial','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Debit'); $y += 3; - $this->SetFont('arial','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Please visit '.$inv->print['site']['URL']); $y += 3; - } - - /** - * Draw previous invoices due - */ - public function drawSummaryInvoicesDue($items) { - $x = 125; $y = $this->sum_y ? $this->sum_y : 50; - - # Calculate the box size - $box = count($items) < $this->itemsPreviousMax ? count($items) : $this->itemsPreviousMax; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-3); $this->Cell(0,5*(1+$box)+1,'',1,0,'',1); - - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,'Previous Invoices due'); $y += 5; - - $this->SetFont('arial','',11); - $i = 0; - $sum_total = 0; - foreach ($items as $line) { - if (++$i < $this->itemsPreviousMax) { - $this->SetXY($x,$y); - $this->Cell(0,0,sprintf('%s #%06s',date(UNIX_DATE_FORMAT,$line['date_orig']),$line['id'])); - $this->Cell(0,0,$this->_currency($line['total_amt']-$line['billed_amt']),0,0,'R'); $y += 5; - - } else { - $sum_total += $line['total_amt']-$line['billed_amt']; - } - } - - if ($sum_total) { - $this->SetXY($x,$y); - $this->SetFont('arial','I',11); - $this->Cell(0,0,'Other invoices'); - $this->SetFont('arial','',11); - $this->Cell(0,0,$this->_currency($sum_total),0,0,'R'); $y += 5; - } - - $this->sum_y = $y+5; - } - - /** - * Called before begining to loop the invoice_item table. Used to set initial values. - */ - public function drawLineItems_pre($iteration) { - $this->iteration = $iteration; - if ($iteration>1) - return false; - - return true; - } - - /** - * Called once per line item to add to the PDF invoice. This function serves to - * direct each iteration to a different function which handles a specific piece - * of the PDF building puzzle. - */ - public function drawLineItems($db,$line,$invnum) { - switch($this->iteration) { - case 0: - $this->drawLineItems_0($db,$line,$invnum); - break; - - case 1: - $this->drawLineItems_1($db,$line,$invnum); - break; - - default: - echo 'Unknown PDF iteration encountered. Halting.'; - exit; - } - } - - /** - * Draws the non-VoIP related items for iteration 0. - */ - private function drawLineItems_0($db,$line,$invnum) { - global $C_translate; - - if ($line['price_type'] == 0 && $line['item_type'] == 5) - return; - - $x = 10; $y = 5; - if ($this->i == 0 || $this->i%51 == 0) { - $this->AddPage(); - - $this->SetFont('arial','B',12); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_itemized_charges','setup_invoice')); - $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R'); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$invnum,0,0,'C'); - - # Draw table headers - $y += 10; - $this->SetFont('arial','B',8); - $this->SetXY($x,$y); - $this->Cell(0,0,$C_translate->translate('pdf_item_description','setup_invoice')); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_quantity','setup_invoice')); - $this->SetX($x+160); - $this->Cell(10,0,$C_translate->translate('pdf_item_cost','setup_invoice'),0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R'); - $this->Line($x,$y+2,200,$y+2); - $y += 5; - $this->SetY($y); - } - - $this->SetFont('arial','',8); - $this->SetX($x); - $this->Cell(0,0,$line['name']); - - if (isset($line['price_base'])) { - $this->SetX($x+160); - $this->Cell(10,0,$this->_currency($line['price_base']),0,0,'R'); - } - - if (isset($line['qty'])) { - $this->SetX($x+130); - $this->Cell(10,0,$line['qty'],0,0,'R'); - } - - $this->SetX($x+130); - $this->Cell(0,0,$this->_currency($line['total_amt']),0,0,'R'); - - if ($this->show_service_range && $line['daterange']) { - $this->SetFont('arial','I',7); - $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'Service Period'); - $this->SetFont('arial','',7); - $this->SetXY($x+40,$y); $this->Cell(0,0,$line['daterange']); - } - - if ($line['domain']) { - $this->SetFont('arial','I',7); - $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'Domain'); - $this->SetFont('arial','',7); - $this->SetXY($x+40,$y); $this->Cell(0,0,$line['domain']); - } - - if ($line['attr']) { - $showchars = 20; - foreach (explode("\n",$line['attr']) as $attr) { - list($field,$value) = explode('==',$attr); - - $this->SetFont('arial','I',7); - $this->y += 3; - $this->SetXY(20,$this->y); $this->Cell(0,0,strlen($field) > $showchars ? substr($field,0,$showchars-2).'...' : $field); - $this->SetFont('arial','',7); - $this->SetXY(50,$this->y); $this->Cell(0,0,$value); - } - } - - $this->y += 5; - $this->SetY($this->y); - $this->i++; - } - - /** - * Draws the Item Detail for Iteration 1. - */ - private function drawLineItems_1($db,$line,$invnum) { - global $C_translate; - - if ($this->show_itemized != 1) return; - if ($line['price_type'] != 0 || $line['item_type'] != 5) - return; - - $x = 10; $y = 5; - if ($this->i == 0 || $this->i%51 == 0) { - $this->AddPage(); - - $this->SetFont('arial','B',12); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_itemized_calls','setup_invoice')); - $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R'); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$invnum,0,0,'C'); - - # Draw table headers - $this->SetFont('arial','B',8); - $this->SetXY($x,$y); - $this->Cell(0,0,$C_translate->translate('pdf_item_from','setup_invoice')); - $this->SetX(69); - $this->Cell(0,0,$C_translate->translate('pdf_item_to','setup_invoice')); - $this->SetX(119); - $this->Cell(0,0,'Date & Time'); - $this->SetX(160); - $this->Cell(10,0,'Seconds' /*$C_translate->translate('pdf_item_min','setup_invoice')*/,0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R'); - $this->Line($x,$y+4,200,$y+4); - $y += 5; - $this->SetY($y); - } - - if ($line['price_type'] != 0) { - $this->SetFont('arial','I',6); - } else { - $this->SetFont('arial','',6); - } - - $val = $line['name']; - if (strlen($line['attr'])) { - $val = ""; - $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr'])); - foreach ($atrs as $a) { - $parts = preg_split("/==/", $a); - switch ($parts[0]) { - case "Destination": - $this->SetX(69); - $this->Cell(0,0,$parts[1]); - $cc = ""; $npa = ""; $nxx = ""; $e164 = ""; - if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) { - $this->SetX(89); - $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20)); - } - break; - case "Source": - $this->SetX(9); - $this->Cell(0,0,$parts[1]); - $cc = ""; $npa = ""; $nxx = ""; $e164 = ""; - if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) { - $this->SetX(29); - $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20)); - } - break; - case "parent_service_id": - $sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::"); - $rstmp = $db->Execute($sql); - $atrs2 = split("\r\n", $rstmp->fields['prod_attr']); - foreach ($atrs2 as $a2) { - $parts2 = split("==", $a2); - switch ($parts2[0]) { - case "station": - case "ported": - $val = $line['name']." for ".$parts2[1]; - break; - default: - break; - } - } - break; - case "station": - case "ported": - $val = $line['name']." for ".$parts[1]; - break; - case "date_orig": - $this->SetX(119); - $this->Cell(0,0,date(UNIX_DATE_FORMAT." H:i:s",$parts[1])); - break; - case "voip_cdr_id": - $sql = "SELECT billsec, amount FROM ".AGILE_DB_PREFIX."voip_cdr WHERE site_id=".DEFAULT_SITE." AND id=".$parts[1]; - $row = $db->GetRow($sql); - $this->SetX(160); - $this->Cell(10,0,$row[0],0,0,'R'); - $this->SetX(160); - $this->Cell(0,0,$this->_currency($row[1]),0,0,'R'); - $val = ""; - default: - break; - } - } - } - - $this->SetX(9); - $this->Cell(0,0, $val); - if ($line['price_type'] == 0) { - $this->SetX(160); - //$this->Cell(10,0, $line['qty']." M",0,0,'R'); - } else { - $q = $line['qty']; - if(empty($q)) $q = 1; - $this->SetX(160); - $this->Cell(10,0, $line['qty'],0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R'); - } - $this->y += 5; - $this->SetY($this->y); - $this->i++; - } - - /** - * This will draw the Summary Box, with the summary of the items - * on the invoice. - */ - public function drawSummaryLineItems($inv) { - global $C_translate; - - if (! $this->show_itemized) - return; - - $items = $inv->sInvoiceItemsSummary(); - - # Calculate the box size - $box = count($items) < $this->itemsSummaryMax ? count($items) : $this->itemsSummaryMax; - - $x = 10; $y = $this->sum_y ? $this->sum_y : 55; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-3); $this->Cell(0,5*(1+1+1+5+$box)+1,'',1,0,'',1); - - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_cur_charge_summary','setup_invoice')); $y += 5; - - $this->SetY($y); - $this->SetFont('arial','',9); - - $i=0; - if (is_array($items)) { - foreach($items as $line) { - $this->SetX($x); - - $q = $line['quantity']; - if (empty($q)) - $q = 1; - - $this->Cell(0,0,$q); - $this->SetX($x+8); - $this->Cell(0,0,sprintf('%s (%s)',$line['product_name'],$this->_currency($line['price_base']))); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($line['price_base']*$line['quantity']),0,0,'R'); - $y += 5; - $this->SetY($y); - $i++; - if ($i > $this->itemsSummaryMax) { - $this->SetFont('arial','B',11); - $this->SetX($x); - $this->Cell(0,0,$C_translate->translate('pdf_summary','setup_invoice')); - break; - } - } - - # Calculate our rounding error - $subtotal = 0; - foreach($items as $line) - $subtotal += $line['price_base']*$line['quantity']; - - $subtotal = round($subtotal,2); - - if (round($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt'],2) != $subtotal) { - $this->SetFont('arial','',9); - $this->SetX($x); - $this->Cell(0,0,'Rounding'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt']-$subtotal),0,0,'R'); - $y += 5; - $this->SetY($y); - } - - # @todo Draw discounts - # Sub total and tax. - $y += 5; - $this->SetY($y); - $this->SetFont('arial','B',9); - $this->SetX($x+8); - $this->Cell(0,0,'Sub Total'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Taxes'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['tax_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Total Charges'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Payments Received'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['billed_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Balance Due'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - } - } -} -?> diff --git a/modules/invoice/PDF/pdf_invoice_itemised-fpdi.inc.php b/modules/invoice/PDF/pdf_invoice_itemised-fpdi.inc.php deleted file mode 100644 index b54c69ea..00000000 --- a/modules/invoice/PDF/pdf_invoice_itemised-fpdi.inc.php +++ /dev/null @@ -1,638 +0,0 @@ -Image($logo,$x,$y,$size); - } - - /** - * Draw the Company Address - */ - public function drawCompanyAddress($inv) { - global $C_translate; - - # Add the company address next to the logo - $x = 40; $y = 9; - - $this->SetFont('arial','B',10); - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['NAME']); $y += 4; - - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['TAXID']); $y += 6; - - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['ADDRESS']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['site']['CITY'],$inv->print['site']['STATE'],$inv->print['site']['ZIP'])); $y += 4; - - $y += 2; - $this->SetXY($x,$y); $this->Cell(0,0,'Phone:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['PHONE']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,'Fax:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['FAX']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,'Web:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['URL']); $y += 4; - } - - public function drawRemittenceStub($inv) { - global $C_translate; - - # Draw the remittance line - $this->Line(9,195,200,195); - - $x = 18; $y = 200; - - $this->SetFont('arial','B',13); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_payment_remit','setup_invoice')); $y +=5; - - $this->SetFont('arial','',8); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_return1','setup_invoice')); $y +=3; - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_return2','setup_invoice').' '.$inv->print['site']['NAME']); - - # Due Date - $x = 110; $y = 200; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_bill_date','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['date_orig']),0,0,'R'); - - # Account ID - $y = 205; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_account_number','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->print['account']['id']),0,0,'R'); - - # Invoice number - $y = 210; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->getPrintInvoiceNum()),0,0,'R'); - - # Company Address - $y = 216; - $this->SetFont('arial','',10); - $this->SetXY(18,$y); $this->Cell(0,0,$inv->print['site']['NAME']); $y += 4; - $this->SetXY(18,$y); $this->Cell(0,0,$inv->print['site']['ADDRESS']); $y += 4; - $this->SetXY(18,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['site']['CITY'],$inv->print['site']['STATE'],$inv->print['site']['ZIP'])); $y += 4; - - # Previous Due - $y = 215; - $this->SetFont('arial','',9); - $this->SetXY($x,$y); $this->Cell(0,0,'Previous Due'); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()),0,0,'R'); - - $y = 219; - $this->SetFont('arial','',9); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_amount_due_by','setup_invoice').' '.date(UNIX_DATE_FORMAT,$inv->print['invoice']['due_date'])); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - - # Total Due - $y = 224; - $this->SetFont('arial','B',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Total Due'); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()+$inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - - # Draw the Customers Address - $x = 25; $y = 248; - - $this->SetFont('arial','B',12); - - if ($this->billToCompany && ! empty($inv->print['account']['company'])) - $name = $inv->print['account']['company']; - else - $name = sprintf('%s %s',$inv->print['account']['first_name'],$inv->print['account']['last_name']); - - $this->SetXY($x,$y); $this->Cell(0,0,html_entity_decode($name,ENT_NOQUOTES)); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s %s ',$inv->print['account']['address1'],$inv->print['account']['address2'])); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['account']['city'],$inv->print['account']['state'],$inv->print['account']['zip'])); $y += 5; - } - - public function drawInvoiceHeader($inv) { - global $C_translate; - - $x = 125; $y = 10; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-3); $this->Cell(0,35+($inv->print['invoice']['billed_amt'] ? 5 : 0),'',1,0,'',1); - - # Draw a box around the invoice due date and amount due. - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,'TAX INVOICE'); - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->getPrintInvoiceNum()),0,0,'R'); - - # Invoice number at top of page. - $y += 7; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_bill_date','setup_invoice')); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_amount_due_by','setup_invoice')); - $this->SetFont('arial','B',11); - - $y -= 5; - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['date_orig']),0,0,'R'); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['due_date']),0,0,'R'); - - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Previous Due'); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()),0,0,'R'); - - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_current_charges','setup_invoice')); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']),0,0,'R'); - - if ($inv->print['invoice']['billed_amt']) { - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Payments Received'); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['billed_amt']),0,0,'R'); - } - - $y += 5; - $this->SetFont('arial','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Total Payable'); - $this->SetFont('arial','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()+$inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - } - - #@todo Limit the size of the news to 6 lines - public function drawNews($news) { - global $C_translate; - - if (! $news) - return; - - $x = 9; $y = 170; - - # Draw a box. - $this->SetFillColor(243); - $this->SetXY($x-1,$y-3); $this->Cell(0,20,'',1,0,'',1); - - $this->SetFont('arial','',8); - $this->SetXY($x,$y); $this->MultiCell(0,3,str_replace('\n',"\n",$news),0,'L',0); - } - - #@todo make this list dynamic - public function drawPaymentMethods($inv) { - $x = 110; $y = 242; - - # Draw a box. - $this->SetFillColor(235); - $this->SetXY($x-1,$y-3); $this->Cell(0,32,'',1,0,'',1); - - $this->SetFont('arial','B',8); - $this->SetXY($x,$y); $this->Cell(0,0,'This invoice can also be paid by:'); $y += 4; - - # Direct Debit - $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-dd.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('arial','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Credit to our Bank Account'); $y += 3; - $this->SetFont('arial','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'BSB:'); $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'ACCOUNT:'); $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'REF:'); $y += 3; - - $y -= 9; - $this->SetFont('arial','B',8); - $this->SetXY($x+30,$y); $this->Cell(0,0,'633-000'); $y += 3; - $this->SetXY($x+30,$y); $this->Cell(0,0,'120 440 821'); $y += 3; - $this->SetXY($x+30,$y); $this->Cell(0,0,$inv->getPrintInvoiceID()); $y += 3; - - # Direct Debit - $y += 3; - $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-dd.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('arial','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Debit'); $y += 3; - $this->SetFont('arial','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Please visit '.$inv->print['site']['URL']); $y += 3; - -# $r1 = $this->w - 40; -# $r2 = $r1 + 30; -# $y1 = 8; -# $y2 = $y1 ; -# $mid = $y1 + ($y2 / 2); -# $this->RoundedRect($r1, $y1, ($r2 - $r1), $y2, 2.5, 'F'); - -# $this->addWaterMark('hello'); -# # Pay Pal -# $y += 3; -# $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-pp.png'); -# $this->Image($logo,$x+1,$y,8); -# $this->SetFont('arial','B',8); -# $this->SetXY($x+10,$y); $this->Cell(0,0,'Pay Pal'); $y += 3; -# $this->SetFont('arial','',8); -# $this->SetXY($x+10,$y); $this->Cell(0,0,'Please visit '.$inv->print['site']['URL']); $y += 3; - } - - /** - * Draw previous invoices due - */ - public function drawSummaryInvoicesDue($items) { - $x = 125; $y = $this->sum_y ? $this->sum_y : 50; - - # Calculate the box size - $box = count($items) < $this->itemsPreviousMax ? count($items) : $this->itemsPreviousMax; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-3); $this->Cell(0,5*(1+$box)+1,'',1,0,'',1); - - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,'Previous Invoices due'); $y += 5; - - $this->SetFont('arial','',11); - $i = 0; - $sum_total = 0; - foreach ($items as $line) { - if (++$i < $this->itemsPreviousMax) { - $this->SetXY($x,$y); - $this->Cell(0,0,sprintf('%s #%06s',date(UNIX_DATE_FORMAT,$line['date_orig']),$line['id'])); - $this->Cell(0,0,$this->_currency($line['total_amt']-$line['billed_amt']),0,0,'R'); $y += 5; - - } else { - $sum_total += $line['total_amt']-$line['billed_amt']; - } - } - - if ($sum_total) { - $this->SetXY($x,$y); - $this->SetFont('arial','I',11); - $this->Cell(0,0,'Other invoices'); - $this->SetFont('arial','',11); - $this->Cell(0,0,$this->_currency($sum_total),0,0,'R'); $y += 5; - } - - $this->sum_y = $y+5; - } - - /** - * Called before begining to loop the invoice_item table. Used to set initial values. - */ - public function drawLineItems_pre($iteration) { - $this->iteration = $iteration; - if ($iteration>1) - return false; - - return true; - } - - /** - * Called once per line item to add to the PDF invoice. This function serves to - * direct each iteration to a different function which handles a specific piece - * of the PDF building puzzle. - */ - public function drawLineItems($db,$line,$invnum) { - switch($this->iteration) { - case 0: - $this->drawLineItems_0($db,$line,$invnum); - break; - - case 1: - $this->drawLineItems_1($db,$line,$invnum); - break; - - default: - echo 'Unknown PDF iteration encountered. Halting.'; - exit; - } - } - - /** - * Draws the non-VoIP related items for iteration 0. - */ - private function drawLineItems_0($db,$line,$invnum) { - global $C_translate; - - if ($line['price_type'] == 0 && $line['item_type'] == 5) - return; - - $x = 10; $y = 5; - if ($this->i == 0 || $this->i%51 == 0) { - $this->AddPage(); - - $this->SetFont('arial','B',12); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_itemized_charges','setup_invoice')); - $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R'); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$invnum,0,0,'C'); - - # Draw table headers - $y += 10; - $this->SetFont('arial','B',8); - $this->SetXY($x,$y); - $this->Cell(0,0,$C_translate->translate('pdf_item_description','setup_invoice')); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_quantity','setup_invoice')); - $this->SetX($x+160); - $this->Cell(10,0,$C_translate->translate('pdf_item_cost','setup_invoice'),0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R'); - $this->Line($x,$y+2,200,$y+2); - $y += 5; - $this->SetY($y); - } - - $this->SetFont('arial','',8); - $this->SetX($x); - $this->Cell(0,0,$line['name']); - - if (isset($line['price_base'])) { - $this->SetX($x+160); - $this->Cell(10,0,$this->_currency($line['price_base']),0,0,'R'); - } - - if (isset($line['qty'])) { - $this->SetX($x+130); - $this->Cell(10,0,$line['qty'],0,0,'R'); - } - - $this->SetX($x+130); - $this->Cell(0,0,$this->_currency($line['total_amt']),0,0,'R'); - - if ($this->show_service_range && $line['daterange']) { - $this->SetFont('arial','I',7); - $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'Service Period'); - $this->SetFont('arial','',7); - $this->SetXY($x+40,$y); $this->Cell(0,0,$line['daterange']); - } - - if ($line['domain']) { - $this->SetFont('arial','I',7); - $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'Domain'); - $this->SetFont('arial','',7); - $this->SetXY($x+40,$y); $this->Cell(0,0,$line['domain']); - } - - if ($line['attr']) { - $showchars = 20; - foreach (explode("\n",$line['attr']) as $attr) { - list($field,$value) = explode('==',$attr); - - $this->SetFont('arial','I',7); - $this->y += 3; - $this->SetXY(20,$this->y); $this->Cell(0,0,strlen($field) > $showchars ? substr($field,0,$showchars-2).'...' : $field); - $this->SetFont('arial','',7); - $this->SetXY(50,$this->y); $this->Cell(0,0,$value); - } - } - - $this->y += 5; - $this->SetY($this->y); - $this->i++; - } - - /** - * Draws the Item Detail for Iteration 1. - */ - private function drawLineItems_1($db,$line,$invnum) { - global $C_translate; - - if ($this->show_itemized != 1) return; - if ($line['price_type'] != 0 || $line['item_type'] != 5) - return; - - $x = 10; $y = 5; - if ($this->i == 0 || $this->i%51 == 0) { - $this->AddPage(); - - $this->SetFont('arial','B',12); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_itemized_calls','setup_invoice')); - $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R'); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$invnum,0,0,'C'); - - # Draw table headers - $this->SetFont('arial','B',8); - $this->SetXY($x,$y); - $this->Cell(0,0,$C_translate->translate('pdf_item_from','setup_invoice')); - $this->SetX(69); - $this->Cell(0,0,$C_translate->translate('pdf_item_to','setup_invoice')); - $this->SetX(119); - $this->Cell(0,0,'Date & Time'); - $this->SetX(160); - $this->Cell(10,0,'Seconds' /*$C_translate->translate('pdf_item_min','setup_invoice')*/,0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R'); - $this->Line($x,$y+4,200,$y+4); - $y += 5; - $this->SetY($y); - } - - if ($line['price_type'] != 0) { - $this->SetFont('arial','I',6); - } else { - $this->SetFont('arial','',6); - } - - $val = $line['name']; - if (strlen($line['attr'])) { - $val = ""; - $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr'])); - foreach ($atrs as $a) { - $parts = preg_split("/==/", $a); - switch ($parts[0]) { - case "Destination": - $this->SetX(69); - $this->Cell(0,0,$parts[1]); - $cc = ""; $npa = ""; $nxx = ""; $e164 = ""; - if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) { - $this->SetX(89); - $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20)); - } - break; - case "Source": - $this->SetX(9); - $this->Cell(0,0,$parts[1]); - $cc = ""; $npa = ""; $nxx = ""; $e164 = ""; - if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) { - $this->SetX(29); - $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20)); - } - break; - case "parent_service_id": - $sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::"); - $rstmp = $db->Execute($sql); - $atrs2 = split("\r\n", $rstmp->fields['prod_attr']); - foreach ($atrs2 as $a2) { - $parts2 = split("==", $a2); - switch ($parts2[0]) { - case "station": - case "ported": - $val = $line['name']." for ".$parts2[1]; - break; - default: - break; - } - } - break; - case "station": - case "ported": - $val = $line['name']." for ".$parts[1]; - break; - case "date_orig": - $this->SetX(119); - $this->Cell(0,0,date(UNIX_DATE_FORMAT." H:i:s",$parts[1])); - break; - case "voip_cdr_id": - $sql = "SELECT billsec, amount FROM ".AGILE_DB_PREFIX."voip_cdr WHERE site_id=".DEFAULT_SITE." AND id=".$parts[1]; - $row = $db->GetRow($sql); - $this->SetX(160); - $this->Cell(10,0,$row[0],0,0,'R'); - $this->SetX(160); - $this->Cell(0,0,$this->_currency($row[1]),0,0,'R'); - $val = ""; - default: - break; - } - } - } - - $this->SetX(9); - $this->Cell(0,0, $val); - if ($line['price_type'] == 0) { - $this->SetX(160); - //$this->Cell(10,0, $line['qty']." M",0,0,'R'); - } else { - $q = $line['qty']; - if(empty($q)) $q = 1; - $this->SetX(160); - $this->Cell(10,0, $line['qty'],0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R'); - } - $this->y += 5; - $this->SetY($this->y); - $this->i++; - } - - /** - * This will draw the Summary Box, with the summary of the items - * on the invoice. - */ - public function drawSummaryLineItems($inv) { - global $C_translate; - - if (! $this->show_itemized) - return; - - $items = $inv->sInvoiceItemsSummary(); - - # Calculate the box size - $box = count($items) < $this->itemsSummaryMax ? count($items) : $this->itemsSummaryMax; - - $x = 10; $y = $this->sum_y ? $this->sum_y : 55; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-3); $this->Cell(0,5*(1+1+1+5+$box)+1,'',1,0,'',1); - - $this->SetFont('arial','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,$C_translate->translate('pdf_cur_charge_summary','setup_invoice')); $y += 5; - - $this->SetY($y); - $this->SetFont('arial','',9); - - $i=0; - if (is_array($items)) { - foreach($items as $line) { - $this->SetX($x); - - $q = $line['quantity']; - if (empty($q)) - $q = 1; - - $this->Cell(0,0,$q); - $this->SetX($x+8); - $this->Cell(0,0,sprintf('%s (%s)',$line['product_name'],$this->_currency($line['price_base']))); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($line['price_base']*$line['quantity']),0,0,'R'); - $y += 5; - $this->SetY($y); - $i++; - if ($i > $this->itemsSummaryMax) { - $this->SetFont('arial','B',11); - $this->SetX($x); - $this->Cell(0,0,$C_translate->translate('pdf_summary','setup_invoice')); - break; - } - } - - # Calculate our rounding error - $subtotal = 0; - foreach($items as $line) - $subtotal += $line['price_base']*$line['quantity']; - - $subtotal = round($subtotal,2); - - if (round($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt'],2) != $subtotal) { - $this->SetFont('arial','',9); - $this->SetX($x); - $this->Cell(0,0,'Rounding'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt']-$subtotal),0,0,'R'); - $y += 5; - $this->SetY($y); - } - - # @todo Draw discounts - # Sub total and tax. - $y += 5; - $this->SetY($y); - $this->SetFont('arial','B',9); - $this->SetX($x+8); - $this->Cell(0,0,'Sub Total'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Taxes'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['tax_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Total Charges'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Payments Received'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['billed_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Balance Due'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']),0,0,'R'); - } - } -} -?> diff --git a/modules/invoice/PDF/pdf_invoice_itemised-tcpdf.inc.php b/modules/invoice/PDF/pdf_invoice_itemised-tcpdf.inc.php deleted file mode 100644 index 4e2e4a34..00000000 --- a/modules/invoice/PDF/pdf_invoice_itemised-tcpdf.inc.php +++ /dev/null @@ -1,673 +0,0 @@ -Image($logo,$x,$y,$size); - } - - /** - * Draw the Company Address - */ - public function drawCompanyAddress($inv) { - # Add the company address next to the logo - $x = 40; $y = 7; - - $this->SetFont('helvetica','B',10); - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['NAME']); $y += 4; - - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['TAXID']); $y += 6; - - $this->SetXY($x,$y); $this->Cell(0,0,$inv->print['site']['ADDRESS']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['site']['CITY'],$inv->print['site']['STATE'],$inv->print['site']['ZIP'])); $y += 4; - - $y += 2; - $this->SetXY($x,$y); $this->Cell(0,0,'Phone:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['PHONE']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,'Fax:'); $this->SetXY($x+16,$y); $this->Cell(0,0,$inv->print['site']['FAX']); $y += 4; - $this->SetXY($x,$y); $this->Cell(0,0,'Web:'); $this->SetXY($x+16,$y); $this->addHtmlLink($inv->print['site']['URL'],$inv->print['site']['URL']); $y += 4; - } - - public function drawRemittenceStub($inv) { - # Draw the remittance line - $this->Line(9,195,200,195); - - $x = 18; $y = 200; - - $this->SetFont('helvetica','B',13); - $this->SetXY($x,$y); $this->Cell(0,0,_('Payment Remittence')); $y +=5; - - $this->SetFont('helvetica','',8); - $this->SetXY($x,$y); $this->Cell(0,0,_('Please return this portion with your cheque or money order')); $y +=3; - $this->SetXY($x,$y); $this->Cell(0,0,_('made payable to').' '.$inv->print['site']['NAME']); - - # Due Date - $x = 110; $y = 200; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Issue Date')); - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['date_orig']),0,0,'R'); - - # Account ID - $y = 205; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Account Number')); - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->print['account']['id']),0,0,'R'); - - # Invoice number - $y = 210; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Invoice Number')); - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->getPrintInvoiceNum()),0,0,'R'); - - # Company Address - $y = 216; - $this->SetFont('helvetica','',10); - $this->SetXY(18,$y); $this->Cell(0,0,$inv->print['site']['NAME']); $y += 4; - $this->SetXY(18,$y); $this->Cell(0,0,$inv->print['site']['ADDRESS']); $y += 4; - $this->SetXY(18,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['site']['CITY'],$inv->print['site']['STATE'],$inv->print['site']['ZIP'])); $y += 4; - - # Previous Due - $y = 215; - $this->SetFont('helvetica','',9); - $this->SetXY($x,$y); $this->Cell(0,0,_('Previous Due')); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()),0,0,'R'); - - $y = 219; - $this->SetFont('helvetica','',9); - $this->SetXY($x,$y); $this->Cell(0,0,_('Amount Due').' '.date(UNIX_DATE_FORMAT,$inv->print['invoice']['due_date'])); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']-$inv->print['invoice']['credit_amt']),0,0,'R'); - - # Total Due - $y = 224; - $this->SetFont('helvetica','B',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Total Due')); - $this->SetXY($x,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()+$inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']-$inv->print['invoice']['credit_amt']),0,0,'R'); - - # Draw the Customers Address - $x = 25; $y = 248; - - $this->SetFont('helvetica','B',12); - - if ($this->billToCompany && ! empty($inv->print['account']['company'])) - $name = $inv->print['account']['company']; - else - $name = sprintf('%s %s',$inv->print['account']['first_name'],$inv->print['account']['last_name']); - - $this->SetXY($x,$y); $this->Cell(0,0,html_entity_decode($name,ENT_NOQUOTES)); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s %s ',$inv->print['account']['address1'],$inv->print['account']['address2'])); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%s, %s %s',$inv->print['account']['city'],$inv->print['account']['state'],$inv->print['account']['zip'])); $y += 5; - } - - public function drawInvoiceHeader($inv) { - $x = 125; $y = 10; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-1); $this->Cell(0,35+($inv->print['invoice']['billed_amt'] ? 5 : 0)+($inv->print['invoice']['credit_amt'] ? 5 : 0),'',1,0,'',1); - - # Draw a box around the invoice due date and amount due. - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,'TAX INVOICE'); - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,sprintf('%06s',$inv->getPrintInvoiceNum()),0,0,'R'); - - # Invoice number at top of page. - $y += 7; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Issue Date')); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,_('Amount Due')); - - $y -= 5; - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['date_orig']),0,0,'R'); $y += 5; - $this->SetXY($x,$y); $this->Cell(0,0,date(UNIX_DATE_FORMAT,$inv->print['invoice']['due_date']),0,0,'R'); - - $y += 5; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Previous Due')); - $this->SetFont('helvetica','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()),0,0,'R'); - - $y += 5; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,_('Current Charges')); - $this->SetFont('helvetica','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']),0,0,'R'); - - if ($inv->print['invoice']['billed_amt']) { - $y += 5; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Payments Received'); - $this->SetFont('helvetica','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['billed_amt']),0,0,'R'); - } - - if ($inv->print['invoice']['credit_amt']) { - $y += 5; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Credits Received'); - $this->SetFont('helvetica','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->print['invoice']['credit_amt']),0,0,'R'); - } - - $y += 5; - $this->SetFont('helvetica','',10); - $this->SetXY($x,$y); $this->Cell(0,0,'Total Payable'); - $this->SetFont('helvetica','B',11); - $this->SetXY($x+55,$y); $this->Cell(0,0,$this->_currency($inv->sPreviousBalance()+$inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']-$inv->print['invoice']['credit_amt']),0,0,'R'); - } - - #@todo Limit the size of the news to 6 lines - public function drawNews($news) { - if (! $news) - return; - - $x = 9; $y = 170; - - # Draw a box. - $this->SetFillColor(243); - $this->SetXY($x-1,$y-1); $this->Cell(0,20,'',1,0,'',1); - - $this->SetFont('helvetica','',8); - $this->SetXY($x,$y); $this->MultiCell(0,3,str_replace('\n',"\n",$news),0,'L',0); - } - - #@todo make this list dynamic - public function drawPaymentMethods($inv) { - $x = 120; $y = 242; - - # Draw a box. - $this->SetFillColor(235); - $this->SetXY($x-1,$y-2); $this->Cell(0,32,'',1,0,'',1); - - $this->SetFont('helvetica','B',8); - $this->SetXY($x,$y); $this->Cell(0,0,'This invoice can also be paid by:'); $y += 4; - - # Direct Credit - $logo = sprintf('%s/%s','/afs/local/home/gh/.web/au.net.graytech.www/osb/modules/invoice/media/img/','invoice-payment-dd.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('helvetica','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Credit to our Bank Account'); $y += 3; - $this->SetFont('helvetica','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'BSB:'); $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'ACCOUNT:'); $y += 3; - $this->SetXY($x+10,$y); $this->Cell(0,0,'REF:'); $y += 3; - - $y -= 9; - $this->SetFont('helvetica','B',8); - $this->SetXY($x+30,$y); $this->Cell(0,0,'633-000'); $y += 3; - $this->SetXY($x+30,$y); $this->Cell(0,0,'120 440 821'); $y += 3; - $this->SetXY($x+30,$y); $this->Cell(0,0,$inv->getPrintInvoiceID()); $y += 3; - -/* - # Direct Debit - $y += 3; - $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-dd.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('helvetica','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Direct Debit'); $y += 3; - $this->SetFont('helvetica','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Please visit '); $this->SetXY($x+30,$y); $this->addHtmlLink($inv->print['site']['URL'].'?_page=invoice:user_view&id='.$inv->getPrintInvoiceNum(),$inv->print['site']['URL']); $y += 3; -*/ - - # Paypal - $y += 3; -// $logo = sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-payment-pp.png'); - $logo = sprintf('%s/%s','/afs/local/home/gh/.web/au.net.graytech.www/osb/modules/invoice/media/img/','invoice-payment-pp.png'); - $this->Image($logo,$x+1,$y,8); - $this->SetFont('helvetica','B',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Pay Pal/Credit Card'); $y += 3; - $this->SetFont('helvetica','',8); - $this->SetXY($x+10,$y); $this->Cell(0,0,'Please visit '); $this->SetXY($x+30,$y); $this->addHtmlLink($inv->print['site']['URL'].'?_page=invoice:user_view&id='.$inv->getPrintInvoiceNum(),$inv->print['site']['URL']); $y += 3; - } - - /** - * Draw previous invoices due - */ - public function drawSummaryInvoicesDue($items) { - $x = 125; $y = $this->sum_y ? $this->sum_y : 50; - - # Calculate the box size - $box = count($items) < $this->itemsPreviousMax ? count($items) : $this->itemsPreviousMax; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-1); $this->Cell(0,5*(1+$box)+1,'',1,0,'',1); - - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,_('Previous Invoices due')); $y += 5; - - $this->SetFont('helvetica','',11); - $i = 0; - $sum_total = 0; - foreach ($items as $line) { - if (++$i < $this->itemsPreviousMax) { - $this->SetXY($x,$y); - $this->Cell(0,0,sprintf('%s #%06s',date(UNIX_DATE_FORMAT,$line['date_orig']),$line['id'])); - $this->Cell(0,0,$this->_currency($line['total_amt']-$line['billed_amt']),0,0,'R'); $y += 5; - - } else { - $sum_total += $line['total_amt']-$line['billed_amt']; - } - } - - if ($sum_total) { - $this->SetXY($x,$y); - $this->SetFont('helvetica','I',11); - $this->Cell(0,0,'Other invoices'); - $this->SetFont('helvetica','',11); - $this->Cell(0,0,$this->_currency($sum_total),0,0,'R'); $y += 5; - } - - $this->sum_y = $y+5; - } - - /** - * Called before begining to loop the invoice_item table. Used to set initial values. - */ - public function drawLineItems_pre($iteration) { - $this->iteration = $iteration; - if ($iteration>1) - return false; - - return true; - } - - /** - * Called once per line item to add to the PDF invoice. This function serves to - * direct each iteration to a different function which handles a specific piece - * of the PDF building puzzle. - */ - public function drawLineItems($db,$line,$invnum) { - switch($this->iteration) { - case 0: - $this->drawLineItems_0($db,$line,$invnum); - break; - - case 1: - $this->drawLineItems_1($db,$line,$invnum); - break; - - default: - echo 'Unknown PDF iteration encountered. Halting.'; - exit; - } - } - - /** - * Draws the non-VoIP related items for iteration 0. - * @todo need to make sure that this pages well, when there are many items (with many sub details). - * @tood Need to replicate this to the other fpdf files - */ - private function drawLineItems_0($db,$line,$invnum) { - if ($line['price_type'] == 0 && $line['item_type'] == 5) - return; - - $x = 10; - if ($this->i == 0 || $this->i%51 == 0) { - $this->y = 5; - $this->AddPage(); - - $this->SetFont('helvetica','B',12); - $this->SetXY($x,$this->y); $this->Cell(0,0,_('Itemised Charges')); - $this->Cell(0,0,_('Page #').$this->PageNo(),0,0,'R'); - $this->SetXY($x,$this->y); $this->Cell(0,0,_('Invoice #').$invnum,0,0,'C'); - - # Draw table headers - $this->y += 10; - $this->SetFont('helvetica','B',8); - $this->SetXY($x,$this->y); - $this->Cell(0,0,_('Description')); - $this->SetX($x+135); - $this->Cell(0,0,_('Quantity')); - $this->SetX($x+160); - $this->Cell(10,0,_('Unit Cost'),0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0,_('Amount'),0,0,'R'); - $this->Line($x,$this->y+4,200,$this->y+4); - $this->y += 5; - $this->SetY($this->y); - } - - $this->SetFont('helvetica','',8); - $this->SetX($x); - $this->Cell(0,0,$line['name']); - - if (isset($line['price_base'])) { - $this->SetX($x+160); - $this->Cell(10,0,$this->_currency($line['price_base']),0,0,'R'); - } - - if (isset($line['qty'])) { - $this->SetX($x+130); - $this->Cell(10,0,$line['qty'],0,0,'R'); - } - - $this->SetX($x+130); - $this->Cell(0,0,$this->_currency($line['total_amt']),0,0,'R'); - - if ($this->show_service_range && $line['daterange']) { - $this->SetFont('helvetica','I',7); - $this->y += 3; - $this->SetXY($x+10,$this->y); $this->Cell(0,0,'Service Period'); - $this->SetFont('helvetica','',7); - $this->SetXY($x+40,$this->y); $this->Cell(0,0,$line['daterange']); - } - - if ($line['domain']) { - $this->SetFont('helvetica','I',7); - $this->y += 3; - $this->SetXY($x+10,$this->y); $this->Cell(0,0,'Domain'); - $this->SetFont('helvetica','',7); - $this->SetXY($x+40,$this->y); $this->Cell(0,0,$line['domain']); - } - - if ($line['attr']) { - $showchars = 20; - if (preg_match('/^a:/',$line['attr'])) - $a = unserialize($line['attr']); - else { - $x = explode("\n",$line['attr']); - $a = array(); - foreach ($x as $y) - if ($y) { - list($c,$d) = explode('==',$y); - $a[$c] = $d; - } - } - - foreach ($a as $field=>$value) { - - if (in_array($field,array('service_account_name','service_address'))) - continue; - - $this->SetFont('helvetica','I',7); - $this->y += 3; - $this->SetXY(20,$this->y); $this->Cell(0,0,strlen($field) > $showchars ? substr($field,0,$showchars-2).'...' : $field); - $this->SetFont('helvetica','',7); - $this->SetXY(50,$this->y); $this->Cell(0,0,$value); - } - } - - $this->y += 5; - $this->SetY($this->y); - $this->i++; - } - - /** - * Draws the Item Detail for Iteration 1. - */ - private function drawLineItems_1($db,$line,$invnum) { - global $C_translate; - - if ($this->show_itemized != 1) return; - if ($line['price_type'] != 0 || $line['item_type'] != 5) - return; - - $x = 10; $this->y = 5; - if ($this->i == 0 || $this->i%51 == 0) { - $this->AddPage(); - - $this->SetFont('helvetica','B',12); - $this->SetXY($x,$this->y); $this->Cell(0,0,$C_translate->translate('pdf_itemized_calls','setup_invoice')); - $this->Cell(0,0,$C_translate->translate('pdf_page','setup_invoice').$this->PageNo(),0,0,'R'); - $this->SetXY($x,$this->y); $this->Cell(0,0,$C_translate->translate('pdf_invoice_number_small','setup_invoice').$invnum,0,0,'C'); - - # Draw table headers - $this->SetFont('helvetica','B',8); - $this->SetXY($x,$this->y); - $this->Cell(0,0,$C_translate->translate('pdf_item_from','setup_invoice')); - $this->SetX(69); - $this->Cell(0,0,$C_translate->translate('pdf_item_to','setup_invoice')); - $this->SetX(119); - $this->Cell(0,0,'Date & Time'); - $this->SetX(160); - $this->Cell(10,0,'Seconds' /*$C_translate->translate('pdf_item_min','setup_invoice')*/,0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0,$C_translate->translate('pdf_item_amount','setup_invoice'),0,0,'R'); - $this->Line($x,$this->y+4,200,$this->y+4); - $this->y += 5; - $this->SetY($this->y); - } - - if ($line['price_type'] != 0) { - $this->SetFont('helvetica','I',6); - } else { - $this->SetFont('helvetica','',6); - } - - $val = $line['name']; - if (strlen($line['attr'])) { - $val = ""; - $atrs = preg_split("/\r\n/", str_replace('\r\n',"\r\n",$line['attr'])); - foreach ($atrs as $a) { - $parts = preg_split("/==/", $a); - switch ($parts[0]) { - case "Destination": - $this->SetX(69); - $this->Cell(0,0,$parts[1]); - $cc = ""; $npa = ""; $nxx = ""; $e164 = ""; - if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) { - $this->SetX(89); - $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20)); - } - break; - case "Source": - $this->SetX(9); - $this->Cell(0,0,$parts[1]); - $cc = ""; $npa = ""; $nxx = ""; $e164 = ""; - if ($this->v->e164($parts[1], $e164, $cc, $npa, $nxx)) { - $this->SetX(29); - $this->Cell(0,0,substr($this->v->where_is($db, $cc, $npa, $nxx), 0, 20)); - } - break; - case "parent_service_id": - $sql = sqlSelect($db,"service","prod_attr","id=::".$parts[1]."::"); - $rstmp = $db->Execute($sql); - $atrs2 = split("\r\n", $rstmp->fields['prod_attr']); - foreach ($atrs2 as $a2) { - $parts2 = split("==", $a2); - switch ($parts2[0]) { - case "station": - case "ported": - $val = $line['name']." for ".$parts2[1]; - break; - default: - break; - } - } - break; - case "station": - case "ported": - $val = $line['name']." for ".$parts[1]; - break; - case "date_orig": - $this->SetX(119); - $this->Cell(0,0,date(UNIX_DATE_FORMAT." H:i:s",$parts[1])); - break; - case "voip_cdr_id": - $sql = "SELECT billsec, amount FROM ".AGILE_DB_PREFIX."voip_cdr WHERE site_id=".DEFAULT_SITE." AND id=".$parts[1]; - $row = $db->GetRow($sql); - $this->SetX(160); - $this->Cell(10,0,$row[0],0,0,'R'); - $this->SetX(160); - $this->Cell(0,0,$this->_currency($row[1]),0,0,'R'); - $val = ""; - default: - break; - } - } - } - - $this->SetX(9); - $this->Cell(0,0, $val); - if ($line['price_type'] == 0) { - $this->SetX(160); - //$this->Cell(10,0, $line['qty']." M",0,0,'R'); - } else { - $q = $line['qty']; - if(empty($q)) $q = 1; - $this->SetX(160); - $this->Cell(10,0, $line['qty'],0,0,'R'); - $this->SetX($x+135); - $this->Cell(0,0, $this->_currency($line['amount']), 0,0,'R'); - } - $this->y += 5; - $this->SetY($this->y); - $this->i++; - } - - /** - * This will draw the Summary Box, with the summary of the items - * on the invoice. - */ - public function drawSummaryLineItems($inv) { - if (! $this->show_itemized) - return; - - $items = $inv->sInvoiceItemsSummary(); - - # Calculate the box size - $box = count($items) < $this->itemsSummaryMax ? count($items) : $this->itemsSummaryMax; - - $x = 10; $y = $this->sum_y ? $this->sum_y : 55; - - # Draw a box. - $this->SetFillColor(245); - $this->SetXY($x-1,$y-1); $this->Cell(0,5*( - 1+1+1+3+($inv->print['invoice']['discount_amt'] ? 1 : 0)+($inv->print['invoice']['billed_amt'] ? 1 : 0)+($inv->print['invoice']['credit_amt'] ? 1 : 0)+$box - )+1,'',1,0,'',1); - - $this->SetFont('helvetica','B',11); - $this->SetXY($x,$y); $this->Cell(0,0,_('Current Charges Summary for')); $y += 5; - - $this->SetY($y); - $this->SetFont('helvetica','',9); - - $i=0; - if (is_array($items)) { - foreach($items as $line) { - $this->SetX($x); - - $q = $line['quantity']; - if (empty($q)) - $q = 1; - - $this->Cell(0,0,$q); - $this->SetX($x+8); - $this->Cell(0,0,sprintf('%s (%s)',$line['product_name'],$this->_currency($line['price_base']))); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($line['price_base']*$line['quantity']+$line['price_setup']),0,0,'R'); - $y += 5; - $this->SetY($y); - $i++; - if ($i > $this->itemsSummaryMax) { - $this->SetFont('helvetica','B',11); - $this->SetX($x); - $this->Cell(0,0,_('The above is just a summary. To view a detailed list of charges, please visit our website.')); - break; - } - } - - # Calculate our rounding error - $subtotal = 0; - foreach($items as $line) - $subtotal += $line['price_base']*$line['quantity']+$line['price_setup']; - - $subtotal -= $inv->print['invoice']['discount_amt']; - $subtotal = round($subtotal,2); - - if (round($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt'],2) != $subtotal) { - $this->SetFont('helvetica','',9); - $this->SetX($x); - $this->Cell(0,0,'Rounding'); - $this->SetX($x+135); - $this->Cell(0,0, - $this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt']-$subtotal),0,0,'R'); - $y += 5; - $this->SetY($y); - } - - # Draw Discounts. - if ($inv->print['invoice']['discount_amt']) { - $y += 5; - $this->SetY($y); - $this->SetFont('helvetica','B',9); - $this->SetX($x+8); - $this->Cell(0,0,_('Discount')); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency(-$inv->print['invoice']['discount_amt']),0,0,'R'); - } - - # Sub total and tax. - $y += 5; - $this->SetY($y); - $this->SetFont('helvetica','B',9); - $this->SetX($x+8); - $this->Cell(0,0,'Sub Total'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['tax_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Taxes'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['tax_amt']),0,0,'R'); - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Total Charges'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']),0,0,'R'); - - # Show payments already received for this invoice - if ($inv->print['invoice']['billed_amt']) { - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Payments Received'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['billed_amt']),0,0,'R'); - } - - if ($inv->print['invoice']['credit_amt']) { - $y += 5; - $this->SetY($y); - $this->SetFont('helvetica','B',9); - $this->SetX($x+8); - $this->Cell(0,0,_('Less Credits')); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency(-$inv->print['invoice']['credit_amt']),0,0,'R'); - } - - $y += 5; - $this->SetY($y); - $this->SetX($x+8); - $this->Cell(0,0,'Balance Due'); - $this->SetX($x+135); - $this->Cell(0,0,$this->_currency($inv->print['invoice']['total_amt']-$inv->print['invoice']['billed_amt']-$inv->print['invoice']['credit_amt']),0,0,'R'); - } - } -} -?> diff --git a/modules/invoice/advance_notice.php b/modules/invoice/advance_notice.php deleted file mode 100644 index 3e25e9f9..00000000 --- a/modules/invoice/advance_notice.php +++ /dev/null @@ -1,109 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -/** -* Advance invoice e-mail notification class -*/ -class advance_notice -{ - var $advance_days=false; - var $advance_days_service; - - function task() { - - $db=&DB(); - - /* get the max invoice days from the setup_invoice table */ - if(!$this->advance_days) { - $setup = $db->Execute(sqlSelect($db,"setup_invoice","advance_notice","advance_notice>0 and advance_notice != '' and advance_notice is not null")); - if(!$setup->RecordCount()) return false; - $this->advance_days = $setup->fields['advance_notice']; - } - - /* pre-billing days global setting */ - if(MAX_INV_GEN_PERIOD <= 0) $max_days = $max_date=1; else $max_days = MAX_INV_GEN_PERIOD; - - /* pre-notification date for service */ - $this->advance_days_service = $this->advance_days + $max_days; - $max_date = time()+($this->advance_days_service*86400); - date("Y-m-d", $max_date); - - $p=AGILE_DB_PREFIX; $s=DEFAULT_SITE; - $ids=false; - $account=false; - $date=false; - $invoice=false; - $sql = "SELECT DISTINCT service.id as serviceId, account.id as accountId, invoice.id as invoiceId, from_unixtime(service.date_next_invoice,'%Y-%m-%d') as dayGroup - FROM {$p}service as service - JOIN {$p}account as account ON ( service.account_id=account.id and account.site_id={$s} ) - LEFT JOIN {$p}invoice as invoice ON ( service.invoice_id=invoice.id and invoice.site_id={$s} ) - WHERE service.site_id={$s} - AND service.active = 1 - AND ( service.invoice_advance_notified IS NULL OR service.invoice_advance_notified = 0 ) - AND ( service.suspend_billing IS NULL OR service.suspend_billing = 0 ) - AND ( service.date_next_invoice > 0 AND service.date_next_invoice IS NOT NULL ) - AND - (( - ( account.invoice_advance_gen!='' OR account.invoice_advance_gen is not null ) AND service.date_next_invoice <= ((86400*(account.invoice_advance_gen+{$this->advance_days})) + (UNIX_TIMESTAMP(CURDATE()))) - ) OR ( - ( account.invoice_advance_gen='' OR account.invoice_advance_gen is null ) AND service.date_next_invoice <= {$max_date} - )) - ORDER BY accountId, dayGroup, serviceId"; - $rs = $db->Execute($sql); - if($rs === false) {global $C_debug; $C_debug->error('advance_notice.inc.php','task()', $sql . " \r\n\r\n " . @$db->ErrorMsg()); } - if($rs && $rs->RecordCount()) { - while(!$rs->EOF) { - if( $ids && ($rs->fields['accountId'] != $account ) || ($rs->fields['dayGroup'] != $date) ) { - $this->sendEmail($ids, $account, $date); - $ids=false; - } - - // set the current account and date - $account=$rs->fields['accountId']; - $invoice=$rs->fields['invoiceId']; - $date=$rs->fields['dayGroup']; - - // add to id list - if($ids) $ids.=","; - $ids.=$rs->fields['serviceId']; - $rs->MoveNext(); - } - if($ids) $this->sendEmail($ids, $account, $date); - } - } - - - /* send e-mail to user with pre-billing notice */ - function sendEmail($ids, $account, $date) { - if (empty($account)) return; - - //echo "
$account - $ids - $date"; - - /* send e-mail to user */ - include_once(PATH_MODULES.'email_template/email_template.inc.php'); - $mail = new email_template; - $mail->send('invoice_pregen_notice', $account, $ids, DEFAULT_CURRENCY, $date); - - /* update service.invoice_advance_notified=1 to stop future notifications */ - $db=&DB(); - $db->Execute("UPDATE ".AGILE_DB_PREFIX."service SET invoice_advance_notified=1 WHERE site_id=".DEFAULT_SITE." AND id in ($ids)"); - } -} -?> diff --git a/modules/invoice/auth.inc.php b/modules/invoice/auth.inc.php deleted file mode 100644 index 8588bf9b..00000000 --- a/modules/invoice/auth.inc.php +++ /dev/null @@ -1,41 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Invoice - */ - -/** - * The main AgileBill Invoice Class - * - * @package AgileBill - */ - -$auth_methods = array ( - array('module'=>'invoice','method'=>'user_search'), - array('module'=>'invoice','method'=>'user_search_show'), - array('module'=>'invoice','method'=>'user_view'), - array('module'=>'invoice','method'=>'pdf'), - array('module'=>'invoice','method'=>'checkoutnow'), - array('module'=>'invoice','method'=>'tpl_checkout_multiple_preview'), - array('module'=>'invoice','method'=>'custom_tracking'), - array('module'=>'invoice','method'=>'has_unpaid'), -); -?> diff --git a/modules/invoice/invoice.inc.php b/modules/invoice/invoice.inc.php deleted file mode 100644 index 960d9663..00000000 --- a/modules/invoice/invoice.inc.php +++ /dev/null @@ -1,3498 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Invoice - */ - -/** - * The main AgileBill Invoice Class - * - * @package AgileBill - * @subpackage Modules:Invoice - */ -class invoice extends OSB_module { - # Hold the invoice items associated with this invoice - private $items = array(); - - # Array holding all our print information - public $print = array(); - # Enable summary invoice view that rolls multiple instances of the same sku w/identical base&setup price & attributes into one line item - private $summarizeInvoice = true; - - /** - * Delete an invoice - * - * @uses service - */ - public function delete($VAR) { - $db = &DB(); - - # Get the array - if (isset($VAR['delete_id'])) - $ids = explode(',',preg_replace('/,$/','',$VAR['delete_id'])); - elseif (isset($VAR['id'])) - $ids = explode(',',preg_replace('/,$/','',$VAR['id'])); - - # Load the service module - include_once(PATH_MODULES.'service/service.inc.php'); - $so = new service; - - foreach ($ids as $id) { - # Loop through all services for this invoice and delete: - $rs = $db->Execute(sqlSelect('service',array('where'=>array('invoice_id'=>$id)))); - - if (! $rs) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - return false; - } - - if ($rs->RecordCount()) { - while (! $rs->EOF) { - $so->delete($rs->fields['id']); - $rs->MoveNext(); - } - } - - # Delete the service record - $this->associated_DELETE = array(); - array_push($this->associated_DELETE,array('table'=>'invoice_commission','field'=>'invoice_id')); - array_push($this->associated_DELETE,array('table'=>'invoice_item','field'=>'invoice_id')); - array_push($this->associated_DELETE,array('table'=>'invoice_memo','field'=>'invoice_id')); -// array_push($this->associated_DELETE,array('table'=>'service','field'=>'invoice_id')); - array_push($this->associated_DELETE,array('table'=>'invoice_item_tax','field'=>'invoice_id')); - array_push($this->associated_DELETE,array('table'=>'invoice_item_discount','field'=>'invoice_id')); - - $result = parent::delete($VAR); - } - } - - /** - * View an Invoice - * Shown both in the admin pages and after checkout - * - * @uses net_term - */ - public function view($VAR) { - global $C_translate,$C_list; - - $db = &DB(); - - if ($smart = parent::view($VAR)) { - # Get the product checkout plugin name - if (! empty($smart['checkout_plugin_id'])) { - $rs = $db->Execute(sqlSelect('checkout','name',array('where'=>array('id'=>$smart['checkout_plugin_id'])))); - - if ($rs && $rs->RecordCount()) - $smart['checkout_plugin'] = $rs->fields['name']; - } - - $smart['balance'] = ($smart['total_amt'] == 0) ? 0 : $smart['total_amt']-$smart['billed_amt']-$smart['credit_amt']; - - # Get the tax details - if (! empty($smart['tax_amt'])) { - $rs = $db->Execute(sqlSelect($db,array('invoice_item_tax','tax'),'A.amount,B.description',sprintf('A.tax_id=B.id AND A.invoice_id=%s',$smart['id']))); - - if ($rs && $rs->RecordCount()) { - $taxes = array(); - while (! $rs->EOF) { - @$taxes[$rs->fields['description']] += $rs->fields['amount']; - $rs->MoveNext(); - } - - $smart['tax_arr'] = array(); - foreach ($taxes as $txds => $txamt) - array_push($smart['tax_arr'],array('description'=>$txds,'amount'=>$txamt)); - } - } - - # Get the discount details - if (! empty($smart['discount_amt'])) { - $rs = $db->Execute(sqlSelect('invoice_item_discount','amount,discount',array('where'=>array('invoice_id'=>$smart['id'])))); - - if ($rs && $rs->RecordCount()) { - $discounts = array(); - while (! $rs->EOF) { - @$discounts[$rs->fields['discount']] += $rs->fields["amount"]; - $rs->MoveNext(); - } - - $dhtml = ''; - foreach ($discounts as $dsds => $dsamt) - $dhtml .= sprintf('%s -
',$dsds,$dsds,number_format($dsamt,2)); - - $smart['discount_popup'] = $dhtml; - - $dhtml = ''; - foreach ($discounts as $dsds=>$dsamt) - $dhtml .= sprintf('%s - %s
',$dsds,number_format($dsamt,2)); - - $smart['discount_popup_user'] = $dhtml; - } - } - - # Get the checkout plugin details - if (! empty($smart['checkout_plugin_data'])) { - $plugin_data = unserialize($smart['checkout_plugin_data']); - - if (is_array($plugin_data)) - $smart['checkout_plugin_data'] = $plugin_data; - else - $smart['checkout_plugin_data'] = array($smart['checkout_plugin_data']); - } - - # Get the term dates - include_once(PATH_MODULES.'net_term/net_term.inc.php'); - $net_term = new net_term; - - $smart['termdates'] = $net_term->getTermDates($smart['net_term_id'],$smart['date_orig'],$smart['due_date']); - - # Get the line items - $rs = $db->Execute(sqlSelect('invoice_item','*',array('where'=>array('invoice_id'=>$smart['id'])))); - if (! $rs) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - return false; - } - - $ii=0; - while (! $rs->EOF) { - $smart_items[$ii] = $rs->fields; - - # Get the product attribs - if (! empty($rs->fields['product_attr'])) { - @$attrib = explode("\r\n",$rs->fields['product_attr']); - $js = ''; - - for ($attr_i=0; $attr_i%s : %s
',$attributei[0],$attributei[1]); - } - - $smart_items[$ii]['attribute_popup'] = $js; - } - - # Get the date range if set - if (! empty($rs->fields['date_start']) && ! empty($rs->fields['date_stop'])) { - $C_translate->value('invoice','start',date(UNIX_DATE_FORMAT,$rs->fields['date_start'])); - $C_translate->value('invoice','stop',date(UNIX_DATE_FORMAT,$rs->fields['date_stop'])); - - $smart_items[$ii]['range'] = $C_translate->translate('recur_date_range','invoice',''); - } - - # Set charge type for payment option list - $any_new = true; - if ($rs->fields['price_type']=='1' && ! empty($smart['recurr_arr']) && is_array(unserialize($smart['recurr_arr']))) - $any_recurring = true; - - $rs->MoveNext(); - $ii++; - } - - # Create a summary (for duplicate skus w/identical price,and attributes, roll into a single value - if ($this->summarizeInvoice) - $smart_items = $this->sInvoiceItemsSummary(); - - # Get the checkout (payment) options - if ($VAR['_page'] != 'invoice:view') { - # Get the converted amount due: - if ($smart['billed_currency_id'] != $smart['actual_billed_currency_id']) { - global $C_list; - - $CURRENCY = $smart['actual_billed_currency_id']; - if ($smart['billed_amt'] <= 0) - $total = $C_list->format_currency_decimal($smart['total_amt'],$CURRENCY); - else - $total = $C_list->format_currency_decimal($smart['total_amt'],$CURRENCY)-$smart['actual_billed_amt']; - - } else { - $CURRENCY = $smart['billed_currency_id']; - $total = $smart['total_amt']-$smart['billed_amt']; - } - - $q = sqlSelect('checkout','*',array('where'=>array('active'=>'1'))); - - if ($any_trial) - $q .= ' AND allow_trial=1'; - - if ($any_recurring) - $q .= ' AND allow_recurring=1'; - - if ($any_new) - $q .= ' AND allow_new=1'; - - $rs = $db->Execute($q); - - if (! $rs) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - return false; - } - - if ($rs->RecordCount()) { - while (! $rs->EOF) { - $show = true; - - # Check that the cart total is not to high: - if ($rs->fields['total_maximum'] != '' && $smart['total_amt'] >= $rs->fields['total_maximum']) - $show = false; - - # Check that the cart total is not to low: - if ($rs->fields['total_miniumum'] != '' && $smart['total_amt'] <= $rs->fields['total_miniumum']) - $show = false; - - # Check that the group requirement is met: - if ($show && ! empty($rs->fields['required_groups'])) { - global $C_auth; - - $arr = unserialize($rs->fields['required_groups']); - if (count($arr) > 0 && ! empty($arr[0])) - $show = false; - - for ($i=0; $iauth_group_by_id($arr)) { - $show = true; - $i = count($arr); - } - } - } - - # Check that the customer is not ordering a blocked SKU - if ($show && ! empty($rs->fields['excluded_products'])) { - $arr = unserialize($rs->fields['excluded_products']); - if (count($arr) > 0) { - for ($i=0; $ifields['default_when_amount'])) { - $arr = unserialize($rs->fields['default_when_amount']); - - for ($idx=0; $idx= $arr[$idx]) - $list_ord--; - - $idx = count($arr); - } - } - - # By Currency - if (! empty($rs->fields['default_when_currency'])) { - $arr = unserialize($rs->fields['default_when_currency']); - - for ($idx=0; $idxfields['default_when_group'])) { - $arr = unserialize($rs->fields['default_when_group']); - global $C_auth; - - for ($idx=0; $idxauth_group_by_id($arr[$idx])) - $list_ord--; - - $idx = count($arr); - } - } - - # By Country - if (! empty($rs->fields['default_when_country'])) { - $arr = unserialize($rs->fields['default_when_country']); - - for ($idx=0; $idxfields['country_id'] == $arr[$idx]) - $list_ord--; - - $idx = count($arr); - } - } - - # Add to the array - $checkout_optionsx[] = array('sort'=>$list_ord,'fields'=>$rs->fields); - } - - $rs->MoveNext(); - } - - # Sort the checkout_options array by the [fields] element - if (count($checkout_optionsx)>0) { - foreach ($checkout_optionsx as $key => $row) - $sort[$key] = $row['sort']; - - array_multisort($sort,SORT_ASC,$checkout_optionsx); - } - } - } - - # Get the payment details - if ($C_list->is_installed('payment')) { - require_once(PATH_MODULES.'payment/payment.inc.php'); - require_once(PATH_MODULES.'payment_item/payment_item.inc.php'); - $pii = new payment_item(); - - $i=0; - foreach ($pii->sql_GetRecords(array('where'=>array('invoice_id'=>$VAR['id']),'orderby'=>'date_last,invoice_id')) as $payment) { - if ($payment['alloc_amt']) { - $pi = new payment($payment['payment_id']); - $smart['payment_data'][$i]['payment_id'] = $payment['payment_id']; - $smart['payment_data'][$i]['date_payment'] = $pi->getRecordAttr('date_payment'); - $smart['payment_data'][$i]['total'] = $pi->getRecordAttr('total_amt'); - $smart['payment_data'][$i]['alloc'] = $payment['alloc_amt']; - $i++; - } - } - } - - # No results - if (count($smart) == 0) { - global $C_debug; - $C_debug->error(__FILE__, __METHOD__,'The selected record does not exist any longer, or your account is not authorized to view it'); - - return; - } - - # Define the DB vars as a Smarty accessible block - global $smarty; - - # Define the results - $smarty->assign('cart',$smart_items); - $smarty->assign('record',$smart); - $smarty->assign('checkoutoptions',$checkout_optionsx); - } - } - - public function user_search_show($VAR) { - global $smarty; - - $smart = parent::user_search_show($VAR); - - # Add the balance to the array - foreach ($smart as $index => $details) - $smart[$index]['balance'] = $details['total_amt']-$details['billed_amt']-$details['credit_amt']; - - $smarty->assign('search_show',$smart); - } - - /** - * User view an invoice - */ - public function user_view($VAR) { - global $C_auth; - - if (! SESS_LOGGED) - return false; - - # Verify the account_id for this order is the SESS_ACCOUNT - if ($C_auth->auth_method_by_name('invoice','view') == false) { - $invoices = $this->sql_GetRecords(array('where'=>array('id'=>$VAR['id']))); - - if (! count($invoices) || $invoices[0]['account_id'] != SESS_ACCOUNT) - return false; - } - - $this->view($VAR); - } - - /** - * Get the balance of the account - */ - public function sPreviousBalance() { - static $CACHE = array(); - - $id = $this->getRecordAttr('id'); - if (! isset($CACHE[$id])) { - - $CACHE[$id] = 0; - foreach ($this->sPreviousInvoices() as $item) - $CACHE[$id] += round($item['total_amt']-$item['billed_amt']-$item['credit_amt'],2); - } - - return $CACHE[$id]; - } - - /** - * Get all the previous invoices still unpaid - */ - private function sPreviousInvoices() { - static $CACHE = array(); - - $id = $this->getRecordAttr('id'); - if (! isset($CACHE[$id])) { - - $CACHE[$id] = $this->sql_GetRecords( - array('where'=>sprintf('account_id=%s AND status=1 AND (billed_amt+IFNULL(credit_amt,0)getRecordAttr('account_id'),$this->getRecordAttr('due_date'),$id))); - } - - return $CACHE[$id]; - } - - /** - * Get the items on an invoice - * - * @uses invoice_item - */ - private function sInvoiceItems() { - static $CACHE = array(); - - $id = $this->getRecordAttr('id'); - if (! isset($CACHE[$id])) { - include_once(PATH_MODULES.'invoice_item/invoice_item.inc.php'); - $ito = new invoice_item(); - - $CACHE[$id] = $ito->sInvoiceItems($this->getRecordAttr('id')); - } - - return $CACHE[$id]; - } - - /** - * Create modified array for invoice summarization - * - * This function will summarise the invoice items based on the same - * SKU, BASE_PRICE, SETUP_PRICE & PRODUCT_ATTR - */ - public function sInvoiceItemsSummary() { - $sum = array(); - - foreach ($this->sInvoiceItems() as $index => $item) { - $unique = true; - - # Unique line item - if (isset($sum[$item['sku']])) { - # Is unique price/attributes? - - foreach ($sum[$item['sku']] as $sid => $flds) { - if ($flds['price_base'] == $item['price_base'] && - $flds['price_setup'] == $item['price_setup']) { - - $sum[$item['sku']][$sid]['quantity'] += $item['quantity']; - $unique = false; - - break; - } - } - } - - # Unique line item - if ($unique) { - $a = count($sum[$item['sku']]); - $sum[$item['sku']][$a] = $item; - $sum[$item['sku']][$a]['product_name'] = $this->sLineItemDesc($index,true); - } - } - - if (count($sum)) { - $items = array(); - foreach ($sum as $sku => $item) - foreach ($item as $sitem) - array_push($items,$sitem); - - return $items; - } - } - - /** - * Return a line description, suitable for printing on invoices - * - * @uses product_translate - */ - private function sLineItemDesc($id,$summary=false) { - $li = $this->sInvoiceItems(); - if (! isset($li[$id])) - return 'Other Item'; - - require_once(PATH_MODULES.'product_translate/product_translate.inc.php'); - $pdo = new product_translate($li[$id]['product_id']); - - if ($summary) { - if (is_null($li[$id]['sku']) && is_null($li[$id]['product_id'])) - return _('Other Item'); - - elseif (is_null($li[$id]['product_id'])) { - switch ($li[$id]['sku']) { - case 'DOMAIN-REGISTER': $name = _('Register Domain'); break; - case 'DOMAIN-TRANSFER': $name = _('Transfer Domain'); break; - case 'DOMAIN-PARK': $name = _('Park Domain'); break; - case 'DOMAIN-RENEW': $name = _('Renew Domain'); break; - default: $name = $sku; - } - - return $name; - - } elseif ($li[$id]['product_id']) - return $pdo->getRecordAttr('name'); - - } else { - switch ($li[$id]['sku']) { - case 'DOMAIN-REGISTER': $name = _('Register Domain'); break; - case 'DOMAIN-TRANSFER': $name = _('Transfer Domain'); break; - case 'DOMAIN-PARK': $name = _('Park Domain'); break; - case 'DOMAIN-RENEW': $name = _('Renew Domain'); break; - default: return $li[$id]['product_name'] ? $li[$id]['product_name'] : - ($pdo->getRecordAttr('description_short') ? $pdo->getRecordAttr('description_short') : $pdo->getRecordAttr('name')); - } - - return $li[$id]['product_name'] ? $li[$id]['product_name'] : sprintf('%s (%s.%s)',$name,$li[$id]['domain_name'],$li[$id]['domain_tld']); - } - - return 'Other Item'; - } - - public function sql_invoice_soon($fields=null,$adddays=0,$account=null,$orderby=null) { - return $this->sql_InvoiceSoon($fields,$adddays,$account,$orderby); - } - /** - * Return the SQL that determines which invoices need to be generated - * - * Invoices are generated when the greater of: - * + system default (setup:max_inv_gen_period), (to be deprecated) - * + system default (setup_invoice:invoice_advance_gen), - * + the account setting (account:invoice_advance_gen) - * + the net_terms setting (net_term:invoice_advance_gen) (linked from the account:net_term_id)) - * - * This function can be called to display the SQL that is need to generate upcoming invoices. - * - * @param string The SQL to use in the SELECT portion of the query, to return the fields - * @param int Days in advance of the normal invoice generation date to obtain - * @param int|array Limit the query to just a(n) (set of) Account ID(s) - * @param string The SQL to use in the ORDER BY portion of the query. - */ - public function sql_InvoiceSoon($fields=null,$adddays=0,$account=null,$orderby=null) { - global $C_list; - - # Get the max invoice days from the system configuration tables. - $days = $this->sInvoiceDays(); - - # Pre-notification date for service - $max_date = date('Y-m-d',time()+(($adddays+$days)*86400)); - - if ($account) { - if (is_array($account)) - $account_where = sprintf('AND account.id IN (%s)',implode(',',$account)); - else - $account_where = sprintf('AND account.id=%s',$account); - - } else - $account_where = ''; - - if (is_null($fields)) - $fields = 'DISTINCT service.id AS sid,account.id AS account_id,FROM_UNIXTIME(service.date_next_invoice,\'%Y-%m-%d\') AS invoice_date,service.sku AS sku,service.price AS price,account.first_name AS first_name,account.last_name AS last_name,account.currency_id AS billed_currency_id,service.date_orig AS date_orig'; - - if (is_null($orderby)) - $orderby = 'ORDER BY account_id,invoice_date,sid'; - else - $orderby = sprintf('ORDER BY %s',$orderby); - - // @todo NET_TERM is not tested. - if ($C_list->is_installed('net_term')) { - $net_term = 'LEFT JOIN {p}net_term AS net_term ON (account.net_term_id=net_term.id AND net_term.site_id={s})'; - $net_term_where = sprintf('OR ((net_term.invoice_advance_gen!="" OR net_term.invoice_advance_gen IS NOT NULL) AND service.date_next_invoice<=((86400*(net_term.invoice_advance_gen+%s+%s))+(UNIX_TIMESTAMP(CURDATE()))))',$adddays,$days); - } else { - $net_term = ''; - $net_term_where = ''; - } - - $sql = sprintf(' -SELECT %s -FROM {p}service AS service -JOIN {p}account AS account ON (service.account_id=account.id AND account.site_id={s}) -%s -WHERE service.site_id={s} -AND service.active=1 -AND price > 0 -AND (service.suspend_billing IS NULL OR service.suspend_billing=0) -AND (service.date_next_invoice>0 AND service.date_next_invoice IS NOT NULL) -AND ( - ((account.invoice_advance_gen!="" OR account.invoice_advance_gen IS NOT NULL) AND service.date_next_invoice<=((86400*(account.invoice_advance_gen+%s+%s))+(UNIX_TIMESTAMP(CURDATE())))) - %s - OR service.date_next_invoice<=UNIX_TIMESTAMP("%s") -) %s %s', - $fields,$net_term,$adddays,$days,$net_term_where,$max_date,$account_where,$orderby); - - $sql = str_replace('{p}',AGILE_DB_PREFIX,$sql); - $sql = str_replace('{s}',DEFAULT_SITE,$sql); - - return $sql; - } - - /** - * Template method to list all invoices that will be generated soon - */ - public function tmInvoiceSoon($VAR) { - global $smarty,$C_list; - - $db = &DB(); - - $order_by = isset($VAR['order_by']) ? $VAR['order_by'] : 'account_id,invoice_date,sid'; - - # Then from the setup_invoice table. - $setup = $db->Execute(sqlSelect('setup_invoice','advance_notice')); - - # Run the database query - $result = $db->Execute($this->sql_InvoiceSoon(null,$setup->fields['advance_notice'],null,$order_by)); - - # Error reporting - if (! $result) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - return false; - - } elseif (! $result->RecordCount()) { - return false; - } - - $invoice = array(); - $i = 0; - while (! $result->EOF) { - $result->fields['_C'] = ++$i%2 ? 'row1' : 'row2'; - $result->fields['id'] = $result->fields['sid']; - array_push($invoice,$result->fields); - $result->MoveNext(); - } - - # Create the search record: - if (count($invoice) > 0) { - # create the search record - #include_once(PATH_CORE.'search.inc.php'); - #$search = new CORE_search; - - #$arr['module'] = $this->module; - #$arr['sql'] = $this->sql_InvoiceSoon(); - #$arr['limit'] = $limit; - #$arr['order_by']= $order_by; - #$arr['results'] = $results; - #$search->add($arr); - - # Define the search id and other parameters for Smarty - $smarty->assign('search_id',$search->id); - $smarty->assign('page','1'); - $smarty->assign('order_by',$order_by); - } - - # Define the result count - $smarty->assign('results',count($invoice)); - $smarty->assign('search_show',$invoice); - } - - public function performance($VAR) { return $this->tmPerformance($VAR); } - /** - * Site Performance (for the admin dashboard) - */ - public function tmPerformance($VAR) { - global $smarty,$C_list,$C_translate; - - $db = &DB(); - $period = array(); - - # Get the period type, default to month - $period['period'] = empty($VAR['period']) ? 'y' : $VAR['period']; - - switch ($period['period']) { - case 'w': - $smarty->assign('period_compare',sprintf('%s %s %s',_('This Week'),_('vs'),('Last Week'))); - $smarty->assign('period_forcast',_('This Week')); - - $period['this_start'] = mktime(0,0,0,date('m'),date('d')-date('w'),date('y')); - $period['this_end'] = mktime(23,59,59,date('m'),date('d'),date('y')); - $period['last_start'] = mktime(0,0,0,date('m'),date('d',$period['this_start'])-7,date('y')); - $period['last_end'] = mktime(23,59,59,date('m'),date('d')-7,date('y')); - - break; - - case 'm': - $smarty->assign('period_compare',sprintf('%s %s %s',_('This Month'),_('vs'),('Last Month'))); - $smarty->assign('period_forcast',_('This Month')); - - $period['this_start'] = mktime(0,0,0,date('m'),1,date('y')); - $period['this_end'] = mktime(23,59,59,date('m'),date('d'),date('y')); - $period['last_start'] = mktime(0,0,0,date('m',$period['this_start'])-1,1,date('y')); - $period['last_end'] = mktime(23,59,59,date('m')-1,date('d'),date('y')); - - break; - - case 'y': - default: - $smarty->assign('period_compare',sprintf('%s %s %s',_('This Year'),_('vs'),('Last Year'))); - $smarty->assign('period_forcast',_('This Year')); - - $period['this_start'] = mktime(0,0,0,1,1,date('y',time())); - $period['this_end'] = mktime(23,59,59,date('m'),date('d'),date('y')); - $period['last_start'] = mktime(0,0,0,1,1,date('y',$period['this_start'])-1); - $period['last_end'] = mktime(23,59,59,date('m'),date('d'),date('y')-1); - - break; - } - - # Get sales for this period - $rs = $db->Execute(sqlSelect('invoice','SUM(total_amt) as total_amt', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s',$period['this_start'],$period['this_end'])))); - - if ($rs && $rs->RecordCount()) - $this_amt = $rs->fields['total_amt']; - else - $this_amt = 0; - - # Get sales for last period - $rs = $db->Execute(sqlSelect('invoice','SUM(total_amt) as total_amt', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s',$period['last_start'],$period['last_end'])))); - - if ($rs && $rs->RecordCount()) - $last_amt = $rs->fields['total_amt']; - else - $last_amt = 0; - - $smarty->assign('sales_current',$this_amt); - $smarty->assign('sales_previous',$last_amt); - $smarty->assign('sales_change',($last_amt > 0) ? $this_amt/$last_amt*100-100 : 0); - - # Get forcast for current period - switch ($period['period']) { - case 'w': - $dow = date('w')+1; - - $forcast_daily = $this_amt/$dow; - $forcast_l_daily = $last_amt/7; - $forcast_change = $forcast_daily/$forcast_1_daily*100-100; - $forcast_current = $forcast_daily*7; - - break; - - case 'm': - $forcast_daily = $this_amt/date('d'); - $forcast_1_daily = $last_amt/date('t',mktime(0,0,0,date('m')-1,1,date('y'))); - $forcast_change = $forcast_daily/$forcast_1_daily*100-100; - $forcast_current = $forcast_daily*date('t'); - - break; - - case 'y': - default: - $forcast_daily = $this_amt/date('z'); - $forcast_1_daily = $last_amt/356; - $forcast_change = $forcast_daily/$forcast_1_daily*100-100; - $forcast_current = $forcast_daily*365; - - break; - } - - $smarty->assign('forcast_current',$forcast_current); - $smarty->assign('quota_current',$forcast_daily); - $smarty->assign('forcast_change',($last_amt > 0) ? $forcast_daily/$forcast_1_daily*100 : 0); - - # Get AR credits for this period - $rs = $db->Execute(sqlSelect('invoice','SUM(billed_amt) as total_amt', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s AND billed_amt>0',$period['this_start'],$period['this_end'])))); - - if ($rs && $rs->RecordCount()) - $this_billed_amt = $rs->fields['total_amt']; - else - $this_billed_amt = 0; - - # Get AR credits for last period - $rs = $db->Execute(sqlSelect('invoice','SUM(billed_amt) as total_amt', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s AND billed_amt>0',$period['last_start'],$period['last_end'])))); - - if ($rs && $rs->RecordCount()) - $last_billed_amt = $rs->fields['total_amt']; - else - $last_billed_amt = 0; - - $smarty->assign('ar_credits_current',$this_billed_amt); - $smarty->assign('ar_credits_previous',$last_billed_amt); - $smarty->assign('ar_credit_change',($last_billed_amt > 0) ? $this_billed_amt/$last_billed_amt*100-100 : 0); - - # Get AR Balance - $smarty->assign('ar_balance_current',$this_billed_amt-$this_amt); - $smarty->assign('ar_balance_last',$last_billed_amt-$last_amt); - - # Get Users (current) - $rs = $db->Execute(sqlSelect('account','COUNT(*) as count', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s',$period['this_start'],$period['this_end'])))); - - if ($rs && $rs->RecordCount()) - $users_current = $rs->fields['count']; - else - $users_current = 0; - - # Get Users (previous) - $rs = $db->Execute(sqlSelect('account','COUNT(*) as count', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s',$period['last_start'],$period['last_end'])))); - - if ($rs && $rs->RecordCount()) - $users_previous = $rs->fields['count']; - else - $user_previous = 0; - - $smarty->assign('users_current',$users_current); - $smarty->assign('users_previous',$users_previous); - $smarty->assign('users_change',($users_previous > 0) ? $users_current/$users_current*100-100 : 0); - - # Get Affiliate stats - if ($C_list->is_installed('affiliate')) { - $smarty->assign('show_affiliates',true); - - # Get affiliate sales for this period - $rs = $db->Execute(sqlSelect('invoice','SUM(total_amt) as total_amt', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s AND affiliate_id NOT IN (0,"")',$period['this_start'],$period['this_end'])))); - - if ($rs && $rs->RecordCount()) - $this_amt = $rs->fields['total_amt']; - else - $this_amt = 0; - - # Get affiliate sales for last period - $rs = $db->Execute(sqlSelect('invoice','SUM(total_amt) as total_amt', - array('where'=>sprintf('date_orig>=%s AND date_orig<=%s AND affiliate_id NOT IN (0,"")',$period['last_start'],$period['last_end'])))); - - if ($rs && $rs->RecordCount()) - $last_amt = $rs->fields['total_amt']; - else - $last_amt = 0; - - $smarty->assign('affiliate_sales_current',$this_amt); - $smarty->assign('affiliate_sales_previous',$last_amt); - $smarty->assign('affiliate_sales_change',($last_amt > 0) ? $this_amt/$last_amt*100-100 : 0); - } - - # Generate the Calendar Overview - include_once(PATH_MODULES.'core/calendar.inc.php'); - $calendar = new calendar; - - $C_list->currency(DEFAULT_CURRENCY); - $currency_symbol = $C_list->format_currency[DEFAULT_CURRENCY]['symbol']; - - # Get the paid/due invoice statistics - $records = $this->sql_GetRecords(array('where'=>sprintf('date_orig>=%s AND date_orig<=%s',$calendar->start,$calendar->end))); - - $paid = array(); - $due = array(); - if (count($records)) { - foreach ($records as $rs) { - $day = date('j',$rs['date_orig']); - - if ($rs['billed_amt'] > 0 && ($rs['billing_status'] == 1 || $rs['refund_status'] != 1)) - @$paid[$day] += $rs['billed_amt']; - - if ($rs['billing_status'] != 1 && $rs['refund_status'] != 1) - @$due[$day] += $rs['total_amt']-$rs['billed_amt']; - } - - foreach ($paid as $day => $item) - $calendar->add(sprintf('%s - %s%s',_('Paid'),$currency_symbol,number_format($item,2)),$day,'green','green'); - - foreach ($due as $day => $item) - $calendar->add(sprintf('%s - %s%s',_('Due'),$currency_symbol,number_format($item,2)),$day,'red','red'); - } - - # Get the upcoming due services - $rs = $db->Execute(sqlSelect('service','date_next_invoice,price', - array('where'=>sprintf('price>0 AND date_next_invoice>=%s AND date_next_invoice<=%s AND suspend_billing<>1', - $calendar->start,$calendar->end)))); - - if ($rs && $rs->RecordCount()) { - $due = array(); - - while (! $rs->EOF) { - $day = date('j',$rs->fields['date_next_invoice']); - @$due[$day] += $rs->fields['price']; - - $rs->MoveNext(); - } - - foreach ($due as $day=>$item) - $calendar->add(sprintf('%s - %s%s',_('Recurring'),$currency_symbol,number_format($item,2)),$day,'grey','grey'); - } - - $smarty->assign('calendar',$calendar->generate()); - - return; - } - - /** - * Task based function to e-mail or store printable PDF of all unprinted invoices - * - * @todo This seems to be hard limited to do 100 invoices in a run - why? (make it configurable, or remove the limit?) - */ - public function task_DeliverInvoices() { - # Get all unprinted invoices - $db = &DB(); - - $rs = $db->SelectLimit(sqlSelect($db,array('invoice','account'), - 'A.id,B.email,B.first_name,B.last_name,B.invoice_delivery,B.invoice_show_itemized', - '(A.billing_status=0 OR A.billing_status IS NULL) AND (A.print_status=0 OR A.print_status=NULL) AND (A.status=1) AND A.account_id=B.id AND (B.invoice_delivery IS NOT NULL AND B.invoice_delivery>0)'),100); - - if ($rs && $rs->RecordCount()) { - # Send the e-mail.... - require_once(PATH_INCLUDES.'phpmailer/class.phpmailer.php'); - $mail = new PHPMailer(); - - $mail->From = SITE_EMAIL; - $mail->FromName = SITE_NAME; - - /* - $mail->SMTPAuth = true; - $mail->Host = "smtp.domain.com"; - $mail->Username = "user"; - $mail->Password = "pass"; - $mail->Mailer = "smtp"; - $mail->Debug = true; - */ - - while (! $rs->EOF) { - $this->sql_LoadRecord($rs->fields['id']); - - switch ($rs->fields['invoice_delivery']) { - # Email Invoice - case 1: - if ($file = $this->pdf(null,null,array('dest'=>'S'))) { - $mail->AddAddress($rs->fields['email'], sprintf('%s %s',$rs->fields['first_name'],$rs->fields['last_name'])); - $mail->AddBcc('deon@leenooks.vpn'); - $mail->AddBcc('chris@graytech.com.au'); - $mail->Subject = sprintf('%s %s: %s',SITE_NAME,_('Invoice'),$this->getRecordAttr('id')); - $mail->AltBody = sprintf("Please find the printable version of invoice number %s attached.\r\n\r\nThank you,\r\n%s",$this->getRecordAttr('id'),SITE_NAME); - $mail->IsHTML(true); - $mail->AddEmbeddedImage(sprintf('%s/%s',PATH_THEMES.DEFAULT_THEME,'invoice/invoice-logo.png'),'logoimg','','base64','image/png'); - $mail->Body = sprintf('

Please find attached invoice %s from %s

',$this->getRecordAttr('id'),SITE_NAME); - $mail->Body .= sprintf('

A PDF version is also attached with more detail and payment options. Alternatively, you can visit our website and pay online.

', - URL,$this->getRecordAttr('id')); - $mail->Body .= "
\n"; - $mail->Body .= wordwrap($this->html(array('id'=>$this->getRecordAttr('id')))); - $mail->AddStringAttachment($file,sprintf('%s.pdf',$this->getPrintInvoiceID()),'base64','application/pdf'); - - if ($mail->Send()) - $db->Execute(sqlUpdate($db,'invoice',array('print_status'=>1),array('id'=>$this->getRecordAttr('id')))); - else - printf('Unable to email invoice # %s to %s
',$this->getRecordAttr('id'),$rs->fields['email']); - - $mail->ClearAddresses(); - $mail->ClearAttachments(); - } - - break; - - # Print Invoice - case 2: - $file = tempnam(PATH_FILES,sprintf('pdf_inv_%s.pdf',$this->getPrintInvoiceID())); - $this->pdf(null,null,array('dest'=>'F','file'=>$file)); - - if (copy($file,sprintf('%sinvoice_%s.pdf',AGILE_PDF_INVOICE_PATH,$this->getPrintInvoiceID()))) - $db->Execute(sqlUpdate($db,'invoice',array('print_status'=>1),array('id'=>$this->getRecordAttr('id')))); - - unlink($file); - break; - - default: - printf('Unknown invoice_delivery: %s for %s
',$rs->fields['invoice_delivery'],$this->getRecordAttr('id')); - } - - $rs->MoveNext(); - } - } - } - - /** - * Email a list of overdue invoices. - * - * @uses PHPMailer - * @uses staff - */ - public function task_OverdueListEmail() { - # @todo Make this configurable somewhere. - $receipient_dep = 'Accounts'; - - require_once(PATH_MODULES.'staff/staff.inc.php'); - $so = new staff; - - if (! $staff = $so->sDepartmentMemberEmail($receipient_dep)) - return false; - - $db = &DB(); - - $rs = $db->Execute(sqlSelect($db,array('invoice','account'),'A.id,A.account_id,ROUND(SUM(A.total_amt-A.billed_amt-IFNULL(A.credit_amt,0)),2) as total,B.first_name,B.last_name,A.due_date',sprintf('A.status=1 AND ROUND(A.total_amt-A.billed_amt-IFNULL(A.credit_amt,0),2)>0 AND A.account_id=B.id AND A.due_date<%s',time()),false,false,false,'account_id,id')); - if ($rs && $rs->RecordCount()) { - $body = ''; - $account_total = 0; - $account_id = ''; - $i = 0; - $count = 0; - $grand_total = 0; - while (! $rs->EOF) { - if ($account_id != $rs->fields['account_id'] && $i) { - $body .= sprintf("Total: %3.2f\n\n",$account_total); - $account_total = 0; - $i = 0; - } - - if (! $i) - $body .= sprintf("%s %s (%s)\n",$rs->fields['last_name'],$rs->fields['first_name'],$rs->fields['account_id']); - - $body .= sprintf(" Invoice: %s, Due Date: %s, Amount: %3.2f\n",$rs->fields['id'],date('Y-m-d',$rs->fields['due_date']),$rs->fields['total']); - $account_total += $rs->fields['total']; - $grand_total += $rs->fields['total']; - $account_id = $rs->fields['account_id']; - $count++; - $i++; - - $rs->MoveNext(); - } - - if ($account_total) - $body .= sprintf("Total: %3.2f\n",$account_total); - - $body .= "\n"; - - if ($count || $ground_total) - $body .= sprintf("%3.2f outstanding in %s invoices\n",$grand_total,$count); - - # Send the e-mail.... - require_once(PATH_INCLUDES.'phpmailer/class.phpmailer.php'); - $mail = new PHPMailer(); - - foreach ($staff as $email => $name) - $mail->AddAddress($email,$name); - - $mail->From = SITE_EMAIL; - $mail->FromName = SITE_NAME; - $mail->Subject = _('List of Invoices Overdue'); - $mail->Body = $body; - $mail->Send(); - } - } - - /** - * Return the invoice ID - */ - public function getPrintInvoiceID() { - return sprintf('%02s-%04s-%06s',DEFAULT_SITE,$this->getRecordAttr('account_id'),$this->getRecordAttr('id')); - } - - public function getPrintInvoiceNum() { - return $this->getRecordAttr('id'); - } - - /** - * Add an item to the invoice - * - * @uses host_tld - * @uses invoice_item - * @uses product - */ - public function aaddItem($item) { - include_once(PATH_MODULES.'invoice_item/invoice_item.inc.php'); - $ito = new invoice_item; - - foreach ($item as $i => $v) - if (isset($ito->field[$i])) - $ito->setRecordAttr($i,$v); - - $ito->setRecordAttr('invoice_id',$this->getRecordAttr('id')); - if (! is_null($this->getRecordAttr('account_id'))) - $ito->setRecordAttr('account_id',$this->getRecordAttr('account_id')); - - if (! empty($item['product_id'])) { - include_once(PATH_MODULES.'product/product.inc.php'); - $po = new product($item['product_id']); - - $ito->setRecordAttr('product_name',$po->getTranslateField('name')); - $ito->setRecordAttr('product_id',$po->getRecordAttr('id')); -// $ito->setRecordAttr('sku',$po->getRecordAttr('sku')); - $ito->setRecordAttr('quantity',isset($item['quantity']) ? $item['quantity'] : 1); - $ito->setRecordAttr('price_type',$po->getRecordAttr('price_type')); - $ito->setRecordAttr('recurring_schedule',isset($item['recurring_schedule']) ? $item['recurring_schedule'] : $po->getRecordAttr('price_recurr_default')); - - if (isset($item['price_base'])) - $ito->setBaseRate($item['price_base']); - - else { - $price = $po->price_prod( - array( - 'price_type'=>$po->getRecordAttr('price_type'), - 'price_recurr_type'=>$po->getRecordAttr('price_recurr_type'), - 'price_recurr_weekday'=>$po->getRecordAttr('price_recurr_weekday'), - 'price_recurr_week'=>$po->getRecordAttr('price_recurr_week'), - 'price_group'=>$po->getRecordAttr('price_group'), - 'price_base'=>$po->getRecordAttr('price_base'), - 'price_setup'=>$po->getRecordAttr('price_setup')), - $ito->getRecordAttr('recurring_schedule'),$this->getRecordAttr('account_id'),false); - - $ito->setRecordAttr('price_setup',isset($item['price_setup']) ? $item['price_setup'] : $price['setup']); - $ito->setBaseRate($price['base']); - } - - $billdates = $po->recurrDates($ito->getRecordAttr('recurring_schedule'),$po->getRecordAttr('recur_weekday'),null, - is_null($ito->getRecordAttr('date_start')) ? time() : $ito->getRecordAttr('date_start')); - $ito->setRecordAttr('date_start',$billdates['date']); - $ito->setRecordAttr('date_stop',$billdates['end']); - $ito->setProRata($billdates['prorata']); - - } elseif (! empty($item['charge_id'])) { - - } elseif ($item['type'] == 'domain') { - include_once(PATH_MODULES.'host_tld/host_tld.inc.php'); - $hto = new host_tld(); - - #@todo - TEMP until we have another recurrDates() function that we can use. - include_once(PATH_MODULES.'product/product.inc.php'); - $po = new product(); - - $tld = $hto->sql_GetRecords(array('where'=>array('name'=>$item['domain_tld']))); - if (! count($tld)) { printf('NO TLD FOR %s??',$item['domain_tld']);die();}; - - $tld = array_pop($tld); - $pg = unserialize($tld['price_group']); - - # @todo - need to improve this code after reworking host_tld - switch (@$item['host_type']) { - case 'register' : - $ito->setRecordAttr('product_name','Domain Name Register'); - break; - - default: - $ito->setRecordAttr('product_name','Domain Name Renewal'); - } - $ito->setRecordAttr('recurring_schedule',isset($item['recurring_schedule']) ? $item['recurring_schedule'] : 5);// get this from host_tld - - $billdates = $po->recurrDates($ito->getRecordAttr('recurring_schedule'),null,null, - is_null($ito->getRecordAttr('date_start')) ? time() : $ito->getRecordAttr('date_start'),true); - $ito->setRecordAttr('date_start',$billdates['date']); - $ito->setRecordAttr('date_stop',$billdates['end']); - $ito->setProRata($billdates['prorata']); - $ito->setRecordAttr('price_type',1); - $ito->setRecordAttr('price_setup',0); - - if (is_null($ito->getRecordAttr('price'))) { - include_once(PATH_MODULES.'host_tld/host_tld.inc.php'); - $tldObj = new host_tld; - - $tldprice = $tldObj->price_tld_arr($ito->getRecordAttr('domain_tld'),$item['host_type'], - false,false,false,$ito->getRecordAttr('account_id')); - $ito->setBaseRate($tldprice[$ito->getRecordAttr('domain_term')]); - } - - } else { - echo '
';print_r(array('i'=>$item,'ii'=>$ito));
-			echo 'NEED TO FIGURE OUT THE PRICE IF WE ARE NOT A PRODUCT';die();
-			$ito->setRecordAttr('price_setup',0);
-			$ito->setRecordAttr('recurring_schedule',isset($item['recurr_schedule']) ? $item['recurr_schedule'] : 0);
-		}
-
-		# If we are a cart, we'll set a cart ID, so the item can be deleted.
-		if (isset($item['cart_id']))
-			$ito->setRecordAttr('cart_id',$item['cart_id']);
-
-		array_push($this->items,$ito);
-
-		# Return the item id.
-		return count($this->items)-1;
-	}
-
-	public function sCountItems() {
-		return count($this->items);
-	}
-
-	public function getItems() {
-		$items = array();
-
-		foreach ($this->items as $item)
-			array_push($items,$item->getRecord());
-
-		return $items;
-	}
-
-	public function getProductItems() {
-		$items = array();
-
-		foreach ($this->items as $item)
-			if (! is_null($item->getRecordAttr('product_id')))
-				array_push($items,$item->getRecordAttr('product_id'));
-
-		return $items;
-	}
-
-	public function getProductItemTypes() {
-		$items = array();
-
-		foreach ($this->items as $item)
-			if (! is_null($item->getRecordAttr('price_type')))
-				array_push($items,$item->getRecordAttr('price_type'));
-
-		return array_unique($items,SORT_NUMERIC);
-	}
-
-	/**
-	 * This function will get all the discount codes used in the invoice
-	 * it will also cause all the discounts to be re-calcated
-	 */
-	public function getDiscountDetails() {
-		$discounts = array();
-
-		foreach ($this->items as $item)
-			foreach ($item->getDiscountArr($this->sSubTotal()) as $discount)
-				@$discounts[$discount['discount']] += $discount['amount'];
-
-		$d = array();
-		foreach ($discounts as $k=>$v)
-			array_push($d,array('name'=>$k,'total'=>$v));
-
-		return $d;
-	}
-
-	public function sTotalDiscount($recalc=false) {
-		$total = 0;
-
-		if ($recalc)
-			$this->getDiscountDetails();
-
-		foreach ($this->items as $item)
-			$total += $item->getRecordAttr('discount_amt');
-
-		return $total;
-	}
-
-	# @todo change this to work the same way as getDiscountDetails()
-	public function getTaxDetails() {
-		$taxes = array();
-
-		foreach ($this->items as $item)
-			foreach ($item->getTaxArr() as $tax)
-				@$taxes[$tax['name']] += $tax['rate'];
-
-		return $taxes;
-	}
-
-	public function sTotalTax($recalc) {
-		$total = 0;
-
-		if ($recalc)
-			$this->getTaxDetails();
-
-		foreach ($this->items as $item)
-			$total += $item->getRecordAttr('tax_amt');
-
-		return $total;
-	}
-
-	/**
-	 * This function will calculate the pre-tax/pre-discounted totals for this invoice
-	 */
-	public function sSubTotal($calc=false) {
-		static $total;
-
-		if ($total && ! $calc)
-			return $total;
-		else
-			$total = 0;
-
-		foreach ($this->items as $item)
-			$total += $item->sGetSubTotalAmt();
-
-		return $total;
-	}
-
-	public function sTotal($calc=false) {
-		static $total;
-
-		if ($total && ! $calc)
-			return $total;
-		else
-			$total = 0;
-
-		foreach ($this->items as $item)
-			$total += $item->sGetTotalAmt($calc);
-
-		return $total;
-	}
-
-	/**
-	 * Calculate the recurring amount for this invoice
-	 *
-	 * The recurring amount is only applicable if all items have the same recur_schedule
-	 */
-	public function sRecurAmt($calc=false) {
-		static $total;
-
-		if (! is_null($total) && ! $calc)
-			return $total;
-		else
-			$total = null;
-
-		$sched = null;
-		foreach ($this->items as $item) {
-			if (is_null($sched))
-				$sched = $item->getRecordAttr('recurring_schedule');
-
-			if ($sched != $item->getRecordAttr('recurring_schedule'))
-				return null;
-
-			$total += $item->sGetRecurAmt();
-		}
-
-		return $total;
-	}
-
-	public function sql_SaveRecord($noconvert=false) {
-		global $VAR;
-
-		# (Re)Calculate our discounts and taxes
-		$this->setRecordAttr('discount_amt',$this->sTotalDiscount(true));
-		$this->setRecordAttr('tax_amt',$this->sTotalTax(true));
-		$this->setRecordAttr('total_amt',$this->sTotal(true));
-
-		# Save the invoice and items
-		# @todo make this into a transaction, so if the item records fail, we dont have a partial save
-		if ($id = parent::sql_SaveRecord($noconvert)) {
-			foreach ($this->items as $item) {
-				$item->setRecordAttr('invoice_id',$id);
-
-				# Remove the cart id
-				$item->delRecordAttr('cart_id');
-
-				if (! $item->sql_SaveRecord($noconvert,false)) {
-					echo '
';print_r($item);die();
-				}
-			}
-		}
-
-		return $id;
-	}
-
-	public function custom_tracking($VAR) { return $this->drCustomTracking($VAR); }
-	/**
-	 * Custom Tracking
-	 */
-	public function drCustomTracking($VAR) {
-		# If we dont have a tracking file, or we are not logged in, no point continuing.
-		if (! is_file(PATH_FILES.'tracking.txt') || ! SESS_LOGGED)
-			return false;
-
-		# Check if we are in the iframe, otherwise render the iframe.
-		if (empty($VAR['_escape']) || empty($VAR['confirm'])) {
-			printf('',
-				md5(microtime()));
-			return;
-		}
-
-		# Get the un-tracked invoice details
-		$db = &DB();
-
-		$result = $this->sql_GetRecords(array('where'=>sprintf('(custom_affiliate_status IS NULL OR custom_affiliate_status=0) AND billing_status=1 AND account_id=%s',SESS_ACCOUNT)));
-
-		if (! count($result))
-			return false;
-
-		# Get the totals
-		$invoice = '';
-		$total_amount = 0;
-		foreach ($result as $record) {
-			if (! empty($invoice))
-				$invoice .= '-';
-
-			$invoice .= $record['id'];
-			$total_amount += $record['total_amt'];
-		}
-
-		# Echo the custom tracking code to the screen:
-		$tracking = file_get_contents(PATH_FILES.'tracking.txt');
-		$tracking = str_replace('%%amount%%',$total_amount,$tracking);
-		$tracking = str_replace('%%invoice%%',$invoice,$tracking);
-		$tracking = str_replace('%%affiliate%%',SESS_AFFILIATE,$tracking);
-		$tracking = str_replace('%%campaign%%',SESS_CAMPAIGN,$tracking);
-		$tracking = str_replace('%%account%%',SESS_ACCOUNT,$tracking);
-
-		echo $tracking;
-
-		# Update the record so it is not tracked again
-		$rs = $db->Execute(
-			sqlUpdate('invoice',array('custom_affiliate_status'=>1),array('where'=>sprintf('account_id=%s AND billing_status=1',SESS_ACCOUNT))));
-
-		if ($rs === false) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,sprintf('%s (%s)',$db->ErrorMsg(),$sql));
-		}
-
-		return true;
-	}
-
-	public function autoApproveInvoice($id) { return $this->pAutoApprove($id); }
-	/**
-	 * Auto approve Invoice
-	 */
-	public function pAutoApprove($id) {
-		$db = &DB();
-		$do = false;
-
-		# Get the invoice details
-		$invoices = $this->sql_GetRecords(array('where'=>array('id'=>$id,'process_status'=>0)));
-		if (! count($invoices))
-			return false;
-
-		$invoice = array_pop($invoices);
-
-		# Get the checkout details
-		$checkout = $db->Execute(sqlSelect('checkout','*',array('where'=>array('id'=>$invoice['checkout_plugin_id']))));
-		if (! $checkout) {
-			global $C_debug;
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-
-			return false;
-		}
-
-		# Get the account details
-		$account = $db->Execute(sqlSelect('account','*',array('where'=>array('id'=>$invoice['account_id']))));
-		if ($account) {
-			global $C_debug;
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-
-			return false;
-		}
-
-		# Is this a recurring invoices, and is manual approvale req?
-		if ($invoice['type'] == 1 && $checkout->fields['manual_approval_recur'] != 1)
-			$do = true;
-
-		# Manual approval required for all?
-		if ($invoice['type'] != 1 && $checkout->fields['manual_approval_all'] != 1)
-			$do = true;
-
-		if (! $do) {
-			# Manual approval required for invoice amount?
-			if (! empty($checkout->fields['manual_approval_amount']) && $do == true)
-				if ($checkout->fields['manual_approval_amount'] <= $invoice['total_amt'])
-					$do = false;
-
-			# Manual approval required for user's country?
-			if (! empty($checkout->fields['manual_approval_country']) && $do == true) {
-				$arr = unserialize($checkout->fields['manual_approval_country']);
-
-				for ($i=0; $ifields['country_id'] == $arr[$i])
-						$do = false;
-			}
-
-			# Manual approval req. for user's currency?
-			if (! empty($checkout->fields['manual_approval_currency']) && $do == true) {
-				$arr = unserialize($checkout->fields['manual_approval_currency']);
-
-				for ($i=0; $ifields['manual_approval_group']) && $do == true) {
-				# Get the group details
-				$groups = $db->Execute(sqlSelect('account_group','group_id',array('where'=>array('account_id'=>$invoice['account_id'],'active'=>1))));
-
-				if (! $groups) {
-					global $C_debug;
-					$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-
-					return false;
-				}
-
-				$arr = unserialize($checkout->fields['manual_approval_group']);
-				while (! $groups->EOF) {
-					for ($i=0; $ifields['group_id'];
-
-						if ($idx == $arr[$i])
-							$do = false;
-					}
-
-					$groups->MoveNext();
-				}
-			}
-		}
-
-		# Approve the invoice
-		if ($do)
-			$this->pApprove($id);
-
-		else {
-			# Admin manual approval notice
-			include_once(PATH_MODULES.'email_template/email_template.inc.php');
-			$mail = new email_template;
-
-			$mail->send('invoice_manual_auth_admin',$invoice['account_id'],$invoice['id'],$invoice['checkout_plugin_id'],'');
-		}
-	}
-
-	public function approveInvoice($id) { return $this->pApprove($id); }
-	/**
-	 * Approve an invoice, which will enable services to be provisioned.
-	 *
-	 * @param int $id Invoice ID to approve
-	 * @uses service
-	 */
-	public function pApprove($id) {
-		$db = &DB();
-
-		# Get the invoice details
-		$invoices = $this->sql_GetRecords(array('where'=>array('id'=>$id,'process_status'=>0)));
-		if (! count($invoices))
-			return false;
-
-		$invoice = array_pop($invoices);
-
-		# Update the invoice approval status:
-		$rs = $db->Execute(sqlUpdate('invoice',array('date_last'=>time(),'process_status'=>1),array('where'=>array('id'=>$id))));
-		if (! $rs) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-
-			return false;
-		}
-
-		# Send approval notice to user:
-		include_once(PATH_MODULES.'email_template/email_template.inc.php');
-		$mail = new email_template;
-
-		$mail->send('invoice_approved_user',$invoice['account_id'],$id,'','');
-
-		# Include the service class
-		include_once(PATH_MODULES.'service/service.inc.php');
-		$so = new service;
-
-		# Determine if services have already been created for this invoice
-		switch ($invoice['type']) {
-			# Recurring invoice, just update assoc services
-			case 1:
-				# Loop through invoice items & approve assoc services
-				$rs = $db->Execute(sqlSelect('invoice_item','service_id',array('where'=>array('invoice_id'=>$id))));
-
-				if (! $rs) {
-					global $C_debug;
-
-					$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-					return false;
-				}
-
-				# Update services status
-				if ($rs->RecordCount())
-					while (! $rs->EOF) {
-						$so->approveService($rs->fields['service_id']);
-						$rs->MoveNext();
-					}
-
-				break;
-
-			default:
-				$rs = $db->Execute(sqlSelect('service','id',array('where'=>array('invoice_id'=>$id))));
-
-				if (! $rs) {
-					global $C_debug;
-
-					$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-					return false;
-				}
-
-				# If there are already existing services, just update their status
-				if ($rs->RecordCount()) {
-					while (! $rs->EOF) {
-						$so->approveService($rs->fields['id']);
-						$rs->MoveNext();
-					}
-
-				# No services exist, they can be provisioned
-				} else {
-
-					# Get the invoice items in this invoice
-					$ii = $db->Execute(sqlSelect('invoice_item','*',array('where'=>sprintf('(parent_id IN (0,"") OR parent_id IS NULL)'))));
-					if (! $ii) {
-						global $C_debug;
-
-						$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-						return false;
-					}
-
-					while (! $ii->EOF) {
-						if (! $ii->fields['service_id']) {
-							# Add the service
-							$so->invoiceItemToService($ii->fields['id'],$invoice);
-
-							# Check for any children items in this invoice
-							$iii = $db->Execute(sqlSelect('invoice_item','*',array('where'=>array('parent_id'=>$ii->fields['id'],'invoice_id'=>$id))));
-
-							if (! $iii) {
-								global $C_debug;
-
-								$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-								return false;
-							}
-
-							while (! $iii->EOF) {
-								# Add the service
-								$so->invoiceItemToService($iii->fields['id'],$invoice);
-								$iii->MoveNext();
-							}
-
-						} else {
-							# This is a domain renewal
-							if ($ii->fields['item_type'] == 2 && $ii->fields['domain_type'] == 'renew')
-								$so->renewDomain($ii,$invoice->fields['account_billing_id']);
-							# This is an upgrade for an existing service
-							else
-								$so->modifyService($ii,$invoice->fields['account_billing_id']);
-						}
-
-						$ii->MoveNext();
-					}
-				}
-		}
-
-		# Create a memo
-		$rs = $db->Execute(sqlInsert($db,'invoice_memo',array(
-			'date_orig'=>time(),
-			'invoice_id'=>$id,
-			'account_id'=>(defined('SESS_ACCOUNT')) ? SESS_ACCOUNT : 0,
-			'type'=>'approval',
-			'memo'=>_('Invoice Approved')
-		)));
-
-		if (! $rs) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-			return false;
-		}
-
-		return true;
-	}
-
-	public function voidInvoice($id) { return $this->pVoid($id); }
-	/**
-	 * Void an invoice, which will suspend services.
-	 */
-	public function pVoid($id) {
-		$db = &DB();
-
-		# Get the invoice details
-		$invoices = $this->sql_GetRecords(array('where'=>array('id'=>$id,'process_status'=>1)));
-		if (! count($invoices))
-			return false;
-
-		# Update the invoice approval status:
-		$rs = $db->Execute(sqlUpdate('invoice',array('date_last'=>time(),'process_status'=>0),array('where'=>array('id'=>$id))));
-		if (! $rs) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-			return false;
-		}
-
-		# Determine if services have already been created for this invoice and deactivate
-		$rs = $db->Execute(sqlSelect('service','id',array('where'=>array('invoice_id'=>$id))));
-		if (! $rs) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-			return false;
-		}
-
-		# Include the service class
-		include_once(PATH_MODULES.'service/service.inc.php');
-		$so = new service;
-
-		if ($rs->RecordCount()) {
-			# Update services to inactive status:
-			while (! $rs->EOF) {
-				$so->voidService($rs->fields['id']);
-				$rs->MoveNext();
-			}
-		}
-
-		# Loop through invoice items & delete assoc services
-		$rs = $db->Execute(sqlSelect('invoice_item','service_id',array('where'=>array('invoice_id'=>$id))));
-		if (! $rs) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-			return false;
-		}
-
-		# Update services to inactive status
-		if ($rs->RecordCount()) {
-			while (! $rs->EOF) {
-				$so->voidService($rs->fields['service_id']);
-				$rs->MoveNext();
-			}
-		}
-
-		# If voided, create a memo
-		$rs = $db->Execute(sqlInsert($db,'invoice_memo',array(
-			'date_orig'=>time(),
-			'invoice_id'=>$id,
-			'account_id'=>(defined('SESS_ACCOUNT')) ? SESS_ACCOUNT : 0,
-			'type'=>'void',
-			'memo'=>_('Invoice Voided')
-		)));
-
-		if (! $rs) {
-			global $C_debug;
-
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-			return false;
-		}
-
-		return true;
-	}
-
-	/**
-	 * Reconcile Invoice
-	 */
-	public function reconcile($VAR) {
-		global $C_translate,$C_debug,$C_list;
-
-		$db = &DB();
-
-		# Reconcile is disabled when payment is installed
-		# @todo Think of a better way (dynamic) to handle this
-		if (! $C_list->is_installed('payment')) {
-			$C_debug->alert('Reconcile is disabled, please use the payment option!');
-
-			return false;
-		}
-
-		# Validate amt
-		if ($VAR['amount'] <= 0) {
-			$C_debug->alert(_('Payment amount to low!'));
-
-			return false;
-		}
-
-		# Get the invoice details
-		$invoices = $this->sql_GetRecords(array('where'=>array('id'=>$VAR['id'])));
-		if (! count($invoices))
-			return false;
-
-		$invoice = array_pop($invoices);
-		$billing_status = 1;
-
-		if ($VAR['amount'] > $invoice['total_amt']-$invoice['billed_amt']) {
-			$update = $invoice['total_amt'];
-
-			$C_translate->value['invoice']['amt'] = number_format($VAR['amount']-$invoice['total_amt']-$invoice['billed_amt'],2);
-			$alert = $C_translate->translate('rec_over','invoice','');
-
-		} elseif ($VAR['amount'] == $invoice['total_amt']-$invoice['billed_amt']) {
-			$update = $invoice['total_amt'];
-
-		} else {
-			$update = $VAR['amount'] + $invoice['billed_amt'];
-			$billing_status = 0;
-		}
-
-		# Update the invoice record
-		$rs = $db->Execute(
-			sqlUpdate('invoice',array('date_last'=>time(),'billed_amt'=>$update,'billing_status'=>$billing_status),
-				array('where'=>array('id'=>$VAR['id']))));
-
-		# Create a memo
-		$rs = $db->Execute(sqlInsert($db,'invoice_memo',array(
-			'date_orig'=>time(),
-			'invoice_id'=>$VAR['id'],
-			'account_id'=>(defined('SESS_ACCOUNT')) ? SESS_ACCOUNT : 0,
-			'type'=>'reconcile',
-			'memo'=>sprintf('%s: %s (%s)',_('Payment Added to Invoice'),number_format($VAR['amount'],2),isset($VAR['memo']) ? $VAR['memo'] : '')
-		)));
-
-		# Receipt printing
-		# @todo Move this to be consistent with invoice printing.
-		include_once PATH_MODULES.'invoice/receipt_print.php';
-		$receipt = new receipt_print;
-
-		$receipt->add($invoice,number_format($VAR['amount'],2),number_format($update,2));
-
-		# Auto update if billed complete
-		if ($billing_status) {
-			$this->autoApproveInvoice($VAR['id']);
-
-			# User invoice creation confirmation
-			include_once(PATH_MODULES.'email_template/email_template.inc.php');
-			$email = new email_template;
-			$email->send('invoice_paid_user',$invoice['account_id'],$VAR['id'],$invoice['billed_currency_id'],'');
-
-			# Admin alert of payment processed
-			$email = new email_template;
-			$email->send('admin->invoice_paid_admin',$invoice['account_id'],$VAR['id'],$invoice['billed_currency_id'],'');
-		}
-
-		# Redirect
-		if (! empty($VAR['redirect'])) {
-			printf('';
-
-			exit;
-		}
-
-		$C_debug->alert($C_translate->translate('ref_comp','invoice',''));
-
-		return;
-	}
-
-	/**
-	 * Refund Invoice
-	 */
-	public function refund($VAR) {
-		global $C_translate,$C_debug;
-
-		# Validate amt
-		if ($VAR['amount'] <= 0) {
-			$C_debug->alert(_('Refund amount to low!'));
-
-			return false;
-		}
-
-		$update = $this->getRecordAttr('billed_amt')-$VAR['amount'];
-		$billing_status = ($update>0) ? 1 : 0;
-
-		# Update the invoice record
-		$rs = $db->Execute(
-			sqlUpdate('invoice',
-				array('date_last'=>time(),'billed_amt'=>$update,'billing_status'=>$billing_status,'suspend_billing'=>1,'refund_status'=>1),
-				array('where'=>array('id'=>$VAR['id']))));
-
-		if (! $rs) {
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-
-			return false;
-		}
-
-		# Create a memo
-		$rs = $db->Execute(sqlInsert($db,'invoice_memo',array(
-			'date_orig'=>time(),
-			'invoice_id'=>$VAR['id'],
-			'account_id'=>(defined('SESS_ACCOUNT')) ? SESS_ACCOUNT : 0,
-			'type'=>'refund',
-			'memo'=>sprintf('%s: %s (%s)',_('Refunded Invoice'),number_format($VAR['amount'],2),isset($VAR['memo']) ? $VAR['memo'] : '')
-		)));
-
-		if (! $rs) {
-			$C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg());
-
-			return false;
-		}
-
-		# Void
-		$this->pVoid($VAR['id']);
-
-		# Call into the checkout plugin and attempt realtime refund
-		$C_debug->alert('Realtime refund processing not enabled.');
-		if (! true) {
-			$billing = $db->Execute(
-				sqlSelect($db,
-					array('account_billing','checkout'),
-					'A.*,B.checkout_plugin',sprintf('A.id=%s AND A.checkout_plugin_id=B.id',$this->getRecordAttr('account_billing_id'))));
-
-			if ($billing && $billing->RecordCount() && ! empty($billing->fields['checkout_plugin'])) {
-				$plugin_file = sprintf('%scheckout/%s.php',PATH_PLUGINS,$billing->fields['checkout_plugin']);
-
-				if (is_file($plugin_file)) {
-					include_once($plugin_file);
-
-					eval(sprintf('$PLG = new plg_chout_%s("%s");',$billing->fields['checkout_plugin'],$billing->fields['checkout_plugin_id']));
-					if (is_callable(array($PLG,'refund')))
-						$PLG->refund($this->getRecord(),$billing->fields,$VAR['amount']);
-				}
-			}
-		}
-
-		# Redirect
-		if (! empty($VAR['redirect'])) {
-			printf('",key($this->invoice));
-
-		} else {
-			echo _('No due invoices selected for payment.');
-		}
-	}
-
-	/**
-	 * Make a payment now
-	 */
-	public function checkoutnow($VAR) {
-		global $C_translate,$smarty,$C_list,$VAR;
-
-		# Validate user logged in:
-		if (SESS_LOGGED != '1') {
-			echo '';
-			return false;
-		}
-
-		# If the ID is blank, this will get all unpaid invoices.
-		if (! isset($VAR['invoice_id']))
-			return false;
-
-		# Some defaults
-		$recur_amt = 0;
-
-		$db = &DB();
-		if(preg_match('/^MULTI-/',@$VAR['invoice_id'])) {
-			# Get multi-invoice details
-			$total = $this->multiple_invoice_total($VAR['invoice_id'],SESS_ACCOUNT);
-			if (! $total)
-				return false;
-
-			$recur_arr = false;
-			$account_id = SESS_ACCOUNT;
-			$this->invoice_id = $VAR['invoice_id'];
-			$CURRENCY = DEFAULT_CURRENCY;
-			$multi = true;
-
-		} else {
-			# Validate the invoice selected, & get the totals:
-			$result = $db->Execute($q=sqlSelect($db,'invoice','*',array('id'=>$VAR['invoice_id'])));
-			if (! $result || $result->RecordCount() == 0)
-				return false;
-
-			# Determine the price & currency
-			if ($result->fields['billed_currency_id'] != $result->fields['actual_billed_currency_id']) {
-				global $C_list;
-
-				$CURRENCY = $result->fields['actual_billed_currency_id'];
-				if($result->fields['billed_amt'] <= 0)
-					$total = $C_list->format_currency_decimal($result->fields['total_amt'],$CURRENCY);
-				else
-					$total = $C_list->format_currency_decimal($result->fields['total_amt'],$CURRENCY)-$result->fields['actual_billed_amt'];
-
-			} else {
-				$CURRENCY = $result->fields['billed_currency_id'];
-				$total = $result->fields['total_amt']-$result->fields['billed_amt'];
-			}
-
-			if ($result->fields['recur_amt'] > 0)
-				$recur_amt = $C_list->format_currency_decimal($result->fields['recur_amt'],$CURRENCY);
-
-			@$recur_arr = unserialize($result->fields['recur_arr']);
-			$account_id = $result->fields['account_id'];
-			$this->invoice_id = $result->fields['id'];
-			$this->invoice[$result->fields['id']] = $total;
-			$multi = false;
-		}
-		$amount = round($total, 2);
-
-		# Get the account details:
-		$sql    = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'account WHERE site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND id = ' . $db->qstr($account_id);
-		$account = $db->Execute($sql);
-		if (!$account || !$account->RecordCount()) return false;
-
-		# Validate checkout option selected is allowed for purchase:
-		$q  = "SELECT * FROM ".AGILE_DB_PREFIX."checkout WHERE site_id = ".$db->qstr(DEFAULT_SITE)." AND id = ".$db->qstr(@$VAR['option'])." AND active = 1 AND ";
-		if($recur_amt>0 && @$billed_amt == 0) $q .= "allow_recurring = 1 "; else $q .= "allow_new = 1 ";
-		$chopt = $db->Execute($q);
-		if (!$chopt || !$chopt->RecordCount()) return false;
-		if($chopt && $chopt->RecordCount()) {
-			$show = true;
-			if ( @$chopt->fields["total_maximum"] != "" && $total > $chopt->fields["total_maximum"] )   $show = false;
-			if ( @$chopt->fields["total_miniumum"] != "" && $total < $chopt->fields["total_miniumum"] ) $show = false;
-		}
-		if(!$show) {
-			echo ' ';
-			return false;
-		}
-
-		# Load the checkout plugin:
-		$plugin_file = PATH_PLUGINS . 'checkout/'. $chopt->fields["checkout_plugin"] . '.php';
-		include_once ( $plugin_file );
-		eval ( '$PLG = new plg_chout_' .   $chopt->fields["checkout_plugin"] . '("'.@$VAR["option"].'",$multi);');
-
-		if(!empty($VAR['account_billing_id']) && @$VAR['new_card']==2) {
-			/* validate credit card on file details */
-			$account_billing_id=$VAR['account_billing_id'];
-			if(!$PLG->setBillingFromDB($account_id, $account_billing_id, $VAR['option'])) {
-				global $C_debug;
-				$C_debug->alert("Sorry, we cannot use that billing record for this purchase.");
-				return false;
-			}
-		} else {
-			/* use passed in vars */
-			$PLG->setBillingFromParams($VAR);
-		}
-
-		# Set Invoice Vars:
-		$this->total_amt					= $amount;
-		$this->currency_iso 				= $C_list->currency_iso($CURRENCY);
-		$this->currency_iso_admin			= $C_list->currency_iso($CURRENCY);
-		$this->account_id					= $account_id;
-		$this->actual_billed_currency_id	= $CURRENCY;
-		$this->billed_currency_id			= $CURRENCY;
-		$this->checkout_plugin_id           = @$VAR["option"];
-
-		# Run the plugin bill_checkout() method:
-		$this->checkout_plugin_data = $PLG->bill_checkout($amount, $this->invoice_id, $this->currency_iso, $account->fields, $recur_amt, $recur_arr,$this->invoice);
-
-		# redirect
-		if(!empty($this->checkout_plugin_data['redirect'])) echo $this->checkout_plugin_data['redirect'];
-
-		# determine results
-		if( $this->checkout_plugin_data === false ) {
-			if(!empty($PLG->redirect)) echo $PLG->redirect;
-			return false;
-		} elseif ($PLG->type == "gateway" && empty($PLG->redirect)) {
-			if(empty($this->admin_checkout)) {
-				$VAR['_page'] = "invoice:thankyou";
-			} else {
-				$VAR['_page'] = "invoice:view";
-			}
-		} elseif ($PLG->type == "redirect") {
-
-			echo "
- Please wait while we redirect you to the secure payment site.... - {$PLG->redirect}
"; - } - - # Call the Plugin method for storing the checkout data, if new data entered: - $this->account_billing_id = $PLG->store_billing($VAR, $PLG); - - # Load the email template module - include_once(PATH_MODULES.'email_template/email_template.inc.php'); - $mail = new email_template; - - # Update billing details for this invoice, if realtime billing succeeded: - if($PLG->type == 'gateway' || $amount == 0) { - $q = "UPDATE ".AGILE_DB_PREFIX."invoice - SET - account_billing_id = " .$db->qstr($this->account_billing_id). ", - billing_status = " .$db->qstr(1). ", - billed_amt = " .$db->qstr($total). ", - actual_billed_amt = " .$db->qstr($amount). ", - date_last = " .$db->qstr(time()). ", - checkout_plugin_id = " .$db->qstr($this->checkout_plugin_id) .", - checkout_plugin_data = " .$db->qstr(serialize($this->checkout_plugin_data)). " - WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($this->invoice_id); - $rst = $db->Execute($q); - if ($rst === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - return false; - } - - // loop through each invoice paid - foreach($this->invoice as $this->invoice_id) { - # Send billed e-mail notice to user - $email = new email_template; - $email->send('invoice_paid_user', $this->account_id, $this->invoice_id, $this->currency_iso, ''); - - # Admin alert of payment processed - $email = new email_template; - $email->send('admin->invoice_paid_admin', $this->account_id, $this->invoice_id, $this->currency_iso_admin, ''); - - # Submit the invoice for approval - $arr['id'] = $this->invoice_id; - $this->pApprove($this->invoice_id); - } - - } else { - - # Just update the last_date and plugin data - $q = "UPDATE ".AGILE_DB_PREFIX."invoice - SET - account_billing_id = " .$db->qstr($this->account_billing_id). ", - date_last = " .$db->qstr(time()). ", - checkout_plugin_id = " .$db->qstr($this->checkout_plugin_id) .", - checkout_plugin_data = " .$db->qstr(serialize($this->checkout_plugin_data)). " - WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($this->invoice_id); - $rst = $db->Execute($q); - if ($rst === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - return false; - } - - # Admin e-mail alert of manual payment processing - if ( $PLG->getName() == 'MANUAL' ) { - $date_due = $C_list->date(time()); - foreach($this->invoice as $this->invoice_id) { - $email = new email_template; - $email->send('admin->invoice_due_admin', $this->account_id, $this->invoice_id, '', $date_due); - } - - global $C_debug; - $C_debug->alert($C_translate->translate('manual_alert','checkout')); - } - } - } - - /** GENERIC INVOICE METHODS **/ - - /** - * Return a list of accounts with their current outsanding invoices balance - * - * @return array List of Accounts and their current balance - */ - public function sAccountsBal() { - static $sAccountBal = array(); - - if (! count($sAccountBal)) { - $db = &DB(); - - $rs = $db->Execute(sqlSelect($db,'invoice','account_id,ROUND(SUM(total_amt-billed_amt-IFNULL(credit_amt,0)),2) AS balance',false,'account_id','','','account_id')); - - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $sAccountBal[$rs->fields['account_id']] = $rs->fields['balance']; - $rs->MoveNext(); - } - } - } - - return $sAccountBal; - } - - /** - * Get a list of invoices with a non-zero balance - * - * @param $account_id Get the invoices for this account, otherwise all invoices are returned. - * @param $refresh If true, force re-reading database to get the list of invoices. - * @return array List of invoices with balance - */ - public function sInvoicesBal($account_id=null,$refresh=false) { - static $sInvoicesBal = array(); - - if ($refresh || ! count($sInvoicesBal)) { - $sInvoicesBal = array(); - $db = &DB(); - $rs = $db->Execute(sqlSelect('invoice','date_orig,account_id,id,total_amt,billed_amt,IFNULL(credit_amt,0) as credit_amt,ROUND(total_amt-billed_amt-IFNULL(credit_amt,0),2) as balance', - array('where'=>'status=1 AND total_amt-billed_amt-IFNULL(credit_amt,0)!=0','orderby'=>'account_id,date_orig,id'))); - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $invoice = array(); - $invoice['invoice_id'] = $rs->fields['id']; - $invoice['balance'] = $rs->fields['balance']; - $invoice['total_amt'] = $rs->fields['total_amt']; - $invoice['billed_amt'] = $rs->fields['billed_amt']; - $invoice['credit_amt'] = $rs->fields['credit_amt']; - $invoice['date_orig'] = $rs->fields['date_orig']; - $sInvoicesBal[$rs->fields['account_id']][$rs->fields['id']] = $invoice; - $rs->MoveNext(); - } - } - } - - return (is_null($account_id) ? $sInvoicesBal : isset($sInvoicesBal[$account_id]) ? $sInvoicesBal[$account_id] : array()); - } - - /** - * Get a list of invoices for an account. - * - * @param $account_id - * @param $invoices Optional array of invoices to retrieve, otherwise all invoices are return. - * @return array Requested invoices - */ - public function sInvoicesAcc($account_id,$invoices=array()) { - static $sInvoicesAccount = array(); - $return = array(); - - if (count($invoices)) { - foreach ($invoices as $invoice) - if (isset($sInvoicesAccount[$account_id][$invoice_id])) - $return[$invoice_id] = $sInvoicesAccount[$account_id][$invoice_id]; - - } else { - if (isset($sInvoicesAccount[$account_id])) - $return = $sInvoicesAccount[$account_id]; - } - - # Do we need to get the invoices from the DB? - if ((! count($invoices) && ! count($return)) || count($invoices) != count($return)) { - $db = &DB(); - - if (count($invoices)) - $where = sprintf('AND id IN (%s)',join(',',$invoices)); - else - $where = ''; - - $rs = $db->Execute(sqlSelect('invoice','id,date_orig,total_amt,billed_amt,IFNULL(credit_amt,0) as credit_amt,ROUND(total_amt-billed_amt-IFNULL(credit_amt,0),2) AS balance',array('where'=>sprintf('account_id=%s %s',$account_id,$where),'orderby'=>'id'))); - if ($rs && $rs->RecordCount()) { - while (! $rs->EOF) { - $sInvoicesAccount[$account_id][$rs->fields['id']] = $rs->fields; - $return[$rs->fields['id']] = $rs->fields; - $rs->MoveNext(); - } - } - } - - return $return; - } - - public function invoice_days() { return $this->sInvoiceDays(); } - /** - * Determine the number of days in advance an invoice should be generated. - * Invoices are generated when the greater of: - * + system default (setup:max_inv_gen_period), (to be deprecated) - * + system default (setup_invoice:invoice_advance_gen), - * - * @return int Days in Advance to Issue Invoices. - */ - public function sInvoiceDays() { - $db = &DB(); - - # Get the max invoice days from the setup_invoice table - $days = 0; - - # First from the setup table. - $setup = $db->Execute(sqlSelect($db,'setup','max_inv_gen_period','')); - if (isset($setup->fields['max_inv_gen_period'])) - $days = $setup->fields['max_inv_gen_period']; - - # Then from the setup_invoice table. - $setup = $db->Execute(sqlSelect($db,'setup_invoice','invoice_advance_gen,advance_notice','')); - if (isset($setup->fields['invoice_advance_gen']) && $setup->fields['invoice_advance_gen'] > $days) - $days = $setup->fields['invoice_advance_gen']; - - if (isset($setup->fields['advance_notice']) && $setup->fields['advance_notice'] > $days) - $days = $setup->fields['advance_notice']; - - return $days; - } -} -?> diff --git a/modules/invoice/invoice_base_fpdf.inc.php b/modules/invoice/invoice_base_fpdf.inc.php deleted file mode 100644 index 505aac33..00000000 --- a/modules/invoice/invoice_base_fpdf.inc.php +++ /dev/null @@ -1,197 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Invoice - */ - -define('FPDF_FONTPATH',PATH_INCLUDES.'fpdf/font/'); -require_once(PATH_INCLUDES.'fpdf/fpdf.php'); - -/** - * PDF Invoice Base - * - * @package AgileBill - * @subpackage Module:Invoice - */ -abstract class pdf_invoice_base extends fpdf { - protected $billToCompany = true; - protected $itemsSummaryMax = 16; - protected $itemsPreviousMax = 5; - protected $news = ''; - protected $pageType = 'blank'; - protected $show_itemized = true; - protected $show_service_range = false; - private $invoiceCurrency = '$'; - private $invoiceDecimals = 2; - - # Store previous invoices due - private $itemsPrevious = array(); - # Stores the invoice items - protected $invoice; - protected $itemsFull; - protected $account; - # Iteration of drawing the items on the invoice - protected $iteration; - # Store the date range, that the invoice covers - protected $dateRange; - - public function __construct($inv) { - parent::__construct(); - - $this->SetCreator('Open Source Billing'); - $this->SetAuthor($inv->print['site']['NAME']); - $this->SetTitle(sprintf('%s Invoice',$inv->print['site']['NAME'])); - $this->SetSubject(sprintf('Invoice #%06s',$inv->getPrintInvoiceNum())); - $this->SetKeywords($inv->getPrintInvoiceID()); - $this->SetAutoPageBreak(TRUE,25); - $this->SetDisplayMode('fullwidth'); - - return $this; - } - - public function load_setup($rs=false) { - if (! $rs) { - $db =& DB(); - $rs = $db->Execute(sqlSelect($db,'setup_invoice','*','')); - } - - $this->billToCompany = $rs->fields['bill_to_company']; - $this->invoiceCurrency = $rs->fields['invoice_currency']; - $this->invoiceDecimals = $rs->fields['invoice_decimals']; - $this->itemsSummaryMax = $rs->fields['items_summary_max']; - $this->news = $rs->fields['news']; - $this->pageType = $rs->fields['page_type']; - $this->show_itemized = $rs->fields['invoice_show_itemized']; - $this->show_service_range = $rs->fields['invoice_show_service_dates']; - } - - abstract public function drawCompanyLogo(); - abstract public function drawCompanyAddress($inv); - abstract public function drawInvoiceHeader($inv); - - /** - * Enable re-iteration of the invoices items, so that they can be displayed many ways - */ - abstract public function drawLineItems_pre($iteration); - - /** - * This is called for each line item. - */ - abstract public function drawLineItems($db,$line,$invnum); - - /** - * Draws the summary on the first page - */ - abstract public function drawSummaryLineItems($inv); - abstract public function drawPaymentMethods($inv); - - public function drawRemittenceStub() {} - public function drawCustom() {} - public function drawInvoiceDueNotice() {} - public function drawInvoicePaidNotice() {} - public function setLateFeeNotice() {} - - /** - * Get a blank invoice template - */ - public function getTemplate() { - return false; - } - - /** - * Assigns the invoice fields to this object. - */ - public function setInvoiceFields($flds) { - $this->invoice = $flds; - } - - /** - * Assigns the account fields to this object. - */ - public function setAccountFields($flds) { - $this->account = $flds; - } - - public function setItemsFull($items) { - $this->itemsFull = $items; - } - - public function setItemsPrevious($items) { - $this->itemsPrevious = $items; - } - - public function setDateRange($periodStart,$periodEnd) { - $this->dateRange = sprintf('%s - %s',date(UNIX_DATE_FORMAT,$periodStart),date(UNIX_DATE_FORMAT,$periodEnd)); - } - - public function setCurrency($currency) { - $this->invoiceCurrency = $currency; - } - - public function setDecimals($decimals) { - $this->invoiceDecimals = $decimals; - } - - /** - * Render an amount into a currency display - */ - protected function _currency($num) { - global $C_list; - - if ($this->invoiceDecimals>3) - return $this->invoiceCurrency.number_format($num,$this->invoiceDecimals); - else - return $C_list->format_currency_num($num,$this->invoice['actual_billed_currency_id']); - } - - protected function Rotate($angle,$x=-1,$y=-1) { - if ($x==-1) - $x = $this->x; - if ($y==-1) - $y = $this->y; - if ($this->angle!=0) - $this->_out('Q'); - $this->angle = $angle; - - if ($angle != 0) { - $angle *= M_PI/180; - $c = cos($angle); - $s = sin($angle); - $cx = $x*$this->k; - $cy = ($this->h-$y)*$this->k; - $this->_out(sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy)); - } - } - - /** - * Add a watermark to the PDF - */ - public function addWaterMark($text) { - $this->SetFont('arial','B',50); - $this->SetTextColor(203,203,203); - $this->Rotate(0); - $this->Text(10,50,$text); - $this->Rotate(0); - $this->SetTextColor(0,0,0); - } -} -?> diff --git a/modules/invoice/invoice_base_fpdi.inc.php b/modules/invoice/invoice_base_fpdi.inc.php deleted file mode 100644 index a7606219..00000000 --- a/modules/invoice/invoice_base_fpdi.inc.php +++ /dev/null @@ -1,314 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Invoice - */ - -define('FPDF_FONTPATH',PATH_INCLUDES.'pdf/font/'); -require_once(PATH_INCLUDES.'pdf/fpdi.php'); -require_once(PATH_INCLUDES.'pdf/fpdf_tpl.php'); -require_once(PATH_INCLUDES.'pdf/fpdf.php'); - -/** - * PDF Invoice Base - * - * @package AgileBill - * @subpackage Module:Invoice - */ -abstract class pdf_invoice_base extends fpdi { - protected $billToCompany = true; - protected $itemsSummaryMax = 16; - protected $itemsPreviousMax = 5; - protected $news = ''; - protected $pageType = 'blank'; - protected $show_itemized = true; - protected $show_service_range = false; - private $invoiceCurrency = '$'; - private $invoiceDecimals = 2; - - # Store previous invoices due - private $itemsPrevious = array(); - # Stores the invoice items - protected $invoice; - protected $itemsFull; - protected $account; - # Iteration of drawing the items on the invoice - protected $iteration; - # Store the date range, that the invoice covers - protected $dateRange; - - public function __construct($inv) { - parent::__construct(); - - $this->SetCreator('Open Source Billing'); - $this->SetAuthor($inv->print['site']['NAME']); - $this->SetTitle(sprintf('%s Invoice',$inv->print['site']['NAME'])); - $this->SetSubject(sprintf('Invoice #%06s',$inv->getPrintInvoiceNum())); - $this->SetKeywords($inv->getPrintInvoiceID()); - $this->SetAutoPageBreak(TRUE,25); - $this->SetDisplayMode('fullwidth'); - - return $this; - } - - public function load_setup($rs=false) { - if (! $rs) { - $db =& DB(); - $rs = $db->Execute(sqlSelect($db,'setup_invoice','*','')); - } - - $this->billToCompany = $rs->fields['bill_to_company']; - $this->invoiceCurrency = $rs->fields['invoice_currency']; - $this->invoiceDecimals = $rs->fields['invoice_decimals']; - $this->itemsSummaryMax = $rs->fields['items_summary_max']; - $this->news = $rs->fields['news']; - $this->pageType = $rs->fields['page_type']; - $this->show_itemized = $rs->fields['invoice_show_itemized']; - $this->show_service_range = $rs->fields['invoice_show_service_dates']; - } - - abstract public function drawCompanyLogo(); - abstract public function drawCompanyAddress($inv); - abstract public function drawInvoiceHeader($inv); - - /** - * Enable re-iteration of the invoices items, so that they can be displayed many ways - */ - abstract public function drawLineItems_pre($iteration); - - /** - * This is called for each line item. - */ - abstract public function drawLineItems($db,$line,$invnum); - - /** - * Draws the summary on the first page - */ - abstract public function drawSummaryLineItems($inv); - abstract public function drawPaymentMethods($inv); - - public function drawRemittenceStub() {} - public function drawCustom() {} - public function drawInvoiceDueNotice() {} - public function drawInvoicePaidNotice() {} - public function setLateFeeNotice() {} - - /** - * Get a blank invoice template - */ - public function getTemplate() { - return PATH_THEMES.DEFAULT_THEME.'/invoice/invoice-'.$this->pageType.'.pdf'; - } - - /** - * Assigns the invoice fields to this object. - */ - public function setInvoiceFields($flds) { - $this->invoice = $flds; - } - - /** - * Assigns the account fields to this object. - */ - public function setAccountFields($flds) { - $this->account = $flds; - } - - public function setItemsFull($items) { - $this->itemsFull = $items; - } - - public function setItemsPrevious($items) { - $this->itemsPrevious = $items; - } - - public function setDateRange($periodStart,$periodEnd) { - $this->dateRange = sprintf('%s - %s',date(UNIX_DATE_FORMAT,$periodStart),date(UNIX_DATE_FORMAT,$periodEnd)); - } - - public function setCurrency($currency) { - $this->invoiceCurrency = $currency; - } - - public function setDecimals($decimals) { - $this->invoiceDecimals = $decimals; - } - - /** - * Render an amount into a currency display - */ - protected function _currency($num) { - global $C_list; - - if ($this->invoiceDecimals>3) - return $this->invoiceCurrency.number_format($num,$this->invoiceDecimals); - else - return $C_list->format_currency_num($num,$this->invoice['actual_billed_currency_id']); - } - - /** - * Override fpdf functions - */ - public function _putpages() { - $nb = $this->page; - if (! empty($this->AliasNbPages)) { - //Replace number of pages - for ($n=1;$n<=$nb;$n++) - $this->pages[$n]=($this->compress) ? gzcompress(str_replace($this->AliasNbPages,$nb,gzuncompress($this->pages[$n]))) : str_replace($this->AliasNbPages,$nb,$this->pages[$n]) ; - } - - if ($this->DefOrientation=='P') { - $wPt=$this->fwPt; - $hPt=$this->fhPt; - } else { - $wPt=$this->fhPt; - $hPt=$this->fwPt; - } - - $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; - for($n=1;$n<=$nb;$n++) { - //Page - $this->_newobj(); - $this->_out('<_out('/Parent 1 0 R'); - if (isset($this->OrientationChanges[$n])) - $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$hPt,$wPt)); - $this->_out('/Resources 2 0 R'); - if(isset($this->PageLinks[$n])) { - //Links - $annots='/Annots ['; - foreach($this->PageLinks[$n] as $pl) { - $rect=sprintf('%.2f %.2f %.2f %.2f',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); - $annots.='<_textstring($pl[4]).'>>>>'; - else { - $l=$this->links[$pl[4]]; - $h=isset($this->OrientationChanges[$l[0]]) ? $wPt : $hPt; - $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]>>',1+2*$l[0],$h-$l[1]*$this->k); - } - } - $this->_out($annots.']'); - } - $this->_out('/Contents '.($this->n+1).' 0 R>>'); - $this->_out('endobj'); - //Page content - $this->_newobj(); - $this->_out('<<'.$filter.'/Length '.strlen($this->pages[$n]).'>>'); - $this->_putstream($this->pages[$n]); - $this->_out('endobj'); - } - - //Pages root - $this->offsets[1]=strlen($this->buffer); - $this->_out('1 0 obj'); - $this->_out('<_out($kids.']'); - $this->_out('/Count '.$nb); - $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$wPt,$hPt)); - $this->_out('>>'); - $this->_out('endobj'); - } - - public function _endpage() { - //End of page contents - $this->pages[$this->page] = ($this->compress) ? gzcompress($this->pages[$this->page]) : $this->pages[$this->page]; - $this->state=1; - } - - protected function RoundedRect($x,$y,$w,$h,$r,$style='') { - $k = $this->k; - $hp = $this->h; - - if ($style=='F') - $op = 'f'; - elseif ($style=='FD' || $style=='DF') - $op = 'B'; - else - $op = 'S'; - - $MyArc = 4/3*(sqrt(2)-1); - $this->_out(sprintf('%.2f %.2f m',($x+$r)*$k,($hp-$y)*$k)); - $xc = $x+$w-$r ; - $yc = $y+$r; - $this->_out(sprintf('%.2f %.2f l',$xc*$k,($hp-$y)*$k)); - - $this->_Arc($xc+$r*$MyArc,$yc-$r,$xc+$r,$yc-$r*$MyArc,$xc+$r,$yc); - $xc = $x+$w-$r; - $yc = $y+$h-$r; - $this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-$yc)*$k)); - - $this->_Arc($xc+$r,$yc+$r*$MyArc,$xc+$r*$MyArc,$yc+$r,$xc,$yc+$r); - $xc = $x+$r; - $yc = $y+$h-$r; - $this->_out(sprintf('%.2f %.2f l',$xc*$k,($hp-($y+$h))*$k)); - - $this->_Arc($xc-$r*$MyArc,$yc+$r,$xc-$r,$yc+$r*$MyArc,$xc-$r,$yc); - $xc = $x+$r; - $yc = $y+$r; - $this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k)); - - $this->_Arc($xc-$r,$yc-$r*$MyArc,$xc-$r*$MyArc,$yc-$r,$xc,$yc-$r); - $this->_out($op); - } - - private function _Arc($x1,$y1,$x2,$y2,$x3,$y3) { - $h = $this->h; - $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', - $x1*$this->k,($h-$y1)*$this->k,$x2*$this->k,($h-$y2)*$this->k,$x3*$this->k,($h-$y3)*$this->k)); - } - - protected function Rotate($angle,$x=-1,$y=-1) { - if ($x==-1) - $x = $this->x; - if ($y==-1) - $y = $this->y; - if ($this->angle!=0) - $this->_out('Q'); - $this->angle = $angle; - - if ($angle != 0) { - $angle *= M_PI/180; - $c = cos($angle); - $s = sin($angle); - $cx = $x*$this->k; - $cy = ($this->h-$y)*$this->k; - $this->_out(sprintf('q %.5f %.5f %.5f %.5f %.2f %.2f cm 1 0 0 1 %.2f %.2f cm',$c,$s,-$s,$c,$cx,$cy,-$cx,-$cy)); - } - } - - /** - * Add a watermark to the PDF - */ - public function addWaterMark($text) { - $this->SetFont('arial','B',50); - $this->SetTextColor(203,203,203); - $this->Rotate(0); - $this->Text(10,50,$text); - $this->Rotate(0); - $this->SetTextColor(0,0,0); - } -} -?> diff --git a/modules/invoice/invoice_base_tcpdf.inc.php b/modules/invoice/invoice_base_tcpdf.inc.php deleted file mode 100644 index 7072e6eb..00000000 --- a/modules/invoice/invoice_base_tcpdf.inc.php +++ /dev/null @@ -1,182 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Invoice - */ - -define('FPDF_FONTPATH',PATH_INCLUDES.'tcpdf/fonts/'); -require_once(PATH_INCLUDES.'tcpdf/tcpdf.php'); - -/** - * PDF Invoice Base - * - * @package AgileBill - * @subpackage Module:Invoice - */ -abstract class pdf_invoice_base extends TCPDF { - protected $billToCompany = true; - protected $itemsSummaryMax = 16; - protected $itemsPreviousMax = 5; - protected $news = ''; - protected $pageType = 'blank'; - protected $show_itemized = true; - protected $show_service_range = false; - private $invoiceCurrency = '$'; - private $invoiceDecimals = 2; - - # Store previous invoices due - private $itemsPrevious = array(); - # Stores the invoice items - protected $invoice; - protected $itemsFull; - protected $account; - # Iteration of drawing the items on the invoice - protected $iteration; - # Store the date range, that the invoice covers - protected $dateRange; - - public function __construct($inv) { - parent::__construct(); - - $this->SetCreator('Open Source Billing'); - $this->SetAuthor($inv->print['site']['NAME']); - $this->SetTitle(sprintf('%s Invoice',$inv->print['site']['NAME'])); - $this->SetSubject(sprintf('Invoice #%06s',$inv->getPrintInvoiceNum())); - $this->SetKeywords($inv->getPrintInvoiceID()); - $this->SetAutoPageBreak(TRUE,25); - $this->SetHeaderMargin(1); - $this->SetFooterMargin(10); - $this->SetDisplayMode('fullwidth'); - #$this->setHeaderFont(array('helvetica','',8)); - $this->setFooterFont(array('helvetica','',8)); - - return $this; - } - - public function load_setup($rs=false) { - if (! $rs) { - $db =& DB(); - $rs = $db->Execute(sqlSelect($db,'setup_invoice','*','')); - } - - $this->billToCompany = $rs->fields['bill_to_company']; - $this->invoiceCurrency = $rs->fields['invoice_currency']; - $this->invoiceDecimals = $rs->fields['invoice_decimals']; - $this->itemsSummaryMax = $rs->fields['items_summary_max']; - $this->news = $rs->fields['news']; - $this->pageType = $rs->fields['page_type']; - $this->show_itemized = $rs->fields['invoice_show_itemized']; - $this->show_service_range = $rs->fields['invoice_show_service_dates']; - } - - abstract public function drawCompanyLogo(); - abstract public function drawCompanyAddress($inv); - abstract public function drawInvoiceHeader($inv); - - /** - * Enable re-iteration of the invoices items, so that they can be displayed many ways - */ - abstract public function drawLineItems_pre($iteration); - - /** - * This is called for each line item. - */ - abstract public function drawLineItems($db,$line,$invnum); - - /** - * Draws the summary on the first page - */ - abstract public function drawSummaryLineItems($inv); - abstract public function drawPaymentMethods($inv); - - public function drawRemittenceStub() {} - public function drawCustom() {} - public function drawInvoiceDueNotice() {} - public function drawInvoicePaidNotice() {} - public function setLateFeeNotice() {} - - /** - * Get a blank invoice template - */ - public function getTemplate() { - return false; - } - - /** - * Assigns the invoice fields to this object. - */ - public function setInvoiceFields($flds) { - $this->invoice = $flds; - } - - /** - * Assigns the account fields to this object. - */ - public function setAccountFields($flds) { - $this->account = $flds; - } - - public function setItemsFull($items) { - $this->itemsFull = $items; - } - - public function setItemsPrevious($items) { - $this->itemsPrevious = $items; - } - - public function setDateRange($periodStart,$periodEnd) { - $this->dateRange = sprintf('%s - %s',date(UNIX_DATE_FORMAT,$periodStart),date(UNIX_DATE_FORMAT,$periodEnd)); - } - - public function setCurrency($currency) { - $this->invoiceCurrency = $currency; - } - - public function setDecimals($decimals) { - $this->invoiceDecimals = $decimals; - } - - /** - * Render an amount into a currency display - */ - protected function _currency($num) { - global $C_list; - - if ($this->invoiceDecimals>3) - return $this->invoiceCurrency.number_format($num,$this->invoiceDecimals); - else - return $C_list->format_currency_num($num,$this->invoice['actual_billed_currency_id']); - } - - /** - * Add a watermark to the PDF - */ - public function addWaterMark($text) { - $this->SetFont('helvetica','B',50); - $this->SetTextColor(203,203,203); - $this->Rotate(0); - $this->Text(10,50,$text); - $this->Rotate(0); - $this->SetTextColor(0,0,0); - } -} -?> diff --git a/modules/invoice/invoice_construct.xml b/modules/invoice/invoice_construct.xml deleted file mode 100644 index c09af823..00000000 --- a/modules/invoice/invoice_construct.xml +++ /dev/null @@ -1,259 +0,0 @@ - - - - invoice - - invoice
- - - - 0 - - date_orig - - 25 - - 1 - - - - date_orig - date_last - billing_status - process_status - account_id - reseller_id - total_amt - due_date - checkout_plugin_id - net_term_id - - - - - - - Invoice - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Invoice Date - I8 - - - - date-now - Date Updated - I8 - - - - Active - L - - - - L - - - - Invoice Status - L - - - - L - - - - account - first_name,last_name - Account - I8 - - - - I4 - - - - C(32) - - - - C(32) - - - - I4 - - - - C(255) - array - - - - Total Taxes - F - - - - Total Credits - F - - - - Total Discounts - F - - - - Amount - F - - - - Amount Paid - F - - - - I4 - - - - F - - - - I4 - - - - Date Due - I8 - date-time - - - - X - - - - L - - - - - - id,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,status - id,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,credit_amt,billed_currency_id,due_date,net_term_id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - id,date_orig,date_last,process_status,billing_status,print_status,account_id,account_billing_id,reseller_id,checkout_plugin_id,tax_amt,discount_amt,total_amt,billed_amt,billed_currency_id,due_date,net_term_id - - - - - - - - <user_view>Invoice</user_view> - - - - - - - id - checkbox - 25px - - - account_id - - - service_id - - - invoice_date - next_invoice_date - - - price - currency - - - 120px - - - - - id - checkbox - 25px - - - id - - - account_id - - - date_orig - date - - - due_date - date - - - total_amt - currency - - - 120px - - - - - id - checkbox - 25px - - - id - - - date_orig - date - - - total_amt - currency - - - balance - currency - - - 60px - - - -
diff --git a/modules/invoice/invoice_install.xml b/modules/invoice/invoice_install.xml deleted file mode 100644 index b0039843..00000000 --- a/modules/invoice/invoice_install.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - Invoices - - 1 - - invoice - - - - invoice - - - - base - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - Search - 1 - search_form - - - - search_show - - - - update - - - - view - - - - Upcoming Invoices - 1 - tmInvoiceSoon - - - resend - - - search_export - - - approveinvoice - - - voidinvoice - - - performance - - - refund - - - reconcile - - - autobill - - - generatedomaininvoice - - - generateinvoice - - - generateinvoice_account - - - diff --git a/modules/invoice/receipt_print.php b/modules/invoice/receipt_print.php deleted file mode 100644 index e35dc7a4..00000000 --- a/modules/invoice/receipt_print.php +++ /dev/null @@ -1,93 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - - -/** - * This module creates a printable pdf reciept on manual invoice reconciliation suitable for retail printing. - * To enable, simply change "var $active=false;" to "var $active=true" below. - * When an invoice is reconciled from the admin menu, a PDF will be displayed inline, and you can use the print - * feature in the inline acrobat reader to print. - */ - -require_once(PATH_INCLUDES.'pdf/fpdf.php'); - -class receipt_print extends FPDF -{ - var $active=false; - var $save_path = ''; - - function add($invoice, $payment_amt, $paid_amt) { - - if(!$this->active) return false; - - ob_start(); - - $this->AddPage(); - $this->SetFont('Arial','B',10); - - $this->drawCompanyLogo(); - $this->drawCompanyAddress(); - - $this->SetXY(0,50); - $this->Cell(50,10,"*** INVOICE# {$invoice['id']} ***"); - - $this->SetXY(0,60); - $this->Cell(50,10,"DATE ".date("d/m/Y D H:i")); - - $this->SetXY(0,70); $this->Cell(50,5,"INVOICE TOTAL: "); - $this->SetXY(45,70); $this->Cell(50,5, number_format($invoice['total_amt'],2)); - - $this->SetXY(0,75); $this->Cell(50,5,"PREV AMT DUE: " ); - $this->SetXY(45,75); $this->Cell(50,5, number_format($invoice['total_amt']-$invoice['billed_amt'],2)); - - $this->SetXY(0,80); $this->Cell(50,5,"CURRENT PAYMENT: " ); - $this->SetXY(45,80); $this->Cell(50,5, $payment_amt); - - $this->SetXY(0,85); $this->Cell(50,5,"PAID TO DATE: " ); - $this->SetXY(45,85); $this->Cell(50,5, number_format($paid_amt,2)); - - $this->SetXY(0,90); $this->Cell(50,5,"CURRENY AMT DUE: " ); - $this->SetXY(45,90); $this->Cell(50,5, number_format($invoice['total_amt']-$paid_amt,2)); - - $this->SetXY(0,100); $this->Cell(50,5,"Thank You!" ); - - $this->Output(); - - ob_flush(); - } - - - // draw the logo - function drawCompanyLogo() { - $width = 50; - if(is_file(PATH_THEMES.'default/images/logo-invoice.png')) - $this->Image(PATH_THEMES.'default/images/logo-invoice.png',0,0,$width); - } - - // draw the company address - function drawCompanyAddress() { - // add the company address on the payment stub (1) - $this->SetFont('times','B', 10); - $this->SetXY(0,30); $this->Cell(50,10, SITE_NAME); - $this->SetXY(0,35); $this->Cell(50,10, SITE_ADDRESS); - $this->SetXY(0,40); $this->Cell(50,10, SITE_CITY. ", ". SITE_STATE . " " . SITE_ZIP); - } -} -?> diff --git a/modules/invoice_commission/invoice_commission.inc.php b/modules/invoice_commission/invoice_commission.inc.php deleted file mode 100644 index d6dff18d..00000000 --- a/modules/invoice_commission/invoice_commission.inc.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class invoice_commission -{ - - # Open the constructor for this mod - function invoice_commission() - { - # name of this module: - $this->module = "invoice_commission"; - - # 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"]; - } -} -?> \ No newline at end of file diff --git a/modules/invoice_commission/invoice_commission_construct.xml b/modules/invoice_commission/invoice_commission_construct.xml deleted file mode 100644 index bd93b85d..00000000 --- a/modules/invoice_commission/invoice_commission_construct.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - invoice_commission - - invoice_commission
- - invoice - - 0 - - invoice_id - - 25 - - - date_orig - affiliate_commission_id - invoice_id - affiliate_id - status - - - - - I8 - 1 - 1 - - - I4 - 1 - - - I8 - - - I8 - - - I4 - - - I8 - - - C(32) - - - F - - - L - - - - - - 0 -
diff --git a/modules/invoice_commission/invoice_commission_install.xml b/modules/invoice_commission/invoice_commission_install.xml deleted file mode 100644 index 6a0cee59..00000000 --- a/modules/invoice_commission/invoice_commission_install.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - invoice_commission - invoice - - invoice - - - - - - \ No newline at end of file diff --git a/modules/invoice_item/invoice_item.inc.php b/modules/invoice_item/invoice_item.inc.php deleted file mode 100644 index ecfa88ac..00000000 --- a/modules/invoice_item/invoice_item.inc.php +++ /dev/null @@ -1,220 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Invoice - */ - -/** - * The main AgileBill Invoice Item Class - * - * @package AgileBill - * @subpackage Module:Invoice - */ -class invoice_item extends OSB_module { - # Hold the Tax information for this object - private $tax_arr; - # Hold the Discount information for this object - private $discount_arr; - # The prorate rate for this item - private $prorata = 1; - # Set the base price - used to work out the recurring amount - private $base = 0; - - private function setBase() { - if ($this->base && $this->prorata) - $this->setRecordAttr('price_base',$this->base*$this->prorata); - } - - public function setProRata($amt) { - $this->prorata = $amt; - - # Automatically reduce the base rate - $this->setBase(); - } - - public function setBaseRate($amt) { - $this->base = $amt; - - # Automatically reduce the base rate - $this->setBase(); - } - - /** - * Calculate the tax for an item record - * - * @uses account - * @uses tax - */ - private function pCalcTax() { - $total = 0; - - foreach ($this->getTaxArr() as $tax) - $total += $tax['rate']; - - return $total; - } - - public function getTaxArr() { - if (! is_array($this->tax_arr)) { - # If we dont have an Account ID we cant calculate tax - if (is_null($this->getRecordAttr('account_id'))) - return false; - - include_once(PATH_MODULES.'tax/tax.inc.php'); - $to = new tax; - - include_once(PATH_MODULES.'account/account.inc.php'); - $ao = new account($this->getRecordAttr('account_id')); - - $total = ($this->getRecordAttr('price_base')+$this->getRecordAttr('price_setup'))*$this->getRecordAttr('quantity')-$this->getRecordAttr('discount_amt'); - $this->tax_arr = $to->calculate($total,$ao->getRecordAttr('country_id'),$ao->getRecordAttr('state')); - - $this->setRecordAttr('tax_amt',$this->pCalcTax()); - } - - return $this->tax_arr; - } - - public function sGetTaxAmt() { - return $this->pCalcTax(); - } - - /** - * Calculate Discounts applicable for item - * - * @uses discount - */ - private function pCalcDiscount($iamt) { - $total = 0; - - foreach ($this->getDiscountArr($iamt) as $discount) - $total += $discount['amount']; - - return $total; - } - - public function getDiscountArr($iamt) { - if (! is_array($this->discount_arr)) { - include_once(PATH_MODULES.'discount/discount.inc.php'); - $do = new discount; - - $total = ($this->getRecordAttr('price_base')+$this->getRecordAttr('price_setup'))*$this->getRecordAttr('quantity'); - $this->discount_arr = $do->calc_all_discounts(1,$this->getRecordAttr('product_id'),$total,$this->getRecordAttr('account_id'),$iamt); - - $this->setRecordAttr('discount_amt',$this->pCalcDiscount($iamt)); - } - - return $this->discount_arr; - } - - /** - * Get the Discount Total for this Item - */ - public function sGetDiscountAmt($total=0) { - return $this->pCalcDiscount($total); - } - - public function sGetSubTotalAmt() { - return ($this->getRecordAttr('price_base')+$this->getRecordAttr('price_setup'))*$this->getRecordAttr('quantity'); - } - - public function sGetTotalAmt($recalc=false) { - static $total; - - if ($total && ! $recalc) - return $total; - else - $total = 0; - - # Work out our discount if we havent already - if (is_null($this->getRecordAttr('discount_amt'))) - $this->setRecordAttr('discount_amt',$this->pCalcDiscount($this->sGetSubTotalAmt())); - - # Work out our tax if we havent already - if (is_null($this->getRecordAttr('tax_amt'))) - $this->setRecordAttr('tax_amt',$this->sGetTaxAmt()); - - $total = ($this->getRecordAttr('price_base')+$this->getRecordAttr('price_setup'))*$this->getRecordAttr('quantity') - -$this->getRecordAttr('discount_amt') - +$this->getRecordAttr('tax_amt'); - - $this->setRecordAttr('total_amt',$total); - - return $total; - } - - /** - * Work out the recurring amount - * - * This amount excludes taxes and discounts - * - * @uses product - */ - public function sGetRecurAmt() { - if ($this->getRecordAttr('price_type') != 1) - return 0; - - return $this->base*$this->getRecordAttr('quantity'); - } - - /** - * Save records - * - * Taxes and discounts should already be set and configured. - * - * @uses discount - * @uses tax - */ - public function sql_SaveRecord($noconvert=false,$calc=true) { - # If our discounts and taxes were calculated already we can skip them - if ($calc) { - $this->setRecordAttr('discount_amt',$this->pCalcDiscount($this->sGetSubTotalAmt())); - $this->setRecordAttr('tax_amt',$this->sGetTaxAmt()); - $this->setRecordAttr('total_amt',$this->sGetTotalAmt(true)); - } - - if ($id = parent::sql_SaveRecord($noconvert)) { - # Save the Discount Object - include_once(PATH_MODULES.'discount/discount.inc.php'); - $do = new discount; - - include_once(PATH_MODULES.'tax/tax.inc.php'); - $to = new tax; - - # Save the Tax & Discount Details - if ($this->discount_arr) - $do->invoice_item($this->getRecordAttr('invoice_id'),$id,$this->getRecordAttr('account_id'),$this->discount_arr); - - if ($this->tax_arr) - $to->invoice_item($this->getRecordAttr('invoice_id'),$id,$this->getRecordAttr('account_id'),$this->tax_arr); - } - - return $id; - } - - /** - * Return the items on an invoice - */ - public function sInvoiceItems($id) { - return $this->sql_GetRecords(array('where'=>array('invoice_id'=>$id))); - } -} -?> diff --git a/modules/invoice_item/invoice_item_construct.xml b/modules/invoice_item/invoice_item_construct.xml deleted file mode 100644 index ac662575..00000000 --- a/modules/invoice_item/invoice_item_construct.xml +++ /dev/null @@ -1,130 +0,0 @@ - - - - invoice_item - - invoice_item
- - invoice - - 0 - - sku - - 25 - - - invoice_id,site_id - product_id - service_id,site_id - service_id,invoice_id - sku - domain_name,domain_tld - date_orig - site_id,charge_id - - - - - I8 - 1 - 1 - - - I4 - 1 - - - I8 - - - - I8 - - - - I8 - - - I8 - - - I8 - - - - F - - - - L - - - array - 1 - X2 - - - X2 - - - C(128) - - - F - - - F - - - F - - - - L - - - F - - - F - - - - I4 - - - C(128) - - - C(16) - - - I4 - - - C(16) - - - I8 - - - I8 - - - - - account_id,invoice_id,product_id,product_name,service_id,charge_id,quantity,item_type,product_attr,product_attr_cart,price_type,price_base,price_setup,total_amt,discount_amt,tax_amt,recurring_schedule,domain_name,domain_tld,domain_term,domain_type,date_start,date_stop - date_orig,invoice_id,product_id,sku,quantity,item_type,product_attr,product_attr_cart,price_base,price_setup,recurring_schedule,domain_name,domain_tld,domain_term,domain_type - id,site_id,date_orig,invoice_id,product_id,sku,quantity,item_type,product_attr,product_attr_cart,price_base,price_setup,recurring_schedule,domain_name,domain_tld,domain_term,domain_type - id,site_id,date_orig,invoice_id,product_id,sku,quantity,item_type,product_attr,product_attr_cart,price_base,price_setup,recurring_schedule,domain_name,domain_tld,domain_term,domain_type - id,site_id,date_orig,invoice_id,product_id,quantity,item_type,price_base,price_setup - - - 0 -
- diff --git a/modules/invoice_item/invoice_item_install.xml b/modules/invoice_item/invoice_item_install.xml deleted file mode 100644 index 693898fe..00000000 --- a/modules/invoice_item/invoice_item_install.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - invoice_item - invoice - - invoice - - - - - - \ No newline at end of file diff --git a/modules/invoice_item_discount/invoice_item_discount.inc.php b/modules/invoice_item_discount/invoice_item_discount.inc.php deleted file mode 100644 index 6cfa47a4..00000000 --- a/modules/invoice_item_discount/invoice_item_discount.inc.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/modules/invoice_item_discount/invoice_item_discount_construct.xml b/modules/invoice_item_discount/invoice_item_discount_construct.xml deleted file mode 100644 index c6590eb3..00000000 --- a/modules/invoice_item_discount/invoice_item_discount_construct.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - invoice_item_discount - invoice_item_discount
- invoice - 0 - zone - 25 - - discount - invoice_id,invoice_item_id - date_orig - account_id - - - - I4 - 1 - - - I4 - - - I8 - - - I8 - - - I8 - - - I8 - - - C(64) - - - F - - - - - 0 -
\ No newline at end of file diff --git a/modules/invoice_item_discount/invoice_item_discount_install.xml b/modules/invoice_item_discount/invoice_item_discount_install.xml deleted file mode 100644 index e5016ceb..00000000 --- a/modules/invoice_item_discount/invoice_item_discount_install.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - invoice_item_discount - invoice - - 0 - invoice - - - - - - \ No newline at end of file diff --git a/modules/invoice_item_tax/invoice_item_tax.inc.php b/modules/invoice_item_tax/invoice_item_tax.inc.php deleted file mode 100644 index 49bdacdc..00000000 --- a/modules/invoice_item_tax/invoice_item_tax.inc.php +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/modules/invoice_item_tax/invoice_item_tax_construct.xml b/modules/invoice_item_tax/invoice_item_tax_construct.xml deleted file mode 100644 index 717ca277..00000000 --- a/modules/invoice_item_tax/invoice_item_tax_construct.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - invoice_item_tax - invoice_item_tax
- invoice - 0 - zone - 25 - - tax_id - invoice_id,invoice_item_id - date_orig - account_id - - - - I4 - 1 - - - I4 - - - I8 - - - I8 - - - I8 - - - I8 - - - I4 - - - F - - - - - 0 -
\ No newline at end of file diff --git a/modules/invoice_item_tax/invoice_item_tax_install.xml b/modules/invoice_item_tax/invoice_item_tax_install.xml deleted file mode 100644 index 2e46b825..00000000 --- a/modules/invoice_item_tax/invoice_item_tax_install.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - invoice_item_tax - invoice - - 0 - invoice - - - - - - \ No newline at end of file diff --git a/modules/invoice_memo/invoice_memo.inc.php b/modules/invoice_memo/invoice_memo.inc.php deleted file mode 100644 index aa844b61..00000000 --- a/modules/invoice_memo/invoice_memo.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Invoice - */ - -/** - * The main AgileBill Invoice Memo Class - * - * @package AgileBill - * @subpackage Module:Invoice - */ -class invoice_memo extends OSB_module { -} -?> diff --git a/modules/invoice_memo/invoice_memo_construct.xml b/modules/invoice_memo/invoice_memo_construct.xml deleted file mode 100644 index 70bc8a1b..00000000 --- a/modules/invoice_memo/invoice_memo_construct.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - invoice_memo - - invoice_memo
- - invoice - - 0 - - date_orig - - 25 - - - - invoice_id - memo - - - - - <add>Add Invoice Memo</add> - <view>Invoice Memo</view> - - - - - - I8 - - - I4 - - - Date - I8 - date-time - date-now - - - Invoice - C(32) - - - Account - I8 - account - username - - - Type - C(32) - any - - - Memo - C(255) - any - - - C(32) - - - - - - date_orig,invoice_id,account_id,type,memo - id,site_id,date_orig,invoice_id,account_id,type,memo - id,site_id,date_orig,invoice_id,account_id,type,memo - id,site_id,date_orig,invoice_id,account_id,type,memo - id,site_id,date_orig,invoice_id,account_id,type,memo - - - - 0 - - - - - - id - 25px - - - date_orig - - - account_id - - - type - - - memo - - - -
diff --git a/modules/invoice_memo/invoice_memo_install.xml b/modules/invoice_memo/invoice_memo_install.xml deleted file mode 100644 index 7eb63e1c..00000000 --- a/modules/invoice_memo/invoice_memo_install.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - invoice_memo - invoice - - invoice - - - - - - add - - - update - - - delete - - - view - - - search - - - search_form - - - - search_show - - - - - diff --git a/modules/log_error/log_error.inc.php b/modules/log_error/log_error.inc.php deleted file mode 100644 index f6fd54f6..00000000 --- a/modules/log_error/log_error.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Log - */ - -/** - * The main AgileBill Log Error Class - * - * @package AgileBill - * @subpackage Module:Log - */ -class log_error extends OSB_module { -} -?> diff --git a/modules/log_error/log_error_construct.xml b/modules/log_error/log_error_construct.xml deleted file mode 100644 index 3b11f65f..00000000 --- a/modules/log_error/log_error_construct.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - log_error - - log_error
- - - - 0 - - date_orig - - 25 - - 0 - - - - - - - - - - 1 - I8 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - Account - I8 - account - username - - - Module - C(64) - - - Method - C(64) - - - Message - X2 - - - - - - id,site_id,date_orig,account_id,module,method,message - id,site_id,date_orig,account_id,module,method,message - id,site_id,date_orig,account_id,module,method,message - id,site_id,date_orig,account_id,module,method,message - id,site_id,date_orig,account_id,module,method,message - - - - - - - - <search_form>Search</search_form> - - - - - - - id - checkbox - 25px - - - date_orig - date - 15% - - - message - 45% - - - module - 40% - - - -
diff --git a/modules/log_error/log_error_install.xml b/modules/log_error/log_error_install.xml deleted file mode 100644 index 14c91633..00000000 --- a/modules/log_error/log_error_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - Error Log - - 1 - - log_error - - - - setup - - - - base - - - - - - delete - - - - List - 1 - search - - - - - Search - 1 - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/login_lock/login_lock_construct.xml b/modules/login_lock/login_lock_construct.xml deleted file mode 100644 index e2257b48..00000000 --- a/modules/login_lock/login_lock_construct.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - login_lock - - login_lock
- - - - 0 - - account_id - - 25 - - - account_id - date_expire - ip - - - - - I4 - 1 - 1 - - - I4 - 1 - - - I8 - - - I8 - - - I8 - - - C(32) - - - - - - 0 -
diff --git a/modules/login_lock/login_lock_install.xml b/modules/login_lock/login_lock_install.xml deleted file mode 100644 index 27a1d10f..00000000 --- a/modules/login_lock/login_lock_install.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - login_lock - login_lock - - - - - - - \ No newline at end of file diff --git a/modules/login_log/login_log.inc.php b/modules/login_log/login_log.inc.php deleted file mode 100644 index 7b2f4888..00000000 --- a/modules/login_log/login_log.inc.php +++ /dev/null @@ -1,33 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Log - */ - -/** - * The main AgileBill Login Log Class - * - * @package AgileBill - * @subpackage Module:Log - */ -class login_log extends OSB_module { -} -?> diff --git a/modules/login_log/login_log_construct.xml b/modules/login_log/login_log_construct.xml deleted file mode 100644 index 20bafc86..00000000 --- a/modules/login_log/login_log_construct.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - login_log - - login_log
- - - - 0 - - date_orig - - 25 - - 0 - - - - account_id - ip - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - I8 - account - username - Account - - - L - Active - - - C(32) - IP Address - - - - - - id,site_id,date_orig,account_id,status,ip - id,site_id,date_orig,account_id,status,ip - id,site_id,date_orig,account_id,status,ip - id,site_id,date_orig,account_id,status,ip - id,site_id,date_orig,account_id,status,ip - - - - - - - - <search_form>Search</search_form> - - - - - - - id - checkbox - 25px - - - account_id - - - date_orig - date - - - ip - - - literal - 60px - - - -
diff --git a/modules/login_log/login_log_install.xml b/modules/login_log/login_log_install.xml deleted file mode 100644 index bb237dda..00000000 --- a/modules/login_log/login_log_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - Login Log - - 1 - - login_log - - - - account - - - - base - - - - - - delete - - - - List - 1 - search - - - - - Search - 1 - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/login_share/login_share.inc.php b/modules/login_share/login_share.inc.php deleted file mode 100644 index acb7c856..00000000 --- a/modules/login_share/login_share.inc.php +++ /dev/null @@ -1,148 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class login_share -{ - function login_share() - { - // Number of days to check when searching for shared passwords - $this->range = 7; - - // Cutoff number for different subnets - if the amount of unique - // IP addresses used to access an account is greater than this number, the - // account will be suspended. - $this->max_subnets = 5; - - // number of subnets to compare when search for shared passwords - // example: - // "4" would check the full IP address, ie: 123.456.789.123 - // "3" would check the first 3 subnets of an IP, ie: 123.456.789. (recommended) - // "2" would check the first 2 subnets of an IP, ie: 123.456. - // "1" would check the first 1 subnets of an IP, ie: 123. - $this->subnets = 3; - - // List of exempt usernames: - $this->exempt = Array('admin'); - } - - ### Detect password sharing - function login($account_id, $username) - { - # Check if account is exempt: - if(!empty($this->exempt) && is_array($this->exempt)) - for($i=0; $iexempt); $i++) - if($this->exempt[$i] == $username) - return true; - - # Determine current subnet to match: - @$arr = explode('.', USER_IP); - - # Validate values - if(!is_array($arr) || !is_numeric($this->subnets) || $this->subnets > 4 ) - return true; - - # Subnet... - $subnet=''; - for($i=0; $i<$this->subnets; $i++) { - $subnet .= $arr[$i]; - if($i<3) $subnet .= '.'; - } - - # time limit... - $limit = time() - (86400 * $this->range); - - # Generate SQL query - $db = &DB(); - $sql = "SELECT DISTINCT - ip - FROM ". - AGILE_DB_PREFIX."login_log - WHERE - date_orig > $limit - AND - ip NOT LIKE '$subnet%' - AND - account_id = $account_id - AND - site_id = ".DEFAULT_SITE; - $rs = $db->Execute($sql); - - if($this->max_subnets > 0 && $rs->RecordCount() >= ($this->max_subnets - 1)) - { - $subnets["$subnet"] = true; - - $count = 0; - while(!$rs->EOF) - { - @$arr = explode('.', $rs->fields['ip']); - $subnet1=''; - for($i=0; $i<$this->subnets; $i++) { - $subnet1 .= $arr[$i]; - if($i<3) $subnet1 .= '.'; - } - - if(empty($subnets["$subnet1"])) - $subnets["$subnet1"] = true; - - if(!empty($subnets) && count($subnets) >= $this->max_subnets) - break; - - $rs->MoveNext(); - } - - # over limit? - if(!empty($subnets) && count($subnets) >= $this->max_subnets) - { - # Deactivate account: - $sql = "UPDATE ". - AGILE_DB_PREFIX."account - SET - status = 0 - WHERE - site_id = ".DEFAULT_SITE." - AND - id = $account_id"; - $db->Execute($sql); - - # send e-mail alerts - include_once(PATH_MODULES.'email_template/email_template.inc.php'); - - # send user alert - $email = new email_template; - $email->send('login_share_ban_user', $account_id, '', $this->max_subnets, count($subnets)); - - # send admin alert - $email = new email_template; - $email->send('admin->login_share_ban_admin', $account_id, '', $this->max_subnets, count($subnets)); - - return false; - } - else - { - return true; - } - } - else - { - return true; - } - } -} -?> \ No newline at end of file diff --git a/modules/login_share/login_share_construct.xml b/modules/login_share/login_share_construct.xml deleted file mode 100644 index 9b748fd0..00000000 --- a/modules/login_share/login_share_construct.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - login_share - - login_share
- - - - 0 - - id - - 30 - - - - - I8 - - - I4 - - - I8 - date-time - - - I8 - date-time - - - I8 - - - - - id,site_id,date_orig,date_last,account_id - id,site_id,date_orig,date_last,account_id - id - id,site_id,date_orig,date_last,account_id - id,site_id,date_orig,date_last,account_id - - - 0 -
diff --git a/modules/login_share/login_share_install.xml b/modules/login_share/login_share_install.xml deleted file mode 100644 index f95c9c5c..00000000 --- a/modules/login_share/login_share_install.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - login_share - setup - - 0 - - - - - - \ No newline at end of file diff --git a/modules/module/dev.inc.php b/modules/module/dev.inc.php deleted file mode 100644 index 5985cf0e..00000000 --- a/modules/module/dev.inc.php +++ /dev/null @@ -1,1441 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - - -# create the main block -function dev_block_main($VAR) -{ - $ret = ' - - - - -
- - - - - - - -
-
- {translate module='.$VAR['module'].'} - menu - {/translate} -
-
- - - - -
{translate module='.$VAR['module'].'}help_file{/translate}
-
-
-'; - return $ret; -} - - - - - -####################################################### -## create the add block ### -####################################################### -function dev_block_add($VAR) -{ - -# define the field types: -$field_type['text_small'] = ''; -$field_type['text_medium'] =''; -$field_type['text_large'] = ''; -$field_type['menu'] = '{ $list->menu("", "' . $VAR['module'] . '_%%field%%", "%%table%%", "name", $VAR.' . $VAR['module'] . '_%%field%%, "form_menu") }'; -$field_type['account_menu'] = '{ $list->popup("' . $VAR['module'] . '_add", "' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "account_admin", "account", "first_name,middle_name,last_name", "form_field", "") }'; -$field_type['date'] = '{ $list->calender_add("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field") }'; -$field_type['date_time'] = '{$list->date_time("")} '; -$field_type['date_now'] = '{$list->date_time("")} '; -$field_type['bool'] = '{ $list->bool("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_menu") }'; - - -$ret = ' - - -{if $form_validation} - { $block->display("core:alert_fields") } -{/if} - - - -{$COOKIE_FORM} - - - - -
- - - - - - - -
-
- {translate module=' . $VAR['module'] . '}title_add{/translate} -
-
- -'; - - #loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - $type = $VAR["field"]["$field"]["field_type"]; - $this_content = eregi_replace('%%field%%', $field, $field_type["$type"]); - if($type == 'menu') $this_content = eregi_replace('%%table%%', $VAR["field"]["$field"]["asso_table"], $this_content); - - if(isset($VAR["field"]["$field"]["page_add"]["include"])) - { - - - $ret .= ' - - - -'; - } - } - - - - $ret .= ' - - - -
- {translate module=' . $VAR['module'] . '} - field_' . $field . ' - {/translate} - ' . $this_content . ' -
- - - - -
-
-
- -'; - -return $ret; -} - - - - - - ####################################################### - ## GENERATE THE INSTALL DATA (SQL) ### - ####################################################### - function dev_install_xml_data($module,$module_id) - { - $rt = ' -'; - # open the backup file: - $xml = ''; - $xml .= $rt . '' . $rt; - - - - # generate the sql select statement: - $db = &DB(); - $dba = &DB(); - - - $sql = 'SELECT * FROM '.AGILE_DB_PREFIX.''.$module.' WHERE site_id = '. - $dba->qstr(DEFAULT_SITE) . ' ORDER BY id'; - $resulta = $dba->Execute($sql); - - # check the results - if($resulta != false && $resulta->RecordCount() > 0) - { - - # get the export data: - $resultarr = $resulta->GetArray(); - - # loop through each field - for ($ii=0; $ii' . $rt; - while (list ($field,$value) = each ($resultarr[$ii])) - { - if($value != '' && !is_integer($field)) - { - if( ereg('<', $value) || ereg('>', $value) || ereg('&', $value) || ereg('\'', $value) || ereg('"', $value) ) { - $value = ereg_replace('&', '&', $value); - $data = ' <'.$field.'>'; - $xml .= $data . '' . $rt; - } else { - $data = ' <'.$field.'>' . $value . ''; - $xml .= $data . '' . $rt; - } - } - } - $xml .= ' ' . $rt; - } - - - #################################################################### - # backup the autoincrement count: - #################################################################### - - $idmodule = $module . '_id'; - $sql = 'SELECT id FROM '.AGILE_DB_PREFIX.''.$idmodule; - $resulti = $db->Execute($sql); - - if($resulti!=false && @$resulti->RecordCount() != 0) - { - # get the export data: - $resultarr = $resulti->GetArray(); - - # loop through each field - for ($ii=0; $ii' . $rt; - while (list ($field,$value) = each ($resultarr[$ii])) - { - if($value != '' && gettype($field) != 'integer') - { - $data = ' <'.$field.'>' . htmlspecialchars($value,0,"ISO8859-1") . ''; - $xml .= $data . '' . $rt; - } - } - $xml .= ' ' . $rt; - } - } - } else { - return false; - } - - - $xml .= ''; - return $xml; - - } - - - - - ####################################################### - ## GENERATE THE INSTALL XML ### - ####################################################### - function dev_install_xml_gen($module,$module_id) - { - # get the module parent - $db = &DB(); - $sql = "SELECT * FROM ".AGILE_DB_PREFIX."module WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($module_id); - $mr = $db->Execute($sql); - - if( $mr->fields["parent_id"] == "" || - $mr->fields["parent_id"] == "0" || - $mr->fields["parent_id"] == $module_id ) - { - $parent = $module; - } - else - { - $db = &DB(); - $sql = "SELECT * FROM ".AGILE_DB_PREFIX."module WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($mr->fields["parent_id"]); - $mrp = $db->Execute($sql); - $parent = $mrp->fields["name"]; - } - - - - # get the current settings: - $t = "\t"; - $n = "\n"; - $C_xml = new CORE_xml; - $inst = $C_xml->xml_to_array(PATH_MODULES . '' . $module . '/' . $module . '_install.xml'); - - # Get any dependancy - $dependancy = @$inst['install']['module_properties']['dependancy']; - - # Get any sub_modules - $sub_modules = @$inst['install']['module_properties']['sub_modules']; - - ################################################################# - # regenerate the install file: - $xml = "{$n}"; - $install_xml = - "". $n . - "{$t}".$n . - "{$t}{$t}{$module}".$n . - "{$t}{$t}{$parent}".$n . - "{$t}{$t}fields["notes"]}]]>{$n}"; - - if(!empty($mr->fields["menu_display"])) - $install_xml .= - "{$t}{$t}1{$n}"; - - if(!empty($dependancy)) - $install_xml .= - "{$t}{$t}{$dependancy}{$n}"; - - if(!empty($sub_modules)) - $install_xml .= - "{$t}{$t}{$sub_modules}{$n}"; - - $install_xml .= - "{$t}" . $n . - "{$t}" . $n . - "{$t}{$t}" . $n; - - # loop through the methods - $db = &DB(); - $sql = "SELECT * FROM ".AGILE_DB_PREFIX."module_method WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - module_id = ".$db->qstr($module_id); - $result=$db->Execute($sql); - - while(!$result->EOF) - { - $method = $result->fields['name']; - $display = $result->fields['menu_display']; - $notes = $result->fields['notes']; - $page = trim(ereg_replace('&', '&', $result->fields['page'] ) ); - - $install_xml .= - "{$t}{$t}{$t}<{$method}>".$n. - "{$t}{$t}{$t}{$t}{$method}". $n; - - if(!empty($notes)) - $install_xml .= - "{$t}{$t}{$t}{$t}" . $n; - - if(!empty($page)) - $install_xml .= - "{$t}{$t}{$t}{$t}" . $n; - - if(!empty($display)) - $install_xml .= - "{$t}{$t}{$t}{$t}1" . $n; - - $install_xml .= - "{$t}{$t}{$t}" . $n; - - $result->MoveNext(); - } - - $install_xml .= - "{$t}{$t}".$n. - "{$t}".$n. - ""; - - return $install_xml; - } - - - - - - -####################################################### -## create the view block ### -####################################################### -function dev_block_view($VAR) -{ - - -# define the field types: -$field_type['text_small'] = ''; -$field_type['text_medium'] = ''; -$field_type['text_large'] = ''; -$field_type['menu'] = '{ $list->menu("", "' . $VAR['module'] . '_%%field%%", "%%table%%", "name", $'.$VAR['module'].'.%%field%%, "form_menu") }'; -$field_type['account_menu'] = '{ $list->popup("' . $VAR['module'] . '_view", "' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "account_admin", "account", "first_name,middle_name,last_name", "form_field", $' . $VAR['module'] .'.id) }'; -$field_type['date'] = '{ $list->calender_view("' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "form_field", $' . $VAR['module'] .'.id) }'; -$field_type['date_time'] = '{ $list->calender_view("' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "form_field", $' . $VAR['module'] .'.id) }'; -$field_type['date_now'] = '{$list->date_time("")} '; -$field_type['bool'] = '{ $list->bool("' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "form_menu") }'; - - - $ret = ' -{ $method->exe("' . $VAR["module"] . '","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else} - -{literal} - - -{/literal} - - -{foreach from=$' . $VAR["module"] . ' item=' . $VAR["module"] . '} - - -{if $form_validation} - { $block->display("core:alert_fields") } -{/if} - - -
-{$COOKIE_FORM} - - - - -
- - - - - - - -
-
- {translate module=' . $VAR['module'] . '}title_view{/translate} -
-
- -'; - - - - #loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - $type = $VAR["field"]["$field"]["field_type"]; - $this_content = eregi_replace('%%field%%', $field, $field_type["$type"]); - if($type == 'menu') $this_content = eregi_replace('%%table%%', $VAR["field"]["$field"]["asso_table"], $this_content); - - if(isset($VAR["field"]["$field"]["page_view"]["include"])) - { - # is field changeable - if(!isset($VAR["field"]["$field"]["page_view"]["type"])) - { - $this_content = $VAR['module'] . '.' . $field; - - if($type == 'bool') - { - $this_content = '{if $' . $this_content . ' == "1"}{translate}true{/translate}{else}{translate}false{/translate}{/if}'; - } - else if ($type == 'date') - { - $this_content = '{$list->date($' . $this_content . ')}'; - } - else if ($type == 'date_time' || 'date_now') - { - $this_content = '{$list->date_time($' . $this_content . ')}'; - } - else - { - $this_content = '{$' . $this_content .'}'; - } - } - - - $ret .= ' - - - -'; - - } - } - - - - $ret .= ' - - - -
- {translate module=' . $VAR['module'] . '} - field_' . $field . ' - {/translate} - ' . $this_content . ' -
- - - - - -
- - - -
-
-
-
- - - - -
- {/foreach} -{/if} -'; - -return $ret; -} - - - - - - - - - - - - - - - - - - -####################################################### -## create the search_form block ### -####################################################### -function dev_block_search_form($VAR) -{ - - -# define the field types: -$field_type['text_small'] = '   {translate}search_partial{/translate}'; -$field_type['text_medium'] = '   {translate}search_partial{/translate}'; -$field_type['text_large'] = '   {translate}search_partial{/translate}'; -$field_type['menu'] = '{ $list->menu("", "' . $VAR['module'] . '_%%field%%", "%%table%%", "name", "all", "form_menu") }'; -$field_type['account_menu'] = '{ $list->popup("' . $VAR['module'] . '_search", "' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "account_admin", "account", "first_name,middle_name,last_name", "form_field", "") }'; -$field_type['date'] = '{ $list->calender_search("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field", "") }'; -$field_type['date_time'] = '{ $list->calender_search("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field", "") }'; -$field_type['date_now'] = '{ $list->calender_search("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field", "") }'; -$field_type['bool'] = '{ $list->bool("' . $VAR['module'] . '_%%field%%", "all", "form_menu") }'; - - - $ret = ' -{ $method->exe("' . $VAR["module"] . '","search_form") } -{ if ($method->result == FALSE) } - { $block->display("core:method_error") } -{else} - -
- {$COOKIE_FORM} - - - - -
- - - - - - - -
-
- {translate module=' . $VAR['module'] . '}title_search{/translate} -
-
- -'; - - #loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - $type = $VAR["field"]["$field"]["field_type"]; - $this_content = eregi_replace('%%field%%', $field, $field_type["$type"]); - if($type == 'menu') $this_content = eregi_replace('%%table%%', $VAR["field"]["$field"]["asso_table"], $this_content); - - if(isset($VAR["field"]["$field"]["page_search_form"]["include"])) - { - - - $ret .= ' - - - -'; - } - } - - - - $ret .= ' - - - - - - - - - - - - - - - -
- {translate module=' . $VAR['module'] . '} - field_' . $field . ' - {/translate} - ' . $this_content . ' -
{translate}search_results_per{/translate} - -
{translate}search_order_by{/translate} - -
- - - - -
-
-
-
-{ $block->display("core:saved_searches") } -{ $block->display("core:recent_searches") } -{/if} -'; - -return $ret; -} - - - - - - - - - - - - - - - - - - - - -####################################################### -## create the search_show block ### -####################################################### -function dev_block_search_show($VAR) -{ - - - -$ret = ' - -{$method->exe("' . $VAR["module"] . '","search_show")} -{if ($method->result == FALSE)} - {$block->display("core:method_error")} -{else} - {if $results == 1} - {translate results=$results}search_result_count{/translate} - {else} - {translate results=$results}search_results_count{/translate} - {/if} -
- - - {literal} - - - {/literal} - - -
- - -
- - - - - - -
- - - - - - -'; - - $total = 0; - #count the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - if(isset($VAR["field"]["$field"]["page_search_show"]["include"])) - { - $total++; - } - } - - - @$width = 95 / $total; - - #loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - $type = $VAR["field"]["$field"]["field_type"]; - $this_content = '$record.' . $field; - if(isset($VAR["field"]["$field"]["page_search_show"]["include"])) - { -$ret.= ' -'; - } - } - -$ret.= ' - {foreach from=$' . $VAR["module"] . ' item=record} - - - -'; - - #loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - $type = $VAR["field"]["$field"]["field_type"]; - $this_content = '$record.' . $field; - - if(isset($VAR["field"]["$field"]["page_search_show"]["include"])) - { - if($type == 'bool') - { - $this_content = '{if ' . $this_content . ' == "1"}{translate}true{/translate}{else}{translate}false{/translate}{/if}'; - } - else if ($type == 'date') - { - $this_content = '{$list->date(' . $this_content . ')}'; - } - else if ($type == 'date_time' || $type == 'date_now') - { - $this_content = '{$list->date_time(' . $this_content . ')}'; - } - else - { - $this_content = '{' . $this_content .'}'; - } - - -$ret .= ' -'; - } - } - -$ret .= ' - - - {literal} - - {/literal} - {/foreach} - - -
  - {literal} - - {/literal} -
- -  ' . $this_content . '
-
-{if $VAR._print != TRUE}
-
- - - - - -
-'; - -if(isset($VAR['module_export_bar'])) -{ -$ret .= '
- - - - -
- {translate}search_export_image{/translate} - {translate}search_print_image{/translate}'; - //{translate}search_save_image{/translate} -$ret .= ' - {translate}search_new_image{/translate} - {translate module='  . $VAR[ -
-'; -} -$ret.= '
-{/if} -{/if} -
-'; - -return $ret; -} - - - - - - - - - - - - - -####################################################### -## GENERATE THE LANGUAGE PACKS ### -####################################################### -function dev_language_xml($VAR) -{ -$xml = ''; -$language_xml = $xml . ' - - ' . $VAR["lang"]["name"] . ' - - '; - - # loop through the methods - for($i=0; $i < count($VAR["m"]); $i++) - { - $method = $VAR["m"]["$i"]; - $language_xml .= ' - '; - $title = $VAR["method"]["$method"]["block_name"]; - $language_xml .= $title . ''; - } - - - $language_xml .=' - - - ' . $VAR["lang"]["menu"] . ''; - - - # loop through the methods - for($i=0; $i < count($VAR["m"]); $i++) - { - $method = $VAR["m"]["$i"]; - $language_xml .= ' - '; - $menu = $VAR["method"]["$method"]["menu_name"]; - $language_xml .= $menu . ''; - } - - $language_xml .=' - - '; - - # loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - $field = $VAR["f"]["$i"]; - $language_xml .=' - ' . $VAR["field"]["$field"]["name"] . ''; - } - - $pat_nl = ' -'; - $language_xml .=' -'; - -return $language_xml; -} - - - - -####################################################### -## GENERATE THE CONSTRUCT PHP ### -####################################################### -function dev_construct_php($VAR) -{ - $construct_php = 'module = "' . $VAR["module"] . '"; - - # 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"]; - } - -'; if (isset($VAR["method"]["add"])) { $construct_php .= ' - - ############################## - ## ADD ## - ############################## - function add($VAR) - { - $type = "add"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->add($VAR, $this, $type); - } -' -; } if (isset($VAR["method"]["view"])) { $construct_php .= -' - ############################## - ## VIEW ## - ############################## - function view($VAR) - { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } -' -; } if (isset($VAR["method"]["update"])) { $construct_php .= -' - ############################## - ## UPDATE ## - ############################## - function update($VAR) - { - $type = "update"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->update($VAR, $this, $type); - } -' -; } if (isset($VAR["method"]["delete"])) { $construct_php .= -' - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $db = new CORE_database; - $db->mass_delete($VAR, $this, ""); - } -' -; } if (isset($VAR["method"]["search"])) { $construct_php .= -' - ############################## - ## SEARCH FORM ## - ############################## - function search_form($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_form($VAR, $this, $type); - } -' -; } if (isset($VAR["method"]["search"])) { $construct_php .= -' - ############################## - ## SEARCH ## - ############################## - function search($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search($VAR, $this, $type); - } -' -; } if (isset($VAR["method"]["search"])) { $construct_php .= -' - ############################## - ## SEARCH SHOW ## - ############################## - - function search_show($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_show($VAR, $this, $type); - } -' -; } if (isset($VAR["method"]["search_save"])) { $construct_php .= -' - ############################## - ## SEARCH SAVE ## - ############################## - function search_save($VAR) - { - if ( - isset($VAR["search_id"]) && - isset($VAR["save_name"]) - ) - { - if ( - $VAR["search_id"] != "" && - $VAR["save_name"] != "" - ) - { - # create the record - include_once(PATH_CORE . "search.inc.php"); - $search = new CORE_search; - $search->save($VAR["search_id"], $this->table, $VAR["save_name"]); - } - } - } -' -; } if (isset($VAR["method"]["search_export"])) { $construct_php .= -' - ############################## - ## SEARCH EXPORT ## - ############################## - function search_export($VAR) - { - # require the export class - require_once (PATH_CORE . "export.inc.php"); - - # Call the correct export function for inline browser display, download, email, or web save. - if($VAR["format"] == "excel") - { - $type = "export_excel"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_excel($VAR, $this, $type); - } - - else if ($VAR["format"] == "pdf") - { - $type = "export_pdf"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_pdf($VAR, $this, $type); - } - - else if ($VAR["format"] == "xml") - { - $type = "export_xml"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_xml($VAR, $this, $type); - } - - else if ($VAR["format"] == "csv") - { - $type = "export_csv"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_csv($VAR, $this, $type); - } - - else if ($VAR["format"] == "tab") - { - $type = "export_tab"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_tab($VAR, $this, $type); - } - } -'; -} - -$construct_php .= ' - } -?' . '' . '>'; - -return $construct_php; -} - - - - - - - - - - - -####################################################### -## GENERATE THE CONSTRUCT XML ### -####################################################### -function dev_construct_xml($VAR) -{ - $xml = ''; - - $construct_xml = $xml . ' - - - - ' . $VAR["module"] . ' - - - ' . $VAR["table"] . '
- - - ' . $VAR["dependancy"] . ' - - - ' . $VAR["cache"] . ' - - - ' . $VAR["order_by"] . ' - - - ' . $VAR["limit"] . ' - - - '; - - # loop through the fields - for($i=0; $i < count($VAR["f"]); $i++) - { - - $field = $VAR["f"]["$i"]; - $construct_xml .= ' - <' . $field . '>'; - - if (isset($VAR["field"]["$field"]["type"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["type"] .''; - - if (isset($VAR["field"]["$field"]["min_len"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["min_len"] .''; - - if (isset($VAR["field"]["$field"]["max_len"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["max_len"] .''; - - if (isset($VAR["field"]["$field"]["def_len"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["def_len"] .''; - - if (isset($VAR["field"]["$field"]["pdf_width"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["pdf_width"] .''; - - if (isset($VAR["field"]["$field"]["default"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["default"] .''; - - if (isset($VAR["field"]["$field"]["asso_table"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["asso_table"] .''; - - if (isset($VAR["field"]["$field"]["asso_field"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["asso_field"] .''; - - if (isset($VAR["field"]["$field"]["validate"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["validate"] .''; - - if (isset($VAR["field"]["$field"]["convert"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["convert"] .''; - - if (isset($VAR["field"]["$field"]["unique"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["unique"] .''; - - if (isset($VAR["field"]["$field"]["index"])) - $construct_xml .= ' - '. $VAR["field"]["$field"]["index"] .''; - $construct_xml .= ' - '; - } - - -$construct_xml .= ' - - - - '; - - # loop through the methods - for($i=0; $i < count($VAR["m"]); $i++) - { - $method = $VAR["m"]["$i"]; - $construct_xml .= ' - <' . $method . '>id'; - $arr = $VAR["method"]["$method"]; - $ii = 0; - while (list($key, $value) = each($arr)) - { - if($value == 1) - { - if (($ii != 0) && ($key != 'method_display')) - { - $construct_xml .= ','; - $construct_xml .= $key; - } - } - $ii++; - } - - $construct_xml .= ''; - } - - -$construct_xml .= ' - - - - '; - - # loop through the methods - for($i=0; $i < count($VAR["m"]); $i++) - { - $method = $VAR["m"]["$i"]; - $construct_xml .= ' - <' . $method . '>'; - $arr = $VAR["method"]["$method"]; - $ii = 0; - - if(isset($VAR["method"]["$method"]["trigger_success"])) - if($VAR["method"]["$method"]["trigger_success"] != '') - { - $construct_xml .= ' - ' . $VAR["method"]["$method"]["trigger_success"] . ''; - } - - if(isset($VAR["method"]["$method"]["trigger_failure"])) - if($VAR["method"]["$method"]["trigger_failure"] != '') - { - $construct_xml .= ' - ' . $VAR["method"]["$method"]["trigger_failure"] . ''; - } - - $construct_xml .= ' - '; - } - -$construct_xml .= ' - -
'; - -return $construct_xml; -} - - - - - - - - - - - - ####################################################### - ## GENERATE THE INSTALL XML ### - ####################################################### - function dev_install_xml($VAR) - { - $xml = ''; - $install_xml = $xml . ' - - - - - ' . $VAR["module"] . ' - ' . $VAR["module_parent"] . ' - ' . $VAR["module_notes"] . ' - ' . $VAR["module_menu_display"] . ' - ' . $VAR["dependancy"] . ' - '. $VAR["module_sub_module"] .' - '; - - - /* - for($i=0; $i < count($VAR["group_type"]); $i++) - { - if($VAR["group_type"]["$i"] != '') - { - $install_xml .=' - <' . $VAR["group_type"]["$i"] . '>1'; - } else { - $install_xml .=' - <' . $VAR["group_type"]["$i"] . '>0'; - } - } - */ - - $install_xml .= ' - - - - '; - - # loop through the methods - for($i=0; $i < count($VAR["m"]); $i++) - { - $method = $VAR["m"]["$i"]; - - if(isset($VAR["method"]["$method"]["method_notes"])) - { - $notes = $VAR["method"]["$method"]["method_notes"]; - } else { - $notes = ''; - } - if(isset($VAR["method"]["$method"]["method_page"])) - { - $page = $VAR["method"]["$method"]["method_page"]; - } else { - $page = ''; - } - - if(isset($VAR["method"]["$method"]["method_display"])) - { - $display = $VAR["method"]["$method"]["method_display"]; - } else { - $display = ''; - } - - $page = eregi_replace('&','&', $page); - - $install_xml .= ' - <' . $method . '> - %%module_id%% - ' . $method . ' - ' . $notes . ' - ' . $page . ' - ' . $display . ' - '; - - if($method == 'search') - { - $install_xml .= ' - - %%module_id%% - search_form - Allow users to view the search form - - - %%module_id%% - search_show - Allow users to view the search results - - '; - } - } - - $install_xml .= ' - - -'; - - return $install_xml; - } - -?> \ No newline at end of file diff --git a/modules/module/module.inc.php b/modules/module/module.inc.php deleted file mode 100644 index ca0f1dfb..00000000 --- a/modules/module/module.inc.php +++ /dev/null @@ -1,1293 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Module - */ - -/** - * The main AgileBill Module Class - * - * @package AgileBill - * @subpackage Modules:Module - */ -class module extends OSB_module { - /** - * Initialise the module - */ - public function __construct($id=null) { - parent::__construct($id); - - $this->dev_inst_excl = array( - 'staff','staff_department', - 'blocked_email','blocked_ip', - 'module','module_method', - 'setup_email','email_template','email_template_translate', - 'group_method', - 'backup', - 'login_log', - 'session', - 'weblog', - 'temporary_data', - 'setup', - 'session_auth_cache' - ); - } - - /** MODULE INSTALLATION **/ - - /** - * Main module installer - * - * This function will install a module. - * @uses CORE_xml - */ - public function install($VAR) { - global $smarty,$C_translate; - - static $list = array(); - if (! $list) - $list = $this->getlist(); - - $module = trim($VAR['install_name']); - $nodata = isset($VAR['no-data']) ? $VAR['no-data'] : false; - $type = isset($VAR['type']) ? $VAR['type'] : false; - $installed = false; - - # If module is installed, we'll just return - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'module','name',array('name'=>$module))); - if ($result && $result->RecordCount() > 0) - $installed = true; - - # Check this module for any errors - if ($installed || $this->install_error_check($VAR)) { - - printf('- Module [%s] install check passed(%s).
',$module,$nodata); - - $error = array(); - $arr_s = array(); - $arr_sub = ''; - - # See if this module has any defined sub_modules - if ($type && isset($list[$type][$module]['sub_modules'])) - $arr_sub .= $list[$type][$module]['sub_modules']; - - # See if this module has any defined sub_modules as a result of being a parent. - if ($type && isset($list[$type][$module]['modules']) && count($list[$type][$module]['modules'])) - $arr_sub .= implode(',',array_keys($list[$type][$module]['modules'])); - - # Get sub_modules of this package - if ($arr_sub) { - if (preg_match('/,/',$arr_sub)) - $arr_s = explode(',',$arr_sub); - else - array_push($arr_s,$arr_sub); - - printf('- Module [%s] has sub modules [%s] (%s).
',$module,implode('|',$arr_s),$nodata); - - foreach ($arr_s as $submodule) { - $result = $db->Execute(sqlSelect($db,'module','name',array('name'=>$submodule))); - $installed = false; - if ($result && $result->RecordCount() > 0) - $installed = true; - - if (! $installed && ! $this->install_error_check(array( - 'install_name'=>$submodule, - 'module_group'=>$VAR['module_group'], - 'no-data'=>isset($VAR['no-data']) ? $VAR['no-data'] : false, - 'no-class'=>isset($VAR['no-class']) ? $VAR['no-class'] : false - ))) - array_push($error,$C_translate->translate('install_sub_module_err','module','sub_module='.$submodule)); - } - } - - # Check for error - if (count($error)) { - array_push($error,$C_translate->translate('install_failed','module','')); - - # Set the errors as a Smarty Object - if ($smarty) - $smarty->assign('form_validation',$error); - - return false; - } - - # Install the SQL - printf('- Module [%s] install SQL.
',$module); - if ($this->install_sql($module,$nodata)) { - # Loop through the sub-modules and install each of them - for ($i=0; $iinstall_sql($arr_s[$i],$nodata)) - return false; - - # Insert default data - if (! $nodata) - $this->install_sql_data($arr_s[$i]); - } - - } else - return false; - - if ($nodata) - return true; - - printf('- Module [%s] install DATA.
',$module); - # Insert default data - $this->install_sql_data($module); - - } else { - #printf('- Module [%s] failed install check.
',$module); - return false; - } - - # Update the current user's authentication so the update group access applies to them - global $C_auth; - if ($C_auth) - $C_auth->auth_update(); - - return true; - } - - /** - * Module installation checking - */ - public function install_error_check($VAR) { - global $smarty, $C_translate; - - # Core modules just install the database, so we'll return OK here. - if (isset($VAR['type']) && $VAR['type'] == 'core') - return true; - - $error = array(); - $module = isset($VAR['install_name']) ? trim($VAR['install_name']) : ''; - - # Check that the module name is defined - if (! trim($module)) - array_push($error,$C_translate->translate('install_enter_name','module','')); - - # Check that at least one group is defined: - if (! isset($VAR['module_group'])) - array_push($error,$C_translate->translate('install_select_group','module','')); - - # Check if the module already exists in the Database - $db = &DB(); - - $result = $db->Execute(sqlSelect($db,'module','name',array('name'=>$module))); - if ($result && $result->RecordCount() > 0) - array_push($error,$C_translate->translate('install_module_exists','module','')); - - $xml_construct = sprintf('%s%s/%s_install.xml',PATH_MODULES,$module,$module); - - # Check if the module exists in the file structure: - if (! is_dir(sprintf('%s%s',PATH_MODULES,$module))) - array_push($error,$C_translate->translate('install_missing_dir','module','')); - - if (! file_exists(sprintf('%s%s/%s.inc.php',PATH_MODULES,$module,$module)) && (! isset($VAR['no-class']) || ! $VAR['no-class'])) - array_push($error,$C_translate->translate('install_missing_class','module','')); - - if (! file_exists($xml_construct)) - array_push($error,$C_translate->translate('install_missing_construct','module','')); - - if (! file_exists(sprintf('%s%s/%s_install.xml',PATH_MODULES,$module,$module))) - array_push($error,$C_translate->translate('install_missing_install','module','')); - - if (count($error)) { - array_push($error,$C_translate->translate('install_failed','module','')); - - # Set the errors as a Smarty Object - if ($smarty) - $smarty->assign('form_validation',$error); - - #printf('Problem with: %s',$module); - #echo '
';print_r($error);
-			return false;
-		}
-
-		# Load the install XML file...
-		$C_xml = new CORE_xml;
-		$install = $C_xml->xml_to_array($xml_construct);
-		$this->install = $install;
-
-		# Get the module properties:
-		$name = $install['install']['module_properties']['name'];
-
-		if (isset($install['install']['module_properties']['parent']) && $install['install']['module_properties']['parent'] != $module)
-			$parent = $install['install']['module_properties']['parent'];
-		else
-			$parent = '';
-
-		# Get dependancies
-		if (isset($install['install']['module_properties']['dependancy']))
-			$dependancy = sprintf('%s,%s',$parent,$install['install']['module_properties']['dependancy']);
-		else
-			$dependancy = $parent;
-		$dependancy = preg_replace('/,$/','',$dependancy);
-
-		if ($dependancy) {
-			if (preg_match('/,/', $dependancy))
-				$depend = explode(',',$dependancy);
-			else
-				$depend = array($dependancy);
-
-			# Check to be sure the dependancies are installed:
-			for ($i=0; $i < count($depend); $i++) {
-				$result = $db->Execute(sqlSelect($db,'module','name',array('name'=>$depend[$i],'status'=>1)));
-
-				if (! $result || ($result && ! $result->RecordCount()))
-					array_push($error,sprintf(_('Module %s depends on %s, which is not installed?'),$module,$depend[$i]));
-			}
-		}
-
-		# check for error:
-		if (count($error)) {
-			array_push($error,$C_translate->translate('install_failed','module',''));
-
-			# Set the errors as a Smarty Object
-			if ($smarty)
-				$smarty->assign('form_validation',$error);
-			else {
-				printf('Problem with: %s',$module);
-				echo '
';print_r($error);
-			}
-
-			return false;
-		}
-
-		return true;
-	}
-
-	/**
-	 * Module SQL Install
-	 */
-	public function install_sql($module,$nodata=false) {
-		global $VAR,$smarty;
-
-		#printf('Installing Step 1: %s...
',$module); - - # Load the install XML file - $C_xml = new CORE_xml; - $xml = sprintf('%s%s/%s_install.xml',PATH_MODULES,$module,$module); - if (! is_file($xml)) - return false; - - $install = $C_xml->xml_to_array($xml); - - # Load the construct XML file - $C_xml = new CORE_xml; - $xml = sprintf('%s%s/%s_construct.xml',PATH_MODULES,$module,$module); - if (! is_file($xml)) - return false; - $construct = $C_xml->xml_to_array($xml); - - $db = &DB(); - $t = $db->MetaTables(); - - # Check that this Module has any db installation required - if (isset($construct['construct']['table']) && ! in_array(AGILE_DB_PREFIX.$construct['construct']['table'],$t)) { - # Create the module DB table - $table = $construct['construct']['table']; - - # Create the module DB fields - $arr_field = $construct['construct']['field']; - - # Loop through the fields to build the list: - $index_flds = ''; - while (list($key,$value) = each($arr_field)) { - $field = $key; - $t_s = $arr_field[$key]['type']; - - if (isset($arr_field[$key]['index'])) { - if (empty($index_flds)) - $index_flds .= $key; - else - $index_flds .= ','.$key; - } - - if (preg_match('/[(]/',$t_s)) { - $ts = explode('(',$t_s); - $type = $ts[0]; - $size = preg_replace('/[)]/','',$ts[1]); - $flds[] = array($field,$type,$size); - - } else { - $flds[] = array($field,$t_s); - } - } - - # Multi site? - if (DEFAULT_SITE==1) { - # Create the table & colums using the ADODB Data Dictionary functions - $dict = NewDataDictionary($db); - - $table_options = array('mysql' => 'TYPE=MyISAM'); - $sqlarray = $dict->CreateTableSQL(AGILE_DB_PREFIX.$table,$flds,$table_options); - $result = $db->Execute($sqlarray[0]); - - if ($result === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg().' '.print_r($sqlarray[0],true)); - - echo $db->ErrorMsg(); - - return false; - } - - # Create unique index on site_id,id (mysql specific) - $db->Execute(sprintf('CREATE UNIQUE INDEX IDS on %s%s (site_id,id)',AGILE_DB_PREFIX,$table)); - - # Create any custom indexes - if (isset($construct['construct']['index']) && count($construct['construct']['index'])) { - $new_indexes = $construct['construct']['index']; - while (list($index,$fields) = each($new_indexes)) { - $dict = NewDataDictionary($db); - - if (preg_match('/fulltext/',$index) && AGILE_DB_TYPE == 'mysql') - $sqlarray = $dict->CreateIndexSQL($index,AGILE_DB_PREFIX.$table,$fields,array('FULLTEXT')); - else - $sqlarray = $dict->CreateIndexSQL($index,AGILE_DB_PREFIX.$table,$fields); - - $db->Execute($sqlarray[0]); - } - } - } - } - - if ($nodata) - return true; - - #printf('Installing Step 2: %s...
',$module); - - # Get the module properties: - $menu_display = isset($install['install']['module_properties']['menu_display']) ? $install['install']['module_properties']['menu_display'] : ''; - $notes = isset($install['install']['module_properties']['notes']) ? $install['install']['module_properties']['notes'] : ''; - - # Get the parent module... - $db = &DB(); - $module_id = $db->GenID(AGILE_DB_PREFIX.'module_id'); - - if (isset($install['install']['module_properties']['parent'])) { - $result = $db->Execute(sqlSelect($db,'module','id',array('name'=>$install['install']['module_properties']['parent']))); - - # Error checking - if ($result === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - return false; - } - - if (! trim($result->fields['id'])) - $parent_id = $module_id; - else - $parent_id = $result->fields['id']; - - } else { - $parent_id = $module_id; - } - - /* Create the module record, & get the module ID - * get the ID of the parent, and create it as child if needed... - * else the record is a child of itself... */ - - $result = $db->Execute(sqlInsert($db,'module',array( - 'name'=>$module, - 'parent_id'=>$parent_id, - 'notes'=>$notes, - 'status'=>1, - 'menu_display'=>$menu_display, - 'date_orig'=>time(), - 'date_last'=>time()),$module_id) - ); - - #printf('Installing Step 3: %s...
',$module); - - # Create the module_method records, and get the ID for each one - if (isset($install['install']['module_method'])) - $methods = $install['install']['module_method']; - else - $methods = $install['install']['sql_inserts']['module_method']; - - if (! empty($methods) && is_array($methods)) { - while (list($key,$value) = each($methods)) { - $name = $key; - $method_id = $db->GenID(AGILE_DB_PREFIX.'module_method_id'); - $notes = isset($methods[$key]['notes']) ? $methods[$key]['notes'] : ''; - $page = isset($methods[$key]['page']) ? $methods[$key]['page'] : ''; - $menu_display = isset($methods[$key]['menu_display']) ? 1 : 0; - - $result = $db->Execute(sqlInsert($db,'module_method',array( - 'name'=>$name, - 'module_id'=>$module_id, - 'notes'=>$notes, - 'page'=>$page, - 'menu_display'=>$menu_display - ),$method_id)); - - # Error checking - if ($result === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - return false; - } - - #printf('Installing Step 4: %s:%s...
',$module,$name); - - /* Create the group_method records, with the ID from each - * of the above methods... - * Get the groups to add to (FROM THE install.tpl form!) */ - for ($i=0; $iExecute(sqlInsert($db,'group_method',array('method_id'=>$method_id,'module_id'=>$module_id,'group_id'=>$VAR['module_group'][$i]))); - - # Error checking - if ($result === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - - return false; - } - } - } - } - - printf('Finished %s...
',$module); - - # All done! - return true; - } - - /** - * Install Default Data - */ - public function install_sql_data($module) { - # Check the file - $f = sprintf('%s%s/%s_install_data.xml',PATH_MODULES,$module,$module); - - if (is_file($f)) { - # open the XML backup file: - $C_xml = new CORE_xml; - $backup = $C_xml->xml_to_array($f); - - $db = &DB(); - $arr = $backup['install']; - - # Loop through each table in this array - if (is_array($arr)) { - while (list($table,$records) = each($arr)) { - $runsql = false; - $sqls = sprintf('INSERT INTO %s%s SET ',AGILE_DB_PREFIX,$table); - - if (is_array($records)) { - $sql = ''; - $sqlcount = 0; - - # Loop through each of the fields for this module - while (list($fld,$val) = each($records)) { - if (is_array($val)) { - $sql = ''; - $sqlcount = 0; - - # Loop through each of the fields for this module - while (list($fld2,$val2) = each($val)) { - if ($sqlcount != 0) - $sql .= ', '; - - $sql .= $fld2 .' = '.$db->qstr($val2); - $sqlcount++; - } - - $result = $db->Execute(sprintf('%s %s',$sqls,$sql)); - - } else { - if ($sqlcount != 0) - $sql .= ', '; - - $sql .= sprintf('%s = %s',$fld,$db->qstr($val)); - $sqlcount++; - $runsql = true; - } - - } - - if ($runsql) { - $result = $db->Execute(sprintf('%s %s',$sqls,$sql)); - - if ($result === false) - @$this->error .= sprintf('
%s %s',$sqls,$sql); - } - } - } - } - } - } - - /** - * Check Version - */ - public function remote_version_check($VAR) { - global $C_auth; - if (! $C_auth->auth_method_by_name('module','upgrade')) - return false; - - if(is_file(PATH_AGILE.'Version.txt')) - $f['version']=trim(file_get_contents(PATH_AGILE.'VERSION')); - else - $f['version']='SVN'; - - $f['license']=LICENSE_KEY; - $f['php']=phpversion(); - $f['mysql']=mysql_get_client_info(); - $f['os']=$_ENV['OS']; - $f['proc']=$_ENV['PROCESSOR_ARCHITECTURE']; - $f['arch']=$_ENV['PROCESSOR_ARCHITEW6432']; - $f['server']=$_SERVER["SERVER_SOFTWARE"]; - global $smarty; - $smarty->assign('send', $f); - } - - /** OLD FUNCTIONS **/ - - ### Get remote hash file and check for inconsitancys in local files - function remote_update($VAR) - { - $ver = $VAR['ver']; - $mis=0; - $md5=0; - $i=0; - $msg = ''; - - # Get the core modules & compare - if(defined('DEMO_VERSION')) - $url_core = 'http://agileco.com/downloads/trial/'.$ver.'.hash.txt'; - else - $url_core = 'http://agileco.com/downloads/commercial/'.$ver.'.hash.txt'; - - @$data = file_get_contents($url_core); - if(empty($data)) { - $msg .= 'Failed to retrieve MD5 Hash file at http://agileco.com/downloads/commercial/'.$ver.'.hash.txt...
'; - } else { - $arr = explode("|",$data); - foreach($arr as $arx) - { - $rx = explode(',',$arx); - @$ar['name'] = $rx[1]; - @$ar['md5'] = $rx[0]; - if(!empty($ar['name']) && !empty($ar['md5']) && - !ereg("^install/", $ar['name']) && - !ereg("^test.php", $ar['name'])) - { - if(!is_file(PATH_AGILE.$ar["name"])) - { - $core_mis[] = $ar["name"]; - $mis++; - } - elseif(md5_file(PATH_AGILE.$ar["name"]) != $ar["md5"]) - { - $core_md5[] = $ar["name"]; - $md5++; - } - } - $i++; - } - $smart[] = array ('name' => 'Core', 'md5' => @$core_md5, 'mis' => @$core_mis ); - } - - - ### Get each optional module && compare - if(!defined('DEMO_VERSION')) - { - @$modules = $VAR["module"]; - foreach($modules as $module) - { - $data = ''; - @$data = file_get_contents('http://agileco.com/downloads/commercial/'.$module.'.hash.txt'); - if(empty($data)) { - $msg .= 'Failed to retrieve MD5 Hash file at http://agileco.com/downloads/commercial/'.$module.'.hash.txt...
'; - } else { - $arr = explode("|",$data); - foreach($arr as $arx) - { - $rx = explode(',',$arx); - @$ar['name'] = $rx[1]; - @$ar['md5'] = $rx[0]; - - # check if file exists locally... - if(!empty($ar['name']) && !empty($ar['md5']) ) - { - if(!is_file(PATH_AGILE.$ar["name"])) - { - $f_mis[] = $ar["name"]; - $mis++; - } - elseif(md5_file(PATH_AGILE.$ar["name"]) != $ar["md5"]) - { - $f_md5[] = $ar["name"]; - $md5++; - } - } - $i++; - } - - $smart[] = array ('name' => $module, 'md5' => @$f_md5, 'mis' => @$f_mis ); - unset($f_mis); - unset($f_md5); - } - } - } - - global $smarty; - $smarty->assign('modules', $smart); - $smarty->assign('md5', $md5); - $smarty->assign('mis', $mis); - - if(!empty($msg)) { - global $C_debug; - $C_debug->alert($msg); - } - } - - - - ############################## - ## TRANSLATE ## - ############################## - function translate($VAR) - { - if(!isset($VAR['translate_language']) || !isset($VAR['translate_module'])) - { - echo "error!"; - return; - } - - if($VAR['translate_module'] == "") - { - echo "error!"; - return; - } - - # Get the default language file: - if(!$file = fopen(PATH_LANGUAGE . '' . - $VAR["translate_module"] . - "/english_" . $VAR["translate_module"] . - ".xml", "r")) - { - echo 'Unable to open base translation!'; - } - else - { - $systran_text=''; - while(!feof($file)) - { - $systran_text .= fgetc($file); - } - } - fclose($file); - - - for($i=0; $isystran($systran_text,$systran_lp)); - - # write the language packs - $file = fopen(PATH_LANGUAGE . '' . $VAR["translate_module"] . "/".$language."_" . $VAR["translate_module"] . ".xml", "w+"); - fputs($file, $language_xml); - fclose($file); - } - } - } - - - ############################## - ## SYSTRAN TRANSLATION ## - ############################## - function systran($text, $lang) - { - $systran_id = "SystranSoft-en"; - $systran_charset = "ISO-8859-1"; - - $host = 'systranbox.com'; - $form = '/systran/box'; - $pass = array( - 'systran_id' => $systran_id, - 'systran_charset' => $systran_charset, - 'systran_lp' => $lang, - 'systran_text' => $text - ); - - // CREATE THE RECORD - require_once(PATH_CORE . 'post.inc.php'); - $post= new CORE_post; - $result = $post->post_data($host, $form, $pass); - $pat = "\n"; - $arr = explode($pat, $result); - - $ret=''; - for($i=0; $i5) $ret.= $arr[$i]; - - return $ret; - } - - - ############################## - ## DELETE ## - ############################## - function delete($VAR) { - # set the core modules: - $core = $this->core_mods; - - if(isset($VAR["delete_id"])) - $id = explode(',',$VAR["delete_id"]); - elseif (isset($VAR["id"])) - $id = explode(',',$VAR["id"]); - - for($i=0; $ixml_to_array($xml_construct); - - - ### Check that this Module has any db installation required... - if(DEFAULT_SITE==1 && isset($construct["construct"]["table"])) - { - ### Create the module DB table - $table = $construct["construct"]["table"]; - $db = &DB(); - $dict = NewDataDictionary($db); - $sql = $dict->DropTableSQL(AGILE_DB_PREFIX.''.$table); - $db->Execute($sql[0]); - - $table = $construct["construct"]["table"].'_id'; - $sql = $dict->DropTableSQL(AGILE_DB_PREFIX.''.$table); - $db->Execute($sql[0]); - } - } - } - } - - /** - * Module upgrader - * - * This function will update the schema if required - */ - public function upgrade($VAR) { - if (! isset($VAR['module_name']) || ! isset($VAR['module_group'])) { - echo 'You must select both the module(s) to upgrade and the groups to grant access to new methods to.'; - return; - } - - $module_count = 0; - $method_count = 0; - $fields_count = 0; - $method_new_count = 0; - $fields_new_count = 0; - - # Loop through each module - $modules = $VAR['module_name']; - - for($i=0; $iExecute(sqlSelect($db,'module','*',sprintf('id=::%s:: OR name=::%s::',$modules[$i],$modules[$i]))); - $module_name = $db_module->fields['name']; - $module_id = $db_module->fields['id']; - - # Update the Methods from the _install.xml file get the install xml file - $install_xml = sprintf('%s%s/%s_install.xml',PATH_MODULES,$module_name,$module_name); - if (is_file($install_xml)) { - $C_xml = new CORE_xml; - $methods = $C_xml->xml_to_array($install_xml); - - $methods = $methods['install']['sql_inserts']['module_method']; - - # loop through the methods - if (is_array($methods)) { - while (list($key,$value) = each($methods)) { - # Increment method count - $method_count++; - - # See if this method exists - $method_db = $db->Execute(sqlSelect($db,'module_method','*',array('name'=>$key,'module_id'=>$module_id))); - if ($method_db === false) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - - if ($method_db->RecordCount() == 0) { - # Increment method count - $method_new_count++; - - # Add this method - @$notes = $methods[$key]['notes']; - @$page = $methods[$key]['page']; - @$menu_display = $methods[$key]['menu_display']; - - $method_id = sqlGenID($db,'module_method'); - $fields=array('name'=>$key,'module_id'=>$module_id,'notes'=>$notes,'page'=>$page,'menu_display'=>$menu_display); - $db->Execute(sqlInsert($db,'module_method',$fields,$method_id)); - - if ($result === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - - # Create the group_method records, with the ID from each - for ($ii=0; $iiExecute(sqlInsert($db,'group_method',array('method_id'=>$method_id,'module_id'=>$module_id,'group_id'=>$VAR['module_group'][$ii]))); - - if ($result === false) { - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - } - } - } - } - } - - # Update the DB Fields from the _construct.xml file get the install xml file - $construct_xml = sprintf('%s%s/%s_construct.xml',PATH_MODULES,$module_name,$module_name); - if (is_file($construct_xml)) { - $C_xml = new CORE_xml; - $construct = $C_xml->xml_to_array($construct_xml); - - @$fields = $construct['construct']['field']; - - # Check that this Module has any db installation required... - if (! empty($construct['construct']['table']) && $construct['construct']['table'] == $module_name) { - # Create the module DB table - $table = $construct['construct']['table']; - $db = &DB(); - $db_fields = $db->MetaColumns(AGILE_DB_PREFIX.$table,true); - - # Create the module DB fields - $arr_field = $construct['construct']['field']; - - # Loop through the fields to build the list: - $flds = array(); - while (list($key,$value) = each($arr_field)) { - $field = $key; - $FIELD = strtoupper($key); - if (! isset($db_fields[$FIELD])) { - # Increment field count - $fields_new_count++; - - $t_s = $arr_field[$key]['type']; - - if (preg_match('/[(]/',$t_s)) { - $ts = explode('(',$t_s); - $type = $ts[0]; - $size = preg_replace('/[)]/','',$ts[1]); - array_push($flds,array($field,$type,$size)); - - } else { - array_push($flds,array($field,$t_s)); - } - } - } - - # Add any new columns: - if (count($flds)) { - $dict = NewDataDictionary($db); - $sqlarray = $dict->AddColumnSQL(AGILE_DB_PREFIX.$table,$flds); - $result = $db->Execute($sqlarray[0]); - if ($result === false) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - echo $db->ErrorMsg(); - } - } - - # Remove any unused columns - $flds = array(); - while (list ($key,$value) = each($db_fields)) { - $fieldname = strtolower($key); - - if (! isset($construct['construct']['field'][$fieldname])) - array_push($flds,$key); - - } - - if (count($flds)) { - $dict = NewDataDictionary($db); - $sqlarray = $dict->DropColumnSQL(AGILE_DB_PREFIX.$table,$flds); - $result = $db->Execute($sqlarray[0]); - if ($result === false) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - echo $db->ErrorMsg(); - } - } - - # Update Indexes - - # Get old database indexes - $dict = NewDataDictionary($db); - $oldindex = $dict->MetaIndexes(AGILE_DB_PREFIX.$table); - - # check if the 'site_id' index exists: - if (! empty($oldindex['site_id']) && $oldindex['site_id'] = 'id,site_id') { - $dict = NewDataDictionary($db); - $sqlarray = $dict->DropIndexSQL('site_id',AGILE_DB_PREFIX.$table); - $db->Execute($sqlarray[0]); - } - - # check that that UNIQUE index for site_id,id exists - if (empty($oldindex['IDS']) || $oldindex['IDS']['unique'] != 1) { - $db->Execute(sprintf('ALTER TABLE %s DROP PRIMARY KEY',AGILE_DB_PREFIX.$table)); - $db->Execute(sprintf('CREATE UNIQUE INDEX IDS ON %s (site_id,id)',AGILE_DB_PREFIX.$table)); - } - - $dict = NewDataDictionary($db); - $oldindex = $dict->MetaIndexes(AGILE_DB_PREFIX.$table); - - # Current construct invoices - if(@$new_indexes = $construct['construct']['index']) { - while (list($index,$fields) = each($new_indexes)) { - if (is_array(@$oldindex[$index])) { - # Already exists - compare fields: - $oldfields = implode(',',$oldindex[$index]['columns']); - - if ($oldfields != $fields) { - # Index changed - drop: - $dict = NewDataDictionary($db); - $sqlarray = $dict->DropIndexSQL($index,AGILE_DB_PREFIX.$table); - $db->Execute($sqlarray[0]); - - # create index - $dict = NewDataDictionary($db); - - if (preg_match('/fulltext/',$index) && AGILE_DB_TYPE == 'mysql') - $sqlarray = $dict->CreateIndexSQL($index,AGILE_DB_PREFIX.$table,$fields,array('FULLTEXT')); - else - $sqlarray = $dict->CreateIndexSQL($index,AGILE_DB_PREFIX.$table,$fields); - - $db->Execute($sqlarray[0]); - } - - } else { - # Index does not exist - create! - $dict = NewDataDictionary($db); - - if (preg_match('/fulltext/',$index) && AGILE_DB_TYPE == 'mysql') - $sqlarray = $dict->CreateIndexSQL($index,AGILE_DB_PREFIX.$table,$fields,array('FULLTEXT')); - else - $sqlarray = $dict->CreateIndexSQL($index,AGILE_DB_PREFIX.$table,$fields); - - $db->Execute($sqlarray[0]); - } - } - - # Check for removed indexes: - if (! empty($oldindex)) { - reset($oldindex); - - while (list($index,$fields) = each($oldindex)) { - if (! isset($new_indexes[$index]) && $index != 'IDS') { - $dict = NewDataDictionary($db); - $sqlarray = $dict->DropIndexSQL($index,AGILE_DB_PREFIX.$table); - $db->Execute($sqlarray[0]); - } - } - } - - } else { - # Remove all old indexes - if (! empty($oldindex)) { - reset($oldindex); - - while (list($index,$fields) = each($oldindex)) { - if($index != 'IDS') { - $dict = NewDataDictionary($db); - $sqlarray = $dict->DropIndexSQL($index,AGILE_DB_PREFIX.$table); - $db->Execute($sqlarray[0]); - } - } - } - } - } - } - } - - $msg = sprintf('Successfully checked %s module(s), %s method(s), and %s db fields.
Added %s method(s) and %s db field(s).', - $module_count,$method_count,$fields_count,$method_new_count,$fields_new_count); - - if (! empty($fields_new_count) > 0) { - global $smarty; - - if (is_object($smarty)) - $smarty->assign('js',''); - else - echo ''; - } - - - # Display the message. - global $C_debug; - - if (is_object($C_debug)) - $C_debug->alert($msg); - else - echo $msg; - - # update the current user's authentication so the update group access applies to them - global $C_auth; - - if (is_object($C_auth)) - $C_auth->auth_update(); - } - - - # Create the install XML file for specified modules - function dev_install_gen($VAR) - { - - # loop through each module passed... - include_once('dev.inc.php'); - $db = &DB(); - - if(is_array($VAR['module'])) - { - for($ix = 0; $ixdev_inst_excl); $i++) - { - if ( $this->dev_inst_excl[$i] == $result->fields['name']) - { - $do = false; - } - } - - if ($do) - { - # update/create the {$module}_install_data.xml file data - $xml = dev_install_xml_data($result->fields['name'],$result->fields['id']); - } - else - { - /* - $xml = ''; - $xml .= ' - -'; - */ - $xml = false; - } - - # write the file - if($xml != false) - { - $file = fopen(PATH_MODULES . '' . $result->fields['name'] . '/'. $result->fields['name'] . "_install_data.xml", "w+"); - fputs($file, $xml); - fclose($file); - } - - # next module - $result->MoveNext(); - } - } - } - } - - - - # add a new module construct - function dev_add($VAR) - { - - # check if the needed directories exist & attempt to create... - - if (!is_dir(PATH_MODULES . '' . $VAR["module"])) { - echo "
Path does not exist, attempting to create: ".PATH_MODULES . '' . $VAR["module"]; - if(!mkdir(PATH_MODULES . '' . $VAR["module"])) { - echo "

Error: Module creation failed, please check path permissions...
"; - return false; - } - } - - if (!is_dir(PATH_LANGUAGE . '' . $VAR["module"])) { - echo "
Path does not exist, attempting to create: ".PATH_LANGUAGE . '' . $VAR["module"]; - if(!mkdir(PATH_LANGUAGE . '' . $VAR["module"])) { - echo "

Error: Module creation failed, please check path permissions...
"; - return false; - } - } - - - if (!is_dir(PATH_THEMES . 'default/blocks/' . $VAR["module"])) { - echo "
Path does not exist, attempting to create: ".PATH_THEMES . 'default/blocks/' . $VAR["module"]; - if(!mkdir(PATH_THEMES . 'default/blocks/' . $VAR["module"])) { - echo "

Error: Module creation failed, please check path permissions...
"; - return false; - } - } - - - # include the dev functions: - include('dev.inc.php'); - - $construct_xml = dev_construct_xml($VAR); - # write the consruct XML - $file = fopen(PATH_MODULES . '' . $VAR["module"] . '/'. $VAR["module"] . "_construct.xml", "w+"); - fputs($file,$construct_xml); - fclose($file); - - - $construct_php = dev_construct_php($VAR); - # write the construct PHP - $file=fopen(PATH_MODULES . '' . $VAR["module"] . '/'. $VAR["module"] . ".inc.php", "w+"); - fputs($file,$construct_php); - fclose($file); - - - $language_xml = dev_language_xml($VAR); - # write the language packs - $file=fopen(PATH_LANGUAGE . '' . $VAR["module"] . "/english_" . $VAR["module"] . ".xml", "w+"); - fputs($file, $language_xml); - fclose($file); - - - $install_xml = dev_install_xml($VAR); - # write the language packs - $file = fopen(PATH_MODULES . '' . $VAR["module"] . '/'. $VAR["module"] . "_install.xml", "w+"); - fputs($file, $install_xml); - fclose($file); - - - # generate the main block - $main_tpl = dev_block_main($VAR); - # write the block - $file = fopen(PATH_THEMES . 'default/blocks/' . $VAR["module"] . "/main.tpl", "w+"); - fputs($file, $main_tpl); - fclose($file); - - # generate the add block - $add_tpl = dev_block_add($VAR); - # write the block - $file = fopen(PATH_THEMES . 'default/blocks/' . $VAR["module"] . "/add.tpl", "w+"); - fputs($file, $add_tpl); - fclose($file); - - # generate the view block - $view_tpl = dev_block_view($VAR); - # write the block - $file = fopen(PATH_THEMES . 'default/blocks/' . $VAR["module"] . "/view.tpl", "w+"); - fputs($file, $view_tpl); - fclose($file); - - # generate the search_form block - $search_form_tpl = dev_block_search_form($VAR); - # write the block - $file = fopen(PATH_THEMES . 'default/blocks/' . $VAR["module"] . "/search_form.tpl", "w+"); - fputs($file, $search_form_tpl); - fclose($file); - - # generate the search_show block - $search_show_tpl = dev_block_search_show($VAR); - # write the block - $file = fopen(PATH_THEMES . 'default/blocks/' . $VAR["module"] . "/search_show.tpl", "w+"); - fputs($file, $search_show_tpl); - fclose($file); - } -} -?> diff --git a/modules/module/module_construct.xml b/modules/module/module_construct.xml deleted file mode 100644 index 70da6731..00000000 --- a/modules/module/module_construct.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - module - - module
- - module,account - - 0 - - name - - 25 - - 0 - - - - parent_id - menu_display - status,menu_display - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - - Active - L - - - Parent - I4 - 1 - - - Name - C(128) - 3 - 128 - any - 1 - - - Notes - X2 - - - Menu - Display on Menu - L - - - - - - name,notes,status,date_orig,date_last,menu_display,parent_id - notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status - id,name,notes,status,date_orig,date_last,menu_display,parent_id - id,name,notes,status,date_orig,date_last,menu_display,parent_id - - - - - - module:method - module:method - - - - - - <add>Add Module</add> - <install>Install Module</install> - - - - - - - id - checkbox - 25px - - - name - - - notes - - - status - bool_icon - 20px - - - -
diff --git a/modules/module/module_install.xml b/modules/module/module_install.xml deleted file mode 100644 index 9aa03dbf..00000000 --- a/modules/module/module_install.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - Modules - - 1 - - module - - - - setup - - - - core - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_show - - - - update - - - - view - - - - dev_add - 1 - - - failure - - - Install - install - - - 1 - - - translate - - - dev_install_gen - - - Upgrade - upgrade - - 1 - - - remote_update - - - diff --git a/modules/module_method/module_method.inc.php b/modules/module_method/module_method.inc.php deleted file mode 100644 index ba10385b..00000000 --- a/modules/module_method/module_method.inc.php +++ /dev/null @@ -1,202 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Method - */ - -/** - * The main AgileBill Module Method Class - * - * @package AgileBill - * @subpackage Module:Method - */ -class module_method extends OSB_module { - /** - * View methods - */ - public function view_methods($VAR) { - $type = 'search'; - $this->method[$type] = explode(',',$this->method[$type]); - $db = new CORE_database; - - $this->this_search_show($VAR,$this,$type); - } - - ############################## - ## VIEW METHODS p.2 ##### - ############################## - function this_search_show($VAR,$construct,$type) { - global $VAR; - - # Get the list of parents for this group - $this->group_parent_list($VAR['module_method_group_id']); - - # Generate the full query - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'module_method','*',array('module_id'=>$VAR['module_method_module_id']))); - - # Put the results into a smarty accessable array - $i = 0; - $class_name = true; - - while (! $result->EOF) { - $smart[$i] = $result->fields; - $method_id = $smart[$i]['id']; - - # Get the auth status for this method & group - $resulta = $db->Execute(sqlSelect($db,'group_method','id',array('method_id'=>$smart[$i]['id'],'group_id'=>$VAR['module_method_group_id']))); - - # Authorized by current group - if ($resulta->RecordCount() >= 1) { - $smart[$i]['checked'] = '1'; - - } else { - # Get the parent group id(s) for this group - $match = false; - for ($ii=0; $ii < count($this->group); $ii++) { - if ($match == false && $this->group[$ii] != $VAR['module_method_group_id']) { - $resultb = $db->Execute(sqlSelect($db,'group_method','id',array('method_id'=>$method_id,'group_id'=>$this->group[$ii]))); - - if ($resultb->RecordCount() >= 1) - $match = true; - } - } - - # authorized by parent - if ($match) - $smart[$i]['checked'] = '2'; - else - $smart[$i]['checked'] = '3'; - } - - if ($class_name) { - $smart[$i]['_C'] = 'row2'; - $class_name = false; - - } else { - $smart[$i]['_C'] = 'row1'; - $class_name = true; - } - - $result->MoveNext(); - $i++; - } - - # get any linked fields - if ($i > 0) { - $db_join = new CORE_database; - $this->result = $db_join->join_fields($smart, $this->linked); - } else { - $this->result = $smart; - } - - # get the result count: - $results = $result->RecordCount(); - # define the DB vars as a Smarty accessible block - global $smarty; - # define the results - $smarty->assign($construct->table,$this->result); - $smarty->assign('page',$VAR['page']); - $smarty->assign('order',1111); - $smarty->assign('sort',1111); - $smarty->assign('limit',1111); - $smarty->assign('search_id',1111); - $smarty->assign('results',$results); - - # get the total pages for this search: - $this->pages = 1; - if ($search->results % $search->limit) - $this->pages++; - - # total pages - $smarty->assign('pages',$this->pages); - # current page - $smarty->assign('page',$current_page); - $page_arr = ''; - for ($i=0; $i <= $this->pages; $i++) - if ($this->page != $i) - $page_arr[] = $i; - - # page array for menu - $smarty->assign('page_arr',$page_arr); - } - - /** - * Get any inherited groups (parent) for a specified group - * @return void - * @since Version 1.0 - * @param int Group Id - */ - function group_parent_list($group) { - # check if this group is a child with an active parent - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'group','id,parent_id',array('id'=>$group))); - - # error handling - if ($result === false) { - global $C_debug; - - $C_debug->error(__FILE__,__METHOD__,$db->ErrorMsg()); - } - - # loop through the results - while (! $result->EOF) { - # add this group to the list - $this->group[] = $result->fields['id']; - - # get inherited groups and check that the associated - # group is active before adding to the list of authorized groups. - if ($result->fields['parent_id'] != 0) - $this->group_parent_list($result->fields['parent_id']); - - # move to next record - $result->MoveNext(); - } - } - - /** - * Mass add methods to a specific group - * @return void - * @since Version 1.0 - * @param int Group Id - */ - function update_relations() { - global $VAR; - $db = &DB(); - - if (isset($VAR['id']) && $VAR['id'] != '') - $arr = explode(',',$VAR['id']); - else - return; - - for ($i=0; $iExecute(sqlDelete($db,'group_method',array('module_id'=>$VAR['module_method_module_id'],'group_id'=>$VAR['module_method_group_id']))); - - if ($arr[$i] == 0) - return; - - $db->Execute(sqlInsert($db,'group_method',array('method_id'=>$arr[$i],'module_id'=>$VAR['module_method_module_id'],'group_id'=>$VAR['module_method_group_id']))); - } - } -} -?> diff --git a/modules/module_method/module_method_construct.xml b/modules/module_method/module_method_construct.xml deleted file mode 100644 index b33058d4..00000000 --- a/modules/module_method/module_method_construct.xml +++ /dev/null @@ -1,107 +0,0 @@ - - - - module_method - - module_method
- - module - - 0 - - name - - 25 - - 1 - - - - module_id - menu_display - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - Module - I4 - module - name - any - 1 - - - Name - C(64) - 1 - 64 - non_numeric - - - - C2(128) - - - 1 - C(128) - - - Menu - L - - - - - - module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - id,site_id,module_id,name,notes,page,menu_display - - - - - - - - <add>Add Method</add> - <update_relations>Update Authorisation</update_relations> - <view>Methods</view> - - - - - - - id - checkbox - 25px - - - name - - - module_id - - - menu_display - bool - 15px - - - -
diff --git a/modules/module_method/module_method_install.xml b/modules/module_method/module_method_install.xml deleted file mode 100644 index e58b8bc4..00000000 --- a/modules/module_method/module_method_install.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - 0 - - module_method - - - - module - - - - core - - - - - - add - - - - delete - - - - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - view_methods - - - - update_relations - - - diff --git a/modules/net_term/net_term.inc.php b/modules/net_term/net_term.inc.php deleted file mode 100644 index 2b45a7d5..00000000 --- a/modules/net_term/net_term.inc.php +++ /dev/null @@ -1,345 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Invoice - */ - -/** - * The main AgileBill Net Term Class - * - * @package AgileBill - * @subpackage Modules:Invoice - */ -class net_term extends OSB_module { - var $taxable=1; # @todo (to move to net_term) are late fees taxable? 0/1 - - # Does this term period determine that the service should be suspended - private $toSuspend = false; - # Does this term period determine that the invoice should be sent - private $sendInv = false; - # Which notice number should be sent. - private $notice = false; - # Should we send the final notice - private $lastNotice = false; - - private function getTermDetails($tid) { - static $CACHE = array(); - - if (! isset($CACHED[$tid])) { - $db = &DB(); - $CACHED[$tid] = $db->Execute(sqlSelect($db,'net_term','*',sprintf('status=1 AND id=%s',$tid))); - } - - return $CACHED[$tid]; - } - - /** - * Set the TermID of this object - * From this we can work out if what interval this is - * @return boolean true if this term is valid, false if not valid - */ - public function checkTermDetails($tid,$date,$prepaid=false) { - # If date > today and prepaid, then suspend - if ($prepaid && time()-$date > 0) { - $this->toSuspend = true; - - return true; - } - - $rs = $this->getTermDetails($tid); - if ($rs && $rs->RecordCount()==1) { - $terms = explode(',',$rs->fields['terms']); - sort($terms); - - # If the date is outside the first term date, then we'll return here - if (time()-$date < $terms[0]*86400) - return false; - - $c = -1; - foreach ($terms as $i => $d) { - $dd = time()-$d*86400; - - # If this is prepaid, is this our last notice? - if ($prepaid && (isset($terms[$i+1]) && (time()-$date > $terms[$i+1]*86400))) { - $this->lastNotice = true; - break; - } - - # If we matched a term period, we need to exit - if ($date >= $dd || ($prepaid && $d > 0)) - break; - $c++; - } - - if ($this->lastNotice) - return true; - - # If we went 1 loop only, then this must be the first match and thus an invoice needs to go out. - if ($c==0) - $this->sendInv = true; - # If we came out with no matches, then we must be in the suspend time - elseif ((! $prepaid && ($date < $dd)) || ($prepaid && $d > 0)) - $this->toSuspend = true; - else - $this->notice = $c; - - return true; - } - - return false; - } - - /** - * Return if this term deterimes that the service should be suspended. - */ - public function getSuspend() { - return $toSuspend; - } - - /** - * Return if this term deterimes that the invoice should be generated. - */ - public function sendInvoice() { - return $sendInv; - } - - /** - * Return the notice number - */ - public function getNoticeNumber() { - return $this->notice; - } - - /** - * Get an array of the term dates, including invoice creation and suspension - * - * Optionally pass the invoice created date. - */ - public function getTermDates($id,$created=null,$due=null) { - $td = array(); - $db = &DB(); - - $query = $db->Execute(sqlSelect($db,'net_term','terms',sprintf('id=%s',$id))); - if ($query && $query->RecordCount()) { - $terms = explode(',',$query->fields['terms']); - sort($terms); - - if (is_null($due)) - $due = time(); - - if (! is_null($created)) - array_push($td,array('date'=>$created,'desc'=>'Invoice Created')); - - $duedate = false; - foreach ($terms as $index => $days) { - if ($created && $created >= $due+$days*86400) - continue; - - if (! $duedate && $days>0) - array_push($td,array('date'=>$due-$days*86400,'desc'=>'Invoice Due')); - - if ($days == 0) { - $desc = 'Invoice Due'; - $duedate = true; - } elseif ($index == 0 && ! count($td)) - $desc = 'Invoice Created'; - elseif ($index == count($terms)-1) - $desc = 'Service Suspension'; - else - $desc = 'Notice'; - - array_push($td,array('date'=>$due+$days*86400,'desc'=>$desc)); - $i++; - } - } - - return $td; - } - - # Check usergroup&checkout plugin to determin if net terms available (get best) - public function termsAllowed($account_id,$checkout_plugin_id) { - $db=&DB(); - $rs=&$db->Execute($sql=sqlSelect($db,"net_term","*","status=1 AND checkout_id=$checkout_plugin_id","fee ASC")); - if($rs && $rs->RecordCount() > 0) { - global $C_auth; - while(!$rs->EOF) { - $availarr = unserialize($rs->fields['group_avail']); - if(is_array($availarr)) { - foreach($availarr as $g) { - if($C_auth->auth_group_by_account_id($account_id,$g)) return $rs->fields['id']; - } - } - } - } - return 0; - } - - # Task to generate late charges & insert into charge module: - function task($VAR) { - require_once(PATH_MODULES.'email_template/email_template.inc.php'); - require_once(PATH_MODULES.'invoice/invoice.inc.php'); - $invoice = new invoice; - - # get active net terms - $db=&DB(); - $rs=&$db->Execute($sql=sqlSelect($db,"net_term","*","status=1")); - if($rs && $rs->RecordCount() > 0) - { - // loop through net terms - while(!$rs->EOF) - { - $id = $rs->fields['id']; - $last_interval = mktime(0,0,0,date('m'), date('d')-$rs->fields['terms'], date('Y')); - - $i=&$db->Execute($sql=sqlSelect($db,"invoice", - "id,account_id,total_amt,billed_amt,due_date,net_term_date_last,net_term_intervals", - "net_term_id = $id AND - (suspend_billing = 0 OR suspend_billing IS NULL) AND - (billing_status = 0 OR billing_status IS NULL) AND - due_date <= $last_interval AND - net_term_date_last <= $last_interval")); - if($i && $i->RecordCount() > 0) - { - - - - // loop through invoices - while(!$i->EOF) - { - $terms = $rs->fields['terms']; - echo "
" . $start_interval = $i->fields['net_term_date_last']; - echo "
" . $stop_interval = $start_interval+(86400*$terms); - - echo "
". date(UNIX_DATE_FORMAT,$start_interval); - - // charge or suspend? - if(!empty($i->fields['net_term_intervals']) && $rs->fields['suspend_intervals'] < $i->fields['net_term_intervals']) { - - // suspend invoice - $arr['id'] = $i->fields['id']; - $na =& $invoice->voidInvoice($arr,$invoice); - - // suspend billing status - $fields=Array('suspend_billing'=>1); - $db->Execute($sql=sqlUpdate($db,"invoice",$fields,"id = {$i->fields['id']}")); - - // send suspend e-mail - if($rs->fields['enable_emails']) { - $email = new email_template; - $email->send('net_term_suspend', $i->fields['account_id'], $i->fields['id'], $rs->fields['suspend_intervals'], $i->fields['net_term_intervals']); - } - } - else - { - // calc late fee - if($rs->fields['fee_type'] == 2) - $fee = $rs->fields['fee']; - elseif($rs->fields['fee_type'] == 1) - $fee = ($i->fields['total_amt'] - $i->fields['billed_amt']) * $rs->fields['fee']; - - // create late charge - if($fee>0) - { - $fields=Array( 'date_orig'=> time(), - 'status'=> 0, - 'account_id'=> $i->fields['account_id'], - 'amount'=> $fee, - 'sweep_type'=> $rs->fields['sweep_type'], - 'taxable'=> $this->taxable, - 'quantity' => 1, - 'attributes'=> "Name=={$rs->fields['name']}\r\nInterval==".date(UNIX_DATE_FORMAT,$start_interval)." - ".date(UNIX_DATE_FORMAT,$stop_interval), // todo: translate - 'description'=> $rs->fields['sku']); - $db->Execute($sql=sqlInsert($db,"charge",$fields)); - - // update invoice - $_fields['net_term_intervals'] = $i->fields['net_term_intervals']+1; - $_fields['net_term_date_last'] = $stop_interval; - $db->Execute($sql=sqlUpdate($db,"invoice",$_fields,"id={$i->fields['id']}")); - echo "

$sql"; - } - - // send late fee/payment reminder e-mail: - if($rs->fields['enable_emails']){ - $email = new email_template; - $email->send('net_term_late_notice', $i->fields['account_id'], $i->fields['id'], number_format($fee,2), number_format($rs->fields['suspend_intervals']-$i->fields['net_term_intervals'])); - } - } - $i->MoveNext(); - } - } - $rs->MoveNext(); - } - } - } -} -?> diff --git a/modules/net_term/net_term_construct.xml b/modules/net_term/net_term_construct.xml deleted file mode 100644 index 6e9606af..00000000 --- a/modules/net_term/net_term_construct.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - net_term - - net_term
- - - - 0 - - name - - 25 - - 1 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - Active - L - - - - X2 - any - array - - - - X2 - array - - - - C(16) - 2 - 16 - alphanumeric - 1 - - - - C(16) - alphanumeric - - - - L - - - - F - - - I4 - - - - I4 - - - - L - - - - I4 - - - - C(32) - any - - - - I4 - - - - - - status,group_avail,name,fee_type,fee,fee_day,suspend_day,enable_emails,sweep_type,terms,checkout_id - id,status,group_avail,name,fee_type,fee,fee_day,suspend_day,enable_emails,sweep_type,terms,checkout_id - id,status,name,fee - id,status,group_avail,name,fee_type,fee,fee_day,suspend_day,enable_emails,sweep_type,terms,checkout_id - id,status,group_avail,name,fee_type,fee,fee_day,suspend_day,enable_emails,sweep_type,terms,checkout_id - - - - - - - - - - - - - - id - checkbox - 25px - - - status - bool_icon - 20px - - - name - - - fee - - - -
diff --git a/modules/net_term/net_term_install.xml b/modules/net_term/net_term_install.xml deleted file mode 100644 index 42d4e63e..00000000 --- a/modules/net_term/net_term_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - Terms - - 1 - - net_term - - - - setup - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/newsletter/auth.inc.php b/modules/newsletter/auth.inc.php deleted file mode 100644 index f993b796..00000000 --- a/modules/newsletter/auth.inc.php +++ /dev/null @@ -1,14 +0,0 @@ - 'newsletter', 'method' => 'check_list'), - Array ('module' => 'newsletter', 'method' => 'check_list_registration'), - Array ('module' => 'newsletter', 'method' => 'popup'), - Array ('module' => 'newsletter', 'method' => 'subscribe'), - Array ('module' => 'newsletter', 'method' => 'subscribe_confirm'), - Array ('module' => 'newsletter', 'method' => 'unsubscribe') - ); -?> \ No newline at end of file diff --git a/modules/newsletter/newsletter.inc.php b/modules/newsletter/newsletter.inc.php deleted file mode 100644 index 115d0490..00000000 --- a/modules/newsletter/newsletter.inc.php +++ /dev/null @@ -1,912 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class newsletter -{ - - # Open the constructor for this mod - function newsletter_construct() - { - # name of this module: - $this->module = "newsletter"; - - # 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) - { - $this->newsletter_construct(); - $type = "add"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->add($VAR, $this, $type); - } - - ############################## - ## VIEW ## - ############################## - function view($VAR) - { - $this->newsletter_construct(); - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - - ############################## - ## POPUP VIEW ## - ############################## - function popup($VAR) - { - $this->newsletter_construct(); - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - ############################## - ## UPDATE ## - ############################## - function update($VAR) - { - $this->newsletter_construct(); - $type = "update"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->update($VAR, $this, $type); - } - - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $this->newsletter_construct(); - $db = new CORE_database; - $db->mass_delete($VAR, $this, ""); - } - - ############################## - ## SEARCH FORM ## - ############################## - function search_form($VAR) - { - $this->newsletter_construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_form($VAR, $this, $type); - } - - ############################## - ## SEARCH ## - ############################## - function search($VAR) - { - $this->newsletter_construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search($VAR, $this, $type); - } - - ############################## - ## SEARCH SHOW ## - ############################## - - function search_show($VAR) - { - $this->newsletter_construct(); - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_show($VAR, $this, $type); - } - - - - ############################## - ## SEND NEWSLETTERS ## - ############################## - - function send($VAR) - { - global $C_debug, $C_translate, $C_vars; - - $C_vars->strip_slashes_all(); - - ##################################################### - ### Get the setup email settings: - - $db = &DB(); - $q = "SELECT * FROM ".AGILE_DB_PREFIX."setup_email WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr($VAR["setup_email_id"]); - $setup_email = $db->Execute($q); - - if($setup_email->fields['type'] == 0) - { - $type = 0; - } - else - { - $type = 1; - $E['server'] = $setup_email->fields['server']; - $E['account'] = $setup_email->fields['username']; - $E['password'] = $setup_email->fields['password']; - } - - $E['from_name'] = $setup_email->fields['from_name']; - $E['from_email'] = $setup_email->fields['from_email']; - - if($setup_email->fields['cc_list'] != '') - $E['cc_list'] = explode(',', $setup_email->fields['cc_list']); - - if($setup_email->fields['bcc_list'] != '') - $E['bcc_list'] = explode(',', $setup_email->fields['bcc_list']); - - - ##################################################### - ### Priority: - - if(isset($VAR['newsletter_priority']) && $VAR['newsletter_priority'] == '1') - $E['priority'] = 1; - - - ##################################################### - ### Subject: - - if(isset($VAR['newsletter_subject']) && $VAR['newsletter_subject'] != '') - { - $E['subject'] = $VAR['newsletter_subject']; - } - else - { - ### ERROR! - $C_debug->alert($C_translate->translate('send_alert_message','newsletter','')); - $C_debug->alert($C_translate->translate('send_alert_fail','newsletter','')); - return; - } - - - ##################################################### - ### Body (TEXT version): - - if(isset($VAR['newsletter_body_text']) && $VAR['newsletter_body_text'] != '') - { - - $E['body_text'] = $VAR['newsletter_body_text']; - - } - else - { - ### ERROR! - $C_debug->alert($C_translate->translate('send_alert_body_text','newsletter','')); - $C_debug->alert($C_translate->translate('send_alert_fail','newsletter','')); - return; - } - - ##################################################### - ### Body (HTML version): - - if(isset($VAR['newsletter_body_html']) && $VAR['newsletter_body_html'] != '') - { - $E['body_html'] = $VAR['newsletter_body_html']; - } - else - { - ### ERROR! - $C_debug->alert($C_translate->translate('send_alert_body_html','newsletter','')); - $C_debug->alert($C_translate->translate('send_alert_fail','newsletter','')); - return; - } - - - - - ##################################################### - ### TEST - Get current user account details - - $db = &DB(); - $q = "SELECT * FROM ".AGILE_DB_PREFIX."account WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr(SESS_ACCOUNT); - $account = $db->Execute($q); - - $E['to_email'] = $account->fields['email']; - $E['to_name'] = $account->fields['first_name'] . ' ' . $account->fields['last_name']; - - ### Call the mail() or smtp() function to send - require_once(PATH_CORE . 'email.inc.php'); - $email = new CORE_email; - - if($type == 0) - { - if(isset($E['body_html'])) - { - ### SEND HTML VERSION - $E['html'] = '1'; - $email->PHP_Mail($E); - } - - ### SEND TEXT VERSION - $E['html'] = '0'; - $email->PHP_Mail($E); - - $C_debug->alert("Send success!"); - } - else - { - if(isset($E['body_html'])) - { - ### SEND HTML VERSION - $E['html'] = '1'; - $email->SMTP_Mail($E); - } - - ### SEND TEXT VERSION - $E['html'] = '0'; - $email->SMTP_Mail($E); - } - - - - - - ##################################################### - ### LIVE - Get all subscribers - if(!isset($VAR['newsletter_test'])) - { - - ### SET THE BODY & SUBJECT - $body_text = $E['body_text']; - $body_html = $E['body_html']; - $subject = $E['subject']; - - ### Delete the cc/bcc lists... - unset($E['cc_list']); - unset($E['bcc_list']); - - $newsletters = $VAR['newsletter_id']; - for($i=0; $i $subs->fields["first_name"], - 'lName'=> $subs->fields["last_name"]); - $subs->MoveNext(); - } - } - - - ### LOOP through the final results - if(!isset($arr_s) || gettype($arr_s) != 'array') - { - ### NO RESULTS... RETURN NOW! - $C_debug->alert($C_translate->translate('send_alert_no_results','newsletter','')); - $C_debug->alert($C_translate->translate('send_alert_fail','newsletter','')); - return; - - } - - $i = 0; - while (list ($key, $val) = each ($arr_s)) - { - $i++; - - $E['to_email'] = $key; - $E['to_name'] = $arr_s["$key"]["fName"] . ' ' . $arr_s["$key"]["lName"]; - - $remove = URL . '?_page=newsletter:unsubscribe&email='.$key; - - if($arr_s["$key"]["html"] == '1') - { - ### replace %name%, %email%, and %remove% with correct vars: (for html) - $E['body_html'] = eregi_replace('%name%', $arr_s["$key"]["fName"], $body_html); - $E['body_html'] = eregi_replace('%email%', $key, $E['body_html']); - $E['body_html'] = eregi_replace('%remove%', $remove, $E['body_html']); - $E['html'] = '1'; - } - else - { - ### replace %name%, %email%, and %remove% with correct vars: (for text) - $E['body_text'] = eregi_replace('%name%', $arr_s["$key"]["fName"], $body_text); - $E['body_text'] = eregi_replace('%email%', $key, $E['body_text']); - $E['body_text'] = eregi_replace('%remove%', $remove, $E['body_text']); - $E['html'] = false; - } - - - ### replace %name%, %email%, and %remove% with correct vars: (for subject) - $E['subject'] = eregi_replace('%name%', $arr_s["$key"]["fName"], $subject); - $E['subject'] = eregi_replace('%email%', $key, $E['subject']); - - - if($type == 0) - { - ### SEND THE MESSAGE - $email = new CORE_email; - $email->PHP_Mail($E); - } - else - { - ### SEND TEXT VERSION - $email = new CORE_email; - $email->SMTP_Mail($E); - } - } - - ### Completion notice - $C_debug->alert($C_translate->translate('send_alert_success','newsletter','')); - ## Sent $i messages... - } - } - - - ############################## - ## SHOW NEWSLETTER LIST ## - ############################## - - function check_list($VAR) - { - - $name = "newsletter_id"; - $table = 'newsletter'; - $field = 'name'; - $id = ''; - $input_id = ''; - - global $C_translate, $C_auth; - - # get the records - $db = &DB(); - $sql= "SELECT id,group_avail,name FROM ".AGILE_DB_PREFIX."$table - WHERE site_id = '" . DEFAULT_SITE . "' AND - active = " . $db->qstr('1') . " - ORDER BY $field"; - $result = $db->Execute($sql); - - # error handling - if ($result === false) - { - global $C_debug; - $C_debug->error('list.inc.php','check', $db->ErrorMsg()); - } - - - # loop through the records - $i = 0; - while (!$result->EOF) { - - $groups = unserialize($result->fields['group_avail']); - - $auth = false; - for($ii=0; $iiauth_group_by_id($groups[$ii])) $auth = true; - } - - if($auth) - { - # Create the return code for Smarty - $return .= ' ' . - $result->fields["$field"] . - '  [ ? ] -
'; - $i++; - } - $result->MoveNext(); - } - - if($i==0) - $return .= 'No Newsletters Available to Your Account'; - - echo $return; - } - - - - - - ############################## - ## SHOW NEWSLETTER LIST ## - ## FOR REGISTRATION ## - ############################## - - function check_list_registration($VAR) - { - - $name = "newsletter_id"; - $table = 'newsletter'; - $field = 'name'; - $id = ''; - $input_id = ''; - - global $C_translate, $C_auth; - - # get the records - $db = &DB(); - $sql= "SELECT id,group_avail,name FROM ".AGILE_DB_PREFIX."$table - WHERE site_id = '" . DEFAULT_SITE . "' AND - active = " . $db->qstr('1') . " AND - display_signup = " . $db->qstr('1') . " - ORDER BY $field"; - $result = $db->Execute($sql); - - # error handling - if ($result === false) - { - global $C_debug; - $C_debug->error('list.inc.php','check', $db->ErrorMsg()); - } - - - # loop through the records - $i = 0; - while (!$result->EOF) { - - $groups = unserialize($result->fields['group_avail']); - - $auth = false; - for($ii=0; $iiauth_group_by_id($groups[$ii])) $auth = true; - } - - if($auth) - { - # Create the return code for Smarty - $return .= ' ' . - $result->fields["$field"] . - '  [ ? ] -
'; - $i++; - } - $result->MoveNext(); - } - - if($i==0) - $return .= 'No Newsletters Available to Your Account'; - - echo $return; - } - - - - - - - - ############################## - ## SUBSCRIBE ## - ############################## - - /* we need the following vars: - - 'newsletter_id' (array) - 'newsletter_type' (0/1) ( standalone / with new account) - 'newsletter_html' (0/1) - - 'newsletter_email' (email_required) - 'newsletter_first_name' (first name, required) - 'newsletter_last_name' (last_name, optional) - or - 'account_email' (email_required) - 'account_first_name' (from the signup form) - 'account_last_name' (from the singup form) - - */ - - - function subscribe($VAR) - { - $LIMIT_SECONDS = 120; - - global $C_debug, $C_translate; - - ### Include the validation class - include_once(PATH_CORE . 'validate.inc.php'); - - ### store the details in a temporary database, and email the user - ### a link with the time() string from the creation date of the - ### record - - - - ### Check that the required variables are set: - if(!isset($VAR['newsletter_id']) || gettype($VAR['newsletter_id']) != 'array') - { - if(isset($VAR['newsletter_type'])) { - #ERROR! - $C_debug->alert($C_translate->translate('subscribe_newsletter_req','newsletter','')); - return; - } else { - return; - } - } - - $newsletter_id = @$VAR['newsletter_id']; - - if(isset($VAR['newsletter_html'])) - $html = 1; - else - $html = 0; - - if(isset($VAR['newsletter_type'])) - { - if(empty($VAR['newsletter_first_name'])) - { - #### ERROR! - if (isset($VAR['newsletter_type'])) - $C_debug->alert($C_translate->translate('subscribe_name_req','newsletter','')); - return; - } - - $validate = new CORE_validate; - if(empty($VAR['newsletter_email']) || !$validate->validate_email($VAR['newsletter_email'], '')) - { - ### ERROR! - if (isset($VAR['newsletter_type'])) - $C_debug->alert($C_translate->translate('subscribe_email_req','newsletter','')); - return; - } - - $first_name = @$VAR['newsletter_first_name']; - $last_name = @$VAR['newsletter_last_name']; - $email = @$VAR['newsletter_email']; - } - else - { - if(!isset($VAR['account_first_name']) || $VAR['account_first_name'] == '') - return; - - $validate = new CORE_validate; - if(!isset($VAR['account_email']) || $validate->validate_email($VAR['account_email'], '') == false) - return; - - - $first_name = @$VAR['account_first_name']; - $last_name = @$VAR['account_last_name']; - $email = @$VAR['account_email']; - } - - - ### Check that this email has not been requested already - ### In the last 60 seconds - - $db = &DB(); - $sql = 'SELECT * FROM ' . AGILE_DB_PREFIX . 'temporary_data WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - field1 = ' . $db->qstr($email); - $result = $db->Execute($sql); - if($result->RecordCount() > 0) - { - $limit = $result->fields['date_orig'] + $LIMIT_SECONDS; - - if($limit > time()) - { - ### ERROR! - if(isset($VAR['newsletter_type'])) - { - $error1 = $C_translate->translate("subscribe_spam_limit","newsletter",""); - $error = ereg_replace('%limit%', "$LIMIT_SECONDS", $error1); - $C_debug->alert( $error ); - } - return; - } - else - { - ### Delete the old request - $sql = 'DELETE FROM ' . AGILE_DB_PREFIX . 'temporary_data WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - field1 = ' . $db->qstr($email); - $db->Execute($sql); - } - - } - - ##################################################### - ### Ok to continue: - - $now = time(); - $expire = time() + 86400*3; - $data = serialize(Array ('html' => $html, - 'email' => $email, - 'first_name' => $first_name, - 'last_name' => $last_name, - 'newsletter_id' => $newsletter_id, - 'var' => base64_encode(serialize(@$VAR['static_relation'])))); - - ##################################################### - ### Create the temporary DB Record: - - $db = &DB(); - $id = $db->GenID(AGILE_DB_PREFIX . "" . 'temporary_data_id'); - $sql = 'INSERT INTO ' . AGILE_DB_PREFIX . 'temporary_data SET - site_id = ' . $db->qstr(DEFAULT_SITE) . ', - id = ' . $db->qstr($id) . ', - date_orig = ' . $db->qstr($now) . ', - date_expire = ' . $db->qstr($expire) . ', - field1 = ' . $db->qstr($email) . ', - data = ' . $db->qstr($data) ; - $result = $db->Execute($sql); - - ##################################################### - ### Send the subscription confirmation email : - - $E['html'] = 0; - $E['priority'] = 0; - $E['to_email'] = $email; - $E['to_name'] = $first_name; - - global $C_translate; - $E['body_text'] = $C_translate->translate('subscribe_body','newsletter',''); - $E['subject'] = $C_translate->translate('subscribe_subj','newsletter',''); - - $E['body_text'] = eregi_replace('%name%', $first_name, $E['body_text']); - $E['body_text'] = eregi_replace('%email%', $email, $E['body_text']); - $E['body_text'] = eregi_replace('%confirm_url%', URL.'?_page=newsletter:subscribe_confirm&email='.$email.'&validate='.$now, $E['body_text']); - $E['body_text'] = eregi_replace('%site_name%', SITE_NAME, $E['body_text']); - - - ##################################################### - ### Get the setup email settings: - - $db = &DB(); - $q = "SELECT * FROM ".AGILE_DB_PREFIX."setup_email WHERE - site_id = ".$db->qstr(DEFAULT_SITE)." AND - id = ".$db->qstr(DEFAULT_SETUP_EMAIL); - $setup_email = $db->Execute($q); - - if($setup_email->fields['type'] == 0) - { - $type = 0; - } - else - { - $type = 1; - $E['server'] = $setup_email->fields['server']; - $E['account'] = $setup_email->fields['username']; - $E['password'] = $setup_email->fields['password']; - } - - $E['from_name'] = $setup_email->fields['from_name']; - $E['from_email'] = $setup_email->fields['from_email']; - - - ###################################################### - ### SEND THE MESSAGE! - - require_once(PATH_CORE . 'email.inc.php'); - $email = new CORE_email; - - if($type == 0) - { - ### SEND THE MESSAGE - $email->PHP_Mail($E); - } - else - { - ### SEND TEXT VERSION - $email->SMTP_Mail($E); - } - - ##################################################### - ### Success message! - if(isset($VAR['newsletter_type'])) - { - $message = $C_translate->translate('subscribe_confirm', 'newsletter', ''); - $C_debug->alert($message); - } - } - - - - - - ############################## - ## SUBSCRIBE CONFIRM ## - ############################## - - function subscribe_confirm($VAR) - { - global $C_debug, $C_translate; - - ### validate that the user provided their email - - /* - We need the following vars to confirm: - - 'email' - 'validate' - - */ - - if(!isset($VAR['email']) || !isset($VAR['validate'])) - { - ### ERROR: bad link.... - $url = '
' . $C_translate->translate('submit','CORE','') . ''; - $message = eregi_replace('%here%', $url, $C_translate->translate('subscribe_confirm_fail','newsletter','')); - echo $message; - return; - } - else - { - ### Confirm the email/timestamp match - $email = @$VAR['email']; - $time = @$VAR['validate']; - - - $db = &DB(); - $sql = 'SELECT data FROM ' . AGILE_DB_PREFIX . 'temporary_data WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - date_orig = ' . $db->qstr($time) . ' AND - field1 = ' . $db->qstr($email); - $result = $db->Execute($sql); - - if($result->RecordCount() == 0) - { - ### ERROR: no match for submitted link, invalid or expired. - $url = '
' . $C_translate->translate('submit','CORE','') . ''; - $message = eregi_replace('%here%', $url, $C_translate->translate('subscribe_confirm_fail','newsletter','')); - echo $message; - return; - } - - $arr = unserialize($result->fields['data']); - @$varstored['static_relation'] = unserialize(base64_decode($arr['var'])); - - - ############################################################### - ### Delete the temporary record - $sql = 'DELETE FROM ' . AGILE_DB_PREFIX . 'temporary_data WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - field1 = ' . $db->qstr($email); - $db->Execute($sql); - - - - - ############################################################### - ### Create the newsletter subscription(s): - $db = &DB(); - for($i=0; $iadd($varstored, 'newsletter_subscriber', $id); - } - - - ### Return the success message: - echo $C_translate->translate('subscribe_confirm_success','newsletter',''); - } - - } - - - - - ############################## - ## UNSUBSCRIBE ## - ############################## - - function unsubscribe($VAR) - { - global $C_debug, $C_translate; - - ### Check required var - if(!isset($VAR['newsletter_email']) || $VAR['newsletter_email'] == '') - { - ### ERROR: bad link.... - $message = $C_translate->translate('subscribe_email_req','newsletter',''); - $C_debug->alert($message); - return; - } - - ### Confirm the email/timestamp match - $email = @$VAR['newsletter_email']; - $n_id = @$VAR['newsletter_id']; - - - ######################################################### - ### Drop any existing subscriptions to avoid duplicates! - - $db = &DB(); - if(gettype($n_id) == 'array') - { - for($i=0; $ialert($message); - } -} -?> \ No newline at end of file diff --git a/modules/newsletter/newsletter_construct.xml b/modules/newsletter/newsletter_construct.xml deleted file mode 100644 index 1015d461..00000000 --- a/modules/newsletter/newsletter_construct.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - newsletter - - newsletter
- - - - 0 - - name - - 25 - - - - I4 - 1 - 1 - - - I4 - - - C(255) - any - array - - - C(255) - 1 - 255 - 1 - - - X2 - 1 - - - X2 - - - L - - - L - - - - - id,site_id,group_avail,name,description,notes,active,display_signup - id,site_id,group_avail,name,description,notes,active,display_signup - id,site_id,group_avail,name,description,notes,active,display_signup - id,site_id,group_avail,name,description,notes,active,display_signup - id,site_id,group_avail,name,description,notes,active,display_signup - - - 0 -
diff --git a/modules/newsletter/newsletter_install.xml b/modules/newsletter/newsletter_install.xml deleted file mode 100644 index dedccf5c..00000000 --- a/modules/newsletter/newsletter_install.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - newsletter - newsletter - - 1 - - - - - search - - - 1 - - - view - - - 1 - - - add - - 1 - - - delete - - - update - - - search_form - - - search_show - - - - send - - - 1 - - - - \ No newline at end of file diff --git a/modules/newsletter/newsletter_install_data.xml b/modules/newsletter/newsletter_install_data.xml deleted file mode 100644 index 4006e444..00000000 --- a/modules/newsletter/newsletter_install_data.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - 0 - 1 - - Newsletter 1 - Sign up today! - 1 - 1 - - - 3 - - \ No newline at end of file diff --git a/modules/newsletter_subscriber/auth.inc.php b/modules/newsletter_subscriber/auth.inc.php deleted file mode 100644 index 3b7bc450..00000000 --- a/modules/newsletter_subscriber/auth.inc.php +++ /dev/null @@ -1,9 +0,0 @@ - 'newsletter_subscriber', 'method' => 'static_var') - ); -?> \ No newline at end of file diff --git a/modules/newsletter_subscriber/newsletter_subscriber.inc.php b/modules/newsletter_subscriber/newsletter_subscriber.inc.php deleted file mode 100644 index 3adbfaed..00000000 --- a/modules/newsletter_subscriber/newsletter_subscriber.inc.php +++ /dev/null @@ -1,726 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class newsletter_subscriber -{ - - # Open the constructor for this mod - function newsletter_subscriber() - { - # name of this module: - $this->module = "newsletter_subscriber"; - - # 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"]; - } - - ############################## - ## GRAPH STATISTICS ## - ############################## - function graph($start, $end, $constraint, $default) - { - global $C_translate; - - - $db = &DB(); - $sql = 'SELECT date_orig FROM ' . AGILE_DB_PREFIX . 'newsletter_subscriber WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - date_orig >= ' . $db->qstr($start) . ' AND - date_orig <= ' . $db->qstr($end); - - $result = $db->Execute($sql); - if($result->RecordCount() == 0) - { - $arr['title'] = $C_translate->translate('search_no_results','',''); - $arr['results'] = $default; - return $arr; - } - $ii=0; - while(!$result->EOF) - { - $d = $result->fields['date_orig']; - for($i=0; $i= $constraint[$i]["start"] && $d < $constraint[$i]["end"]) - $default[$i]++; - $ii++; - } - $result->MoveNext(); - } - - $C_translate->value['newsletter_subscriber']['count'] = $result->RecordCount(); - $title = $C_translate->translate('statistics','newsletter_subscriber',''); - $arr['title'] = $title; - $arr['results'] = $default; - return $arr; - } - - - ############################## - ## ADD ## - ############################## - function add($VAR) - { - $type = "add"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $id = $db->add($VAR, $this, $type); - - ### Set the static vars: - if($id) - { - global $smarty; - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - $static_var->add($VAR, $this->module, $id); - } - } - - ############################## - ## VIEW ## - ############################## - function view($VAR) - { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - - ### Get the static vars: - global $smarty; - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - $ids = explode(',',$VAR['id']); - $arr = $static_var->update_form($this->module, 'update', $ids[0]); - if(gettype($arr) == 'array') - $smarty->assign('static_var', $arr); - else - $smarty->assign('static_var', false); - } - - ############################## - ## UPDATE ## - ############################## - function update($VAR) - { - $type = "update"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - if($db->update($VAR, $this, $type)) - { - ### Update the static vars: - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - $static_var->update($VAR, 'newsletter_subscriber', $VAR['id']); - } - } - - - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $db = new CORE_database; - $db->mass_delete($VAR, $this, ""); - } - - ############################## - ## SEARCH FORM ## - ############################## - function search_form($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_form($VAR, $this, $type); - } - - ############################## - ## SEARCH ## - ############################## - function search($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - - $db = &DB(); - - include_once(PATH_CORE . 'validate.inc.php'); - $validate = new CORE_validate; - - # set the search criteria array - $arr = $VAR; - - # loop through the submitted field_names to get the WHERE statement - $where_list = ''; - $i=0; - while (list ($key, $value) = each ($arr)) - { - if($i == 0) - { - if($value != '') - { - $pat = "^" . $this->module . "_"; - if(eregi($pat, $key)) - { - $field = eregi_replace($pat,"",$key); - if(eregi('%',$value)) - { - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value = $validate->convert($field, $value, $this->field["$field"]["convert"]); - } - - $where_list .= " WHERE ".AGILE_DB_PREFIX."newsletter_subscriber.".$field . " LIKE " . $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - else - { - # check if array - if(is_array($value)) - { - for($i_arr=0; $i_arr < count($value); $i_arr++) - { - if($value["$i_arr"] != '') - { - # determine any field options (=, >, <, etc...) - $f_opt = '='; - $pat_field = $this->module.'_'.$field; - $VAR['field_option']["$pat_field"]["$i_arr"]; - if(isset($VAR['field_option']["$pat_field"]["$i_arr"])) - { - $f_opt = $VAR['field_option']["$pat_field"]["$i_arr"]; - # error checking, safety precaution - if($f_opt != '=' && $f_opt != '>' && $f_opt != '<' && $f_opt != '>=' && $f_opt != '<=' && $f_opt != '!=') - $f_opt = '='; - } - - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value["$i_arr"] = $validate->convert($field, $value["$i_arr"], $this->field["$field"]["convert"]); - } - - - if($i_arr == 0) - { - $where_list .= " WHERE ".AGILE_DB_PREFIX."newsletter_subscriber.".$field . " $f_opt " . $db->qstr($value["$i_arr"], get_magic_quotes_gpc()); - $i++; - } - else - { - $where_list .= " AND ".AGILE_DB_PREFIX."newsletter_subscriber.".$field . " $f_opt " . $db->qstr($value["$i_arr"], get_magic_quotes_gpc()); - $i++; - } - } - } - } - else - { - $where_list .= " WHERE ".AGILE_DB_PREFIX."newsletter_subscriber.".$field . " = " . $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - } - } - } - } - else - { - if($value != '') - { - $pat = "^" . $this->module . "_"; - if(eregi($pat, $key)) - { - $field = eregi_replace($pat,"",$key); - if(eregi('%',$value)) - { - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value = $validate->convert($field, $value, $this->field["$field"]["convert"]); - } - - $where_list .= " AND ".AGILE_DB_PREFIX."newsletter_subscriber.".$field . " LIKE " . $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - else - { - # check if array - if(is_array($value)) - { - for($i_arr=0; $i_arr < count($value); $i_arr++) - { - if($value["$i_arr"] != '') - { - # determine any field options (=, >, <, etc...) - $f_opt = '='; - $pat_field = $this->module.'_'.$field; - if(isset($VAR['field_option']["$pat_field"]["$i_arr"])) - { - $f_opt = $VAR['field_option']["$pat_field"]["$i_arr"]; - - # error checking, safety precaution - if($f_opt != '=' && $f_opt != '>' && $f_opt != '<' && $f_opt != '>=' && $f_opt != '<=' && $f_opt != '!=') - $f_opt = '='; - } - - # do any data conversion for this field (date, encrypt, etc...) - if(isset($this->field["$field"]["convert"])) - { - $value["$i_arr"] = $validate->convert($field, $value["$i_arr"], $this->field["$field"]["convert"]); - } - - $where_list .= " AND ".AGILE_DB_PREFIX."newsletter_subscriber.". $field . " $f_opt " . $db->qstr($value["$i_arr"], get_magic_quotes_gpc()); - $i++; - } - } - } - else - { - $where_list .= " AND ".AGILE_DB_PREFIX."newsletter_subscriber.". $field . " = ". $db->qstr($value, get_magic_quotes_gpc()); - $i++; - } - } - } - } - } - } - - #### finalize the WHERE statement - if($where_list == '') - { - $where_list .= ' WHERE '; - } - else - { - $where_list .= ' AND '; - } - - - # get limit type - if(isset($VAR['limit'])) - { - $limit = $VAR['limit']; - } - else - { - $limit = $this->limit; - } - - # get order by - if(isset($VAR['order_by'])) - { - $order_by = $VAR['order_by']; - } - else - { - $order_by = $this->order_by; - } - - $pre = AGILE_DB_PREFIX; - - - $q = "SELECT DISTINCT ".AGILE_DB_PREFIX."newsletter_subscriber.id FROM ".AGILE_DB_PREFIX."newsletter_subscriber "; - $q_save = "SELECT DISTINCT %%fieldList%% FROM ".AGILE_DB_PREFIX."newsletter_subscriber "; - - - ######## GET ANY STATIC VARS TO SEARCH ########## - $join_list = ''; - if(!empty($VAR["static_relation"]) && count( $VAR["static_relation"] > 0 )) { - while(list($idx, $value) = each ($VAR["static_relation"])) { - if($value != "") { - - $join_list .= " INNER JOIN {$pre}static_var_record AS s{$idx} ON - ( - s{$idx}.record_id = {$pre}{$this->table}.id - AND - s{$idx}.static_var_relation_id = '{$idx}' - AND - s{$idx}.site_id = ".$db->qstr(DEFAULT_SITE)." - AND"; - if(ereg("%", $value)) - $join_list .= " s{$idx}.value LIKE ".$db->qstr($VAR["static_relation"]["$idx"]); - else - $join_list .= " s{$idx}.value = ".$db->qstr($VAR["static_relation"]["$idx"]); - $join_list .= " ) "; - } - } - } - ######## END STATIC VAR SEARCH ################## - - - # standard where list - $q .= $join_list . $where_list ." ".AGILE_DB_PREFIX."newsletter_subscriber.site_id = " . $db->qstr(DEFAULT_SITE); - $q_save .= $join_list . $where_list ." %%whereList%% "; - - - ################## DEBUG ################## - #echo "
" . $q;
-		#echo "

" . $q_save; - #exit; - - # run the database query - $result = $db->Execute($q); - - # error reporting - if ($result === false) - { - global $C_debug; - $C_debug->error('newsletter_subscriber.inc.php','search', $db->ErrorMsg()); - return false; - } - - # get the result count: - $results = $result->RecordCount(); - - # get the first record id: - if($results == 1) $record_id = $result->fields['id']; - - # define the DB vars as a Smarty accessible block - global $smarty; - - # Create the definition for fast-forwarding to a single record: - if ($results == 1 && !isset($this->fast_forward)) - { - $smarty->assign('record_id', $record_id); - } - - # create the search record: - if($results > 0) - { - # create the search record - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $arr['module'] = $this->module; - $arr['sql'] = $q_save; - $arr['limit'] = $limit; - $arr['order_by']= $order_by; - $arr['results'] = $results; - $search->add($arr); - - # define the search id and other parameters for Smarty - $smarty->assign('search_id', $search->id); - - # page: - $smarty->assign('page', '1'); - - # limit: - $smarty->assign('limit', $limit); - - # order_by: - $smarty->assign('order_by', $order_by); - } - - # define the result count - $smarty->assign('results', $results); - } - - - - ############################## - ## SEARCH SHOW ## - ############################## - - function search_show($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - - # set the field list for this method: - $arr = $this->method[$type]; - - $field_list = ''; - $i=0; - while (list ($key, $value) = each ($arr)) - { - if($i == 0) - { - $field_var = $this->table . '_' . $value; - $field_list .= AGILE_DB_PREFIX . "newsletter_subscriber" . "." . $value; - - // determine if this record is linked to another table/field - if($this->field[$value]["asso_table"] != "") - { - $this->linked[] = array('field' => $value, 'link_table' => $this->field[$value]["asso_table"], 'link_field' => $this->field[$value]["asso_field"]); - } - } - else - { - $field_var = $this->table . '_' . $value; - $field_list .= "," . AGILE_DB_PREFIX . "newsletter_subscriber" . "." . $value; - - // determine if this record is linked to another table/field - if($this->field[$value]["asso_table"] != "") - { - $this->linked[] = array('field' => $value, 'link_table' => $this->field[$value]["asso_table"], 'link_field' => $this->field[$value]["asso_field"]); - } - } - $i++; - } - - - # get the search details: - if(isset($VAR['search_id'])) { - include_once(PATH_CORE . 'search.inc.php'); - $search = new CORE_search; - $search->get($VAR['search_id']); - } else { - # invalid search! - echo '
The search terms submitted were invalid!'; # translate... # alert - - if(isset($this->trigger["$type"])) { - include_once(PATH_CORE . 'trigger.inc.php'); - $trigger = new CORE_trigger; - $trigger->trigger($this->trigger["$type"], 0, $VAR); - } - } - - # get the sort order details: - if(isset($VAR['order_by']) && $VAR['order_by'] != "") { - $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . 'newsletter_subscriber.'.$VAR['order_by']; - $smarty_order = $VAR['order_by']; - } else { - $order_by = ' ORDER BY ' . AGILE_DB_PREFIX . 'newsletter_subscriber.'.$this->order_by; - $smarty_order = $search->order_by; - } - - - # determine the sort order - if(isset($VAR['desc'])) { - $order_by .= ' DESC'; - $smarty_sort = 'desc='; - } else if(isset($VAR['asc'])) { - $order_by .= ' ASC'; - $smarty_sort = 'asc='; - } else { - if (!eregi('date',$smarty_order)) { - $order_by .= ' ASC'; - $smarty_sort = 'asc='; - } else { - $order_by .= ' DESC'; - $smarty_sort = 'desc='; - } - } - - # determine the offset & limit - $current_page=1; - $offset=-1; - if (!empty($VAR['page'])) $current_page = $VAR['page']; - if (empty($search->limit)) $search->limit=25; - if($current_page>1) $offset = (($current_page * $search->limit) - $search->limit); - - # generate the full query - $db = &DB(); - $q = eregi_replace("%%fieldList%%", $field_list, $search->sql); - $q = eregi_replace("%%tableList%%", AGILE_DB_PREFIX.$construct->table, $q); - $q = eregi_replace("%%whereList%%", "", $q); - $q .= " ".AGILE_DB_PREFIX . "newsletter_subscriber."."site_id = " . $db->qstr(DEFAULT_SITE); - $q .= $order_by; - - ////////////////// - #echo "
 $q 

"; - - $result = $db->SelectLimit($q, $search->limit); - - # error reporting - if ($result === false) - { - global $C_debug; - $C_debug->error('newsletter_subscriber.inc.php','search_show', $db->ErrorMsg()); - - if(isset($this->trigger["$type"])) - { - include_once(PATH_CORE . 'trigger.inc.php'); - $trigger = new CORE_trigger; - $trigger->trigger($this->trigger["$type"], 0, $VAR); - } - return; - } - - - # put the results into a smarty accessable array - $i=0; - $class_name = TRUE; - while (!$result->EOF) { - $smart[$i] = $result->fields; - - if($class_name) - { - $smart[$i]['_C'] = 'row1'; - $class_name = FALSE; - } else { - $smart[$i]['_C'] = 'row2'; - $class_name = TRUE; - } - $result->MoveNext(); - $i++; - } - - - # get any linked fields - if($i > 0) - { - $db_join = new CORE_database; - $this->result = $db_join->join_fields($smart, $this->linked); - } - else - { - $this->result = $smart; - } - - # get the result count: - $results = $result->RecordCount(); - - # define the DB vars as a Smarty accessible block - global $smarty; - - # define the results - $smarty->assign($this->table, $this->result); - $smarty->assign('page', $VAR['page']); - $smarty->assign('order', $smarty_order); - $smarty->assign('sort', $smarty_sort); - $smarty->assign('limit', $search->limit); - $smarty->assign('search_id',$search->id); - $smarty->assign('results', $search->results); - - # get the total pages for this search: - if(empty($search->limit)) - $this->pages = 1; - else - $this->pages = intval($search->results / $search->limit); - if ($search->results % $search->limit) $this->pages++; - - # total pages - $smarty->assign('pages', $this->pages); - - # current page - $smarty->assign('page', $current_page); - $page_arr = ''; - for($i=0; $i <= $this->pages; $i++) - { - if ($this->page != $i) $page_arr[] = $i; - } - - # page array for menu - $smarty->assign('page_arr', $page_arr); - } - - - - - - ############################## - ## SEARCH EXPORT ## - ############################## - function search_export($VAR) - { - # require the export class - require_once (PATH_CORE . "export.inc.php"); - - # Call the correct export function for inline browser display, download, email, or web save. - if($VAR["format"] == "excel") - { - $type = "export_excel"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_excel($VAR, $this, $type); - } - - else if ($VAR["format"] == "pdf") - { - $type = "export_pdf"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_pdf($VAR, $this, $type); - } - - else if ($VAR["format"] == "xml") - { - $type = "export_xml"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_xml($VAR, $this, $type); - } - - else if ($VAR["format"] == "csv") - { - $type = "export_csv"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_csv($VAR, $this, $type); - } - - else if ($VAR["format"] == "tab") - { - $type = "export_tab"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $export = new CORE_export; - $export->search_tab($VAR, $this, $type); - } - } - - - ############################## - ## STATIC VARS ## - ############################## - - function static_var($VAR) - { - global $smarty; - - require_once(PATH_CORE . 'static_var.inc.php'); - $static_var = new CORE_static_var; - - if(ereg('search', $VAR['_page'])) - $arr = $static_var->generate_form($this->module, 'add', 'search'); - else - $arr = $static_var->generate_form($this->module, 'add', 'update'); - - if(gettype($arr) == 'array') - { - ### Set everything as a smarty array, and return: - $smarty->assign('show_static_var', true); - $smarty->assign('static_var', $arr); - return true; - } - else - { - ### Or if no results: - $smarty->assign('show_static_var', false); - return false; - } - } -} -?> \ No newline at end of file diff --git a/modules/newsletter_subscriber/newsletter_subscriber_construct.xml b/modules/newsletter_subscriber/newsletter_subscriber_construct.xml deleted file mode 100644 index ecd8d86a..00000000 --- a/modules/newsletter_subscriber/newsletter_subscriber_construct.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - newsletter_subscriber - - newsletter_subscriber
- - - - 0 - - newsletter_id - - 25 - - - - I8 - 1 - 1 - - - I4 - - - I8 - date-time - - - I8 - newsletter - name - - - C(128) - 1 - 128 - email - - - L - - - C(128) - - - C(128) - - - - - id,site_id,date_orig,newsletter_id,email,html,first_name,last_name - id,site_id,date_orig,newsletter_id,email,html,first_name,last_name - id,site_id,date_orig,newsletter_id,email,html,first_name,last_name - id,site_id,date_orig,newsletter_id,email,html,first_name,last_name - id,site_id,date_orig,newsletter_id,email,html,first_name,last_name - id,newsletter_id,email,html,first_name,last_name - id,newsletter_id,email,html,first_name,last_name - id,newsletter_id,email,html,first_name,last_name - id,newsletter_id,email,html,first_name,last_name - id,newsletter_id,email,html,first_name,last_name - - - 0 -
diff --git a/modules/newsletter_subscriber/newsletter_subscriber_install.xml b/modules/newsletter_subscriber/newsletter_subscriber_install.xml deleted file mode 100644 index c1dc5e8f..00000000 --- a/modules/newsletter_subscriber/newsletter_subscriber_install.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - newsletter_subscriber - newsletter - - 1 - - - - - search - - - 1 - - - view - - - 1 - - - add - - 1 - - - delete - - - update - - - search_form - - - search_show - - - - search_export - - - export_excel - - - export_csv - - - export_tab - - - - \ No newline at end of file diff --git a/modules/product/auth.inc.php b/modules/product/auth.inc.php deleted file mode 100644 index 28073223..00000000 --- a/modules/product/auth.inc.php +++ /dev/null @@ -1,9 +0,0 @@ - 'product', 'method' => 'details') - ); -?> \ No newline at end of file diff --git a/modules/product/base_product_plugin.inc.php b/modules/product/base_product_plugin.inc.php deleted file mode 100644 index c6e9edc5..00000000 --- a/modules/product/base_product_plugin.inc.php +++ /dev/null @@ -1,193 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Product - */ - -/** - * The main AgileBill Base Product Plugin Class - * - * @package AgileBill - * @subpackage Modules:Product - */ -abstract class base_product_plugin { - # Plugin Name - protected $name = ''; - # If this plugin provisions remote services - public $remote_based = false; - # Account Using this Plugin - protected $account; - # Product this Plugin is Refering - protected $product; - # Product Actributes - protected $product_attr; - - /** - * Provision new service - * - * Some available variables: - * * All the fields on the account table, eg: id,username,email,first_name,last_name - * $this->account['username']; - * * All the fields in the service table, eg: id,host_username,host_password - * $this->service['id']; - * * All the fields captured by the custom product plugin configuration template - * $this->plugin_data['my_field']; - */ - protected function p_new() { - # Do some background logging of what is going on - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true)); - - return true; - } - - /** - * Modify service - */ - protected function p_edit() { - # Do some background logging of what is going on - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true)); - - return true; - } - - /** - * Suspend service - */ - protected function p_inactive() { - # Do some background logging of what is going on - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true)); - - return true; - } - - /** - * Activate service - */ - protected function p_active() { - # Do some background logging of what is going on - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true)); - - return true; - } - - /** - * Delete service - */ - protected function p_delete() { - # Do some background logging of what is going on - global $C_debug; - $C_debug->error(__FILE__,__METHOD__,print_r(array($this->plugin_data,$this->service),true)); - - return true; - } - - /** - * Delete items from a cart - * Return is not used - */ - public function delete_cart($VAR,$cart) { - return; - } - - /** - * Validate items added to cart - */ - public function validate_cart($VAR,$cart) { - return true; - } - - /** - * Process a Service - */ - public function p_one($id) { - global $C_debug; - - $db = &DB(); - - /* Get the service details */ - $rs = $db->Execute(sqlSelect($db,'service','*',sprintf('id=::%s::',$id))); - if (! $rs || ! $rs->RecordCount()) - return false; - - $this->service = $rs->fields; - @$this->plugin_data = unserialize($this->service['prod_plugin_data']); - @$this->prod_attr_cart = unserialize($this->service['prod_attr_cart']); - - # Get the account details - $acct = $db->Execute(sqlSelect($db,'account','*',sprintf('id=::%s::',$this->service['account_id']))); - if ($acct && $acct->RecordCount()) - $this->account = $acct->fields; - - # Get the product details - if (! empty($this->service['product_id'])) { - $product = $db->Execute(sqlSelect($db,'product','*',sprintf('id = ::%s::',$this->service['product_id']))); - $this->product = $product->fields; - @$this->product_attr = unserialize($product->fields['prod_plugin_data']); - } - - # Determine the correct action - switch ($this->service['queue']) { - case 'new': - $result = $this->p_new(); - break; - - case 'active': - $result = $this->p_active(); - break; - - case 'inactive': - $result = $this->p_inactive(); - break; - - case 'edit': - if ($this->service['active'] == 1) - $this->p_active(); - else - $this->p_inactive(); - - $result = $this->p_edit(); - - break; - - case 'delete': - $result = $this->p_delete(); - - break; - - default: - $result = false; - } - - if ($result) { - $sql = sprintf("UPDATE %sservice SET queue='none', date_last=%s WHERE id =%s AND site_id=%s", - AGILE_DB_PREFIX,$db->qstr(time()),$db->qstr($rs->fields['id']),$db->qstr(DEFAULT_SITE)); - $db->Execute($sql); - - } else { - $C_debug->error($this->name.'php', $this->service['queue'], @$result); - } - } -} -?> diff --git a/modules/product/product.inc.php b/modules/product/product.inc.php deleted file mode 100644 index 4c0af71a..00000000 --- a/modules/product/product.inc.php +++ /dev/null @@ -1,804 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Modules:Product - */ - -/** - * The main AgileBill Product Class - * - * @package AgileBill - * @subpackage Modules:Product - */ -class product extends OSB_module { - # Holds the array of available attributes for the current product - private $attr = array(); - - /** - * Show the product details, used when an admin adds a product to a customers account - */ - public function admin_details($VAR) { - $this->session_id = SESS; - - if (! empty($VAR['account_id'])) { - $this->account_id = $VAR['account_id']; - $db = &DB(); - $rs = $db->Execute(sqlSelect($db,'session','id',sprintf('account_id=%s',$this->account_id))); - - if ($rs && $rs->RecordCount()) - $this->session_id = $rs->fields['id']; - } - - $this->details($VAR); - } - - public function details($VAR) { return $this->tmdetails($VAR); } - /** - * Show the product details to the user - used on the order form - */ - public function tmdetails($VAR) { - global $smarty, $C_auth; - - if (empty($VAR['id'])) - return false; - - # Able to view inactive items? - if (! $C_auth->auth_method_by_name('invoice','add')) - $active = ''; - else - $active = ' AND active=1'; - - $result = $this->sql_GetRecords(array('where'=>sprintf('id=%s%s',$VAR['id'],$active))); - if (! count($result)) - return false; - - $result = array_pop($result); - - # Check for group settings - $groups = unserialize($result['group_avail']); - $auth = false; - for ($ii=0; $iiauth_group_by_id($groups[$ii])) { - $auth = true; - - break; - } - } - - if (! $auth) - return false; - - # Define the DB vars as a Smarty accessible block - $smarty->assign('record',$result); - - # If trial, get the sku of the trial product: - if ($result['price_type'] == '2') { - $trial = $this->sql_GetRecords(array('where'=>array('id'=>$result['price_trial_prod']))); - - if (count($trial)) - $smarty->assign('trial',array_pop($trial)); - } - - # Get the best price for base, setup, & any attributes: - $this->price_arr($result); - $smarty->assign('price',$this->price); - - # Get any attributes & attribute pricing: - $this->attr_arr($VAR['id']); - $smarty->assign('attr',$this->attr); - - return true; - } - - /** - * Return the best price for a product, based on group details - * Determine the best price based on the base rate, not based on the best setup price. - * - * @param array Price Group Array - * @return array Best Price and Setup Price - */ - private function best_price($fields,$account,$recurr_schedule,$show=false) { - global $C_auth; - - $ret = array(); - @$g_ar = unserialize($fields['price_group']); - - if (is_array($g_ar)) { - $g_ar = $g_ar[$recurr_schedule]; - - if (count($g_ar) > 0) { - while (list($group,$vals) = each($g_ar)) { - if (! $show || (isset($g_ar['show']) && $g_ar['show'])) - if ($C_auth->auth_group_by_account_id($account,$group)) { - if ($vals['price_base'] != '' && (! isset($ret['base']) || $vals['price_base'] < $ret['base'])) { - $ret['base'] = $vals['price_base']; - $ret['setup'] = $vals['price_setup']; - } - } - } - } - } - - return $ret; - } - - /** - * Get Attribute values for product details page, sets $this->attr - * - * @param int $product_id The product id - */ - private function attr_arr($product_id) { - # Set the current account - if (empty($this->account_id)) - $this->account_id = SESS_ACCOUNT; - - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'product_attr','*',sprintf('product_id=::%s::',$product_id),'sort_order')); - if (! $result || $result->RecordCount() == 0) { - $this->attr = array(); - - return false; - } - - # Loop through each attribute to get the values - $i = 0; - while (! $result->EOF) { - $this->attr[$i]['id'] = $result->fields['id']; - $this->attr[$i]['type'] = $result->fields['collect_type']; - $this->attr[$i]['default'] = $result->fields['collect_default']; - $this->attr[$i]['name'] = $result->fields['name']; - $this->attr[$i]['description'] = $result->fields['description']; - $this->attr[$i]['required'] = $result->fields['required']; - - # Get the best base & setup price - $ret = $this->best_price(unserialize($result->fields['price_group'])); - $this->attr[$i]['price_base'] = $ret['base']; - $this->attr[$i]['price_setup'] = $ret['setup']; - - # If menu, get the menu values as an array - if ($result->fields['collect_type'] == '2') { - $pat = "\r\n"; - $tarr = false; - $marr = explode($pat,$result->fields['collect_default']); - - for ($ii=0; $ii'','base'=>0,'setup'=>0); - - } else { - # Populated line, determine base/setup price: - if (preg_match('/==/',$marr[$ii])) { - # Use custom prices - $marrp = explode('==',$marr[$ii]); - $tarr[] = array('name'=>@$marrp[0],'base'=>@$marrp[1],'setup'=>@$marrp[2]); - - } else { - # Use default prices - $tarr[] = array('name'=>$marr[$ii],'base'=>$ret['base'],'setup'=>$ret['setup']); - } - } - } - - $this->attr[$i]['default'] = $tarr; - } - - $result->MoveNext(); - $i++; - } - - return true; - } - -/** HERE **/ - /** - * Calculate the cost for the attributes in the cart - * - * @param array $fields The product record fields - * @param array $cart_attr The array of attributes in the cart - * @param int $recurr_schedule The recurring schedule, 0-5 - * @param int $account The account id - * @param bool $prorate Apply prorating or not - * @return array - */ - function price_attr($fields,$cart_attr,$recurr_schedule,$account=SESS_ACCOUNT,$prorate=true) { - global $C_auth; - - $ret['base'] = 0; - $ret['setup'] = 0; - $product_id = $fields['id']; - - # Get the vars: - if (! empty($cart_attr) && ! is_array($cart_attr)) - $cart_attr = unserialize($cart_attr); - if (! is_array($cart_attr)) - return false; - - # Get the attributes for this product - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'product_attr','*',sprintf('product_id=::%s::',$product_id),'sort_order')); - if (!$result || $result->RecordCount() == 0) { - $this->attr = false; - - return false; - } - - # Loop through each attribute to get the values & validate the input - $i = 0; - while (! $result->EOF) { - $calc = false; - reset($cart_attr); - - # Loop through each attribute defined in the cart - foreach ($cart_attr as $id=>$val) { - $menu_def = true; - - # If defined in the cart: - if (! empty($val) && is_numeric($id) && $id == $result->fields['id']) { - # Get the best base & setup price - $g_ar = unserialize($result->fields['price_group']); - $curr['base'] = $result->fields['price_base']; - $curr['setup'] = $result->fields['price_setup']; - - # If menu, get the base & setup amount from the selected item: - if ($result->fields['collect_type'] == '2') { - $marr = explode("\r\n",$result->fields['collect_default']); - # Loop through each menu option - for($ii=0;$iiattr[$i]['default'] = $tarr; - } - - # Determine best group pricing - if($menu_def) { - if($curr['base'] > 0 || $curr['setup'] > 0) { - if(count($g_ar) > 0) { - $idx = 0; - while (( (list ($group, $vals) = each ($g_ar)) && ($idx < 1) )) { - // check if better pricing exist for current group - if (is_numeric($group) && $C_auth->auth_group_by_account_id($account, $group)) { - // calculate the base price - if($vals['price_base'] != '' && $vals['price_base'] < $curr['base']) @$ret['base'] += $vals['price_base']; - else @$ret['base'] += $curr['base']; - // calculate the setup price - if($vals['price_setup'] != '' && $vals['price_setup'] < $curr['setup']) @$ret['setup'] += $vals['price_setup']; - else @$ret['setup'] += $curr['setup']; - $idx++; - } - } - } - } - } - } - } - $result->MoveNext(); - $i++; - } - - # check the subscription schedule and calculate actual rate for this schedule: - $arr = array(.23, 1, 3, 6, 12, 24, 36); - if($fields['price_recurr_type'] == 1) - $ret['base'] *= $arr[$recurr_schedule]; - - # check for any prorating for the selected schedule: - if($fields['price_recurr_type'] == 1 && $prorate==true) - $prorate = $this->prorate($recurr_schedule, $fields['price_recurr_weekday'], $fields['price_recurr_week']); - - # calculate the prorated recurring amount: - if (@$prorate > 0 && $ret['base'] > 0) $ret['base'] *= $prorate; - - return array('base' => @round($ret['base'],2), 'setup' => @$ret['setup']); - } - - /** - * Get the start & end of set billing schedules - * - * @param int $type Type of Recur - * @param int $weekday Day of Month for fixed billing - * @param int $week Unused - * @return array - * @todo $temp is a temporary hack to stop the rounding of the dates to the begining of the BILLING_WEEKDAY - */ - public function recurrDates($type,$weekday,$week,$period_date=false,$temp=false) { - # Make the period consistent, eg: Quarterly = Jan-Mar,Apr-Jun; HalfYearly = Jan-Jun,Jul-Dec - $strict = false; - $used_months = 0; - - # Round the time integer to a whole day. - if (! $period_date) - $period_date = strtotime('today'); - else - $period_date = strtotime(date('Y-m-d',$period_date)); - - switch ($type) { - # Weekly - case 0: - $period_end = $period_date+(86400*7); - return array('start'=>$period_date,'date'=>$period_date,'end'=>$period_end,'prorate'=>1); - - # Monthly - case 1: - $inc_months = 1; - break; - - # Quarterly - case 2: - # @todo Make this configurable. - $strict = true; - $inc_months = 3; - break; - - # Half Yearly - case 3: - # @todo Make this configurable. - $strict = true; - $inc_months = 6; - break; - - # Yearly - case 4: - $inc_months = 12; - break; - - # Biennial - case 5: - $inc_months = 24; - break; - - # Triennial - case 6: - $inc_months = 36; - break; - - default: - return false; - } - - if (is_null($weekday) && ! $temp) - $weekday = BILLING_WEEKDAY; - elseif ($temp) - $weekday = date('d',$period_date); - - if ($strict && $type > 0 && $type < 5) - $used_months = $inc_months-(($inc_months-(date('n',$period_date)%$inc_months))%$inc_months+1); - - $d = mktime(0,0,0,date('m',$period_date)-$used_months,$weekday,date('y',$period_date)); - if ($d <= $period_date) - $period_start = $d; - else - $period_start = mktime(0,0,0,date('m',$d)-1-$used_months,$weekday,date('y',$d)); - - $period_end = mktime(0,0,0,date('m',$period_start)+$inc_months,$weekday,date('y',$period_start)); - - $total_time = $period_end-$period_start; - $remain_time = $period_end-$period_date; - - return array('start'=>$period_start,'date'=>$period_date,'end'=>$period_end,'prorata'=>round($remain_time/$total_time,4)); - } - - /** - * Determine Prorate Amount - * - * @param int $type - * @param int $weekday - * @param int $week - * @return float - */ - public function prorate($type,$weekday,$week,$period_start=false) { - $arr = $this->recurrDates($type,$weekday,$week,$period_start); - - if (! $arr) - return 0; - else - return $arr['prorata']; - } - - /** - * Get the lowest price for one-time or recurring product fees - * - * @param array $fields array containing all product fields - */ - function price_arr($fields) { - global $C_auth; - - if (empty($this->account_id)) $this->account_id = SESS_ACCOUNT; - - $type = $fields['price_type']; - $g_ar = unserialize($fields["price_group"]); -//echo '
'.__METHOD__;print_r($fields);die();
-		if($type != "1")
-		{
-			# get the best base price (trial or one-time charges):
-			$ret['base']  = $fields["price_base"];
-			$ret['setup'] = $fields["price_setup"];
-
-			if(is_array($g_ar) && count($g_ar) > 0)
-			{
-				while (list ($group, $vals) = each ($g_ar))
-				{
-					if (is_numeric($group) && $C_auth->auth_group_by_account_id($this->account_id, $group))
-					{
-						if($this->group_pricing($group))
-						{
-							if($vals["price_base"] != "" || $vals["price_setup"] != "" )
-							{
-								if(!empty($vals["price_base"]) && $vals["price_base"] < $ret['base'])
-								$ret['base']= $vals["price_base"];
-								if(!empty($vals["price_setup"]) && $vals["price_setup"] <  $ret['setup'])
-								$ret['setup'] = $vals["price_setup"];
-							}
-						}
-					}
-				}
-			}
-			$this->price = $ret;
-		}
-		else
-		{
-			## Recurring charge, return best base/setup rates for all available payment schedules
-			if(is_array($g_ar) && count($g_ar) > 0)
-			{
-				for($i=0; $i$vals)
-					{
-						if($g_ar[$i]["show"] == "1")
-						{
-							if (is_numeric($group) && $C_auth->auth_group_by_account_id($this->account_id, $group))
-							{
-								if($this->group_pricing($group))
-								{
-									if($vals["price_base"] != "" || $vals["price_setup"] != "" )
-									{
-										if(empty($ret[$i]['base']) || $vals["price_base"] < $ret[$i]['base']) $ret["$i"]['base'] = $vals["price_base"];
-										if(empty($ret[$i]['setup']) || $vals["price_setup"] < $ret[$i]['setup']) $ret["$i"]['setup'] = $vals["price_setup"];
-									}
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-
-		$this->price = $ret;
-	}
-
-	/**
-	 * Check if alternate pricing is allowed for specified group
-	 *
-	 * @param int $group Group ID
-	 * @return bool
-	 */
-	private function group_pricing($group) {
-		$db = &DB();
-		$rs = $db->Execute(sqlSelect($db,'group','pricing',sprintf('id=%s',$group)));
-
-		if ($rs && $rs->fields['pricing']==1)
-			return true;
-	}
-
-	/**
-	 * Best Price for Product
-	 *
-	 * @param array $fields
-	 * @param array $recurr_schedule
-	 * @param int $account
-	 * @param bool $prorate
-	 * @return array
-	 */
-	function price_prod($fields,$recurr_schedule,$account=SESS_ACCOUNT,$prorate=true) {
-		switch ($fields['price_type']) {
-			# Recurring charge, return best base/setup rates for all available payment schedules
-			case 1:
-				# Check for any prorating for the selected schedule:
-				if ($fields['price_recurr_type'] == 1 && $prorate==true)
-					$prorate = $this->prorate($recurr_schedule,$fields['price_recurr_weekday'],$fields['price_recurr_week']);
-
-				$ret = $this->best_price($fields,$account,$recurr_schedule,true);
-
-				if (! count($ret))
-					return false;
-
-				# Calculate the prorated recurring amount:
-				if ($prorate > 0 && $ret['base'] > 0)
-					$ret['base'] *= $prorate;
-
-				break;
-
-			# Get the best base price (trial or one-time charges)
-			# @todo - need to optimise (call best_price())
-			default:
-				global $C_auth;
-
-				@$g_ar = unserialize($fields['price_group']);
-				if (! is_array($g_ar) || ! count($g_ar))
-					return false;
-
-				$ret['base']  = $fields['price_base'];
-				$ret['setup'] = $fields['price_setup'];
-
-				while (list($group,$vals) = each($g_ar)) {
-					if (is_numeric($group) && $C_auth->auth_group_by_account_id($account,$group)) {
-						if ($this->group_pricing($group)) {
-							if ($vals['price_base'] != '' && $vals['price_base'] < $ret['base'])
-								$ret['base']= $vals['price_base'];
-							if ($vals['price_setup'] != '' && $vals['price_setup'] <  $ret['setup'])
-								$ret['setup'] = $vals['price_setup'];
-						}
-					}
-				}
-
-		}
-
-		return array('base'=>round($ret['base'],2),'setup'=>$ret['setup']);
-	}
-
-	/**
-	 * Get the lowest (recurring) price
-	 *
-	 * @param array $fields
-	 * @param int $account
-	 * @return array Recurring Price
-	 */
-	function price_recurr_arr($fields, $account) {
-		global $C_auth;
-		$g_ar = unserialize($fields["price_group"]);
-		if(count($g_ar) > 0) {
-			for($i=0; $iauth_group_by_account_id($account,$group)) {
-							if($vals["price_base"] != "")
-								if(empty($ret[$i]['base']) || $vals["price_base"] < $ret[$i]['base']) $ret[$i]['base'] = $vals["price_base"];
-
-							if($vals["price_setup"] != "")
-								if(empty($ret[$i]['setup']) || $vals["price_setup"] < $ret[$i]['setup']) $ret[$i]['setup'] = $vals["price_setup"];
-						}
-					}
-				}
-			}
-		}
-		return $ret;
-	}
-
-	/**
-	 * Clone Existing Product
-	 */
-	function cloner($VAR)
-	{
-		global $C_debug, $C_translate;
-
-		$product_id = $VAR['id'];
-		$sku = $VAR['product_sku'];
-		$p   = AGILE_DB_PREFIX;
-
-		if(empty($product_id) || empty($sku)) {
-			$C_debug->alert( $C_translate->translate('clone_error', 'product',''));
-			return false;
-		}
-
-		$db = &DB();
-		$dbc= new CORE_database;
-
-		# Get current product details
-		$sql = $dbc->sql_select("product", "*", "id = $product_id", "", $db);
-		$result = $db->Execute($sql);
-
-		# Clone product
-		$new_prod_id = $db->GenID(AGILE_DB_PREFIX.'product_id');
-		$sql = "INSERT INTO {$p}product SET
-    				id  = $new_prod_id,
-    				sku = " . $db->qstr($sku);
-		while(list($field,$value) = each($result->fields)) {
-			if($field != 'sku' && $field != 'id' && !is_numeric($field) )
-			$sql .= ",$field = ".$db->qstr($value);
-		}
-		$result = $db->Execute($sql);
-
-		# Get current translation
-		$sql = $dbc->sql_select("product_translate", "*", "product_id = $product_id", "", $db);
-		$result = $db->Execute($sql);
-
-		# Clone translation
-		while(!$result->EOF)
-		{
-			$id = $db->GenID(AGILE_DB_PREFIX.'product_translate_id');
-			$sql = "INSERT INTO {$p}product_translate SET
-	    				id  = $id,
-	    				product_id = $new_prod_id";
-			while(list($field,$value) = each($result->fields)) {
-				if($field != 'product_id' && $field != 'id' && !is_numeric($field)  )
-				$sql .= ",$field = ".$db->qstr($value);
-			}
-			$db->Execute($sql);
-			$result->MoveNext();
-		}
-
-		# Get current attributes
-		$sql = $dbc->sql_select("product_attr", "*", "product_id = $product_id", "", $db);
-		$result = $db->Execute($sql);
-
-		# Clone attributes
-		while(!$result->EOF)
-		{
-			$id = $db->GenID(AGILE_DB_PREFIX.'product_attr_id');
-			$sql = "INSERT INTO {$p}product_attr SET
-	    				id  = $id,
-	    				product_id = $new_prod_id";
-			while(list($field,$value) = each($result->fields)) {
-				if($field != 'product_id' && $field != 'id' && !is_numeric($field) )
-				$sql .= ",$field = ".$db->qstr($value);
-			}
-			$db->Execute($sql);
-			$result->MoveNext();
-		}
-
-		$msg = $C_translate->translate('clone_success', 'product','');
-		$C_debug->alert( ''. $msg .'');
-		return $new_prod_id;
-	}
-
-	function add($VAR)  {
-		# defaults for 'recurring' product
-		if($VAR["product_price_type"] == "1")
-		{
-			$VAR['product_price_recurr_default'] = "1";
-			$VAR['product_price_recurr_type'] = "0";
-			$VAR['product_price_recurr_week'] = "1";
-			$VAR['product_price_recurr_weekday'] = "1";
-
-			# Set default recurring prices: (monthly only)
-			$db     = &DB();
-			$sql    = 'SELECT id FROM ' . AGILE_DB_PREFIX . 'group WHERE
-                            site_id             = ' . $db->qstr(DEFAULT_SITE) . ' AND
-                            pricing		        = ' . $db->qstr('1');
-			$rs = $db->Execute($sql);
-			while(!$rs->EOF) {
-				$i = $rs->fields['id'];
-				$recur_price[0][$i]['price_base']  = '';
-				$recur_price[0][$i]['price_setup'] = '';
-				@$recur_price[1][$i]['price_base'] = $VAR['product_price_base'];
-				@$recur_price[1][$i]['price_setup'] = $VAR['product_price_setup'];
-				$recur_price[2][$i]['price_base']  = '';
-				$recur_price[2][$i]['price_setup'] = '';
-				$recur_price[3][$i]['price_base']  = '';
-				$recur_price[3][$i]['price_setup'] = '';
-				$recur_price[4][$i]['price_base']  = '';
-				$recur_price[4][$i]['price_setup'] = '';
-				$recur_price[5][$i]['price_base']  = '';
-				$recur_price[5][$i]['price_setup'] = '';
-				$rs->MoveNext();
-			}
-			$recur_price[0]['show'] = "0";
-			$recur_price[1]['show'] = "1";
-			$recur_price[2]['show'] = "0";
-			$recur_price[3]['show'] = "0";
-			$recur_price[4]['show'] = "0";
-			$recur_price[5]['show'] = "0";
-			@$VAR['product_price_group'] = $recur_price;
-		}
-
-		# Defaults for product groups:
-		$VAR['product_group_avail'] = array('0');
-
-#		$this->product_construct();
-		$type 		= "add";
-		$this->method["$type"] = explode(",", $this->method["$type"]);
-		$db 		= new CORE_database;
-		$result 	= $db->add($VAR, $this, $type);
-
-		# Create a translate record for this product:
-		if($result) {
-			$db     = &DB();
-			$id     = $db->GenID(AGILE_DB_PREFIX . 'product_translate_id');
-			$sql    = 'INSERT INTO ' . AGILE_DB_PREFIX . 'product_translate SET
-                            site_id             = ' . $db->qstr(DEFAULT_SITE) . ',
-                            id                  = ' . $db->qstr($id) . ',
-                            product_id          = ' . $db->qstr($result) . ',
-                            language_id         = ' . $db->qstr(DEFAULT_LANGUAGE) . ',
-                            name                = ' . $db->qstr(@$VAR["translate_name"]) . ',
-                            description_short   = ' . $db->qstr(@$VAR["translate_description_short"]) . ',
-                            description_full    = ' . $db->qstr(@$VAR["translate_description_full"]);
-			$db->Execute($sql);
-		}
-	}
-
-	function update($VAR) {
-		global $_FILES;
-		$imgarr = array('jpeg','jpg','gif','bmp','tif','tiff','png');
-		if(isset($_FILES['upload_file1']) && $_FILES['upload_file1']['size'] > 0)
-		{
-			for($i=0; $iproduct_construct();
-		$type = "update";
-		$this->method["$type"] = explode(",", $this->method["$type"]);
-		$db = new CORE_database;
-		$result = $db->update($VAR, $this, $type);
-
-		### Copy the thumbnail
-		if($result && isset($filename))
-		{
-			### Copy 1ST file upoad:
-			copy($_FILES['upload_file1']['tmp_name'], PATH_IMAGES . "" . $filename);
-		}
-	}
-
-	function delete($VAR) {
-		$this->associated_DELETE =
-		array(
-		array( 'table' => 'product_translate', 'field' => 'product_id'),
-		array( 'table' => 'product_attr', 		'field' => 'product_id'),
-		array( 'table' => 'product_img', 		'field' => 'product_id')
-		);
-#		$this->product_construct();
-		$db = new CORE_database;
-		$db->mass_delete($VAR, $this, "");
-	}
-
-	public function getTranslateField($field) {
-		static $CACHE = array();
-
-		if (! $id = $this->getRecordAttr('id'))
-			return null;
-
-		if (! isset($CACHE[$id][$field])) {
-			$db = &DB();
-			$rs = $db->Execute(sqlSelect('product_translate',$field,array('where'=>array('product_id'=>$id))));
-	
-			if ($rs && $rs->RecordCount() && isset($rs->fields[$field]))
-				$CACHE[$id][$field] = $rs->fields[$field];
-			else
-				$CACHE[$id][$field] = null;
-		}
-
-		return $CACHE[$id][$field];
-	}
-}
-?>
diff --git a/modules/product/product_construct.xml b/modules/product/product_construct.xml
deleted file mode 100644
index 8f2ded6d..00000000
--- a/modules/product/product_construct.xml
+++ /dev/null
@@ -1,271 +0,0 @@
-
-
-	
-	product
-	
-	product
- - - - 0 - - sku - - 25 - - 0 - - - - sku - active - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - - date-now - Date Created - I8 - - - - date-now - Date Updated - I8 - - - C(32) - 1 - 1 - 32 - alphanumeric - SKU - - - L - - - - Status - L - - - I4 - - - L - - - X2 - any - array - 1 - - - C(255) - any - array - 1 - - - - Hosting - L - - - - Hosting Server - I4 - - - X2 - array - - - - Allow Domain Purchases with this Hosting Plan? - L - - - - Allow Purchases without a domain? - L - - - - array - Discount the following TLDs - X2 - - - - Domain Purchase Discount Amount - F - - - L - - - F - - - - I4 - - - Base Price - F - 1 - 32 - float - - - F - - - X2 - array - - - Default Billing Schedule - I4 - - - - Recurring Billing Schedule - L - - - Day of Month to Bill - I4 - - - I4 - - - L - - - L - - - I4 - - - I4 - - - I4 - product - sku - - - X2 - product - sku - array - - - I4 - - - X2 - product - sku - array - 1 - - - X2 - array - - - I4 - - - I4 - - - Product Thumbnail - C(128) - - - L - - - C(128) - - - X2 - array - - - L - - - L - - - X2 - array - - - - - - sku,taxable,active,group_avail,avail_category_id,discount,price_type,price_base,price_setup,price_group,price_recurr_type,price_recurr_weekday,price_recurr_week,price_recurr_default - id,date_last,sku,taxable,active,group_avail,position,cart_multiple,avail_category_id,discount,discount_amount,price_type,price_base,price_setup,price_group,price_recurr_type,price_recurr_weekday,price_recurr_week,price_recurr_schedule,price_recurr_cancel,price_trial_length_type,price_trial_length,price_trial_prod,assoc_req_prod,assoc_req_prod_type,assoc_grant_prod,assoc_grant_group,assoc_grant_group_type,assoc_grant_group_days,thumbnail,price_recurr_default,host,host_server_id,host_provision_plugin_data,host_allow_domain,host_allow_host_only,host_discount_tld,host_discount_tld_amt,prod_plugin,prod_plugin_file,prod_plugin_data,price_recurr_modify,modify_waive_setup,modify_product_arr - id - id,date_orig,date_last,sku,taxable,active,group_avail,position,cart_multiple,avail_category_id,discount,discount_amount,price_type,price_base,price_setup,price_group,price_recurr_type,price_recurr_weekday,price_recurr_week,price_recurr_schedule,price_recurr_cancel,price_trial_length_type,price_trial_length,price_trial_prod,assoc_req_prod,assoc_req_prod_type,assoc_grant_prod,assoc_grant_group,assoc_grant_group_type,assoc_grant_group_days,thumbnail,price_recurr_default,host,host_server_id,host_provision_plugin_data,host_allow_domain,host_allow_host_only,host_discount_tld,host_discount_tld_amt,prod_plugin,prod_plugin_file,prod_plugin_data,price_recurr_modify,modify_waive_setup,modify_product_arr - id,date_orig,date_last,sku,taxable,active,group_avail,position,cart_multiple,avail_category_id,price_type,price_recurr_schedule,price_recurr_cancel,price_base,price_setup - - - - - - - - <view>Products</view> - - - - - - - id - checkbox - 25px - - - sku - - - price_base - - - active - 20px - - - description - 48% - - - 20px - - - -
diff --git a/modules/product/product_install.xml b/modules/product/product_install.xml deleted file mode 100644 index 195e21d9..00000000 --- a/modules/product/product_install.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - Products - - 1 - - product - - - - product - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - admin_details - - - cloner - - - diff --git a/modules/product/product_install_data.xml b/modules/product/product_install_data.xml deleted file mode 100644 index 9649a8c9..00000000 --- a/modules/product/product_install_data.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - 2 - 1 - 1132443241 - 1132443241 - SAMPLE1 - 1 - 1 - - - 0 - 1 - 10 - 10 - - 1 - 0 - 1 - 1 - - - 2 - - \ No newline at end of file diff --git a/modules/product_attr/product_attr.inc.php b/modules/product_attr/product_attr.inc.php deleted file mode 100644 index 7a9f7893..00000000 --- a/modules/product_attr/product_attr.inc.php +++ /dev/null @@ -1,125 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class product_attr -{ - - # Open the constructor for this mod - function product_attr() - { - # name of this module: - $this->module = "product_attr"; - - # 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"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->add($VAR, $this, $type); - } - - ############################## - ## VIEW ## - ############################## - function view($VAR) - { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - ############################## - ## UPDATE ## - ############################## - function update($VAR) - { - $type = "update"; - $this->method["$type"] = explode(",", $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"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_form($VAR, $this, $type); - } - - ############################## - ## SEARCH ## - ############################## - function search($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search($VAR, $this, $type); - } - - ############################## - ## SEARCH SHOW ## - ############################## - - function search_show($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_show($VAR, $this, $type); - } -} -?> \ No newline at end of file diff --git a/modules/product_attr/product_attr_construct.xml b/modules/product_attr/product_attr_construct.xml deleted file mode 100644 index f639c737..00000000 --- a/modules/product_attr/product_attr_construct.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - product_attr - - product_attr
- - product - - 0 - - sort_order,name - - 25 - - 0 - - - - product_id - collect_type - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - I4 - 1 - - - C(32) - 1 - 32 - any - - - C(255) - - - I4 - - - I4 - - - C(255) - - - L - - - F - 1 - 32 - float - - - F - - - X2 - array - - - - - - name,description,collect_type,collect_default,price_base,price_setup,price_group,product_id - id,name,description,sort_order,collect_type,collect_default,price_base,price_setup,price_group,product_id,required - id - id,name,description,sort_order,collect_type,collect_default,price_base,price_setup,price_group,product_id,required - id,name,sort_order,collect_type,collect_default,price_base,price_group,product_id,required - - - - - - - - - - - - -
diff --git a/modules/product_attr/product_attr_install.xml b/modules/product_attr/product_attr_install.xml deleted file mode 100644 index d6a59940..00000000 --- a/modules/product_attr/product_attr_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - product - - - - 0 - - product_attr - - - - product - - - - - - - - - - add - - - - delete - - - - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/product_cat/product_cat.inc.php b/modules/product_cat/product_cat.inc.php deleted file mode 100644 index caae861b..00000000 --- a/modules/product_cat/product_cat.inc.php +++ /dev/null @@ -1,367 +0,0 @@ - - * @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 - * @package AgileBill - * @subpackage Module:Product - */ - -/** - * The main AgileBill Product Category Class - * - * @package AgileBill - * @subpackage Module:Product - */ -class product_cat extends OSB_module { - /** - * User Menu - * List the available categories - */ - public function user_menu($VAR) { - global $smarty,$C_auth; - - $db = &DB(); - $result = $db->Execute(sqlSelect($db,'product_cat','*','status=1 AND (parent_id=0 OR parent_id IS NULL OR parent_id=id)','position')); - $smart = array(); - - if ($result->RecordCount() == 0) { - return false; - - } else { - while (! $result->EOF) { - # Check for group settings: - $groups = unserialize($result->fields['group_avail']); - - $auth = false; - for ($ii=0; $iiauth_group_by_id($groups[$ii])) - $auth = true; - } - - if ($auth) { - # Create the array for smarty - array_push($smart,$result->fields); - $i++; - } - - $result->MoveNext(); - } - - $smarty->assign('product_cat',$smart); - } - } - - /** - * User view a category - */ - public function user_view($VAR) { - global $smarty,$C_auth; - - $db = &DB(); - - # Get the category information: - $result = $db->Execute(sqlSelect($db,'product_cat','id,position,template,name,thumbnail,group_avail,parent_id,max',array('status'=>1,'id'=>$VAR['id']))); - - if (! $result || $result->RecordCount() == 0) { - return false; - - } else { - # Check for group settings - $groups = unserialize($result->fields['group_avail']); - - # Max results per page: - $max = $result->fields['max']; - - if (empty($max)) - $max = 25; - - if (empty($VAR['page']) || ! is_numeric($VAR['page']) || $VAR['page'] <= 1) { - $page = 1; - $start = 0; - - } else { - $page = $VAR['page']; - $start = ($page-1)*$max; - } - - $auth = false; - for ($ii=0; $iiauth_group_by_id($groups[$ii])) - $auth = true; - } - - if ($auth) - $smarty->assign('product_cat_arr',array($result->fields)); - else - return false; - - $parent_id = $result->fields['parent_id']; - if (! $parent_id) - $parent_id = '0'; - } - - # Get the items in this category: - $result = $db->Execute(sqlSelect($db,'product','id,sku,thumbnail,avail_category_id,price_base,price_setup,group_avail',array('active'=>1),'position,sku')); - if (! $result || $result->RecordCount() == 0) { - return false; - - } else { - $count = 0; - $smart_prod = array(); - while (! $result->EOF) { - # check that this item can be displayed in the current category: - $cat = false; - $cats = unserialize($result->fields['avail_category_id']); - for ($i=0; $ifields['group_avail']); - - $auth = false; - for ($ii=0; $iiauth_group_by_id($groups[$ii])) { - $auth = true; - break; - } - } - - # Paging - if ($auth) { - if ($count >= $start && $count < $max*$page) - array_push($smart_prod,$result->fields); - $count++; - } - } - $result->MoveNext(); - } - - $results = $count; - $pages = intval($results / $max); - if ($results % $max) - $pages++; - - for ($i=1;$i<=$pages;$i++) - $pagearr[$i] = $i; - - $smarty->assign('product_arr',$smart_prod); - $smarty->assign('page_page',$page); - $smarty->assign('page_results',$results); - $smarty->assign('page_pages',$pages); - $smarty->assign('page_arr',$pagearr); - } - - # Get any sub-categories: - $result = $db->Execute($q=sqlSelect($db,'product_cat','*',array('status'=>1,'parent_id'=>$VAR['id']),'position,name')); - $smart_sub_cat = array(); - - if ($result && $result->RecordCount()) { - while (! $result->EOF) { - array_push($smart_sub_cat,$result->fields); - $result->MoveNext(); - } - - $smarty->assign('product_sub_cat',$smart_sub_cat); - } - - # Get any parent categores: - $smart_parent_cat = array(); - for ($i=0; $i<=5; $i++) { - if ($parent_id > 0 ) { - # Get parent id & add to array - $result = $db->Execute(sqlSelect($db,array('product_cat','product_cat_translate'),'A.id,A.parent_id,A.template,B.name',array('A.id'=>$parent_id,'B.product_cat_id'=>$parent_id,'B.language_id'=>SESS_LANGUAGE))); - if ($result && $result->RecordCount()) { - $parent_id = $result->fields['parent_id']; - array_push($smart_parent_cat,$result->fields); - } - } - } - - $smart_parent_cat = array_reverse($smart_parent_cat); - - # Get the current category: - $result = $db->Execute(sqlSelect($db,array('product_cat','product_cat_translate'),'A.id,A.parent_id,A.template,B.name',array('A.id'=>$VAR['id'],'B.product_cat_id'=>$VAR['id'],'B.language_id'=>SESS_LANGUAGE))); - if ($result && $result->RecordCount()) - $smart_parent_cat[] = $result->fields; - - $smarty->assign('parent_cat',$smart_parent_cat); - } - - /** - * This function will build a nested option list - * showing the heirachy of the product categories - * - * @see tpl_admin_menu_parent - */ - private function build_nested_option_list($arr,$start,$level,$current) { - $option = ''; - - for ($i=0; $i%s',$id,$sel,$arr[$start][$i]['name']); - else - $option .= sprintf('',$id,$sel,str_repeat(' ',$level-1),$arr[$start][$i]['name']); - - if (isset($arr[$id])) - $option .= $this->build_nested_option_list($arr,$id,$level+1,$current); - } - - return $option; - } - - /** - * Select a parent for a category - */ - public function tpl_admin_menu_parent($VAR) { - global $smarty,$C_auth; - - $db = &DB(); - - # Get current id - if (! empty($VAR['id'])) - $cid = str_replace(',','',$VAR['id']); - else - $current = ''; - - # Loop and put in array - $result = $db->Execute(sqlSelect($db,'product_cat','*','','parent_id,position,name')); - - while (! $result->EOF) { - if ($result->fields['parent_id'] == '' || $result->fields['parent_id'] == 0 || $result->fields['parent_id'] == $result->fields['id']) - $arr[0][] = $result->fields; - else - $arr[$result->fields['parent_id']][] = $result->fields; - - # get current parent_id - if ($cid > 0 && $result->fields['id'] == $cid) - $current = $result->fields['parent_id']; - - $result->MoveNext(); - } - - # Create menu - echo ''; - } - - /** - * Select a product category for a product - */ - public function tpl_admin_menu_product($VAR) { - global $smarty,$C_auth; - - $db = &DB(); - $dbc = new CORE_database; - - # Get current category id - if (! empty($VAR['id'])) { - $product_id = str_replace(',','',$VAR['id']); - $product = $db->Execute(sqlSelect($db,'product','avail_category_id',array('id'=>$product_id))); - $current = unserialize($product->fields['avail_category_id']); - - } else { - $current = ''; - } - - # Loop and put in array - $result = $db->Execute(sqlSelect($db,'product_cat','*','','parent_id,position,name')); - - while (! $result->EOF) { - # Determine if selected - $select = false; - for ($ix=0; $ixfields['id']) { - $result->fields['sel'] = 'selected'; - break; - } - } - - # set array - if ($result->fields['parent_id'] == '' || $result->fields['parent_id'] == 0 || $result->fields['parent_id'] == $result->fields['id']) - $arr[0][] = $result->fields; - else - $arr[$result->fields['parent_id']][] = $result->fields; - - $result->MoveNext(); - } - - # Create menu - echo ''; - } - - /** - * Update an entry - */ - public function update($VAR) { - global $_FILES; - - # Validate the thumbnail upload - if (isset($_FILES['upload_file1']) && $_FILES['upload_file1']['size'] > 0) - $VAR['product_cat_thumbnail'] = sprintf('cat_thmb_%s',$_FILES['upload_file1']['name']); - elseif ($VAR['delthumb'] == 1) - $VAR['product_cat_thumbnail'] = ''; - - # Validate the image upload - if (isset($_FILES['upload_file2']) && $_FILES['upload_file2']['size'] > 0) - $VAR['product_cat_image'] = sprintf('cat_img_%s',$_FILES['upload_file2']['name']); - elseif ( $VAR['delimg'] == 1 ) - $VAR['product_cat_image'] = ''; - - $result = parent::update($VAR); - - # Copy the image(s) - if ($result) { - # Copy 1ST file upload - if (isset($_FILES['upload_file1']) && $_FILES['upload_file1']['size'] > 0) - copy($_FILES['upload_file1']['tmp_name'],sprintf('%scat_thmb_%s',PATH_IMAGES,$_FILES['upload_file1']['name'])); - - # Copy the 2ND file upload - if (isset($_FILES['upload_file2']) && $_FILES['upload_file2']['size'] > 0) - copy($_FILES['upload_file2']['tmp_name'],sprintf('%scat_img_',PATH_IMAGES,$_FILES['upload_file2']['name'])); - } - } - - /** - * Delete an Entry - */ - public function delete($VAR) { - $this->associated_DELETE = array(); - - array_push($this->associated_DELETE,array('table' =>'product_cat_translate','field'=>'product_cat_id')); - - parent::delete($VAR); - } -} -?> diff --git a/modules/product_cat/product_cat_construct.xml b/modules/product_cat/product_cat_construct.xml deleted file mode 100644 index 5c557ac6..00000000 --- a/modules/product_cat/product_cat_construct.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - product_cat - - product_cat
- - product - - 0 - - position - - 25 - - 0 - - - - status - position - name - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - I4 - Parent - - - X2 - array - any - Available to Groups - - - C(32) - 2 - 32 - any - Category - - - C(255) - Notes - - - L - Active - - - - C(128) - Image Thumbnail - - - C(128) - Image - - - I4 - Position - - - I4 - numeric - Max Entries to Display - - - - - - name,max,template,group_avail - id,name,notes,status,template,thumbnail,image,position,max,group_avail,parent_id - id - id,name,notes,status,template,thumbnail,image,position,max,group_avail,parent_id - id,name,notes,status,template,thumbnail,image,position,max,group_avail,parent_id - - - - - - - - <add>Add Product Category</add> - <view>Product Categories</view> - - - - - - - id - checkbox - 25px - - - name - - - status - bool - 20px - - - -
diff --git a/modules/product_cat/product_cat_install.xml b/modules/product_cat/product_cat_install.xml deleted file mode 100644 index b30ba66d..00000000 --- a/modules/product_cat/product_cat_install.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - product - - Product Category - - 1 - - product_cat - - - - product - - - - - - - - - - Add - 1 - add - - - - delete - - - - List - 1 - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/product_cat/product_cat_install_data.xml b/modules/product_cat/product_cat_install_data.xml deleted file mode 100644 index 121f4937..00000000 --- a/modules/product_cat/product_cat_install_data.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - 1 - 1 - 0 - - Sample Directory - You can edit this category as needed - 1 - - 1 - 10 - - - 8 - - \ No newline at end of file diff --git a/modules/product_cat_translate/product_cat_translate.inc.php b/modules/product_cat_translate/product_cat_translate.inc.php deleted file mode 100644 index 87c574b2..00000000 --- a/modules/product_cat_translate/product_cat_translate.inc.php +++ /dev/null @@ -1,23 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class product_cat_translate extends OSB_module { -} -?> diff --git a/modules/product_cat_translate/product_cat_translate_construct.xml b/modules/product_cat_translate/product_cat_translate_construct.xml deleted file mode 100644 index c8faaeac..00000000 --- a/modules/product_cat_translate/product_cat_translate_construct.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - product_cat_translate - - product_cat_translate
- - product - - 0 - - product_cat_id - - 25 - - 0 - - - - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - I4 - product_cat - name - any - - - C(16) - - - C(128) - 2 - 128 - any - - - X2 - any - 1 - - - - - - product_cat_id,language_id,name,description - product_cat_id,language_id,name,description - id - id,product_cat_id,language_id,name,description - id,product_cat_id,language_id,name - - - - - - - - - - - - -
diff --git a/modules/product_cat_translate/product_cat_translate_install.xml b/modules/product_cat_translate/product_cat_translate_install.xml deleted file mode 100644 index 7cf7a2bb..00000000 --- a/modules/product_cat_translate/product_cat_translate_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - product_cat - - - - 0 - - product_cat_translate - - - - product_cat - - - - - - - - - - add - - - - delete - - - - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/product_cat_translate/product_cat_translate_install_data.xml b/modules/product_cat_translate/product_cat_translate_install_data.xml deleted file mode 100644 index d0b96682..00000000 --- a/modules/product_cat_translate/product_cat_translate_install_data.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - 2 - 1 - 1 - en - Sample Directory - links, - images, font sizes and colors, - etc...]]> - - - 3 - 1 - 5 - en - Membership - View our selection of memberships - - - 5 - 1 - 7 - en - test - test - - - - 6 - - diff --git a/modules/product_img/product_img.inc.php b/modules/product_img/product_img.inc.php deleted file mode 100644 index f0e0fc7a..00000000 --- a/modules/product_img/product_img.inc.php +++ /dev/null @@ -1,195 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -class product_img -{ - - # Open the constructor for this mod - function product_img() - { - # name of this module: - $this->module = "product_img"; - - # 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) - { - global $_FILES, $C_translate, $C_debug; - - $imgarr = Array('jpeg','jpg','gif','bmp','tif','tiff','png'); - - if(isset($_FILES['upload_file1']) && $_FILES['upload_file1']['size'] > 0) - { - for($i=0; $imethod["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $result = $db->add($VAR, $this, $type); - - # copy the image - if($result && !empty($filename)) - { - $file = 'prod_img_' . $result . '.' . $filename; - copy($_FILES['upload_file1']['tmp_name'], PATH_IMAGES . "" . $file); - } - } - - ############################## - ## VIEW ## - ############################## - function view($VAR) - { - $type = "view"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->view($VAR, $this, $type); - } - - - ############################## - ## DELETE ## - ############################## - function delete($VAR) - { - $db = &DB(); - - ### Delete any saved images: - if(isset($VAR["delete_id"])) - { - $id = explode(',',$VAR["delete_id"]); - } - elseif (isset($VAR["id"])) - { - $id = explode(',',$VAR["id"]); - } - - for($i=0; $ifields['url']); - } - - # delete the record - $sql = 'DELETE FROM ' . AGILE_DB_PREFIX . 'product_img WHERE - site_id = ' . $db->qstr(DEFAULT_SITE) . ' AND - id = ' . $db->qstr($id[$i]); - $result = $db->Execute($sql); - } - } - } - - - # Alert delete message - global $C_debug, $C_translate; - $C_translate->value["CORE"]["module_name"] = $C_translate->translate('name',$this->module,""); - $message = $C_translate->translate('alert_delete_ids',"CORE",""); - $C_debug->alert($message); - } - - - ############################## - ## SEARCH ## - ############################## - function search($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search($VAR, $this, $type); - } - - ############################## - ## SEARCH SHOW ## - ############################## - - function search_show($VAR) - { - $type = "search"; - $this->method["$type"] = explode(",", $this->method["$type"]); - $db = new CORE_database; - $db->search_show($VAR, $this, $type); - } - -} -?> \ No newline at end of file diff --git a/modules/product_img/product_img_construct.xml b/modules/product_img/product_img_construct.xml deleted file mode 100644 index dd12e407..00000000 --- a/modules/product_img/product_img_construct.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - product_img - - product_img
- - product - - 0 - - product_id - - 25 - - 0 - - - - product_id - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - I4 - - - L - - - C(255) - - - C(128) - - - - - - id,site_id,product_id,type,url,name - id,site_id,product_id,type,url,name - id,site_id,product_id,type,url,name - id,site_id,product_id,type,url,name - id,site_id,product_id,type,url,name - - - - - - - - - - - - -
diff --git a/modules/product_img/product_img_install.xml b/modules/product_img/product_img_install.xml deleted file mode 100644 index b5860249..00000000 --- a/modules/product_img/product_img_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - product - - - - 0 - - product_img - - - - product - - - - - - - - - - add - - - - delete - - - - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/product_translate/product_translate.inc.php b/modules/product_translate/product_translate.inc.php deleted file mode 100644 index b15ae65c..00000000 --- a/modules/product_translate/product_translate.inc.php +++ /dev/null @@ -1,32 +0,0 @@ - - * @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 - * @package AgileBill - */ - -/** - * The main AgileBill Product Translate Class - * - * @package AgileBill - * @subpackage Module:Product - */ -class product_translate extends OSB_module { -} -?> diff --git a/modules/product_translate/product_translate_construct.xml b/modules/product_translate/product_translate_construct.xml deleted file mode 100644 index b04f308f..00000000 --- a/modules/product_translate/product_translate_construct.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - product_translate - - product_translate
- - product - - 0 - - product_id - - 25 - - 0 - - - - product_id - language_id - name - - - - - - - 1 - I4 - 1 - - - - 1 - I4 - - - I4 - product - sku - any - - - C(16) - - - Name - 1 - 128 - C(128) - any - - - Short Description - 1 - X2 - - - Full Description - X2 - 1 - - - - Email Template - X2 - - - - - - product_id,language_id,name,description_short,description_full,email_template - id,product_id,language_id,name,description_short,description_full,email_template - id - id,product_id,language_id,name,description_short,description_full,email_template - id,product_id,language_id,name,description_short,description_full,email_template - - - - - - - - - - - - - - id - checkbox - 25px - - - language_id - - - name - - - -
diff --git a/modules/product_translate/product_translate_install.xml b/modules/product_translate/product_translate_install.xml deleted file mode 100644 index 3d8c06bf..00000000 --- a/modules/product_translate/product_translate_install.xml +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - product - - - - 0 - - product_translate - - - - product - - - - - - - - - - add - - - - delete - - - - search - - - - - search_form - - - - search_show - - - - update - - - - view - - - - diff --git a/modules/product_translate/product_translate_install_data.xml b/modules/product_translate/product_translate_install_data.xml deleted file mode 100644 index c9795ded..00000000 --- a/modules/product_translate/product_translate_install_data.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - 2 - 1 - 2 - en - Sample Product - - This is just a sample product, edit as needed or delete. - - - - 2 - - diff --git a/modules/report/class.Level.php b/modules/report/class.Level.php deleted file mode 100644 index 8fffa4da..00000000 --- a/modules/report/class.Level.php +++ /dev/null @@ -1,1057 +0,0 @@ - and Thralling Penguin, LLC - * @package AgileBill - * @version 1.4.93 - */ - -class LevelGraph extends Level_Base { - - var $lev_setting; - var $lev_items; - var $SQL_filtered; - var $group_level; - var $grouping_criteria; - var $formatter; - var $graph; - var $plotarea; - var $dataset; - var $canvas; - - function LevelGraph ( - $title = '', - $width=800, - $height=300, - $type='bar', - $direction = 'vertical', - $x_angle = 90) - { - if(!strlen($direction)) $direction = 'vertical'; - - $this->lev_setting = array( - "title" => $title, - "width" => $width, - "height" => $height, - "y_label_angle" => 0, - "x_label_angle" => intval($x_angle), - "type" => $type, - "direction" => $direction, - "SQL_criteria" => '' - ); - } - - function addDataset ($SQL_select, $SQL_criteria='', $SQL_order='') - { - $this->dataset[] = array( - "SQL_select" => $SQL_select, - "SQL_criteria" => $SQL_criteria, - "SQL_order" => $SQL_order - ); - } - - function display ($grouping_criteria = Null, $grouping_aggregate = Null, &$formatter) - { - $this->formatter =& $formatter; - $this->formatter->setLevel($this); - $this->grouping_criteria = $grouping_criteria; - $this->grouping_aggregate = $grouping_aggregate; - - $this->group_level = false; - if (count($this->lev_items) > 0) { - $this->group_level = true; - } - - set_include_path(get_include_path().PATH_SEPARATOR.PATH_INCLUDES."pear"); - include_once 'Image/Graph.php'; - include_once 'Image/Canvas.php'; - - $this->canvas =& Image_Canvas::factory('png', array( - 'width' => $this->lev_setting["width"], - 'height' => $this->lev_setting["height"], - 'antialias' => 'native' - )); - - $this->graph =& Image_Graph::factory('graph', $this->canvas); - $this->plotarea =& $this->graph->addNew('plotarea',array( - 'Image_Graph_Axis_Category', 'Image_Graph_Axis', $this->lev_setting['direction'] - )); - - $this->plotarea->setFillColor('black@0.1'); - #$this->plotarea->showShadow(); - - $AxisX =& $this->plotarea->getAxis(IMAGE_GRAPH_AXIS_X); - $AxisY =& $this->plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); - - $AxisX->setFontAngle($this->lev_setting["x_label_angle"]); - $AxisY->setFontAngle($this->lev_setting["y_label_angle"]); - - foreach($this->dataset as $dset) { - $SQL_criteria = ''; - if ($dset['SQL_criteria'] != '') { - $SQL_criteria = $this->addToFilter($SQL_criteria, - $dset['SQL_criteria']); - } - #echo "C1: ".$SQL_criteria."
"; - if ($this->lev_setting['SQL_criteria'] != '') { - $SQL_criteria = $this->addToFilter($SQL_criteria, - $this->lev_setting['SQL_criteria']); - } - #echo "C2: ".$SQL_criteria."
"; - if (count($this->grouping_criteria) > 0) { - foreach ($this->grouping_criteria as $key => $value) { - $SQL_criteria = $this->addToFilter($SQL_criteria, - "$key = $value", - $this->grouping_aggregate[$key] - ); - } - } - #echo "C3: ".$SQL_criteria."
"; - $this->SQL_filtered = $this->shuffleSQL($dset["SQL_select"].$SQL_criteria." ".$dset["SQL_order"]); - if(defined('REPORT_DEBUG')) - echo "
The SQL_filtered is: " . $this->SQL_filtered . "
"; - $db =& DB(); - $result = $db->Execute($this->SQL_filtered); - if(!$result) { - echo "SQL: ".$this->SQL_filtered."
".$db->ErrorMsg(); - exit; - } - $num_rows = $result->RecordCount(); - - if ($num_rows == 0) { - return; - } - - $Dataset =& Image_Graph::factory('dataset'); - while(!$result->EOF) { - $Dataset->addPoint($result->fields[0],$result->fields[1]); - $result->MoveNext(); - } - $Plot =& $this->plotarea->addNew($this->lev_setting["type"], &$Dataset); - } - - $file = tempnam($this->formatter->output_path."/", "s"); - @unlink($file); - $file .= ".png"; - $this->graph->done( - array('filename' => $file) - ); - - # add to output - $this->formatter->insertImage( - $file, - $this->lev_setting["width"], - $this->lev_setting["height"] - ); - - #intersperse and whatnot - if ($this->group_level === true) { - $this->formatter->endTable(); - } - if ($this->group_level === true) { - $this->intersperse($this->grouping_criteria,$this->grouping_aggregate); - } - } -} - -class Level extends Level_Base { - - var $lev_setting; - var $lev_fields; - var $lev_items; - var $indent_html; - var $SQL_filtered; - var $group_level; - var $grouping_criteria; - var $has_title; - var $formatter; - var $add_headers = 0; - var $class; - - function Level ($title='', - $SQL_select='', $SQL_criteria='', $SQL_order='', - $title_table_class='title', $title_class='', $indent=0, - $lev_field_width = '', - $lev_field_class = 'row', $lev_label_class = '', $lev_table_class = 'level', - $lev_tot_class = 'rc-lev-tot1', $lev_colspan_label_class = 'rc-lev-colspan-label1') - { - - if($lev_field_class == 'row') { - $lev_field_class = new ReportStyle; - $lev_field_class->backgroundColor(230,230,230); - } - if($lev_label_class == '') { - $lev_label_class = new ReportStyle; - $lev_label_class->bold(); - $lev_label_class->fontFamily('arial'); - $lev_label_class->is_heading = true; - } - - $this->lev_setting = array( - "title" => $title, - "SQL_select" => $SQL_select, - "SQL_criteria" => $SQL_criteria, - "SQL_order" => $SQL_order, - "title_class_html" => $title_class, - "title_table_class_html" => $title_table_class, - "indent" => $indent, - "lev_field_width" => $lev_field_width, - "lev_field_class" => $lev_field_class, - "lev_label_class" => $lev_label_class, - "lev_table_class_html" => $lev_table_class, - "lev_tot_class" => $lev_tot_class, - "lev_colspan_label_class" => $lev_colspan_label_class, - "class" => '' - ); - } - - function setTitle($t) - { - $this->lev_setting["title"] = $t; - } - - function setSql($s) - { - $this->lev_setting["SQL_select"] = $s; - } - - function setCriteria($c) - { - $this->lev_setting["SQL_criteria"] = $c; - } - - function setOrderby($o) - { - $this->lev_setting["SQL_order"] = $o; - } - - function setIndent($i) - { - $this->lev_setting["indent"] = $i; - return $i; - } - - function setClass($c) - { - $this->lev_setting["class"] = $c; - } - - function addField ($label, $name, $isAggregate = false, $width = '', $format = '', - $group_children_by = false, $visible = true, $hide_dups = false, - $class = '', $lev_class_also = false, $label_class = '', $lev_label_class_also = false, - $condition = '', $cond_class = '', - $SQL_select = '', $SQL_criteria = '', - $colspan = 0, $colspan_label = '', $colspan_label_class = '', $lev_colspan_class_also = false, - $has_tot = false, $tot_label = '', $tot_format = '', $tot_class = '', $lev_tot_class_also = false, - $link = '') - { - //NB every field added MUST be in the source SQL - //if a grouping variable, then set group_children_by to True - //if a field is an aggregate, then it must be True. This causes it's usage to be in HAVING clause, instead of WHERE - - if ($link != "") { - $is_link = True; - $link_text_start = $link["link_text_start"]; - $link_text_end = $link["link_text_end"]; - $link_title_start = $link["link_title_start"]; - $link_title_end = $link["link_title_end"]; - $link_href_start = $link["link_href_start"]; - $link_href_end = $link["link_href_end"]; - } else { - $is_link = False; - $link_text_start = ""; - $link_text_end = ""; - $link_title_start = ""; - $link_title_end = ""; - $link_href_start = ""; - $link_href_end = ""; - } - - if($tot_class == '') { - $tot_class = new ReportStyle; - $tot_class->backgroundColor(200,200,200); - } - $this->lev_fields[$name] = array("field_label"=>$label, - "field_name"=>$name, - "field_aggregate"=>$isAggregate, - "colspan"=>$colspan, - "colspan_label"=>$colspan_label, - "colspan_label_class"=>$colspan_label_class, - "lev_colspan_class_also"=>$lev_colspan_class_also, - "field_SQL_select"=>$SQL_select, - "field_SQL_criteria"=>$SQL_criteria, - "group_children_by"=>$group_children_by, - "visible"=>$visible, - "hide_duplicates"=>$hide_dups, - "field_width"=>$width, - "field_format"=>$format, - "field_class"=>$class, - "lev_class_also" =>$lev_class_also, - "field_label_class"=>$label_class, - "lev_label_class_also"=>$lev_label_class_also, - "field_condition"=>$condition, - "field_cond_class"=>$cond_class, - "has_tot"=>$has_tot, - "tot_label"=>$tot_label, - "field_tot_format"=>$tot_format, - "field_tot_class"=>$tot_class, - "lev_tot_class_also"=>$lev_tot_class_also, - "is_link"=>$is_link, - "link_text_start"=>$link_text_start, - "link_text_end"=>$link_text_end, - "link_title_start"=>$link_title_start, - "link_title_end"=>$link_title_end, - "link_href_start"=>$link_href_start, - "link_href_end"=>$link_href_end - ); - } - - function display ($grouping_criteria = Null, $grouping_aggregate = Null, &$formatter) - { - $this->formatter =& $formatter; - $this->formatter->setLevel($this); - $this->grouping_criteria = $grouping_criteria; - $this->grouping_aggregate = $grouping_aggregate; - - #echo "Freshly received grouping criteria: " . print_r($this->grouping_criteria); //check - - $this->group_level = false; - if (count($this->lev_items) > 0) { - $this->group_level = true; - } - - $SQL_criteria = ''; - if ($this->lev_setting['SQL_criteria'] != '') { - $SQL_criteria = $this->addToFilter($SQL_criteria, - $this->lev_setting['SQL_criteria']); - } - - if (count($this->grouping_criteria) > 0) { - foreach ($this->grouping_criteria as $key => $value) { - $SQL_criteria = $this->addToFilter($SQL_criteria, - "$key = $value", - $this->grouping_aggregate[$key] - ); - } - } - - //echo "
The row filter clause is: " . $SQL_criteria , "
"; //check - // 2-2) put select, where, and order clauses together - $this->SQL_filtered = $this->shuffleSQL($this->lev_setting["SQL_select"].$SQL_criteria." ".$this->lev_setting["SQL_order"]); - - if(defined('REPORT_DEBUG')) - echo "
The SQL_filtered is: " . $this->SQL_filtered . "
"; //check - - - $db =& DB(); - $result = $db->Execute($this->SQL_filtered); - if(!$result) { - echo "SQL: {$this->SQL_filtered}
".$db->ErrorMsg(); - exit; - } - $num_rows = $result->RecordCount(); - if ($num_rows == 0) { - return; - } - - $this->indent_html = $this->setIndent($this->lev_setting['indent']); - - // 3-3) insert level title if needed - $this->has_title = False; - if ($this->lev_setting["title"] != '') { - $this->has_title = true; - } - - $heading = ''; - if ($this->has_title === true) { - if(is_a($this->formatter,'HTML_ReportFormatter')) { - $this->formatter->setIndent($this->indent_html); - $heading = '
'.$this->lev_setting["title"].'
'; - - } else { - $this->formatter->setIndent($this->indent_html); - $this->formatter->addTable($this->lev_setting["title_table_class_html"]); - $this->formatter->addRow(); - $this->formatter->addColumn($this->lev_setting["title"], - $this->lev_setting["title_class_html"] - ); - $this->formatter->endRow(); - $this->formatter->endTable(); - } - } - - //if a final row, use header-style labels - if ($this->group_level === false) { - - $this->formatter->setIndent($this->indent_html); - $this->addHeaderLabels($heading); - } - - - /*set these up once before rows begin (needed for hide_duplicates)*/ - foreach ($this->lev_fields as $field) { - $content[$field['field_name']] = ''; //seed/reset - $last_content[$field['field_name']] = ''; //seed/reset - //each of these is an array with an item for each field value in the row - } - - - // 4) DISPLAY EACH ROW >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - while (!$result->EOF) { - $row = $result->fields; - $result->MoveNext(); - - // 4-1) display each visible field (from supplied field argument) within row - - //if level is group level (no header row) need to start table and body (one for each level) - - if ($this->group_level === true) { - if(strlen($this->lev_setting['class'])) - $this->formatter->write('
'); - $this->formatter->setIndent($this->indent_html); - $this->formatter->addTable($this->lev_setting["lev_table_class_html"],$heading); - } - - $this->formatter->addRow(); - - foreach ($this->lev_fields as $field) { - - // 4-1-0) only display field if visible - if ($field['visible'] === false) { - continue; //skip this field - } - - // 4-1-1) set up class(es) - - //only make label classes html if a group level - if ($this->group_level === true) { - /*must create class html here - it is a combination of level and - field class settings */ - - $field_label_class_html = $this->classHtml($field["field_label_class"], - $this->lev_setting["lev_label_class"], - $field["lev_class_also"]); - } - - /*if a conditional class, see if condition met. If it is, use field_conditional class - instead of standard field class*/ - - $condition_met = false; //initialise - if ($field['field_condition'] != '') { - //get condition - $condition_met = $this->makeCondition($field['field_condition'], - $row, $this->lev_fields - ); - } - - if ($condition_met === true) { - $field_class = $field['field_cond_class']; - } else { - $field_class =$field['field_class']; - } - - $field_class_html = $this->classHtml($field_class, - $this->lev_setting['lev_field_class'], - $field['lev_class_also']); - - $field_width_html = $this->setWidth ($field["field_width"], $this->lev_setting["lev_field_width"]); - - if ($field["field_SQL_select"] != '') { //if this field has its own data source ... - - /* 5-1-3-1) set up WHERE/HAVING clause using both parent-derived criteria - (if the level above is team='CommunityCare' then this record source needs to be filtered to - only include data for the CommunityCare team*/ - - $field_SQL_criteria = ""; - - if ($field["field_SQL_criteria"] != "") { - - $field_SQL_criteria = $this->addToFilter($field_SQL_criteria, - $field["field_SQL_criteria"]); - } - - /* - if (count($this->grouping_criteria) > 0) { - - foreach ($this->grouping_criteria as $key => $value) { - - $field_SQL_criteria = $this->addToFilter($field_SQL_criteria, "$key = $value"); - } - } - */ - if($field["field_name"]!="") { - $dba = DB(); - $field_SQL_criteria = $this->addToFilter($field_SQL_criteria, $field["field_name"]." = ".$dba->qstr($row[$field["field_name"]])); - } - - - //echo "
The field filter clause is: " . $field_SQL_criteria , "
"; //check - - /* 4-1-3-2) put select, where (but not order - not applicable - - order derived from other fields) parts of SQL statement together*/ - - $field_SQL_filtered = $this->shuffleSQL($field["field_SQL_select"] . $field_SQL_criteria); - - #echo "
The field_SQL_filtered is: " . $field_SQL_filtered . "
"; //check - - // 4-1-3-3) get the content according to the SQL statement - - $db = DB(); - $rs = $db->Execute($field_SQL_filtered); - if($rs && $rs->RecordCount()) { - $content[$field["field_name"]] = $rs->fields[0]; - } - - } else { //take content from field - - $content[$field["field_name"]] = $row[$field["field_name"]]; - } - - /*if a final level, hide_duplicates = True, and it is a duplicate, - make $field_content = "" and skip to display*/ - $duplicate = false; //seed/reset - - if ($last_content[$field["field_name"]] == $content[$field["field_name"]]) { - $duplicate = true; - } - - //set last content for next comparison (if any) - $last_content[$field["field_name"]] = $content[$field["field_name"]]; - - if ($this->group_level === false - AND $duplicate === true - AND $field["hide_duplicates"] === true) { - - $field_content = ""; - - //skipping formatting and linking - - } else { - - // 4-1-5) set up formatting e.g. decimal places - - $style = $this->getStyle($field["field_format"]); - $dp = $this->getDp($field["field_format"]); - $date_format = $this->getDateFormat($field["field_format"]); - - //echo "
Field content before formatting is: " . $content[$field["field_name"]]; - //echo "
Field array contains: " . print_r($field) . "
"; //check - $field_content = $this->myFormat($content[$field["field_name"]], - $style, $dp, $date_format); - - // 4-1-6) put in link if required - if ($field["is_link"] === true) { - - $field_content = "" . - $field["link_text_start"] . $field_content . $field["link_text_end"] . - ""; - } - } - - // 4-1-7) display field - - if ($this->group_level === true) { - $this->formatter->addColumn($field["field_label"], $field_label_class_html); - $this->formatter->addColumn($field_content, $field_class_html); - } else { - $this->formatter->addColumn($field_content, $field_class_html); - } - } - - $this->formatter->endRow(); - $this->add_headers = 0; - - if ($this->group_level === true) { //a separate table for each group by level - $this->formatter->endTable(); - } - - - //5-1) add additional grouping criteria to $grouping_criteria - - //loop through all fields in level - add to grouping_criteria filter if new_group_by is True - foreach ($this->lev_fields as $field) { - - if ($field["group_children_by"] != true) { //only process this field if adding to filter - continue; - } - $key = "`" . $field["field_name"] . "`"; - $value = $row[$field["field_name"]]; - - if (strpos($field["field_format"],"num") === false) { - $value = $db->qstr($value); - } - $this->grouping_criteria[$key] = $value; - $this->grouping_aggregate[$key] = $field['field_aggregate']; - } - - //echo "
The grouping_criteria are now set to: " . print_r($this->grouping_criteria) . "
"; //check */ - - if ($this->group_level === true) { - $this->intersperse($this->grouping_criteria,$this->grouping_aggregate); - if(strlen($this->lev_setting["class"])) - $this->formatter->write('
'); - } - - } - - - // 6 DISPLAY TOTALS (only if a final level and only if one required) - - /*any fields which have 'have_tot' equal True? Loop through them, and build array of field names. - If the array has any values, proceed (and pass on array to provide headstart building source query*/ - - if ($this->group_level === false) { - $this->addTotal($db); - $this->formatter->endTable(); - } - } - - function addHeaderLabels ($heading) - { - if($this->add_headers>0) return; - $this->add_headers++; - - $this->formatter->addTable($this->lev_setting["lev_table_class_html"], $heading); - $this->formatter->addRow(); - - foreach ($this->lev_fields as $field) { - // only display field if visible - if ($field['visible'] === False) { - continue; //skip this field - } - - $field_label_class_html = $this->classHtml($field["field_label_class"], - $this->lev_setting["lev_label_class"], - $field["lev_label_class_also"]); - - $field_width_html = $this->setWidth ($field["field_width"], $this->lev_setting["lev_field_width"]); - - // c) display - $this->formatter->addColumn($field["field_label"], $field_label_class_html); - } - $this->formatter->endRow(); - } - - function addTotal (&$db) - { - // 0 ) check to see if totals are required for any of the fields >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - // (and build SQL select statement for totals row) - - $SQL_select_tot = ''; - foreach ($this->lev_fields as $field) { - if ($field['has_tot'] === True) { - if ($SQL_select_tot == '') { - $SQL_select_tot = - "SELECT Sum(" . $field["field_name"] . ") AS `Tot_" . $field["field_name"] . "`" ; - } else { - $SQL_select_tot .= - ", Sum(" . $field["field_name"] . ") AS `Tot_" . $field["field_name"] . "`"; - } - } - } - - if ($SQL_select_tot == '') { - return false; - } - - $group_by = ""; - if (count($this->grouping_criteria) > 0) { - $group_by = "GROUP BY "; - foreach ($this->grouping_criteria as $key=>$value) { - $group_by .= (($group_by === "GROUP BY ") ? $key : ", " . $key); - } - } - //echo "
Group by is now: " .$group_by; - - $SQL_tot_filtered = $this->shuffleSQL("$SQL_select_tot FROM (" . $this->SQL_filtered . - ") AS Source "); #$group_by"; //each key in grouping criteria - - # echo "
The SQL tot filtered is: " . $SQL_tot_filtered . "
"; - $result1 = $db->Execute($SQL_tot_filtered); - while (!$result1->EOF) { - $row = $result1->fields; - $result1->MoveNext(); - - $this->formatter->addRow(); - - foreach ($this->lev_fields as $field) { - if ($field["visible"] === False) { - continue; - } - - //must create class html here - it is a combination of field and level class settings - $field_tot_class_html = $this->classHtml($field["field_tot_class"], - $this->lev_setting["lev_tot_class"], - $field["lev_tot_class_also"]); - - $field_width_html = $this->setWidth ($field["field_width"], $this->lev_setting["lev_field_width"]); - - if ($field["has_tot"] === True) { - - // 6-2-1-1) set up field content (whether a value or a format) - - if ($field["tot_label"] != "") { - - // 6-2-1-1-1) set up label - $field_content = $field["tot_label"]; - - } else { - - // 6-2-1-1-2) set up formatting e.g. decimal places (only run when a cell to display) - $field_tot = "Tot_" . $field["field_name"]; - - $field_content = $this->myFormat($row["$field_tot"], - $this->getStyle($field["field_tot_format"]), - $this->getDp($field["field_tot_format"]), - $this->getDateFormat($field["field_format"])); - } - - // 6-2-1-2) display row - $this->formatter->addColumn($field_content, $field_tot_class_html); - } else { - - // 6-2-2) display row - $this->formatter->addColumn(" ", $field_tot_class_html); - } - } - $this->formatter->endRow(); - } - return true; //i.e. had totals - } -} - - -/** - * This is the base Level class, any and all types of rendered chunks MUST inherit from this. - */ -class Level_Base { - - /** - * Add a user criteria to the WHERE clause - */ - function addFieldCriteria($sql, $bIsAggregate = false, $field = '') - { - $this->lev_setting['SQL_criteria'] = - $this->addToFilter($this->lev_setting['SQL_criteria'], - $sql, $bIsAggregate); - - if(strlen($this->lev_setting['SQL_order'])>0) { - $sql = $this->lev_setting['SQL_order']; - if( ($p=stripos($sql,'GROUP BY')) !== false) { - if( ($t=$this->find_next_sql_keyword($sql,$p+1)) !== false) { - $groupby = substr($sql,$p,$t[1]-$p); - if(stripos($groupby,$field)===false) - $sql = str_replace($groupby,$groupby.", {$field}",$sql); - } - } - $this->lev_setting['SQL_order'] = $sql; - } else { - $this->lev_setting['SQL_order'] = "GROUP BY ".$field; - } - - if(isset($this->dataset)) { - for($i=0;$idataset);$i++) { - if(strlen($this->dataset[$i]['SQL_order'])>0) { - $sql = $this->dataset[$i]['SQL_order']; - if( ($p=stripos($sql,'GROUP BY')) !== false) { - if( ($t=$this->find_next_sql_keyword($sql,$p+1)) !== false) { - $groupby = substr($sql,$p,$t[1]-$p); - if(stripos($groupby,$field)===false) - $sql = str_replace($groupby,$groupby.", {$field}",$sql); - } - } - $this->dataset[$i]['SQL_order'] = $sql; - } else { - $this->dataset[$i]['SQL_order'] = "GROUP BY ".$field; - } - } - } - } - - /** - * Add a sub-object to render beneath the current object - */ - function append (&$item) - { - $this->lev_items[] =& $item; - } - - function addBreak () - { - $this->lev_items[] = new Report_BreakAdaptor; - } - - function addDiv($id) - { - $item = new Report_BreakAdaptor; - $item->id = $id; - $this->lev_items[] =& $item; - } - - /** - * This calls all sub-objects of the current object to tell them to build their output - */ - function intersperse ($grouping_criteria, $grouping_aggregate) - { - if(isset($this->lev_items) && is_array($this->lev_items)) { - foreach ($this->lev_items as $item) { - #if(strlen($this->lev_setting['class'])) - # $this->formatter->write('
'); - $c = $this->formatter->indent; - $item->display($grouping_criteria, $grouping_aggregate, $this->formatter); - $this->formatter->indent = $c; - #if(strlen($this->lev_setting["class"])) - # $this->formatter->write('
'); - } - } - } - - /** - * Build onto the SQL WHERE/HAVING clause - */ - function addToFilter ($full_criteria, $new_criterion, $aggregate = false) - { - /* - echo "
"; - echo "full_criteria = ".$full_criteria."
"; - echo "new_criterion = ".$new_criterion."
"; - echo "aggregate = ".$aggregate."
"; - */ - $new_criterion = str_replace(" "," ",$new_criterion); - $new_criterion = str_replace("WHERE HAVING","HAVING",$new_criterion); - $t = "WHERE"; - if($aggregate) { - $t = "HAVING"; - } - if ($full_criteria == "") { - if(strpos($new_criterion,$t)!==false) - return $new_criterion; - else - return " $t " . $new_criterion; - break; - } - #echo "t:".$t."
fc:".$full_criteria."
nc:".$new_criterion."
"; - if (strpos($full_criteria, $t) === False && strpos($new_criterion, $t)===false) { - if($t == "WHERE") { - $r = " WHERE ".$full_criteria; - if(strlen($new_criterion)) - $r .= " AND ".$new_criterion; - return $r; - } else { - return $full_criteria." $t " . $new_criterion; - } - } else if(strpos($full_criteria, $t)!==false && strpos($new_criterion, $t) !== false) { - $sql = $full_criteria . " AND " . substr($new_criterion, strpos($new_criterion,$t)+strlen($t)); - $sql = str_replace("AND HAVING","HAVING",$sql); - #echo 'OUTPUT:'.$sql."
"; - return $sql; - } else { - #echo "fc1:".$full_criteria."
nc:".$new_criterion."
"; - if(strncasecmp(trim($new_criterion),"having",6)==0) - return $full_criteria . ' '. $new_criterion; - else - return $full_criteria . " AND " . $new_criterion; - } - } - - function find_next_sql_keyword($sql,$offset=0) - { - $ret = false; - if(is_string($sql) && is_numeric($offset)) { - $arr = array( - 'WHERE', - 'GROUP BY', - 'ORDER BY', - 'LIMIT', - 'HAVING' - ); - $bFound = false; - foreach($arr as $k) { - if( ($t=stripos($sql,$k,$offset)) !== false) { - if($ret === false) { - $ret = array($k,$t); - $bFound = true; - } - } - } - if($bFound == false) { - $ret = array('',strlen($sql)); - } - } - return $ret; - } - - function shuffleSQL($sql, $groupBy='') - { - if( ($p=stripos($sql,'HAVING')) !== false) { - # found a having clause - $leading = ''; - $having = ''; - $groupby = ''; - $orderby = ''; - $limit = ''; - - if( ($t=$this->find_next_sql_keyword($sql,$p+1)) !== false) { - $having = substr($sql,$p,$t[1]-$p); - $sql = str_replace($having,'',$sql); - } - if( ($p=stripos($sql,'GROUP BY')) !== false) { - if( ($t=$this->find_next_sql_keyword($sql,$p+1)) !== false) { - $groupby = substr($sql,$p,$t[1]-$p).$groupBy; - $sql = str_replace($groupby,'',$sql); - } - } - if( ($p=stripos($sql,'ORDER BY')) !== false) { - if( ($t=$this->find_next_sql_keyword($sql,$p+1)) !== false) { - $orderby = substr($sql,$p,$t[1]-$p); - $sql = str_replace($orderby,'',$sql); - } - } - if( ($p=stripos($sql,'LIMIT')) !== false) { - if( ($t=$this->find_next_sql_keyword($sql,$p+1)) !== false) { - $limit = substr($sql,$p,$t[1]-$p); - $sql = str_replace($limit,'',$sql); - } - } - #echo "having=$having
groupby=$groupby
orderby=$orderby
limit=$limit
"; - $sql .= $groupby.' '.$having.' '.$orderby.' '.$limit; - } - return $sql; - } - - - function makeCondition ($condition, $row, $fields) - { - //replace bracketed text with data from field in row with same name - //numeric data does not need to be unquoted as long as == is used instead of === - //date data must be wrapped in strtotime on both sides of comparison to work (NB Unix time 1970 onwards only) - //replace brackets with PHP code then use eval to run generated string as PHP code - - $condition = str_replace('[','$row[\'',$condition); - $condition = str_replace(']','\']',$condition); - $condition = "if($condition){\$condition_met=True;}else{\$condition_met=False;}"; - //echo "
Test expression as generated: $condition";//check - eval($condition); - - return $condition_met; - } - - function setIndent ($indent) - { - return $this->formatter->setIndent($indent); - } - - function myFormat ($value, $style, $dp, $date_format) - { - switch ($style) { - - case "upper": - - return strtoupper($value); - break; - - case "perc": - - return sprintf("%01." . $dp . "f", $value) . "%"; - break; - - case "dol": - - return "$" . number_format($value, $dp); - break; - - case "num": - - return number_format($value, $dp);; - break; - - case "date": - if ($value != "") { - /*echo "Date format: " . $date_format . "; - Value: " . $value . "Date: " . date($date_format, strtotime($value)); //check*/ - return date($date_format, $value); - - } else { - - return $value; - } - - break; - - default: - - return $value; - break; - } - } - - function getStyle ($format) - { - $field_format = explode(",", $format); - return $field_format[0]; - } - - function getDp ($format) - { - $field_format = explode(",", $format); - return (count($field_format) > 1 ? $field_format[1] : 0); - } - - function getDateFormat ($format) - { - $field_format = explode(",", $format); - return (count($field_format) > 2 ? $field_format[2] : "m/d/Y"); - } - - function setWidth ($field_width, $level_field_width) - { - $width = (($field_width != "") ? $field_width : $level_field_width); - return (($width != "") ? " width='" . $width . "'" : "" ); - } - - /** - * This is worthless junk from the original author, should be refactored - */ - function classHtml ($field_class, $lev_class, $both = False) - { - if(is_a($field_class,'ReportStyle')) - return $field_class; - if(is_a($lev_class,'ReportStyle')) - return $lev_class; - if ($field_class == "" AND $lev_class == "") { //nothing to set - - return ""; - } - - switch ($both) { - - case true: //use both classes - - return "$field_class $lev_class"; - break; - - case false: //only use on class (field takes precedence over level) - - if ($field_class != '') { - return $field_class; - } else { - return $lev_class; - } - break; - } - } -} -?> diff --git a/modules/report/class.Report.php b/modules/report/class.Report.php deleted file mode 100644 index 79956ffc..00000000 --- a/modules/report/class.Report.php +++ /dev/null @@ -1,681 +0,0 @@ - and Thralling Penguin, LLC - * @package AgileBill - * @version 1.4.93 - */ - -class BASE_ReportFormatter { - var $output_path; - var $output; - - function setOutputDirectory($d) - { - $this->output_path = $d; - } - - function getOutput() - { - return $this->output; - } -} - -class HTML_ReportFormatter extends BASE_ReportFormatter { - var $indent = 0; - var $coldata; - var $level; - var $div_count; - - function setLevel(&$level) - { - $this->level =& $level; - } - - function setIndent($amount) - { - if($amount == "") return; - $this->indent = $amount; - } - - function addRow() - { - $this->coldata = array(); - echo " \n"; - } - - function endRow() - { - /* output the coldata */ - #if($this->indent) { - # echo " indent}\"> \n"; - #} - $w = 100 / count($this->coldata); - foreach($this->coldata as $col) { - $tag = "td"; - if (is_a($col[1],'ReportStyle')) { - $s = "style=\"".$col[1]->doHTML()."\""; - if($col[1]->is_heading) $tag = "th scope=\"col\""; - } else { - $s = ""; - } - - echo " <{$tag} {$s} width=\"{$w}%\">\n"; - echo " {$col[0]}\n"; - echo " \n"; - } - echo " \n"; - } - - function addColumn($col, $style = '') - { - /* take a column and a style */ - $this->coldata[] = array($col, $style); - } - - function addTable($style, $heading) - { - $i = $this->indent / 30; if($i<0) $i = 0; - ++$i; - $this->div_count = 0; - - if($style != 'report_heading') { - echo '
'; - $this->div_count += 1; - } - if($this->indent == 0) { - if($style != 'level') { - echo '
'; - $this->div_count += 1; - } - } - echo $heading; - echo ''; - echo "\n"; - } - - function endTable() - { - $i = $this->indent / 30; if($i<0) $i = 0; - ++$i; - echo "
\n"; - - if($this->div_count == 1) - echo "
\n"; - if($this->indent == 0) { - if($this->div_count == 2) - echo "
\n"; - } - } - - function startDocument($title = '') - { - ob_start(); - echo "\n"; - echo "\n"; - echo "{$title}\n"; - echo ""; - echo "\n\n"; - } - - function endDocument() - { - echo "\n\n"; - $content = ob_get_contents(); - ob_end_clean(); - $this->output = $this->output_path."/report.html"; - $fp = fopen($this->output,'w'); - if($fp) { - fwrite($fp,$content); - fclose($fp); - } else { - echo 'Could not write to output file.'; - } - } - - function addBreak() - { - echo "


"; - } - - function insertImage($file,$width,$height) - { - $file = basename($file); - echo "
\n"; - } - - function write($s) - { - echo $s; - } -} - -/** - * Outputs the report in DOS text format - */ -class TXT_ReportFormatter extends BASE_ReportFormatter { - var $indent = 0; - var $aindent; - var $coldata; - var $level; - - function setLevel(&$level) - { - $this->level =& $level; - } - - function setIndent($amount) - { - if($amount == "") return; - $this->indent = $amount; - } - - function addRow() - { - $this->coldata = array(); - } - - function endRow() - { - /* output the coldata */ - if($this->indent) { - $n = intval($this->indent) / 30; - echo str_repeat(" ", $n); - } - $w = (100 / count($this->coldata))/100 * 80; - foreach($this->coldata as $col) { - echo str_pad($col[0], $w); - } - echo "\r\n"; - } - - function addColumn($col, $style = '') - { - /* take a column and a style */ - $this->coldata[] = array($col, $style); - } - - function addTable($style, $heading=false) - { - if($this->indent) { - echo "\r\n"; - $this->aindent = $this->indent; - } else { - echo "\r\n\r\n"; - } - } - - function endTable() - { - if($this->indent && $this->indent != $this->aindent) echo "\r\n"; - } - - function startDocument($title = '') - { - ob_start(); - } - - function endDocument() - { - $content = ob_get_contents(); - ob_end_clean(); - $this->output = $this->output_path."/report.txt"; - $fp = fopen($this->output,'w'); - if($fp) { - fwrite($fp,$content); - fclose($fp); - } else { - echo 'Could not write to output file.'; - } - } - - function addBreak() - { - echo "\r\n\r\n"; - } - - function insertImage($file,$width,$height) - { - $file = basename($file); - echo "\r\nSee file: $file\r\n"; - } - - function write($s) - { - - } -} - -class PDF_ReportFormatter extends BASE_ReportFormatter { - var $indent = 0; - var $aindent; - var $coldata; - var $pdf; - var $y; - var $level; - - function write($s) - { - - } - - function setIndent($amount) - { - if($amount == "") return; - $this->indent = intval($amount); - } - - function addRow() - { - $this->coldata = array(); - } - - function endRow() - { - $x = 9; - $n = 0; - /* output the coldata */ - if($this->indent) { - $n = $this->indent / 30; - $x += ($n * 9); - } - $w = round((100 / count($this->coldata))/100 * (190 - ($n*9))); - $tx = $x; - foreach($this->coldata as $col) { - if (is_a($col[1],'ReportStyle')) { - /* set the bounding area */ - $col[1]->setBounds($tx,$this->y,$tx + $w,$this->y + 5); - $col[1]->doPDF($this->pdf); - } else { - $tmp = new ReportStyle; - $tmp->doPDF($this->pdf); - } - #echo "x={$tx} y={$this->y} data={$col[0]} style={$col[1]}
"; - $this->pdf->Text($tx, $this->y,$col[0]); - $tx += $w; - } - $this->addY(5, true); - } - - function addY($y, $repeatLabels = false) - { - $this->y += $y; - if ($this->y > 275) { - $this->pdf->AddPage(); - $this->y = 5; - if($repeatLabels) - $this->level->addHeaderLabels(); - } - } - - function setLevel(&$level) - { - $this->level =& $level; - } - - function addColumn($col, $style = '') - { - /* take a column and a style */ - $this->coldata[] = array($col, $style); - } - - function addTable($style, $heading='') - { - if($this->indent) { - $this->addY(5); - $this->aindent = $this->indent; - } else { - $this->addY(10); - } - - # if we're close to the end, goto next page - if($this->y > 250) $this->addY(1000); - } - - function endTable() - { - if($this->indent && $this->indent != $this->aindent) $this->addY(5); - } - - function startDocument($title = '') - { - require_once(PATH_INCLUDES.'pdf/fpdi.php'); - require_once(PATH_INCLUDES.'pdf/fpdf_tpl.php'); - require_once(PATH_INCLUDES.'pdf/fpdf.php'); - - $this->pdf = new fpdi; - $this->pdf->addPage(); - $this->y = 5; - } - - function endDocument() - { - $file = $this->output_path."/report.pdf"; - $this->output = $file; - $this->pdf->Output($file,'F'); - } - - function addBreak() - { - $this->addY(10); - } - - function insertImage($file,$width,$height) - { - $w = $width / 11.81102 * 2.5; - $h = $height / 11.81102 * 2.5; - $y = $this->y + 5; - $x = 105 - ($w/2); - #echo 'Place image at 0,'.$y." $w x $h
"; - $this->pdf->Image($file, $x, $y, $w, $h); - $this->y = $y + $h + 5; - } -} - -class ReportStyle { - var $font_weight; - var $font_family; - var $font_height; - var $bg_color; - var $is_heading; - var $tx, $ty, $bx, $by; - - function ReportStyle() - { - $this->font_weight = ''; - $this->font_family = 'times'; - $this->font_height = 10; - $this->is_heading = false; - } - - function fontFamily($f) - { - $this->font_family = $f; - } - - function fontHeight($h) - { - $this->font_height = $h; - } - - function bold() - { - $this->font_weight = 'bold'; - } - - function backgroundColor($r,$g,$b) - { - $this->bg_color = array($r,$g,$b); - } - - function setBounds($x1,$y1,$x2,$y2) - { - $this->tx = $x1; $this->ty = $y1; - $this->bx = $x2; $this->by = $y2; - #echo "BOUNDS: $x1 x $y1 x $x2 x $y2
"; - } - - /** - * Generates the PDF style - */ - function doPDF(&$pdf) - { - if(is_array($this->bg_color)) { - $x1 = $this->tx; - $y1 = $this->ty - ($this->font_height * 0.352777778); - $w = $this->bx - $this->tx; - $h = $this->by - $this->ty; - $pdf->SetFillColor($this->bg_color[0],$this->bg_color[1],$this->bg_color[2]); - $pdf->Rect($x1,$y1,$w,$h,'F'); - #echo "BOX: $x1 x $y1 x $w x $h
"; - } - - $b = ($this->font_weight == 'bold' ? "B" : ""); - - $pdf->SetFont($this->font_family,$b,$this->font_height); - } - - /** - * Generates the HTML style - */ - function doHTML() - { - $s = "font-family: {$this->font_family}; font-size: {$this->font_height}pt;"; - if($this->font_weight == 'bold') - $s .= " font-weight: bold;"; - if(is_array($this->bg_color)) { - $s .= " background-color: #"; - $s .= str_pad(dechex($this->bg_color[0]), 2, '0', STR_PAD_LEFT); - $s .= str_pad(dechex($this->bg_color[1]), 2, '0', STR_PAD_LEFT); - $s .= str_pad(dechex($this->bg_color[2]), 2, '0', STR_PAD_LEFT); - $s .= ";"; - } - $s=""; - return $s; - } -} - -/** - * This class is a adaptor pattern that serves to place a break in the formatting of the report. - */ -class Report_BreakAdaptor { - function display($grouping, $aggregate, &$formatter) - { - $formatter->addBreak(); - } -} - -require_once PATH_MODULES.'report/class.Level.php'; -class Report_DivAdaptor extends Level_Base { - var $id; - var $lev_setting; - var $lev_fields; - var $lev_items; - var $indent_html; - var $SQL_filtered; - var $group_level; - var $grouping_criteria; - var $has_title; - var $formatter; - - function display($grouping, $aggregate, &$formatter) - { - $this->formatter =& $formatter; - #echo "
id}\">"; - if(isset($this->lev_items) && is_array($this->lev_items)) { - foreach ($this->lev_items as $item) { - echo "
id}\">"; - $c = $this->formatter->indent; - $item->display($grouping, $aggregate, $this->formatter); - $this->formatter->indent = $c; - echo "
"; - } - } - #echo "
"; - } -} - -class Reporting { - var $has_header; - var $rep_title; - var $rep_subtitle_1; - var $rep_subtitle_2; - var $rep_date_start; - var $rep_date_end; - var $rep_image_src; - var $rep_image_width; - var $rep_image_height; - var $rep_image_alt; - var $rep_desc; - var $rep_items; - var $rep_formatter; - - function Reporting (&$formatter, $has_header = false) - { - $this->has_header = $has_header; - /* - - TODO: Implement this crap at a later point - - - $this->rep_title = $rep_title; - $this->rep_subtitle_1 = $rep_subtitle_1; - $this->rep_subtitle_2 = $rep_subtitle_2; - $this->rep_date_start = $rep_date_start; - $this->rep_date_end = $rep_date_end; - $this->rep_desc = $rep_desc; - $this->rep_image_src = $rep_image_src; - $this->rep_image_width = $rep_image_width; - $this->rep_image_height = $rep_image_height; - $this->rep_image_alt = $rep_image_alt; - */ - $this->rep_formatter =& $formatter; - } - - function setTitle($t, $style = '') - { - if($style=='') $style = new ReportStyle; - $style->fontHeight(16); - $style->fontFamily('arial'); - $this->rep_title = array($t,$style); - } - - function setSubtitle1($t, $style = '') - { - if($style=='') $style = new ReportStyle; - $style->fontHeight(14); - $style->fontFamily('arial'); - $this->rep_subtitle_1 = array($t,$style); - } - - function setSubtitle2($t, $style = '') - { - if($style=='') $style = new ReportStyle; - $style->fontHeight(12); - $style->fontFamily('arial'); - $this->rep_subtitle_2 = array($t,$style); - } - - function addBreak () - { - $this->rep_items[] = new Report_BreakAdaptor; - } - - function addDiv($id) - { - $item = new Report_DivAdaptor; - $item->id = $id; - $this->rep_items[] = $item; - } - - function append (&$item) - { - $this->rep_items[] =& $item; - } - - function display () - { - $this->rep_formatter->startDocument($this->rep_title[0]); - - if ($this->has_header) { - $this->displayHeader(); - } - if(is_array($this->rep_items)) { - foreach ($this->rep_items as $item) { - $cur = $this->rep_formatter->indent; - $item->display(Null, Null, $this->rep_formatter); - $this->rep_formatter->indent = $cur; - } - } - $this->rep_formatter->endDocument(); - } - - function displayHeader () - { - if(is_a($this->rep_formatter,'HTML_ReportFormatter')) { - if ($this->rep_title != '') { - echo '

'.$this->rep_title[0].'

'; - } - - if ($this->rep_subtitle_1 != '') { - echo '

'.$this->rep_subtitle_1[0].'

'; - } - - if ($this->rep_subtitle_2 != '') { - echo '

'.$this->rep_subtitle_2[0].'

'; - } - - } else { - $this->rep_formatter->addTable('report_heading'); - - if ($this->rep_image_src != '') { - - echo ""; - - $width_html = ''; - $height_html = ''; - $alt_html = ''; - - if ($this->rep_image_width != '') { - $width_html = " width='$this->rep_image_width'"; - } - - echo ""; - - if ($this->rep_image_height != '') { - $height_html = " height='$this->rep_image_height'"; - } - - if ($this->rep_image_alt != '') { - $alt_html = " alt='$this->rep_image_alt'"; - } - - echo " - "; - } - - $d = ""; - if ($this->rep_title != '') { - $this->rep_formatter->addRow(); - $this->rep_formatter->addColumn($this->rep_title[0],$this->rep_title[1]); - $this->rep_formatter->endRow(); - } - - if ($this->rep_subtitle_1 != '') { - $this->rep_formatter->addRow(); - $this->rep_formatter->addColumn($this->rep_subtitle_1[0],$this->rep_subtitle_1[1]); - $this->rep_formatter->endRow(); - } - - if ($this->rep_subtitle_2 != '') { - $this->rep_formatter->addRow(); - $this->rep_formatter->addColumn($this->rep_subtitle_2[0],$this->rep_subtitle_2[1]); - $this->rep_formatter->endRow(); - } - - # $d .= "

Report generated on " . date("d/m/y") . "

"; - - if ($this->rep_desc != '') { - $d .= "

$this->rep_desc

"; - } - - $this->rep_formatter->addRow(); - $this->rep_formatter->addColumn(' '); - $this->rep_formatter->endRow(); - $this->rep_formatter->endTable(); - } - } -} -?> diff --git a/modules/report/class.ReportParser.php b/modules/report/class.ReportParser.php deleted file mode 100644 index 96b19dca..00000000 --- a/modules/report/class.ReportParser.php +++ /dev/null @@ -1,420 +0,0 @@ - and Thralling Penguin, LLC - * @package AgileBill - * @version 1.4.93 - */ - -set_include_path(PATH_SEPARATOR.PATH_INCLUDES."pear"); -require_once 'XML/Parser.php'; - -class reportColumnTag -{ - var $type; - var $sql = ''; - var $criteria = ''; - var $orderby = ''; - var $indent = 0; - var $display = ''; - var $field = ''; - var $aggregate = false; - var $width = ''; - var $format = ''; - var $group_children_by = false; - var $visible = true; - var $hide_dups = false; - var $condition = ''; - var $sql_criteria = ''; - var $total = false; - var $total_format = ''; - var $link = ''; - var $user_criteria_table = ''; - var $user_criteria_col_id = ''; - var $user_criteria_col_name = ''; - var $user_criteria_date_format = 'Y-m'; - var $user_criteria_type; - var $user_criteria; - var $user_criteria_aggregate; - - function reportColumnTag() - { - $this->type = 'reportLevelTag'; - $this->user_criteria = false; - } -} - -class reportDatasetTag -{ - var $type; - var $sql = ''; - var $criteria = ''; - var $orderby = ''; - - function reportDatasetTag() - { - $this->type = 'reportDatasetTag'; - } -} - -class ReportParser extends XML_Parser -{ - // Holds a reference to the reporting root class - var $reportClass; - // Holds the cdata as we parse a given tag - var $cdata; - // Holds our processing objects in a first in - last out (FILO) manner - var $stack; - - // Holds the fields the user may edit and change - var $user_criteria; - // Holds the fields the user has changed - var $user_criteria_data; - // Holds the fields that have been added - var $user_criteria_fields; - - function ReportParser(&$reportClass) - { - static $uc; - static $ucd; - static $ucf; - - $this->user_criteria =& $uc; - $this->user_criteria_data =& $ucd; - $this->user_criteria_fields =& $ucf; - - # Create the user criteria fields as static members - - if(!is_a($reportClass,'Reporting')) die('Parameter 1 must be a Reporting reference.'); - # Save the Reporting reference - $this->reportClass =& $reportClass; - # Clear the cdata buffer - $this->cdata = ""; - # Init the stack - $this->stack = array(); - # Call into XML_Parser, to set us up the bomb. (See references on ALL YOUR BASE R BELONG TO US - Seriously, it's funny shit.) - parent::XML_Parser(); - # Do NOT perform case foldering! - $this->folding = false; - } - - function getUserCriteria() - { - return $this->user_criteria; - } - - function setUserCriteria($field, $condition, $value) - { - #$this->user_criteria_fields[] = $field; - $this->user_criteria_data[] = array($field, $condition, $value); - } - - function getUserCriteriaSQL($field,&$isAggregate) - { - $sql = ""; - if(!is_array($this->user_criteria_data)) return ''; - foreach($this->user_criteria as $uc) { - if($uc['name'] == $field) { - break; - } - } - foreach($this->user_criteria_data as $ucd) { - if($ucd[0] == $field) { - $db =& DB(); - - # format the field correctly - switch($uc['type']) { - case 'date': - case 'date_year_month': - $ucd[2] = date('Ym',$ucd[2]); - break; - case 'date_year': - $ucd[2] = date('Y',$ucd[2]); - break; - default: - break; - } - - if(strpos(strtoupper($ucd[1]),'NULL') !== false) { - $sql .= $field." ".$ucd[1]; - } else { - if(ereg("^[0-9]+$",$ucd[2])) - $sql .= $field." ".$ucd[1]." ".$ucd[2]; - else - $sql .= $field." ".$ucd[1]." ".$db->qstr($ucd[2]); - } - $sql .= " AND "; - } - } - if(strlen($sql)) - $sql = substr($sql,0,strlen($sql)-4); - $isAggregate = $uc['aggregate']; - return $sql; - } - - function startHandler($xp, $name, $attr) - { - # Clear the cdata buffer - $this->cdata = ""; - - if($name == 'report' && !count($this->stack)) { - # initial outer report tag. set our start state. - $this->stack[] =& $this->reportClass; - return; - } else if($name == 'level') { - $this->stack[] = new Level; - } else if($name == 'graph') { - $this->stack[] = new LevelGraph( - $attr['title'], - intval($attr['width']), - intval($attr['height']), - $attr['type'], - @$attr['direction'], - @$attr['x_angle'] - ); - } else if($name == 'column') { - $this->stack[] = new reportColumnTag; - } else if($name == 'dataset') { - $this->stack[] = new reportDatasetTag; - } else if($name == 'break') { - $work =& $this->last($this->stack); - if($work) { - $work->addBreak(); - } - } else if($name == 'div') { - $item = new Report_DivAdaptor; - $item->id = $attr['id']; - $this->stack[] =& $item; - } else if($name == 'user_criteria') { - $work =& $this->last($this->stack); - if($work && is_a($work,'reportColumnTag')) { - # validate the type - switch($attr['type']) { - case 'auto_affiliate': - case 'auto_account': - case 'menu': - case 'bool': - case 'text': - case 'date_year_month': - case 'date_year': - case 'date': - break; - default: - echo 'Error in user_criteria type.'; exit; - } - $work->user_criteria = true; - $work->user_criteria_type = $attr['type']; - $work->user_criteria_date_format = @$attr['date_format']; - $work->user_criteria_table = @$attr['table']; - $work->user_criteria_col_id = @$attr['col_id']; - $work->user_criteria_col_name = @$attr['col_name']; - $work->user_criteria_aggregate = @$attr['aggregate']; - } - } - #echo '
startHandler: '.$name."\n\n".print_r($this->stack,true).'
'; - } - - function endHandler($xp, $name) - { - if(strlen($this->cdata)) { - while(preg_match("/%%([A-Z1-2_]+)%%/", $this->cdata, $regs)>0) { - if(defined($regs[1])) { - $this->cdata = str_replace("%%".$regs[1]."%%", constant($regs[1]), $this->cdata); - } - } - } - - #echo "endHandler:$name
"; - $work =& $this->last($this->stack); array_pop($this->stack); - #echo "Class Type: ".get_class($work)."
"; - #echo '
endHandler: '.$name."\n\n".print_r($this->stack,true).'
'; - if($name == 'report' && count($this->stack)==1) { - #echo 'stack is empty. returning from endHandler.
'; - return; - } - - # Report - if(is_a($work,'Reporting')) { - if($name == 'title') - $work->setTitle($this->cdata); - else if($name == 'subtitle1') - $work->setSubtitle1($this->cdata); - else if($name == 'subtitle2') - $work->setSubtitle2($this->cdata); - } - - # Level - if(is_a($work,'Level')) { - if($name == 'sql') - $work->setSql($this->cdata); - else if($name == 'criteria') - $work->setCriteria($this->cdata); - else if($name == 'orderby') - $work->setOrderby($this->cdata); - else if($name == 'indent') - $work->setIndent($this->cdata); - else if($name == 'title') - $work->setTitle($this->cdata); - else if($name == 'htmlstyle') - $work->setClass($this->cdata); - - else if($name == 'level') { - $ltmp =& $work; - $work =& $this->last($this->stack); array_pop($this->stack); - # Do we have user criteria values on this? - if(is_array($this->user_criteria_data)) { - #echo '
'.print_r($this->user_criteria_data,true).'
'; - $tmp = $this->user_criteria_data; - foreach($tmp as $f) { - $a = false; - $c = $this->getUserCriteriaSQL($f[0], $a); - #echo "
c=$c\n".print_r($f,true).'
'; - if(strlen($c)) { - $ltmp->addFieldCriteria($c, $a, $f[0]); - } - } - #echo "
".print_r($ltmp,true)."
"; exit; - } - $work->append($ltmp); - } - } - if(is_a($work,'Report_DivAdaptor')) { - $ltmp =& $work; - $work =& $this->last($this->stack); array_pop($this->stack); - $work->append($ltmp); - } - if(is_a($work,'reportColumnTag')) { - if($name == 'display') - $work->display = $this->cdata; - else if($name == 'field') - $work->field = $this->cdata; - else if($name == 'aggregate') - $work->aggregate = $this->cdata == 'true' ? true : false; - else if($name == 'width') - $work->width = $this->cdata; - else if($name == 'format') - $work->format = $this->cdata; - else if($name == 'group_children_by') - $work->group_children_by = $this->cdata == 'true' ? true : false; - else if($name == 'visible') - $work->visible = $this->cdata == 'true' ? true : false; - else if($name == 'hide_dups') - $work->hide_dups = $this->cdata == 'true' ? true : false; - else if($name == 'sql') - $work->sql = $this->cdata; - else if($name == 'sql_criteria') - $work->sql_criteria = $this->cdata; - else if($name == 'condition') - $work->condition = $this->cdata; - else if($name == 'total') - $work->total = $this->cdata == 'true' ? true : false; - else if($name == 'total_format') - $work->total_format = $this->cdata; - else if($name == 'link') - $work->link = $this->cdata; - else if($name == 'column') { - $f =& $work; - $work =& $this->last($this->stack); array_pop($this->stack); - $work->addField($f->display, $f->field, $f->aggregate, $f->width, - $f->format, $f->group_children_by, $f->visible, $f->hide_dups, - '', false, '', false, $f->condition, '', $f->sql, $f->sql_criteria, - 0, '', '', false, $f->total, '', $f->total_format, '', false, $f->link - ); - # If this field has user_criteria=true, then add it to the avail array - if($f->user_criteria) { - #echo "
Trying\n".print_r($this->user_criteria_fields,true).'
'; - - if(!is_array($this->user_criteria_fields) || !in_array(str_replace('.','',$f->field),$this->user_criteria_fields)) { - $this->user_criteria[] = array( - 'name' => $f->field, - 'display' => $f->display, - 'type' => $f->user_criteria_type, - 'date_format' => $f->user_criteria_date_format, - 'values' => '', - 'table' => $f->user_criteria_table, - 'col_id' => $f->user_criteria_col_id, - 'col_name' => $f->user_criteria_col_name, - 'aggregate' => $f->aggregate - ); - $this->user_criteria_fields[] = str_replace('.','',$f->field); - #echo "
LEVEL\n".print_r($this->user_criteria,true).'
'; - } - } - } - } - if(is_a($work,'LevelGraph')) { - if($name == 'title') - $work->setTitle($this->cdata); - else if($name == 'graph') { - # store the reference - $ltmp =& $work; - # pop the stack again - $work =& $this->last($this->stack); array_pop($this->stack); - - # Do we have user criteria values on this? - if(is_array($this->user_criteria_data)) { - $tmp = $this->user_criteria_data; - foreach($tmp as $f) { - $a = false; - $c = $this->getUserCriteriaSQL($f[0], $a); - #echo "
c=$c\n".print_r($f,true).'
'; - if(strlen($c)) { - $ltmp->addFieldCriteria($c, $a, $f[0]); - } - } - #echo "
".print_r($ltmp,true)."
"; exit; - } - # append this graph onto the level/report/graph below - $work->append($ltmp); - } - } - if(is_a($work,'reportDatasetTag')) { - if($name == 'criteria') - $work->criteria = $this->cdata; - else if($name == 'orderby') - $work->orderby = $this->cdata; - else if($name == 'sql') - $work->sql = $this->cdata; - else if($name == 'dataset') { - # store the reference - $d =& $work; - # pop the stack - $work =& $this->last($this->stack); array_pop($this->stack); - # add the dataset to the graph - $work->addDataset($d->sql, $d->criteria, $d->orderby); - } - } - # Push the worker object back onto the stack - $this->stack[] =& $work; - } - - function cdataHandler($xp, $cdata) - { - $this->cdata .= $cdata; - } - - /** - * Returns the true class reference from an array, unlike any PHP function - */ - function &last(&$array) { - if (!is_array($array)) - return null; - if (!count($array)) - return false; // like end() - return $array[count($array)-1]; - } -} - -?> \ No newline at end of file diff --git a/modules/report/report.inc.php b/modules/report/report.inc.php deleted file mode 100644 index 962747e1..00000000 --- a/modules/report/report.inc.php +++ /dev/null @@ -1,310 +0,0 @@ - - * @package AgileBill - * @version 1.4.93 - */ - -/** - * Agileco Report Module - */ -class report -{ - /** - * Get the list of available modules - */ - function module_menu($VAR) - { - global $C_translate; - - if(!empty($VAR['report_module'])) - $default = $VAR['report_module']; - else - $default = false; - - $return = ''; - - $path = PATH_AGILE . 'reports/'; - chdir($path); - $dir = opendir($path); - $count = 0; - while ($file_name = readdir($dir)) - { - if( $file_name != '..' && $file_name != '.' && !ereg(".xml", $file_name) && !ereg(".php", $file_name)) - { - $name = $C_translate->translate('menu', $file_name, ''); - if(empty($name) && eregi("^[a-zA-Z0-9\-\_]{1,}", $file_name)) $name = strtoupper($file_name); - if(!empty($name)) - { - $return .= "