diff --git a/0.78-bugfixes/.htaccess b/0.78-bugfixes/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..3e52b45fd5b2f15c554e49fcd45d5a0fcbbefac6 --- /dev/null +++ b/0.78-bugfixes/.htaccess @@ -0,0 +1,6 @@ + +ForceType text/html;charset=utf-8 + + +# If you have problem with session.auto_start on install you need to set this value to 0 on php.ini or uncomment this line +#php_value session.auto_start 0 \ No newline at end of file diff --git a/0.78-bugfixes/CHANGELOG.txt b/0.78-bugfixes/CHANGELOG.txt new file mode 100644 index 0000000000000000000000000000000000000000..36a12eb3354b2331ad320fbaa46baa0414a7af9c --- /dev/null +++ b/0.78-bugfixes/CHANGELOG.txt @@ -0,0 +1,2 @@ +See on the website for the changelog : http://glpi-project.org + diff --git a/0.78-bugfixes/COPYING.txt b/0.78-bugfixes/COPYING.txt new file mode 100644 index 0000000000000000000000000000000000000000..dcfa4c235e830d9b57c04515dd4b5a80e36075e6 --- /dev/null +++ b/0.78-bugfixes/COPYING.txt @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 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. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, 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 or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +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 give any other recipients of the Program a copy of this License +along with the Program. + +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 Program or any portion +of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +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 Program, 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 Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) 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; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, 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 executable. However, as a +special exception, the source code 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. + +If distribution of executable or 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 counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program 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. + + 5. 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 Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program 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 to +this License. + + 7. 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 Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program 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 Program. + +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. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program 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. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 Program +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 Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, 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 + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), 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 Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. 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 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 2 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, 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. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/0.78-bugfixes/LISEZMOI.txt b/0.78-bugfixes/LISEZMOI.txt new file mode 100644 index 0000000000000000000000000000000000000000..f057f3fdda795eaf0a35cdd77bb023f64260a3ce --- /dev/null +++ b/0.78-bugfixes/LISEZMOI.txt @@ -0,0 +1,4 @@ +Consulter le guide d'installation et de mise à jour du logiciel GLPI présent sur le site glpi-project.org + +http://www.glpi-project.org/LISEZMOI + diff --git a/0.78-bugfixes/README.txt b/0.78-bugfixes/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..1fd8befd6af465e592db57b911eb63aae9f82065 --- /dev/null +++ b/0.78-bugfixes/README.txt @@ -0,0 +1,3 @@ +See the Installation Guide found on GLPI-PROJECT.ORG for installation steps of GLPI. + +http://www.glpi-project.org/README diff --git a/0.78-bugfixes/ajax/authldap.tabs.php b/0.78-bugfixes/ajax/authldap.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..101f3b2c787efd178173161e3e68b306c19b43b0 --- /dev/null +++ b/0.78-bugfixes/ajax/authldap.tabs.php @@ -0,0 +1,96 @@ +0 && $authldap->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $authldap->showFormUserConfig($_POST['id'],$_POST['target']); + $authldap->showFormGroupsConfig($_POST['id'],$_POST['target']); + $authldap->showFormAdvancedConfig($_POST['id'],$_POST['target']); + $authldap->showFormReplicatesConfig($_POST['id'], $_POST['target']); + Log::showForItem($authldap); + break; + + case 2 : + $authldap->showFormUserConfig($_POST['id'],$_POST['target']); + break; + + case 3 : + $authldap->showFormGroupsConfig($_POST['id'],$_POST['target']); + break; + + case 4 : + $authldap->showFormEntityConfig($_POST['id'],$_POST['target']); + break; + + case 5 : + $authldap->showFormAdvancedConfig($_POST['id'],$_POST['target']); + break; + + case 6 : + $authldap->showFormReplicatesConfig($_POST['id'], $_POST['target']); + break; + + case 12 : + Log::showForItem($authldap); + break; + + default : + if (!Plugin::displayAction($authldap, $_REQUEST['glpi_tab'])) { + $authldap->showFormTestLDAP ($_POST['id'], $_POST['target']); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/authmail.tabs.php b/0.78-bugfixes/ajax/authmail.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..c437311ee05beff2bc733e5f99f0fb766dfd94f5 --- /dev/null +++ b/0.78-bugfixes/ajax/authmail.tabs.php @@ -0,0 +1,72 @@ +0 && $authmail->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Log::showForItem($authmail); + break; + + case 12 : + Log::showForItem($authmail); + break; + + default : + if (!Plugin::displayAction($authmail, $_REQUEST['glpi_tab'])) { + $authmail->showFormTestMail ($_POST['id']); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/autocompletion.php b/0.78-bugfixes/ajax/autocompletion.php new file mode 100644 index 0000000000000000000000000000000000000000..d28f27f929061b7f7512d9a4d0eed779b022e8ef --- /dev/null +++ b/0.78-bugfixes/ajax/autocompletion.php @@ -0,0 +1,104 @@ +getEmpty(); +$table = $item->getTable(); +// Security +if (!isset($item->fields[$_POST['field']])) { + exit(); +} + +$entity=""; +if (isset($_POST['entity_restrict']) && $_POST['entity_restrict']>=0) { + $item = new $_POST['itemtype'](); + if ($item->isEntityAssign()) { + $entity=" AND `entities_id` = '".$_POST['entity_restrict']."' "; + } +} + +if (isset($_POST['user_restrict']) && $_POST['user_restrict']>0) { + $entity=" AND `users_id` = '".$_POST['user_restrict']."' "; +} + +$query = "SELECT COUNT(`".$_POST['field']."`) + FROM `$table` + WHERE `".$_POST['field']."` LIKE '".$_POST['query']."%' + AND `".$_POST['field']."` <> '".$_POST['query']."' + $entity "; +$result = $DB->query($query); +$totnum = $DB->result($result,0,0); + +$query = "SELECT DISTINCT `".$_POST['field']."` AS VAL + FROM `$table` + WHERE `".$_POST['field']."` LIKE '".$_POST['query']."%' + AND `".$_POST['field']."` <> '".$_POST['query']."' + $entity + ORDER BY `".$_POST['field']."` + LIMIT ".intval($_POST['start']).",".intval($_POST['limit']); + +if ($result=$DB->query($query)) { + echo '{"totalCount":"'.$totnum.'","items":['; + if ($DB->numrows($result)>0) { + $first=true; + while ($data=$DB->fetch_array($result)) { + if ($first) { + $first=false; + } else { + echo ','; + } + echo '{"value":"'.$data['VAL'].'"}'; + } + } + echo ']}'; +} +?> diff --git a/0.78-bugfixes/ajax/autoupdatesystem.tabs.php b/0.78-bugfixes/ajax/autoupdatesystem.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..fcb1ac366d2d6d477f47ae2bd8e24a73c027a88f --- /dev/null +++ b/0.78-bugfixes/ajax/autoupdatesystem.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/bookmark.tabs.php b/0.78-bugfixes/ajax/bookmark.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..be4473f773b0a79e93542076262418976e061774 --- /dev/null +++ b/0.78-bugfixes/ajax/bookmark.tabs.php @@ -0,0 +1,51 @@ +showBookmarkList($_POST['target'],$_REQUEST['glpi_tab']); + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/budget.tabs.php b/0.78-bugfixes/ajax/budget.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..30596d9dabefb1700a573964fce7cf111414d5a0 --- /dev/null +++ b/0.78-bugfixes/ajax/budget.tabs.php @@ -0,0 +1,95 @@ +0 && $budget->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $budget->showValuesByEntity(); + $budget->showDevices(); + Document::showAssociated($budget); + Link::showForItem('Budget',$_POST["id"]); + Plugin::displayAction($budget,$_REQUEST['glpi_tab']); + break; + + case 2 : + $budget->showDevices(); + break; + + case 5 : + Document::showAssociated($budget); + break; + + case 7 : + Link::showForItem('Budget',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Budget',$_POST["id"]); + break; + + case 12 : + Log::showForItem($budget); + break; + + default : + if (!Plugin::displayAction($budget, $_REQUEST['glpi_tab'])) { + $budget->showValuesByEntity(); + } + break; + } + +} +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/cartridgeitem.tabs.php b/0.78-bugfixes/ajax/cartridgeitem.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..4e6945ff1a6171d33ed237e6114b10bd719dae59 --- /dev/null +++ b/0.78-bugfixes/ajax/cartridgeitem.tabs.php @@ -0,0 +1,95 @@ +0 && $cartridge->can($_POST["id"],'r')) { + + if (!isset($_REQUEST['glpi_tab'])) { + exit(); + } + + + switch($_REQUEST['glpi_tab']) { + case -1 : + $cartridge->showCompatiblePrinters(); + Cartridge::showAddForm($cartridge); + Cartridge::showForCartridgeItem($cartridge); + Cartridge::showForCartridgeItem($cartridge, 1); + Infocom::showForItem($cartridge); + Document::showAssociated($cartridge); + Link::showForItem('CartridgeItem',$_POST["id"]); + Plugin::displayAction($cartridge, $_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($cartridge); + break; + + case 5 : + Document::showAssociated($cartridge); + break; + + case 7 : + Link::showForItem('CartridgeItem',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'CartridgeItem',$_POST["id"]); + break; + + default : + if (!Plugin::displayAction($cartridge, $_REQUEST['glpi_tab'])) { + $cartridge->showCompatiblePrinters(); + Cartridge::showAddForm($cartridge); + Cartridge::showForCartridgeItem($cartridge); + Cartridge::showForCartridgeItem($cartridge, 1); + } + break; + } +} +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/cartridgeitemtype.tabs.php b/0.78-bugfixes/ajax/cartridgeitemtype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..eee2bd27054945e844c4938a1bae553c917dbbc8 --- /dev/null +++ b/0.78-bugfixes/ajax/cartridgeitemtype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/central.tabs.php b/0.78-bugfixes/ajax/central.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..073d2e69da7461723964e15600c77479005290c8 --- /dev/null +++ b/0.78-bugfixes/ajax/central.tabs.php @@ -0,0 +1,75 @@ +showGroupView(); + break; + + case 3 : + $central->showGlobalView(); + break; + + case -1 : // all + $central->showMyView(); + echo "
"; + $central->showGroupView(); + echo "
"; + $central->showGlobalView(); + echo "
"; + Plugin::displayAction($central,$_REQUEST['glpi_tab']); + break; + + default : + if (!Plugin::displayAction($central,$_REQUEST['glpi_tab'])) { + $central->showMyView(); + } +} + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/comments.php b/0.78-bugfixes/ajax/comments.php new file mode 100644 index 0000000000000000000000000000000000000000..b87a8e8f890613d06db34ba75a43deeb7c4c4121 --- /dev/null +++ b/0.78-bugfixes/ajax/comments.php @@ -0,0 +1,75 @@ +\n"; + echo "Ext.get('".$_REQUEST['withlink']."').dom.href='".$tmpname['link']."';"; + echo "\n"; + } + break; + + default : + if ($_REQUEST["value"]>0) { + $tmpname=Dropdown::getDropdownName($_REQUEST["table"],$_REQUEST["value"],1); + echo $tmpname["comment"]; + } + } +} +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/computer.tabs.php b/0.78-bugfixes/ajax/computer.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..2dabf91346711c7326daf7cd95bf4e69af46435c --- /dev/null +++ b/0.78-bugfixes/ajax/computer.tabs.php @@ -0,0 +1,166 @@ +0 && $computer->can($_POST["id"],'r')) { + if (!empty($_POST["withtemplate"])) { + switch($_REQUEST['glpi_tab']) { + case 2 : + Computer_SoftwareVersion::showForComputer($computer,$_POST["withtemplate"]); + break; + + case 3 : + Computer_Item::showForComputer($_POST['target'], $computer, $_POST["withtemplate"]); + NetworkPort::showForItem('Computer', $_POST["id"], $_POST["withtemplate"]); + break; + + case 4 : + Infocom::showForItem($computer,$_POST["withtemplate"]); + Contract::showAssociated($computer,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($computer,$_POST["withtemplate"]); + break; + + case 20 : + ComputerDisk::showForComputer($computer,$_POST["withtemplate"]); + break; + + default : + if (!Plugin::displayAction($computer,$_REQUEST['glpi_tab'], $_POST["withtemplate"])) { + Computer_Device::showForComputer($computer, $_POST["withtemplate"]); + } + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1 : + Computer_Device::showForComputer($computer); + ComputerDisk::showForComputer($computer,$_POST["withtemplate"]); + Computer_SoftwareVersion::showForComputer($computer); + Computer_Item::showForComputer($_POST['target'], $computer); + NetworkPort::showForItem('Computer', $_POST["id"]); + Infocom::showForItem($computer); + Contract::showAssociated($computer,$_POST["withtemplate"]); + Document::showAssociated($computer); + Ticket::showListForItem('Computer',$_POST["id"]); + Link::showForItem('Computer',$_POST["id"]); + RegistryKey::showForComputer($_POST["id"]); + Plugin::displayAction($computer,$_REQUEST['glpi_tab'], $_POST["withtemplate"]); + break; + + case 2 : + Computer_SoftwareVersion::showForComputer($computer); + break; + + case 3 : + Computer_Item::showForComputer($_POST['target'], $computer); + NetworkPort::showForItem('Computer', $_POST["id"]); + break; + + case 4 : + Infocom::showForItem($computer); + Contract::showAssociated($computer); + break; + + case 5 : + Document::showAssociated($computer); + break; + + case 6 : + Ticket::showListForItem('Computer',$_POST["id"]); + break; + + case 7 : + Link::showForItem('Computer',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Computer',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('Computer',$_POST["id"]); + break; + + case 12 : + Log::showForItem($computer); + break; + + case 13 : + OcsServer::editLock($_POST['target'],$_POST["id"]); + break; + + case 14: + RegistryKey::showForComputer($_POST["id"]); + break; + + case 20 : + ComputerDisk::showForComputer($computer); + break; + + default : + if (!Plugin::displayAction($computer,$_REQUEST['glpi_tab'], $_POST["withtemplate"])) { + Computer_Device::showForComputer($computer); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/computerdisk.tabs.php b/0.78-bugfixes/ajax/computerdisk.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..b69fcaf5cabb631b9eebac16ba0aaa25e555c8d7 --- /dev/null +++ b/0.78-bugfixes/ajax/computerdisk.tabs.php @@ -0,0 +1,60 @@ +0 && $disk->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + default : + if (!Plugin::displayAction($disk, $_REQUEST['glpi_tab'])) { + } + } +} + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/computermodel.tabs.php b/0.78-bugfixes/ajax/computermodel.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..eeb3d9c874ddf9664420bc9cd878527c6ed29f81 --- /dev/null +++ b/0.78-bugfixes/ajax/computermodel.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/computertype.tabs.php b/0.78-bugfixes/ajax/computertype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..2e55d2d4ac70ab13b7a6e3e141dedca5a75fabfb --- /dev/null +++ b/0.78-bugfixes/ajax/computertype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/config.tabs.php b/0.78-bugfixes/ajax/config.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..27ad60320ae23e536d446750ff650f5176aed766 --- /dev/null +++ b/0.78-bugfixes/ajax/config.tabs.php @@ -0,0 +1,94 @@ +showFormDisplay(); + $config->showFormUserPrefs($CFG_GLPI); + $config->showFormInventory(); + $config->showFormHelpdesk(); + $config->showSystemInformations(); + if (DBConnection::isDBSlaveActive()) { + $config->showFormDBSlave(); + } + Plugin::displayAction($config,$_REQUEST['glpi_tab']); + break; + + case 1 : + $config->showFormDisplay(); + break; + + case 2 : + $config->showFormUserPrefs($CFG_GLPI); + break; + + case 3 : + $config->showFormInventory(); + break; + + case 4 : + $config->showFormHelpdesk(); + break; + + case 5 : + $config->showSystemInformations(); + break; + + case 6 : + $config->showFormDBSlave(); + break; + + + default : + if (!Plugin::displayAction($config,$_REQUEST['glpi_tab'])) { + $config->showFormDisplay(); + } +} + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/consumableitem.tabs.php b/0.78-bugfixes/ajax/consumableitem.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..abfe38f72a29289a83c4c5194ce254e66296ea7a --- /dev/null +++ b/0.78-bugfixes/ajax/consumableitem.tabs.php @@ -0,0 +1,88 @@ +0 && $consumable->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Consumable::showAddForm($consumable); + Consumable::showForItem($consumable); + Consumable::showForItem($consumable, 1); + Infocom::showForItem($consumable); + Document::showAssociated($consumable); + Link::showForItem('ConsumableItem',$_POST["id"]); + Plugin::displayAction($consumable,$_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($consumable); + break; + + case 5 : + Document::showAssociated($consumable); + break; + + case 7 : + Link::showForItem('ConsumableItem',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'ConsumableItem',$_POST["id"]); + break; + + default : + if (!Plugin::displayAction($consumable,$_REQUEST['glpi_tab'])) { + Consumable::showAddForm($consumable); + Consumable::showForItem($consumable); + Consumable::showForItem($consumable, 1); + } + } +} +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/consumableitemtype.tabs.php b/0.78-bugfixes/ajax/consumableitemtype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..085080024fb1e37cf8f6df8d147a1c617249cfcc --- /dev/null +++ b/0.78-bugfixes/ajax/consumableitemtype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/contact.tabs.php b/0.78-bugfixes/ajax/contact.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..21f2020222619078bf1d1c1c8dcae0ec5b3d2da1 --- /dev/null +++ b/0.78-bugfixes/ajax/contact.tabs.php @@ -0,0 +1,87 @@ +0 && $contact->getFromDB($_POST['id'])) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $contact->showSuppliers(); + Document::showAssociated($contact); + Link::showForItem('Contact',$_POST["id"]); + Plugin::displayAction($contact,$_REQUEST['glpi_tab']); + break; + + case 5 : + Document::showAssociated($contact); + break; + + case 7 : + Link::showForItem('Contact',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Contact',$_POST["id"]); + break; + + case 12 : + Log::showForItem($contact); + break; + + default : + if (!Plugin::displayAction($contact,$_REQUEST['glpi_tab'])) { + $contact->showSuppliers(); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/contacttype.tabs.php b/0.78-bugfixes/ajax/contacttype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..494ecc1f7c7515023f46b40e45822892a4a4e255 --- /dev/null +++ b/0.78-bugfixes/ajax/contacttype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/contract.tabs.php b/0.78-bugfixes/ajax/contract.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..6f79c8cffd1954ff0f88a90ce2daf178669448cc --- /dev/null +++ b/0.78-bugfixes/ajax/contract.tabs.php @@ -0,0 +1,90 @@ +0 && $contract->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $contract->showSuppliers(); + $contract->showItems(); + Document::showAssociated($contract); + Link::showForItem('Contact',$_POST["id"]); + Plugin::displayAction($contract,$_REQUEST['glpi_tab']); + break; + + case 2 : + $contract->showItems(); + break; + + case 5 : + Document::showAssociated($contract); + break; + + case 7 : + Link::showForItem('Contract',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Contract',$_POST["id"]); + break; + + case 12 : + Log::showForItem($contract); + break; + + default : + if (!Plugin::displayAction($contract,$_REQUEST['glpi_tab'])) { + $contract->showSuppliers(); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/contracttype.tabs.php b/0.78-bugfixes/ajax/contracttype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..3cb88c93830cfece2c32e04bdbece966b995ed7c --- /dev/null +++ b/0.78-bugfixes/ajax/contracttype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/crontask.tabs.php b/0.78-bugfixes/ajax/crontask.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..c3e88e34cebee40688e18bf2549a4410b51dc856 --- /dev/null +++ b/0.78-bugfixes/ajax/crontask.tabs.php @@ -0,0 +1,70 @@ +0 && $crontask->getFromDB($_POST['id'])) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $crontask->showStatistics(); + $crontask->showHistory(); + Plugin::displayAction($crontask,$_REQUEST['glpi_tab']); + break; + + case 2 : + $crontask->showHistory(); + break; + + default : + if (!Plugin::displayAction($crontask,$_REQUEST['glpi_tab'])) { + $crontask->showStatistics(); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/device.tabs.php b/0.78-bugfixes/ajax/device.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..a2947584ef047f711dd5763e65347fa18de18fd9 --- /dev/null +++ b/0.78-bugfixes/ajax/device.tabs.php @@ -0,0 +1,50 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicecase.tabs.php b/0.78-bugfixes/ajax/devicecase.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..343c5a51e949438689452d5f1918090be793a1b6 --- /dev/null +++ b/0.78-bugfixes/ajax/devicecase.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicecasetype.tabs.php b/0.78-bugfixes/ajax/devicecasetype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..e56ce8f90110ede25f71e53ce0c92f9d0f673e20 --- /dev/null +++ b/0.78-bugfixes/ajax/devicecasetype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicecontrol.tabs.php b/0.78-bugfixes/ajax/devicecontrol.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..31efb997caebc30e43fd1cae74b0a7f43a345e61 --- /dev/null +++ b/0.78-bugfixes/ajax/devicecontrol.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicedrive.tabs.php b/0.78-bugfixes/ajax/devicedrive.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..9e1b858e5ddccf60fa98290502ec725926e68110 --- /dev/null +++ b/0.78-bugfixes/ajax/devicedrive.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicegraphiccard.tabs.php b/0.78-bugfixes/ajax/devicegraphiccard.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..dd4ebf4eb026c5f8d033964cb9ba8f8379ef3ec2 --- /dev/null +++ b/0.78-bugfixes/ajax/devicegraphiccard.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/deviceharddrive.tabs.php b/0.78-bugfixes/ajax/deviceharddrive.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..056640c87ae01d9ccbc0d904bc7c966bfcbc10ae --- /dev/null +++ b/0.78-bugfixes/ajax/deviceharddrive.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicememory.tabs.php b/0.78-bugfixes/ajax/devicememory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..87334b4eb06db14b91aac3929b8d82eaf7576854 --- /dev/null +++ b/0.78-bugfixes/ajax/devicememory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicememorytype.tabs.php b/0.78-bugfixes/ajax/devicememorytype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..12ccb9a28dbca3eb27882e4bc7a1cae54d8b9c27 --- /dev/null +++ b/0.78-bugfixes/ajax/devicememorytype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicemotherboard.tabs.php b/0.78-bugfixes/ajax/devicemotherboard.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..55fb71c1293fe06287a1c5e6de4ce3419fe16119 --- /dev/null +++ b/0.78-bugfixes/ajax/devicemotherboard.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicenetworkcard.tabs.php b/0.78-bugfixes/ajax/devicenetworkcard.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..a22477dbb55edc070d9d491d841f363eefdf098f --- /dev/null +++ b/0.78-bugfixes/ajax/devicenetworkcard.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicepci.tabs.php b/0.78-bugfixes/ajax/devicepci.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..cb7ee1d6d3d7ce034759945c0bc01204f62f0413 --- /dev/null +++ b/0.78-bugfixes/ajax/devicepci.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicepowersupply.tabs.php b/0.78-bugfixes/ajax/devicepowersupply.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..e0f2f3435a9a549a50edcddbae6773f3d713dd5b --- /dev/null +++ b/0.78-bugfixes/ajax/devicepowersupply.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/deviceprocessor.tabs.php b/0.78-bugfixes/ajax/deviceprocessor.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..f897d65d0228d75aef4a582c0f69f79556f51813 --- /dev/null +++ b/0.78-bugfixes/ajax/deviceprocessor.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/devicesoundcard.tabs.php b/0.78-bugfixes/ajax/devicesoundcard.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..74706451d78d33f7725bfa08f77f6cf646e29a21 --- /dev/null +++ b/0.78-bugfixes/ajax/devicesoundcard.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/displaypreference.tabs.php b/0.78-bugfixes/ajax/displaypreference.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..e9af7d0c0a250099f0b25da6b8624687507dc29e --- /dev/null +++ b/0.78-bugfixes/ajax/displaypreference.tabs.php @@ -0,0 +1,65 @@ +showFormGlobal($_POST['target'],$_POST["displaytype"]); + break; + + case 2 : + checkRight('search_config','w'); + $setupdisplay->showFormPerso($_POST['target'],$_POST["displaytype"]); + break; + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/document.tabs.php b/0.78-bugfixes/ajax/document.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..577018cc6636f003cc736d224cdd8d5e2798a073 --- /dev/null +++ b/0.78-bugfixes/ajax/document.tabs.php @@ -0,0 +1,78 @@ +0 && $doc->can($_POST["id"],'r')) { + switch ($_REQUEST['glpi_tab']) { + case -1 : + $doc->showItems(); + Document::showAssociated($doc); + Plugin::displayAction($doc,$_REQUEST['glpi_tab']); + break; + + case 5 : + Document::showAssociated($doc); + break; + + case 10 : + showNotesForm( $_POST['target'],'Document',$_POST["id"]); + break; + + case 12 : + Log::showForItem($doc); + break; + + default : + if (!Plugin::displayAction($doc,$_REQUEST['glpi_tab'])) { + $doc->showItems(); + } + } +} +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/documentcategory.tabs.php b/0.78-bugfixes/ajax/documentcategory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..8ec1678f5d01098f6d541111aa79a19fb40a7c14 --- /dev/null +++ b/0.78-bugfixes/ajax/documentcategory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/documenttype.tabs.php b/0.78-bugfixes/ajax/documenttype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..a2cfe0c70b0237295d58609391c6e77bcadb0b61 --- /dev/null +++ b/0.78-bugfixes/ajax/documenttype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/domain.tabs.php b/0.78-bugfixes/ajax/domain.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..d477c4b502aac7813427e5e4635cc1b844f928e6 --- /dev/null +++ b/0.78-bugfixes/ajax/domain.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdown.common.tabs.php b/0.78-bugfixes/ajax/dropdown.common.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..2ebcddaab653c8a815036bf3090813ead13be3f3 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdown.common.tabs.php @@ -0,0 +1,56 @@ +can($_POST["id"],'r')) { + $dropdown->showTabContent($_POST["id"],$_REQUEST['glpi_tab']); +} + +ajaxFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownAllItems.php b/0.78-bugfixes/ajax/dropdownAllItems.php new file mode 100644 index 0000000000000000000000000000000000000000..3d3810dd51d19b53081904bd2a765f5b79ce80c5 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownAllItems.php @@ -0,0 +1,84 @@ + normal users + $link="dropdownValue.php"; + + if ($_POST["idtable"] == 'User') { + $link="dropdownUsers.php"; + } + + $rand=mt_rand(); + $use_ajax=false; + if ($CFG_GLPI["use_ajax"] && countElementsInTable($table)>$CFG_GLPI["ajax_limit_count"]) { + $use_ajax=true; + } + + $paramsallitems=array('searchText' => '__VALUE__', + 'table' => $table, + 'itemtype' => $_POST["idtable"], + 'rand' => $rand, + 'myname' => $_POST["myname"], + 'displaywith' => array('serial', + 'otherserial'), + 'display_emptychoice'=>true + ); + + if (isset($_POST['value'])) { + $paramsallitems['value']=$_POST['value']; + } + if (isset($_POST['entity_restrict'])) { + $paramsallitems['entity_restrict']=$_POST['entity_restrict']; + } + if (isset($_POST['condition'])) { + $paramsallitems['condition']=stripslashes($_POST['condition']); + } + + $default=""; + ajaxDropdown($use_ajax,"/ajax/$link",$paramsallitems,$default,$rand); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownConnect.php b/0.78-bugfixes/ajax/dropdownConnect.php new file mode 100644 index 0000000000000000000000000000000000000000..ef4c41ac0c2d19b7d4e2566cbd02117e13f9ae85 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownConnect.php @@ -0,0 +1,175 @@ +checkGlobal('w'); + +if (isset($_POST["used"]) && !is_numeric($_POST["used"]) && !is_array($_POST["used"])) { + $used = unserialize(stripslashes($_POST["used"])); +} else { + $used = $_POST["used"]; +} + +if (isset($_POST["entity_restrict"]) + && !is_numeric($_POST["entity_restrict"]) + && !is_array($_POST["entity_restrict"])) { + + $_POST["entity_restrict"]=unserialize(stripslashes($_POST["entity_restrict"])); +} + +// Make a select box +$table=getTableForItemType($_POST["idtable"]); +$item= new $_POST["idtable"]; +$where=""; + +if ($item->maybeDeleted()) { + $where.=" AND `$table`.`is_deleted` = '0' "; +} +if ($item->maybeTemplate()) { + $where.=" AND `$table`.`is_template` = '0' "; +} + +if (strlen($_POST['searchText'])>0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $where.=" AND ( `$table`.`name` ".makeTextSearch($_POST['searchText']). + " OR `$table`.`otherserial` ".makeTextSearch($_POST['searchText']). + " OR `$table`.`serial` ".makeTextSearch($_POST['searchText'])." )"; +} + +$multi = $item->maybeRecursive(); +if (isset($_POST["entity_restrict"]) && !($_POST["entity_restrict"]<0)) { + $where.=getEntitiesRestrictRequest(" AND ",$table,'',$_POST["entity_restrict"],$multi); + if (is_array($_POST["entity_restrict"]) && count($_POST["entity_restrict"])>1) { + $multi=true; + } +} else { + $where.=getEntitiesRestrictRequest(" AND ",$table,'',$_SESSION['glpiactiveentities'],$multi); + if (count($_SESSION['glpiactiveentities'])>1) { + $multi=true; + } +} + +$NBMAX=$CFG_GLPI["dropdown_max"]; +$LIMIT="LIMIT 0,$NBMAX"; + +if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) { + $LIMIT=""; +} + +$where_used = ''; +if (!empty($used)) { + $where_used = " AND `$table`.`id` NOT IN ('".implode("','",$used)."')"; +} + +if ($_POST["onlyglobal"] && $_POST["idtable"] != 'Computer') { + $CONNECT_SEARCH=" WHERE `$table`.`is_global` = '1' "; +} else { + if ($_POST["idtable"] == 'Computer') { + $CONNECT_SEARCH=" WHERE 1 "; + } else { + $CONNECT_SEARCH=" WHERE ((`glpi_computers_items`.`id` IS NULL $where_used) + OR `$table`.`is_global` = '1') "; + } +} + +$LEFTJOINCONNECT=""; +if ($_POST["idtable"] != 'Computer' && !$_POST["onlyglobal"]) { + $LEFTJOINCONNECT = " LEFT JOIN `glpi_computers_items` + ON (`$table`.`id` = `glpi_computers_items`.`items_id` + AND `glpi_computers_items`.`itemtype` = '".$_POST['idtable']."')"; +} +$query = "SELECT DISTINCT `$table`.`id`, `$table`.`name` AS name, `$table`.`serial` AS serial, + `$table`.`otherserial` AS otherserial, `$table`.`entities_id` AS entities_id + FROM `$table` + $LEFTJOINCONNECT + $CONNECT_SEARCH + $where + ORDER BY entities_id, name ASC + $LIMIT"; + +$result = $DB->query($query); +echo ""; + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownConnectPort.php b/0.78-bugfixes/ajax/dropdownConnectPort.php new file mode 100644 index 0000000000000000000000000000000000000000..ca104b6664545d7684db29a308959914b4b0ae58 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownConnectPort.php @@ -0,0 +1,101 @@ + '".$_POST['current']."' + AND `$table`.`is_deleted` = '0' + AND `$table`.`is_template` = '0' + ORDER BY `glpi_networkports`.`id`"; + $result = $DB->query($query); + + echo "
"; + echo ""; + + echo ""; +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownConnectPortDeviceType.php b/0.78-bugfixes/ajax/dropdownConnectPortDeviceType.php new file mode 100644 index 0000000000000000000000000000000000000000..f5b9079406a4522820fbcf5734ced292c67c591d --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownConnectPortDeviceType.php @@ -0,0 +1,70 @@ + '__VALUE__', + 'itemtype' => $_POST['itemtype'], + 'rand' => $rand, + 'myname' => "items", + 'entity_restrict' => $_POST["entity_restrict"], + 'update_item' => + array('value_fieldname' => 'item', + 'to_update' => "results_item_$rand", + 'url' => $CFG_GLPI["root_doc"]."/ajax/dropdownConnectPort.php", + 'moreparams' => array('current' => $_POST['current'], + 'itemtype' => $_POST['itemtype'], + 'myname' => $_POST['myname'],)) + ); + + $default="\n"; + ajaxDropdown($use_ajax,"/ajax/dropdownValue.php",$paramsconnectpdt,$default,$rand); + + echo ""; + echo "\n"; +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownFindNum.php b/0.78-bugfixes/ajax/dropdownFindNum.php new file mode 100644 index 0000000000000000000000000000000000000000..2c74c49cbe71947e7c716e41130d4b6d6a941248 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownFindNum.php @@ -0,0 +1,130 @@ +isEntityAssign()) { + if (isset ($_POST["entity_restrict"]) && $_POST["entity_restrict"] >= 0) { + $entity = $_POST["entity_restrict"]; + } else { + $entity = ''; + } + // allow opening ticket on recursive object (printer, software, ...) + $recursive = $item->maybeRecursive(); + $where = getEntitiesRestrictRequest("WHERE", $_POST['table'], '', $entity, $recursive); +} else { + $where = "WHERE 1"; +} + +if ($item->maybeDeleted()) { + $where.=" AND `is_deleted` ='0' "; +} +if ($item->maybeTemplate()) { + $where.=" AND `is_template` = '0' "; +} + +if (strlen($_POST['searchText'])>0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $search=makeTextSearch($_POST['searchText']); + + $where.=" AND (`name` ".$search." + OR `id` = '".$_POST['searchText']."'"; + + if ($_POST['table']!="glpi_softwares" && !$itemtypeisplugin) { + $where.=" OR `contact` ".$search." + OR `serial` ".$search." + OR `otherserial` ".$search; + } + $where.=")"; +} +//If software or plugins : filter to display only the objects that are allowed to be visible in Helpdesk +if (in_array($_POST['itemtype'],$CFG_GLPI["helpdesk_visible_types"])){ + $where.= " AND `is_helpdesk_visible` = '1' "; +} +$NBMAX=$CFG_GLPI["dropdown_max"]; +$LIMIT="LIMIT 0,$NBMAX"; +if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) { + $LIMIT=""; +} + +$query = "SELECT * + FROM `".$_POST['table']."` + $where + ORDER BY `name` + $LIMIT"; +$result = $DB->query($query); + +echo ""; + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownInstallVersion.php b/0.78-bugfixes/ajax/dropdownInstallVersion.php new file mode 100644 index 0000000000000000000000000000000000000000..e3950f9f521c146dfec67bd6d815f924a7084bf4 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownInstallVersion.php @@ -0,0 +1,81 @@ +0) { + if (!isset($_POST['value'])) { + $_POST['value']=0; + } + + // Make a select box + $query = "SELECT DISTINCT `glpi_softwareversions`.*, `glpi_states`.`name` AS sname + FROM `glpi_softwareversions` + LEFT JOIN `glpi_states` ON (`glpi_softwareversions`.`states_id` = `glpi_states`.`id`) + WHERE `glpi_softwareversions`.`softwares_id` = '".$_POST['softwares_id']."' + ORDER BY `name`"; + $result = $DB->query($query); + $number=$DB->numrows($result); + + echo " "; +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownMassiveAction.php b/0.78-bugfixes/ajax/dropdownMassiveAction.php new file mode 100644 index 0000000000000000000000000000000000000000..473365edd7284682377d11054a0b3311913579a5 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownMassiveAction.php @@ -0,0 +1,334 @@ +"w","infocom"=>"w")); + } else { + $item->checkGlobal("w"); + } + + echo ""; + echo ""; + echo ' '; + switch($_POST["action"]) { + case "activate_rule" : + Dropdown::showYesNo("activate_rule"); + echo " \n"; + break; + + case 'move_under' : + echo $LANG['setup'][75]; + Dropdown::show($_POST['itemtype'], array('name' => 'parent', 'comments' => 0)); + echo " \n"; + break; + + case 'merge' : + echo " ".$_SESSION['glpiactive_entity_shortname']; + echo " \n"; + break; + + case "move_rule" : + echo " "; + if (isset($_POST['entity_restrict'])) { + $condition = $_POST['entity_restrict']; + } + else { + $condition = ""; + } + Rule::dropdown(array('sub_type'=>$_POST['sub_type'],'name' => "ranking",'entity_restrict'=>$condition)); + echo "\n"; + break; + + case "add_followup" : + TicketFollowup::showFormMassiveAction(); + break; + + case "add_task" : + TicketTask::showFormMassiveAction(); + break; + + case "submit_validation" : + TicketValidation::showFormMassiveAction(); + break; + + case "validate_ticket" : + TicketValidation::dropdownStatus("status"); + echo " \n"; + break; + + case "change_authtype" : + $rand = Auth::dropdown(array('name'=>'authtype')); + $paramsmassaction=array('authtype'=>'__VALUE__'); + ajaxUpdateItemOnSelectEvent("dropdown_authtype$rand","show_massiveaction_field", + $CFG_GLPI["root_doc"]."/ajax/dropdownMassiveActionAuthMethods.php", + $paramsmassaction); + echo ""; + echo " \n"; + break; + + case "compute_software_category" : + case "replay_dictionnary" : + case "force_ocsng_update" : + case "force_user_ldap_update" : + case "delete" : + case "purge" : + case "restore" : + case "add_transfer_list" : + case "delete_email" : + case 'reset': + echo "\n"; + break; + + case "unlock_ocsng_field" : + $fields['all']=$LANG['common'][66]; + $fields+=OcsServer::getLockableFields(); + Dropdown::showFromArray("field",$fields); + echo " "; + break; + + case "unlock_ocsng_monitor" : + case "unlock_ocsng_peripheral" : + case "unlock_ocsng_software" : + case "unlock_ocsng_printer" : + case "unlock_ocsng_disk" : + case "unlock_ocsng_ip" : + echo ""; + break; + + case "install" : + Software::dropdownSoftwareToInstall("softwareversions_id",$_SESSION["glpiactive_entity"],1); + echo " "; + break; + + case "connect" : + Computer_Item::dropdownConnect('Computer',$_POST["itemtype"],"connect_item"); + echo " "; + break; + + case "connect_to_computer" : + Dropdown::showAllItems("connect_item",0,0,$_SESSION["glpiactive_entity"],array('Phone', + 'Monitor', + 'Printer', + 'Peripheral'), + true); + echo " "; + break; + + case "disconnect" : + echo ""; + break; + + case "add_group" : + Dropdown::show('Group'); + echo " "; + break; + + case "add_userprofile" : + Dropdown::show('Entity', array('entity' => $_SESSION['glpiactiveentities'])); + echo ". ".$LANG['profiles'][22]." :"; + Profile::dropdownUnder(); + echo ". ".$LANG['profiles'][28]." :"; + Dropdown::showYesNo("is_recursive",0); + echo " "; + break; + + case "add_document" : + Document::dropdown(array('name' => 'docID')); + echo " "; + break; + + case "add_contract" : + Contract::dropdown(array('name' => "conID")); + echo " "; + break; + + case "add_contact" : + Dropdown::show('Contact', array('name' => "conID")); + echo " "; + break; + + case "add_enterprise" : + Dropdown::show('Supplier', array('name' => "conID")); + echo " "; + break; + + case "import_email": + Dropdown::show('Entity'); + echo " "; + break; + + case "add_user_to_email": + User::dropdown(); + echo " "; + break; + + case "update" : + $first_group=true; + $newgroup=""; + $items_in_group=0; + $show_all=true; + $show_infocoms=true; + $ic = new Infocom(); + if (in_array($_POST["itemtype"],$CFG_GLPI["infocom_types"]) + && (!$item->canUpdate() || !$ic->canUpdate())) { + $show_all=false; + $show_infocoms=$ic->canUpdate(); + } + $searchopt=Search::getCleanedOptions($_POST["itemtype"],'w'); + + echo ""; + + $paramsmassaction=array('id_field'=>'__VALUE__', + 'itemtype'=>$_POST["itemtype"]); + + foreach ($_POST as $key => $val) { + if (preg_match("/extra_/",$key,$regs)) { + $paramsmassaction[$key]=$val; + } + } + ajaxUpdateItemOnSelectEvent("massiveaction_field","show_massiveaction_field", + $CFG_GLPI["root_doc"]."/ajax/dropdownMassiveActionField.php", + $paramsmassaction); + + echo " \n"; + break; + + default : + // Plugin specific actions + $split=explode('_',$_POST["action"]); + if ($split[0]=='plugin' && isset($split[1])) { + // Normalized name plugin_name_action + // Allow hook from any plugin on any (core or plugin) type + doOneHook($split[1],'MassiveActionsDisplay',array('itemtype'=>$_POST["itemtype"], + 'action'=>$_POST["action"])); + } else if ($plug=isPluginItemType($_POST["itemtype"])) { + // non-normalized name + // hook from the plugin defining the type + doOneHook($plug['plugin'],'MassiveActionsDisplay', + $_POST["itemtype"],$_POST["action"]); + } + break; + } +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownMassiveActionAuthMethods.php b/0.78-bugfixes/ajax/dropdownMassiveActionAuthMethods.php new file mode 100644 index 0000000000000000000000000000000000000000..1110932189ab713a8464afae72c95e130f125ba0 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownMassiveActionAuthMethods.php @@ -0,0 +1,64 @@ + 0) { + $name='massiveaction'; + if (isset($_POST['name'])) { + $name=$_POST['name']; + } + + switch($_POST["authtype"]) { + case Auth::DB_GLPI : + echo ""; + break; + case Auth::LDAP : + case Auth::EXTERNAL : + Dropdown::show('AuthLDAP', array('name' => "auths_id")); + break; + + case Auth::MAIL : + Dropdown::show('AuthMail', array('name' => "auths_id")); + break; + } + echo " "; +} +?> diff --git a/0.78-bugfixes/ajax/dropdownMassiveActionField.php b/0.78-bugfixes/ajax/dropdownMassiveActionField.php new file mode 100644 index 0000000000000000000000000000000000000000..96e7541a0709f49d9126885ac06102ab3e4ca91a --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownMassiveActionField.php @@ -0,0 +1,261 @@ +"w","infocom"=>"w")); +} else { + $item->checkGlobal("w"); +} + + +if (isset($_POST["itemtype"]) && isset($_POST["id_field"]) && $_POST["id_field"]) { + $search = Search::getOptions($_POST["itemtype"]); + $search = $search[$_POST["id_field"]]; + + // Specific budget case + if ($_POST["id_field"]==50) { + $search["linkfield"]="budgets_id"; + } + $FIELDNAME_PRINTED=false; + + echo ' '; + + if ($search["table"]==getTableForItemType($_POST["itemtype"])) { // field type + switch ($search["table"].".".$search["linkfield"]) { + case "glpi_cartridgeitems.alarm_threshold" : + case "glpi_consumableitems.alarm_threshold" : + Dropdown::showInteger($search["linkfield"],0,-1,100); + break; + + case "glpi_contracts.duration" : + case "glpi_contracts.notice" : + Dropdown::showInteger($search["field"],0,0,120); + echo " ".$LANG['financial'][57]; + break; + + case "glpi_softwarelicenses.number" : + Dropdown::showInteger($search["linkfield"],0,1,1000,1,array(-1=>$LANG['software'][4])); + break; + + case "glpi_contracts.alert" : + Contract::dropdownAlert($search["linkfield"],0); + break; + + case "glpi_tickets.status" : + Ticket::dropdownStatus($search["linkfield"]); + break; + + case "glpi_tickets.priority" : + Ticket::dropdownPriority($search["linkfield"]); + break; + case "glpi_tickets.impact" : + Ticket::dropdownImpact($search["linkfield"]); + break; + case "glpi_tickets.urgency" : + Ticket::dropdownUrgency($search["linkfield"]); + break; + case "glpi_tickets.global_validation" : + TicketValidation::dropdownStatus($search["linkfield"]); + break; + + default : + // Specific plugin Type case + $plugdisplay=false; + if ($plug=isPluginItemType($_POST["itemtype"])) { + $plugdisplay=doOneHook($plug['plugin'], + 'MassiveActionsFieldsDisplay', + array('itemtype' => $_POST["itemtype"], + 'options' => $search)); + } + $already_display=false; + if (isset($search['datatype'])) { + switch ($search['datatype']) { + case "date" : + showDateFormItem($search["field"]); + $already_display=true; + break; + + case "datetime" : + showDateTimeFormItem($search["field"]); + $already_display=true; + break; + + case "bool" : + Dropdown::showYesNo($search["linkfield"]); + $already_display=true; + break; + } + } + if (!$plugdisplay && !$already_display) { + $newtype=getItemTypeForTable($search["table"]); + if ($newtype != $_POST["itemtype"]) { + $item = new $newtype(); + } + autocompletionTextField($item,$search["field"], + array('name' => $search["linkfield"], + 'entity' => $_SESSION["glpiactive_entity"])); + } + break; + } + } else { + switch ($search["table"]) { + case "glpi_infocoms" : // infocoms case + switch ($search["field"]) { + case "alert" : + Infocom::dropdownAlert($search["field"]); + break; + + case "buy_date" : + case "use_date" : + showDateFormItem($search["field"]); + echo "  "; + break; + + case "sink_type" : + Infocom::dropdownAmortType("sink_type"); + break; + + case "sink_time" : + Dropdown::showInteger("sink_time",0,0,15); + break; + + case "warranty_duration" : + Dropdown::showInteger("warranty_duration",0,0,120,1,array(-1 => $LANG['financial'][2])); + echo " ".$LANG['financial'][57]."  "; + break; + + default : + $newtype=getItemTypeForTable($search["table"]); + if ($newtype != $_POST["itemtype"]) { + $item = new $newtype(); + } + autocompletionTextField($item,$search["field"], + array('entity' => $_SESSION["glpiactive_entity"])); + break; + } + break; + + case "glpi_suppliers_infocoms" : // Infocoms suppliers + Dropdown::show('Supplier', array('entity' => $_SESSION['glpiactiveentities'])); + echo ""; + $FIELDNAME_PRINTED=true; + break; + + case "glpi_budgets" : // Infocoms budget + Dropdown::show('Budget'); + break; + + case "glpi_ocslinks" : // auto_update ocs_link + Dropdown::showYesNo("_auto_update_ocs"); + echo ""; + $FIELDNAME_PRINTED=true; + break; + + case "glpi_users" : // users + switch ($search["linkfield"]) { + case "users_id_assign" : + User::dropdown(array('name' => $search["linkfield"], + 'right' => 'own_ticket', + 'entity' => $_SESSION["glpiactive_entity"])); + break; + + case "users_id_tech" : + User::dropdown(array('name' => $search["linkfield"], + 'value' => 0, + 'right' => 'interface', + 'entity' => $_SESSION["glpiactive_entity"])); + break; + + default : + User::dropdown(array('name' => $search["linkfield"], + 'entity' => $_SESSION["glpiactive_entity"], + 'right' => 'all')); + break; + } + break; + break; + + case "glpi_softwareversions": + switch ($search["linkfield"]) { + case "softwareversions_id_use" : + case "softwareversions_id_buy" : + $_POST['softwares_id']=$_POST['extra_softwares_id']; + $_POST['myname']=$search['linkfield']; + include("dropdownInstallVersion.php"); + break; + } + break; + + default : // dropdown case + $plugdisplay=false; + // Specific plugin Type case + if (($plug=isPluginItemType($_POST["itemtype"])) + // Specific for plugin which add link to core object + || ($plug=isPluginItemType(getItemTypeForTable($search['table'])))) { + $plugdisplay = doOneHook($plug['plugin'], + 'MassiveActionsFieldsDisplay', + array('itemtype' => $_POST["itemtype"], + 'options' => $search)); + } + if (!$plugdisplay) { + Dropdown::show(getItemTypeForTable($search["table"]), + array('name' => $search["linkfield"], + 'entity' => $_SESSION['glpiactiveentities'])); + } + break; + } + } + if (!$FIELDNAME_PRINTED) { + if (empty($search["linkfield"])) { + echo ""; + } else { + echo ""; + } + } + echo " "; +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownMassiveActionPorts.php b/0.78-bugfixes/ajax/dropdownMassiveActionPorts.php new file mode 100644 index 0000000000000000000000000000000000000000..df571868391c64f195b91077e9042afb0dd375ff --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownMassiveActionPorts.php @@ -0,0 +1,70 @@ +"; + switch($_POST["action"]) { + case "delete" : + echo " "; + break; + + case "assign_vlan" : + Dropdown::show('Vlan'); + echo " "; + break; + + case "unassign_vlan" : + Dropdown::show('Vlan'); + echo " "; + break; + + case "move" : + Dropdown::show($_POST['itemtype'], array('name' => 'device')); + echo " "; + break; + } +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownNetpoint.php b/0.78-bugfixes/ajax/dropdownNetpoint.php new file mode 100644 index 0000000000000000000000000000000000000000..fad7954c05054b02b691296bef382890a3b35abf --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownNetpoint.php @@ -0,0 +1,149 @@ +0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $where=" WHERE (`glpi_netpoints`.`name` ".makeTextSearch($_POST['searchText'])." + OR `glpi_locations`.`completename` ".makeTextSearch($_POST['searchText']).")"; +} else { + $where=" WHERE 1 "; +} + +$NBMAX=$CFG_GLPI["dropdown_max"]; +$LIMIT="LIMIT 0,$NBMAX"; +if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) { + $LIMIT=""; +} +$location_restrict=false; +if (!(isset($_POST["devtype"]) && $_POST["devtype"] != 'NetworkEquipment' + && isset($_POST["locations_id"]) && $_POST["locations_id"]>0)) { + + if (isset($_POST["entity_restrict"]) && $_POST["entity_restrict"]>=0) { + $where.= " AND `glpi_netpoints`.`entities_id`='".$_POST["entity_restrict"]."'"; + } else { + $where.=getEntitiesRestrictRequest(" AND ","glpi_locations"); + } +} + +$query = "SELECT `glpi_netpoints`.`comment` AS comment, `glpi_netpoints`.`id`, + `glpi_netpoints`.`name` AS netpname, `glpi_locations`.`completename` AS loc + FROM `glpi_netpoints` + LEFT JOIN `glpi_locations` ON (`glpi_netpoints`.`locations_id` = `glpi_locations`.`id`) "; + +if (isset($_POST["devtype"]) && !empty($_POST["devtype"])) { + $query .= "LEFT JOIN `glpi_networkports` + ON (`glpi_netpoints`.`id` = `glpi_networkports`.`netpoints_id` + AND `glpi_networkports`.`itemtype`"; + + if ($_POST["devtype"] == 'NetworkEquipment') { + $query .= " = 'NetworkEquipment' )"; + } else { + $query .= " != 'NetworkEquipment' )"; + if (isset($_POST["locations_id"]) && $_POST["locations_id"]>=0) { + $location_restrict=true; + $where.=" AND `glpi_netpoints`.`locations_id`='".$_POST["locations_id"]."' "; + } + } + $where.=" AND `glpi_networkports`.`netpoints_id` IS NULL "; + +} else if (isset($_POST["locations_id"]) && $_POST["locations_id"]>=0) { + $location_restrict=true; + $where.=" AND `glpi_netpoints`.`locations_id`='".$_POST["locations_id"]."' "; +} + +$query .= $where ." + ORDER BY `glpi_locations`.`completename`, `glpi_netpoints`.`name` + $LIMIT"; +$result = $DB->query($query); + +echo "\n"; + +if (isset($_POST["comment"]) && $_POST["comment"]) { + $paramscomment=array('value' => '__VALUE__', + 'table' => "glpi_netpoints"); + ajaxUpdateItemOnSelectEvent("dropdown_".$_POST["myname"].$_POST["rand"], + "comment_".$_POST["myname"].$_POST["rand"], + $CFG_GLPI["root_doc"]."/ajax/comments.php",$paramscomment,false); +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownNotificationEvent.php b/0.78-bugfixes/ajax/dropdownNotificationEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..c7e59c1cd4adb27369caaac3aa5924696ec4c7da --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownNotificationEvent.php @@ -0,0 +1,45 @@ + diff --git a/0.78-bugfixes/ajax/dropdownNotificationTemplate.php b/0.78-bugfixes/ajax/dropdownNotificationTemplate.php new file mode 100644 index 0000000000000000000000000000000000000000..8515cefbe048ad06eef443ee058ff9c2c9c52ce7 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownNotificationTemplate.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/dropdownRubDocument.php b/0.78-bugfixes/ajax/dropdownRubDocument.php new file mode 100644 index 0000000000000000000000000000000000000000..02044b5736f0e4f1db0ee42bc2fa40c8cc7ec7a6 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownRubDocument.php @@ -0,0 +1,67 @@ +0) { + $query="SELECT id FROM glpi_documents WHERE id IN (".implode(',',$_POST['used']).") AND documentcategories_id='".$_POST["rubdoc"]."'"; + foreach ($DB->request($query) AS $data) { + $used[$data['id']]=$data['id']; + } + } + Dropdown::show('Document',array('name' => $_POST['myname'], + 'used' => $used, + 'entity' => $_POST['entity'], + 'rand' => $_POST['rand'], + 'condition'=> "glpi_documents.documentcategories_id='".$_POST["rubdoc"]."'" + )); +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownRules.php b/0.78-bugfixes/ajax/dropdownRules.php new file mode 100644 index 0000000000000000000000000000000000000000..6adcb7ece7b6d9afa873cfa09b34e3e5356cbbc5 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownRules.php @@ -0,0 +1,92 @@ +query($sql); + +echo ""; + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownSelectSoftware.php b/0.78-bugfixes/ajax/dropdownSelectSoftware.php new file mode 100644 index 0000000000000000000000000000000000000000..328f4aa244b0ec180c722f6fa66bdbbf73205f03 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownSelectSoftware.php @@ -0,0 +1,84 @@ +0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $where .=" AND `name` ".makeTextSearch($_POST['searchText'])." "; +} + +$where .= getEntitiesRestrictRequest(' AND', 'glpi_softwares','entities_id',$_POST["entity_restrict"], + true); + +$query = "SELECT DISTINCT `glpi_softwares`.`id`, `glpi_softwares`.`name` + FROM `glpi_softwares` + WHERE `glpi_softwares`.`is_deleted`='0' + AND `glpi_softwares`.`is_template`='0' + $where + ORDER BY `glpi_softwares`.`name`"; +$result = $DB->query($query); + +echo "\n"; + +$paramsselsoft=array('softwares_id'=>'__VALUE__', + 'myname'=>$_POST["myname"]); +ajaxUpdateItemOnSelectEvent("item_type$rand","show_".$_POST["myname"].$rand,$CFG_GLPI["root_doc"]. + "/ajax/dropdownInstallVersion.php",$paramsselsoft,false); + +echo " \n"; + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownTrackingDeviceType.php b/0.78-bugfixes/ajax/dropdownTrackingDeviceType.php new file mode 100644 index 0000000000000000000000000000000000000000..660212762295fd2a2049ca6fc4733c3d30acea80 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownTrackingDeviceType.php @@ -0,0 +1,70 @@ +'__VALUE__', + 'myname'=>$_POST["myname"], + 'table'=>$table, + 'itemtype'=>$_POST["itemtype"], + 'entity_restrict'=>$_POST['entity_restrict']); + + ajaxUpdateItemOnInputTextEvent("search_".$_POST['myname'].$rand,"results_ID$rand", + $CFG_GLPI["root_doc"]."/ajax/dropdownFindNum.php", + $paramstrackingdt,false); + + echo ""; + echo ""; + echo "\n"; + if (!isset($_POST["admin"]) || $_POST["admin"]==0) { + echo "
".$LANG['help'][23]; + } +} + +?> diff --git a/0.78-bugfixes/ajax/dropdownUsers.php b/0.78-bugfixes/ajax/dropdownUsers.php new file mode 100644 index 0000000000000000000000000000000000000000..16615131fca6fb56712924ad8f2eb571f7d71825 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownUsers.php @@ -0,0 +1,157 @@ +numrows($result)) { + while ($data=$DB->fetch_array($result)) { + $users[$data["id"]]=formatUserName($data["id"],$data["name"],$data["realname"], + $data["firstname"]); + $logins[$data["id"]]=$data["name"]; + } +} + +asort($users); + +echo ""; + +if (isset($_POST["comment"]) && $_POST["comment"]) { + $paramscomment=array('value' => '__VALUE__', + 'table' => "glpi_users"); + if (isset($_POST['update_link'])) { + $paramscomment['withlink']="comment_link_".$_POST["myname"].$_POST["rand"]; + } + ajaxUpdateItemOnSelectEvent("dropdown_".$_POST["myname"].$_POST["rand"], + "comment_".$_POST["myname"].$_POST["rand"],$CFG_GLPI["root_doc"]."/ajax/comments.php", + $paramscomment,false); +} + +// Manage updates others dropdown for helpdesk +if ($is_helpdesk_multientity) { + if (!isMultiEntitiesMode()) { + $paramscomment=array('userID' => '__VALUE__', + 'entity_restrict' => $_POST["entity_restrict"], + 'itemtype' => 0, + 'users_id_field' => "dropdown_users_id".$_POST["rand"]); + + ajaxUpdateItemOnSelectEvent("dropdown_users_id".$_POST["rand"],"tracking_my_devices", + $CFG_GLPI["root_doc"]."/ajax/updateTrackingDeviceType.php", + $paramscomment,false); + $paramscomment=array('value' => '__VALUE__'); + ajaxUpdateItemOnSelectEvent("dropdown_users_id".$_POST["rand"],"user_email_result", + $CFG_GLPI["root_doc"]."/ajax/uemailUpdate.php",$paramscomment,false); + } +} +?> diff --git a/0.78-bugfixes/ajax/dropdownUsersTracking.php b/0.78-bugfixes/ajax/dropdownUsersTracking.php new file mode 100644 index 0000000000000000000000000000000000000000..2e3d26e9266b51a12ecc419c3a2f744ffb85e607 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownUsersTracking.php @@ -0,0 +1,125 @@ +0 && $_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $where.=" AND (`glpi_users`.`name` ".makeTextSearch($_POST['searchText'])." + OR `glpi_users`.`realname` ".makeTextSearch($_POST['searchText'])." + OR `glpi_users`.`firstname` ".makeTextSearch($_POST['searchText']).")"; +} + +$NBMAX=$CFG_GLPI["dropdown_max"]; +$LIMIT="LIMIT 0,$NBMAX"; +if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) { + $LIMIT=""; +} + +$query = "SELECT `glpi_users`.`id`, `glpi_users`.`name`, `glpi_users`.`realname`, + `glpi_users`.`firstname` + FROM `glpi_users` + $where + AND `id` IN (SELECT DISTINCT `".$_POST['field']."` + FROM `glpi_tickets` ". + getEntitiesRestrictRequest("WHERE","glpi_tickets").") "; + +if ($CFG_GLPI["names_format"]==FIRSTNAME_BEFORE) { + $query.=" ORDER BY `glpi_users`.`firstname`, `glpi_users`.`realname`, `glpi_users`.`name` "; +} else { + $query.=" ORDER BY `glpi_users`.`realname`, `glpi_users`.`firstname`, `glpi_users`.`name` "; +} + +$query.=$LIMIT; + +$result = $DB->query($query); + +$users=array(); +if ($DB->numrows($result)) { + while ($data=$DB->fetch_array($result)) { + $users[$data["id"]]=formatUserName($data["id"],$data["name"],$data["realname"], + $data["firstname"]); + $logins[$data["id"]]=$data["name"]; + } +} + +asort($users); + +echo ""; + + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/dropdownValue.php b/0.78-bugfixes/ajax/dropdownValue.php new file mode 100644 index 0000000000000000000000000000000000000000..5cb702101a34f7951221b1d987eca98a1f7ebe37 --- /dev/null +++ b/0.78-bugfixes/ajax/dropdownValue.php @@ -0,0 +1,500 @@ +getTable(); + + +$displaywith=false; +if (isset($_POST['displaywith']) && is_array($_POST['displaywith']) + && count($_POST['displaywith'])) { + $displaywith=true; +} + +// No define value +if (!isset($_POST['value'])) { + $_POST['value']=''; +} +// No define rand +if (!isset($_POST['rand'])) { + $_POST['rand']=mt_rand(); +} + +if (isset($_POST['condition']) && !empty($_POST['condition'])) { + $_POST['condition']=rawurldecode(stripslashes($_POST['condition'])); +} + +if (!isset($_POST['emptylabel']) || $_POST['emptylabel'] == '') { + $_POST['emptylabel'] = DROPDOWN_EMPTY_VALUE; +} + +if (isset($_POST["entity_restrict"]) && !is_numeric($_POST["entity_restrict"]) + && !is_array($_POST["entity_restrict"])) { + + $_POST["entity_restrict"]=unserialize(stripslashes($_POST["entity_restrict"])); +} + +// Make a select box with preselected values +if (!isset($_POST["limit"])) { + $_POST["limit"]=$_SESSION["glpidropdown_chars_limit"]; +} + +$where="WHERE 1 "; + +if ($item->maybeDeleted()) { + $where.=" AND `is_deleted`='0' "; +} +if ($item->maybeTemplate()) { + $where.=" AND `is_template`='0' "; +} + +$NBMAX=$CFG_GLPI["dropdown_max"]; +$LIMIT="LIMIT 0,$NBMAX"; +if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) { + $LIMIT=""; +} + +$where .=" AND `$table`.`id` NOT IN ('".$_POST['value']."'"; +if (isset($_POST['used'])) { + if (is_array($_POST['used'])) { + $used=$_POST['used']; + } else { + $used=unserialize(stripslashes($_POST['used'])); + } + if (count($used)) { + $where .= ",'".implode("','",$used)."'"; + } +} +$where .= ") "; + +if (isset($_POST['condition']) && $_POST['condition'] != '') { + $where .= " AND ".$_POST['condition']." "; +} +if ($item instanceof CommonTreeDropdown) { + if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $where.=" AND `completename` ".makeTextSearch($_POST['searchText']); + } + $multi=false; + + // Manage multiple Entities dropdowns + $add_order=""; + if ($item->isEntityAssign()) { + $recur=$item->maybeRecursive(); + + // Entities are not really recursive : do not display parents + if ($_POST['itemtype'] == 'Entity') { + $recur=false; + } + + if (isset($_POST["entity_restrict"]) && !($_POST["entity_restrict"]<0)) { + $where.=getEntitiesRestrictRequest(" AND ", $table, '', + $_POST["entity_restrict"],$recur); + if (is_array($_POST["entity_restrict"]) && count($_POST["entity_restrict"])>1) { + $multi=true; + } + } else { + $where.=getEntitiesRestrictRequest(" AND ",$table,'', '', $recur); + if (count($_SESSION['glpiactiveentities'])>1) { + $multi=true; + } + } + + // Force recursive items to multi entity view + if ($recur) { + $multi=true; + } + // no multi view for entitites + if ($_POST['itemtype']=="Entity") { + $multi=false; + } + + if ($multi) { + $add_order='entities_id, '; + } + + } + + $query = "SELECT * + FROM `$table` + $where + ORDER BY $add_order `completename` + $LIMIT"; + + if ($result = $DB->query($query)) { + + echo ""; + } +} else { // Not a dropdowntree + $multi=false; + if ($item->isEntityAssign()) { + $multi=$item->maybeRecursive(); + if (isset($_POST["entity_restrict"]) && !($_POST["entity_restrict"]<0)) { + $where.=getEntitiesRestrictRequest("AND",$table,"entities_id", + $_POST["entity_restrict"],$multi); + if (is_array($_POST["entity_restrict"]) && count($_POST["entity_restrict"])>1) { + $multi=true; + } + } else { + $where.=getEntitiesRestrictRequest("AND",$table,'','',$multi); + if (count($_SESSION['glpiactiveentities'])>1) { + $multi=true; + } + } + } + + $field="name"; + if ($item instanceof CommonDevice) { + $field="designation"; + } + + if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]) { + $search=makeTextSearch($_POST['searchText']); + $where.=" AND (`$table`.`$field` ".$search; + if ($_POST['itemtype']=="SoftwareLicense") { + $where.=" OR `glpi_softwares`.`name` ".$search; + } + $where.=')'; + } + + switch ($_POST['itemtype']) { + case "Contact" : + $query = "SELECT `$table`.`entities_id`, + CONCAT(`name`,' ',`firstname`) AS $field, + `$table`.`comment`, `$table`.`id` + FROM `$table` + $where"; + break; + + case "SoftwareLicense" : + $query = "SELECT `$table`.*, + CONCAT(`glpi_softwares`.`name`,' - ',`glpi_softwarelicenses`.`name`) + AS $field + FROM `$table` + LEFT JOIN `glpi_softwares` + ON (`glpi_softwarelicenses`.`softwares_id` = `glpi_softwares`.`id`) + $where"; + break; + + default : + $query = "SELECT * + FROM `$table` + $where"; + break; + } + + if ($multi) { + $query.=" ORDER BY `entities_id`, $field + $LIMIT"; + } else { + $query.=" ORDER BY $field + $LIMIT"; + } +// echo $query; + if ($result = $DB->query($query)){ + + echo ""; + } +} + +if (isset($_POST["comment"]) && $_POST["comment"]) { + $paramscomment=array('value' => '__VALUE__', + 'table' => $table); + ajaxUpdateItemOnSelectEvent("dropdown_".$_POST["myname"].$_POST["rand"],"comment_". + $_POST["myname"].$_POST["rand"], + $CFG_GLPI["root_doc"]."/ajax/comments.php",$paramscomment,false); +} + +if (isset($_POST["update_item"]) + && (is_array($_POST["update_item"]) || strlen($_POST["update_item"])>0)) { + + if (!is_array($_POST["update_item"])) { + $data=unserialize(stripslashes($_POST["update_item"])); + } else { + $data=$_POST["update_item"]; + } + if (is_array($data) && count($data)) { + $paramsupdate=array(); + if (isset($data['value_fieldname'])) { + $paramsupdate=array($data['value_fieldname']=>'__VALUE__'); + } + if (isset($data["moreparams"]) && is_array($data["moreparams"]) && count($data["moreparams"])) { + foreach ($data["moreparams"] as $key => $val) { + $paramsupdate[$key]=$val; + } + } + ajaxUpdateItemOnSelectEvent("dropdown_".$_POST["myname"].$_POST["rand"],$data['to_update'], + $data['url'],$paramsupdate,false); + } +} + +?> diff --git a/0.78-bugfixes/ajax/entity.tabs.php b/0.78-bugfixes/ajax/entity.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..94ab6d65c9590409baf3a2946047b42bcf2cc563 --- /dev/null +++ b/0.78-bugfixes/ajax/entity.tabs.php @@ -0,0 +1,41 @@ + diff --git a/0.78-bugfixes/ajax/entitytree.php b/0.78-bugfixes/ajax/entitytree.php new file mode 100644 index 0000000000000000000000000000000000000000..62db0fb3fd924dc1d5b10f753a79d8efecab2e42 --- /dev/null +++ b/0.78-bugfixes/ajax/entitytree.php @@ -0,0 +1,52 @@ + diff --git a/0.78-bugfixes/ajax/entitytreesons.php b/0.78-bugfixes/ajax/entitytreesons.php new file mode 100644 index 0000000000000000000000000000000000000000..41fde27718edb743c5c23056052e64f09d04504c --- /dev/null +++ b/0.78-bugfixes/ajax/entitytreesons.php @@ -0,0 +1,132 @@ +query($query2); + + if ($DB->result($result2,0,0) >0) { + $path['leaf'] = false; + $path['cls'] = 'folder'; + $path['text'] .= " \"".$LANG['buttons'][40]."\""; + $path['expanded'] = isset($ancestors[$ID]); + } + } + $nodes[] = $path; + } + } else { // standard node + $query = "SELECT * + FROM `glpi_entities` + WHERE `entities_id` = '".$_REQUEST['node']."' + ORDER BY `name`"; + if ($result=$DB->query($query)) { + if ($DB->numrows($result)) { + $pos=0; + while ($row = $DB->fetch_array($result)) { + $path['text'] = $row['name']; + $path['id'] = $row['id']; + $path['position'] = $pos; + $pos++; + $path['draggable'] = false; + $path['href'] = $CFG_GLPI["root_doc"]."/front/$target?active_entity=".$row['id']; + // Check if node is a leaf or a folder. + $query2 = "SELECT COUNT(`id`) + FROM `glpi_entities` + WHERE `entities_id` = '".$row['id']."'"; + $result2=$DB->query($query2); + + if ($DB->result($result2,0,0) >0) { + $path['leaf'] = false; + $path['cls'] = 'folder'; + $path['text'] .= " \""."; + $path['expanded'] = isset($ancestors[$row['id']]); + } else { + $path['leaf'] = true; + $path['cls'] = 'file'; + } + $nodes[] = $path; + } + } + } + } + print json_encode($nodes); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/filesystem.tabs.php b/0.78-bugfixes/ajax/filesystem.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..89bc5ce7c810541be8aa75110367ab137a8b05a1 --- /dev/null +++ b/0.78-bugfixes/ajax/filesystem.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/group.tabs.php b/0.78-bugfixes/ajax/group.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..1dec83e54e4d44fffc5e9472a7add536cfe43ad7 --- /dev/null +++ b/0.78-bugfixes/ajax/group.tabs.php @@ -0,0 +1,75 @@ +0 && $group->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Group_User::showForGroup($_POST['target'],$group); + $group->showItems(); + $group->showLDAPForm($_POST['target'],$_POST["id"]); + Plugin::displayAction($group,$_REQUEST['glpi_tab']); + break; + + case 2 : + $group->showItems(); + break; + + case 3 : + $group->showLDAPForm($_POST['target'],$_POST["id"]); + break; + + default : + if (!Plugin::displayAction($group,$_REQUEST['glpi_tab'])) { + Group_User::showForGroup($_POST['target'],$group); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/index.php b/0.78-bugfixes/ajax/index.php new file mode 100644 index 0000000000000000000000000000000000000000..4d69c0b430683fd3aef5ea98655078f26cf455e4 --- /dev/null +++ b/0.78-bugfixes/ajax/index.php @@ -0,0 +1,37 @@ + diff --git a/0.78-bugfixes/ajax/inputtext.php b/0.78-bugfixes/ajax/inputtext.php new file mode 100644 index 0000000000000000000000000000000000000000..d988077666635afd48c3682712e5bef4d9ceaa56 --- /dev/null +++ b/0.78-bugfixes/ajax/inputtext.php @@ -0,0 +1,51 @@ +"; +} + +?> diff --git a/0.78-bugfixes/ajax/interfacetype.tabs.php b/0.78-bugfixes/ajax/interfacetype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..85c77015f42a455b9263c743225e9437686e7b22 --- /dev/null +++ b/0.78-bugfixes/ajax/interfacetype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/knowbaseitem.tabs.php b/0.78-bugfixes/ajax/knowbaseitem.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..2cda30008aaa96723249ba059c6959661e566f4c --- /dev/null +++ b/0.78-bugfixes/ajax/knowbaseitem.tabs.php @@ -0,0 +1,71 @@ +0 && $kb->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $kb->showMenu(); + Document::showAssociated($kb); + Plugin::displayAction($kb,$_REQUEST['glpi_tab']); + break; + default : + if (!Plugin::displayAction($kb,$_REQUEST['glpi_tab'])) { + $kb->showMenu(); + Document::showAssociated($kb); + } + break; + } + +} +ajaxFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/knowbaseitemcategory.tabs.php b/0.78-bugfixes/ajax/knowbaseitemcategory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..dea54c2681c21277e167fa9f921468c7e673fdb5 --- /dev/null +++ b/0.78-bugfixes/ajax/knowbaseitemcategory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/ldapdaterestriction.php b/0.78-bugfixes/ajax/ldapdaterestriction.php new file mode 100644 index 0000000000000000000000000000000000000000..12291a0e303bc2c238be32d0e28bd656fd0035b1 --- /dev/null +++ b/0.78-bugfixes/ajax/ldapdaterestriction.php @@ -0,0 +1,49 @@ + diff --git a/0.78-bugfixes/ajax/link.tabs.php b/0.78-bugfixes/ajax/link.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..e68ce25df2d451ac0507bc6d029772d21479eea3 --- /dev/null +++ b/0.78-bugfixes/ajax/link.tabs.php @@ -0,0 +1,68 @@ +0 && $link->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Link_ItemType::showForItem($_POST["id"]); + Plugin::displayAction($link,$_REQUEST['glpi_tab']); + break; + default : + if (!Plugin::displayAction($link,$_REQUEST['glpi_tab'])) { + Link_ItemType::showForItem($_POST["id"]); + } + break; + } + +} +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/location.tabs.php b/0.78-bugfixes/ajax/location.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..13855f10055ee3335281ff590c476d210e0aa224 --- /dev/null +++ b/0.78-bugfixes/ajax/location.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/mailcollector.tabs.php b/0.78-bugfixes/ajax/mailcollector.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..add9e0169f817a0a9b785dce9350639eae79708f --- /dev/null +++ b/0.78-bugfixes/ajax/mailcollector.tabs.php @@ -0,0 +1,73 @@ +0 && $collector->can($_POST['id'],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $collector->showGetMessageForm($_POST['id']); + Plugin::displayAction($collector,$_REQUEST['glpi_tab']); + break; + case 12 : + Log::showForItem($collector); + break; + + default : + if (!Plugin::displayAction($collector, $_REQUEST['glpi_tab'])) { + $collector->showGetMessageForm($_POST['id']); + } + break; + } + +} +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/manufacturer.tabs.php b/0.78-bugfixes/ajax/manufacturer.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..944e903ad08ba7619a9399301bb867f63daf5e8e --- /dev/null +++ b/0.78-bugfixes/ajax/manufacturer.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/monitor.tabs.php b/0.78-bugfixes/ajax/monitor.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..0b4e6e57da68934d195b1ee4093e2045cfe3f918 --- /dev/null +++ b/0.78-bugfixes/ajax/monitor.tabs.php @@ -0,0 +1,126 @@ +0 && $monitor->can($_POST["id"],'r')) { + if (!empty($_POST["withtemplate"])) { + switch($_REQUEST['glpi_tab']) { + case 4 : + Infocom::showForItem($monitor,$_POST["withtemplate"]); + Contract::showAssociated($monitor,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($monitor,$_POST["withtemplate"]); + break; + + default : + Plugin::displayAction($monitor,$_REQUEST['glpi_tab'],$_POST["withtemplate"]); + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1: + Computer_Item::showForItem($monitor); + Infocom::showForItem($monitor); + Contract::showAssociated($monitor); + Document::showAssociated($monitor,$_POST["withtemplate"]); + Ticket::showListForItem('Monitor',$_POST["id"]); + Link::showForItem('Monitor',$_POST["id"]); + Plugin::displayAction($monitor,$_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($monitor); + Contract::showAssociated($monitor); + break; + + case 5 : + Document::showAssociated($monitor,$_POST["withtemplate"]); + break; + + case 6 : + Ticket::showListForItem('Monitor',$_POST["id"]); + break; + + case 7 : + Link::showForItem('Monitor',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Monitor',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('Monitor',$_POST["id"]); + break; + + case 12 : + Log::showForItem($monitor); + break; + + default : + if (!Plugin::displayAction($monitor,$_REQUEST['glpi_tab'])) { + Computer_Item::showForItem($monitor); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/monitormodel.tabs.php b/0.78-bugfixes/ajax/monitormodel.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..f165d3351f7f042fb9f0fdf2e283b6fe290fe7eb --- /dev/null +++ b/0.78-bugfixes/ajax/monitormodel.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/monitortype.tabs.php b/0.78-bugfixes/ajax/monitortype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..bb7dbbafe609ac944df39e49f1bd625f12aa8550 --- /dev/null +++ b/0.78-bugfixes/ajax/monitortype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/netpoint.tabs.php b/0.78-bugfixes/ajax/netpoint.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..ddd0a18a4b7d21cd7ad04625aedca0c7a788351c --- /dev/null +++ b/0.78-bugfixes/ajax/netpoint.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/network.tabs.php b/0.78-bugfixes/ajax/network.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..4685eaa09c1b51835dbb677eeb9828f6cd5033bf --- /dev/null +++ b/0.78-bugfixes/ajax/network.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/networkequipment.tabs.php b/0.78-bugfixes/ajax/networkequipment.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..36a46c6c1c8024596e0f72a7343c1c2ef06de7a9 --- /dev/null +++ b/0.78-bugfixes/ajax/networkequipment.tabs.php @@ -0,0 +1,128 @@ +check($_POST["id"],'r'); + +if (!empty($_POST["withtemplate"])) { + if ($_POST["id"]>0) { + switch($_REQUEST['glpi_tab']) { + case 4 : + Infocom::showForItem($netdevice,$_POST["withtemplate"]); + Contract::showAssociated($netdevice,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($netdevice,$_POST["withtemplate"]); + break; + + default : + if (!Plugin::displayAction($netdevice,$_REQUEST['glpi_tab'],$_POST["withtemplate"])) { + NetworkPort::showForItem('NetworkEquipment', $_POST["id"], $_POST["withtemplate"]); + } + } + } +} else { + switch($_REQUEST['glpi_tab']) { + case -1 : + NetworkPort::showForItem('NetworkEquipment', $_POST["id"]); + Infocom::showForItem($netdevice); + Contract::showAssociated($netdevice); + Document::showAssociated($netdevice,$_POST["withtemplate"]); + Ticket::showListForItem('NetworkEquipment',$_POST["id"]); + Link::showForItem('NetworkEquipment',$_POST["id"]); + Plugin::displayAction($netdevice,$_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($netdevice); + Contract::showAssociated($netdevice); + break; + + case 5 : + Document::showAssociated($netdevice,$_POST["withtemplate"]); + break; + + case 6 : + Ticket::showListForItem('NetworkEquipment',$_POST["id"]); + break; + + case 7 : + Link::showForItem('NetworkEquipment',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'NetworkEquipment',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('NetworkEquipment',$_POST["id"]); + break; + + case 12 : + Log::showForItem($netdevice); + break; + + default : + if (!Plugin::displayAction($netdevice,$_REQUEST['glpi_tab'])) { + NetworkPort::showForItem('NetworkEquipment',$_POST["id"]); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/networkequipmentfirmware.tabs.php b/0.78-bugfixes/ajax/networkequipmentfirmware.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..3e0781f31bc8ce396c351d6cc74415ab38a7b83b --- /dev/null +++ b/0.78-bugfixes/ajax/networkequipmentfirmware.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/networkequipmentmodel.tabs.php b/0.78-bugfixes/ajax/networkequipmentmodel.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..96306340cf98658279d47f44b5bd3d8b7ca7257c --- /dev/null +++ b/0.78-bugfixes/ajax/networkequipmentmodel.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/networkequipmenttype.tabs.php b/0.78-bugfixes/ajax/networkequipmenttype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..d5f087e9cb8cf4b0a03fb9acccff4264073efcfa --- /dev/null +++ b/0.78-bugfixes/ajax/networkequipmenttype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/networkinterface.tabs.php b/0.78-bugfixes/ajax/networkinterface.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..93bf5bb7b3c623c795a645d6f5545fa7031214ee --- /dev/null +++ b/0.78-bugfixes/ajax/networkinterface.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/networkport.tabs.php b/0.78-bugfixes/ajax/networkport.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..deeb6f313bf02e1524afcce7e075a8c5c29bf88a --- /dev/null +++ b/0.78-bugfixes/ajax/networkport.tabs.php @@ -0,0 +1,68 @@ +0 && $port->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1: // All + NetworkPort_Vlan::showForNetworkPortForm($_POST["id"]); + Plugin::displayAction($port, $_REQUEST['glpi_tab']); + Log::showForItem($port); + break; + + case 12 : + Log::showForItem($port); + break; + + default : + if (!Plugin::displayAction($port, $_REQUEST['glpi_tab'])) { + NetworkPort_Vlan::showForNetworkPortForm($_POST["id"]); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/notification.tabs.php b/0.78-bugfixes/ajax/notification.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..e34bd11971bb55a243cfbc87060b8142c823512c --- /dev/null +++ b/0.78-bugfixes/ajax/notification.tabs.php @@ -0,0 +1,83 @@ + 0 && $notification->can($_POST['id'],'r') ) { + + if (!isset($_REQUEST['glpi_tab'])) { + exit(); + } + + $target = NotificationTarget::getInstanceByType($notification->getField('itemtype'), + $notification->getField('event'), + array('entities_id'=> + $notification->getField('entities_id'))); + + switch($_REQUEST['glpi_tab']) { + case -1 : + if ($target) { + $target->showForNotification($notification); + } + Plugin::displayAction($notification, $_REQUEST['glpi_tab']); + break; + + case 1 : + if ($target) { + $target->showForNotification($notification); + } + break; + + case 12 : + $notification->getFromDB($_POST["id"]); + Log::showForItem($notification); + break; + + default : + if (!Plugin::displayAction($notification, $_REQUEST['glpi_tab'])) { + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/notificationmailsetting.tabs.php b/0.78-bugfixes/ajax/notificationmailsetting.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..f9800fba24e83fc1f4d4f8d9af6864f58c3bb613 --- /dev/null +++ b/0.78-bugfixes/ajax/notificationmailsetting.tabs.php @@ -0,0 +1,79 @@ + 0) { + $target = new NotificationMailSetting(); + switch($_REQUEST['glpi_tab']) { + case -1 : + $target->showFormMailServerConfig(); + if ($CFG_GLPI['use_mailing']) { + $target->showFormAlerts(); + Plugin::displayAction($target,$_REQUEST['glpi_tab']); + } + break; + + case 1 : + $target->showFormMailServerConfig(); + break; + + case 2 : + if ($CFG_GLPI['use_mailing']) { + $target->showFormAlerts(); + } + break; + + default : + if (!Plugin::displayAction($target,$_REQUEST['glpi_tab'])) { + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/notificationtemplate.tabs.php b/0.78-bugfixes/ajax/notificationtemplate.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..835661614c57e0a5e1c5077714f08e947d499b64 --- /dev/null +++ b/0.78-bugfixes/ajax/notificationtemplate.tabs.php @@ -0,0 +1,70 @@ + 0) { + if (!isset($_REQUEST['glpi_tab'])) { + exit(); + } + + $template = new NotificationTemplate(); + $template->getFromDB($_POST['id']); + $templatelanguage = new NotificationTemplateTranslation; + switch($_REQUEST['glpi_tab']) { + case -1 : + case 1 : + $templatelanguage->showSummary($template); + break; + + case 12 : + Log::showForItem($template); + break; + + default : + if (!Plugin::displayAction($template, $_REQUEST['glpi_tab'])) { + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/notificationtemplatetranslation.tabs.php b/0.78-bugfixes/ajax/notificationtemplatetranslation.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..efd0141b98178207b288d3905b959f6a058f56eb --- /dev/null +++ b/0.78-bugfixes/ajax/notificationtemplatetranslation.tabs.php @@ -0,0 +1,63 @@ + 0) { + if (!isset($_REQUEST['glpi_tab'])) { + exit(); + } + $translation = new NotificationTemplateTranslation; + $translation->getFromDB($_POST['id']); + switch($_REQUEST['glpi_tab']) { + case 12 : + Log::showForItem($translation); + break; + + default : + if (!Plugin::displayAction($translation, $_REQUEST['glpi_tab'])) { + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/ocsserver.tabs.php b/0.78-bugfixes/ajax/ocsserver.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..aa7e793a05059d14278b3dd021f2df6bf6d04669 --- /dev/null +++ b/0.78-bugfixes/ajax/ocsserver.tabs.php @@ -0,0 +1,81 @@ +0 && $ocs->can($_POST["id"],'r')) { + switch ($_REQUEST['glpi_tab']) { + case -1 : + $ocs->showDBConnectionStatus($_POST["id"]); + $ocs->ocsFormImportOptions($_POST['target'], $_POST["id"]); + $ocs->ocsFormConfig($_POST['target'], $_POST["id"]); + $ocs->ocsFormAutomaticLinkConfig($_POST['target'], $_POST["id"]); + Plugin::displayAction($ocs, $_REQUEST['glpi_tab']); + break; + + case 2 : + $ocs->ocsFormImportOptions($_POST['target'], $_POST["id"]); + break; + + case 3 : + $ocs->ocsFormConfig($_POST['target'], $_POST["id"]); + break; + + case 4 : + $ocs->ocsFormAutomaticLinkConfig($_POST['target'], $_POST["id"]); + break; + + default : + if (!Plugin::displayAction($ocs, $_REQUEST['glpi_tab'])) { + $ocs->showDBConnectionStatus($_POST["id"]); + } + } +} +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/operatingsystem.tabs.php b/0.78-bugfixes/ajax/operatingsystem.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..af785b147f13aef614a73ec04752f31d1e5d7983 --- /dev/null +++ b/0.78-bugfixes/ajax/operatingsystem.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/operatingsystemservicepack.tabs.php b/0.78-bugfixes/ajax/operatingsystemservicepack.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..6f0e83664bfda8ce82b79caa23e4a077f32a3d2e --- /dev/null +++ b/0.78-bugfixes/ajax/operatingsystemservicepack.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/operatingsystemversion.tabs.php b/0.78-bugfixes/ajax/operatingsystemversion.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..bc1f6690dc87b5d672aa223a32e9700a8e249370 --- /dev/null +++ b/0.78-bugfixes/ajax/operatingsystemversion.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/peripheral.tabs.php b/0.78-bugfixes/ajax/peripheral.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..1414b0dd9b46302e7fd784610d2f81874b67a895 --- /dev/null +++ b/0.78-bugfixes/ajax/peripheral.tabs.php @@ -0,0 +1,130 @@ +0 && $periph->can($_POST["id"],'r')) { + if (!empty($_POST["withtemplate"])) { + switch($_REQUEST['glpi_tab']) { + case 4 : + Infocom::showForItem($periph,$_POST["withtemplate"]); + Contract::showAssociated($periph,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($periph,$_POST["withtemplate"]); + break; + + default : + if (!Plugin::displayAction($periph, $_REQUEST['glpi_tab'],$_POST["withtemplate"])) { + NetworkPort::showForItem('Peripheral', $_POST["id"], $_POST["withtemplate"]); + } + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1 : + Computer_Item::showForItem($periph); + NetworkPort::showForItem('Peripheral', $_POST["id"], $_POST["withtemplate"]); + Infocom::showForItem($periph); + Contract::showAssociated($periph); + Document::showAssociated($periph); + Ticket::showListForItem('Peripheral',$_POST["id"]); + Link::showForItem('Peripheral',$_POST["id"]); + Plugin::displayAction($periph, $_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($periph); + Contract::showAssociated($periph); + break; + + case 5 : + Document::showAssociated($periph); + break; + + case 6 : + Ticket::showListForItem('Peripheral',$_POST["id"]); + break; + + case 7 : + Link::showForItem('Peripheral',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Peripheral',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('Peripheral',$_POST["id"]); + break; + + case 12 : + Log::showForItem($periph); + break; + + default : + if (!Plugin::displayAction($periph, $_REQUEST['glpi_tab'])) { + Computer_Item::showForItem($periph); + NetworkPort::showForItem('Peripheral', $_POST["id"], $_POST["withtemplate"]); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/peripheralmodel.tabs.php b/0.78-bugfixes/ajax/peripheralmodel.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..f76e92b1769cd5f80b5fd1abed9c9d5807fe87f1 --- /dev/null +++ b/0.78-bugfixes/ajax/peripheralmodel.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/peripheraltype.tabs.php b/0.78-bugfixes/ajax/peripheraltype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..fd46a3a860f6f5aa57f719ce82f1dfc319b68517 --- /dev/null +++ b/0.78-bugfixes/ajax/peripheraltype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/phone.tabs.php b/0.78-bugfixes/ajax/phone.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..608afe0bb99c2ac4c75ae6e73e34d9fcbd1dfd7d --- /dev/null +++ b/0.78-bugfixes/ajax/phone.tabs.php @@ -0,0 +1,135 @@ +0 && $phone->can($_POST["id"],'r')) { + if (!empty($_POST["withtemplate"])) { + switch($_REQUEST['glpi_tab']) { + case 4 : + Infocom::showForItem($phone,$_POST["withtemplate"]); + Contract::showAssociated($phone,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($phone,$_POST["withtemplate"]); + break; + + default : + if (!Plugin::displayAction($phone, $_REQUEST['glpi_tab'],$_POST["withtemplate"])) { + NetworkPort::showForItem('Phone', $_POST["id"], $_POST["withtemplate"]); + } + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1 : + Computer_Item::showForItem($phone); + NetworkPort::showForItem('Phone', $_POST["id"], $_POST["withtemplate"]); + Infocom::showForItem($phone); + Contract::showAssociated($phone); + Document::showAssociated($phone); + Ticket::showListForItem('Phone',$_POST["id"]); + Link::showForItem('Phone',$_POST["id"]); + Plugin::displayAction($phone, $_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($phone); + Contract::showAssociated($phone); + break; + + case 5 : + Document::showAssociated($phone); + break; + + case 6 : + Ticket::showListForItem('Phone',$_POST["id"]); + break; + + case 7 : + Link::showForItem('Phone',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Phone',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('Phone',$_POST["id"]); + break; + + case 12 : + Log::showForItem($phone); + break; + + default : + if (!Plugin::displayAction($phone, $_REQUEST['glpi_tab'])) { + Computer_Item::showForItem($phone); + NetworkPort::showForItem('Phone', $_POST["id"], 'Phone',$_POST["withtemplate"]); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/phonemodel.tabs.php b/0.78-bugfixes/ajax/phonemodel.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..7350e4df79b653b22406e5536468c16088718578 --- /dev/null +++ b/0.78-bugfixes/ajax/phonemodel.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/phonepowersupply.tabs.php b/0.78-bugfixes/ajax/phonepowersupply.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..5c6462125596b85f9655a5b96fdc7968cd51b718 --- /dev/null +++ b/0.78-bugfixes/ajax/phonepowersupply.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/phonetype.tabs.php b/0.78-bugfixes/ajax/phonetype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..956c6180e9dfeca576d08d002962873217f07901 --- /dev/null +++ b/0.78-bugfixes/ajax/phonetype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/planning.php b/0.78-bugfixes/ajax/planning.php new file mode 100644 index 0000000000000000000000000000000000000000..4f2e415a4fba5592adc7ae80e5fc71235913eb39 --- /dev/null +++ b/0.78-bugfixes/ajax/planning.php @@ -0,0 +1,156 @@ +0) { + echo ""; +} + +if (isset($_POST["begin"]) && !empty($_POST["begin"])) { + $begin=$_POST["begin"]; +} else { + $minute=(floor(date('i')/10)*10); + if ($minute<10){ + $minute='0'.$minute; + } + + $begin=date("Y-m-d H").":$minute:00"; +} + +if (isset($_POST["end"]) && !empty($_POST["end"])) { + $end=$_POST["end"]; +} else { + $end=date("Y-m-d H:i:s",strtotime($begin)+HOUR_TIMESTAMP); +} + + +$state=0; +if (isset($_POST["state"])) { + $state=$_POST["state"]; +} + +echo ""; +if (isset($_POST["users_id"]) && isset($_POST["entity"])) { + echo ""; + echo "\n"; +} + +echo ""; +echo ""; + +echo "\n"; + +echo "\n"; + +echo "
".$LANG['planning'][9]." :"; + User::dropdown(array('name' => "plan[users_id]", + 'value' => $_POST["users_id"], + 'right' => "own_ticket", + 'entity' => $_POST["entity"])); + echo "
".$LANG['state'][0]." :"; +Planning::dropdownState("plan[state]",$state); +echo "
".$LANG['search'][8]." : "; + +$rand_begin=showDateTimeFormItem("plan[begin]",$begin,-1,false,true,'','',$CFG_GLPI["planning_begin"],$CFG_GLPI["planning_end"]); +echo "
".$LANG['financial'][8]." :"; + + +$values=array(0=>$LANG['search'][12], + 15*MINUTE_TIMESTAMP => '0'.$LANG['gmt'][2].'15', + 30*MINUTE_TIMESTAMP => '0'.$LANG['gmt'][2].'30', + 45*MINUTE_TIMESTAMP => '0'.$LANG['gmt'][2].'45', + 60*MINUTE_TIMESTAMP => '1'.$LANG['gmt'][2].'00', + 90*MINUTE_TIMESTAMP => '1'.$LANG['gmt'][2].'30', + 120*MINUTE_TIMESTAMP => '2'.$LANG['gmt'][2].'00', + 150*MINUTE_TIMESTAMP => '2'.$LANG['gmt'][2].'30', + 180*MINUTE_TIMESTAMP => '3'.$LANG['gmt'][2].'00', + 210*MINUTE_TIMESTAMP => '3'.$LANG['gmt'][2].'30', + 4*HOUR_TIMESTAMP => '4'.$LANG['gmt'][2].'00', + 5*HOUR_TIMESTAMP => '5'.$LANG['gmt'][2].'00', + 6*HOUR_TIMESTAMP => '6'.$LANG['gmt'][2].'00', + 7*HOUR_TIMESTAMP => '7'.$LANG['gmt'][2].'00', + 8*HOUR_TIMESTAMP => '8'.$LANG['gmt'][2].'00'); + + +$default_delay=0; + +$begin_timestamp=strtotime($begin); +$end_timestamp=strtotime($end); +// Floor with MINUTE_TIMESTAMP for rounded purpose +$computed_delay=floor(($end_timestamp-$begin_timestamp)/15/MINUTE_TIMESTAMP)*15*MINUTE_TIMESTAMP; +$default_delay=0; + +if (isset($values[$computed_delay])) { + $default_delay=$computed_delay; +} +$rand=Dropdown::showFromArray("plan[_duration]",$values,array('value'=>$default_delay)); + + +//showDateTimeFormItem("plan[end]",$end,-1,false,true,'','',$global_begin,$global_end); +echo "
"; + +$params=array('duration' => '__VALUE__', + 'end'=>$end, + 'global_begin'=>$CFG_GLPI["planning_begin"], + 'global_end'=>$CFG_GLPI["planning_end"]); +ajaxUpdateItemOnSelectEvent("dropdown_plan[_duration]$rand", + "date_end$rand",$CFG_GLPI["root_doc"]."/ajax/planningend.php",$params,false); + + +if($default_delay==0){ + $params['duration']=0; + ajaxUpdateItem("date_end$rand",$CFG_GLPI["root_doc"]."/ajax/planningend.php",$params); +} + + + + +echo "
\n"; + + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/planningend.php b/0.78-bugfixes/ajax/planningend.php new file mode 100644 index 0000000000000000000000000000000000000000..90adbc1f24c6e107deecde11c60e2e34d860a72b --- /dev/null +++ b/0.78-bugfixes/ajax/planningend.php @@ -0,0 +1,51 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/preference.tabs.php b/0.78-bugfixes/ajax/preference.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..6892eec8b5555fe9938d651939d642fc4fc926ca --- /dev/null +++ b/0.78-bugfixes/ajax/preference.tabs.php @@ -0,0 +1,67 @@ +getFromDB(getLoginUserID()); + $user->computePreferences(); + $config->showFormUserPrefs($user->fields); + break; + + default : + if (!Plugin::displayAction($pref, $_REQUEST['glpi_tab'])) { + $user->showMyForm($CFG_GLPI['root_doc']."/front/preference.php", getLoginUserID()); + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/printer.tabs.php b/0.78-bugfixes/ajax/printer.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..688f25b07c5d5315ecb878c19274b06bd4e344b9 --- /dev/null +++ b/0.78-bugfixes/ajax/printer.tabs.php @@ -0,0 +1,137 @@ +0 && $printer->can($_POST["id"],'r')) { + if (!empty($_POST["withtemplate"])) { + switch($_REQUEST['glpi_tab']) { + case 3 : + NetworkPort::showForItem('Printer', $_POST["id"], $_POST["withtemplate"]); + break; + + case 4 : + Infocom::showForItem($printer,$_POST["withtemplate"]); + Contract::showAssociated($printer,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($printer,$_POST["withtemplate"]); + break; + + default : + Plugin::displayAction($printer, $_REQUEST['glpi_tab'],$_POST["withtemplate"]); + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1 : + Cartridge::showInstalled($printer); + Cartridge::showInstalled($printer, 1); + Computer_Item::showForItem($printer); + NetworkPort::showForItem('Printer', $_POST["id"], $_POST["withtemplate"]); + Infocom::showForItem($printer); + Contract::showAssociated($printer); + Document::showAssociated($printer); + Ticket::showListForItem('Printer',$_POST["id"]); + Link::showForItem('Printer',$_POST["id"]); + Plugin::displayAction($printer, $_REQUEST['glpi_tab']); + break; + + case 3 : + Computer_Item::showForItem($printer); + NetworkPort::showForItem('Printer', $_POST["id"], $_POST["withtemplate"]); + break; + + case 4 : + Infocom::showForItem($printer); + Contract::showAssociated($printer); + break; + + case 5 : + Document::showAssociated($printer); + break; + + case 6 : + Ticket::showListForItem('Printer',$_POST["id"]); + break; + + case 7 : + Link::showForItem('Printer',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Printer',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('Printer',$_POST["id"]); + break; + + case 12 : + Log::showForItem($printer); + break; + + default : + if (!Plugin::displayAction($printer, $_REQUEST['glpi_tab'])) { + Cartridge::showInstalled($printer); + Cartridge::showInstalled($printer, 1); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/printermodel.tabs.php b/0.78-bugfixes/ajax/printermodel.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..793ad29088acd3deb0022e96210bb173a832fa76 --- /dev/null +++ b/0.78-bugfixes/ajax/printermodel.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/printertype.tabs.php b/0.78-bugfixes/ajax/printertype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..256f08ee4e8ca28b83eb37a858e096e08f69ad68 --- /dev/null +++ b/0.78-bugfixes/ajax/printertype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/priority.php b/0.78-bugfixes/ajax/priority.php new file mode 100644 index 0000000000000000000000000000000000000000..be763eecfeedbcc9d1b0d291ad71019cbdcd2c0e --- /dev/null +++ b/0.78-bugfixes/ajax/priority.php @@ -0,0 +1,55 @@ +\n"; + echo "document.getElementById('".$_POST["priority"]."').value = $priority;"; + echo "\n"; + } else { + echo Ticket::getPriorityName($priority); + } +} +?> diff --git a/0.78-bugfixes/ajax/private_public.php b/0.78-bugfixes/ajax/private_public.php new file mode 100644 index 0000000000000000000000000000000000000000..6c5b5776afaacf8cd64ed1b414c885f46df75503 --- /dev/null +++ b/0.78-bugfixes/ajax/private_public.php @@ -0,0 +1,70 @@ +\n"; + echo "\n"; + echo "\n"; + echo $LANG['common'][88]. " - "; + echo "".$LANG['common'][78].""; + break; + + case false : + echo "\n"; + echo $LANG['common'][76]." : "; + Dropdown::show('Entity', array('value' => $_POST["entities_id"])); + echo " + ".$LANG['entity'][9]." : "; + Dropdown::showYesNo('is_recursive',$_POST["is_recursive"]); + echo " - "; + echo "".$LANG['common'][79].""; + break; + } +} + +?> diff --git a/0.78-bugfixes/ajax/profile.tabs.php b/0.78-bugfixes/ajax/profile.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..6a63ff5eca6ad101ae8c3b2507b4366ddd4e0d09 --- /dev/null +++ b/0.78-bugfixes/ajax/profile.tabs.php @@ -0,0 +1,107 @@ +0 && $prof->getFromDB($_POST["id"])) { + $prof->cleanProfile(); + if ($prof->fields['interface']=='helpdesk') { + switch($_REQUEST['glpi_tab']) { + case -1 : + $prof->showFormHelpdesk($_POST['target']); + Profile_User::showForProfile($prof); + Plugin::displayAction($prof, $_REQUEST['glpi_tab']); + break; + case 4 : + Profile_User::showForProfile($prof); + break; + case 12 : + Log::showForItem($prof); + break; + default : + if (!Plugin::displayAction($prof, $_REQUEST['glpi_tab'])) { + $prof->showFormHelpdesk($_POST['target']); + } + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1 : + $prof->showFormInventory($_POST['target'],true,false); + $prof->showFormTracking($_POST['target'],false,false); + $prof->showFormAdmin($_POST['target'],false,true); + Profile_User::showForProfile($prof); + Plugin::displayAction($prof, $_REQUEST['glpi_tab']); + break; + + case 2 : + $prof->showFormTracking($_POST['target']); + break; + + case 3 : + $prof->showFormAdmin($_POST['target']); + break; + + case 4 : + Profile_User::showForProfile($prof); + break; + + case 12 : + Log::showForItem($prof); + break; + + default : + if (!Plugin::displayAction($prof, $_REQUEST['glpi_tab'])) { + $prof->showFormInventory($_POST['target']); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/requesttype.tabs.php b/0.78-bugfixes/ajax/requesttype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..74bf3aed49d5573aeb182e462856deea8f1f0269 --- /dev/null +++ b/0.78-bugfixes/ajax/requesttype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/rule.common.tabs.php b/0.78-bugfixes/ajax/rule.common.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..fedbaefe5321d5e4d2093f00edd0c660551c59c8 --- /dev/null +++ b/0.78-bugfixes/ajax/rule.common.tabs.php @@ -0,0 +1,68 @@ +0 && $rule->can($_POST['id'],'r')) { + + switch($_REQUEST['glpi_tab']) { + case -1 : + $rule->getRuleWithCriteriasAndActions($_POST['id'],1,1); + $rule->showCriteriasList($_POST["id"]); + $rule->showActionsList($_POST["id"]); + break; + case 1 : + $rule->getRuleWithCriteriasAndActions($_POST['id'],1,1); + $rule->showCriteriasList($_POST["id"]); + $rule->showActionsList($_POST["id"]); + break; + case 12 : + Log::showForItem($rule); + break; + + default : + if (!Plugin::displayAction($rule, $_REQUEST['glpi_tab'])) { + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/ruleaction.php b/0.78-bugfixes/ajax/ruleaction.php new file mode 100644 index 0000000000000000000000000000000000000000..10a2c6f8effcb63b01cf45e628b7aeb7e315eec5 --- /dev/null +++ b/0.78-bugfixes/ajax/ruleaction.php @@ -0,0 +1,71 @@ +\n"; + echo "\n"; + + $paramsaction=array('action_type'=>'__VALUE__', + 'field'=>$_POST["field"], + 'sub_type'=>$_POST["sub_type"]); + ajaxUpdateItemOnSelectEvent("dropdown_action_type$randaction","action_type_span$randaction", + $CFG_GLPI["root_doc"]."/ajax/ruleactionvalue.php",$paramsaction,false); + ajaxUpdateItem("action_type_span$randaction",$CFG_GLPI["root_doc"]."/ajax/ruleactionvalue.php",$paramsaction, + false,"dropdown_action_type$randaction"); +} + +?> diff --git a/0.78-bugfixes/ajax/ruleactionvalue.php b/0.78-bugfixes/ajax/ruleactionvalue.php new file mode 100644 index 0000000000000000000000000000000000000000..acff0592f09cc7666369e689aaac7d6b256152e5 --- /dev/null +++ b/0.78-bugfixes/ajax/ruleactionvalue.php @@ -0,0 +1,53 @@ +displayActionSelectPattern($_POST); +?> diff --git a/0.78-bugfixes/ajax/rulecriteria.php b/0.78-bugfixes/ajax/rulecriteria.php new file mode 100644 index 0000000000000000000000000000000000000000..bb549f59fb9f7779ca4a0aa227fe80e99d34b197 --- /dev/null +++ b/0.78-bugfixes/ajax/rulecriteria.php @@ -0,0 +1,88 @@ +getCriterias(); + if (count($criterias)) { + // First include -> first of the predefined array + if (!isset($_POST["criteria"])) { + $_POST["criteria"]=key($criterias); + } + $type=""; + if (isset($criterias[$_POST["criteria"]]['type'])) { + $type=$criterias[$_POST["criteria"]]['type']; + } + if (isset($criterias[$_POST["criteria"]]['allow_condition'])) { + $allow_condition=$criterias[$_POST["criteria"]]['allow_condition']; + } + else { + $allow_condition = array(); + } + $randcrit = RuleCriteria::dropdownConditions($type,"condition",'',$allow_condition); + + echo "  "; + echo "\n"; + echo "\n"; + + $paramscriteria=array('condition'=>'__VALUE__', + 'criteria'=>$_POST["criteria"], + 'sub_type'=>$_POST["sub_type"]); + + ajaxUpdateItemOnSelectEvent("dropdown_condition$randcrit","condition_span$randcrit", + $CFG_GLPI["root_doc"]."/ajax/rulecriteriavalue.php",$paramscriteria, + false); + + ajaxUpdateItem("condition_span$randcrit",$CFG_GLPI["root_doc"]."/ajax/rulecriteriavalue.php", + $paramscriteria,false,"dropdown_condition$randcrit"); + } +} + +?> diff --git a/0.78-bugfixes/ajax/rulecriteriavalue.php b/0.78-bugfixes/ajax/rulecriteriavalue.php new file mode 100644 index 0000000000000000000000000000000000000000..943349f9639852df00491f2ea4d84844ba905d65 --- /dev/null +++ b/0.78-bugfixes/ajax/rulecriteriavalue.php @@ -0,0 +1,58 @@ +getCriterias(); + $rule->displayCriteriaSelectPattern("pattern",$_POST["criteria"],$_POST['condition']); +} + +?> diff --git a/0.78-bugfixes/ajax/ruledictionnarycomputermodel.tabs.php b/0.78-bugfixes/ajax/ruledictionnarycomputermodel.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..c3f81764e46b49e89a0c4749bf1abe252d93631c --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarycomputermodel.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarycomputertype.tabs.php b/0.78-bugfixes/ajax/ruledictionnarycomputertype.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..ec8a8311332f2dcd5a307c483681ed325d0694a6 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarycomputertype.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarymanufacturer.tabs.php b/0.78-bugfixes/ajax/ruledictionnarymanufacturer.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..798d3e37996a6d47271e26a736b086607ac45a65 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarymanufacturer.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarymonitormodel.tabs.php b/0.78-bugfixes/ajax/ruledictionnarymonitormodel.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..a13d7b27673fb8c8eca02b45f449cbbb61c2a46c --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarymonitormodel.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarymonitortype.tabs.php b/0.78-bugfixes/ajax/ruledictionnarymonitortype.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..5e923d78c8c4fc4d4a80c0d2ca8dcc0e23bf4857 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarymonitortype.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarynetworkequipmentmodel.tabs.php b/0.78-bugfixes/ajax/ruledictionnarynetworkequipmentmodel.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..9aeea4270c60b34d44ebfc02750857331e400a5f --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarynetworkequipmentmodel.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarynetworkequipmenttype.tabs.php b/0.78-bugfixes/ajax/ruledictionnarynetworkequipmenttype.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..46d286e5893f966a7583852bab9d24b4cbd83995 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarynetworkequipmenttype.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryoperatingsystem.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryoperatingsystem.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..7fe48e9ce6bcc0b1b7783c3cb64b8934c78a363f --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryoperatingsystem.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryoperatingsystemservicepack.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryoperatingsystemservicepack.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..7ce7adc3219472b192578435a56b4d89c60da680 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryoperatingsystemservicepack.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryoperatingsystemversion.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryoperatingsystemversion.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..65eab3884bf548868a487f37defe5120c0aea292 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryoperatingsystemversion.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryperipheralmodel.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryperipheralmodel.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..5d9cb997fba60dd6bf23db763e26c11340696ce1 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryperipheralmodel.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryperipheraltype.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryperipheraltype.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..e68901e80658266feac0797a2ede8ee9a35b0fa3 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryperipheraltype.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryphonemodel.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryphonemodel.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..37f4761f95bf5e4467c53caedbd1097eac83cff2 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryphonemodel.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryphonetype.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryphonetype.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..2160f9cd98e40a5ea4373841f363a226d723e21f --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryphonetype.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryprintermodel.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryprintermodel.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..12f552772531eedc30d01361485080894dce00c8 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryprintermodel.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnaryprintertype.tabs.php b/0.78-bugfixes/ajax/ruledictionnaryprintertype.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..63569f75368fd05d99e61a3ff867a7dc72976866 --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnaryprintertype.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruledictionnarysoftware.tabs.php b/0.78-bugfixes/ajax/ruledictionnarysoftware.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..f109120eedc8276095375b7288218ff8e18f117a --- /dev/null +++ b/0.78-bugfixes/ajax/ruledictionnarysoftware.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/rulemailcollector.tabs.php b/0.78-bugfixes/ajax/rulemailcollector.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..8a49e886d3a40fadee286f6b7c2f36162725b1df --- /dev/null +++ b/0.78-bugfixes/ajax/rulemailcollector.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruleocs.tabs.php b/0.78-bugfixes/ajax/ruleocs.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..870bae0a19836cd050a073f60ae6bfa4ab7c0f8d --- /dev/null +++ b/0.78-bugfixes/ajax/ruleocs.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruleright.tabs.php b/0.78-bugfixes/ajax/ruleright.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..2edf2a7ee41c303fb611d2fbea6e337d30810e30 --- /dev/null +++ b/0.78-bugfixes/ajax/ruleright.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/rulerightparameter.tabs.php b/0.78-bugfixes/ajax/rulerightparameter.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..af785b147f13aef614a73ec04752f31d1e5d7983 --- /dev/null +++ b/0.78-bugfixes/ajax/rulerightparameter.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/rules.tabs.php b/0.78-bugfixes/ajax/rules.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..51cdaba496bed1cbaf40ad46383622c85b0e4edf --- /dev/null +++ b/0.78-bugfixes/ajax/rules.tabs.php @@ -0,0 +1,50 @@ +isRuleEntityAssigned()) { + $rulecollection->setEntity($_SESSION['glpiactive_entity']); +} +$rulecollection->title(); +$rulecollection->showEngineSummary(); +$rulecollection->showListRules($_POST['target'],$_REQUEST['glpi_tab'],$_POST); + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/rulesoftwarecategory.tabs.php b/0.78-bugfixes/ajax/rulesoftwarecategory.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..2c086fdbb13c8753399198b0a3318b2828e13463 --- /dev/null +++ b/0.78-bugfixes/ajax/rulesoftwarecategory.tabs.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/ruleticket.tabs.php b/0.78-bugfixes/ajax/ruleticket.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..3c7b428b55c565c7af47b728c0dbfa533483e8e3 --- /dev/null +++ b/0.78-bugfixes/ajax/ruleticket.tabs.php @@ -0,0 +1,47 @@ +right,'r'); + +include ("rule.common.tabs.php"); +?> diff --git a/0.78-bugfixes/ajax/searchoption.php b/0.78-bugfixes/ajax/searchoption.php new file mode 100644 index 0000000000000000000000000000000000000000..8ecf82099dcb8bd4f417ae16e0fd6dd05bb79421 --- /dev/null +++ b/0.78-bugfixes/ajax/searchoption.php @@ -0,0 +1,114 @@ +0){ + // get already get search options + if (isset($actions['searchopt'])) { + $searchopt=$actions['searchopt']; + // No name for clean array whith quotes + unset($searchopt['name']); + unset($actions['searchopt']); + } + $randsearch=Dropdown::showFromArray("searchtype".$addmeta."[".$_POST["num"]."]", + $actions,array('value' => $_POST["searchtype"])); + } + echo " \n"; + + $_REQUEST['searchtype']=$_POST["searchtype"]; + $_REQUEST['field']=$_POST["field"]; + $_REQUEST['itemtype']=$_POST["itemtype"]; + $_REQUEST['num']=$_POST["num"]; + $_REQUEST['value']=stripslashes($_POST['value']); + $_REQUEST['meta']=$_POST['meta']; + $_REQUEST['searchopt']=serialize($searchopt); + include(GLPI_ROOT."/ajax/searchoptionvalue.php"); + echo "\n"; + + $paramsaction=array( 'searchtype' => '__VALUE__', + 'field' => $_POST["field"], + 'itemtype' => $_POST["itemtype"], + 'num' => $_POST["num"], + 'value' => rawurlencode(stripslashes($_POST['value'])), + 'searchopt' => $searchopt, + 'meta' => $_POST['meta'],); + + ajaxUpdateItemOnSelectEvent("dropdown_searchtype".$addmeta."[".$_POST["num"]."]$randsearch","span$dropdownname", + $CFG_GLPI["root_doc"]."/ajax/searchoptionvalue.php",$paramsaction,false); +// ajaxUpdateItem("span$dropdownname",$CFG_GLPI["root_doc"]."/ajax/searchoptionvalue.php", +// $paramsaction, false,"dropdown_searchtype".$addmeta."[".$_POST["num"]."]$randsearch"); + +} + +?> diff --git a/0.78-bugfixes/ajax/searchoptionvalue.php b/0.78-bugfixes/ajax/searchoptionvalue.php new file mode 100644 index 0000000000000000000000000000000000000000..1f6171e59c15a77b60a2b509c46ed177e64379ef --- /dev/null +++ b/0.78-bugfixes/ajax/searchoptionvalue.php @@ -0,0 +1,214 @@ + $inputname, + 'value' => $_REQUEST['value'], + 'comments' => false, + 'right' => 'validate_ticket')); + $display=true; + break; + case "glpi_users_validation.users_id": + User::dropdown(array('name' => $inputname, + 'value' => $_REQUEST['value'], + 'comments' => false, + 'right' => 'create_validation')); + $display=true; + break; + } + } + + // Specific cases with linkfield + if (!$display && isset($searchopt['linkfield'])) { + switch ($_REQUEST['itemtype'].".".$searchopt['linkfield']) { + case "Ticket.users_id_recipient" : + case "Ticket.users_id" : + User::dropdownForTicket($inputname,$_REQUEST['value'],$searchopt['linkfield']); + $display=true; + break; + case "Ticket.users_id_assign" : + User::dropdown(array('name' => $inputname, + 'value' => $_REQUEST['value'], + 'right' => 'own_ticket')); + $display=true; + break; + } + } + + if (!$display && isset($searchopt['field'])) { + // Specific cases + switch ($searchopt['table'].".".$searchopt['field']) { + + case "glpi_tickets.status" : + Ticket::dropdownStatus($inputname,$_REQUEST['value'],1); + $display=true; + break; + case "glpi_tickets.priority" : + Ticket::dropdownPriority($inputname,$_REQUEST['value'],true,true); + $display=true; + break; + case "glpi_tickets.impact" : + Ticket::dropdownImpact($inputname,$_REQUEST['value'],true); + $display=true; + break; + case "glpi_tickets.urgency" : + Ticket::dropdownUrgency($inputname,$_REQUEST['value'],true); + $display=true; + break; + case "glpi_tickets.global_validation" : + TicketValidation::dropdownStatus($inputname,array('value' => $_REQUEST['value'], + 'global' => true, + 'all' => 1)); + $display=true; + break; + case "glpi_users.name": + User::dropdown(array('name' => $inputname, + 'value' => $_REQUEST['value'], + 'comments' => false, + 'right' => 'all')); + $display=true; + break; + case "glpi_ticketvalidations.status" : + TicketValidation::dropdownStatus($inputname,array('value'=>$_REQUEST['value'],'all'=>1)); + $display=true; + break; + } + + // Standard datatype usage + if (!$display && isset($searchopt['datatype'])) { + switch ($searchopt['datatype']) { + + case "bool": + Dropdown::showYesNo($inputname,$_REQUEST['value']); + $display=true; + break; + case "right": + // No access not displayed because empty not take into account for search + Profile::dropdownNoneReadWrite($inputname,$_REQUEST['value'],1,1,1); + $display=true; + break; + case "itemtypename": + Dropdown::dropdownUsedItemTypes($inputname,getItemTypeForTable($searchopt['table']), + array('value' => $_REQUEST['value'], + 'comments' => 0)); + $display=true; + break; + } + } + + + //Could display be handled by a plugin ? + if (!$display && $plug = isPluginItemType(getItemTypeForTable($searchopt['table']))) { + $function = 'plugin_'.$plug['plugin'].'_searchOptionsValues'; + if (function_exists($function)) { + $params = array('name' => $inputname, + 'searchtype' => $_REQUEST['searchtype'], + 'searchoption' => $searchopt, + 'value' => $_REQUEST['value']); + $display = $function($params); + } + } + + // Standard field usage + if (!$display) { + switch ($searchopt['field']) { + + case "name": + case "completename": + Dropdown::show(getItemTypeForTable($searchopt['table']), + array('value' => $_REQUEST['value'], + 'name' => $inputname, + 'comments' => 0)); + $display=true; + break; + } + } + } + break; + } + + +// static function dropdownValue($table,$myname,$value='',$display_comment=1,$entity_restrict=-1, +// $update_item="",$used=array(),$auto_submit=0) { + + // Default case : text field + if (!$display) { + echo ""; + } +} + +//ajaxFooter(); + + +?> diff --git a/0.78-bugfixes/ajax/software.tabs.php b/0.78-bugfixes/ajax/software.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..d04593234eb9f5263c170408de2806413b205393 --- /dev/null +++ b/0.78-bugfixes/ajax/software.tabs.php @@ -0,0 +1,138 @@ +0 && $soft->can($_POST["id"],'r')) { + if (!empty($_POST["withtemplate"])) { + switch($_REQUEST['glpi_tab']) { + case 4 : + Infocom::showForItem($soft,$_POST["withtemplate"]); + Contract::showAssociated($soft,$_POST["withtemplate"]); + break; + + case 5 : + Document::showAssociated($soft,$_POST["withtemplate"]); + break; + + default : + Plugin::displayAction($soft, $_REQUEST['glpi_tab'], $_POST["withtemplate"]); + } + } else { + switch($_REQUEST['glpi_tab']) { + case -1 : + SoftwareVersion::showForSoftware($soft); + SoftwareLicense::showForSoftware($soft); + Computer_SoftwareVersion::showForSoftware($soft); + Infocom::showForItem($soft); + Contract::showAssociated($soft); + Document::showAssociated($soft); + Ticket::showListForItem('Software',$_POST["id"]); + Link::showForItem('Software',$_POST["id"]); + Plugin::displayAction($soft, $_REQUEST['glpi_tab']); + break; + + case 2 : + Computer_SoftwareVersion::showForSoftware($soft); + break; + + case 4 : + Infocom::showForItem($soft); + Contract::showAssociated($soft); + break; + + case 5 : + Document::showAssociated($soft); + break; + + case 6 : + Ticket::showListForItem('Software',$_POST["id"]); + break; + + case 7 : + Link::showForItem('Software',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Software',$_POST["id"]); + break; + + case 11 : + Reservation::showForItem('Software',$_POST["id"]); + break; + + case 12 : + Log::showForItem($soft); + break; + + case 21 : + $soft->showMergeCandidates(); + break; + + default : + if (!Plugin::displayAction($soft, $_REQUEST['glpi_tab'])) { + SoftwareVersion::showForSoftware($soft); + SoftwareLicense::showForSoftware($soft); + } + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/softwarecategory.tabs.php b/0.78-bugfixes/ajax/softwarecategory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..0806b86b184c9defc4363b90e3d4b0471026f951 --- /dev/null +++ b/0.78-bugfixes/ajax/softwarecategory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/softwarelicense.tabs.php b/0.78-bugfixes/ajax/softwarelicense.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..4411932d413b72476ec58ee68991174b94e8ea25 --- /dev/null +++ b/0.78-bugfixes/ajax/softwarelicense.tabs.php @@ -0,0 +1,87 @@ +0 && $license->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Infocom::showForItem($license); + Document::showAssociated($license); + Plugin::displayAction($license, $_REQUEST['glpi_tab']); + break; + + case 4 : + Infocom::showForItem($license); + break; + + case 5 : + Document::showAssociated($license); + break; + + case 12 : + Log::showForItem($license); + break; + + default : + Plugin::displayAction($license, $_REQUEST['glpi_tab']); + } +} +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/softwarelicensetype.tabs.php b/0.78-bugfixes/ajax/softwarelicensetype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..0f8e43c2ae2802caaeb079033dcbbffaba6f02a3 --- /dev/null +++ b/0.78-bugfixes/ajax/softwarelicensetype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/softwareversion.tabs.php b/0.78-bugfixes/ajax/softwareversion.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..f2af3461792b22372eb0e06a530d128316245551 --- /dev/null +++ b/0.78-bugfixes/ajax/softwareversion.tabs.php @@ -0,0 +1,82 @@ +0 && $version->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Computer_SoftwareVersion::showForVersion($version); + Plugin::displayAction($version, $_REQUEST['glpi_tab']); + break; + + case 2 : + Computer_SoftwareVersion::showForVersion($version); + break; + + case 12 : + Log::showForItem($version); + break; + + default : + if (!Plugin::displayAction($version, $_REQUEST['glpi_tab'])) { + Computer_SoftwareVersion::showForVersionByEntity($version); + } + } +} +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/state.tabs.php b/0.78-bugfixes/ajax/state.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..cb850c7d11a4dda516eeae033495faab6775206f --- /dev/null +++ b/0.78-bugfixes/ajax/state.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/supplier.tabs.php b/0.78-bugfixes/ajax/supplier.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..946606a4d524677177fe2a61c885cf76178207e0 --- /dev/null +++ b/0.78-bugfixes/ajax/supplier.tabs.php @@ -0,0 +1,108 @@ +0 && $supplier->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + $supplier->showContacts(); + $supplier->showContracts(); + Document::showAssociated($supplier); + Ticket::showListForSupplier($_POST["id"]); + Link::showForItem('Supplier',$_POST["id"]); + Plugin::displayAction($supplier, $_REQUEST['glpi_tab']); + break; + + case 4 : + $supplier->showContracts(); + break; + + case 5 : + Document::showAssociated($supplier); + break; + + case 6 : + Ticket::showListForSupplier($_POST["id"]); + break; + + case 7 : + Link::showForItem('Supplier',$_POST["id"]); + break; + + case 10 : + showNotesForm($_POST['target'],'Supplier',$_POST["id"]); + break; + + case 12 : + Log::showForItem($supplier); + break; + + case 15 : + $supplier->showInfocoms(); + break; + + default : + if (!Plugin::displayAction($supplier, $_REQUEST['glpi_tab'])) { + $supplier->showContacts(); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/suppliertype.tabs.php b/0.78-bugfixes/ajax/suppliertype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..e8e140477d9311e2b35f4bee3338eec0e145f393 --- /dev/null +++ b/0.78-bugfixes/ajax/suppliertype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/taskcategory.tabs.php b/0.78-bugfixes/ajax/taskcategory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..dbb3e29f12456b2c56c0c8a7683670360837ea5d --- /dev/null +++ b/0.78-bugfixes/ajax/taskcategory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/textarea.php b/0.78-bugfixes/ajax/textarea.php new file mode 100644 index 0000000000000000000000000000000000000000..d44defea393b854e3a0d86ef2e32f4f14f0353d5 --- /dev/null +++ b/0.78-bugfixes/ajax/textarea.php @@ -0,0 +1,52 @@ +"; + echo cleanPostForTextArea(rawurldecode($_POST["data"])); + echo ""; +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/ticket.tabs.php b/0.78-bugfixes/ajax/ticket.tabs.php new file mode 100755 index 0000000000000000000000000000000000000000..df600ed14ae93b8d565cb09b239d685f0f5d6000 --- /dev/null +++ b/0.78-bugfixes/ajax/ticket.tabs.php @@ -0,0 +1,111 @@ +0 && $ticket->getFromDB($_POST["id"])) { + switch($_REQUEST['glpi_tab']) { + + case -1 : + $fup = new TicketFollowup(); + $fup->showSummary($ticket); + $validation = new Ticketvalidation(); + $validation->showSummary($ticket); + $task = new TicketTask(); + $task->showSummary($ticket); + $ticket->showSolutionForm(); + if ($ticket->canApprove()) { + $suivi = new TicketFollowup(); + $suivi->showApprobationForm($ticket); + } + $ticket->showCost($_POST['target']); + Document::showAssociated($ticket); + Log::showForItem($ticket); + Plugin::displayAction($ticket,$_REQUEST['glpi_tab']); + + break; + + + case 2 : + $task = new TicketTask(); + $task->showSummary($ticket); + break; + + case 3 : + $ticket->showCost($_POST['target']); + break; + + case 4 : + $ticket->showSolutionForm(); + if ($ticket->canApprove()) { + $suivi = new TicketFollowup(); + $suivi->showApprobationForm($ticket); + } + break; + + case 5 : + Document::showAssociated($ticket); + break; + + case 6 : + Log::showForItem($ticket); + break; + + case 7 : + $validation = new Ticketvalidation(); + $validation->showSummary($ticket); + break; + default : + if (!Plugin::displayAction($ticket, $_REQUEST['glpi_tab'])) { + $fup = new TicketFollowup(); + $fup->showSummary($ticket); + } + } +} + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/ticketcategory.tabs.php b/0.78-bugfixes/ajax/ticketcategory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..6f5311a6b056355375df377ac5b7d17e22121a3b --- /dev/null +++ b/0.78-bugfixes/ajax/ticketcategory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/ticketsolutiontype.tabs.php b/0.78-bugfixes/ajax/ticketsolutiontype.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..78e2175349c2053aec20111213b85759619800ac --- /dev/null +++ b/0.78-bugfixes/ajax/ticketsolutiontype.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/ticketvalidation.tabs.php b/0.78-bugfixes/ajax/ticketvalidation.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..0724ad4d405e707fb9dac1f3361f8c26ddd3c374 --- /dev/null +++ b/0.78-bugfixes/ajax/ticketvalidation.tabs.php @@ -0,0 +1,58 @@ +0 && $validation->getFromDB($_POST["id"])) { + switch($_REQUEST['glpi_tab']) { + default : + Plugin::displayAction($validation, $_REQUEST['glpi_tab']); + break; + } +} + +ajaxFooter(); +?> diff --git a/0.78-bugfixes/ajax/transfer.tabs.php b/0.78-bugfixes/ajax/transfer.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..e6bd1228f834a8272ca8482736870bcba30f9b86 --- /dev/null +++ b/0.78-bugfixes/ajax/transfer.tabs.php @@ -0,0 +1,63 @@ +0 && $transfer->can($_POST['id'],'r')) +switch ($_REQUEST['glpi_tab']) { + default : + if (!Plugin::displayAction($transfer, $_REQUEST['glpi_tab'])) { + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/transfers.php b/0.78-bugfixes/ajax/transfers.php new file mode 100644 index 0000000000000000000000000000000000000000..6ee047dbdf0e575f4ac933aac97fed4accb39b1a --- /dev/null +++ b/0.78-bugfixes/ajax/transfers.php @@ -0,0 +1,51 @@ +0) { + $transfer=new Transfer(); + $transfer->showForm($_POST["id"], + array('target' => $CFG_GLPI["root_doc"]."/front/transfer.action.php")); +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/uemailUpdate.php b/0.78-bugfixes/ajax/uemailUpdate.php new file mode 100644 index 0000000000000000000000000000000000000000..3de07cb929e651c0af48df282955bb7b78d7a512 --- /dev/null +++ b/0.78-bugfixes/ajax/uemailUpdate.php @@ -0,0 +1,64 @@ +query($query)) { + if ($DB->numrows($result)) { + $email=$DB->result($result,0,"email"); + } +} +echo ""; + +echo "\n"; + +?> \ No newline at end of file diff --git a/0.78-bugfixes/ajax/updateMetaSearch.php b/0.78-bugfixes/ajax/updateMetaSearch.php new file mode 100644 index 0000000000000000000000000000000000000000..e82c534ed84fd6cb53d4bf7c96bc9fc63e8adb93 --- /dev/null +++ b/0.78-bugfixes/ajax/updateMetaSearch.php @@ -0,0 +1,110 @@ +checkGlobal('r'); + +$first_group=true; +$newgroup=""; +$items_in_group=0; +$searchopt=Search::getCleanedOptions($_POST["itemtype"],'r',false); + +echo " "; +//print_r($_POST); +echo "\n"; + +$_POST['itemtype']=$_POST["itemtype"]; +$_POST['num']=$_POST["num"]; +$_POST['field']=$_POST["field"]; +$_POST['searchtype']=$_POST["searchtype2"]; +$_POST['value']=$_POST["value"]; +$_POST['meta']=1; +include (GLPI_ROOT."/ajax/searchoption.php"); +echo "\n"; + +$params = array('field' => '__VALUE__', + 'itemtype' => $_POST["itemtype"], + 'num' => $_POST["num"], + 'value' => $_POST["value"], + 'searchtype' => $_POST["searchtype2"], + 'meta' => 1); +ajaxUpdateItemOnSelectEvent("Search2".$_POST["itemtype"].$_POST["num"], + "Search2Span".$_POST["itemtype"].$_POST["num"], + $CFG_GLPI["root_doc"]."/ajax/searchoption.php",$params,false); + + +?> diff --git a/0.78-bugfixes/ajax/updateTrackingDeviceType.php b/0.78-bugfixes/ajax/updateTrackingDeviceType.php new file mode 100644 index 0000000000000000000000000000000000000000..108ae4d60c6b117e5fb470f93d1def2f7360b8b2 --- /dev/null +++ b/0.78-bugfixes/ajax/updateTrackingDeviceType.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/ajax/updatecurrenttab.php b/0.78-bugfixes/ajax/updatecurrenttab.php new file mode 100644 index 0000000000000000000000000000000000000000..a7eef970a769d7f1501e65f1709dfdd73e0e759b --- /dev/null +++ b/0.78-bugfixes/ajax/updatecurrenttab.php @@ -0,0 +1,49 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/user.tabs.php b/0.78-bugfixes/ajax/user.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..2c6c69e66f3bde7ab6e6d3890ff3c377f9696f83 --- /dev/null +++ b/0.78-bugfixes/ajax/user.tabs.php @@ -0,0 +1,116 @@ +getFromDBbyName($_POST["name"]); + glpi_header($CFG_GLPI["root_doc"]."/front/user.form.php?id=".$user->fields['id']); +} + +if (empty($_POST["name"])) { + $_POST["name"] = ""; +} +$user = new User(); +if ($_POST["id"]>0 && $user->can($_POST["id"],'r')) { + switch($_REQUEST['glpi_tab']) { + case -1 : + Profile_User::showForUser($user); + Group_User::showForUser( $user); + $user->showItems(); + Reservation::showForUser($_POST["id"]); + Ticket::showListForUser($_POST["id"]); + Plugin::displayAction($user, $_REQUEST['glpi_tab']); + break; + + case 2 : + $user->showItems(); + break; + + case 3 : + Ticket::showListForUser($_POST["id"]); + break; + + case 4 : + Group_User::showForUser($user); + break; + + case 11 : + Reservation::showForUser($_POST["id"]); + break; + + case 12 : + Auth::showSynchronizationForm($_POST["id"]); + break; + + case 13 : + Log::showForItem($user); + break; + + default : + if (!Plugin::displayAction($user, $_REQUEST['glpi_tab'])) { + Profile_User::showForUser($user); + } + } +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/usercategory.tabs.php b/0.78-bugfixes/ajax/usercategory.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..c34e08f29ec6620d0313c3a10d79cb1cddd92ab3 --- /dev/null +++ b/0.78-bugfixes/ajax/usercategory.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/usertitle.tabs.php b/0.78-bugfixes/ajax/usertitle.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..27252722e53ece48f72c6c6b03694428a09af240 --- /dev/null +++ b/0.78-bugfixes/ajax/usertitle.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/ajax/viewfollowup.php b/0.78-bugfixes/ajax/viewfollowup.php new file mode 100644 index 0000000000000000000000000000000000000000..5f38644c93008b785ecbedbc19f83d5f9c2b454f --- /dev/null +++ b/0.78-bugfixes/ajax/viewfollowup.php @@ -0,0 +1,64 @@ +getFromDB($_POST["tickets_id"])) { + $item->showForm($_POST["id"], array('ticket' => $ticket)); +} else { + echo $LANG['login'][5]; +} + +ajaxFooter(); + +?> diff --git a/0.78-bugfixes/ajax/vlan.tabs.php b/0.78-bugfixes/ajax/vlan.tabs.php new file mode 100644 index 0000000000000000000000000000000000000000..c90347e56c32f79d655fa23ba8ff86dc0919af17 --- /dev/null +++ b/0.78-bugfixes/ajax/vlan.tabs.php @@ -0,0 +1,43 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/config/.htaccess b/0.78-bugfixes/config/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..3418e55a68383c1cbc687c52a2994d1e8ed83800 --- /dev/null +++ b/0.78-bugfixes/config/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/0.78-bugfixes/config/based_config.php b/0.78-bugfixes/config/based_config.php new file mode 100644 index 0000000000000000000000000000000000000000..a02cde5d6edf348254c05aed8b29da09e5b8554e --- /dev/null +++ b/0.78-bugfixes/config/based_config.php @@ -0,0 +1,145 @@ + diff --git a/0.78-bugfixes/config/config.php b/0.78-bugfixes/config/config.php new file mode 100644 index 0000000000000000000000000000000000000000..e12ce95d721fbf458179ae65d1f9e99c66b5db38 --- /dev/null +++ b/0.78-bugfixes/config/config.php @@ -0,0 +1,191 @@ +"; + echo "

Error : GLPI seems to not be installed properly.

"; + echo "

config_db.php file is missing.

"; + echo "

Please restart the install process.

"; + echo "

Click here to proceed

"; + echo ""; + } else { + echo "Error : GLPI seems to not be installed properly.\n"; + echo "config_db.php file is missing.\n"; + echo "Please restart the install process.\n"; + } + nullFooter(); + + die(); +} else { + require_once (GLPI_CONFIG_DIR . "/config_db.php"); + include_once (GLPI_CACHE_LITE_DIR."/Lite/Output.php"); + include_once (GLPI_CACHE_LITE_DIR."/Lite/File.php"); + + //Database connection + DBConnection::establishDBConnection((isset($USEDBREPLICATE) ? $USEDBREPLICATE : 0), + (isset($DBCONNECTION_REQUIRED) ? $DBCONNECTION_REQUIRED : 0)); + + + // *************************** Statics config options ********************** + // ********************options d'installation statiques********************* + // ************************************************************************* + + //Options from DB, do not touch this part. + + // Default Use mode + if (!isset($_SESSION['glpi_use_mode'])) { + $_SESSION['glpi_use_mode']=NORMAL_MODE; + } + + $config_object=new Config(); + $config_ok=false; + + if (!isset($_GET['donotcheckversion']) && // use normal config table on restore process + (isset($TRY_OLD_CONFIG_FIRST) // index case + || (isset($_SESSION['TRY_OLD_CONFIG_FIRST']) && $_SESSION['TRY_OLD_CONFIG_FIRST']))) { // backup case + + if (isset($_SESSION['TRY_OLD_CONFIG_FIRST'])) { + unset($_SESSION['TRY_OLD_CONFIG_FIRST']); + } + // First try old config table : for update proces management from < 0.80 to >= 0.80 + $config_object->forceTable('glpi_config'); + if ($config_object->getFromDB(1)) { + $config_ok=true; + } else { + $config_object->forceTable('glpi_configs'); + if ($config_object->getFromDB(1)) { + $config_ok=true; + } + } + } else { // Normal load process : use normal config table. If problem try old one + if($config_object->getFromDB(1)) { + $config_ok=true; + } else { + // Manage glpi_config table before 0.80 + $config_object->forceTable('glpi_config'); + if ($config_object->getFromDB(1)) { + $config_ok=true; + } + } + } + + if ($config_ok) { + $CFG_GLPI=array_merge($CFG_GLPI,$config_object->fields); + $CFG_GLPI['priority_matrix'] = importArrayFromDB($config_object->fields['priority_matrix'],true); + + Config::detectRootDoc(); + + // Path for icon of document type + $CFG_GLPI["typedoc_icon_dir"] = $CFG_GLPI["root_doc"]."/pics/icones"; + } else { + echo "Error accessing config table"; + exit(); + } + + // If debug mode activated : display some informations + if ($_SESSION['glpi_use_mode']==DEBUG_MODE) { + // display_errors only need for for E_ERROR, E_PARSE, ... which cannot be catched + ini_set('display_errors','On'); + // Recommended development settings + error_reporting(E_ALL | E_STRICT); + set_error_handler('userErrorHandlerDebug'); + } else { + // Recommended production settings + ini_set('display_errors','Off'); + error_reporting(E_ALL); + set_error_handler('userErrorHandlerNormal'); + } + + if (isset($_SESSION["glpiroot"]) && $CFG_GLPI["root_doc"]!=$_SESSION["glpiroot"]) { + glpi_header($_SESSION["glpiroot"]); + } + + // Override cfg_features by session value + foreach ($CFG_GLPI['user_pref_field'] as $field) { + if (!isset($_SESSION["glpi$field"]) && isset($CFG_GLPI[$field])) { + $_SESSION["glpi$field"]=$CFG_GLPI[$field]; + } + } + + if ((!isset($CFG_GLPI["version"]) || trim($CFG_GLPI["version"])!=GLPI_VERSION) + && !isset($_GET["donotcheckversion"])) { + + loadLanguage(); + if (isCommandLine()) { + echo $LANG['update'][88] . "\n"; + } else { + nullHeader("UPDATE NEEDED",$CFG_GLPI["root_doc"]); + echo "
"; + echo ""; + $error=commonCheckForUseGLPI(); + echo "

"; + + if (!$error) { + if (!isset($CFG_GLPI["version"]) || trim($CFG_GLPI["version"])"; + echo "

".$LANG['update'][88]."

"; + echo ""; + echo ""; + } else if (trim($CFG_GLPI["version"])>GLPI_VERSION) { + echo "

".$LANG['update'][89]."

"; + } + } else { + echo "
"; + echo ""; + echo "
"; + } + echo "
"; + nullFooter(); + } + exit(); + } +} + +?> diff --git a/0.78-bugfixes/config/define.php b/0.78-bugfixes/config/define.php new file mode 100644 index 0000000000000000000000000000000000000000..261eb70c01f877fa6326f0fc87a54f47f573a3ae --- /dev/null +++ b/0.78-bugfixes/config/define.php @@ -0,0 +1,286 @@ + array('БългарÑки', 'bg_BG.php','bg', 'bg','bulgarian'), + 'ca_CA' => array('Català', 'ca_CA.php','ca', 'ca','catalan'), + 'cs_CZ' => array('ÄŒeÅ¡tina', 'cs_CZ.php','cs', 'cs','czech'), + 'de_DE' => array('Deutsch', 'de_DE.php','de', 'de','german'), + 'dk_DK' => array('Dansk', 'dk_DK.php','da', 'da','danish'), + 'en_GB' => array('English', 'en_GB.php','en', 'en','english'), + 'es_AR' => array('Español (Argentina)', 'es_AR.php','es', 'es','spanish'), + 'es_ES' => array('Español (España)', 'es_ES.php','es', 'es','spanish'), + 'es_MX' => array('Español (Mexico)', 'es_MX.php','es', 'es','spanish'), + 'fr_FR' => array('Français', 'fr_FR.php','fr', 'fr','french'), + 'gl_ES' => array('Galego', 'gl_ES.php','es', 'gl','galician'), + 'el_EL' => array('Ελληνικά', 'el_EL.php','el_GR', 'el','greek'), + 'he_HE' => array('עברית', 'he_HE.php','he', 'he','hebrew'), + 'hr_HR' => array('Hrvatski', 'hr_HR.php','hr', 'hr','croatian'), + 'hu_HU' => array('Magyar', 'hu_HU.php','hu', 'hu','hungarian'), + 'it_IT' => array('Italiano', 'it_IT.php','it', 'it','italian'), + 'lv_LV' => array('LatvieÅ¡u', 'lv_LV.php','lv', 'lv','latvian'), + 'lt_LT' => array('Lietuvių', 'lt_LT.php','lt', 'lt','lithuanian'), + 'nl_NL' => array('Nederlands', 'nl_NL.php','nl', 'nl','dutch'), + 'no_NB' => array('Norsk (BokmÃ¥l)', 'no_NB.php','no_NB', 'nb','norwegian'), + 'no_NN' => array('Norsk (Nynorsk)', 'no_NN.php','no_NN', 'nn','norwegian'), + 'pl_PL' => array('Polski', 'pl_PL.php','pl', 'pl','polish'), + 'pt_PT' => array('Português', 'pt_PT.php','pt', 'pt','portuguese'), + 'pt_BR' => array('Português do Brasil', 'pt_BR.php','pt_BR', 'pt','brazilian portuguese'), + 'ro_RO' => array('Română', 'ro_RO.php','ro', 'en','romanian'), + 'ru_RU' => array('PуÑÑкий', 'ru_RU.php','ru', 'ru','russian'), + 'sk_SK' => array('SlovenÄina', 'sk_SK.php','sk', 'sk','slovak'), + 'sl_SI' => array('SlovenÅ¡Äina', 'sl_SI.php','sl', 'sl','slovenian slovene'), + 'sv_SE' => array('Svenska', 'sv_SE.php','sv_SE', 'sv','swedish'), + 'tr_TR' => array('Türkçe', 'tr_TR.php','tr', 'tr','turkish'), + 'ua_UA' => array('УкраїнÑька', 'ua_UA.php','ukr', 'en','ukrainian'), + 'ja_JP' => array('日本語', 'ja_JP.php','ja', 'ja','japanese'), + 'zh_CN' => array('简体中文', 'zh_CN.php','zh_CN', 'zh','simplified chinese'), + 'zh_TW' => array('ç¹é«”中文', 'zh_TW.php','zh_TW', 'zh','traditional chinese'),); + +// Init to store glpi itemtype / tables link +$CFG_GLPI['glpitables']=array(); + +define("NOT_AVAILABLE",'N/A'); + + +// TIMES +define("MINUTE_TIMESTAMP",60); +define("HOUR_TIMESTAMP",3600); +define("DAY_TIMESTAMP",86400); +define("WEEK_TIMESTAMP",604800); +define("MONTH_TIMESTAMP",2592000); + +//Empty value displayed in a dropdown +define("DROPDOWN_EMPTY_VALUE","-----"); + +// ITEMS TYPE +/// Temporary definition for test +// TODO clean it. +if (!strstr($_SERVER['PHP_SELF'],"/install/")) { + define("GENERAL_TYPE",''); + define("COMPUTER_TYPE",'Computer'); + define("NETWORKING_TYPE",'NetworkEquipment'); + define("PRINTER_TYPE",'Printer'); + define("MONITOR_TYPE",'Monitor'); + define("PERIPHERAL_TYPE",'Peripheral'); + define("SOFTWARE_TYPE",'Software'); + define("CONTACT_TYPE",'Contact'); + define("ENTERPRISE_TYPE",'Supplier'); + define("INFOCOM_TYPE",'Infocom'); + define("CONTRACT_TYPE",'Contract'); + define("CARTRIDGEITEM_TYPE",'CartridgeItem'); + define("TYPEDOC_TYPE",'DocumentType'); + define("DOCUMENT_TYPE",'Document'); + define("KNOWBASE_TYPE",'KnowbaseItem'); + define("USER_TYPE",'User'); + define("TRACKING_TYPE",'Ticket'); + define("CONSUMABLEITEM_TYPE",'ConsumableItem'); + define("CONSUMABLE_TYPE",'Consumable'); + define("CARTRIDGE_TYPE",'Cartridge'); + define("SOFTWARELICENSE_TYPE",'SoftwareLicense'); + define("LINK_TYPE",'Link'); + define("STATE_TYPE",'State'); + define("PHONE_TYPE",'Phone'); + define("DEVICE_TYPE",'Device'); + define("REMINDER_TYPE",'Reminder'); + define("STAT_TYPE",'Stat'); + define("GROUP_TYPE",'Group'); + define("ENTITY_TYPE",'Entity'); + define("RESERVATION_TYPE",'ReservationItem'); + define("AUTHMAIL_TYPE",'AuthMail'); + define("AUTHLDAP_TYPE",'AuthLDAP'); + define("OCSNG_TYPE",'OcsServer'); + define("REGISTRY_TYPE",'RegistryKey'); + define("PROFILE_TYPE",'Profile'); + define("MAILGATE_TYPE",'MailCollector'); + define("RULE_TYPE",'Rule'); + define("TRANSFER_TYPE",'Transfer'); + define("BOOKMARK_TYPE",'Bookmark'); + define("SOFTWAREVERSION_TYPE",'SoftwareVersion'); + define("PLUGIN_TYPE",'Plugin'); + define("COMPUTERDISK_TYPE",'ComputerDisk'); + define("NETWORKING_PORT_TYPE",'NetworkPort'); + define("FOLLOWUP_TYPE",'TicketFollowup'); + define("BUDGET_TYPE",'Budget'); +} + + +// GLPI MODE +define("NORMAL_MODE",0); +define("TRANSLATION_MODE",1); +define("DEBUG_MODE",2); + + +// DEVICE INTERNAL ACTION +define("HISTORY_ADD_DEVICE",1); +define("HISTORY_UPDATE_DEVICE",2); +define("HISTORY_DELETE_DEVICE",3); +define("HISTORY_INSTALL_SOFTWARE",4); +define("HISTORY_UNINSTALL_SOFTWARE",5); +define("HISTORY_DISCONNECT_DEVICE",6); +define("HISTORY_CONNECT_DEVICE",7); +define("HISTORY_OCS_IMPORT",8); +define("HISTORY_OCS_DELETE",9); +define("HISTORY_OCS_IDCHANGED",10); +define("HISTORY_OCS_LINK",11); +define("HISTORY_LOG_SIMPLE_MESSAGE",12); +define("HISTORY_DELETE_ITEM",13); +define("HISTORY_RESTORE_ITEM",14); +define("HISTORY_ADD_RELATION",15); +define("HISTORY_DEL_RELATION",16); +define("HISTORY_ADD_SUBITEM",17); +define("HISTORY_UPDATE_SUBITEM",18); +define("HISTORY_DELETE_SUBITEM",19); + +// EXPORT TYPE +define("GLOBAL_SEARCH",-1); +define("HTML_OUTPUT",0); +define("SYLK_OUTPUT",1); +define("PDF_OUTPUT_LANDSCAPE",2); +define("CSV_OUTPUT",3); +define("PDF_OUTPUT_PORTRAIT",4); + + +// HELPDESK LINK HARDWARE DEFINITION : CHECKSUM SYSTEM : BOTH=1*2^0+1*2^1=3 +define("HELPDESK_MY_HARDWARE",0); +define("HELPDESK_ALL_HARDWARE",1); + +// NAME FIRSTNAME ORDER TYPE +define("REALNAME_BEFORE",0); +define("FIRSTNAME_BEFORE",1); + + +// Default number of items displayed in global search +define("GLOBAL_SEARCH_DISPLAY_COUNT",10); + + +//Mail send methods +define("MAIL_MAIL",0); +define("MAIL_SMTP",1); +define("MAIL_SMTPSSL",2); +define("MAIL_SMTPTLS",3); + + +// MESSAGE TYPE +define("INFO",0); +define("ERROR",1); + +//Bookmark types +define("BOOKMARK_SEARCH",1); //SEARCH SYSTEM bookmark + + + +$CFG_GLPI["state_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Phone'); + +$CFG_GLPI["doc_types"]= array('Budget', 'CartridgeItem', 'ConsumableItem', 'Contact' ,'Contract', 'Computer', + 'Entity', 'NetworkEquipment', 'Monitor', 'Peripheral', 'Phone', + 'Printer', 'Software', 'SoftwareLicense', 'Supplier', 'Ticket'); + +$CFG_GLPI["contract_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software', 'Phone'); + +$CFG_GLPI["infocom_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software', 'CartridgeItem', + 'ConsumableItem', 'Consumable', 'Cartridge', 'Phone', + 'SoftwareLicense'); + +$CFG_GLPI["reservation_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software','Phone'); + +$CFG_GLPI["linkuser_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software', 'Phone'); + +$CFG_GLPI["linkgroup_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software', 'Phone'); + +$CFG_GLPI["helpdesk_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software', 'Phone'); + +$CFG_GLPI["link_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Monitor', + 'Peripheral', 'Software', 'Contact', 'Supplier', + 'Contract', 'CartridgeItem', 'ConsumableItem', 'Phone', + 'Budget'); + +$CFG_GLPI["dictionnary_types"] = array('ComputerModel','ComputerType','MonitorModel','MonitorType', + 'PhoneModel','PhoneType','PrinterModel','PrinterType', + 'PeripheralModel','PeripheralType','NetworkEquipmentModel', + 'NetworkEquipmentType','Software','Manufacturer', + 'OperatingSystem','OperatingSystemServicePack', + 'OperatingSystemVersion'); + +$CFG_GLPI["helpdesk_visible_types"] = array('Software'); + +$CFG_GLPI["netport_types"] = array('Computer', 'NetworkEquipment', 'Printer', 'Peripheral', + 'Phone'); + +$CFG_GLPI["massiveaction_noupdate_types"] = array('Entity', 'OcsServer', + 'Profile','TicketValidation'); + +$CFG_GLPI["massiveaction_nodelete_types"] = array('Entity', 'CronTask', 'NotImportedEmail'); + +$CFG_GLPI["notificationtemplates_types"] = array('Ticket', 'Reservation', 'Cartridge', + 'Consumable', 'DBConnection', 'Contract', + 'SoftwareLicense', 'Infocom'); + +$CFG_GLPI["notificationmethods_types"] = array('NotificationMail'); + +$CFG_GLPI["union_search_type"] = array('ReservationItem'=>"reservation_types", + 'States'=>"state_types"); + +$CFG_GLPI["systeminformations_types"] = array ('DBConnection','Plugin','AuthLDAP', + 'MailCollector','OcsServer'); + +// New config options which can be missing during migration +$CFG_GLPI["number_format"]=0; +$CFG_GLPI["decimal_number"]=2; +$CFG_GLPI["csv_export_delimiter"]=';'; + +// Default debug options : may be locally overriden +$CFG_GLPI["debug_sql"]=$CFG_GLPI["debug_vars"]=$CFG_GLPI["debug_lang"]=1; + + +// User Prefs fields which override $CFG_GLPI config +$CFG_GLPI['user_pref_field'] = array('date_format','default_requesttypes_id','dropdown_chars_limit', + 'followup_private','task_private','is_categorized_soft_expanded','is_ids_visible', + 'is_not_categorized_soft_expanded','language','list_limit','number_format','priority_1', + 'priority_2','priority_3','priority_4','priority_5','priority_6', + 'show_jobs_at_login','use_flat_dropdowntree'); + +?> diff --git a/0.78-bugfixes/css/ext-all-glpi.css b/0.78-bugfixes/css/ext-all-glpi.css new file mode 100644 index 0000000000000000000000000000000000000000..7619b9788fcd949f21c9cdf56cfca68aacd8d2a3 --- /dev/null +++ b/0.78-bugfixes/css/ext-all-glpi.css @@ -0,0 +1,286 @@ + +# X-tab-panel + +.x-tab-panel{overflow:hidden;} +.x-tab-panel-header,.x-tab-panel-footer{background:#deecfd;border:1px solid #eeeeee;overflow:hidden;zoom:1;} +.x-tab-panel-header{border:1px solid #eeeeee;padding-bottom:2px;} +.x-tab-panel-footer{border:1px solid #eeeeee;padding-top:2px;} +.x-tab-strip-wrap{width:100%;overflow:hidden;position:relative;zoom:1;} +ul.x-tab-strip{display:block;width:5000px;zoom:1;} +ul.x-tab-strip-top{padding-top:1px;background:url(../pics/extjs/tabs/tab-strip-bg.gif) #cedff5 repeat-x bottom;border-bottom:1px solid #eeeeee;} +ul.x-tab-strip-bottom{padding-bottom:1px;background:url(../pics/extjs/tabs/tab-strip-btm-bg.gif) #cedff5 repeat-x top;border-top:1px solid #eeeeee;border-bottom:0 none;} +.x-tab-panel-header-plain .x-tab-strip-top{background:transparent!important;padding-top:0!important;} +.x-tab-panel-header-plain{background:transparent!important;border-width:0!important;padding-bottom:0!important;} +.x-tab-panel-header-plain .x-tab-strip-spacer{border:1px solid #eeeeee;border-top:0 none;height:0px;background:#eeeeee;font-size:1px;line-height:0px;} +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer{height:3px;} +ul.x-tab-strip li{float:left;margin-left:2px;} +ul.x-tab-strip li.x-tab-edge{float:left;margin:0!important;padding:0!important;border:0 none!important;font-size:1px!important;line-height:1px!important;overflow:hidden;zoom:1;background:transparent!important;width:1px;} +.x-tab-strip a,.x-tab-strip span,.x-tab-strip em{display:block;} +.x-tab-strip a{text-decoration:none!important;-moz-outline:none;outline:none;cursor:pointer;} +.x-tab-strip-inner{overflow:hidden;text-overflow:ellipsis;} +.x-tab-strip span.x-tab-strip-text{font:normal 11px Verdana,Arial,Helvetica,sans-serif;color:#659900;white-space:nowrap;cursor:pointer;padding:4px 0;} +.x-tab-strip .x-tab-with-icon .x-tab-right{padding-left:6px;} +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text{padding-left:20px;background-position:0 3px;background-repeat:no-repeat;} +.x-tab-strip-over span.x-tab-strip-text{color:#659900;} +.x-tab-strip-active{cursor:default;} +.x-tab-strip-active span.x-tab-strip-text{cursor:default;color:#659900;font-weight:bold;} +.x-tab-strip-disabled .x-tabs-text{cursor:default;color:#aaa;} +.x-tab-panel-body{overflow:hidden;} +.x-tab-panel-bwrap{overflow:hidden;} +.ext-ie .x-tab-strip .x-tab-right{position:relative;} +.x-tab-strip-top .x-tab-strip-active .x-tab-right{margin-bottom:-1px;} +.x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text{padding-bottom:5px;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{margin-top:-1px;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right span.x-tab-strip-text{padding-top:5px;} +.x-tab-strip-top .x-tab-right{background:transparent url(../pics/extjs/tabs/tabs-sprite.gif) no-repeat 0 -51px;padding-left:10px;} +.x-tab-strip-top .x-tab-left{background:transparent url(../pics/extjs/tabs/tabs-sprite.gif) no-repeat right -351px;padding-right:10px;} +.x-tab-strip-top .x-tab-strip-inner{background:transparent url(../pics/extjs/tabs/tabs-sprite.gif) repeat-x 0 -201px;} +.x-tab-strip-top .x-tab-strip-over .x-tab-right{background-position:0 -101px;} +.x-tab-strip-top .x-tab-strip-over .x-tab-left{background-position:right -401px;} +.x-tab-strip-top .x-tab-strip-over .x-tab-strip-inner{background-position:0 -251px;} +.x-tab-strip-top .x-tab-strip-active .x-tab-right{background-position:0 0;} +.x-tab-strip-top .x-tab-strip-active .x-tab-left{background-position:right -301px;} +.x-tab-strip-top .x-tab-strip-active .x-tab-strip-inner{background-position:0 -151px;} +.x-tab-strip-bottom .x-tab-right{background:url(../pics/extjs/tabs/tab-btm-inactive-right-bg.gif) no-repeat bottom right;} +.x-tab-strip-bottom .x-tab-left{background:url(../pics/extjs/tabs/tab-btm-inactive-left-bg.gif) no-repeat bottom left;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-right{background:url(../pics/extjs/tabs/tab-btm-right-bg.gif) no-repeat bottom left;} +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left{background:url(../pics/extjs/tabs/tab-btm-left-bg.gif) no-repeat bottom right;} +.x-tab-strip-bottom .x-tab-left{padding:0 10px;} +.x-tab-strip-bottom .x-tab-right{padding:0;} +.x-tab-strip .x-tab-strip-close{display:none;} +.x-tab-strip-closable{position:relative;} +.x-tab-strip-closable .x-tab-left{padding-right:19px;} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close{background-image:url(../pics/extjs/tabs/tab-close.gif);opacity:.6;-moz-opacity:.6;background-repeat:no-repeat;display:block;width:11px;height:11px;position:absolute;top:3px;right:3px;cursor:pointer;z-index:2;} +.x-tab-strip .x-tab-strip-active a.x-tab-strip-close{opacity:.8;-moz-opacity:.8;} +.x-tab-strip .x-tab-strip-closable a.x-tab-strip-close:hover{background-image:url(../pics/extjs/tabs/tab-close.gif);opacity:1;-moz-opacity:1;} +.x-tab-panel-body{border:1px solid #eeeeee;background:#fff;} +.x-tab-panel-body-top{border-top:0 none;} +.x-tab-panel-body-bottom{border-bottom:0 none;} +.x-tab-scroller-left{background:transparent url(../pics/extjs/tabs/scroll-left.gif) no-repeat -18px 0;border-bottom:1px solid #8db2e3;width:18px;position:absolute;left:0;top:0;z-index:10;cursor:pointer;} +.x-tab-scroller-left-over{background-position:0 0;} +.x-tab-scroller-left-disabled{background-position:-18px 0;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);cursor:default;} +.x-tab-scroller-right{background:transparent url(../pics/extjs/tabs/scroll-right.gif) no-repeat 0 0;border-bottom:1px solid #8db2e3;width:18px;position:absolute;right:0;top:0;z-index:10;cursor:pointer;} +.x-tab-scroller-right-over{background-position:-18px 0;} +.x-tab-scroller-right-disabled{background-position:0 0;opacity:.5;-moz-opacity:.5;filter:alpha(opacity=50);cursor:default;} +.x-tab-scrolling .x-tab-strip-wrap{margin-left:18px;margin-right:18px;} +.x-tab-scrolling{position:relative;} +.x-tab-panel-bbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} +.x-tab-panel-tbar .x-toolbar{border:1px solid #99bbe8;border-top:0 none;overflow:hidden;padding:2px;} + +.x-form-text,textarea.x-form-field{padding:1px 1px;background:#fff;border: 1px solid #888888;background-color:#FAFAFA;} + +# X-window + + + +/* Window */ + + + +.x-window-proxy { + + background:#e0e0e0; + + border-color:#b0b0b0; + +} + + + +.x-window-tl .x-window-header { + + color:#555; + +} + +.x-window-tc { + + background-image:url(../pics/extjs/window/top-bottom.png); + +} + +.x-window-tl { + + background-image:url(../pics/extjs/window/left-corners.png); + +} + +.x-window-tr { + + background-image:url(../pics/extjs/window/right-corners.png); + +} + +.x-window-bc { + + background-image:url(../pics/extjs/window/top-bottom.png); + +} + +.x-window-bl { + + background-image:url(../pics/extjs/window/left-corners.png); + +} + +.x-window-br { + + background-image:url(../pics/extjs/window/right-corners.png); + +} + +.x-window-mc { + + border:1px solid #d0d0d0; + + background:#e8e8e8; + +} + + + +.x-window-ml { + + background-image:url(../pics/extjs/window/left-right.png); + +} + +.x-window-mr { + + background-image:url(../pics/extjs/window/left-right.png); + +} + +.x-panel-ghost .x-window-tl { + + border-color:#d0d0d0; + +} + +.x-panel-collapsed .x-window-tl { + + border-color:#d0d0d0; + +} + + + +.x-window-plain .x-window-mc { + + background: #e8e8e8; + + border-right:1px solid #eee; + + border-bottom:1px solid #eee; + + border-top:1px solid #d0d0d0; + + border-left:1px solid #d0d0d0; + +} + + + +.x-window-plain .x-window-body { + + border-left:1px solid #eee; + + border-top:1px solid #eee; + + border-bottom:1px solid #d0d0d0; + + border-right:1px solid #d0d0d0; + + background:transparent !important; + +} + + + +body.x-body-masked .x-window-mc, body.x-body-masked .x-window-plain .x-window-mc { + + background-color: #e4e4e4; + +} + +/* Tools */ + +.x-tool { + + background-image:url(../pics/extjs/panel/tool-sprites.gif); + +} + +.loading-indicator-ie{ +/*font-size:11px;*/ +background-image:url(../lib/extjs/resources/images/default/grid/loading.gif); +background-repeat:no-repeat; +background-position:left; +padding-left:20px; +/*line-height:16px;*/ +margin:3px; +} + +/* strong is not normal */ +strong{font-weight:bolder;} + +/* X panel */ +/* Allow class overlink to function grr */ + + +.x-panel-body { + overflow:visible; +} + +.x-panel-bwrap { +overflow:visible; +} + + +/* Correct for date picker */ +.ext-ie .x-menu{overflow:visible;} + +/* Correct for kb */ +#kbanswer em { + font-style: italic; +} + +/* Tooltip */ +.x-tip .x-tip-close{ + background-image: url(../pics/extjs/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../pics/extjs/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../pics/extjs/qtip/tip-anchor-sprite.gif); +} diff --git a/0.78-bugfixes/css/nothing.gif b/0.78-bugfixes/css/nothing.gif new file mode 100644 index 0000000000000000000000000000000000000000..73130b9919664ec9d423accc4952083c2cfbddef Binary files /dev/null and b/0.78-bugfixes/css/nothing.gif differ diff --git a/0.78-bugfixes/css/print.css b/0.78-bugfixes/css/print.css new file mode 100644 index 0000000000000000000000000000000000000000..e337531a2f3988c7851379d3ab762a940f3769ad --- /dev/null +++ b/0.78-bugfixes/css/print.css @@ -0,0 +1,1495 @@ +/* + * @version $Id$ + ------------------------------------------------------------------------- + GLPI - Gestionnaire Libre de Parc Informatique + Copyright (C) 2003-2010 by the INDEPNET Development Team. + + http://indepnet.net/ http://glpi-project.org + ------------------------------------------------------------------------- + + LICENSE + + This file is part of GLPI. + + GLPI 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 2 of the License, or + (at your option) any later version. + + GLPI 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 GLPI; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -------------------------------------------------------------------------- +*/ + +/* ################--------------- GLPI CSS style ---------------#################### */ + + + + +/* ################--------------- Default style ---------------#################### */ + +body{ + font-family: 'Bitstream Vera Sans', arial, Tahoma, 'Sans serif'; + font-size: 12px; + margin: 0; + padding: 0; + background: white; +} + +ul, li, dt, dl, dd, form,img, input{ + margin: 0; + padding: 0; +} + +ul { +list-style-type: none; + +} + + + + +span.invisible{ + visibility: hidden; +} + +/* separateur pour rétablir les comportements de block */ +div.sep{ + font-size: 1px; + height: 1px; + padding: 0; + margin: 0; + clear: both; +} + +img{ + border: 0; +} + +small{ + font-family: verdana; + font-size: 10px; + +} + + +.b{ font-weight: bold;} + +.center{ text-align:center;} +.left{ text-align:left;} +.right{ text-align:right;} + +.center-h{margin:auto;} +.middle {vertical-align:middle;} +.bottom {vertical-align:bottom;} +.top {vertical-align:top;} +.relative {position: relative;} + + +.red { color:red;} +.blue {color:blue;} +.green {color:green;} + +.deleted {background-color:#cf9b9b;} + +.separ { + clear: both; + visibility: hidden; +} + +a, a:link { + font-weight: bold; + text-decoration: none; + color : #659900; + font-size : 11px; +} + +a:hover{ + color: black; +} + + +hr{ + border: 1px solid #cccccc; +} + + + +/* Over link div */ +.over_link { + display: none; + position: absolute; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + padding: 5px; + max-width: 350px; + font-size: 11px; + text-align: left; + z-index:1000; +} + + +.pointer {cursor:pointer;} + +/* ################--------------- Page ---------------#################### */ + +#page {margin: 0 auto; text-align:center;} + +#page form {font-size: 12px; + margin:0; + margin-bottom:5px; + padding:0; + +} + +#page { + margin-top:25px; + } + + +/* ################--------------- form ---------------#################### */ + + +option { + border:1px solid #ccc; + background-color:#ffffff; + +} + +.submit { text-align:center;} + +select { + font-size: 11px; + border: 1px solid #888888; + color: black; + background-color: white; +} + + +textarea, input { + background-color:#FAFAFA; + color: black; + border: 1px solid #888888; + font-size: 11px; +} + +input.submit { + font-size: 11px; + border: 1px solid #888888; + background-color:#eeeeee; + cursor:pointer; + background: url("../pics/fond_form.png") repeat-x; + } + +input.submit:hover { + border: 1px inset #888888; + background-color:#ffffff; + background: url("../pics/fond_form_on.png") repeat-x; + } + + +.entity_select { + border-left: 1px solid #C0CAD4; + border-right: 1px solid#C0CAD4; + padding:3px; + } + +.entity_select:hover { + border-left: 1px solid #C0CAD4; + border-right: 1px solid #C0CAD4; + border-bottom: 1px solid #C0CAD4; + padding:3px; + } + +.tree { + width:100%; + border:0; + border-bottom:1px solid #C0CAD4; +} + +.treeroot { + width:100%; + background: url("../pics/treeroot.png") 0 2px no-repeat; + border:0; + /*margin-top:5px;*/ + font-weight:bold; +} + +.tree:hover{ + background-color:#eeeeee; +} + +.treeroot:hover{ + background-color:#eeeeee; +} + +.button { + border: 1px solid #888888; + background-color:#eeeeee; + cursor:pointer; + background: url("../pics/fond_form.png") repeat-x; + } + +.button:hover{ + border: 1px inset #888888; + background-color:#ffffff; + background: url("../pics/fond_form_on.png") repeat-x; + } + + + + + + +/* ################--------------- Table ---------------#################### */ +table { + font-size: 11px; + /* Probem WIth EXTJS calendar -> to sons*/ + /*margin: 0 auto;*/ + border:0; +} + +th { } + + +td { } + +.tab_glpi { + margin: 0 auto; +} + +.tab_cadre{ + margin: 0 auto; + -moz-border-radius: 4px; + border: 1px solid #cccccc; + z-index:1; + text-align: left; + font-size: 11px; + background-color: #ffffff; + +} + +.tab_cadre_central{ + margin: 0 auto; + -moz-border-radius: 4px; + border: 1px solid #bbbbbb; + z-index:1; + text-align: left; + font-size: 11px; + width:95%; + /* background-color: #FFF4DF; */ + background : url("../pics/fond-central.png") repeat-x top right ; +} + + +.tab_cadre_navigation { + margin: 0 auto; + padding: 4px; + margin: 1px; + border: 1px solid #aaaaaa; + background-color: #ffffff; + -moz-border-radius: 5px; + font-size : 12px; + font-weight: bold; + +} + +.tab_cadre_fixe, .tab_cadre_fixehov{ + margin: 0 auto; + -moz-border-radius: 4px; + border: 1px solid #cccccc; + z-index:1; + text-align: left; + font-size: 11px; + width:95%; +} + + + +.tab_cadrehov, .tab_cadrehov_pointer{ + margin: 0 auto; + -moz-border-radius: 4px; + border: 1px solid #cccccc; + text-align: left; + font-size: 11px; + width: 95%; + background-color: #ffffff; + +} + +.tab_cadre_report { + margin: 0 auto; + -moz-border-radius: 4px; + border: 1px solid #cccccc; + z-index:1; + text-align: left; + font-size: 11px; + text-align: center; + width:95%; +} + +.tab_cadre th, .tab_cadre_fixe th, .tab_cadre_fixehov th, .tab_cadrehov th, .tab_cadrehov_pointer th , .tab_cadre_report th { + font-size: 11px; + font-weight: bold; + background-color: #fccc6f; + text-align: center; + background: url("../pics/fond_th.png") repeat-x; + border-bottom:1px solid #cccccc; +} + +.tab_cadre td, .tab_cadre_fixe td, .tab_cadre_fixehov td, .tab_cadrehov td, .tab_cadrehov_pointer td , .tab_cadre_report td { + padding-left: 5px; +} + +.tab_cadrehov tr:hover, .tab_cadre_fixehov tr:hover { + + background-color: #FFF4DF; +} + +.tab_cadrehov_pointer tr:hover { + cursor: pointer; + background-color: #FFF4DF; +} + +/* Ajout pour IE */ +.tab_cadrehov_pointer tr { + cursor: pointer; +} + +.tab_bg_1 { + background-color: #f2f2f2; + +} +.tab_bg_1_2 { + background-color: #cf9b9b; + +} + +.tab_bg_2 { + background-color: #e4e4e2; + +} + +.tab_bg_2_2 { + background-color: #cf9b9b; + +} + +.tab_bg_3 { +/*background-color: #eeeeee;*/ + background-color: #e7e7e2; +} + +.tab_bg_4 { + background-color: silver; +} + +.tab_bg_5 { + background-color: #f2f2f2; +} + + +.tab_find { + background-color: #ccccc7; +} + + +.tab_find:hover { + background-color:#FFF2C2; + cursor:pointer; +} + +.tab_resa { + border:1px dashed #cccccc; + background-color: #d7d7d2; + font-size:10px +} + +.tab_resa:hover { + + background-color: #ffffff; + border:1px dotted #000000; + + +} + +/* ################--------------- Pager ---------------#################### */ + +.tab_cadre_pager{ + margin: 0 auto; + text-align:center; + -moz-border-radius: 4px; + border: 1px solid #cccccc; + font-size:10px; + width:95%; +} + + +.tab_cadre_pager select, .tab_cadre_pager span, .tab_cadre_pager form { + font-size:10px; + margin:0; +} + +.tab_cadre_pager input { + vertical-align:middle; +} + + +.tab_cadre_pager th { + font-size: 10px; + font-weight: bold; + background-color: #fccc6f; + text-align: center; + background: url("../pics/fond_th.png") repeat-x; +} + + + +/* ################--------------- Bouton navigation ---------------#################### */ +/* (obsolète mais encore utilisés) */ + +.icon_consol_hov, .icon_consol{ + font-family: "Trebuchet MS", Tahoma, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight: bold; + padding: 4px; + padding-right: 8px; + margin: 1px; + border: 1px solid #aaaaaa; + background-color: #e4e4e4; + background: url("../pics/fond_ico_cons.png") repeat-x; + -moz-border-radius: 5px; + +} + + +.icon_consol_hov img{ + padding-bottom: 10px; +} + +.icon_consol_hov:hover { + padding: 4px; + padding-right: 8px; + margin: 1px; + border: 1px inset #888888; + background-color: white; + background: url("../pics/fond_ico_cons_on.png") repeat-x; + -moz-border-radius: 5px; +} + +/* ################--------------- Autocompletion ---------------#################### */ + +ul.autocomp { + list-style-type: none; + margin:0; + margin-left:3px; + padding:3px; + text-align:left; +} + +ul.autocomp li.selected { background-color: #FFF6CF; } + + li.auto_comp { + list-style-type: none; + display:block; + margin:0; + padding:2px; + height:16px; +} + + + + +/* ################--------------- Tracking / Reminder ---------------#################### */ +.tracking { + width:100%; + height:100%; + cursor:pointer; +} + +.tracking:hover { + background-color: #FFF4DF; + +} + + +.tracking_hour{ + font-family: verdana; + font-size: 10px; +} + +.tracking_bold { +font-weight: bold; +} + +.ldap_right, .reminder_right{ + position:absolute; +right:0; + margin-right:5px; +font-size:10px;} + +.showplan { +font-weight: bold; +text-decoration: none; +color : #659900; +cursor:pointer; +} + +.tracking_small{ + font-size:10px; +} + +.reminder_list{ +text-align:left; +margin-left:8px;} + +/* ################--------------- Calendrier / reservation ---------------#################### */ + +.calendrier{ + border: 1px solid #888888; + background-color:#eeeeee; + vertical-align:middle; + background: url("../pics/fond_form.png") repeat-x; + } + +.calendrier:hover{ + border: 1px inset #888888; + background-color:#ffffff; + cursor:pointer; + } + +.calendrier_mois { font-family: Verdana, Arial, Sans, sans-serif; font-size: 10px; } + +.calendrier_jour {font-family: arial,helvetica,sans-serif; font-size: 14px; color: black;} + +.calendrier_case1 { + margin-left: 10px; + padding: 2px; + -moz-border-radius: 5px; + margin-top: 2px; + border: 1px solid #666666; + background-color: white; +} + +.calendrier_case2{ + margin-left: 10px; + padding: 2px; + -moz-border-radius: 5px; + margin-top: 2px; + border: 1px solid #cccccc; + background-color: #eeeeee + +} + +.calendrier_case_white{ +background-color:#ffffff; +} + +/* ################--------------- Knowledge FAQ ---------------#################### */ +#contenukb { + height: 100%; + width: 600px; + margin: 0 auto; + } + +#contenukb legend { + font-weight: bold; +} + +#contenukb fieldset { + background-color: #eeeeee; + border: 1px solid #FFC65D; + -moz-border-radius: 8px; + padding-bottom:10px; + width: 600px; +} + +#contenukb textarea { + width:550px; +} + +#kbanswer ul { +padding-left: 15px; + +} + +.tdkb_result{ + vertical-align:top; + text-align:left; + width: 33%; + padding: 3px 20px 3px 25px; +} + +.kb { +text-align:left; +padding-top:5px; + +} + + +.kb_resume{ + text-align:left; + font-size: 9px; + line-height: 10px; + clear: both; + padding: 5px 0 10px 25px; + +} + + +.tdkb{ +text-align:left; +font-size:10px; +color:#aaaaaa; + +} + +.baskb { +position: relative; + text-align:left; +font-size:10px; + color:#aaaaaa; +} + +.baskb_right{ + position:absolute; right:0; margin-right:5px;} + + +.code { + width: 95%; + border: dotted 2px #ccc; + } + +a.knowbase { + font-size: 13px; + margin-left:8px; + } + +a.pubfaq { + font-size: 13px; + margin-left:8px; + color: #c9993C; + } + + +a.pubfaq:hover { + color: black; +} + + + + +a.icon_nav_move img { + padding: 4px; + margin: 1px; + border: 1px solid #aaaaaa; + background-color: #ffffff; + -moz-border-radius: 5px; +} + +a.icon_nav_move:hover img { + padding: 4px; + margin: 1px; + border: 1px solid #999999; + background-color:#e4e4e4; + -moz-border-radius: 5px; +} + + +/* ################--------------- planning ---------------#################### */ + +.planning { + text-align:center; + border:1px dashed #cccccc; + background-color: #d7d7d2; + font-size:9px; + +} + +.planing:hover { + border: 1px solid #999999; + background-color: white; + +} + + +/* ################--------------- Onglet ---------------#################### */ + + +div#menu_navigate{ + margin: 0 auto; + z-index:1; + font-size: 10px; + width:950px; +} + +div#menu_navigate li { +margin-left:2px; +display:block; +float:left; +padding:2px; +} + + + + +#barre_onglets { + + width:950px; + margin-left: auto; + margin-right: auto; + margin-bottom:0; + padding-bottom:0; +} + +#barre_onglets_percent { + + width:80%; + margin-left: auto; + margin-right: auto; + margin-bottom:0; + padding-bottom:0; +} + +ul#onglet { + list-style-type: none; + padding-bottom: 24px; + border-bottom: 1px solid #ffffff; + margin: 0; + padding-left:0; +} + +ul#onglet li { + + float: left; + height: 21px; + background-color: #eeeeee; + margin: 2px 2px 0 1px; + border: 1px solid #CC9900; + border-bottom: 1px solid #fff; + -moz-border-radius: 4px; + background: url("../pics/fond_onglet.png") repeat-x; +} + +ul#onglet li.actif { + border-bottom: 1px ridge #659900; + background-color: #fff; +} + +ul#onglet li.invisible { + border-bottom: 1px solid #fff; + border: 1px solid #fff; + background-color: #ffffff; + width: 15px; + background: transparent; +} + +ul#onglet li.actif a { + color: #000; +} + +#onglet a { + float: left; + display: block; + color: #666; + text-decoration: none; + padding: 3px; + font-size: 10px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-weight: bold; +} + +#onglet a:hover { + color : #659900; + +} + +ul#onglet span.fake{ + float: left; + display: block; + color: #666; + text-decoration: none; + padding: 3px; + font-size: 10px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-weight: bold; + cursor:pointer; + +} + + + +/* Over onglet div */ +#onglet_plugins{ + display: none; + position: absolute; + top:21px; + left:-20px; + padding: 5px; + font-size: 8px; + width:100px; + background: transparent url("../pics/fd_hoverlink.png") repeat; + border: 1px solid gray; + -moz-border-radius: 5px; +} + + #onglet_plugins dl{ + margin: 0; + padding: 0; + list-style-type: none; + border:0; + +} + +#onglet_plugins dt { + text-align: center; + padding: 2px; + background:none; + border:0; + width:100%; + height:18px; + +} +#onglet_plugins dt a { + font-size:10px; + color: #000; + text-decoration: none; + display: block; + border: 0 none; +} +#onglet_plugins dt a:hover { + color: #000; + background: #fccc6f; + +} + + +#onglet_plugins dt:hover { + color: #000; + background: #fccc6f; + +} + +/* ################--------------- box (redirect and other) ---------------#################### */ +.box {margin: 0 auto; width:700px; text-align:center;} +.box-tleft{background:transparent url(../pics/corners.gif) no-repeat 0 0;zoom:1;} +.box-tcenter{height:8px;background:transparent url(../pics/tb.gif) repeat-x 0 0;overflow:hidden;} +.box-tright{background:transparent url(../pics/corners.gif) no-repeat right -8px;} +.box-mleft{background:transparent url(../pics/l.gif) repeat-y 0;padding-left:4px;overflow:hidden;zoom:1;} +.box-mcenter{background:#eee url(../pics/tb.gif) repeat-x 0 -16px;padding:4px 10px;font-family:"Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;color:#393939;font-size:11px;} +.box-mcenter h3{font-size:11px;font-weight:bold;margin:0 0 4px 0;zoom:1;} +.box-mright{background:transparent url(../pics/r.gif) repeat-y right;padding-right:4px;overflow:hidden;} +.box-bleft{background:transparent url(../pics/corners.gif) no-repeat 0 -16px;zoom:1;} +.box-bcenter{background:transparent url(../pics/tb.gif) repeat-x 0 -8px;height:8px;overflow:hidden;} +.box-bright{background:transparent url(../pics/corners.gif) no-repeat right -24px;} +.box-tleft,.box-bleft{padding-left:8px;overflow:hidden;} +.box-tright,.box-bright{padding-right:8px;overflow:hidden;} + + + +/* ################--------------- Login Null Header ---------------#################### */ + +#contenulogin { + height: 266px; + width: 600px; + margin-top:100px; + margin-left: auto; + margin-right: auto; + background:url("../pics/login_glpi.png") no-repeat; + font-family : Verdana,Arial,Helvetica,sans-serif; + font-size : 12px; + color :#659900; + font-weight: bold; +} + +#contenu-nullHeader { + height: 424px; + width: 739px; + margin-top:50px; + margin-left: auto; + margin-right: auto; + background:url("../pics/null-header.png") no-repeat; + +} + + +#text-nullHeader { + float:left; + height: 300px; + width: 739px; + margin-right:auto; + margin-left: auto; + margin-top:100px; +} + + + +#boxlogin { + position:relative; + background-color: transparent; + padding-left: 15px; + padding-top: 76px; + text-align: left; /* Bug IE Grrr */ + height: 190px; + width: 300px; + + +} + +#boxlogin p { + + text-align:center; +} + +.row { + clear: both; + padding-top: 5px; +} + +.label { + float: left; + margin-left:10px; + text-align: left; +} + +.formw { + float: right; + margin-right:10px; + text-align: right; +} + + + +#boxlogin fieldset { + background-color: transparent; + border: 2px solid #FFC65D; + padding-bottom:22px; +} + +#boxlogin legend { + font-family:"Trebuchet MS",Verdana,Geneva,Arial,Helvetica,sans-serif; + font-size: 15px; + font-weight: 700; + background-color: transparent; + color :#659900; +} + + +#boxlogin input { + + border: 1px solid #659900; +} + +#logo-login { + font-size: 11px; + float:right; + height: 160px; + width: 230px; + margin-right:10px; + margin-left:0px; + margin-top:80px; + color :#000000; + overflow: auto; +} + +#logo-login a:hover { + color :#659900; + text-decoration: underline; +} + +#box-faq { + float:right; + margin-right:10px; + +} + +.sous_logo { + font-family: arial; + font-size: 9px; + color: #eeeeee; + text-decoration: none; + } + +.error { + color: red; + margin-top:20px; + text-align:center; +} + +#footer-login +{ + text-align:right; + position: fixed !important; + left: 0px; + right: 10px; + bottom: 0px !important; + height: 40px; + font-size : 10px; + color :#757575; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-weight: bold; + margin-top:10px; + margin:auto; + /*css hack for IE*/ + position: absolute; + bottom: auto; + top: expression((parseInt(document.documentElement.clientHeight)+parseInt(document.documentElement.scrollTop)-42)+'px'); + width: expression(parseInt(document.documentElement.clientWidth)+'px'); + +} + + +/* ################--------------- Header / menu ---------------#################### */ +div#header{ + display : none; + background: url("../pics/fd_nav1.png") 0 0 repeat-x; + margin-bottom:10px; +} + +div#c_preference{ + height: 20px; + text-align: right; + margin-right: 5px; + position: relative; + top: 4px; + font-size: 0.9em; + z-index:900; +} + +div#c_preference ul{ + list-style: none; +} + +div#c_preference ul li{ + float: right; + margin: 0 10px; +} +div#c_preference ul li#deconnexion{ + margin-left: 25px; +} + +div#c_preference a{ + color: #000; + text-decoration: none; + font-size: 0.9em; +} + +div#c_preference a:hover{ + text-decoration: underline; +} + +div#c_recherche{ + height: 21px; + text-align: right; + margin-right: 25px; + position: relative; + top: 5px; + font-size: 0.9em; +} + +div#c_recherche form{ + height: 15px; + position: relative; + bottom: 3px; +} + +div#c_recherche form div#champRecherche input{ + border: 1px solid #000; + height: 14px; + font-family: 'Bitstream Vera Sans', arial, Tahoma, 'Sans serif'; + font-size: 11px; +} + +div#c_recherche form div#boutonRecherche{ + float: right; + border: 1px solid #000; + height: 14px; + width: 14px; + overflow: hidden; +} + +div#c_recherche form div#boutonRecherche input{ + font-family: 'Bitstream Vera Sans', arial, Tahoma, 'Sans serif'; + font-size: 0.7em; + width: 15px; + height: 15px; + border: none; + position: relative; + right: 2px; +} + +div#c_menu{ + height: 41px; + position: absolute; + top: 0px; + z-index: 10; + left: 45px; +} + +div#c_menu ul#menu{ + position: relative; + left: 10px; + top: 23px; + height: 20px; + list-style: none; + float: left; +} + +ul#menu a.itemP, ul#menu a.itemP1{ + display: block; + height: 100%; + width: 100%; + text-align: center; + text-decoration: none; + border-right: 1px solid #9BA563; + color: #000; +} + +ul#menu ul.ssmenu{ + position: relative; + top: 5px; + width: 108px; + border: 1px solid #CC9900; + border-bottom: 0px; + -moz-border-radius: 4px; + background: url("../pics/fd_ssmenu.png") 0 0 repeat; + display: none; +} + +ul#menu ul li{ + list-style: none; + text-align: center; + border-bottom: 1px solid #CC9900; + line-height: 20px; + font-size: 0.9em; +} + +ul#menu ul li a{ + color: #000; + text-decoration: none; + display: block; + width: 100%; + height: 100%; +} + +ul#menu ul li a:hover{ + background: url("../pics/fd_nav2.png") 0 0 repeat; +} + +ul#menu li#menu1{ + float: left; + width: 110px; +} + +ul#menu li#menu1 ul.ssmenu{ + position: relative; + width: 110px; + +} + +ul#menu li#menu2{ + float: left; + width: 110px; +} + +ul#menu li#menu2 ul.ssmenu{ + position: relative; + width: 110px; + +} + +ul#menu li#menu3{ + float: left; + width: 110px; +} + +ul#menu li#menu3 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu4{ + float: left; + width: 110px; +} + +ul#menu li#menu4 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu5{ + float: left; + width: 110px; +} + +ul#menu li#menu5 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu6{ + float: left; + width: 110px; +} + +ul#menu li#menu6 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu7{ + float: left; + width: 110px; +} + +ul#menu li#menu7 ul.ssmenu{ + position: relative; + width: 110px; +} + +div#header div#c_logo{ + position: absolute; + z-index: 1000; + width: 64px; + height: 41px; + float: left; + background: url("../pics/fd_logo.png") 0 0 repeat-x; +} + +div#header div#c_logo a{ + display: block; + width: 100%; + height: 100%; + text-decoration: none; +} + +div#c_ssmenu1{ + background: url("../pics/fd_nav2.png") 0 0 repeat-x; + height: 24px; + clear: both; + font-size: 0.8em; +} + +div#c_ssmenu1 ul{ + position: relative; + top: 4px; + left: 0px; + list-style: none; + +} + +div#c_ssmenu1 ul li{ + float: left; + padding: 0 10px; +} + +div#c_ssmenu1 ul li a{ + text-decoration: none; + color: #666; + +} + +div#c_ssmenu1 ul li a:hover{ + text-decoration: underline; +} + +div#c_ssmenu2{ + position: relative; + z-index: 5; + background: url("../pics/fd_nav3.png") 0 0 repeat-x; + height: 28px; + clear: both; + font-size: 0.9em; + +} +div#c_ssmenu2 ul{ + position: relative; + top: 5px; + left: 0px; + list-style: none; +} + +div#c_ssmenu2 ul li{ + position:relative; + float: left; + padding: 0 10px; +} + +div#c_ssmenu2 ul li a{ + text-decoration: none; + color: #000; +} + +div#c_ssmenu2 a.here{ + font-size:14px; +} + + +div#show_entities{ + display: none; + position: absolute; + top:20px; + left:1px; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + padding: 5px; + font-size: 11px; + text-align: left; + z-index:1000; +} + +div#show_entities_long{ + display: none; + position: absolute; + top:20px; + left:1px; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + padding: 5px; + font-size: 11px; + text-align: left; + z-index:1000; + overflow:scroll; + height:300px; + width:300px; +} + + +div#show_all_menu{ + display: none; + position: absolute; + top:20px; + left:5px; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + padding: 5px; + font-size: 11px; + text-align: left; + z-index:1000; + +} + + +#menu_navigate{ + display:none; +} + +#tabspanel{ + display:none; +} + + +/* ################--------------- Footer ---------------#################### */ +#footer{ + display:none; + background: url("../pics/fd_footer.png") 0 0 repeat-x; + font-size: 9px; + color :#757575; + padding: 3px; + margin-top: 200px; + clear:both; + + } + + + +.copyright { + font-size: 9px; + color :#757575; + } + + +/* ################--------------- DB Slave---------------#################### */ +#dbslave-float { + top: 0px; + left: 300px; + position: absolute; + z-index: 100; +} + +#dbslave-float a{ + border-top: 1px solid #cecece; + border-bottom: 2px solid #4a4a4a; + border-left: 1px solid #cecece; + border-right: 1px solid #cecece; + text-decoration: none; + text-align: center; + margin: 0; + padding: 1px .5em; + font-family: helvetica,arial,sans-serif; + font-size: 10px; + font-weight: bold; + background-color: #fff; + color:blue; +} + +/* ################--------------- Debug ---------------#################### */ +#debug-float { + top: 0px; + left: 80px; + position: absolute; + z-index: 100; +} + +#debug-float a{ + border-top: 1px solid #cecece; + border-bottom: 2px solid #4a4a4a; + border-left: 1px solid #cecece; + border-right: 1px solid #cecece; + text-decoration: none; + text-align: center; + margin: 0; + padding: 1px .5em; + font-family: helvetica,arial,sans-serif; + font-size: 10px; + font-weight: bold; + background-color: #fff; + color:red; +} + +#debug-float a:hover { + background-color: #fc3; + border-bottom: 2px solid #36f; +} + + + +#debug{ display:none; + background-color:#F0F0F0; + +} + +#debugajax{ + display:none; + margin: auto; + text-align:center; +} + + +#debug h1, #debugajax h1{ + font-size:14px; text-align:center; background-color:#efefe7; + padding: 5px; + +} + +#debug h2, #debugajax h2{ + font-size:14px; + padding-left: 10px; + border-left: 4px solid #FFC65D; + border-bottom: 2px solid #FFC65D; +} + +#debug table, #debugajax table{ +margin:0; +} diff --git a/0.78-bugfixes/css/style_install.css b/0.78-bugfixes/css/style_install.css new file mode 100644 index 0000000000000000000000000000000000000000..5a8bde8ec65d84ab2622d5f2129b73be9d1bf5bd --- /dev/null +++ b/0.78-bugfixes/css/style_install.css @@ -0,0 +1,172 @@ +/* + * @version $Id$ + ------------------------------------------------------------------------- + GLPI - Gestionnaire Libre de Parc Informatique + Copyright (C) 2003-2010 by the INDEPNET Development Team. + + http://indepnet.net/ http://glpi-project.org + ------------------------------------------------------------------------- + + LICENSE + + This file is part of GLPI. + + GLPI 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 2 of the License, or + (at your option) any later version. + + GLPI 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 GLPI; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -------------------------------------------------------------------------- +*/ + + /* ... Definition des styles de l'install et de l'update ... */ + + body { + background-color:#ffffff; + font-family: Verdana; + color:#000000; } + + #principal { + width:760px; + font-family: Verdana; + font-size:12px; + text-align: center; + margin: auto; + + padding: 40px 40px 40px 40px; + } + + +#bloc .haut{ +height: 53px; + background: url(../pics/haut_install.png) 0 0 no-repeat; +width:760px; +margin:0; +padding:0; +} + +#bloc{ + +background: url(../pics/milieu_install.png) 0 0 repeat-y; +width:760px; +margin:0; +text-align:left; +} + + +#bloc .bas{ +height: 31px; +background: url(../pics/bas_install.png) 0 0 no-repeat; + +width:760px; + +margin:0; +padding:0; +} + + +p{ padding-left:20px; +padding-right:20px; + +} + +.center {text-align:center;} + +.left{ text-align:left;} + + table { + text-align:center; + border: 0; + margin: 20px; + margin-left: auto; + margin-right: auto; + width: 90%;} + + th + { + font-size: 12px; + font-weight: bold; + color: #fccc6f; + vertical-align:bottom; +} + +.tab_cadre{ + +} + +.tab_bg_1 { + + +} + +.tab_check { +border: 1px solid #aaaaaa; +padding:10px; +} + +.tab_check td{ + font-size:11px; + border-bottom:1px solid #bbbbbb; + +} + + .red { color:red;} + .green {color:green;} + + h2 { + color:#D09800; + text-align:center;} + + h3 { + text-align:center;} + + input {border: 1px solid #ccc;} + + fieldset { + margin:40px; + padding: 20px; + border: 2px solid #D09800; + font-size: 12px; + font-weight:200;} + + .block { + display: inline-block; + width:300px; + } + .submit { text-align:center;} + + input.submit { + border:1px solid #000000; + background-color:#eeeeee; + } + + input.submit:hover { + border:1px solid #cccccc; + background-color:#ffffff; + } + + .button { + font-weight:200; + color:#000000; + padding:5px; + text-decoration:none; + border:1px solid #659900; + background-color:#eeeeee; + } + + .button:hover{ + font-weight:200; + color:#000000; + padding:5px; + text-decoration:none; + border:1px solid #659900; + background-color:#ffffff; + } diff --git a/0.78-bugfixes/css/styles.css b/0.78-bugfixes/css/styles.css new file mode 100644 index 0000000000000000000000000000000000000000..09dc2c98858493014cf1aa40c98825c7971a971d --- /dev/null +++ b/0.78-bugfixes/css/styles.css @@ -0,0 +1,1606 @@ +/* + * @version $Id$ + ------------------------------------------------------------------------- + GLPI - Gestionnaire Libre de Parc Informatique + Copyright (C) 2003-2010 by the INDEPNET Development Team. + + http://indepnet.net/ http://glpi-project.org + ------------------------------------------------------------------------- + + LICENSE + + This file is part of GLPI. + + GLPI 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 2 of the License, or + (at your option) any later version. + + GLPI 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 GLPI; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -------------------------------------------------------------------------- +*/ +/* ################--------------- GLPI CSS style ---------------#################### */ + + + + +/* ################--------------- Default style ---------------#################### */ + +body{ + font-family: 'Bitstream Vera Sans', arial, Tahoma, 'Sans serif'; + font-size: 12px; + margin: 0; + padding: 0; + background: white; +} + +ul, li, dt, dl, dd, form,img, input{ + margin: 0; + padding: 0; +} + +ul { +list-style-type: none; + +} + + + + +span.invisible{ + visibility: hidden; +} + +/* separateur pour rétablir les comportements de block */ +div.sep{ + font-size: 1px; + height: 1px; + padding: 0; + margin: 0; + clear: both; +} + +img{ + border: 0; +} + +small{ + font-family: verdana; + font-size: 10px; + +} + + +.b{ font-weight: bold;} + +.center{ text-align:center;} +.left{ text-align:left;} +.right{ text-align:right;} + +.center-h{margin:auto;} +.middle {vertical-align:middle;} +.bottom {vertical-align:bottom;} +.top {vertical-align:top;} +.relative {position: relative;} + + +.red { color:red;} +.blue {color:blue;} +.green {color:green;} + +.deleted {background-color:#cf9b9b;} + +.separ { + clear: both; + visibility: hidden; +} + +a, a:link { + font-weight: bold; + text-decoration: none; + color : #659900; + font-size : 11px; +} + +a:hover{ + color: black; +} + + +hr{ + border: 1px solid #cccccc; +} + + + +/* Over link div */ +.over_link { + display: none; + position: absolute; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + padding: 5px; + max-width: 350px; + font-size: 11px; + text-align: left; + z-index:1000; +} + + +.pointer {cursor:pointer;} + +/* ################--------------- Page ---------------#################### */ + +#page {margin: 0 auto; text-align:center;} + +#page form {font-size: 12px; + margin:0; + margin-bottom:5px; + padding:0; + +} + +#page { + margin-top:25px; + } + + +/* ################--------------- form ---------------#################### */ + + +option { + border:1px solid #ccc; + background-color:#ffffff; + +} + +.submit { text-align:center;} + +select { + font-size: 11px; + border: 1px solid #888888; + color: black; + background-color: white; +} + + +textarea, input { + background-color:#FAFAFA; + color: black; + border: 1px solid #888888; + font-size: 11px; +} + +input.submit { + font-size: 11px; + border: 1px solid #888888; + background-color:#eeeeee; + cursor:pointer; + background: url("../pics/fond_form.png") repeat-x; + } + +input.submit:hover { + border: 1px inset #888888; + background-color:#ffffff; + background: url("../pics/fond_form_on.png") repeat-x; + } + + +.entity_select { + border-left: 1px solid #C0CAD4; + border-right: 1px solid#C0CAD4; + padding:3px; + } + +.entity_select:hover { + border-left: 1px solid #C0CAD4; + border-right: 1px solid #C0CAD4; + border-bottom: 1px solid #C0CAD4; + padding:3px; + } + +.tree { + width:100%; + border:0; + border-bottom:1px solid #C0CAD4; +} + +.treeroot { + width:100%; + background: url("../pics/treeroot.png") 0 2px no-repeat; + border:0; + /*margin-top:5px;*/ + font-weight:bold; +} + +.tree:hover{ + background-color:#eeeeee; +} + +.treeroot:hover{ + background-color:#eeeeee; +} + +.button { + border: 1px solid #888888; + background-color:#eeeeee; + cursor:pointer; + background: url("../pics/fond_form.png") repeat-x; + } + +.button:hover{ + border: 1px inset #888888; + background-color:#ffffff; + background: url("../pics/fond_form_on.png") repeat-x; + } + + + + + + +/* ################--------------- Table ---------------#################### */ +table { + font-size: 11px; + /* Probem WIth EXTJS calendar -> to sons*/ + /*margin: 0 auto;*/ + border:0; +} + +th { } + + +td { } + +.tab_glpi { + margin: 0 auto; +} + +.tab_cadre{ + margin: 0 auto; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + border: 1px solid #cccccc; + z-index:1; + text-align: left; + font-size: 11px; + background-color: #ffffff; + +} + +.tab_cadre_central{ + margin: 0 auto; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + border: 1px solid #bbbbbb; + z-index:1; + text-align: left; + font-size: 11px; + width:950px; + /* background-color: #FFF4DF; */ + background : url("../pics/fond-central.png") repeat-x top right ; +} + + +.tab_cadre_navigation { + margin: 0 auto; + padding: 4px; + margin: 1px; + border: 1px solid #aaaaaa; + background-color: #ffffff; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + font-size : 12px; + font-weight: bold; + +} + +.tab_cadre_fixe, .tab_cadre_fixehov{ + margin: 0 auto; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + border: 1px solid #cccccc; + z-index:1; + text-align: left; + font-size: 11px; + width:950px; +} + + + +.tab_cadrehov, .tab_cadrehov_pointer{ + margin: 0 auto; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + border: 1px solid #cccccc; + text-align: left; + font-size: 11px; + width: 80%; + background-color: #ffffff; + +} + +.tab_cadre_report { + margin: 0 auto; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + border: 1px solid #cccccc; + z-index:1; + text-align: left; + font-size: 11px; + text-align: center; + width:90%; +} + +.tab_cadre th, .tab_cadre_fixe th, .tab_cadre_fixehov th, .tab_cadrehov th, .tab_cadrehov_pointer th , .tab_cadre_report th { + font-size: 11px; + font-weight: bold; + background-color: #fccc6f; + text-align: center; + background: url("../pics/fond_th.png") repeat-x; + border-bottom:1px solid #cccccc; +} + +.tab_cadre td, .tab_cadre_fixe td, .tab_cadre_fixehov td, .tab_cadrehov td, .tab_cadrehov_pointer td , .tab_cadre_report td { + padding-left: 5px; +} + +.tab_cadrehov tr:hover, .tab_cadre_fixehov tr:hover { + + background-color: #FFF4DF; +} + +.tab_cadrehov_pointer tr:hover { + cursor: pointer; + background-color: #FFF4DF; +} + +.tab_check{ + text-align:center; + margin: 20px; + margin-left: auto; + margin-right: auto; + width: 90%; + border: 1px solid #aaaaaa; + padding:10px; + +} + +.tab_check th { + font-size: 12px; + font-weight: bold; + color: #fccc6f; + vertical-align:bottom; +} + + +.tab_check td{ + font-size:11px; + border-bottom:1px solid #bbbbbb; + +} + +/* Ajout pour IE */ +.tab_cadrehov_pointer tr { + cursor: pointer; +} + +.tab_bg_1 { + background-color: #f2f2f2; + +} +.tab_bg_1_2 { + background-color: #cf9b9b; + +} + +.tab_bg_2 { + background-color: #e4e4e2; + +} + +.tab_bg_2_2 { + background-color: #cf9b9b; + +} + +.tab_bg_3 { +/*background-color: #eeeeee;*/ + background-color: #e7e7e2; +} + +.tab_bg_4 { + background-color: silver; +} + +.tab_bg_5 { + background-color: #f2f2f2; +} + + +.tab_find { + background-color: #ccccc7; +} + + +.tab_find:hover { + background-color:#FFF2C2; + cursor:pointer; +} + +.tab_resa { + border:1px dashed #cccccc; + background-color: #d7d7d2; + font-size:10px +} + +.tab_resa:hover { + + background-color: #ffffff; + border:1px dotted #000000; + + +} + +/* ################--------------- Pager ---------------#################### */ + +.tab_cadre_pager{ + margin: 0 auto; + text-align:center; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + border: 1px solid #cccccc; + font-size:10px; + width:950px; +} + + +.tab_cadre_pager select, .tab_cadre_pager span, .tab_cadre_pager form { + font-size:10px; + margin:0; +} + +.tab_cadre_pager input { + vertical-align:middle; +} + + +.tab_cadre_pager th { + font-size: 10px; + font-weight: bold; + background-color: #fccc6f; + text-align: center; + background: url("../pics/fond_th.png") repeat-x; +} + + + +/* ################--------------- Bouton navigation ---------------#################### */ +/* (obsolète mais encore utilisés) */ + +.icon_consol_hov, .icon_consol{ + font-family: "Trebuchet MS", Tahoma, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight: bold; + padding: 4px; + padding-right: 8px; + margin: 1px; + border: 1px solid #aaaaaa; + background-color: #e4e4e4; + background: url("../pics/fond_ico_cons.png") repeat-x; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + +} + + +.icon_consol_hov img{ + padding-bottom: 10px; +} + +.icon_consol_hov:hover { + padding: 4px; + padding-right: 8px; + margin: 1px; + border: 1px inset #888888; + background-color: white; + background: url("../pics/fond_ico_cons_on.png") repeat-x; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; +} + +/* ################--------------- Autocompletion ---------------#################### */ + +ul.autocomp { + list-style-type: none; + margin:0; + margin-left:3px; + padding:3px; + text-align:left; +} + +ul.autocomp li.selected { background-color: #FFF6CF; } + + li.auto_comp { + list-style-type: none; + display:block; + margin:0; + padding:2px; + height:16px; +} + + + + +/* ################--------------- Tracking / Reminder ---------------#################### */ +.tracking { + width:100%; + height:100%; + cursor:pointer; +} + +.tracking:hover { + background-color: #FFF4DF; + +} + + +.tracking_hour{ + font-family: verdana; + font-size: 10px; +} + +.tracking_bold { +font-weight: bold; +} + +.ldap_right, .reminder_right{ + position:absolute; +right:0; + margin-right:5px; +font-size:10px;} + +.showplan { +font-weight: bold; +text-decoration: none; +color : #659900; +cursor:pointer; +} + +.tracking_small{ + font-size:10px; +} + +.reminder_list{ +text-align:left; +margin-left:8px;} + +/* ################--------------- Calendrier / reservation ---------------#################### */ + +.calendrier{ + border: 1px solid #888888; + background-color:#eeeeee; + vertical-align:middle; + background: url("../pics/fond_form.png") repeat-x; + } + +.calendrier:hover{ + border: 1px inset #888888; + background-color:#ffffff; + cursor:pointer; + } + +.calendrier_mois { font-family: Verdana, Arial, Sans, sans-serif; font-size: 10px; } + +.calendrier_jour {font-family: arial,helvetica,sans-serif; font-size: 14px; color: black;} + +.calendrier_case1 { + margin-left: 10px; + padding: 2px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + margin-top: 2px; + border: 1px solid #666666; + background-color: white; +} + +.calendrier_case2{ + margin-left: 10px; + padding: 2px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + margin-top: 2px; + border: 1px solid #cccccc; + background-color: #eeeeee + +} + +.calendrier_case_white{ +background-color:#ffffff; +} + +/* ################--------------- Knowledge FAQ ---------------#################### */ +#contenukb { + height: 100%; + width: 600px; + margin: 0 auto; + } + +#contenukb legend { + font-weight: bold; +} + +#contenukb fieldset { + background-color: #eeeeee; + border: 1px solid #FFC65D; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + -o-border-radius: 8px; + padding-bottom:10px; + width: 600px; +} + +#contenukb textarea { + width:550px; +} + +#kbanswer ul{ +padding-left: 15px; +list-style-type: circle; +} + +#kbanswer ol { +padding-left: 15px; +list-style-type: decimal; +} + +.tdkb_result{ + vertical-align:top; + text-align:left; + width: 33%; + padding: 3px 20px 3px 25px; +} + +.kb { +text-align:left; +padding-top:5px; + +} + + +.kb_resume{ + text-align:left; + font-size: 9px; + line-height: 10px; + clear: both; + padding: 5px 0 10px 25px; + +} + + +.tdkb{ +text-align:left; +font-size:10px; +color:#aaaaaa; + +} + +.baskb { +position: relative; + text-align:left; +font-size:10px; + color:#aaaaaa; +} + +.baskb_right{ + position:absolute; right:0; margin-right:5px;} + + +.code { + width: 95%; + border: dotted 2px #ccc; + } + +a.knowbase { + font-size: 11px; + margin-left:8px; + } + +a.pubfaq { + font-size: 13px; + margin-left:8px; + color: #c9993C; + } + + +a.pubfaq:hover { + color: black; +} + + + + +a.icon_nav_move img { + padding: 4px; + margin: 1px; + border: 1px solid #aaaaaa; + background-color: #ffffff; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; +} + +a.icon_nav_move:hover img { + padding: 4px; + margin: 1px; + border: 1px solid #999999; + background-color:#e4e4e4; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; +} + + +/* ################--------------- planning ---------------#################### */ + +.planning { + text-align:center; + border:1px dashed #cccccc; + background-color: #d7d7d2; + font-size:9px; + +} + +.planing:hover { + border: 1px solid #999999; + background-color: white; + +} + + +/* ################--------------- Onglet ---------------#################### */ + + +div#menu_navigate{ + margin: 0 auto; + z-index:1; + font-size: 10px; + width:950px; +} + +div#menu_navigate li { +margin-left:2px; +display:block; +float:left; +padding:2px; +} + + + + +#barre_onglets { + + width:950px; + margin-left: auto; + margin-right: auto; + margin-bottom:0; + padding-bottom:0; +} + +#barre_onglets_percent { + + width:80%; + margin-left: auto; + margin-right: auto; + margin-bottom:0; + padding-bottom:0; +} + +ul#onglet { + list-style-type: none; + padding-bottom: 24px; + border-bottom: 1px solid #ffffff; + margin: 0; + padding-left:0; +} + +ul#onglet li { + + float: left; + height: 21px; + background-color: #eeeeee; + margin: 2px 2px 0 1px; + border: 1px solid #CC9900; + border-bottom: 1px solid #fff; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + background: url("../pics/fond_onglet.png") repeat-x; +} + +ul#onglet li.actif { + border-bottom: 1px ridge #659900; + background-color: #fff; +} + +ul#onglet li.invisible { + border-bottom: 1px solid #fff; + border: 1px solid #fff; + background-color: #ffffff; + width: 15px; + background: transparent; +} + +ul#onglet li.actif a { + color: #000; +} + +#onglet a { + float: left; + display: block; + color: #666; + text-decoration: none; + padding: 3px; + font-size: 10px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-weight: bold; +} + +#onglet a:hover { + color : #659900; + +} + +ul#onglet span.fake{ + float: left; + display: block; + color: #666; + text-decoration: none; + padding: 3px; + font-size: 10px; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-weight: bold; + cursor:pointer; + +} + + + +/* Over onglet div */ +#onglet_plugins{ + display: none; + position: absolute; + top:21px; + left:-20px; + padding: 5px; + font-size: 8px; + width:100px; + background: transparent url("../pics/fd_hoverlink.png") repeat; + border: 1px solid gray; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; +} + + #onglet_plugins dl{ + margin: 0; + padding: 0; + list-style-type: none; + border:0; + +} + +#onglet_plugins dt { + text-align: center; + padding: 2px; + background:none; + border:0; + width:100%; + height:18px; + +} +#onglet_plugins dt a { + font-size:10px; + color: #000; + text-decoration: none; + display: block; + border: 0 none; +} +#onglet_plugins dt a:hover { + color: #000; + background: #fccc6f; + +} + + +#onglet_plugins dt:hover { + color: #000; + background: #fccc6f; + +} + +/* ################--------------- box (redirect and other) ---------------#################### */ +.box {margin: 0 auto; width:700px; text-align:center;} +.box-tleft{background:transparent url(../pics/corners.gif) no-repeat 0 0;zoom:1;} +.box-tcenter{height:8px;background:transparent url(../pics/tb.gif) repeat-x 0 0;overflow:hidden;} +.box-tright{background:transparent url(../pics/corners.gif) no-repeat right -8px;} +.box-mleft{background:transparent url(../pics/l.gif) repeat-y 0;padding-left:4px;overflow:hidden;zoom:1;} +.box-mcenter{background:#eee url(../pics/tb.gif) repeat-x 0 -16px;padding:4px 10px;font-family:"Myriad Pro","Myriad Web","Tahoma","Helvetica","Arial",sans-serif;color:#393939;font-size:11px;} +.box-mcenter h3{font-size:11px;font-weight:bold;margin:0 0 4px 0;zoom:1;} +.box-mright{background:transparent url(../pics/r.gif) repeat-y right;padding-right:4px;overflow:hidden;} +.box-bleft{background:transparent url(../pics/corners.gif) no-repeat 0 -16px;zoom:1;} +.box-bcenter{background:transparent url(../pics/tb.gif) repeat-x 0 -8px;height:8px;overflow:hidden;} +.box-bright{background:transparent url(../pics/corners.gif) no-repeat right -24px;} +.box-tleft,.box-bleft{padding-left:8px;overflow:hidden;} +.box-tright,.box-bright{padding-right:8px;overflow:hidden;} + + + +/* ################--------------- Login Null Header ---------------#################### */ + +#contenulogin { + height: 266px; + width: 600px; + margin-top:100px; + margin-left: auto; + margin-right: auto; + background:url("../pics/login_glpi.png") no-repeat; + font-family : Verdana,Arial,Helvetica,sans-serif; + font-size : 12px; + color :#659900; + font-weight: bold; +} + + +#bloc .haut{ +height: 53px; +background: url(../pics/haut_install.png) 0 0 no-repeat; +width:760px; +margin:0; +padding:0; +} + +#bloc{ +background: url(../pics/milieu_install.png) 0 0 repeat-y; +width:760px; +margin:0 auto; +text-align:left; +} + + +#bloc .bas{ +height: 31px; +background: url(../pics/bas_install.png) 0 0 no-repeat; +width:760px; +margin:0; +padding:0; +} + + + +#boxlogin { + position:relative; + background-color: transparent; + padding-left: 15px; + padding-top: 76px; + text-align: left; /* Bug IE Grrr */ + height: 190px; + width: 300px; + + +} + +#boxlogin p { + + text-align:center; +} + +.row { + clear: both; + padding-top: 5px; +} + +.label { + float: left; + margin-left:10px; + text-align: left; +} + +.formw { + float: right; + margin-right:10px; + text-align: right; +} + + + +#boxlogin fieldset { + background-color: transparent; + border: 2px solid #FFC65D; + padding-bottom:22px; +} + +#boxlogin legend { + font-family:"Trebuchet MS",Verdana,Geneva,Arial,Helvetica,sans-serif; + font-size: 15px; + font-weight: 700; + background-color: transparent; + color :#659900; +} + + +#boxlogin input { + + border: 1px solid #659900; +} + +#logo-login { + font-size: 11px; + float:right; + height: 160px; + width: 230px; + margin-right:10px; + margin-left:0px; + margin-top:80px; + color :#000000; + overflow: auto; +} + +#logo-login a:hover { + color :#659900; + text-decoration: underline; +} + +#box-faq { + float:right; + margin-right:10px; + +} + +.sous_logo { + font-family: arial; + font-size: 9px; + color: #eeeeee; + text-decoration: none; + } + +.error { + color: red; + margin-top:20px; + text-align:center; +} + +#footer-login +{ + text-align:right; + position: fixed !important; + left: 0px; + right: 10px; + bottom: 0px !important; + height: 40px; + font-size : 10px; + color :#757575; + font-family: Verdana,Arial,Helvetica,sans-serif; + font-weight: bold; + margin-top:10px; + margin:auto; + /*css hack for IE*/ + position: absolute; + bottom: auto; + top: expression((parseInt(document.documentElement.clientHeight)+parseInt(document.documentElement.scrollTop)-42)+'px'); + width: expression(parseInt(document.documentElement.clientWidth)+'px'); + +} + + +/* ################--------------- Header / menu ---------------#################### */ +div#header{ + background: url("../pics/fd_nav1.png") 0 0 repeat-x; + margin-bottom:10px; +} + +div#c_preference{ + height: 20px; + text-align: right; + margin-right: 5px; + position: relative; + top: 4px; + font-size: 0.9em; + z-index:900; +} + +div#c_preference ul{ + list-style: none; +} + +div#c_preference ul li{ + float: right; + margin: 0 10px; +} +div#c_preference ul li#deconnexion{ + margin-left: 25px; +} + +div#c_preference a{ + color: #000; + text-decoration: none; + font-size: 0.9em; +} + +div#c_preference a:hover{ + text-decoration: underline; +} + +div#c_recherche{ + height: 21px; + text-align: right; + margin-right: 25px; + position: relative; + top: 5px; + font-size: 0.9em; +} + +div#c_recherche form{ + height: 15px; + position: relative; + bottom: 3px; +} + +div#c_recherche form div#champRecherche input{ + border: 1px solid #000; + height: 14px; + font-family: 'Bitstream Vera Sans', arial, Tahoma, 'Sans serif'; + font-size: 11px; +} + +div#c_recherche form div#boutonRecherche{ + float: right; + border: 1px solid #000; + height: 14px; + width: 14px; + overflow: hidden; +} + +div#c_recherche form div#boutonRecherche input{ + font-family: 'Bitstream Vera Sans', arial, Tahoma, 'Sans serif'; + font-size: 0.7em; + width: 15px; + height: 15px; + border: none; + position: relative; + right: 2px; +} + +div#c_menu{ + height: 41px; + position: absolute; + top: 0px; + z-index: 10; + left: 45px; +} + +div#c_menu ul#menu{ + position: relative; + left: 10px; + top: 23px; + height: 20px; + list-style: none; + float: left; +} + +ul#menu a.itemP, ul#menu a.itemP1{ + display: block; + height: 100%; + width: 100%; + text-align: center; + text-decoration: none; + border-right: 1px solid #9BA563; + color: #000; +} + +ul#menu ul.ssmenu{ + position: relative; + top: 5px; + width: 108px; + border: 1px solid #CC9900; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + background: url("../pics/fd_ssmenu.png") 0 0 repeat; + display: none; +} + +ul#menu ul li{ + list-style: none; + text-align: center; + border-bottom: 1px solid #CC9900; + line-height: 20px; + font-size: 0.9em; +} + +ul#menu ul li:last-child{ + border-bottom: 0px; +} + +ul#menu ul li a{ + color: #000; + text-decoration: none; + display: block; + width: 100%; + height: 100%; +} + +ul#menu ul li a:hover{ + background: url("../pics/fd_nav2.png") 0 0 repeat; +} + +ul#menu li#menu1{ + float: left; + width: 110px; +} + +ul#menu li#menu1 ul.ssmenu{ + position: relative; + width: 110px; + +} + +ul#menu li#menu2{ + float: left; + width: 110px; +} + +ul#menu li#menu2 ul.ssmenu{ + position: relative; + width: 110px; + +} + +ul#menu li#menu3{ + float: left; + width: 110px; +} + +ul#menu li#menu3 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu4{ + float: left; + width: 110px; +} + +ul#menu li#menu4 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu5{ + float: left; + width: 110px; +} + +ul#menu li#menu5 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu6{ + float: left; + width: 110px; +} + +ul#menu li#menu6 ul.ssmenu{ + position: relative; + width: 110px; +} + +ul#menu li#menu7{ + float: left; + width: 110px; +} + +ul#menu li#menu7 ul.ssmenu{ + position: relative; + width: 110px; +} + +div#header div#c_logo{ + position: absolute; + z-index: 1000; + width: 64px; + height: 41px; + float: left; + background: url("../pics/fd_logo.png") 0 0 repeat-x; +} + +div#header div#c_logo a{ + display: block; + width: 100%; + height: 100%; + text-decoration: none; +} + +div#c_ssmenu1{ + background: url("../pics/fd_nav2.png") 0 0 repeat-x; + height: 24px; + clear: both; + font-size: 0.8em; +} + +div#c_ssmenu1 ul{ + position: relative; + top: 4px; + left: 0px; + list-style: none; + +} + +div#c_ssmenu1 ul li{ + float: left; + padding: 0 10px; +} + +div#c_ssmenu1 ul li a{ + text-decoration: none; + color: #666; + +} + +div#c_ssmenu1 ul li a:hover{ + text-decoration: underline; +} + +div#c_ssmenu2{ + position: relative; + z-index: 5; + background: url("../pics/fd_nav3.png") 0 0 repeat-x; + height: 28px; + clear: both; + font-size: 0.9em; + +} +div#c_ssmenu2 ul{ + position: relative; + top: 5px; + left: 0px; + list-style: none; +} + +div#c_ssmenu2 ul li{ + position:relative; + float: left; + padding: 0 10px; +} + +div#c_ssmenu2 ul li a{ + text-decoration: none; + color: #000; +} + +div#c_ssmenu2 a.here{ + font-size:14px; +} + + +div#show_entities{ + display: none; + position: absolute; + top:20px; + left:1px; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + padding: 5px; + font-size: 11px; + text-align: left; + z-index:1000; +} + +div#show_entities_long{ + display: none; + position: absolute; + top:20px; + left:1px; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + padding: 5px; + font-size: 11px; + text-align: left; + z-index:1000; + overflow:scroll; + height:300px; + width:300px; +} + + +div#show_all_menu{ + display: none; + position: absolute; + top:20px; + left:5px; + border: 1px solid #CC9900; + background: url("../pics/fd_hoverlink.png") 0 0 repeat; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + -o-border-radius: 5px; + padding: 5px; + font-size: 11px; + text-align: left; + z-index:1000; + +} + +/* ################--------------- Footer ---------------#################### */ +#footer{ + background: url("../pics/fd_footer.png") 0 0 repeat-x; + font-size: 9px; + color :#757575; + padding: 3px; + margin-top: 200px; + clear:both; + + } + + + +.copyright { + font-size: 9px; + color :#757575; + } + + +/* ################--------------- DB Slave---------------#################### */ +#dbslave-float { + top: 0px; + left: 300px; + position: absolute; + z-index: 100; +} + +#dbslave-float a{ + border-top: 1px solid #cecece; + border-bottom: 2px solid #4a4a4a; + border-left: 1px solid #cecece; + border-right: 1px solid #cecece; + text-decoration: none; + text-align: center; + margin: 0; + padding: 1px .5em; + font-family: helvetica,arial,sans-serif; + font-size: 10px; + font-weight: bold; + background-color: #fff; + color:blue; +} + +/* ################--------------- Debug ---------------#################### */ +#debug-float { + top: 0px; + left: 80px; + position: absolute; + z-index: 100; +} + +#debug-float a{ + border-top: 1px solid #cecece; + border-bottom: 2px solid #4a4a4a; + border-left: 1px solid #cecece; + border-right: 1px solid #cecece; + text-decoration: none; + text-align: center; + margin: 0; + padding: 1px .5em; + font-family: helvetica,arial,sans-serif; + font-size: 10px; + font-weight: bold; + background-color: #fff; + color:red; +} + +#debug-float a:hover { + background-color: #fc3; + border-bottom: 2px solid #36f; +} + + + +#debug{ + background-color:#F0F0F0; + +} + +#debugajax{ + margin: auto; + text-align:center; +} + + +#debug h1, #debugajax h1{ + font-size:14px; text-align:center; background-color:#efefe7; + padding: 5px; + +} + +#debug h2, #debugajax h2{ + font-size:14px; + padding-left: 10px; + border-left: 4px solid #FFC65D; + border-bottom: 2px solid #FFC65D; +} + +#debug table, #debugajax table{ + margin:0; +} + +#kbanswer p { + margin: 1.12em 0 +} + +#kbanswer h1 { + font-size: 2em; + margin: .67em 0 +} +#kbanswer h2 { + font-size: 1.5em; + margin: .75em 0; + font-weight: bolder; +} +#kbanswer h3 { + font-size: 1.17em; + margin: .83em 0; + font-weight: bolder; +} + +#kbanswer h4 { + margin: 1.12em 0; + font-weight: bolder; +} + +#kbanswer h5 { + font-size: .83em; + margin: 1.5em 0; + font-weight: bolder; +} + +#kbanswer h6 { + font-size: .75em; + margin: 1.67em 0; + font-weight: bolder; +} + +#kbanswer address { + font-style: italic; +} + +#kbanswer pre { + font-family: monospace; + white-space: pre; +} diff --git a/0.78-bugfixes/css/styles_ie.css b/0.78-bugfixes/css/styles_ie.css new file mode 100644 index 0000000000000000000000000000000000000000..cf2d307b72f531284f0106e6ae09f89c18f87f83 --- /dev/null +++ b/0.78-bugfixes/css/styles_ie.css @@ -0,0 +1,49 @@ +/* + * @version $Id$ + ------------------------------------------------------------------------- + GLPI - Gestionnaire Libre de Parc Informatique + Copyright (C) 2003-2010 by the INDEPNET Development Team. + + http://indepnet.net/ http://glpi-project.org + ------------------------------------------------------------------------- + + LICENSE + + This file is part of GLPI. + + GLPI 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 2 of the License, or + (at your option) any later version. + + GLPI 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 GLPI; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + -------------------------------------------------------------------------- +*/ +/* ################--------------- GLPI CSS style MOD and HACK for IE ---------------#################### */ + +img { + behavior: url("../css/win_png.htc"); +} + + + +div#c_ssmenu1 ul li{ +margin-top:4px; + +} + + + +#contenu-nullHeader { + background-image:none; + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod='crop', src='../pics/null-header.png'); + zoom:1; + +} \ No newline at end of file diff --git a/0.78-bugfixes/css/win_png.htc b/0.78-bugfixes/css/win_png.htc new file mode 100644 index 0000000000000000000000000000000000000000..8c1005a4f78aff177f39cfc1d57821674e9dace6 --- /dev/null +++ b/0.78-bugfixes/css/win_png.htc @@ -0,0 +1,47 @@ + + + + \ No newline at end of file diff --git a/0.78-bugfixes/files/.htaccess b/0.78-bugfixes/files/.htaccess new file mode 100644 index 0000000000000000000000000000000000000000..3418e55a68383c1cbc687c52a2994d1e8ed83800 --- /dev/null +++ b/0.78-bugfixes/files/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/0.78-bugfixes/files/_cache/remove.txt b/0.78-bugfixes/files/_cache/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_cache/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_cron/remove.txt b/0.78-bugfixes/files/_cron/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_cron/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_dumps/remove.txt b/0.78-bugfixes/files/_dumps/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_dumps/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_graphs/remove.txt b/0.78-bugfixes/files/_graphs/remove.txt new file mode 100755 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_graphs/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_lock/remove.txt b/0.78-bugfixes/files/_lock/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_lock/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_log/remove.txt b/0.78-bugfixes/files/_log/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_log/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_plugins/remove.txt b/0.78-bugfixes/files/_plugins/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_plugins/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_sessions/remove.txt b/0.78-bugfixes/files/_sessions/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_sessions/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_tmp/remove.txt b/0.78-bugfixes/files/_tmp/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_tmp/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/files/_uploads/remove.txt b/0.78-bugfixes/files/_uploads/remove.txt new file mode 100644 index 0000000000000000000000000000000000000000..977321426cfc18189220e566cc5748cc233e21f0 --- /dev/null +++ b/0.78-bugfixes/files/_uploads/remove.txt @@ -0,0 +1,3 @@ +Vous pouvez effacer ce fichier sans dommages. + +You can safely remove this file. diff --git a/0.78-bugfixes/front/auth.others.php b/0.78-bugfixes/front/auth.others.php new file mode 100644 index 0000000000000000000000000000000000000000..bacce3ffea403d3423a801ac9833c523bc88e9e0 --- /dev/null +++ b/0.78-bugfixes/front/auth.others.php @@ -0,0 +1,60 @@ +update($_POST); + glpi_header($CFG_GLPI["root_doc"] . "/front/auth.others.php"); +} + +if (!isset($_GET["id"])) { + $_GET["id"]=""; +} + +commonHeader($LANG['title'][14], $_SERVER['PHP_SELF'],"config","extauth","others"); + +showOtherAuthList($_SERVER['PHP_SELF']); + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/auth.settings.php b/0.78-bugfixes/front/auth.settings.php new file mode 100644 index 0000000000000000000000000000000000000000..860cbef14f33b3afeea8a051cb1ad5301cd44a75 --- /dev/null +++ b/0.78-bugfixes/front/auth.settings.php @@ -0,0 +1,49 @@ +showFormAuthentication(); + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/authldap.form.php b/0.78-bugfixes/front/authldap.form.php new file mode 100644 index 0000000000000000000000000000000000000000..89a34d87d360c75ef638cfdb329d32a9a86fa861 --- /dev/null +++ b/0.78-bugfixes/front/authldap.form.php @@ -0,0 +1,120 @@ +update($_POST); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset ($_POST["add"])) { + //If no name has been given to this configuration, then go back to the page without adding + if ($_POST["name"] != "") { + if ($newID = $config_ldap->add($_POST)) { + if (AuthLdap::testLDAPConnection($newID)) { + addMessageAfterRedirect($LANG['login'][22]); + } else { + addMessageAfterRedirect($LANG['login'][23],false,ERROR); + } + glpi_header($CFG_GLPI["root_doc"] . "/front/authldap.php?next=extauth_ldap&id=".$newID); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset ($_POST["delete"])) { + $config_ldap->delete($_POST); + $_SESSION['glpi_authconfig'] = 1; + $config_ldap->redirectToList(); + +} else if (isset ($_POST["test_ldap"])) { + $ldap = new AuthLDAP; + $ldap->getFromDB($_POST["id"]); + + if (AuthLdap::testLDAPConnection($_POST["id"])) { + $_SESSION["LDAP_TEST_MESSAGE"] = $LANG['login'][22]. + " (".$LANG['ldap'][21]." : ".$ldap->fields["name"].")"; + } else { + $_SESSION["LDAP_TEST_MESSAGE"] = $LANG['login'][23]. + " (".$LANG['ldap'][21]." : ".$ldap->fields["name"].")"; + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset ($_POST["test_ldap_replicate"])) { + foreach ($_POST["test_ldap_replicate"] as $replicate_id => $value) { + $replicate = new AuthLdapReplicate; + $replicate->getFromDB($replicate_id); + + if (AuthLdap::testLDAPConnection($_POST["id"],$replicate_id)) { + $_SESSION["LDAP_TEST_MESSAGE"] = $LANG['login'][22]. + " (".$LANG['ldap'][19]." : ".$replicate->fields["name"].")"; + } else { + $_SESSION["LDAP_TEST_MESSAGE"] = $LANG['login'][23]. + " (".$LANG['ldap'][19]." : ".$replicate->fields["name"].")"; + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete_replicate"])) { + $replicate = new AuthLdapReplicate; + foreach ($_POST["item"] as $index=>$val) { + $replicate->delete(array("id" => $index)); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["add_replicate"])) { + $replicate = new AuthLdapReplicate; + unset($_POST["next"]); + unset($_POST["id"]); + $replicate->add($_POST); + glpi_header($_SERVER['HTTP_REFERER']); +} + +commonHeader($LANG['title'][14], $_SERVER['PHP_SELF'],"config","extauth","ldap"); +$config_ldap->showForm($_GET["id"]); + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/authldap.php b/0.78-bugfixes/front/authldap.php new file mode 100644 index 0000000000000000000000000000000000000000..35e692411896cc3b6fddaa4e938ced2e4f433af4 --- /dev/null +++ b/0.78-bugfixes/front/authldap.php @@ -0,0 +1,49 @@ + diff --git a/0.78-bugfixes/front/authmail.form.php b/0.78-bugfixes/front/authmail.form.php new file mode 100644 index 0000000000000000000000000000000000000000..969ffafe112373c8fea2a8be6e500a44103f46b2 --- /dev/null +++ b/0.78-bugfixes/front/authmail.form.php @@ -0,0 +1,78 @@ +update($_POST); + glpi_header($_SERVER['HTTP_REFERER']); +} else if (isset ($_POST["add"])) { + //If no name has been given to this configuration, then go back to the page without adding + if ($_POST["name"] != "") { + $newID=$config_mail->add($_POST); + } + glpi_header($_SERVER['HTTP_REFERER']); +} else if (isset ($_POST["delete"])) { + $config_mail->delete($_POST); + $_SESSION['glpi_authconfig']=2; + $config_mail->redirectToList(); +} else if (isset ($_POST["test"])) { + if (AuthMail::testAuth($_POST["imap_string"],$_POST["imap_login"],$_POST["imap_password"])) { + addMessageAfterRedirect($LANG['login'][22]); + } else { + addMessageAfterRedirect($LANG['login'][23],false,ERROR); + } + glpi_header($_SERVER['HTTP_REFERER']); +} + +commonHeader($LANG['title'][14], $_SERVER['PHP_SELF'],"config","extauth","imap"); + +$config_mail->showForm($_GET["id"]); + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/authmail.php b/0.78-bugfixes/front/authmail.php new file mode 100644 index 0000000000000000000000000000000000000000..3f0c9ff9cd0ecabe8a447984b6609fa553ace497 --- /dev/null +++ b/0.78-bugfixes/front/authmail.php @@ -0,0 +1,49 @@ + diff --git a/0.78-bugfixes/front/autoupdatesystem.form.php b/0.78-bugfixes/front/autoupdatesystem.form.php new file mode 100644 index 0000000000000000000000000000000000000000..dc3c37b64897293dafb6af3f5866e983c4398149 --- /dev/null +++ b/0.78-bugfixes/front/autoupdatesystem.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/autoupdatesystem.php b/0.78-bugfixes/front/autoupdatesystem.php new file mode 100644 index 0000000000000000000000000000000000000000..4827de957a419720f8fad6ac0f7bd6e2567cd816 --- /dev/null +++ b/0.78-bugfixes/front/autoupdatesystem.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/backup.php b/0.78-bugfixes/front/backup.php new file mode 100644 index 0000000000000000000000000000000000000000..e44c352e8180b382f1ea2d293278e90f3a06dd0b --- /dev/null +++ b/0.78-bugfixes/front/backup.php @@ -0,0 +1,638 @@ +5) { + $defaulttimeout = $max_time-2; + $defaultrowlimit = 5; +} else { + $defaulttimeout = max(1,$max_time-2); + $defaultrowlimit = 2; +} + +?> + + +list_tables(); + $i = 0; + while ($line = $DB->fetch_array($result)) { + // on se limite aux tables prefixees _glpi + if (strstr($line[0],"glpi_")) { + $table = $line[0]; + + $query[$i] = "SELECT * + FROM `$table`"; + $i++; + } + } + + //le nom du fichier a generer... + //Si fichier existe deja il sera remplac�par le nouveau + $chemin = GLPI_DUMP_DIR."/backup.xml"; + + // Creation d'une nouvelle instance de la classe + // et initialisation des variables + $A = new XML(); + + // Your query + $A->SqlString = $query; + + //File path + $A->FilePath = $chemin; + + // Type of layout : 1,2,3,4 + // For details about Type see file genxml.php + if (empty($Type)) { + $A->Type = 4; + } else { + $A->Type = $Type; + } + + //appelle de la methode gerant le fichier XML + $A->DoXML(); + + // Affichage, si erreur affiche erreur + //sinon affiche un lien vers le fichier XML genere + + if ($A->IsError == 1) { + echo "ERR : ".$A->ErrorString; + } + + //fin de fonction xmlbackup +} + + +////////////////////////// DUMP SQL FUNCTIONS +/// Init time to computer time spend +function init_time() { + global $TPSDEB,$TPSCOUR; + + list ($usec,$sec) = explode(" ",microtime()); + $TPSDEB = $sec; + $TPSCOUR = 0; +} + + +/// Get current time +function current_time() { + global $TPSDEB,$TPSCOUR; + + list ($usec,$sec) = explode(" ",microtime()); + $TPSFIN = $sec; + if (round($TPSFIN-$TPSDEB,1) >= $TPSCOUR+1) {//une seconde de plus + $TPSCOUR = round($TPSFIN-$TPSDEB,1); + } +} + + +/** Get data of a table +* @param $DB DB object +* @param $table table name +* @param $from begin from +* @param $limit limit to +*/ +function get_content($DB, $table,$from,$limit) { +//logInFile('php-errors',"get_content($table,$from,$limit)\n"); + $content = ""; + $gmqr = ""; + $result = $DB->query("SELECT * + FROM `$table` + LIMIT ".intval($from).",".intval($limit)); + if ($result) { + $num_fields = $DB->num_fields($result); + if (get_magic_quotes_runtime()) { + $gmqr = true; + } + while ($row = $DB->fetch_row($result)) { + if ($gmqr) { + $row = addslashes_deep($row); + } + $insert = "INSERT INTO `$table` VALUES ("; + + for( $j=0 ; $j<$num_fields ; $j++) { + if (is_null($row[$j])) { + $insert .= "NULL,"; + } else if ($row[$j] != "") { + $insert .= "'".addslashes($row[$j])."',"; + } else { + $insert .= "'',"; + } + } + $insert = preg_replace("/,$/","",$insert); + $insert .= ");\n"; + $content .= $insert; + } + } + return $content; +} + + +/** Get structure of a table +* @param $DB DB object +* @param $table table name +*/ +function get_def($DB, $table) { + + $def = "### Dump table $table\n\n"; + $def .= "DROP TABLE IF EXISTS `$table`;\n"; + $query = "SHOW CREATE TABLE `$table`"; + $result = $DB->query($query); + $DB->query("SET SESSION sql_quote_show_create = 1"); + $row = $DB->fetch_array($result); + + $def .= preg_replace("/AUTO_INCREMENT=\w+/i","",$row[1]); + $def .= ";"; + return $def."\n\n"; +} + + +/** Restore a mysql dump +* @param $DB DB object +* @param $dumpFile dump file +* @param $duree max delay before refresh +*/ +function restoreMySqlDump($DB,$dumpFile , $duree) { + global $DB,$TPSCOUR,$offset,$cpt,$LANG; + + // $dumpFile, fichier source + // $duree=timeout pour changement de page (-1 = aucun) + + // Desactivation pour empecher les addslashes au niveau de la creation des tables + // En plus, au niveau du dump on considere qu'on est bon + //set_magic_quotes_runtime(0); + + if (!file_exists($dumpFile)) { + echo $LANG['document'][38]." : $dumpFile
"; + return false; + } + $fileHandle = fopen($dumpFile, "rb"); + + if (!$fileHandle) { + echo $LANG['document'][45]." : $dumpFile
"; + return false; + } + + if ($offset != 0) { + if (fseek($fileHandle,$offset,SEEK_SET) != 0) { //erreur + echo $LANG['backup'][22]." ".formatNumber($offset,false,0)."
"; + return false; + } + glpi_flush(); + } + + $formattedQuery = ""; + + while (!feof($fileHandle)) { + current_time(); + if ($duree > 0 && $TPSCOUR >= $duree) { //on atteint la fin du temps imparti + return true; + } + + // specify read length to be able to read long lines + $buffer = fgets($fileHandle,102400); + + // do not strip comments due to problems when # in begin of a data line + $formattedQuery .= $buffer; + if (get_magic_quotes_runtime()) { + $formattedQuery = stripslashes($formattedQuery); + } + if (substr(rtrim($formattedQuery),-1) == ";") { + // Do not use the $DB->query + if ($DB->query($formattedQuery)) { //if no success continue to concatenate + $offset = ftell($fileHandle); + $formattedQuery = ""; + $cpt++; + } + } + } + + if ($DB->error) { + echo "
".$LANG['backup'][23]." [$formattedQuery]
".$DB->error()."
"; + } + + fclose($fileHandle); + $offset = -1; + return true; +} + + +/** Backup a glpi DB +* @param $DB DB object +* @param $dumpFile dump file +* @param $duree max delay before refresh +* @param $rowlimit rowlimit to backup in one time +*/ +function backupMySql($DB,$dumpFile, $duree,$rowlimit) { + global $TPSCOUR,$offsettable,$offsetrow,$cpt,$LANG; + +//logInFile('php-errors',"backupMySql($dumpFile, $duree,$rowlimit)\n"); + // $dumpFile, fichier source + // $duree=timeout pour changement de page (-1 = aucun) + + $fileHandle = fopen($dumpFile, "a"); + + if (!$fileHandle) { + echo $LANG['document'][45]." : $dumpFile
"; + return false; + } + + if ($offsettable == 0 && $offsetrow == -1) { + $time_file = date("Y-m-d-H-i"); + $cur_time = date("Y-m-d H:i"); + $todump = "#GLPI Dump database on $cur_time\n"; + fwrite ($fileHandle,$todump); + } + + $result = $DB->list_tables(); + $numtab = 0; + while ($t = $DB->fetch_array($result)) { + // on se limite aux tables prefixees _glpi + if (strstr($t[0],"glpi_")) { + $tables[$numtab] = $t[0]; + $numtab++; + } + } + + for ( ; $offsettable<$numtab ; $offsettable++) { + // Dump de la structure table + if ($offsetrow == -1) { + $todump = "\n".get_def($DB,$tables[$offsettable]); + fwrite ($fileHandle,$todump); + $offsetrow++; + $cpt++; + } + current_time(); + if ($duree > 0 && $TPSCOUR >= $duree) { //on atteint la fin du temps imparti + return true; + } + $fin = 0; + while (!$fin) { + $todump = get_content($DB,$tables[$offsettable],$offsetrow,$rowlimit); + $rowtodump = substr_count($todump, "INSERT INTO"); + if ($rowtodump >0) { + fwrite ($fileHandle,$todump); + $cpt += $rowtodump; + $offsetrow += $rowlimit; + if ($rowtodump<$rowlimit) { + $fin = 1; + } + current_time(); + if ($duree >0 && $TPSCOUR >= $duree) { //on atteint la fin du temps imparti + return true; + } + } else { + $fin = 1; + $offsetrow = -1; + } + } + if ($fin) { + $offsetrow = -1; + } + current_time(); + if ($duree > 0 && $TPSCOUR >= $duree) { //on atteint la fin du temps imparti + return true; + } + } + if ($DB->error()) { + echo "
".$LANG['backup'][23]." [$formattedQuery]
".$DB->error()."
"; + } + $offsettable = -1; + fclose($fileHandle); + return true; +} + + +// #################" DUMP sql################################# +//logInFile('php-errors',"requete1=".print_r($_REQUEST,true)."\n"); + +if (isset($_GET["dump"]) && $_GET["dump"] != "") { + $time_file = date("Y-m-d-H-i"); + $cur_time = date("Y-m-d H:i"); + $filename = $path . "/glpi-".GLPI_VERSION."-$time_file.$filetype"; + + if (!isset($_GET["duree"]) && is_file($filename)) { + echo "
".$LANG['backup'][21]."
"; + } else { + init_time(); //initialise le temps + //debut de fichier + if (!isset($_GET["offsettable"])) { + $offsettable = 0; + } else { + $offsettable = $_GET["offsettable"]; + } + //debut de fichier + if (!isset($_GET["offsetrow"])) { + $offsetrow = -1; + } else { + $offsetrow = $_GET["offsetrow"]; + } + //timeout de 5 secondes par defaut, -1 pour utiliser sans timeout + if (!isset($_GET["duree"])) { + $duree = $defaulttimeout; + } else { + $duree = $_GET["duree"]; + } + //Limite de lignes a dumper a chaque fois + if (!isset($_GET["rowlimit"])) { + $rowlimit = $defaultrowlimit; + } else { + $rowlimit = $_GET["rowlimit"]; + } + + //si le nom du fichier n'est pas en parametre le mettre ici + if (!isset($_GET["fichier"])) { + $fichier = $filename; + } else { + $fichier = $_GET["fichier"]; + } + + $tab = $DB->list_tables(); + $tot = $DB->numrows($tab); + if (isset($offsettable)) { + if ($offsettable >= 0) { + $percent = min(100,round(100*$offsettable/$tot,0)); + } else { + $percent = 100; + } + } else { + $percent = 0; + } + + if ($percent >= 0) { + displayProgressBar(400,$percent); + } + + if ($offsettable >= 0) { + if (backupMySql($DB,$fichier,$duree,$rowlimit)) { + echo "
". + $LANG['backup'][24].""; + echo ""; + glpi_flush(); + exit; + } + } + } +} + + +// ############################## fin dump sql########################"""" + + +// ################################## dump XML ############################# + +if (isset($_GET["xmlnow"]) && $_GET["xmlnow"] !="") { + xmlbackup(); +} + +// ################################## fin dump XML ############################# + +if (isset($_GET["file"]) + && $_GET["file"] != "" + && is_file($path."/".$_GET["file"])) { + + $_SESSION['TRY_OLD_CONFIG_FIRST'] = true; + init_time(); //initialise le temps + //debut de fichier + if (!isset($_GET["offset"])) { + $offset = 0; + } else { + $offset = $_GET["offset"]; + } + //timeout de 5 secondes par defaut, -1 pour utiliser sans timeout + if (!isset($_GET["duree"])) { + $duree = $defaulttimeout; + } else { + $duree = $_GET["duree"]; + } + $fsize = filesize($path."/".$_GET["file"]); + if (isset($offset)) { + if ($offset == -1) { + $percent = 100; + } else { + $percent = min(100,round(100*$offset/$fsize,0)); + } + } else { + $percent = 0; + } + + if ($percent >= 0) { + displayProgressBar(400,$percent); + } + + if ($offset != -1) { + if (restoreMySqlDump($DB,$path."/".$_GET["file"],$duree)) { + echo "
".$LANG['backup'][24].""; + echo ""; + glpi_flush(); + exit; + } + } else { + optimize_tables(NULL, true); + // Compatiblity for old version for utf8 complete conversion + $cnf = new Config(); + $input['id'] = 1; + $input['utf8_conv'] = 1; + $cnf->update($input); + } +} + +if (isset($_GET["delfile"]) && $_GET["delfile"] != "") { + $filename = $_GET["delfile"]; + if (is_file($path."/".$_GET["delfile"])) { + unlink($path."/".$_GET["delfile"]); + echo "
".$filename." ".$LANG['common'][28]."
"; + } +} + +if (haveRight("check_update","r")) { + echo "
"; + echo "
"; + echo "".$LANG['setup'][300].""; + echo "

"; +} + +// Title backup +echo "
". + "\"".$LANG['common'][28]."\"". + "". + $LANG['backup'][0]."". + "". + $LANG['backup'][1]."
"; + +?> + + +
+ + + + + + + + $date) { + $taille_fic = filesize($path."/".$file)/1024; + $taille_fic = (int)$taille_fic; + echo "". + "". + "". + "". + "". + ""; + } +} +closedir($dir); + +$dir = opendir($path); +unset($files); +$files = array(); +while ($file = readdir ($dir)) { + if ($file != "." + && $file != ".." + && preg_match("/\.xml$/i",$file)) { + + $files[$file]=filemtime($path."/".$file); + } +} +arsort($files); +if (count($files)) { + foreach ($files as $file => $date) { + $taille_fic = filesize($path."/".$file)/1024; + $taille_fic = (int)$taille_fic; + echo "". + "". + "". + "". + "". + "". + ""; + } +} +closedir($dir); +?> +
 
$file  " . $taille_fic . " kB   " . convDateTime(date("Y-m-d H:i",$date)) . " ".$LANG['buttons'][6]."  ".$LANG['buttons'][21]."  ".$LANG['backup'][13]."". + "

$file  " . $taille_fic . " kB   " . convDateTime(date("Y-m-d H:i",$date)) . " ".$LANG['buttons'][6]."     -   ".$LANG['backup'][13]."". + "
+
+ diff --git a/0.78-bugfixes/front/bookmark.php b/0.78-bugfixes/front/bookmark.php new file mode 100644 index 0000000000000000000000000000000000000000..4e14291e533e8a841d5ff917b9810cdff05f34b7 --- /dev/null +++ b/0.78-bugfixes/front/bookmark.php @@ -0,0 +1,124 @@ +check(-1,'w',$_POST); + + $bookmark->add($_POST); + $_GET["action"] = "load"; + +} else if (isset($_POST["update"])) { + $bookmark->check($_POST["id"], 'w'); // Right to update the bookmark + $bookmark->check(-1, 'w', $_POST); // Right when entity change + + $bookmark->update($_POST); + $_GET["action"] = "load"; + +} else if ($_GET["action"] == "edit" && isset($_GET['mark_default']) && isset($_GET["id"])) { + $bookmark->check($_GET["id"],'w'); + + if ($_GET["mark_default"] >0) { + $bookmark->mark_default($_GET["id"]); + } else if ($_GET["mark_default"]==0) { + $bookmark->unmark_default($_GET["id"]); + } + $_GET["action"]="load"; + +} else if ($_GET["action"] == "load" && isset($_GET["id"]) && $_GET["id"]>0) { + $bookmark->check($_GET["id"],'r'); + $bookmark->load($_GET["id"]); + +} else if (isset($_POST["delete"])) { + $bookmark->check($_POST["id"],'w'); + + $bookmark->delete($_POST); + $_GET["action"] = "load"; + +} else if (isset($_POST["delete_several"])) { + if (isset($_POST["bookmark"])) { + foreach ($_POST["bookmark"] as $ID=>$value) { + if ($bookmark->can($ID,'w')) { + $bookmark->delete(array("id" => $ID)); + } + } + } + $_GET["action"] = "load"; +} + +if ($_GET["action"] == "edit") { + + if (isset($_GET['id']) && $_GET['id']>0) { + // Modify + $bookmark->check($_GET["id"],'w'); + $bookmark->showForm($_GET['id']); + } else { + // Create + $bookmark->check(-1,'w'); + $bookmark->showForm(0, array('type' => $_GET["type"], + 'url' => rawurldecode($_GET["url"]), + 'itemtype' => $_GET["itemtype"])); + } +} else { + echo '
'; + $tabs[1] = array('title' => $LANG['common'][88], + 'url' => $CFG_GLPI['root_doc']."/ajax/bookmark.tabs.php", + 'params' => "target=".$_SERVER['PHP_SELF']."&glpi_tab=1&itemtype=Bookmark"); + + if (haveRight('bookmark_public','r')) { + $tabs[0] = array('title' => $LANG['common'][76], + 'url' => $CFG_GLPI['root_doc']."/ajax/bookmark.tabs.php", + 'params' => "target=".$_SERVER['PHP_SELF']."&glpi_tab=0&itemtype=Bookmark"); + } + echo "
"; + createAjaxTabs('tabspanel','tabcontent',$tabs,'Bookmark',480); + echo "
"; + echo ""; +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/budget.form.php b/0.78-bugfixes/front/budget.form.php new file mode 100644 index 0000000000000000000000000000000000000000..d29485d406c4fa0edb40ab5e118b766fad3d8ad3 --- /dev/null +++ b/0.78-bugfixes/front/budget.form.php @@ -0,0 +1,94 @@ +check(-1,'w',$_POST); + + if ($newID = $budget->add($_POST)) { + Event::log($newID, "budget", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $budget->check($_POST["id"],'w'); + + if ($budget->delete($_POST)) { + Event::log($_POST["id"], "budget", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][22]); + } + $budget->redirectToList(); + +} else if (isset($_POST["restore"])) { + $budget->check($_POST["id"],'w'); + + if ($budget->restore($_POST)) { + Event::log($_POST["id"], "budget", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][23]); + } + $budget->redirectToList(); + +} else if (isset($_REQUEST["purge"])) { + $budget->check($_REQUEST["id"],'w'); + + if ($budget->delete($_REQUEST,1)) { + Event::log($_REQUEST["id"], "budget", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][24]); + } + $budget->redirectToList(); + +} else if (isset($_POST["update"])) { + $budget->check($_POST["id"],'w'); + + if ($budget->update($_POST)) { + Event::log($_POST["id"], "budget", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['financial'][87],$_SERVER['PHP_SELF'],"financial","budget"); + $budget->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"])); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/budget.php b/0.78-bugfixes/front/budget.php new file mode 100644 index 0000000000000000000000000000000000000000..431e18d8c374a7bd57b0393a7d89e993d3dbc6a4 --- /dev/null +++ b/0.78-bugfixes/front/budget.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/cartridge.form.php b/0.78-bugfixes/front/cartridge.form.php new file mode 100644 index 0000000000000000000000000000000000000000..c46b129bff5224f82a18ee63e04b1b833612a8ef --- /dev/null +++ b/0.78-bugfixes/front/cartridge.form.php @@ -0,0 +1,108 @@ +check($_POST["cID"],'w'); + + if ($cart->updatePages($_POST['pages'])) { + Event::log(0, "cartridges", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][94]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["add_several"])) { + $cartype->check($_POST["tID"],'w'); + + for ($i=0 ; $i<$_POST["to_add"] ; $i++) { + unset($cart->fields["id"]); + $cart->add($_POST); + } + Event::log($_POST["tID"], "cartridges", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][88].": ".$_POST["to_add"]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["delete"])) { + $cartype->check($_GET["tID"],'w'); + + checkRight("cartridge","w"); + if ($cart->delete($_GET)) { + Event::log($_GET["tID"], "cartridges", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][90]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["restore"])) { + $cartype->check($_GET["tID"],'w'); + + if ($cart->restore($_GET)) { + Event::log($_GET["tID"], "cartridges", 5, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][92]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["install"])) { + $cartype->check($_POST["tID"],'w'); + + if ($cart->install($_POST["pID"],$_POST["tID"])) { + Event::log($_POST["tID"], "cartridges", 5, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][95]); + } + glpi_header($CFG_GLPI["root_doc"]."/front/printer.form.php?id=".$_POST["pID"]); + +} else if (isset($_GET["uninstall"])) { + $cartype->check($_GET["tID"],'w'); + + if ($cart->uninstall($_GET["id"])) { + Event::log($_GET["tID"], "cartridges", 5, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][96]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + glpi_header($_SERVER['HTTP_REFERER']); +} +?> diff --git a/0.78-bugfixes/front/cartridgeitem.form.php b/0.78-bugfixes/front/cartridgeitem.form.php new file mode 100644 index 0000000000000000000000000000000000000000..5640349244d16c9de3524a1ac909b40149b97e00 --- /dev/null +++ b/0.78-bugfixes/front/cartridgeitem.form.php @@ -0,0 +1,110 @@ +check(-1,'w',$_POST); + + if ($newID = $cartype->add($_POST)) { + Event::log($newID, "cartridges", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $cartype->check($_POST["id"],'w'); + + if ($cartype->delete($_POST)) { + Event::log($_POST["id"], "cartridges", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][22]); + } + $cartype->redirectToList(); + +} else if (isset($_POST["restore"])) { + $cartype->check($_POST["id"],'w'); + + if ($cartype->restore($_POST)) { + Event::log($_POST["id"], "cartridges", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][23]); + } + $cartype->redirectToList(); + +} else if (isset($_POST["purge"])) { + $cartype->check($_POST["id"],'w'); + + if ($cartype->delete($_POST,1)) { + Event::log($_POST["id"], "cartridges", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][24]); + } + $cartype->redirectToList(); + +} else if (isset($_POST["update"])) { + $cartype->check($_POST["id"],'w'); + + if ($cartype->update($_POST)) { + Event::log($_POST["id"], "cartridges", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["addtype"])) { + $cartype->check($_POST["tID"],'w'); + + if ($cartype->addCompatibleType($_POST["tID"],$_POST["printermodels_id"])) { + Event::log($_POST["tID"], "cartridges", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][30]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["deletetype"])) { + $cartype->check($_GET["tID"],'w'); + + if ($cartype->deleteCompatibleType($_GET["id"])) { + Event::log($_GET["tID"], "cartridges", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][31]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][21],$_SERVER['PHP_SELF'],"inventory","cartridge"); + $cartype->showForm($_GET["id"]); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/cartridgeitem.php b/0.78-bugfixes/front/cartridgeitem.php new file mode 100644 index 0000000000000000000000000000000000000000..ec2849f5cfee165a7bec59d8df875a6c54e4ca01 --- /dev/null +++ b/0.78-bugfixes/front/cartridgeitem.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/cartridgeitemtype.form.php b/0.78-bugfixes/front/cartridgeitemtype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..7b0a798798e372001c26050917d8e31b11af3319 --- /dev/null +++ b/0.78-bugfixes/front/cartridgeitemtype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/cartridgeitemtype.php b/0.78-bugfixes/front/cartridgeitemtype.php new file mode 100644 index 0000000000000000000000000000000000000000..d80d88226adc8d6a89f627f795bad2093407c769 --- /dev/null +++ b/0.78-bugfixes/front/cartridgeitemtype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/central.php b/0.78-bugfixes/front/central.php new file mode 100644 index 0000000000000000000000000000000000000000..9d54bb2790aa172583296978fa969658ea4aeab7 --- /dev/null +++ b/0.78-bugfixes/front/central.php @@ -0,0 +1,78 @@ +show(); + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/computer.form.php b/0.78-bugfixes/front/computer.form.php new file mode 100644 index 0000000000000000000000000000000000000000..3f50fa1a9713fc670b98e07cf5648997dd18889f --- /dev/null +++ b/0.78-bugfixes/front/computer.form.php @@ -0,0 +1,227 @@ +check(-1,'w',$_POST); + + if ($newID = $computer->add($_POST)) { + Event::log($newID, "computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +// delete a computer +} else if (isset($_POST["delete"])) { + $computer->check($_POST['id'],'d'); + $ok = $computer->delete($_POST); + if ($ok) { + Event::log($_POST["id"], "computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][22]." ".$computer->getField('name')); + } + $computer->redirectToList(); + +} else if (isset($_POST["restore"])) { + $computer->check($_POST['id'],'d'); + + if ($computer->restore($_POST)) { + Event::log($_POST["id"],"computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][23]." ".$computer->getField('name')); + } + $computer->redirectToList(); + +} else if (isset($_REQUEST["purge"])) { + $computer->check($_REQUEST['id'],'d'); + + if ($computer->delete($_REQUEST,1)) { + Event::log($_REQUEST["id"], "computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][24]." ".$computer->getField('name')); + } + $computer->redirectToList(); + +//update a computer +} else if (isset($_POST["update"])) { + $computer->check($_POST['id'],'w'); + + $computer->update($_POST); + Event::log($_POST["id"], "computers", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][21]); + + glpi_header($_SERVER['HTTP_REFERER']); + +// Disconnect a computer from a printer/monitor/phone/peripheral +} else if (isset($_GET["disconnect"])) { + $conn = new Computer_Item(); + $conn->check($_GET["id"], 'w'); + $conn->delete($_GET); + $computer->check($_GET['computers_id'],'w'); + + Event::log($_GET["computers_id"], "computers", 5, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][26]); + glpi_header($_SERVER['HTTP_REFERER']); + +// Connect a computer to a printer/monitor/phone/peripheral +} else if (isset($_POST["connect"]) && isset($_POST["items_id"]) && $_POST["items_id"]>0) { + $conn = new Computer_Item(); + $conn->check(-1, 'w', $_POST); + $conn->add($_POST); + Event::log($_POST["computers_id"], "computers", 5, "inventory", + $_SESSION["glpiname"] ." ".$LANG['log'][27]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_monitor"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["lockmonitor"]) && count($_POST["lockmonitor"])) { + foreach ($_POST["lockmonitor"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"import_monitor"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); +} else if (isset($_POST["unlock"])) { + $computer->check($_POST['id'],'w'); + + $actions = array("lockprinter"=> "import_printer", + "locksoft" => "import_software", + "lockdisk" => "import_disk", + "lockmonitor"=> "import_monitor", + "lockperiph" => "import_peripheral", + "lockip" => "import_ip", + "lockdevice" => "import_device", + "lockfield" => "computer_update"); + foreach ($actions as $lock => $field) { + if (isset($_POST[$lock]) && count($_POST[$lock])) { + foreach ($_POST[$lock] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,$field); + } + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_printer"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["lockprinter"]) && count($_POST["lockprinter"])) { + foreach ($_POST["lockprinter"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"import_printer"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_soft"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["locksoft"]) && count($_POST["locksoft"])) { + foreach ($_POST["locksoft"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"import_software"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_disk"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["lockdisk"]) && count($_POST["lockdisk"])) { + foreach ($_POST["lockdisk"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"import_disk"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_periph"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["lockperiph"]) && count($_POST["lockperiph"])) { + foreach ($_POST["lockperiph"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"import_peripheral"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_ip"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["lockip"]) && count($_POST["lockip"])) { + foreach ($_POST["lockip"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"import_ip"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["unlock_field"])) { + $computer->check($_POST['id'],'w'); + + if (isset($_POST["lockfield"]) && count($_POST["lockfield"])) { + foreach ($_POST["lockfield"] as $key => $val) { + OcsServer::deleteInOcsArray($_POST["id"],$key,"computer_update"); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["force_ocs_resynch"])) { + $computer->check($_POST['id'],'w'); + + //Get the ocs server id associated with the machine + $ocsservers_id = OcsServer::getByMachineID($_POST["id"]); + + //Update the computer + OcsServer::updateComputer($_POST["resynch_id"],$ocsservers_id,1,1); + glpi_header($_SERVER['HTTP_REFERER']); + +} else {//print computer informations + commonHeader($LANG['Menu'][0],$_SERVER['PHP_SELF'],"inventory","computer"); + //show computer form to add + $computer->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"])); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/computer.php b/0.78-bugfixes/front/computer.php new file mode 100644 index 0000000000000000000000000000000000000000..6133ab8182e47bb33ef4ccd7f2c4f5b4e66085c6 --- /dev/null +++ b/0.78-bugfixes/front/computer.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/computer_device.form.php b/0.78-bugfixes/front/computer_device.form.php new file mode 100644 index 0000000000000000000000000000000000000000..ad0afbf62716495840ab997d2831eb894aea99a0 --- /dev/null +++ b/0.78-bugfixes/front/computer_device.form.php @@ -0,0 +1,55 @@ +check(-1, 'w', $_POST); + $compdev->add($_POST); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["updateall"])){ + $compdev->check(-1, 'w', $_POST); + $compdev->updateAll($_POST); + Event::log($_POST["computers_id"],"computers",4,"inventory",$_SESSION["glpiname"] ." ".$LANG['log'][28]); + glpi_header($_SERVER['HTTP_REFERER']); + +} +displayErrorAndDie('Lost'); +?> diff --git a/0.78-bugfixes/front/computer_softwareversion.form.php b/0.78-bugfixes/front/computer_softwareversion.form.php new file mode 100644 index 0000000000000000000000000000000000000000..12dd1326cae8cea1fc3516af7fb9b0d929870313 --- /dev/null +++ b/0.78-bugfixes/front/computer_softwareversion.form.php @@ -0,0 +1,115 @@ +add(array('computers_id' => $_REQUEST["computers_id"], + 'softwareversions_id' => $_REQUEST["softwareversions_id"])); + + Event::log($_REQUEST["computers_id"], "computers", 5, "inventory", + $_SESSION["glpiname"]." installed software."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +// From Computer - Software tab (installed software) +} else if (isset($_GET["uninstall"])) { + checkRight("software","w"); + $inst->delete(array('id'=>$_GET["id"])); + + Event::log($_GET["computers_id"], "computers", 5, "inventory", + $_SESSION["glpiname"]." uninstalled software."); + glpi_header($_SERVER['HTTP_REFERER']); + +// From Computer - Software tab (installed software) +} else if (isset($_POST["massuninstall"])) { + checkRight("software","w"); + foreach ($_POST as $key => $val) { + if (preg_match("/softversion_([0-9]+)/",$key,$ereg)) { + $inst->delete(array('id' => $ereg[1])); + } + } + Event::log($_POST["computers_id"], "computers", 5, "inventory", + $_SESSION["glpiname"]." uninstalled software."); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["massinstall"]) && isset($_POST["computers_id"])) { + checkRight("software","w"); + foreach ($_POST as $key => $val) { + if (preg_match("/softversion_([0-9]+)/",$key,$ereg)) { + if ($ereg[1] > 0) { + $inst->add(array('computers_id' => $_POST["computers_id"], + 'softwareversions_id' => $ereg[1])); + } + } + } + Event::log($_POST["computers_id"], "computers", 5, "inventory", + $_SESSION["glpiname"]." installed software."); + glpi_header($_SERVER['HTTP_REFERER']); + +// From installation list on Software form +} else if (isset($_POST["deleteinstalls"])) { + checkRight("software","w"); + + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $inst->delete(array('id' => $key)); + Event::log($_POST["softwares_id"], "software", 5, "inventory", + $_SESSION["glpiname"]." uninstalled software for several computers."); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["moveinstalls"])) { + checkRight("software","w"); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1 && $_POST['versionID'] > 0) { + $inst->upgrade($key, $_POST['versionID']); + Event::log($_POST["softwares_id"], "software", 5, "inventory", + $_SESSION["glpiname"]." change version of versions installed on computers."); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} +displayErrorAndDie('Lost'); +?> diff --git a/0.78-bugfixes/front/computerdisk.form.php b/0.78-bugfixes/front/computerdisk.form.php new file mode 100644 index 0000000000000000000000000000000000000000..0faf7c396bbb0ecbece8b49858927ddcd22959e6 --- /dev/null +++ b/0.78-bugfixes/front/computerdisk.form.php @@ -0,0 +1,84 @@ +check(-1,'w',$_POST); + + if ($newID = $disk->add($_POST)) { + Event::log($_POST['computers_id'], "computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $disk->check($_POST["id"],'w'); + + if ($disk->delete($_POST)) { + Event::log($disk->fields['computers_id'], "computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + $computer = new Computer(); + $computer->getFromDB($disk->fields['computers_id']); + glpi_header(getItemTypeFormURL('Computer').'?id='.$disk->fields['computers_id']. + ($computer->fields['is_template']?"&withtemplate=1":"")); + +} else if (isset($_POST["update"])) { + $disk->check($_POST["id"],'w'); + + if ($disk->update($_POST)) { + Event::log($disk->fields['computers_id'], "computers", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][21]." ".$_POST["id"]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][0],$_SERVER['PHP_SELF'],"inventory","computer"); + $disk->showForm($_GET["id"], array('computers_id' => $_GET["computers_id"])); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/computermodel.form.php b/0.78-bugfixes/front/computermodel.form.php new file mode 100644 index 0000000000000000000000000000000000000000..9b2a4a5e0cf40ca4d1905aaf9716a5f2cc8c4f2b --- /dev/null +++ b/0.78-bugfixes/front/computermodel.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/computermodel.php b/0.78-bugfixes/front/computermodel.php new file mode 100644 index 0000000000000000000000000000000000000000..7ea877fb95cab46bd9765e1d9c8d2be51b9eb965 --- /dev/null +++ b/0.78-bugfixes/front/computermodel.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/computertype.form.php b/0.78-bugfixes/front/computertype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..7794d98bbbbd44a6419080cee4d2e86b1cc5546f --- /dev/null +++ b/0.78-bugfixes/front/computertype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/computertype.php b/0.78-bugfixes/front/computertype.php new file mode 100644 index 0000000000000000000000000000000000000000..3329c24cea96f8ea7358fe5b8e4d06a753ea9346 --- /dev/null +++ b/0.78-bugfixes/front/computertype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/config.form.php b/0.78-bugfixes/front/config.form.php new file mode 100644 index 0000000000000000000000000000000000000000..ffd2a61bc5c218ce310eb788032e9e3af7ea9fea --- /dev/null +++ b/0.78-bugfixes/front/config.form.php @@ -0,0 +1,64 @@ +update($_POST); + glpi_header($_SERVER['HTTP_REFERER']); +} +if (!empty ($_POST["update"])) { + $config->update($_POST); + if (isset($_POST["use_ocs_mode"]) + && $_POST["use_ocs_mode"] + && !$CFG_GLPI["use_ocs_mode"]) { + glpi_header(getItemTypeSearchURL('OcsServer')); + } else { + glpi_header(getItemTypeFormURL('Config')); + } +} + +commonHeader($LANG['common'][12], $_SERVER['PHP_SELF'],"config","config"); +$config->showForm(1); +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/consumable.form.php b/0.78-bugfixes/front/consumable.form.php new file mode 100644 index 0000000000000000000000000000000000000000..9c48fadd85c121d9f8de2eae749e6b6206e44858 --- /dev/null +++ b/0.78-bugfixes/front/consumable.form.php @@ -0,0 +1,98 @@ +check($_POST["tID"],'w'); + + for ($i=0 ; $i<$_POST["to_add"] ; $i++) { + unset($con->fields["id"]); + $con->add($_POST); + } + Event::log($_POST["tID"], "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][89].": ".$_POST["to_add"]); + + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["delete"])) { + $constype->check($_GET["tID"],'w'); + + if ($con->delete($_GET)) { + Event::log($_GET["tID"], "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][91]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["give"])) { + $constype->check($_POST["tID"],'w'); + + if ($_POST["users_id"] >0) { + if (isset($_POST["out"])) { + foreach ($_POST["out"] as $key => $val) { + $con->out($key,$_POST["users_id"]); + } + } + Event::log($_POST["tID"], "consumables", 5, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][97]." ".$_POST["users_id"]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["restore"])) { + $constype->check($_GET["tID"],'w'); + + if ($con->restore($_GET)) { + Event::log($_GET["tID"], "consumables", 5, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][93]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + glpi_header($_SERVER['HTTP_REFERER']); +} + +?> diff --git a/0.78-bugfixes/front/consumableitem.form.php b/0.78-bugfixes/front/consumableitem.form.php new file mode 100644 index 0000000000000000000000000000000000000000..25332bdbfc4e96968825fe6978b04203c834a5fe --- /dev/null +++ b/0.78-bugfixes/front/consumableitem.form.php @@ -0,0 +1,97 @@ +check(-1,'w',$_POST); + + if ($newID = $constype->add($_POST)) { + Event::log($newID, "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $constype->check($_POST["id"],'w'); + + if ($constype->delete($_POST)) { + Event::log($_POST["id"], "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][22]); + } + $constype->redirectToList(); + +} else if (isset($_POST["restore"])) { + $constype->check($_POST["id"],'w'); + + if ($constype->restore($_POST)) { + Event::log($_POST["id"], "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][23]); + } + $constype->redirectToList(); + +} else if (isset($_POST["purge"])) { + $constype->check($_POST["id"],'w'); + + if ($constype->delete($_POST,1)) { + Event::log($_POST["id"], "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][24]); + } + $constype->redirectToList(); + +} else if (isset($_POST["update"])) { + $constype->check($_POST["id"],'w'); + + if ($constype->update($_POST)) { + Event::log($_POST["id"], "consumables", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][32],$_SERVER['PHP_SELF'],"inventory","consumable"); + $constype->showForm($_GET["id"]); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/consumableitem.php b/0.78-bugfixes/front/consumableitem.php new file mode 100644 index 0000000000000000000000000000000000000000..b50631632548719997d530944b7b1f26613b8202 --- /dev/null +++ b/0.78-bugfixes/front/consumableitem.php @@ -0,0 +1,53 @@ + diff --git a/0.78-bugfixes/front/consumableitemtype.form.php b/0.78-bugfixes/front/consumableitemtype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..7040327ff495bffda60eeadb85b90ff6736c09cd --- /dev/null +++ b/0.78-bugfixes/front/consumableitemtype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/consumableitemtype.php b/0.78-bugfixes/front/consumableitemtype.php new file mode 100644 index 0000000000000000000000000000000000000000..3575441309b96e960830b19364d421729e63ffe1 --- /dev/null +++ b/0.78-bugfixes/front/consumableitemtype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/contact.form.php b/0.78-bugfixes/front/contact.form.php new file mode 100644 index 0000000000000000000000000000000000000000..16155bf437d651367529ac51e2a2ad0668d36a85 --- /dev/null +++ b/0.78-bugfixes/front/contact.form.php @@ -0,0 +1,121 @@ +check($_GET["id"],'r'); + $contact->generateVcard(); +} else if (isset($_POST["add"])) { + $contact->check(-1,'w',$_POST); + + if ($newID = $contact->add($_POST)) { + Event::log($newID, "contacts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $contact->check($_POST["id"],'w'); + + if ($contact->delete($_POST)) { + Event::log($_POST["id"], "contacts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][22]); + } + $contact->redirectToList(); + +} else if (isset($_POST["restore"])) { + $contact->check($_POST["id"],'w'); + + if ($contact->restore($_POST)) { + Event::log($_POST["id"], "contacts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][23]); + } + $contact->redirectToList(); + +} else if (isset($_POST["purge"])) { + $contact->check($_POST["id"],'w'); + + if ($contact->delete($_POST,1)) { + Event::log($_POST["id"], "contacts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][24]); + } + $contact->redirectToList(); + +} else if (isset($_POST["update"])) { + $contact->check($_POST["id"],'w'); + + if ($contact->update($_POST)) { + Event::log($_POST["id"], "contacts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["addcontactsupplier"])) { + $contactsupplier->check(-1,'w',$_POST); + + if (isset($_POST["contacts_id"]) && $_POST["contacts_id"] > 0 + && isset($_POST["suppliers_id"]) && $_POST["suppliers_id"] > 0) { + if ($contactsupplier->add($_POST)) { + Event::log($_POST["contacts_id"], "contacts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][34]); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["deletecontactsupplier"])) { + $contactsupplier->check($_GET["id"],'w'); + + if ($contactsupplier->delete($_GET)) { + Event::log($_GET["contacts_id"], "contacts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][35]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][22],$_SERVER['PHP_SELF'],"financial","contact"); + $contact->showForm($_GET["id"],''); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/contact.php b/0.78-bugfixes/front/contact.php new file mode 100644 index 0000000000000000000000000000000000000000..4dd79ab39caad399195aca8fe2d83ba298b357e3 --- /dev/null +++ b/0.78-bugfixes/front/contact.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/contacttype.form.php b/0.78-bugfixes/front/contacttype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..accbb55af55b6b4bf96862417759c5e1cfebe8e6 --- /dev/null +++ b/0.78-bugfixes/front/contacttype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/contacttype.php b/0.78-bugfixes/front/contacttype.php new file mode 100644 index 0000000000000000000000000000000000000000..c3b12e816e13c5d488c4f40fb8cf7bfa420ad9f8 --- /dev/null +++ b/0.78-bugfixes/front/contacttype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/contract.form.php b/0.78-bugfixes/front/contract.form.php new file mode 100644 index 0000000000000000000000000000000000000000..3572673f85a86baa377f99e595af8280561619e5 --- /dev/null +++ b/0.78-bugfixes/front/contract.form.php @@ -0,0 +1,143 @@ +check(-1,'w',$_POST); + + if ($newID = $contract->add($_POST)) { + Event::log($newID, "contracts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["num"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $contract->check($_POST['id'],'w'); + + if ($contract->delete($_POST)) { + Event::log($_POST["id"], "contracts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][22]); + } + $contract->redirectToList(); + +} else if (isset($_POST["restore"])) { + $contract->check($_POST['id'],'w'); + + if ($contract->restore($_POST)) { + Event::log($_POST["id"], "contracts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][23]); + } + $contract->redirectToList(); + +} else if (isset($_POST["purge"])) { + $contract->check($_POST['id'],'w'); + + if ($contract->delete($_POST,1)) { + Event::log($_POST["id"], "contracts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][24]); + } + $contract->redirectToList(); + +} else if (isset($_POST["update"])) { + $contract->check($_POST['id'],'w'); + + if ($contract->update($_POST)) { + Event::log($_POST["id"], "contracts", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["additem"])) { + $contractitem->check(-1,'w',$_POST); + + if ($contractitem->add($_POST)) { + Event::log($_POST["contracts_id"], "contracts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][32]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["deleteitem"])) { + if (count($_POST["item"])) { + foreach ($_POST["item"] as $key => $val) { + if ($contractitem->can($key,'w')) { + $contractitem->delete(array('id' => $key)); + } + } + } + Event::log($_POST["contracts_id"], "contracts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][33]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["deleteitem"])) { + $contractitem->check($_GET["id"], 'w'); + + if ($contractitem->delete($_GET)) { + Event::log($_GET["contracts_id"], "contracts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][33]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["addcontractsupplier"])) { + $contractsupplier->check(-1,'w',$POST); + + if ($contractsupplier->add($_POST)) { + Event::log($_POST["contracts_id"], "contracts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][34]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["deletecontractsupplier"])) { + $contractsupplier->check($_GET['id'],'w'); + + if ($contractsupplier->delete($_GET)) { + Event::log($_GET["contracts_id"], "contracts", 4, "financial", + $_SESSION["glpiname"]." ".$LANG['log'][35]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][25],$_SERVER['PHP_SELF'],"financial","contract"); + $contract->showForm($_GET["id"]); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/contract.php b/0.78-bugfixes/front/contract.php new file mode 100644 index 0000000000000000000000000000000000000000..1634f5f4fd31ac11db3b9668500ff8b8b67cdde6 --- /dev/null +++ b/0.78-bugfixes/front/contract.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/contracttype.form.php b/0.78-bugfixes/front/contracttype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..5efa69c600fcfc192e1897175c105c7b541df811 --- /dev/null +++ b/0.78-bugfixes/front/contracttype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/contracttype.php b/0.78-bugfixes/front/contracttype.php new file mode 100644 index 0000000000000000000000000000000000000000..0e889fd73a1d7b4f62e709f4978e71e9bc0e0805 --- /dev/null +++ b/0.78-bugfixes/front/contracttype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/cron.php b/0.78-bugfixes/front/cron.php new file mode 100644 index 0000000000000000000000000000000000000000..5f7d934ee9dc55ba607a693d1e45057c6293403f --- /dev/null +++ b/0.78-bugfixes/front/cron.php @@ -0,0 +1,83 @@ +1){ + // TODO Warning : command line is cron.php 1 2 3 4 : will produce cron.php 10 ! + // Parse command line options + for ($i=1 ; $i<$_SERVER['argc'] ; $i++) { + if (is_numeric($_SERVER['argv'][$i])) { + // Number of tasks + CronTask::launch(CronTask::MODE_EXTERNAL, intval($_SERVER['argv'][$i])); + } else { + // Task name + CronTask::launch(CronTask::MODE_EXTERNAL, $CFG_GLPI['cron_limit'], $_SERVER['argv'][$i]); + } + } + +} else { + // Default from configuration + CronTask::launch(CronTask::MODE_EXTERNAL, $CFG_GLPI['cron_limit']); +} + +?> diff --git a/0.78-bugfixes/front/crontask.form.php b/0.78-bugfixes/front/crontask.form.php new file mode 100644 index 0000000000000000000000000000000000000000..7acf12a7a0c17f1ac59142e36fd22e8c5cc9e925 --- /dev/null +++ b/0.78-bugfixes/front/crontask.form.php @@ -0,0 +1,69 @@ +update($_POST); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET['resetdate']) && isset($_GET["id"])) { + checkRight('config','w'); + if ($crontask->getFromDB($_GET["id"])) { + $crontask->resetDate(); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET['resetstate']) && isset($_GET["id"])) { + checkRight('config','w'); + if ($crontask->getFromDB($_GET["id"])) { + $crontask->resetState(); + } + glpi_header($_SERVER['HTTP_REFERER']); + +}else { + if (!isset($_GET["id"]) || empty($_GET["id"])) { + exit(); + } + commonHeader($LANG['crontask'][0],$_SERVER['PHP_SELF'],"config","crontask"); + $crontask->showForm($_GET["id"]); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/crontask.php b/0.78-bugfixes/front/crontask.php new file mode 100644 index 0000000000000000000000000000000000000000..0bd647822960145819b7419545cd665cf5e625fc --- /dev/null +++ b/0.78-bugfixes/front/crontask.php @@ -0,0 +1,70 @@ +getNeedToRun(CronTask::MODE_INTERNAL)) { + displayTitle(GLPI_ROOT.'/pics/warning.png', $LANG['crontask'][41], + $LANG['crontask'][41]." : ".$crontask->fields['name'], + array($_SERVER['PHP_SELF']."?execute=1" => $LANG['buttons'][57])); +} else { + displayTitle(GLPI_ROOT.'/pics/ok.png',$LANG['crontask'][43],$LANG['crontask'][43]); +} + +Search::show('CronTask'); + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/device.php b/0.78-bugfixes/front/device.php new file mode 100644 index 0000000000000000000000000000000000000000..d8ec283a0d5ca3052686c805ddd798412000e49a --- /dev/null +++ b/0.78-bugfixes/front/device.php @@ -0,0 +1,51 @@ +"; + +$optgroup = Dropdown::getDeviceItemTypes(); +Dropdown::showItemTypeMenu($LANG['title'][30], $optgroup); +Dropdown::showItemTypeList($optgroup); + +echo ""; +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/devicecase.form.php b/0.78-bugfixes/front/devicecase.form.php new file mode 100644 index 0000000000000000000000000000000000000000..0394d44ff246397a5f0bee57e6c135885c28d579 --- /dev/null +++ b/0.78-bugfixes/front/devicecase.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicecase.php b/0.78-bugfixes/front/devicecase.php new file mode 100644 index 0000000000000000000000000000000000000000..6800354a959b25f54d8ddedadb521ca1b6e72b12 --- /dev/null +++ b/0.78-bugfixes/front/devicecase.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicecasetype.form.php b/0.78-bugfixes/front/devicecasetype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..236c8039b932f8bb7ea122071c88f629c4142c7f --- /dev/null +++ b/0.78-bugfixes/front/devicecasetype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicecasetype.php b/0.78-bugfixes/front/devicecasetype.php new file mode 100644 index 0000000000000000000000000000000000000000..f07ec2964b27f190091094689d267bdf8644d6d3 --- /dev/null +++ b/0.78-bugfixes/front/devicecasetype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicecontrol.form.php b/0.78-bugfixes/front/devicecontrol.form.php new file mode 100644 index 0000000000000000000000000000000000000000..086a308efb26f03989b0f1c96699ec86c0551c3e --- /dev/null +++ b/0.78-bugfixes/front/devicecontrol.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicecontrol.php b/0.78-bugfixes/front/devicecontrol.php new file mode 100644 index 0000000000000000000000000000000000000000..7f128c4176ee20437589b3e82ed581f5f2e3df7c --- /dev/null +++ b/0.78-bugfixes/front/devicecontrol.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicedrive.form.php b/0.78-bugfixes/front/devicedrive.form.php new file mode 100644 index 0000000000000000000000000000000000000000..cfec823649150ced144eb12b03b68226f79f58f3 --- /dev/null +++ b/0.78-bugfixes/front/devicedrive.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicedrive.php b/0.78-bugfixes/front/devicedrive.php new file mode 100644 index 0000000000000000000000000000000000000000..356ea8b75e72309388f467f0301296aecb55730f --- /dev/null +++ b/0.78-bugfixes/front/devicedrive.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicegraphiccard.form.php b/0.78-bugfixes/front/devicegraphiccard.form.php new file mode 100644 index 0000000000000000000000000000000000000000..14b7888f0902ab60c099b65a6c093b61febed6cd --- /dev/null +++ b/0.78-bugfixes/front/devicegraphiccard.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicegraphiccard.php b/0.78-bugfixes/front/devicegraphiccard.php new file mode 100644 index 0000000000000000000000000000000000000000..2933e13557f972566b085576c3a3456c35b66905 --- /dev/null +++ b/0.78-bugfixes/front/devicegraphiccard.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/deviceharddrive.form.php b/0.78-bugfixes/front/deviceharddrive.form.php new file mode 100644 index 0000000000000000000000000000000000000000..112c3a6fcd6f8a5ebc79855207f7b5a30d07d289 --- /dev/null +++ b/0.78-bugfixes/front/deviceharddrive.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/deviceharddrive.php b/0.78-bugfixes/front/deviceharddrive.php new file mode 100644 index 0000000000000000000000000000000000000000..dae53f7c3fe01ebb11ae861c0116d7462e9dcebf --- /dev/null +++ b/0.78-bugfixes/front/deviceharddrive.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicememory.form.php b/0.78-bugfixes/front/devicememory.form.php new file mode 100644 index 0000000000000000000000000000000000000000..fddf2cec900e7186292ba1b3d362a89384f8db9e --- /dev/null +++ b/0.78-bugfixes/front/devicememory.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicememory.php b/0.78-bugfixes/front/devicememory.php new file mode 100644 index 0000000000000000000000000000000000000000..cd8948bd022cbe5099bf92e8136db9fe4e2205e3 --- /dev/null +++ b/0.78-bugfixes/front/devicememory.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicememorytype.form.php b/0.78-bugfixes/front/devicememorytype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..d98e09c380b25531a7e398347d2792bcded90f1d --- /dev/null +++ b/0.78-bugfixes/front/devicememorytype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicememorytype.php b/0.78-bugfixes/front/devicememorytype.php new file mode 100644 index 0000000000000000000000000000000000000000..b5dc5d201d7aa284eb04493336af1036f5616764 --- /dev/null +++ b/0.78-bugfixes/front/devicememorytype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicemotherboard.form.php b/0.78-bugfixes/front/devicemotherboard.form.php new file mode 100644 index 0000000000000000000000000000000000000000..11281e6f32f625e93ce9a03713df34287ef0f3ff --- /dev/null +++ b/0.78-bugfixes/front/devicemotherboard.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicemotherboard.php b/0.78-bugfixes/front/devicemotherboard.php new file mode 100644 index 0000000000000000000000000000000000000000..03ed1d3d855ec9d3cfbccf71ed9a327f7ccf9eec --- /dev/null +++ b/0.78-bugfixes/front/devicemotherboard.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicenetworkcard.form.php b/0.78-bugfixes/front/devicenetworkcard.form.php new file mode 100644 index 0000000000000000000000000000000000000000..45c1b42b67689002b126322e4ee678ea2cec17d2 --- /dev/null +++ b/0.78-bugfixes/front/devicenetworkcard.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicenetworkcard.php b/0.78-bugfixes/front/devicenetworkcard.php new file mode 100644 index 0000000000000000000000000000000000000000..57b869285bdad90ce48e399fec83ed01ee663b74 --- /dev/null +++ b/0.78-bugfixes/front/devicenetworkcard.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicepci.form.php b/0.78-bugfixes/front/devicepci.form.php new file mode 100644 index 0000000000000000000000000000000000000000..226aa085c54765887f9ada5106fd0a5a9b79680c --- /dev/null +++ b/0.78-bugfixes/front/devicepci.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicepci.php b/0.78-bugfixes/front/devicepci.php new file mode 100644 index 0000000000000000000000000000000000000000..76dffe9a803e250a557096c3755d5f8809f08ea4 --- /dev/null +++ b/0.78-bugfixes/front/devicepci.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicepowersupply.form.php b/0.78-bugfixes/front/devicepowersupply.form.php new file mode 100644 index 0000000000000000000000000000000000000000..cd25ce43e11696c201c1ad4d55c48546e7847ebf --- /dev/null +++ b/0.78-bugfixes/front/devicepowersupply.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicepowersupply.php b/0.78-bugfixes/front/devicepowersupply.php new file mode 100644 index 0000000000000000000000000000000000000000..f7193aeea683dc6a78a2e7761e377326e57402de --- /dev/null +++ b/0.78-bugfixes/front/devicepowersupply.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/deviceprocessor.form.php b/0.78-bugfixes/front/deviceprocessor.form.php new file mode 100644 index 0000000000000000000000000000000000000000..13899376913df2a06897e6bee9bb614650439423 --- /dev/null +++ b/0.78-bugfixes/front/deviceprocessor.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/deviceprocessor.php b/0.78-bugfixes/front/deviceprocessor.php new file mode 100644 index 0000000000000000000000000000000000000000..95334545d66b0f8ff8e47ea1d927cf3e5b030d63 --- /dev/null +++ b/0.78-bugfixes/front/deviceprocessor.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/devicesoundcard.form.php b/0.78-bugfixes/front/devicesoundcard.form.php new file mode 100644 index 0000000000000000000000000000000000000000..2cab685ce7c5556523784bfb602e92d15dc5cb40 --- /dev/null +++ b/0.78-bugfixes/front/devicesoundcard.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/devicesoundcard.php b/0.78-bugfixes/front/devicesoundcard.php new file mode 100644 index 0000000000000000000000000000000000000000..7b2ad026248ff673363ab44891d371f661b4a0e7 --- /dev/null +++ b/0.78-bugfixes/front/devicesoundcard.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/dictionnary.php b/0.78-bugfixes/front/dictionnary.php new file mode 100644 index 0000000000000000000000000000000000000000..5ec4c88672646638d663e3c2566cc220a8dea1f2 --- /dev/null +++ b/0.78-bugfixes/front/dictionnary.php @@ -0,0 +1,111 @@ + 'r', + 'rule_dictionnary_software' => 'r')); + +commonHeader($LANG['common'][12],$_SERVER['PHP_SELF'],"admin","dictionnary",-1); + +echo "
"; +echo ""; +echo ""; + +echo ""; + +echo ""; + +echo ""; + +echo "
" . $LANG['rulesengine'][77] . "
"; +echo ""; + +if (haveRight("rule_dictionnary_software","r")) { + echo ""; +} +if (haveRight("rule_dictionnary_dropdown","r")) { + echo ""; +} + +echo "
".$LANG['rulesengine'][80]."
"; + echo "" . $LANG['rulesengine'][35] ."
"; + echo "" . $LANG['rulesengine'][36] ."
"; +if (haveRight("rule_dictionnary_dropdown","r")) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; +} +echo "
".$LANG['rulesengine'][56]."
". + "" . $LANG['rulesengine'][50] . "
". + "" . $LANG['rulesengine'][51] . "
". + "" . $LANG['rulesengine'][54] . "
". + "" . $LANG['rulesengine'][53] . "
". + "" . $LANG['rulesengine'][55] . "
". + "" . $LANG['rulesengine'][52] . "
"; +if (haveRight("rule_dictionnary_dropdown","r")) { + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; +} +echo "
".$LANG['rulesengine'][66]."
". + "" . $LANG['rulesengine'][60] . "
". + "" . $LANG['rulesengine'][61] . "
". + "" . $LANG['rulesengine'][64] . "
". + "" . $LANG['rulesengine'][63] . "
". + "" . $LANG['rulesengine'][65] . "
". + "" . $LANG['rulesengine'][62] . "
"; +if (haveRight("rule_dictionnary_dropdown","r")) { + echo ""; + echo ""; + echo ""; + echo ""; +} +echo "
".$LANG['computers'][9]."
". + "" . $LANG['rulesengine'][67] . "
". + "" . $LANG['rulesengine'][68] . "
". + "" . $LANG['rulesengine'][69] . "
"; +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/displaypreference.form.php b/0.78-bugfixes/front/displaypreference.form.php new file mode 100644 index 0000000000000000000000000000000000000000..a9af7184ae08507355263fd999fc200b4434e62a --- /dev/null +++ b/0.78-bugfixes/front/displaypreference.form.php @@ -0,0 +1,81 @@ + "w", + "search_config" => "w")); + +$setupdisplay = new DisplayPreference(); + +if (isset($_POST["activate"])) { + $setupdisplay->activatePerso($_POST); +} else if (isset($_POST["add"])) { + $setupdisplay->add($_POST); +} else if (isset($_POST["delete"]) || isset($_POST["delete_x"])) { + $setupdisplay->delete($_POST); +} else if (isset($_POST["up"]) || isset($_POST["up_x"])) { + $setupdisplay->orderItem($_POST,'up'); +} else if (isset($_POST["down"]) || isset($_POST["down_x"])) { + $setupdisplay->orderItem($_POST,'down'); +} +if ((strpos($_SERVER['PHP_SELF'],"popup") && $_REQUEST["itemtype"])) { + $tabs[1] = array('title' => $LANG['central'][13], + 'url' => $CFG_GLPI['root_doc']."/ajax/displaypreference.tabs.php", + 'params' => "target=".$_SERVER['PHP_SELF']."&id=-1&glpi_tab=1&itemtype=". + "display&displaytype=".$_REQUEST["itemtype"]); + + $tabs[2] = array('title' => $LANG['central'][12], + 'url' => $CFG_GLPI['root_doc']."/ajax/displaypreference.tabs.php", + 'params' => "target=".$_SERVER['PHP_SELF']."&id=-1&glpi_tab=2&itemtype=". + "display&displaytype=".$_REQUEST["itemtype"]); + + echo "
"; + createAjaxTabs('tabspanel','tabcontent',$tabs,'DisplayPreference'); + echo "
"; + echo ""; +} +if (!strpos($_SERVER['PHP_SELF'],"popup")) { + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/document.form.php b/0.78-bugfixes/front/document.form.php new file mode 100644 index 0000000000000000000000000000000000000000..cd6bfc16ef0b99fed1ae3bb6593ccbb704f518b6 --- /dev/null +++ b/0.78-bugfixes/front/document.form.php @@ -0,0 +1,142 @@ +check(-1,'w',$_POST); + + if (isset($_POST['itemtype']) + && isset($_POST['items_id']) // From item + && isset($_FILES['filename']['tmp_name']) + && $doc->getFromDBbyContent($_POST["entities_id"], $_FILES['filename']['tmp_name'])) { + + $documentitem->add(array('documents_id' => $doc->fields['id'], + 'itemtype' => $_POST['itemtype'], + 'items_id' => $_POST['items_id'])); + } else { + $newID = $doc->add($_POST); + $name = ""; + if (isset($_POST["name"])) { + $name = $_POST["name"]; + } else if (isset($_FILES['filename']) && isset($_FILES['filename']['name'])) { + $name = $_FILES['filename']['name']; + } + Event::log($newID, "documents", 4, "document", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$name."."); + } + + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $doc->check($_POST["id"],'w'); + + if ($doc->delete($_POST)) { + Event::log($_POST["id"], "documents", 4, "document", $_SESSION["glpiname"]." ".$LANG['log'][22]); + } + $doc->redirectToList(); + +} else if (isset($_POST["restore"])) { + $doc->check($_POST["id"],'w'); + + if ($doc->restore($_POST)) { + Event::log($_POST["id"], "documents", 4, "document", $_SESSION["glpiname"]." ".$LANG['log'][23]); + } + $doc->redirectToList(); + +} else if (isset($_POST["purge"])) { + $doc->check($_POST["id"],'w'); + + if ($doc->delete($_POST,1)) { + Event::log($_POST["id"], "documents", 4, "document", $_SESSION["glpiname"]." ".$LANG['log'][24]); + } + $doc->redirectToList(); + +} else if (isset($_POST["update"])) { + $doc->check($_POST["id"],'w'); + + if ($doc->update($_POST)) { + Event::log($_POST["id"], "documents", 4, "document", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["adddocumentitem"])) { + $documentitem->check(-1,'w',$_POST); + if ($documentitem->add($_POST)) { + Event::log($_POST["documents_id"], "documents", 4, "document", + $_SESSION["glpiname"]." ".$LANG['log'][32]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["deletedocumentitem"])) { + + if (isset($_POST["item"]) && count($_POST["item"])) { + foreach ($_POST["item"] as $key => $val) { + if ($documentitem->can($key, 'w')) { + $documentitem->delete(array('id' => $key)); + } + } + } + Event::log($_POST["documents_id"], "documents", 4, "document", + $_SESSION["glpiname"]." ".$LANG['log'][33]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["deletedocumentitem"]) + && isset($_GET["documents_id"]) + && isset($_GET["id"])) { + + $documentitem->check($_GET["id"],'w'); + if ($documentitem->delete(array('id' => $_GET["id"]))) { + Event::log($_GET["documents_id"], "documents", 4, "document", + $_SESSION["glpiname"]." ".$LANG['log'][33]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][27],$_SERVER['PHP_SELF'],"financial","document"); + $doc->showForm($_GET["id"]); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/document.php b/0.78-bugfixes/front/document.php new file mode 100644 index 0000000000000000000000000000000000000000..dff669133174efcf55f9dae29f9b0345657e2bb4 --- /dev/null +++ b/0.78-bugfixes/front/document.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/document.send.php b/0.78-bugfixes/front/document.send.php new file mode 100644 index 0000000000000000000000000000000000000000..abd754311f30bcab4249e27a510c3e0ab2903d40 --- /dev/null +++ b/0.78-bugfixes/front/document.send.php @@ -0,0 +1,84 @@ +getFromDB($_GET['docid'])) { + displayErrorAndDie($LANG['document'][43],true); + } + + if (!file_exists(GLPI_DOC_DIR."/".$doc->fields['filepath'])) { + displayErrorAndDie($LANG['document'][38],true); // Not found + + } else if ($doc->canViewFile($_GET)) { + if ($doc->fields['sha1sum'] + && $doc->fields['sha1sum'] != sha1_file(GLPI_DOC_DIR."/".$doc->fields['filepath'])) { + + displayErrorAndDie($LANG['document'][49],true); // Doc alterated + } else { + $doc->send(); + } + } else { + displayErrorAndDie($LANG['document'][45],true); // No right + } + +} else if (isset($_GET["file"])) { // for other file + $splitter = explode("/",$_GET["file"]); + if (count($splitter) == 2) { + $send = false; + if ($splitter[0] == "_dumps" && haveRight("backup","w")) { + $send = true; + } + + if ($send && file_exists(GLPI_DOC_DIR."/".$_GET["file"])) { + sendFile(GLPI_DOC_DIR."/".$_GET["file"],$splitter[1]); + } else { + displayErrorAndDie($LANG['document'][45],true); + } + } else { + displayErrorAndDie($LANG['document'][44],true); + } +} + +?> diff --git a/0.78-bugfixes/front/documentcategory.form.php b/0.78-bugfixes/front/documentcategory.form.php new file mode 100644 index 0000000000000000000000000000000000000000..03e737e7e316e99ae1c3eeccd2aed9186cac7726 --- /dev/null +++ b/0.78-bugfixes/front/documentcategory.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/documentcategory.php b/0.78-bugfixes/front/documentcategory.php new file mode 100644 index 0000000000000000000000000000000000000000..455683d7523f8502264a55504fb3248f8c22bdfe --- /dev/null +++ b/0.78-bugfixes/front/documentcategory.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/documenttype.form.php b/0.78-bugfixes/front/documenttype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..1777b251cb0cb44b8f20fb4e5c56072811e698de --- /dev/null +++ b/0.78-bugfixes/front/documenttype.form.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/documenttype.list.php b/0.78-bugfixes/front/documenttype.list.php new file mode 100644 index 0000000000000000000000000000000000000000..a85404dd62befd24f883ce2921b1608a417ba6f9 --- /dev/null +++ b/0.78-bugfixes/front/documenttype.list.php @@ -0,0 +1,44 @@ + diff --git a/0.78-bugfixes/front/documenttype.php b/0.78-bugfixes/front/documenttype.php new file mode 100644 index 0000000000000000000000000000000000000000..9fc109c4af54c2426d3271a5ab0dc7a6b834f483 --- /dev/null +++ b/0.78-bugfixes/front/documenttype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/domain.form.php b/0.78-bugfixes/front/domain.form.php new file mode 100644 index 0000000000000000000000000000000000000000..a55eb0bedf9b457cc782f517b8cf218c1838ca41 --- /dev/null +++ b/0.78-bugfixes/front/domain.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/domain.php b/0.78-bugfixes/front/domain.php new file mode 100644 index 0000000000000000000000000000000000000000..7048c928b876990ff3c8d24ec4c13a94be79b311 --- /dev/null +++ b/0.78-bugfixes/front/domain.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/dropdown.common.form.php b/0.78-bugfixes/front/dropdown.common.form.php new file mode 100644 index 0000000000000000000000000000000000000000..7f0f137ddf85b56f54c0321191f87a1cb8a15313 --- /dev/null +++ b/0.78-bugfixes/front/dropdown.common.form.php @@ -0,0 +1,124 @@ +canView()) { + displayRightError(); +} + + +if (isset($_POST["id"])) { + $_GET["id"] = $_POST["id"]; +} else if (!isset($_GET["id"])) { + $_GET["id"] = -1; +} + + +if (isset($_POST["add"])) { + $dropdown->check(-1,'w',$_POST); + + if ($newID=$dropdown->add($_POST)) { + $dropdown->refreshParentInfos(); + if ($dropdown instanceof CommonDevice) { + Event::log($newID, get_class($dropdown), 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["designation"]."."); + } else { + Event::log($newID, get_class($dropdown), 4, "setup",$_SESSION["glpiname"]." added ".$_POST["name"]."."); + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $dropdown->check($_POST["id"],'w'); + if ($dropdown->isUsed() && empty($_POST["forcedelete"])) { + commonHeader($dropdown->getTypeName(),$_SERVER['PHP_SELF'],"config","dropdowns", + str_replace('glpi_','',$dropdown->getTable())); + $dropdown->showDeleteConfirmForm($_SERVER['PHP_SELF']); + commonFooter(); + } else { + $dropdown->delete($_POST, 1); + $dropdown->refreshParentInfos(); + + Event::log($_POST["id"], get_class($dropdown), 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $dropdown->redirectToList(); + } + +} else if (isset($_POST["replace"])) { + $dropdown->check($_POST["id"],'w'); + $dropdown->delete($_POST, 1); + $dropdown->refreshParentInfos(); + + Event::log($_POST["id"], get_class($dropdown), 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $dropdown->redirectToList(); + +} else if (isset($_POST["update"])) { + $dropdown->check($_POST["id"],'w'); + $dropdown->update($_POST); + $dropdown->refreshParentInfos(); + + Event::log($_POST["id"], get_class($dropdown), 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["execute"])) { + if (method_exists($dropdown, $_POST["_method"])) { + call_user_func(array(&$dropdown,$_POST["_method"]),$_POST); + glpi_header($_SERVER['HTTP_REFERER']); + } else { + displayErrorAndDie($LANG['common'][24]); + } + +} else if (isset($_GET['popup'])) { + popHeader($dropdown->getTypeName(),$_SERVER['PHP_SELF']); + if (isset($_GET["rand"])) { + $_SESSION["glpipopup"]["rand"]=$_GET["rand"]; + } + $dropdown->showForm($_GET["id"]); + echo ""; + popFooter(); + +} else { + $dropdown->displayHeader(); + if (!isset($options)) { + $options = array(); + } + $dropdown->showForm($_GET["id"],$options); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/dropdown.common.php b/0.78-bugfixes/front/dropdown.common.php new file mode 100644 index 0000000000000000000000000000000000000000..29ab35d9ff809d3edfe39221b29a2124d2cb6971 --- /dev/null +++ b/0.78-bugfixes/front/dropdown.common.php @@ -0,0 +1,50 @@ +canView()) { + displayRightError(); +} + +$dropdown->displayHeader(); +$dropdown->title(); + +Search::show(get_class($dropdown)); + +commonFooter(); +?> diff --git a/0.78-bugfixes/front/dropdown.php b/0.78-bugfixes/front/dropdown.php new file mode 100644 index 0000000000000000000000000000000000000000..aaabc6af3da1b9447cff9b669a0d86fcd2f0d1b4 --- /dev/null +++ b/0.78-bugfixes/front/dropdown.php @@ -0,0 +1,51 @@ +"; + +$optgroup = Dropdown::getStandardDropdownItemTypes(); +Dropdown::showItemTypeMenu($LANG['setup'][0], $optgroup); +Dropdown::showItemTypeList($optgroup); + +echo ""; +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/entity.form.php b/0.78-bugfixes/front/entity.form.php new file mode 100644 index 0000000000000000000000000000000000000000..e156e34fd0c9ee45b8784e0320b9092325217a9a --- /dev/null +++ b/0.78-bugfixes/front/entity.form.php @@ -0,0 +1,48 @@ +false,'candel'=>false); +} + +include (GLPI_ROOT . "/front/dropdown.common.form.php"); +?> diff --git a/0.78-bugfixes/front/entity.php b/0.78-bugfixes/front/entity.php new file mode 100644 index 0000000000000000000000000000000000000000..f8e0d8f4b8d784bf10542c98001f3a9558c810bc --- /dev/null +++ b/0.78-bugfixes/front/entity.php @@ -0,0 +1,43 @@ + diff --git a/0.78-bugfixes/front/entitydata.form.php b/0.78-bugfixes/front/entitydata.form.php new file mode 100644 index 0000000000000000000000000000000000000000..3cb70740d3067663d2a00e96b184af83a532ef74 --- /dev/null +++ b/0.78-bugfixes/front/entitydata.form.php @@ -0,0 +1,57 @@ +check(-1,'w',$_POST); + + if ($data->add($_POST)) { + Event::log($_POST["entities_id"], "entity", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["update"])) { + $data->check($_POST["entities_id"],'w'); + + if ($data->update($_POST)) { + Event::log($_POST["entities_id"], "entity", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} +displayErrorAndDie("lost"); + +?> diff --git a/0.78-bugfixes/front/entitynotification.form.php b/0.78-bugfixes/front/entitynotification.form.php new file mode 100644 index 0000000000000000000000000000000000000000..feaac3ff1a3fb4dad2cfcb8c2ac904b4c18eceba --- /dev/null +++ b/0.78-bugfixes/front/entitynotification.form.php @@ -0,0 +1,57 @@ +check(-1,'w',$_POST); + + if ($data->add($_POST)) { + Event::log($_POST["entities_id"], "entity", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["update"])) { + $data->check($_POST["entities_id"],'w'); + + if ($data->update($_POST)) { + Event::log($_POST["entities_id"], "entity", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} +displayErrorAndDie("lost"); + +?> diff --git a/0.78-bugfixes/front/event.php b/0.78-bugfixes/front/event.php new file mode 100644 index 0000000000000000000000000000000000000000..4542b24e28f747aefc6767a522fe166dada4f1f3 --- /dev/null +++ b/0.78-bugfixes/front/event.php @@ -0,0 +1,59 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/filesystem.form.php b/0.78-bugfixes/front/filesystem.form.php new file mode 100644 index 0000000000000000000000000000000000000000..ee261d6dd431038e6f3d11035a20e3c5631d876e --- /dev/null +++ b/0.78-bugfixes/front/filesystem.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/filesystem.php b/0.78-bugfixes/front/filesystem.php new file mode 100644 index 0000000000000000000000000000000000000000..73bcd7c799486e5d8a4c8b6a6e26ee1a13313635 --- /dev/null +++ b/0.78-bugfixes/front/filesystem.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/find_num.php b/0.78-bugfixes/front/find_num.php new file mode 100644 index 0000000000000000000000000000000000000000..22f3791050a140d39475f48539b71f6e73d94831 --- /dev/null +++ b/0.78-bugfixes/front/find_num.php @@ -0,0 +1,167 @@ +initSession(); +} else { + exit(); +} + +// Send UTF8 Headers +header("Content-Type: text/html; charset=UTF-8"); + +?> + + + + +GLPI + +"; +// Appel javascript +echo ""; + +?> + + + + + + +"; +echo "

".$LANG['help'][22]."

"; +echo "
"; + +echo ""; +echo ""; +echo "
".$LANG['help'][23]."
"; +echo ""; +echo ""; // bug IE ! La validation par enter ne fonctionne pas sans cette ligne incroyable mais vrai ! +echo ""; +echo "
"; + +if (isset($_POST["send"])) { + echo ""; + echo " "; + echo " "; + echo " "; + echo " "; + echo " "; + echo " "; + echo " "; + + $types = array('Computer' => $LANG['help'][25], + 'NetworkEquipment' => $LANG['help'][26], + 'Printer' => $LANG['help'][27], + 'Monitor' => $LANG['help'][28], + 'Peripheral' => $LANG['help'][29]); + foreach ($types as $type => $label) { + $query = "SELECT `name`, `id`, `contact`, `serial`, `otherserial` + FROM `".getTableForItemType($type)."` + WHERE `is_template` = '0' + AND `is_deleted` = '0' + AND (`contact` LIKE '%".$_POST["NomContact"]."%' + OR `name` LIKE '%".$_POST["NomContact"]."%' + OR `serial` LIKE '%".$_POST["NomContact"]."%' + OR `otherserial` LIKE '%".$_POST["NomContact"]."%') + ORDER BY `name`"; + $result = $DB->query($query); + + while ($ligne = $DB->fetch_array($result)) { + $Comp_num = $ligne['id']; + $Contact = $ligne['contact']; + $Computer = $ligne['name']; + $s1 = $ligne['serial']; + $s2 = $ligne['otherserial']; + echo " "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + } + + $query = "SELECT `name`, `id` + FROM `glpi_softwares` + WHERE `is_template` = '0' + AND `is_deleted` = '0' + AND (`name` LIKE '%".$_POST["NomContact"]."%' ) + ORDER BY `name`"; + $result = $DB->query($query); + + while ($ligne = $DB->fetch_array($result)) { + $Comp_num = $ligne['id']; + $Computer = $ligne['name']; + echo " "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + + echo "
".$LANG['reports'][19]."".$LANG['help'][24]."".$LANG['common'][1]."".$LANG['common'][2]."".$LANG['common'][19]." / ". + $LANG['common'][20]."
 $Contact  $label  $Computer  $Comp_num "; + if ($s1 != "") { + echo $s1; + } + if ($s1!="" && $s2!="") { + echo " / "; + } + if ($s2 != "") { + echo $s2; + } + echo "
  ".$LANG['help'][31]."  $Computer  $Comp_num  
"; +} +echo ''; + +?> diff --git a/0.78-bugfixes/front/graph.send.php b/0.78-bugfixes/front/graph.send.php new file mode 100644 index 0000000000000000000000000000000000000000..ffd01db5dc71310d81c42c412498a73c994e9730 --- /dev/null +++ b/0.78-bugfixes/front/graph.send.php @@ -0,0 +1,57 @@ + diff --git a/0.78-bugfixes/front/group.form.php b/0.78-bugfixes/front/group.form.php new file mode 100644 index 0000000000000000000000000000000000000000..767a3f78e508fa3ff09964e0e2b61a19cb50de72 --- /dev/null +++ b/0.78-bugfixes/front/group.form.php @@ -0,0 +1,106 @@ +check(-1,'w',$_POST); + if ($newID=$group->add($_POST)) { + Event::log($newID, "groups", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $group->check($_POST["id"],'w'); + $group->delete($_POST); + Event::log($_POST["id"], "groups", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $group->redirectToList(); + +} else if (isset($_POST["update"])) { + $group->check($_POST["id"],'w'); + $group->update($_POST); + Event::log($_POST["id"], "groups", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["adduser"])) { + $groupuser->check(-1,'w',$_POST); + if ($groupuser->add($_POST)) { + Event::log($_POST["groups_id"], "groups", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][48]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["deleteuser"])) { + if (isset($_POST["item"]) && count($_POST["item"])) { + foreach ($_POST["item"] as $key => $val) { + if ($groupuser->can($key,'w')) { + $groupuser->delete(array('id'=>$key)); + } + } + } + Event::log($_POST["groups_id"], "groups", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][49]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["changegroup"]) && isset($_POST["groups_id"])) { + if ($_POST["groups_id"] > 0 && isset($_POST['item'])) { + foreach ($_POST['item'] as $type => $ids) { + if (class_exists($type)) { + $item = new $type(); + foreach ($ids as $id => $val) { + if ($val && $item->can($id,'w')) { + $item->update(array('id' => $id, + 'groups_id' => $_POST["groups_id"])); + } + } + } + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][36],$_SERVER['PHP_SELF'],"admin","group"); + $group->showForm($_GET["id"]); + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/group.php b/0.78-bugfixes/front/group.php new file mode 100644 index 0000000000000000000000000000000000000000..03269bf8a5fde53b4962a36a99cf040f37db085a --- /dev/null +++ b/0.78-bugfixes/front/group.php @@ -0,0 +1,50 @@ +title(); + +Search::show('Group'); + +commonFooter(); +?> diff --git a/0.78-bugfixes/front/helpdesk.faq.php b/0.78-bugfixes/front/helpdesk.faq.php new file mode 100644 index 0000000000000000000000000000000000000000..b469a944bc6ff891293edc9e64aff1558d4aa502 --- /dev/null +++ b/0.78-bugfixes/front/helpdesk.faq.php @@ -0,0 +1,87 @@ + $_SERVER['PHP_SELF'])); +} + +if (!isset($_GET["start"])) { + $_GET["start"] = 0; +} +if (!isset($_GET["contains"])) { + $_GET["contains"] = ""; +} +if (!isset($_GET["knowbaseitemcategories_id"])) { + $_GET["knowbaseitemcategories_id"] = 0; +} + +if (isset($_GET["id"])) { + $kb = new KnowbaseItem; + if ($kb->getFromDB($_GET["id"])) { + $kb->showFull(false); + } + +} else { + KnowbaseItem::searchForm($_SERVER['PHP_SELF'],$_GET["contains"],$_GET["knowbaseitemcategories_id"],1); + KnowbaseItemCategory::showFirstLevel($_SERVER['PHP_SELF'],$_GET["knowbaseitemcategories_id"] ,1); + KnowbaseItem::showList($_SERVER['PHP_SELF'],$_GET["contains"],$_GET["start"], + $_GET["knowbaseitemcategories_id"],1); + if (!$_GET["knowbaseitemcategories_id"] && strlen($_GET["contains"]) == 0) { + KnowbaseItem::showViewGlobal($_SERVER['PHP_SELF'],1) ; + } +} + +helpFooter(); + +?> diff --git a/0.78-bugfixes/front/helpdesk.html b/0.78-bugfixes/front/helpdesk.html new file mode 100644 index 0000000000000000000000000000000000000000..de74184a0a6ed11d25c0b0b09a3218d48a82b194 --- /dev/null +++ b/0.78-bugfixes/front/helpdesk.html @@ -0,0 +1,79 @@ + + + + + + + Helpdesk + + + + + + +
+ +
+ +

Formulaire de signalement au support technique

+ +
+ Le problème doit être résolu + + Sélectionnez un niveau d'urgence : + +
+ +
+ Décrivez votre problème + Titre :
+ +
+ +

+ +
+ + \ No newline at end of file diff --git a/0.78-bugfixes/front/helpdesk.public.php b/0.78-bugfixes/front/helpdesk.public.php new file mode 100644 index 0000000000000000000000000000000000000000..a9be1417fbb2fb1c21577c8d030c9d5fe0b3bc1e --- /dev/null +++ b/0.78-bugfixes/front/helpdesk.public.php @@ -0,0 +1,88 @@ + diff --git a/0.78-bugfixes/front/index.php b/0.78-bugfixes/front/index.php new file mode 100644 index 0000000000000000000000000000000000000000..205f16b2cb5e83eb813958635bb2563935d17bef --- /dev/null +++ b/0.78-bugfixes/front/index.php @@ -0,0 +1,37 @@ + diff --git a/0.78-bugfixes/front/infocom.form.php b/0.78-bugfixes/front/infocom.form.php new file mode 100644 index 0000000000000000000000000000000000000000..a24cb10f6bfe9ab908a3bd45dd3f17c4bcc23387 --- /dev/null +++ b/0.78-bugfixes/front/infocom.form.php @@ -0,0 +1,90 @@ +check(-1,'w',$_GET); + + $newID = $ic->add($_GET, false); + Event::log($newID, "infocom", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][20]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $ic->check($_POST["id"],'w'); + + $ic->delete($_POST); + Event::log($_POST["id"], "infocom", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][22]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["update"])) { + $ic->check($_POST["id"],'w'); + + $ic->update($_POST); + Event::log($_POST["id"], "infocom", 4, "financial", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); +} else { + checkRight("infocom","r"); + + popHeader($LANG['financial'][3],$_SERVER['PHP_SELF']); + + if (isset($_GET["id"])) { + $ic = new Infocom(); + $ic->getFromDB($_GET["id"]); + $_GET["itemtype"] = $ic->fields["itemtype"]; + $_GET["items_id"] = $ic->fields["items_id"]; + } + $item = false; + if (isset($_GET["itemtype"]) && class_exists($_GET["itemtype"])) { + $item = new $_GET["itemtype"](); + if (!isset($_GET["items_id"]) || !$item->getFromDB($_GET["items_id"])) { + $item = false; + } + } + + if (isset($_GET["update"]) && $_GET["update"]==1) { + $withtemplate = 0; + } else { + $withtemplate = 2; + } + Infocom::showForItem($item,$withtemplate); + + popFooter(); +} + +?> diff --git a/0.78-bugfixes/front/interfacetype.form.php b/0.78-bugfixes/front/interfacetype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..ca658442ea0ec03e264baff943254fed6df45ff3 --- /dev/null +++ b/0.78-bugfixes/front/interfacetype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/interfacetype.php b/0.78-bugfixes/front/interfacetype.php new file mode 100644 index 0000000000000000000000000000000000000000..24f0af2930d57416698e543b9a748425233891fe --- /dev/null +++ b/0.78-bugfixes/front/interfacetype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/knowbaseitem.form.php b/0.78-bugfixes/front/knowbaseitem.form.php new file mode 100644 index 0000000000000000000000000000000000000000..4701f3e8beb6a1ea5abd49942da580c7681e59a0 --- /dev/null +++ b/0.78-bugfixes/front/knowbaseitem.form.php @@ -0,0 +1,123 @@ +check(-1,'w'); + + commonHeader($LANG['title'][5],$_SERVER['PHP_SELF'],"utils","knowbase"); + $kb->showForm(""); + commonFooter(); + +} else if (isset($_POST["add"])) { + // ajoute un item dans la base de connaisssances + $kb->check(-1,'w',$_POST); + + $newID = $kb->add($_POST); + Event::log($newID, "knowbaseitem", 5, "tools", $_SESSION["glpiname"]." ".$LANG['log'][20]); + glpi_header($CFG_GLPI["root_doc"]."/front/knowbaseitem.php"); + +} else if (isset($_POST["update"])) { + // actualiser un item dans la base de connaissances + $kb->check($_POST["id"],'w'); + + $kb->update($_POST); + Event::log($_POST["id"], "knowbaseitem", 5, "tools", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($CFG_GLPI["root_doc"]."/front/knowbaseitem.form.php?id=".$_POST['id']); + +} else if (isset($_GET["id"]) && strcmp($_GET["modify"],"yes") == 0) { + // modifier un item dans la base de connaissance + $kb->check($_GET["id"],'r'); + + commonHeader($LANG['title'][5],$_SERVER['PHP_SELF'],"utils","knowbase"); + $kb->showForm($_GET["id"]); + commonFooter(); + +} else if (isset($_GET["id"]) && strcmp($_GET["delete"],"yes") == 0) { + // effacer un item dans la base de connaissances + $kb->check($_GET["id"],'w'); + + $kb->delete($_GET); + Event::log($_GET["id"], "knowbaseitem", 5, "tools", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $kb->redirectToList(); + +} else if (isset($_GET["id"]) && strcmp($_GET["addtofaq"],"yes") == 0) { + // ajouter un item dans la faq + $kb->check($_GET["id"],'w'); + $kb->addToFaq(); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["id"]) && strcmp($_GET["removefromfaq"],"yes") == 0) { + // retirer un item de la faq + $kb->check($_GET["id"],'w'); + $kb->removeFromFaq($_GET["id"]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (empty($_GET["id"])) { + glpi_header($CFG_GLPI["root_doc"]."/front/knowbaseitem.php"); + +} else { + // Affiche un item de la base de connaissances + $kb->check($_GET["id"],'r'); + + commonHeader($LANG['title'][5],$_SERVER['PHP_SELF'],"utils","knowbase"); + + $kb->showFull(true); + + commonFooter(); +} + +?> diff --git a/0.78-bugfixes/front/knowbaseitem.php b/0.78-bugfixes/front/knowbaseitem.php new file mode 100644 index 0000000000000000000000000000000000000000..f064457ebb582b3359980e5ca9bc64f54fbbefa1 --- /dev/null +++ b/0.78-bugfixes/front/knowbaseitem.php @@ -0,0 +1,70 @@ + 'r', + 'faq' => 'r')); + +if (isset($_GET["id"])) { + glpi_header($CFG_GLPI["root_doc"]."/front/knowbaseitem.form.php?id=".$_GET["id"]); +} + +commonHeader($LANG['title'][5],$_SERVER['PHP_SELF'],"utils","knowbase"); + +if (!isset($_GET["start"])) { + $_GET["start"] = 0; +} +if (!isset($_GET["contains"])) { + $_GET["contains"] = ""; +} +if (!isset($_GET["knowbaseitemcategories_id"])) { + $_GET["knowbaseitemcategories_id"] = "0"; +} + +$faq = !haveRight("knowbase","r"); + +KnowbaseItem::searchForm($_SERVER['PHP_SELF'],$_GET["contains"],$_GET["knowbaseitemcategories_id"],$faq); +KnowbaseItemCategory::showFirstLevel($_SERVER['PHP_SELF'],$_GET["knowbaseitemcategories_id"],$faq ); +KnowbaseItem::showList($CFG_GLPI["root_doc"]."/front/knowbaseitem.form.php",$_GET["contains"],$_GET["start"], + $_GET["knowbaseitemcategories_id"],$faq); +if (!$_GET["knowbaseitemcategories_id"] && strlen($_GET["contains"])==0) { + KnowbaseItem::showViewGlobal($CFG_GLPI["root_doc"]."/front/knowbaseitem.form.php",$faq) ; +} + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/knowbaseitemcategory.form.php b/0.78-bugfixes/front/knowbaseitemcategory.form.php new file mode 100644 index 0000000000000000000000000000000000000000..5f53c02551a387dcc7313120f14f38a2e456c04f --- /dev/null +++ b/0.78-bugfixes/front/knowbaseitemcategory.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/knowbaseitemcategory.php b/0.78-bugfixes/front/knowbaseitemcategory.php new file mode 100644 index 0000000000000000000000000000000000000000..12a6178198ef7b9bcfe0e65fc28ed8bcf1d56238 --- /dev/null +++ b/0.78-bugfixes/front/knowbaseitemcategory.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/ldap.group.import.php b/0.78-bugfixes/front/ldap.group.import.php new file mode 100644 index 0000000000000000000000000000000000000000..c576f51acdf3820282525d17974c45c9137be4c0 --- /dev/null +++ b/0.78-bugfixes/front/ldap.group.import.php @@ -0,0 +1,151 @@ +checkGlobal('w'); +checkRight('user_authtype','w'); + +commonHeader($LANG['setup'][3],$_SERVER['PHP_SELF'],"admin","group","ldap"); + +if (isset($_GET['next'])) { + AuthLdap::ldapChooseDirectory($_SERVER['PHP_SELF']); + +} else { + if (isset($_SESSION["ldap_import"])) { + if ($count = count($_SESSION["ldap_import"])) { + $percent = min(100,round(100*($_SESSION["ldap_import_count"]-$count)/ + $_SESSION["ldap_import_count"],0)); + + displayProgressBar(400,$percent); + $key = array_pop($_SESSION["ldap_import"]); + + if (isset($_SESSION["ldap_import_entities"][$key])) { + $entity = $_SESSION["ldap_import_entities"][$key]; + } else { + $entity = $_SESSION["glpiactive_entity"]; + } + + AuthLdap::ldapImportGroup($key, + array("ldapservers_id"=>$_SESSION["ldap_server"], + "entities_id"=>$entity, + "is_recursive"=>$_SESSION["ldap_import_recursive"][$key], + "type"=>$_SESSION["ldap_import_type"][$key])); + glpi_header($_SERVER['PHP_SELF']); + + } else { + unset($_SESSION["ldap_import"]); + displayProgressBar(400,100); + + echo "
".$LANG['ocsng'][8]."
"; + echo "".$LANG['buttons'][13]."
"; + } + } + + if (isset($_POST["change_ldap_filter"])) { + if (isset($_POST["ldap_filter"])) { + $_SESSION["ldap_group_filter"] = $_POST["ldap_filter"]; + } + if (isset($_POST["ldap_filter2"])) { + $_SESSION["ldap_group_filter2"] = $_POST["ldap_filter2"]; + } + glpi_header($_SERVER['PHP_SELF']); + + } else if (!isset($_POST["import_ok"])) { + if (!isset($_GET['check'])) { + $_GET['check'] = 'all'; + } + if (!isset($_GET['start'])) { + $_GET['start'] = 0; + } + if (isset($_SESSION["ldap_import"])) { + unset($_SESSION["ldap_import"]); + } + if (!isset($_SESSION["ldap_server"])) { + if (isset($_POST["ldap_server"])) { + $_SESSION["ldap_server"] = $_POST["ldap_server"]; + } else { + glpi_header($CFG_GLPI["root_doc"]."/front/ldap.php"); + } + } + + if (!AuthLdap::testLDAPConnection($_SESSION["ldap_server"])) { + unset($_SESSION["ldap_server"]); + echo "
".$LANG['ldap'][6]."
"; + echo "".$LANG['buttons'][13]."
"; + } else { + if (!isset($_SESSION["ldap_group_filter"])) { + $_SESSION["ldap_group_filter"] = ''; + } + if (!isset($_SESSION["ldap_group_filter2"])) { + $_SESSION["ldap_group_filter2"] = ''; + } + + if (!isset($_SESSION["ldap_sortorder"])) { + $_SESSION["ldap_sortorder"] = "ASC"; + } else { + $_SESSION["ldap_sortorder"] = (!isset($_GET["order"])?"DESC":$_GET["order"]); + } + + AuthLdap::displayLdapFilter($_SERVER['PHP_SELF'],false); + + AuthLdap::showLdapGroups($_SERVER['PHP_SELF'],$_GET['check'],$_GET['start'],0, + $_SESSION["ldap_group_filter"],$_SESSION["ldap_group_filter2"], + $_SESSION["glpiactive_entity"],$_SESSION["ldap_sortorder"]); + } + + } else { + if (count($_POST['toimport']) >0) { + $_SESSION["ldap_import_count"] = 0; + foreach ($_POST['toimport'] as $key => $val) { + if ($val == "on") { + $_SESSION["ldap_import"][] = $key; + $_SESSION["ldap_import_count"]++; + $_SESSION["ldap_import_entities"][$key]=$_POST["toimport_entities"][$key]; + $_SESSION["ldap_import_type"][$key]=$_POST["toimport_type"][$key]; + $_SESSION["ldap_import_recursive"][$key]=$_POST["toimport_recursive"][$key]; + } + } + } + glpi_header($_SERVER['PHP_SELF']); + } +} + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/ldap.group.php b/0.78-bugfixes/front/ldap.group.php new file mode 100644 index 0000000000000000000000000000000000000000..f8fcd8345b9d20b70a9907d486aa26ace9008df2 --- /dev/null +++ b/0.78-bugfixes/front/ldap.group.php @@ -0,0 +1,77 @@ +checkGlobal('w'); +checkRight('user_authtype','w'); + +commonHeader($LANG['setup'][3],$_SERVER['PHP_SELF'],"admin","group","ldap"); + +if (isset($_SESSION["ldap_import"])) { + unset($_SESSION["ldap_import"]); +} +if (isset($_SESSION["ldap_import_entities"])) { + unset($_SESSION["ldap_import_entities"]); +} +if (isset($_SESSION["ldap_server"])) { + unset($_SESSION["ldap_server"]); +} +if (isset($_SESSION["entity"])) { + unset($_SESSION["entity"]); +} +if (isset($_SESSION["ldap_sortorder"])) { + unset($_SESSION["ldap_sortorder"]); +} + +//Reset session variable related to filters +if (isset($_SESSION["ldap_group_filter"])) { + unset($_SESSION["ldap_group_filter"]); +} +if (isset($_SESSION["ldap_group_filter2"])) { + unset($_SESSION["ldap_group_filter2"]); +} + +echo "
"; +echo ""; +echo ""; +echo "
 ".$LANG['ldap'][23]." 
". + $LANG['ldap'][24]."
"; + +commonFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/ldap.import.php b/0.78-bugfixes/front/ldap.import.php new file mode 100644 index 0000000000000000000000000000000000000000..f0e2b1fd958c3d1424aeb5a7c9d8e76a8eb59842 --- /dev/null +++ b/0.78-bugfixes/front/ldap.import.php @@ -0,0 +1,122 @@ +getFromDB($_SESSION['ldap_import']['ldapservers_id']); + + AuthLdap::showUserImportForm($authldap); + if (isset($_SESSION['ldap_import']['ldapservers_id']) && + $_SESSION['ldap_import']['ldapservers_id'] != NOT_AVAILABLE + && isset($_SESSION['ldap_import']['criterias']) + && !empty($_SESSION['ldap_import']['criterias'])) { + echo "
"; + AuthLdap::searchUser($authldap); + } +} else { + if (isset($_SESSION["ldap_process"])) { + if ($count = count($_SESSION["ldap_process"])) { + $percent = min(100,round(100*($_SESSION["ldap_process_count"]-$count)/ + $_SESSION["ldap_process_count"],0)); + + displayProgressBar(400,$percent); + $key = array_pop($_SESSION["ldap_process"]); + AuthLdap::ldapImportUserByServerId(array('method'=>AuthLDAP::IDENTIFIER_LOGIN, + 'value'=>$key), + $_SESSION['ldap_import']["mode"], + $_SESSION['ldap_import']["ldapservers_id"], + true); + glpi_header($_SERVER['PHP_SELF']); + + } else { + unset($_SESSION["ldap_process"]); + displayProgressBar(400,100); + + echo "
".$LANG['ocsng'][8]."
"; + echo "".$LANG['buttons'][13]."
"; + unset($_SESSION["ldapservers_id"]); + unset($_SESSION["mode"]); + unset($_SESSION["interface"]); + $_SESSION['ldap_import']['action'] = 'show'; + refreshDropdownPopupInMainWindow(); + + } + } else { + if (count($_POST['toprocess']) >0) { + $_SESSION["ldap_process_count"] = 0; + $_SESSION["ldapservers_id"] = $_SESSION['ldap_import']['ldapservers_id']; + foreach ($_POST['toprocess'] as $key => $val) { + if ($val == "on") { + $_SESSION["ldap_process"][] = $key; + $_SESSION["ldap_process_count"]++; + } + } + } + glpi_header($_SERVER['PHP_SELF']); + } +} + +if (isset($_SESSION['ldap_import']['popup']) && $_SESSION['ldap_import']['popup']) { + ajaxFooter(); +} +else { + commonFooter(); +} +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/ldap.php b/0.78-bugfixes/front/ldap.php new file mode 100644 index 0000000000000000000000000000000000000000..301daf6764cfa213417adb185a1c16adb4e6f53f --- /dev/null +++ b/0.78-bugfixes/front/ldap.php @@ -0,0 +1,61 @@ +"; +echo ""; + +echo ""; + +echo ""; + +echo "
 ".$LANG['ldap'][0]." 
". + $LANG['ldap'][1]."
". + $LANG['ldap'][2]."
"; + +commonFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/link.form.php b/0.78-bugfixes/front/link.form.php new file mode 100644 index 0000000000000000000000000000000000000000..3222e6a574cd6c4032f1d1dac3eb4ec0d61609ea --- /dev/null +++ b/0.78-bugfixes/front/link.form.php @@ -0,0 +1,73 @@ +check(-1,'w'); + + $newID = $link->add($_POST); + Event::log($newID, "links", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][20]." ". + $_POST["name"]."."); + glpi_header($CFG_GLPI["root_doc"]."/front/link.php"); + +} else if (isset($_POST["delete"])) { + $link->check($_GET["id"],'w'); + $link->delete($_POST); + Event::log($_GET["id"], "links", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $link->redirectToList(); + +} else if (isset($_POST["update"])) { + $link->check($_GET["id"],'w'); + $link->update($_POST); + Event::log($_GET["id"], "links", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['title'][33],$_SERVER['PHP_SELF'],"config","link"); + + $link->showForm($_GET["id"]); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/link.php b/0.78-bugfixes/front/link.php new file mode 100644 index 0000000000000000000000000000000000000000..e863c3e34b323c27afac6938d6a89560e7a34a68 --- /dev/null +++ b/0.78-bugfixes/front/link.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/front/link.send.php b/0.78-bugfixes/front/link.send.php new file mode 100644 index 0000000000000000000000000000000000000000..c73c3d3bbc6f626f284f49266e4dc150e6f31724 --- /dev/null +++ b/0.78-bugfixes/front/link.send.php @@ -0,0 +1,76 @@ +query($query); + + if ($DB->numrows($result) == 1) { + $file = $DB->result($result,0,"data"); + $link = $DB->result($result,0,"link"); + + if (class_exists($_GET["itemtype"])) { + $item = new $_GET["itemtype"](); + if ($item->getFromDB($_GET["id"])) { + $content_filename = Link::generateLinkContents($link,$item); + $content_data = Link::generateLinkContents($file,$item); + + header("Content-disposition: filename=\"".$content_filename[0]."\""); + $mime = "application/scriptfile"; + + header("Content-type: ".$mime); + header('Pragma: no-cache'); + header('Expires: 0'); + + // Pour que les \x00 ne devienne pas \0 + $mc = get_magic_quotes_runtime(); + if ($mc) { + @set_magic_quotes_runtime(0); + } + // May have several values due to network datas : use only first one + echo current($content_data); + + if ($mc) { + @set_magic_quotes_runtime($mc); + } + } + } + } +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/link_itemtype.form.php b/0.78-bugfixes/front/link_itemtype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..52510d8741c5609fef4a83a67678356434bffb75 --- /dev/null +++ b/0.78-bugfixes/front/link_itemtype.form.php @@ -0,0 +1,62 @@ +check($_GET["id"],'w'); + + if ($link_itemtype->add($_POST)) { + Event::log($_POST["links_id"], "links", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][32]); + } + glpi_header($CFG_GLPI["root_doc"]."/front/link.form.php?id=".$_POST["links_id"]); +} +else if (isset($_GET["delete"])){ + $link->check($_GET["links_id"],'w'); + + $link_itemtype->delete($_GET); + Event::log($_GET["links_id"], "links", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][33]); + glpi_header($_SERVER['HTTP_REFERER']); +} +?> diff --git a/0.78-bugfixes/front/location.form.php b/0.78-bugfixes/front/location.form.php new file mode 100644 index 0000000000000000000000000000000000000000..170e15ae005eb6e1d75fd849d638b007ecfcead8 --- /dev/null +++ b/0.78-bugfixes/front/location.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/location.php b/0.78-bugfixes/front/location.php new file mode 100644 index 0000000000000000000000000000000000000000..d0a4dba87e29b0f07f7c46f1ad8668ac3c7a7053 --- /dev/null +++ b/0.78-bugfixes/front/location.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/mailcollector.form.php b/0.78-bugfixes/front/mailcollector.form.php new file mode 100644 index 0000000000000000000000000000000000000000..64cc85b28eb585c1e8292c92dff07963855bbbf8 --- /dev/null +++ b/0.78-bugfixes/front/mailcollector.form.php @@ -0,0 +1,74 @@ +check(-1,'w',$_POST); + $newID = $mailgate->add($_POST); + Event::log($newID, "mailcollector", 4, "setup", $_SESSION["glpiname"]." added ".$_POST["name"]."."); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $mailgate->check($_POST['id'],'w'); + $mailgate->delete($_POST); + Event::log($_POST["id"], "mailcollector", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $mailgate->redirectToList(); + +} else if (isset($_POST["update"])) { + $mailgate->check($_POST['id'],'w'); + $mailgate->update($_POST); + Event::log($_POST["id"], "mailcollector", 4, "setup", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["get_mails"])) { + $mailgate->check($_POST['id'],'w'); + $mailgate->collect($_POST["id"],1); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['Menu'][39],$_SERVER['PHP_SELF'],"config","mailcollector"); + $mailgate->showForm($_GET["id"]); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/mailcollector.php b/0.78-bugfixes/front/mailcollector.php new file mode 100644 index 0000000000000000000000000000000000000000..a2097255336b594ad3573c276565b27f46b1c693 --- /dev/null +++ b/0.78-bugfixes/front/mailcollector.php @@ -0,0 +1,61 @@ +"; + echo ""; + echo ""; + echo "
" . $LANG['Menu'][39] . "
" . $LANG['setup'][165] . "
"; + echo ""; + commonFooter(); + exit(); + +} else { + $mailcollector = new MailCollector; + $mailcollector->title(); + Search::show('MailCollector'); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/manufacturer.form.php b/0.78-bugfixes/front/manufacturer.form.php new file mode 100644 index 0000000000000000000000000000000000000000..69de44a0750b38620c27269647a7a1a76030819d --- /dev/null +++ b/0.78-bugfixes/front/manufacturer.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/manufacturer.php b/0.78-bugfixes/front/manufacturer.php new file mode 100644 index 0000000000000000000000000000000000000000..82b205ce1ce92ab9cc87388cf257d7c6bbd282e3 --- /dev/null +++ b/0.78-bugfixes/front/manufacturer.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/massiveaction.php b/0.78-bugfixes/front/massiveaction.php new file mode 100644 index 0000000000000000000000000000000000000000..b3ad9f4c17b3e1ed6b5e92319b349316ec9898c6 --- /dev/null +++ b/0.78-bugfixes/front/massiveaction.php @@ -0,0 +1,694 @@ + 1, + 'own_ticket' => 1)); + break; + case "add_task" : + checkSeveralRightsOr(array('global_add_tasks' => 1, + 'own_ticket' => 1)); + break; + + default : + checkRight("update_ticket","1"); + } + break; + + default : + if (in_array($_POST["itemtype"],$CFG_GLPI["infocom_types"])) { + checkSeveralRightsOr(array($_POST["itemtype"] => 'w', + 'infocom' => 'w')); + } else { + $item->checkGlobal('w'); + } + } + + commonHeader($LANG['title'][42],$_SERVER['PHP_SELF']); + + if (isset($_GET['multiple_actions'])) { + if (isset($_SESSION['glpi_massiveaction']) + && isset($_SESSION['glpi_massiveaction']['items'])) { + + $percent = min(100,round(100*($_SESSION['glpi_massiveaction']['item_count'] + - count($_SESSION['glpi_massiveaction']['items'])) + /$_SESSION['glpi_massiveaction']['item_count'],0)); + displayProgressBar(400,$percent); + } + } + + if (isset($_POST["action"]) + && isset($_POST["itemtype"]) + && isset($_POST["item"]) + && count($_POST["item"])) { + + /// Save selection + if (!isset($_SESSION['glpimassiveactionselected']) + || count($_SESSION['glpimassiveactionselected']) == 0) { + + $_SESSION['glpimassiveactionselected'] = array(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $_SESSION['glpimassiveactionselected'][$key] = $key; + } + } + } + + if (isset($_SERVER['HTTP_REFERER'])) { + $REDIRECT = $_SERVER['HTTP_REFERER']; + } else { /// Security : not used if no problem + $REDIRECT = $CFG_GLPI['root_doc']."/front/central.php"; + } + + switch($_POST["action"]) { + case "connect_to_computer" : + if (isset($_POST["connect_item"]) && $_POST["connect_item"]) { + $conn = new Computer_Item(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input = array('computers_id' => $key, + 'itemtype' => $_POST["itemtype"], + 'items_id' => $_POST["connect_item"]); + if ($conn->can(-1, 'w', $input)) { + $conn->add($input); + } + } + } + } + break; + + case "connect" : + if (isset($_POST["connect_item"]) && $_POST["connect_item"]) { + $conn = new Computer_Item(); + foreach ($_POST["item"] as $key => $val){ + if ($val == 1) { + $input = array('computers_id' => $_POST["connect_item"], + 'itemtype' => $_POST["itemtype"], + 'items_id' => $key); + if ($conn->can(-1, 'w', $input)) { + $conn->add($input); + } + } + } + } + break; + + case "disconnect" : + $conn = new Computer_Item(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + if ($item->getFromDB($key)) { + $conn->disconnectForItem($item); + } + } + } + break; + + case "delete" : + foreach ($_POST["item"] as $key => $val) { + if ($val == 1 && $item->can($key,'d')) { + $item->delete(array("id"=>$key)); + } + } + break; + + case "purge" : + foreach ($_POST["item"] as $key => $val){ + if ($val == 1) { + $item->delete(array("id"=>$key),1); + } + } + break; + + case "restore" : + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $item->restore(array("id"=>$key)); + } + } + break; + + case "update" : + $searchopt = Search::getCleanedOptions($_POST["itemtype"],'w'); + if (isset($searchopt[$_POST["id_field"]])) { + /// Infocoms case + if (!isPluginItemType($_POST["itemtype"]) + && Search::isInfocomOption($_POST["itemtype"],$_POST["id_field"])) { + + $ic = new Infocom(); + $link_entity_type = -1; + /// Specific entity item + if ($searchopt[$_POST["id_field"]]["table"] == "glpi_suppliers_infocoms"){ + $ent = new Supplier(); + if ($ent->getFromDB($_POST[$_POST["field"]])) { + $link_entity_type = $ent->fields["entities_id"]; + } + } + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + if ($item->getFromDB($key)) { + if ($link_entity_type < 0 + || $link_entity_type == $item->getEntityID() + || ($ent->fields["is_recursive"] + && in_array($link_entity_type, getAncestorsOf("glpi_entities", + $item->getEntityID())))) { + // Add infocom if not exists + if (!$ic->getFromDBforDevice($_POST["itemtype"],$key)) { + $input2["items_id"]=$key; + $input2["itemtype"]=$_POST["itemtype"]; + unset($ic->fields); + $ic->add($input2); + $ic->getFromDBforDevice($_POST["itemtype"],$key); + } + $id = $ic->fields["id"]; + unset($ic->fields); + + $ic->update(array('id' => $id, + $_POST["field"] => $_POST[$_POST["field"]])); + } + } + } + } + + } else { /// Not infocoms + $link_entity_type = array(); + /// Specific entity item + $itemtable = getTableForItemType($_POST["itemtype"]); + + $itemtype2 = getItemTypeForTable($searchopt[$_POST["id_field"]]["table"]); + if (class_exists($itemtype2)) { + $item2 = new $itemtype2(); + + if ($searchopt[$_POST["id_field"]]["table"] != $itemtable + && $item2->isEntityAssign() + && $item->isEntityAssign()) { + if ($item2->getFromDB($_POST[$_POST["field"]])) { + if (isset($item2->fields["entities_id"]) + && $item2->fields["entities_id"] >=0) { + + if (isset($item2->fields["is_recursive"]) + && $item2->fields["is_recursive"]) { + + $link_entity_type = getSonsOf("glpi_entities", + $item2->fields["entities_id"]); + } else { + $link_entity_type[] = $item2->fields["entities_id"]; + } + } + } + } + } + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + if ($item->getFromDB($key)) { + if (count($link_entity_type) == 0 + || in_array($item->fields["entities_id"], + $link_entity_type)) { + $item->update(array('id' => $key, + $_POST["field"] => $_POST[$_POST["field"]])); + } + } + } + } + } + } + break; + + case "install" : + $inst = new Computer_SoftwareVersion(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $comp = new Computer; + if ($comp->getFromDB($key) + && $comp->fields["entities_id"] == $_SESSION["glpiactive_entity"]) { + + $inst->add(array('computers_id' => $key, + 'softwareversions_id' => $_POST["softwareversions_id"])); + } + } + } + break; + + case "add_group" : + $groupuser = new Group_User(); + + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input = array('groups_id' => $_POST["groups_id"], + 'users_id' => $key); + if ($groupuser->can(-1,'w',$input)) { + $groupuser->add($input); + } + } + } + break; + + case "add_userprofile" : + $right = new Profile_User(); + if (isset($_POST['profiles_id']) + && $_POST['profiles_id'] > 0 + && isset($_POST['entities_id']) + && $_POST['entities_id'] >= 0) { + + $input['entities_id'] = $_POST['entities_id']; + $input['profiles_id'] = $_POST['profiles_id']; + $input['is_recursive'] = $_POST['is_recursive']; + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input['users_id'] = $key; + $right->add($input); + } + } + } + break; + + case "add_document" : + $documentitem = new Document_Item(); + foreach ($_POST["item"] as $key => $val) { + $input = array('itemtype' => $_POST["itemtype"], + 'items_id' => $key, + 'documents_id' => $_POST['docID']); + if ($documentitem->can(-1,'w',$input)) { + $documentitem->add($input); + } + } + break; + + case "add_contact" : + if ($_POST["itemtype"] == 'Supplier') { + $contactsupplier = new Contact_Supplier(); + foreach ($_POST["item"] as $key => $val) { + $input = array('suppliers_id' => $key, + 'contacts_id' => $_POST['conID']); + if ($contactsupplier->can(-1,'w',$input)) { + $contactsupplier->add($input); + } + } + } + break; + + case "add_contract" : + $contractitem = new Contract_Item(); + foreach ($_POST["item"] as $key => $val) { + $input = array('itemtype' => $_POST["itemtype"], + 'items_id' => $key, + 'contracts_id' => $_POST['contracts_id']); + if ($contractitem->can(-1,'w',$input)) { + $contractitem->add($input); + } + } + break; + + case "add_enterprise" : + if ($_POST["itemtype"] == 'Contact') { + $contactsupplier = new Contact_Supplier(); + foreach ($_POST["item"] as $key => $val) { + $input = array('suppliers_id' => $_POST['entID'], + 'contacts_id' => $key); + if ($contactsupplier->can(-1,'w',$input)) { + $contactsupplier->add($input); + } + } + } + break; + + case "change_authtype" : + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $ids[] = $key; + } + } + User::changeAuthMethod($ids,$_POST["authtype"],$_POST["auths_id"]); + break; + + case "unlock_ocsng_field" : + $fields = OcsServer::getLockableFields(); + if ($_POST['field'] == 'all' || isset($fields[$_POST['field']])) { + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + if ($_POST['field'] == 'all') { + OcsServer::replaceOcsArray($key,array(),"computer_update"); + } else { + OcsServer::deleteInOcsArray($key,$_POST['field'],"computer_update",true); + } + } + } + } + break; + + case "unlock_ocsng_monitor" : + case "unlock_ocsng_printer" : + case "unlock_ocsng_peripheral" : + case "unlock_ocsng_software" : + case "unlock_ocsng_ip" : + case "unlock_ocsng_disk" : + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + switch ($_POST["action"]) { + case "unlock_ocsng_monitor" : + OcsServer::unlockItems($key,"import_monitor"); + break; + + case "unlock_ocsng_printer" : + OcsServer::unlockItems($key,"import_printer"); + break; + + case "unlock_ocsng_peripheral" : + OcsServer::unlockItems($key,"import_peripheral"); + break; + + case "unlock_ocsng_software" : + OcsServer::unlockItems($key,"import_software"); + break; + + case "unlock_ocsng_ip" : + OcsServer::unlockItems($key,"import_ip"); + break; + + case "unlock_ocsng_disk" : + OcsServer::unlockItems($key,"import_disk"); + break; + } + } + } + break; + + case "force_ocsng_update" : + // First time + if (!isset($_GET['multiple_actions'])) { + $_SESSION['glpi_massiveaction']['POST'] = $_POST; + $_SESSION['glpi_massiveaction']['REDIRECT'] = $REDIRECT; + $_SESSION['glpi_massiveaction']['items'] = array(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $_SESSION['glpi_massiveaction']['items'][$key] = $key; + } + } + $_SESSION['glpi_massiveaction']['item_count'] + = count($_SESSION['glpi_massiveaction']['items']); + glpi_header($_SERVER['PHP_SELF'].'?multiple_actions=1'); + } else { + if (count($_SESSION['glpi_massiveaction']['items']) >0) { + $key = array_pop($_SESSION['glpi_massiveaction']['items']); + //Try to get the OCS server whose machine belongs + $query = "SELECT `ocsservers_id`, `id` + FROM `glpi_ocslinks` + WHERE `computers_id` = '$key'"; + $result = $DB->query($query); + if ($DB->numrows($result) == 1) { + $data = $DB->fetch_assoc($result); + if ($data['ocsservers_id'] != -1) { + //Force update of the machine + OcsServer::updateComputer($data['id'],$data['ocsservers_id'],1,1); + } + } + glpi_header($_SERVER['PHP_SELF'].'?multiple_actions=1'); + } else { + $REDIRECT = $_SESSION['glpi_massiveaction']['REDIRECT']; + unset($_SESSION['glpi_massiveaction']); + glpi_header($REDIRECT); + } + } + break; + + case "compute_software_category" : + $softcatrule = new RuleSoftwareCategoryCollection; + $soft = new Software; + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $params = array(); + //Get software name and manufacturer + $soft->getFromDB($key); + $params["name"] = $soft->fields["name"]; + $params["manufacturers_id"] = $soft->fields["manufacturers_id"]; + $params["comment"] = $soft->fields["comment"]; + //Process rules + $soft->update($softcatrule->processAllRules(null,$soft->fields,$params)); + } + } + break; + + case "replay_dictionnary" : + $softdictionnayrule = new RuleDictionnarySoftwareCollection(); + $ids = array(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $ids[] = $key; + } + } + $softdictionnayrule->replayRulesOnExistingDB(0,0,$ids); + break; + + case "force_user_ldap_update" : + checkRight("user","w"); + $user = new User; + $ids = array(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $user->getFromDB($key); + if (($user->fields["authtype"] == Auth::LDAP) + || ($user->fields["authtype"] == Auth::EXTERNAL)) { + AuthLdap::ldapImportUserByServerId(array('method'=>AuthLDAP::IDENTIFIER_LOGIN, + 'value'=>$user->fields["name"]),1, + $user->fields["auths_id"]); + } + } + } + break; + + case "add_transfer_list" : + if (!isset($_SESSION['glpitransfer_list'])) { + $_SESSION['glpitransfer_list'] = array(); + } + if (!isset($_SESSION['glpitransfer_list'][$_POST["itemtype"]])) { + $_SESSION['glpitransfer_list'][$_POST["itemtype"]] = array(); + } + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $_SESSION['glpitransfer_list'][$_POST["itemtype"]][$key] = $key; + } + } + $REDIRECT = $CFG_GLPI['root_doc'].'/front/transfer.action.php'; + break; + + case "add_followup" : + $fup = new TicketFollowup(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input=array('tickets_id' => $key, + 'is_private' => $_POST['is_private'], + 'requesttypes_id' => $_POST['requesttypes_id'], + 'content' => $_POST['content']); + if ($fup->can(-1,'w',$input)) { + $fup->add($input); + } + } + } + break; + case "submit_validation" : + $valid = new TicketValidation(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input=array('tickets_id' => $key, + 'users_id_validate' => $_POST['users_id_validate'], + 'comment_submission' => $_POST['comment_submission']); + if ($valid->can(-1,'w',$input)) { + $valid->add($input); + } + } + } + break; + case "validate_ticket" : + $valid = new TicketValidation(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input=array('id' => $key, + 'status' => $_POST['status']); + if ($valid->can(-1,'w',$input)) { + $valid->update($input); + } + } + } + break; + + case "add_task" : + $task = new TicketTask(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $input=array('tickets_id' => $key, + 'taskcategories_id' => $_POST['taskcategories_id'], + 'content' => $_POST['content']); + if ($task->can(-1,'w',$input)) { + $task->add($input); + } + } + } + break; + + case 'reset' : + if ($_POST["itemtype"] == 'CronTask') { + checkRight('config','w'); + $crontask = new CronTask(); + foreach ($_POST["item"] as $key => $val) { + if ($val==1 && $crontask->getFromDB($key)) { + $crontask->resetDate(); + } + } + } + break; + + case 'move_under' : + if (isset($_POST['parent'])) { + $fk = $item->getForeignKeyField(); + foreach ($_POST["item"] as $key => $val) { + if ($val==1 && $item->can($key,'w')) { + $item->update(array('id' => $key, + $fk => $_POST['parent'])); + } + } + } + break; + + case 'merge' : + $fk = $item->getForeignKeyField(); + foreach ($_POST["item"] as $key => $val) { + if ($val==1 && $item->can($key,'w')) { + if ($item->getEntityID()==$_SESSION['glpiactive_entity']) { + $item->update(array('id' => $key, + 'is_recursive' => 1)); + } else { + + $input = $item->fields; + + // Remove keys (and name, tree dropdown will use completename) + if($item instanceof CommonTreeDropdown) { + unset($input['id'], $input['name'], $input[$fk]); + } else { + unset($input['id']); + } + // Change entity + $input['entities_id'] = $_SESSION['glpiactive_entity']; + $input['is_recursive'] = 1; + $input = addslashes_deep($input); + // Import new + $newid = $item->import($input); + + // Delete old + if ($newid > 0) { + $item->delete(array('id' => $key, + '_replace_by' => $newid)); + } + } + } + } + break; + + case 'delete_email': + case 'import_email': + $emails_ids = array(); + foreach ($_POST["item"] as $key => $val) { + if ($val == 1) { + $emails_ids[$key] = $key; + } + } + if (!empty($emails_ids)) { + $mailcollector = new MailCollector; + if ($_POST["action"] == 'delete_email') { + $mailcollector->deleteOrImportSeveralEmails($emails_ids,0); + } + else { + $mailcollector->deleteOrImportSeveralEmails($emails_ids,1,$_POST['entities_id']); + } + } + break; + default : + // Plugin specific actions + $split = explode('_',$_POST["action"]); + if ($split[0] == 'plugin' && isset($split[1])) { + // Normalized name plugin_name_action + // Allow hook from any plugin on any (core or plugin) type + doOneHook($split[1], + 'MassiveActionsProcess', + $_POST); + + } else if ($plug=isPluginItemType($_POST["itemtype"])) { + // non-normalized name + // hook from the plugin defining the type + doOneHook($plug['plugin'], + 'MassiveActionsProcess', + $_POST); + } + } + addMessageAfterRedirect($LANG['common'][23]); + glpi_header($REDIRECT); + + } else { //action, itemtype or item not defined + echo "
warning". + "

"; + echo "".$LANG['common'][24]."
"; + displayBackLink(); + } + + commonFooter(); +} // itemtype defined + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/monitor.form.php b/0.78-bugfixes/front/monitor.form.php new file mode 100644 index 0000000000000000000000000000000000000000..ff454c5e19e5122d818c62a8537ffa124f3be0f5 --- /dev/null +++ b/0.78-bugfixes/front/monitor.form.php @@ -0,0 +1,105 @@ +check(-1,'w',$_POST); + + $newID = $monitor->add($_POST); + Event::log($newID, "monitors", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $monitor->check($_POST["id"],'d'); + $monitor->delete($_POST); + + Event::log($_POST["id"], "monitors", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][22]); + $monitor->redirectToList(); + +} else if (isset($_POST["restore"])) { + $monitor->check($_POST["id"],'d'); + + $monitor->restore($_POST); + Event::log($_POST["id"], "monitors", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][23]); + $monitor->redirectToList(); + +} else if (isset($_REQUEST["purge"])) { + $monitor->check($_REQUEST["id"],'d'); + + $monitor->delete($_REQUEST,1); + Event::log($_REQUEST["id"], "monitors", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][24]); + $monitor->redirectToList(); + +} else if (isset($_POST["update"])) { + $monitor->check($_POST["id"],'w'); + + $monitor->update($_POST); + Event::log($_POST["id"], "monitors", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["unglobalize"])) { + $monitor->check($_GET["id"],'w'); + + Computer_Item::unglobalizeItem($monitor); + Event::log($_GET["id"], "monitors", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][60]); + glpi_header($CFG_GLPI["root_doc"]."/front/monitor.form.php?id=".$_GET["id"]); + +} else { + commonHeader($LANG['Menu'][3],$_SERVER['PHP_SELF'],"inventory","monitor"); + + $monitor->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"])); + + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/monitor.php b/0.78-bugfixes/front/monitor.php new file mode 100644 index 0000000000000000000000000000000000000000..c72a0fda3f33523633dd27014c6e5bd95579b84d --- /dev/null +++ b/0.78-bugfixes/front/monitor.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/front/monitormodel.form.php b/0.78-bugfixes/front/monitormodel.form.php new file mode 100644 index 0000000000000000000000000000000000000000..52a775ec1c65741caaee38c7454246fa33eb2647 --- /dev/null +++ b/0.78-bugfixes/front/monitormodel.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/monitormodel.php b/0.78-bugfixes/front/monitormodel.php new file mode 100644 index 0000000000000000000000000000000000000000..c360e6fe61a2727ea92b1e1ced528c8ac0637af8 --- /dev/null +++ b/0.78-bugfixes/front/monitormodel.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/monitortype.form.php b/0.78-bugfixes/front/monitortype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..8ffdedf4d5b14fc7c0cc7a6a5a20ed03c2beb4c3 --- /dev/null +++ b/0.78-bugfixes/front/monitortype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/monitortype.php b/0.78-bugfixes/front/monitortype.php new file mode 100644 index 0000000000000000000000000000000000000000..d7afee8f29dc3a5a401a7094ac5018dbb3b95917 --- /dev/null +++ b/0.78-bugfixes/front/monitortype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/netpoint.form.php b/0.78-bugfixes/front/netpoint.form.php new file mode 100644 index 0000000000000000000000000000000000000000..18a087db79743d4fc8ef57ffa67165e3421694c5 --- /dev/null +++ b/0.78-bugfixes/front/netpoint.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/netpoint.php b/0.78-bugfixes/front/netpoint.php new file mode 100644 index 0000000000000000000000000000000000000000..1eb06d61900cf3894b7d55c0e6f853c1debb58b1 --- /dev/null +++ b/0.78-bugfixes/front/netpoint.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/network.form.php b/0.78-bugfixes/front/network.form.php new file mode 100644 index 0000000000000000000000000000000000000000..bd960f951ccf05424e72ca01f3b15fd43481a717 --- /dev/null +++ b/0.78-bugfixes/front/network.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/network.php b/0.78-bugfixes/front/network.php new file mode 100644 index 0000000000000000000000000000000000000000..5b1174665884e667bd8493bea1881979249e757b --- /dev/null +++ b/0.78-bugfixes/front/network.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/networkequipment.form.php b/0.78-bugfixes/front/networkequipment.form.php new file mode 100644 index 0000000000000000000000000000000000000000..53f80f42dd2801b54f76b3294a6e472ed3e55130 --- /dev/null +++ b/0.78-bugfixes/front/networkequipment.form.php @@ -0,0 +1,98 @@ +check(-1,'w',$_POST); + + $newID = $netdevice->add($_POST); + Event::log($newID, "networkequipment", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." : ".$_POST["name"]."."); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $netdevice->check($_POST["id"],'d'); + $netdevice->delete($_POST); + + Event::log($_POST["id"], "networkequipment", 4, "inventory", + $_SESSION["glpiname"] ." ".$LANG['log'][22]); + + $netdevice->redirectToList(); + +} else if (isset($_POST["restore"])) { + $netdevice->check($_POST["id"],'d'); + + $netdevice->restore($_POST); + Event::log($_POST["id"], "networkequipment", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][23]); + $netdevice->redirectToList(); + +} else if (isset($_REQUEST["purge"])) { + + $netdevice->check($_REQUEST["id"],'d'); + + $netdevice->delete($_REQUEST,1); + Event::log($_REQUEST["id"], "networkequipment", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][24]); + $netdevice->redirectToList(); + +} else if (isset($_POST["update"])) { + $netdevice->check($_POST["id"],'w'); + + $netdevice->update($_POST); + Event::log($_POST["id"], "networkequipment", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['title'][6],$_SERVER['PHP_SELF'],"inventory","networking"); + $netdevice->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"])); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/networkequipment.php b/0.78-bugfixes/front/networkequipment.php new file mode 100644 index 0000000000000000000000000000000000000000..17d927a2f7e623f1ebeb8cb05314b409509c530e --- /dev/null +++ b/0.78-bugfixes/front/networkequipment.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/front/networkequipmentfirmware.form.php b/0.78-bugfixes/front/networkequipmentfirmware.form.php new file mode 100644 index 0000000000000000000000000000000000000000..7a10cda141be13e03b18c548ac523fd147a34ec9 --- /dev/null +++ b/0.78-bugfixes/front/networkequipmentfirmware.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/networkequipmentfirmware.php b/0.78-bugfixes/front/networkequipmentfirmware.php new file mode 100644 index 0000000000000000000000000000000000000000..1852c6a75c95f023192283c62e9258abf418a250 --- /dev/null +++ b/0.78-bugfixes/front/networkequipmentfirmware.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/networkequipmentmodel.form.php b/0.78-bugfixes/front/networkequipmentmodel.form.php new file mode 100644 index 0000000000000000000000000000000000000000..bb97f2cd6d7997a707544cacecef8770945f7b0f --- /dev/null +++ b/0.78-bugfixes/front/networkequipmentmodel.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/networkequipmentmodel.php b/0.78-bugfixes/front/networkequipmentmodel.php new file mode 100644 index 0000000000000000000000000000000000000000..bb13c46a2bee9bb52dc7456941f40eae934f3eeb --- /dev/null +++ b/0.78-bugfixes/front/networkequipmentmodel.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/networkequipmenttype.form.php b/0.78-bugfixes/front/networkequipmenttype.form.php new file mode 100644 index 0000000000000000000000000000000000000000..173dfa7b761c622e05292bdb9d025d32cc4b8fa8 --- /dev/null +++ b/0.78-bugfixes/front/networkequipmenttype.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/networkequipmenttype.php b/0.78-bugfixes/front/networkequipmenttype.php new file mode 100644 index 0000000000000000000000000000000000000000..505fd0922bc7ad8288bcc1b4f39d1bd39e99df89 --- /dev/null +++ b/0.78-bugfixes/front/networkequipmenttype.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/networkinterface.form.php b/0.78-bugfixes/front/networkinterface.form.php new file mode 100644 index 0000000000000000000000000000000000000000..dc3a5075c31451b4dc283cf61a2236cbafe7fcbd --- /dev/null +++ b/0.78-bugfixes/front/networkinterface.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/networkinterface.php b/0.78-bugfixes/front/networkinterface.php new file mode 100644 index 0000000000000000000000000000000000000000..77d75fa25a3d62364c8b0e2070f3f0ad6c73b203 --- /dev/null +++ b/0.78-bugfixes/front/networkinterface.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/networkport.form.php b/0.78-bugfixes/front/networkport.form.php new file mode 100644 index 0000000000000000000000000000000000000000..6fc96ddd0cf6f9cba46a6649237fcd3b0b3c9bc1 --- /dev/null +++ b/0.78-bugfixes/front/networkport.form.php @@ -0,0 +1,221 @@ +check(-1,'w',$_POST); + $np->add($_POST); + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][70]); + glpi_header($_SERVER['HTTP_REFERER']); + + } else { + checkRight("networking","w"); + $input = $_POST; + unset($input['several']); + unset($input['from_logical_number']); + unset($input['to_logical_number']); + for ($i=$_POST["from_logical_number"] ; $i<=$_POST["to_logical_number"] ; $i++) { + $add = ""; + if ($i < 10) { + $add = "0"; + } + $input["logical_number"] = $i; + $input["name"] = $_POST["name"].$add.$i; + unset($np->fields["id"]); + if ($np->can(-1,'w',$input)) { + $np->add($input); + } + } + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ". + ($_POST["to_logical_number"]-$_POST["from_logical_number"]+1)." ".$LANG['log'][71]); + glpi_header($_SERVER['HTTP_REFERER']); + } + +} else if(isset($_POST["delete"])) { + $np->check($_POST['id'],'d'); + $np->delete($_POST); + Event::log($_POST['id'], "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][73]); + if (class_exists($np->fields['itemtype'])) { + $item=new $np->fields['itemtype'](); + glpi_header($item->getFormURL().'?id='.$np->fields['items_id']); + } + glpi_header($CFG_GLPI["root_doc"]."/front/central.php"); + +} else if(isset($_POST["delete_several"])) { + checkRight("networking","w"); + if (isset($_POST["del_port"]) && count($_POST["del_port"])) { + foreach ($_POST["del_port"] as $port_id => $val) { + if ($np->can($port_id,'d')) { + $np->delete(array("id" => $port_id)); + } + } + } + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][74]); + glpi_header($_SERVER['HTTP_REFERER']); + +} +// Interest of this massive action ? +/*else if(isset($_POST["move"])) { + checkRight("networking","w"); + if (isset($_POST["del_port"]) && count($_POST["del_port"])) { + foreach ($_POST["del_port"] as $port_id => $val) { + if ($np->getFromDB($port_id)) { + $input = array(); + $input['id'] = $port_id; + $input['items_id'] = $_POST["device"]; + if ($np->can($input['id'],'w')) { + $np->update($input); + } + } + } + } + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][75]); + glpi_header($_SERVER['HTTP_REFERER']); + +}*/else if(isset($_POST["update"])) { + $np->check($_POST['id'],'w'); + + $np->update($_POST); + Event::log($_POST["id"], "networkport", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["connect"])) { + if (isset($_POST["dport"]) && count($_POST["dport"])) { + foreach ($_POST["dport"] as $sport => $dport) { + if ($sport && $dport) { + + $nn->add(array('networkports_id_1'=> $sport, 'networkports_id_2' => $dport)); + } + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["disconnect"])) { + $nn->check($_GET['id'],'d'); + if (isset($_GET["id"])) { + $nn->delete($_GET); + $fin = ""; + if (isset($_GET["sport"])) { + $fin = "?sport=".$_GET["sport"]; + } + glpi_header($_SERVER['HTTP_REFERER'].$fin); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if(isset($_POST["assign_vlan_several"])) { + checkRight("networking","w"); + if ($_POST["vlans_id"] >0) { + if (isset($_POST["del_port"]) && count($_POST["del_port"])) { + foreach ($_POST["del_port"] as $port_id => $val) { + $npv->assignVlan($port_id,$_POST["vlans_id"]); + } + } + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][78]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST['assign_vlan'])) { + $npv->check(-1,'w',$_POST); + + if (isset($_POST["vlans_id"]) && $_POST["vlans_id"] >0) { + $npv->assignVlan($_POST["networkports_id"],$_POST["vlans_id"]); + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][77]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if(isset($_POST["unassign_vlan_several"])) { + checkRight("networking","w"); + + if ($_POST["vlans_id"] >0) { + if (isset($_POST["del_port"]) && count($_POST["del_port"])) { + foreach ($_POST["del_port"] as $port_id => $val) { + // Check port write access + if ($np->can($port_id,'w')) { + $npv->unassignVlan($port_id,$_POST["vlans_id"]); + } + } + } + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][80]); + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET['unassign_vlan'])) { + $npv->check($_GET['id'],'d'); + + $npv->unassignVlanbyID($_GET['id']); + Event::log(0, "networkport", 5, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][79]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + if (empty($_GET["items_id"])) { + $_GET["items_id"] = ""; + } + if (empty($_GET["itemtype"])) { + $_GET["itemtype"] = ""; + } + if (empty($_GET["several"])) { + $_GET["several"] = ""; + } + checkRight("networking","w"); + commonHeader($LANG['title'][6],$_SERVER['PHP_SELF'],"inventory"); + +// NetworkPort::showNetportForm($_SERVER['PHP_SELF'],$_GET["id"],$_GET["items_id"],$_GET["itemtype"],$_GET["several"]); + $np->showForm($_GET["id"],$_GET); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/notification.form.php b/0.78-bugfixes/front/notification.form.php new file mode 100644 index 0000000000000000000000000000000000000000..753258e5ab27ac5bfd01b50a1a57025d408178ba --- /dev/null +++ b/0.78-bugfixes/front/notification.form.php @@ -0,0 +1,74 @@ +check(-1,'w',$_POST); + + $newID = $notification->add($_POST); + Event::log($newID, "notifications", 4, "notification", + $_SESSION["glpiname"]." ".$LANG['log'][20]." : ".$_POST["name"]."."); + glpi_header($_SERVER['PHP_SELF']."?id=$newID"); + +} else if (isset($_POST["delete"])) { + $notification->check($_POST["id"],'d'); + $notification->delete($_POST); + + Event::log($_POST["id"], "notifications", 4, "notification", + $_SESSION["glpiname"] ." ".$LANG['log'][22]); + $notification->redirectToList(); + +} else if (isset($_POST["update"])) { + $notification->check($_POST["id"],'w'); + + $notification->update($_POST); + Event::log($_POST["id"], "notifications", 4, "notification", + $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['setup'][704],$_SERVER['PHP_SELF'],"config","mailing","notification"); + $notification->showForm($_GET["id"]); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/notification.php b/0.78-bugfixes/front/notification.php new file mode 100644 index 0000000000000000000000000000000000000000..d850798cf247a461c2656080fbc7b6661150e864 --- /dev/null +++ b/0.78-bugfixes/front/notification.php @@ -0,0 +1,46 @@ + diff --git a/0.78-bugfixes/front/notification.tags.php b/0.78-bugfixes/front/notification.tags.php new file mode 100644 index 0000000000000000000000000000000000000000..578c67957971cb2471ba9e466bf7069dd985e82b --- /dev/null +++ b/0.78-bugfixes/front/notification.tags.php @@ -0,0 +1,52 @@ + diff --git a/0.78-bugfixes/front/notificationmailsetting.form.php b/0.78-bugfixes/front/notificationmailsetting.form.php new file mode 100644 index 0000000000000000000000000000000000000000..e23d7ff4fa0215869d42cc953afb5f944a4b9d55 --- /dev/null +++ b/0.78-bugfixes/front/notificationmailsetting.form.php @@ -0,0 +1,57 @@ +update($_POST); + glpi_header($_SERVER['HTTP_REFERER']); +} + +commonHeader($LANG['setup'][704], $_SERVER['PHP_SELF'],"config","mailing","config"); + +$notificationmail->showForm(1); + +commonFooter(); +?> diff --git a/0.78-bugfixes/front/notificationtarget.form.php b/0.78-bugfixes/front/notificationtarget.form.php new file mode 100644 index 0000000000000000000000000000000000000000..9e247d26f5a367fbe0a358bcf3b9192994ec707b --- /dev/null +++ b/0.78-bugfixes/front/notificationtarget.form.php @@ -0,0 +1,36 @@ + diff --git a/0.78-bugfixes/front/notificationtemplate.form.php b/0.78-bugfixes/front/notificationtemplate.form.php new file mode 100644 index 0000000000000000000000000000000000000000..245cd2476a8a5332bc4c5a3ea426b6a11ffb6df3 --- /dev/null +++ b/0.78-bugfixes/front/notificationtemplate.form.php @@ -0,0 +1,92 @@ +check(-1,'w',$_POST); + + $newID = $notificationtemplate->add($_POST); + Event::log($newID, "notificationtemplates", 4, "notification", + $_SESSION["glpiname"]." ".$LANG['log'][20]." : ".$_POST["name"]."."); + + $language = new NotificationTemplateTranslation(); + $url = getItemTypeFormURL('NotificationTemplateTranslation',true); + $url.="?notificationtemplates_id=$newID"; + glpi_header($url); + +} else if (isset($_POST["delete"])) { + $notificationtemplate->check($_POST["id"],'d'); + $notificationtemplate->delete($_POST); + + Event::log($_POST["id"], "notificationtemplates", 4, "notification", + $_SESSION["glpiname"] ." ".$LANG['log'][22]); + $notificationtemplate->redirectToList(); + +} else if (isset($_POST["delete_languages"])) { + $notificationtemplate->check(-1,'d'); + $language = new NotificationTemplateTranslation; + if (isset($_POST['languages'])) { + foreach($_POST['languages'] as $key =>$val) { + if ($val=='on') { + $input['id'] = $key; + $language->delete($input); + } + } + } + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["update"])) { + $notificationtemplate->check($_POST["id"],'w'); + + $notificationtemplate->update($_POST); + Event::log($_POST["id"], "notificationtemplates", 4, "notification", + $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['mailing'][113],$_SERVER['PHP_SELF'],"config","mailing", + "notificationtemplate"); + $notificationtemplate->showForm($_GET["id"]); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/notificationtemplate.php b/0.78-bugfixes/front/notificationtemplate.php new file mode 100644 index 0000000000000000000000000000000000000000..c0ef0cbc16b44280fa596b3ac371e413dae4ded8 --- /dev/null +++ b/0.78-bugfixes/front/notificationtemplate.php @@ -0,0 +1,45 @@ + diff --git a/0.78-bugfixes/front/notificationtemplatetranslation.form.php b/0.78-bugfixes/front/notificationtemplatetranslation.form.php new file mode 100644 index 0000000000000000000000000000000000000000..0ab39fc1db367140f7640a84171631817d21886b --- /dev/null +++ b/0.78-bugfixes/front/notificationtemplatetranslation.form.php @@ -0,0 +1,81 @@ +check(-1,'w',$_POST); + + $newID = $language->add($_POST); + Event::log($newID, "notificationtemplates", 4, "notification", + $_SESSION["glpiname"]." ".$LANG['log'][20]." : ".$_POST["language"]."."); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $language->check($_POST["id"],'d'); + $language->delete($_POST); + + Event::log($_POST["id"], "notificationtemplates", 4, "notification", + $_SESSION["glpiname"] ." ".$LANG['log'][22]); + + $language->redirectToList(); +} else if (isset($_POST["update"])) { + $language->check($_POST["id"],'w'); + + $language->update($_POST); + Event::log($_POST["id"], "notificationtemplates", 4, "notification", $_SESSION["glpiname"]. + " ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else { + commonHeader($LANG['mailing'][113],$_SERVER['PHP_SELF'],"config","mailing","notificationtemplate"); + if ($_GET["id"] == '') { + $options = array("notificationtemplates_id"=> $_GET["notificationtemplates_id"]); + } + else { + $options = array(); + } + $language->showForm($_GET["id"], + $options); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/notimportedemail.php b/0.78-bugfixes/front/notimportedemail.php new file mode 100644 index 0000000000000000000000000000000000000000..661f9d8054453118d6513fa07313c576e92a3da4 --- /dev/null +++ b/0.78-bugfixes/front/notimportedemail.php @@ -0,0 +1,48 @@ + diff --git a/0.78-bugfixes/front/ocsng.clean.php b/0.78-bugfixes/front/ocsng.clean.php new file mode 100644 index 0000000000000000000000000000000000000000..e975d6ba251a81423cf702e4032fd186dfcc8295 --- /dev/null +++ b/0.78-bugfixes/front/ocsng.clean.php @@ -0,0 +1,51 @@ +".$LANG['ocsng'][3]." - ".$LANG['log'][45]."
"; +displayBackLink(); +echo ""; + +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/ocsng.import.php b/0.78-bugfixes/front/ocsng.import.php new file mode 100644 index 0000000000000000000000000000000000000000..88c467b1ad10aec73846dc7c64508e7ea6f00a22 --- /dev/null +++ b/0.78-bugfixes/front/ocsng.import.php @@ -0,0 +1,125 @@ +".$LANG['ocsng'][8]."
"; + echo "".$LANG['buttons'][13].""; + } +} + +if (!isset($_POST["import_ok"])) { + if (!isset($_GET['check'])) { + $_GET['check'] = 'all'; + } + if (!isset($_GET['start'])) { + $_GET['start'] = 0; + } + if (isset($_SESSION["ocs_import"])) { + unset($_SESSION["ocs_import"]); + } + OcsServer::manageDeleted($_SESSION["ocsservers_id"]); + OcsServer::ocsShowNewComputer($_SESSION["ocsservers_id"],$_SESSION["change_import_mode"], + $_GET['check'],$_GET['start']); + +} else { + if (count($_POST['toimport']) >0) { + $_SESSION["ocs_import_count"] = 0; + foreach ($_POST['toimport'] as $key => $val) { + if ($val == "on") { + $_SESSION["ocs_import"]["id"][] = $key; + if (isset($_POST['toimport_entities'])) { + $_SESSION["ocs_import"]["entities_id"][$key] = $_POST['toimport_entities'][$key]; + } + if (isset($_POST['toimport_locations'])) { + $_SESSION["ocs_import"]["locations_id"][$key] = $_POST['toimport_locations'][$key]; + } + $_SESSION["ocs_import_count"]++; + } + } + } + glpi_header($_SERVER['PHP_SELF']); +} + +commonFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/ocsng.link.php b/0.78-bugfixes/front/ocsng.link.php new file mode 100644 index 0000000000000000000000000000000000000000..2450d1258651eb527d81f92c7af8ad07d6d1b868 --- /dev/null +++ b/0.78-bugfixes/front/ocsng.link.php @@ -0,0 +1,105 @@ +".$LANG['ocsng'][8]."
"; + echo "".$LANG['buttons'][13].""; + } +} + +if (!isset($_POST["import_ok"])) { + if (!isset($_GET['check'])) { + $_GET['check'] = 'all'; + } + if (!isset($_GET['start'])) { + $_GET['start'] = 0; + } + OcsServer::manageDeleted($_SESSION["ocsservers_id"]); + OcsServer::ocsShowNewComputer($_SESSION["ocsservers_id"],$_SESSION["change_import_mode"], + $_GET['check'],$_GET['start'],$_SESSION['glpiactiveentities'],1); + +} else { + if (count($_POST['tolink']) >0) { + $_SESSION["ocs_link_count"] = 0; + foreach ($_POST['tolink'] as $ocsid => $computers_id) { + if ($computers_id >0) { + $_SESSION["ocs_link"][] = array('ocsid' => $ocsid, + 'computers_id' => $computers_id); + $_SESSION["ocs_link_count"]++; + } + } + } + glpi_header($_SERVER['PHP_SELF']); +} + +commonFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/ocsng.php b/0.78-bugfixes/front/ocsng.php new file mode 100644 index 0000000000000000000000000000000000000000..7d5de3dac33923174d1355150c7cd024c267ce8a --- /dev/null +++ b/0.78-bugfixes/front/ocsng.php @@ -0,0 +1,96 @@ +query($sql); + + if ($DB->numrows($result) > 0) { + $datas = $DB->fetch_array($result); + $name = " : " . $datas["name"]; + } + echo "
"; + echo "" .
+         $LANG["; + echo "
"; + + echo "
"; + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo ""; + + echo "
" . $LANG['ocsng'][0] . " " . $name . "
" . $LANG['ocsng'][1] . + "
" . $LANG['ocsng'][2] . + "
" . $LANG['ocsng'][4] . + "
" . $LANG['ocsng'][3] . + "
"; + + OcsServer::manageDeleted($_SESSION["ocsservers_id"]); + +} else { + OcsServer::showFormServerChoice(); +} +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/ocsng.sync.php b/0.78-bugfixes/front/ocsng.sync.php new file mode 100644 index 0000000000000000000000000000000000000000..d4769efbe27d1bc711bf5028df244fe515ef96c8 --- /dev/null +++ b/0.78-bugfixes/front/ocsng.sync.php @@ -0,0 +1,87 @@ +".$LANG['ocsng'][8]."
"; + echo "".$LANG['buttons'][13].""; + } +} + +if (!isset($_POST["update_ok"])) { + if (!isset($_GET['check'])) { + $_GET['check'] = 'all'; + } + if (!isset($_GET['start'])) { + $_GET['start'] = 0; + } + OcsServer::manageDeleted($_SESSION["ocsservers_id"]); + OcsServer::showComputersToUpdate($_SESSION["ocsservers_id"],$_GET['check'],$_GET['start']); + +} else { + if (count($_POST['toupdate']) >0) { + $_SESSION["ocs_update_count"] = 0; + foreach ($_POST['toupdate'] as $key => $val) { + if ($val == "on") { + $_SESSION["ocs_update"][] = $key; + $_SESSION["ocs_update_count"]++; + } + } + } + glpi_header($_SERVER['PHP_SELF']); +} + +commonFooter(); + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/ocsserver.form.php b/0.78-bugfixes/front/ocsserver.form.php new file mode 100644 index 0000000000000000000000000000000000000000..35b355b198789ca0ef48656a4cc8364769a6438c --- /dev/null +++ b/0.78-bugfixes/front/ocsserver.form.php @@ -0,0 +1,75 @@ +delete($_POST); + $ocs->redirectToList(); + +//Update server +} else if (isset ($_POST["update"])) { + $ocs->update($_POST); + glpi_header($_SERVER["HTTP_REFERER"]); + +//Update server +} else if (isset ($_POST["update_server"])) { + $ocs->update($_POST); + glpi_header($_SERVER["HTTP_REFERER"]); + +//Add new server +} else if (isset ($_POST["add"])) { + $newid = $ocs->add($_POST); + glpi_header($_SERVER["HTTP_REFERER"]); + +//Other +} else { + $ocs->showForm($_GET["id"]); +} +commonFooter(); + +?> diff --git a/0.78-bugfixes/front/ocsserver.php b/0.78-bugfixes/front/ocsserver.php new file mode 100644 index 0000000000000000000000000000000000000000..518c5e3891f3204f6c933a966f6edc6864c3c45c --- /dev/null +++ b/0.78-bugfixes/front/ocsserver.php @@ -0,0 +1,48 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/operatingsystem.form.php b/0.78-bugfixes/front/operatingsystem.form.php new file mode 100644 index 0000000000000000000000000000000000000000..d2c2be8d9c437510dc24cc9fa95235143354e7d1 --- /dev/null +++ b/0.78-bugfixes/front/operatingsystem.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/operatingsystem.php b/0.78-bugfixes/front/operatingsystem.php new file mode 100644 index 0000000000000000000000000000000000000000..35709f8e3ca30d8cee7f88538c3bff4d7bfca9af --- /dev/null +++ b/0.78-bugfixes/front/operatingsystem.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/operatingsystemservicepack.form.php b/0.78-bugfixes/front/operatingsystemservicepack.form.php new file mode 100644 index 0000000000000000000000000000000000000000..2bc61cdfa68e6842cfd019c331fc4ed3e0e75dcd --- /dev/null +++ b/0.78-bugfixes/front/operatingsystemservicepack.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/operatingsystemservicepack.php b/0.78-bugfixes/front/operatingsystemservicepack.php new file mode 100644 index 0000000000000000000000000000000000000000..7938655ff030ef37673a471b7f68ff49c5251308 --- /dev/null +++ b/0.78-bugfixes/front/operatingsystemservicepack.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/operatingsystemversion.form.php b/0.78-bugfixes/front/operatingsystemversion.form.php new file mode 100644 index 0000000000000000000000000000000000000000..394fb664d9d66d4e4799ab9d1b503390adcf1835 --- /dev/null +++ b/0.78-bugfixes/front/operatingsystemversion.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/operatingsystemversion.php b/0.78-bugfixes/front/operatingsystemversion.php new file mode 100644 index 0000000000000000000000000000000000000000..4dfc95ca8352a5d53d52a420ff788f7e24c9a2f8 --- /dev/null +++ b/0.78-bugfixes/front/operatingsystemversion.php @@ -0,0 +1,42 @@ + diff --git a/0.78-bugfixes/front/peripheral.form.php b/0.78-bugfixes/front/peripheral.form.php new file mode 100644 index 0000000000000000000000000000000000000000..db1517a9baffd1002e1726d4bec53204ffc971eb --- /dev/null +++ b/0.78-bugfixes/front/peripheral.form.php @@ -0,0 +1,107 @@ +check(-1,'w',$_POST); + + $newID = $peripheral->add($_POST); + Event::log($newID, "peripherals", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][20]." ".$_POST["name"]."."); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_POST["delete"])) { + $peripheral->check($_POST["id"],'d'); + $peripheral->delete($_POST); + + Event::log($_POST["id"], "peripherals", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][22]); + $peripheral->redirectToList(); + +} else if (isset($_POST["restore"])) { + $peripheral->check($_POST["id"],'d'); + + $peripheral->restore($_POST); + Event::log($_POST["id"], "peripherals", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][23]); + $peripheral->redirectToList(); + +} else if (isset($_REQUEST["purge"])) { + $peripheral->check($_REQUEST["id"],'d'); + + $peripheral->delete($_REQUEST,1); + Event::log($_REQUEST["id"], "peripherals", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][24]); + $peripheral->redirectToList(); + +} else if (isset($_POST["update"])) { + $peripheral->check($_POST["id"],'w'); + + $peripheral->update($_POST); + Event::log($_POST["id"], "peripherals", 4, "inventory", + $_SESSION["glpiname"]." ".$LANG['log'][21]); + glpi_header($_SERVER['HTTP_REFERER']); + +} else if (isset($_GET["unglobalize"])) { + $peripheral->check($_GET["id"],'w'); + + Computer_Item::unglobalizeItem($peripheral); + Event::log($_GET["id"], "peripherals", 4, "inventory", $_SESSION["glpiname"]." ".$LANG['log'][60]); + glpi_header($CFG_GLPI["root_doc"]."/front/peripheral.form.php?id=".$_GET["id"]); + +} else { + commonHeader($LANG['Menu'][16],$_SERVER['PHP_SELF'],"inventory","peripheral"); + $peripheral->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"])); + commonFooter(); +} + +?> \ No newline at end of file diff --git a/0.78-bugfixes/front/peripheral.php b/0.78-bugfixes/front/peripheral.php new file mode 100644 index 0000000000000000000000000000000000000000..e8fec72657a20aa92e704decc239e3b991230063 --- /dev/null +++ b/0.78-bugfixes/front/peripheral.php @@ -0,0 +1,47 @@ + diff --git a/0.78-bugfixes/front/peripheralmodel.form.php b/0.78-bugfixes/front/peripheralmodel.form.php new file mode 100644 index 0000000000000000000000000000000000000000..9fe906438fe7a58c7c91e35f5f140695e957c12d --- /dev/null +++ b/0.78-bugfixes/front/peripheralmodel.form.php @@ -0,0 +1,42 @@ + \ No newline at end of file diff --git a/0.78-bugfixes/front/peripheralmodel.php b/0.78-bugfixes/front/peripheralmodel.php new file mode 100644 index 0000000000000000000000000000000000000000..1fffc3933aeb34e19c8e4045f148b0cc71943ea2 --- /dev/null +++ b/0.78-bugfixes/front/peripheralmodel.php @@ -0,0 +1,42 @@ +