ocsinventory-server-2.2+dfsg/000077500000000000000000000000001303466605000163455ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/000077500000000000000000000000001303466605000175265ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Changes000066400000000000000000000406701303466605000210300ustar00rootroot00000000000000Revision history for Apache::Ocsinventory 2.2 RC * Add plugins web service which is used by the plugin engine to install plugin ( Use SOAP::Lite ) * Add compatibility with Apache 2.4 and more : https://github.com/OCSInventory-NG/OCSInventory-Server/commit/861dcb17f826d9580f0f5f0937bd1ae7376e6602 2.2beta1 * Add and requests tags in SOAP engine to be able to exclude tags or ids during SOAP requests * Add new 'batteries' inventory section to get various batteries data * New OCS_OPT_SNMP_PRINT_HTTPS_ERROR configuration option to enable or disable error message display about agent https communication in logfile * Fix bug in SOAP engine while retrieving data from type tables 2.1.2 2.1.1 * Fix Bug #1315004 about MySQL replication broken using MySQL 5.6 * Fix Bug #1311852 and Bug #1296633 about CHECKSUM updated for all computers * Fix a mistake for OCS_PLUGINS_PERL_DIR and OCS_PLUGINS_CONF_DIR options in ocsinventory-server.conf 2.1 * Add new fields for printers table in Map.pm * Fix Bug #1214436 about removing already registered hosts and add Mac support in ipdiscover-util.pl * Add a new table for SNMP virtual machines data in Map.pm * Fix Bug #1248582 about custom field names not decoded in SOAP ACCOUNTINFO * Fix Bug #1191791 about CHECKSUM value not updated when NOTIFY mode send new network changes * New plugins system to be able to add new entries in Map.pm and more... 2.1rc1 * Add availibility to specify a post command for a package deployment * SOAP engine is now able to get SNMP devices inventory * Add new 'sims' inventory section to get various SIM card data from phone devices * Add availibility to schedule a package deployment * Remove OCS_OPT_SUPPORT configuration option and XML tag in PROLOG * Add availibility to reforce a package deployment * Add availability to specify custom MIBS for SNMP scans * Add availability to specify a custom network address for SNMP scans * New OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT configuration option to prevent package commands to run indefinitely * setup.sh script can now detect Suse/OpenSuse distributions * Add new 'cpus' inventory section to get various CPU data * Add a new field in hardware section to get the computer architecture * Add new fields for snmp_loadbalancer table in Map.pm * Fix Bug #1085020 about ERR_ALREADY_IN_HISTORY message that should be success * Prevent bugs in NOTIFY mode with older XML behaviour 2.0.5 * Create "logs" and "scripts" directories for administration console in setup.sh 2.0.4 2.0.3 * Fix Bug #881406 about security issue due to snmp_com.txt file which is no longer used * Do not take care of comment lines when getting external useragents file content * Fix various bugs in NOTIFY mode 2.0.2 * Add availibilty to allow external useragents using a text file 2.0.1 * Remove 'Satisfy any' Apache directive in ocsinventory-server.conf * Fix RPM packages names in setup.sh * Fix Bug #800418 about subnet, gateway and IP DHCP informations disappearance from database * Increase php_value post_max_size and php_value upload_max_filesize values to 101 Mo and 100 Mo in ocsinventory-reports.conf * Change php_value to php_flag for magic_quotes_gpc setting in ocsinventory-reports.conf * Add new useragents for iOS and Android OCS agents in Useragent.pm 2.0 * New OCS_OPT_SUPPORT configuration option for OCS Inventory support activation * Add a new XML tag in PROLOG * Add a new module to manage OCS support: Support.pm * Add a XML tag in NOTIFY request to update IPDHCP field in database 2.0 rc4 * Add a warning in setup.sh about what has to be done if the OS has newsyslog installed (BSD systems) * Fix Bug #744022 about logrotate configuration in setup.sh even if the OS has not logrotate installed * Add availability to specify mysql socket in ipdiscover-util.pl * Fix UTF8 problem while comparing accountinfo strings after inventory step 2.0 rc3 * Use OCS_OPT_DBI_MYSQL_SOCKET in SOAP engine if needed * Ipdiscover now uses useragent instead of OSNAME for automatic election * Fix Bug #721278 about hardware_osname cache table. This table is now feeded by engine * Verify that HARDWARE_ID are not groups when computing groups caches * Disable MySQL strict mode by default * Fix Bug #726522 about OCS_OPT_DBI_MYSQL_SOCKET option in ocsinventory-server.conf * Don't process the sections that are use for capacities special inventory in SOAP engine (but thats the way its meant to be) * Fix a bug in Download.pm: ERR_ALREADY_IN_HISTORY message was never added in devices table * Fix SQL syntax error and add a capacities tables exclusion in Duplicate.pm 2.0 rc2 * Add a new variable $Apache::Ocsinventory::BUILD_VERSION in Ocsinventory.pm * Fix Bug #694760 about utf8 strings broken 2.0 rc1 * New OCS server module : Snmp.pm . It is use for SNMP integration in OCS Inventory NG. This module comes with Snmp/Data.pm and Snmp/Inventory.pm * Add Useragent.pm to control agents and their versions to solve versions incompatibilty problems between OCS agents and OCS server * Add a new parameter for tables in Map.pm: mandatory. This parameter force database feeding even if inventory section is not in XML * Control if inventory section is in XML before writing it in database to avoid bugs. * Add COMMENTS and VERSION fields in snmp_softwares table * Add new fields in softwares table: GUID, LANGUAGE, LASTDATE and BITSWIDTH * Debug and enhance Data.pm to use the availability to explode database structure using type tables * Add new module Datafiler.pm. This module add availibity to filter data from HARDWARE section (data filtered won't be stored in database) * setup.sh can now install missing perl modules for you using yum or apt-get (Philippe Beaumont) * Add new fileds "DEVICEPORT" and "DEVICETYPE" in snmp_networks table in Map.pm * Add a new field "SYSTEM" for snmp_blades, snmp_firewalls and snmp_loadbalancer tables in Map.pm * Add new tables for SNMP computers data in Map.pm * Add a new table "snmp_switchinfos" in Map.pm * snmp_switchs table is "multi" now in Map.pm * Add the copy of the snmp_com.txt file in setup.sh to set default SNMP "public" community if this file does not exists * Fix various mistakes and missing fields for snmp tables in Map.pm * Add the new Apache configuration for SNMP communities reference file (snmp_com.txt) in setup.sh and ocsinventory-reports.conf * Enhance DB backend by reducing the SQL request number as possible in SNMP inventory * Enhance errors management for SNMP inventory * New OCS_OPT_SNMP_INVENTORY_DIFF config option to enable or disable the SNMP inventory sections update regarding to snmp_laststate table * Add a CHECKSUM for SNMP devices. It is compute using mask values from SNMP inventory sections from Map.pm . * New snmp_laststate table to store md5 hashes for SNMP inventory sections (this table is used for SNMP inventory sections update in database) * SNMP inventory sections are updated in database only if changed since last inventory * Snmp.pm send the snmp_com.txt file URI to the agent * New table snmp_accountinfo * Feel the SNMP_ID filed in snmp_accountinfo when a new SNMP device coming * Feel the TAG field in the snmp_accountinfo while inventory for SNMP devices * Add STATUS and ERRORSTATE fields for snmp_printers table * Map.pm: snmp_networksconnected and snmp_switchs are now auto => 0 due to the special treatments associated to this tables * Don't take care of identified network devices for SNMP scans in Snmp.pm. This devices will be scanned using SNMP too * Add the MAC address in the PROLOG response in Snmp.pm * Use of _get_snmp_parser_ForceArray subroutine to get sections for the 'ForceArray' in Snmp.pm * Add LASTDATE field in the snmp table to store the last inventory date for a SNMP device * Enhance SNMP implementation by getting SNMP communities informations directly from the snmp_communities table * Enable the SNMP activation/deactivation using custom parameters on computer on groups * Map.pm: new table parameter -> capacities * Map.pm: add new tables for SNMP * Data.pm : use the new "capacities" Map.pm parameter to don't take care of tables that have this parameter when feeding %SECTIONS and @SECTIONS * Config.pm : add a new configuration option for activate/desactivate SNMP feature * ocsinventory-server.conf : add Snmp.pm in Capacities list and add a new configuration option for activate/desactivate SNMP feature * Correct Bug #563791 about GW and SUBNET update in NOTIFY * Correct Bug #563791 about GW and SUBNET update in NOTIFY * Correct a misprint about the use of 'OCS_OPT_UNICODE_SUPPORT' in Data.pm (from sisfb_tech) * Useragent.pm: allow the future 4062 Windows agent and some code cleaning by using a hash reference for %CURRENT_CONTEXT * Add the Windows rearch agent to allow in Useragent.pm * ASSETTAG is in BIOS, not HARDWARE 1.3.3 * Force XML::Simple to use XML::Parser instead of XML::SAX to fix disastrous performance issues in Redhat distribution due to the perl-XML-SAX package problems. * Correct bug about automatic IPDISCOVER election 1.3 * Unix right: add the exec flag * Quote HARDWARE/TYPE * Save SOFTWARE/FROM (Stéphane Urbanovski) * SQL quote for all the hardware fields * SQL syntax fix. Duplicate 'WHERE' (axil_76) * Decrease OCS_OPT_GROUPS_CACHE_* from one day to 10 minutes * Fix: Computer with ASSETTAG are not inventoried * Save HARDWARE/UUID * Avoid err 500 if ACCOUNTINFO is not found for a given inventory * Added printers.DESCRIPTION * Added OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT from trunk * DTD updates 1.3 beta2 * fix setup.sh for Debian * minor fixes * add binutils/create-release-tarball.sh 1.3 beta1 * Added virtual device detection for a network iface * Added description field to printers section * Use of hardware.UUID and hardware.ASSETTAG in duplicates detection * Duplicates mgmt: Now removing current device from dynamic groups and keep the static groups membership * The SOAP service is now able to share data with engine in +w mode by the use of ::System::_lock() * Deleting computers using SOAP service http://sourceforge.net/tracker/?func=detail&aid=2776298&group_id=58373&atid=487495 * itmgmt_comments support in duplicates * Download: Added ERR_ALREADY_IN_HISTORY status code (package affected but already in history) * Added source IP in inventory https://sourceforge.net/tracker/?func=detail&aid=2807594&group_id=58373&atid=487495 * Added DRIVES/CREATEDATE support https://sourceforge.net/tracker/?func=detail&atid=487495&aid=2275640&group_id=58373 * Added ASSETTAG support https://sourceforge.net/tracker/index.php?func=detail&aid=2804146&group_id=58373&atid=487495 * Added DNS device informations https://sourceforge.net/tracker/?func=detail&aid=1566957&group_id=58373&atid=487495 * Fixed .ocs files generation on windows server https://sourceforge.net/tracker/index.php?func=detail&aid=2817320&group_id=58373&atid=487492 * Mobile devices support https://sourceforge.net/tracker/index.php?func=detail&aid=2810746&group_id=58373&atid=487495 * Fixed the "bad software import bug" https://sourceforge.net/tracker/index.php?func=detail&aid=2129983&group_id=58373&atid=487492 * DB schema changes support through "type=>1" field meta information in Map.pm * Unicode support https://sourceforge.net/tracker/index.php?func=detail&aid=2796796&group_id=58373&atid=487495 Thanks to Andrek * Added DEFAULTGATEWAY support * Added inventory of virtualization (Philippe Libat) * Fixed a bug in SOAP Engine https://sourceforge.net/tracker/?func=detail&atid=487492&aid=2787130&group_id=58373 1.02 final * Handling the trailing '/' in deploy feature and calling _end in more standard way (Ocsinventory.pm) * Fix a typo (logging) in System.pm (OCS_OPT_LOGPATH) Thx to Remi Collet * Fix: call to _accountinfo() in Inventory.pm whereas Update::AccountInfos not in the scope 1.02 RC2 * Fix the problem of feeding cache when write_diff is OFF * Fix the duplicate error in packages history (download) 1.02 RC1 * As the dictionary and "all softs" are inventory cache dependant = INVENTORY_CACHE_REVALIDATE default => 7 * Fixed the DEVICEID checking * Important fix in "on the fly deletion" in inventory cache * Added fallback values for '??' (unix agents prior than 0.8) * Added OCS_OPT_INVENTORY_CACHE_KEEP setting * Inventory_cache deletion is handled "on the fly" * Inventory cache clean now retry on fault * Inventory cache clean is now off by default * IPDISCOVER: Do not evaluate if mode is local * Added LOCAL_FL to CURRENT_CONTEXT * The default Ip(hardware.IPADDR) is now based on REMOTE_ADDR (or HTTP_X_FORWARDED_FOR) * Added IS_TRUSTED test if INVENTORY_SESSION_ONLY * Inventory_cache is now computed on row level * Moved user agent update in prolog stage * Added old_deviceid log * Added "fallback" field's attribute to Map.pm * Added OCS_OPT_COMPRESS_TRY_OTHERS setting * Notify: Added IP address update event handling * Added Notify.pm capacity * Fix a bug in DATA_MAP: accountinfos is a "multi" section * Added log when using compression different than raw ZLIB * Added -path parameter to ipdiscover-util.pl (changes in GUI for FHS support) * Added OCS_OPT_INVENTORY_SESSION_ONLY: An inventory is accepted only if it is required by server * Added session (prolog=>post_inventory) Options: SESSION_VALIDITY_TIME, SESSION_CLEAN_TIME * Added error 523 * Added OCS_OPT_* parameters checking to server starting * Bug fix in inventory cache revalidate (lock fault) * Added disable caches computation (group and inventory) feature (REVALIDATE* set to 0) * Removed inventory cache checking for a section that has not changed since last inventory * Added OCS_OPT_OPTIONS_NOT_OVERLOADED (configure engine to take its settings from file only) * Higher server's verbosity * Bug fix: Do not handle in Duplicates the "auto => 0" sections * Bug fix: Replacement of a "one shot" computer generates an error (QUALITY is NULL) * Bug fix: do not close logfile if LOGLEVEL is off * Added ocsinventory-log.pl sample and associated README * A few improvements and fixes on web service * Added groups.REVALIDATE_FROM field : groups.CREATE_TIME is now the real groups computation date * Added a minimal system to load external methods in web service (OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF) * Added ipdiscover_delete_type_V1() to web service * Added ipdiscover_create_type_V1() to web service * Added ipdiscover_untag_V1() to web service * Added ipdiscover_remove_V1() to web service * Added ipdiscover_tag_V1() to web service * Added get_ipdiscover_device() to web service * Added OCS_OPT_WEB_SERVICE_RESULTS_LIMIT setting * Added XML::Entities dependency on SOAP service (as SOAP::Lite may not decode CDATA) * Web service upgrade ( bug fixes, and many improvements) * New configuration system using Apache::Ocsinventory::Server::System::Config * Groups are now computed using DB Slae if available * Engine extensions : "Option" renamed to "Capacity" * Changed module structure * Code improvement for Inventory.pm * Added model serial as auto duplicate criteria * Added INVENTORY_WRITE_DIFF for lower load on DB backends and more afficient sql query cache * Added Slave DB backend support (for read: soap engine...etc) * PROLOG_FREQ specific parameter handling (computer, mass processing and group levels) * DOWNLOAD* specific parameters handling (computer, mass processing and group levels) * IPDISCOVER specific parameter handling (computer, mass processing and group levels) * Computer's groups support (dynamic and static) * blacklists of MAC and SERIAL are now handled from database * Multiple ocs servers support (Backends) * Trusted computers support (filter exceptions) * GZIP compression support * No compression support * inventory cache handling improved ocsinventory-server-2.2+dfsg/Apache/INSTALL000066400000000000000000000050421303466605000205600ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Communication Server Perl Module Setup # # Copyleft 2006 Pascal DANEK # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ This module handles communication between OCS Inventory NG agents and server. It acts as an Apache extension and require following PERL Modules. - 'DBI' => 1.40 or higher - 'Apache::DBI' => 0.93 or higher - 'DBD::mysql' => 2.9004 or higher - 'Compress::Zlib' => 1.33 or higher - 'XML::Simple' => 2.12 or higher - 'Net::IP' => 1.21 or higher - 'SOAP::Lite' => 0.66 or higher used only with SOAP web service - 'XML::Entities' => 0.02 or higher used only with SOAP web service To setup it, just follow traditional PERL Module installation procedure. - perl Makefile.PL - make - make install This will install OCS Inventory NG Communication Server PERL Module into standard PERL includes directory. Next, you have to to configure Apache web server to load Communication Server at startup. You can use provided etc/ocsinventory/ocsinventory-server.conf file as sample. Apache must have module mod_perl enabled. As configuration differs from mod_perl 1.999_21 or previous AND mod_perl 1.999_22 or higher, you must specify which release of mod_perl your Apache is using. On Linux computers, you can find which release of mod_perl is installed by running the following command: - On RPM enabled OS, rpm -q mod_perl - On DPKG enabled OS, dpkg -l libapache*-mod-perl* You must set the value of PERL constant OCS_MODPERL_VERSION to 1 if mod_perl 1.999_21 or previous is used by Apache, or to 2 if mod_perl 1.999_22 and higher is used by Apache. Update constants OCS_DB_HOST and OCS_DB_PORT to specify where is MySQL database server. Generally, set localhost and 3306 if MySQL is on the same computer. Update constant OCS_LOGPATH to specify where Communication Server must write logs, if they are enabled. Remember to allow web server to write in this directory ! File etc/logrotate.d/ocsinventory-server is a sample to enable rotation of Communication Server logs. Directory binutils contains useful perl scripts to batch import locally generated inventory results (.ocs files), to analyse Communication Server logs... Refer to README in directory. Enjoy ;-) ocsinventory-server-2.2+dfsg/Apache/LICENSE000066400000000000000000000431031303466605000205340ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General Public License instead of this License. ocsinventory-server-2.2+dfsg/Apache/MANIFEST000066400000000000000000000032131303466605000206560ustar00rootroot00000000000000Changes INSTALL LICENSE Makefile.PL MANIFEST This list of files Ocsinventory.pm Ocsinventory/Interface.pm Ocsinventory/Interface/Config.pm Ocsinventory/Interface/Database.pm Ocsinventory/Interface/Extensions.pm Ocsinventory/Interface/History.pm Ocsinventory/Interface/Internals.pm Ocsinventory/Interface/Inventory.pm Ocsinventory/Interface/Ipdiscover.pm Ocsinventory/Interface/Updates.pm Ocsinventory/Map.pm Ocsinventory/Server/Capacities/Datafilter.pm Ocsinventory/Server/Capacities/Download.pm Ocsinventory/Server/Capacities/Download/Inventory.pm Ocsinventory/Server/Capacities/Example.pm Ocsinventory/Server/Capacities/Filter.pm Ocsinventory/Server/Capacities/Ipdiscover.pm Ocsinventory/Server/Capacities/Notify.pm Ocsinventory/Server/Capacities/Registry.pm Ocsinventory/Server/Capacities/Snmp.pm Ocsinventory/Server/Capacities/Snmp/Data.pm Ocsinventory/Server/Capacities/Snmp/Inventory.pm Ocsinventory/Server/Capacities/Update.pm Ocsinventory/Server/Communication.pm Ocsinventory/Server/Communication/Session.pm Ocsinventory/Server/Constants.pm Ocsinventory/Server/Duplicate.pm Ocsinventory/Server/Groups.pm Ocsinventory/Server/Inventory.pm Ocsinventory/Server/Inventory/Cache.pm Ocsinventory/Server/Inventory/Capacities.pm Ocsinventory/Server/Inventory/Data.pm Ocsinventory/Server/Inventory/Export.pm Ocsinventory/Server/Inventory/Filter.pm Ocsinventory/Server/Inventory/Update.pm Ocsinventory/Server/Inventory/Update/AccountInfos.pm Ocsinventory/Server/Inventory/Update/Hardware.pm Ocsinventory/Server/Modperl1.pm Ocsinventory/Server/Modperl2.pm Ocsinventory/Server/System.pm Ocsinventory/Server/System/Config.pm Ocsinventory/Server/Useragent.pm Ocsinventory/SOAP.pm ocsinventory-server-2.2+dfsg/Apache/Makefile.PL000066400000000000000000000035421303466605000215040ustar00rootroot00000000000000#------------------------------------------------------- # # $Id: Makefile.PL,v 1.6 2008-02-27 21:26:27 dliroulet Exp $ # #------------------------------------------------------- ################################################################################ # # OCS Inventory NG Communication Server Perl Module Setup # # Copyleft 2006 Pascal DANEK # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'Apache::Ocsinventory', 'VERSION_FROM' => 'Ocsinventory.pm', 'PREREQ_PM' => { 'DBI' => 1.40, # no DBI can never be any fun. 'Apache::DBI' => 0.93, # no Apache::DBI can never be any fun. 'Compress::Zlib' => 1.33, # no Compress:Zlib can never be any fun. 'DBD::mysql' => 2.9004, # no DBD::mysql can never be any fun. 'XML::Simple' => 2.12, # no XML::Simple can never be any fun. 'Net::IP' => 1.21, # no Net::IP can never be any fun. # 'SOAP::Lite' => 0.66, # no SOAP::Lite can never be any fun (required only for SOAP web service). # 'XML::Entities' => 0.02, # no SOAP::Lite can never be any fun (required only for SOAP web service). }, # 'EXE_FILES' => ['binutils/ocsinventory-injector.pl'], # 'INSTALLSCRIPT' => "/usr/bin", # 'INSTALLSITESCRIPT' => "/usr/bin", ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (AUTHOR => 'Pascal DANEK ') : ()), ); # EOF ocsinventory-server-2.2+dfsg/Apache/Ocsinventory.pm000066400000000000000000000223511303466605000225710ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); }else{ if(!defined($ENV{'OCS_MODPERL_VERSION'})){ die("OCS_MODPERL_VERSION not defined. Abort\n"); }else{ die("OCS_MODPERL_VERSION set to, a bad parameter. Must be '1' or '2'. Abort\n"); } } } $Apache::Ocsinventory::VERSION = '2.2'; $Apache::Ocsinventory::BUILD_VERSION = '735'; $XML::Simple::PREFERRED_PARSER = 'XML::Parser'; # Ocs modules use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::System qw /:server _modules_get_request_handler /; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Inventory; use Apache::Ocsinventory::Server::Groups; use Apache::Ocsinventory::Server::Useragent; # To compress the tx and read the rx use Compress::Zlib; use Encode; # Globale structure our %CURRENT_CONTEXT; our @XMLParseOptForceArray;# Obsolete, for 1.01 modules only my %XML_PARSER_OPT; our @TRUSTED_IP; sub handler{ my $d; my $status; my $r; my $data; my $raw_data; my $inflated; my $query; my $dbMode; # current context # Will be used to handle all globales %CURRENT_CONTEXT = ( 'APACHE_OBJECT' => undef, 'RAW_DATA' => undef, #'DBI_HANDLE' => undef, # DBI_SL_HANDLE => undef 'DEVICEID' => undef, 'DATABASE_ID' => undef, 'DATA' => undef, 'XML_ENTRY' => undef, 'XML_INVENTORY' => undef, 'LOCK_FL' => 0, 'EXIST_FL' => 0, 'MEMBER_OF' => undef, 'DEFLATE_SUB' => \&Compress::Zlib::compress, 'IS_TRUSTED' => 0, 'DETAILS' => undef, 'PARAMS' => undef, 'PARAMS_G' => undef, 'MEMBER_OF' => undef, 'IPADDRESS' => $ENV{'HTTP_X_FORWARDED_FOR'}?$ENV{'HTTP_X_FORWARDED_FOR'}:$ENV{'REMOTE_ADDR'}, 'USER_AGENT' => undef, 'LOCAL_FL' => undef ); # No buffer for STDOUT select(STDOUT); $|=1; # Get the data and the apache object $r=shift; $CURRENT_CONTEXT{'APACHE_OBJECT'} = $r; $CURRENT_CONTEXT{'USER_AGENT'} = &_get_http_header('User-agent', $r); @TRUSTED_IP = $r->dir_config->get('OCS_OPT_TRUSTED_IP'); #Connect to database $dbMode = 'write'; if($Apache::Ocsinventory::CURRENT_CONTEXT{'USER_AGENT'} =~ /local/i){ $CURRENT_CONTEXT{'LOCAL_FL'}=1; $dbMode = 'local'; } if(!($CURRENT_CONTEXT{'DBI_HANDLE'} = &_database_connect( $dbMode ))){ &_log(505,'handler','Database connection'); return &_end(APACHE_SERVER_ERROR); } if(!($CURRENT_CONTEXT{'DBI_SL_HANDLE'} = &_database_connect( 'read' ))){ &_log(505,'handler','Database Slave connection'); return &_end(APACHE_SERVER_ERROR); } #Retrieve server options if(&_get_sys_options()){ &_log(503,'handler', 'System options'); return &_end(APACHE_SERVER_ERROR); } # First, we determine the http method # The get method will be only available for the bootstrap to manage the deploy, and maybe, sometime to give files which will be stored in the database if($r->method() eq 'GET'){ # To manage the first contact with the bootstrap # The uri must be '/ocsinventory/deploy/[filename]' if($r->uri()=~/deploy\/([^\/]+)\/?$/){ if($ENV{'OCS_OPT_DEPLOY'}){ return &_end(&_send_file('deploy',$1)); }else{ return &_end(APACHE_FORBIDDEN); } }elsif($r->uri()=~/update\/(.+)\/(.+)\/(\d+)\/?/){ # We use the GET method for the update to use the proxies # The URL is built like that : [OCSFSERVER]/ocsinventory/[os]/[name]/[version] if($ENV{'OCS_OPT_UPDATE'}){ return &_end(&_send_file('update',$1,$2,$3)); }else{ return &_end(APACHE_FORBIDDEN); } }else{ # If the url is invalid return &_end(APACHE_BAD_REQUEST); } # Here is the post method management }elsif($r->method eq 'POST'){ # Get the data if( !read(STDIN, $data, $ENV{'CONTENT_LENGTH'}) ){ &_log(512,'handler','Reading request') if $ENV{'OCS_OPT_LOGLEVEL'}; return &_end(APACHE_SERVER_ERROR); } # Copying buffer because inflate() modify it $raw_data = $data; $CURRENT_CONTEXT{'RAW_DATA'} = \$raw_data; # Debug level for Apache::DBI (apache/error.log) # $Apache::DBI::DEBUG=2; # Read the request # Possibilities : # prolog : The agent wants to know if he have to send an inventory (and with which options) # update : The agent wants to know if there is a newer version available # inventory : It is an inventory # system : Request to know the server's time response (and if it's alive) not yet implemented # file : Download files when upgrading (For the moment, only when upgrading) ################################################## # # Inflate the data unless($d = Compress::Zlib::inflateInit()){ &_log(506,'handler','Compress stage') if $ENV{'OCS_OPT_LOGLEVEL'}; return &_end(APACHE_BAD_REQUEST); } ($inflated, $status) = $d->inflate($data); unless( $status == Z_OK or $status == Z_STREAM_END){ if( $ENV{OCS_OPT_COMPRESS_TRY_OTHERS} ){ &_inflate(\$raw_data, \$inflated); } else{ undef $inflated; } if(!$inflated){ &_log(506,'handler','Compress stage'); return &_end(APACHE_SERVER_ERROR); } } # Unicode support - The XML may not use UTF8 if($ENV{'OCS_OPT_UNICODE_SUPPORT'}) { if($inflated =~ /^.+encoding="([\w+\-]+)/) { my $enc = $1; $inflated =~ s/$enc/UTF-8/; Encode::from_to($inflated, "$enc", "utf8"); } } $CURRENT_CONTEXT{'DATA'} = \$inflated; ########################## # Parse the XML request # Retrieving xml parsing options if needed &_get_xml_parser_opt( \%XML_PARSER_OPT ) unless %XML_PARSER_OPT; unless($query = XML::Simple::XMLin( $inflated, %XML_PARSER_OPT )){ &_log(507,'handler','Xml stage'); return &_end(APACHE_BAD_REQUEST); } $CURRENT_CONTEXT{'XML_ENTRY'} = $query; # Get the request type my $request=$query->{QUERY}; $CURRENT_CONTEXT{'DEVICEID'} = $query->{DEVICEID} or $CURRENT_CONTEXT{'DEVICEID'} = $query->{CONTENT}->{DEVICEID}; unless($request eq 'UPDATE'){ if(&_check_deviceid($Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'})){ &_log(502,'inventory','Bad deviceid') if $ENV{'OCS_OPT_LOGLEVEL'}; return &_end(APACHE_BAD_REQUEST); } } # Must be filled unless($request){ &_log(500,'handler','Request not defined'); return &_end(APACHE_BAD_REQUEST); } # Init global structure my $err = &_init(); return &_end($err) if $err; # The three above are hardcoded if($request eq 'PROLOG'){ my $ret = &_prolog(); return(&_end($ret)); }elsif($request eq 'INVENTORY'){ my $ret = &_inventory_handler(); return(&_end($ret)) }elsif($request eq 'SYSTEM'){ my $ret = &_system_handler(); return(&_end($ret)); }else{ # Other request are handled by options my $handler = &_modules_get_request_handler($request); if($handler == 0){ &_log(500,'handler', 'No handler'); return APACHE_BAD_REQUEST; }else{ my $ret = &{$handler}(\%CURRENT_CONTEXT); return(&_end($ret)); } } }else{ return APACHE_FORBIDDEN } } sub _init{ my $request; # Retrieve Device if exists $request = $CURRENT_CONTEXT{'DBI_HANDLE'}->prepare(' SELECT DEVICEID,ID,UNIX_TIMESTAMP(LASTCOME) AS LCOME,UNIX_TIMESTAMP(LASTDATE) AS LDATE,QUALITY,FIDELITY FROM hardware WHERE DEVICEID=?' ); unless($request->execute($CURRENT_CONTEXT{'DEVICEID'})){ return(APACHE_SERVER_ERROR); } for my $ipreg (@TRUSTED_IP){ if($CURRENT_CONTEXT{'IPADDRESS'}=~/^$ipreg$/){ &_log(310,'handler','trusted_computer') if $ENV{'OCS_OPT_LOGLEVEL'}; $CURRENT_CONTEXT{'IS_TRUSTED'} = 1; } } if($request->rows){ my $row = $request->fetchrow_hashref; $CURRENT_CONTEXT{'EXIST_FL'} = 1; $CURRENT_CONTEXT{'DATABASE_ID'} = $row->{'ID'}; $CURRENT_CONTEXT{'DETAILS'} = { 'LCOME' => $row->{'LCOME'}, 'LDATE' => $row->{'LDATE'}, 'QUALITY' => $row->{'QUALITY'}, 'FIDELITY' => $row->{'FIDELITY'}, }; # Computing groups list if($ENV{'OCS_OPT_ENABLE_GROUPS'}){ $CURRENT_CONTEXT{'MEMBER_OF'} = [ &_get_groups() ]; } else{ $CURRENT_CONTEXT{'MEMBER_OF'} = []; } $CURRENT_CONTEXT{'PARAMS'} = { &_get_spec_params() }; $CURRENT_CONTEXT{'PARAMS_G'} = { &_get_spec_params_g() }; }else{ $CURRENT_CONTEXT{'EXIST_FL'} = 0; $CURRENT_CONTEXT{'MEMBER_OF'} = []; } $request->finish; return; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/000077500000000000000000000000001303466605000222305ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface.pm000066400000000000000000000133701303466605000244720ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2006 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface; use Apache::Ocsinventory::Interface::Internals; use Apache::Ocsinventory::Interface::Database; require Apache::Ocsinventory::Interface::Ipdiscover; require Apache::Ocsinventory::Interface::Inventory; require Apache::Ocsinventory::Interface::Config; require Apache::Ocsinventory::Interface::History; require Apache::Ocsinventory::Interface::Extensions; require Apache::Ocsinventory::Interface::Updates; require Apache::Ocsinventory::Interface::Snmp; use strict; $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT} = 100 if !defined $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; eval{ if( $ENV{OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF} ){ require $ENV{OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF} or die($!); } }; if($@){ print STDERR "ocsinventory-server: $@\n"; print STDERR "ocsinventory-server: Can't load $ENV{OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF} - Web service Private extensions will be unavailable\n"; }; # ===== ACCESSOR TO COMPUTER'S DATA ===== sub get_computers_V1{ my $class = shift; # Xml request my $request = shift; return Apache::Ocsinventory::Interface::Inventory::get_computers( $request ); } sub delete_computers_by_id_V1{ my $class = shift ; my @ids = @_ ; return Apache::Ocsinventory::Interface::Updates::delete_computers_by_id( \@ids ); } # ===== CONFIGURATION METHODS ===== # Read a general config parameter # If a value is provided, set it to given parameters # If only a tvalue is given, set ivalue to NULL sub ocs_config_V1{ my $class = shift; my ($key, $value) = @_; return send_error('BAD_KEY') unless $key =~ /^[_\w]+$/; if( defined( $key ) and defined( $value ) ){ $key = decode_xml( $key ); $value = decode_xml( $value ); Apache::Ocsinventory::Interface::Config::ocs_config_write( $key, $value, undef ) if defined($value); } return Apache::Ocsinventory::Interface::Config::ocs_config_read( $key, 1 ); } sub ocs_config_V2{ my $class = shift; my ($key, $ivalue, $tvalue) = @_; return send_error('BAD_KEY') unless $key =~ /^[_\w]+$/; if( defined( $key ) and ( defined( $ivalue) or defined( $tvalue) ) ){ $key = decode_xml( $key ); $ivalue = decode_xml( $ivalue ) if defined $ivalue; $tvalue = decode_xml( $tvalue ) if defined $tvalue; my ($error, $result ) = Apache::Ocsinventory::Interface::Config::ocs_config_write( $key, $ivalue, $tvalue ); return $result if $error; } return Apache::Ocsinventory::Interface::Config::ocs_config_read( $key, 0 ); } # ===== SOFTWARE DICTIONARY ===== # Get a software dictionary word sub get_dico_soft_element_V1{ my( $class, $word ) = @_; $word = decode_xml( $word ); return Apache::Ocsinventory::Interface::Inventory::get_dico_soft_extracted( $word ); } # ===== CHECKSUM UPDATE ===== sub reset_checksum_V1 { my $class = shift; my $checksum = shift; return send_error('BAD_CHECKSUM') unless $checksum =~ /^\d+$/; for(@_){ return send_error('BAD_ID') unless $_ =~ /^\d+$/; } return Apache::Ocsinventory::Interface::Internals::reset_checksum( $checksum, \@_ ); } # ===== EVENTS TRACKING ===== # Get computer's history sub get_history_V1{ my( $class, $offset ) = @_; return send_error('BAD_OFFSET') unless $offset =~ /^\d+$/; return Apache::Ocsinventory::Interface::History::get_history_events( $offset ); } # Clear computer's history sub clear_history_V1{ my( $class, $offset ) = @_; return send_error('BAD_OFFSET') unless $offset =~ /^\d+$/; return Apache::Ocsinventory::Interface::History::clear_history_events( $offset ); } # ===== IPDISCOVER METHODS ===== sub get_ipdiscover_devices_V1{ my $class = shift; my ( $date, $offset, $nInv ) = @_; $nInv = 0 if !defined $nInv; return send_error('BAD_DATE') unless $date =~ /^\d{4}-\d{2}-\d{2}(\s\d\d(:\d\d){2})?$/; return send_error('BAD_OFFSET') unless $offset =~ /^\d+$/; return send_error('BAD_THIRD_PARAMETER') unless $nInv =~ /^(?:0|1)$/; return Apache::Ocsinventory::Interface::Ipdiscover::get_ipdiscover_devices( $date, $offset, $nInv ); } sub ipdiscover_tag_V1 { my $class = shift; my ( $device, $description, $type, $user ) = @_; $description = decode_xml( $description ); $type = decode_xml( $type ); $user = decode_xml( $user ); return send_error('BAD_MAC') unless $device =~ /^\w\w(.\w\w){5}$/; return Apache::Ocsinventory::Interface::Ipdiscover::ipdiscover_tag( $device, $description, $type, $user ); } sub ipdiscover_untag_V1{ my $class = shift; my $device = shift; return send_error('BAD_MAC') unless $device =~ /^\w\w(.\w\w){5}$/; return Apache::Ocsinventory::Interface::Ipdiscover::ipdiscover_untag( $device ); } sub ipdiscover_remove_V1{ my $class = shift; my $device = shift; return send_error('BAD_MAC') unless $device =~ /^\w\w(.\w\w){5}$/; return Apache::Ocsinventory::Interface::Ipdiscover::ipdiscover_remove( $device ); } sub ipdiscover_create_type_V1{ my $class = shift; my $type = shift; $type = decode_xml( $type ); return Apache::Ocsinventory::Interface::Ipdiscover::ipdiscover_add_type( $type ); } sub ipdiscover_delete_type_V1{ my $class = shift; my $type = shift; $type = decode_xml( $type ); return Apache::Ocsinventory::Interface::Ipdiscover::ipdiscover_del_type( $type ); } # ===== ACCESSOR TO SNMP DATA ===== sub get_snmp_V1{ my $class = shift; # Xml request my $request = shift; return Apache::Ocsinventory::Interface::Snmp::get_snmp( $request ); } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/000077500000000000000000000000001303466605000241305ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Config.pm000066400000000000000000000047411303466605000257010ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Config; use Apache::Ocsinventory::Interface::Database; use Apache::Ocsinventory::Interface::Internals; use Apache::Ocsinventory::Server::System::Config; use XML::Simple; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / /; sub ocs_config_is_supported{ my $setting = shift; return grep { $_ eq $setting } Apache::Ocsinventory::Server::System::Config::get_settings(); } # Return a config value sub ocs_config_read{ my ($key, $legacy) = @_; unless( ocs_config_is_supported( $key ) ){ return send_error( 'KEY_NOT_SUPPORTED' ); } my $sth = get_sth('SELECT IVALUE,TVALUE FROM config WHERE NAME=?', $key); unless($sth->rows){ $sth->finish(); return undef; } my ($i,$t) = $sth->fetchrow_array(); $sth->finish(); if( $legacy ){ return $i; } else{ return XMLout ( { 'IVALUE' =>[$i], 'TVALUE' =>[$t] }, RootName => 'RESULT' ); } } sub ocs_config_is_valid { my ($key, $ivalue, $tvalue ) = @_; my $testedValue; if( $CONFIG{$key}->{type} eq 'IVALUE' ){ $testedValue = $ivalue; } elsif( $CONFIG{$key}->{type} eq 'TVALUE' ){ $testedValue = $tvalue; } else{ return 0; } return $testedValue =~ $CONFIG{$key}->{filter}; } # Set a config value in "config" table # If ocs GUI is not used, # you have to change parameters in ocsinventory.conf sub ocs_config_write{ my( $key, $ivalue, $tvalue ) = @_; if( ocs_config_is_supported( $key ) ){ if( !ocs_config_is_valid( $key, $ivalue, $tvalue ) ){ return (1, send_error( 'VALUE_NOT_VALID' )); } my $sth = get_sth("SELECT * FROM config WHERE NAME=?", $key); if( !$sth->rows ){ do_sql("INSERT INTO config(NAME) VALUES(?)", $key); } $sth->finish(); do_sql("UPDATE config SET IVALUE=? WHERE NAME=?", $ivalue, $key ) if defined $ivalue; do_sql("UPDATE config SET TVALUE=? WHERE NAME=?", $tvalue, $key ) if defined $tvalue; } else{ return ( 1, send_error( 'KEY_NOT_SUPPORTED' ) ); } 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Database.pm000066400000000000000000000067251303466605000262040ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Database; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / database_connect get_sth get_dbh_write get_dbh_read do_sql get_hardware_table_pk get_snmp_table_pk get_type_name untaint_dbstring untaint_dbstring_lst /; # Database connection sub database_connect{ my $dbHost; my $dbName; my $dbPort; my $dbUser; my $dbPwd; my %params; my $mode = shift; if( $mode eq 'read' && $ENV{'OCS_DB_SL_HOST'} ){ $dbHost = $ENV{'OCS_DB_SL_HOST'}; $dbName = $ENV{'OCS_DB_SL_NAME'}||'ocsweb'; $dbPort = $ENV{'OCS_DB_SL_PORT'}||'3306'; $dbUser = $ENV{'OCS_DB_SL_USER'}; $dbPwd = $Apache::Ocsinventory::SOAP::apache_req->dir_config('OCS_DB_SL_PWD'); } else{ $dbHost = $ENV{'OCS_DB_HOST'}; $dbName = $ENV{'OCS_DB_NAME'}||'ocsweb'; $dbPort = $ENV{'OCS_DB_PORT'}||'3306'; $dbUser = $ENV{'OCS_DB_USER'}; $dbPwd = $Apache::Ocsinventory::SOAP::apache_req->dir_config('OCS_DB_PWD'); } # Optionnaly a mysql socket different than the client's built in $params{'mysql_socket'} = $ENV{'OCS_OPT_DBI_MYSQL_SOCKET'} if $ENV{'OCS_OPT_DBI_MYSQL_SOCKET'}; # Connection... my $dbh = DBI->connect( "DBI:mysql:database=$dbName;host=$dbHost;port=$dbPort", $dbUser, $dbPwd, \%params); $dbh->do("SET NAMES 'utf8'") if($dbh && $ENV{'OCS_OPT_UNICODE_SUPPORT'}); $dbh->do("SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); return $dbh; } # Process the sql requests (prepare) sub get_sth { my ($sql, @values) = @_; my $dbh = database_connect( get_db_mode( $sql ) ); my $request = $dbh->prepare( $sql ); $request->execute( @values ) or die("==Bad request==\nSQL:$sql\nDATAS:".join "> <", @values, "\n"); return $request; } # Return dbi handles for particular use sub get_dbh_write { return database_connect('write') ; } sub get_dbh_read { return database_connect('read') ; } # Process the sql requests (do) sub do_sql { my ($sql, @values) = @_; my $dbh = database_connect( get_db_mode($sql) ); return $dbh->do( $sql, {}, @values ); } # Return the id field of an inventory section sub get_hardware_table_pk{ my $section = shift; return ($section eq 'hardware')?'ID':'HARDWARE_ID'; } sub get_snmp_table_pk{ my $section = shift; return ($section eq 'snmp')?'ID':'SNMP_ID'; } sub get_type_name{ my ($section, $field, $value) = @_ ; my $table_name = 'type_'.lc $section.'_'.lc $field ; my $name ; my $existsSql = "SELECT NAME FROM $table_name WHERE ID=?" ; my $existsReq = get_sth($existsSql, $value) ; my $row = $existsReq->fetchrow_hashref() ; $name = $row->{NAME} ; $existsReq->finish ; return $name ; } sub untaint_dbstring{ my $string = shift; $string =~ s/"/\\"/g; $string =~ s/'/\\'/g; return $string; } sub untaint_dbstring_lst{ my @list = @_; my @quoted; for (@list){ push @quoted, untaint_dbstring($_); } return @quoted; } sub get_db_mode { my $sql = shift; if( $sql =~ /select|show/i ){ return 'read'; } else{ return 'write'; } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Extensions.pm000066400000000000000000000011241303466605000266230ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Extensions; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / /; 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/History.pm000066400000000000000000000035151303466605000261330ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::History; use Apache::Ocsinventory::Interface::Database; use XML::Simple; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / get_history_events clear_history_events /; sub get_history_events { my $offset = shift; my @tmp; $offset = $offset * $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; my $sth = get_sth( "SELECT DATE,DELETED,EQUIVALENT FROM deleted_equiv ORDER BY DATE,DELETED LIMIT $offset, $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}" ); while( my $row = $sth->fetchrow_hashref() ){ push @tmp, { 'DELETED' => [ $row->{'DELETED'} ], 'DATE' => [ $row->{'DATE'} ], 'EQUIVALENT' => [ $row->{'EQUIVALENT'} ] } } $sth->finish(); return XML::Simple::XMLout( {'EVENT' => \@tmp} , RootName => 'EVENTS' ); } sub clear_history_events { my $offset = shift; my $ok = 0; my $sth = get_sth( "SELECT * FROM deleted_equiv ORDER BY DATE,DELETED LIMIT 0,$offset" ); while( my $row = $sth->fetchrow_hashref() ) { if( defined $row->{'EQUIVALENT'} ){ do_sql('DELETE FROM deleted_equiv WHERE DELETED=? AND DATE=? AND EQUIVALENT=?', $row->{'DELETED'}, $row->{'DATE'}, $row->{'EQUIVALENT'}) or die; } else{ do_sql('DELETE FROM deleted_equiv WHERE DELETED=? AND DATE=? AND EQUIVALENT IS NULL', $row->{'DELETED'}, $row->{'DATE'}) or die; } $ok++; } return $ok; } ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Internals.pm000066400000000000000000000145641303466605000264370ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2006 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Internals; use strict; require Exporter; # If SOAP lite doesn't decode xml entities eval { require XML::Entities; }; if($@){ print STDERR "[".localtime()."] OCSINVENTORY: (SOAP): Cannot find XML::Entities\n"; } use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Interface::Database; use XML::Simple; our @ISA = qw /Exporter/; our @EXPORT = qw / build_xml_standard_section decode_xml encode_xml search_engine send_error get_custom_field_name_map get_custom_fields_values_map /; sub decode_xml{ my $data = shift; unless( $data =~ /^ \&engine_first, ); &{ $search_engines{ (lc $engine) } }( @_ ); } sub engine_first { my ($request, $ids, $begin, $main_table, $accountinfo_table, $deviceid_column, $pk) = @_; my $parsed_request = XML::Simple::XMLin( $request, ForceArray => ['ID', 'EXCLUDE_ID', 'TAG', 'EXCLUDE_TAG', 'USERID'], SuppressEmpty => 1 ) or die; my ($id, $name, $userid, $checksum, $tag); # Database ids criteria die("BAD_REQUEST") if ( $parsed_request->{ID} and $parsed_request->{EXCLUDE_ID} ); if( $parsed_request->{ID} ){ if( my @ids = untaint_int_lst( @{ $parsed_request->{ID} } )){ $id .= ' AND'; $id .= ' '.$main_table.'.ID IN('.join(',', @ids ).')'; } } if( $parsed_request->{EXCLUDE_ID} ){ if( my @exclude_ids = untaint_int_lst( @{ $parsed_request->{EXCLUDE_ID} } )){ $id .= ' AND'; $id .= ' '.$main_table.'.ID NOT IN('.join(',', @exclude_ids ).')'; } } # Tag criteria die("BAD_REQUEST") if ( $parsed_request->{TAG} and $parsed_request->{EXCLUDE_TAG} ); if( $parsed_request->{TAG} ){ if( my @tags = untaint_dbstring_lst( @{ $parsed_request->{TAG} } )){ $tag .= ' AND'; $tag .= ' '.$accountinfo_table.'.TAG IN("'.join('","', @tags ).'")'; } } if( $parsed_request->{EXCLUDE_TAG} ){ if( my @exclude_tags = untaint_dbstring_lst( @{ $parsed_request->{EXCLUDE_TAG} } )){ $tag .= ' AND'; $tag .= ' '.$accountinfo_table.'.TAG NOT IN("'.join('","', @exclude_tags ).'")'; } } # Checksum criteria (only positive "&" will match if( $parsed_request->{CHECKSUM} ){ die("BAD_CHECKSUM") if !untaint_int( $parsed_request->{CHECKSUM} ); $checksum = ' AND ('.$parsed_request->{CHECKSUM}.' & '.$main_table.'.CHECKSUM)'; } # Associated user criteria if( $parsed_request->{USERID} && $main_table =~ /^hardware$/){ if( my @users_id = untaint_dbstring_lst( @{ $parsed_request->{USERID} } ) ){ $userid .= ' AND'; $userid .= ' '.$main_table.'.USERID IN("'.join('","', @users_id ).'")'; } } # Generate sql string my $search_string = "SELECT DISTINCT $main_table.ID FROM $main_table,$accountinfo_table WHERE $main_table.$deviceid_column NOT LIKE '\\_%' AND $main_table.ID=$accountinfo_table.$pk $id $name $userid $checksum $tag ORDER BY LASTDATE limit $begin,$ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}"; # Play it my $sth = get_sth($search_string); # Get ids while( my $row = $sth->fetchrow_hashref() ){ push @{$ids}, $row->{ID}; } # Destroy request object $sth->finish(); } # Build a database mapped inventory section sub build_xml_standard_section{ my ($id, $main_table, $xml_ref, $section) = @_; my %element; my @tmp; my %get_table_pk_functions = ( 'hardware' => \&get_hardware_table_pk, 'snmp' => \&get_snmp_table_pk ); # Request database my $deviceid = &{ $get_table_pk_functions{ $main_table } }($section); my $sth = get_sth("SELECT * FROM $section WHERE $deviceid=?", $id); # Build data structure... while ( my $row = $sth->fetchrow_hashref() ){ for( keys(%{$DATA_MAP{ $section }->{fields}}) ){ next if $DATA_MAP{ $section }->{fields}->{$_}->{noSql}; # New DB schema support if( $DATA_MAP{ $section }->{fields}->{$_}->{type} ){ my $field = $_; $field =~ s/_ID//g; #We delete the _ID pattern to be in concordance with table name $row->{ $_ } = get_type_name($section, $field, $row->{ $_ }); $element{$field} = [ $row->{ $_ } ]; } else { $element{$_} = [ $row->{ $_ } ]; } } push @tmp, { %element }; %element = (); } $section =~ s/$section/\U$&/g; $xml_ref->{$section}=[ @tmp ]; @tmp = (); $sth->finish; } sub reset_checksum { my( $checksum, $ref ) = @_; my $where = join(',', @$ref); return do_sql("UPDATE hardware SET CHECKSUM=? WHERE ID IN ($where)", $checksum); } sub send_error{ my $error = shift; return XMLout ( { 'ERROR' => [ $error ] }, RootName => 'RESULT' ); } sub untaint_int_lst{ my @list = @_; my @cleared; for (@list){ push @cleared, $_ if untaint_int($_); } return @cleared; } sub untaint_int{ my $int = shift; return $int =~ /^\d+$/; } # Helper for resolving custom field names in ACCOUNTINFO sub get_custom_field_name_map { my $account_type = shift; my $name_map = {}; # Request database my $sth = get_sth('SELECT ID, NAME FROM accountinfo_config WHERE NAME_ACCOUNTINFO IS NULL AND ACCOUNT_TYPE=?', $account_type); # Build data structure... my $rows = $sth->fetchall_arrayref(); foreach my $row ( @$rows ) { $name_map->{ "fields_" . $row->[0] } = $row->[1]; } $sth->finish; return $name_map; } # Helper for resolving textual values of custom fields # of type CHECKBOX, RADIOBUTTON, SELECT sub get_custom_fields_values_map { my $account_value = shift; my $values_map = {}; # Request database my $sth = get_sth('SELECT NAME, IVALUE, TVALUE FROM config WHERE NAME LIKE ?', $account_value."_%_%"); my $rows = $sth->fetchall_arrayref(); my $regexp = $account_value."_(.*)_[0-9]+"; foreach my $row ( @$rows ) { if ($row->[0] =~ /^$regexp$/) { $values_map->{ $1 }->{ $row->[1] } = $row->[2]; } } $sth->finish; return $values_map; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Inventory.pm000066400000000000000000000136051303466605000264700ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Inventory; use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Interface::Database; use Apache::Ocsinventory::Interface::Internals; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / /; sub get_computers { my $request = decode_xml( shift ); my %build_functions = ( 'INVENTORY' => \&build_computers_xml_inventory, 'META' => \&build_computers_xml_meta ); # Specific values for this inventory my $main_table = "hardware"; my $accountinfo_table = "accountinfo"; my $deviceid_column = "DEVICEID"; my $pk = "HARDWARE_ID"; # Returned values my @result; # First xml parsing my $parsed_request = XML::Simple::XMLin( $request ) or die($!); # Max number of responses sent back to client my $max_responses = $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; my @ids; # Generate boundaries my $begin; if( defined $parsed_request->{'OFFSET'} ){ return send_error('BAD_OFFSET') unless $parsed_request->{'OFFSET'} =~ /^\d+$/; $begin = $parsed_request->{'OFFSET'}*$ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; } elsif( defined $parsed_request->{'BEGIN'}){ return send_error('BAD_BEGIN_VALUE') unless $parsed_request->{'BEGIN'} =~ /^\d+$/; $begin = $parsed_request->{'BEGIN'}; } else{ $begin = 0; } # Call search_engine sub search_engine($parsed_request->{ENGINE}, $request, \@ids, $begin, $main_table, $accountinfo_table, $deviceid_column, $pk); # Type of requested data (meta datas, inventories, special features.. my $type=$parsed_request->{'ASKING_FOR'}||'INVENTORY'; $type =~ s/^(.+)$/\U$1/; # Generate xml responses for(@ids){ push @result, &{ $build_functions{ $type } }($_, $main_table, $parsed_request->{CHECKSUM}, $parsed_request->{WANTED});#Wanted=>special sections bitmap } # Send return "\n", @result, "\n"; } # Build whole inventory (sections specified using checksum) sub build_computers_xml_inventory { my ($computer, $main_table, $checksum, $wanted) = @_; my %xml; my %special_sections = ( accountinfo => 1, dico_soft => 2 ); # Whole inventory by default $checksum = CHECKSUM_MAX_VALUE unless $checksum=~/\d+/; # Build each section using ...standard_section for( keys(%DATA_MAP) ){ #Don't process the sections that are use for capacities special inventory next if $DATA_MAP{$_}->{capacities}; if( ($checksum & $DATA_MAP{$_}->{mask} ) ){ &build_xml_standard_section($computer, $main_table, \%xml, $_) or die; } } # Accountinfos for( keys( %special_sections ) ){ &build_computers_xml_special_section($computer, \%xml, $_) if $special_sections{$_} & $wanted; } # Return the xml response to interface return XML::Simple::XMLout( \%xml, 'RootName' => 'COMPUTER' ) or die; } # Build metadata of a computer sub build_computers_xml_meta { my $id = shift; my %xml; # For mapped fields my @mapped_fields = qw / NAME TAG DEVICEID LASTDATE LASTCOME CHECKSUM DATABASEID/; # For others my @other_fields = qw //; my $sql_str = qq/ SELECT hardware.DEVICEID AS DEVICEID, hardware.LASTDATE AS LASTDATE, hardware.LASTCOME AS LASTCOME, hardware.checksum AS CHECKSUM, hardware.ID AS DATABASEID, hardware.NAME AS NAME, accountinfo.TAG AS TAG FROM hardware,accountinfo WHERE accountinfo.HARDWARE_ID=hardware.ID AND ID=? /; my $sth = get_sth( $sql_str, $id); while( my $row = $sth->fetchrow_hashref ){ for( @mapped_fields ){ $xml{ $_ }=[$row->{ $_ }]; } } $sth->finish; return XML::Simple::XMLout( \%xml, 'RootName' => 'COMPUTER' ) or die; } # For non-standard sections sub build_computers_xml_special_section { my ($id, $xml_ref, $section) = @_; # Accountinfos retrieving if($section eq 'accountinfo'){ my $custom_field_names = get_custom_field_name_map('COMPUTERS'); my $custom_fields_values = get_custom_fields_values_map('ACCOUNT_VALUE'); my %element; my @tmp; # Request database my $sth = get_sth('SELECT * FROM accountinfo WHERE HARDWARE_ID=?', $id); # Build data structure... my $row = $sth->fetchrow_hashref(); foreach my $akey ( keys( %$row ) ) { next if $akey eq get_hardware_table_pk('accountinfo'); my $field_name = (exists $custom_field_names->{ $akey }) ? $custom_field_names->{ $akey } : $akey; if (! exists $custom_fields_values->{ $field_name }) { push @tmp, ( { Name => $field_name, content => $row->{ $akey } } ); } else { foreach my $codepoint ( split( /&&&/, $row->{ $akey } ) ) { push @tmp, ( { Name => $field_name, content => $custom_fields_values->{ $field_name }->{ $codepoint } } ); } } } $xml_ref->{'ACCOUNTINFO'}{'ENTRY'} = [ @tmp ]; $sth->finish; } elsif($section eq 'dico_soft'){ my @tmp; my $sth = get_sth('SELECT DISTINCT dico_soft.FORMATTED AS FORMAT FROM softwares,dico_soft WHERE HARDWARE_ID=? AND EXTRACTED=NAME', $id); while( my $row = $sth->fetchrow_hashref() ){ push @tmp, $row->{FORMAT}; } $xml_ref->{'DICO_SOFT'}{WORD} = [ @tmp ]; $sth->finish; } } # Return software name alias sub get_dico_soft_extracted{ my $extracted = shift; my $sth = get_sth('SELECT DISTINCT FORMATTED FROM dico_soft WHERE EXTRACTED=?', $extracted); unless($sth->rows){ $sth->finish(); return undef; } my ($formatted) = $sth->fetchrow_array; $sth->finish(); return $formatted; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Ipdiscover.pm000066400000000000000000000054751303466605000266100ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Ipdiscover; use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Interface::Database; use Apache::Ocsinventory::Interface::Internals; use XML::Simple; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / get_ipdiscover_devices ipdiscover_tag ipdiscover_untag ipdiscover_remove ipdiscover_add_type ipdiscover_del_type /; sub get_ipdiscover_devices{ my ($date, $offset, $nInv ) = @_; $offset = $offset*$ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; my $sth; if( !$nInv ){ $sth = get_sth("SELECT * FROM netmap WHERE DATE>? ORDER BY DATE LIMIT $offset, $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}", $date); } else{ $sth = get_sth(" SELECT * FROM netmap nm LEFT JOIN networks nw ON nm.MAC=nw.MACADDR LEFT JOIN network_devices nd ON nd.MACADDR=nm.MAC WHERE nd.MACADDR IS NULL AND nw.MACADDR IS NULL AND DATE>? ORDER BY nm.DATE LIMIT $offset, $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}", $date); } my @result; while( my $row = $sth->fetchrow_hashref() ){ push @result, &build_xml( $row->{MAC}, $row->{IP}, $row->{MASK}, $row->{DATE}, $row->{NAME} ); } return XMLout( { IFACE => \@result }, rootName => 'RESULT' ); } sub ipdiscover_tag { my ( $device, $description, $type, $user ) = @_; return send_error('BAD_TYPE') if do_sql('SELECT * FROM devicetype WHERE NAME=?', $type) == 0E0; return send_error('BAD_USER') if do_sql('SELECT * FROM operators WHERE ID=?', $user) == 0E0; return do_sql('INSERT INTO network_devices(DESCRIPTION,TYPE,MACADDR,USER) VALUES(?,?,?,?)', ($description, $type, $device, $user ) ); } sub ipdiscover_untag{ my $device = shift; return do_sql('DELETE FROM network_devices WHERE MACADDR=?', $device); } sub ipdiscover_remove{ my $device = shift; return do_sql('DELETE FROM network_devices WHERE MACADDR=?', $device); } sub ipdiscover_add_type{ my $type = shift; return 0 if do_sql( 'SELECT * FROM devicetype WHERE NAME=?', $type )!=0E0; return do_sql( 'INSERT INTO devicetype(NAME) VALUES(?)', $type ); } sub ipdiscover_del_type{ my $type = shift; return do_sql( 'DELETE FROM devicetype WHERE NAME=?', $type ); } sub build_xml{ my ( $mac, $ip, $mask, $date, $name ) = @_; return { MAC => [ $mac ], IP => [ $ip ], MASK => [ $mask ], DATE => [ $date ], NAME => [ $name ] }; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Snmp.pm000066400000000000000000000122651303466605000254110ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Interface::Snmp; use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Interface::Database; use Apache::Ocsinventory::Interface::Internals; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / /; sub get_snmp { my $request = decode_xml( shift ); my %build_functions = ( 'SNMP_INVENTORY' => \&build_snmp_xml_inventory, 'SNMP_META' => \&build_snmp_xml_meta ); # Specific values for this inventory my $main_table = "snmp"; my $accountinfo_table = "snmp_accountinfo"; my $deviceid_column = "SNMPDEVICEID"; my $key_column ="SNMP_ID"; # Returned values my @result; # First xml parsing my $parsed_request = XML::Simple::XMLin( $request ) or die($!); # Max number of responses sent back to client my $max_responses = $ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; my @ids; # Generate boundaries my $begin; if( defined $parsed_request->{'OFFSET'} ){ return send_error('BAD_OFFSET') unless $parsed_request->{'OFFSET'} =~ /^\d+$/; $begin = $parsed_request->{'OFFSET'}*$ENV{OCS_OPT_WEB_SERVICE_RESULTS_LIMIT}; } elsif( defined $parsed_request->{'BEGIN'}){ return send_error('BAD_BEGIN_VALUE') unless $parsed_request->{'BEGIN'} =~ /^\d+$/; $begin = $parsed_request->{'BEGIN'}; } else{ $begin = 0; } # Call search_engine stub search_engine($parsed_request->{ENGINE}, $request, \@ids, $begin, $main_table, $accountinfo_table, $deviceid_column, $key_column); # Type of requested data (meta datas, inventories, special features.. my $type=$parsed_request->{'ASKING_FOR'}||'SNMP_INVENTORY'; $type =~ s/^(.+)$/\U$1/; # Generate xml responses for(@ids){ push @result, &{ $build_functions{ $type } }($_, $main_table, $parsed_request->{CHECKSUM}, $parsed_request->{WANTED});#Wanted=>special sections bitmap } # Send return "\n", @result, "\n"; } # Build whole inventory (sections specified using checksum) sub build_snmp_xml_inventory { my ($device, $main_table, $checksum, $wanted) = @_; my %xml; my %special_sections = ( snmp_accountinfo => 1, ); # Whole inventory by default $checksum = CHECKSUM_MAX_VALUE unless $checksum=~/\d+/; # Build each section using ...standard_section for( keys(%DATA_MAP) ){ #Process the sections that are use for capacities special inventory if ($DATA_MAP{$_}->{capacities}) { if( ($checksum & $DATA_MAP{$_}->{mask} ) ){ &build_xml_standard_section($device, $main_table, \%xml, $_) or die; } } } # Accountinfos for( keys( %special_sections ) ){ &build_snmp_xml_special_section($device, \%xml, $_) if $special_sections{$_} & $wanted; } # Return the xml response to interface return XML::Simple::XMLout( \%xml, 'RootName' => 'SNMP_DEVICE' ) or die; } # Build metadata of a snmp device sub build_snmp_xml_meta { my $id = shift; my %xml; # For mapped fields my @mapped_fields = qw / NAME TAG SNMPDEVICEID LASTDATE LASTCOME CHECKSUM DATABASEID/; # For others my @other_fields = qw //; my $sql_str = qq/ SELECT snmp.SNMPDEVICEID AS SNMPDEVICEID, snmp.LASTDATE AS LASTDATE, snmp.checksum AS CHECKSUM, snmp.ID AS DATABASEID, snmp.NAME AS NAME, snmp_accountinfo.TAG AS TAG FROM snmp,snmp_accountinfo WHERE snmp_accountinfo.SNMP_ID=snmp.ID AND ID=? /; my $sth = get_sth( $sql_str, $id); while( my $row = $sth->fetchrow_hashref ){ for( @mapped_fields ){ $xml{ $_ }=[$row->{ $_ }]; } } $sth->finish; return XML::Simple::XMLout( \%xml, 'RootName' => 'DEVICE' ) or die; } # For non-standard sections sub build_snmp_xml_special_section { my ($id, $xml_ref, $section) = @_; # Accountinfos retrieving if($section eq 'snmp_accountinfo'){ my $custom_field_names = get_custom_field_name_map('SNMP'); my $custom_fields_values = get_custom_fields_values_map('ACCOUNT_SNMP_VALUE'); my %element; my @tmp; # Request database my $sth = get_sth('SELECT * FROM snmp_accountinfo WHERE SNMP_ID=?', $id); # Build data structure... my $row = $sth->fetchrow_hashref(); foreach my $akey ( keys( %$row ) ) { next if $akey eq get_snmp_table_pk('snmp_accountinfo'); my $field_name = (exists $custom_field_names->{ $akey }) ? $custom_field_names->{ $akey } : $akey; if (! exists $custom_fields_values->{ $field_name }) { push @tmp, ( { Name => $field_name, content => $row->{ $akey } } ); } else { foreach my $codepoint ( split( /&&&/, $row->{ $akey } ) ) { push @tmp, ( { Name => $field_name, content => $custom_fields_values->{ $field_name }->{ $codepoint } } ); } } } $xml_ref->{'ACCOUNTINFO'}{'ENTRY'} = [ @tmp ]; $sth->finish; } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Interface/Updates.pm000066400000000000000000000015711303466605000260770ustar00rootroot00000000000000package Apache::Ocsinventory::Interface::Updates; use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Interface::Database; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw //; sub delete_computers_by_id { my $computerIds = shift ; my $dbh = &get_dbh_write ; for my $hardwareId (@{$computerIds}){ # We lock the computer to avoid race condition next if &_lock($hardwareId, $dbh) ; for my $section ( keys %DATA_MAP ){ my $hardwareIdField = get_hardware_table_pk($section) ; # delOnReplace is used here even if the section is not "auto" # "auto" is only useful for the import phases next if !$DATA_MAP{ $section }->{delOnReplace} ; do_sql("DELETE FROM $section WHERE $hardwareIdField=$hardwareId") ; } &_unlock($hardwareId, $dbh) ; } return 'OK' ; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Map.pm000066400000000000000000000452431303466605000233130ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2006 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Map; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / %DATA_MAP /; # Field's attributes : cache, filter, noXml, noSql, fallback, type our %DATA_MAP= ( hardware => { mask => 1, multi => 0, auto => 0, delOnReplace => 1, sortBy => 'NAME', writeDiff => 0, cache => 1, fields => { ID => { noXml => 1 }, NAME => {}, WORKGROUP => {}, USERDOMAIN => {}, OSNAME => { cache=>1 }, OSVERSION => {}, OSCOMMENTS => {}, PROCESSORT => {}, PROCESSORS => {}, PROCESSORN => {}, MEMORY => {}, SWAP => {}, DEFAULTGATEWAY => {}, IPADDR => {}, DNS => {}, USERID => { filter => 1 }, TYPE => {}, DESCRIPTION => {}, WINCOMPANY => {}, WINOWNER => {}, WINPRODID => {}, WINPRODKEY => {}, LASTDATE => {}, LASTCOME => {}, CHECKSUM => {}, QUALITY => {}, FIDELITY => {}, SSTATE => { noXml => 1 }, USERAGENT => { noXml => 1 }, IPSRC => {}, ARCH => {} }, }, accountinfo => { mask => 0, multi => 1, auto => 0, delOnReplace => 1, sortBy => 'TAG', writeDiff => 0, cache => 0, fields => { TAG => {} } }, bios => { mask => 2, multi => 0, auto => 1, delOnReplace => 1, sortBy => 'SSN', writeDiff => 0, cache => 0, fields => { SMANUFACTURER => {}, SMODEL => {}, SSN => {}, BMANUFACTURER => {}, BVERSION => {}, BDATE => {}, TYPE => {}, ASSETTAG => {}, } }, memories => { mask => 4, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'CAPTION', writeDiff => 1, cache => 0, fields => { CAPACITY => {}, SPEED => {}, CAPTION => {}, DESCRIPTION => {}, NUMSLOTS => { fallback=>0 }, TYPE => {}, PURPOSE => {}, SERIALNUMBER => {} } }, slots => { mask => 8, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, DESCRIPTION => {}, DESIGNATION => {}, PURPOSE => {}, STATUS => {}, PSHARE => { fallback=>0 } } }, registry => { mask => 16, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 1, fields => { NAME => { cache => 1 }, REGVALUE => { cache => 1 } } }, controllers => { mask => 32, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { MANUFACTURER => {}, NAME => {}, CAPTION => {}, DESCRIPTION => {}, VERSION => {}, TYPE => {} } }, monitors => { mask => 64, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'CAPTION', writeDiff => 1, cache => 0, fields => { MANUFACTURER => {}, CAPTION => {}, DESCRIPTION => {}, TYPE => {}, SERIAL => {} } }, ports => { mask => 128, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, CAPTION => {}, DESCRIPTION => {}, TYPE => {} } }, storages => { mask => 256, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { MANUFACTURER => {}, NAME => {}, MODEL => {}, DESCRIPTION => {}, TYPE => {}, DISKSIZE => { fallback=>0 }, SERIALNUMBER => {}, FIRMWARE => {} } }, drives => { mask => 512, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'VOLUMN', writeDiff => 1, cache => 0, fields => { LETTER => {}, TYPE => {}, FILESYSTEM => {}, TOTAL => { fallback=>0 }, FREE => { fallback=>0 }, VOLUMN => {}, NUMFILES => { fallback=>0}, CREATEDATE => {} } }, inputs => { mask => 1024, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'CAPTION', writeDiff => 1, cache => 0, fields => { TYPE => {}, MANUFACTURER => {}, CAPTION => {}, DESCRIPTION => {}, INTERFACE => {}, POINTTYPE => {} } }, modems => { mask => 2048, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, MODEL => {}, DESCRIPTION => {}, TYPE => {} } }, networks => { mask => 4096, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'IPADDRESS', writeDiff => 1, cache => 0, fields => { IPADDRESS => {}, IPMASK => {}, IPSUBNET => {}, DESCRIPTION => {}, TYPE => {}, TYPEMIB => {}, SPEED => {}, MACADDR => { fallback => '00:00:00:00:00:00' }, STATUS => {}, IPGATEWAY => {}, IPDHCP => {}, VIRTUALDEV => {} } }, printers => { mask => 8192, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, DRIVER => {}, PORT => {}, DESCRIPTION => {}, SERVERNAME => {}, SHARENAME => {}, RESOLUTION => {}, COMMENT => {}, SHARED => {}, NETWORK => {} } }, sounds => { mask => 16384, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, MANUFACTURER => {}, DESCRIPTION => {} } }, videos => { mask => 32768, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, CHIPSET => {}, MEMORY => {}, RESOLUTION => {} } }, softwares => { mask => 65536, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 1, fields => { PUBLISHER => {}, NAME => { cache => 1 }, VERSION => {}, FOLDER => {}, COMMENTS => {}, FILENAME => {}, FILESIZE => { fallback=>0 }, SOURCE => { fallback=>0 }, GUID => {}, LANGUAGE => {}, INSTALLDATE => {}, BITSWIDTH => {} } }, virtualmachines => { mask => 131072, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { NAME => {}, MEMORY => {}, UUID => {}, STATUS => {}, SUBSYSTEM => {}, VMTYPE => {}, VCPU => {} } }, cpus => { mask => 262144, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'SERIALNUMBER', writeDiff => 1, cache => 0, fields => { MANUFACTURER => {}, TYPE => {}, SERIALNUMBER => {}, SPEED => {}, CORES => {}, L2CACHESIZE => {}, CPUARCH => {}, DATA_WIDTH => {}, CURRENT_ADDRESS_WIDTH => {}, LOGICAL_CPUS => {}, VOLTAGE => {}, CURRENT_SPEED => {}, SOCKET => {} } }, sim => { mask => 524288, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'SERIALNUMBER', writeDiff => 1, cache => 0, fields => { OPERATOR => {}, OPNAME => {}, COUNTRY => {}, SERIALNUMBER => {}, DEVICEID => {} } }, batteries => { mask => 1048576, multi => 0, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, fields => { LOCATION => {}, MANUFACTURER => {}, MANUFACTUREDATE => {}, SERIALNUMBER => {}, NAME => {}, CHEMISTRY => {}, DESIGNCAPACITY => {}, DESIGNVOLTAGE => {}, SBDSVERSION => {}, MAXERROR => {}, OEMSPECIFIC => {} } }, javainfo => { mask => 0, multi => 0, auto => 1, delOnReplace => 1, sortBy => 'JAVANAME', writeDiff => 0, cache => 0, fields => { JAVANAME => { fallback=>'noname' }, JAVAPATHLEVEL => { fallback=>0 }, JAVACOUNTRY => {}, JAVACLASSPATH => {}, JAVAHOME => {} } }, journallog => { mask => 0, multi => 1, auto => 1, delOnReplace => 0, sortBy => '', writeDiff => 0, cache => 0, fields => { JOURNALLOG => {}, LISTENERNAME => { fallback=>'noname' }, DATE => {}, STATUS => { fallback=>0 }, ERRORCODE => {} } }, itmgmt_comments => { mask => 0, multi => 1, auto => 0, delOnReplace => 0, sortBy => 'DATE_INSERT', writeDiff => 0, cache => 0, fields => { COMMENTS => {}, USER_INSERT => {}, DATE_INSERT => {}, ACTION => {}, VISIBLE => {} } }, devices => { mask => 0, multi => 1, auto => 0, delOnReplace => 1, sortBy => 'NAME', writeDiff => 0, cache => 0, fields => { NAME => {}, IVALUE => {}, TVALUE => {}, COMMENTS => {} } }, download_history => { mask => 0, multi => 1, auto => 0, delOnReplace => 1, sortBy => 'PKD_ID', writeDiff => 0, cache => 0, fields => { PKG_ID => {}, PKG_NAME => {} } }, groups_cache => { mask => 0, multi => 1, auto => 0, delOnReplace => 1, sortBy => 'GROUP_ID', writeDiff => 0, cache => 0, fields => { GROUP_ID => {}, STATIC => {} } }, snmp => { mask => 1, multi => 0, auto => 0, delOnReplace => 1, sortBy => 'IPADDRESS', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { ID => { noXml => 1 }, IPADDR => {}, MACADDR => {}, SNMPDEVICEID => {}, NAME => {}, DESCRIPTION => {}, CONTACT => {}, LOCATION => {}, UPTIME => {}, DOMAIN => {}, TYPE => {}, LASTDATE => {}, CHECKSUM => {} } }, snmp_printers => { mask => 2, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {}, SERIALNUMBER => {}, COUNTER => {}, STATUS => {}, ERRORSTATE => {} } }, snmp_switchs => { mask => 4, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { MANUFACTURER => {}, REFERENCE => {}, TYPE => {}, SOFTVERSION => {}, FIRMVERSION => {}, SERIALNUMBER => {}, REVISION => {}, DESCRIPTION => {} } }, snmp_firewalls => { mask => 8, multi => 0, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { SERIALNUMBER => {}, SYSTEM => {} } }, snmp_blades => { mask => 16, multi => 0, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { SERIALNUMBER => {}, SYSTEM => {} } }, snmp_loadbalancers => { mask => 32, multi => 0, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { SERIALNUMBER => {}, SYSTEM => {}, TYPE => {}, MANUFACTURER => {} } }, snmp_trays => { mask => 64, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'NAME', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {}, DESCRIPTION => {}, LEVEL => {}, MAXCAPACITY => {} } }, snmp_cartridges => { mask => 128, multi => 1, auto => 1, delOnReplace => 1, sortBy => 'DESCRIPTION', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { DESCRIPTION => {}, TYPE => {}, LEVEL => {}, MAXCAPACITY => {}, COLOR => {} } }, snmp_networks => { mask => 256, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { DESCRIPTION => {}, MACADDR => {}, DEVICEMACADDR => {}, SLOT => {}, STATUS => {}, SPEED => {}, TYPE => {}, DEVICEADDRESS => {}, DEVICENAME => {}, DEVICEPORT => {}, DEVICETYPE => {}, TYPEMIB => {}, IPADDR => {}, IPMASK => {}, IPGATEWAY => {}, IPSUBNET => {}, IPDHCP => {}, DRIVER => {}, VIRTUALDEV => {} } }, snmp_storages => { mask => 512, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { DESCRIPTION => {}, MANUFACTURER => {}, NAME => {}, MODEL => {}, DISKSIZE => {}, TYPE => {}, SERIALNUMBER => {}, FIRMWARE => {} } }, snmp_drives => { mask => 1024, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { LETTER => {}, TYPE => {}, FILESYSTEM => {}, TOTAL => {}, FREE => {}, NUMFILES => {}, VOLUMN => {}, LABEL => {}, SERIAL => {} } }, snmp_powersupplies => { mask => 2048, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { MANUFACTURER => {}, REFERENCE => {}, TYPE => {}, SERIALNUMBER => {}, DESCRIPTION => {}, REVISION => {} } }, snmp_fans => { mask => 4096, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { DESCRIPTION => {}, REFERENCE => {}, REVISION => {}, SERIALNUMBER => {}, MANUFACTURER => {}, TYPE => {} } }, snmp_cards => { mask => 8192, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { DESCRIPTION => {}, REFERENCE => {}, FIRMWARE => {}, SOFTWARE => {}, REVISION => {}, SERIALNUMBER => {}, MANUFACTURER => {}, TYPE => {} } }, snmp_switchinfos => { mask => 16384, multi => 0, auto => 1, delOnReplace => 1, sortBy => 'TYPE', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { TYPE => {} } }, snmp_computers => { mask => 32768, multi => 0, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { SYSTEM => {} } }, snmp_softwares => { mask => 65536, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {}, INSTALLDATE => {}, COMMENTS => {}, VERSION => {} } }, snmp_memories => { mask => 131072, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { CAPACITY => {} } }, snmp_cpus => { mask => 262144, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { SPEED => {}, TYPE => {}, MANUFACTURER => {} } }, snmp_inputs => { mask => 524288, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { DESCRIPTION => {}, TYPE => {} } }, snmp_ports => { mask => 1048576, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {}, TYPE => {} } }, snmp_sounds => { mask => 2097152, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {} } }, snmp_videos => { mask => 4194304, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {} } }, snmp_modems => { mask => 8388608, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {} } }, snmp_localprinters => { mask => 16777216, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { NAME => {} } }, snmp_virtualmachines => { mask => 33554432, multi => 1, auto => 1, delOnReplace => 1, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { CONFIG_FILE => {}, CPU => {}, MEMORY => {}, NAME => {}, OS => {}, POWER => {}, UUID => {} } }, snmp_accountinfo => { mask => 0, multi => 1, auto => 0, delOnReplace => 1, sortBy => 'TAG', writeDiff => 0, cache => 0, fields => { TAG => {} } }, snmp_laststate => { mask => 0, multi => 0, auto => 0, delOnReplace => 0, sortBy => '', writeDiff => 1, cache => 0, capacities => 'snmp', fields => { COMMON => {}, PRINTERS => {}, TRAYS => {}, CARTRIDGES => {}, NETWORKS => {}, SWITCHS => {}, BLADES => {}, STORAGES => {}, DRIVES => {}, POWERSUPPLIES => {}, FANS => {}, LOADBALANCERS => {}, CARDS => {}, FIREWALLS => {}, SWITCHINFOS => {}, COMPUTERS => {}, SOFTWARES => {}, MEMORIES => {}, CPUS => {}, INPUTS => {}, PORTS => {}, SOUNDS => {}, VIDEOS => {}, MODEMS => {}, LOCALPRINTERS => {}, VIRTUALMACHINES => {} } }, ); 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Plugins.pm000066400000000000000000000020511303466605000242050ustar00rootroot00000000000000############################################################################## ## OCSINVENTORY-NG ## Copyleft Guillaume PROTET 2013 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Plugins; use strict; BEGIN { push @INC, $ENV{OCS_PLUGINS_PERL_DIR}; } #Loading plugins modules if($ENV{'OCS_MODPERL_VERSION'} == 1){ Apache->httpd_conf("Include $ENV{OCS_PLUGINS_CONF_DIR}"); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ use Apache2::ServerUtil(); Apache2::ServerUtil->server->add_config(["Include $ENV{OCS_PLUGINS_CONF_DIR}"]); }else{ if(!defined($ENV{'OCS_MODPERL_VERSION'})){ die("OCS_MODPERL_VERSION not defined. Abort\n"); }else{ die("OCS_MODPERL_VERSION set to, a bad parameter. Must be '1' or '2'. Abort\n"); } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Plugins/000077500000000000000000000000001303466605000236515ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Plugins/Apache.pm000077500000000000000000000012631303466605000253750ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Gilles DUBOIS 2015 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Plugins::Apache ; use SOAP::Transport::HTTP; my $server = SOAP::Transport::HTTP::Apache -> dispatch_to('Apache::Ocsinventory::Plugins::Modules'); sub handler { $server->handler(@_) } 1;ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Plugins/Modules.pm000077500000000000000000000050471303466605000256300ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Gilles DUBOIS 2015 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Plugins::Modules; use SOAP::Lite; use strict; use LWP::Simple; use Archive::Zip; use File::Copy; use File::Path; use DBI; sub InstallPlugins { my $pluginName = $_[1]; # Download the created archive from the ocsreports which contain the communication server code (.conf and map.pm) my $url = "http://$ENV{OCS_DB_HOST}/ocsreports/upload/$pluginName.zip"; my $file = "$ENV{OCS_PLUGINS_CONF_DIR}/$pluginName.zip"; our $test; if (-e "$ENV{OCS_PLUGINS_CONF_DIR}/$pluginName") { $test = 1; print "Archive existante"; } else { print "$url\n"; my $status = getstore($url, $file); # If download succes, unzip, create dir, move files. if (is_success($status)) { my $pluginsdir = "$ENV{OCS_PLUGINS_CONF_DIR}"; my $zipname = $file; my $destinationDirectory = $pluginsdir; my $zip = Archive::Zip->new($zipname); my $member; foreach my $member ($zip->members) { next if $member->isDirectory; (my $extractName = $member->fileName) =~ s{.*/}{}; $member->extractToFileNamed("$destinationDirectory/$extractName"); } #Up case plugin directory in OCS server for match with actual template my $pluginNameUc = ucfirst($pluginName); my $dirtocreate = "$ENV{OCS_PLUGINS_PERL_DIR}/Apache/Ocsinventory/Plugins/$pluginNameUc"; mkdir $dirtocreate; unlink $file; move("$pluginsdir/Map.pm","$ENV{OCS_PLUGINS_PERL_DIR}/Apache/Ocsinventory/Plugins/$pluginNameUc/Map.pm"); } } my $result = "Install OK"; return( SOAP::Data->name( 'Result' => $result )->type( 'string' ) ); } # Seek for deleted plugins // Delete map.pm and conf entry. sub DeletePlugins { my $pluginName = $_[1]; #Up case plugin directory in OCS server for match with actual template for deletion my $pluginNameUc = ucfirst($pluginName); my $pluginsdir = "$ENV{OCS_PLUGINS_CONF_DIR}"; if (-e "$ENV{OCS_PLUGINS_CONF_DIR}/$pluginName.conf"){ unlink "$ENV{OCS_PLUGINS_CONF_DIR}/$pluginName.conf"; } rmtree "$ENV{OCS_PLUGINS_PERL_DIR}/Apache/Ocsinventory/Plugins/$pluginNameUc"; my $result = "Delete OK"; return( SOAP::Data->name( 'Result' => $result )->type( 'string' ) ); } 1;ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/SOAP.pm000066400000000000000000000026151303466605000233340ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::SOAP; BEGIN{ eval{ if($ENV{OCS_MODPERL_VERSION}==1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); require SOAP::Transport::HTTP; our $server = SOAP::Transport::HTTP::Apache->dispatch_to('Apache::Ocsinventory::Interface'); } elsif( $ENV{OCS_MODPERL_VERSION}==2 ){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); require SOAP::Transport::HTTP2; our $server = SOAP::Transport::HTTP2::Apache->dispatch_to('Apache::Ocsinventory::Interface'); } $XML::Simple::PREFERRED_PARSER = 'XML::Parser'; require Apache::Ocsinventory::Interface; }; if($@){ print STDERR "ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable\n"; } } sub handler { our $apache_req = $_[0]; return APACHE_FORBIDDEN unless $ENV{OCS_OPT_WEB_SERVICE_ENABLED}; $server->handler(@_); } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/000077500000000000000000000000001303466605000234765ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/000077500000000000000000000000001303466605000255435ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Datafilter.pm000066400000000000000000000055601303466605000301660ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Datafilter; use strict; # This block specify which wrapper will be used ( your module will be compliant with all mod_perl versions ) BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } # These are the core modules you must include in addition use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Map; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'DATAFILTER', 'HANDLER_PROLOG_READ' => undef, #or undef # Called before reading the prolog 'HANDLER_PROLOG_RESP' => undef, #or undef # Called after the prolog response building 'HANDLER_PRE_INVENTORY' => \&datafilter_pre_inventory, #or undef # Called before reading inventory 'HANDLER_POST_INVENTORY' => undef, #or undef # Called when inventory is stored without error 'REQUEST_NAME' => undef, #or undef # Value of xml tag 'HANDLER_REQUEST' => undef, #or undef # function that handle the request with the 'REQUEST NAME' 'HANDLER_DUPLICATE' => undef,#or undef # Called when a computer is handle as a duplicate 'TYPE' => OPTION_TYPE_SYNC, # or OPTION_TYPE_ASYNC ASYNC=>with pr without inventory, SYNC=>only when inventory is required 'XML_PARSER_OPT' => { 'ForceArray' => [''] } }; sub datafilter_pre_inventory{ my $current_context = shift; my $xml = $current_context->{'XML_ENTRY'}; my $apache = $current_context->{'APACHE_OBJECT'}; if ($ENV{'OCS_OPT_DATA_FILTER'}) { my ($map_section, $multi_sections, $field, $mask); #Geting table and field from configuration file my %DATA_TO_FILTER = $apache->dir_config->get('OCS_OPT_DATA_TO_FILTER'); for my $section ( keys %DATA_TO_FILTER) { $map_section = lc $section; $field = $DATA_TO_FILTER{$section}; #Deleting data from XML unless ($DATA_MAP{$map_section}{multi}) { delete $xml->{'CONTENT'}->{$section}->{$field} if $xml->{'CONTENT'}->{$section}->{$field}; &_log(1,'datafilter',"$section $field field deleted") if $ENV{'OCS_OPT_LOGLEVEL'};; } } } return INVENTORY_CONTINUE; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Download.pm000066400000000000000000000443561303466605000276640ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Download; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::Capacities::Download::Inventory; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'DOWNLOAD', 'HANDLER_PROLOG_READ' => undef, 'HANDLER_PROLOG_RESP' => \&download_prolog_resp, 'HANDLER_PRE_INVENTORY' => undef, 'HANDLER_POST_INVENTORY' => \&download_post_inventory, 'REQUEST_NAME' => 'DOWNLOAD', 'HANDLER_REQUEST' => \&download_handler, 'HANDLER_DUPLICATE' => \&download_duplicate, 'TYPE' => OPTION_TYPE_ASYNC, 'XML_PARSER_OPT' => { 'ForceArray' => ['PACKAGE'] } }; sub download_prolog_resp{ my $current_context = shift; my $resp = shift; my $dbh = $current_context->{'DBI_HANDLE'}; my $groups = $current_context->{'MEMBER_OF'}; my $hardware_id = $current_context->{'DATABASE_ID'}; my $groupsParams = $current_context->{'PARAMS_G'}; my ( $downloadSwitch, $cycleLatency, $fragLatency, $periodLatency, $periodLength, $timeout,$execTimeout); my($pack_sql, $hist_sql); my($pack_req, $hist_req); my($hist_row, $pack_row); my(@packages, @history, @forced_packages, @scheduled_packages, @postcmd_packages, @dont_repeat); my $blacklist; if($ENV{'OCS_OPT_DOWNLOAD'}){ $downloadSwitch = 1; # Group's parameters for(keys(%$groupsParams)){ $downloadSwitch = $$groupsParams{$_}->{'DOWNLOAD_SWITCH'}->{'IVALUE'} if exists( $$groupsParams{$_}->{'DOWNLOAD_SWITCH'}->{'IVALUE'} ) and $$groupsParams{$_}->{'DOWNLOAD_SWITCH'}->{'IVALUE'} < $downloadSwitch; $cycleLatency = $$groupsParams{$_}->{'DOWNLOAD_CYCLE_LATENCY'}->{'IVALUE'} if ( (exists($$groupsParams{$_}->{'DOWNLOAD_CYCLE_LATENCY'}->{'IVALUE'}) and $$groupsParams{$_}->{'DOWNLOAD_CYCLE_LATENCY'}->{'IVALUE'} > $cycleLatency) or !$cycleLatency); $fragLatency = $$groupsParams{$_}->{'DOWNLOAD_FRAG_LATENCY'}->{'IVALUE'} if ( (exists($$groupsParams{$_}->{'DOWNLOAD_FRAG_LATENCY'}->{'IVALUE'}) and $$groupsParams{$_}->{'DOWNLOAD_FRAG_LATENCY'}->{'IVALUE'} > $fragLatency) or !$fragLatency); $periodLatency = $$groupsParams{$_}->{'DOWNLOAD_PERIOD_LATENCY'}->{'IVALUE'} if ( (exists($$groupsParams{$_}->{'DOWNLOAD_PERIOD_LATENCY'}->{'IVALUE'}) and $$groupsParams{$_}->{'DOWNLOAD_PERIOD_LATENCY'}->{'IVALUE'} > $periodLatency) or !$periodLatency); $periodLength = $$groupsParams{$_}->{'DOWNLOAD_PERIOD_LENGTH'}->{'IVALUE'} if ( (exists($$groupsParams{$_}->{'DOWNLOAD_PERIOD_LENGTH'}->{'IVALUE'}) and $$groupsParams{$_}->{'DOWNLOAD_PERIOD_LENGTH'}->{'IVALUE'} < $periodLength) or !$periodLength); $timeout = $$groupsParams{$_}->{'DOWNLOAD_TIMEOUT'}->{'IVALUE'} if ( (exists($$groupsParams{$_}->{'DOWNLOAD_TIMEOUT'}->{'IVALUE'}) and $$groupsParams{$_}->{'DOWNLOAD_TIMEOUT'}->{'IVALUE'} < $timeout) or !$timeout); $execTimeout = $$groupsParams{$_}->{'DOWNLOAD_EXECUTION_TIMEOUT'}->{'IVALUE'} if ( (exists($$groupsParams{$_}->{'DOWNLOAD_EXECUTION_TIMEOUT'}->{'IVALUE'}) and $$groupsParams{$_}->{'DOWNLOAD_EXECUTION_TIMEOUT'}->{'IVALUE'} < $execTimeout) or !$execTimeout); } } else{ $downloadSwitch = 0; } $downloadSwitch = $current_context->{'PARAMS'}{'DOWNLOAD_SWITCH'}->{'IVALUE'} if defined($current_context->{'PARAMS'}{'DOWNLOAD_SWITCH'}->{'IVALUE'}) and $downloadSwitch; $cycleLatency = $ENV{'OCS_OPT_DOWNLOAD_CYCLE_LATENCY'} unless $cycleLatency; $fragLatency = $ENV{'OCS_OPT_DOWNLOAD_FRAG_LATENCY'} unless $fragLatency; $periodLatency = $ENV{'OCS_OPT_DOWNLOAD_PERIOD_LATENCY'} unless $periodLatency; $periodLength = $ENV{'OCS_OPT_DOWNLOAD_PERIOD_LENGTH'} unless $periodLength; $timeout = $ENV{'OCS_OPT_DOWNLOAD_TIMEOUT'} unless $timeout; $execTimeout = $ENV{'OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT'} unless $execTimeout; push @packages,{ 'TYPE' => 'CONF', 'ON' => $downloadSwitch, 'CYCLE_LATENCY' => $current_context->{'PARAMS'}{'DOWNLOAD_CYCLE_LATENCY'}->{'IVALUE'} || $cycleLatency, 'FRAG_LATENCY' => $current_context->{'PARAMS'}{'DOWNLOAD_FRAG_LATENCY'}->{'IVALUE'} || $fragLatency, 'PERIOD_LATENCY' => $current_context->{'PARAMS'}{'DOWNLOAD_PERIOD_LATENCY'}->{'IVALUE'} || $periodLatency, 'PERIOD_LENGTH' => $current_context->{'PARAMS'}{'DOWNLOAD_PERIOD_LENGTH'}->{'IVALUE'} || $periodLength, 'TIMEOUT' => $current_context->{'PARAMS'}{'DOWNLOAD_TIMEOUT'}->{'IVALUE'} || $timeout, 'EXECUTION_TIMEOUT' => $current_context->{'PARAMS'}{'DOWNLOAD_EXECUTION_TIMEOUT'}->{'IVALUE'} || $execTimeout }; if($downloadSwitch){ # If this option is set, we send only the needed package to the agent # Can be a performance issue # Agents prior to 4.0.3.0 do not send history data $hist_sql = q { SELECT PKG_ID FROM download_history WHERE HARDWARE_ID=? }; $hist_req = $dbh->prepare( $hist_sql ); $hist_req->execute( $hardware_id ); while( $hist_row = $hist_req->fetchrow_hashref ){ push @history, $hist_row->{'PKG_ID'}; } #We get scheduled packages affected to the computer &get_scheduled_packages($dbh, $hardware_id, \@scheduled_packages); #We get scheduled packages affected with a postcmd command &get_postcmd_packages($dbh, $hardware_id, \@postcmd_packages); #We get packages marked as forced affeted to the computer &get_forced_packages($dbh, $hardware_id, \@forced_packages); #We get packages for groups that computer is member of if( $current_context->{'EXIST_FL'} && $ENV{'OCS_OPT_ENABLE_GROUPS'} && @$groups ){ $pack_sql = q { SELECT IVALUE,FILEID,INFO_LOC,PACK_LOC,CERT_PATH,CERT_FILE FROM devices,download_enable WHERE HARDWARE_ID=? AND devices.NAME='DOWNLOAD' AND download_enable.ID=devices.IVALUE }; my $verif_affected = 'SELECT TVALUE FROM devices WHERE HARDWARE_ID=? AND IVALUE=? AND NAME="DOWNLOAD"'; my $trace_event = 'INSERT INTO devices(HARDWARE_ID,NAME,IVALUE,TVALUE) VALUES(?,"DOWNLOAD",?,NULL)'; $pack_req = $dbh->prepare( $pack_sql ); for( @$groups ){ $pack_req->execute( $_ ); #We get scheduled packages affected to the group &get_scheduled_packages($dbh, $_, \@scheduled_packages); #We get packages affected to the group which contain postcmd command &get_postcmd_packages($dbh, $_, \@postcmd_packages); while( $pack_row = $pack_req->fetchrow_hashref ){ my $fileid = $pack_row->{'FILEID'}; my ($schedule, $scheduled_package, $postcmd, $postcmd_package); if( (grep /^$fileid$/, @history) or (grep /^$fileid$/, @dont_repeat)){ next; } if( $ENV{'OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS'} ){ # We verify if the package is already traced and not already in history my $verif_affected_sth = $dbh->prepare($verif_affected); $verif_affected_sth->execute($hardware_id, $pack_row->{'IVALUE'}); if($verif_affected_sth->rows){ my $verif_affected_row = $verif_affected_sth->fetchrow_hashref(); if($verif_affected_row!~/NULL/ && $verif_affected_row!~/NOTIFIED/){ $verif_affected_sth->finish(); # We do not send package if the current state is fed next; } } else{ $dbh->do($trace_event, {}, $hardware_id, $pack_row->{'IVALUE'}) } } #We check if package is scheduled for $scheduled_package (@scheduled_packages) { if ( $scheduled_package->{'FILEID'} =~ /^$fileid$/ ) { $schedule = $scheduled_package->{'SCHEDULE'}; last; } } #We check if package is affected with a postcmd command for $postcmd_package (@postcmd_packages) { if ( $postcmd_package->{'FILEID'} =~ /^$fileid$/ ) { $postcmd = $postcmd_package->{'POSTCMD'}; last; } } push @packages,{ 'TYPE' => 'PACK', 'ID' => $pack_row->{'FILEID'}, 'INFO_LOC' => $pack_row->{'INFO_LOC'}, 'PACK_LOC' => $pack_row->{'PACK_LOC'}, 'CERT_PATH' => $pack_row->{'CERT_PATH'}?$pack_row->{'CERT_PATH'}:'INSTALL_PATH', 'CERT_FILE' => $pack_row->{'CERT_FILE'}?$pack_row->{'CERT_FILE'}:'INSTALL_PATH', 'SCHEDULE' => $schedule?$schedule:'', 'POSTCMD' => $postcmd?$postcmd:'', 'FORCE' => 0 }; push @dont_repeat, $fileid; } } } #We get packages for this computer $pack_sql = q { SELECT ID, FILEID, INFO_LOC, PACK_LOC, CERT_PATH, CERT_FILE, SERVER_ID FROM devices,download_enable WHERE HARDWARE_ID=? AND devices.IVALUE=download_enable.ID AND devices.NAME='DOWNLOAD' AND (TVALUE IS NULL OR TVALUE='NOTIFIED') }; $pack_req = $dbh->prepare( $pack_sql ); # Retrieving packages associated to the current device $pack_req->execute( $hardware_id ); while($pack_row = $pack_req->fetchrow_hashref()){ my $fileid = $pack_row->{'FILEID'}; my $enable_id = $pack_row->{'ID'}; my $pack_loc = $pack_row->{'PACK_LOC'}; my ($forced, $schedule, $scheduled_package, $postcmd, $postcmd_package); #We check if package is scheduled for $scheduled_package (@scheduled_packages) { if ( $scheduled_package->{'FILEID'} == $fileid ) { $schedule = $scheduled_package->{'SCHEDULE'}; last; } } #We check if package is affected with a postcmd command for $postcmd_package (@postcmd_packages) { if ( $postcmd_package->{'FILEID'} == $fileid ) { $postcmd = $postcmd_package->{'POSTCMD'}; last; } } #We check if package is marcked as forced if ( grep /^$fileid$/, @forced_packages ) { $forced = 1; } else { $forced = 0; } # If the package is in history, the device will not be notified # We have to show this behaviour to user. We use the package events. if ($forced == 0){ if ( grep /^$fileid$/, @history ){ $dbh->do(q{ UPDATE devices SET TVALUE='SUCCESS_ALREADY_IN_HISTORY', COMMENTS=? WHERE NAME='DOWNLOAD' AND HARDWARE_ID=? AND IVALUE=? }, {}, scalar localtime(), $current_context->{'DATABASE_ID'}, $enable_id ) ; next ; } } if( grep /^$fileid$/, @dont_repeat){ next; } # Substitude $IP$ with server ipaddress or $NAME with server name my %substitute = ( '$IP$' => {'table' => 'hardware', 'field' => 'IPADDR'}, '$NAME$' => {'table' => 'hardware', 'field' => 'NAME'} ); for my $motif (keys(%substitute)){ if($pack_loc=~/\Q$motif\E/){ my( $srvreq, $srvreq_sth, $srvreq_row); my $field = $substitute{$motif}->{field}; my $table = $substitute{$motif}->{table}; $srvreq = "select $field from $table where ID=?"; $srvreq_sth = $dbh->prepare($srvreq); $srvreq_sth->execute($pack_row->{'SERVER_ID'}); if($srvreq_row=$srvreq_sth->fetchrow_hashref()){ my $template = $srvreq_row->{$field}; $pack_loc =~ s/(.*)\Q$motif\E(.*)/${1}${template}${2}/g; } else{ $pack_loc=''; } } } next if $pack_loc eq ''; push @packages,{ 'TYPE' => 'PACK', 'ID' => $pack_row->{'FILEID'}, 'INFO_LOC' => $pack_row->{'INFO_LOC'}, 'PACK_LOC' => $pack_loc, 'CERT_PATH' => $pack_row->{'CERT_PATH'}?$pack_row->{'CERT_PATH'}:'INSTALL_PATH', 'CERT_FILE' => $pack_row->{'CERT_FILE'}?$pack_row->{'CERT_FILE'}:'INSTALL_PATH', 'SCHEDULE' => $schedule?$schedule:'', 'POSTCMD' => $postcmd?$postcmd:'', 'FORCE' => $forced }; push @dont_repeat, $fileid; } $dbh->do(q{ UPDATE devices SET TVALUE='NOTIFIED', COMMENTS=? WHERE NAME='DOWNLOAD' AND HARDWARE_ID=? AND TVALUE IS NULL } ,{}, scalar localtime(), $current_context->{'DATABASE_ID'} ) if $pack_req->rows; } push @{ $resp->{'OPTION'} },{ 'NAME' => ['DOWNLOAD'], 'PARAM' => \@packages }; return 0; } sub download_post_inventory{ my $current_context = shift; return if !$ENV{'OCS_OPT_DOWNLOAD'}; my $dbh = $current_context->{'DBI_HANDLE'}; my $hardwareId = $current_context->{'DATABASE_ID'}; my $result = $current_context->{'XML_ENTRY'}; my @fromXml = get_history_xml( $result ); my @fromDb; if( $ENV{OCS_OPT_INVENTORY_WRITE_DIFF} ){ @fromDb = get_history_db( $hardwareId, $dbh ); &update_history_diff( $hardwareId, $dbh, \@fromXml, \@fromDb ); } else{ &update_history_full( $hardwareId, $dbh, \@fromXml ); } } sub download_handler{ # Initialize data my $current_context = shift; my $dbh = $current_context->{'DBI_HANDLE'}; my $result = $current_context->{'XML_ENTRY'}; my $r = $current_context->{'APACHE_OBJECT'}; my $hardware_id = $current_context->{'DATABASE_ID'}; my $request; $request = $dbh->prepare(' SELECT ID FROM download_enable WHERE FILEID=? AND ID IN (SELECT IVALUE FROM devices WHERE NAME="download" AND HARDWARE_ID=?)'); $request->execute( $result->{'ID'}, $hardware_id); &_log(2001, 'download', "$result->{'ID'}(".($result->{'ERR'}?$result->{'ERR'}:'UNKNOWN_CODE').")"); if(my $row = $request->fetchrow_hashref()){ $dbh->do('UPDATE devices SET TVALUE=?, COMMENTS=? WHERE NAME="DOWNLOAD" AND HARDWARE_ID=? AND IVALUE=?', {}, $result->{'ERR'}?$result->{'ERR'}:'UNKNOWN_CODE', scalar localtime(), $hardware_id, $row->{'ID'} ) or return(APACHE_SERVER_ERROR); &_set_http_header('content-length', 0, $r); &_send_http_headers($r); return(APACHE_OK); }else{ &_log(2501, 'download', "$result->{'ID'}(".($result->{'ERR'}?$result->{'ERR'}:'UNKNOWN_CODE').")"); &_set_http_header('content-length', 0, $r); &_send_http_headers($r); return(APACHE_OK); } } sub download_duplicate { my $current_context = shift; my $device = shift; my $dbh = $current_context->{'DBI_HANDLE'}; # Handle deployment servers $dbh->do('UPDATE download_enable SET SERVER_ID=? WHERE SERVER_ID=?', {}, $current_context->{'DATABASE_ID'}, $device); $dbh->do('UPDATE download_servers SET HARDWARE_ID=? WHERE HARDWARE_ID=?', {}, $current_context->{'DATABASE_ID'}, $device); # If we encounter problems, it aborts whole replacement return $dbh->do('DELETE FROM download_history WHERE HARDWARE_ID=?', {}, $device); } # Subroutine to get packagesmarked as scheduled sub get_scheduled_packages { my ($dbh, $hardware_id, $scheduled_packages) = @_; my ($scheduled_sql, $scheduled_req, $scheduled_row, $package, @package_ids); $scheduled_sql = q { SELECT FILEID,TVALUE FROM devices,download_enable WHERE HARDWARE_ID=? AND devices.IVALUE=download_enable.ID AND devices.NAME='DOWNLOAD_SCHEDULE' AND TVALUE IS NOT NULL }; $scheduled_req = $dbh->prepare( $scheduled_sql ); $scheduled_req->execute( $hardware_id ); for $package (@$scheduled_packages) { push @package_ids, $package->{'FILEID'}; } while( $scheduled_row = $scheduled_req->fetchrow_hashref ){ # If package is not already in array (to prevent problems with groups) unless ( grep /^$scheduled_row->{'FILEID'}$/, @$scheduled_packages ) { push @$scheduled_packages, { 'FILEID' => $scheduled_row->{'FILEID'}, 'SCHEDULE' => $scheduled_row->{'TVALUE'} }; } } } # Subroutine to get packagesmarked as forced sub get_forced_packages { my ($dbh, $hardware_id, $forced_packages) = @_; my ($forced_sql, $forced_req, $forced_row); $forced_sql = q { SELECT FILEID FROM devices,download_enable WHERE HARDWARE_ID=? AND devices.IVALUE=download_enable.ID AND devices.NAME='DOWNLOAD_FORCE' AND TVALUE=1 }; $forced_req = $dbh->prepare( $forced_sql ); $forced_req->execute( $hardware_id ); while( $forced_row = $forced_req->fetchrow_hashref ){ # If package is not already in array (to prevent problems with groups) unless ( grep /^$forced_row->{'FILEID'}$/, @$forced_packages ) { push @$forced_packages, $forced_row->{'FILEID'}; } } } # Subroutine to get packages affected with a postcmd command sub get_postcmd_packages { my ($dbh, $hardware_id, $postcmd_packages) = @_; my ($postcmd_sql, $postcmd_req, $postcmd_row, $package, @package_ids); $postcmd_sql = q { SELECT FILEID,TVALUE FROM devices,download_enable WHERE HARDWARE_ID=? AND devices.IVALUE=download_enable.ID AND devices.NAME='DOWNLOAD_POSTCMD' AND TVALUE IS NOT NULL }; $postcmd_req = $dbh->prepare( $postcmd_sql ); $postcmd_req->execute( $hardware_id ); for $package (@$postcmd_packages) { push @package_ids, $package->{'FILEID'}; } while( $postcmd_row = $postcmd_req->fetchrow_hashref ){ # If package is not already in array (to prevent problems with groups) unless ( grep /^$postcmd_row->{'FILEID'}$/, @$postcmd_packages ) { push @$postcmd_packages, { 'FILEID' => $postcmd_row->{'FILEID'}, 'POSTCMD' => $postcmd_row->{'TVALUE'} }; } } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Download/000077500000000000000000000000001303466605000273125ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Download/Inventory.pm000066400000000000000000000052151303466605000316500ustar00rootroot00000000000000 ################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Download::Inventory; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / get_history_xml get_history_db update_history_full update_history_diff /; use strict; use Apache::Ocsinventory::Server::System; sub get_history_xml{ my $result = shift; my $base = $result->{CONTENT}->{DOWNLOAD}->{HISTORY}->{PACKAGE}; my @ret; for( @$base ){ push @ret, $_->{ID}; } return @ret; } sub get_history_db{ my ( $hardwareId, $dbh ) = @_; my $sth = $dbh->prepare('SELECT PKG_ID from download_history WHERE HARDWARE_ID=?'); my @ret; if( $sth->execute( $hardwareId ) ){ while( my $row = $sth->fetchrow_hashref ){ push @ret, $row->{PKG_ID}; } } else{ &_log(2502, 'download'); } return @ret; } sub update_history_full{ my ( $hardwareId, $dbh, $pkgList ) = @_; my ( @blacklist, $already_set ); $dbh->do('DELETE FROM download_history WHERE HARDWARE_ID=?', {}, $hardwareId); my $sth = $dbh->prepare('INSERT INTO download_history(HARDWARE_ID, PKG_ID) VALUE(?,?)'); for my $entry ( @{ $pkgList }) { # fix the history handling bug (agent side) $already_set=0; for(@blacklist){ if($_ eq $entry){ $already_set=1; last; } } if(!$already_set){ push @blacklist, $entry; $sth->execute( $hardwareId, $entry ); } } } sub update_history_diff{ my ( $hardwareId, $dbh, $fromXml, $fromDb ) = @_; my @alreadyhandled; for my $l_xml (@$fromXml){ my $found = 0; for my $i_db (0..(@{$fromDb}-1)){ next unless $fromDb->[$i_db]; if($fromDb->[$i_db] eq $l_xml){ $found = 1; # The value has been found, we have to delete it from the db list # (elements remaining will be deleted) delete $fromDb->[$i_db]; last; } } if(!$found){ $dbh->do( 'INSERT INTO download_history(HARDWARE_ID, PKG_ID) VALUE(?,?)', {}, $hardwareId, $l_xml ) unless grep /\Q$l_xml\E/, @alreadyhandled; } push @alreadyhandled, $l_xml; } for( @$fromDb ){ next if !defined ($_); $dbh->do( 'DELETE FROM download_history WHERE HARDWARE_ID=? AND PKG_ID=?', {}, $hardwareId, $_ ); } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Example.pm000066400000000000000000000136701303466605000275030ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # This core module is used to guide you through the module creation # All modules using modperl api functions must use the wrappers defined in MODPERL1 or 2 .pm # or create a new one in these 2 files if you need to use something that is not wrapped yet package Apache::Ocsinventory::Server::Option::Example; use strict; # This block specify which wrapper will be used ( your module will be compliant with all mod_perl versions ) BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } # These are the core modules you must include in addition use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'EXAMPLE', 'HANDLER_PROLOG_READ' => \&example_prolog_read, #or undef # Called before reading the prolog 'HANDLER_PROLOG_RESP' => \&example_prolog_resp, #or undef # Called after the prolog response building 'HANDLER_PRE_INVENTORY' => \&example_pre_inventory, #or undef # Called before reading inventory 'HANDLER_POST_INVENTORY' => \&example_post_inventory, #or undef # Called when inventory is stored without error 'REQUEST_NAME' => 'EXAMPLE', #or undef # Value of xml tag 'HANDLER_REQUEST' => \&example_handler, #or undef # function that handle the request with the 'REQUEST NAME' 'HANDLER_DUPLICATE' => \&example_duplicate,#or undef # Called when a computer is handle as a duplicate 'TYPE' => OPTION_TYPE_SYNC, # or OPTION_TYPE_ASYNC ASYNC=>with pr without inventory, SYNC=>only when inventory is required 'XML_PARSER_OPT' => { 'ForceArray' => ['xml_tag'] } }; # Default options of your module $Apache::Ocsinventory::OPTIONS{'OCS_OPT_EXAMPLE_FOO'} = 0; $Apache::Ocsinventory::OPTIONS{'OCS_OPT_EXAMPLE_BAR'} = 1; $Apache::Ocsinventory::OPTIONS{'OCS_OPT_EXAMPLE_TOTO'} = 'titi'; # These options will be loaded by ocs when apache will start. # You can put it in ocsinventory.conf using PerlSetEnv directive (Ex: PerlSetEnv OCS_OPT_EXAMPLE_FOO 1) # The settings you put to the configuration file will overload your default # Use it as it was in the apache environnement (ex: $Apache::Ocsinventory::OPTIONS{'OCS_OPT_EXAMPLE_FOO'}-use it as $ENV{'OCS_OPT_EXAMPLE_FOO'} # The GUI refer to it with OCS_OPT_ removed (ex: OCS_OPT_EXAMPLE_FOO => EXAMPLE_FOO). It must be in 'config' table and overload the default settings of this file AND overload the settings in ocsinventory.conf too. # For every module handlers, your functions will be called with certain parameters. # It provides you all the current environnement at the moment of the call # The structure: # #%CURRENT_CONTEXT = ( # 'APACHE_OBJECT' => ref, gives you a pointer to the apache request object -- Always filled # 'DBI_HANDLE' => ref, gives you a pointer to the database handle -- Always filled # 'DEVICEID' => string, gives you the computer's unique deviceid -- Always filled # 'DATABASE_ID' => integer, gives you the computer's database identifier -- Always filled # 'DATA' => ref, gives you a pointer to the initial deflated data (earliest stage) -- Always filled # 'RAW_DATA' => ref, gives you a pointer to the initial compressed data (earliest stage) -- Always filled # 'XML_ENTRY' => ref, gives you a pointer to the data structure generated when parsing the incoming request (with core and optionnal modules parsing options) -- Always filled # 'LOCK_FL' => 1(true) or 0(false), shows if the computer is locked -- Always filled # 'EXIST_FL' => 1(true) or 0(false) shows if the computer whether exists in the database or not (update) -- Always filled # 'MEMBER_OF' => array ref, gives you the groups that computer is member of #); sub example_prolog_read{ # This handler must return either PROLOG_CONTINUE or PROLOG_STOP # This mecanism enable you to completly stop the process at its beginning my $stop = 0; if($stop){ &_log(0,'example','stop prolog !!') if $ENV{'OCS_OPT_LOGLEVEL'}; return PROLOG_STOP; } else{ &_log(0,'example','let prolog go on !!') if $ENV{'OCS_OPT_LOGLEVEL'}; return PROLOG_CONTINUE; } } sub example_prolog_resp{ # Enables you to add tags to xml prolog response # Commonly used to ask an agent module to do something return 1; } sub example_pre_inventory{ # This handler must return either INVENTORY_CONTINUE or INVENTORY_STOP # This mecanism enable you to completly stop the process at its beginning my $stop = 0; if($stop){ &_log(0,'example','I HATE inventory, I stop it !!') if $ENV{'OCS_OPT_LOGLEVEL'}; return INVENTORY_STOP; } else{ &_log(0,'example','I love inventory !!') if $ENV{'OCS_OPT_LOGLEVEL'}; return INVENTORY_CONTINUE; } } sub example_post_inventory{ # This handler is useful to read "extra section" of an inventory # Commonly used to read data added to inventory by an agent module return 1; } sub example_handler{ # This function will be used for a dedicated request (like "INVENTORY" or "PROLOG") # It is designed to implement your own requests by using agent modules # You return from here directly to apache # Then, you must use the apache constants redefined in MODPERL1 or 2 .pm return 1; } sub example_duplicate{ # Useful to manage duplicate with your own tables/structures when a computer is evaluated as a duplicate and replaced return 1; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Filter.pm000066400000000000000000000057461303466605000273420ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # This core module is used to implement what filter you want. package Apache::Ocsinventory::Server::Capacities::Filter; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'HANDLER_PROLOG_READ' => \&filter_prolog, 'HANDLER_PROLOG_RESP' => undef, 'HANDLER_PRE_INVENTORY' => \&filter_inventory, 'HANDLER_POST_INVENTORY' => undef, 'REQUEST_NAME' => undef, 'HANDLER_REQUEST' => undef, 'HANDLER_DUPLICATE' => undef, 'TYPE' => OPTION_TYPE_SYNC, 'XML_PARSER_OPT' => { 'ForceArray' => [] } }; sub filter_prolog{ # ON/OFF return PROLOG_CONTINUE unless $ENV{'OCS_OPT_PROLOG_FILTER_ON'}; my $current_context = shift; return PROLOG_CONTINUE if $current_context->{IS_TRUSTED}; my @filters = ( ); for( @filters ){ if ( &$_( $current_context ) == PROLOG_STOP ){ return PROLOG_STOP; } } return PROLOG_CONTINUE; } sub filter_inventory{ # ON/OFF return INVENTORY_CONTINUE unless $ENV{'OCS_OPT_INVENTORY_FILTER_ON'}; my $current_context = shift; return INVENTORY_CONTINUE if $current_context->{IS_TRUSTED}; my @filters = ( \&filter_flood_ip_killer ); for( @filters ){ if ( &$_( $current_context ) == INVENTORY_STOP ){ return INVENTORY_STOP; } } return INVENTORY_CONTINUE; } sub filter_flood_ip_killer{ return INVENTORY_CONTINUE unless $ENV{'OCS_OPT_INVENTORY_FILTER_FLOOD_IP'}; my $current_context = shift; my $dbh = $current_context->{DBI_HANDLE}; # In seconds my $flushEverySeconds = $ENV{OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME}; # Clear cache $dbh->do( 'DELETE FROM conntrack WHERE (UNIX_TIMESTAMP()-UNIX_TIMESTAMP(TIMESTAMP))>?', {}, $flushEverySeconds ); # If we cannot insert ipadress, we consider that it is in cache, then forbid transmission if( !($current_context->{EXIST_FL}) && !( $dbh->do('INSERT INTO conntrack(IP,TIMESTAMP) VALUES(?,NULL)', {}, $current_context->{IPADDRESS})) ){ &_log(519,'filter_flood_ip_killer','new device forbidden') if $ENV{'OCS_OPT_LOGLEVEL'}; return INVENTORY_STOP; } else{ # Everything is ok return INVENTORY_CONTINUE; } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Ipdiscover.pm000066400000000000000000000260531303466605000302160ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Ipdiscover; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::Useragent qw / _get_useragent /; use constant IPD_NEVER => 0; use constant IPD_ON => 1; use constant IPD_MAN => 2; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'IPDISCOVER', 'HANDLER_PROLOG_READ' => undef, 'HANDLER_PROLOG_RESP' => \&_ipdiscover_prolog_resp, 'HANDLER_PRE_INVENTORY' => undef, 'HANDLER_POST_INVENTORY' => \&_ipdiscover_main, 'REQUEST_NAME' => undef, 'HANDLER_REQUEST' => undef, 'HANDLER_DUPLICATE' => undef, 'TYPE' => OPTION_TYPE_SYNC, 'XML_PARSER_OPT' => { 'ForceArray' => ['H', 'NETWORKS'] } }; sub _ipdiscover_prolog_resp{ return unless $ENV{'OCS_OPT_IPDISCOVER'}; my $current_context = shift; return unless $current_context->{'EXIST_FL'}; my $resp = shift; my ($ua, $os, $v); my $lanToDiscover = $current_context->{'PARAMS'}{'IPDISCOVER'}->{'TVALUE'}; my $behaviour = $current_context->{'PARAMS'}{'IPDISCOVER'}->{'IVALUE'}; my $groupsParams = $current_context->{'PARAMS_G'}; my $ipdiscoverLatency; return if !defined($behaviour) or $behaviour == IPD_NEVER; if($lanToDiscover){ &_log(1004,'ipdiscover','incoming') if $ENV{'OCS_OPT_LOGLEVEL'}; # We can use groups to prevent some computers to be elected if( $ENV{'OCS_OPT_ENABLE_GROUPS'} && $ENV{'OCS_OPT_IPDISCOVER_USE_GROUPS'} ){ for(keys(%$groupsParams)){ if(defined($$groupsParams{$_}->{'IPDISCOVER'}->{'IVALUE'}) && $$groupsParams{$_}->{'IPDISCOVER'}->{'IVALUE'} == IPD_NEVER){ &_log(1005,'ipdiscover','conflict') if $ENV{'OCS_OPT_LOGLEVEL'}; return; } } } $resp->{'RESPONSE'} = [ 'SEND' ]; # Agents newer than 13(linux) ans newer than 4027(Win32) receive new xml formatting (including ipdisc_lat) $ua = $current_context->{'USER_AGENT'}; my $legacymode; if( $ua=~/OCS-NG_(\w+)_client_v(\d+)/ ){ $legacymode = 1 if ($1 eq "windows" && $2<=4027) or ($1 eq "linux" && $2<=13); } if( $legacymode ){ push @{$$resp{'OPTION'}}, { 'NAME' => [ 'IPDISCOVER' ], 'PARAM' => [ $lanToDiscover ] }; } else{ if(defined( $current_context->{'PARAMS'}{'IPDISCOVER_LATENCY'}->{'IVALUE'} )){ $ipdiscoverLatency = $current_context->{'PARAMS'}{'IPDISCOVER_LATENCY'}->{'IVALUE'}; } else{ for(keys(%$groupsParams)){ $ipdiscoverLatency = $$groupsParams{$_}->{'IPDISCOVER_LATENCY'}->{'IVALUE'} if (exists($$groupsParams{$_}->{'IPDISCOVER_LATENCY'}->{'IVALUE'}) and $$groupsParams{$_}->{'IPDISCOVER_LATENCY'}->{'IVALUE'}>$ipdiscoverLatency) or !$ipdiscoverLatency; } } unless( $ipdiscoverLatency ){ $ipdiscoverLatency = $ENV{'OCS_OPT_IPDISCOVER_LATENCY'}?$ENV{'OCS_OPT_IPDISCOVER_LATENCY'}:100; } push @{$$resp{'OPTION'}}, { 'NAME' => [ 'IPDISCOVER' ], 'PARAM' => { 'IPDISC_LAT' => $ipdiscoverLatency, 'content' => $lanToDiscover } }; } &_set_http_header('Connection', 'close', $current_context->{'APACHE_OBJECT'}); return 1; }else{ return 0; } } sub _ipdiscover_main{ my $request; my $row; my $subnet; my $remove; return unless $ENV{'OCS_OPT_IPDISCOVER'}; my $current_context = shift; return if $current_context->{'LOCAL_FL'}; my $DeviceID = $current_context->{'DATABASE_ID'}; my $dbh = $current_context->{'DBI_HANDLE'}; my $result = $current_context->{'XML_ENTRY'}; my $lanToDiscover = $current_context->{'PARAMS'}{'IPDISCOVER'}->{'TVALUE'}; my $behaviour = $current_context->{'PARAMS'}{'IPDISCOVER'}->{'IVALUE'}; my $groupsParams = $current_context->{'PARAMS_G'}; #Special array to define agents that could be automatic ipdscover elected my @ipdiscover_agents = ( 'OCS-NG_unified_unix_agent', 'OCS-NG_windows_client', 'OCS-NG_WINDOWS_AGENT', ); #IVALUE = 0 means that computer will not ever be elected if( defined($behaviour) && $behaviour == IPD_NEVER ){ return 0; } # We can use groups to prevent some computers to be elected if( $ENV{'OCS_OPT_ENABLE_GROUPS'} && $ENV{'OCS_OPT_IPDISCOVER_USE_GROUPS'} ){ for(keys(%$groupsParams)){ return 0 if defined($$groupsParams{$_}->{'IPDISCOVER'}->{'IVALUE'}) && $$groupsParams{$_}->{'IPDISCOVER'}->{'IVALUE'} == IPD_NEVER; } } # Is the device already have the ipdiscover function ? if($lanToDiscover){ # get 1 on removing and 0 if ok $remove = &_ipdiscover_read_result($dbh, $result, $lanToDiscover); if( $behaviour == IPD_MAN ){ $remove = 0; } if(!defined($remove)){ return 1; } }else{ my $useragent = &_get_useragent(); unless (grep /^($useragent->{'NAME'})$/, @ipdiscover_agents){ return 0; } # Get quality and fidelity $request = $dbh->prepare('SELECT QUALITY,FIDELITY FROM hardware WHERE ID=?'); $request->execute($DeviceID); if($row = $request->fetchrow_hashref){ if( ($row->{'FIDELITY'} > 2 and $row->{'QUALITY'} != 0) || $ENV{'OCS_OPT_IPDISCOVER_NO_POSTPONE'} ){ $subnet = &_ipdiscover_find_iface($result, $current_context->{'DBI_HANDLE'}); if(!$subnet){ return &_ipdiscover_evaluate($result, $row->{'FIDELITY'}, $row->{'QUALITY'}, $dbh, $DeviceID); }elsif($subnet =~ /^(\d{1,3}(?:\.\d{1,3}){3})$/){ # The computer is elected, we have to write it in devices $dbh->do('INSERT INTO devices(HARDWARE_ID, NAME, IVALUE, TVALUE, COMMENTS) VALUES(?,?,?,?,?)',{},$DeviceID,'IPDISCOVER',1,$subnet,'') or return 1; &_log(1001,'ipdiscover','elected'."($subnet)") if $ENV{'OCS_OPT_LOGLEVEL'}; return 0; }else{ return 0; } }else{ return 0; } } } # If needed, we remove if($remove){ if(!$dbh->do('DELETE FROM devices WHERE HARDWARE_ID=? AND NAME="IPDISCOVER"', {}, $DeviceID)){ return 1; } $dbh->commit; &_log(1002,'ipdiscover','removed') if $ENV{'OCS_OPT_LOGLEVEL'}; } 0; } sub _ipdiscover_read_result{ my ($dbh, $result, $subnet) = @_; my $mask; my $update_req; my $insert_req; my $request; if(exists($result->{CONTENT}->{IPDISCOVER})){ my $base = $result->{CONTENT}->{NETWORKS}; # Retrieve netmask for(@$base){ if($_->{IPSUBNET} eq $subnet){ $mask = $_->{IPMASK}; last; } } # We insert the results (MAC/IP) $update_req = $dbh->prepare('UPDATE netmap SET IP=?,MASK=?,NETID=?,DATE=NULL, NAME=? WHERE MAC=?'); $insert_req = $dbh->prepare('INSERT INTO netmap(IP, MAC, MASK, NETID, NAME) VALUES(?,?,?,?,?)'); $base = $result->{CONTENT}->{IPDISCOVER}->{H}; for(@$base){ unless($_->{I}=~/^(\d{1,3}(?:\.\d{1,3}){3})$/ and $_->{M}=~/.{2}(?::.{2}){5}/){ &_log(1003,'ipdiscover','bad_result') if $ENV{'OCS_OPT_LOGLEVEL'}; next; } $update_req->execute($_->{I}, $mask, $subnet, $_->{N}, $_->{M}); unless($update_req->rows){ $insert_req->execute($_->{I}, $_->{M}, $mask, $subnet, $_->{N}); } } $dbh->commit; }else{ return 1; } # Maybe There are too much ipdiscover per subnet ? $request=$dbh->prepare('SELECT HARDWARE_ID FROM devices WHERE TVALUE=? AND NAME="IPDISCOVER"'); $request->execute($subnet); if($request->rows > $ENV{'OCS_OPT_IPDISCOVER'}){ $request->finish; return 1; } return 0; } sub _ipdiscover_find_iface{ my $result = shift; my $base = $result->{CONTENT}->{NETWORKS}; my $dbh = shift; my $request; my @worth; for(@$base){ if($_->{DESCRIPTION}!~/ppp/i){ if($_->{STATUS}=~/up/i){ if($_->{IPMASK}=~/^(?:255\.){2}|^0x(?:ff){2}/){ if($_->{IPSUBNET}=~/^(\d{1,3}(?:\.\d{1,3}){3})$/){ # Looking for a need of ipdiscover $request = $dbh->prepare('SELECT HARDWARE_ID FROM devices WHERE TVALUE=? AND NAME="IPDISCOVER"'); $request->execute($_->{IPSUBNET}); if($request->rows < $ENV{'OCS_OPT_IPDISCOVER'}){ $request->finish; return $_->{IPSUBNET}; } $request->finish; }}}} # Looking for ipdiscover older than ipdiscover_max_value # and compare current computer with actual ipdiscover } return 0; } sub _ipdiscover_evaluate{ my ($result, $fidelity, $quality, $dbh, $DeviceID) = @_; my $request; my $row; my $time = time(); my $max_age = $ENV{'OCS_OPT_IPDISCOVER_MAX_ALIVE'}*86400; my $over; my @worth; my $base = $result->{CONTENT}->{NETWORKS}; for(@$base){ if(defined($_->{IPSUBNET}) and $_->{IPSUBNET}=~/^(\d{1,3}(?:\.\d{1,3}){3})$/ ){ $request = $dbh->prepare(' SELECT h.ID AS ID, h.QUALITY AS QUALITY, UNIX_TIMESTAMP(h.LASTDATE) AS LAST FROM hardware h,devices d WHERE d.HARDWARE_ID=h.ID AND d.TVALUE=? AND h.ID<>? AND d.IVALUE<>? AND d.NAME="IPDISCOVER"'); $request->execute($_->{IPSUBNET}, $DeviceID, IPD_MAN); while($row = $request->fetchrow_hashref){ # If we find an ipdiscover that is older than IP_MAX_ALIVE, we replace it with the current if( (($time - $row->{'LAST'}) > $max_age) and $max_age){ @worth = ($row->{'ID'}, $row->{'QUALITY'} ); $over = 1; last; } # For the first round unless(@worth){ @worth = ($row->{'ID'}, $row->{'QUALITY'} ); next; } # Put the worth in @worth @worth = ( $row->{'ID'}, $row->{'QUALITY'} ) if $worth[1] < $row->{'QUALITY'}; } # If not over, we compare our quality with the one of the worth on this subnet. # If it is better more than one, we replace it if(@worth){ if(($quality < $worth[1] and (($worth[1]-$quality)>$ENV{'OCS_OPT_IPDISCOVER_BETTER_THRESHOLD'})) or $over){ # Compare to the current and replace it if needed if(!$dbh->do('UPDATE devices SET HARDWARE_ID=? WHERE HARDWARE_ID=? AND NAME="IPDISCOVER"', {}, $DeviceID, $worth[0])){ return 1; } $dbh->commit; &_log(1001,'ipdiscover',($over?'over':'better')."($_->{IPSUBNET})") if $ENV{'OCS_OPT_LOGLEVEL'}; return 0; } } }else{ next; } } return 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Notify.pm000066400000000000000000000103671303466605000273600ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Notify; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'NOTIFY', 'HANDLER_PROLOG_READ' => undef, 'HANDLER_PROLOG_RESP' => undef, 'HANDLER_PRE_INVENTORY' => undef, 'HANDLER_POST_INVENTORY' => undef, 'REQUEST_NAME' => 'NOTIFY', 'HANDLER_REQUEST' => \¬ify_handler, 'HANDLER_DUPLICATE' => undef, 'TYPE' => OPTION_TYPE_ASYNC, 'XML_PARSER_OPT' => { 'ForceArray' => ['IFACE'] } }; sub notify_handler{ my $current_context = shift; if( !$current_context->{EXIST_FL} ){ &_log(322, 'notify', 'no_device'); return APACHE_OK; } &_log(322, 'notify', $current_context->{'XML_ENTRY'}->{TYPE}); if( $current_context->{'XML_ENTRY'}->{TYPE} eq 'IP' ){ &update_ip( $current_context ); } else{ &_log(529, 'notify', 'not_supported'); } return APACHE_OK; } sub update_ip{ # Initialize data my $current_context = shift; my $update_hardware; my $dbh = $current_context->{'DBI_HANDLE'}; my $result = $current_context->{'XML_ENTRY'}; my $hardwareId = $current_context->{'DATABASE_ID'}; my $select_h_sql = 'SELECT IPADDR,MACADDR FROM hardware h,networks n WHERE IPADDR=IPADDRESS AND h.ID=?'; my $updateMainIp_sql = 'UPDATE hardware SET IPADDR=? WHERE ID=?'; # Get default IP my $sth = $dbh->prepare( $select_h_sql ); $sth->execute( $hardwareId ); my $row = $sth->fetchrow_hashref; my $defaultIface = $row->{MACADDR}; my $defaultIp = $row->{IPADDR}; $sth->finish; if( exists $result->{IFACE} ){ for my $newIface ( @{$result->{IFACE}} ){ next if !$newIface->{IP} or !$newIface->{MASK} or !$newIface->{MAC}; my (@update_fields, @update_values); #We create update request using existing values only if ($newIface->{GW}) { push @update_fields,'IPGATEWAY=?'; push @update_values,$newIface->{GW}; } if ($newIface->{DHCP}) { push @update_fields,'IPDHCP=?'; push @update_values,$newIface->{DHCP}; } if ($newIface->{SUBNET}) { push @update_fields,'IPSUBNET=?'; push @update_values,$newIface->{SUBNET}; } if ($newIface->{IP}) { push @update_fields,'IPADDRESS=?'; push @update_values,$newIface->{IP}; } if ($newIface->{MASK}) { push @update_fields,'IPMASK=?'; push @update_values,$newIface->{MASK}; } push @update_values,$newIface->{MAC}; push @update_values,$hardwareId; my $updateIp_sql= 'UPDATE networks SET '.(join ',', @update_fields).' WHERE MACADDR=? AND HARDWARE_ID=?'; my $err = $dbh->do( $updateIp_sql, {}, @update_values ); if( !$err ){ &_log(530, 'notify', 'error'); } elsif( $err==0E0 ){ &_log(324, 'notify', $newIface->{MAC}); } else{ &_log(323, 'notify', "$newIface->{MAC}<$newIface->{IP}>"); if (exists $result->{HARDWARE}) { #New behaviour with additional tag $dbh->do( $updateMainIp_sql, {}, $result->{HARDWARE}->{IPADDR}, $hardwareId); $update_hardware = 1; } #We update CHECKSUM value in hardware table my $mask = $DATA_MAP{networks}{mask}; $mask = $mask|1 if $update_hardware; $dbh->do("UPDATE hardware SET CHECKSUM=($mask|CHECKSUM) WHERE ID=$hardwareId"); } } } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Registry.pm000066400000000000000000000044471303466605000277220ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Registry; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Map; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'REGISTRY', 'HANDLER_PROLOG_READ' => undef, 'HANDLER_PROLOG_RESP' => \&_registry_prolog_resp, 'HANDLER_PRE_INVENTORY' => undef, 'HANDLER_POST_INVENTORY' => undef, 'REQUEST_NAME' => undef, 'HANDLER_REQUEST' => undef, 'HANDLER_DUPLICATE' => undef, 'TYPE' => OPTION_TYPE_SYNC, 'XML_PARSER_OPT' => { 'ForceArray' => ['REGISTRY'] } }; sub _registry_prolog_resp{ return unless $ENV{'OCS_OPT_REGISTRY'}; my $current_context = shift; my $resp = shift; my $dbh = $current_context->{'DBI_HANDLE'}; # Sync option return if $resp->{'RESPONSE'} eq 'STOP'; my $request; my $row; ################################# #REGISTRY ######### # Ask computer to retrieve the requested registry keys my @registry; $request=$dbh->prepare('SELECT * FROM regconfig'); $request->execute; while($row = $request->fetchrow_hashref){ push @registry, { 'REGTREE' => $row->{'REGTREE'} , 'REGKEY' => $row->{'REGKEY'} , 'NAME' => $row->{'NAME'} , 'content' => $row->{'REGVALUE'} }; } if(@registry){ push @{ $resp->{'OPTION'} }, { 'NAME' => [ 'REGISTRY' ], 'PARAM' => \@registry }; return 1; }else{ return 0; } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Snmp.pm000066400000000000000000000230171303466605000270210ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # This core module is used to guide you through the module creation # All modules using modperl api functions must use the wrappers defined in MODPERL1 or 2 .pm # or create a new one in these 2 files if you need to use something that is not wrapped yet package Apache::Ocsinventory::Server::Capacities::Snmp; use XML::Simple; use strict; # This block specify which wrapper will be used ( your module will be compliant with all mod_perl versions ) BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } # These are the core modules you must include in addition use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::Capacities::Snmp::Data; use Apache::Ocsinventory::Server::Capacities::Snmp::Inventory; #Getting sections for the 'ForceArray' option my @forceArray = ('DEVICE'); &_get_snmp_parser_ForceArray(\@forceArray); # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'SNMP', 'HANDLER_PROLOG_READ' => undef, #or undef # Called before reading the prolog 'HANDLER_PROLOG_RESP' => \&snmp_prolog_resp, #or undef # Called after the prolog response building 'HANDLER_PRE_INVENTORY' => undef , #or undef # Called before reading inventory 'HANDLER_POST_INVENTORY' => undef, #or undef # Called when inventory is stored without error 'REQUEST_NAME' => 'SNMP', #or undef # Value of xml tag 'HANDLER_REQUEST' => \&snmp_handler, #or undef # function that handle the request with the 'REQUEST NAME' 'HANDLER_DUPLICATE' => \&snmp_duplicate, #or undef # Called when a computer is handle as a duplicate 'TYPE' => OPTION_TYPE_SYNC, # or OPTION_TYPE_ASYNC ASYNC=>with pr without inventory, SYNC=>only when inventory is required 'XML_PARSER_OPT' => { 'ForceArray' => [@forceArray] } }; sub snmp_prolog_resp{ my $current_context = shift; my $resp = shift; my $select_ip_req; my $select_communities_req; my $select_deviceid_req; my $select_network_req; my $select_mibs_req; my @devicesToScan; my @networksToScan; my @communities; my @mibs; #Verify if SNMP is enable for this computer or in config my $snmpSwitch = &_get_snmp_switch($current_context); return unless $snmpSwitch; ######### #SNMP ######### # Ask computer to scan the requested snmp network devices my @snmp; my $dbh = $current_context->{'DBI_HANDLE'}; my $lanToDiscover = $current_context->{'PARAMS'}{'IPDISCOVER'}->{'TVALUE'}; my $behaviour = $current_context->{'PARAMS'}{'IPDISCOVER'}->{'IVALUE'}; my $groupsParams = $current_context->{'PARAMS_G'}; #Only if communication is https if ($current_context->{'APACHE_OBJECT'}->subprocess_env('https')) { $select_deviceid_req=$dbh->prepare('SELECT DEVICEID FROM hardware WHERE DEVICEID=?'); $select_deviceid_req->execute($current_context->{'DEVICEID'}); #Only if agent deviceid already exists in database if ($select_deviceid_req->fetchrow_hashref) { #Getting networks specified for scans $select_network_req=$dbh->prepare("SELECT TVALUE FROM devices WHERE HARDWARE_ID=? AND NAME='SNMP_NETWORK'"); $select_network_req->execute($current_context->{'DATABASE_ID'}); #Getting networks separated by commas (will be removed when GUI will be OK to add several networks cleanly) my $row = $select_network_req->fetchrow_hashref; #Only one line per HARDWARE_ID @networksToScan= split(',',$row->{TVALUE}); #TODO: use this lines instead of previous ones when GUI will be OK to add several networks cleanly #while(my $row = $select_network_req->fetchrow_hashref){ # push @networksToScan,$row; #} if (@networksToScan) { #Adding devices informations in the XML foreach my $network (@networksToScan) { push @snmp,{ #'SUBNET' => $network->{TVALUE}, #TODO: uncomment this line when GUI will be OK to add several networks cleanly 'SUBNET' => $network, 'TYPE' => 'NETWORK', }; } } #If the computer is Ipdicover elected if ($behaviour == 1 || $behaviour == 2) { #Getting non inventoried network devices for the agent subnet $select_ip_req=$dbh->prepare('SELECT IP,MAC FROM netmap WHERE NETID=? AND mac NOT IN (SELECT DISTINCT(macaddr) FROM networks WHERE macaddr IS NOT NULL AND IPSUBNET=?)'); $select_ip_req->execute($lanToDiscover,$lanToDiscover); while(my $row = $select_ip_req->fetchrow_hashref){ push @devicesToScan,$row; } if (@devicesToScan) { #Adding devices informations in the XML foreach my $device (@devicesToScan) { push @snmp,{ 'IPADDR' => $device->{IP}, 'MACADDR' => $device->{MAC}, 'TYPE' => 'DEVICE', }; } } } if (@snmp) { #Getting snmp communities $select_communities_req = $dbh->prepare('SELECT VERSION,NAME,USERNAME,AUTHKEY,AUTHPASSWD FROM snmp_communities'); $select_communities_req->execute(); while(my $row = $select_communities_req->fetchrow_hashref){ push @communities,$row; } if (@communities) { foreach my $community (@communities) { push @snmp,{ 'VERSION' => $community->{'VERSION'}?$community->{'VERSION'}:'', 'NAME' => $community->{'NAME'}?$community->{'NAME'}:'', 'USERNAME'=> $community->{'USERNAME'}?$community->{'USERNAME'}:'', 'AUTHKEY' => $community->{'AUTHKEY'}?$community->{'AUTHKEY'}:'', 'AUTHPASSWD' => $community->{'AUTHPASSWD'}?$community->{'AUTHPASSWD'}:'', 'TYPE' => 'COMMUNITY', }; } } #Getting custom mibs informations $select_mibs_req = $dbh->prepare('SELECT VENDOR,URL,CHECKSUM,VERSION,PARSER FROM snmp_mibs'); $select_mibs_req->execute(); while(my $row = $select_mibs_req->fetchrow_hashref){ push @mibs,$row; } if (@mibs) { foreach my $mib (@mibs) { push @snmp,{ 'VENDOR' => $mib->{'VENDOR'}?$mib->{'VENDOR'}:'', 'URL'=> $mib->{'URL'}?$mib->{'URL'}:'', 'CHECKSUM' => $mib->{'CHECKSUM'}?$mib->{'CHECKSUM'}:'', 'VERSION' => $mib->{'VERSION'}?$mib->{'VERSION'}:'', 'PARSER' => $mib->{'PARSER'}?$mib->{'PARSER'}:'', 'TYPE' => 'MIB', }; } } #Final XML push @{ $resp->{'OPTION'} },{ 'NAME' => ['SNMP'], 'PARAM' => \@snmp, }; } } else { &_log(104,'snmp',"error: agent must have a deviceid in database !!") if $ENV{'OCS_OPT_LOGLEVEL'}; } } else { &_log(103,'snmp',"error: agent must communicate using https to be able to get SNMP communities (only affects OCS unix agent) !!") if $ENV{'OCS_OPT_LOGLEVEL'} and $ENV{'OCS_OPT_SNMP_PRINT_HTTPS_ERROR'} } } sub snmp_handler{ my $current_context = shift; #Verify if SNMP is enable for this computer or in config my $snmpSwitch = &_get_snmp_switch($current_context); return unless $snmpSwitch; my $dbh = $current_context->{'DBI_HANDLE'}; my $result = $current_context->{'XML_ENTRY'}; my $r = $current_context->{'APACHE_OBJECT'}; my $hardware_id = $current_context->{'DATABASE_ID'}; # Remanent data my ( %SNMP_SECTIONS, @SNMP_SECTIONS ); #We get snmp tables references from Map.pm &_init_snmp_map( \%SNMP_SECTIONS, \@SNMP_SECTIONS ); #Inventory incoming &_log(100,'snmp','inventory incoming') if $ENV{'OCS_OPT_LOGLEVEL'}; # Putting the SNMP inventory in the database if (&_snmp_inventory( \%SNMP_SECTIONS, \@SNMP_SECTIONS, $current_context->{'DATABASE_ID'})) { &_log(101,'snmp','inventory error !!') if $ENV{'OCS_OPT_LOGLEVEL'}; } else { &_log(102,'snmp','inventory transmitted') if $ENV{'OCS_OPT_LOGLEVEL'}; } #Sending Response to the agent &_set_http_header('content-length', 0, $r); &_send_http_headers($r); return (APACHE_OK); } sub snmp_duplicate{ # Useful to manage duplicate with your own tables/structures when a computer is evaluated as a duplicate and replaced return 1; } sub _get_snmp_switch { my $current_context = shift ; my $groupsParams = $current_context->{'PARAMS_G'}; my $snmpSwitch ; if($ENV{'OCS_OPT_SNMP'}){ $snmpSwitch = 1; # Groups custom parameter for(keys(%$groupsParams)){ $snmpSwitch = $$groupsParams{$_}->{'SNMP_SWITCH'}->{'IVALUE'} if exists( $$groupsParams{$_}->{'SNMP_SWITCH'}->{'IVALUE'} ) and $$groupsParams{$_}->{'SNMP_SWITCH'}->{'IVALUE'} < $snmpSwitch; } } else{ $snmpSwitch = 0; } #Computer custom parameter $snmpSwitch = $current_context->{'PARAMS'}{'SNMP_SWITCH'}->{'IVALUE'} if defined($current_context->{'PARAMS'}{'SNMP_SWITCH'}->{'IVALUE'}) and $snmpSwitch; return ($snmpSwitch); } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Snmp/000077500000000000000000000000001303466605000264605ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Snmp/Data.pm000066400000000000000000000151041303466605000276700ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Snmp::Data; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _init_snmp_map _get_snmp_bind_values _get_snmp_parser_ForceArray _snmp_has_changed /; use Digest::MD5 qw(md5_base64); use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::System qw / :server /; #TODO: see if we can use a comman Data.pm for standard inventory and snmp inventory. Maybe a var for HARDWARE_ID and SNMp_ID and a common grep to select tables ? sub _init_snmp_map{ my ($sectionsMeta, $sectionsList) = @_; my $section; my @bind_num; my $field; my $fields_string; my $field_index; # Parse snmp sections only for $section (keys(%DATA_MAP)){ if ($DATA_MAP{$section}->{capacities} =~ /^snmp$/ ) { $field_index = 0; # Field array (from data_map field hash keys), filtered fields and cached fields $sectionsMeta->{$section}->{field_arrayref} = []; $sectionsMeta->{$section}->{field_filtered} = []; $sectionsMeta->{$section}->{field_cached} = {}; ############################################## # Don't process the non-auto-generated sections next if !$DATA_MAP{$section}->{auto}; $sectionsMeta->{$section}->{multi} = 1 if $DATA_MAP{$section}->{multi}; $sectionsMeta->{$section}->{mask} = $DATA_MAP{$section}->{mask}; $sectionsMeta->{$section}->{delOnReplace} = 1 if $DATA_MAP{$section}->{delOnReplace}; $sectionsMeta->{$section}->{writeDiff} = 1 if $DATA_MAP{$section}->{writeDiff}; $sectionsMeta->{$section}->{cache} = 1 if $DATA_MAP{$section}->{cache}; $sectionsMeta->{$section}->{mandatory} = 1 if $DATA_MAP{$section}->{mandatory}; $sectionsMeta->{$section}->{name} = $section; # $sectionsMeta->{$section}->{hasChanged} is set while inventory update # Parse fields of the current section for $field ( keys(%{$DATA_MAP{$section}->{fields}} ) ){ if(!$DATA_MAP{$section}->{fields}->{$field}->{noSql}){ push @{$sectionsMeta->{$section}->{field_arrayref}}, $field; $sectionsMeta->{$section}->{noSql} = 1 unless $sectionsMeta->{$section}->{noSql}; } if($DATA_MAP{$section}->{fields}->{$field}->{filter}){ next unless $ENV{OCS_OPT_INVENTORY_FILTER_ENABLED}; push @{$sectionsMeta->{$section}->{field_filtered}}, $field; $sectionsMeta->{$section}->{filter} = 1 unless $sectionsMeta->{$section}->{filter}; } if($DATA_MAP{$section}->{fields}->{$field}->{cache}){ next unless $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED}; $sectionsMeta->{$section}->{field_cached}->{$field} = $field_index; $sectionsMeta->{$section}->{cache} = 1 unless $sectionsMeta->{$section}->{cache}; } if(defined $DATA_MAP{$section}->{fields}->{$field}->{fallback}){ $sectionsMeta->{$section}->{fields}->{$field}->{fallback} = $DATA_MAP{$section}->{fields}->{$field}->{fallback}; } if(defined $DATA_MAP{$section}->{fields}->{$field}->{type}){ $sectionsMeta->{$section}->{fields}->{$field}->{type} = $DATA_MAP{$section}->{fields}->{$field}->{type}; } $field_index++; } # Build the "DBI->prepare" sql insert string $fields_string = join ',', ('SNMP_ID', @{$sectionsMeta->{$section}->{field_arrayref}}); $sectionsMeta->{$section}->{sql_insert_string} = "INSERT INTO $section($fields_string) VALUES("; for(0..@{$sectionsMeta->{$section}->{field_arrayref}}){ push @bind_num, '?'; } $sectionsMeta->{$section}->{sql_insert_string}.= (join ',', @bind_num).')'; @bind_num = (); # Build the "DBI->prepare" sql select string $sectionsMeta->{$section}->{sql_select_string} = "SELECT ID,$fields_string FROM $section WHERE SNMP_ID=? ORDER BY ".$DATA_MAP{$section}->{sortBy}; # Build the "DBI->prepare" sql deletion string $sectionsMeta->{$section}->{sql_delete_string} = "DELETE FROM $section WHERE SNMP_ID=? AND ID=?"; # to avoid many "keys" push @$sectionsList, $section; } } } sub _get_snmp_bind_values{ my ($refXml, $sectionMeta, $arrayToFeed) = @_; my $bind_value; for my $field ( @{ $sectionMeta->{field_arrayref} } ) { if(defined($refXml->{$field}) && $refXml->{$field} ne '' && $refXml->{$field} ne '??' && $refXml->{$field}!~/^N\/?A$/){ $bind_value = $refXml->{$field} } else{ if( defined $sectionMeta->{fields}->{$field}->{fallback} ){ $bind_value = $sectionMeta->{fields}->{$field}->{fallback}; &_log( 000, 'fallback', "$field:".$sectionMeta->{fields}->{$field}->{fallback}) if $ENV{'OCS_OPT_LOGLEVEL'}>1; } else{ &_log( 000, 'generic-fallback', "$field:".$sectionMeta->{fields}->{$field}->{fallback}) if $ENV{'OCS_OPT_LOGLEVEL'}>1; $bind_value = ''; } } # We have to substitute the value with the ID matching "type_section_field.name" if the field is tagged "type". # It allows to support different DB structures if( defined $sectionMeta->{fields}->{$field}->{type} ){ $bind_value = _get_type_id($sectionMeta->{name}, $field, $bind_value); } if($ENV{'OCS_OPT_UNICODE_SUPPORT'}) { my $utf8 = $bind_value; utf8::decode($utf8); push @$arrayToFeed, $utf8; } else { push @$arrayToFeed, $bind_value; } } } sub _snmp_has_changed{ my ($refXml,$XmlSection,$section,$snmpContext) = @_; # Don't use inventory diff if section mask is return 1 if $DATA_MAP{$section}->{mask}==0; my $md5_hash = md5_base64(XML::Simple::XMLout($refXml)); # Check laststate for this section from previous snmp inventory my $laststate = $snmpContext->{'LASTSTATE'}->{$XmlSection}; if ( $laststate ne $md5_hash ) { return(1); #section has changed } return 0; } sub _get_snmp_parser_ForceArray{ my $arrayRef = shift ; for my $section (keys(%DATA_MAP)){ if (defined($DATA_MAP{$section}->{capacities}) && ($DATA_MAP{$section}->{capacities} =~ /^snmp$/)) { # Feed the multilines section array in order to parse xml correctly if ($DATA_MAP{$section}->{multi}) { #We delete the snmp_ pattern to be in concordance with XML $section =~ s/snmp_//g; push @$arrayRef, uc $section; } } } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Snmp/Inventory.pm000066400000000000000000000166401303466605000310220ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Capacities::Snmp::Inventory; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _snmp_inventory /; use Digest::MD5 qw(md5_base64); use Apache::Ocsinventory::Server::System qw / :server /; use Apache::Ocsinventory::Server::Capacities::Snmp::Data; sub _snmp_context { my $snmpDeviceId = shift; my $request; my $snmpDatabaseId; my $snmpContext = {}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; # Retrieve Device ID if exists $request = $dbh->prepare('SELECT ID FROM snmp WHERE SNMPDEVICEID=?' ); #TODO:retrieve the unless here like standard Inventory.pm $request->execute($snmpDeviceId); if($request->rows){ my $row = $request->fetchrow_hashref; $snmpContext->{DATABASE_ID} = $row->{'ID'}; $snmpContext->{EXIST_FL} = 1; } else { #We add the new device in snmp table $dbh->do('INSERT INTO snmp(SNMPDEVICEID) VALUES(?)', {}, $snmpDeviceId); $request = $dbh->prepare('SELECT ID FROM snmp WHERE SNMPDEVICEID=?'); unless($request->execute($snmpDeviceId)){ &_log(518,'snmp','id_error') if $ENV{'OCS_OPT_LOGLEVEL'}; return(1); } my $row = $request->fetchrow_hashref; $snmpContext->{DATABASE_ID} = $row->{'ID'}; #We add the device in snmp_accountinfo ans snmp_laststate tables; $dbh->do('INSERT INTO snmp_accountinfo(SNMP_ID) VALUES(?)', {}, $row->{'ID'}); $dbh->do('INSERT INTO snmp_laststate(SNMP_ID) VALUES(?)', {}, $row->{'ID'}); $dbh->commit; } if($ENV{'OCS_OPT_SNMP_INVENTORY_DIFF'}){ #Getting laststate data for this device $request = $dbh->prepare('SELECT * FROM snmp_laststate WHERE SNMP_ID=?' ); unless ($request->execute($snmpContext->{DATABASE_ID})) { &_log(519,'snmp','laststate_error') if $ENV{'OCS_OPT_LOGLEVEL'}; return(1); } if($request->rows) { my $row = $request->fetchrow_hashref; $snmpContext->{LASTSTATE}=$row; } } return($snmpContext); } sub _snmp_inventory{ my ( $sectionsMeta, $sectionsList, $agentDatabaseId ) = @_; my ($section,$XmlSection); my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $snmp_devices = $result->{CONTENT}->{DEVICE}; #Getting data for the several snmp devices that we have in the xml for( @$snmp_devices ){ my $snmpDeviceXml=$_; #Getting context and ID in the snmp table for this device my $snmpContext = &_snmp_context($snmpDeviceXml->{COMMON}->{SNMPDEVICEID}); if ($snmpContext == 1) { &_log(520,'snmp','context_error') if $ENV{'OCS_OPT_LOGLEVEL'}; return(1); } my $snmpDatabaseId = $snmpContext->{DATABASE_ID}; #We create an empty checksum for this device $snmpDeviceXml->{COMMON}->{CHECKSUM} = 0; # Call the _update_snmp_inventory_section for each section for $section (@{$sectionsList}){ #We delete the snmp_ pattern to be in concordance with XML $XmlSection = uc $section; $XmlSection =~ s/SNMP_//g; #Only if section exists in XML or if table is mandatory if ($snmpDeviceXml->{$XmlSection} || $sectionsMeta->{$section}->{mandatory}) { if(_update_snmp_inventory_section($snmpDeviceXml, $snmpContext, $section, $XmlSection, $sectionsMeta->{$section})){ return 1; } } } #Call COMMON section update if(&_snmp_common($snmpDeviceXml->{COMMON},$snmpDatabaseId,$agentDatabaseId)) { return 1; } #Update the snmp_laststate table for this device if needed if ( $snmpContext->{'LASTSTATE_UPDATE_VALUES'} ) { my $update_values = join(',', @{$snmpContext->{'LASTSTATE_UPDATE_VALUES'}}); $dbh->do("UPDATE snmp_laststate SET $update_values WHERE SNMP_ID = $snmpDatabaseId"); $dbh->commit; } } } sub _update_snmp_inventory_section{ my ($snmpDeviceXml, $snmpContext, $section, $XmlSection, $sectionMeta) = @_; my $snmpDatabaseId = $snmpContext->{DATABASE_ID}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my @bind_values; my $refXml = $snmpDeviceXml->{$XmlSection}; # We continue only if data for this section return 0 unless ($refXml); #TODO: prevent a bug if one (or more) of the snmp tables has no SNMP_ID field) #We delete related data for this device if already exists if ($snmpContext->{EXIST_FL}) { if($ENV{'OCS_OPT_SNMP_INVENTORY_DIFF'}){ if( _snmp_has_changed($refXml,$XmlSection,$section,$snmpContext) ){ &_log( 113, 'snmp', "u:$XmlSection") if $ENV{'OCS_OPT_LOGLEVEL'}; $sectionMeta->{hasChanged} = 1; } else { return 0; #We don't update this section } } else { $sectionMeta->{hasChanged} = 1; } if( $sectionMeta->{delOnReplace}) { if(!$dbh->do("DELETE FROM $section WHERE SNMP_ID=?", {}, $snmpDatabaseId)){ return(1); } } } # Processing values my $sth = $dbh->prepare( $sectionMeta->{sql_insert_string} ); # Multi lines (forceArray) if($sectionMeta->{multi}){ for my $line (@$refXml){ &_get_snmp_bind_values($line, $sectionMeta, \@bind_values); if(!$sth->execute($snmpDatabaseId, @bind_values)){ return(1); } @bind_values = (); } } # One line (hash) else{ &_get_snmp_bind_values($refXml, $sectionMeta, \@bind_values); if( !$sth->execute($snmpDatabaseId, @bind_values) ){ return(1); } } #Getting laststate for this section my $md5_hash = md5_base64(XML::Simple::XMLout($refXml)); push @{$snmpContext->{'LASTSTATE_UPDATE_VALUES'}} , "$XmlSection='$md5_hash'"; #We compute checksum for this section $snmpDeviceXml->{'COMMON'}->{'CHECKSUM'} |= $sectionMeta->{mask}; $dbh->commit; 0; } sub _snmp_common{ my $base= shift; my $snmpDatabaseId = shift; my $agentDatabaseId = shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; #Store the COMMON data from XML $dbh->do("UPDATE snmp SET IPADDR=".$dbh->quote($base->{IPADDR}).", LASTDATE=NOW(), CHECKSUM=(".$base->{CHECKSUM}."|CHECKSUM|1), MACADDR=".$dbh->quote($base->{MACADDR}).", SNMPDEVICEID=".$dbh->quote($base->{SNMPDEVICEID}).", NAME=".$dbh->quote($base->{NAME}).", DESCRIPTION=".$dbh->quote($base->{DESCRIPTION}).", CONTACT=".$dbh->quote($base->{CONTACT}).", LOCATION=".$dbh->quote($base->{LOCATION}).", UPTIME=".$dbh->quote($base->{UPTIME}).", DOMAIN=".$dbh->quote($base->{DOMAIN}).", TYPE=".$dbh->quote($base->{TYPE})." WHERE ID = $snmpDatabaseId") or return(1); $dbh->commit; #We get and store the TAG of the computer doing SNMP inventory my $request = $dbh->prepare('SELECT TAG FROM accountinfo WHERE HARDWARE_ID=?'); unless($request->execute($agentDatabaseId)){ &_log(519,'snmp','computer tag error') if $ENV{'OCS_OPT_LOGLEVEL'}; return(1); } my $row = $request->fetchrow_hashref; if (defined $row->{'TAG'}) { $dbh->do("UPDATE snmp_accountinfo SET TAG=".$dbh->quote($row->{'TAG'})." WHERE SNMP_ID=$snmpDatabaseId"); $dbh->commit; } 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Capacities/Update.pm000066400000000000000000000113651303466605000273310ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Capacities::Update; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw //; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'UPDATE', 'HANDLER_PROLOG_READ' => undef, 'HANDLER_PROLOG_RESP' => undef, 'HANDLER_PRE_INVENTORY' => undef, 'HANDLER_POST_INVENTORY' => undef, 'REQUEST_NAME' => 'UPDATE', 'HANDLER_REQUEST' => \&_update_handler, 'HANDLER_DUPLICATE' => undef, 'TYPE' => undef, 'XML_PARSER_OPT' => { 'ForceArray' => [] } }; # Default $Apache::Ocsinventory::{OPTIONS}{'OCS_OPT_UPDATE'} = 0; # To manage the update request sub _update_handler{ my $current_context = shift; my $dbh = $current_context->{'DBI_HANDLE'}; my $query = $current_context->{'XML_ENTRY'}; my %resp; my @agent; my @dmi; my @ipdiscover; my $Acurrent; my $Dcurrent; my $Icurrent; my $Iversion; my $agent; my $dmi; my $ip; my $platform; my $Dversion; my $Aversion; my $request; my $row; #Looking for option status unless($ENV{'OCS_OPT_UPDATE'}){ &_send_response({'RESPONSE',['NO_UPDATE']}); return APACHE_OK; } # OS type $platform = $query->{PLATFORM}; # Version of the agent $Aversion = $query->{AGENT}; # Eventually, the DMI version if(defined($query->{DMI})){$Dversion = $query->{DMI}}; if(defined($query->{IPDISCOVER})){$Iversion = $query->{IPDISCOVER}}; if(!defined($Aversion) || !($platform=~/^WINDOWS$|^MAC$|^LINUX$/)){ &_log(508,'update','') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_BAD_REQUEST; } # What are the available versions in the database $request = $dbh->prepare('SELECT * FROM files WHERE OS=?'); $request->execute($platform); # If no file available, tell to the client not to update unless($request->rows){ &_send_response({ 'RESPONSE' => ['NO_UPDATE'] }); $request->finish; return APACHE_OK; }else{ # Files are available, does the client have to download and install it ? # Get versions number while($row=$request->fetchrow_hashref()){ # Version of the agent in the database if($row->{'NAME'}=~/agent/i){ push @agent, $row->{'VERSION'}; } # Maybe a dmi reader version(on a linux computer) if(defined($Dversion)){ # Version of the dmi in the database if($row->{'NAME'}=~/dmi/i){ push @dmi, $row->{'VERSION'}; } } if(defined($Iversion)){ # Version of ipdiscover in the database if($row->{'NAME'}=~/ipdiscover/i){ push @ipdiscover, $row->{'VERSION'}; } } } # Determine the upper agent version available if(@agent){ # Looking for the latest version $Acurrent = 0; for(@agent){ if($_>$Acurrent){$Acurrent = $_;} } # Compare to the client version. If different, we tell you to update $agent = ($Aversion==$Acurrent)?0:1; }else{ $agent = 0; } # DMI $Dcurrent = 0; if(defined($Dversion) and @dmi){ for(@dmi){ if($_>$Dcurrent){$Dcurrent = $_;} } # Compare to the client version. If different, we tell you to update $dmi = ($Dversion==$Dcurrent)?0:1; } # IPDISCOVER if(defined($Iversion) and @ipdiscover){ for(@ipdiscover){ if($_>$Icurrent){$Icurrent = $_;} } # Compare to the client version. If different, we tell you to update $ip = ($Iversion==$Icurrent)?0:1; } } $request->finish; # Generate the response unless(($agent) or ($dmi) or $ip){ &_send_response({'RESPONSE',['NO_UPDATE']}); return APACHE_OK; } $resp{'RESPONSE'} = ['UPDATE']; if( $agent ){ $resp{'AGENT'} = [ $Acurrent ] } if( $dmi ){ $resp{'DMI'} = [ $Dcurrent ] } if( $ip ){ $resp{'IPDISCOVER'} = [ $Icurrent ] } # Send it &_send_response(\%resp); return APACHE_OK; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Communication.pm000066400000000000000000000163371303466605000266530ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Communication; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _send_response _prolog /; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::System(qw/ :server _modules_get_prolog_readers _modules_get_prolog_writers /); use Apache::Ocsinventory::Server::Communication::Session; # Subroutine which answer to client prolog sub _prolog{ my $frequency; my $quality; my $now; my $lastdate; my $request; my $row; my $DeviceID = $Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $info = $Apache::Ocsinventory::CURRENT_CONTEXT{'DETAILS'}; my $read = &_prolog_read(); if( $read == PROLOG_STOP ){ &_log(106,'prolog','stopped by module') if $ENV{'OCS_OPT_LOGLEVEL'}; &_prolog_resp(PROLOG_RESP_BREAK); return APACHE_OK; } elsif( $read == BAD_USERAGENT ) { #If we detect a wrong useragent &_log(106,'prolog','stopped by module') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_BAD_REQUEST; } $frequency = $ENV{'OCS_OPT_FREQUENCY'}; # If we do not have the default frequency unless(defined($frequency)){ &_prolog_resp(PROLOG_RESP_STOP); &_log(503,'prolog','no_frequency') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_OK; } # We have this computer in the database if($Apache::Ocsinventory::CURRENT_CONTEXT{'EXIST_FL'}){ # Get the current timestamp $now = time(); # Compute quality if($info->{'FIDELITY'} > 1){ $quality = ((($now-$info->{'LCOME'})/86400) + ($info->{'QUALITY'}*$info->{'FIDELITY'}))/(($info->{'FIDELITY'})+1); }else{ # We increment the number of visits $quality = (($now-$info->{'LCOME'})/86400); } # We update device data if(!$dbh->do('UPDATE hardware SET FIDELITY=FIDELITY+1,QUALITY=?,LASTCOME=NOW(),USERAGENT=? WHERE DEVICEID=?', {}, $quality, $Apache::Ocsinventory::CURRENT_CONTEXT{'USER_AGENT'}, $DeviceID)){ return APACHE_SERVER_ERROR; } ########## # If special value 0, we allways accept if($frequency==0){ &_prolog_resp(PROLOG_RESP_SEND); return APACHE_OK; # If -1, we allways reject }elsif($frequency==(-1)){ &_prolog_resp(PROLOG_RESP_BREAK); return APACHE_OK; } # Saving lastdate $lastdate = $info->{'LDATE'}; # Maybe there are computer's special frequency $request=$dbh->prepare('SELECT IVALUE FROM devices WHERE HARDWARE_ID IN ('.($Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}.(@{$Apache::Ocsinventory::CURRENT_CONTEXT{'MEMBER_OF'}}?',':''). join(',',@{$Apache::Ocsinventory::CURRENT_CONTEXT{'MEMBER_OF'}})).') AND NAME="FREQUENCY" ORDER BY IVALUE DESC'); $request->execute(); while($row=$request->fetchrow_hashref()){ $frequency=$row->{'IVALUE'}; } $request->finish; # If special values... if($frequency==0){ &_prolog_resp(PROLOG_RESP_SEND); return APACHE_OK; }elsif($frequency==(-1)){ &_prolog_resp(PROLOG_RESP_BREAK); return APACHE_OK; } unless ($lastdate){ &_prolog_resp(PROLOG_RESP_SEND); return APACHE_OK; } # Have we override the period ? if((($lastdate-$now)+$frequency*86400)<0){ &_prolog_resp(PROLOG_RESP_SEND); return APACHE_OK; }else{ &_prolog_resp(PROLOG_RESP_STOP); return APACHE_OK; } }else{#This is a new Device ID if($frequency==(-1)){ &_prolog_resp(PROLOG_RESP_BREAK); return APACHE_OK; }else{ &_log(103,'prolog','new_deviceid') if $ENV{'OCS_OPT_LOGLEVEL'}; &_prolog_resp(PROLOG_RESP_SEND); return APACHE_OK; } } } sub _send_response{ my $response = shift; my( $xml, $message, $d, $status, $inflated ); my $r = $Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}; # Generate the response # Generation of xml message $message = XML::Simple::XMLout( $response, RootName => 'REPLY', XMLDecl => "", NoSort => 1, SuppressEmpty => undef); # send unless($inflated = &{$Apache::Ocsinventory::CURRENT_CONTEXT{'DEFLATE_SUB'}}( $message )){ &_log(506,'send_response','compress_stage') if $ENV{'OCS_OPT_LOGLEVEL'}; #TODO: clean exit } &_set_http_header('content-length', length($inflated),$r); &_set_http_header('Cache-control', 'no-cache',$r); &_set_http_content_type('application/x-compressed',$r); &_send_http_headers($r); $r->print($inflated); return 0; } sub _prolog_resp{ my $decision = shift; my %resp; &_prolog_build_resp($decision, \%resp); if($resp{'RESPONSE'}[0] eq 'STOP'){ &_log(102,'prolog','declined') if $ENV{'OCS_OPT_LOGLEVEL'}; }elsif($resp{'RESPONSE'}[0] eq 'SEND'){ &_log(100,'prolog','accepted') if $ENV{'OCS_OPT_LOGLEVEL'}; &start_session( \%Apache::Ocsinventory::CURRENT_CONTEXT ); }elsif($resp{'RESPONSE'}[0] eq 'OTHER'){ &_log(105,'prolog','') if $ENV{'OCS_OPT_LOGLEVEL'}; } &_send_response(\%resp); return 0; } sub _prolog_build_resp{ my ($decision, $resp) = @_; my $module; my $state; #Agent execution periodicity if(defined($Apache::Ocsinventory::CURRENT_CONTEXT{'PARAMS'}{'PROLOG_FREQ'}->{'IVALUE'})){ $resp->{'PROLOG_FREQ'} = [$Apache::Ocsinventory::CURRENT_CONTEXT{'PARAMS'}{'PROLOG_FREQ'}->{'IVALUE'}]; } else{ my ($groupFreq, $groupsParams); if($ENV{'OCS_OPT_ENABLE_GROUPS'}){ $groupsParams = $Apache::Ocsinventory::CURRENT_CONTEXT{'PARAMS_G'}; for(keys(%$groupsParams)){ $groupFreq = $$groupsParams{$_}->{'PROLOG_FREQ'}->{'IVALUE'} if (exists($$groupsParams{$_}->{'PROLOG_FREQ'}->{'IVALUE'}) and $$groupsParams{$_}->{'PROLOG_FREQ'}->{'IVALUE'}<$groupFreq) or !$groupFreq; } } $resp->{'PROLOG_FREQ'} = [ $groupFreq || $ENV{'OCS_OPT_PROLOG_FREQ'} ]; } if($decision == PROLOG_RESP_BREAK){ $resp->{'RESPONSE'} = [ 'STOP' ]; return 0; }elsif($decision == PROLOG_RESP_STOP){ $resp->{'RESPONSE'} = [ 'STOP' ]; }elsif($decision == PROLOG_RESP_SEND){ $resp->{'RESPONSE'} = [ 'SEND' ]; } for(&_modules_get_prolog_writers()){ last if $_ == 0; &$_(\%Apache::Ocsinventory::CURRENT_CONTEXT, $resp); } return 0; } sub _prolog_read{ for(&_modules_get_prolog_readers()){ last if $_==0; my $resp=&$_(\%Apache::Ocsinventory::CURRENT_CONTEXT); if($resp==PROLOG_STOP){ return PROLOG_STOP; } if($resp==BAD_USERAGENT){ return BAD_USERAGENT; } } return PROLOG_CONTINUE; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Communication/000077500000000000000000000000001303466605000263035ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Communication/Session.pm000066400000000000000000000074361303466605000302760ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Communication::Session; use strict; use Apache::Ocsinventory::Server::System(qw/ :server /); require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / start_session check_session kill_session /; sub start_session{ my $current_context = shift; my $dbh = $current_context->{DBI_HANDLE}; my $deviceId = $current_context->{DEVICEID}; clean_sessions( $current_context ); # Trying to start session if( !$dbh->do( 'INSERT INTO prolog_conntrack(DEVICEID,PID,TIMESTAMP) VALUES(?,?,UNIX_TIMESTAMP())', {}, $deviceId, $$) ){ &_log(525,'session', 'failed') if $ENV{'OCS_OPT_LOGLEVEL'}; return 0; } &_log(311,'session', 'started') if $ENV{'OCS_OPT_LOGLEVEL'}; return 1; } sub clean_sessions{ my $current_context = shift; my $dbh = $current_context->{DBI_HANDLE}; # To avoid race conditions if( !$dbh->do("INSERT INTO engine_mutex(NAME, PID, TAG) VALUES('SESSION',?,'CLEAN')", {}, $$) ){ &_log(315,'session',"already handled") if $ENV{'OCS_OPT_LOGLEVEL'}; return; } # We have to make it every SESSION_CLEAN_TIME seconds my $check_clean = $dbh->prepare('SELECT UNIX_TIMESTAMP()-IVALUE AS IVALUE FROM engine_persistent WHERE NAME="SESSION_CLEAN_DATE"'); if($check_clean->execute() && $check_clean->rows()){ my $row = $check_clean->fetchrow_hashref(); if($row->{IVALUE}< $ENV{OCS_OPT_SESSION_CLEAN_TIME} ){ $dbh->do('DELETE FROM engine_mutex WHERE PID=? AND NAME="SESSION" AND TAG="CLEAN"', {}, $$ ); return; } } &_log(314,'session', "clean(check)") if $ENV{'OCS_OPT_LOGLEVEL'}; # Delete old sessions $dbh->do('INSERT INTO engine_persistent(NAME,IVALUE) VALUES("SESSION_CLEAN_DATE", UNIX_TIMESTAMP())') if($dbh->do('UPDATE engine_persistent SET IVALUE=UNIX_TIMESTAMP() WHERE NAME="SESSION_CLEAN_DATE"')==0E0); my $cleaned = $dbh->do('DELETE FROM prolog_conntrack WHERE UNIX_TIMESTAMP()-TIMESTAMP>?', {}, $ENV{OCS_OPT_SESSION_CLEAN_TIME} ); $dbh->do('DELETE FROM engine_mutex WHERE PID=? AND NAME="SESSION" AND TAG="CLEAN"', {}, $$ ); &_log(316,'session', "clean($cleaned)") if $cleaned && ($cleaned!=0E0) && $ENV{'OCS_OPT_LOGLEVEL'}; } sub check_session { my $current_context = shift; my $dbh = $current_context->{DBI_HANDLE}; my $deviceId = $current_context->{DEVICEID}; unless( $ENV{OCS_OPT_SESSION_VALIDITY_TIME} ){ &_log(317,'session', 'always_true') if $ENV{'OCS_OPT_LOGLEVEL'}; return 1; } my $check = $dbh->do('SELECT DEVICEID FROM prolog_conntrack WHERE DEVICEID=? AND (UNIX_TIMESTAMP()-TIMESTAMP{DBI_HANDLE}; my $deviceId = $current_context->{DEVICEID}; my $code = $dbh->do('DELETE FROM prolog_conntrack WHERE DEVICEID=?', {}, $deviceId); if(!$code){ &_log(527,'session', 'error') if $ENV{'OCS_OPT_LOGLEVEL'}; return 0; } elsif( $code != 0E0 ){ &_log(320,'session', 'end') if $ENV{'OCS_OPT_LOGLEVEL'}; return 1; } else{ return 0; } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Constants.pm000066400000000000000000000034011303466605000260060ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Constants; use strict; use Apache::Ocsinventory::Map; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw/ PROLOG_RESP_BREAK PROLOG_RESP_STOP PROLOG_RESP_SEND OPTION_TYPE_SYNC OPTION_TYPE_ASYNC LOGPATH CHECKSUM_MAX_VALUE DUP_HOSTNAME_FL DUP_SERIAL_FL DUP_MACADDR_FL DUP_SMODEL_FL DUP_UUID_FL DUP_ASSETTAG_FL PROLOG_STOP PROLOG_CONTINUE INVENTORY_STOP INVENTORY_CONTINUE BAD_USERAGENT /; use constant PROLOG_RESP_BREAK => 0; use constant PROLOG_RESP_STOP => 1; use constant PROLOG_RESP_SEND => 2; use constant OPTION_TYPE_SYNC => 0; use constant OPTION_TYPE_ASYNC => 1; my $checksum_max_value = &get_checksum(); use constant CHECKSUM_MAX_VALUE => $checksum_max_value; # To enable user to set how auto-duplicates works use constant DUP_HOSTNAME_FL => 1 ; use constant DUP_SERIAL_FL => 2 ; use constant DUP_MACADDR_FL => 4 ; use constant DUP_SMODEL_FL => 8 ; use constant DUP_UUID_FL => 16 ; use constant DUP_ASSETTAG_FL => 32 ; use constant PROLOG_STOP => 1; use constant BAD_USERAGENT => 2; use constant PROLOG_CONTINUE => 0; use constant INVENTORY_STOP => 1; use constant INVENTORY_CONTINUE => 0; sub get_checksum { my $checksum; for my $section (keys %DATA_MAP){ $checksum|=$DATA_MAP{$section}->{mask}; } return $checksum; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Duplicate.pm000066400000000000000000000237701303466605000257570ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Duplicate; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _duplicate_main /; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::System qw /:server _modules_get_duplicate_handlers/; use Apache::Ocsinventory::Map; # Subroutine called at the end of database inventory insertions sub _duplicate_main{ my %exist; my $red; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $DeviceID = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; # If the duplicate is specified if($result->{CONTENT}->{OLD_DEVICEID} and $result->{CONTENT}->{OLD_DEVICEID} ne $Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'}){ &_log(326,'duplicate',$result->{CONTENT}->{OLD_DEVICEID}) if $ENV{'OCS_OPT_LOGLEVEL'}; # Looking for database id of old deviceid my $request = $dbh->prepare('SELECT ID FROM hardware WHERE DEVICEID=?'); $request->execute($result->{CONTENT}->{OLD_DEVICEID}); if(my $row = $request->fetchrow_hashref){ if(&_duplicate_replace($row->{'ID'})){ # If there is an invalid old deviceid &_log(513,'duplicate','old deviceid') if $ENV{'OCS_OPT_LOGLEVEL'}; $dbh->rollback; }else{ $dbh->commit; $red = 1; } } } # Handle duplicates if $ENV{'OCS_OPT_AUTO_DUPLICATE_LVL'} is set if($ENV{'OCS_OPT_AUTO_DUPLICATE_LVL'}){ # Trying to find some duplicate evidences &_duplicate_detect(\%exist); # For each result, we are trying to know if it is a true duplicate (according to AUTO_DUPLICATE_LVL for(sort keys(%exist)){ if(&_duplicate_evaluate(\%exist, $_)){ if(&_duplicate_replace($_)){ &_log(517,'duplicate','replacing_error') if $ENV{'OCS_OPT_LOGLEVEL'}; $dbh->rollback; }else{ $dbh->commit; $red = 1; } } } } return $red; } sub _already_in_array { my $lookfor = shift; my $ref = shift; foreach (@$ref){ return 1 if($lookfor eq $_); } return 0; } sub _duplicate_evaluate{ my $exist = shift; my $key = shift; # Check duplicate , according to AUTO_DUPLICATE_LVL $exist->{$key}->{'MASK'} = 0; $exist->{$key}->{'MASK'}|=DUP_HOSTNAME_FL if $exist->{$key}->{'HOSTNAME'}; $exist->{$key}->{'MASK'}|=DUP_SERIAL_FL if $exist->{$key}->{'SSN'}; $exist->{$key}->{'MASK'}|=DUP_MACADDR_FL if $exist->{$key}->{'MACADDRESS'}; $exist->{$key}->{'MASK'}|=DUP_SMODEL_FL if $exist->{$key}->{'SMODEL'}; $exist->{$key}->{'MASK'}|=DUP_UUID_FL if $exist->{$key}->{'UUID'}; $exist->{$key}->{'MASK'}|=DUP_ASSETTAG_FL if $exist->{$key}->{'ASSETTAG'}; if((($ENV{'OCS_OPT_AUTO_DUPLICATE_LVL'} & $exist->{$key}->{'MASK'})) == $ENV{'OCS_OPT_AUTO_DUPLICATE_LVL'}){ return(1); }else{ return(0); } } sub _duplicate_detect{ my $exist = shift; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $DeviceID = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; my $request; my $row; my(@bad_serial, @bad_mac); # Retrieve generic mac addresses $request = $dbh->prepare('SELECT MACADDRESS FROM blacklist_macaddresses'); $request->execute(); push @bad_mac, $row->{MACADDRESS} while($row = $request->fetchrow_hashref()); # Retrieve generic serials $request = $dbh->prepare('SELECT SERIAL FROM blacklist_serials'); $request->execute(); push @bad_serial, $row->{SERIAL} while($row = $request->fetchrow_hashref()); # Do we already have the hostname $request = $dbh->prepare('SELECT ID, NAME FROM hardware WHERE NAME=? AND ID<>? ORDER BY ID'); $request->execute($result->{CONTENT}->{HARDWARE}->{NAME}, $DeviceID); while($row = $request->fetchrow_hashref()){ if(!($row->{'NAME'} eq '')){ $exist->{$row->{'ID'}}->{'HOSTNAME'}=1; } } # Do we already have the assettag ? $request = $dbh->prepare('SELECT HARDWARE_ID, ASSETTAG FROM bios WHERE ASSETTAG=? AND HARDWARE_ID<>? ORDER BY HARDWARE_ID'); $request->execute($result->{CONTENT}->{BIOS}->{ASSETTAG}, $DeviceID); while($row = $request->fetchrow_hashref()){ if(!($row->{'ASSETTAG'} eq '')){ $exist->{$row->{'ID'}}->{'ASSETTAG'}=1; } } # Do we already have the uuid ? $request = $dbh->prepare('SELECT ID, UUID FROM hardware WHERE UUID=? AND ID<>? ORDER BY ID'); $request->execute($result->{CONTENT}->{HARDWARE}->{UUID}, $DeviceID); while($row = $request->fetchrow_hashref()){ if(!($row->{'UUID'} eq '')){ $exist->{$row->{'ID'}}->{'UUID'}=1; } } # ...and one MAC of this machine for(@{$result->{CONTENT}->{NETWORKS}}){ $request = $dbh->prepare('SELECT HARDWARE_ID,DESCRIPTION,MACADDR FROM networks WHERE MACADDR=? AND HARDWARE_ID<>?'); $request->execute($_->{MACADDR}, $DeviceID); while($row = $request->fetchrow_hashref()){ if(!&_already_in_array($row->{'MACADDR'}, \@bad_mac)){ $exist->{$row->{'HARDWARE_ID'}}->{'MACADDRESS'}++; } } } # ...or its serial if($result->{CONTENT}->{BIOS}->{SSN}){ $request = $dbh->prepare('SELECT HARDWARE_ID, SSN FROM bios WHERE SSN=? AND HARDWARE_ID<>?'); $request->execute($result->{CONTENT}->{BIOS}->{SSN}, $DeviceID); while($row = $request->fetchrow_hashref()){ if(!&_already_in_array($row->{'SSN'}, \@bad_serial)){ $exist->{$row->{'HARDWARE_ID'}}->{'SSN'}=1; } } } # ...or its serial model if($result->{CONTENT}->{BIOS}->{SMODEL}){ $request = $dbh->prepare('SELECT HARDWARE_ID, SMODEL FROM bios WHERE SMODEL=? AND HARDWARE_ID<>?'); $request->execute($result->{CONTENT}->{BIOS}->{SMODEL}, $DeviceID); while($row = $request->fetchrow_hashref()){ $exist->{$row->{'HARDWARE_ID'}}->{'SMODEL'}=1; } } $request->finish; } sub _duplicate_replace{ my $device = shift; #Locks the device if( &_lock($device) ){ &_log( 516, 'duplicate', 'device locked'); return 1; } my $DeviceID = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; # We keep the old quality and fidelity my $request=$dbh->prepare('SELECT QUALITY,FIDELITY,CHECKSUM,USERID FROM hardware WHERE ID=?'); $request->execute($device); # If it does not exist unless($request->rows){ &_unlock($device); return(1); } my $row = $request->fetchrow_hashref; my $quality = $row->{'QUALITY'}?$row->{'QUALITY'}:0; my $fidelity = $row->{'FIDELITY'}; my $checksum = $row->{'CHECKSUM'}; my $userid = $row->{'USERID'}; $request->finish; # Current userid or previous one ? if( $result->{CONTENT}->{HARDWARE}->{USERID}!~/system|localsystem/i ){ $userid = $result->{CONTENT}->{HARDWARE}->{USERID}; } # TODO: catch the queries return code # Keeping few informations from hardware $dbh->do(" UPDATE hardware SET QUALITY=".$dbh->quote($quality).", FIDELITY=".$dbh->quote($fidelity).", CHECKSUM=(".(defined($checksum)?$checksum:CHECKSUM_MAX_VALUE)."|".(defined($result->{CONTENT}->{HARDWARE}->{CHECKSUM})?$result->{CONTENT}->{HARDWARE}->{CHECKSUM}:CHECKSUM_MAX_VALUE)."), USERID=".$dbh->quote($userid)." WHERE ID=".$DeviceID ) ; $dbh->do("DELETE FROM hardware WHERE ID=?", {}, $device) ; # We keep the informations of the following tables: devices, accountinfo, itmgmt_comments $dbh->do('DELETE FROM accountinfo WHERE HARDWARE_ID=?', {}, $DeviceID) ; $dbh->do('UPDATE accountinfo SET HARDWARE_ID=? WHERE HARDWARE_ID=?', {}, $DeviceID, $device) ; $dbh->do('DELETE FROM devices WHERE HARDWARE_ID=?', {}, $DeviceID) ; $dbh->do('UPDATE devices SET HARDWARE_ID=? WHERE HARDWARE_ID=?', {}, $DeviceID, $device) ; $dbh->do('UPDATE itmgmt_comments SET HARDWARE_ID=? WHERE HARDWARE_ID=?', {}, $DeviceID, $device) ; # We keep the static inclusions/exclusions (STATIC=1|2) $dbh->do('UPDATE groups_cache SET HARDWARE_ID=? WHERE HARDWARE_ID=? AND (STATIC=1 OR STATIC=2)', {}, $DeviceID, $device) ; # The computer may not correspond to the previous dynamic groups, as its inventory could potentially change $dbh->do('DELETE FROM groups_cache WHERE HARDWARE_ID=?', {}, $device) ; # Drop old computer from "auto" tables in Map # TODO: is it possible to manage the not auto section => not auto for import but auto for deletion ? for (keys(%DATA_MAP)){ next if !$DATA_MAP{$_}->{delOnReplace} || !$DATA_MAP{$_}->{auto} || $DATA_MAP{$_}->{capacities}; unless($dbh->do("DELETE FROM $_ WHERE HARDWARE_ID=?", {}, $device)){ &_unlock($device); return(1); } } # Trace duplicate if needed if($ENV{'OCS_OPT_TRACE_DELETED'}){ unless( $dbh->do('INSERT INTO deleted_equiv(DATE,DELETED,EQUIVALENT) VALUES(NULL,?,?)', {} , $device,$DeviceID)){ &_unlock($device); return(1); } } # To enable option managing duplicates for(&_modules_get_duplicate_handlers()){ last if $_==0; # Returning 1 will abort replacement unless(&$_(\%Apache::Ocsinventory::CURRENT_CONTEXT, $device)){ &_unlock($device); return(1); } } &_log(300,'duplicate',"$device => $DeviceID") if $ENV{'OCS_OPT_LOGLEVEL'}; #Remove lock &_unlock($device); 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Groups.pm000066400000000000000000000157741303466605000253310ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2006 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Groups; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } use Apache::Ocsinventory::Server::System(qw/ :server /); require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _get_groups / ; sub _get_groups{ my($request, @groups); # We ensure that cache is not out-of-date &_validate_groups_cache(); # Sending the groups the computer is part of $request = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}->prepare('SELECT GROUP_ID FROM groups_cache WHERE HARDWARE_ID=? AND (STATIC=0 OR STATIC=1)'); $request->execute( $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'} ); while( my $row = $request->fetchrow_hashref){ push @groups, $row->{'GROUP_ID'}; } return @groups; } sub _validate_groups_cache{ my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; return unless $ENV{'OCS_OPT_GROUPS_CACHE_REVALIDATE'}; # Test cache validity my $request = $dbh->prepare(' SELECT g.HARDWARE_ID FROM groups g LEFT OUTER JOIN locks l ON l.HARDWARE_ID=g.HARDWARE_ID WHERE UNIX_TIMESTAMP()-REVALIDATE_FROM > ? AND l.HARDWARE_ID IS NULL' ); # Updating cache when needed return unless $request->execute( $ENV{'OCS_OPT_GROUPS_CACHE_REVALIDATE'} ); while(my $row = $request->fetchrow_hashref()){ # We lock it like a computer if( !&_lock($row->{'HARDWARE_ID'}) ){ # Check if the group has already been computed my $check_request = $dbh->prepare('SELECT HARDWARE_ID, (UNIX_TIMESTAMP()-REVALIDATE_FROM) AS OFF FROM groups WHERE UNIX_TIMESTAMP()-REVALIDATE_FROM > ? AND HARDWARE_ID=?'); $check_request->execute($ENV{'OCS_OPT_GROUPS_CACHE_REVALIDATE'}, $row->{'HARDWARE_ID'}); if(!$check_request->rows()){ &_unlock($row->{'HARDWARE_ID'}); $check_request->finish(); next; } &_log(306,'groups','cache_out-of-date('.$row->{'HARDWARE_ID'}.')') if $ENV{'OCS_OPT_LOGLEVEL'}; # We build the new cache &_build_group_cache( $row->{'HARDWARE_ID'} ); # Unlock group &_unlock($row->{'HARDWARE_ID'}); } else{ &_log(306,'groups','cache_in_process('.$row->{'HARDWARE_ID'}.')') if $ENV{'OCS_OPT_LOGLEVEL'}; } } } sub _build_group_cache{ my $group_id = shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $dbh_sl = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_SL_HANDLE'}; my $offset = int rand($ENV{OCS_OPT_GROUPS_CACHE_OFFSET}); my (@ids,@quoted_ids); my ($id_field, $error); # Build cache request my $build_cache = $dbh->prepare('INSERT INTO groups_cache(GROUP_ID, HARDWARE_ID, STATIC) VALUES(?,?,0)'); my $delete_cache = 'DELETE FROM groups_cache WHERE GROUP_ID=? AND STATIC=0'; # Retrieving the group request. It must be a SELECT statement on ID(hardware) my $get_request = $dbh->prepare('SELECT REQUEST,XMLDEF FROM groups WHERE HARDWARE_ID=?'); $get_request->execute( $group_id ); my $row = $get_request->fetchrow_hashref(); # legacy: one request per group if($row->{'REQUEST'} ne '' and $row->{'REQUEST'} ne 'NULL' ){ my $group_request = $dbh_sl->prepare( $row->{'REQUEST'} ); if($group_request->execute()){ # Deleting the current cache $dbh->do($delete_cache, {}, $group_id); while( my @cache = $group_request->fetchrow_array() ){ push @ids, $cache[0] ; } #We verify that HARDWARE_IDs are not groups &verify_ids($row->{'REQUEST'},\@ids); # Build the cache for( @ids ){ $build_cache->execute($group_id, $_); } } else{ &_log(520,'groups','bad_request('.$row->{'HARDWARE_ID'}.')') if $ENV{'OCS_OPT_LOGLEVEL'}; } } # New behaviour : multiple requests for one group xml encoded elsif( $row->{'XMLDEF'} ne '' and $row->{'XMLDEF'} ne 'NULL' ){ my $xml = XML::Simple::XMLin($row->{'XMLDEF'}, ForceArray => ['REQUEST'] ); for my $request (@{$xml->{REQUEST}}){ if(@ids){ for(@ids){ push @quoted_ids, $dbh_sl->quote($_); } # When request is from hardware, the id is called "ID", if not "HARDWARE_ID" if( $request =~ /^select\s+(distinct\s+)?ID/i ){ $id_field = 'ID'; } else{ $id_field = 'HARDWARE_ID'; } my $string = join ",", @quoted_ids; $request = $request." AND $id_field IN ($string)"; @ids=@quoted_ids=(); } my $group_request = $dbh_sl->prepare( $request ); unless($group_request->execute){ &_log(520,'groups','bad_request('.$row->{'HARDWARE_ID'}.')') if $ENV{'OCS_OPT_LOGLEVEL'}; last; } # If no results for one request, we stop the computing (always AND statements) if(!$group_request->rows){ &_log(307,'groups','empty') if $ENV{'OCS_OPT_LOGLEVEL'}; @ids=@quoted_ids=(); $error = 1; } while( my @cache = $group_request->fetchrow_array() ){ push @ids, $cache[0]; } #We verify that HARDWARE_IDs are not groups $error = &verify_ids($request,\@ids); } # Deleting the current cache $dbh->do($delete_cache, {}, $group_id); unless($error){ # Build the cache for( @ids ){ $build_cache->execute($group_id, $_); } } else{ &_log(520,'groups','will not build('.$row->{'HARDWARE_ID'}.')') if $ENV{'OCS_OPT_LOGLEVEL'}; } } # Updating cache time $dbh->do("UPDATE groups SET CREATE_TIME=UNIX_TIMESTAMP(), REVALIDATE_FROM=UNIX_TIMESTAMP()+? WHERE HARDWARE_ID=?", {}, $offset, $group_id); &_log(307,'groups', "revalidate_cache($group_id(".scalar @ids."))") if $ENV{'OCS_OPT_LOGLEVEL'}; } 1; sub verify_ids { my ($request,$ids) = @_; my $error; my $dbh_sl = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_SL_HANDLE'}; unless ($request =~ m/and\s+deviceid(\s+)?<>(\s+)?'_SYSTEMGROUP_'\s+and\s+deviceid(\s+)?<>(\s+)?'_DOWNLOADGROUP_'/i) { #We will have to verify that HARDWARE_IDs are not groups my $ids_list= join(',',@$ids); @$ids=(); my $verify_request = $dbh_sl->prepare("SELECT distinct ID from hardware where ID in ($ids_list) and deviceid <> '_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_'"); $verify_request->execute(); if(!$verify_request->rows){ &_log(307,'groups','empty') if $ENV{'OCS_OPT_LOGLEVEL'}; @$ids=(); $error = 1; } while( my @cache = $verify_request->fetchrow_array() ){ push @$ids, $cache[0]; } } return $error; } ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory.pm000066400000000000000000000145741303466605000260440ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw /_inventory_handler/; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::System qw / :server /; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Communication::Session; use Apache::Ocsinventory::Server::Duplicate; use Apache::Ocsinventory::Server::Inventory::Data; use Apache::Ocsinventory::Server::Inventory::Capacities; use Apache::Ocsinventory::Server::Inventory::Export; use Apache::Ocsinventory::Server::Inventory::Update; use Apache::Ocsinventory::Server::Inventory::Filter; use Apache::Ocsinventory::Server::Inventory::Update::AccountInfos; our %XML_PARSER_OPT = ( 'ForceArray' => [] ); # Remanent data my ( %SECTIONS, @SECTIONS ); &_init_map( \%SECTIONS, \@SECTIONS ); &_get_parser_ForceArray( $XML_PARSER_OPT{ForceArray} ); sub _context{ my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; if(!$Apache::Ocsinventory::CURRENT_CONTEXT{'EXIST_FL'}){ $dbh->do('INSERT INTO hardware(DEVICEID) VALUES(?)', {}, $Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'}) or return(1); my $request = $dbh->prepare('SELECT ID FROM hardware WHERE DEVICEID=?'); unless($request->execute($Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'})){ &_log(518,'inventory','id_error') if $ENV{'OCS_OPT_LOGLEVEL'}; return(1); } my $row = $request->fetchrow_hashref; $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'} = $row->{'ID'}; } return(0); } sub _inventory_handler{ # Call to preinventory handlers if( &_pre_options() == INVENTORY_STOP ){ &_log(107,'inventory','stopped_by_module') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_FORBIDDEN; } return APACHE_SERVER_ERROR if &_context(); my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; # Lock device if(&_lock($Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'})){ &_log( 516, 'inventory', 'device_locked'); return(APACHE_FORBIDDEN); } # Check prolog if( !check_session( \%Apache::Ocsinventory::CURRENT_CONTEXT ) ){ &_log( 114, 'inventory', 'no_session'); if( !$Apache::Ocsinventory::CURRENT_CONTEXT{'IS_TRUSTED'} && $ENV{OCS_OPT_INVENTORY_SESSION_ONLY} ){ &_log( 115, 'inventory', 'refused'); return(APACHE_FORBIDDEN); } } #Inventory incoming &_log(104,'inventory','incoming') if $ENV{'OCS_OPT_LOGLEVEL'}; # Put the inventory in the database return APACHE_SERVER_ERROR if &_update_inventory( \%SECTIONS, \@SECTIONS ); #Committing inventory $dbh->commit; #Call to post inventory handlers &_post_options(); ############# # Manage several questions, including duplicates &_post_inventory(); # That's all &_log(101,'inventory','transmitted') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_OK; } sub _post_inventory{ my $request; my $row; my $red; my $accountkey; my %elements; my @accountFields = _get_account_fields(); my $deviceId = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; &_generate_ocs_file(); &kill_session( \%Apache::Ocsinventory::CURRENT_CONTEXT ); $red = &_duplicate_main(); # We verify accountinfo diff if the machine was already in the database if($Apache::Ocsinventory::CURRENT_CONTEXT{'EXIST_FL'} or $red){ # We put back the account infos to the agent if necessary $request = $dbh->prepare('SELECT * FROM accountinfo WHERE HARDWARE_ID=?'); $request->execute($deviceId); if($row = $request->fetchrow_hashref()){ my $up = 0; # Compare the account infos with the user's ones for $accountkey (@accountFields){ for(@{$result->{CONTENT}->{ACCOUNTINFO}}){ if($_->{KEYNAME} eq $accountkey){ utf8::encode($_->{KEYVALUE}); #We encode string to be able to make comparison if string is UTF8 $up=1,last if($_->{KEYVALUE} ne $row->{$accountkey}); } } } # If there is something new in the table if( !exists($result->{CONTENT}->{ACCOUNTINFO}) || @accountFields != @{$result->{CONTENT}->{ACCOUNTINFO}} ) { $up = 1 } if($up){ # we write the xml data $elements{'RESPONSE'} = [ 'ACCOUNT_UPDATE' ]; for(@accountFields){ push @{$elements{'ACCOUNTINFO'}}, { 'KEYNAME' => [ $_ ], 'KEYVALUE' => [ $row->{$_} ] }; } $request->finish; # send the update to the client &_send_response(\%elements); return; }else{ $request->finish; &_send_response({'RESPONSE' => [ 'NO_ACCOUNT_UPDATE' ]}); return; } }else{ # There is a problem. The device MUST be present in the table &_log(509,'postinventory','no_account_infos') if $ENV{'OCS_OPT_LOGLEVEL'}; $request->finish; $elements{'RESPONSE'} = [ 'ACCOUNT_UPDATE' ]; for(@{$result->{CONTENT}->{ACCOUNTINFO}}){ if($_->{KEYNAME} eq 'TAG'){ push @{$elements{'ACCOUNTINFO'}}, { 'KEYNAME' => [$_->{KEYNAME}], 'KEYVALUE' => [ 'LOST' ] }; }else{ push @{$elements{'ACCOUNTINFO'}}, { 'KEYNAME' => [ $_->{KEYNAME} ], 'KEYVALUE' => [ $_->{KEYVALUE} ] }; } } # call accountinfo to insert agent values in addition to the LOST value in TAG &_accountinfo("lost"); # send the update to the client with TAG=LOST &_send_response(\%elements); return; } }else{ &_send_response({'RESPONSE' => [ 'NO_ACCOUNT_UPDATE' ]}); return; } 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/000077500000000000000000000000001303466605000254735ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Cache.pm000066400000000000000000000106121303466605000270340ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Cache; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _reset_inventory_cache _cache /; use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::System qw / :server /; sub _cache{ my ($op, $section, $sectionMeta, $values ) = @_; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my @fields_array = keys %{ $sectionMeta->{field_cached} }; for my $field ( @fields_array ){ my $table = $section.'_'.lc $field.'_cache'; my $err = $dbh->do("SELECT $field FROM $table WHERE $field=?", {}, $values->[ $sectionMeta->{field_cached}->{$field} ]); if( $err && $err == 0E0 && $op eq 'add'){ $dbh->do("INSERT INTO $table($field) VALUES(?)", {}, $values->[ $sectionMeta->{field_cached}->{$field} ]); } elsif( $err != 0E0 && $op eq 'del'){ my $err2 = $dbh->do("SELECT $field FROM $section WHERE $field=? LIMIT 0,1", {}, $values->[ $sectionMeta->{field_cached}->{$field} ]); if( $err2 && $err2 == 0E0 ){ $dbh->do("DELETE FROM $table WHERE $field=?", {}, $values->[ $sectionMeta->{field_cached}->{$field} ]); } } } } sub _reset_inventory_cache{ my ( $sectionsMeta, $sectionsList ) = @_; return if !$ENV{OCS_OPT_INVENTORY_CACHE_REVALIDATE}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; if( &_check_cache_validity() ){ &_log(110,'inventory_cache','checking') if $ENV{'OCS_OPT_LOGLEVEL'}; if( &_lock_cache() ){ for my $section ( @$sectionsList ){ my @fields_array = keys %{ $sectionsMeta->{$section}->{field_cached} }; for my $field (@fields_array){ my $table = $section.'_'.lc $field.'_cache'; &_log(108,'inventory_cache',"cache($section.$field)") if $ENV{'OCS_OPT_LOGLEVEL'}; my $src_table = lc $section; $dbh->do("LOCK TABLES $table WRITE, $src_table READ"); if( $dbh->do("DELETE FROM $table") ){ my $err = $dbh->do("INSERT INTO $table($field) SELECT DISTINCT $field FROM $src_table"); $dbh->do('UNLOCK TABLES'); if( $err ){ &_log(109,'inventory_cache',"ok:$section.$field") if $ENV{'OCS_OPT_LOGLEVEL'}; } else{ &_log(522,'inventory_cache',"fault:$section.$field") if $ENV{'OCS_OPT_LOGLEVEL'}; &_lock_cache_release(); return; } } else{ $dbh->do('UNLOCK TABLES'); &_log(523,'inventory_cache',"fault:$section.$field") if $ENV{'OCS_OPT_LOGLEVEL'}; &_lock_cache_release(); return; } } } } else{ &_log(111,'inventory_cache','already_handled') if $ENV{'OCS_OPT_LOGLEVEL'}; return; } $dbh->do('INSERT INTO engine_persistent(NAME,IVALUE) VALUES("INVENTORY_CACHE_CLEAN_DATE", UNIX_TIMESTAMP(NOW()))') if($dbh->do('UPDATE engine_persistent SET IVALUE=UNIX_TIMESTAMP(NOW()) WHERE NAME="INVENTORY_CACHE_CLEAN_DATE"')==0E0); &_lock_cache_release(); &_log(109,'inventory_cache','done') if $ENV{'OCS_OPT_LOGLEVEL'}; } else{ return; } } sub _check_cache_validity{ my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $check_cache = $dbh->prepare('SELECT UNIX_TIMESTAMP(NOW())-IVALUE AS IVALUE FROM engine_persistent WHERE NAME="INVENTORY_CACHE_CLEAN_DATE"'); $check_cache->execute(); if($check_cache->rows()){ my $row = $check_cache->fetchrow_hashref(); if($row->{IVALUE}< $ENV{OCS_OPT_INVENTORY_CACHE_REVALIDATE}*86400 ){ return 0; } else{ return 1; } } else{ return 1; } } sub _lock_cache{ return $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}->do("INSERT INTO engine_mutex(NAME, PID, TAG) VALUES('INVENTORY_CACHE_REVALIDATE',?,'ALL')", {}, $$) } sub _lock_cache_release{ return $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}->do("DELETE FROM engine_mutex WHERE NAME='INVENTORY_CACHE_REVALIDATE' AND PID=?", {}, $$); } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Capacities.pm000066400000000000000000000022061303466605000300760ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Capacities; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _pre_options _post_options /; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::System qw / :server _modules_get_pre_inventory_options _modules_get_post_inventory_options /; sub _pre_options{ for(&_modules_get_pre_inventory_options()){ last if $_== 0; if (&$_(\%Apache::Ocsinventory::CURRENT_CONTEXT) == INVENTORY_STOP){ return INVENTORY_STOP; } } } sub _post_options{ for(&_modules_get_post_inventory_options()){ last if $_== 0; &$_(\%Apache::Ocsinventory::CURRENT_CONTEXT); } } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Data.pm000066400000000000000000000212761303466605000267120ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Data; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _init_map _get_bind_values _has_changed _get_parser_ForceArray /; use Apache::Ocsinventory::Map; use Apache::Ocsinventory::Server::System qw / :server /; sub _init_map{ my ($sectionsMeta, $sectionsList) = @_; my $section; my @bind_num; my $field; my $fields_string; my $field_index; # Parse every section for $section (keys(%DATA_MAP)){ $field_index = 0; # Field array (from data_map field hash keys), filtered fields and cached fields $sectionsMeta->{$section}->{field_arrayref} = []; $sectionsMeta->{$section}->{field_filtered} = []; $sectionsMeta->{$section}->{field_cached} = {}; ############################################## #Don't process the sections that are use for capacities special inventory next if $DATA_MAP{$section}->{capacities}; # Don't process the non-auto-generated sections next if !$DATA_MAP{$section}->{auto}; $sectionsMeta->{$section}->{multi} = 1 if $DATA_MAP{$section}->{multi}; $sectionsMeta->{$section}->{mask} = $DATA_MAP{$section}->{mask}; $sectionsMeta->{$section}->{delOnReplace} = 1 if $DATA_MAP{$section}->{delOnReplace}; $sectionsMeta->{$section}->{writeDiff} = 1 if $DATA_MAP{$section}->{writeDiff}; $sectionsMeta->{$section}->{cache} = 1 if $DATA_MAP{$section}->{cache}; $sectionsMeta->{$section}->{mandatory} = 1 if $DATA_MAP{$section}->{mandatory}; $sectionsMeta->{$section}->{auto} = 1 if $DATA_MAP{$section}->{auto}; $sectionsMeta->{$section}->{name} = $section; # $sectionsMeta->{$section}->{hasChanged} is set while inventory update # Parse fields of the current section for $field ( keys(%{$DATA_MAP{$section}->{fields}} ) ){ if(!$DATA_MAP{$section}->{fields}->{$field}->{noSql}){ push @{$sectionsMeta->{$section}->{field_arrayref}}, $field; $sectionsMeta->{$section}->{noSql} = 1 unless $sectionsMeta->{$section}->{noSql}; } if($DATA_MAP{$section}->{fields}->{$field}->{filter}){ next unless $ENV{OCS_OPT_INVENTORY_FILTER_ENABLED}; push @{$sectionsMeta->{$section}->{field_filtered}}, $field; $sectionsMeta->{$section}->{filter} = 1 unless $sectionsMeta->{$section}->{filter}; } if($DATA_MAP{$section}->{fields}->{$field}->{cache}){ next unless $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED}; $sectionsMeta->{$section}->{field_cached}->{$field} = $field_index; $sectionsMeta->{$section}->{cache} = 1 unless $sectionsMeta->{$section}->{cache}; } if(defined $DATA_MAP{$section}->{fields}->{$field}->{fallback}){ $sectionsMeta->{$section}->{fields}->{$field}->{fallback} = $DATA_MAP{$section}->{fields}->{$field}->{fallback}; } if(defined $DATA_MAP{$section}->{fields}->{$field}->{type}){ $sectionsMeta->{$section}->{fields}->{$field}->{type} = $DATA_MAP{$section}->{fields}->{$field}->{type}; } $field_index++; } # Build the "DBI->prepare" sql insert string $fields_string = join ',', ('HARDWARE_ID', @{$sectionsMeta->{$section}->{field_arrayref}}); $sectionsMeta->{$section}->{sql_insert_string} = "INSERT INTO $section($fields_string) VALUES("; for(0..@{$sectionsMeta->{$section}->{field_arrayref}}){ push @bind_num, '?'; } $sectionsMeta->{$section}->{sql_insert_string}.= (join ',', @bind_num).')'; @bind_num = (); # Build the "DBI->prepare" sql select string $sectionsMeta->{$section}->{sql_select_string} = "SELECT ID,$fields_string FROM $section WHERE HARDWARE_ID=? ORDER BY ".$DATA_MAP{$section}->{sortBy}; # Build the "DBI->prepare" sql deletion string $sectionsMeta->{$section}->{sql_delete_string} = "DELETE FROM $section WHERE HARDWARE_ID=? AND ID=?"; # to avoid many "keys" push @$sectionsList, $section; } #Special treatment for hardware section $sectionsMeta->{'hardware'} = &_get_hardware_fields; push @$sectionsList, 'hardware'; } sub _get_bind_values{ my ($refXml, $sectionMeta, $arrayToFeed) = @_; my ($bind_value, $xmlvalue, $xmlfield); for my $field ( @{ $sectionMeta->{field_arrayref} } ) { if(defined($refXml->{$field}) && !defined($sectionMeta->{fields}->{$field}->{type}) && $refXml->{$field} ne '' && $refXml->{$field} ne '??' && $refXml->{$field}!~/^N\/?A$/) { $bind_value = $refXml->{$field} } else{ if( defined $sectionMeta->{fields}->{$field}->{fallback} ){ $bind_value = $sectionMeta->{fields}->{$field}->{fallback}; &_log( 000, 'fallback', "$field:".$sectionMeta->{fields}->{$field}->{fallback}) if $ENV{'OCS_OPT_LOGLEVEL'}>1; } else{ &_log( 000, 'generic-fallback', "$field:".$sectionMeta->{fields}->{$field}->{fallback}) if $ENV{'OCS_OPT_LOGLEVEL'}>1; $bind_value = ''; } } # We have to substitute the value with the ID matching "type_section_field.name" if the field is tagged "type". # It allows to support different DB structures if(defined $sectionMeta->{fields}->{$field}->{type}) { $xmlfield = $field; $xmlfield =~ s/_ID//g; #We delete the _ID pattern to be in concordance with XML if(defined $sectionMeta->{fields}->{$field}->{fallback}) { $bind_value = _get_type_id($sectionMeta->{name}, $xmlfield, $sectionMeta->{fields}->{$field}->{fallback} ); &_log( 000, 'fallback', "$field:".$sectionMeta->{fields}->{$field}->{fallback}) if $ENV{'OCS_OPT_LOGLEVEL'}>1; } else { #No fallback for this field $xmlvalue = $refXml->{$xmlfield}; $bind_value = _get_type_id($sectionMeta->{name}, $xmlfield, $xmlvalue); } } push @$arrayToFeed, $bind_value; } } sub _get_parser_ForceArray{ my $arrayRef = shift; for my $section (keys(%DATA_MAP)){ unless ($DATA_MAP{$section}->{capacities}) { # Feed the multilines section array in order to parse xml correctly push @{ $arrayRef }, uc $section if $DATA_MAP{$section}->{multi}; } } } sub _has_changed{ my $section = shift; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; # Don't use inventory diff if section mask is return 1 if $DATA_MAP{$section}->{mask}==0; # Check checksum to know if section has changed if( defined($result->{CONTENT}->{HARDWARE}->{CHECKSUM}) ){ return $DATA_MAP{$section}->{mask} & $result->{CONTENT}->{HARDWARE}->{CHECKSUM}; } else{ &_log( 524, 'inventory', "$section (no checksum)") if $ENV{'OCS_OPT_LOGLEVEL'}; return 1; } } sub _get_type_id { #TODO: create it if needed # Type table structure # CREATE TABLE type_${section}_$field ( # ID INTEGER NOT NULL auto_increment, # NAME VARCHAR(255)) # ENGINE=INNODB, DEFAULT CHARSET=UTF8 ; # For migration, add the following line : # ALTER TABLE $section CHANGE COLUMN $field $field_ID INTEGER NOT NULL ; my ($section, $field, $value) = @_ ; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'} ; my ($id, $existsReq, $createSql); my $table_name = 'type_'.lc $section.'_'.lc $field ; if ($value eq '') { #Value from XML is empty $existsReq = $dbh->prepare("SELECT ID FROM $table_name WHERE NAME IS NULL") ; $createSql = "INSERT INTO $table_name(NAME) VALUES(NULL)" ; $existsReq->execute() ; } else { $existsReq = $dbh->prepare("SELECT ID FROM $table_name WHERE NAME=?") ; $createSql = "INSERT INTO $table_name(NAME) VALUES(?)" ; $existsReq->execute($value) ; } # It exists if($existsReq->rows){ my $row = $existsReq->fetchrow_hashref() ; $id = $row->{ID} ; } # It does not exist else{ if ($value eq '') { $dbh->do($createSql) && $existsReq->execute(); } else { $dbh->do($createSql, {}, $value) && $existsReq->execute($value); } my $row = $existsReq->fetchrow_hashref() ; $id = $row->{ID} ; } return $id ; } sub _get_hardware_fields { my $sectionMeta = {}; my $field; my $field_index=0; #Variable for feeding in _cache function #We only get cache fields for $field ( keys(%{$DATA_MAP{'hardware'}->{fields}} ) ){ if($DATA_MAP{'hardware'}->{fields}->{$field}->{cache}){ next unless $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED}; $sectionMeta->{field_cached}->{$field}=$field_index; $field_index++; } } return $sectionMeta; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Export.pm000066400000000000000000000032041303466605000273110ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Export; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _generate_ocs_file /; use Apache::Ocsinventory::Server::System qw / :server /; sub _generate_ocs_file{ return if !$ENV{'OCS_OPT_GENERATE_OCS_FILES'}; my $ocs_path = $ENV{'OCS_OPT_OCS_FILES_PATH'}; my $ocs_file_name = $Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'}; my $ocs_file = $ocs_path.'/'.$ocs_file_name.'.ocs'; my $format; my $v=1; $format = 'ocs' unless $format = $ENV{'OCS_OPT_OCS_FILES_FORMAT'}; if(!$ENV{'OCS_OPT_OCS_FILES_OVERWRITE'}){ while(-e $ocs_file){ $ocs_file=~s/(.+-\d{4}(-\d{2}){5})(?:-\d+)?\.ocs/$1-$v.ocs/; $v++; } } if( !open FILE, ">$ocs_file" ){ &_log(520,'postinventory',"$ocs_file: $!") if $ENV{'OCS_OPT_LOGLEVEL'}; } else{ if($format=~/^ocs$/i){ binmode FILE ; print FILE ${$Apache::Ocsinventory::CURRENT_CONTEXT{'RAW_DATA'}}; } elsif($format=~/^xml$/i){ print FILE ${$Apache::Ocsinventory::CURRENT_CONTEXT{'DATA'}}; } else{ &_log(521,'postinventory','wrong file format') if $ENV{'OCS_OPT_LOGLEVEL'}; } close(FILE); } return; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Filter.pm000066400000000000000000000015251303466605000272610ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Filter; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw //; use Apache::Ocsinventory::Server::System qw / :server /; #sub _inventory_filter{ # my $section = shift; # return unless $SECTIONS{$section}->{filter}; #There is at least one field to filter # my $fields_array = $SECTIONS{$section}->{field_filtered}; #} 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Update.pm000066400000000000000000000133261303466605000272600ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Update; use Apache::Ocsinventory::Server::Inventory::Cache; use Apache::Ocsinventory::Server::Inventory::Update::Hardware; use Apache::Ocsinventory::Server::Inventory::Update::AccountInfos; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _update_inventory /; use Apache::Ocsinventory::Server::System qw / :server /; use Apache::Ocsinventory::Server::Inventory::Data; sub _update_inventory{ my ( $sectionsMeta, $sectionsList ) = @_; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $section; &_reset_inventory_cache( $sectionsMeta, $sectionsList ) if $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED}; # Call special sections update if(&_hardware($sectionsMeta->{'hardware'}) or &_accountinfo()){ return 1; } # Call the _update_inventory_section for each section for $section (@{$sectionsList}){ #Only if section exists in XML or if table is mandatory if (($result->{CONTENT}->{uc $section} || $sectionsMeta->{$section}->{mandatory}) && $sectionsMeta->{$section}->{auto}) { if(_update_inventory_section($section, $sectionsMeta->{$section})){ return 1; } } } } sub _update_inventory_section{ my ($section, $sectionMeta) = @_; my @bind_values; my $deviceId = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; # The computer exists. # We check if this section has changed since the last inventory (only if activated) # We delete the previous entries if($Apache::Ocsinventory::CURRENT_CONTEXT{'EXIST_FL'}){ if($ENV{'OCS_OPT_INVENTORY_DIFF'}){ if( _has_changed($section) ){ &_log( 113, 'inventory', "u:$section") if $ENV{'OCS_OPT_LOGLEVEL'}; $sectionMeta->{hasChanged} = 1; } else{ return 0; } } else{ $sectionMeta->{hasChanged} = 1; } if( $sectionMeta->{delOnReplace} && !($sectionMeta->{writeDiff} && $ENV{'OCS_OPT_INVENTORY_WRITE_DIFF'}) ){ if(!$dbh->do("DELETE FROM $section WHERE HARDWARE_ID=?", {}, $deviceId)){ return(1); } } } # DEL AND REPLACE, or detect diff on elements of the section (more load on frontends, less on DB backend) if($Apache::Ocsinventory::CURRENT_CONTEXT{'EXIST_FL'} && $ENV{'OCS_OPT_INVENTORY_WRITE_DIFF'} && $sectionMeta->{writeDiff}){ my @fromDb; my @fromXml; my $refXml = $result->{CONTENT}->{uc $section}; my $sth = $dbh->prepare($sectionMeta->{sql_select_string}); $sth->execute($deviceId) or return 1; while(my @row = $sth->fetchrow_array){ push @fromDb, [ @row ]; } for my $line (@$refXml){ &_get_bind_values($line, $sectionMeta, \@bind_values); push @fromXml, [ @bind_values ]; @bind_values = (); } #TODO: Sorting XML entries, to compare more quickly with DB elements my $new=0; my $del=0; for my $l_xml (@fromXml){ my $found = 0; for my $i_db (0..$#fromDb){ next unless $fromDb[$i_db]; my @line = @{$fromDb[$i_db]}; my $comp_xml = join '', @$l_xml; my $comp_db = join '', @line[2..$#line]; if( $comp_db eq $comp_xml ){ $found = 1; # The value has been found, we have to delete it from the db list # (elements remaining will be deleted) delete $fromDb[$i_db]; last; } } if(!$found){ $new++; $dbh->do( $sectionMeta->{sql_insert_string}, {}, $deviceId, @$l_xml ) or return 1; if( $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED} && $sectionMeta->{cache} ){ &_cache( 'add', $section, $sectionMeta, $l_xml ); } } } # Now we have to delete from DB elements that still remain in fromDb for (@fromDb){ next if !defined (${$_}[0]); $del++; $dbh->do( $sectionMeta->{sql_delete_string}, {}, $deviceId, ${$_}[0]) or return 1; my @ldb = @$_; @ldb = @ldb[ 2..$#ldb ]; if( $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED} && $sectionMeta->{cache} && !$ENV{OCS_OPT_INVENTORY_CACHE_KEEP}){ &_cache( 'del', $section, $sectionMeta, \@ldb ); } } if( $new||$del ){ &_log( 113, 'write_diff', "ch:$section(+$new-$del)") if $ENV{'OCS_OPT_LOGLEVEL'}; } } else{ # Processing values my $sth = $dbh->prepare( $sectionMeta->{sql_insert_string} ); # Multi lines (forceArray) my $refXml = $result->{CONTENT}->{uc $section}; if($sectionMeta->{multi}){ for my $line (@$refXml){ &_get_bind_values($line, $sectionMeta, \@bind_values); if(!$sth->execute($deviceId, @bind_values)){ return(1); } if( $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED} && $sectionMeta->{cache} ){ &_cache( 'add', $section, $sectionMeta, \@bind_values ); } @bind_values = (); } } # One line (hash) else{ &_get_bind_values($refXml, $sectionMeta, \@bind_values); if( !$sth->execute($deviceId, @bind_values) ){ return(1); } if( $ENV{OCS_OPT_INVENTORY_CACHE_ENABLED} && $sectionMeta->{cache} ){ &_cache( 'add', $section, $sectionMeta, \@bind_values ); } } } $dbh->commit unless $ENV{'OCS_OPT_INVENTORY_TRANSACTION'}; 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Update/000077500000000000000000000000001303466605000267155ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Update/AccountInfos.pm000066400000000000000000000052311303466605000316470ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Update::AccountInfos; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw/_get_account_fields _accountinfo/; use Apache::Ocsinventory::Server::System qw/ :server /; sub _get_account_fields{ my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $request = $dbh->prepare('SHOW COLUMNS FROM accountinfo'); my @accountFields; $request->execute; while(my $row=$request->fetchrow_hashref){ push @accountFields, $row->{'Field'} if($row->{'Field'} ne 'HARDWARE_ID'); } return @accountFields; } sub _accountinfo{ my $lost=shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $hardwareId = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; # We have to look for the field's names because this table has a dynamic structure my ($row, $request, $accountkey, @accountFields); @accountFields = _get_account_fields(); # The default behavior of the server is to ignore TAG changes from the # agent if( $ENV{OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT} || !$Apache::Ocsinventory::CURRENT_CONTEXT{'EXIST_FL'} || $lost ){ # writing (if new id, but duplicate, it will be erased at the end of the execution) $dbh->do('INSERT INTO accountinfo(HARDWARE_ID) VALUES(?)', {}, $hardwareId); # Now, we know what are the account info name fields # We can insert the client's data. This data will be kept only one time, in the first inventory if( exists ($result->{CONTENT}->{ACCOUNTINFO}) ){ for $accountkey (@accountFields){ my $array = $result->{CONTENT}->{ACCOUNTINFO}; for(@$array){ if($_->{KEYNAME} eq $accountkey){ if(!$dbh->do('UPDATE accountinfo SET '.$accountkey."=".$dbh->quote($_->{KEYVALUE}).' WHERE HARDWARE_ID='.$hardwareId)){ return 1; } } } } } else{ &_log(528,'accountinfos','missing') if $ENV{'OCS_OPT_LOGLEVEL'}; } } if($lost){ if(!$dbh->do('UPDATE accountinfo SET TAG = "LOST" WHERE HARDWARE_ID=?', {}, $hardwareId)){ return(1); } } $dbh->commit unless $ENV{'OCS_OPT_INVENTORY_TRANSACTION'}; 0; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Inventory/Update/Hardware.pm000066400000000000000000000073221303466605000310140ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Inventory::Update::Hardware; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _hardware /; use Apache::Ocsinventory::Server::Inventory::Cache; use Apache::Ocsinventory::Server::Constants; use Apache::Ocsinventory::Server::System qw / :server /; sub _hardware{ my $sectionMeta = shift; my $result = $Apache::Ocsinventory::CURRENT_CONTEXT{'XML_ENTRY'}; my $base = $result->{CONTENT}->{HARDWARE}; my $ua = $Apache::Ocsinventory::CURRENT_CONTEXT{'USER_AGENT'}; my $deviceId = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; # We replace all data but quality and fidelity. The last come becomes the last date. my $userid = ''; $userid = "USERID=".$dbh->quote($base->{USERID})."," if( $base->{USERID}!~/(system|localsystem)/i ); my $ipAddress = &_get_default_iface(); $dbh->do("UPDATE hardware SET USERAGENT=".$dbh->quote($ua).", LASTDATE=".((defined($base->{LASTDATE})&&($base->{LASTDATE} ne "1970-01-01"))?$dbh->quote($base->{LASTDATE}):"NOW()").", LASTCOME=NOW(), CHECKSUM=(".(defined($base->{CHECKSUM})?$base->{CHECKSUM}:CHECKSUM_MAX_VALUE)."|CHECKSUM|1), NAME=".$dbh->quote($base->{NAME}).", WORKGROUP=".$dbh->quote($base->{WORKGROUP}).", USERDOMAIN=".$dbh->quote($base->{USERDOMAIN}).", OSNAME=".$dbh->quote($base->{OSNAME}).", OSVERSION=".$dbh->quote($base->{OSVERSION}).", OSCOMMENTS=".$dbh->quote($base->{OSCOMMENTS}).", PROCESSORT=".$dbh->quote($base->{PROCESSORT}).", PROCESSORS=".(defined($base->{PROCESSORS})?$base->{PROCESSORS}:0).", PROCESSORN=".(defined($base->{PROCESSORN})?$base->{PROCESSORN}:0).", MEMORY=".(defined($base->{MEMORY})?$base->{MEMORY}:0).", SWAP=".(defined($base->{SWAP})?$base->{SWAP}:0).", IPADDR=".$dbh->quote($ipAddress).", DNS=".$dbh->quote($base->{DNS}).", DEFAULTGATEWAY=".$dbh->quote($base->{DEFAULTGATEWAY}).", ETIME=NULL, $userid TYPE=".(defined($base->{TYPE})?$base->{TYPE}:0).", DESCRIPTION=".$dbh->quote($base->{DESCRIPTION}).", WINCOMPANY=".$dbh->quote($base->{WINCOMPANY}).", WINOWNER=".$dbh->quote($base->{WINOWNER}).", WINPRODID=".$dbh->quote($base->{WINPRODID}).", WINPRODKEY=".$dbh->quote($base->{WINPRODKEY}).", IPSRC=".$dbh->quote($Apache::Ocsinventory::CURRENT_CONTEXT{IPADDRESS}).", UUID=".$dbh->quote($base->{UUID}).", ARCH=".$dbh->quote($base->{ARCH})." WHERE ID=".$deviceId) or return(1); #We feed cache tables associated to hardware fields if ($ENV{OCS_OPT_INVENTORY_CACHE_ENABLED}) { my $cache_values =[]; for (keys %{ $sectionMeta->{field_cached}} ) { #Feeding array for cache values $cache_values->[ $sectionMeta->{field_cached}->{$_} ] = $base->{$_}; } &_cache( 'add', 'hardware', $sectionMeta, $cache_values ); } $dbh->commit unless $ENV{'OCS_OPT_INVENTORY_TRANSACTION'}; 0; } sub _get_default_iface{ return undef if !defined $Apache::Ocsinventory::CURRENT_CONTEXT{XML_ENTRY}->{CONTENT}->{NETWORKS}; my $networks = $Apache::Ocsinventory::CURRENT_CONTEXT{XML_ENTRY}->{CONTENT}->{NETWORKS}; for( @$networks ){ if( $_->{IPADDRESS} eq $Apache::Ocsinventory::CURRENT_CONTEXT{IPADDRESS}){ return $_->{IPADDRESS}; } } return $Apache::Ocsinventory::CURRENT_CONTEXT{XML_ENTRY}->{CONTENT}->{HARDWARE}->{IPADDR}; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Modperl1.pm000066400000000000000000000034731303466605000255260ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Modperl1; # For compatibilities with apache 1,5 ##################################### use mod_perl; use constant MP2 => $mod_perl::VERSION >= 1.99; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw/ APACHE_SERVER_ERROR APACHE_FORBIDDEN APACHE_OK APACHE_BAD_REQUEST _set_http_header _set_http_content_type _get_http_header _send_http_headers /; BEGIN{ if(MP2){ require Apache::compat; Apache::compat->import(); require Apache::Const; Apache::Const->import(-compile => qw(:common :http)); }else{ require Apache::Constants; Apache::Constants->import(qw(:common :response)); } } # retrieve apache constants use constant APACHE_SERVER_ERROR => MP2?Apache::SERVER_ERROR:Apache::Constants::SERVER_ERROR; use constant APACHE_FORBIDDEN => MP2?Apache::FORBIDDEN:Apache::Constants::FORBIDDEN; use constant APACHE_OK => MP2?Apache::OK:Apache::Constants::OK; use constant APACHE_BAD_REQUEST => MP2?Apache::BAD_REQUEST:Apache::Constants::BAD_REQUEST; # Wrappers sub _set_http_header{ my ($header, $value, $r) = @_; $r->header_out($header => $value); return(0); } sub _set_http_content_type{ my ($type, $r) = @_; $r->content_type($type); } sub _get_http_header{ my ($header, $r) = @_; return $r->headers_in->{$header}; } sub _send_http_headers{ my $r = shift; $r->send_http_header; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Modperl2.pm000066400000000000000000000032241303466605000255210ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Modperl2; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw/ APACHE_SERVER_ERROR APACHE_FORBIDDEN APACHE_OK APACHE_BAD_REQUEST _set_http_header _set_http_content_type _get_http_header _send_http_headers /; # mod-perl2 ############ use Apache2::Connection (); use Apache2::SubRequest (); use Apache2::Access (); use Apache2::RequestIO (); use Apache2::RequestUtil (); use Apache2::RequestRec (); use Apache2::ServerUtil (); use Apache2::Log; use APR::Table (); use Apache2::Const -compile => qw(OK HTTP_FORBIDDEN SERVER_ERROR HTTP_BAD_REQUEST); # retrieve apache constants use constant APACHE_SERVER_ERROR => Apache2::Const::SERVER_ERROR; use constant APACHE_FORBIDDEN => Apache2::Const::HTTP_FORBIDDEN; use constant APACHE_OK => Apache2::Const::OK; use constant APACHE_BAD_REQUEST => Apache2::Const::HTTP_BAD_REQUEST; # Wrappers sub _set_http_header{ my ($header, $value, $r) = @_; $r->headers_out->{$header} = $value; } sub _set_http_content_type{ my ($type, $r) = @_; $r->content_type($type); } sub _get_http_header{ my ($header, $r) = @_; return $r->headers_in->{$header}; } sub _send_http_headers{ return; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/System.pm000066400000000000000000000311241303466605000253210ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2005 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::System::Config; use strict; BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } &check_config(); } require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _log _debug _lock _unlock _send_file /; our %EXPORT_TAGS = ( 'server' => [ qw/ _get_xml_parser_opt _get_sys_options _database_connect _end _check_deviceid _log _debug _lock _unlock _send_file _inflate _get_spec_params _get_spec_params_g / ] ); our @EXPORT_OK = ( qw / _log _lock _modules_get_request_handler _modules_get_pre_inventory_options _modules_get_post_inventory_options _modules_get_prolog_readers _modules_get_prolog_writers _modules_get_duplicate_handlers / ); Exporter::export_ok_tags('server'); use Apache::Ocsinventory::Server::Constants; sub _get_sys_options{ return 0 if $ENV{OCS_OPT_OPTIONS_NOT_OVERLOADED}; # Which options enabled ? ############# # We read the table config looking for the ivalues of these options my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $row; my $request = $dbh->prepare('SELECT * FROM config'); $request->execute; # read options defined in ocs GUI while($row=$request->fetchrow_hashref){ for( keys %CONFIG ){ if( $row->{'NAME'} eq $_){ $ENV{'OCS_OPT_'.$_} = $row->{ $CONFIG{$_}->{type} }; } } } $request->finish; 0; } # Try other compress algorithm sub _inflate{ my @inflate_subs = ( # gzip file content sub { my $data_ref = shift; if(my $result = Compress::Zlib::memGunzip( ${$data_ref})){ $Apache::Ocsinventory::CURRENT_CONTEXT{'DEFLATE_SUB'} = \&Compress::Zlib::memGzip; &_log(321,'system', 'gzip') if $ENV{'OCS_OPT_LOGLEVEL'}; return $result; } undef; }, sub { my $ref = shift; if($$ref =~ /^<\?xml/i){ $Apache::Ocsinventory::CURRENT_CONTEXT{'DEFLATE_SUB'} = sub {return $_[0]}; &_log(321,'system', 'not_deflated') if $ENV{'OCS_OPT_LOGLEVEL'}; return $$ref; } undef; } ); my $data_ref = shift; my $inflated_ref = shift; for( @inflate_subs ){ last if( $$inflated_ref = &{$_}($data_ref) ); }; 1; } # Database connection sub _database_connect{ my $mode = shift; my %params; my ($host, $database, $port, $user, $password); if($mode eq 'write'){ ($host, $database, $port, $user, $password) = ( $ENV{'OCS_DB_HOST'}, $ENV{'OCS_DB_NAME'}, $ENV{'OCS_DB_PORT'}, $ENV{'OCS_DB_USER'}, $Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}->dir_config('OCS_DB_PWD') ); } # Local Mode elsif($mode eq 'local'){ ($host, $port, $user, $password) = ( $ENV{'OCS_DB_HOST'}, $ENV{'OCS_DB_PORT'}, $ENV{'OCS_DB_USER'}, $Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}->dir_config('OCS_DB_PWD') ); $database = $ENV{'OCS_DB_LOCAL'}||$ENV{'OCS_DB_NAME'}; } # Slave mode elsif($mode eq 'read'){ if($ENV{'OCS_DB_SL_HOST'}){ $host = $ENV{'OCS_DB_SL_HOST'}; $database = $ENV{'OCS_DB_SL_NAME'}||'ocsweb'; $port = $ENV{'OCS_DB_SL_PORT'}||'3306'; $user = $ENV{'OCS_DB_SL_USER'}; $password = $Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}->dir_config('OCS_DB_SL_PWD'); } else{ $host = $ENV{'OCS_DB_HOST'}; $database = $ENV{'OCS_DB_NAME'}||'ocsweb'; $port = $ENV{'OCS_DB_PORT'}||'3306'; $user = $ENV{'OCS_DB_USER'}; $password = $Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}->dir_config('OCS_DB_PWD'); } } else{ &_log(521,'database_connect', 'invalid_mode') if $ENV{'OCS_OPT_LOGLEVEL'}; return undef; } $params{'AutoCommit'} = 0; $params{'PrintError'} = $ENV{'OCS_OPT_DBI_PRINT_ERROR'}; # Optionnaly a mysql socket different than the client's built in $params{'mysql_socket'} = $ENV{'OCS_OPT_DBI_MYSQL_SOCKET'} if $ENV{'OCS_OPT_DBI_MYSQL_SOCKET'}; # Connection... my $dbh = DBI->connect("DBI:mysql:database=$database;host=$host;port=$port", $user, $password, \%params); $dbh->do("SET NAMES 'utf8'") if($dbh && $ENV{'OCS_OPT_UNICODE_SUPPORT'}); $dbh->do("SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); return $dbh; } sub _check_deviceid{ my $DeviceID = shift; # If we do not find it unless(defined($DeviceID)){ return(1); } # If it is not conform unless($DeviceID=~/^.+-\d{4}(?:-\d{2}){5}$/){ return(1); } 0; } sub _lock{ my $device = shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'} || shift; if($dbh->do('INSERT INTO locks(HARDWARE_ID, ID, SINCE) VALUES(?,?,NOW())', {} , $device, $$ )){ $Apache::Ocsinventory::CURRENT_CONTEXT{'LOCK_FL'} = 1 if $device eq ${Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}}; return(0); }else{ if( $ENV{'OCS_OPT_LOCK_REUSE_TIME'} ){ if( $dbh->do( 'SELECT * FROM locks WHERE HARDWARE_ID=? AND (UNIX_TIMESTAMP()-UNIX_TIMESTAMP(SINCE))>?', {}, $device, $ENV{'OCS_OPT_LOCK_REUSE_TIME'} ) != '0E0' ) { &_log(516,'lock', 'reuse_lock') if $ENV{'OCS_OPT_LOGLEVEL'}; if( $dbh->do('UPDATE locks SET ID=? WHERE HARDWARE_ID=?', {}, $$, $device) ){ $Apache::Ocsinventory::CURRENT_CONTEXT{'LOCK_FL'} = 1; return 0; } else{ &_log(516,'lock', 'failed') if $ENV{'OCS_OPT_LOGLEVEL'}; return 1; } } } return 1; } } sub _unlock{ my $device = shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'} || shift; if($dbh->do('DELETE FROM locks WHERE HARDWARE_ID=? AND ID=?', {}, $device, $$)){ $Apache::Ocsinventory::CURRENT_CONTEXT{'LOCK_FL'} = 0 if $device eq ${Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}}; return(0); }else{ return(1); } } sub _log{ my $code = shift; my $phase = shift; my $comment = shift; my $DeviceID = $Apache::Ocsinventory::CURRENT_CONTEXT{'DEVICEID'}||'NA'; my $ipaddress = $Apache::Ocsinventory::CURRENT_CONTEXT{'IPADDRESS'}||'??'; our $LOG; if(!$LOG){ open LOG, '>>'.$ENV{'OCS_OPT_LOGPATH'}.'/activity.log' or die "Failed to open log file : $! ($ENV{'OCS_OPT_LOGPATH'})\n"; # We don't want buffer, so we allways flush the handles select(LOG); $|=1; $LOG = \*LOG; } print $LOG localtime().";$$;$code;$DeviceID;$ipaddress;".&_get_http_header('User-agent',$Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}).";$phase;".($comment?$comment:"")."\n"; } # Subroutine called at the end of execution sub _end{ my $ret = shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $DeviceID = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; #Non-transactionnal table &_unlock($DeviceID) if $Apache::Ocsinventory::CURRENT_CONTEXT{'LOCK_FL'}; if( $ret==APACHE_SERVER_ERROR ){ &_log(515,'end', 'error') if $ENV{'OCS_OPT_LOGLEVEL'}; $dbh->rollback; } elsif( $ret eq APACHE_BAD_REQUEST ){ &_log(515,'end', 'bad_request') if $ENV{'OCS_OPT_LOGLEVEL'}; } else{ $dbh->commit; } close(our $LOG) && undef $LOG if defined $LOG; $dbh->disconnect; return $ret; } # Retrieve option request handler sub _modules_get_request_handler{ my $request = shift; my %search = ( 'REQUEST_NAME' => $request ); my @ret = &_modules_search(\%search, 'HANDLER_REQUEST'); return($ret[0]); } # Retrieve options with preinventory handler sub _modules_get_pre_inventory_options{ return(&_modules_search(undef, 'HANDLER_PRE_INVENTORY')); } # Retrieve options with postinventory handler sub _modules_get_post_inventory_options{ return(&_modules_search(undef, 'HANDLER_POST_INVENTORY')); } # Retrieve options with prolog_read sub _modules_get_prolog_readers{ return(&_modules_search(undef, 'HANDLER_PROLOG_READ')); } # Retrieve options with prolog_resp sub _modules_get_prolog_writers{ return(&_modules_search(undef, 'HANDLER_PROLOG_RESP')); } # Retrieve duplicate handlers sub _modules_get_duplicate_handlers{ return(&_modules_search(undef, 'HANDLER_DUPLICATE')); } # Read options structures sub _modules_search{ # Take a hash ref and return an array # The hash indicate the desire handler is the second arg my $search = shift; my $handler = shift; my @ret; my $count; my $module; my $search_key; my $module_key; for $module (@{$Apache::Ocsinventory::OPTIONS_STRUCTURE}){ $count = 0; if($search){ for $search_key (keys(%$search)){ if($search_key eq 'REQUEST_NAME'){ $count ++ if defined($module->{$search_key}) and ($module->{$search_key} eq $search->{$search_key}); }elsif($search_key eq 'TYPE'){ $count ++ if defined($module->{$search_key}) and ($module->{$search_key} == $search->{$search_key}); } } if($count == keys(%$search)){ push @ret, $module->{$handler} if $module->{$handler}; $count = 0; } }else{ push @ret, $module->{$handler} if $module->{$handler}; } } if(@ret){ return(@ret); }else{ return(0); } } sub _get_xml_parser_opt{ my $hash_ref = shift; $hash_ref->{'SuppressEmpty'} = 1; $hash_ref->{'ForceArray'} = []; @{$hash_ref->{'ForceArray'}} = &_get_xml_parser_opt_force_array(); } sub _get_xml_parser_opt_force_array{ my @ret; # Core push @ret, @{$Apache::Ocsinventory::Server::Inventory::XML_PARSER_OPT{'ForceArray'}}; # Options push @ret, @Apache::Ocsinventory::XMLParseOptForceArray; for my $module (@{$Apache::Ocsinventory::OPTIONS_STRUCTURE}){ push @ret, @{$module->{'XML_PARSER_OPT'}->{'ForceArray'}} if $module->{'XML_PARSER_OPT'}->{'ForceArray'}=~/ARRAY/; } return @ret; } # sub _send_file{ # We want to know if the file is available my $context = shift; my $request; my $row; my $r = $Apache::Ocsinventory::CURRENT_CONTEXT{'APACHE_OBJECT'}; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; if($context eq 'deploy'){ my $file = shift; $request=$dbh->prepare('SELECT CONTENT FROM deploy WHERE NAME=?'); $request->execute($file); # If not, we return a bad request and log the event unless($request->rows){ &_log(511,'deploy','no_file') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_BAD_REQUEST; }else{ # We extract the file and send it $row = $request->fetchrow_hashref(); # We force this content type to avoid the direct interpretation of, for example, a plain text file &_set_http_header('Cache-control' => $ENV{'OCS_OPT_PROXY_REVALIDATE_DELAY'},$r); &_set_http_header('Content-length' => length($row->{'CONTENT'}),$r); &_set_http_content_type('Application/octet-stream',$r); &_send_http_headers($r); $r->print($row->{'CONTENT'}); # We log it &_log(302,'deploy','file_transmitted') if $ENV{'OCS_OPT_LOGLEVEL'}; return APACHE_OK; } } } sub _get_spec_params{ my $hardwareId = $Apache::Ocsinventory::CURRENT_CONTEXT{'DATABASE_ID'}; return &_params_from_devices($hardwareId); } sub _get_spec_params_g{ my $groups = $Apache::Ocsinventory::CURRENT_CONTEXT{'MEMBER_OF'}; my %result; for(@$groups){ $result{$_} = {&_params_from_devices($_)} ; } return %result; } sub _params_from_devices{ my $hardwareId = shift; my $dbh = $Apache::Ocsinventory::CURRENT_CONTEXT{'DBI_HANDLE'}; my $sth; my $row; my %result; $sth = $dbh->prepare('SELECT NAME,IVALUE,TVALUE FROM devices WHERE HARDWARE_ID=?'); $sth->execute($hardwareId); while( $row = $sth->fetchrow_hashref()){ if(exists($result{ $row->{'NAME'} })){ if($result{ $row->{'NAME'} } =~ /ARRAY/){ push @{$result{$row->{'NAME'}}}, { 'IVALUE' => $row->{'IVALUE'}, 'TVALUE' => $row->{'TVALUE'} }; } else{ my $temp = $result{ $row->{'NAME'} }; $result{ $row->{'NAME'} } = []; push @{$result{$row->{'NAME'}}}, $temp; } } else{ $result{ $row->{'NAME'} } = { 'IVALUE' => $row->{'IVALUE'}, 'TVALUE' => $row->{'TVALUE'} }; } } return %result; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/System/000077500000000000000000000000001303466605000247625ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/System/Config.pm000066400000000000000000000314331303466605000265310ustar00rootroot00000000000000############################################################################### ## OCSINVENTORY-NG ## Copyleft Pascal DANEK 2008 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::System::Config; use strict; require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / get_settings check_config %CONFIG CRITICAL IMPORTANT CANSKIP DEPRECATED /; use constant CRITICAL => 0; use constant IMPORTANT => 1; use constant CANSKIP => 2; use constant DEPRECATED=> 3; our %CONFIG = ( LOGPATH => { type => 'TVALUE', default => '/var/log/ocsinventory-server', unit => 'NA', description => 'Path to log directory (must be writeable)', level => CRITICAL, filter => qr '^(.+)$' }, FREQUENCY => { type => 'IVALUE', default => 0, unit => 'day', description => 'Specify the validity of inventory data', level => CRITICAL, filter => qr '^(-1|\d+)$' }, PROLOG_FREQ => { type => 'IVALUE', default => 12, unit => 'hour', description => 'Specify agent\'s prolog frequency', level => CRITICAL, filter => qr '^([1-9]\d*)$' }, DEPLOY => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable ocs engine to deliver agent\'s files (deprecated)', level => DEPRECATED, filter => qr '^(1|0)$' }, TRACE_DELETED => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable the history tracking system (useful for external data synchronisation', level => CANSKIP, filter => qr '^(1|0)$' }, AUTO_DUPLICATE_LVL => { type => 'IVALUE', default => 15, unit => 'NA', description => 'Configure the duplicates detection system', level => IMPORTANT, filter => qr '^(\d+)$' }, LOGLEVEL => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable engine logs (see LOGPATH setting)', level => IMPORTANT, filter => qr '^(1|0)$' }, INVENTORY_DIFF => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load)', level => CRITICAL, filter => qr '^(1|0)$' }, INVENTORY_WRITE_DIFF => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load', level => CRITICAL, filter => qr '^(1|0)$' }, INVENTORY_TRANSACTION => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Make engine consider an inventory as a transaction (lower concurency, better disk usage)', level => IMPORTANT, filter => qr '^(1|0)$' }, INVENTORY_CACHE_ENABLED => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Enable some stuff to improve DB queries, especially for GUI multicriteria searching system', level => IMPORTANT, filter => qr '^(1|0)$' }, INVENTORY_CACHE_REVALIDATE => { type => 'IVALUE', default => 7, unit => 'day', description => 'Specify when the engine will reset the inventory cache structures', level => CRITICAL, filter => qr '^(\d+)$' }, INVENTORY_CACHE_KEEP => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Specify if ou want to keep trace of every elements encountered in the db life', level => IMPORTANT, filter => qr '^(1|0)$' }, INVENTORY_FILTER_ENABLED => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable core filter system to modify some things "on the fly"', level => CANSKIP, filter => qr '^(1|0)$' }, INVENTORY_SESSION_ONLY => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Accept an inventory only if there is a prolog before', level => CANSKIP, filter => qr '^(1|0)$' }, PROXY_REVALIDATE_DELAY => { type => 'IVALUE', default => 3600, unit => '', description => 'Set the proxy cache validity in http headers when sending a file', level => DEPRECATED, filter => qr '^(\d+)$' }, LOCK_REUSE_TIME => { type => 'IVALUE', default => 600, unit => 'second', description => 'Validity of a computer\'s lock', level => CANSKIP, filter => qr '^(\d+)$' }, ENABLE_GROUPS => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Enable the computer\s groups feature', level => IMPORTANT, filter => qr '^(1|0)$' }, GROUPS_CACHE_REVALIDATE => { type => 'IVALUE', default => 43200, unit => 'second', description => 'Specify the validity of computer\'s groups (default: compute it once a day - see offset)', level => CRITICAL, filter => qr '^(\d+)$' }, GROUPS_CACHE_OFFSET => { type => 'IVALUE', default => 43200, unit => 'second', description => 'Random number computed in the defined range. Designed to avoid computing many groups in the same process', level => CRITICAL, filter => qr '^(\d+)$' }, GENERATE_OCS_FILES => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Use with ocsinventory-injector, enable the multi entities feature', level => IMPORTANT, filter => qr '^(1|0)$' }, OCS_FILES_OVERWRITE => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Specify if you want to keep trace of all inventory between to synchronisation with the higher level server', level => IMPORTANT, filter => qr '^(1|0)$' }, OCS_FILES_PATH => { type => 'TVALUE', default => '/tmp', unit => 'NA', description => 'Path to ocs files directory (must be writeable)', level => IMPORTANT, filter => qr '^(.+)$' }, OCS_FILES_FORMAT => { type => 'TVALUE', default => 'OCS', unit => 'NA', description => 'Generate either compressed file or clear XML text', level => IMPORTANT, filter => qr '^(OCS|XML)$' }, SECURITY_LEVEL => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Futur security improvements', level => CANSKIP, filter => qr '^(\d+)$' }, IPDISCOVER => { type => 'IVALUE', default => 2, unit => 'NA', description => 'Specify how much agent per LAN will discovered connected peripherals (0 to disable)', level => CRITICAL, filter => qr '^(\d+)$' }, IPDISCOVER_MAX_ALIVE => { type => 'IVALUE', default => 14, unit => 'day', description => 'Specify when to remove a computer when it has not come until this period', level => CANSKIP, filter => qr '^([1-9]\d*)$' }, IPDISCOVER_BETTER_THRESHOLD => { type => 'TVALUE', default => 1, unit => 'day', description => 'Specify the minimal difference to replace an ipdiscover agent', level => IMPORTANT, filter => qr '^(\d+(?:,\d+)?)$' }, IPDISCOVER_LATENCY => { type => 'IVALUE', default => 100, unit => 'millisecond', description => 'Time between 2 arp requests (mini: 10 ms)', level => CRITICAL, filter => qr '^([1-9]\d+)$' }, IPDISCOVER_USE_GROUPS => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents)', level => IMPORTANT, filter => qr '^(1|0)$' }, IPDISCOVER_NO_POSTPONE => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Disable the time before a first election (not recommended)', level => CANSKIP, filter => qr '^(1|0)$' }, REGISTRY => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Enable the registry capacity', level => IMPORTANT, filter => qr '^(1|0)$' }, UPDATE => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Deprecated', level => DEPRECATED, filter => qr '^(1|0)$' }, DOWNLOAD => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable the softwares deployment capacity (bandwidth control)', level => CRITICAL, filter => qr '^(1|0)$' }, DOWNLOAD_FRAG_LATENCY => { type => 'IVALUE', default => 60, unit => 'second', description => 'Time between two fragment downloads (bandwidth control)', level => CRITICAL, filter => qr '^([1-9]\d*)$' }, DOWNLOAD_CYCLE_LATENCY => { type => 'IVALUE', default => 60, unit => 'second', description => 'Time between two download cycles (bandwidth control)', level => CRITICAL, filter => qr '^(\d+)$' }, DOWNLOAD_PERIOD_LATENCY => { type => 'IVALUE', default => 60, unit => 'second', description => 'Time between two download periods (bandwidth control)', level => CRITICAL, filter => qr '^(\d+)$' }, DOWNLOAD_TIMEOUT => { type => 'IVALUE', default => 7, unit => 'day', description => 'Agents will send ERR_TIMEOUT event and clean the package it is older than this setting', level => IMPORTANT, filter => qr '^([1-9]\d*)$' }, DOWNLOAD_EXECUTION_TIMEOUT => { type => 'IVALUE', default => 120, unit => 'minute', description => 'Agents will send an error event and clean the package if package command does not respond during this setting', level => IMPORTANT, filter => qr '^([1-9]\d*)$' }, DOWNLOAD_GROUPS_TRACE_EVENTS => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Specify if you want to track packages affected to a group on computer\'s level', level => IMPORTANT, filter => qr '^(1|0)$' }, DOWNLOAD_PERIOD_LENGTH => { type => 'IVALUE', default => 10, unit => 'cycle', description => 'Specify the number of cycle within a period', level => IMPORTANT, filter => qr '^([1-9]\d*)$' }, PROLOG_FILTER_ON => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable prolog filter stack', level => CANSKIP, filter => qr '^(1|0)$' }, INVENTORY_FILTER_ON => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable inventory filter stack', level => CANSKIP, filter => qr '^(1|0)$' }, INVENTORY_FILTER_FLOOD_IP => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period', level => CANSKIP, filter => qr '^(1|0)$' }, INVENTORY_FILTER_FLOOD_IP_CACHE_TIME => { type => 'IVALUE', default => 300, unit => 'second', description => 'Period definition for INVENTORY_FILTER_FLOOD_IP', level => CANSKIP, filter => qr '^(\d+)$' }, SESSION_VALIDITY_TIME => { type => 'IVALUE', default => 3600, unit => 'second', description => 'Set the validity of a session (prolog => end)', level => CANSKIP, filter => qr '^(\d+)$' }, SESSION_CLEAN_TIME => { type => 'IVALUE', default => 86400, unit => 'second', description => 'Clean old sessions every <> seconds', level => CANSKIP, filter => qr '^(\d+)$' }, COMPRESS_TRY_OTHERS => { type => 'IVALUE', default => 0, unit => 'NA', description => 'Configure engine to try other compress algorithm than raw zlib', level => CANSKIP, filter => qr '^(1|0)$' }, SNMP => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Activate SNMP scans feature', level => IMPORTANT, filter => qr '^(1|0)$' }, SNMP_INVENTORY_DIFF => { type => 'IVALUE', default => 1, unit => 'NA', description => 'Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load)', level => IMPORTANT, filter => qr '^(1|0)$' }, ); sub get_settings{ my $realName = shift; if($realName){ my @ret; push @ret, "OCS_OPT_$_" for keys %CONFIG; return sort @ret; } else{ return sort keys %CONFIG; } } sub check_config{ my $verbose = shift; for my $name ( keys( %CONFIG ) ){ my $truename = 'OCS_OPT_'.$name; if( !defined($ENV{$truename}) ){ print STDERR "ocsinventory-server: Bad setting. `$name` is not set. Default: `$CONFIG{$name}->{default}`\n"; $ENV{$truename} = $CONFIG{$name}->{default}; } elsif( $ENV{$truename} !~ $CONFIG{$name}->{filter} ){ print STDERR "ocsinventory-server: Bad setting. `$name` is set to `$ENV{$truename}`. Default: `$CONFIG{$name}->{default}`\n"; $ENV{$truename} = $CONFIG{$name}->{default}; } else{ print "ocsinventory-server: Parameter `$truename` is ok\n" if $verbose; } } return undef; } 1; ocsinventory-server-2.2+dfsg/Apache/Ocsinventory/Server/Useragent.pm000066400000000000000000000070631303466605000257770ustar00rootroot00000000000000################################################################################ ## OCSINVENTORY-NG ## Copyleft Guillaume PROTET 2010 ## Web : http://www.ocsinventory-ng.org ## ## This code is open source and may be copied and modified as long as the source ## code is always made freely available. ## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ package Apache::Ocsinventory::Server::Useragent; use strict; # This block specify which wrapper will be used ( your module will be compliant with all mod_perl versions ) BEGIN{ if($ENV{'OCS_MODPERL_VERSION'} == 1){ require Apache::Ocsinventory::Server::Modperl1; Apache::Ocsinventory::Server::Modperl1->import(); }elsif($ENV{'OCS_MODPERL_VERSION'} == 2){ require Apache::Ocsinventory::Server::Modperl2; Apache::Ocsinventory::Server::Modperl2->import(); } } require Exporter; our @ISA = qw /Exporter/; our @EXPORT = qw / _get_useragent /; # These are the core modules you must include in addition use Apache::Ocsinventory::Server::System; use Apache::Ocsinventory::Server::Communication; use Apache::Ocsinventory::Server::Constants; # Initialize option push @{$Apache::Ocsinventory::OPTIONS_STRUCTURE},{ 'NAME' => 'USERAGENT', 'HANDLER_PROLOG_READ' => \&useragent_prolog_read, 'HANDLER_PROLOG_RESP' => undef, 'HANDLER_PRE_INVENTORY' => undef, 'HANDLER_POST_INVENTORY' => undef, 'REQUEST_NAME' => undef, 'HANDLER_REQUEST' => undef, 'HANDLER_DUPLICATE' => undef, 'TYPE' => OPTION_TYPE_SYNC, 'XML_PARSER_OPT' => { 'ForceArray' => ['xml_tag'] } }; #Special hash to define allowed agents to content to OCS server my %ocsagents = ( 'OCS-NG_unified_unix_agent' => undef, 'OCS-NG_windows_client' => [4032,4062], 'OCS-NG_WINDOWS_AGENT' => undef, 'OCS-NG_windows_mobile_agent' => undef, 'OCS-NG_iOS_agent' => undef, 'OCS-NG_Android_agent' => undef, ); sub useragent_prolog_read{ my $current_context=shift; my $stop = 1; #We stop PROLOG by default my $srvver = $Apache::Ocsinventory::VERSION; my $useragent= &_get_useragent; if (grep /^($useragent->{'NAME'})$/, keys %ocsagents) { $useragent->{'VERSION'} =~ s/(\d)\.(\d)(.*)/$1\.$2/g; unless ($ocsagents{$useragent->{NAME}}) { #If no version specifed in hash if ($useragent->{'VERSION'} <= $srvver) { $stop=0; } } elsif ($useragent->{'VERSION'} >= $ocsagents{$useragent->{'NAME'}}[0] && $useragent->{'VERSION'} <= $ocsagents{$useragent->{'NAME'}}[1]) { #For old windows agent versions compatibility $stop= 0; } } #If external references file exists if ($ENV{'OCS_OPT_EXT_USERAGENTS_FILE_PATH'} && -f $ENV{'OCS_OPT_EXT_USERAGENTS_FILE_PATH'}) { open(FILE, $ENV{'OCS_OPT_EXT_USERAGENTS_FILE_PATH'}) or die "Cannot open $ENV{'OCS_OPT_EXT_USERAGENTS_FILE_PATH'} file !!"; my @ext_useragents = ; chomp @ext_useragents; close FILE; #Removing comments lines @ext_useragents = grep { !/^\#/ } @ext_useragents; $stop = 0 if (grep(/^$Apache::Ocsinventory::CURRENT_CONTEXT{'USER_AGENT'}$/, @ext_useragents)); } #Does we have to stop PROLOG ? if ($stop) { &_log(400,'useragent','Bad agent or agent version too recent for server !!') if $ENV{'OCS_OPT_LOGLEVEL'}; return BAD_USERAGENT; } else { return PROLOG_CONTINUE; } } sub _get_useragent { my $useragent = {}; $Apache::Ocsinventory::CURRENT_CONTEXT{'USER_AGENT'} =~ m/(.*)_v(.*)$/; $useragent->{'NAME'} = $1; $useragent->{'VERSION'} = $2; return $useragent; } 1; ocsinventory-server-2.2+dfsg/INSTALL_2.2.TXT000066400000000000000000000007511303466605000204400ustar00rootroot00000000000000In order to install OCS 2.2 the following requirement are needed : - Mod_Perl - Make - GCC - mysql-server - apache2 - php - php-mysql - php-gd - libxml-simple-perl - libdbi-perl - libdbd-mysql-perl - libapache-dbi-perl - libnet-ip-perl - libphp-pclzip - Archive::Zip - SOAP::Lite (Plugin engine need it) - XML:Entities - NET::IP - Apache::DBI Run "setup.sh" and follow the instructions. If you get a error / warning because of a missing module, install it and retry. ocsinventory-server-2.2+dfsg/LICENSE.txt000066400000000000000000000431031303466605000201710ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser General Public License instead of this License. ocsinventory-server-2.2+dfsg/README000066400000000000000000000075531303466605000172370ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2006 Pascal DANEK # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ How to setup OCS Inventory NG Management Server ? ================================================================================ CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and previous, please remove any Apache configuration for Communication Server ! Setup now install files in accordance with Filesystem Hierarchy Standard. So, no file is installed under Apache root document directory (Refer to Apache configuration files to locate it). If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache root document directory. If you choose to move directory, YOU MUST MOVE 'download' directory to Administration Server variable/cache directory (by default /var/lib/ocsinventory-reports), especially if you use deployement feature. ================================================================================ OCS Inventory NG Management Server needs the following components: - MySQL version 4.1 or higher - PERL 5.6 or higher (5.8 or higher recommended) - Apache version 1.3.33 or higher / Apache version 2.0.X or higher - Apache Mod_perl version 1.29 or higher - PHP 4.3.2 or higher, with ZIP support enabled. - Apache Mod_php version 4.3.2 or higher - Perl module XML::Simple version 2.12 or higher - Perl module Compress::Zlib version 1.33 or higher - Perl module DBI version 1.40 or higher - Perl module DBD::Mysql version 2.9004 or higher - Perl module Apache::DBI version 0.93 or higher - Perl module Net::IP version 1.21 or higher - Perl module SOAP::Lite version 0.66 or higher, not required, used only with SOAP web service - Perl module XML::Entities version 0.02 or higher, not required, used only with SOAP web service You must also know the following things (setup will try to found them, but no garanty): - Host running MySQL server (generally localhost) - Port of MySQL server (generally 3306) - Path to Apache web server binary file (usually named httpd or apache or apache2) - Path to Apache main configuration file (usually named httpd.conf or apache.conf or apache2.conf) - Path to Apache configuration directory (usually named conf.d) - User account running Apache web server (usually apache or www-data) - Group of user account running Apache web server (usually the same as user account) - Version of Apache mod_perl - Where to put Communication server log directory (usually /var/log/ocsinventory-server) Run "sh setup.sh" and follow the instructions. It will ask you if you want to setup Communication Server and/or Administration Server, and will do all configuration for you. Using default setup, - Communication Server is installed as standard PERL module - Communication Server configuration file ocsinventory-server.conf is installed under Apache configuration directory, usually /etc/httpd/conf.d or /etc/apache[2]/conf.d - Communication Server logs are stored under directory /var/log/ocsinventory-server - PHP files are installed under directory /usr/share/ocsinventory-reports/ocsreports - Writable/cache directories "download" and "ipd" are created under directory /var/lib/ocsinventory-reports - Administration Server configuration file ocsinventory-reports.conf is installed under Apache configuration directory, usually /etc/httpd/conf.d or /etc/apache[2]/conf.d. It contains aliases for /ocsreports and /download URL. Enjoy OCS Inventory NG ;-) OCS Inventory Team ocsinventory-server-2.2+dfsg/binutils/000077500000000000000000000000001303466605000201765ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/binutils/create-release-tarball.sh000077500000000000000000000011131303466605000250310ustar00rootroot00000000000000#!/bin/sh set -e BRANCH=$1 if [ -z $BRANCH ]; then echo "$0 VERSION" exit 1 fi git clone https://github.com/OCSInventory-NG/OCSInventory-Server.git -b $BRANCH rm -rf OCSInventory-Server/.git cd OCSInventory-Server git clone https://github.com/OCSInventory-NG/OCSInventory-OCSReports.git -b $BRANCH mv OCSInventory-OCSReports ocsreports rm -rf ocsreports/.git # Reset the default settings so install.php will be correctly loaded rm ocsreports/dbconfig.inc.php cd .. mv OCSInventory-Server OCSNG_UNIX_SERVER-$BRANCH tar cfz OCSNG_UNIX_SERVER-$BRANCH.tar.gz OCSNG_UNIX_SERVER-$BRANCH ocsinventory-server-2.2+dfsg/binutils/ipdiscover-util.README000066400000000000000000000016221303466605000242000ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2006 OCS Inventory NG Team # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ ipdiscover-util.pl is designed to manage the ipdiscover data stored in the database. Update the connection data elements at the beginning of the script to make it work for you. The GUI ipdiscover feature is improved since this version. If you want more (analyze button (per subnet) and ip querying), put it in ocsreports. The script require Net::IP perl module, nmap and samba. Read documentation for further details. ocsinventory-server-2.2+dfsg/binutils/ipdiscover-util.pl000077500000000000000000000506341303466605000236700ustar00rootroot00000000000000#!/usr/bin/perl ############################################################################### ##OCSINVENTORY-NG ##Copyleft Pascal DANEK 2005 ##Web : http://www.ocsinventory-ng.org ## ##This code is open source and may be copied and modified as long as the source ##code is always made freely available. ##Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # # use DBI; use XML::Simple; use Net::IP qw(:PROC); use strict; use Fcntl qw/:flock/; #Command line options : #-analyse : nmap analyse and files for grep, human readable and xml generation #-net : Treat machine for the specified subnet # # ################ #OPTIONS READING ################ # my $option; #Specify a subnet my $net; #Subnet name my $filter; #Analyse and class the computers my $analyse; #Net for a given ip my $iptarget; my $masktarget; #If auto flag, running for all the subnet.csv subnet and generate files my $auto; #Search for problems with computer election my $ipd; my $list; my $xml; my $cache; my $path; #Default values for database connection # my $dbhost = 'localhost'; my $dbuser = 'ocs'; my $dbpwd = 'ocs'; my $db = 'ocsweb'; my $dbp = '3306'; my $dbsocket = ''; # my %xml; my $ipdiscover; #Cleanup the directory &_cleanup(); for $option (@ARGV){ if($option=~/-a$/){ $analyse = 1; }elsif($option=~/-auto$/){ $auto = 1; }elsif($option=~/-cache$/){ $cache = 1; $analyse = 1; $xml = 1; }elsif($option=~/-path=(\S*)$/){ $path = $1; }elsif($option=~/-ipdiscover=(\d+)$/){ $ipdiscover = 1; $ipd = $1; }elsif($option=~/-xml$/){ $xml = 1; }elsif($option=~/-h=(\S+)/){ $dbhost = $1; }elsif($option=~/-d=(\S+)/){ $db = $1; }elsif($option=~/-u=(\S+)/){ $dbuser = $1; }elsif($option=~/-p=(\S+)/){ $dbpwd = $1; }elsif($option=~/-P=(\S+)/){ $dbp = $1; }elsif($option=~/-list$/){ $list = 1; }elsif($option=~/-s=(\S+)/){ $dbsocket = $1; }elsif($option=~/-net=(\S+)/){ die "Invalid subnet. Abort...\n" unless $1=~/^(\d{1,3}(?:\.\d{1,3}){3})$/; $net = 1; $filter = $1; }elsif($option=~/-ip=(\S+)/){ die "Invalid address => [IP/MASK]. Abort...\n" unless $1=~/^(\d{1,3}(?:\.\d{1,3}){3})\/(.+)$/; $iptarget = $1; $masktarget = $2; }else{ print < Looks for the ip in a subnet -net=X.X.X.X -> Specify a network -a -> Launch the analyze -ipdiscover=X -> Show all the subnet with up to XX ipdiscover -xml -> xml output -list=show all the networks present in the database with "connected"/"discovered" computers #DATABASE OPTION -p=xxxx password (default ocs) -P=xxxx port (default 3306) -d=xxxx database name (default ocsweb) -u=xxxx user (default ocs) -h=xxxx host (default localhost) -s=xxxx socket (default from default mysql configuration) EOF die "Invalid options. Abort..\n"; } } if($analyse and !$net){ die "Which subnet do you want to analyse ?\n"; } if($cache or $auto){ unless(-d "$path/ipd"){ mkdir("$path/ipd") or die $!; } } #Date of the day my $date = localtime(); ####################### #Database connection... ######## # my $request; my $row; my $dbparams = {}; $dbparams->{'mysql_socket'} = $dbsocket if $dbsocket; my $dbh = DBI->connect("DBI:mysql:database=$db;host=$dbhost;port=$dbp", $dbuser, $dbpwd, $dbparams) or die $!; ############################# #We get the subnet/name pairs #### # my @subnet; $request = $dbh->prepare("SELECT * FROM subnet"); $request->execute; while($row = $request->fetchrow_hashref){ push @subnet, [ $row->{'NETID'}, $row->{'NAME'}, $row->{'ID'}, $row->{'MASK'} ]; } ########### #PROCESSING ########### # if($auto){ print "\n\n########################\n"; print "Starting scan of subnets\n"; print "########################\n"; my %subnet; for(@subnet){ my $name = $_->[1]; my $netn = $_->[0]; $name=~s/ /_/g; $name=~s/\//\\\//g; $subnet{$name} = $netn; print "Retrieving $name (".$subnet{$name}.")\n"; } my $i; print "\n\n##################\n"; print "PROCESSING SUBNETS \n"; print "##################\n\n"; for(keys(%subnet)){ print "Processing $_ (".$subnet{$_}."). ".(keys(%subnet)-$i)." networks left.\n"; open OUT, ">$path/ipd/".$subnet{$_}.".ipd" or die $!; unless(flock(OUT, LOCK_EX|LOCK_NB)){ if($xml){ print "345"; exit(0); }else{ die "An other analyse is in progress\n"; } } system("./ipdiscover-util.pl -net=".$subnet{$_}.($xml?' -xml':'')." -a > $path/ipd/'".$subnet{$_}.".ipd'"); $i++; } system ("rm -f ipdiscover-analyze.*"); print "Done.\n"; exit(0); } #Host subnet my $network; #Subnet mask in binary format my $binmask; if($ipdiscover){ my @networks; #get the subnets my $result; die "Invalid value\n" if $ipd<0; $request = $dbh->prepare('select distinct(ipsubnet) from networks left outer join devices on tvalue=ipsubnet where tvalue is null'); $request->execute; while($row = $request->fetchrow_hashref){ push @networks, [ $row->{'ipsubnet'}, '0' ]; } $request->finish; #If positive value, it includes other subnet if($ipd){ $request = $dbh->prepare('select count(*) nb,tvalue,name from devices group by tvalue having nb<='.$ipd.' and name="ipdiscover"'); $request->execute; while($row = $request->fetchrow_hashref){ push @networks, [ $row->{'tvalue'}, $row->{'nb'} ]; } $request->finish; } print <[0]; my $nbipd = $network->[1]; next unless $ip =~ /^\d{1,3}(?:\.\d{1,3}){3}$/; my $req = $dbh->prepare('select h.deviceid, h.id, h.name, h.quality,h.fidelity,h.lastcome,h.lastdate,osname, n.ipmask, n.ipaddress from hardware h,networks n where n.hardware_id=h.id and n.ipsubnet='.$dbh->quote($ip).' order by lastdate'); $req->execute; #Get the subnet label unless($xml){ print "#######\n"; my ($nname, $nuid) = &_getnetname($ip, ''); print "SUBNET = ".$ip."-> $nbipd ipdiscover, ".($req->rows?$req->rows:0)." host(s) connected \n[ $nname ($nuid) ]\n"; print "#\n\n"; printf(" %-25s %-9s %-9s %-25s %-15s %-15s %s\n", "","","","","","",""); print "-----------------------------------------------------------------------------------------------------------------------\n"; while($result = $req->fetchrow_hashref){ my $r = $dbh->prepare('select * from devices where hardware_id='.$dbh->quote($result->{'id'}).' and tvalue='.$dbh->quote($ip).' and name="ipdiscover"'); $r->execute; printf("#-> %-25s %-9s %-9s %-25s %-15s %15s %s %s\n",$result->{'name'},$result->{'quality'},$result->{'fidelity'},$result->{'lastdate'},$result->{'ipaddress'}, $result->{'ipmask'},$result->{'osname'} ,$r->rows?'*':''); $r->finish; } print "\n\n\n\n"; }else{ $xml{'SUBNET'}[$i]{'IP'} = [ $ip ]; $xml{'SUBNET'}[$i]{'IPDISCOVER'} = [ $nbipd ]; $xml{'SUBNET'}[$i]{'HOSTS'} = [ $req->rows?$req->rows:0 ]; $j = 0; while($result = $req->fetchrow_hashref){ $xml{'SUBNET'}[$i]{'HOST'}[$j]{'NAME'} = [ $result->{'name'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'QUALITY'} = [ $result->{'quality'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'FIDELITY'} = [ $result->{'fidelity'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'LASTDATE'} = [ $result->{'lastdate'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'OSNAME'} = [ $result->{'osname'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'IPMASK'} = [ $result->{'ipmask'} ]; $j++; } $i++; } } if($xml){ $output=XML::Simple::XMLout( \%xml, RootName => 'NET', SuppressEmpty => undef); print $output; } exit(0); } ############# ##IP resolving ############## ## if($iptarget){ my $netname; #If necessary, ascii conversion of a binary format $masktarget = _bintoascii($masktarget) if($masktarget=~/^\d\d$/); die "Invalid netmask. Abort.\n" unless $masktarget=~/^\d{1,3}(\.\d{1,3}){3}$/; $network = _network($iptarget, $masktarget); my $uid; ($netname, $uid)= &_getnetname($network, '-'); my @nmb = `nmblookup -A $iptarget`; #DNS name my $dnsname = &_getdns($iptarget); #Netbios name my $nmbname; my $inv; my $type; for(@nmb){ $nmbname = $1,last if /\s+(\S+).*<00>/; } $request = $dbh->prepare('SELECT * FROM networks WHERE IPADDRESS='.$dbh->quote($iptarget)); $request->execute; if($request->rows){ $inv = 1; $type = 'Computer'; }else{ $request = $dbh->prepare('SELECT IP,TYPE FROM netmap, network_devices WHERE MAC=MACADDR AND IP='.$dbh->quote($iptarget)); $request->execute; if(my $row = $request->fetchrow_hashref){ $inv = 1, $type = $row->{'TYPE'}; } } $request = $dbh->prepare('SELECT MAC FROM netmap WHERE IP='.$dbh->quote($iptarget)); $request->execute; my $exist = 1 if $request->rows; unless($xml){ print < ".($netname).". ($uid) ($network)\n"; print < 'IP', SuppressEmpty => undef); print $output; exit(0); } } # #Searching non-inventoried mac addresses # my %network; my @hosts; my $null; # # Filter out already flagged MAC addresses - drich $request = $dbh->prepare('SELECT IP,MASK,MAC,DATE FROM netmap LEFT JOIN networks ON MACADDR=MAC where MACADDR IS NULL AND MAC NOT IN (SELECT MACADDR FROM network_devices)'); $request->execute; # #Determine the subnets # # my %network_ipd; # while($row = $request->fetchrow_hashref){ my $ip; my $netmask; # if($row->{'MASK'}){ $ip = $row->{'IP'}; $netmask = $row->{'MASK'}; $network = _network($ip, $netmask); $binmask = _binmask($netmask); if($net){ next unless $network eq $filter; } #Hosts count per subnet if($list and !$analyse and !$net){ $network_ipd{$network}++; }else{ $network{$network}++; push @hosts, [ $row->{'MAC'}, $ip , $row->{'DATE'}]; } }else{ $null++; } } my $total = 0; #We want ALL subnets in the database, even those that are not discovered if($list and !$analyse and !$net){ $request = $dbh->prepare('SELECT IPADDRESS,IPMASK FROM networks'); $request->execute; while($row = $request->fetchrow_hashref){ my $ip; my $netmask; # if($row->{'IPMASK'}=~/^\d{1,3}(\.\d{1,3}){3}$/ and $row->{'IPADDRESS'}=~/^\d{1,3}(\.\d{1,3}){3}$/){ $ip = $row->{'IPADDRESS'}; $netmask = $row->{'IPMASK'}; $network = _network($ip, $netmask); $network{$network}++; } #Hosts count per subnet } #We show the part of non-inventoried computers my $netnum; for $netnum (keys(%network)){ $total+=$network{$netnum}; for(keys(%network_ipd)){ $network{$netnum}.= "/".$network_ipd{$_} if($_ eq $netnum); } } } ######## #RESULTS ######## # print <","","",""); print "-------------------------------------------------------------------\n"; } #net UID my $dep; #net name my $lib; # my $line; my $netn; # my $i; my $output; for $netn (keys(%network)){ ($lib, $dep) = &_getnetname($netn,'-'); if($xml and !$analyse){ $xml{'NETWORK'}[$i]{'LABEL'} = [ $lib ]; $xml{'NETWORK'}[$i]{'UID'} = [ $dep ]; $xml{'NETWORK'}[$i]{'NETNAME'} = [ $netn ]; $xml{'NETWORK'}[$i]{'NETNUMBER'} = [ $network{$netn} ]; $i++; }elsif(!$xml){ printf("%-35s %-5s %-20s %-4s\n",$lib,$dep,$netn,$network{$netn}); $total += $network{$netn} unless $list; } } if($xml and !$net){ $output=XML::Simple::XMLout( \%xml, RootName => 'IPDISCOVER', SuppressEmpty => undef); print $output; } if($net){ # my($n, $i); #Host names my @names; # unless($xml){ print "\n---------------------------------------------\n"; print "Unknown host(s) on $filter \n"; print "---------------------------------------------\n\n"; } my $output; for $n (@hosts){ #Trying a DNS resolution push @$n, &_getdns($$n[1]); unless($analyse){ if($xml){ $xml{'HOST'}[$i]{'IP'} = [ $$n[1] ]; $xml{'HOST'}[$i]{'MAC'} = [ $$n[0] ]; $xml{'HOST'}[$i]{'DATE'} = [ $$n[2] ]; $xml{'HOST'}[$i]{'NAME'} = [ $$n[3] ]; $i++; }else{ printf("=> %-20s %-20s %-20s %s\n",$$n[1],$$n[0],$$n[2],$$n[3]); } } } if(!$analyse and $xml){ $output=XML::Simple::XMLout( \%xml, RootName => 'NET', SuppressEmpty => undef); print $output; } } ######## #ANALYZE ######## # # # #windows computers my @PCW; #Linux computers my @PCL; #Mac computers my @PCM; #net peripherals my @PR; #Phantom computers my @PH; #At least one port filtered with one port open or closed my @PF; if($analyse){ #directory creation for analyses file if($cache){ open CACHE, ">$path/ipd/$filter.ipd" or die $!; unless(flock(CACHE, LOCK_EX|LOCK_NB)){ if($xml){ print "346"; exit(0); }else{ die "An other analyse is in progress\n"; } } } unless(@hosts){ print "No unknown hosts of this network. Stop.\n\n" unless $xml; exit(0); } #If it's a global analyze, we don't display the results but just generate the files #Using nmap : # -> Connection on ports 135(msrpc), 80(web), 22(ssh), 23(telnet) # -> files ipdiscover-analyze.* generated (3 formats : .nmap(human), .gnmap(pour grep), .xml(xml) # -> No 'host up' detection # my @ips; push @ips, $$_[1] for(@hosts); #Check that there is no analyses of this network pending open NMAP, "+>$path/$filter.gnmap"; unless(flock(NMAP, LOCK_EX|LOCK_NB)){ if($xml){ print "347"; exit(0); }else{ die "An other analyse is in progress\n"; } } #Analyse system("nmap -R -v @ips -p 135,80,22,23 -oG $path/$filter.gnmap -P0 -O > /dev/null"); # my @gnmap; if($net){ @gnmap = ; close NMAP; unlink "$path/$filter.gnmap"; # ########### # my $ref; my ($h, $w, $j, $r, $f, $l); REF: for $ref (@hosts){ $h = $$ref[1]; for(@gnmap){ next if /^#/; # Skip comments if(/Host: $h\b/){ if (/Status: Down/){ $PH[$j] = $ref; $j++; next REF; }elsif(/Status: /){ # status up is meaningless to us next; } # Try OS detection first if(/OS: .*Windows/){ $PCW[$w] = $ref; $w++; next REF; }elsif(/OS: .*Apple Mac/){ $PCM[$l] = $ref; $l++; next REF; }elsif(/OS: .*Linux/ and !/OS: .*embedded/){ $PCL[$l] = $ref; $l++; next REF; }elsif(/OS: /){ # Something else, call it network $PR[$r] = $ref; $r++; next REF; } if(/135\/o/){ $PCW[$w] = $ref; $w++; next REF; }elsif( (/22\/c.+23\/c.+80\/o.+135\/c/) or (/22\/c.+23\/o.+80\/c.+135\/c/) or (/22\/c.+23\/o.+80\/o.+135\/c/) or (/22\/o.+23\/o/) ){ $PR[$r] = $ref; $r++; next REF; }elsif(/(22\/f.+23\/f.+80\/f.+135\/c|22\/c.+23\/c.+80\/c.+135\/c)/){ $PH[$j] = $ref; $j++; next REF; }elsif(/(22\/f.+23\/f.+80\/f.+135\/f)/){ $PF[$f] = $ref; $f++; next REF; }else{ $PCL[$l] = $ref; $l++; next REF; } } } } #Display results print "\n" if $xml; print CACHE "\n" if $xml; &_print(\@PCW, 'WINDOWS COMPUTERS'); &_print(\@PCL, 'LINUX COMPUTERS'); &_print(\@PCM, 'MAC COMPUTERS'); &_print(\@PR, 'NETWORK DEVICES'); &_print(\@PF, 'FILTERED HOSTS'); &_print(\@PH, 'PHANTOM HOSTS'); print "\n" if $xml; print CACHE "\n" if $xml; } } ################## #DISLAY SUBROUTINE ################## # sub _print{ my $ref = shift; my $lib = shift; if(@$ref){ my $nb; unless($xml){ print "#" for(0..(length($lib)+3)); print "\n"; print "# ".$lib." #"; print "\n"; print "#" for(0..(length($lib)+3)); print "\n"; print "#----------------------------------------------------------------------------\n"; printf("#%-20s %-20s %-25s %s\n", "IP address", "MAC address", "DNS/Netbios", "Date"); print "#----------------------------------------------------------------------------\n#\n"; } $nb = 0; my $output; %xml = undef; for(@$ref){ $$_[3] = &_smbname($$_[1]) if $$_[3] eq "-"; if($xml){ $xml{'IP'} = [ $$_[1] ]; $xml{'MAC'} = [ $$_[0] ]; $xml{'NAME'} = [ $$_[3] ]; $xml{'DATE'} = [ $$_[2] ]; $xml{'TYPE'} = ['WINDOWS'] if $lib =~/windows/i; $xml{'TYPE'} = ['LINUX'] if $lib =~/linux/i; $xml{'TYPE'} = ['MAC'] if $lib =~/mac/i; $xml{'TYPE'} = ['FILTERED'] if $lib =~/filtered/i; $xml{'TYPE'} = ['NETWORK'] if $lib =~/network/i; $xml{'TYPE'} = ['PHANTOM'] if $lib =~/phantom/i; $output=XML::Simple::XMLout( \%xml, RootName => 'HOST', SuppressEmpty => undef); print $output; print CACHE $output if $cache; }else{ printf("#-> %-15s %-20s %-20s %s\n",$$_[1],$$_[0],$$_[3],$$_[2]); $nb++; } } unless($xml){ print "#\n#==========> $nb host(s)\n#\n\n\n"; } } } # ######################################### #ROUTINE DE RECUPERATION DES NOMS NETBIOS ######################################### # sub _smbname{ my $flag = 0; my $name; my $ip = shift; #If no dns name, we try a netbios resolution my @smb = `nmblookup -A $ip`; #On cherche un enregistrment <00> pour l'ip passee en argument for(@smb){ $name = "-"; /Looking\D+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ unless $flag; if(/<00>/){ /^\s+(\S+)/; $name = $1; return $name; } } return "-"; } ############## #CLEAN *.gnmap ############## # sub _cleanup{ my($name, @files); opendir DIR, $path; while($name = readdir DIR){ push @files, $name if $name=~/\.gnmap$/i; } closedir DIR; for(@files){ open FILE, $_ or next; unlink "$path/$_" if(flock(FILE, LOCK_EX|LOCK_NB)); } } print "|\n|\n---------------------------------------------\n|" unless $xml; if($list){ print "\n|--> TOTAL = $total valid (ips/netmask) in the database\n" unless $xml; exit(0); } unless($xml){ print "\n|--> TOTAL = $total unknown hosts\n"; print "\n|--> WARNING: $null discovered computers without netmask on all discovered machine\n\n" if $null; } #Try to get dns name sub _getdns{ my $ip = shift; my $name; chomp(my @names = `host $ip 2>/dev/null`); for(@names){ return $1 if /.+pointer (.+)/i; return $1 if /Name:\s*(\S+)/i; } return("-"); } #Retrieve the name of the subnet if available sub _getnetname{ my $network = shift; my $r = shift; for(@subnet){ if($_->[0] eq $network){ return ($_->[1], $_->[2]); last; } } return($r, $r); } #To retrieve the net ip sub _network{ my $ip = shift; my $netmask = shift; my $binip = &ip_iptobin($ip, 4); my $binmask = &ip_iptobin($netmask, 4); my $subnet = $binip & $binmask; return(&ip_bintoip($subnet, 4)) or die(Error()); } sub _bintoascii{ my $binmask = shift; my $binstring = "1" x $binmask; $binstring .= "0" for(1..(32 - $binmask)); return(&ip_bintoip($binstring, 4)) or die(Error()); } sub _binmask{ my $ip = shift; return(&ip_iptobin($ip, 4)) or die(Error()); } ocsinventory-server-2.2+dfsg/binutils/ocs-errors000066400000000000000000000064661303466605000222330ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2008 OCS Inventory NG Team # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ OCS Inventory NG logs format --> GDH;Process ID;Event code;DeviceID;IP address;User agent;Phase;(comment) Codes elements : ERRORS ------ 500--Query forbidden 502--Invalid device ID or hostname 503--Impossible to get a key from the config table 504--Impossible to get the last date inventory 505--Impossible to connect to database 506--Inflation problem 507--XML Parsing error 508--Update message unreadeable 509--Impossible to get the account infos 510--Bad content-type 511--File does not exist 512--Malformed request 513--Bad old deviceid 514--synchronisation problem 515--Script error, rollback transaction. 516--Deviceid locked 517--Cannot handle normal duplicate 518--Cannot retrieve database id 519--A device try to add a new computer whereas it is forbidden by filter inventory rules 520--The request for the group is not valid 521--Invalid database connection mode 522--Inventory Cache handling error (Creation) 523--Inventory Cache handling error (Truncate) 524--No checksum 525--Cannot reuse session 526--Error while checking session 527--Cannot end session (DB Fault) 528--No account infos sent 529--Unknown notify type 530--Cannot update ip address (notify handler) INVENTORY --------- 100--Inventory accepted 101--Inventory succeed 102--Inventory refused 103--New machine(deviceid) 104--Inventory incoming 105--Inventory refused but other task required 106--Prolog stopped by module 107--Inventory stopped by module 108--Cleaning inventory cache 109--Inventory cache handling success 110--Inventory cache out of date 111--Inventory cache already handled (lock fault) 112--Inventory cache updated 113--Inventory section has changed => write it 114--No prolog connection found 115--Inventory refused (no session) MANAGEMENT ---------- 300--Device replaced 301--Device can be duplicated 302--File transmitted (deploy) 304--Deploy off 305--Files transmitted 306--Group out-of-date 307--Revalidate group cache 308--Group is locked by another process 309--Group cache update problem 310--Trusted computer 311--Session started(prolog) 314--Checking expired sessions 315--Checking is already handled by another process (skipping) 316--Found old sessions (according to OCS_OPT_SESSION_CLEAN_TIME) 317--Session validity undefined : check always succeed 318--Session not found 319--Valid session found 320--End of session 321--Compression used is not zlib 322--Notify event 323--Update ipaddress for device (Notify) 324--No such mac address (notify) New iface ? 325--The computer does not exist 326--A old deviceid is present IPDISCOVER ---------- 1001--Ipdiscover enabled 1002--Ipdiscover disabled 1003--Ipdiscover report error 1004--Ipdiscover incoming 1005--Ipdiscover conflict with group exception DOWNLOAD -------- 2500--Impossible to get config 2501--Message refers to an unexisting package 2502--Cannot retrieve package history (db error) 2001--Download agent event incoming ocsinventory-server-2.2+dfsg/binutils/ocsinventory-injector.README000066400000000000000000000017201303466605000254320ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2008 OCS Inventory NG Team # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ ocsinventory-injector.pl is a script designed to send inventory to an OCS server using .ocs files generated by -local (or /local for windows). Since 1.02 release, you can use the OCS_OPT_GENERATE_OCS_FILES server parameter to automatically generate these files to "inject" it to a higher level server. (in case of multi entity configuration for example). In that case, you can use a cron if the two servers are connected, or put it on the higher level server and run it on loopback. ocsinventory-server-2.2+dfsg/binutils/ocsinventory-injector.pl000077500000000000000000000071071303466605000251200ustar00rootroot00000000000000#!/usr/bin/perl -w ############################################################################### ##OCS inventory-NG Version 1.02 ##Copyleft Pascal DANEK 2005 ##Copyleft Goneri Le Bouder 2006 ##Web : http://www.ocsinventory-ng.org ## ##This code is open source and may be copied and modified as long as the source ##code is always made freely available. ##Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ #Last modification : $Id: ocsinventory-injector.pl,v 1.3 2008-02-18 07:17:52 hunal Exp $ #Local insertion script use Fcntl qw/:flock/; use LWP::UserAgent; use XML::Simple; use Compress::Zlib; use Getopt::Long; use constant VERSION => 3; use strict; my $help; my $directory; my $file; my $url; my $useragent; my $remove; my $verbose; my $stdin; sub loadfile { $file = shift; unless ( -r $file ) { print STDERR "Can't read $file\n"; return; } print "Loading $file..." if $verbose; unless ( open( FILE, "$file" ) && flock( FILE, LOCK_EX | LOCK_NB ) ) { print STDERR "Failed to access $file : $!"; return; } local $/; my $content = ; close FILE or die "Can't close file $file: $!"; sendContent($content); } sub loaddirectory { my $directory = shift; unless ( -r $directory ) { print STDERR "Can't read $directory: $!\n"; return; } opendir( DIR, $directory ) || die "can't opendir $directory: $!"; foreach ( readdir(DIR) ) { loadfile("$directory/$_") if (/\.ocs$/); } closedir DIR; } sub loadstdin { my $content; undef $/; $content = ; sendContent($content); } sub sendContent { my $content = shift; my $ua = LWP::UserAgent->new; $ua->agent($useragent); my $request = HTTP::Request->new( POST => $url ); $request->header( 'Pragma' => 'no-cache', 'Content-type', 'Application/x-compress' ); $request->content("$content"); my $res = $ua->request($request); if($res->is_success){ print "OK\n" if $verbose; print STDERR "Can't remove $file: $!\n" if ($remove && (!unlink $file)); }else{ if($verbose){ print "ERROR: "; print $res->status_line(), "\n"; } } } sub usage { print < \$help, 'd|directory=s' => \$directory, 'f|file=s' => \$file, 'u|url=s' => \$url, 'useragent=s' => \$useragent, 'r|remove' => \$remove, 'v|verbose' => \$verbose, 'stdin' => \$stdin, ); # Default values $url = 'http://localhost/ocsinventory' unless $url; $useragent = 'OCS-NG_INJECTOR_PL_v'.VERSION unless $useragent; $directory = '.' unless $directory; ### $|=1; if ($file && -f $file) { loadfile($file); } elsif ($stdin) { loadstdin(); } elsif($help){ usage(); } else{ if ($directory && -d $directory) { loaddirectory($directory); } else{ die("Directory does not exist. Abort."); } } ocsinventory-server-2.2+dfsg/binutils/ocsinventory-log.README000066400000000000000000000021471303466605000244020ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2008 OCS Inventory NG Team # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ ocsinventory-log.pl is a sample that enables you to see your ocs server's activity. You have to rotate your logs daily at 00:00, using the "compressed" option to have a day level visibility (use the provided logrotate) This kind of scripts may help you to adjust server's settings, especially FREQUENCY and PROLOG_FREQ parameter. Theses are the supported parameters : -f='log file' The log file to read -a=day_before Look for a 'log_file_name.gz' according to logrotate naming system -r Summary per hour of the activity -s General summary for the day -h="hour_num" See a specific hour => -m in minutes => -d group by ten minutes ocsinventory-server-2.2+dfsg/binutils/ocsinventory-log.pl000077500000000000000000000103661303466605000240650ustar00rootroot00000000000000#!/usr/bin/perl -s $f = $f || '/var/log/ocsinventory-server/activity.log'; unless($a){ $a = 0; @lines = `cat $f`; } else{ @lines = `$f.$a.gz`; } push @heures, sprintf("%02i",$_) for(0..23); push @minutes, sprintf("%02i",$_) for(0..59); @lines = grep { /^[^;]+;[^;]+;[^;]+;[^;]+;[^;]+$v;[^;]+;[^;]+$/i } @lines if defined($v); @prologs = grep { /;(?:102|100);/i } @lines; @accepts = grep { /;100;/i } @lines; @incomings = grep { /;104;/i } @lines; @arrived = grep { /;101;/i } @lines; @errors = grep { /;515;/i } @lines; @agents = grep { /deploy.+transmitted/i } @lines; @new = grep { /;103;/i } @lines; @dup = grep { /;300;/i } @lines; @gr_nv = grep { /;306;/i } @lines; @gr_rv = grep { /;307;/i } @lines; print "\n\nSynthese - ",scalar(localtime())," - $a jours\n\n", "Prologs: ", scalar(@prologs),"\n", "Accepted: ", scalar(@accepts),"\n", "New: ", scalar(@new),"\n", "Incomings: ", scalar(@incomings),"\n", "Auto duplicates: ", scalar(@dup),"\n", "Transmitted: ", scalar(@arrived),"\n", "Errors: ", scalar(@errors),"\n", "Groups out-of-date: ",scalar(@gr_nv),"\n", "Groups revalidated: ",scalar(@gr_nv),"\n", "Dploiement: ", scalar(@agents),"\n\n" if $s; per_hour() if $r; if(defined($h)){ per_deca("$h") if $d; per_minutes("$h") if $m; } sub per_hour { print "\n\nRecapitulatif par heure - ",scalar(localtime())," - $a jours\n\n"; print "\t\t\tPrologs\t\tAccepted\tIncomings\tNew\t\tDuplicates\tTransmitted\tErrors\tgr:ood\t:gr:reval\t\tDeployed\n"; for $heure (@heures){ print "$heure heures :\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @prologs),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @accepts),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @incomings),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @new),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @dup),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @arrived),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @errors),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @gr_nv),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @gr_rv),"\t"; print "\t",scalar(grep { /$heure(?::\d\d){2}/ } @agents),"\n"; } } sub per_minutes { $heure = shift; $heure = sprintf("%02i",$heure); print scalar(localtime()),"\n\n"; print "\n\nRecapitulatif minute par minute pour $heure heures - ",scalar(localtime())," - $ai jours\n\n"; print "\t\t\t\tPrologs\t\tAccepted\tIncomings\tNew\t\tDuplicates\tTransmitted\tErrors\tgr:ood\t:gr:reval\t\tDeployed\n"; for $minute (@minutes){ print "$heure heure $minute minutes :\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @prologs),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @accepts),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @incomings),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @new),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @dup),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @arrived),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @errors),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @gr_nv),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @gr_rv),"\t"; print "\t",scalar(grep { /$heure:$minute:\d\d/ } @agents),"\n"; } } sub per_deca { $heure = shift; @deca = (0..5); print scalar(localtime()),"\n\n"; print "\n\nRecapitulatif par dix minutes pour $heure heures - ",scalar(localtime())," - $a jours\n\n"; print "\t\t\t\tPrologs\t\tAccepted\tIncomings\tNew\t\tDuplicates\tTransmitted\tErrors\tgr:ood\t:gr:reval\t\tDeployed\n"; for $minute (@deca){ print "$heure heure ($minute*10) :\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @prologs),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @accepts),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @incomings),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @new),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @dup),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @arrived),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @errors),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @gr_nv),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @gr_rv),"\t"; print "\t",scalar(grep { /$heure:$minute\d:\d\d/ } @agents),"\n"; } } ocsinventory-server-2.2+dfsg/binutils/soap-client.README000066400000000000000000000131421303466605000232740ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2008 OCS Inventory NG Team # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ soap-client is a sample that enable you to discover the ocs web service. By default, it calls get_computer_V1 method that takes XML as argument. You can configure this XML using script parameters. To use other methods, (see Apache::Ocsinventory::Interface) , call it with -f=method_name and -params='comma separated args' # Parameters # -s='' : server to query # -u='' : user to authenticate # -pw='' : user's password # -params='...,...,...,...' : Method's args # -proto='http|https' : Transport protocol # # get_computers V1 secific parameters (enable you to easily modify XML values) # -o='' : offset value (to iterate if whome result is upper than OCS_OPT_WEB_SERVICE_RESULTS_LIMIT (see ocsinventory-server.conf) # -c='' : checksum to compare with # -w='' : same principle than checksum but for other sections (dico_soft and accountinfos for the moment) # -t='' : type (META || INVENTORY)) See web service documentation In addition to CHECKSUM (&), you can also request on : => userid list => tag list => database id list. You can use these criteria in only one request, and you can put few values for each. For example: FIRST <= The name of the search engine (only this one is implemented for the moment) INVENTORY <= We want inventory date (opposite to META DATA) 1 <= We want only hardware section (if it changed since our last reset_checksum) See below. 3 <= We want the third page of the result 2 <= We want to use the software dictionary and the accountinfos foo <= We want the computers on those foo logged in bar <= ...where bar logged in room109 <= We want the computer which have the "room109 tag" room110 <= ...or the "room110" tag spare <= ...or th "spare" tag 35 <= Only the DATABASE ID 35 36 <= ...or 36 SOAP methods available : Name : get_computers_V1 Args : XML string Returns : XML Description : Main function to deal with ocsinventory computer's data (see above) Name : reset_checksum_V1 Args : a checksum, a list of Databases IDs Returns : undef on system error, "0E0" if no computers matched or the number of computers on success Description : The checksum is a bitmap used to know which inventory section has changed since last come. See Apache::Ocsinventory::Map to know the different values. For example, "hardware" section is the first bit (1). if 1 & checksum are true, you know that hardware changed since the last check. Name : ocs_config_V1 Args : option name, value Returns : value (if ok, ==value arg) or XML error (LABEL) Description : Configure ocs with an external tool Name : ocs_config_V2 Args : option name, integer value, string value Returns : XML. In case of success : , in case of error, the same as above. Description : Handle the new ocs config system (see Apache::Ocsinventory::Server::System::Config) Name : get_dico_soft_element_V1 Args : a word to look for Returns : The "formatted" name (also known as category) Description : Get the ditionnary entry of an extracted software name Name : get_history_V1 Args : page number Returns : XML. AAAA-MM-DD HH:MM:SSDEVICEIDDEVICEID ordered by date. Description : useful to know which computers has been deleted or merges (duplicates). If a "DELETED" has no "EQUIVALENT", it is a deletion. # Clear computer's history Name : clear_history_V1 Args : A number of events (the former) Returns : The number of events deleted Description : Clear computer's history Name : get_ipdiscover_devices_V1 Args : Date, Page, ninv flag Returns : XML. On error : LABEL, on success AAAA-MM-DD HH:MM:SSIPADDRESSMACADDRESSIPMASKhostname...... Description : Enable you to query ipdiscover results. The nInv flags ask to the method to only send the uninventories devices Name : ipdiscover_tag_V1 Args : macaddress, description, type, user Returns : XML Description : Register a macaddress as you can do in GUI. The type and the user must be valid in ocs database. Name : ipdiscover_untag_V1 Args : macaddress Returns : XML Description : Unregister a device Name : ipdiscover_remove_V1 Args : macaddress Returns : XML Description : Delete a device from ipdiscover results Name : ipdiscover_create_type_V1 Args : type name Returns : XML Description : Enable you to create a type remotely Name : ipdiscover_delete_type_V1 Args : type name Returns : XML Description : Remove a type For further details, see http://www.ocsinventory-ng.org/index.php?mact=News,cntnt01,detail,0&cntnt01articleid=98&cntnt01returnid=80 ocsinventory-server-2.2+dfsg/binutils/soap-client.pl000077500000000000000000000043121303466605000227540ustar00rootroot00000000000000#!/usr/bin/perl -s use SOAP::Lite; use XML::Entities; # Parameters # -s='' : server to query # -u='' : user to authenticate # -pw='' : user's password # -params='...,...,...,...' : Method's args # -proto='http|https' : Transport protocol # # get_computers V1 secific parameters (enable you to easily modify XML values) # -o='' : offset value (to iterate if whome result is upper than OCS_OPT_WEB_SERVICE_RESULTS_LIMIT (see ocsinventory-server.conf) # -c='' : checksum to compare with # -w='' : same principle than checksum but for other sections (dico_soft and accountinfos for the moment) # -t='' : type (META || INVENTORY)) See web service documentation # # Checksum decimal values #'hardware' => 1, #'bios' => 2, #'memories' => 4, #'slots' => 8, #'registry' => 16, #'controllers' => 32, #'monitors' => 64, #'ports' => 128, #'storages' => 256, #'drives' => 512, #'inputs' => 1024, #'modems' => 2048, #'networks' => 4096, #'printers' => 8192, #'sounds' => 16384, #'videos' => 32768, #'softwares' => 65536 $s = $s||'localhost'; $u = $u||''; $pw = $pw||''; $proto = $proto||'http'; @params = split ',', $params; $f = $f||get_computers_V1; # You can modify some XML tags $c = $c||131071; $t=$t||"META"; $o=$o||0; $w=defined $w?$w:131071; if( !defined(@params) && $f eq 'get_computers_V1' ){ @params=(< FIRST $t $c $o $w EOF } print "Launching soap request to proxy:\n"; print "$proto://$u".($u?':':'').($u?"$pw\@":'')."$s/ocsinterface\n"; print "Function: <$f>\n"; $i++, print "Function Arg $i: `$_'\n" for @params; print "\nIn progress... \n\n"; $lite = SOAP::Lite ->uri("$proto://$s/Apache/Ocsinventory/Interface") ->proxy("$proto://$u".($u?':':'').($u?"$pw\@":'')."$s/ocsinterface\n") ->$f(@params); if($lite->fault){ print "ERROR:\n\n",XML::Entities::decode( 'all', $lite->fault->{faultstring} ),"\nEND\n\n"; } else{ my $i = 0; for( $lite->paramsall ){ print "===== RESULT $i ===== \n".XML::Entities::decode( 'all', $_ )."\n"; $i++; } } ocsinventory-server-2.2+dfsg/dtd/000077500000000000000000000000001303466605000171205ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/dtd/Interface/000077500000000000000000000000001303466605000210205ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/dtd/Interface/get_computers_V1-request.dtd000066400000000000000000000003041303466605000264260ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/download_request.dtd000066400000000000000000000003121303466605000231700ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/file_request.dtd000066400000000000000000000003041303466605000223010ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/inventory_reply.dtd000066400000000000000000000003261303466605000230660ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/inventory_request.dtd000066400000000000000000000127451303466605000234330ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/prolog_reply.dtd000066400000000000000000000014721303466605000223360ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/prolog_request.dtd000066400000000000000000000002101303466605000226600ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/snmp_request.dtd000066400000000000000000000063411303466605000223460ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/update_reply.dtd000066400000000000000000000002371303466605000223140ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/dtd/update_request.dtd000066400000000000000000000002771303466605000226550ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/etc/000077500000000000000000000000001303466605000171205ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/etc/logrotate.d/000077500000000000000000000000001303466605000213425ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/etc/logrotate.d/ocsinventory-server000066400000000000000000000002521303466605000253320ustar00rootroot00000000000000# Rotate OCS Inventory NG Communication server logs daily # Save 7 days old logs in compressed mode PATH_TO_LOG_DIRECTORY/*.log { daily rotate 7 compress missingok } ocsinventory-server-2.2+dfsg/etc/ocsinventory/000077500000000000000000000000001303466605000216625ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/etc/ocsinventory/ocsinventory-reports.conf000066400000000000000000000062201303466605000267670ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Administration Server # # Copyleft 2008 OCS Inventory NG Team # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # # ANY CHANGE ON THIS FILE REQUIRES APACHE RESTART TO TAKE EFFECT # ################################################################################ # Administration console public pages # # Alias used to put Administration Server static page (typically PHP) outside # Apache document root directory # Alias OCSREPORTS_ALIAS PATH_TO_OCSREPORTS_DIR # By default, users can use console from everywhere # Apache 2.4 Require all granted Order deny,allow Allow from all Options Indexes FollowSymLinks DirectoryIndex index.php AllowOverride Options # Uncomment following to force use of HTTPS in Administration Server #SSLRequireSSL # PHP tuning (not working on all distribution, use php.ini instead) AddType application/x-httpd-php .php php_flag file_uploads on # Some PHP tuning for deployment feature up to 8 MB # post_max_size must be greater than upload_max_filesize # because of HTTP headers php_value post_max_size 101m php_value upload_max_filesize 100m # You may have to uncomment following on errors #php_value max_execution_time -1 #php_value max_input_time -1 #!! Mandatory !! : set magic_quotes_gpc to off (to make ocsreports works correctly) php_flag magic_quotes_gpc off # Uncomment following to allow HTTP body request up to 4 MB # instead default 512 KB #LimitRequestBody 4194304 # Uncomment following if you need to specify a mysql socket #php_value mysql.default_socket "path/to/mysql/unix/socket" ################################################################################ # Deployment packages download area # # Alias to put Deployment package files outside Apache document root directory # # Apache 2.4 Require all granted Order deny,allow Allow from all Alias PACKAGES_ALIAS PATH_TO_PACKAGES_DIR ################################################################################ # Snmp communities area # # Alias to put Snmp custom Mibs files outside Apache document root directory # # Apache 2.4 Require all granted Order deny,allow Allow from all Alias SNMP_ALIAS PATH_TO_SNMP_DIR ocsinventory-server-2.2+dfsg/etc/ocsinventory/ocsinventory-server.conf000066400000000000000000000322111303466605000265760ustar00rootroot00000000000000################################################################################ # # OCS Inventory NG Communication Server Perl Module Setup # # Copyleft 2006 Pascal DANEK # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # Which version of mod_perl we are using # For mod_perl <= 1.999_21, replace VERSION_MP by 1 # For mod_perl > 1.999_21, replace VERSION_MP by 2 PerlSetEnv OCS_MODPERL_VERSION VERSION_MP # Master Database settings # Replace DATABASE_SERVER by hostname or ip of MySQL server for WRITE PerlSetEnv OCS_DB_HOST DATABASE_SERVER # Replace DATABASE_PORT by port where running MySQL server, generally 3306 PerlSetEnv OCS_DB_PORT DATABASE_PORT # Name of database PerlSetEnv OCS_DB_NAME ocsweb PerlSetEnv OCS_DB_LOCAL ocsweb # User allowed to connect to database PerlSetEnv OCS_DB_USER ocs # Password for user PerlSetVar OCS_DB_PWD ocs # Slave Database settings # Replace DATABASE_SERVER by hostname or ip of MySQL server for READ # Useful if you handle mysql slave databases # PerlSetEnv OCS_DB_SL_HOST DATABASE_SERVER # Replace DATABASE_PORT by port where running MySQL server, generally 3306 # PerlSetEnv OCS_DB_SL_PORT_SLAVE DATABASE_PORT # User allowed to connect to database # PerlSetEnv OCS_DB_SL_USER ocs # Name of the database # PerlSetEnv OCS_DB_SL_NAME ocsweb # Password for user # PerlSetVar OCS_DB_SL_PWD ocs # Path to log directory (must be writeable) PerlSetEnv OCS_OPT_LOGPATH "PATH_TO_LOG_DIRECTORY" # If you need to specify a mysql socket that the client's built-in #PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET "path/to/mysql/unix/socket" # DBI verbosity PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0 # Unicode support PerlSetEnv OCS_OPT_UNICODE_SUPPORT 1 # If you are using a multi server architecture, # Put the ip addresses of the slaves on the master # (This is read as perl regular expressions) PerlAddVar OCS_OPT_TRUSTED_IP 127.0.0.1 #PerlAddVar OCS_OPT_TRUSTED_IP XXX.XXX.XXX.XXX # ===== WEB SERVICE (SOAP) SETTINGS ===== PerlSetEnv OCS_OPT_WEB_SERVICE_ENABLED 0 PerlSetEnv OCS_OPT_WEB_SERVICE_RESULTS_LIMIT 100 # PerlSetEnv OCS_OPT_WEB_SERVICE_PRIV_MODS_CONF "WEBSERV_PRIV_MOD_CONF_FILE" # Be careful: you must restart apache to make settings taking effects # Configure engine to use the settings from this file PerlSetEnv OCS_OPT_OPTIONS_NOT_OVERLOADED 0 # Try to use other compress algorithm than raw zlib # GUNZIP and clear XML are supported PerlSetEnv OCS_OPT_COMPRESS_TRY_OTHERS 1 ############################################################## # ===== OPTIONS BELOW ARE OVERLOADED IF YOU USE OCS GUI =====# ############################################################## # NOTE: IF YOU WANT TO USE THIS CONFIG FILE INSTEAD, set OCS_OPT_OPTIONS_NOT_OVERLOADED to '1' # ===== MAIN SETTINGS ===== # Enable engine logs (see LOGPATH setting) PerlSetEnv OCS_OPT_LOGLEVEL 0 # Specify agent's prolog frequency PerlSetEnv OCS_OPT_PROLOG_FREQ 12 # Configure the duplicates detection system PerlSetEnv OCS_OPT_AUTO_DUPLICATE_LVL 15 # Futur security improvements PerlSetEnv OCS_OPT_SECURITY_LEVEL 0 # Validity of a computer's lock PerlSetEnv OCS_OPT_LOCK_REUSE_TIME 600 # Enable the history tracking system (useful for external data synchronisation PerlSetEnv OCS_OPT_TRACE_DELETED 0 # ===== INVENTORY SETTINGS ===== # Specify the validity of inventory data PerlSetEnv OCS_OPT_FREQUENCY 0 # Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load) PerlSetEnv OCS_OPT_INVENTORY_DIFF 1 # Make engine consider an inventory as a transaction (lower concurency, better disk usage) PerlSetEnv OCS_OPT_INVENTORY_TRANSACTION 1 # Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load PerlSetEnv OCS_OPT_INVENTORY_WRITE_DIFF 1 # Enable some stuff to improve DB queries, especially for GUI multicriteria searching system PerlSetEnv OCS_OPT_INVENTORY_CACHE_ENABLED 1 # Specify when the engine will clean the inventory cache structures PerlSetEnv OCS_OPT_INVENTORY_CACHE_REVALIDATE 7 # Enable you to keep trace of every elements encountered in db life PerlSetEnv OCS_OPT_INVENTORY_CACHE_KEEP 1 # ===== SOFTWARES DEPLOYMENT SETTINGS ===== # Enable this feature PerlSetEnv OCS_OPT_DOWNLOAD 0 # Package which have a priority superior than this value will not be downloaded PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10 # Time between two download cycles (bandwidth control) PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60 # Time between two fragment downloads (bandwidth control) PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60 # Specify if you want to track packages affected to a group on computer's level PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1 # Time between two download periods (bandwidth control) PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60 # Agents will send ERR_TIMEOUT event and clean the package it is older than this setting PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7 # Agents will send an error event and clean the package if package command does not respond during this setting PerlSetEnv OCS_OPT_DOWNLOAD_EXECUTION_TIMEOUT 120 # Enable ocs engine to deliver agent's files (deprecated) PerlSetEnv OCS_OPT_DEPLOY 0 # Enable the softwares deployment capacity (bandwidth control) # ===== GROUPS SETTINGS ===== # Enable the computer\s groups feature PerlSetEnv OCS_OPT_ENABLE_GROUPS 1 # Random number computed in the defined range. Designed to avoid computing many groups in the same process PerlSetEnv OCS_OPT_GROUPS_CACHE_OFFSET 43200 # Specify the validity of computer's groups (default: compute it once a day - see offset) PerlSetEnv OCS_OPT_GROUPS_CACHE_REVALIDATE 43200 # ===== IPDISCOVER SETTINGS ===== # Specify how much agent per LAN will discovered connected peripherals (0 to disable) PerlSetEnv OCS_OPT_IPDISCOVER 2 # Specify the minimal difference to replace an ipdiscover agent PerlSetEnv OCS_OPT_IPDISCOVER_BETTER_THRESHOLD 1 # Time between 2 arp requests (mini: 10 ms) PerlSetEnv OCS_OPT_IPDISCOVER_LATENCY 100 # Specify when to remove a computer when it has not come until this period PerlSetEnv OCS_OPT_IPDISCOVER_MAX_ALIVE 14 # Disable the time before a first election (not recommended) PerlSetEnv OCS_OPT_IPDISCOVER_NO_POSTPONE 0 # Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents) PerlSetEnv OCS_OPT_IPDISCOVER_USE_GROUPS 1 # ===== INVENTORY FILES MAPPING SETTINGS ===== # Use with ocsinventory-injector, enable the multi entities feature PerlSetEnv OCS_OPT_GENERATE_OCS_FILES 0 # Generate either compressed file or clear XML text PerlSetEnv OCS_OPT_OCS_FILES_FORMAT OCS # Specify if you want to keep trace of all inventory between to synchronisation with the higher level server PerlSetEnv OCS_OPT_OCS_FILES_OVERWRITE 0 # Path to ocs files directory (must be writeable) PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp # ===== FILTER SETTINGS ===== # Enable prolog filter stack PerlSetEnv OCS_OPT_PROLOG_FILTER_ON 0 # Enable core filter system to modify some things "on the fly" PerlSetEnv OCS_OPT_INVENTORY_FILTER_ENABLED 0 # Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP 0 # Period definition for INVENTORY_FILTER_FLOOD_IP PerlSetEnv OCS_OPT_INVENTORY_FILTER_FLOOD_IP_CACHE_TIME 300 # Enable inventory filter stack PerlSetEnv OCS_OPT_INVENTORY_FILTER_ON 0 # ===== DATA FILTER ===== #Enable the dat filtering capacity PerlSetEnv OCS_OPT_DATA_FILTER 0 # Set the table names and the field associated you want to filter #PerlAddVar OCS_OPT_DATA_TO_FILTER HARDWARE #PerlAddVar OCS_OPT_DATA_TO_FILTER USERID # ===== REGISTRY SETTINGS ===== # Enable the registry capacity PerlSetEnv OCS_OPT_REGISTRY 1 # ===== SNMP SETTINGS ===== # Enable the SNMP capacity PerlSetEnv OCS_OPT_SNMP 0 # Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) PerlSetEnv OCS_OPT_SNMP_INVENTORY_DIFF 1 # Display error message about agent https communication in logfile PerlSetEnv OCS_OPT_SNMP_PRINT_HTTPS_ERROR 1 # ===== SESSION SETTINGS ===== # Not yet in GUI # Validity of a session (prolog=>postinventory) PerlSetEnv OCS_OPT_SESSION_VALIDITY_TIME 600 # Consider a session obsolete if it is older thant this value PerlSetEnv OCS_OPT_SESSION_CLEAN_TIME 86400 # Accept an inventory only if required by server #( Refuse "forced" inventory) PerlSetEnv OCS_OPT_INVENTORY_SESSION_ONLY 0 # ===== TAG ===== # The default behavior of the server is to ignore TAG changes from the # agent. PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 0 # ===== EXTERNAL USERAGENTS ===== #Path for external useragents reference file #!! WARNING !! : external agents may not be supported by OCS NG Community ! #PerlSetEnv OCS_OPT_EXT_USERAGENTS_FILE_PATH /tmp/yourfile.txt # ===== PLUGINS ===== PerlSetEnv OCS_PLUGINS_PERL_DIR "PATH_TO_PLUGINS_PERL_DIRECTORY" PerlSetEnv OCS_PLUGINS_CONF_DIR "PATH_TO_PLUGINS_CONFIG_DIRECTORY" # ===== DEPRECATED ===== # Set the proxy cache validity in http headers when sending a file PerlSetEnv OCS_OPT_PROXY_REVALIDATE_DELAY 3600 # Deprecated PerlSetEnv OCS_OPT_UPDATE 0 ############ DO NOT MODIFY BELOW ! ####################### # External modules PerlModule Apache::DBI PerlModule Compress::Zlib PerlModule XML::Simple # Ocs plugins PerlModule Apache::Ocsinventory::Plugins::Apache PerlModule Apache::Ocsinventory::Plugins # Ocs PerlModule Apache::Ocsinventory PerlModule Apache::Ocsinventory::Server::Constants PerlModule Apache::Ocsinventory::Server::System PerlModule Apache::Ocsinventory::Server::Communication PerlModule Apache::Ocsinventory::Server::Inventory PerlModule Apache::Ocsinventory::Server::Duplicate # Capacities PerlModule Apache::Ocsinventory::Server::Capacities::Registry PerlModule Apache::Ocsinventory::Server::Capacities::Update PerlModule Apache::Ocsinventory::Server::Capacities::Ipdiscover PerlModule Apache::Ocsinventory::Server::Capacities::Download PerlModule Apache::Ocsinventory::Server::Capacities::Notify PerlModule Apache::Ocsinventory::Server::Capacities::Snmp # This module guides you through the module creation # PerlModule Apache::Ocsinventory::Server::Capacities::Example # This module adds some rules to filter some request sent to ocs server in the prolog and inventory stages # PerlModule Apache::Ocsinventory::Server::Capacities::Filter # This module add availibity to filter data from HARDWARE section (data filtered won't be stored in database) # PerlModule Apache::Ocsinventory::Server::Capacities::Datafilter # PerlTaintCheck On # SSL apache settings #SSLEngine "SSL_ENABLE" #SSLCertificateFile "SSL_CERTIFICATE_FILE" #SSLCertificateKeyFile "SSL_CERTIFICATE_KEY_FILE" #SSLCACertificateFile "SSL_CERTIFICATE_FILE" #SSLCACertificatePath "SSL_CERTIFICATE_PATH" #SSLVerifyClient "SSL_VALIDATE_CLIENT" # Engine apache settings # "Virtual" directory for handling OCS Inventory NG agents communications # Be careful, do not create such directory into your web server root document ! # Apache 2.4 Require all granted # Apache 2.2 order deny,allow allow from all # If you protect this area you have to deal with http_auth_* agent's parameters # AuthType Basic # AuthName "OCS Inventory agent area" # AuthUserFile "APACHE_AUTH_USER_FILE" # require valid-user SetHandler perl-script PerlHandler Apache::Ocsinventory #Web Service for plugin engine # Apache 2.4 Require local # Apache 2.2 order deny,allow allow from 127.0.0.1 SetHandler perl-script PerlHandler Apache::Ocsinventory::Plugins::Apache # Web service apache settings PerlModule Apache::Ocsinventory::SOAP SetHandler perl-script PerlHandler "Apache::Ocsinventory::SOAP" # By default, you can query web service from everywhere with a valid user # Apache 2.4 Require all granted Order deny,allow Allow from all AuthType Basic AuthName "OCS Inventory SOAP Area" # Use htpasswd to create/update soap-user (or another granted user) AuthUserFile "APACHE_AUTH_USER_FILE" # Apache 2.4 Require user "SOAP_USER" require "SOAP_USER" ocsinventory-server-2.2+dfsg/ocsreports/000077500000000000000000000000001303466605000205505ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/Changes000077500000000000000000000517001303466605000220510ustar00rootroot00000000000000Revision history for ocsreports 2.2RC * New plugin system with automatic installation * New plugin API created in order to modify create or modify OCS element easly. * Cosmetic fix on computer menu. * Packet system rework, use of the new class ziparchive (Thx to paul) * Redistribution server are now working correctly * Workflow feature has been removed * Ldap Configuration is now working ( Was broken in 2.2B1 ) * Fix a bug which throw an error on PHP 5.5+ * function_ipdiscover.php has been modified for handling new oui.txt files (thx to paul) * All arrays now have a saving feature which permits to save order and column config (thx to paul) * Cosmetic fix for large screen * Cosmetic fix on the config menu (input overflow) 2.2beta1 * hide alert messages * new install file * Migrate menus, urls and js config to XML files * Add new menu for computer sections * Add new menu for main sections * Add update methode * Add password version * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1342210 2.1.1 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1283089 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1277904 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1086324 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1260764 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1266229 2.1 * add DEVICEID field on sim tables * add virtual machines info on snmp details * add news fields for printers * active alert messages on GUI for sadmin profil * fix LDAP bug https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/915301 * fix bug on WOL * delete @ for ldap errors * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1019060. Delete registry cache where delete a key * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1023436 (cosmetic) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/612966 (lock/unlock GUI) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/806035 (ipdiscover) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1250428 (ldap case sensitive) * add osversion column for multisearch => https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/905544 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/772680 (ocsbase.sql admin/ladmin) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/806850 (ipdiscover id) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/807406 (ipdiscover sort percentage) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/931373 (administrative data search) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1240166 (bug on groups search) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1091580 (accountinfo checkboxes) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1152596 (vm relation to host) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/924756 (uppercase letters in console) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1168382 (ugly computer details when more then 3 ip addresses) * verify if directory of redistribution server exist * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1011531 (delete redistribution packages on disk) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/1051850 (no computer name in csv export of duplicates) * Add an example for plugin (how to develop one) 2.1RC1 * active SNMP V3 * change info on processor on computer details * add pda info on computer details * fix bug on accountinfo (with uploadfile>64ko) * add advanced options for teledeploy * change ocs logo * add wake on lan on computer * add wake on lan on multi search * Remove Support * add SNMP field to scan multi networks * Add QRcode on accountinfo * Add architecture field * fix bug on softwares detail on computer * sort categories on dictionary 2.0.6 * fix security vulnerability => Cross site request forgery * fix utf8 problem * add link on dico ignore * fix bug on menu (http://forums.ocsinventory-ng.org/viewtopic.php?pid=49125) * fix bug on export data on all_soft * add oscomment field on tab 2.0.5 * Add logs directory on sql files * fix Warning on function_config_generale.php for PHP 5.4. * fix security bug https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/963229 * fix security bug https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/963017 * fix bug on package's group - Tx to FactorFx. * fix cas library - use system library * fix warning on natcasesort function. tx to Remi for this patch * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/940370 (redistribution group) 2.0.4 * fix a part of this bug https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/907755 (show computers name on csv export) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/918085 * fix bug on menu by profil * on deployment statistics, merge EXIT_CODE_% with ERROR. * add LDAP group merbership lookups.(http://forums.ocsinventory-ng.org/viewtopic.php?pid=45215) * fix http://forums.ocsinventory-ng.org/viewtopic.php?pid=45331#p45331 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/893463 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/902510 * You can add snmp communities with the same name with different version * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/878166 * sort all select list * utf8 patch : http://forums.ocsinventory-ng.org/viewtopic.php?pid=43927#p43927 2.0.3 * security fix: https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/884340 (XSS) * security fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/884273 * security fix for snmp https://bugs.launchpad.net/ocsinventory-server/+bug/881406 * use CONF_MYSQL * patch from remi to upgrade 1.3.* to 2.* (to save old values dbconfig.inc.php) * fix: add computer's name on delete popup * security fix (CVE-2011-4024) - more flexible (UTF8 correction) 2.0.2 * add bios date on all computers and sort on date * fix for security alert tx to Nicolas DEROUET (CVE-2011-4024) * fix bug on "Machines not see since more of x day(s)" see http://forums.ocsinventory-ng.org/viewtopic.php?pid=43148#p43148 * fix bug on accountinfo filter (http://forums.ocsinventory-ng.org/viewtopic.php?pid=43061#p43061) * update polish language file. tx to Piotr Adamcio * fix bug on softwares detail on computer * sort categories on dictionary 2.0.1 * fix bug on order by ip addresses (http://forums.ocsinventory-ng.org/viewtopic.php?pid=42066) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/842809 * configure the defaut number result by page * add message for max_allowed_packet MySQL conf * fix logout of CAS connexion (http://forums.ocsinventory-ng.org/viewtopic.php?pid=41923#p41923) * fix bug on package search * show macaddress info and fix bug on link. * delete jpgraph and fusionCharts librairies. Now we use elycharts librairie (http://elycharts.com) * fix http://forums.ocsinventory-ng.org/viewtopic.php?pid=41775#p41775 and use language files * add a query condition to display icon (computer's details) * delete verdana font * add error message when max_allowed_packet (mysql configuration) is smaller than the file sent * fix bug: use separator for column name on export file * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/807412 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/814050 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/825333 (can see group's detail from computer's detail) * Fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/825332 * fix default language to english (https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/824434) * fix bug on add/delete computors in a group for restricted profil. * FIX: unable to search LDAP from root of tree http://forums.ocsinventory-ng.org/viewtopic.php?pid=38310#p38310 * add export XML inventory * add plugins options * change delete computers function (no orphans on plugins tables) * https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/812861 * add possibility to show mac address on "all computers". * Add checkbox to delete few computers. * https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/806040 * https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/810990 * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/810001 (add EXIT_CODE on stats) * fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/788624 (search on the value checkbox) * fix bug https://bugs.launchpad.net/bugs/807432 (ipdiscover) * add new fields on snmp_loadbalancers table * fix bug on ipaddress search * force not strict mysql mode and utf8 format on backend connexion * can delete computers on ms_doubles.php page * use type tables (softwares, field => NAME, VERSION). Enhance request time * active invisible package on teledeploy * fix bug on "user can't update accoutinfo" option. see http://forums.ocsinventory-ng.org/viewtopic.php?pid=39592#p39592 * update german language file. Tx to dilldappe * fix bug on console. Add restriction for limited ocs user * fix bug on css/ocsreports.css (http://forums.ocsinventory-ng.org/viewtopic.php?pid=38872#p38872) * fix bugs on details groups checklist. (static exclu/inclu) * you can create a dynamic group without computer * fix bug on old groups * fix bug on ipdiscover detail filter * fix bug on console (link to multisearch) * fix bug on mysql_insert_id * add '-' and '_' to sql fields * add serial number of memories * fix bug on delete package when status="ERR_" * activate security messages * fix bug 781220 (sql request on groups) 2.0 * if you change configuration => reload all values for your session * activate support * fix bug on export soft and all soft page (diplicate data) * add cache for console page * active stat on ms_tele_activate.php * change msg_* logs => log only msg_error * fix bug on xampp installation on windows http://forums.ocsinventory-ng.org/viewtopic.php?id=8228 * fix bug on SSO authentification * launch config.txt for computers details and snmp details only one time by session * the number of pages is saved in session/cookies * fix bug on update old accountinfo (date format => varchar(10)) * fix bug #767032 * fix bug #771669 if you have multiple table on a page, you can sort each column of each table * reload page when you add a new tab (accountinfo) * encode info file with xml encode * add messages when you add a profil and verify if you can create/delete a profil * fix double in the list of computers * add choise on repart tags page * add slashes on command to info file (teledeploy) * force SQL format for new accountinfo and new field in wk of teledeploy * add option to profil => authorize or not the removal of computers * check if accountinfo field exist when you see computer details * fix this pb: http://forums.ocsinventory-ng.org/viewtopic.php?pid=36161 field name => uppercase and no space * You can access to computer admin info if you admin his subnet * fix Bug #761523 (export data) 2.0 rc4 * fix bug https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/666124 * fix bug on groups message (console) * fix problem with tags value (if you customised your identification) * if SSO connexion, don't show deconnect button * fix bug on search with calendar http://forums.ocsinventory-ng.org/viewtopic.php?id=7980 * fix bug Bug #744241 (add accountinfo on duplicates screen) * fix bug on wk of telediff => you can affect a package only if IT_SET_NIV_% are ok * fix bug on computer details => if serial number == 0 you can blacklist it. * fix bug on blacklist serial => you can add new serial to blacklist * add accountinfo on groups show * update italian file //tx to Passero 2.0 rc3 * active cache mode on GUI * add vm on computers views * change look and feel on install.php * Add constants in var.php * fix Bug #725466 * fix bug http://forums.ocsinventory-ng.org/viewtopic.php?pid=34495#p34495 * fix bug on export csv * fix bug on ipdiscover (shows all the subnets even if no machine is elected) * fix Bug #726532 (Duplicate manager report duplicate devices) * change LOCAL_SERVER and LOCAL_PORT to LOCAL_URI_SERVER. * add plugin functionality on stats page * fix bug on group show * use mysql2_query_secure function in function_groups.php * Fix Bug #727267 (admin ipdiscover) * Fix Bug #726516 (accountinfo problems) * fix bug on ipdiscover => update name * fix bug on activation. * add ipdiscover analyse if you have ipdiscover-util.pl. * update oui.txt * add demo mode * update wk of teledeploy (more user friendly) * force sql mode not strict * change REVALIDATE_FROM INT(11) DEFAULT 0 (bug for revalidate groups) * add xml header in info files * add filter on stats 2.0 rc2 * Add "show all computer detail" * Add "show all" option in all table * Fix bug on packet activation. * Add reference field on snmp cards details . * fix bug on package activation (force to http and https) * Fix bug => activate a package on servers groups * Fix bug when creating a package. Nb frag can be egal to 0 * fix bug on redistribution servers group * fix bug on computer configuration when no group exist * fix display bug on ms_custom_pack.php * Fix bug on multi search * Use language files on groups details * Fix bug on cookies (columns tab) * Fix bug on teledeploy workflow. You can delete your fields * Fix problem with activation (Bug #704073) * add bios type to multi search * update language files * Fix bug on many browsers on multi search (bug 694939) 2.0 rc1 * Delete doc of jpgraph and fusionCrartsFree * Add graph with jpgraph librarie * Fix bug on accountinfo snmp * Change LINUX to UNIX/LINUX in package creation page * New version of all_soft page * Fix warning in html_header.php * Add message if directory not exist. * Fix bug: use a special name var for msg info in html_header * Fix DOCUMENT_REAL_ROOT bug * Add IT set management light. Configuration and details of computer are done. Next step: search on these new fields * Show directory of 4all_config.txt * Add some stats * Fix language bug on database * Choose your directory for your profils config files, old config file * Fix bugs on function_table_html.php * New graph for teledeploy speed * Add FusionChartsFree for graphs * Add functionality: UTF8 for new databases * Create new database on UTF8 format * If database UTF8 format => only ocsbase_new.sql * New plugin system: you can now create your own plugins easily * Add .xml to local import * Add old page for redistribution servers * Delete print option and show all * Add avaailibility to see all your subnet and you can blacklist subnet in ipdiscover * You can now configure blacklist in /backend/ipdiscover/methode/local.php * Rename config.txt for snmp and computer detail * Using mysql2_query_secure now * Add new option: tabcache => GUI tables cache * Reset all tab cache * Show SNMP data * Add snmp functionality for a computer or a group * Update for french file * Use dbname=ocsweb by default if dbname doesn't exist * Fix bugs on notes (computers infos) * Add script to update your accountinfo 1.x.x.x => 2.x.x.x * Add fields on multisearch * Add fields on softwares table GUID, LANGUAGE, INSTALLDATE et BITSWIDTH * Add COMMENTS and VERSION fields * Reload the origin page when you update config/teledeploy values * Use LDAP for identify and connect on ocsreports. * Add title to ipdiscover page. * Add workflow for teledeploy * New version of local import and manage your ocs clients * Fix https://bugs.launchpad.net/bugs/685581 (thanks to Passero) * New version of client injector * Fix link bug on multi search (thnaks to Damien) * New version of label * Add Copyleft on php pages * Fix bug: delete table cache when you clic on icon menu * Various patches from Adam Buchbinder * Various patches from Passero * Add snmp tab on snmp details * Fix utf8 bugs * Force utf8 format * Fix bug on teledeploy activation => use config values when exist * Format all data in UTF8 when it's necessary (thanks to Damien) * Fix bug on groups: use the function to delete a group * Add : select database name in install.php * Disable option INVENTORY_VALIDITY * Fix bug when you delete a snmp item * Force SNMP_DIR value + small fix * News sections in snmp details * Add SNMP_INVENTORY_DIFF on config table * New xml format for snmp communities * Add your complex accountinfo on snmp data * Add CAS authentification (thanks to FranciX contribution http://forums.ocsinventory-ng.org/viewtopic.php?pid=30974) * Fix field sort bugs * Fix bug https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/649575 (thanks to Passero) * Use complex tag for snmp data * Add availibility to configure separator when you export file * Various Italian translations (thanks to Passero) * Fix Bug 658107 : https://bugs.launchpad.net/bugs/658107 (thanks to Pieroliste) * Administrate your snmp community * New version of snmp communities * Fix bug 654645 * Add snmp functionality for a computer or a group * Show all double even when it is equal to 0 * Use standard function for messages * Fix bug: https://bugs.launchpad.net/bugs/637839 (thanks to Passero) * Fix bug: https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/637834 * Blacklist your subnet for ipdiscover * Use new icons and new alert msg. * Enhance ocs profiles manangement (new, update, delete) * Fix bug on group's cache * Replace function ereg_replace (DEPRECATED) by str_replace * Fix groups cache bug : http://forums.ocsinventory-ng.org/viewtopic.php?pid=29648 (thanks to cedric67). When you remove computers, they were not removed from the groups cache * Add subnet blacklist * Fix bug on all computers => you can delete a computer now (thanks to Zefox) * Fix bug on ipdiscover : if subnet uid == 0 + you can modify a type * User can see statistic of déployment (only for his computers) * Add SNMP option on configuration * Fix bugs with mac addresses * Fix bug on workflow telediff: When deleting a field due to orphaned data in tables (thanks to Zefox) * Fix bug: tag can't be updated (thanks to Guillaume Priou) * Fix bug: https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/611160 (thanks to Passero) * Add logs when someone try to connect (accept or failed ) * Fix bug: when you use filter on table, now, you use new function for mysql query (mysql2_query_secure) * If no status is active, displays only status tab * Fix bug with tag column * Use tab_modif_values function to add a new static group * Fix bug: you can update and post request deployment * Fix: add message when status is updated + keep the values sent when error was detected (thanks to Zefox) * Fix bug: generate table cache if requete and arg are new (mysql2_query_secure) (thanks to Zefox) * Delete exactly in select when this is a date (thanks to frankb) * Use mysql2_query_secure and add a new config function for admin user groups * Use new accountinfo in multi search: http://forums.ocsinventory-ng.org/viewtopic.php?id=6476 (Thanks to teone) * Fix bug: https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/... * Add search on STORAGES table + more details on cd_storages * Add ASSETTAG on search & on computer_detail * Fix bug: https://bugs.launchpad.net/bugs/602234 * Add search on complex accountinfo * Move a field only if you have rights * Use mysql2_query_secure * Fix bug: don't remove the backslashes in the address registr... * Add new order in accountinfo_config table when a new accoutinfo is post. * Add radio button on tag config * You can now modify the lbl of a tab (accountinfo) * Add radio button for tag * Fix https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/597682 * New accountinfo page * Fix bug with old cookies when you update OCSREPORT (thanks to Remi Collet) * Fix bad column name on ocsbase.sql in downloadwk_pack table * Various patches from JOF300 * Various patches from Pierfrancesco Passerini * New OCS plugin: simplify research on existing software on the computer equipment. You can print the list of results ocsinventory-server-2.2+dfsg/ocsreports/Contributors.txt000066400000000000000000000005541303466605000240120ustar00rootroot00000000000000These people help ocsinventory-ng to fix bugs and make the 2.2 server real ! :-) - GeorgeAlexandre - ilalex - nirgal - palaniyappanBala - remicollet - StCyr - stweil - sieutruc - mike45 - daks - emiliocm - mtbadi39 - mickythekiller - correajl - headquaker - benkohler - prodced - linuxmail - ameurou - pchamo - Kallistiman - paulbsd - nntuocsinventory-server-2.2+dfsg/ocsreports/LICENCE000066400000000000000000000431761303466605000215500ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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 Lesser 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. {description} Copyright (C) {year} {fullname} 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 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. {signature of Ty Coon}, 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 Lesser General Public License instead of this License. ocsinventory-server-2.2+dfsg/ocsreports/README.md000066400000000000000000000000151303466605000220230ustar00rootroot00000000000000# ocsreports ocsinventory-server-2.2+dfsg/ocsreports/ajax.php000077500000000000000000000022041303466605000222050ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/000077500000000000000000000000001303466605000221375ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/000077500000000000000000000000001303466605000227005ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/auth.php000077500000000000000000000070411303466605000243570ustar00rootroot00000000000000 Connexion LOGIN/PASSWD on OCS base * => Connexion LOGIN/PASSWD on LDAP * If you want add you method to connect to ocs * add your page on /require and modify $list_methode * */ require_once(BACKEND.'require/connexion.php'); //If you want a html form for the connexion //put $affich_method='HTML' $affich_method='HTML'; //If you use an SSO connexion //use this configuration //$affich_method='SSO'; //$list_methode=array(0=>"always_ok.php"); // Author: FranciX // http://forums.ocsinventory-ng.org/viewtopic.php?pid=30974 //If you use an CAS connexion //use this configuration //$affich_method='CAS'; //$list_methode=array(0=>"always_ok.php"); //list of the identification method //3 pages by default: ldap.php => LDAP Connexion // local.php => Local connexion on ocs base // always_ok.php => connexion always ok $list_methode=array(0=>"local.php"); // $list_methode=array(0=>"ldap.php"); if ($affich_method == 'HTML' and isset($protectedPost['Valid_CNX']) and trim($protectedPost['LOGIN']) != ""){ $login=$protectedPost['LOGIN']; $mdp=$_POST['PASSWD']; $protectedMdp=$protectedPost['PASSWD']; }elseif ($affich_method == 'CAS'){ require_once('methode/cas.php'); }elseif ($affich_method != 'HTML' and isset($_SERVER['PHP_AUTH_USER'])){ $login=$_SERVER['PHP_AUTH_USER']; $mdp=$_SERVER['PHP_AUTH_PW']; }elseif($affich_method == 'SSO' and isset($_SERVER['HTTP_AUTH_USER'])){ $login=$_SERVER['HTTP_AUTH_USER']; $mdp='NO_PASSWD'; } if (isset($login) && isset($mdp)){ $i=0; while ($list_methode[$i]){ require_once('methode/'.$list_methode[$i]); if ($login_successful == "OK") break; $i++; } } // login ok? if($login_successful == "OK" and isset($login_successful)) { $_SESSION['OCS']["loggeduser"]=$login; $_SESSION['OCS']['cnx_origine']=$cnx_origine; $_SESSION['OCS']['user_group']=$user_group; unset($protectedGet); }else{ //show HTML form if ($affich_method == 'HTML'){ $icon_head='NO'; require_once (HEADER_HTML); if (isset($protectedPost['Valid_CNX'])){ $login_successful = $l->g(180); msg_error($login_successful); flush(); //you can't send a new login/passwd before 2 seconds sleep(2); } echo "
"; $name_field=array("LOGIN","PASSWD"); $tab_name=array($l->g(24).": ",$l->g(217).":"); $type_field= array(0,4); $value_field=array($protectedPost['LOGIN'],''); $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=20; } if (DEMO) { msg_info($l->g(24).": ".DEMO_LOGIN."
".$l->g(217).": ".DEMO_PASSWD); } if (isset($tab_typ_champ)){ tab_modif_values($tab_name, $tab_typ_champ, array(), array( 'button_name' => 'CNX', 'show_button' => 'BUTTON' )); } require_once(FOOTER_HTML); die(); }else{ header('WWW-Authenticate: Basic realm="OcsinventoryNG"'); header('HTTP/1.0 401 Unauthorized'); die(); } } ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/methode/000077500000000000000000000000001303466605000243255ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/methode/always_ok.php000077500000000000000000000010351303466605000270310ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/methode/cas.php000077500000000000000000000014431303466605000256110ustar00rootroot00000000000000client(CAS_VERSION_2_0,$cas_host,$cas_port,$cas_uri); $cas->forceAuthentication(); $login = $cas->getUser(); $mdp = ""; if ($login){ $login_successful = "OK"; $cnx_origine="CAS"; $user_group="CAS"; } ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/methode/ldap.php000077500000000000000000000107151303466605000257650ustar00rootroot00000000000000 from original OCS code. * * I'm fetching a few LDAP attributes to fill in the user record, namely sn,cn,givenname and mail. * * * **/ connexion_local_read(); $sql="select substr(NAME,7) as NAME,TVALUE from config where NAME like '%s'"; $arg=array('%CONEX%'); $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); while($item = mysqli_fetch_object($res)){ $config[$item->NAME]=$item->TVALUE; define ($item->NAME,$item->TVALUE); } // copies the config values to the session area $_SESSION['OCS']['config']=$config; $login_successful=verif_pw_ldap($login, $mdp); $cnx_origine="LDAP"; $user_group="LDAP"; function verif_pw_ldap($login, $pw) { $info = search_on_loginnt($login); if ($info["nbResultats"]!=1) return ("BAD LOGIN OR PASSWORD"); // login does't exist return (ldap_test_pw($info[0]["dn"], $pw) ? "OK" : "BAD LOGIN OR PASSWORD"); } function search_on_loginnt($login) { $f1_name=$_SESSION['OCS']['config']['LDAP_CHECK_FIELD1_NAME']; $f2_name=$_SESSION['OCS']['config']['LDAP_CHECK_FIELD2_NAME']; // default attributes for query $attributs = array("dn", "cn", "givenname", "sn", "mail", "title"); // search for the custom user level attributes if they're defined if ($f1_name != '') { array_push($attributs, strtolower($f1_name)); } if ($f2_name != '') { array_push($attributs, strtolower($f2_name)); } $ds = ldap_connection (); $filtre = "(".LOGIN_FIELD."={$login})"; $sr = ldap_search($ds,DN_BASE_LDAP,$filtre,$attributs); $lce = ldap_count_entries($ds,$sr); $info = ldap_get_entries($ds,$sr); ldap_close($ds); $info["nbResultats"] = $lce; // save user fields in session $_SESSION['OCS']['details']['givenname']=$info[0]['givenname'][0]; $_SESSION['OCS']['details']['sn']=$info[0]['sn'][0]; $_SESSION['OCS']['details']['cn']=$info[0]['cn'][0]; $_SESSION['OCS']['details']['mail']=$info[0]['mail'][0]; $_SESSION['OCS']['details']['title']=$info[0]['title'][0]; // if the extra attributes are there, save them as well if ($info[0][$f1_name][0] != '') { //attribute name 'memberof' is for group searching //FIXME: casing? -> 'memberOf' if ($f1_name == "memberof") { //this is to store the entire array instead of just the first string //may be redundant and could be simplified, but it works. $_SESSION['OCS']['details'][$f1_name]=$info[0][strtolower($f1_name)]; } else { $_SESSION['OCS']['details'][$f1_name]=$info[0][strtolower($f1_name)][0]; } } if ($info[0][strtolower($f2_name)][0] != '') { if ($f2_name == "memberof") { $_SESSION['OCS']['details'][$f2_name]=$info[0][strtolower($f2_name)]; } else { $_SESSION['OCS']['details'][$f2_name]=$info[0][strtolower($f2_name)][0]; } } return $info; } function ldap_test_pw($dn, $pw) { $ds = ldap_connection (); if (!$ds or !$pw) { // avec ldap 2.x.x, ldap_connect est tjrs ok. La connection n'est ouverte qu'au bind return false; } else { ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, LDAP_PROTOCOL_VERSION); $r = ldap_bind($ds, $dn, $pw); ldap_close($ds); return $r; } } function ldap_connection (){ $ds = ldap_connect(LDAP_SERVEUR,LDAP_PORT); // Set the LDAP version // add by acop http://forums.ocsinventory-ng.org/viewtopic.php?pid=35261 ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, LDAP_PROTOCOL_VERSION); ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); if (ROOT_DN != '' && defined('ROOT_DN')){ $b = ldap_bind($ds, ROOT_DN, ROOT_PW); }else //Anonymous bind $b = ldap_bind($ds); if (!$b) return false; else return $ds; } ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/AUTH/methode/local.php000077500000000000000000000041711303466605000261360ustar00rootroot00000000000000PASSWORD_VERSION < $_SESSION['OCS']['PASSWORD_VERSION']){ $oldpassword = true; } if($oldpassword && $rowOp->PASSWORD_VERSION === '0' ){ $reqOp="SELECT id,user_group FROM operators WHERE id='%s' and passwd ='%s'"; $arg_reqOp=array($login,md5($protectedMdp)); $resOp=mysql2_query_secure($reqOp,$_SESSION['OCS']["readServer"],$arg_reqOp); $rowOp=mysqli_fetch_object($resOp); if (isset($rowOp -> id)){ $login_successful = "OK"; $user_group=$rowOp -> user_group; $type_log='CONNEXION'; if(version_compare(PHP_VERSION, '5.3.7') >= 0){ require_once('require/function_users.php'); updatePassword($login,$mdp); } }else{ $login_successful = $l->g(180); $type_log='BAD CONNEXION'; } }else{ $reqOp="SELECT id,user_group,passwd FROM operators WHERE id='%s'"; $arg_reqOp=array($login); $resOp=mysql2_query_secure($reqOp,$_SESSION['OCS']["readServer"],$arg_reqOp); $rowOp=mysqli_fetch_object($resOp); if (isset($rowOp -> id) && password_verify($mdp, $rowOp -> passwd)){ if($oldpassword){ require_once('require/function_users.php'); updatePassword($login,$mdp); } $login_successful = "OK"; $user_group=$rowOp -> user_group; $type_log='CONNEXION'; }else{ $login_successful = $l->g(180); $type_log='BAD CONNEXION'; } } $value_log='USER:'.$login; $cnx_origine="LOCAL"; addLog( $type_log,$value_log); ?>ocsinventory-server-2.2+dfsg/ocsreports/backend/identity/000077500000000000000000000000001303466605000237705ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/identity/identity.php000077500000000000000000000035421303466605000263410ustar00rootroot00000000000000"local.php"); //$list_methode=array(0=>"ldap.php"); if (!isset($_SESSION['OCS']["lvluser"])){ $i=0; //methode pour le calcul des droits while ($list_methode[$i]){ require_once('methode/'.$list_methode[$i]); //on garde les erreurs présentes //entre chaque méthode if (isset($ERROR)){ $tab_error[$list_methode[$i]]=$ERROR; unset($ERROR); } //on garde les tags qu'a le droit de voir l'utilisateur if (isset($list_tag)){ $tab_tag[$list_methode[$i]]=$list_tag; unset($list_tag); } $i++; } } if (!isset($tab_tag) and $restriction != 'NO'){ $LIST_ERROR=""; foreach ($tab_error as $script=>$error){ $LIST_ERROR.=$error; addLog('ERROR_IDENTITY',$error); } $_SESSION['OCS']["mesmachines"] = "NOTAG"; }elseif(isset($tab_tag)){ foreach ($list_methode as $prio=>$script){ if (isset($tab_tag[$script])){ foreach ($tab_tag[$script] as $tag=>$lbl){ $list_tag[$tag]=$tag; $lbl_list_tag[$tag]=$lbl; } } } if (is_array($list_tag) && !empty($list_tag)){ $mesMachines = "a.TAG IN ('".implode("','",$list_tag)."') "; } else { $mesMachines = null; } $_SESSION['OCS']["mesmachines"] = $mesMachines; $_SESSION['OCS']["mytag"]=$lbl_list_tag; $_SESSION['OCS']['TAGS']=$list_tag; } if (isset($lvluser)) $_SESSION['OCS']["lvluser"]=$lvluser; ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/identity/methode/000077500000000000000000000000001303466605000254155ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/identity/methode/ldap.php000077500000000000000000000157741303466605000270670ustar00rootroot00000000000000%%,'tag_show'=>array(%,%,%,%,%...)) * * else, an error code is returned. * * CONEX_LDAP_CHECK_FIELD1_NAME="thisGuyIsAdmin" * CONEX_LDAP_CHECK_FIELD1_VALUE="0" * CONEX_LDAP_CHECK_FIELD1_ROLE="user" * CONEX_LDAP_CHECK_FIELD2_NAME="thisGuyIsAdmin" * CONEX_LDAP_CHECK_FIELD2_VALUE="1" * CONEX_LDAP_CHECK_FIELD2_ROLE="sadmin" * In logical terms: * if thisGuyIsAdmin=0 then * role=user * else if thisGuyIsAdmin=1 then * role=sadmin * * Note: the default user levels in OCS currently are "admin", "ladmin" and "sadmin". The above is just an example. * */ if ($_SESSION['OCS']['cnx_origine'] != "LDAP") return false; require_once ('require/function_files.php'); // page name $name="ldap.php"; connexion_local_read(); // select the main database mysqli_select_db($link_ocs,$db_ocs); // retrieve LDAP-related config values into an array $sql="select substr(NAME,7) as NAME,TVALUE from config where NAME like '%s'"; $arg=array("%CONEX%"); $res=mysql2_query_secure($sql, $link_ocs,$arg); while($item = mysqli_fetch_object($res)){ $config[$item->NAME]=$item->TVALUE; // define ($item->NAME,$item->TVALUE); } // checks if the user already exists $reqOp="SELECT new_accesslvl as accesslvl FROM operators WHERE id='%s'"; $argOp=array($_SESSION['OCS']["loggeduser"]); $resOp=mysql2_query_secure($reqOp, $link_ocs,$argOp); // defines the user level according to specific LDAP attributes // default: normal user $defaultRole=$config['LDAP_CHECK_DEFAULT_ROLE']; // Checks if the custom fields are valid $f1_name=$config['LDAP_CHECK_FIELD1_NAME']; $f2_name=$config['LDAP_CHECK_FIELD2_NAME']; $f1_value=$_SESSION['OCS']['details'][$f1_name]; $f2_value=$_SESSION['OCS']['details'][$f2_name]; if ($f1_value != '') { //NEW CODE BELOW //FIXME: casing? -> 'memberOf' if ($f1_name == "memberof") { //the idea here is to iterate through the groups array looking for a match //if we find it, unset the array and store only the match, else leave as it is foreach($f1_value as $group){ if ($group == $config['LDAP_CHECK_FIELD1_VALUE']) { $f1_value=array(); $f1_value=$group; } } } //the if below is now redundant since we already know that we have a match //the coding can be improved, but the logic works. //END NEW CODE if ($f1_value == $config['LDAP_CHECK_FIELD1_VALUE']) { $defaultRole=$config['LDAP_CHECK_FIELD1_ROLE']; } } if ($f2_value != '') { //NEW CODE BELOW if ($f2_name == "memberof") { foreach($f2_value as $group){ if ($group == $config['LDAP_CHECK_FIELD2_VALUE']) { $f2_value=array(); $f2_value=$group; } } } //END NEW CODE if ($f2_value == $config['LDAP_CHECK_FIELD2_VALUE']) { $defaultRole=$config['LDAP_CHECK_FIELD2_ROLE']; } } // uncomment this section for DEBUG // note: cannot use the global DEBUG variable because this happens before the toggle is available. /* echo ("field1: ".$f1_name." value=".$f1_value." condition: ".$config['LDAP_CHECK_FIELD1_VALUE']." role=".$config['LDAP_CHECK_FIELD1_ROLE']." level=".$config['LDAP_CHECK_FIELD1_USERLEVEL']."
"); echo ("field2: ".$item['CONEX_LDAP_CHECK_FIELD2_NAME']." value=".$f2_value." condition: ".$config['LDAP_CHECK_FIELD2_VALUE']." role=".$config['LDAP_CHECK_FIELD2_ROLE']." level=".$config['LDAP_CHECK_FIELD2_USERLEVEL']."
"); echo ("user: ".$_SESSION['OCS']["loggeduser"]." will have level=".$defaultLevel." and role=".$defaultRole."
"); */ //if defaultRole is define if (isset($defaultRole) and $defaultRole != ''){ // if it doesn't exist, create the user record if (!mysqli_fetch_object($resOp)) { $reqInsert="INSERT INTO operators ( ID, FIRSTNAME, LASTNAME, PASSWD, COMMENTS, NEW_ACCESSLVL, EMAIL, USER_GROUP ) VALUES ('%s','%s', '%s', '%s','%s', '%s', '%s', '%s')"; $arg_insert=array($_SESSION['OCS']["loggeduser"], $_SESSION['OCS']['details']['givenname'], $_SESSION['OCS']['details']['sn'], "", "LDAP", $defaultRole, $_SESSION['OCS']['details']['mail'], "NULL" ); } else { // else update it $reqInsert="UPDATE operators SET NEW_ACCESSLVL='%s', EMAIL='%s' WHERE ID='%s'"; $arg_insert=array($defaultRole, $_SESSION['OCS']['details']['mail'], $_SESSION['OCS']["loggeduser"]); } connexion_local_write(); // select the main database mysqli_select_db($link_ocs,$db_ocs); // Execute the query to insert/update the user record mysql2_query_secure($reqInsert,$link_ocs,$arg_insert); // repeat the query and define the needed OCS variables // note: original OCS code below connexion_local_read(); // select the main database mysqli_select_db($link_ocs,$db_ocs); $resOp=mysql2_query_secure($reqOp, $link_ocs,$argOp); $rowOp=mysqli_fetch_object($resOp); if (isset($rowOp -> accesslvl)){ $lvluser=$rowOp -> accesslvl; $profile_config = DOCUMENT_REAL_ROOT.'/config/profiles/'.$lvluser.'.xml'; if (!file_exists($profile_config)) { migrate_config_2_2(); } $profile_serializer = new XMLProfileSerializer(); $profile = $profile_serializer->unserialize($lvluser, file_get_contents($profile_config)); $restriction = $profile->getRestriction('GUI'); //if this user has RESTRICTION //search all tag for this user if ($restriction == 'YES'){ $sql="select tag from tags where login='%s'"; $arg=array($_SESSION['OCS']["loggeduser"]); $res=mysql2_query_secure($sql, $link_ocs,$arg); while ($row=mysqli_fetch_object($res)){ $list_tag[$row->tag]=$row->tag; } if (!isset($list_tag)) $ERROR=$l->g(893); }elseif (($restriction != 'NO')) $ERROR=$restriction; }else $ERROR=$l->g(894); }else $ERROR=$l->g(1278); ?>ocsinventory-server-2.2+dfsg/ocsreports/backend/identity/methode/local.php000077500000000000000000000040441303466605000272250ustar00rootroot00000000000000%%,'tag_show'=>array(%,%,%,%,%...)) * si une erreur est rencontrée, on retourne un code erreur * */ require_once ('require/function_files.php'); //nom de la page $name="local.php"; connexion_local_read(); mysqli_select_db($link_ocs,$db_ocs); //recherche du niveau de droit de l'utilisateur $reqOp="SELECT new_accesslvl as accesslvl FROM operators WHERE id='%s'"; $argOp=array($_SESSION['OCS']["loggeduser"]); $resOp=mysql2_query_secure($reqOp,$link_ocs,$argOp); $rowOp=mysqli_fetch_object($resOp); if (isset($rowOp->accesslvl)) { $lvluser = $rowOp->accesslvl; $profile_config = DOCUMENT_REAL_ROOT.'/config/profiles/'.$lvluser.'.xml'; if (!file_exists($profile_config)) { migrate_config_2_2(); } $profile_serializer = new XMLProfileSerializer(); $profile = $profile_serializer->unserialize($lvluser, file_get_contents($profile_config)); $restriction = $profile->getRestriction('GUI'); //Si l'utilisateur a des droits limités //on va rechercher les tags sur lesquels il a des droits if ($restriction == 'YES') { $sql="select tag from tags where login='%s'"; $arg=array($_SESSION['OCS']["loggeduser"]); $res=mysql2_query_secure($sql, $link_ocs,$arg); while ($row=mysqli_fetch_object($res)){ $list_tag[$row->tag]=$row->tag; } if (!isset($list_tag)) $ERROR=$l->g(893); } elseif ($restriction != 'NO') { $ERROR=$restriction; } } else { $ERROR=$l->g(894); } ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/ipdiscover/000077500000000000000000000000001303466605000243065ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/ipdiscover/ipdiscover.php000077500000000000000000000031721303466605000271740ustar00rootroot00000000000000"local.php"); if (!isset($_SESSION['OCS']["ipdiscover"])){ $i=0; //methode pour le calcul des droits while ($list_methode[$i]){ require_once('methode/'.$list_methode[$i]); //on garde les erreurs présentes //entre chaque méthode /*if (isset($INFO)){ $tab_info[$list_methode[$i]]=$INFO; unset($INFO); }*/ //on garde les droits de l'utilisateur sur l'ipdiscover if (isset($list_ip)){ $tab_ip[$list_methode[$i]]=$list_ip; unset($list_ip); } $i++; } } unset($list_ip); if (isset($tab_ip)){ foreach ($list_methode as $prio=>$script){ if (isset($tab_ip[$script])){ foreach ($tab_ip[$script] as $ip=>$lbl){ $list_ip[$ip]=$lbl; } } } if (isset($list_ip)){ $_SESSION['OCS']["ipdiscover"]=$list_ip; $_SESSION['OCS']["ipdiscover_methode"]=$base; $_SESSION['OCS']["ipdiscover_id"]=$id_subnet; $_SESSION['OCS']["subnet_ipdiscover"]=$list_subnet; } } if (isset($tab_info) and !isset($_SESSION['OCS']["ipdiscover"])){ $_SESSION['OCS']["ipdiscover"]=$tab_info; $_SESSION['OCS']["ipdiscover_methode"]=$base; } ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/ipdiscover/methode/000077500000000000000000000000001303466605000257335ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/ipdiscover/methode/local.php000077500000000000000000000051371303466605000275470ustar00rootroot00000000000000SUBNET]=$row->MASK; } $req="select distinct ipsubnet,s.name,s.id from networks n left join subnet s on s.netid=n.ipsubnet ,accountinfo a where a.hardware_id=n.HARDWARE_ID and n.status='Up'"; if (isset($_SESSION['OCS']["mesmachines"]) and $_SESSION['OCS']["mesmachines"] != '' and $_SESSION['OCS']["mesmachines"] != 'NOTAG') $req.=" and ".$_SESSION['OCS']["mesmachines"]." order by ipsubnet"; else $req.=" union select netid,name,id from subnet"; $res=mysql2_query_secure($req, $link_ocs) or die(mysqli_error($link_ocs)); while ($row=mysqli_fetch_object($res)){ unset($id); $list_subnet[]=$row -> ipsubnet; /* foreach ($subnet_to_balcklist as $key=>$value){ if ($key == $row -> ipsubnet) $id='--'.$l->g(703).'--'; } */ /* applied again patch of revision 484 ( fix bug: https://bugs.launchpad.net/ocsinventory-ocsreports/+bug/637834 ) */ if (is_array($subnet_to_balcklist)){ foreach ($subnet_to_balcklist as $key=>$value){ if ($key == $row -> ipsubnet) $id='--'.$l->g(703).'--'; } } /*foreach ($subnet_to_balcklist as $key=>$value){ $black=explode('.',$value); $nb=count($black); $origine=explode('.',$row->ipsubnet); $nb--; unset($verif); while ($black[$nb]){ if ($black[$nb] != $origine[$nb]){ $verif=true; } $nb--; } if (!isset($verif)){ $id='--'.$l->g(703).'--'; } }*/ //this subnet was identify if ($row->id != null and !isset($id)){ $list_ip[$row->id][$row->ipsubnet]=$row->name; $list_ip['---'.$l->g(1138).'---'][$row->ipsubnet]=$row->name; }elseif(!isset($id)){ $no_name='---'.$l->g(885).'---'; $list_ip[$no_name][$row->ipsubnet]=$no_name; $list_ip['---'.$l->g(1138).'---'][$row->ipsubnet]=$no_name; }else{ $list_ip[$id][$row->ipsubnet]=$id; } } $id_subnet="ID"; /*if (!isset($list_ip)) $INFO="NO_IPDICOVER";*/ ?> ocsinventory-server-2.2+dfsg/ocsreports/backend/require/000077500000000000000000000000001303466605000236135ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/require/cas.config.php000077500000000000000000000001711303466605000263400ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/backend/require/connexion.php000077500000000000000000000023471303466605000263350ustar00rootroot00000000000000
ERROR: MySql connection problem
".mysqli_error($link_ocs)."
"; die(); } mysqli_query($link_ocs,"SET NAMES 'utf8'"); //sql_mode => not strict mysqli_query($link_ocs,"SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); //fin connection OCS } function connexion_local_write() { global $link_ocs,$db_ocs; require_once(CONF_MYSQL); //require_once($_SESSION['OCS']['NAME_MYSQL']); //connection OCS $db_ocs = DB_NAME; //lien sur le serveur OCS $link_ocs=mysqli_connect(SERVER_WRITE,COMPTE_BASE,PSWD_BASE); if(mysqli_connect_errno()) { echo "
ERROR: MySql connection problem
".mysqli_error($link_ocs)."
"; die(); } mysqli_query($link_ocs,"SET NAMES 'utf8'"); //sql_mode => not strict mysqli_query($link_ocs,"SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); //fin connection OCS } ?> ocsinventory-server-2.2+dfsg/ocsreports/config/000077500000000000000000000000001303466605000220155ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/config/README000077500000000000000000000000351303466605000226760ustar00rootroot00000000000000Feel free to remove this fileocsinventory-server-2.2+dfsg/ocsreports/config/computer/000077500000000000000000000000001303466605000236535ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/config/computer/menu.xml000077500000000000000000000011611303466605000253430ustar00rootroot00000000000000 cat=admin cat=hardware cat=software cat=devices cat=config cat=other ocsinventory-server-2.2+dfsg/ocsreports/config/computer/plugins.xml000077500000000000000000000071031303466605000260620ustar00rootroot00000000000000 1 hardware 1 hardware memories 1 hardware storages 1 hardware drives 1 hardware videos 1 hardware sounds 1 hardware networks 1 hardware controllers 1 hardware slots 1 hardware ports 1 hardware bios 1 software softwares 1 devices sim 1 devices monitors 1 devices inputs 1 devices printers 1 devices modems 1 admin accountinfo 1 1 admin 1 admin registry 1 config 1 1 config download_history 1 other virtualmachines ocsinventory-server-2.2+dfsg/ocsreports/config/js.xml000077500000000000000000000004051303466605000231550ustar00rootroot00000000000000 ms_search_soft/js/autocomplete-3-2.js ms_search_soft/js/print.js ms_users/js/profile-create-form.js ms_users/js/profile-edit-form.js ocsinventory-server-2.2+dfsg/ocsreports/config/main_menu.xml000077500000000000000000000114011303466605000245070ustar00rootroot00000000000000 ms_all_computers ms_all_computers ms_groups ms_repart_tag ms_all_soft ms_multi_search ms_search_soft ms_teledeploy ms_tele_package ms_tele_modify ms_tele_activate ms_rules_redistrib ms_config ms_config ms_users ms_blacklist ms_label ms_upload_file ms_update_new_tag ms_ipdiscover ms_ipdiscover ms_snmp ms_admin_ipdiscover ms_regconfig ms_regconfig ms_admininfo ms_doubles ms_dict ms_local ms_plugins ms_pluginsmanager ms_logs ms_logs ms_stats ms_server_infos ms_help ms_wiki ms_irc ms_ask ms_forums ms_offers ocsinventory-server-2.2+dfsg/ocsreports/config/main_menu.xml.bak000077500000000000000000000112161303466605000252470ustar00rootroot00000000000000 ms_all_computers ms_all_computers ms_groups ms_repart_tag ms_all_soft ms_multi_search ms_search_soft ms_teledeploy ms_tele_package ms_tele_activate ms_rules_redistrib ms_teledeploy_workflow ms_config ms_config ms_users ms_blacklist ms_label ms_upload_file ms_update_new_tag ms_ipdiscover ms_ipdiscover ms_snmp ms_admin_ipdiscover ms_regconfig ms_regconfig ms_admininfo ms_doubles ms_dict ms_local ms_plugins ms_logs ms_logs ms_stats ms_server_infos ms_help ms_wiki ms_irc ms_ask ms_forums ms_offers ocsinventory-server-2.2+dfsg/ocsreports/config/profiles/000077500000000000000000000000001303466605000236405ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/config/profiles/README000077500000000000000000000000351303466605000245210ustar00rootroot00000000000000Feel free to remove this fileocsinventory-server-2.2+dfsg/ocsreports/config/profiles/admin.xml000077500000000000000000000041511303466605000254560ustar00rootroot00000000000000 NO YES NO NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES ms_all_computers ms_repart_tag ms_groups ms_all_soft ms_multi_search ms_custom_groups ms_custom_lock ms_custom_sup ms_custom_tag ms_upload_file_popup ms_ipdiscover ms_doubles ms_wiki ms_irc ms_forums ms_offers ms_ask ms_console ms_components ms_tele_activate ms_tele_actives ms_custom_param ms_opt_ipdiscover ms_show_detail ms_custom_info ms_computer ms_config_account ms_soft_csv ms_csv ms_tele_stats ms_view_file ms_snmp ms_snmp_detail ms_server_infos ocsinventory-server-2.2+dfsg/ocsreports/config/profiles/dde_teledeploy.xml000077500000000000000000000023551303466605000273540ustar00rootroot00000000000000 NO NO TELEDIFF_VISIBLE EXPORT_XML NO NO NO NO NO NO NO NO NO NO NO NO NO ms_upload_file_popup ms_wiki ms_irc ms_forums ms_offers ms_ask ocsinventory-server-2.2+dfsg/ocsreports/config/profiles/ladmin.xml000077500000000000000000000040121303466605000256260ustar00rootroot00000000000000 YES YES YES NO NO NO NO NO NO NO NO NO YES NO NO NO NO YES ms_all_computers ms_repart_tag ms_groups ms_all_soft ms_multi_search ms_custom_groups ms_custom_lock ms_custom_sup ms_custom_tag ms_upload_file_popup ms_ipdiscover ms_doubles ms_console ms_components ms_custom_param ms_opt_ipdiscover ms_show_detail ms_custom_info ms_computer ms_config_account ms_soft_csv ms_csv ms_view_file ms_export_ocs ms_qrcode ms_server_infos ms_wiki ms_irc ms_forums ms_offers ms_ask ocsinventory-server-2.2+dfsg/ocsreports/config/profiles/sadmin.xml000077500000000000000000000072561303466605000256520ustar00rootroot00000000000000 NO NO YES NO NO YES YES YES YES YES YES YES YES YES YES YES YES YES MACADD SERIAL IPDISCOVER ms_all_computers ms_config ms_repart_tag ms_groups ms_all_soft ms_multi_search ms_custom_groups ms_custom_lock ms_custom_pack ms_custom_sup ms_custom_tag ms_dict ms_upload_file ms_upload_file_popup ms_regconfig ms_logs ms_admininfo ms_ipdiscover ms_admin_ipdiscover ms_doubles ms_label ms_users ms_add_user ms_user_details ms_config_account ms_profiles ms_add_profile ms_profile_details ms_custom_perim ms_local ms_help ms_stats ms_codes ms_blacklist ms_console ms_components ms_tele_package ms_tele_activate ms_tele_popup_active ms_tele_actives ms_tele_pack ms_rules_redistrib ms_custom_param ms_opt_ipdiscover ms_group_show ms_show_detail ms_custom_info ms_debug ms_computer ms_soft_csv ms_csv ms_tele_stats ms_tele_compress ms_speed_stat ms_admin_management ms_adminvalues ms_view_file ms_search_soft ms_options ms_snmp ms_snmp_detail ms_update_new_tag ms_server_redistrib jp_teledeploy_stats jp_teledeploy_speed_stats jp_activity_stats ms_ipdiscover_analyse ms_stats_connexion ms_add_key ms_export_ocs ms_qrcode ms_plugins ms_stats_top ms_server_infos ms_wiki ms_irc ms_forums ms_offers ms_ask ms_pluginsmanager ocsinventory-server-2.2+dfsg/ocsreports/config/urls.xml000077500000000000000000000210021303466605000235220ustar00rootroot00000000000000 visu_computers ms_all_computers admin_conf ms_config visu_repart_tag ms_repart_tag visu_groups ms_groups visu_all_soft ms_all_soft visu_search ms_multi_search groups_search ms_groups lock_search ms_multi_search pack_search ms_teledeploy sup_search ms_multi_search tag_seach ms_multi_search admin_dico ms_dict admin_upload ms_upload_file upload_file ms_upload_file admin_reg ms_regconfig admin_logs ms_logs admin_info ms_admininfo show_ipdiscover ms_ipdiscover admin_ipdiscover ms_ipdiscover admin_double ms_doubles admin_lbl ms_config admin_user ms_users admin_add_user ms_users admin_user_details ms_users account_config ms_users admin_profiles ms_users admin_add_profile ms_users admin_profile_details ms_users admin_perim ms_users admin_local_import ms_upload_file help ms_help stats ms_stats admin_codes admin_black ms_config console ms_console components tele_package ms_teledeploy tele_modify ms_teledeploy tele_activate ms_teledeploy tele_popup_active ms_teledeploy tele_actives ms_teledeploy tele_pack rules_redistrib ms_teledeploy opt_param ms_config opt_ipdiscover group_show ms_groups show_detail ipdiscover_info ms_ipdiscover debug ms_debug computer ms_computer export_soft ms_export export_csv ms_export tele_stat ms_teledeploy compress ms_teledeploy stat_speed ms_teledeploy admin_type_manage ms_teledeploy_workflow admin_values ms_config view_file ms_upload_file search_soft ms_search_soft search_soft_option ms_search_soft snmp ms_snmp snmp_detail ms_snmp script_new_tag ms_scripts server_redistrib ms_teledeploy teledeploy_stats ms_stats teledeploy_speed_stats ms_stats activity_stats ms_stats ipdiscover_analyse ms_ipdiscover stats_connexion ms_stats add_key ms_config export_ocs ms_export qrcode ms_computer plugins ms_plugins pluginsmanager ms_plugins stats_top ms_stats server_infos ms_server_infos wiki ms_help irc ms_help forums ms_help offers ms_help ask ms_help about ms_about ocsinventory-server-2.2+dfsg/ocsreports/css/000077500000000000000000000000001303466605000213405ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/css/bootstrap-custom.css000077500000000000000000000017671303466605000254150ustar00rootroot00000000000000@media ( min-width : 768px) { .dropdown-submenu { position: relative; } .dropdown-submenu>.dropdown-menu { top: 0; left: 100%; margin-top: -6px; margin-left: -1px; -webkit-border-radius: 0 6px 6px 6px; -moz-border-radius: 0 6px 6px 6px; border-radius: 0 6px 6px 6px; } .dropdown-submenu:hover>.dropdown-menu { display: block; } .dropdown-submenu>a:after { display: block; content: " "; float: right; width: 0; height: 0; border-color: transparent; border-style: solid; border-width: 5px 0 5px 5px; border-left-color: #cccccc; margin-top: 5px; margin-right: -10px; } .dropdown-submenu:hover>a:after { border-left-color: #ffffff; } .dropdown-submenu.pull-left { float: none; } .dropdown-submenu.pull-left>.dropdown-menu { left: -100%; margin-left: 10px; -webkit-border-radius: 6px 0 6px 6px; -moz-border-radius: 6px 0 6px 6px; border-radius: 6px 0 6px 6px; } } .glyphicon-trash{ color: gray; font-size: x-large; } .alert{ width : 80%; }ocsinventory-server-2.2+dfsg/ocsreports/css/boxsizing.htc000077500000000000000000000102461303466605000240620ustar00rootroot00000000000000 ocsinventory-server-2.2+dfsg/ocsreports/css/computer_details.css000077500000000000000000000014171303466605000254230ustar00rootroot00000000000000.right-caret { display: inline-block; width: 0; height: 0; float: right; margin: 6px 0; vertical-align: middle; border-bottom: 4px solid transparent; border-top: 4px solid transparent; border-left: 4px solid; } /*** SUMMARY ***/ .summary { width: 100%; text-align: left; } .summary-row:first-child { border-top: 1px solid #c7c7c7; } .summary-cell { width: 50%; padding: 5px 10px 10px 20px; border: 1px solid #c7c7c7; vertical-align: top; } .summary-header { display: inline-block; font-weight: bold; width: 30%; padding: 3px 0; } .summary-value { display: inline-block; width: 70%; padding: 3px 0; } /*** PLUGINS ***/ .plugin-frame { background: #f8f8f8; border: 1px solid #c7c7c7; padding: 10px; margin-bottom: 20px; } ocsinventory-server-2.2+dfsg/ocsreports/css/dataTables-custom.css000077500000000000000000000042401303466605000254310ustar00rootroot00000000000000/*** DATA TABLES CUSTOMIZATION ***/ table.dataTable.table-striped thead tr th { text-align: center; vertical-align: middle; font-size: 14px; background-color: #f0f0f0; } .table-striped > tbody > tr:nth-child(odd) > td { background-color: #fdfdfd; } .table-striped > tbody > tr:nth-child(even) > td { background-color: #f4f4f4; } .table-striped > tbody > tr:hover > td { background-color: #f0f0f0; } table.dataTable a { color: rgb(116, 116, 116)!important; font-weight: bold; } .tableContainer .row{ margin : 0; } table.dataTable{ empty-cells: show; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; } div.tableContainer { overflow:hidden; width:100%; overflow-y: none; margin: 0 auto; text-align: center; } table.dataTable thead .sorting { background: #f0f0f0 url('../libraries/datatable/media/images/sort_both.png') no-repeat center right !important; } table.dataTable thead .sorting_asc { background: #f0f0f0 url('../libraries/datatable/media/images/sort_asc.png') no-repeat center right !important; } table.dataTable thead .sorting_desc { background: #f0f0f0 url('../libraries/datatable/media/images/sort_desc.png') no-repeat center right !important; } table.dataTable thead .sorting_asc_disabled { background: #f0f0f0 url('../libraries/datatable/media/images/sort_asc_disabled.png') no-repeat center right !important; } table.dataTable thead .sorting_desc_disabled { background: #f0f0f0 url('../libraries/datatable/media/images/sort_desc_disabled.png') no-repeat center right !important; } table.dataTable .column-_checkbox, table.dataTable .column-_actions, table.dataTable .CHECK, table.dataTable .ACTIONS { vertical-align: middle; text-align:center; } table.dataTable .row-action { margin: 0 5px; } table.dataTable thead>tr>th.column-_checkbox, table.dataTable thead>tr>th.CHECK{ background-image:none !important; } .dataTables_filter{ margin-right:15px; } .table_settings_toggle{ margin-left:5px; } .table_settings{ width: 100%; margin-top: 25px; display: block; margin: 0 auto 0 auto; background: #f8f8f8; border: 1px solid #c7c7c7; padding: 20px 50px; margin-bottom: 20px; text-align: center; }ocsinventory-server-2.2+dfsg/ocsreports/css/forms.css000077500000000000000000000057751303466605000232210ustar00rootroot00000000000000/*** LAYOUTS ***/ .form-frame { background: #f8f8f8; border: 1px solid #c7c7c7; padding: 10px; margin-bottom: 20px; } .form-frame-profile-pages { text-align: left; } .form-frame-profile-pages h4 { text-align: center; } .form-frame-profile-pages .field { display: inline-block; } .form-column { display: inline-block; vertical-align: top; margin-right: 20px; width: 480px; } .form-column:last-child { margin-right: 0; } h4 input + label { font-weight: normal; margin: 0; margin-left: 10px; } h4 > * { vertical-align: middle; } /*** FIELD ***/ .field { margin: auto; margin-bottom: 2px; padding: 3px 20px; width: 600px; text-align: left; } .field.search-field { width: auto; text-align: center; } .field.field-has-errors { color: #D8000C; background: #FFBABA; padding: 4px 19px; border: 1px solid; } .field > * { vertical-align: top; } .field > span { display: inline-block; margin-top: 3px; } .field label { width: 150px; text-align: right; margin: 3px 10px 3px 0; } .field.big-label { width: 620px; } .field.big-label label { width: 250px; } .field.small-input { width: 340px; } .field.big-label.small-input { width: 440px; } .field.checkbox-field { width: 230px; } .field.checkbox-field label { width: 120px; } /*** INPUTS ***/ .field select, .field textarea, .field .radio-container, .field input[type=text], .field input[type=password], .field input[type=file] { display: inline-block; width: 280px; } .field.search-field select, .field.search-field textarea, .field.search-field .radio-container, .field.search-field input[type=text], .field.search-field input[type=password], .field.search-field input[type=file] { width: auto; } .field.field-nolabel select, .field.field-nolabel textarea, .field.field-nolabel .radio-container, .field.field-nolabel input[type=text], .field.field-nolabel input[type=password], .field.field-nolabel input[type=file] { display: block; width: auto; margin: auto; } .field.small-input select, .field.small-input textarea, .field.small-input .radio-container, .field.small-input input[type=text], .field.small-input input[type=password], .field.small-input input[type=file] { width: 100px; } .field textarea { height: 72px; } .field .radio-container { text-align: left; margin-top: 3px; } .field .radio-container > * { vertical-align: middle; } .field .radio-container label { width: auto; text-align: left; margin: 0 15px 0 3px; font-weight: normal; } .field input[type=radio], .field input[type=checkbox] { display: inline-block; margin-top: 6px; } h4 input[type=radio], h4 input[type=checkbox], .field .radio-container input[type=radio], .field .radio-container input[type=checkbox] { margin: 0; vertical-align: middle; } /*** ERRORS ***/ .field-error-list { margin: 5px; margin-left: 160px; text-align: left; font-weight: bold; } .field.big-label .field-error-list { margin-left: 260px; } /*** BUTTONS ***/ .form-buttons { margin: 20px; } .form-frame + .form-buttons { margin-top: 0; } .form-buttons input { margin: 0 10px; } ocsinventory-server-2.2+dfsg/ocsreports/css/graphic.css000077500000000000000000000006701303466605000234750ustar00rootroot00000000000000/* Percent bar */ div.percent_bar { height:14px; width:102px; text-align:left; border:1px solid #808080; border-radius:3px; } div.percent_status { height:12px; position:absolute; z-index:1; background-color:#4BBA25;font-size:1px; border:1px solid #FFFFFF; border-radius:3px; } div.percent_text { height:12px; position:absolute; z-index:2; width:100px; font-size:11px; text-align:center; font-family:arial; color:#000000; font-weight:bold; }ocsinventory-server-2.2+dfsg/ocsreports/css/header.css000077500000000000000000000011131303466605000233010ustar00rootroot00000000000000.header-logo { float: left; padding: 5px 20px; } .main-menu-container { margin-left: 137px; } .main-menu-container .navbar { margin-bottom: 10px; } .main-menu-container .navbar-nav > li { float: none; display: inline-block; } .main-menu-container .navbar-nav > li > a { padding-top: 14px; padding-bottom: 14px; } .user-header { background: black; color: white; min-height: 15px; } .user-header .version, .user-header .links { float: right; margin: 0 10px } .user-header .links > * { margin: 0 10px; color: white; float: right; } #menu_settings{ font-size:20px; }ocsinventory-server-2.2+dfsg/ocsreports/css/ocsreports.css000077500000000000000000000150061303466605000242620ustar00rootroot00000000000000/* OCSReports Style Sheet */ table.qr { border-collapse: collapse; border: solid 1px black; table-layout: fixed; } table.qr td { width: 5px; height: 5px; font-size: 2px; } table.qr td.on { background: #000000; } .fond{ width:97%; margin:auto; } .conteneur { /*background-color: #C7D9F5;*/ position: absolute; left: 30px; /*vertical-align:center; */ } html,body{ height:100%; } body { background-color:#FFFFFF; font-size: 12px; text-align: center; } .fondu { background-image: url(../image/fond.png); width:100%; background-position : top center ; background-repeat: no-repeat; background-attachment: fixed; } a, img, .lienBleu, .norm, td, b,.warn { text-decoration: none; border-width: 0px; font-size: 12px; } .warn { font-size: 14px; color: red; font-weight:bold; } a,a:visited, .lienBleu { cursor: pointer; color: #3151CD; } a:hover { color: red; } a.deco { color:#C7D9F5; font-size: 8pt; } a img { vertical-align: middle; } .lienBleu { color: blue; } option.hi { background-color:#FFFFFF; } .Items { border-width: 2px; border-bottom-color:#666666; border-left-color:#D6D6D6; border-right-color:#666666; border-top-color:#D6D6D6; } .textbox { border: thin solid; } table.Erreur { border-color: #A1B1F9; border-spacing: 0px; border-style: solid; border-width: 2px; border-collapse: collapse; } th.Erreur { background-color: #C7D9F5; border-bottom-color: #A1B1F9; border-bottom-style: solid; border-bottom-width: 2px; border-collapse: collapse; } td.Machine { vertical-align:top ; font-size:8pt; } td#color { background-color:#C7D9F5 ; } td#type { font-family:Tahoma; font-size:8pt; text-align:center; font-weight:bold; } table.Fenetre, table.Main { background-color: white; border-color: #A1B1F9; border-spacing: 0px; border-style: solid; border-width: 2px; border-collapse: collapse; } table.Fenetre { width:62%; } table.Main { width:95%; } table.headfoot { background-color: #f2f2f2; border-color: #000000; border-spacing: 0px; border-style: solid; border-width: 1px; border-collapse: collapse; width:100%; } select.ge { background-color: #C7D9F5; height: 246px; width: 350px; } .boutonP { background-color: #C7D9F5; border-color: #A1B1F9; border-style: solid; border-width: 1px; cursor: pointer; font-size: 8pt; } .boutonG { background-color: #C7D9F5; border-color: #A1B1F9; border-style: solid; border-width: 1px; cursor: pointer; } .Lien { border-left-color: #FFFFFF; border-bottom-color: #FFFFFF; border-top-color: #FFFFFF; border-right-color: #FFFFFF; } .Main { cursor: pointer; } #fenetre { position: absolute; top: 20%; left: 30%; } #search { border-collapse: collapse; width: 240px; } dl, dt, dd, ul, li { margin: 0; padding: 0; list-style-type: none; } #menu dt { cursor: pointer; margin: 2px 0; text-align: center; font-weight: bold; } #menu dd { position: absolute; z-index: 100; margin-top: 5px ; width: 17em; background: #D6DCF2; border: 1px solid gray; border-radius: 1em; -webkit-border-radius: 1em; } #menu ul { padding: 2px; } #menu li { text-align: center; font-size: 85%; line-height: 18px; } #menu li a, #menu dt a { color: #000; text-decoration: none; display: block; } #menu li a:hover { text-decoration: underline; } table.ta { width: 99%; /*100% of container produces horiz. scroll in Mozilla*/ /*border: 1px slategray;*/ border-bottom: solid 1px #9894B5; border-top: solid 1px #9894B5; border-left: solid 1px #9894B5; border-right:solid 1px #9894B5; } tbody.ta { /* child selector syntax which IE6 and older do not support*/ overflow: auto; overflow-x: hidden; } th.ta { font-size: 20px; font-weight: bold; text-align: center; width: 50px; background-color: #E0E2E2; color: steelblue; /*border: solid slategray thin;*/ /*border-left: solid 1px slategray;*/ border-bottom: solid 1px #9894B5; border-top: solid 1px #9894B5; border-left: solid 1px #9894B5; position:relative; /*top: expression(document.getElementById('data').scrollTop-2); /*IE5+ only*/ } tr.ta { text-align: center; border-right:solid 1px #9894B5; } td.ta { color: #000; text-align: center; /*padding-right: 2px;*/ font-size: 12px; font-family: Arial,sans-serif; border-bottom: solid 1px #9894B5; border-left: solid 1px #9894B5; } td.ta:last-child {border-right: solid 1px #9894B5;} /*prevent Mozilla scrollbar from hiding cell content*/ th.ta:last-child {border-right: solid 1px #9894B5;} .mlt_bordure { margin:0 auto 0 auto; background: #f8f8f8; border: 1px solid #c7c7c7; padding: 20px 50px; margin-bottom: 20px; text-align: center; } .mvt_bordure { display: inline-block; background: #f8f8f8; border: 1px solid #c7c7c7; padding: 20px 50px; margin-bottom: 20px; text-align: center; } .mvt_tab { margin:0 auto 0 auto; background-color: #D6DCF2; border-radius: 1em; -webkit-border-radius: 1em; border: 2px solid #D6DCF2; padding: 10px; } .image{ background-color:#D6DCF2; } /* see => http:\\dmouronval.developpez.com\tutoriels\css\messages-personnalises\ */ /* tx to Knob-Buttons-Toolbar-icons => http:\\itweek.deviantart.com\art\Knob-Buttons-Toolbar-icons-73463960 */ .info, .success, .warning, .error, .validation { width:50%; border: 1px solid; margin: 10px auto; padding:15px 10px 15px 50px; background-repeat: no-repeat; background-position: 10px center; } .info { color: #00529B; background-color: #BDE5F8; background-image: url('../image/info.png'); } .success { color: #4F8A10; background-color: #DFF2BF; background-image:url('../image/success.png'); } .warning { color: #9F6000; background-color: #FEEFB3; background-image: url('../image/warning.png'); } .error { color: #D8000C; background-color: #FFBABA; background-image: url('../image/error.png'); } .validation { color: #D63301; background-color: #FFCCBA; background-image: url('../image/validation.png'); } .tooltip{ position: absolute; visibility : hidden; border: 1px solid Black; padding: 10px; font-size: 10px; background-color: #FFFFCC; } .comment_after{ float:right; } iframe{ width:100%; height:100%; border:none; margin:auto; position:relative; } .iframe_div{ width:80%; height:70%; margin:0 auto 0 auto; } .iframe_link{ color: rgb(116, 116, 116)!important; font-weight: bold; text-decoration: none } /*** MENU ***/ .left-menu { padding-left: 20px; float: left; text-align: left; width: 172px; } .left-menu .nav > li > a { width: 150px; padding: 10px 15px; } .left-menu li > ul { top: 0; left: 150px; } /*** CONTENT ***/ .right-content { margin-left: 190px; margin-right: 20px; }ocsinventory-server-2.2+dfsg/ocsreports/css/onglets.css000077500000000000000000000013161303466605000235310ustar00rootroot00000000000000/* Thanks for Douglas Bowman for this code http://www.alistapart.com/articles/slidingdoors/ */ #header { width: 100%; font-size: 93%; line-height: normal; } #header ul { padding: 6px 5px 12px; list-style: none; } #header li { float: left; background-color: #c7c7c7; border-top: 1px solid #c7c7c7; margin: 0; margin-bottom: -1px; padding: 0 0 0 9px; } #header li:first-child { border-left: 1px solid #c7c7c7; } #header a { float:left; display:block; padding:5px 15px 4px 6px; text-decoration:none; font-weight:bold; color: black; background-color: #c7c7c7; border-right: 1px solid #c7c7c7; } #header #current { background-color: #f8f8f8; } #header #current a { background-color: #f8f8f8; } ocsinventory-server-2.2+dfsg/ocsreports/css/winclassic.css000077500000000000000000000035401303466605000242160ustar00rootroot00000000000000.dynamic-slider-control { position: relative; background-color: #C7D9F5; -moz-user-focus: normal; -moz-user-select: none; cursor: default; } .horizontal { width: 200px; height: 29px; } .vertical { width: 29px; height: 200px; } .dynamic-slider-control input { display: none; } .dynamic-slider-control .handle { position: absolute; -moz-user-select: none; cursor: default; background: ThreeDFace; border: 1px solid; border-color: ThreeDHighlight ThreeDDarkShadow ThreeDDarkShadow ThreeDHighlight; } /* inner border */ .dynamic-slider-control .handle div { font-size: 1px; border: 1px solid; border-color: ThreeDLightShadow ThreeDShadow ThreeDShadow ThreeDLightShadow; /* behavior: url("css/boxsizing.htc"); /* ie path bug */ /* box-sizing: content-box;*/ -moz-box-sizing: content-box; } /* inner sets size .dynamic-slider-control.horizontal .handle { width: 12px; height: 22px; } */ .dynamic-slider-control.horizontal .handle div { width: 8px; height: 18px; } .dynamic-slider-control.horizontal .handle.hover {} /* inner sets size .dynamic-slider-control.vertical .handle { width: 22px; height: 12px; } */ .dynamic-slider-control.vertical .handle div { width: 18px; height: 8px; } .dynamic-slider-control.vertical .handle.hover {} .dynamic-slider-control .line { /* behavior: url("css/boxsizing.htc"); /* ie path bug */ /* box-sizing: content-box;*/ -moz-box-sizing: content-box; position: absolute; font-size: 0.01mm; overflow: hidden; border: 1px solid; border-color: ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow; background: ThreeDDarkShadow; } .dynamic-slider-control.vertical .line { width: 1px; } .dynamic-slider-control.horizontal .line { height: 1px; } .dynamic-slider-control .line div { display: none; }ocsinventory-server-2.2+dfsg/ocsreports/download/000077500000000000000000000000001303466605000223575ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/download/README000077500000000000000000000001771303466605000232470ustar00rootroot00000000000000Hey ! If you want to install a new plugin to ur ocs you have to copy the plugin's archive here ! OCS will install it for u ;-) ocsinventory-server-2.2+dfsg/ocsreports/favicon.ico000077500000000000000000000411561303466605000227030ustar00rootroot00000000000000@@(26  ^2h?(@0y#o %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%u"y#y#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%y#y#%%"!%%~${$%$"%%y#%#!%%y#%$#%y#-*%%y#6."%y#r5=(%%GD"%%MK$%SQ$%YW$%_] $%db 4̤۾Z$%ig!7q$%nl!Ϩl8!$%sq"D$%xv"}I$%}{#}I$%#}I$%$}I$%$}I$%%}I$%%}I$%&8ֶi!(-2578743.+'%%%%%%ú†&Riiiiiiiiy[+ƜѶøĸķöµ´³zG740,)%%%%%%ŽĆ'Ϩ{!5HW_~H52.*&%%%%%ȿdž'a]]]]]]]W(0I`kifdb_`}{k64/+(%%%%%æ¥Ȇ'ɞˡՀ7Wptqomjhfca^[XVSPMJHzD851-)&%%%%Ūĩʇ(̀2Xw|zxuspnkigdb_]ZWTQNLrd=963.*'%%'&ǯƭ̇(&"Ku~{ywtrpmkhfca^[XVRPmpA>:740,(%%0.ʲɱ·)-o,`}{xvsqnligdb_\ZVTi~EB?<851-)&&66̶˴Ј)6qnĹø¶~|ywtrpmkhfc`][XeďIFC@=963.*'&==ι͸ш)XγռźĹ÷}{xvspnkifda_\d̐MJGDA>:74/+(&CDмϻ҈*(q ϴʬѻźĸ¶~|ywtromjheb`cɩҒQNKHEB?;751,)&IKѾԈ*aĢƦţáҸǧλŹ÷}{xuspnkhfceҷٕVROLIFC@<852-*'NQֈ+B˭ɪǨťģ ־Ģ̺Ĺ·~|yvtqnligfߘ[VSPMJGDA=963.*'SW׈+#xββ̯ʬȪǧŤâŸʹ÷}zwurpmjiսbZWTPNKHEA>:64/+(Y]ى+BɥҹѶϴͱˮʬȩƦģážǸ¶~{xuspnkϳg][WTQNLHEB?;741,)]bډ,lսվԻҸжγ̰˭ɫǨťĢŸﻕŷ~|yvtqoɪna^[XUROLIFB@<851-*bh܉,%–ֿԽӺѸеβ̯ʬȩƦţá빒ö}zwurģvdb_\YVSPLJGC@=962-+flމ,7ѳֿԼӹѷϴͱ˭ɫǧŤâŸ緎}zxuheb`]YWSPMJGDA=963.+kqߊ-JվԻҸеβ̯ʬȩƦģ ɿⵌ~{xkhfc`]ZWTPNKHDA>:63/,ov-ZֿԼӹѶϳ̰˭ɪǧŤážʿȾƿݴ|ģnkhfc`][XTQNKHEB>:74/-s{zվԺѷϴͱˮɫǨŤâŸȾǼѷسɤqolifca^[XTROLHEB?;740-wֿԻҸеβ̯ʬȨƥ̟ɿǼźˮӱƦϦuroljgda^[XUROLIFB?;741.{ԼӹѶϳ̯ʭȩƦģ ɿǽƻŹáվ̯ͱըxuromjgda^\XUROLIFB@<851.սӺѷϴͰ˭ȩƧţàɿǽƻŹ÷ģѷتzxurpmjgeb_\YVSPLIFC@<851.վԺѷϴͰ˭ɪǧŤàɿȾƻŹ÷ɫ̯Ըì~{xurpmjgeb_\YVSPLIFC@<852.վԺѷеͱˮɪǧŤážʿȾƻŹ÷~{xurpmkheb_\YVSPLJGC@<852/ֿԻҸеͱˮɫǧŤážʿȾƻŹ÷~{xurpmkheb_\YVSPLJGC@<852/ֿԻҸеͱˮɫǧŤážʿȾƻŹ÷~{xurpmkheb_\YVSPLJGC@<852/վԺѷϴͱˮɪǧŤážʿȾƻŹ÷~{xurpmkheb_\YVSPLJFC@<852/ÿվӺѷϴͰ˭ɪǧŤàɿȾƻŹ÷~{xurpmjgeb_\YVSPLIFC@<8525¥սӺѷϳͰ˭ȩƦţàɿǽƻŹ÷}zxurpmjgeb_\YVSPLIFC@<851PūèֿԼӹжϳ̯ʬȩƦģ ɿǽƻŹ÷}zxuromjgda^\XUROLIFB?<851ǯվԻҸеβ̮ʬǨƥ̟ȿǼźĹ·}zwtroljgda^[XUROLHFB?;74JɰʲվӺѷϴͱˮɫǧŤážȾǼźĸ¶|ywtqnlifca^[XTROLHEB?;7;̷ֿԼӹжϳ̰˭ȪƧŤàɿȾƻŹø¶|yvspnkhfc`]ZWTQNKHEB>:?м˷վԺѸеβ̮ʬȨƦģ ɿǽƻŹ÷~{xuspmkhfc`]ZWTPMKHDA>]ǬнֿԼҺзδͱ˯ɬȪƧĥâȾǼźĸ÷¶~{ywtqoljfda^[XV`{ŧ˻޾?( @ y#|$%%%%%%%%%%%%%%%%%%%%%%}$y#~$$~$%y##fw?%O%[%f Ӱ.%pnƗpĔ%zƳuKͤ%ƳuKͤ%ƳuKͤ%˯nFԲ!&((&#!!%ă=Үִִִظ)+?ؿߦk3+%%%ȃ nڼ;;;9!?Xjhd`omhdͭɥӆ6.'%%Ƭ̃ Ү۾60Լж̯ȨĢȼƸʬͰթytoid^XRKE>70սѶ̰ȩģɽƸµztojd^XRKE>71սѶ̰ȩģɽƸµztojd^XRKE>71Լе̯ȨĢȼƸµytoid^XRKE>7:çӺϴ˭ǧáȼŸ´ysnic]WQJD=6k־ҸβʬƦŸʿǻķ~xrmgb\VPJD=Sʲ־ҹγ˭ǨâȽƹõ|wrmhb\VPXλ( ]m~`q^mct2>@x´w±rI~;ZRz1^[Gfg}2řЮrt;%$d|ĘF)5Uigc_̙V,&lɠҶvlbīw?13r4Ʀ㼖ű{pĵOB4Ay\ռѷɫģⶍ~ſʙ]QE7LԼ̰ģȪѠj_SG9Vֿβƥ;ǻĢͧvk`TH:_ֿβƥ;Ƕvk`TH:jԼ̰ģ̽Ƶuj_SGAvϺ˳ǬåʾǺĶocsinventory-server-2.2+dfsg/ocsreports/files/000077500000000000000000000000001303466605000216525ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/files/ocsbase.sql000077500000000000000000001613551303466605000240300ustar00rootroot00000000000000 CREATE TABLE hardware ( ID INTEGER NOT NULL auto_increment, DEVICEID VARCHAR(255) not NULL, NAME VARCHAR(255) default NULL, WORKGROUP VARCHAR(255) default NULL, USERDOMAIN VARCHAR(255) default NULL, OSNAME VARCHAR(255) default NULL, OSVERSION VARCHAR(255) default NULL, OSCOMMENTS VARCHAR(255) default NULL, PROCESSORT VARCHAR(255) default NULL, PROCESSORS INTEGER default 0, PROCESSORN SMALLINT default NULL, MEMORY INTEGER default NULL, SWAP INTEGER default NULL, IPADDR VARCHAR(255) default NULL, DNS VARCHAR(255) default NULL, DEFAULTGATEWAY VARCHAR(255) default NULL, ETIME DATETIME default NULL, LASTDATE DATETIME default NULL, LASTCOME DATETIME default NULL, QUALITY DECIMAL(7,4) default 0, FIDELITY BIGINT default 1, USERID VARCHAR(255) default NULL, `TYPE` INTEGER default NULL, DESCRIPTION VARCHAR(255) default NULL, WINCOMPANY VARCHAR(255) default NULL, WINOWNER VARCHAR(255) default NULL, WINPRODID VARCHAR(255) default NULL, WINPRODKEY VARCHAR(255) default NULL, USERAGENT VARCHAR(50) default NULL, CHECKSUM BIGINT UNSIGNED default 0, SSTATE INTEGER default 0, IPSRC VARCHAR(255) default NULL, UUID VARCHAR(255) default NULL, PRIMARY KEY (ID), INDEX NAME (NAME), INDEX CHECKSUM (CHECKSUM), INDEX USERID(USERID), INDEX WORKGROUP(WORKGROUP), INDEX OSNAME(OSNAME), INDEX MEMORY(MEMORY), INDEX DEVICEID (DEVICEID) ) ENGINE=INNODB ; CREATE TABLE accesslog ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, USERID VARCHAR(255) default NULL, LOGDATE DATETIME default NULL, PROCESSES TEXT, INDEX USERID(USERID), PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE accountinfo ( HARDWARE_ID INTEGER NOT NULL, TAG VARCHAR(255) default 'NA', primary key(HARDWARE_ID), INDEX TAG (TAG) ) ENGINE=INNODB ; CREATE TABLE deploy ( NAME VARCHAR(255) NOT NULL, CONTENT LONGBLOB NOT NULL, PRIMARY KEY (NAME) ) ENGINE=MYISAM ; CREATE TABLE netmap ( IP VARCHAR(15) NOT NULL, MAC VARCHAR(17) NOT NULL, MASK VARCHAR(15) NOT NULL, NETID VARCHAR(15) NOT NULL, DATE TIMESTAMP default CURRENT_TIMESTAMP, NAME VARCHAR(255) default NULL, PRIMARY KEY (MAC), INDEX IP (IP), INDEX NETID (NETID) ) ENGINE=INNODB ; CREATE TABLE bios ( HARDWARE_ID INTEGER NOT NULL, SMANUFACTURER VARCHAR(255) default NULL, SMODEL VARCHAR(255) default NULL, SSN VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, BMANUFACTURER VARCHAR(255) default NULL, BVERSION VARCHAR(255) default NULL, BDATE VARCHAR(255) default NULL, ASSETTAG VARCHAR(255) default NULL, PRIMARY KEY (HARDWARE_ID), INDEX SSN (SSN), INDEX ASSETTAG (ASSETTAG) ) ENGINE=INNODB ; CREATE TABLE config ( NAME VARCHAR(50) NOT NULL, IVALUE INTEGER default NULL, TVALUE VARCHAR(255) default NULL, COMMENTS TEXT, PRIMARY KEY (NAME) ) ENGINE=MYISAM ; CREATE TABLE controllers ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, MANUFACTURER VARCHAR(255) default NULL, NAME VARCHAR(255) default NULL, CAPTION VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, VERSION VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE devices ( HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(50) NOT NULL, IVALUE INTEGER default NULL, TVALUE VARCHAR(255) default NULL, COMMENTS TEXT, INDEX HARDWARE_ID (HARDWARE_ID), INDEX TVALUE (TVALUE), INDEX IVALUE (IVALUE), INDEX NAME (NAME) ) ENGINE=INNODB ; CREATE TABLE drives ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, LETTER VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, FILESYSTEM VARCHAR(255) default NULL, TOTAL INTEGER default NULL, FREE INTEGER default NULL, NUMFILES INTEGER default NULL, VOLUMN VARCHAR(255) default NULL, CREATEDATE DATE default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE files ( NAME VARCHAR(255) NOT NULL, VERSION VARCHAR(255) NOT NULL, OS VARCHAR(255) NOT NULL, CONTENT LONGBLOB NOT NULL, PRIMARY KEY (NAME, OS, VERSION) ) ENGINE=MYISAM ; CREATE TABLE inputs ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, `TYPE` VARCHAR(255) default NULL, MANUFACTURER VARCHAR(255) default NULL, CAPTION VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, INTERFACE VARCHAR(255) default NULL, POINTTYPE VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE memories ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, CAPTION VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, CAPACITY VARCHAR(255) default NULL, PURPOSE VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, SPEED VARCHAR(255) default NULL, NUMSLOTS SMALLINT default NULL, SERIALNUMBER VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE modems ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(255) default NULL, MODEL VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE monitors ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, MANUFACTURER VARCHAR(255) default NULL, CAPTION VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, SERIAL VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE networks ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, TYPEMIB VARCHAR(255) default NULL, SPEED VARCHAR(255) default NULL, MACADDR VARCHAR(255) default NULL, `STATUS` VARCHAR(255) default NULL, IPADDRESS VARCHAR(255) default NULL, IPMASK VARCHAR(255) default NULL, IPGATEWAY VARCHAR(255) default NULL, IPSUBNET VARCHAR(255) default NULL, IPDHCP VARCHAR(255) default NULL, VIRTUALDEV BOOL default FALSE, PRIMARY KEY (ID, HARDWARE_ID), INDEX MACADDR (MACADDR), INDEX IPADDRESS(IPADDRESS), INDEX IPGATEWAY(IPGATEWAY), INDEX IPSUBNET (IPSUBNET) ) ENGINE=INNODB ; CREATE TABLE network_devices( ID INTEGER NOT NULL auto_increment, DESCRIPTION VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, MACADDR VARCHAR(255) default NULL, `USER` VARCHAR(255) default NULL, PRIMARY KEY (ID), INDEX MACADDR (MACADDR) ) ENGINE=MYISAM ; CREATE TABLE operators ( ID VARCHAR(255) NOT NULL default '', FIRSTNAME VARCHAR(255) default NULL, LASTNAME VARCHAR(255) default NULL, PASSWD VARCHAR(50) default NULL, ACCESSLVL INTEGER default NULL, COMMENTS text, PRIMARY KEY (ID) ) ENGINE=MYISAM ; CREATE TABLE ports ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, `TYPE` VARCHAR(255) default NULL, NAME VARCHAR(255) default NULL, CAPTION VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE printers ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(255) default NULL, DRIVER VARCHAR(255) default NULL, PORT VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE regconfig ( ID INTEGER NOT NULL auto_increment, NAME VARCHAR(255) default NULL, REGTREE INTEGER default NULL, REGKEY text, REGVALUE VARCHAR(255) default NULL, PRIMARY KEY (ID), KEY NAME (NAME) ) ENGINE=MYISAM ; CREATE TABLE registry ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(255) default NULL, REGVALUE VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID), KEY NAME (NAME) ) ENGINE=INNODB ; CREATE TABLE slots ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, DESIGNATION VARCHAR(255) default NULL, PURPOSE VARCHAR(255) default NULL, `STATUS` VARCHAR(255) default NULL, PSHARE tinyint(4) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE softwares ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, PUBLISHER VARCHAR(255) default NULL, NAME VARCHAR(255) default NULL, VERSION VARCHAR(255) default NULL, FOLDER text, COMMENTS text, FILENAME VARCHAR(255) default NULL, FILESIZE INTEGER default '0', SOURCE INTEGER default NULL, PRIMARY KEY (ID, HARDWARE_ID), INDEX NAME (NAME), INDEX `VERSION`(`VERSION`) ) ENGINE=INNODB ; CREATE TABLE `sounds` ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, MANUFACTURER VARCHAR(255) default NULL, NAME VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE storages ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, MANUFACTURER VARCHAR(255) default NULL, NAME VARCHAR(255) default NULL, MODEL VARCHAR(255) default NULL, DESCRIPTION VARCHAR(255) default NULL, `TYPE` VARCHAR(255) default NULL, DISKSIZE INTEGER default NULL, SERIALNUMBER VARCHAR(255) default NULL, FIRMWARE VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE videos ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(255) default NULL, CHIPSET VARCHAR(255) default NULL, MEMORY VARCHAR(255) default NULL, RESOLUTION VARCHAR(255) default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE devicetype ( ID INTEGER NOT NULL auto_increment, NAME VARCHAR(255) default NULL, PRIMARY KEY (ID) ) ENGINE=MYISAM ; CREATE TABLE subnet ( NETID VARCHAR(15) NOT NULL, NAME VARCHAR(255), ID INTEGER, MASK VARCHAR(255), PRIMARY KEY (NETID), INDEX ID(ID) ) ENGINE=MYISAM ; CREATE TABLE virtualmachines ( ID INTEGER NOT NULL auto_increment, HARDWARE_ID INTEGER NOT NULL, NAME VARCHAR(255) default NULL, STATUS VARCHAR(255) default NULL, SUBSYSTEM VARCHAR(255) default NULL, VMTYPE VARCHAR(255) default NULL, UUID VARCHAR(255) default NULL, VCPU INTEGER default NULL, MEMORY INTEGER default NULL, PRIMARY KEY (ID, HARDWARE_ID) ) ENGINE=INNODB ; CREATE TABLE locks( HARDWARE_ID INTEGER NOT NULL PRIMARY KEY, ID INTEGER DEFAULT NULL, SINCE TIMESTAMP, INDEX SINCE (SINCE) ) ENGINE=HEAP ; CREATE TABLE dico_ignored( EXTRACTED VARCHAR(255) NOT NULL, PRIMARY KEY(EXTRACTED) ) ENGINE=MYISAM ; CREATE TABLE dico_soft( EXTRACTED VARCHAR(255) NOT NULL, FORMATTED VARCHAR(255) NOT NULL, PRIMARY KEY(EXTRACTED) ) ENGINE=MYISAM ; CREATE TABLE deleted_equiv( DATE TIMESTAMP, DELETED VARCHAR(255) NOT NULL, EQUIVALENT VARCHAR(255) default NULL ) ENGINE=MYISAM ; CREATE TABLE download_available( FILEID VARCHAR(255) NOT NULL PRIMARY KEY, NAME VARCHAR(255) NOT NULL, PRIORITY INTEGER NOT NULL, FRAGMENTS INTEGER NOT NULL, SIZE INTEGER NOT NULL, OSNAME VARCHAR(255) NOT NULL, COMMENT TEXT ) ENGINE = INNODB; CREATE TABLE download_enable( ID INTEGER NOT NULL auto_increment PRIMARY KEY, FILEID VARCHAR(255) NOT NULL, INFO_LOC VARCHAR(255) NOT NULL, PACK_LOC VARCHAR(255) NOT NULL, CERT_PATH VARCHAR(255), CERT_FILE VARCHAR(255), INDEX FILEID(FILEID) ) ENGINE = INNODB; CREATE TABLE download_history( HARDWARE_ID INTEGER NOT NULL, PKG_ID INTEGER default NULL, PKG_NAME VARCHAR(255), PRIMARY KEY(HARDWARE_ID, PKG_ID) ) ENGINE = INNODB; CREATE TABLE conntrack( IP VARCHAR(255), `TIMESTAMP` TIMESTAMP, PRIMARY KEY(IP) ) ENGINE = HEAP; CREATE TABLE groups( HARDWARE_ID integer default NULL, REQUEST longtext, CREATE_TIME INT, PRIMARY KEY(HARDWARE_ID) ) ENGINE=MYISAM; CREATE TABLE groups_cache( HARDWARE_ID integer NOT NULL default 0, GROUP_ID integer NOT NULL default 0, STATIC integer default 0, PRIMARY KEY(HARDWARE_ID,GROUP_ID) ) ENGINE=MYISAM; CREATE TABLE blacklist_macaddresses( ID INTEGER auto_increment, MACADDRESS VARCHAR(255), PRIMARY KEY(MACADDRESS), INDEX ID(ID) ) ENGINE = MYISAM; CREATE TABLE blacklist_serials( ID INTEGER auto_increment, SERIAL VARCHAR(255), PRIMARY KEY(SERIAL), INDEX ID(ID) ) ENGINE = MYISAM; CREATE TABLE registry_name_cache( ID INTEGER auto_increment, NAME VARCHAR(255) UNIQUE, PRIMARY KEY(ID) ) ENGINE = MYISAM; TRUNCATE TABLE registry_name_cache; INSERT INTO registry_name_cache(name) SELECT DISTINCT name FROM registry; CREATE TABLE registry_regvalue_cache( ID INTEGER auto_increment, REGVALUE VARCHAR(255) UNIQUE, PRIMARY KEY(ID) ) ENGINE = MYISAM; TRUNCATE TABLE registry_regvalue_cache; INSERT INTO registry_regvalue_cache(regvalue) SELECT DISTINCT regvalue FROM registry; CREATE TABLE hardware_osname_cache( ID INTEGER auto_increment, OSNAME VARCHAR(255) UNIQUE, PRIMARY KEY(ID) ) ENGINE = MYISAM; TRUNCATE TABLE hardware_osname_cache; INSERT INTO hardware_osname_cache(osname) SELECT DISTINCT osname FROM hardware; CREATE TABLE softwares_name_cache( ID INTEGER auto_increment, NAME VARCHAR(255) UNIQUE, PRIMARY KEY(ID) ) ENGINE = MYISAM; TRUNCATE TABLE softwares_name_cache; INSERT INTO softwares_name_cache(name) SELECT DISTINCT name FROM softwares; CREATE TABLE tags ( Tag VARCHAR(255) NOT NULL default '', Login VARCHAR(255) NOT NULL default '', PRIMARY KEY (Tag,Login), KEY Tag (Tag), KEY Login (Login) ) ENGINE=MyISAM; CREATE TABLE engine_mutex ( NAME varchar(255) NOT NULL default '', PID int(11) default NULL, TAG varchar(255) NOT NULL default '', PRIMARY KEY (NAME,TAG) ) ENGINE=MEMORY DEFAULT CHARSET=latin1; CREATE TABLE engine_persistent ( ID int(11) NOT NULL auto_increment, NAME varchar(255) NOT NULL default '', IVALUE int(11) default NULL, TVALUE varchar(255) default NULL, UNIQUE KEY NAME (NAME), KEY ID (ID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE journallog ( HARDWARE_ID INT(11) not null, ID integer auto_increment not null, JOURNALLOG LONGTEXT, LISTENERNAME VARCHAR(255) default 'NONAME', `DATE` VARCHAR(255) default null, STATUS INTEGER default 0, ERRORCODE INTEGER default 0, PRIMARY KEY(ID,HARDWARE_ID) ) ENGINE=INNODB; CREATE TABLE javainfo ( HARDWARE_ID INT(11) not null, JAVANAME VARCHAR(255) default 'NONAME', JAVAPATHLEVEL INTEGER default 0, JAVACOUNTRY VARCHAR(255), JAVACLASSPATH VARCHAR(255) default null, JAVAHOME VARCHAR(255) default null, PRIMARY KEY (HARDWARE_ID) )ENGINE=INNODB; ALTER TABLE devices ADD INDEX IVALUE (IVALUE); ALTER TABLE devices ADD INDEX NAME (NAME); ALTER TABLE monitors ADD COLUMN SERIAL VARCHAR(255); ALTER TABLE netmap ADD COLUMN MASK VARCHAR(15); ALTER TABLE netmap ADD COLUMN NETID VARCHAR(15); ALTER TABLE netmap ADD INDEX NETID (NETID); ALTER TABLE netmap ADD COLUMN DATE TIMESTAMP; ALTER TABLE netmap ADD COLUMN NAME VARCHAR(255) default NULL; ALTER TABLE networks ADD COLUMN IPSUBNET VARCHAR(15); ALTER TABLE networks ADD INDEX IPSUBNET (IPSUBNET); ALTER TABLE networks ADD INDEX MACADDR (MACADDR); ALTER TABLE hardware ADD COLUMN CHECKSUM INTEGER default NULL; ALTER TABLE hardware CHANGE COLUMN CHECKSUM CHECKSUM INTEGER default 131071; ALTER TABLE hardware CHANGE COLUMN CHECKSUM CHECKSUM BIGINT UNSIGNED default 262143; ALTER TABLE hardware add column WINPRODKEY VARCHAR(255) default NULL; ALTER TABLE hardware add column USERDOMAIN VARCHAR(255) default NULL; ALTER TABLE hardware ADD COLUMN SSTATE INTEGER default 0; ALTER TABLE hardware ADD COLUMN DEFAULTGATEWAY VARCHAR(255) default NULL; ALTER TABLE hardware ADD COLUMN DNS VARCHAR(255) default NULL; ALTER TABLE drives ADD COLUMN CREATEDATE DATE default NULL; ALTER TABLE hardware ADD COLUMN IPSRC VARCHAR(255) default NULL; ALTER TABLE hardware CHANGE ID ID INTEGER; ALTER TABLE hardware DROP PRIMARY KEY; ALTER TABLE hardware ADD COLUMN ID integer not NULL FIRST; ALTER TABLE hardware ADD INDEX ID (ID); ALTER TABLE hardware CHANGE ID ID INTEGER auto_increment; ALTER TABLE hardware add PRIMARY KEY(DEVICEID, ID); ALTER TABLE bios DROP PRIMARY KEY; ALTER TABLE bios ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE bios SET bios.HARDWARE_ID= (SELECT ID FROM hardware WHERE bios.DEVICEID = hardware.DEVICEID); ALTER TABLE bios DROP DEVICEID; ALTER TABLE bios ADD PRIMARY KEY(HARDWARE_ID); ALTER TABLE bios ADD COLUMN ASSETTAG VARCHAR(255) default NULL; ALTER TABLE bios ADD INDEX ASSETTAG (ASSETTAG); ALTER TABLE accountinfo DROP PRIMARY KEY; ALTER TABLE accountinfo ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE accountinfo SET accountinfo.HARDWARE_ID= (SELECT ID FROM hardware WHERE accountinfo.DEVICEID = hardware.DEVICEID); ALTER TABLE accountinfo DROP DEVICEID; ALTER TABLE accountinfo ADD PRIMARY KEY(HARDWARE_ID); ALTER TABLE devices DROP PRIMARY KEY; ALTER TABLE devices ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE devices SET devices.HARDWARE_ID= (SELECT ID FROM hardware WHERE devices.DEVICEID = hardware.DEVICEID); ALTER TABLE devices DROP DEVICEID; ALTER TABLE devices ADD INDEX HARDWARE_ID (HARDWARE_ID); ALTER TABLE controllers change ID ID INTEGER; ALTER TABLE controllers DROP PRIMARY KEY; ALTER TABLE controllers ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE controllers SET controllers.HARDWARE_ID= (SELECT ID FROM hardware WHERE controllers.DEVICEID = hardware.DEVICEID); ALTER TABLE controllers ADD INDEX ID (ID); ALTER TABLE controllers change ID ID INTEGER auto_increment; ALTER TABLE controllers ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE controllers DROP DEVICEID; ALTER TABLE slots change ID ID INTEGER; ALTER TABLE slots DROP PRIMARY KEY; ALTER TABLE slots ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE slots SET slots.HARDWARE_ID= (SELECT ID FROM hardware WHERE slots.DEVICEID = hardware.DEVICEID); ALTER TABLE slots ADD INDEX ID (ID); ALTER TABLE slots change ID ID INTEGER auto_increment; ALTER TABLE slots ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE slots DROP DEVICEID; ALTER TABLE registry change ID ID INTEGER; ALTER TABLE registry DROP PRIMARY KEY; ALTER TABLE registry ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE registry SET registry.HARDWARE_ID= (SELECT ID FROM hardware WHERE registry.DEVICEID = hardware.DEVICEID); ALTER TABLE registry ADD INDEX ID (ID); ALTER TABLE registry change ID ID INTEGER auto_increment; ALTER TABLE registry ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE registry DROP DEVICEID; INSERT INTO network_devices(DESCRIPTION,TYPE,MACADDR,`USER`) SELECT DESCRIPTION,TYPE,MACADDR,TYPEMIB FROM networks WHERE DEVICEID LIKE "NETWORK_DEVICE-%"; DELETE FROM network_devices WHERE DEVICEID LIKE "NETWORK_DEVICE-%"; ALTER TABLE networks change ID ID INTEGER; ALTER TABLE networks DROP PRIMARY KEY; ALTER TABLE networks ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE networks SET networks.HARDWARE_ID= (SELECT ID FROM hardware WHERE networks.DEVICEID = hardware.DEVICEID); ALTER TABLE networks ADD INDEX ID (ID); ALTER TABLE networks change ID ID INTEGER auto_increment; ALTER TABLE networks ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE networks DROP DEVICEID; ALTER TABLE memories change ID ID INTEGER; ALTER TABLE memories DROP PRIMARY KEY; ALTER TABLE memories ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE memories SET memories.HARDWARE_ID= (SELECT ID FROM hardware WHERE memories.DEVICEID = hardware.DEVICEID); ALTER TABLE memories ADD INDEX ID (ID); ALTER TABLE memories change ID ID INTEGER auto_increment; ALTER TABLE memories ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE memories DROP DEVICEID; ALTER TABLE memories ADD COLUMN SERIALNUMBER VARCHAR(255) default NULL AFTER NUMSLOTS; ALTER TABLE drives change ID ID INTEGER; ALTER TABLE drives DROP PRIMARY KEY; ALTER TABLE drives ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE drives SET drives.HARDWARE_ID= (SELECT ID FROM hardware WHERE drives.DEVICEID = hardware.DEVICEID); ALTER TABLE drives ADD INDEX ID (ID); ALTER TABLE drives change ID ID INTEGER auto_increment; ALTER TABLE drives ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE drives DROP DEVICEID; ALTER TABLE storages change ID ID INTEGER; ALTER TABLE storages DROP PRIMARY KEY; ALTER TABLE storages ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE storages SET storages.HARDWARE_ID= (SELECT ID FROM hardware WHERE storages.DEVICEID = hardware.DEVICEID); ALTER TABLE storages ADD INDEX ID (ID); ALTER TABLE storages change ID ID INTEGER auto_increment; ALTER TABLE storages ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE storages DROP DEVICEID; ALTER TABLE storages ADD COLUMN SERIALNUMBER VARCHAR(255) default NULL AFTER DISKSIZE; ALTER TABLE storages ADD COLUMN FIRMWARE VARCHAR(255) default NULL AFTER SERIALNUMBER; ALTER TABLE ports change ID ID INTEGER; ALTER TABLE ports DROP PRIMARY KEY; ALTER TABLE ports ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE ports SET ports.HARDWARE_ID= (SELECT ID FROM hardware WHERE ports.DEVICEID = hardware.DEVICEID); ALTER TABLE ports ADD INDEX ID (ID); ALTER TABLE ports change ID ID INTEGER auto_increment; ALTER TABLE ports ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE ports DROP DEVICEID; ALTER TABLE accesslog change ID ID INTEGER; ALTER TABLE accesslog DROP PRIMARY KEY; ALTER TABLE accesslog ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE accesslog SET accesslog.HARDWARE_ID= (SELECT ID FROM hardware WHERE accesslog.DEVICEID = hardware.DEVICEID); ALTER TABLE accesslog ADD INDEX ID (ID); ALTER TABLE accesslog change ID ID INTEGER auto_increment; ALTER TABLE accesslog ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE accesslog DROP DEVICEID; ALTER TABLE softwares change ID ID INTEGER; ALTER TABLE softwares DROP PRIMARY KEY; ALTER TABLE softwares ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE softwares SET softwares.HARDWARE_ID= (SELECT ID FROM hardware WHERE softwares.DEVICEID = hardware.DEVICEID); ALTER TABLE softwares ADD INDEX ID (ID); ALTER TABLE softwares change ID ID INTEGER auto_increment; ALTER TABLE softwares ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE softwares DROP DEVICEID; ALTER TABLE monitors change ID ID INTEGER; ALTER TABLE monitors DROP PRIMARY KEY; ALTER TABLE monitors ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE monitors SET monitors.HARDWARE_ID= (SELECT ID FROM hardware WHERE monitors.DEVICEID = hardware.DEVICEID); ALTER TABLE monitors ADD INDEX ID (ID); ALTER TABLE monitors change ID ID INTEGER auto_increment; ALTER TABLE monitors ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE monitors DROP DEVICEID; ALTER TABLE modems change ID ID INTEGER; ALTER TABLE modems DROP PRIMARY KEY; ALTER TABLE modems ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE modems SET modems.HARDWARE_ID= (SELECT ID FROM hardware WHERE modems.DEVICEID = hardware.DEVICEID); ALTER TABLE modems ADD INDEX ID (ID); ALTER TABLE modems change ID ID INTEGER auto_increment; ALTER TABLE modems ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE modems DROP DEVICEID; ALTER TABLE inputs change ID ID INTEGER; ALTER TABLE inputs DROP PRIMARY KEY; ALTER TABLE inputs ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE inputs SET inputs.HARDWARE_ID= (SELECT ID FROM hardware WHERE inputs.DEVICEID = hardware.DEVICEID); ALTER TABLE inputs ADD INDEX ID (ID); ALTER TABLE inputs change ID ID INTEGER auto_increment; ALTER TABLE inputs ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE inputs DROP DEVICEID; ALTER TABLE printers change ID ID INTEGER; ALTER TABLE printers DROP PRIMARY KEY; ALTER TABLE printers ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE printers SET printers.HARDWARE_ID= (SELECT ID FROM hardware WHERE printers.DEVICEID = hardware.DEVICEID); ALTER TABLE printers ADD INDEX ID (ID); ALTER TABLE printers change ID ID INTEGER auto_increment; ALTER TABLE printers ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE printers DROP DEVICEID; ALTER TABLE printers ADD COLUMN DESCRIPTION VARCHAR(255); ALTER TABLE videos change ID ID INTEGER; ALTER TABLE videos DROP PRIMARY KEY; ALTER TABLE videos ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE videos SET videos.HARDWARE_ID= (SELECT ID FROM hardware WHERE videos.DEVICEID = hardware.DEVICEID); ALTER TABLE videos ADD INDEX ID (ID); ALTER TABLE videos change ID ID INTEGER auto_increment; ALTER TABLE videos ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE videos DROP DEVICEID; ALTER TABLE sounds change ID ID INTEGER; ALTER TABLE sounds DROP PRIMARY KEY; ALTER TABLE sounds ADD COLUMN HARDWARE_ID integer not NULL FIRST; UPDATE sounds SET sounds.HARDWARE_ID= (SELECT ID FROM hardware WHERE sounds.DEVICEID = hardware.DEVICEID); ALTER TABLE sounds ADD INDEX ID (ID); ALTER TABLE sounds change ID ID INTEGER auto_increment; ALTER TABLE sounds ADD PRIMARY KEY(HARDWARE_ID,ID); ALTER TABLE sounds DROP DEVICEID; DROP TABLE IF EXISTS tag; TRUNCATE TABLE locks; ALTER TABLE softwares CHANGE NAME NAME VARCHAR(255) default NULL; ALTER TABLE locks DROP DEVICEID; ALTER TABLE locks ADD HARDWARE_ID INTEGER NOT NULL PRIMARY KEY FIRST; ALTER TABLE locks ADD INDEX SINCE (SINCE); DROP TABLE IF EXISTS dico_cat; ALTER TABLE accesslog ADD INDEX USERID(USERID); ALTER TABLE download_enable ADD INDEX FILEID(FILEID); ALTER TABLE hardware ADD INDEX USERID(USERID); ALTER TABLE hardware ADD INDEX WORKGROUP(WORKGROUP); ALTER TABLE hardware ADD INDEX OSNAME(OSNAME); ALTER TABLE hardware ADD INDEX MEMORY(MEMORY); ALTER TABLE networks ADD INDEX IPADDRESS(IPADDRESS); ALTER TABLE networks ADD INDEX IPGATEWAY(IPGATEWAY); ALTER TABLE softwares ADD INDEX `VERSION`(`VERSION`); ALTER TABLE subnet ADD INDEX ID(ID); ALTER TABLE hardware CHANGE QUALITY QUALITY DECIMAL(7,4) default NULL; ALTER TABLE groups change REVALIDATE_FROM REVALIDATE_FROM INT default 0; ALTER TABLE groups change CREATE_TIME CREATE_TIME INT default 0; UPDATE groups SET CREATE_TIME=0 WHERE CREATE_TIME IS NULL; UPDATE groups SET REVALIDATE_FROM=0 WHERE REVALIDATE_FROM IS NULL; DELETE FROM config WHERE name='GUI_VERSION'; DELETE FROM config WHERE name='IP_MIN_QUALITY'; INSERT INTO config VALUES ('FREQUENCY', 0, '', 'Specify the frequency (days) of inventories. (0: inventory at each login. -1: no inventory)'); INSERT INTO config VALUES ('PROLOG_FREQ', 24, '', 'Specify the frequency (hours) of prolog, on agents'); INSERT INTO config VALUES ('IPDISCOVER', 2, '', 'Max number of computers per gateway retrieving IP on the network'); INSERT INTO config VALUES ('INVENTORY_DIFF', 1, '', 'Activate/Deactivate inventory incremental writing'); INSERT INTO config VALUES ('IPDISCOVER_LATENCY', 100, '', 'Default latency between two arp requests'); INSERT INTO config VALUES ('INVENTORY_TRANSACTION', 1, '', 'Enable/disable db commit at each inventory section'); INSERT INTO config VALUES ('REGISTRY', 0, '', 'Activates or not the registry query function'); INSERT INTO config VALUES ('IPDISCOVER_MAX_ALIVE', 7, '','Max number of days before an Ip Discover computer is replaced'); INSERT INTO config VALUES ('DEPLOY', 1, '', 'Activates or not the automatic deployment option'); INSERT INTO config VALUES ('UPDATE', 0, '', 'Activates or not the update feature'); INSERT INTO config VALUES ('TRACE_DELETED', 0, '', 'Trace deleted/duplicated computers (Activated by GLPI)'); INSERT INTO config VALUES ('LOGLEVEL', 0, '', 'ocs engine loglevel'); INSERT INTO config VALUES ('AUTO_DUPLICATE_LVL', 7, '', 'Duplicates bitmap'); INSERT INTO config VALUES ('DOWNLOAD', 0, '', 'Activate softwares auto deployment feature'); INSERT INTO config VALUES ('DOWNLOAD_CYCLE_LATENCY', 60, '', 'Time between two cycles (seconds)'); INSERT INTO config VALUES ('DOWNLOAD_PERIOD_LENGTH', 10, '', 'Number of cycles in a period'); INSERT INTO config VALUES ('DOWNLOAD_FRAG_LATENCY', 10, '', 'Time between two downloads (seconds)'); INSERT INTO config VALUES ('DOWNLOAD_PERIOD_LATENCY', 1, '', 'Time between two periods (seconds)'); INSERT INTO config VALUES ('DOWNLOAD_TIMEOUT', 30, '', 'Validity of a package (in days)'); INSERT INTO config VALUES ('DOWNLOAD_PACK_DIR','','/var/lib/ocsinventory-reports','Directory for download files'); INSERT INTO config VALUES ('IPDISCOVER_IPD_DIR','','/var/lib/ocsinventory-reports','Directory for Ipdiscover files'); INSERT INTO blacklist_serials(SERIAL) VALUES ('N/A'),('(null string)'),('INVALID'),('SYS-1234567890'),('SYS-9876543210'),('SN-12345'),('SN-1234567890'),('1111111111'),('1111111'),('1'),('0123456789'),('12345'),('123456'),('1234567'),('12345678'),('123456789'),('1234567890'),('123456789000'),('12345678901234567'),('0000000000'),('000000000'),('00000000'),('0000000'),('000000'),('NNNNNNN'),('xxxxxxxxxxx'),('EVAL'),('IATPASS'),('none'),('To Be Filled By O.E.M.'),('Tulip Computers'),('Serial Number xxxxxx'),('SN-123456fvgv3i0b8o5n6n7k'),(''); INSERT INTO blacklist_macaddresses(MACADDRESS) VALUES ('00:00:00:00:00:00'),('FF:FF:FF:FF:FF:FF'),('44:45:53:54:00:00'),('44:45:53:54:00:01'),('00:01:02:7D:9B:1C'),('00:08:A1:46:06:35'),('00:08:A1:66:E2:1A'),('00:09:DD:10:37:68'),('00:0F:EA:9A:E2:F0'),('00:10:5A:72:71:F3'),('00:11:11:85:08:8B'),('10:11:11:11:11:11'),('44:45:53:54:61:6F'),(''); INSERT INTO operators(ID,FIRSTNAME,LASTNAME,PASSWD,ACCESSLVL,COMMENTS) VALUES ('admin','admin','admin','admin',1, 'Default administrator account'); INSERT INTO config VALUES ('GUI_VERSION', 0, '7006', 'Version of the installed GUI and database'); CREATE TABLE download_servers ( HARDWARE_ID int(11) NOT NULL, URL varchar(250) collate latin1_general_ci NOT NULL, ADD_PORT int(11) NOT NULL, ADD_REP varchar(250) collate latin1_general_ci NOT NULL, GROUP_ID int(11) NOT NULL, PRIMARY KEY (HARDWARE_ID) ) ENGINE=MyISAM; CREATE TABLE download_affect_rules ( ID int(11) NOT NULL auto_increment, RULE int(11) NOT NULL, PRIORITY int(11) NOT NULL, CFIELD varchar(20) collate latin1_general_ci NOT NULL, OP varchar(20) collate latin1_general_ci NOT NULL, COMPTO varchar(20) collate latin1_general_ci NOT NULL, SERV_VALUE varchar(20) collate latin1_general_ci default NULL, RULE_NAME varchar(200) collate latin1_general_ci NOT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM; insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('DOWNLOAD_SERVER_URI','','$IP$/local','Server url used for group of server'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('DOWNLOAD_SERVER_DOCROOT','','d:\\\\tele_ocs','Server directory used for group of server'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('LOCK_REUSE_TIME',600,'','Validity of a computer\'s lock'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_DIFF',1,'','Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load)'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_TRANSACTION',1,'','Make engine consider an inventory as a transaction (lower concurency, better disk usage)'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_WRITE_DIFF',0,'','Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_CACHE_ENABLED',1,'','Enable some stuff to improve DB queries, especially for GUI multicriteria searching system'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('DOWNLOAD_GROUPS_TRACE_EVENTS',1,'','Specify if you want to track packages affected to a group on computer\'s level'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('ENABLE_GROUPS',1,'','Enable the computer\'s groups feature'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GROUPS_CACHE_OFFSET',43200,'','Random number computed in the defined range. Designed to avoid computing many groups in the same process'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GROUPS_CACHE_REVALIDATE',43200,'','Specify the validity of computer\'s groups (default: compute it once a day - see offset)'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('IPDISCOVER_BETTER_THRESHOLD',1,'','Specify the minimal difference to replace an ipdiscover agent'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('IPDISCOVER_NO_POSTPONE',0,'','Disable the time before a first election (not recommended)'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('IPDISCOVER_USE_GROUPS',1,'','Enable groups for ipdiscover (for example, you might want to prevent some groups'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GENERATE_OCS_FILES',0,'','Use with ocsinventory-injector, enable the multi entities feature'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('OCS_FILES_FORMAT','','OCS','Generate either compressed file or clear XML text'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('OCS_FILES_OVERWRITE',0,'','Specify if you want to keep trace of all inventory between to synchronisation with the higher level server'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('OCS_FILES_PATH','','/tmp','Path to ocs files directory (must be writeable)'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('OCS_SERVER_ADDRESS','','127.0.0.1','Ocs serveur ip for plugin webservice'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('PROLOG_FILTER_ON',0,'','Enable prolog filter stack'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_FILTER_ENABLED',0,'','Enable core filter system to modify some things "on the fly"'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_FILTER_FLOOD_IP',0,'','Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_FILTER_FLOOD_IP_CACHE_TIME',300,'','Period definition for INVENTORY_FILTER_FLOOD_IP'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('INVENTORY_FILTER_ON',0,'','Enable inventory filter stack'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_RAM_MAX',512,'','Filter on RAM for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_RAM_MINI',128,'','Filter on RAM for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_NOT_VIEW',3,'','Filter on DAY for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_PROC_MINI',1000,'','Filter on Hard Drive for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_DD_MAX',4000,'','Filter on Hard Drive for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_PROC_MAX',3000,'','Filter on PROCESSOR for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_DD_MINI',500,'','Filter on PROCESSOR for console page'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('GUI_REPORT_AGIN_MACH',30,'','Filter on lastdate for console page'); ALTER TABLE download_enable ADD SERVER_ID INT(11); ALTER TABLE download_enable ADD GROUP_ID INT(11); ALTER TABLE groups ADD REVALIDATE_FROM INT(11); ALTER TABLE groups ADD XMLDEF longtext; CREATE TABLE prolog_conntrack ( ID int(11) NOT NULL auto_increment, DEVICEID varchar(255) default NULL, TIMESTAMP int(11) default NULL, PID int(11) default NULL, KEY ID (ID), KEY DEVICEID (DEVICEID) ) ENGINE=MEMORY; CREATE TABLE itmgmt_comments ( ID int(11) NOT NULL AUTO_INCREMENT, HARDWARE_ID int(11) NOT NULL, COMMENTS longtext, USER_INSERT varchar(100) DEFAULT NULL, DATE_INSERT date DEFAULT NULL, ACTION varchar(255) DEFAULT NULL, VISIBLE int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM; UPDATE operators SET passwd=md5('admin') where ID='admin'; CREATE TABLE languages ( NAME varchar(60) COLLATE latin1_general_ci NOT NULL, IMG blob, JSON_VALUE longtext CHARACTER SET latin1, PRIMARY KEY (NAME) ) ENGINE=MyISAM; CREATE TABLE temp_files ( ID int(11) NOT NULL AUTO_INCREMENT, TABLE_NAME varchar(255) COLLATE latin1_general_ci DEFAULT NULL, FIELDS_NAME varchar(255) COLLATE latin1_general_ci DEFAULT NULL, FILE blob, COMMENT longtext CHARACTER SET latin1, AUTHOR varchar(255) COLLATE latin1_general_ci DEFAULT NULL, FILE_NAME varchar(255) COLLATE latin1_general_ci DEFAULT NULL, FILE_TYPE varchar(255) COLLATE latin1_general_ci DEFAULT NULL, FILE_SIZE int(11) DEFAULT NULL, ID_DDE int(11) DEFAULT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; ALTER TABLE networks ADD COLUMN VIRTUALDEV BOOL not NULL DEFAULT FALSE; ALTER TABLE hardware ADD COLUMN UUID VARCHAR(255) default NULL; ALTER TABLE operators ADD COLUMN NEW_ACCESSLVL VARCHAR(255) default NULL; ALTER TABLE operators ADD COLUMN EMAIL VARCHAR(255) default NULL; UPDATE operators SET NEW_ACCESSLVL='sadmin' where ACCESSLVL=1; UPDATE operators SET NEW_ACCESSLVL='admin' where ACCESSLVL=2; UPDATE operators SET NEW_ACCESSLVL='ladmin' where ACCESSLVL=3; ALTER TABLE operators ADD COLUMN USER_GROUP VARCHAR(255) default NULL; ALTER TABLE download_available ADD COLUMN ID_WK int(11) default NULL; CREATE TABLE downloadwk_tab_values ( FIELD varchar(100) COLLATE latin1_general_ci DEFAULT NULL, VALUE varchar(100) COLLATE latin1_general_ci DEFAULT NULL, LBL varchar(100) COLLATE latin1_general_ci DEFAULT NULL, ID int(11) NOT NULL AUTO_INCREMENT, DEFAULT_FIELD int(1) DEFAULT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO downloadwk_tab_values (ID,FIELD,VALUE,LBL,DEFAULT_FIELD) values (1,'TAB','INFO_DEM','1033',1); INSERT INTO downloadwk_tab_values (ID,FIELD,VALUE,LBL,DEFAULT_FIELD) values (2,'TAB','INFO_PAQUET','1034',1); INSERT INTO downloadwk_tab_values (ID,FIELD,VALUE,LBL,DEFAULT_FIELD) values (3,'TAB','INFO_CONF','1035',1); INSERT INTO downloadwk_tab_values (ID,FIELD,VALUE,LBL,DEFAULT_FIELD) values (4,'TAB','INFO_VALID','1036',1); INSERT INTO downloadwk_tab_values (ID,FIELD,VALUE,LBL,DEFAULT_FIELD) values (5,'TAB','INFO_HISTO','1052',1); CREATE TABLE downloadwk_fields ( TAB varchar(100) COLLATE latin1_general_ci DEFAULT NULL, FIELD varchar(100) COLLATE latin1_general_ci DEFAULT NULL, TYPE int(11) DEFAULT NULL, LBL varchar(100) COLLATE latin1_general_ci DEFAULT NULL, MUST_COMPLETED int(11) DEFAULT NULL, ID int(11) NOT NULL AUTO_INCREMENT, VALUE varchar(255) COLLATE latin1_general_ci DEFAULT NULL, DEFAULT_FIELD int(1) DEFAULT NULL, RESTRICTED int(1) DEFAULT NULL, LINK_STATUS int(11) DEFAULT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (1,'USER',3,1038,1,'loggeduser',1,0,0,1); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (2,'NAME_TELEDEPLOY',0,1037,1,'',1,0,0,2); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (2,'INFO_PACK',0,53,1,'',1,0,0,3); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (3,'PRIORITY',2,1039,1,'',1,0,0,4); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (3,'NOTIF_USER',2,1040,1,'',1,0,0,5); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (3,'REPORT_USER',2,1041,1,'',1,0,0,6); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (3,'REBOOT',2,1042,1,'',1,0,0,7); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (4,'VALID_INSTALL',6,1043,1,'',1,0,0,8); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (4,'STATUS',2,1046,0,'2',1,1,0,9); INSERT INTO downloadwk_fields (TAB,FIELD,TYPE,LBL,MUST_COMPLETED,VALUE,DEFAULT_FIELD,RESTRICTED,LINK_STATUS,ID) values (5,'LIST_HISTO',10,1052,0,'select AUTHOR,DATE,ACTION from downloadwk_history where id_dde=%s$$$$OLD_MODIF',1,0,0,10); CREATE TABLE downloadwk_pack ( ID int(11) NOT NULL AUTO_INCREMENT, LOGIN_USER varchar(255) COLLATE latin1_general_ci DEFAULT NULL, GROUP_USER varchar(255) COLLATE latin1_general_ci DEFAULT NULL, Q_DATE int(11) DEFAULT NULL, fields_1 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_2 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_3 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_4 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_5 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_6 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_7 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_8 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_9 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, fields_10 varchar(255) COLLATE latin1_general_ci DEFAULT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; CREATE TABLE downloadwk_statut_request ( ID int(11) NOT NULL AUTO_INCREMENT, NAME varchar(20) COLLATE latin1_general_ci DEFAULT NULL, LBL varchar(255) COLLATE latin1_general_ci DEFAULT NULL, ACTIF int(11) DEFAULT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (1,'NIV0','DELETE',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (2,'NIV1','WAITING FOR INCLUSION',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (3,'NIV2','ACKNOWLEDGEMENT',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (4,'NIV3','REFUSAL',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (5,'NIV4','NEED TO CHANGE',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (6,'NIV5','CREATE PACKAGE',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (7,'NIV6','LOCAL TEST',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (8,'NIV7','PERIMETER LIMITED DEPLOYMENT',0); INSERT INTO downloadwk_statut_request (ID,NAME,LBL,ACTIF) values (9,'NIV8','DURING DEPLOYMENT',0); CREATE TABLE downloadwk_conf_values ( FIELD int(11) DEFAULT NULL, VALUE varchar(100) COLLATE latin1_general_ci DEFAULT NULL, ID int(11) NOT NULL AUTO_INCREMENT, DEFAULT_FIELD int(1) DEFAULT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; CREATE TABLE downloadwk_history ( ID int(11) NOT NULL AUTO_INCREMENT, ID_DDE int(11) DEFAULT NULL, AUTHOR varchar(255) COLLATE latin1_general_ci DEFAULT NULL, DATE date DEFAULT NULL, ACTION longtext CHARACTER SET latin1, PRIMARY KEY (ID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; CREATE TABLE accountinfo_config( ID int(11) NOT NULL AUTO_INCREMENT, NAME_ACCOUNTINFO varchar(255) DEFAULT NULL, TYPE int(11) DEFAULT NULL, NAME varchar(255) COLLATE latin1_general_ci DEFAULT NULL, ID_TAB int(11) DEFAULT NULL, COMMENT varchar(255) COLLATE latin1_general_ci DEFAULT NULL, SHOW_ORDER int(11) NOT NULL, PRIMARY KEY (ID) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('TAB_ACCOUNTAG_1',1,'TAG','Default TAB on computers accountinfo'); insert into config (NAME,IVALUE,TVALUE,COMMENTS) values ('TAB_ACCOUNTSNMP_1',1,'TAG','Default TAB on snmp accountinfo'); ALTER TABLE subnet CHANGE ID ID VARCHAR(255); CREATE TABLE blacklist_subnet( ID INTEGER auto_increment, SUBNET VARCHAR(255), MASK VARCHAR(255), PRIMARY KEY(SUBNET,MASK), INDEX ID(ID) ) ENGINE = MYISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; ALTER TABLE accountinfo_config ADD COLUMN ACCOUNT_TYPE VARCHAR(255) default NULL; INSERT INTO accountinfo_config (`ID`,`NAME_ACCOUNTINFO`,`TYPE`,`NAME`,`ID_TAB`,`COMMENT`,`SHOW_ORDER`,`ACCOUNT_TYPE`) VALUES (1,'TAG',0,'TAG',1,'TAG',1,'COMPUTERS'),(2,'TAG',0,'TAG',1,'TAG',1,'SNMP'); UPDATE accountinfo_config SET ACCOUNT_TYPE='COMPUTERS' where ACCOUNT_TYPE IS NULL; CREATE TABLE snmp_accountinfo ( SNMP_ID INTEGER NOT NULL, TAG VARCHAR(255) default 'NA', primary key(SNMP_ID), INDEX TAG (TAG) ) ENGINE=INNODB ; insert into config (NAME,IVALUE,COMMENTS) values ('SNMP_INVENTORY_DIFF',1,'Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load)'); INSERT INTO config VALUES ('SNMP_DIR','','/var/lib/ocsinventory-reports/snmp','Directory for download files'); ALTER TABLE softwares ADD COLUMN GUID VARCHAR(255) DEFAULT NULL; ALTER TABLE softwares ADD COLUMN LANGUAGE VARCHAR(255) DEFAULT NULL; ALTER TABLE softwares ADD COLUMN INSTALLDATE DATETIME DEFAULT NULL ; ALTER TABLE softwares ADD COLUMN BITSWIDTH int(11) DEFAULT NULL; CREATE TABLE snmp ( ID INTEGER NOT NULL AUTO_INCREMENT, IPADDR VARCHAR(255) DEFAULT NULL, MACADDR VARCHAR(255) NOT NULL, SNMPDEVICEID VARCHAR(255) NOT NULL, NAME VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, CONTACT VARCHAR(255) DEFAULT NULL, LOCATION VARCHAR(255) DEFAULT NULL, UPTIME VARCHAR(255) DEFAULT NULL, DOMAIN VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, LASTDATE DATETIME default NULL, CHECKSUM BIGINT UNSIGNED DEFAULT 0, PRIMARY KEY (ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_printers ( SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, COUNTER VARCHAR(255) DEFAULT NULL, STATUS VARCHAR(255) DEFAULT NULL, ERRORSTATE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_trays ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, LEVEL VARCHAR(255) DEFAULT NULL, MAXCAPACITY INTEGER DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_cartridges ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, LEVEL INTEGER DEFAULT NULL, MAXCAPACITY INTEGER DEFAULT NULL, COLOR VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_networks ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, MACADDR VARCHAR(255) DEFAULT NULL, DEVICEMACADDR VARCHAR(255) DEFAULT NULL, SLOT VARCHAR(255) DEFAULT NULL, STATUS VARCHAR(255) DEFAULT NULL, SPEED VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, DEVICEADDRESS VARCHAR(255) DEFAULT NULL, DEVICENAME VARCHAR(255) DEFAULT NULL, DEVICEPORT VARCHAR(255) DEFAULT NULL, DEVICETYPE VARCHAR(255) DEFAULT NULL, TYPEMIB VARCHAR(255) DEFAULT NULL, IPADDR VARCHAR(255) DEFAULT NULL, IPMASK VARCHAR(255) DEFAULT NULL, IPGATEWAY VARCHAR(255) DEFAULT NULL, IPSUBNET VARCHAR(255) DEFAULT NULL, IPDHCP VARCHAR(255) DEFAULT NULL, DRIVER VARCHAR(255) DEFAULT NULL, VIRTUALDEV INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_switchs ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, SOFTVERSION VARCHAR(255) DEFAULT NULL, FIRMVERSION VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_blades ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SERIALNUMBER VARCHAR(255) DEFAULT NULL, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_storages ( ID INTEGER NOT NULL AUTO_INCREMENT DEFAULT NULL, SNMP_ID INTEGER DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, NAME VARCHAR(255) DEFAULT NULL, MODEL VARCHAR(255) DEFAULT NULL, DISKSIZE INTEGER DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, FIRMWARE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_drives ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, LETTER VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, FILESYSTEM VARCHAR(255) DEFAULT NULL, TOTAL INTEGER DEFAULT NULL, FREE INTEGER DEFAULT NULL, NUMFILES INTEGER DEFAULT NULL, VOLUMN VARCHAR(255) DEFAULT NULL, LABEL VARCHAR(255) DEFAULT NULL, SERIAL VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_powersupplies ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_fans ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_firewalls ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SERIALNUMBER VARCHAR(255) DEFAULT NULL, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_switchinfos ( SNMP_ID INTEGER NOT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_loadbalancers ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SERIALNUMBER VARCHAR(255) DEFAULT NULL, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_computers ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_cards ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, FIRMWARE VARCHAR(255) DEFAULT NULL, SOFTWARE VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_softwares ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, INSTALLDATE VARCHAR(255) DEFAULT NULL, COMMENTS TEXT, VERSION VARCHAR(255) default NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_memories ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, CAPACITY VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_cpus ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, SPEED VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_inputs ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_ports ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_sounds ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_videos ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_modems ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_localprinters ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_accountinfo ( SNMP_ID INTEGER NOT NULL, TAG VARCHAR(255) default 'NA', primary key(SNMP_ID), INDEX TAG (TAG) ) ENGINE=INNODB DEFAULT CHARSET=UTF8; CREATE TABLE snmp_laststate ( SNMP_ID INTEGER NOT NULL, COMMON VARCHAR(255) DEFAULT NULL, PRINTERS VARCHAR(255) DEFAULT NULL, TRAYS VARCHAR(255) DEFAULT NULL, CARTRIDGES VARCHAR(255) DEFAULT NULL, NETWORKS VARCHAR(255) DEFAULT NULL, SWITCHS VARCHAR(255) DEFAULT NULL, BLADES VARCHAR(255) DEFAULT NULL, STORAGES VARCHAR(255) DEFAULT NULL, DRIVES VARCHAR(255) DEFAULT NULL, POWERSUPPLIES VARCHAR(255) DEFAULT NULL, FANS VARCHAR(255) DEFAULT NULL, SWITCHINFOS VARCHAR(255) DEFAULT NULL, LOADBALANCERS VARCHAR(255) DEFAULT NULL, CARDS VARCHAR(255) DEFAULT NULL, COMPUTERS VARCHAR(255) DEFAULT NULL, SOFTWARES VARCHAR(255) DEFAULT NULL, MEMORIES VARCHAR(255) DEFAULT NULL, CPUS VARCHAR(255) DEFAULT NULL, INPUTS VARCHAR(255) DEFAULT NULL, PORTS VARCHAR(255) DEFAULT NULL, SOUNDS VARCHAR(255) DEFAULT NULL, VIDEOS VARCHAR(255) DEFAULT NULL, MODEMS VARCHAR(255) DEFAULT NULL, LOCALPRINTERS VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; INSERT INTO config VALUES ('INVENTORY_CACHE_REVALIDATE',7,'','the engine will clean the inventory cache structures'); ALTER TABLE groups CHANGE REVALIDATE_FROM REVALIDATE_FROM INT(11) default 0; UPDATE groups set REVALIDATE_FROM = 0 where REVALIDATE_FROM is null; DELETE FROM config WHERE name='LOCAL_SERVER' or name='LOCAL_PORT'; INSERT INTO config VALUES ('SESSION_VALIDITY_TIME',600,'','Validity of a session (prolog=>postinventory)'); CREATE TABLE ssl_store ( ID INTEGER NOT NULL AUTO_INCREMENT, FILE LONGBLOB DEFAULT NULL, AUTHOR VARCHAR(255) DEFAULT NULL, FILE_NAME VARCHAR(255) DEFAULT NULL, FILE_TYPE VARCHAR(20) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID) ) DEFAULT CHARSET=UTF8; INSERT INTO config VALUES ('DOWNLOAD_REDISTRIB',1,'','Use redistribution servers'); ALTER TABLE snmp_loadbalancers ADD COLUMN MANUFACTURER varchar(255) DEFAULT NULL; ALTER TABLE snmp_loadbalancers ADD COLUMN TYPE varchar(255) DEFAULT NULL; ALTER TABLE hardware ADD COLUMN ARCH varchar(10) DEFAULT NULL; CREATE TABLE snmp_communities ( ID INTEGER NOT NULL auto_increment, VERSION VARCHAR(5) default NULL, NAME VARCHAR(255) default NULL, USERNAME VARCHAR(255) default NULL, AUTHKEY VARCHAR(255) default NULL, AUTHPASSWD VARCHAR(255) default NULL, PRIMARY KEY (ID) ) ENGINE=INNODB ; DELETE FROM config WHERE name='SNMP_URI' or name='SNMP_DIR'; ALTER TABLE accountinfo_config ADD COLUMN DEFAULT_VALUE varchar(255) DEFAULT NULL; INSERT INTO config VALUES ('LOG_DIR',0,'/var/lib/ocsinventory-reports','Directory for logs files'); INSERT INTO config VALUES ('LOG_SCRIPT',0,'/var/lib/ocsinventory-reports','Directory for logs scripts files'); INSERT INTO config VALUES ('WOL_PORT',0,'7,9','Wol ports'); ALTER TABLE temp_files change file file longblob; CREATE TABLE cpus ( ID int(11) NOT NULL AUTO_INCREMENT, HARDWARE_ID int(11) NOT NULL, MANUFACTURER varchar(255) DEFAULT NULL, TYPE varchar(255) DEFAULT NULL, SERIALNUMBER varchar(255) DEFAULT NULL, SPEED varchar(255) DEFAULT NULL, CORES int(11) DEFAULT NULL, L2CACHESIZE varchar(255) DEFAULT NULL, CPUARCH varchar(255) DEFAULT NULL, DATA_WIDTH int(11) DEFAULT NULL, CURRENT_ADDRESS_WIDTH int(11) DEFAULT NULL, LOGICAL_CPUS int(11) DEFAULT NULL, VOLTAGE varchar(255) DEFAULT NULL, CURRENT_SPEED varchar(255) DEFAULT NULL, SOCKET varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`,`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; CREATE TABLE sim ( ID int(11) NOT NULL AUTO_INCREMENT, HARDWARE_ID int(11) NOT NULL, OPERATOR varchar(255) DEFAULT NULL, OPNAME varchar(255) DEFAULT NULL, COUNTRY varchar(255) DEFAULT NULL, SERIALNUMBER varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`,`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; CREATE TABLE snmp_virtualmachines ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, CONFIG_FILE VARCHAR(255) DEFAULT NULL, CPU INTEGER DEFAULT NULL, MEMORY INTEGER DEFAULT NULL, NAME VARCHAR(255) DEFAULT NULL, OS VARCHAR(255) DEFAULT NULL, POWER VARCHAR(255) DEFAULT NULL, UUID VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID,SNMP_ID) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; ALTER TABLE printers ADD COLUMN SERVERNAME VARCHAR(255) DEFAULT NULL; ALTER TABLE printers ADD COLUMN SHARENAME VARCHAR(255) DEFAULT NULL; ALTER TABLE printers ADD COLUMN RESOLUTION VARCHAR(50) DEFAULT NULL; ALTER TABLE printers ADD COLUMN `COMMENT` VARCHAR(255) DEFAULT NULL; ALTER TABLE printers ADD COLUMN SHARED INTEGER DEFAULT NULL; ALTER TABLE printers ADD COLUMN NETWORK INTEGER DEFAULT NULL; ALTER TABLE sim ADD COLUMN DEVICEID VARCHAR(255) DEFAULT NULL; CREATE TABLE IF NOT EXISTS `plugins` ( `id` int(6) unsigned NOT NULL, `name` varchar(30) COLLATE utf8_bin NOT NULL, `version` double NOT NULL, `licence` varchar(50) COLLATE utf8_bin DEFAULT NULL, `author` varchar(30) COLLATE utf8_bin DEFAULT NULL, `verminocs` double NOT NULL, `activated` tinyint(1) NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; ALTER TABLE `plugins` ADD PRIMARY KEY (`id`); ALTER TABLE `plugins` MODIFY `id` int(6) unsigned NOT NULL AUTO_INCREMENT; ocsinventory-server-2.2+dfsg/ocsreports/files/ocsbase_new.sql000077500000000000000000001334211303466605000246720ustar00rootroot00000000000000-- If it's a new database -- -- Table structure for table `accesslog` -- CREATE TABLE `accesslog` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `USERID` varchar(255) DEFAULT NULL, `LOGDATE` datetime DEFAULT NULL, `PROCESSES` text, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `USERID` (`USERID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `accountinfo` -- CREATE TABLE `accountinfo` ( `HARDWARE_ID` int(11) NOT NULL, `TAG` varchar(255) DEFAULT 'NA', PRIMARY KEY (`HARDWARE_ID`), KEY `TAG` (`TAG`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `accountinfo_config` -- CREATE TABLE `accountinfo_config` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME_ACCOUNTINFO` varchar(255) DEFAULT NULL, `TYPE` int(11) DEFAULT NULL, `NAME` varchar(255) DEFAULT NULL, `ID_TAB` int(11) DEFAULT NULL, `COMMENT` varchar(255) DEFAULT NULL, `SHOW_ORDER` int(11) NOT NULL, `ACCOUNT_TYPE` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Dumping data for table `accountinfo_config` -- LOCK TABLES `accountinfo_config` WRITE; INSERT INTO `accountinfo_config` (`ID`,`NAME_ACCOUNTINFO`,`TYPE`,`NAME`,`ID_TAB`,`COMMENT`,`SHOW_ORDER`,`ACCOUNT_TYPE`) VALUES (1,'TAG',0,'TAG',1,'TAG',1,'COMPUTERS'),(2,'TAG',0,'TAG',1,'TAG',1,'SNMP'); UNLOCK TABLES; -- -- Table structure for table `bios` -- CREATE TABLE `bios` ( `HARDWARE_ID` int(11) NOT NULL, `SMANUFACTURER` varchar(255) DEFAULT NULL, `SMODEL` varchar(255) DEFAULT NULL, `SSN` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `BMANUFACTURER` varchar(255) DEFAULT NULL, `BVERSION` varchar(255) DEFAULT NULL, `BDATE` varchar(255) DEFAULT NULL, `ASSETTAG` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`), KEY `SSN` (`SSN`), KEY `ASSETTAG` (`ASSETTAG`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `blacklist_macaddresses` -- CREATE TABLE `blacklist_macaddresses` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `MACADDRESS` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`MACADDRESS`), KEY `ID` (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=UTF8; -- -- Dumping data for table `blacklist_macaddresses` -- LOCK TABLES `blacklist_macaddresses` WRITE; INSERT INTO `blacklist_macaddresses` VALUES (1,'00:00:00:00:00:00'),(2,'FF:FF:FF:FF:FF:FF'),(3,'44:45:53:54:00:00'),(4,'44:45:53:54:00:01'),(5,'00:01:02:7D:9B:1C'),(6,'00:08:A1:46:06:35'),(7,'00:08:A1:66:E2:1A'),(8,'00:09:DD:10:37:68'),(9,'00:0F:EA:9A:E2:F0'),(10,'00:10:5A:72:71:F3'),(11,'00:11:11:85:08:8B'),(12,'10:11:11:11:11:11'),(13,'44:45:53:54:61:6F'),(14,''); UNLOCK TABLES; -- -- Table structure for table `blacklist_serials` -- CREATE TABLE `blacklist_serials` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `SERIAL` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`SERIAL`), KEY `ID` (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=UTF8; -- -- Dumping data for table `blacklist_serials` -- LOCK TABLES `blacklist_serials` WRITE; INSERT INTO `blacklist_serials` VALUES (1,'N/A'),(2,'(null string)'),(3,'INVALID'),(4,'SYS-1234567890'),(5,'SYS-9876543210'),(6,'SN-12345'),(7,'SN-1234567890'),(8,'1111111111'),(9,'1111111'),(10,'1'),(11,'0123456789'),(12,'12345'),(13,'123456'),(14,'1234567'),(15,'12345678'),(16,'123456789'),(17,'1234567890'),(18,'123456789000'),(19,'12345678901234567'),(20,'0000000000'),(21,'000000000'),(22,'00000000'),(23,'0000000'),(24,'000000'),(25,'NNNNNNN'),(26,'xxxxxxxxxxx'),(27,'EVAL'),(28,'IATPASS'),(29,'none'),(30,'To Be Filled By O.E.M.'),(31,'Tulip Computers'),(32,'Serial Number xxxxxx'),(33,'SN-123456fvgv3i0b8o5n6n7k'),(34,''); UNLOCK TABLES; -- -- Table structure for table `blacklist_subnet` -- CREATE TABLE `blacklist_subnet` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `SUBNET` varchar(20) NOT NULL DEFAULT '', `MASK` varchar(20) NOT NULL DEFAULT '', PRIMARY KEY (`SUBNET`,`MASK`), KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `config` -- CREATE TABLE `config` ( `NAME` varchar(50) NOT NULL, `IVALUE` int(11) DEFAULT NULL, `TVALUE` varchar(255) DEFAULT NULL, `COMMENTS` text, PRIMARY KEY (`NAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Dumping data for table `config` -- LOCK TABLES `config` WRITE; DELETE FROM config WHERE name='GUI_VERSION'; INSERT INTO `config` VALUES ('FREQUENCY',0,'','Specify the frequency (days) of inventories. (0: inventory at each login. -1: no inventory)'),('PROLOG_FREQ',24,'','Specify the frequency (hours) of prolog, on agents'),('IPDISCOVER',2,'','Max number of computers per gateway retrieving IP on the network'),('INVENTORY_DIFF',1,'','Activate/Deactivate inventory incremental writing'),('IPDISCOVER_LATENCY',100,'','Default latency between two arp requests'),('INVENTORY_TRANSACTION',1,'','Enable/disable db commit at each inventory section'),('REGISTRY',0,'','Activates or not the registry query function'),('IPDISCOVER_MAX_ALIVE',7,'','Max number of days before an Ip Discover computer is replaced'),('DEPLOY',1,'','Activates or not the automatic deployment option'),('UPDATE',0,'','Activates or not the update feature'),('TRACE_DELETED',0,'','Trace deleted/duplicated computers (Activated by GLPI)'),('LOGLEVEL',0,'','ocs engine loglevel'),('AUTO_DUPLICATE_LVL',7,'','Duplicates bitmap'),('DOWNLOAD',0,'','Activate softwares auto deployment feature'),('DOWNLOAD_CYCLE_LATENCY',60,'','Time between two cycles (seconds)'),('DOWNLOAD_PERIOD_LENGTH',10,'','Number of cycles in a period'),('DOWNLOAD_FRAG_LATENCY',10,'','Time between two downloads (seconds)'),('DOWNLOAD_PERIOD_LATENCY',1,'','Time between two periods (seconds)'),('DOWNLOAD_TIMEOUT',30,'','Validity of a package (in days)'),('DOWNLOAD_PACK_DIR',0,'/var/lib/ocsinventory-reports','Directory for download files'),('IPDISCOVER_IPD_DIR',0,'/var/lib/ocsinventory-reports','Directory for Ipdiscover files'),('DOWNLOAD_SERVER_URI',0,'$IP$/local','Server url used for group of server'),('DOWNLOAD_SERVER_DOCROOT',0,'d:\\tele_ocs','Server directory used for group of server'),('LOCK_REUSE_TIME',600,'','Validity of a computer\'s lock'),('INVENTORY_WRITE_DIFF',0,'','Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load'),('INVENTORY_CACHE_ENABLED',1,'','Enable some stuff to improve DB queries, especially for GUI multicriteria searching system'),('DOWNLOAD_GROUPS_TRACE_EVENTS',1,'','Specify if you want to track packages affected to a group on computer\'s level'),('ENABLE_GROUPS',1,'','Enable the computer\'s groups feature'),('GROUPS_CACHE_OFFSET',43200,'','Random number computed in the defined range. Designed to avoid computing many groups in the same process'),('GROUPS_CACHE_REVALIDATE',43200,'','Specify the validity of computer\'s groups (default: compute it once a day - see offset)'),('IPDISCOVER_BETTER_THRESHOLD',1,'','Specify the minimal difference to replace an ipdiscover agent'),('IPDISCOVER_NO_POSTPONE',0,'','Disable the time before a first election (not recommended)'),('IPDISCOVER_USE_GROUPS',1,'','Enable groups for ipdiscover (for example, you might want to prevent some groups'),('GENERATE_OCS_FILES',0,'','Use with ocsinventory-injector, enable the multi entities feature'),('OCS_FILES_FORMAT',0,'OCS','Generate either compressed file or clear XML text'),('OCS_FILES_OVERWRITE',0,'','Specify if you want to keep trace of all inventory between to synchronisation with the higher level server'),('OCS_FILES_PATH',0,'/tmp','Path to ocs files directory (must be writeable)'),('OCS_SERVER_ADDRESS',0,'127.0.0.1','Ocs serveur ip for plugin webservice'),('PROLOG_FILTER_ON',0,'','Enable prolog filter stack'),('INVENTORY_FILTER_ENABLED',0,'','Enable core filter system to modify some things \"on the fly\"'),('INVENTORY_FILTER_FLOOD_IP',0,'','Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period'),('INVENTORY_FILTER_FLOOD_IP_CACHE_TIME',300,'','Period definition for INVENTORY_FILTER_FLOOD_IP'),('INVENTORY_FILTER_ON',0,'','Enable inventory filter stack'),('GUI_REPORT_RAM_MAX',512,'','Filter on RAM for console page'),('GUI_REPORT_RAM_MINI',128,'','Filter on RAM for console page'),('GUI_REPORT_NOT_VIEW',3,'','Filter on DAY for console page'),('GUI_REPORT_PROC_MINI',1000,'','Filter on Hard Drive for console page'),('GUI_REPORT_DD_MAX',4000,'','Filter on Hard Drive for console page'),('GUI_REPORT_PROC_MAX',3000,'','Filter on PROCESSOR for console page'),('GUI_REPORT_DD_MINI',500,'','Filter on PROCESSOR for console page'),('GUI_REPORT_AGIN_MACH',30,'','Filter on lastdate for console page'),('TAB_ACCOUNTAG_1',1,'TAG','Default TAB on computers accountinfo'),('TAB_ACCOUNTSNMP_1',1,'TAG','Default TAB on snmp accountinfo'),('SNMP_INVENTORY_DIFF',1,NULL,'Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load)'),('SNMP_DIR',0,'/var/lib/ocsinventory-reports/snmp','Directory for download files'); INSERT INTO config VALUES ('INVENTORY_CACHE_REVALIDATE',7,'','the engine will clean the inventory cache structures'); INSERT INTO config VALUES ('GUI_VERSION', 0, '7006', 'Version of the installed GUI and database'); UNLOCK TABLES; -- BEGIN 2.0RC3 -- DELETE FROM config WHERE name='LOCAL_SERVER' or name='LOCAL_PORT'; -- END 2.0RC3 -- -- -- Table structure for table `conntrack` -- CREATE TABLE `conntrack` ( `IP` varchar(255) NOT NULL DEFAULT '', `TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`IP`) ) ENGINE=MEMORY DEFAULT CHARSET=UTF8; -- -- Table structure for table `controllers` -- CREATE TABLE `controllers` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `MANUFACTURER` varchar(255) DEFAULT NULL, `NAME` varchar(255) DEFAULT NULL, `CAPTION` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `VERSION` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `deleted_equiv` -- CREATE TABLE `deleted_equiv` ( `DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `DELETED` varchar(255) NOT NULL, `EQUIVALENT` varchar(255) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `deploy` -- CREATE TABLE `deploy` ( `NAME` varchar(255) NOT NULL, `CONTENT` longblob NOT NULL, PRIMARY KEY (`NAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `devices` -- CREATE TABLE `devices` ( `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(50) NOT NULL, `IVALUE` int(11) DEFAULT NULL, `TVALUE` varchar(255) DEFAULT NULL, `COMMENTS` text, KEY `HARDWARE_ID` (`HARDWARE_ID`), KEY `TVALUE` (`TVALUE`), KEY `IVALUE` (`IVALUE`), KEY `NAME` (`NAME`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `devicetype` -- CREATE TABLE `devicetype` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `dico_ignored` -- CREATE TABLE `dico_ignored` ( `EXTRACTED` varchar(255) NOT NULL, PRIMARY KEY (`EXTRACTED`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `dico_soft` -- CREATE TABLE `dico_soft` ( `EXTRACTED` varchar(255) NOT NULL, `FORMATTED` varchar(255) NOT NULL, PRIMARY KEY (`EXTRACTED`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `download_affect_rules` -- CREATE TABLE `download_affect_rules` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `RULE` int(11) NOT NULL, `PRIORITY` int(11) NOT NULL, `CFIELD` varchar(20) NOT NULL, `OP` varchar(20) NOT NULL, `COMPTO` varchar(20) NOT NULL, `SERV_VALUE` varchar(20) DEFAULT NULL, `RULE_NAME` varchar(200) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `download_available` -- CREATE TABLE `download_available` ( `FILEID` varchar(255) NOT NULL, `NAME` varchar(255) NOT NULL, `PRIORITY` int(11) NOT NULL, `FRAGMENTS` int(11) NOT NULL, `SIZE` int(11) NOT NULL, `OSNAME` varchar(255) NOT NULL, `COMMENT` text, `ID_WK` int(11) DEFAULT NULL, PRIMARY KEY (`FILEID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `download_enable` -- CREATE TABLE `download_enable` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `FILEID` varchar(255) NOT NULL, `INFO_LOC` varchar(255) NOT NULL, `PACK_LOC` varchar(255) NOT NULL, `CERT_PATH` varchar(255) DEFAULT NULL, `CERT_FILE` varchar(255) DEFAULT NULL, `SERVER_ID` int(11) DEFAULT NULL, `GROUP_ID` int(11) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `FILEID` (`FILEID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `download_history` -- CREATE TABLE `download_history` ( `HARDWARE_ID` int(11) NOT NULL, `PKG_ID` int(11) NOT NULL DEFAULT '0', `PKG_NAME` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`PKG_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `download_servers` -- CREATE TABLE `download_servers` ( `HARDWARE_ID` int(11) NOT NULL, `URL` varchar(250) NOT NULL, `ADD_PORT` int(11) NOT NULL, `ADD_REP` varchar(250) NOT NULL, `GROUP_ID` int(11) NOT NULL, PRIMARY KEY (`HARDWARE_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `downloadwk_conf_values` -- CREATE TABLE `downloadwk_conf_values` ( `FIELD` int(11) DEFAULT NULL, `VALUE` varchar(100) DEFAULT NULL, `ID` int(11) NOT NULL AUTO_INCREMENT, `DEFAULT_FIELD` int(1) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `downloadwk_fields` -- CREATE TABLE `downloadwk_fields` ( `TAB` varchar(100) DEFAULT NULL, `FIELD` varchar(100) DEFAULT NULL, `TYPE` int(11) DEFAULT NULL, `LBL` varchar(100) DEFAULT NULL, `MUST_COMPLETED` int(11) DEFAULT NULL, `ID` int(11) NOT NULL AUTO_INCREMENT, `VALUE` varchar(255) DEFAULT NULL, `DEFAULT_FIELD` int(1) DEFAULT NULL, `RESTRICTED` int(1) DEFAULT NULL, `LINK_STATUS` int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=UTF8; -- -- Dumping data for table `downloadwk_fields` -- LOCK TABLES `downloadwk_fields` WRITE; INSERT INTO `downloadwk_fields` VALUES ('1','USER',3,'1038',1,1,'loggeduser',1,0,0),('2','NAME_TELEDEPLOY',0,'1037',1,2,'',1,0,0),('2','INFO_PACK',0,'53',1,3,'',1,0,0),('3','PRIORITY',2,'1039',1,4,'',1,0,0),('3','NOTIF_USER',2,'1040',1,5,'',1,0,0),('3','REPORT_USER',2,'1041',1,6,'',1,0,0),('3','REBOOT',2,'1042',1,7,'',1,0,0),('4','VALID_INSTALL',6,'1043',1,8,'',1,0,0),('4','STATUS',2,'1046',0,9,'2',1,1,0),('5','LIST_HISTO',10,'1052',0,10,'select AUTHOR,DATE,ACTION from downloadwk_history where id_dde=%s$$$$OLD_MODIF',1,0,0); UNLOCK TABLES; -- -- Table structure for table `downloadwk_history` -- CREATE TABLE `downloadwk_history` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `ID_DDE` int(11) DEFAULT NULL, `AUTHOR` varchar(255) DEFAULT NULL, `DATE` date DEFAULT NULL, `ACTION` longtext, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `downloadwk_pack` -- CREATE TABLE `downloadwk_pack` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `LOGIN_USER` varchar(255) DEFAULT NULL, `GROUP_USER` varchar(255) DEFAULT NULL, `Q_DATE` int(11) DEFAULT NULL, `fields_1` varchar(255) DEFAULT NULL, `fields_2` varchar(255) DEFAULT NULL, `fields_3` varchar(255) DEFAULT NULL, `fields_4` varchar(255) DEFAULT NULL, `fields_5` varchar(255) DEFAULT NULL, `fields_6` varchar(255) DEFAULT NULL, `fields_7` varchar(255) DEFAULT NULL, `fields_8` varchar(255) DEFAULT NULL, `fields_9` varchar(255) DEFAULT NULL, `fields_10` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `downloadwk_statut_request` -- CREATE TABLE `downloadwk_statut_request` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(20) DEFAULT NULL, `LBL` varchar(255) DEFAULT NULL, `ACTIF` int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=UTF8; -- -- Dumping data for table `downloadwk_statut_request` -- LOCK TABLES `downloadwk_statut_request` WRITE; INSERT INTO `downloadwk_statut_request` VALUES (1,'NIV0','DELETE',0),(2,'NIV1','WAITING FOR INCLUSION',0),(3,'NIV2','ACKNOWLEDGEMENT',0),(4,'NIV3','REFUSAL',0),(5,'NIV4','NEED TO CHANGE',0),(6,'NIV5','CREATE PACKAGE',0),(7,'NIV6','LOCAL TEST',0),(8,'NIV7','PERIMETER LIMITED DEPLOYMENT',0),(9,'NIV8','DURING DEPLOYMENT',0); UNLOCK TABLES; -- -- Table structure for table `downloadwk_tab_values` -- CREATE TABLE `downloadwk_tab_values` ( `FIELD` varchar(100) DEFAULT NULL, `VALUE` varchar(100) DEFAULT NULL, `LBL` varchar(100) DEFAULT NULL, `ID` int(11) NOT NULL AUTO_INCREMENT, `DEFAULT_FIELD` int(1) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=UTF8; -- -- Dumping data for table `downloadwk_tab_values` -- LOCK TABLES `downloadwk_tab_values` WRITE; INSERT INTO `downloadwk_tab_values` VALUES ('TAB','INFO_DEM','1033',1,1),('TAB','INFO_PAQUET','1034',2,1),('TAB','INFO_CONF','1035',3,1),('TAB','INFO_VALID','1036',4,1),('TAB','INFO_HISTO','1052',5,1); UNLOCK TABLES; -- -- Table structure for table `drives` -- CREATE TABLE `drives` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `LETTER` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `FILESYSTEM` varchar(255) DEFAULT NULL, `TOTAL` int(11) DEFAULT NULL, `FREE` int(11) DEFAULT NULL, `NUMFILES` int(11) DEFAULT NULL, `VOLUMN` varchar(255) DEFAULT NULL, `CREATEDATE` date DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `engine_mutex` -- CREATE TABLE `engine_mutex` ( `NAME` varchar(255) NOT NULL DEFAULT '', `PID` int(11) DEFAULT NULL, `TAG` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`NAME`,`TAG`) ) ENGINE=MEMORY DEFAULT CHARSET=UTF8; -- -- Table structure for table `engine_persistent` -- CREATE TABLE `engine_persistent` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(255) NOT NULL DEFAULT '', `IVALUE` int(11) DEFAULT NULL, `TVALUE` varchar(255) DEFAULT NULL, UNIQUE KEY `NAME` (`NAME`), KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `files` -- CREATE TABLE `files` ( `NAME` varchar(100) NOT NULL, `VERSION` varchar(50) NOT NULL, `OS` varchar(70) NOT NULL, `CONTENT` longblob NOT NULL, PRIMARY KEY (`NAME`,`OS`,`VERSION`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `groups` -- CREATE TABLE `groups` ( `HARDWARE_ID` int(11) NOT NULL DEFAULT '0', `REQUEST` longtext, `CREATE_TIME` int(11) DEFAULT '0', `REVALIDATE_FROM` int(11) DEFAULT NULL, `XMLDEF` longtext, PRIMARY KEY (`HARDWARE_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `groups_cache` -- CREATE TABLE `groups_cache` ( `HARDWARE_ID` int(11) NOT NULL DEFAULT '0', `GROUP_ID` int(11) NOT NULL DEFAULT '0', `STATIC` int(11) DEFAULT '0', PRIMARY KEY (`HARDWARE_ID`,`GROUP_ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `hardware` -- CREATE TABLE `hardware` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `DEVICEID` varchar(255) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `WORKGROUP` varchar(255) DEFAULT NULL, `USERDOMAIN` varchar(255) DEFAULT NULL, `OSNAME` varchar(255) DEFAULT NULL, `OSVERSION` varchar(255) DEFAULT NULL, `OSCOMMENTS` varchar(255) DEFAULT NULL, `PROCESSORT` varchar(255) DEFAULT NULL, `PROCESSORS` int(11) DEFAULT '0', `PROCESSORN` smallint(6) DEFAULT NULL, `MEMORY` int(11) DEFAULT NULL, `SWAP` int(11) DEFAULT NULL, `IPADDR` varchar(255) DEFAULT NULL, `DNS` varchar(255) DEFAULT NULL, `DEFAULTGATEWAY` varchar(255) DEFAULT NULL, `ETIME` datetime DEFAULT NULL, `LASTDATE` datetime DEFAULT NULL, `LASTCOME` datetime DEFAULT NULL, `QUALITY` decimal(7,4) DEFAULT NULL, `FIDELITY` bigint(20) DEFAULT '1', `USERID` varchar(255) DEFAULT NULL, `TYPE` int(11) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `WINCOMPANY` varchar(255) DEFAULT NULL, `WINOWNER` varchar(255) DEFAULT NULL, `WINPRODID` varchar(255) DEFAULT NULL, `WINPRODKEY` varchar(255) DEFAULT NULL, `USERAGENT` varchar(50) DEFAULT NULL, `CHECKSUM` bigint(20) unsigned DEFAULT '262143', `SSTATE` int(11) DEFAULT '0', `IPSRC` varchar(255) DEFAULT NULL, `UUID` varchar(255) DEFAULT NULL, PRIMARY KEY (`DEVICEID`,`ID`), KEY `NAME` (`NAME`), KEY `CHECKSUM` (`CHECKSUM`), KEY `USERID` (`USERID`), KEY `WORKGROUP` (`WORKGROUP`), KEY `OSNAME` (`OSNAME`), KEY `MEMORY` (`MEMORY`), KEY `DEVICEID` (`DEVICEID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `hardware_osname_cache` -- CREATE TABLE `hardware_osname_cache` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `OSNAME` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `OSNAME` (`OSNAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `inputs` -- CREATE TABLE `inputs` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `TYPE` varchar(255) DEFAULT NULL, `MANUFACTURER` varchar(255) DEFAULT NULL, `CAPTION` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `INTERFACE` varchar(255) DEFAULT NULL, `POINTTYPE` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `itmgmt_comments` -- CREATE TABLE `itmgmt_comments` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `COMMENTS` longtext, `USER_INSERT` varchar(100) DEFAULT NULL, `DATE_INSERT` date DEFAULT NULL, `ACTION` varchar(255) DEFAULT NULL, `VISIBLE` int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `javainfo` -- CREATE TABLE `javainfo` ( `HARDWARE_ID` int(11) NOT NULL, `JAVANAME` varchar(255) DEFAULT 'NONAME', `JAVAPATHLEVEL` int(11) DEFAULT '0', `JAVACOUNTRY` varchar(255) DEFAULT NULL, `JAVACLASSPATH` varchar(255) DEFAULT NULL, `JAVAHOME` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `journallog` -- CREATE TABLE `journallog` ( `HARDWARE_ID` int(11) NOT NULL, `ID` int(11) NOT NULL AUTO_INCREMENT, `JOURNALLOG` longtext, `LISTENERNAME` varchar(255) DEFAULT 'NONAME', `DATE` varchar(255) DEFAULT NULL, `STATUS` int(11) DEFAULT '0', `ERRORCODE` int(11) DEFAULT '0', PRIMARY KEY (`ID`,`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `languages` -- CREATE TABLE `languages` ( `NAME` varchar(60) NOT NULL, `IMG` blob, `JSON_VALUE` longtext, PRIMARY KEY (`NAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `locks` -- CREATE TABLE `locks` ( `HARDWARE_ID` int(11) NOT NULL, `ID` int(11) DEFAULT NULL, `SINCE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`HARDWARE_ID`), KEY `SINCE` (`SINCE`) ) ENGINE=MEMORY DEFAULT CHARSET=UTF8; -- -- Table structure for table `memories` -- CREATE TABLE `memories` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `CAPTION` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `CAPACITY` varchar(255) DEFAULT NULL, `PURPOSE` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `SPEED` varchar(255) DEFAULT NULL, `NUMSLOTS` smallint(6) DEFAULT NULL, `SERIALNUMBER` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `modems` -- CREATE TABLE `modems` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `MODEL` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `monitors` -- CREATE TABLE `monitors` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `MANUFACTURER` varchar(255) DEFAULT NULL, `CAPTION` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `SERIAL` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `netmap` -- CREATE TABLE `netmap` ( `IP` varchar(15) NOT NULL, `MAC` varchar(17) NOT NULL, `MASK` varchar(15) NOT NULL, `NETID` varchar(15) NOT NULL, `DATE` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `NAME` varchar(255) DEFAULT NULL, PRIMARY KEY (`MAC`), KEY `IP` (`IP`), KEY `NETID` (`NETID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `network_devices` -- CREATE TABLE `network_devices` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `DESCRIPTION` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `MACADDR` varchar(255) DEFAULT NULL, `USER` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `MACADDR` (`MACADDR`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `networks` -- CREATE TABLE `networks` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `TYPEMIB` varchar(255) DEFAULT NULL, `SPEED` varchar(255) DEFAULT NULL, `MACADDR` varchar(255) DEFAULT NULL, `STATUS` varchar(255) DEFAULT NULL, `IPADDRESS` varchar(255) DEFAULT NULL, `IPMASK` varchar(255) DEFAULT NULL, `IPGATEWAY` varchar(255) DEFAULT NULL, `IPSUBNET` varchar(255) DEFAULT NULL, `IPDHCP` varchar(255) DEFAULT NULL, `VIRTUALDEV` tinyint(1) DEFAULT '0', PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `MACADDR` (`MACADDR`), KEY `IPADDRESS` (`IPADDRESS`), KEY `IPGATEWAY` (`IPGATEWAY`), KEY `IPSUBNET` (`IPSUBNET`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `operators` -- CREATE TABLE `operators` ( `ID` varchar(255) NOT NULL DEFAULT '', `FIRSTNAME` varchar(255) DEFAULT NULL, `LASTNAME` varchar(255) DEFAULT NULL, `PASSWD` varchar(50) DEFAULT NULL, `ACCESSLVL` int(11) DEFAULT NULL, `COMMENTS` text, `NEW_ACCESSLVL` varchar(255) DEFAULT NULL, `EMAIL` varchar(255) DEFAULT NULL, `USER_GROUP` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Dumping data for table `operators` -- LOCK TABLES `operators` WRITE; INSERT INTO `operators` VALUES ('admin','admin','admin','21232f297a57a5a743894a0e4a801fc3',1,'Default administrator account','sadmin',NULL,NULL); UNLOCK TABLES; -- -- Table structure for table `ports` -- CREATE TABLE `ports` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `TYPE` varchar(255) DEFAULT NULL, `NAME` varchar(255) DEFAULT NULL, `CAPTION` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `printers` -- CREATE TABLE `printers` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `DRIVER` varchar(255) DEFAULT NULL, `PORT` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `prolog_conntrack` -- CREATE TABLE `prolog_conntrack` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `DEVICEID` varchar(255) DEFAULT NULL, `TIMESTAMP` int(11) DEFAULT NULL, `PID` int(11) DEFAULT NULL, KEY `ID` (`ID`), KEY `DEVICEID` (`DEVICEID`) ) ENGINE=MEMORY DEFAULT CHARSET=UTF8; -- -- Table structure for table `regconfig` -- CREATE TABLE `regconfig` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(255) DEFAULT NULL, `REGTREE` int(11) DEFAULT NULL, `REGKEY` text, `REGVALUE` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`), KEY `NAME` (`NAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `registry` -- CREATE TABLE `registry` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `REGVALUE` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `NAME` (`NAME`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `registry_name_cache` -- CREATE TABLE `registry_name_cache` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `NAME` (`NAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `registry_regvalue_cache` -- CREATE TABLE `registry_regvalue_cache` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `REGVALUE` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `REGVALUE` (`REGVALUE`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `slots` -- CREATE TABLE `slots` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `DESIGNATION` varchar(255) DEFAULT NULL, `PURPOSE` varchar(255) DEFAULT NULL, `STATUS` varchar(255) DEFAULT NULL, `PSHARE` tinyint(4) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `snmp_accountinfo` -- CREATE TABLE `snmp_accountinfo` ( `SNMP_ID` int(11) NOT NULL, `TAG` varchar(255) DEFAULT 'NA', PRIMARY KEY (`SNMP_ID`), KEY `TAG` (`TAG`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `softwares` -- CREATE TABLE `softwares` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `PUBLISHER` varchar(255) DEFAULT NULL, `NAME` varchar(255) DEFAULT NULL, `VERSION` varchar(255) DEFAULT NULL, `FOLDER` text, `COMMENTS` text, `FILENAME` varchar(255) DEFAULT NULL, `FILESIZE` int(11) DEFAULT '0', `SOURCE` int(11) DEFAULT NULL, `GUID` varchar(255) DEFAULT NULL, `LANGUAGE` varchar(255) DEFAULT NULL, `INSTALLDATE` DATETIME DEFAULT NULL, `BITSWIDTH` int(11) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `NAME` (`NAME`), KEY `VERSION` (`VERSION`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `softwares_name_cache` -- CREATE TABLE `softwares_name_cache` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `NAME` varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`), UNIQUE KEY `NAME` (`NAME`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `sounds` -- CREATE TABLE `sounds` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `MANUFACTURER` varchar(255) DEFAULT NULL, `NAME` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `storages` -- CREATE TABLE `storages` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `MANUFACTURER` varchar(255) DEFAULT NULL, `NAME` varchar(255) DEFAULT NULL, `MODEL` varchar(255) DEFAULT NULL, `DESCRIPTION` varchar(255) DEFAULT NULL, `TYPE` varchar(255) DEFAULT NULL, `DISKSIZE` int(11) DEFAULT NULL, `SERIALNUMBER` varchar(255) DEFAULT NULL, `FIRMWARE` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table structure for table `subnet` -- CREATE TABLE `subnet` ( `NETID` varchar(15) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `ID` varchar(255) DEFAULT NULL, `MASK` varchar(255) DEFAULT NULL, PRIMARY KEY (`NETID`), KEY `ID` (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `tags` -- CREATE TABLE `tags` ( `Tag` varchar(100) NOT NULL DEFAULT '', `Login` varchar(100) NOT NULL DEFAULT '', PRIMARY KEY (`Tag`,`Login`), KEY `Tag` (`Tag`), KEY `Login` (`Login`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `temp_files` -- CREATE TABLE `temp_files` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `TABLE_NAME` varchar(255) DEFAULT NULL, `FIELDS_NAME` varchar(255) DEFAULT NULL, `FILE` blob, `COMMENT` longtext, `AUTHOR` varchar(255) DEFAULT NULL, `FILE_NAME` varchar(255) DEFAULT NULL, `FILE_TYPE` varchar(255) DEFAULT NULL, `FILE_SIZE` int(11) DEFAULT NULL, `ID_DDE` int(11) DEFAULT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=UTF8; -- -- Table structure for table `videos` -- CREATE TABLE `videos` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `CHIPSET` varchar(255) DEFAULT NULL, `MEMORY` varchar(255) DEFAULT NULL, `RESOLUTION` varchar(255) DEFAULT NULL, PRIMARY KEY (`HARDWARE_ID`,`ID`), KEY `ID` (`ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; -- -- Table strucutre for table 'plugins' -- CREATE TABLE IF NOT EXISTS `plugins` ( `id` int(6) unsigned NOT NULL, `name` varchar(30) COLLATE utf8_bin NOT NULL, `version` double NOT NULL, `licence` varchar(50) COLLATE utf8_bin DEFAULT NULL, `author` varchar(30) COLLATE utf8_bin DEFAULT NULL, `verminocs` double NOT NULL, `activated` tinyint(1) NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; ALTER TABLE `plugins` ADD PRIMARY KEY (`id`); ALTER TABLE `plugins` MODIFY `id` int(6) unsigned NOT NULL AUTO_INCREMENT; -- -- Table structure for table `virtualmachines` -- CREATE TABLE `virtualmachines` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `HARDWARE_ID` int(11) NOT NULL, `NAME` varchar(255) DEFAULT NULL, `STATUS` varchar(255) DEFAULT NULL, `SUBSYSTEM` varchar(255) DEFAULT NULL, `VMTYPE` varchar(255) DEFAULT NULL, `UUID` varchar(255) DEFAULT NULL, `VCPU` int(11) DEFAULT NULL, `MEMORY` int(11) DEFAULT NULL, PRIMARY KEY (`ID`,`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; CREATE TABLE snmp ( ID INTEGER NOT NULL AUTO_INCREMENT, IPADDR VARCHAR(255) DEFAULT NULL, MACADDR VARCHAR(255) NOT NULL, SNMPDEVICEID VARCHAR(255) NOT NULL, NAME VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, CONTACT VARCHAR(255) DEFAULT NULL, LOCATION VARCHAR(255) DEFAULT NULL, UPTIME VARCHAR(255) DEFAULT NULL, DOMAIN VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, LASTDATE DATETIME default NULL, CHECKSUM BIGINT UNSIGNED DEFAULT 0, PRIMARY KEY (ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_printers ( SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, COUNTER VARCHAR(255) DEFAULT NULL, STATUS VARCHAR(255) DEFAULT NULL, ERRORSTATE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_trays ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, LEVEL VARCHAR(255) DEFAULT NULL, MAXCAPACITY INTEGER DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_cartridges ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, LEVEL INTEGER DEFAULT NULL, MAXCAPACITY INTEGER DEFAULT NULL, COLOR VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_networks ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, MACADDR VARCHAR(255) DEFAULT NULL, DEVICEMACADDR VARCHAR(255) DEFAULT NULL, SLOT VARCHAR(255) DEFAULT NULL, STATUS VARCHAR(255) DEFAULT NULL, SPEED VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, DEVICEADDRESS VARCHAR(255) DEFAULT NULL, DEVICENAME VARCHAR(255) DEFAULT NULL, DEVICEPORT VARCHAR(255) DEFAULT NULL, DEVICETYPE VARCHAR(255) DEFAULT NULL, TYPEMIB VARCHAR(255) DEFAULT NULL, IPADDR VARCHAR(255) DEFAULT NULL, IPMASK VARCHAR(255) DEFAULT NULL, IPGATEWAY VARCHAR(255) DEFAULT NULL, IPSUBNET VARCHAR(255) DEFAULT NULL, IPDHCP VARCHAR(255) DEFAULT NULL, DRIVER VARCHAR(255) DEFAULT NULL, VIRTUALDEV INTEGER NOT NULL DEFAULT 0, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_switchs ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, SOFTVERSION VARCHAR(255) DEFAULT NULL, FIRMVERSION VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_blades ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SERIALNUMBER VARCHAR(255) DEFAULT NULL, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_storages ( ID INTEGER NOT NULL AUTO_INCREMENT DEFAULT NULL, SNMP_ID INTEGER DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, NAME VARCHAR(255) DEFAULT NULL, MODEL VARCHAR(255) DEFAULT NULL, DISKSIZE INTEGER DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, FIRMWARE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_drives ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, LETTER VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, FILESYSTEM VARCHAR(255) DEFAULT NULL, TOTAL INTEGER DEFAULT NULL, FREE INTEGER DEFAULT NULL, NUMFILES INTEGER DEFAULT NULL, VOLUMN VARCHAR(255) DEFAULT NULL, LABEL VARCHAR(255) DEFAULT NULL, SERIAL VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_powersupplies ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_fans ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_firewalls ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SERIALNUMBER VARCHAR(255) DEFAULT NULL, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_switchinfos ( SNMP_ID INTEGER NOT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_loadbalancers ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SERIALNUMBER VARCHAR(255) DEFAULT NULL, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_computers ( SNMP_ID INTEGER NOT NULL AUTO_INCREMENT, SYSTEM VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_cards ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, REFERENCE VARCHAR(255) DEFAULT NULL, FIRMWARE VARCHAR(255) DEFAULT NULL, SOFTWARE VARCHAR(255) DEFAULT NULL, REVISION VARCHAR(255) DEFAULT NULL, SERIALNUMBER VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_softwares ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, INSTALLDATE VARCHAR(255) DEFAULT NULL, COMMENTS TEXT, VERSION VARCHAR(255) default NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_memories ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, CAPACITY VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_cpus ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, SPEED VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, MANUFACTURER VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_inputs ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_ports ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, TYPE VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_sounds ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_videos ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_modems ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_localprinters ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, NAME VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID, SNMP_ID) ) DEFAULT CHARSET=UTF8; CREATE TABLE snmp_laststate ( SNMP_ID INTEGER NOT NULL, COMMON VARCHAR(255) DEFAULT NULL, PRINTERS VARCHAR(255) DEFAULT NULL, TRAYS VARCHAR(255) DEFAULT NULL, CARTRIDGES VARCHAR(255) DEFAULT NULL, NETWORKS VARCHAR(255) DEFAULT NULL, SWITCHS VARCHAR(255) DEFAULT NULL, BLADES VARCHAR(255) DEFAULT NULL, STORAGES VARCHAR(255) DEFAULT NULL, DRIVES VARCHAR(255) DEFAULT NULL, POWERSUPPLIES VARCHAR(255) DEFAULT NULL, FANS VARCHAR(255) DEFAULT NULL, SWITCHINFOS VARCHAR(255) DEFAULT NULL, LOADBALANCERS VARCHAR(255) DEFAULT NULL, CARDS VARCHAR(255) DEFAULT NULL, COMPUTERS VARCHAR(255) DEFAULT NULL, SOFTWARES VARCHAR(255) DEFAULT NULL, MEMORIES VARCHAR(255) DEFAULT NULL, CPUS VARCHAR(255) DEFAULT NULL, INPUTS VARCHAR(255) DEFAULT NULL, PORTS VARCHAR(255) DEFAULT NULL, SOUNDS VARCHAR(255) DEFAULT NULL, VIDEOS VARCHAR(255) DEFAULT NULL, MODEMS VARCHAR(255) DEFAULT NULL, LOCALPRINTERS VARCHAR(255) DEFAULT NULL, PRIMARY KEY (SNMP_ID) ) DEFAULT CHARSET=UTF8; ALTER TABLE groups CHANGE REVALIDATE_FROM REVALIDATE_FROM INT(11) DEFAULT 0; UPDATE groups SET REVALIDATE_FROM = 0 WHERE REVALIDATE_FROM is null; INSERT INTO config VALUES ('SESSION_VALIDITY_TIME',600,'','Validity of a session (prolog=>postinventory)'); CREATE TABLE ssl_store ( ID INTEGER NOT NULL AUTO_INCREMENT, FILE LONGBLOB DEFAULT NULL, AUTHOR VARCHAR(255) DEFAULT NULL, FILE_NAME VARCHAR(255) DEFAULT NULL, FILE_TYPE VARCHAR(20) DEFAULT NULL, DESCRIPTION VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID) ) DEFAULT CHARSET=UTF8; INSERT INTO config VALUES ('DOWNLOAD_REDISTRIB',1,'','Use redistribution servers'); ALTER TABLE snmp_loadbalancers ADD COLUMN MANUFACTURER varchar(255) DEFAULT NULL; ALTER TABLE snmp_loadbalancers ADD COLUMN TYPE varchar(255) DEFAULT NULL; ALTER TABLE hardware ADD COLUMN ARCH varchar(10) DEFAULT NULL; CREATE TABLE snmp_communities ( ID INTEGER NOT NULL auto_increment, VERSION VARCHAR(5) default NULL, NAME VARCHAR(255) default NULL, USERNAME VARCHAR(255) default NULL, AUTHKEY VARCHAR(255) default NULL, AUTHPASSWD VARCHAR(255) default NULL, PRIMARY KEY (ID) ) ENGINE=INNODB ; DELETE FROM config WHERE name='SNMP_URI' or name='SNMP_DIR'; ALTER TABLE accountinfo_config ADD COLUMN DEFAULT_VALUE varchar(255) DEFAULT NULL; INSERT INTO config VALUES ('LOG_DIR',0,'/var/lib/ocsinventory-reports','Directory for logs files'); INSERT INTO config VALUES ('LOG_SCRIPT',0,'/var/lib/ocsinventory-reports','Directory for logs scripts files'); INSERT INTO config VALUES ('WOL_PORT',0,'7,9','Wol ports'); ALTER TABLE temp_files change file file longblob; CREATE TABLE cpus ( ID int(11) NOT NULL AUTO_INCREMENT, HARDWARE_ID int(11) NOT NULL, MANUFACTURER varchar(255) DEFAULT NULL, TYPE varchar(255) DEFAULT NULL, SERIALNUMBER varchar(255) DEFAULT NULL, SPEED varchar(255) DEFAULT NULL, CORES int(11) DEFAULT NULL, L2CACHESIZE varchar(255) DEFAULT NULL, CPUARCH varchar(255) DEFAULT NULL, DATA_WIDTH int(11) DEFAULT NULL, CURRENT_ADDRESS_WIDTH int(11) DEFAULT NULL, LOGICAL_CPUS int(11) DEFAULT NULL, VOLTAGE varchar(255) DEFAULT NULL, CURRENT_SPEED varchar(255) DEFAULT NULL, SOCKET varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`,`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; CREATE TABLE sim ( ID int(11) NOT NULL AUTO_INCREMENT, HARDWARE_ID int(11) NOT NULL, OPERATOR varchar(255) DEFAULT NULL, OPNAME varchar(255) DEFAULT NULL, COUNTRY varchar(255) DEFAULT NULL, SERIALNUMBER varchar(255) DEFAULT NULL, PRIMARY KEY (`ID`,`HARDWARE_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; CREATE TABLE snmp_virtualmachines ( ID INTEGER NOT NULL AUTO_INCREMENT, SNMP_ID INTEGER NOT NULL, CONFIG_FILE VARCHAR(255) DEFAULT NULL, CPU INTEGER DEFAULT NULL, MEMORY INTEGER DEFAULT NULL, NAME VARCHAR(255) DEFAULT NULL, OS VARCHAR(255) DEFAULT NULL, POWER VARCHAR(255) DEFAULT NULL, UUID VARCHAR(255) DEFAULT NULL, PRIMARY KEY (ID,SNMP_ID) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; ALTER TABLE printers ADD COLUMN SERVERNAME VARCHAR(255) DEFAULT NULL; ALTER TABLE printers ADD COLUMN SHARENAME VARCHAR(255) DEFAULT NULL; ALTER TABLE printers ADD COLUMN RESOLUTION VARCHAR(50) DEFAULT NULL; ALTER TABLE printers ADD COLUMN `COMMENT` VARCHAR(255) DEFAULT NULL; ALTER TABLE printers ADD COLUMN SHARED INTEGER DEFAULT NULL; ALTER TABLE printers ADD COLUMN NETWORK INTEGER DEFAULT NULL; ALTER TABLE sim ADD COLUMN DEVICEID VARCHAR(255) DEFAULT NULL; ocsinventory-server-2.2+dfsg/ocsreports/files/update/000077500000000000000000000000001303466605000231345ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/files/update/7007.sql000077500000000000000000000013111303466605000242510ustar00rootroot00000000000000CREATE TABLE batteries ( `ID` int(11) not null AUTO_INCREMENT, `HARDWARE_ID` int(11), `LOCATION` varchar(255) default null, `MANUFACTURER` varchar(255) default null, `MANUFACTUREDATE` varchar(10) default null, `SERIALNUMBER` varchar(255) default null, `NAME` varchar(255) default null, `CHEMISTRY` varchar(20) default null, `DESIGNCAPACITY` varchar(10) default null, `DESIGNVOLTAGE` varchar(20) default null, `SBDSVERSION` varchar(255) default null, `MAXERROR` int(10) default null, `OEMSPECIFIC` varchar(255) default null, PRIMARY KEY (`ID`,`HARDWARE_ID`), key `NAME` (`NAME`), key `MANUFACTURER` (`MANUFACTURER`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; ocsinventory-server-2.2+dfsg/ocsreports/files/update/7008.sql000077500000000000000000000003401303466605000242530ustar00rootroot00000000000000ALTER TABLE `operators` MODIFY `PASSWD` VARCHAR(255); ALTER TABLE `operators` ADD COLUMN `PASSWORD_VERSION` int(11) default 0; INSERT INTO config VALUES ('PASSWORD_VERSION',1,'PASSWORD_BCRYPT','Password encryption version');ocsinventory-server-2.2+dfsg/ocsreports/files/update/7009.sql000077500000000000000000000015561303466605000242660ustar00rootroot00000000000000ALTER TABLE `bios` ADD COLUMN `MMANUFACTURER` varchar(255) default NULL; ALTER TABLE `bios` ADD COLUMN `MMODEL` varchar(255) default NULL; ALTER TABLE `bios` ADD COLUMN `MSN` varchar(255) default NULL; CREATE TABLE IF NOT EXISTS `plugins` ( `id` int(6) unsigned NOT NULL, `name` varchar(30) COLLATE utf8_bin NOT NULL, `version` double NOT NULL, `licence` varchar(50) COLLATE utf8_bin DEFAULT NULL, `author` varchar(30) COLLATE utf8_bin DEFAULT NULL, `verminocs` double NOT NULL, `activated` tinyint(1) NOT NULL, `reg_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB DEFAULT CHARSET=UTF8; ALTER TABLE `plugins` ADD PRIMARY KEY (`id`); ALTER TABLE `plugins` MODIFY `id` int(6) unsigned NOT NULL AUTO_INCREMENT; INSERT INTO `config` VALUES('OCS_SERVER_ADDRESS',0,'127.0.0.1','Ocs serveur ip for plugin webservice'); ocsinventory-server-2.2+dfsg/ocsreports/image/000077500000000000000000000000001303466605000216325ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/image/Gest_admin1.png000077500000000000000000000013431303466605000244770ustar00rootroot00000000000000PNG  IHDRa pHYs(JtIME 0!hIDATx}OSQs9V*t1QhJ>lk#F{b e4 Z(BKoM&?122B__ttt4iZ[[iƭ,~ekN8w@&`S9zMh-BcY쥭NZS.06 hZ(-m`[G'OOpyZ@ĵI9—yќc*P+3z'O|(ˢGlLPFڍ;hZRع{/ʉT]hbEn/m{hjv @aRJl,G؄k "jC+\T B@4\ۖ!D-%ɸKTY_n_[̕-5$cBh[D €B!&D`A*M|} oޡ#5$7mDh5ƒF_>%W'nMM`$e*"2cblBuҕ/33=|HmÎ&Rae-b(6ߐ3>-^/fy|4eg{'{yj1oFٽk===bgZD.TΪlIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/Gest_admin2.png000077500000000000000000000014351303466605000245020ustar00rootroot00000000000000PNG  IHDRa pHYs(JtIME 1LTkIDATx}O g2-mUhuGI@](kt=h~D.Ƌ1`_8yՓ'cDH6wn-, mB`:L=l }sy4`zLMM8߼RQvOb y@/]$=:'#CDq8:/Ri:Gjğ=Gj9 ۥXO]\-1q~ScmN'Cgy;P)oj3^GF0#BTNAj=@0hxgPs%U/Ds4~!cwhA.o B$!*+dtVR(Ucl,-@i%=аZ0t3&UH02b $#/-J z'zXD>@0_F"q/4l )*d֊}F|a(,qTw*:FP:.pb鰣*-[HQwKO?[>F7LZ ss/k cmVl6vw{In-K!(V/~QP+ Z>-42;M.\޽|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)IDATxb4+\ aMyb4ʟ/ r&gݦV_,/JL\R  v{Gb4)Č ř @(";n:}1@$T`Zwp@1x_>~ܹX-@]1u83#ϊD_iۏ ?Hӏ+s tbt5' Dϲb* O.6Vâjr ~ 4 @ ˵xBO̒ ps}/~k)72032  &00Ĉ~)dyN ?XYܳ=-hrb"x_^Lӿ8@XX %Y1V@1MaJLemK/! -lbD5,= lTU q35nba(B:{ C-_^@=Bo]NRw3V_F(~~ pԃ<п $2Œ0\|ʽok]Zs2fV | ?d'Ѕ ï?yͰţ_~d( ^}nN 8]yIO~R77'+0YTl,7~+(Ͽ/ؘIĽ@ˈpH0҃|6 E!}o>ZPAP\0@#\B ˩(+IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/aff_all.png000077500000000000000000000105131303466605000237270ustar00rootroot00000000000000PNG  IHDR="1 pHYs.#.#x?viCCPPhotoshop ICC profilexڕKBQƿgQTEr4L!P>|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)IDATxbC>0 ^)n6Vb*(_Ce`ZbtbfY @Lj`Ɨ`ANK?ۯϿ9ԟ@qÿ?<&3 e3@&Fw !`ɬe A . B&$Aޞ V N+8)0"@ 7ߑ V <\HPH);t 3034|??C;O(@1 o.;Cs1)Ih8q1,ïUA$C#@|} hc 6d0#`41 ŀSO30me􇡍,g{+~Dq~ zYY 2tqP\ f`G30RO2E?V2A, ?a 1 @qL?1`Hp023(32p10ȁ~cϿ{ʎ3 yr1$8h NΊ"OM$9Ϫ#@ݏgg\nTr[ab0?N˿Ő=g[R8$9&=vxUu :,\@;u1 '"w?2r5ȴÿ_1| ,̵>0xˀ t4@`K߷ ?fpjV 6nl1011u!JN; 2 j(r @u{z[_oxm5`d7٘٘C _H` ^~no;RrB^({ۇ8xiF.p*'ƃ"Rvc#@axKo29F+؛ f8 _oްdccRbb ()cyAY܁`𗌀UgPt&o P]Xpw `zõN{ YeE |5#/Plaݩ+ n?e?~S6i&..`1AK3020IsG{ߟ'_b3_ez+,,<2L,|+c727 XU@Pcb0J_]y.pIP66Cs+@NꚓWm9ÐǤȂ3+b T}| P Ƚg\y-5מdx wclO2[_ɞy3C@B? l, PP BF\Am$xx9~͘&w~P  ~K<|-1(6%ͽ HCV-āb\,}pTKpq1wM~٧ jb ˒M>B%?` BJst):kL^ 5|Qh_~ƖWGJWR߯ <#+j`:TЁJ_hA.VF'sXi}V6"4d@|[ XŹXUoP;#Hj 2 ~n ?ax+O_~7W@;  ,dy5b8:>Na _A y9<7'ÉۏgH N3Z'пtxP *2rlqMJePGmue ^5aq&üCg~2iА3$7@']gx~5ކ t|opK 8b8Lgo?a;*#/ 2//Ц?$ ɿ ~x$" 7}yM0r01X >/ '~bAXAG ^xs00|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)%IDATxb.w0+XpNjd30e  ;O@|d,?? qsb3b`bdJch]0@1Mbbd4R-PVb|'2j1a/ӷO| %ǰԵĸ_b0Uabce8pÔѣnn(w$+;+ ?f$x w4y%~bfffýWb [x @@ @~%̀NC a۹oѿib_SHS3ȋ36^j50Hփ43@1L7F66i` rsZ(Jz?} @KSXEZ@MR÷ zOD8@_o8~9XXA Mcg4eA1d-,@1>*z_`9 N @bB d=; 3@1~W|ե dEP$1Bq@|߱ C0l W~{<blZ#d8~ṣ"G ςѲx WE2+3#/(/8;/_@w:#0C /@v~ }+ 3(у9Y / 70p؁i 8VINt kO^ pMq5h`*e+^0sr2|AUp02xp9+3C^T] R vE`)* ߀wpf QAn`p}=|cap%s] Xir;Ѕ_4H'0  }m'n>0oi#u`3ȉ?@P\}Rekb[sH(*0\OA LФ J^_ӳwϟx|v߿f;0qDv=1>nuEq! `؉}.202?qeF"fe09hP78 8!IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/blanc.png000077500000000000000000000007711303466605000234270ustar00rootroot00000000000000PNG  IHDR00WbKGDC pHYs  tIME 4XIDATxZ] kr_=ܲø.9^Ui~$df [0pIF\7kl=8punN#.YkBAV-P9AlSƧn8o|cU-si `u.6Ihsj,FJX@B " [F['ˎ4p""Hi)uF);,وYƦ,L5~u720kx"Wr0'2qE>?xcCL9 %ch"L%.]qps튋ggm-T`WQmϺ& v\'wb2=X٣G^(h ʽx4!0JkX,<"Z#`gb! ||mcr4 p nH&JXYYiUI._X,doD\GDQl4MnsX: |N)EoKZ-[lȄY8rðFU1d2m(qpĄQe,\}e\rtbsuò X85~nWM4;jT?aO8$ nȋ6k2 2ˢ0!)+D,, :AR[뺻3 NCq߿OR!](b~~Z! LjhifD"_~Xضy`&MpILJVO/3BZ&-ק&gOUi,Ks4ųcGz Ljg_2dmuJ Haf!h+n4WY_)  P0~l`?RmeeTE–Pb?1v(D~ 1m t࡚ |B/@a,I`&JFGuBPцZ<w]F*ݟLbe0id2t %F$B+EJ̨$zM2nȫT}e#4 K-=IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/cadena_op.png000077500000000000000000000024601303466605000242560ustar00rootroot00000000000000PNG  IHDRTsBIT|d pHYs tEXtSoftwarewww.inkscape.org<IDATHhuv:w5ۖk9lؤ‚-*Ž{٤ A {Nͦ:iU4Eoy%޶;z?|%ZZZd˲#绖{`ss<88FFFPUtpp\!8@?33TWWS-1ư~ztww*** ayrvviWWӧ}. Onll$MMMCR\\/Rp8`011@ ˍӚYT@7R Az48TUUI;w7oޜU@pӉP(Zzʕ%[z! Z[[G׮]`=c,zav)1M6ѥw%cǎݻw3ѡ .g[ پ}\^^571G^Qǁԍ1 cSg:5=n=.݅O muNJ%'03 I]xhpo, _cJiv0S4LV3 ] Co.+`Ix36Tn[$s!i0fjF*LL4ZF'~: wuJmA4v63 p"4C&>+4 L\=7rzV#aVJ5"E,=A;\m edIS<;ߎ@眨z+#C2Sa0&bWp7hs0 z-X( 8@8ȇab!IlEh{ 2$o\ :SoB\UV $>GgUAxB-_v(^HV27`z6:+VB XfjD\י -c >;;{)e*!QF"3 !jp<9w; ihR#eu*/o-΅mwC}eT7oG#`K|q ɩ`_io`:~7+K9}h8ToXCuCq^`8;s^Ts><}µ y9?  %,IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/cadena_ouvert.png000077500000000000000000000030051303466605000251600ustar00rootroot00000000000000PNG  IHDR(!sBIT|d pHYs tEXtSoftwarewww.inkscape.org<IDATX͘oUs3c8ΥI^HEEq)$ ~Ziwy !x+ hbAԥ(i8یMڐK3'˜|秣љ;RMwG]k RRdbA P\;`)WW;,vNbYN.V  e?Hl=/[6  I~W)] B:j&Hvw,R{fmK N[^(yH$0M#FH6g3NwV_ۏ\ӦR.wKSiA:D^g(8< ^*W6 yw8<_oK$gDIW .fT0t~-/ 2 m)AKQ$r~:DUU[ݕm4ۥϬ8!_q<#8״[C)# IR: + `W`_F㡽 Е[<}xRD3oDxB+DZ3s5f 5 WH+ܖjq4Mx4LT`WVX`@c msq޹;ԯ'Lo \(S@ M$Y}Bi.B,>Pq$o)" Pt |;̷Tp\pD:Kי#~Iܑ1BChUgBGT k 9IRp.J3po|,+8Bب1MBUڄv !{=7'h-<'H3l5m-Up;=/\îǷ]RhSEZȚAI+H28g?OQ8%K%AZ]W9Ө@LY^5=-BZmg[1=.W=eG> rXLBv-v 5 g!,P=]vaĊ9 zkz %!M bjj%\Q/!bO7pegO2{*^n:,SW/e~sW 5f&T~ 7mWwEr,嚾Y5{燣ZIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/cal.gif000077500000000000000000000001771303466605000230700ustar00rootroot00000000000000GIF89aMJJMJMJ!,Dh60)F8LX3CUX(yVD,@ ī;:,^Al7B+,[qAKz;ocsinventory-server-2.2+dfsg/ocsreports/image/compress.png000077500000000000000000000022531303466605000242000ustar00rootroot00000000000000PNG  IHDRr ߔsBIT|d pHYsOO8tEXtSoftwarewww.inkscape.org<(IDATHmL[U(YHt66kt>,q3fNũg%$}M43.q’q`nP]YWGyâFa%K|;yCB0CPi|IbIWTUV mXRRWWWt:wO\L@ E(BCڴ"|((A=o6l8 S{?lǎ2f;vR0Wӑu#pv! <>z|1LB~L+WC!3Ry~qa{!Tȁ _} o9`b}i)}$1p.* 1x;$6{Qt:pji90@-x3ƔCp57w/n0y(JJ`jpAA u$2sL|EV[_"w`go1l!: &)ɯ"R P7DŽTl xPИL(SStikCף6)) \@GQg2=U٤ͱ­-/w_e7IDIAO)Ptk7(}uKJKv 6gh}&Ɇ,j 5H+."89 $= @pzM=sv1u8M X+VzO!J%B-YtN0=YFbcIʌ7eKi%k ܫ?K`jvB>? 䀟~:r(!931))fߢB] o@kerhKJoOE"?")l铰?>JgSe% fPT=$ǻos~FB>eeoBcʡHFi)j㲫/1o`e@͸Z[Y~rBrFI]^⒧udoy 55Qgg#|5_ܧ_UExWrϊ@-I Hj ^~sDBTBA?lYP~V+]v;2jE,rxqWQtOϡ+,°|VJVy+m5\ 6 +h;2j];昐ac?Yl9u33L)ĝO11Ю\Ւ^Z*]vE.IY eZZ4_b^=VϢ˿?DrqR X쏗k8QU5^򫬑\E/v6kL&F>;ws l P>Q<0%\7[NMn|p^k]$BW?5t2BW\X>7 zfnE~?݃nIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/controleur_d.png000077500000000000000000000051451303466605000250470ustar00rootroot00000000000000PNG  IHDR00  pHYs.#.#x?viCCPPhotoshop ICC profilexڕPJA}I!z>ȩ)+ &Ǻ9/{=5? AkgOSX7̼e=U=s6N&)m>v (T3|ef ga %0/@iBr@Z@  [zi @@7T @A90(3Xnt @@oB~ii.  @@C9 )~{T /J? 0i.Zl7F1@@pJ@2d "@W100H+ج@1Ы ,X P,B92@F?n]% C2##u @`Wa@fh|؃@x >$j h 2 985+, ߡPH( #j 'P!rPGP_ps@I&>:8 /^j|1bԭ`b*6b8!_`Ip[ tIlf޻āv0d338mưg.@`E(,D4 ){U D1 `Q |61a8 M0hrjb:E@!i LLbj.DJ@p _R'"uQCT}e:a4>Xx@01\fc rGj p)r 03@w? YA L` c8a@p b8,X 0a#@1~ׁ3+,Qt3X0} h4E-Rp 胻P8>O@Nz )0fdx , %|P#0 |oPA (v πp_6 ~4]#`BTfq`d0Gb>"2 VOPo!Xj0Y@fl[ d`*L@v *F V1@@` ~^" p  u`*FRϢR|zP*g 0 Vj@^̰ 04@1/l58e3@FZ%\BHeĈd!& v > ˿X(zP[@h΀QFpGI;0](Q ,,J`IKp0  ֏z찬 P_h:т@/a*DFCX€D5UGZ'? o3 (Ji mO` p%8r"A 1DgykyG[ُ/?cD^|y6IOUY^V[}UtRNS@f pHYs.#.#x?vIDATxmk[@(@$UB@\ZTDJ J\E]_dCvfޝLHmgR,lp2ԩՕfp혧Y&S_ 򶃩;H)hȨ6KERrKûN{RK:h| DŘ+z )~])2N%~I~Ldb'Jjn*6N "/Vc $mIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/delete-big.png000077500000000000000000000064351303466605000243540ustar00rootroot00000000000000PNG  IHDR00WbKGD pHYs  tIME ./Z IDAThZYp=Y4fA e,MHvS|lc*H!&N I*JʕTaWp8ƸDlFXEIhfnF#!8yU]3}wkc4p>r_ JC7^`L0M|ϯ\,> I+?]^; 64YXDhsN#owi/ǻKl'rGΞout -ϿЀ+mq:COCᘳ㹯`A&\O'x9w !$?rrm~ʿr_xȗO?PՌPc# BZWVVds=H6ܻuk e9 spY8OlFWWWKۯ_ƈ~`aEE356< \. O%o9pQLI8ssΚU>9c:^NPIIV6P5\}Vm 7k;4O;7l\f7v^K : xT D(!b[V( `ݘnjJ benXufޖi@aa`Uv8r< ƕp[ڶiIl hҥ4m˲6Q6QQqQ`TKJ*>Iknl iC蜥bb@i I)'J8'Ot S)B񒂂]]5O{SXV,Z.3cz1dݎnwLZ^4J~xlZcj$:\Պth<ɄNI }qgkqok8Jo>~߽D9FENƔg*Zp9 yy]]:*)\n]jUT&d,9`# kl.J r-\xbR<>!k j2a@l-,<Ѧ& Vl6\ ݣU3.O&o|xY>n ] <@`Xle%[>=L9`2CC77JQzM<.f|n\f,ҥя)|>\__=5-ZTk$$gz^^% r2 ytb4 HN@&LsrivNr O ~:[>#7grx|, O&!BF!߾ 9L J_ Cxayw̤&/|+6aL:${z F"iZЂ@AS{0ݸHHpw;"J__x|q1noHyq2*uD(Riv\0|iT lb48RE*vf ;wnOInPh\'w֬e_w:uQ!yY>ʕp>mLR`s!j`[pfF*I0jI|jP^2AUtS >4{)J"c੔LKXLQڹDv΋~kelW l1G 702&+~r,Wim1:,^`0PꪪN~2JA06eٲf@'6]**dts1)r l2dJ)(c /7A'2-ڔ7 c_mm {2-j>(+52 ӉxϞ}:ѩ6ZW.:iVi*Ep}y<`fsVkAYNWXNlmV ##~EmieSQ w\+e3 s^78yS0H3eN p K5D2icd{MLd(@VssCmmݙ}x;a7?sF"D5YBVg ^vO{M^4`ܪtR]G8O$7gƾpb9rmr(TL6Z\a$f\{v?nެr`Dw8x@bJO|"j[Yctr~ֶ; m&Ռ(2\\itdF[894tE9L[^;Aa͚r:y钉p"fxpM^=;)/xj 8J c n7߸Ѵq[,_p{:@\Yoяol,-M&3a=իS/I~`{. ijᎎo+Za~m \ zCnk3UT~~Ǟڞa Y2ѭ['mh ~2:쵼Gee#&pluB0]aO~a͚ڵmoD7H 7< S^;@e>*֬IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/delete.png000077500000000000000000000032261303466605000236100ustar00rootroot00000000000000PNG  IHDR szzbKGD pHYs  tIME -3#IDATXŗ]lUνN6n6M&$) Etb#/R`"}@*S%Bnj]*QM!kcxlyؑzy.zE.ھ{?$x^`<~߽;c? 8;:WXBĘd)0@l6MGԃ/VYf8Qn0W, :a N]ܮ)qVӞڗNp&8\ads2wR|(؜Sh4YH]MOp:/^,y\y<΃wpM>{w1U D"ɓ܆:c"0j;/Iya띝@__̜m(B[{lZU8}WmHJ5.j`9{Z5EU5Fo[L_z‰@d 0MT^mo|^p3Q%YP uaYK3 Զl=s&Xm/(^n1Fc'YES+P+aJ ]: 0NZGX&,]]1*A*\L}G4k,t:XYb'å `V*Mr;yyݥ̢͛%@_'(CTX3m-ict"Ģp,uuQ~xXF-spERLMRe S@ߟ壏"XnW־cǹq7܇^sXrWn=s H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxė]lguA"(ڴ ʳ (yABBj_m+%*(R"5Q,78XiK556&g̽}]{6)G:;gvs9\~> fKZ8`E_Yv?={hټ 4]m;4)BkZB'~ =tH,Ѻ./r/zz<8jX G{hغu5z~͢Ю WH Zc߻ُ?)wWdPຠZclVdK J)u?5N:A/,,7R@¿y?ܶAy^Wߕ+nHTxW_qЮ5vFݵ Mk~>Y5x 77zb}r`k賶6beaȹ9*K URUc$R=q@B(ץ,} !M!%Bej ) }`@ru("^B'nݪ1hU ֭oazQ$|>l(2\){Qd$°m|^ ghjy!D4kr!Xx"EZy)+߿86,X,0 &rO>Y7Ʌa "X iY|1>}w}?>=8FSӊ ‹ƛ8+3$XȆ+.sz,$JT3S&8ƍ6 c1D(Ī Xƍ8&3Sz#ٱt:,z0~.烓<U. 썍p3 ӧc+ ɼi}hyuP<4hyhBSq8e!a6\ffNt[olĚw;c|q7lX$T)4W(W\buOf\jl6ϨWw. >q-r&Hizya,7=Ek!8@wll[BBXB E?1^,^u`dKzԪWIdDIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/fond.png000077500000000000000000001033541303466605000232770ustar00rootroot00000000000000PNG  IHDR|Y pHYs.#.#x?vtIME ;4 IDATxvȮ]twǶ$9N֭HIkձ,U,L .@ @ @ 0k.P!U""%R?̼1#ǭ8%U"%"UӚ#cmbj*)xQTUƽpLd,1ul,C/W-Eēyffc6{[tE?zÏ低|E0vb Y֑u#cn6Gēxyg!)pCƲZ,:7yGG#Lobr%k! ~Tɏ:G,1"v]ƒu 6qawWN =.-żx0.F*`Lոy U־8p7HSb, beRLj##}` /M2uщP;.V[;{TUJo+KE W?&[̱IT 1G|~WRD}-:z+㠋GkjoM oCj }/li@!-_QfsXˋǹR pyWPFHz M}gxߔo*TmnX~F<{ *Eڢ: kՔɷċp wDgNG̢ھJA~oF@[Q J~OV9շv{~x^'?t&{hzWO@Bj*FZQD.fc:ٜg},6yU~qС+Vj#J]L6 ~~PzS=:ms_Jui:7D1/Y=5}Kα8NEoY9,:?Ыȏ739/7KA``^P㔣%6<۱";1}~ [xKH1'l_L zOc]aM/+L4g쪴}EI:7 3SpE}Ӿ׾Ez26C'%3io~cZW?@,1\Ijo *^o:^}3ѿl_E%d[tB}]+W]\xzq2%kٺ?Q]ganCΟFfs1;$!飼J\Gx~_XbN2|޻Rծ+H2x0U6rnwũq?uj/lWSN3|UimkdGWNƾӮի끓dfh^7g85IQ˜78),_}{U5^rrZ}KSHS]/(y V7f&sV8J#ut-81^ U<їu') pJ]^Mgk98-ZNZw#Ʈ$k׮>+qJ~/Z~@}?L/L{9g)\_ J x|pBm#m Lr^>ڻu^WK8};'%JEdZnoLIf%c$R0pV(u6\ S<;~+wҸ}T~xjki(^>/[YNjGП9sh{o ũ&9Gi+㼕g-QZܗDQ~LKܔڵs::9 wa.? tͳUp4QHVf -lͽqP0YaJiM2^>}z7t>qz4!߅"frVf@R13ɖ=N6RgËS^~~,]3ٳʆ "Bg?ۓ*6f&[PSK;n_Z\~2EK%?j]jW(ż|t}0ZLpPd'.be{953}G)V˗b*&-X7j;,yJj#S=Gxg.| eLfqM^7ϲ&JX(޾"To4`/(R̴@AZm9F.b^svҷ]-Qiqk_ʵ0gCyaRս$P`JC& SE$<6[2~j=GBo6N_^hE|rviU6Z}K[})xhqm_fJ&a;U$3 0f,@,5%r-bӃJϛnf[H| ` 4+mu}IQ[D)gנ:ydOu$WחצCM9gY<"fʖfdd])+i94K g з̬Oń)nKov9݄/jʞ7 uN2RYQ G-3QL,ҬYcVr5RY3D1?]wrx<&W>x8Na@\"6"~.x(qʫ'㢹Tmg$Yk3e`{P`.Q%|t;]?H7S h26-0mtvD ͨ|j[_֛ȶ͑]"XSXˇjdACv.Qo l3ýkyu]AUZG͏kndy8X^}33e s@b?W 3YxVg>LꍟzqWO6Hs)S燠*4*ܱj;}B8nC V>Z7 gʱ% g"J![W1?ܱH9/s;K3|f^'ņoCD1/Q9g'وg7îdNJgX ;<;@sx4xdxnr8g,>id,-,Ofs;g4C2S.]h@o6N>YhtU agkuXPHJ0x0v뻉&NM M3ţ=2T gbCPwQ".̄{*ToEg#Jm^#8Uw',!c<༱Iia"'Nx`'ţ%8h;i|BÆ&+L`/)FylxOM5Idp!ߋ8- Mwj-Afcx@ݻg;B63 b2x08X$_xJס8 0y[lw.2p}Nw3 Wd^'/w! iY;Z)v:.VaJ?҄\ P3\,aS]1R3]`M[ӆz@>]CK od~$8hN&a](`/Kr2VCѩ$wsCp-Nljz1dԡ=Xd]#HE.ӹΈQ4]%@Olk3ei.2 f3R N3)['{"4p%T&sܹ}?-B8s~%N9žB]aBwT,a7@ fʆ? cyBډi>Y%p'7U =܂?I,KO9c?.\2"8:i'EXV&&I 0!Ogݪ`iYaC~/)*6 5dǏh8(:!Mp~NT/ t TP8qƋX|%ȗ> wrBv[Qql9,0XU '.$?qi @0`•8Ii`)-'"V9G-pZyDQ ?B:p'igfΟGc+p5G\r Ê%[]"X25@|- ?X 7A;;B Jn S׷ _obU d%7. zIqYp`B$C,eV̒q~i?`8jUL@vsBp`$ f92#K!Hn0Im<+q&3>t-?Q*ToQH$h0'l#4!QqDC4:?N4}P$ pi~4J'/?E ԫ5'vj@`$ Rp6dq!y;}pwr`j$t.?jE50WCfIjOq7L U r:c8sطE@0uuk7 ^x@ꭠ#ݑ>ZxyW -)O &ēHuoo9(w 8C[G:7pPc()󣖯5Vn!87Q![{.S1U \3~ ::v83'V ce*(s#} @PȰ'஢60F-Ʋt9l}+ z /2.sF2'|,^/JqO?2  ֱu>#G1h09V6Ͼ.1# p@T$"n#c SV*Tmeݣ=(f">`]=nF.b6Xt`Xi1 Vt]RP # > pd#|4 a0/Ya Tj-ᆳ ]OcňD8-f\^ W)1/ pqܴ?# P'T 8-@ ̛$3]siʩ4ZVŜd"fC5 (c1s>~Tx!Oِ=0o|ieQۚ(&q ܄܎ `-~ԃ젒;ŠW@rn~T?23Y6bkڏݦwWpM@|)(G@%ky Vҗm|C!ETI=ҏWql 9Ƒo Zn$ 8XuAp97fp=k6|iWMMxjyDDo>=?%ćlGsRN"k}AE3j5d<ٍ;Y:< pe-ʧ@ WB*q_gF IDAT az`|eNlALL<>- 劌eQ(F{%0F !9 '!խţ>{A ŷd[֒MӸ+mq7я5XS%8iMvW! JWC +$N8_j-{e"vD12QAxj+j2Ӝѳ@I#ZFp07/Crn:IsGjJd.7u%'l[wZ 9 O":Է2?7B5 g c,|AҁKzDbWMgYG_? y `p뗩XqСCl49N9J8psp׾ծNCͨ]#In3 .Hp@U Ս\_>hzڈOֽ'/ꅼ'u=;?V䘉vcѬ%g2o Prr.f쵭u?)jJikIs0.R81_@*XGŃپR?hk?rجC7f8(Z6SQ~նjJZNr _(oD:1㷷G?(p3 h,  3\Jj%iż|2^QП)Ls׮n~6\B^t M8(9M?.fsVvuhj2.л3:zG݉eOHf6歀 [&"tuv\RK3a7VO|Uo(ILd~q`=66IAZ%9K99>mPR0iNmm-s܇^}be<4z=uwv?`&g99Yrnu Bܰ}MmlNn8ŃٮE~+Ŝ/M,UiT5Ҵ::UsU%RӦSg9L~lǩikm+yWUeX8?B׶Ӯvw59JNbv]f  ic`%-iWƬq47~϶6julj|s"2ZŊG:yYaRkN酋$Dtnӄ7i N -e~E -^_47go(nK<׾뒖3zOv\TPqbe73stZe۽!]"yY1 @p iB# Nyh#»"&>y~vঔSDV9/r `8gv͇eoU+wYP붖~Pgv[wݥ-- -rE3CJT+k2޷H_#m+)k+6è/}X,ؾ#)4yfhѪnS2FeMUӔIL zfj\Wfīl}{XΗ?;EeSNW&4fJ2Vy*T)_ѠkVd5?.!M?uDư=:Z>j+uv"~?7z]vzBVA'GxhRJ{Y6kj:ݔ2 zw^|0I pFnci`;i x~zo+ٔo ^_me܏`ci`jvwBUthoxJ@궒MV/r`{b&מ+p ?_s4:(SZb{u+MsGyT{U؈׏ZU}GkoQ+[ۼӮM˫Y ,qlWMꛍӛ!)_b)o{E_^q«o ;ݯDi[?/R5zy_e!0F7r7[ eC䫏_U*kýxEh2\īo&?i6 2z+Ug_5wYӏ8>PfoP6|¯[y^{F7 5*wSqy-`߾PI:epR7PYh -V6?zȶ}ux?^"e#O{ye+m+{q@ &ag\6TS}beӂCW_r/=z.b--}]#.0?~*Lβs;;Yioї,ep LS>ٍMsn*鯭 3+Sϫxkid6/2H4bqsUŝ](ZrGo(y\qT# ^'hb^ퟙ݇n*nvliS8\ǚ3ُCGo%k܏hE*^GOB!^e㍱yoh6?z*5Xi>rW}wӘ㈬!c@[jwySkUzوZ7&!]7691Z0xPqھզHrΗA.VLIIQđ#{oS"4ڏ:}`Wt/{ k"YϛR~jrz."iYIg9b&kZ#IaԮyOD7" pk@<,@ŵǩzmkZTsV$Y#S&la[P&90jj0^6"BkOv m_eib|uyn88/~69BMU#RmފS A IC&d@psjר\ċ}Lv.F9.2v u;Ps Z7tz`Z(Sڼ}k:{/2γU,- .2Zҝ)!kJDOLh Y0$ Qcx/ݘ]VNVxKG>S6B &M ʪ$^œJJ򣡟1Ćac_Kr~в֪Te}-d"cp8hSP׈u/gtJ/EeE6I1uSIs]{Pcaq`J s܏F@P0huW }%')늆AFA̴X}jddSʥu̫¤G*&csa]QΑ~qOZM)usRaWɾk2-x+P(+ɀ$fF[9ת$EV%/Mv)NJ&7y]Ҥ1M- usV׍XCEv;` C$%d1 5;@ܸ ǯk:~;VQ]-9CQ~xq$/,hDץ N$qF7ǡ%QpNas@;|s{u=f*2~\ő_d3Ы2$4Zzs0^6Zz\89ZD\1̔/yxz+Ql'1#>ۉ#~Z$>;3-r#؇z\Z{C&)Oō ՔPp2_ލMv#*N{"n =l]#$b"c%Ӯq}0t:t>8_\Td&e-n立 E-L d}仦p3po|_?ѷ}O@( n+3\G88,08oQQYA6wyuO -k"lnLh}F{WЦ8 mH^'ch01`#'>Gݜ|J5rB n28t[<sGx E=<^G{3U3ֆsIA mD`sG^10QU!S~fU@U]_OgVcxjJ ss78⿟no;n ==ռfݎY(BpE&\ #fMٜga f}0RSI8ZpfzXKO.rדܽ|@dTˆʹi7fJY'ІۃI+żtu&qir ^6:?6++_Uڶ#Y>,r`n, xOU y<M ԄU[K' ` ==]umoϿ?6G4凥uqogm,4<\z_nUDž!ncl*Kx_qh,-;{-=-ר>F[QUP:7r喗`vZfNs C'wBU}ꪌ*e@OYJڽg8Y䌞=dn^cw;i"ؐ 8`Y*\ՠ0k낎umi&z\ۨ4OtoX&OUq*tvHQT"7wBQPt㦃p:㢠NǾC3P*=,[]EGn-:^ ^L/aҎN !qNO_8&Ώ$On/^L2WPi[~DYEvR潁ζC 3=, 0Mpdy$Л WL3E!zP| ";) w؏L ]pDiG0l@X :ɱ׫[,':-՝m pva(f.$)ҏG>GW lNjrnؠ3 8G\}ϓ.c( } G4HçH9GOsl?4Af#cD?*DD 1eߏi7`:<3{棁O$ڽx}_xL/aP/zd DբH Mh[QLv͡IDwx`LLa Jc`f NB#Cp?g8oEKJ u=^8hG3e'OZ}Ƌ?&pYN 15*5$c HDD]#'μtN#g.h!=ᚨ|^JU+Y`79(LGv}4; Q́ xB|" Ɓ0ǖҾigۡRFOrH3QQ6Ex19DԵHX`[͏ѿ"@E>e>/?a5Y ;)%nW3%{Ċ Um;N "$KO∎>,@I]9Sӡ rd 2`)4%m =/щ/NoPr?we׊~c>~AU Q0c%~x fnBuKicUnqʤ(iV~ GO7!z1J_E A΁Y  ^ :\)];EŔ u /ұK"H.NɎ2V"Uz'PՃV 4}#9(D4l^魐 @ȵv:37QDרhL)կ'FUf @OP Ju)'8#2LS{3teǾ 1~~vݸcM=U::@ ?0#~G#5k\\')ӫRUn.Ў}Q2JLmӞE"4@]-#|7j 38b@xnbFÑ}y'v@kq+58JG(\ _FLi>nVi\Փ!f)߿Sw< 7@DYnxn'vjfJr&hڊK-19 ?BkQndJM)EM<rz5%cWr|7f-PZLP fIj;QR(-$nV_풙 9"'$QiG6T, 5vJUGhB`_5 c/;4-‘{`q2qE6%yU1cx'ˍ| k9%Zm,ObsO2 p,qZ3(0l(_ZQ5)c?|(+_ IDAT7]LӀvF00Yh1A͠ "ӉQߢ+="鴟Uuf} Uȼf"3Kuܾ*TJ ʄin: 3u`<0` jXq NQr-%u)]=f"@m+xO*!yP=[J`,M "wBhSNy<_c:) S ]jyrhJpL (q^k?]vOՉ'㴘rũRh  9Է f R0S2N;ݮ=ɷ8h*Z>!ϗu7Ynܤ[c493EDèP* GijZ-o*_'#J8Ng4 eKVuQW4Eה}E0G^EB v[Ò4b#W*|. tSeP0s֞d&'ASffݫtdv/0;NC:BmtHD|hpl*R@pHR]JS"v#PG\zP4OzݾxhT] *ͫA)(50Ka:]D?ஂ̔/ ַ54-lf9qbt1'3K;ݾxTi -^˵o+`0 ;00agbe'wJP|Zj⢎Sv;ӫCuO; p6۩磬;g||a /XZj%,j%wM)8]ޢ84Yov\o躣sϟݾZa4YV /2p`&wV_H[O[%(QJ9RjJM%wNۄv˸ ك Z/gx(gG`/3嫉k͋\㠛Cm)U)טy\+lGfJ[}O#vNpb.]S"S2$E}{1ҷym_dVi}]|ĕ$9ԴXQn6LJ'w9j#(u/}m3Xʗk/gTEFXZgo_]-WT}OlpGfAHVqX [Qs>扪ԔR]5Ws6L^n ~7y Bly;xX0bW.(M2*]g[<8%.գ`tn֯c.L[LZ:0ZJt7 P>}` Dv'QevkI6@}vvu lPS9yg+rNrM|JWp[fws*gߢ5 YugCc_]GYTUhz=i/{ݼȀpsr=M_GRM M9+]T\KXW D^|Qs7b&ݫN8 -f1x? UeNL%>q5Ni:mS]k J D6Ͼk5-IMȢ<7#u[8\Z/v¾GGSI ]@"F|CGc:]E"Toe}vDŽ.vIgU/=y]sj-A~okl ӄ=mZA0՗]zqA7/ήXZ<3s"Y,'w]}qN7}"TgZ Rz8 n$|9/ˏo#"j> 0*v_m8?c<P]el m_}^ o{X;|G]oaxY#/r?j*?βY0Iηz]ţIRe-+&s?:vc0,Ge nF0-hEJ^Q-?l*YLs/WHR.V;cEJ\UR1tnnLR@܈0xWn_U ]#2.JfW$~SjkJ_m0+`Suxhiw9.sZ{.ے \UVVrS&>Ou[&s8#(tc[>FG< ߭O7"l*sԊ["HnCtMֲ~t'o1ƛn_]] xŭP]b`QyrM7W#眛V>W$9|;Pgiu(I„bd؍nJ).5Mzㆾ%*XrݼU!_>f;p*~/rҘny35$LL N2H.*1NJ& _~c4Quqq4#~Kdp;bJ)ZL՗ֹBHn# |;vm-qZs2QaoBgŻq&swJK5;K*(QQ&۶RR.eESo7BJK]N aӉZ;Y}\jcp!9fJ&Yl\BvLQQ JD;1E!+-"!" Bf<62uIAILxwiVBJx6*Q3tוTȮf*+9Oו[TB0a2WTc Vʝc%DP[KUٖ<3q"y՘B™ÄٿuSI]q_l%2+L}y>~Qog4`L1Ql:{ _ G 뛫ROJUJS继m:E rG0],x$ٵv7XY+M)un:h6wNDHxOWЉs^/Q˩~\omٙJ>C0 )}{P*G^/KijqRL%uۇrRiAQ0<OI]J[me-l.[Ku1@S1ĉ'_r&ܴjs Zm|b s\1or#[(l+M=;ޑ6FDFUFFjRNV0݄D~L3-fR ߴK=؇kݖbGVkCJ^8y'Mېrtʟ7#2RZ bEp XkVzpsq"y'm+m%|:R"oqӚh fj)7"T 'YrRfm؄ 3u_"DBBdُ:K7VɊN2&"oFY uyIS 3)ڐ 6tZq[T, -oOs;_5 @+1Gof{˘_#T|McX5iJ|J}9s8KΊk9MYQ6 z砳TBD|/Y֬ )uޑ9+u*Ra6ހ?.՗'oO{>PU_$S 7=Š_#/9/Z ߩ?_HD˟ 9qDd?(D7Mi.t!-xTەm^%m}Ǭ5)ÊIibR@^vYӾ{rVMadB=N mvd>UI4Ēc@ *f*Yෲ"/hxVOL64 gjt9w7ݟѹ8Kj)$rE OZ ?,Z!ϧ* ԑU2QZvBӅ2u'&Qg38OpZo1CYKո$ib̊ fn^ >h~pD<Ј4Yj4Pwk@pYSR` N^m.*udԍ ""( 8 84/ x#eh&e.X|HA3ҙ b7Xsvp6{k KIK-k?~"A(V&tU $ 9 mZ0iRSq(^cH<[ # ,gf*!at|F~%~}P7} " !'/{^codX;_+`$UD14xꪔb-7ST #g*H׭w)Xppc1$ esk LE0sIqAA~d*J1 #ObCNg* (pӌJRZ;ȧi)$ `iq,u!r:Qj~n)ִ_]06,JQ8E(NT:U +M_=$T59,BѮEEQTE$~Rź}vgaۆo!sx/ ֔%%RRROTVRV.8KT @p_:UqJUB0nwI{zFߍF*Ν0praXVRf@AU-u9O3Nc e߅TE %6~gw(aLUD̽j(8S&@?ì17}I(NUz%j7!i%>mC)BBvVJ;O@2}I0%yQ@Q3ڐ ?wMZ_R&*IP㸗/>xG71GJ{^yO:njiLNcd*.\屢)8u!EPrDɄd*P/T45:6ƜdJiB #N&>{9G/ _ƨ3d88dykߴ{..*&jiP\R<ۓ%9JT%*siqa|~0fRjd-McqyىtZ[iӌ' x7m#M%b~4ppxJiJHo?=本λJi c|#G"M;]ZŴ=Z/* 3響.m[h&( D8'U.m#"c8L8Y黈n `u,!G~%3)A@aF: Ԋ:zD y/uCU[K.00f dZ k_DfHP5kCp /"y8G˃sRRrTͲ@0Իԓs/kh?NFJ)V,pxj[iJo[rNW (f{WQvqS =|224ʐLsncS5 eY'U-E%m+_Jc^̔7{!A\⬸FZ![p_Izj{ӺX:fJW./ Oqg= ޞW|擑Na`Rni \iOEϙO\˻HFie=h~8ę(is "ڞm$UsČH/|$=>*Vg,Rnj:+LF+Z4;ne}& HGINUJbzRϳZ3Mx>ݾN#c/Yc͍VciHM+|Kp mc֛*E(}` yaa$𢨤NL cJQ %މPyAZ{1:N+Z'c"?45X;eJ#;(Iu#u;q4\.T퇙k!/{ǑQX{.L480JGpO󎎟Y)F_Hs f$g!ow4=mƊъgo!(dp!~ץ1礬5Hಘ("{1Jyo5I1~J$ME%%|K0P?AKetccoFpwC4bq.:+*k$ر M]PίZ!Nm~Hr]1GB4 `ږ)\_YzH9 " ɷ?_*;q&P}o<989e63uoR8l > O@况}J:IRŤ 4P% Zz_izesJdҊ€@šz-U78/ֽbZs9 T$RwuM8'Xi?O"Fs`8 T(P7/*W5R932d1FZ$(x'h-9Gz)rI*#u^گ [5-/o-5qA94<,}?Zy5n WϳX/&gx>['U㷥+uG뉨l<)ZQYj+f"X)ܮ֓yhN*m1jiU7-kݵxvUw^:AHcD5VO=um鶥m ]00Wj0 TA-D}&U$xWgDA$@]^ o\! |ڲvo|n)(Pw)6eJB5KTNv=N eM6[߫~{ZvC5K,՗ ['OvW: 5jD/'A`Et^[O~&iWyz91izmawֺU iZ7E0 Ƚyd-EØBc|ݴQC"T5j]>΃88>BO[;M}tGiSاmN D}Y7B=LI|Rn#nKa3sc")6=+Fzu?ڢv;o4Ck o~v QJF{R5?Y5PMnיpNwV8![u9{jX}9g|ݴܞ^b|^7gVUg>EG?rKV P^릵Bpo`Hc++ Cp $p E|Θair &f[Eet]1,qxdܗU{q'/-]myY9c+Bu^>@2zW%V8/O[[5"u uyWѬ뭇2+Oos9oZX5./j[N:?VՃpIܶ~Lݐu^]"i'p/ DEt]P-'7F˪? (PXG2yy ULӌŕϹ͒Nl ۙR} <Zqp$To1P׭XgqӊЇipteqfF:T`Pnae?_=jzkᄈ\"mI'':Km}UIN2gv+jǪ9)4*UoLՃ~5?hzeY)>5֊Bm$pAC?3[DA&GgT~Sun;u/6TԳ<=49ۋnڲ⼏7G4W|^5EՑL8/_d&o$n]gEfLF~ ^>,Yuf#a{<2Y?=Z4YξUDygoTo_wq%~Y?ˉYL/o'ljgew-U,n;MSiҤO ׳Ӝ@# \)p)mӧ!최44C8K㈲vG,طz};KɦswT6`_A8T-tDoBl6Ibz/΍uvkZVDi!z8Q_o˃uyu|ot&g#1=nqEvġ!,3?Itz޵ uiO_W4ч*nYW'EyԶ{+j}vx/k y''=C:w{ ܦεDT@ͳ:9b,s_;n7 pͳ1ٯp%HRt!B>n졡Yj>̓#~UG^Qô;rHc05g_+Jk$IPN߽*ØWu;3}Ρyu̠<Vvos: jÿ.SKTyugڕ6мt'rmi|gR3I>ͺӭ7ii4?u8#0K _5 :0g{>?bnhs%@뺫:T'jѿ9~Gt\Ϸ#:PODΦn@^4hLibWOc[$D?3@:I|映g5h?Kw)؏w~yfXJ۹:9*ߜ꼕.a^xn`5pg^NPӮ[u`c{O) KI+7(PY'uY w"SWC5n;Ƴi11-h><!˾qeE]'ajcYm1NI0fvp&Jqp†kEKk:GTQtlP`4OjyʟoKǚK\= ;"(^,կ3 칆s[dq F@)835.3=jP;? P6 eBn-i8WvF: _$rㆴ!IBu9UQ+%uϩ*Řs~ǚQUT 8{|/*A3QAv.渌JMfxKϯ ltw$MsϠw[Đbp+Q;$@QΚ8P-nmG84QgO#IuYܕK;vPs%w ] vq$=SOm<:v&>eu%o4KsT@IZ$\}cu"G}i7RXŤcC|)jW1 uvlGԮБ T;绯+Zu3Csy;ק -UWoxtx9:v\!0ٻ2fU<ڠZo)j_6ݝ^:_O+3FsHރ9fjEB|%=uu RLipzԁt:}`#['ùM$= '9mK[u6ztvБ?Y?Ê꺎rx\Ѹ {n"BCpU^WOD+vk1*]y}%"Ttap= 3i|t~.꽶 {P;]:'w'/@ϐ/kVV[zA1*tXX%nݳ3 {zn׊ӳVqǐ`k}^GnJԹ\YZ+v{]6'rݛAԺ%p/`к-8>c\~ B}T _כ7{us{*#,4wa,"owҾB`׭*BUJwU",QW.:Yw 69 \Q{TVE'qWHֹiq=ͯe'wiYY VwRj( 9s`%@kyoKWw @N$GcEaDiV0*dדMsIOێN1Qn{T\UؖΝuE^' J^@'Bew 0F CU=/&ٟIխ_mW$Raevr j'E˧myIeS!|پE#S. PZ!xC}&.[,[ :0Z v`"TTU/v&Pm;$Ї$:{[Y*7?֝8I']eU{mb]G!fz#'"4K;r_g.*A}wjqwy3S!x u R\ܓ>̂{xMmusW,~ͦ8OS }udw yg9Oۓj^n0i)=r,By\ڶBN BuEo`x^6C0 ,5gWX'WM-jcՠ\@=#b?pz}|[9j9.+`SֽoRЍzm+l:OG UQԦpKzqskߏuQc<`vyn^V?4h<3[y/<7^!ھ|Aл{LJ~ExX- N$t/m}`l44?[&ġz2j*Euy)k?Lgs;P[U6I穉~huRyg`L4qu_j,BmZy$T?>h^n+EM)yghڕ>4]Q :.$ yuY;3s^E(r4ߋj:U0`&~W砺 byj>&"lC~mHeN#$Hʮe飑Gq>̂/3Y-jW> ,Iw"E嶥+k?Nki2sگ'ƑRiYjv;p;*Ϳ?<7`D/TԮWjаVNZ+oye,0U;ڋ˅b{!뤱oK>΃Ip'qi;w13:i0G;$kEm.WϩzV),Y@ЏbZd;]wQQ+m~pgKuTqV05e7[8/Q'h~oL_V?Jk];"0Smޯ$/lzgfiu^7x95e}r*&HY7ʝ뭿/y~Am=G\y[ߘh91Q6>Q>̓,փv\ĩڂjw6eGۑ#toAIqÿ=DEힶm)JqC?\3 ԯhUn֧͓D3۟I#n kݑ%R3 okdfUI&Qv@#d4$@pۂI2LKH4umnDJ$D'yB~u?{]Ԝb~%:NcU~]آ"3&:4ϯN5?̓i7}YgVG'݃dPG:/b,a^,( 8cʒD?&wNv_rhd4E:u/*Wۃ'BQHAw[Xz_0CFjK~,}M׽kÿ~ ?"BOk8_? t[; "ZNZ<5ɋN>CLafVL |yO=Iⅼ1k?sR3MȉxO΋[5kŊI+$jڄfS\(*)ѿbfM[;᏶>FTDQS7J/'4Na&ED*ET]9ZoY^{ [XFd:% BkeD $iR-iyyJ!nl6 `<҄˼82CM#1ri #h>=2[m\Y# iMb(I">GԵiC?Ml[IDATMEhYPbxT; 9{ϋPQוsDhGWrvd;f_#Zs'?U03-gza`˹V'Dvm+~Wpȗ瓢"j2_ -?oNZLL&J(J?.H[V㷲& y1r huyyj˃or+_V6WJ9,e-SC0 #Ύٕ1E/Ƿq]q]ό$78rU}0&fmDHnsveuxO+d*yh0QQI^3
!.BhG \P R^Ri].{n,KI6gI16NxmlwXA+eT`@$@e>sifv3g+eU9Bk#v08 K2U|С} ̤CWULU?tSϮ$wB/4;Nǣcw`nCw~djI? /p)j#ѼJ 1j?=fұ'DC]{q1{!EERP cYT8J 15}&=Z 7pJET(h!ўAS,"DÁ{^wyd?~RKyYb{qCڍPHO/VWhM!{P-{-pBHE8 H&%W ̤fj5=4DqbpX RJBG^| i&dGFKo XdwRk֬&pN2]WVH"AՅ9!IxZiRųh׻!ky8,,j~̏h-ԦWULDXsnBezZ&Gh`D"'A3kP>XbB)ج߷X}KxD!E*PgK *X;7N '0D)dDZ3}7c!pJEq{ sMK?{-'u_TI ~ƍ5wx[^si߲f7Z{T==o@vRvHO/3ܵ+hŊw# if,ŋ HܶFzrSh&n !M#t X$Y cO],܌FqxǏ8e%I%ѮCܠ'I2U!>JS RF(I翀v>J)yqKrYcLU #aЮ G|ǎISw_X{p=ٲZr#{2^^ՊMEZcB[度:zLTؿcclوƘz%𥪳3hi(Kɪ_` "WV\bߟ]\[gF eY3VnfqŚEE"SkXF.UVETua\Q(_㎿}jSmp"AǶmD׵wT1<kE <{|6d&kn*}Pg3}d<۷Z;o+0o= AǶGѶ_tQC D۷nE;6˫, pGBJiMgt7z A8"֒IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/info.png000077500000000000000000000104631303466605000233020ustar00rootroot00000000000000PNG  IHDR szz pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_F^IDATxė[l}{:$ n I/Ĕ Dj (U/6BUEJ*Ԩ}qD^Jy*Q%Q#r6 KY]î6N_87߷sfgfΜ9Z<4@{*4@ x8E_p/-[_aq5$J)(z>O?R %J[YǖT%\2"ϡ͡S.{W5.񃧞3ia܋ h -YT]kʕqhk{vΛ_m~pM7}dِ c-Vm,%6XPuo:o|?Z(O=m #S42 `|N,Pp0OYe Dƴ|p=^wla2!=BbcKc;ͯ 9~S|/䁱@.9џ;lY}W*sZ>|̹^dbO=)7N2Qzn 11BYc' pvpIܤM)+Z $7Q&LdžrR +pS 7):Ey<^z˒H)ܴFpTa3鷸Κikv%nZH)b/ȹ3Ļzڎܶ4R /&-<{tx)IE"ɡ#XlT+e^n;F"Hj5'%Q@9H(PII5T&Vt#;8l l-]q (0QR8iDqծM*܄DIÅ>۵ot֛W^<ݾU5:::EUtVS}JF&8 n7>mW,EywSדJJf ˪Rs8޽coEq[(ަg{5V/n\F͒%8$RkLz١!F{.srdđo?yAwY|`k;M뚆V4Ew4ġ\41]uF3v zpa8W(IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/logo OCS-ng-96.png000077500000000000000000000074571303466605000245630ustar00rootroot00000000000000PNG  IHDR`&;IsRGBbKGD pHYs.#.#x?vtIME3$@IDATh{p\}?#~` &.a(I3b7 M$ !a$'mxR$ &@K!@'j@ֻ-$K~ǞeI4>;w9}lvcekJ A98@H  F]w5SkW>jl?{n7PZA*&e%*Faz ΝO] Bd/yGlhaN8Ͼ^J>{E8*|lo"H@ UuGΆ֟cJF`Ysom uAWcrIM.{k:ZimfDҴwonm o<ʧo=% WwR-;x8Kkn?*Wu6Y|73$͒tkgCwC X ,1I3? Wfv50mbbx[mdŒexOPz H<ٜA_xMI(zO^L.fB&z9'%3IY}UcDILha+=J[ <{&0Wh7w+fi$V} Nl>(PEܷ?쑐Nz 9hroͬmlvٱ} ̨ ofk;$)͒Q*u_fwsYvZ=Pҗ{Χ9"~pr2 3;Io_soœt+u@ζIKJY1'J̾xQby{[Sz:`ކF,9UM8xןS7>PT$0E:;zA+H3 N8 l[*i.0jJ#Ur8_s*\-}^gRr 1?̙cUD҆7 tqj4OxX?wfv$ |̶7ww5X42/̻l>xO,-ʢ@LMP:%(03PڶbJTlcfviC (_R? DӢ#ZK70 ^笻ʛz.;+fo;*5"hZI;Ə+5TLIzsoU ,0AfFyDyT`4̟S ؖLVIiض8)"io4FvC;2}H蛠0hm_z0k/0 10ƶ{۟(  OS(T%bX<> vI %&L\^!i(&03\4olh=w6}WcI.1<P(1mӾ{v^U5ϐ3fq`jtA0`Un2.q<ƅYۑP(I#^K%^1( nST~ۮΆqk I'=/3;I}fvDvF'ea{0Ӆw?jlk63:ZKrgYެۊ;v=3/x{^ l27&:sf@F]9nMR],+%]9xZ:_xbWClΛ1cf7U=Qg~1؆_E5ylo](2/_Zǃ $*.CR(΍^t\DN<@Z:8m5p¸txdq7J+&f]ҖBG~s KӇ~-ϙoʯX&l'z%2M/?bO'в$^> C-}<*iM->}n=7Ɓ8=KRDAu BnUhǤ+In`pD*71d\qI۲=ej N*36<$ٞ.z1'tSI%7dWU ٞ<{ c9縫giޘG$S_bbr3$IK]L5;3Q_^VGlOyvpCw>B&JH K2R`>ڝdrI?q՝ϭ?.pS'.ݔ43;_|`\/imrlO~G)y p k;t~~3_.hdjN.pJ:.,ٺ$\8ڝ]IIZ޽7ۓ<ݔ\af Iz`6:)yȽW=Rss*u3;rTxrahfu'EnL;[nJ.7%ujl[,MOΒ1Ӏ{,\ąӀCba(֝{R3̬^$SMJ: ~`f%3 CcYfg\=hf_lrCe{^do2`hD$p#R p湌IWoH:̎YNC<_IZ$ˑņ3=EI-$ םd+- W%]afww:zȺwH2=g"5+fvF|L6`7N=ԔRK_x  Upr'mk][{3Bda)w ;OXۗTefjͬYKx;\w>sqFA3½8?~8=ͬD4IoEVpfn3CQɿnJ> @ 81ܗt \\%isޏ]FAѹ$xg9I)eU#ޒ[YWdsk='Q*1v71 pXk#68BKMɿ0Y(0d.t}ˍyx8Tfyq6w:LI/(&L25:2"גufv$zse:%yˆUBR} BS#R 7Hz8ۓ_-d+fv$s#@ǁM -7i3[g)B p{CHE wvs ꀜƶ?Լ:ӈ]-iv$_-kofϸ1/Kν*.ifԝ]e;itO$2+rXGjY~KLΞd)e)rOV9I:=ۓ_ KH8IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/mail.gif000077500000000000000000000005661303466605000232550ustar00rootroot00000000000000GIF89a $> QrY=o;_Ҩf q7%" S!O` Mn.f혖,#x} rvhǎ1t4K1.eIWn>χ)_R Iv̯qtE䯮G #Z-*׭'#WHdaZW[wkf 7Is{_=L|9/\.lG{wnd U?TZ-9˖S!~PEAk`a!tTlF__#HP|Oy+Wk?75~ A:8Q)bM!n%テ]q1jyzļ ^LQh5< ׮CRD$BA=$ \~ , ёƜN1P.*%"t؏\"-?Db^j'6_GEdr]d3 kg~Jo`…$#/DPenD2қoYo)iT^/H)dqcY]UF|@ # 4MSJ%=rg|^x+ȴZi 3mmG?& r񕿐(EF\'&A < eQ س7!24eu=^ʷlo+*&j%a^l.dJ XfymtݍRo@hD :ٷ-=[; yer#HN*cIΞE$,~ Qeȫ[f_=KNIqVarWJ^]2RYU9ϋF7;[YHw6luk&n&qM*g3IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/modif.png000077500000000000000000000020721303466605000234420ustar00rootroot00000000000000PNG  IHDRVgsBIT|dtEXtSoftwarewww.inkscape.org<IDATH͗kL[e2.B`pq]XPP"vhb1&4񃚑lY63J !m81H66L ypڥ7o'>\# !H$0<0 L]X3 ŃJ66  W )扔͑$` j'J6G0ԯ!MXͳ1APkE,ԅAGzv(d~cwY K5Z CGS" N_쩤؈eϜGE]c}пX!D(JI!h#v\ȋm1̓Ml <iW*)Wx{@[k9A erF"$5&x2yna;u;J99zZo0:l)?|HdJP1}#yIPteG,:Җ6]H]NnNa yZ&2j-M?y]o?v~|.]cbx'q-]1m.\'cOy̽ɨ"2nNs6=s&>\]ڞJv{gzeW?-$in@⹛Q%24"=]ǣ=j>lnVDeWy{ 12zEXY8w@a"W:ԎD((3TWlfcV}=|K{z}:.϶,mJ0쨕B37sr5~GQ\sOayki@ W3ZVy%o);3N>Vmj_+sL;}߉G]^ Ik&byKC|seٷzoB )N0w喽Ԓ"ԏ95V8)( ;Átibgf]l)Ρzߺԏ+,t%; @O8~dǶgy$^k,0{He$PW =ͭlxr%W#:ϭcbp؄;(AMr&}%_2G?vhY K7dIvE ƒ}|Fo^Nʋ@JPY@a1-e?;E,^J涭 LgmxӘ%2ѿk| wW9=Ħ/%:7>jN{/ƺ& O!1>Bz}}W,VX+wCu2 qecX/Z5#4l[jߍzjfZJ+U`b }-YU^Ыz~h>ɊIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/modif_all.png000077500000000000000000000014331303466605000242720ustar00rootroot00000000000000PNG  IHDR]sBIT|dtEXtSoftwarewww.inkscape.org<IDAT8kHa,!́WR6+%.eb7(%CVfat0`b$E`ba>(d/޹/Mn<9XJht!REifF٠%BⅠkB2 ?,} ٳyь#7}bo/o[v.nϪ':xG:P}n)D9yn,KP>[w1I'9vێT"S%33~fe3㽽u1q(;xU%3fjy4tsf35J4sW@q@'M] WR5P4A}wwƞǪhxx$4A}xHxH$A}x|x| xxxxxxTb%tRNS@f pHYs  ~IDATxڍSgW0 tRBYl@;{ϲ;vf ⼻HIg@#-O%!`2GK Ld`vNn^>!Z`e1,,c,)-++0Dq5E(ckZ οC/BojR- 0YU[5hk`Sل^Y:PF[ Јޫt?`萃CāhD5yvl\1OLNlrzU !m tea;׹w Nϼ6م #M?>9=/zYH'on1VkGw$={QJ~~7OqU2 uVRY?[}g=NIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/modif_tab.png000077500000000000000000000013061303466605000242670ustar00rootroot00000000000000PNG  IHDRsBIT|dtEXtSoftwarewww.inkscape.org<XIDAT8_HQƿ{gܰPLF0*/b!!"02($2c4,$C)V6 a%䃕;f3}=|9ܔP9+>hיSvC# 4"(B O?~%",kjnPT)QXNUџCź$˲hKl`/9 }LEcsVJ1&KOMI^R{˲OLΠYز,HNoD뛮\wm>}G=vXDs(t4 8$fOЛQGp[G+qχĽk|nCBjߣs/*8:FotS?@W:}6>}^2-_2lr8q"3#z @iw,>/wuc sܻ _9e!'ME~,|9Cֽ16]?M]=*O[2V@,}c\\xjG;sѰN"`@0-M@E~a81j&"h٬އpyP<9╠{Lģx\`0L:0bfXOk\X\px4&g >-H/߰2u'g|u=|w:ߍ!3Fa׈ 9pU=m7 sH;bYTx cQ  '$(iO1 <5x" <  `8,yt4  vVĻ؏ { ,࿆ *4q ą-N;ocsinventory-server-2.2+dfsg/ocsreports/image/norm_left_on.gif000077500000000000000000000005371303466605000250120ustar00rootroot00000000000000GIF89a wfU򻳪qa٘~xꮤwƿ!,  jXEeP4Ihyt `.^G` 0 4B! "G[@< Ƹ@7믃EZ}-? }_ \VY_TQWY[PUNKS"LLI:50"BHFŬɸʼR8P7B;ocsinventory-server-2.2+dfsg/ocsreports/image/norm_right.gif000077500000000000000000000026461303466605000245040ustar00rootroot00000000000000GIF89aк̵ѻҽ¦ϸǭʲĩӿɰȮç!,` dihlp,tmx$@pH,Ȥrl:ШtJZج( )zn|N~   Ź ɨa H*췠 `@ŋ3jȱǏ CIɓ(S\ɲ <!̛8sɳϟ@ JѣH*]ʴӧC ˠ!AXjʵׯ`ÊKٳhӪ]˶۷p㒕Ib˷߿ LÈ+^̸ǐ#K.̹ϠCMӨS^ͺװc˞M53 p Nȓ+_μУKNu jP†‹Oӫ_Ͼ˟OowP@h& 6F(Vhfv  t(,0(4h8<@T`&L6PF)TViXf\v`)UN@d$v Adp)ti'fw矀*蠄2'%Y袌6裐ylFj饘f&Z馠*ꨤB٩ꪬ 詊*무ֺ%ڪ뮼ʊk+즿kZl6>+Jmfvm~+I)j.+ʚ)r c)p' 70G/WL/g.w<.-"<-&,*<,.+2L+6.<лLїҎ*ӄ: JMuZpj MMQUY ]May/|h}ׂMxkي/>v y[ONՖ_>u?yKѢ>tz9zͮs첷L{)ߎ{ɺrw |O|q7| ?}O?pOlwdc}s~O O?mlD%Y2pe|(cQ@0xr0w B(ߑ;! ".\ c0z6!r`π( qUFH&L6PFTK5Xf\v`%di,hgp)nixRg|' {)蠄Y衈&E6h>*|FJ饘iivʦ*&jꩁꪬjƺūj뢷k뮽*lk,.,>+Nk^-nm~+k垫.++֛g ' 7lRl1# _1o,!q&or2.q2;Ls ߌ:,p> tMF=oJt> RO=nVun^=mb?Kv˞j=ln wҽvߊw-~ xx2.{ yRO9o.i; zؒ>z>h {γώ>g |_|/?K}RN)oOJw~O~&_ަ~#O?[k} <ȶ;ocsinventory-server-2.2+dfsg/ocsreports/image/norm_right_on.gif.png000077500000000000000000000004031303466605000257500ustar00rootroot00000000000000PNG  IHDRCjߓsBIT|d pHYsOO8tEXtSoftwarewww.inkscape.org<IDATX 1EџKpan,ȍ  w%=<.r98-K=}̌ 9FzB;(9Mj#1c1` 0c1` 0?\"eTVIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/plus.png000077500000000000000000000005111303466605000233230ustar00rootroot00000000000000PNG  IHDR sRGB pHYs  tIME(`V)WtEXtCommentCreated with GIMPWIDAT8T $`={0x;җJ)n!3\ODZK9!VEd vVKn C-g 46"cbYkqHo>w5(26 }3qͤDqGWwX({soP5IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/prec16.png000077500000000000000000000021411303466605000234410ustar00rootroot00000000000000PNG  IHDRh pHYs.#.#x?viCCPPhotoshop ICC profilexڕKBQƿgQTEr4L!P>|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)1IDATxb#^b2o:yM @1Lz?H? &4@=P>@_}=Ӷ378XtJl2  8@W3(K 3dePb`c lho`Ȋ@RH! @ng47f7ï?]W@L?~aX</6a | } 7bq4 &C%) 5Y/323( 1Lr n@a-@L  @LJ //@ ^}pnNPbbdee8/58zS;×?Ny ! O`+ @x;K@_ @ǯ @N P lɫ@ŀٛ(}@s @ I808lGIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/prec24.png000077500000000000000000000011401303466605000234360ustar00rootroot00000000000000PNG  IHDR BP pHYs.#.#x?vtIME :rIDATxeOeLF"$bzU[/ECoUL.5pwbBp!ȏr=/yr*%9B:( 'bXHr?I"3|rɗ(w/Cĸvlп\&Ex0%9LP%cfb2lz!QZ;:V*$+l5kWcjTH}C8 )Mݨby7n5xU,y'^k &l -vflNB=+b7;֞^BWJbd6]iu)T|6 ~N. H1)҅f9ozѨEpEQwB4[n{@Az&͞AU8~D)'EqcXn31ly@?](O2}zn ޹rȲB}z^qikL -ٝIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/print.png000077500000000000000000000105301303466605000234760ustar00rootroot00000000000000PNG  IHDR="1 pHYs.#.#x?viCCPPhotoshop ICC profilexڕKBQƿgQTEr4L!P>|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)(IDATxbC>0 ^)n6Vb*(g8ߓ`V> X:30֘1 a`ea@1 9E{ۯϿ9ԟDq?'1 e3qwّ zm}`O?; \, z b` X%O??38#i 0 >=@`/uݏ 1H0|?C۬] %be7@0w>2z`@>L~6y[)Ǟ3t7\M2O|? L,L LL  6(.?%1]abX`X!K^0H0z)j2#? .]6 J ~BѼEQm!0n;   (Si'.~ͷaX40.8@1<_H J[~ h{ʏ%^0 *-}@A AG0|q g/2.,|Y01C^A_ YG[~$0 e<>L=0x0b× ͓3Sfffe[u @.>򝅇 >p cApr/Û^_}+3"\py Lj 9A!A=&} PfbEC ..ÆAT a, `bg\rfvfpg/xy݉ K!>ecA>G %"IT,tpa^E]NFR 2p׫xY1<%#@8w#Q\*__{02PsHvq +VdЉP`[͍ ?34ˈⴸady_?0\\tR_`.J{qubww>0l: 8'[O0c0.2Z:O!ocxs=@ 3 K O]9 挞sEω 1 Pf2cU,OEZ f| 6M >.818@ kkn3\6gf <\8-X~|Ͱ887ZTbXBTx^ E$#7^*;p,,n9|eLKAv ('r+n >2LH 7;~] VzCL2&#`XZl㇇J,FiK dhX}2v LBh >CB XxB+3b.I5<Oy'.nkQi8t>$YQ|k96$~}p>^!?ȭ^_j+ PϪĈORMF[``ab20e|Qd1E7>1Օ >lKtJTBDT؀, 0z90>:E5#Oho\[Ġ Pj3bIl< #m@r1B PE`XŖ@ P PK]fG4ȓ–@bPV`M`[%05pj  +Cm0/'I1AG/0 3$20 b |2p2(:J@pO 3R_`#lI2\ }?2xj0źmg{C%N=Y` ^P5Au3>?]'\>ip.@`ONӓ/1||#vA/ i$A7P0(yX̐[ ?%YVG222sGA7Cd9h8PQ6( pqq >a:~e dvyyظY]l6N!v^)3^y7 W}`hut'>cx:-Na!A%`(A8R`@꾽T$0 XGrZm2By4E ̇gcPe4V'+Y_ l|`G?;7RZ M anQ`n`@,/[%##3e`ŝ ~ePh! n>{ t V^Vm7Ep*38N9uOb!AO0_X?> MAeE+ 7+? V<\A|I#Q.N~1v3 ~ rl(Xs,4߂>C> l5Az_>`"([1 Nfc X l@aG _8i?4ZhRz&>V6Of<PsA/ 2 "%ȟ@,'8#PpD2xy LZ kҒqWañ`f?;1bwgm` ,?~ix 0U QM!L{ar)`n<4!qgp91XJӧJ޼ *(Rj qP * ,A8N Ha3L^~fQ8cU^Ɋ g/ <%v9ÃO[P irϫl@̜ Lhb ~ Y"^@< c 0Ve5 ԧCB>5H@)HȠ W  <:5«IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/proch16.png000077500000000000000000000021411303466605000236230ustar00rootroot00000000000000PNG  IHDRh pHYs.#.#x?viCCPPhotoshop ICC profilexڕKBQƿgQTEr4L!P>|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)1IDATxb#^b2_L @_@ 7H?@#Fǯ= &XY]@`ӑ0  `UG.2|w!G?0<|_ SWw2Y0!Z @V| @ >8? ~< v^w2+/ /+^W=nX;0> -˰e?'#hbbXd'P` | o5G/1(I3\{ASFOgK 9D9X"l L | g.sDJ @(GY < _~bjx;% cT-'Ơ&- e%^'80?~_D0G$3+'55$IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/proch24.png000077500000000000000000000011641303466605000236260ustar00rootroot00000000000000PNG  IHDR uJS pHYs.#.#x?vtIME  ˙IDATxeOqƿ/8E"b!#9Mcnl릋j,+õfA* q"rz!x.hNy>[W(H#Pmg_x{hN_Ui;_C@BDCO} r|6ۂ<qx6BBO[y.m_~ JsSUbNLv?uנf3@`+o46/L LXb!2pGY^.$0]dukqFe jw,C!|GqX:[O;)kTP9"i@߬wM%%LBhhN*u˷h\3jd0=1ZN:#b6/=m4m$of25N wCS]oظ fwtA㰺j} }$7/O,{E!Z2}ɜ'F^U5bs/_.MO\ފ16G+z%\h 3?IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/red.png000077500000000000000000000012321303466605000231130ustar00rootroot00000000000000PNG  IHDR;֕JbKGD pHYs  tIME3!R'IDATxڕKTqǿuP1RRB`֭&uZh3D {E$X>*ww9C$} bfiw3QkJJGTȝO{zns̫bWGr/(!Pd3;ku)=u@O<1aZOq& Sٶc}S34q_6wv;཮ A`"xiS +Z>{Y؍E!x 3B.B XnGBBn4ӆ &J AJE# Vgw0R [!WtXpSr5p4%SUB .a:BGLo%ly;0H2Am;IA4RR2,0,t"I3p{i_od7 `e ,.큑y ?/oC-aA0*d { xvoZ=ꇔKۚ11I̹&_فIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/show.png000077500000000000000000000010101303466605000233130ustar00rootroot00000000000000PNG  IHDRrP6bKGD pHYs  tIME (ytEXtCommentCreated with The GIMPd%nlIDATxڥNQ]PX)-Dm}9x ب1P? ?ƄhP3sb {3ߝٙ]ʕ\rzJJ7^\>v0_N&Q}"$ C pyq> @4(VS܏Bp#1 3`Zc9&f֫ ϐLIDATxb? !ՍT+e@ĩ2 3N ;@t]]4HC  ΃M DKbk  jXM $^g'e!P8D;jبa0 O&4]IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/sort_asc_disabled.png000077500000000000000000000020321303466605000260040ustar00rootroot00000000000000PNG  IHDRrP6tEXtSoftwareAdobe ImageReadyqe<"iTXtXML:com.adobe.xmp IDATxb? !ՍT+e@ĩ2 3N ;@t]]4HC  ΃M DKbk  jXM $^g'e!P8D;jبa0 O&4]IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/sort_both.png000077500000000000000000000021601303466605000243450ustar00rootroot00000000000000PNG  IHDRrP6tEXtSoftwareAdobe ImageReadyqe<"iTXtXML:com.adobe.xmp o IDATxb? 6w"s ˀLPYY,eqRM- bV .9\e|āhb@lMa@\ ĂXkB.;qpfŕ" 7t6Xo@́5O nh8rWr(f&( BN?C Frl@ S )d#@z4DOIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/sort_desc.png000077500000000000000000000021471303466605000243340ustar00rootroot00000000000000PNG  IHDRrP6tEXtSoftwareAdobe ImageReadyqe<fiTXtXML:com.adobe.xmp IDATxb?a0lՍ" Ju: XQ ^C7R-@M=7?f {e=_ ;e U ]uj &o f*O%q )!nIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/sort_desc_disabled.png000077500000000000000000000020251303466605000261560ustar00rootroot00000000000000PNG  IHDRrP6tEXtSoftwareAdobe ImageReadyqe<"iTXtXML:com.adobe.xmp {vYIDATxb?a0lwލR d(++'ex?s`Gx ) -@M=7c'f {e= '@$ ?^8Yy'oHM40Ux*!p03 ӔIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/stat.png000077500000000000000000000035521303466605000233230ustar00rootroot00000000000000PNG  IHDR(Ԏ pHYs.#.#x?viCCPPhotoshop ICC profilexڕKBQƿgQTEr4L!P>|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV):IDATxb4)`.ĭGĘ3m<k-i Ĩi"擷.x>y  &,?~aߔ_6@1swy}a/';CXb4)Rc\vF5 ?'$o2d;@2$g@1t@vyj" ,6V暙A͂< a`ۯ [2ϛ.|-t:,b,Y`fbbx#C֚ 4w20cs0x@l10Rf\- |`f|v M '3LUl \:_ 3#3'ßo.-*)b /6򭕝 H?bq0|mg_?bd``4+{w"pE o9U_wYY{ư]• L9?1\~ U/#X `@>ʂpFVVf,?A @// L NaFҕE1pe =.y#9QAN>|`z Pd`ddL,c Tן KuNfw @p?1 Y#' $nN6= TW3l;wo#YYngɻ?3g P`'0'Yj(0&2gX.}?sҾ/?il4=5,R1kٚ0`6` w!:`bd/Ąv0tK ;N1<@uwJu3t\΅撇ށ߿/~~sE o@-`Fd M^cƔu/< 5e^ݸ 38za>Lo(1e`H2pS~@œc|miH1\ABAR  /?[O3L5vޯJ _O%@10HxMRmwH V0w$pK GW| ~ d00}@` R;?R)v`Ve }ۏwx;X- , LAT\IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/stat1.png000077500000000000000000000034301303466605000233770ustar00rootroot00000000000000PNG  IHDRe꿰 pHYs.#.#x?viCCPPhotoshop ICC profilexڕKBQƿgQTEr4L!P>|^V54DK-A- A m!Q. ˁ}xsU0bBMY&orZ݊RkpkA2<w(Ayx]6^CA?'>!\KrY Q}m[6[Y–Vij !+S" =tŸ&YDhy8Re0hä]C4i;1[fKgj:ḻTmd͎^koE6ٗ?|vD^Y6YZ6bjsl>]dAB \]HX1{qڛ"8K ?w4vtgAMAdZ cHRMY#ZM-d/]FV)IDATxb( q翥Đ1e݇[^WZb M &1 \&@1Dw\?0Q@1XM) ]g +-2@L]Gia^R ~a5##؁ 70Nf`$^@13kNzF_Cy8ebbs*kyZ om^Nb ^?&&Ff}$@'| 9 4fg`|귡A8;og*@+\o$̀ >Ps=]28@LV( Aqv=7bʜ c20C~if h?x|g &[-E70|l*302썛 Ғ'/;0Rd !yb, o>~exO_~cPLa- y^2\ fA#_*% ) W2~mv|fx æWk^̉U u3b,f٧78KL ?0`8p8M2s Z, f bf34i3p=7f` 8E0(Pb ԬyTdlAi_g Ë^37`_P&b Lg/>|dCցAUҳ ߅`  +*XLb d wF0BJp2e/Og LY~|^}On0/-sfgV`eeaL_˷'o>}c ,w #VIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/success.png000077500000000000000000000105371303466605000240210ustar00rootroot00000000000000PNG  IHDR szz pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxė]lTwf 8(I) TP`>V壭Z}k6J5j_M*H F">8IKp {1^ޏ^^:{gs̹;i;l `ͯ5Sr`@hM3 ǡknaP%|f%f#",}[ mNVkxN)w_ݚ-$*c2\agj>D+.^mzTbɅYQ|#!F`A 'TzsHzUԭ}U7v_l5P[SWrisD&Xc 3Z8{sWl}:Ny/gJ`㵛|'1#]:_L d)R$ӝig@^`A ON )QJoܿl?Jl経1L'<+)QjgT/{6si[ŎҚxJ~CejH8ji"u<Os%ϖ?@J/~x:g@BN";q][NvL mDƧc ߪx)صδ܀P8sYQ8YJ`Ӳ⪾L>-fa@׮M>gNvp>16D[c(h l*%q}Ȟbd6':'Mh 94;{by?h]\hK私GN d`A)o(_1Lm&'ݗ=UH?tPBq>KhS%R8ӂsϹi=Au+u%3 p1CRCqJPEJNqẛ. c#KuIeM`oj-]Iuop)mr:MB)%DYIwt-eNsg-^x72dE)Atu DWoQvݰ2Q}8س"}ղFN#p!4Fu_7lIoF! 17}5iƓ1,IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/tele_search.png000077500000000000000000000034651303466605000246310ustar00rootroot00000000000000PNG  IHDR(!sBIT|d pHYs #JqtEXtSoftwarewww.inkscape.org<IDATX͘kL,̫&)m`E]mJDZoUQ+US9mը^;rݸS_@Xv}~ew1, U/ͮs̙sPJb.Q@ PsfWJ,0?Z c%.5^_G@ i-g jLPV4/#Y`~ p?P0m $f"gV˹~w0`N;. q)*l&bq"!E\Sx}17౥'gfHLL 47b9 XQfGG]nZ~_3ޟ뛙1xk)kW lVR#ΡԶ?e~4|h'əvxiSp`&H{4Þ!`w>$&'hܿ]OK)w]ӉLPvW_=~-HfdGEJ@4uO̹2L\4/t]=jY}z`^i;;(J<bWa"t+;FQ^r1y(4IFguJb3c:QB2AU<㱲,(Em?ꡨ)5O)SS{xKyM39﵄2R l+{ t㬩!159ϧ~^F?B:p΢MeX߹/#4mDz#  3vSyKQHda& vgt$V^&Q[AGee"^[>x`Kw2]`&.;P!Q_ّOpDwRX^%-!f箥ZX/:fPS;dNUmCO"}~ɯ!m&LXQa\ i;t )P6@2DEH<-YōKf"jZ45Sn=(e&4=4GB.@3m+4BpgUXE${!{+i{f: X+YMݸA L/lZ]<WuY.^V.YȣϸL>[??zXmIENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/up.png000077500000000000000000000016411303466605000227710ustar00rootroot00000000000000PNG  IHDRW?PLTEooo  Ca a AAFJda$xKU$ HHRhl 6Wi-tRNS@f pHYs  ~:IDATxڵ; Q5!|+|MjLf7W5)8ff;IENDB`ocsinventory-server-2.2+dfsg/ocsreports/image/warning.png000077500000000000000000000107271303466605000240170ustar00rootroot00000000000000PNG  IHDR szz pHYs   OiCCPPhotoshop ICC profilexڝSgTS=BKKoR RB&*! J!QEEȠQ, !{kּ> H3Q5 B.@ $pd!s#~<<+"x M0B\t8K@zB@F&S`cbP-`'{[! eDh;VEX0fK9-0IWfH  0Q){`##xFW<+*x<$9E[-qWW.(I+6aa@.y24x6_-"bbϫp@t~,/;m%h^ uf@Wp~<5j>{-]cK'Xto(hw?G%fIq^D$.Tʳ?D*A, `6B$BB dr`)B(Ͱ*`/@4Qhp.U=pa( Aa!ڈbX#!H$ ɈQ"K5H1RT UH=r9\F;2G1Q= C7F dt1r=6Ыhڏ>C03l0.B8, c˱" VcϱwE 6wB aAHXLXNH $4 7 Q'"K&b21XH,#/{C7$C2'ITFnR#,4H#dk9, +ȅ3![ b@qS(RjJ4e2AURݨT5ZBRQ4u9̓IKhhitݕNWGw Ljg(gwLӋT071oUX**| J&*/Tު UUT^S}FU3S ԖUPSSg;goT?~YYLOCQ_ cx,!k u5&|v*=9C3J3WRf?qtN (~))4L1e\kXHQG6EYAJ'\'GgSSݧ M=:.kDwn^Loy}/TmG X $ <5qo</QC]@Caaᄑ.ȽJtq]zۯ6iܟ4)Y3sCQ? 0k߬~OCOg#/c/Wװwa>>r><72Y_7ȷOo_C#dz%gA[z|!?:eAAA!h쐭!ΑiP~aa~ 'W?pX15wCsDDDޛg1O9-J5*>.j<74?.fYXXIlK9.*6nl {/]py.,:@LN8A*%w% yg"/6шC\*NH*Mz쑼5y$3,幄'L Lݛ:v m2=:1qB!Mggfvˬen/kY- BTZ(*geWf͉9+̳ې7ᒶKW-X潬j9(xoʿܔĹdff-[n ڴ VE/(ۻCɾUUMfeI?m]Nmq#׹=TR+Gw- 6 U#pDy  :v{vg/jBFS[b[O>zG499?rCd&ˮ/~јѡ򗓿m|x31^VwwO| (hSЧc3- cHRMz%u0`:o_FIDATxė]l\G3ûw:Iܺ(!VhIRԤATP jK T'@BBHD!FQipH8ێ^޽ vMdsܙsϙsΜfjd=vx'fnNzSIdZ4Rhi=cx< A?FuUY`֗8bν4=  `pFv۾hAv^ӓW8dtdmoc'jTq̡0:BZ'A);ж?}7@?ǷnA4?N䏢UZoc,5Bڸt{/Wtmiut\CG"c4q8Rtְ*&g3I4vҹgͱ-~*{w{-%΍?.UĨ":0ei~CkE>[qUȲp#Mv|/qdEg{_m&q~F^ШMU2 ;̔I1*O~s/OeI/ `=ִi7E *1qW smYӋ|%-#uֹc8<>}Pݤؒ0'*m1X.*0oZy"}}@ ިmތ.LlԺlFSAHUvLc=<ҖXUp9p@]xa4\,E6– ={t0w=hż%ҵd033[ 9Pן;wz;!,Hat?1t Gp:J)i[\?7Iѻ ՊC'F L`'$N:Y2c#,J$%cc']t7N&h {JmP矕#[ں!]Act0ZY̱ DҵVEXs|0J7Wu}0:{ Qp=TէMSU­p3IjTi>M# zв\S|n>ތU ƀT0[|0;|z;|헵ޣ?7w\|e#2MZ۵D+MyIщȜl{S˟f"ѷ~@;]{n4W>%"cBlE7ݩsל> S@,G:CTLIENDB`ocsinventory-server-2.2+dfsg/ocsreports/index.php000077500000000000000000000023711303466605000223760ustar00rootroot00000000000000$ent"; } function return_bytes($val) { $val = trim($val); $last = strtolower($val{strlen($val)-1}); switch($last) { case 'g': $val *= 1024; case 'm': $val *= 1024; case 'k': $val *= 1024; } return $val; } // // } /* * function to execute sql file * */ function exec_fichier_sql($fichier,$link){ global $l; $db_file=$fichier; $dbf_handle = @fopen($db_file, "r"); echo "
"; if (!$dbf_handle){ msg_error($l->g(2112)." : ".$fichier); return true; }else{ if (filesize($db_file) > 0){ $sql_query = fread($dbf_handle, filesize($db_file)); fclose($dbf_handle); $data_sql=explode(";", $sql_query); foreach ($data_sql as $k=>$v){ if (trim($v) != ""){ echo "."; ob_flush(); flush(); mysql2_query_secure($v,$link); } } return false; } return true; } } //choose default language if (!isset($_SESSION['OCS']['LANGUAGE']) or !isset($_SESSION['OCS']["LANGUAGE_FILE"])){ if (isset($_COOKIE['LANG'])) $_SESSION['OCS']['LANGUAGE']=$_COOKIE['LANG']; if (!isset($_COOKIE['LANG'])) $_SESSION['OCS']['LANGUAGE']=DEFAULT_LANGUAGE; $_SESSION['OCS']["LANGUAGE_FILE"]=new language($_SESSION['OCS']['LANGUAGE']); } $l = $_SESSION['OCS']["LANGUAGE_FILE"]; //OCS INSTALLATION printEnTeteInstall($l->g(2030)); echo "
"; //messages lbl $msg_lbl=array(); $msg_lbl['info']=array(); $msg_lbl['warning']=array(); $msg_lbl['error']=array(); //msg=you have to update database if( isset($fromAuto) && $fromAuto==true){ $msg_lbl['info'][]= $l->g(2031)." ".$valUpd["tvalue"]." ".$l->g(2032)." (" . GUI_VER . "). ".$l->g(2033); } //msg=your config file doesn't exist if( isset($fromdbconfig_out) && $fromdbconfig_out==true) $msg_lbl['info'][]=$l->g(2034); //max to upload $pms = "post_max_size"; $umf = "upload_max_filesize"; $valTpms = ini_get( $pms ); $valTumf = ini_get( $umf ); $valBpms = return_bytes( $valTpms ); $valBumf = return_bytes( $valTumf ); if( $valBumf>$valBpms ) $MaxAvail = trim(mb_strtoupper($valTpms),"M"); else $MaxAvail = trim(mb_strtoupper($valTumf),"M"); $msg_lbl['info'][]=$l->g(2040) . " " . $MaxAvail . $l->g(1240) . "
" . $l->g(2041)."

".$l->g(2102).""; //msg=no php-session function if(!function_exists('session_start')) { $msg_lbl['error'][]=$l->g(2035); } //msg= no mysqli_connect function if(!function_exists('mysqli_connect')) { $msg_lbl['error'][]=$l->g(2037); } if((file_exists(CONF_MYSQL) and !is_writable(CONF_MYSQL)) or (!file_exists(CONF_MYSQL) and !is_writable(ETC_DIR))) { $msg_lbl['error'][]="
" . $l->g(2052) . "
"; } //msg for phpversion if(version_compare(phpversion(), '5.3.7', '<')){ $msg_lbl['warning'][]=$l->g(2113)." ".phpversion()." ) "; } if(!class_exists('SoapClient')) { $msg_lbl['warning'][]=$l->g(6006); } if(!function_exists('xml_parser_create')) { $msg_lbl['warning'][]=$l->g(2036); } if(!function_exists('imagefontwidth')) { $msg_lbl['warning'][]=$l->g(2038); } if(!function_exists('openssl_open')) { $msg_lbl['warning'][]=$l->g(2039); } if (is_writable($_SERVER["DOCUMENT_ROOT"])){ if (!file_exists($_SERVER["DOCUMENT_ROOT"]."/download")) { mkdir($_SERVER["DOCUMENT_ROOT"]."/download"); } if (!file_exists($_SERVER["DOCUMENT_ROOT"]."/logs")) { mkdir($_SERVER["DOCUMENT_ROOT"]."/logs"); } if (!file_exists($_SERVER["DOCUMENT_ROOT"]."/scripts")) { mkdir($_SERVER["DOCUMENT_ROOT"]."/scripts"); } }else{ $msg_lbl['warning'][]="Document root should be writable : ".$_SERVER["DOCUMENT_ROOT"]; } //show messages foreach ($msg_lbl as $k=>$v){ $show=implode("
",$v); if ($show != ''){ call_user_func_array("msg_".$k, array($show)); //stop if error if ($k == "error") die(); } } //post the first form if( isset($_POST["name"])) { $link=dbconnect($_POST["host"],$_POST["name"],$_POST["pass"],$_POST["database"]); if(mysqli_connect_errno()) { $firstAttempt=false; msg_error($l->g(2001)." ".$l->g(249). " (".$l->g(2010)."=".$_POST["host"]. " ".$l->g(2011)."=".$_POST["name"]. " ".$l->g(2014)."=".$_POST["pass"]. ")
".$link); }else{ //if database not exist if ($link == "NO_DATABASE"){ $link = mysqli_connect($_POST["host"],$_POST["name"],$_POST["pass"]); //have to execute new install file $db_file = "files/ocsbase_new.sql"; if (!mysqli_query($link,"CREATE DATABASE ".$_POST['database']." CHARACTER SET utf8 COLLATE utf8_bin;") or !mysqli_query($link,"USE ".$_POST['database']) or !mysqli_query($link,"GRANT ALL PRIVILEGES ON ".$_POST['database'].".* TO ocs IDENTIFIED BY 'ocs'") or !mysqli_query($link,"GRANT ALL PRIVILEGES ON ".$_POST['database'].".* TO ocs@localhost IDENTIFIED BY 'ocs'")) $error=mysqli_errno($link); $name_connect="ocs"; $pass_connect='ocs'; }else{ //update $res=mysql2_query_secure("select tvalue from config where name='GUI_VERSION'",$link); $item = mysqli_fetch_object($res); if ($item->tvalue < 7006){ $db_file = "files/ocsbase.sql"; $name_connect=$_POST["name"]; $pass_connect=$_POST["pass"]; }else{ msg_info($l->g(2105)); $ch = @fopen(CONF_MYSQL,"w"); fwrite($ch,""); fclose($ch); msg_success("
" . $l->g(2051) . ""); unset($_SESSION['OCS']['SQL_BASE_VERS']); die(); } } if (!$error){ ob_flush(); flush(); msg_info($l->g(2030)); exec_fichier_sql($db_file,$link); $ch = @fopen(CONF_MYSQL,"w"); fwrite($ch,""); fclose($ch); if(!mysqli_connect($_POST["host"],$name_connect,$pass_connect)) { if(mysqli_connect_errno()==0) { echo "
" . $l->g(2043) . " " . $l->g(2044) . "
"; die(); } else echo "
" . $l->g(2043) . " (" . $l->g(2017) . " " . $l->g(2010) . "=" . $_POST["host"] . " " . $l->g(2011) . "=ocs " . $l->g(2014) . "=ocs)" . "
"; echo "
" . $l->g(2065) . "
"; unlink(CONF_MYSQL); } else { msg_success("" . $l->g(2050) . "

" . $l->g(2051) . ""); unset($_SESSION['OCS']['SQL_BASE_VERS']); } die(); }else msg_error( $l->g(2115)); } //die(); } //use values in mysql config file if( is_readable(CONF_MYSQL) ) { require(CONF_MYSQL); if (defined('COMPTE_BASE')) { $valNme = COMPTE_BASE; } else { $valNme = ''; } if (defined('PSWD_BASE')) { $valPass = PSWD_BASE; }else { $valPass = ''; } if (defined('SERVER_WRITE')) { $valServ = SERVER_WRITE; } else { $valServ = ''; } if (defined('DB_NAME')) { $valdatabase = DB_NAME; } else { $valdatabase = ''; } } //show first form $form_name='fsub'; $name_field=array("name","pass","database","host"); $tab_name= array($l->g(247).": ",$l->g(248).": ",$l->g(1233).":",$l->g(250).":"); $type_field= array(0,4,0,0); if (isset($_POST["name"],$_POST["pass"],$_POST["database"],$_POST["host"])) $value_field=array($_POST["name"],$_POST["pass"],$_POST["database"],$_POST["host"]); else $value_field=array($valNme,$valPass,$valdatabase,$valServ); $tab_typ_champ=show_field($name_field,$type_field,$value_field); tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'button_name' => 'INSTALL', 'show_button' => 'BUTTON', 'form_name' => $form_name )); die(); ?> ocsinventory-server-2.2+dfsg/ocsreports/ipdiscover-util.pl000077500000000000000000000506331303466605000242410ustar00rootroot00000000000000#!/usr/bin/perl ############################################################################### ##OCSINVENTORY-NG ##Copyleft Pascal DANEK 2005 ##Web : http://www.ocsinventory-ng.org ## ##This code is open source and may be copied and modified as long as the source ##code is always made freely available. ##Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # # use DBI; use XML::Simple; use Net::IP qw(:PROC); use strict; use Fcntl qw/:flock/; #Command line options : #-analyse : nmap analyse and files for grep, human readable and xml generation #-net : Treat machine for the specified subnet # # ################ #OPTIONS READING ################ # my $option; #Specify a subnet my $net; #Subnet name my $filter; #Analyse and class the computers my $analyse; #Net for a given ip my $iptarget; my $masktarget; #If auto flag, running for all the subnet.csv subnet and generate files my $auto; #Search for problems with computer election my $ipd; my $list; my $xml; my $cache; my $path; #Default values for database connection # my $dbhost = 'localhost'; my $dbuser = 'ocs'; my $dbpwd = 'ocs'; my $db = 'ocsweb'; my $dbp = '3306'; my $dbsocket = ''; # my %xml; my $ipdiscover; #Cleanup the directory &_cleanup(); for $option (@ARGV){ if($option=~/-a$/){ $analyse = 1; }elsif($option=~/-auto$/){ $auto = 1; }elsif($option=~/-cache$/){ $cache = 1; $analyse = 1; $xml = 1; }elsif($option=~/-path=(\S*)$/){ $path = $1; }elsif($option=~/-ipdiscover=(\d+)$/){ $ipdiscover = 1; $ipd = $1; }elsif($option=~/-xml$/){ $xml = 1; }elsif($option=~/-h=(\S+)/){ $dbhost = $1; }elsif($option=~/-d=(\S+)/){ $db = $1; }elsif($option=~/-u=(\S+)/){ $dbuser = $1; }elsif($option=~/-p=(\S+)/){ $dbpwd = $1; }elsif($option=~/-P=(\S+)/){ $dbp = $1; }elsif($option=~/-list$/){ $list = 1; }elsif($option=~/-s=(\S+)/){ $dbsocket = $1; }elsif($option=~/-net=(\S+)/){ die "Invalid subnet. Abort...\n" unless $1=~/^(\d{1,3}(?:\.\d{1,3}){3})$/; $net = 1; $filter = $1; }elsif($option=~/-ip=(\S+)/){ die "Invalid address => [IP/MASK]. Abort...\n" unless $1=~/^(\d{1,3}(?:\.\d{1,3}){3})\/(.+)$/; $iptarget = $1; $masktarget = $2; }else{ print < Looks for the ip in a subnet -net=X.X.X.X -> Specify a network -a -> Launch the analyze -ipdiscover=X -> Show all the subnet with up to XX ipdiscover -xml -> xml output -list=show all the networks present in the database with "connected"/"discovered" computers #DATABASE OPTION -p=xxxx password (default ocs) -P=xxxx port (default 3306) -d=xxxx database name (default ocsweb) -u=xxxx user (default ocs) -h=xxxx host (default localhost) -s=xxxx socket (default from default mysql configuration) EOF die "Invalid options. Abort..\n"; } } if($analyse and !$net){ die "Which subnet do you want to analyse?\n"; } if($cache or $auto){ unless(-d "$path/ipd"){ mkdir("$path/ipd") or die $!; } } #Date of the day my $date = localtime(); ####################### #Database connection... ######## # my $request; my $row; my $dbparams = {}; $dbparams->{'mysql_socket'} = $dbsocket if $dbsocket; my $dbh = DBI->connect("DBI:mysql:database=$db;host=$dbhost;port=$dbp", $dbuser, $dbpwd, $dbparams) or die $!; ############################# #We get the subnet/name pairs #### # my @subnet; $request = $dbh->prepare("SELECT * FROM subnet"); $request->execute; while($row = $request->fetchrow_hashref){ push @subnet, [ $row->{'NETID'}, $row->{'NAME'}, $row->{'ID'}, $row->{'MASK'} ]; } ########### #PROCESSING ########### # if($auto){ print "\n\n########################\n"; print "Starting scan of subnets\n"; print "########################\n"; my %subnet; for(@subnet){ my $name = $_->[1]; my $netn = $_->[0]; $name=~s/ /_/g; $name=~s/\//\\\//g; $subnet{$name} = $netn; print "Retrieving $name (".$subnet{$name}.")\n"; } my $i; print "\n\n##################\n"; print "PROCESSING SUBNETS \n"; print "##################\n\n"; for(keys(%subnet)){ print "Processing $_ (".$subnet{$_}."). ".(keys(%subnet)-$i)." networks left.\n"; open OUT, ">$path/ipd/".$subnet{$_}.".ipd" or die $!; unless(flock(OUT, LOCK_EX|LOCK_NB)){ if($xml){ print "345"; exit(0); }else{ die "An other analyse is in progress\n"; } } system("./ipdiscover-util.pl -net=".$subnet{$_}.($xml?' -xml':'')." -a > $path/ipd/'".$subnet{$_}.".ipd'"); $i++; } system ("rm -f ipdiscover-analyze.*"); print "Done.\n"; exit(0); } #Host subnet my $network; #Subnet mask in binary format my $binmask; if($ipdiscover){ my @networks; #get the subnets my $result; die "Invalid value\n" if $ipd<0; $request = $dbh->prepare('select distinct(ipsubnet) from networks left outer join devices on tvalue=ipsubnet where tvalue is null'); $request->execute; while($row = $request->fetchrow_hashref){ push @networks, [ $row->{'ipsubnet'}, '0' ]; } $request->finish; #If positive value, it includes other subnet if($ipd){ $request = $dbh->prepare('select count(*) nb,tvalue,name from devices group by tvalue having nb<='.$ipd.' and name="ipdiscover"'); $request->execute; while($row = $request->fetchrow_hashref){ push @networks, [ $row->{'tvalue'}, $row->{'nb'} ]; } $request->finish; } print <[0]; my $nbipd = $network->[1]; next unless $ip =~ /^\d{1,3}(?:\.\d{1,3}){3}$/; my $req = $dbh->prepare('select h.deviceid, h.id, h.name, h.quality,h.fidelity,h.lastcome,h.lastdate,osname, n.ipmask, n.ipaddress from hardware h,networks n where n.hardware_id=h.id and n.ipsubnet='.$dbh->quote($ip).' order by lastdate'); $req->execute; #Get the subnet label unless($xml){ print "#######\n"; my ($nname, $nuid) = &_getnetname($ip, ''); print "SUBNET = ".$ip."-> $nbipd ipdiscover, ".($req->rows?$req->rows:0)." host(s) connected \n[ $nname ($nuid) ]\n"; print "#\n\n"; printf(" %-25s %-9s %-9s %-25s %-15s %-15s %s\n", "","","","","","",""); print "-----------------------------------------------------------------------------------------------------------------------\n"; while($result = $req->fetchrow_hashref){ my $r = $dbh->prepare('select * from devices where hardware_id='.$dbh->quote($result->{'id'}).' and tvalue='.$dbh->quote($ip).' and name="ipdiscover"'); $r->execute; printf("#-> %-25s %-9s %-9s %-25s %-15s %15s %s %s\n",$result->{'name'},$result->{'quality'},$result->{'fidelity'},$result->{'lastdate'},$result->{'ipaddress'}, $result->{'ipmask'},$result->{'osname'} ,$r->rows?'*':''); $r->finish; } print "\n\n\n\n"; }else{ $xml{'SUBNET'}[$i]{'IP'} = [ $ip ]; $xml{'SUBNET'}[$i]{'IPDISCOVER'} = [ $nbipd ]; $xml{'SUBNET'}[$i]{'HOSTS'} = [ $req->rows?$req->rows:0 ]; $j = 0; while($result = $req->fetchrow_hashref){ $xml{'SUBNET'}[$i]{'HOST'}[$j]{'NAME'} = [ $result->{'name'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'QUALITY'} = [ $result->{'quality'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'FIDELITY'} = [ $result->{'fidelity'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'LASTDATE'} = [ $result->{'lastdate'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'OSNAME'} = [ $result->{'osname'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'IPMASK'} = [ $result->{'ipmask'} ]; $j++; } $i++; } } if($xml){ $output=XML::Simple::XMLout( \%xml, RootName => 'NET', SuppressEmpty => undef); print $output; } exit(0); } ############# ##IP resolving ############## ## if($iptarget){ my $netname; #If necessary, ascii conversion of a binary format $masktarget = _bintoascii($masktarget) if($masktarget=~/^\d\d$/); die "Invalid netmask. Abort.\n" unless $masktarget=~/^\d{1,3}(\.\d{1,3}){3}$/; $network = _network($iptarget, $masktarget); my $uid; ($netname, $uid)= &_getnetname($network, '-'); my @nmb = `nmblookup -A $iptarget`; #DNS name my $dnsname = &_getdns($iptarget); #Netbios name my $nmbname; my $inv; my $type; for(@nmb){ $nmbname = $1,last if /\s+(\S+).*<00>/; } $request = $dbh->prepare('SELECT * FROM networks WHERE IPADDRESS='.$dbh->quote($iptarget)); $request->execute; if($request->rows){ $inv = 1; $type = 'Computer'; }else{ $request = $dbh->prepare('SELECT IP,TYPE FROM netmap, network_devices WHERE MAC=MACADDR AND IP='.$dbh->quote($iptarget)); $request->execute; if(my $row = $request->fetchrow_hashref){ $inv = 1, $type = $row->{'TYPE'}; } } $request = $dbh->prepare('SELECT MAC FROM netmap WHERE IP='.$dbh->quote($iptarget)); $request->execute; my $exist = 1 if $request->rows; unless($xml){ print < ".($netname).". ($uid) ($network)\n"; print < 'IP', SuppressEmpty => undef); print $output; exit(0); } } # #Searching non-inventoried mac addresses # my %network; my @hosts; my $null; # # Filter out already flagged MAC addresses - drich $request = $dbh->prepare('SELECT IP,MASK,MAC,DATE FROM netmap LEFT JOIN networks ON MACADDR=MAC where MACADDR IS NULL AND MAC NOT IN (SELECT MACADDR FROM network_devices)'); $request->execute; # #Determine the subnets # # my %network_ipd; # while($row = $request->fetchrow_hashref){ my $ip; my $netmask; # if($row->{'MASK'}){ $ip = $row->{'IP'}; $netmask = $row->{'MASK'}; $network = _network($ip, $netmask); $binmask = _binmask($netmask); if($net){ next unless $network eq $filter; } #Hosts count per subnet if($list and !$analyse and !$net){ $network_ipd{$network}++; }else{ $network{$network}++; push @hosts, [ $row->{'MAC'}, $ip , $row->{'DATE'}]; } }else{ $null++; } } my $total = 0; #We want ALL subnets in the database, even those that are not discovered if($list and !$analyse and !$net){ $request = $dbh->prepare('SELECT IPADDRESS,IPMASK FROM networks'); $request->execute; while($row = $request->fetchrow_hashref){ my $ip; my $netmask; # if($row->{'IPMASK'}=~/^\d{1,3}(\.\d{1,3}){3}$/ and $row->{'IPADDRESS'}=~/^\d{1,3}(\.\d{1,3}){3}$/){ $ip = $row->{'IPADDRESS'}; $netmask = $row->{'IPMASK'}; $network = _network($ip, $netmask); $network{$network}++; } #Hosts count per subnet } #We show the part of non-inventoried computers my $netnum; for $netnum (keys(%network)){ $total+=$network{$netnum}; for(keys(%network_ipd)){ $network{$netnum}.= "/".$network_ipd{$_} if($_ eq $netnum); } } } ######## #RESULTS ######## # print <","","",""); print "-------------------------------------------------------------------\n"; } #net UID my $dep; #net name my $lib; # my $line; my $netn; # my $i; my $output; for $netn (keys(%network)){ ($lib, $dep) = &_getnetname($netn,'-'); if($xml and !$analyse){ $xml{'NETWORK'}[$i]{'LABEL'} = [ $lib ]; $xml{'NETWORK'}[$i]{'UID'} = [ $dep ]; $xml{'NETWORK'}[$i]{'NETNAME'} = [ $netn ]; $xml{'NETWORK'}[$i]{'NETNUMBER'} = [ $network{$netn} ]; $i++; }elsif(!$xml){ printf("%-35s %-5s %-20s %-4s\n",$lib,$dep,$netn,$network{$netn}); $total += $network{$netn} unless $list; } } if($xml and !$net){ $output=XML::Simple::XMLout( \%xml, RootName => 'IPDISCOVER', SuppressEmpty => undef); print $output; } if($net){ # my($n, $i); #Host names my @names; # unless($xml){ print "\n---------------------------------------------\n"; print "Unknown host(s) on $filter \n"; print "---------------------------------------------\n\n"; } my $output; for $n (@hosts){ #Trying a DNS resolution push @$n, &_getdns($$n[1]); unless($analyse){ if($xml){ $xml{'HOST'}[$i]{'IP'} = [ $$n[1] ]; $xml{'HOST'}[$i]{'MAC'} = [ $$n[0] ]; $xml{'HOST'}[$i]{'DATE'} = [ $$n[2] ]; $xml{'HOST'}[$i]{'NAME'} = [ $$n[3] ]; $i++; }else{ printf("=> %-20s %-20s %-20s %s\n",$$n[1],$$n[0],$$n[2],$$n[3]); } } } if(!$analyse and $xml){ $output=XML::Simple::XMLout( \%xml, RootName => 'NET', SuppressEmpty => undef); print $output; } } ######## #ANALYZE ######## # # # #windows computers my @PCW; #Linux computers my @PCL; #Mac computers my @PCM; #net peripherals my @PR; #Phantom computers my @PH; #At least one port filtered with one port open or closed my @PF; if($analyse){ #directory creation for analyses file if($cache){ open CACHE, ">$path/ipd/$filter.ipd" or die $!; unless(flock(CACHE, LOCK_EX|LOCK_NB)){ if($xml){ print "346"; exit(0); }else{ die "An other analyse is in progress\n"; } } } unless(@hosts){ print "No unknown hosts of this network. Stop.\n\n" unless $xml; exit(0); } #If it's a global analyze, we don't display the results but just generate the files #Using nmap : # -> Connection on ports 135(msrpc), 80(web), 22(ssh), 23(telnet) # -> files ipdiscover-analyze.* generated (3 formats : .nmap(human), .gnmap(pour grep), .xml(xml) # -> No 'host up' detection # my @ips; push @ips, $$_[1] for(@hosts); #Check that there is no analyses of this network pending open NMAP, "+>$path/$filter.gnmap"; unless(flock(NMAP, LOCK_EX|LOCK_NB)){ if($xml){ print "347"; exit(0); }else{ die "An other analyse is in progress\n"; } } #Analyse system("nmap -R -v @ips -p 135,80,22,23 -oG $path/$filter.gnmap -P0 -O > /dev/null"); # my @gnmap; if($net){ @gnmap = ; close NMAP; unlink "$path/$filter.gnmap"; # ########### # my $ref; my ($h, $w, $j, $r, $f, $l); REF: for $ref (@hosts){ $h = $$ref[1]; for(@gnmap){ next if /^#/; # Skip comments if(/Host: $h\b/){ if (/Status: Down/){ $PH[$j] = $ref; $j++; next REF; }elsif(/Status: /){ # status up is meaningless to us next; } # Try OS detection first if(/OS: .*Windows/){ $PCW[$w] = $ref; $w++; next REF; }elsif(/OS: .*Apple Mac/){ $PCM[$l] = $ref; $l++; next REF; }elsif(/OS: .*Linux/ and !/OS: .*embedded/){ $PCL[$l] = $ref; $l++; next REF; }elsif(/OS: /){ # Something else, call it network $PR[$r] = $ref; $r++; next REF; } if(/135\/o/){ $PCW[$w] = $ref; $w++; next REF; }elsif( (/22\/c.+23\/c.+80\/o.+135\/c/) or (/22\/c.+23\/o.+80\/c.+135\/c/) or (/22\/c.+23\/o.+80\/o.+135\/c/) or (/22\/o.+23\/o/) ){ $PR[$r] = $ref; $r++; next REF; }elsif(/(22\/f.+23\/f.+80\/f.+135\/c|22\/c.+23\/c.+80\/c.+135\/c)/){ $PH[$j] = $ref; $j++; next REF; }elsif(/(22\/f.+23\/f.+80\/f.+135\/f)/){ $PF[$f] = $ref; $f++; next REF; }else{ $PCL[$l] = $ref; $l++; next REF; } } } } #Display results print "\n" if $xml; print CACHE "\n" if $xml; &_print(\@PCW, 'WINDOWS COMPUTERS'); &_print(\@PCL, 'LINUX COMPUTERS'); &_print(\@PCM, 'MAC COMPUTERS'); &_print(\@PR, 'NETWORK DEVICES'); &_print(\@PF, 'FILTERED HOSTS'); &_print(\@PH, 'PHANTOM HOSTS'); print "\n" if $xml; print CACHE "\n" if $xml; } } ################## #DISLAY SUBROUTINE ################## # sub _print{ my $ref = shift; my $lib = shift; if(@$ref){ my $nb; unless($xml){ print "#" for(0..(length($lib)+3)); print "\n"; print "# ".$lib." #"; print "\n"; print "#" for(0..(length($lib)+3)); print "\n"; print "#----------------------------------------------------------------------------\n"; printf("#%-20s %-20s %-25s %s\n", "IP address", "MAC address", "DNS/Netbios", "Date"); print "#----------------------------------------------------------------------------\n#\n"; } $nb = 0; my $output; %xml = undef; for(@$ref){ $$_[3] = &_smbname($$_[1]) if $$_[3] eq "-"; if($xml){ $xml{'IP'} = [ $$_[1] ]; $xml{'MAC'} = [ $$_[0] ]; $xml{'NAME'} = [ $$_[3] ]; $xml{'DATE'} = [ $$_[2] ]; $xml{'TYPE'} = ['WINDOWS'] if $lib =~/windows/i; $xml{'TYPE'} = ['LINUX'] if $lib =~/linux/i; $xml{'TYPE'} = ['MAC'] if $lib =~/mac/i; $xml{'TYPE'} = ['FILTERED'] if $lib =~/filtered/i; $xml{'TYPE'} = ['NETWORK'] if $lib =~/network/i; $xml{'TYPE'} = ['PHANTOM'] if $lib =~/phantom/i; $output=XML::Simple::XMLout( \%xml, RootName => 'HOST', SuppressEmpty => undef); print $output; print CACHE $output if $cache; }else{ printf("#-> %-15s %-20s %-20s %s\n",$$_[1],$$_[0],$$_[3],$$_[2]); $nb++; } } unless($xml){ print "#\n#==========> $nb host(s)\n#\n\n\n"; } } } # ######################################### #ROUTINE DE RECUPERATION DES NOMS NETBIOS ######################################### # sub _smbname{ my $flag = 0; my $name; my $ip = shift; #If no dns name, we try a netbios resolution my @smb = `nmblookup -A $ip`; #On cherche un enregistrment <00> pour l'ip passee en argument for(@smb){ $name = "-"; /Looking\D+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ unless $flag; if(/<00>/){ /^\s+(\S+)/; $name = $1; return $name; } } return "-"; } ############## #CLEAN *.gnmap ############## # sub _cleanup{ my($name, @files); opendir DIR, $path; while($name = readdir DIR){ push @files, $name if $name=~/\.gnmap$/i; } closedir DIR; for(@files){ open FILE, $_ or next; unlink "$path/$_" if(flock(FILE, LOCK_EX|LOCK_NB)); } } print "|\n|\n---------------------------------------------\n|" unless $xml; if($list){ print "\n|--> TOTAL = $total valid (ips/netmask) in the database\n" unless $xml; exit(0); } unless($xml){ print "\n|--> TOTAL = $total unknown hosts\n"; print "\n|--> WARNING: $null discovered computers without netmask on all discovered machine\n\n" if $null; } #Try to get dns name sub _getdns{ my $ip = shift; my $name; chomp(my @names = `host $ip 2>/dev/null`); for(@names){ return $1 if /.+pointer (.+)/i; return $1 if /Name:\s*(\S+)/i; } return("-"); } #Retrieve the name of the subnet if available sub _getnetname{ my $network = shift; my $r = shift; for(@subnet){ if($_->[0] eq $network){ return ($_->[1], $_->[2]); last; } } return($r, $r); } #To retrieve the net ip sub _network{ my $ip = shift; my $netmask = shift; my $binip = &ip_iptobin($ip, 4); my $binmask = &ip_iptobin($netmask, 4); my $subnet = $binip & $binmask; return(&ip_bintoip($subnet, 4)) or die(Error()); } sub _bintoascii{ my $binmask = shift; my $binstring = "1" x $binmask; $binstring .= "0" for(1..(32 - $binmask)); return(&ip_bintoip($binstring, 4)) or die(Error()); } sub _binmask{ my $ip = shift; return(&ip_iptobin($ip, 4)) or die(Error()); } ocsinventory-server-2.2+dfsg/ocsreports/js/000077500000000000000000000000001303466605000211645ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/js/bootstrap-custom.js000077500000000000000000000001471303466605000250540ustar00rootroot00000000000000$(function(){ $(".dropdown-submenu-toggle").click(function (){ window.location = this.href; }); });ocsinventory-server-2.2+dfsg/ocsreports/js/datetimepicker.js000077500000000000000000000336171303466605000245310ustar00rootroot00000000000000//Javascript name: My Date Time Picker //Date created: 16-Nov-2003 23:19 //Scripter: TengYong Ng //Website: http://www.rainforestnet.com //Copyright (c) 2003 TengYong Ng //FileName: DateTimePicker.js //Version: 0.8 //Contact: contact@rainforestnet.com // Note: Permission given to use this script in ANY kind of applications if // header lines are left unchanged. //Global variables var winCal; var dtToday=new Date(); var Cal; var docCal; var exDateTime;//Existing Date and Time //Configurable parameters var cnTop="200";//top coordinate of calendar window. var cnLeft="500";//left coordinate of calendar window var WindowTitle ="Date";//Date Time Picker title. var WeekChar=1;//number of character for week day. if 2 then Mo,Tu,We. if 3 then Mon,Tue,Wed. var CellWidth=20;//Width of day cell. var DateSeparator="/";//Date Separator, you can change it to "/" if you want. var TimeMode=24;//default TimeMode value. 12 or 24 var ShowLongMonth=true;//Show long month name in Calendar header. example: "January". var ShowMonthYear=false;//Show Month and Year in Calendar header. var MonthYearColor="blue";//"#cc0033";//Font Color of Month and Year in Calendar header. var WeekHeadColor="8e0077";//"#0099CC";//Background Color in Week header. var SundayColor="#CCCCFF";//"#6699FF";//Background color of Sunday. var SaturdayColor="#CCCCFF";//Background color of Saturday. var WeekDayColor="white";//Background color of weekdays. var FontColor="blue";//color of font in Calendar day cell. var TodayColor="#FFFF33";//Background color of today. var SelDateColor="afe0ae";//"#FFFF99";//Backgrond color of selected date in textbox. var YrSelColor="blue";//"#cc0033";//color of font of Year selector. var ThemeBg="";//Background image of Calendar window. //end Configurable parameters //end Global variable function NewCal(pCtrl,pFormat,pShowTime,pTimeMode,pCheck) { if (pCheck!=null) document.getElementById(pCheck).checked = true; Cal=new Calendar(dtToday); if ((pShowTime!=null) && (pShowTime)) { Cal.ShowTime=true; if ((pTimeMode!=null) &&((pTimeMode=='12')||(pTimeMode=='24'))) { TimeMode=pTimeMode; } } if (pCtrl!=null) Cal.Ctrl=pCtrl; if (pFormat!=null) Cal.Format=pFormat.toUpperCase(); exDateTime=document.getElementById(pCtrl).value; if (exDateTime!="")//Parse Date String { var Sp1;//Index of Date Separator 1 var Sp2;//Index of Date Separator 2 var tSp1;//Index of Time Separator 1 var tSp1;//Index of Time Separator 2 var strMonth; var strDate; var strYear; var intMonth; var YearPattern; var strHour; var strMinute; var strSecond; //parse month Sp1=exDateTime.indexOf(DateSeparator,0) Sp2=exDateTime.indexOf(DateSeparator,(parseInt(Sp1)+1)); if ((Cal.Format.toUpperCase()=="DDMMYYYY") || (Cal.Format.toUpperCase()=="DDMMMYYYY")) { strMonth=exDateTime.substring(Sp1+1,Sp2); strDate=exDateTime.substring(0,Sp1); } else if ((Cal.Format.toUpperCase()=="MMDDYYYY") || (Cal.Format.toUpperCase()=="MMMDDYYYY")) { strMonth=exDateTime.substring(0,Sp1); strDate=exDateTime.substring(Sp1+1,Sp2); } if (isNaN(strMonth)) intMonth=Cal.GetMonthIndex(strMonth); else intMonth=parseInt(strMonth,10)-1; if ((parseInt(intMonth,10)>=0) && (parseInt(intMonth,10)<12)) Cal.Month=intMonth; //end parse month //parse Date if ((parseInt(strDate,10)<=Cal.GetMonDays()) && (parseInt(strDate,10)>=1)) Cal.Date=strDate; //end parse Date //parse year strYear=exDateTime.substring(Sp2+1,Sp2+5); YearPattern=/^\d{4}$/; if (YearPattern.test(strYear)) Cal.Year=parseInt(strYear,10); if( Cal.Year == 0 ) Cal.Year = dtToday.getFullYear(); //end parse year //parse time if (Cal.ShowTime==true) { tSp1=exDateTime.indexOf(":",0) tSp2=exDateTime.indexOf(":",(parseInt(tSp1)+1)); strHour=exDateTime.substring(tSp1,(tSp1)-2); Cal.SetHour(strHour); strMinute=exDateTime.substring(tSp1+1,tSp2); Cal.SetMinute(strMinute); strSecond=exDateTime.substring(tSp2+1,tSp2+3); Cal.SetSecond(strSecond); } } winCal=window.open("","DateTimePicker","toolbar=0,status=0,menubar=0,fullscreen=no,width=195,height=210,resizable=0,top="+cnTop+",left="+cnLeft); docCal=winCal.document; RenderCal(); } function RenderCal() { var vCalHeader; var vCalData; var vCalTime; var i; var j; var SelectStr; var vDayCount=0; var vFirstDay; docCal.open(); docCal.writeln(""+WindowTitle+""); docCal.writeln(""); docCal.writeln(""); docCal.writeln("
"); vCalHeader="\n"; //Month Selector vCalHeader+="\n\n"; vCalHeader+=""; //Calendar header shows Month and Year if (ShowMonthYear) vCalHeader+="\n"; //Week day header vCalHeader+=""; for (i=0;i<7;i++) { vCalHeader+=""; } vCalHeader+=""; docCal.write(vCalHeader); //Calendar detail CalDate=new Date(Cal.Year,Cal.Month); CalDate.setDate(1); vFirstDay=CalDate.getDay(); vCalData=""; for (i=0;i\n"; } } docCal.writeln(vCalData); //Time picker if (Cal.ShowTime) { var showHour; showHour=Cal.getShowHour(); vCalTime="\n\n"; docCal.write(vCalTime); } //end time picker docCal.writeln("\n
"; //Year selector vCalHeader+="\n
\n"; vCalHeader+="< "+Cal.Year+" >
"+Cal.GetMonthName(ShowLongMonth)+" "+Cal.Year+"
"+WeekDayName[i].substr(0,WeekChar)+"
"; vCalTime+=""; vCalTime+=" : "; vCalTime+=""; vCalTime+=" : "; vCalTime+=""; if (TimeMode==12) { var SelectAm =(parseInt(Cal.Hours,10)<12)? "Selected":""; var SelectPm =(parseInt(Cal.Hours,10)>=12)? "Selected":""; vCalTime+=""; } vCalTime+="\n
"); docCal.writeln("
"); docCal.close(); } function GenCell(pValue,pHighLight,pColor)//Generate table cell with value { var PValue; var PCellStr; var vColor; var vHLstr1;//HighLight string var vHlstr2; var vTimeStr; if (pValue==null) PValue=""; else PValue=pValue; if (pColor!=null) vColor="bgcolor=\""+pColor+"\""; else vColor=""; if ((pHighLight!=null)&&(pHighLight)) {vHLstr1="color='red'>";vHLstr2="";} else {vHLstr1=">";vHLstr2="";} if (Cal.ShowTime) { vTimeStr="winMain.document.getElementById('"+Cal.Ctrl+"').value+=' '+"+"winMain.Cal.getShowHour()"+"+':'+"+"winMain.Cal.Minutes"+"+':'+"+"winMain.Cal.Seconds"; if (TimeMode==12) vTimeStr+="+' '+winMain.Cal.AMorPM"; } else vTimeStr=""; PCellStr=""+PValue+""+vHLstr2+""; return PCellStr; } function Calendar(pDate,pCtrl) { //Properties this.Date=pDate.getDate();//selected date this.Month=pDate.getMonth();//selected month number this.Year=pDate.getFullYear();//selected year in 4 digits this.Hours=pDate.getHours(); if (pDate.getMinutes()<10) this.Minutes="0"+pDate.getMinutes(); else this.Minutes=pDate.getMinutes(); if (pDate.getSeconds()<10) this.Seconds="0"+pDate.getSeconds(); else this.Seconds=pDate.getSeconds(); this.MyWindow=winCal; this.Ctrl=pCtrl; this.Format="ddMMyyyy"; this.Separator=DateSeparator; this.ShowTime=false; if (pDate.getHours()<12) this.AMorPM="AM"; else this.AMorPM="PM"; } function GetMonthIndex(shortMonthName) { for (i=0;i<12;i++) { if (MonthName[i].substring(0,3).toUpperCase()==shortMonthName) return i; } } Calendar.prototype.GetMonthIndex=GetMonthIndex; function IncYear() { Cal.Year++;} Calendar.prototype.IncYear=IncYear; function DecYear() { Cal.Year--;} Calendar.prototype.DecYear=DecYear; function SwitchMth(intMth) { Cal.Month=intMth;} Calendar.prototype.SwitchMth=SwitchMth; function SetHour(intHour) { var MaxHour; var MinHour; if (TimeMode==24) { MaxHour=23;MinHour=0} else if (TimeMode==12) { MaxHour=12;MinHour=1} else alert("TimeMode can only be 12 or 24"); var HourExp=new RegExp("^\\d\\d$"); if (HourExp.test(intHour) && (parseInt(intHour,10)<=MaxHour) && (parseInt(intHour,10)>=MinHour)) { if ((TimeMode==12) && (Cal.AMorPM=="PM")) { if (parseInt(intHour,10)==12) Cal.Hours=12; else Cal.Hours=parseInt(intHour,10)+12; } else if ((TimeMode==12) && (Cal.AMorPM=="AM")) { if (intHour==12) intHour-=12; Cal.Hours=parseInt(intHour,10); } else if (TimeMode==24) Cal.Hours=parseInt(intHour,10); } } Calendar.prototype.SetHour=SetHour; function SetMinute(intMin) { var MinExp=new RegExp("^\\d\\d$"); if (MinExp.test(intMin) && (intMin<60)) Cal.Minutes=intMin; } Calendar.prototype.SetMinute=SetMinute; function SetSecond(intSec) { var SecExp=new RegExp("^\\d\\d$"); if (SecExp.test(intSec) && (intSec<60)) Cal.Seconds=intSec; } Calendar.prototype.SetSecond=SetSecond; function SetAmPm(pvalue) { this.AMorPM=pvalue; if (pvalue=="PM") { this.Hours=(parseInt(this.Hours,10))+12; if (this.Hours==24) this.Hours=12; } else if (pvalue=="AM") this.Hours-=12; } Calendar.prototype.SetAmPm=SetAmPm; function getShowHour() { var finalHour; if (TimeMode==12) { if (parseInt(this.Hours,10)==0) { this.AMorPM="AM"; finalHour=parseInt(this.Hours,10)+12; } else if (parseInt(this.Hours,10)==12) { this.AMorPM="PM"; finalHour=12; } else if (this.Hours>12) { this.AMorPM="PM"; if ((this.Hours-12)<10) finalHour="0"+((parseInt(this.Hours,10))-12); else finalHour=parseInt(this.Hours,10)-12; } else { this.AMorPM="AM"; if (this.Hours<10) finalHour="0"+parseInt(this.Hours,10); else finalHour=this.Hours; } } else if (TimeMode==24) { if (this.Hours<10) finalHour="0"+parseInt(this.Hours,10); else finalHour=this.Hours; } return finalHour; } Calendar.prototype.getShowHour=getShowHour; function GetMonthName(IsLong) { var Month=MonthName[this.Month]; if (IsLong) return Month; else return Month.substr(0,3); } Calendar.prototype.GetMonthName=GetMonthName; function GetMonDays()//Get number of days in a month { var DaysInMonth=[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; if (this.IsLeapYear()) { DaysInMonth[1]=29; } return DaysInMonth[this.Month]; } Calendar.prototype.GetMonDays=GetMonDays; function IsLeapYear() { if ((this.Year%4)==0) { if ((this.Year%100==0) && (this.Year%400)!=0) { return false; } else { return true; } } else { return false; } } Calendar.prototype.IsLeapYear=IsLeapYear; function FormatDate(pDate) { var showmonth; if( (this.Month+1) < 10 ) showmonth = "0"+(this.Month+1); else showmonth = (this.Month+1); var showday; if( pDate < 10 ) showday = "0"+pDate; else showday = pDate; return (this.Year+"-"+showmonth+"-"+showday); if (this.Format.toUpperCase()=="DDMMYYYY") return (showday+DateSeparator+showmonth+DateSeparator+this.Year); else if (this.Format.toUpperCase()=="DDMMMYYYY") return (pDate+DateSeparator+this.GetMonthName(false)+DateSeparator+this.Year); else if (this.Format.toUpperCase()=="MMDDYYYY") return (showmonth+DateSeparator+showday+DateSeparator+this.Year); else if (this.Format.toUpperCase()=="YYYYMMDD") return (this.Year+DateSeparator+showmonth+DateSeparator+showday); else if (this.Format.toUpperCase()=="MMMDDYYYY") return (this.GetMonthName(false)+DateSeparator+pDate+DateSeparator+this.Year); } Calendar.prototype.FormatDate=FormatDate; ocsinventory-server-2.2+dfsg/ocsreports/js/function.js000077500000000000000000000062451303466605000233610ustar00rootroot00000000000000function convertToUpper(v_string){ v_string.value=v_string.value.toUpperCase(); } function codeTouche(evenement) { for (prop in evenement) { if(prop == 'which') return(evenement.which); } return(evenement.keyCode); } function pressePapierNS6(evenement,touche){ var rePressePapierNS = /[cvxz]/i; for (prop in evenement) if (prop == 'ctrlKey') isModifiers = true; if (isModifiers) return evenement.ctrlKey && rePressePapierNS.test(touche); else return false; } function scanTouche(evenement,exReguliere) { var reCarSpeciaux = /[\x00\x08\x0D\x03\x16\x18\x1A]/; var reCarValides = exReguliere; var codeDecimal = codeTouche(evenement); var car = String.fromCharCode(codeDecimal); var autorisation = reCarValides.test(car) || reCarSpeciaux.test(car) || pressePapierNS6(evenement,car); var toto = autorisation; return autorisation; } function scrollHeaders() { var monSpan = document.getElementById("headers"); if( monSpan ) { if( document.body.scrollTop > 200) { monSpan.style.top = (( Math.ceil(document.body.scrollTop / 27)) * 27) + 3; monSpan.style.visibility = 'visible'; // 15 Netsc 8ie } else monSpan.style.visibility = 'hidden'; } } function wait( sens ) { var mstyle = document.getElementById('wait').style.display = (sens!=0?"block" :"none"); } function ruSure( pageDest ) { if( confirm("?") ) window.location = pageDest; } function post(form_name){ document.getElementById(form_name).submit(); } function tri(did,hidden_name,did2,hidden_name2,form_name){ document.getElementById(hidden_name).value=did; document.getElementById(hidden_name2).value=did2; post(form_name); } function confirme(aff,did,form_name,hidden_name,lbl){ if(confirm(lbl+aff+'?')){ garde_valeur(did,hidden_name); post(form_name); } } function garde_valeur(did,hidden_name){ document.getElementById(hidden_name).value=did; } function pag(did,hidden_name,form_name){ garde_valeur(did,hidden_name); post(form_name); } function verif_field(field_name_verif,field_submit,form_name) { if (document.getElementById(field_name_verif).value == '') { document.getElementById(field_name_verif).style.backgroundColor = 'RED'; }else { pag(field_submit,field_submit,form_name); } } function clic(id,val) { document.getElementById('ACTION_CLIC').action = id; document.getElementById('RESET').value=val; document.forms['ACTION_CLIC'].submit(); } $.extend($.fn.dataTableExt.oStdClasses, { "sFilterInput": "", "sLengthSelect": "" }); $.extend(true, $.fn.dataTable.defaults, { "sDom": "<'row'<'dataTables_length_container'l><'dataTables_filter_container'f>r>"+ "t"+ "<'row'<'col-xs-6'i><'col-xs-6'p>>", }); function changerCouleur(obj, state) { if (state == true) { bcolor = obj.style.backgroundColor; fcolor = obj.style.color; obj.style.backgroundColor = '#FFDAB9'; obj.style.color = 'red'; return true; } else { obj.style.backgroundColor = bcolor; obj.style.color = fcolor; return true; } return false; } function delete_cookie( name ) { document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;'; } ocsinventory-server-2.2+dfsg/ocsreports/js/jquery.fileupload.js000077500000000000000000001703731303466605000252020ustar00rootroot00000000000000/* * jQuery File Upload Plugin 5.40.1 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2010, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /* jshint nomen:false */ /* global define, window, document, location, Blob, FormData */ (function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: define([ 'jquery', 'jquery.ui.widget' ], factory); } else { // Browser globals: factory(window.jQuery); } }(function ($) { 'use strict'; // Detect file input support, based on // http://viljamis.com/blog/2012/file-upload-support-on-mobile/ $.support.fileInput = !(new RegExp( // Handle devices which give false positives for the feature detection: '(Android (1\\.[0156]|2\\.[01]))' + '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' + '|(w(eb)?OSBrowser)|(webOS)' + '|(Kindle/(1\\.0|2\\.[05]|3\\.0))' ).test(window.navigator.userAgent) || // Feature detection for all other devices: $('').prop('disabled')); // The FileReader API is not actually used, but works as feature detection, // as some Safari versions (5?) support XHR file uploads via the FormData API, // but not non-multipart XHR file uploads. // window.XMLHttpRequestUpload is not available on IE10, so we check for // window.ProgressEvent instead to detect XHR2 file upload capability: $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader); $.support.xhrFormDataFileUpload = !!window.FormData; // Detect support for Blob slicing (required for chunked uploads): $.support.blobSlice = window.Blob && (Blob.prototype.slice || Blob.prototype.webkitSlice || Blob.prototype.mozSlice); // The fileupload widget listens for change events on file input fields defined // via fileInput setting and paste or drop events of the given dropZone. // In addition to the default jQuery Widget methods, the fileupload widget // exposes the "add" and "send" methods, to add or directly send files using // the fileupload API. // By default, files added via file input selection, paste, drag & drop or // "add" method are uploaded immediately, but it is possible to override // the "add" callback option to queue file uploads. $.widget('blueimp.fileupload', { options: { // The drop target element(s), by the default the complete document. // Set to null to disable drag & drop support: dropZone: $(document), // The paste target element(s), by the default the complete document. // Set to null to disable paste support: pasteZone: $(document), // The file input field(s), that are listened to for change events. // If undefined, it is set to the file input fields inside // of the widget element on plugin initialization. // Set to null to disable the change listener. fileInput: undefined, // By default, the file input field is replaced with a clone after // each input field change event. This is required for iframe transport // queues and allows change events to be fired for the same file // selection, but can be disabled by setting the following option to false: replaceFileInput: true, // The parameter name for the file form data (the request argument name). // If undefined or empty, the name property of the file input field is // used, or "files[]" if the file input name property is also empty, // can be a string or an array of strings: paramName: undefined, // By default, each file of a selection is uploaded using an individual // request for XHR type uploads. Set to false to upload file // selections in one request each: singleFileUploads: true, // To limit the number of files uploaded with one XHR request, // set the following option to an integer greater than 0: limitMultiFileUploads: undefined, // The following option limits the number of files uploaded with one // XHR request to keep the request size under or equal to the defined // limit in bytes: limitMultiFileUploadSize: undefined, // Multipart file uploads add a number of bytes to each uploaded file, // therefore the following option adds an overhead for each file used // in the limitMultiFileUploadSize configuration: limitMultiFileUploadSizeOverhead: 512, // Set the following option to true to issue all file upload requests // in a sequential order: sequentialUploads: false, // To limit the number of concurrent uploads, // set the following option to an integer greater than 0: limitConcurrentUploads: undefined, // Set the following option to true to force iframe transport uploads: forceIframeTransport: false, // Set the following option to the location of a redirect url on the // origin server, for cross-domain iframe transport uploads: redirect: undefined, // The parameter name for the redirect url, sent as part of the form // data and set to 'redirect' if this option is empty: redirectParamName: undefined, // Set the following option to the location of a postMessage window, // to enable postMessage transport uploads: postMessage: undefined, // By default, XHR file uploads are sent as multipart/form-data. // The iframe transport is always using multipart/form-data. // Set to false to enable non-multipart XHR uploads: multipart: true, // To upload large files in smaller chunks, set the following option // to a preferred maximum chunk size. If set to 0, null or undefined, // or the browser does not support the required Blob API, files will // be uploaded as a whole. maxChunkSize: undefined, // When a non-multipart upload or a chunked multipart upload has been // aborted, this option can be used to resume the upload by setting // it to the size of the already uploaded bytes. This option is most // useful when modifying the options object inside of the "add" or // "send" callbacks, as the options are cloned for each file upload. uploadedBytes: undefined, // By default, failed (abort or error) file uploads are removed from the // global progress calculation. Set the following option to false to // prevent recalculating the global progress data: recalculateProgress: true, // Interval in milliseconds to calculate and trigger progress events: progressInterval: 100, // Interval in milliseconds to calculate progress bitrate: bitrateInterval: 500, // By default, uploads are started automatically when adding files: autoUpload: true, // Error and info messages: messages: { uploadedBytes: 'Uploaded bytes exceed file size' }, // Translation function, gets the message key to be translated // and an object with context specific data as arguments: i18n: function (message, context) { message = this.messages[message] || message.toString(); if (context) { $.each(context, function (key, value) { message = message.replace('{' + key + '}', value); }); } return message; }, // Additional form data to be sent along with the file uploads can be set // using this option, which accepts an array of objects with name and // value properties, a function returning such an array, a FormData // object (for XHR file uploads), or a simple object. // The form of the first fileInput is given as parameter to the function: formData: function (form) { return form.serializeArray(); }, // The add callback is invoked as soon as files are added to the fileupload // widget (via file input selection, drag & drop, paste or add API call). // If the singleFileUploads option is enabled, this callback will be // called once for each file in the selection for XHR file uploads, else // once for each file selection. // // The upload starts when the submit method is invoked on the data parameter. // The data object contains a files property holding the added files // and allows you to override plugin options as well as define ajax settings. // // Listeners for this callback can also be bound the following way: // .bind('fileuploadadd', func); // // data.submit() returns a Promise object and allows to attach additional // handlers using jQuery's Deferred callbacks: // data.submit().done(func).fail(func).always(func); add: function (e, data) { if (e.isDefaultPrevented()) { return false; } if (data.autoUpload || (data.autoUpload !== false && $(this).fileupload('option', 'autoUpload'))) { data.process().done(function () { data.submit(); }); } }, // Other callbacks: // Callback for the submit event of each file upload: // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); // Callback for the start of each file upload request: // send: function (e, data) {}, // .bind('fileuploadsend', func); // Callback for successful uploads: // done: function (e, data) {}, // .bind('fileuploaddone', func); // Callback for failed (abort or error) uploads: // fail: function (e, data) {}, // .bind('fileuploadfail', func); // Callback for completed (success, abort or error) requests: // always: function (e, data) {}, // .bind('fileuploadalways', func); // Callback for upload progress events: // progress: function (e, data) {}, // .bind('fileuploadprogress', func); // Callback for global upload progress events: // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); // Callback for uploads start, equivalent to the global ajaxStart event: // start: function (e) {}, // .bind('fileuploadstart', func); // Callback for uploads stop, equivalent to the global ajaxStop event: // stop: function (e) {}, // .bind('fileuploadstop', func); // Callback for change events of the fileInput(s): // change: function (e, data) {}, // .bind('fileuploadchange', func); // Callback for paste events to the pasteZone(s): // paste: function (e, data) {}, // .bind('fileuploadpaste', func); // Callback for drop events of the dropZone(s): // drop: function (e, data) {}, // .bind('fileuploaddrop', func); // Callback for dragover events of the dropZone(s): // dragover: function (e) {}, // .bind('fileuploaddragover', func); // Callback for the start of each chunk upload request: // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func); // Callback for successful chunk uploads: // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func); // Callback for failed (abort or error) chunk uploads: // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func); // Callback for completed (success, abort or error) chunk upload requests: // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func); // The plugin options are used as settings object for the ajax calls. // The following are jQuery ajax settings required for the file uploads: processData: false, contentType: false, cache: false }, // A list of options that require reinitializing event listeners and/or // special initialization code: _specialOptions: [ 'fileInput', 'dropZone', 'pasteZone', 'multipart', 'forceIframeTransport' ], _blobSlice: $.support.blobSlice && function () { var slice = this.slice || this.webkitSlice || this.mozSlice; return slice.apply(this, arguments); }, _BitrateTimer: function () { this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); this.loaded = 0; this.bitrate = 0; this.getBitrate = function (now, loaded, interval) { var timeDiff = now - this.timestamp; if (!this.bitrate || !interval || timeDiff > interval) { this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; this.loaded = loaded; this.timestamp = now; } return this.bitrate; }; }, _isXHRUpload: function (options) { return !options.forceIframeTransport && ((!options.multipart && $.support.xhrFileUpload) || $.support.xhrFormDataFileUpload); }, _getFormData: function (options) { var formData; if ($.type(options.formData) === 'function') { return options.formData(options.form); } if ($.isArray(options.formData)) { return options.formData; } if ($.type(options.formData) === 'object') { formData = []; $.each(options.formData, function (name, value) { formData.push({name: name, value: value}); }); return formData; } return []; }, _getTotal: function (files) { var total = 0; $.each(files, function (index, file) { total += file.size || 1; }); return total; }, _initProgressObject: function (obj) { var progress = { loaded: 0, total: 0, bitrate: 0 }; if (obj._progress) { $.extend(obj._progress, progress); } else { obj._progress = progress; } }, _initResponseObject: function (obj) { var prop; if (obj._response) { for (prop in obj._response) { if (obj._response.hasOwnProperty(prop)) { delete obj._response[prop]; } } } else { obj._response = {}; } }, _onProgress: function (e, data) { if (e.lengthComputable) { var now = ((Date.now) ? Date.now() : (new Date()).getTime()), loaded; if (data._time && data.progressInterval && (now - data._time < data.progressInterval) && e.loaded !== e.total) { return; } data._time = now; loaded = Math.floor( e.loaded / e.total * (data.chunkSize || data._progress.total) ) + (data.uploadedBytes || 0); // Add the difference from the previously loaded state // to the global loaded counter: this._progress.loaded += (loaded - data._progress.loaded); this._progress.bitrate = this._bitrateTimer.getBitrate( now, this._progress.loaded, data.bitrateInterval ); data._progress.loaded = data.loaded = loaded; data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate( now, loaded, data.bitrateInterval ); // Trigger a custom progress event with a total data property set // to the file size(s) of the current upload and a loaded data // property calculated accordingly: this._trigger( 'progress', $.Event('progress', {delegatedEvent: e}), data ); // Trigger a global progress event for all current file uploads, // including ajax calls queued for sequential file uploads: this._trigger( 'progressall', $.Event('progressall', {delegatedEvent: e}), this._progress ); } }, _initProgressListener: function (options) { var that = this, xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); // Accesss to the native XHR object is required to add event listeners // for the upload progress event: if (xhr.upload) { $(xhr.upload).bind('progress', function (e) { var oe = e.originalEvent; // Make sure the progress event properties get copied over: e.lengthComputable = oe.lengthComputable; e.loaded = oe.loaded; e.total = oe.total; that._onProgress(e, options); }); options.xhr = function () { return xhr; }; } }, _isInstanceOf: function (type, obj) { // Cross-frame instanceof check return Object.prototype.toString.call(obj) === '[object ' + type + ']'; }, _initXHRData: function (options) { var that = this, formData, file = options.files[0], // Ignore non-multipart setting if not supported: multipart = options.multipart || !$.support.xhrFileUpload, paramName = $.type(options.paramName) === 'array' ? options.paramName[0] : options.paramName; options.headers = $.extend({}, options.headers); if (options.contentRange) { options.headers['Content-Range'] = options.contentRange; } if (!multipart || options.blob || !this._isInstanceOf('File', file)) { options.headers['Content-Disposition'] = 'attachment; filename="' + encodeURI(file.name) + '"'; } if (!multipart) { options.contentType = file.type || 'application/octet-stream'; options.data = options.blob || file; } else if ($.support.xhrFormDataFileUpload) { if (options.postMessage) { // window.postMessage does not allow sending FormData // objects, so we just add the File/Blob objects to // the formData array and let the postMessage window // create the FormData object out of this array: formData = this._getFormData(options); if (options.blob) { formData.push({ name: paramName, value: options.blob }); } else { $.each(options.files, function (index, file) { formData.push({ name: ($.type(options.paramName) === 'array' && options.paramName[index]) || paramName, value: file }); }); } } else { if (that._isInstanceOf('FormData', options.formData)) { formData = options.formData; } else { formData = new FormData(); $.each(this._getFormData(options), function (index, field) { formData.append(field.name, field.value); }); } if (options.blob) { formData.append(paramName, options.blob, file.name); } else { $.each(options.files, function (index, file) { // This check allows the tests to run with // dummy objects: if (that._isInstanceOf('File', file) || that._isInstanceOf('Blob', file)) { formData.append( ($.type(options.paramName) === 'array' && options.paramName[index]) || paramName, file, file.uploadName || file.name ); } }); } } options.data = formData; } // Blob reference is not needed anymore, free memory: options.blob = null; }, _initIframeSettings: function (options) { var targetHost = $('').prop('href', options.url).prop('host'); // Setting the dataType to iframe enables the iframe transport: options.dataType = 'iframe ' + (options.dataType || ''); // The iframe transport accepts a serialized array as form data: options.formData = this._getFormData(options); // Add redirect url to form data on cross-domain uploads: if (options.redirect && targetHost && targetHost !== location.host) { options.formData.push({ name: options.redirectParamName || 'redirect', value: options.redirect }); } }, _initDataSettings: function (options) { if (this._isXHRUpload(options)) { if (!this._chunkedUpload(options, true)) { if (!options.data) { this._initXHRData(options); } this._initProgressListener(options); } if (options.postMessage) { // Setting the dataType to postmessage enables the // postMessage transport: options.dataType = 'postmessage ' + (options.dataType || ''); } } else { this._initIframeSettings(options); } }, _getParamName: function (options) { var fileInput = $(options.fileInput), paramName = options.paramName; if (!paramName) { paramName = []; fileInput.each(function () { var input = $(this), name = input.prop('name') || 'files[]', i = (input.prop('files') || [1]).length; while (i) { paramName.push(name); i -= 1; } }); if (!paramName.length) { paramName = [fileInput.prop('name') || 'files[]']; } } else if (!$.isArray(paramName)) { paramName = [paramName]; } return paramName; }, _initFormSettings: function (options) { // Retrieve missing options from the input field and the // associated form, if available: if (!options.form || !options.form.length) { options.form = $(options.fileInput.prop('form')); // If the given file input doesn't have an associated form, // use the default widget file input's form: if (!options.form.length) { options.form = $(this.options.fileInput.prop('form')); } } options.paramName = this._getParamName(options); if (!options.url) { options.url = options.form.prop('action') || location.href; } // The HTTP request method must be "POST" or "PUT": options.type = (options.type || ($.type(options.form.prop('method')) === 'string' && options.form.prop('method')) || '' ).toUpperCase(); if (options.type !== 'POST' && options.type !== 'PUT' && options.type !== 'PATCH') { options.type = 'POST'; } if (!options.formAcceptCharset) { options.formAcceptCharset = options.form.attr('accept-charset'); } }, _getAJAXSettings: function (data) { var options = $.extend({}, this.options, data); this._initFormSettings(options); this._initDataSettings(options); return options; }, // jQuery 1.6 doesn't provide .state(), // while jQuery 1.8+ removed .isRejected() and .isResolved(): _getDeferredState: function (deferred) { if (deferred.state) { return deferred.state(); } if (deferred.isResolved()) { return 'resolved'; } if (deferred.isRejected()) { return 'rejected'; } return 'pending'; }, // Maps jqXHR callbacks to the equivalent // methods of the given Promise object: _enhancePromise: function (promise) { promise.success = promise.done; promise.error = promise.fail; promise.complete = promise.always; return promise; }, // Creates and returns a Promise object enhanced with // the jqXHR methods abort, success, error and complete: _getXHRPromise: function (resolveOrReject, context, args) { var dfd = $.Deferred(), promise = dfd.promise(); context = context || this.options.context || promise; if (resolveOrReject === true) { dfd.resolveWith(context, args); } else if (resolveOrReject === false) { dfd.rejectWith(context, args); } promise.abort = dfd.promise; return this._enhancePromise(promise); }, // Adds convenience methods to the data callback argument: _addConvenienceMethods: function (e, data) { var that = this, getPromise = function (args) { return $.Deferred().resolveWith(that, args).promise(); }; data.process = function (resolveFunc, rejectFunc) { if (resolveFunc || rejectFunc) { data._processQueue = this._processQueue = (this._processQueue || getPromise([this])).pipe( function () { if (data.errorThrown) { return $.Deferred() .rejectWith(that, [data]).promise(); } return getPromise(arguments); } ).pipe(resolveFunc, rejectFunc); } return this._processQueue || getPromise([this]); }; data.submit = function () { if (this.state() !== 'pending') { data.jqXHR = this.jqXHR = (that._trigger( 'submit', $.Event('submit', {delegatedEvent: e}), this ) !== false) && that._onSend(e, this); } return this.jqXHR || that._getXHRPromise(); }; data.abort = function () { if (this.jqXHR) { return this.jqXHR.abort(); } this.errorThrown = 'abort'; that._trigger('fail', null, this); return that._getXHRPromise(false); }; data.state = function () { if (this.jqXHR) { return that._getDeferredState(this.jqXHR); } if (this._processQueue) { return that._getDeferredState(this._processQueue); } }; data.processing = function () { return !this.jqXHR && this._processQueue && that ._getDeferredState(this._processQueue) === 'pending'; }; data.progress = function () { return this._progress; }; data.response = function () { return this._response; }; }, // Parses the Range header from the server response // and returns the uploaded bytes: _getUploadedBytes: function (jqXHR) { var range = jqXHR.getResponseHeader('Range'), parts = range && range.split('-'), upperBytesPos = parts && parts.length > 1 && parseInt(parts[1], 10); return upperBytesPos && upperBytesPos + 1; }, // Uploads a file in multiple, sequential requests // by splitting the file up in multiple blob chunks. // If the second parameter is true, only tests if the file // should be uploaded in chunks, but does not invoke any // upload requests: _chunkedUpload: function (options, testOnly) { options.uploadedBytes = options.uploadedBytes || 0; var that = this, file = options.files[0], fs = file.size, ub = options.uploadedBytes, mcs = options.maxChunkSize || fs, slice = this._blobSlice, dfd = $.Deferred(), promise = dfd.promise(), jqXHR, upload; if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) || options.data) { return false; } if (testOnly) { return true; } if (ub >= fs) { file.error = options.i18n('uploadedBytes'); return this._getXHRPromise( false, options.context, [null, 'error', file.error] ); } // The chunk upload method: upload = function () { // Clone the options object for each chunk upload: var o = $.extend({}, options), currentLoaded = o._progress.loaded; o.blob = slice.call( file, ub, ub + mcs, file.type ); // Store the current chunk size, as the blob itself // will be dereferenced after data processing: o.chunkSize = o.blob.size; // Expose the chunk bytes position range: o.contentRange = 'bytes ' + ub + '-' + (ub + o.chunkSize - 1) + '/' + fs; // Process the upload data (the blob and potential form data): that._initXHRData(o); // Add progress listeners for this chunk upload: that._initProgressListener(o); jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) || that._getXHRPromise(false, o.context)) .done(function (result, textStatus, jqXHR) { ub = that._getUploadedBytes(jqXHR) || (ub + o.chunkSize); // Create a progress event if no final progress event // with loaded equaling total has been triggered // for this chunk: if (currentLoaded + o.chunkSize - o._progress.loaded) { that._onProgress($.Event('progress', { lengthComputable: true, loaded: ub - o.uploadedBytes, total: ub - o.uploadedBytes }), o); } options.uploadedBytes = o.uploadedBytes = ub; o.result = result; o.textStatus = textStatus; o.jqXHR = jqXHR; that._trigger('chunkdone', null, o); that._trigger('chunkalways', null, o); if (ub < fs) { // File upload not yet complete, // continue with the next chunk: upload(); } else { dfd.resolveWith( o.context, [result, textStatus, jqXHR] ); } }) .fail(function (jqXHR, textStatus, errorThrown) { o.jqXHR = jqXHR; o.textStatus = textStatus; o.errorThrown = errorThrown; that._trigger('chunkfail', null, o); that._trigger('chunkalways', null, o); dfd.rejectWith( o.context, [jqXHR, textStatus, errorThrown] ); }); }; this._enhancePromise(promise); promise.abort = function () { return jqXHR.abort(); }; upload(); return promise; }, _beforeSend: function (e, data) { if (this._active === 0) { // the start callback is triggered when an upload starts // and no other uploads are currently running, // equivalent to the global ajaxStart event: this._trigger('start'); // Set timer for global bitrate progress calculation: this._bitrateTimer = new this._BitrateTimer(); // Reset the global progress values: this._progress.loaded = this._progress.total = 0; this._progress.bitrate = 0; } // Make sure the container objects for the .response() and // .progress() methods on the data object are available // and reset to their initial state: this._initResponseObject(data); this._initProgressObject(data); data._progress.loaded = data.loaded = data.uploadedBytes || 0; data._progress.total = data.total = this._getTotal(data.files) || 1; data._progress.bitrate = data.bitrate = 0; this._active += 1; // Initialize the global progress values: this._progress.loaded += data.loaded; this._progress.total += data.total; }, _onDone: function (result, textStatus, jqXHR, options) { var total = options._progress.total, response = options._response; if (options._progress.loaded < total) { // Create a progress event if no final progress event // with loaded equaling total has been triggered: this._onProgress($.Event('progress', { lengthComputable: true, loaded: total, total: total }), options); } response.result = options.result = result; response.textStatus = options.textStatus = textStatus; response.jqXHR = options.jqXHR = jqXHR; this._trigger('done', null, options); }, _onFail: function (jqXHR, textStatus, errorThrown, options) { var response = options._response; if (options.recalculateProgress) { // Remove the failed (error or abort) file upload from // the global progress calculation: this._progress.loaded -= options._progress.loaded; this._progress.total -= options._progress.total; } response.jqXHR = options.jqXHR = jqXHR; response.textStatus = options.textStatus = textStatus; response.errorThrown = options.errorThrown = errorThrown; this._trigger('fail', null, options); }, _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { // jqXHRorResult, textStatus and jqXHRorError are added to the // options object via done and fail callbacks this._trigger('always', null, options); }, _onSend: function (e, data) { if (!data.submit) { this._addConvenienceMethods(e, data); } var that = this, jqXHR, aborted, slot, pipe, options = that._getAJAXSettings(data), send = function () { that._sending += 1; // Set timer for bitrate progress calculation: options._bitrateTimer = new that._BitrateTimer(); jqXHR = jqXHR || ( ((aborted || that._trigger( 'send', $.Event('send', {delegatedEvent: e}), options ) === false) && that._getXHRPromise(false, options.context, aborted)) || that._chunkedUpload(options) || $.ajax(options) ).done(function (result, textStatus, jqXHR) { that._onDone(result, textStatus, jqXHR, options); }).fail(function (jqXHR, textStatus, errorThrown) { that._onFail(jqXHR, textStatus, errorThrown, options); }).always(function (jqXHRorResult, textStatus, jqXHRorError) { that._onAlways( jqXHRorResult, textStatus, jqXHRorError, options ); that._sending -= 1; that._active -= 1; if (options.limitConcurrentUploads && options.limitConcurrentUploads > that._sending) { // Start the next queued upload, // that has not been aborted: var nextSlot = that._slots.shift(); while (nextSlot) { if (that._getDeferredState(nextSlot) === 'pending') { nextSlot.resolve(); break; } nextSlot = that._slots.shift(); } } if (that._active === 0) { // The stop callback is triggered when all uploads have // been completed, equivalent to the global ajaxStop event: that._trigger('stop'); } }); return jqXHR; }; this._beforeSend(e, options); if (this.options.sequentialUploads || (this.options.limitConcurrentUploads && this.options.limitConcurrentUploads <= this._sending)) { if (this.options.limitConcurrentUploads > 1) { slot = $.Deferred(); this._slots.push(slot); pipe = slot.pipe(send); } else { this._sequence = this._sequence.pipe(send, send); pipe = this._sequence; } // Return the piped Promise object, enhanced with an abort method, // which is delegated to the jqXHR object of the current upload, // and jqXHR callbacks mapped to the equivalent Promise methods: pipe.abort = function () { aborted = [undefined, 'abort', 'abort']; if (!jqXHR) { if (slot) { slot.rejectWith(options.context, aborted); } return send(); } return jqXHR.abort(); }; return this._enhancePromise(pipe); } return send(); }, _onAdd: function (e, data) { var that = this, result = true, options = $.extend({}, this.options, data), files = data.files, filesLength = files.length, limit = options.limitMultiFileUploads, limitSize = options.limitMultiFileUploadSize, overhead = options.limitMultiFileUploadSizeOverhead, batchSize = 0, paramName = this._getParamName(options), paramNameSet, paramNameSlice, fileSet, i, j = 0; if (limitSize && (!filesLength || files[0].size === undefined)) { limitSize = undefined; } if (!(options.singleFileUploads || limit || limitSize) || !this._isXHRUpload(options)) { fileSet = [files]; paramNameSet = [paramName]; } else if (!(options.singleFileUploads || limitSize) && limit) { fileSet = []; paramNameSet = []; for (i = 0; i < filesLength; i += limit) { fileSet.push(files.slice(i, i + limit)); paramNameSlice = paramName.slice(i, i + limit); if (!paramNameSlice.length) { paramNameSlice = paramName; } paramNameSet.push(paramNameSlice); } } else if (!options.singleFileUploads && limitSize) { fileSet = []; paramNameSet = []; for (i = 0; i < filesLength; i = i + 1) { batchSize += files[i].size + overhead; if (i + 1 === filesLength || ((batchSize + files[i + 1].size + overhead) > limitSize) || (limit && i + 1 - j >= limit)) { fileSet.push(files.slice(j, i + 1)); paramNameSlice = paramName.slice(j, i + 1); if (!paramNameSlice.length) { paramNameSlice = paramName; } paramNameSet.push(paramNameSlice); j = i + 1; batchSize = 0; } } } else { paramNameSet = paramName; } data.originalFiles = files; $.each(fileSet || files, function (index, element) { var newData = $.extend({}, data); newData.files = fileSet ? element : [element]; newData.paramName = paramNameSet[index]; that._initResponseObject(newData); that._initProgressObject(newData); that._addConvenienceMethods(e, newData); result = that._trigger( 'add', $.Event('add', {delegatedEvent: e}), newData ); return result; }); return result; }, _replaceFileInput: function (input) { var inputClone = input.clone(true); $('
').append(inputClone)[0].reset(); // Detaching allows to insert the fileInput on another form // without losing the file input value: input.after(inputClone).detach(); // Avoid memory leaks with the detached file input: $.cleanData(input.unbind('remove')); // Replace the original file input element in the fileInput // elements set with the clone, which has been copied including // event handlers: this.options.fileInput = this.options.fileInput.map(function (i, el) { if (el === input[0]) { return inputClone[0]; } return el; }); // If the widget has been initialized on the file input itself, // override this.element with the file input clone: if (input[0] === this.element[0]) { this.element = inputClone; } }, _handleFileTreeEntry: function (entry, path) { var that = this, dfd = $.Deferred(), errorHandler = function (e) { if (e && !e.entry) { e.entry = entry; } // Since $.when returns immediately if one // Deferred is rejected, we use resolve instead. // This allows valid files and invalid items // to be returned together in one set: dfd.resolve([e]); }, dirReader; path = path || ''; if (entry.isFile) { if (entry._file) { // Workaround for Chrome bug #149735 entry._file.relativePath = path; dfd.resolve(entry._file); } else { entry.file(function (file) { file.relativePath = path; dfd.resolve(file); }, errorHandler); } } else if (entry.isDirectory) { dirReader = entry.createReader(); dirReader.readEntries(function (entries) { that._handleFileTreeEntries( entries, path + entry.name + '/' ).done(function (files) { dfd.resolve(files); }).fail(errorHandler); }, errorHandler); } else { // Return an empy list for file system items // other than files or directories: dfd.resolve([]); } return dfd.promise(); }, _handleFileTreeEntries: function (entries, path) { var that = this; return $.when.apply( $, $.map(entries, function (entry) { return that._handleFileTreeEntry(entry, path); }) ).pipe(function () { return Array.prototype.concat.apply( [], arguments ); }); }, _getDroppedFiles: function (dataTransfer) { dataTransfer = dataTransfer || {}; var items = dataTransfer.items; if (items && items.length && (items[0].webkitGetAsEntry || items[0].getAsEntry)) { return this._handleFileTreeEntries( $.map(items, function (item) { var entry; if (item.webkitGetAsEntry) { entry = item.webkitGetAsEntry(); if (entry) { // Workaround for Chrome bug #149735: entry._file = item.getAsFile(); } return entry; } return item.getAsEntry(); }) ); } return $.Deferred().resolve( $.makeArray(dataTransfer.files) ).promise(); }, _getSingleFileInputFiles: function (fileInput) { fileInput = $(fileInput); var entries = fileInput.prop('webkitEntries') || fileInput.prop('entries'), files, value; if (entries && entries.length) { return this._handleFileTreeEntries(entries); } files = $.makeArray(fileInput.prop('files')); if (!files.length) { value = fileInput.prop('value'); if (!value) { return $.Deferred().resolve([]).promise(); } // If the files property is not available, the browser does not // support the File API and we add a pseudo File object with // the input value as name with path information removed: files = [{name: value.replace(/^.*\\/, '')}]; } else if (files[0].name === undefined && files[0].fileName) { // File normalization for Safari 4 and Firefox 3: $.each(files, function (index, file) { file.name = file.fileName; file.size = file.fileSize; }); } return $.Deferred().resolve(files).promise(); }, _getFileInputFiles: function (fileInput) { if (!(fileInput instanceof $) || fileInput.length === 1) { return this._getSingleFileInputFiles(fileInput); } return $.when.apply( $, $.map(fileInput, this._getSingleFileInputFiles) ).pipe(function () { return Array.prototype.concat.apply( [], arguments ); }); }, _onChange: function (e) { var that = this, data = { fileInput: $(e.target), form: $(e.target.form) }; this._getFileInputFiles(data.fileInput).always(function (files) { data.files = files; if (that.options.replaceFileInput) { that._replaceFileInput(data.fileInput); } if (that._trigger( 'change', $.Event('change', {delegatedEvent: e}), data ) !== false) { that._onAdd(e, data); } }); }, _onPaste: function (e) { var items = e.originalEvent && e.originalEvent.clipboardData && e.originalEvent.clipboardData.items, data = {files: []}; if (items && items.length) { $.each(items, function (index, item) { var file = item.getAsFile && item.getAsFile(); if (file) { data.files.push(file); } }); if (this._trigger( 'paste', $.Event('paste', {delegatedEvent: e}), data ) !== false) { this._onAdd(e, data); } } }, _onDrop: function (e) { e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; var that = this, dataTransfer = e.dataTransfer, data = {}; if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { e.preventDefault(); this._getDroppedFiles(dataTransfer).always(function (files) { data.files = files; if (that._trigger( 'drop', $.Event('drop', {delegatedEvent: e}), data ) !== false) { that._onAdd(e, data); } }); } }, _onDragOver: function (e) { e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; var dataTransfer = e.dataTransfer; if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 && this._trigger( 'dragover', $.Event('dragover', {delegatedEvent: e}) ) !== false) { e.preventDefault(); dataTransfer.dropEffect = 'copy'; } }, _initEventHandlers: function () { if (this._isXHRUpload(this.options)) { this._on(this.options.dropZone, { dragover: this._onDragOver, drop: this._onDrop }); this._on(this.options.pasteZone, { paste: this._onPaste }); } if ($.support.fileInput) { this._on(this.options.fileInput, { change: this._onChange }); } }, _destroyEventHandlers: function () { this._off(this.options.dropZone, 'dragover drop'); this._off(this.options.pasteZone, 'paste'); this._off(this.options.fileInput, 'change'); }, _setOption: function (key, value) { var reinit = $.inArray(key, this._specialOptions) !== -1; if (reinit) { this._destroyEventHandlers(); } this._super(key, value); if (reinit) { this._initSpecialOptions(); this._initEventHandlers(); } }, _initSpecialOptions: function () { var options = this.options; if (options.fileInput === undefined) { options.fileInput = this.element.is('input[type="file"]') ? this.element : this.element.find('input[type="file"]'); } else if (!(options.fileInput instanceof $)) { options.fileInput = $(options.fileInput); } if (!(options.dropZone instanceof $)) { options.dropZone = $(options.dropZone); } if (!(options.pasteZone instanceof $)) { options.pasteZone = $(options.pasteZone); } }, _getRegExp: function (str) { var parts = str.split('/'), modifiers = parts.pop(); parts.shift(); return new RegExp(parts.join('/'), modifiers); }, _isRegExpOption: function (key, value) { return key !== 'url' && $.type(value) === 'string' && /^\/.*\/[igm]{0,3}$/.test(value); }, _initDataAttributes: function () { var that = this, options = this.options, clone = $(this.element[0].cloneNode(false)); // Initialize options set via HTML5 data-attributes: $.each( clone.data(), function (key, value) { var dataAttributeName = 'data-' + // Convert camelCase to hyphen-ated key: key.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); if (clone.attr(dataAttributeName)) { if (that._isRegExpOption(key, value)) { value = that._getRegExp(value); } options[key] = value; } } ); }, _create: function () { this._initDataAttributes(); this._initSpecialOptions(); this._slots = []; this._sequence = this._getXHRPromise(true); this._sending = this._active = 0; this._initProgressObject(this); this._initEventHandlers(); }, // This method is exposed to the widget API and allows to query // the number of active uploads: active: function () { return this._active; }, // This method is exposed to the widget API and allows to query // the widget upload progress. // It returns an object with loaded, total and bitrate properties // for the running uploads: progress: function () { return this._progress; }, // This method is exposed to the widget API and allows adding files // using the fileupload API. The data parameter accepts an object which // must have a files property and can contain additional options: // .fileupload('add', {files: filesList}); add: function (data) { var that = this; if (!data || this.options.disabled) { return; } if (data.fileInput && !data.files) { this._getFileInputFiles(data.fileInput).always(function (files) { data.files = files; that._onAdd(null, data); }); } else { data.files = $.makeArray(data.files); this._onAdd(null, data); } }, // This method is exposed to the widget API and allows sending files // using the fileupload API. The data parameter accepts an object which // must have a files or fileInput property and can contain additional options: // .fileupload('send', {files: filesList}); // The method returns a Promise object for the file upload call. send: function (data) { if (data && !this.options.disabled) { if (data.fileInput && !data.files) { var that = this, dfd = $.Deferred(), promise = dfd.promise(), jqXHR, aborted; promise.abort = function () { aborted = true; if (jqXHR) { return jqXHR.abort(); } dfd.reject(null, 'abort', 'abort'); return promise; }; this._getFileInputFiles(data.fileInput).always( function (files) { if (aborted) { return; } if (!files.length) { dfd.reject(); return; } data.files = files; jqXHR = that._onSend(null, data).then( function (result, textStatus, jqXHR) { dfd.resolve(result, textStatus, jqXHR); }, function (jqXHR, textStatus, errorThrown) { dfd.reject(jqXHR, textStatus, errorThrown); } ); } ); return this._enhancePromise(promise); } data.files = $.makeArray(data.files); if (data.files.length) { return this._onSend(null, data); } } return this._getXHRPromise(false, data && data.context); } }); })); ocsinventory-server-2.2+dfsg/ocsreports/js/jquery.iframe-transport.js000077500000000000000000000245641303466605000263530ustar00rootroot00000000000000/* * jQuery Iframe Transport Plugin 1.8.2 * https://github.com/blueimp/jQuery-File-Upload * * Copyright 2011, Sebastian Tschan * https://blueimp.net * * Licensed under the MIT license: * http://www.opensource.org/licenses/MIT */ /* global define, window, document */ (function (factory) { 'use strict'; if (typeof define === 'function' && define.amd) { // Register as an anonymous AMD module: define(['jquery'], factory); } else { // Browser globals: factory(window.jQuery); } }(function ($) { 'use strict'; // Helper variable to create unique names for the transport iframes: var counter = 0; // The iframe transport accepts four additional options: // options.fileInput: a jQuery collection of file input fields // options.paramName: the parameter name for the file form data, // overrides the name property of the file input field(s), // can be a string or an array of strings. // options.formData: an array of objects with name and value properties, // equivalent to the return data of .serializeArray(), e.g.: // [{name: 'a', value: 1}, {name: 'b', value: 2}] // options.initialIframeSrc: the URL of the initial iframe src, // by default set to "javascript:false;" $.ajaxTransport('iframe', function (options) { if (options.async) { // javascript:false as initial iframe src // prevents warning popups on HTTPS in IE6: /*jshint scripturl: true */ var initialIframeSrc = options.initialIframeSrc || 'javascript:false;', /*jshint scripturl: false */ form, iframe, addParamChar; return { send: function (_, completeCallback) { form = $('
'); form.attr('accept-charset', options.formAcceptCharset); addParamChar = /\?/.test(options.url) ? '&' : '?'; // XDomainRequest only supports GET and POST: if (options.type === 'DELETE') { options.url = options.url + addParamChar + '_method=DELETE'; options.type = 'POST'; } else if (options.type === 'PUT') { options.url = options.url + addParamChar + '_method=PUT'; options.type = 'POST'; } else if (options.type === 'PATCH') { options.url = options.url + addParamChar + '_method=PATCH'; options.type = 'POST'; } // IE versions below IE8 cannot set the name property of // elements that have already been added to the DOM, // so we set the name along with the iframe HTML markup: counter += 1; iframe = $( '' ).bind('load', function () { var fileInputClones, paramNames = $.isArray(options.paramName) ? options.paramName : [options.paramName]; iframe .unbind('load') .bind('load', function () { var response; // Wrap in a try/catch block to catch exceptions thrown // when trying to access cross-domain iframe contents: try { response = iframe.contents(); // Google Chrome and Firefox do not throw an // exception when calling iframe.contents() on // cross-domain requests, so we unify the response: if (!response.length || !response[0].firstChild) { throw new Error(); } } catch (e) { response = undefined; } // The complete callback returns the // iframe content document as response object: completeCallback( 200, 'success', {'iframe': response} ); // Fix for IE endless progress bar activity bug // (happens on form submits to iframe targets): $('') .appendTo(form); window.setTimeout(function () { // Removing the form in a setTimeout call // allows Chrome's developer tools to display // the response result form.remove(); }, 0); }); form .prop('target', iframe.prop('name')) .prop('action', options.url) .prop('method', options.type); if (options.formData) { $.each(options.formData, function (index, field) { $('') .prop('name', field.name) .val(field.value) .appendTo(form); }); } if (options.fileInput && options.fileInput.length && options.type === 'POST') { fileInputClones = options.fileInput.clone(); // Insert a clone for each file input field: options.fileInput.after(function (index) { return fileInputClones[index]; }); if (options.paramName) { options.fileInput.each(function (index) { $(this).prop( 'name', paramNames[index] || options.paramName ); }); } // Appending the file input fields to the hidden form // removes them from their original location: form .append(options.fileInput) .prop('enctype', 'multipart/form-data') // enctype must be set as encoding for IE: .prop('encoding', 'multipart/form-data'); // Remove the HTML5 form attribute from the input(s): options.fileInput.removeAttr('form'); } form.submit(); // Insert the file input fields at their original location // by replacing the clones with the originals: if (fileInputClones && fileInputClones.length) { options.fileInput.each(function (index, input) { var clone = $(fileInputClones[index]); // Restore the original name and form properties: $(input) .prop('name', clone.prop('name')) .attr('form', clone.attr('form')); clone.replaceWith(input); }); } }); form.append(iframe).appendTo(document.body); }, abort: function () { if (iframe) { // javascript:false as iframe src aborts the request // and prevents warning popups on HTTPS in IE6. // concat is used to avoid the "Script URL" JSLint error: iframe .unbind('load') .prop('src', initialIframeSrc); } if (form) { form.remove(); } } }; } }); // The iframe transport returns the iframe content document as response. // The following adds converters from iframe to text, json, html, xml // and script. // Please note that the Content-Type for JSON responses has to be text/plain // or text/html, if the browser doesn't include application/json in the // Accept header, else IE will show a download dialog. // The Content-Type for XML responses on the other hand has to be always // application/xml or text/xml, so IE properly parses the XML response. // See also // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation $.ajaxSetup({ converters: { 'iframe text': function (iframe) { return iframe && $(iframe[0].body).text(); }, 'iframe json': function (iframe) { return iframe && $.parseJSON($(iframe[0].body).text()); }, 'iframe html': function (iframe) { return iframe && $(iframe[0].body).html(); }, 'iframe xml': function (iframe) { var xmlDoc = iframe && iframe[0]; return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || $(xmlDoc.body).html()); }, 'iframe script': function (iframe) { return iframe && $.globalEval($(iframe[0].body).text()); } } }); })); ocsinventory-server-2.2+dfsg/ocsreports/js/menu.js000077500000000000000000000001471303466605000224730ustar00rootroot00000000000000$(function(){ $(".dropdown-submenu-toggle").click(function (){ window.location = this.href; }); });ocsinventory-server-2.2+dfsg/ocsreports/js/range.js000077500000000000000000000113171303466605000226240ustar00rootroot00000000000000/*----------------------------------------------------------------------------\ | Range Class | |-----------------------------------------------------------------------------| | Created by Erik Arvidsson | | (http://webfx.eae.net/contact.html#erik) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------------------------------------------| | Used to model the data used when working with sliders, scrollbars and | | progress bars. Based on the ideas of the javax.swing.BoundedRangeModel | | interface defined by Sun for Java; http://java.sun.com/products/jfc/ | | swingdoc-api-1.0.3/com/sun/java/swing/BoundedRangeModel.html | |-----------------------------------------------------------------------------| | Copyright (c) 2002, 2005, 2006 Erik Arvidsson | |-----------------------------------------------------------------------------| | Licensed under the Apache License, Version 2.0 (the "License"); you may not | | use this file except in compliance with the License. You may obtain a copy | | of the License at http://www.apache.org/licenses/LICENSE-2.0 | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | Unless required by applicable law or agreed to in writing, software | | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | | License for the specific language governing permissions and limitations | | under the License. | |-----------------------------------------------------------------------------| | 2002-10-14 | Original version released | | 2005-10-27 | Use Math.round instead of Math.floor | | 2006-05-28 | Changed license to Apache Software License 2.0. | |-----------------------------------------------------------------------------| | Created 2002-10-14 | All changes are in the log above. | Updated 2006-05-28 | \----------------------------------------------------------------------------*/ function Range() { this._value = 0; this._minimum = 0; this._maximum = 100; this._extent = 0; this._isChanging = false; } Range.prototype.setValue = function (value) { value = Math.round(parseFloat(value)); if (isNaN(value)) return; if (this._value != value) { if (value + this._extent > this._maximum) this._value = this._maximum - this._extent; else if (value < this._minimum) this._value = this._minimum; else this._value = value; if (!this._isChanging && typeof this.onchange == "function") this.onchange(); } }; Range.prototype.getValue = function () { return this._value; }; Range.prototype.setExtent = function (extent) { if (this._extent != extent) { if (extent < 0) this._extent = 0; else if (this._value + extent > this._maximum) this._extent = this._maximum - this._value; else this._extent = extent; if (!this._isChanging && typeof this.onchange == "function") this.onchange(); } }; Range.prototype.getExtent = function () { return this._extent; }; Range.prototype.setMinimum = function (minimum) { if (this._minimum != minimum) { var oldIsChanging = this._isChanging; this._isChanging = true; this._minimum = minimum; if (minimum > this._value) this.setValue(minimum); if (minimum > this._maximum) { this._extent = 0; this.setMaximum(minimum); this.setValue(minimum) } if (minimum + this._extent > this._maximum) this._extent = this._maximum - this._minimum; this._isChanging = oldIsChanging; if (!this._isChanging && typeof this.onchange == "function") this.onchange(); } }; Range.prototype.getMinimum = function () { return this._minimum; }; Range.prototype.setMaximum = function (maximum) { if (this._maximum != maximum) { var oldIsChanging = this._isChanging; this._isChanging = true; this._maximum = maximum; if (maximum < this._value) this.setValue(maximum - this._extent); if (maximum < this._minimum) { this._extent = 0; this.setMinimum(maximum); this.setValue(this._maximum); } if (maximum < this._minimum + this._extent) this._extent = this._maximum - this._minimum; if (maximum < this._value + this._extent) this._extent = this._maximum - this._value; this._isChanging = oldIsChanging; if (!this._isChanging && typeof this.onchange == "function") this.onchange(); } }; Range.prototype.getMaximum = function () { return this._maximum; }; ocsinventory-server-2.2+dfsg/ocsreports/js/slider.js000077500000000000000000000347501303466605000230200ustar00rootroot00000000000000/*----------------------------------------------------------------------------\ | Slider 1.02 | |-----------------------------------------------------------------------------| | Created by Erik Arvidsson | | (http://webfx.eae.net/contact.html#erik) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------------------------------------------| | A slider control that degrades to an input control for non supported | | browsers. | |-----------------------------------------------------------------------------| | Copyright (c) 2002, 2003, 2006 Erik Arvidsson | |-----------------------------------------------------------------------------| | Licensed under the Apache License, Version 2.0 (the "License"); you may not | | use this file except in compliance with the License. You may obtain a copy | | of the License at http://www.apache.org/licenses/LICENSE-2.0 | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | Unless required by applicable law or agreed to in writing, software | | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | | License for the specific language governing permissions and limitations | | under the License. | |-----------------------------------------------------------------------------| | Dependencies: timer.js - an OO abstraction of timers | | range.js - provides the data model for the slider | | winclassic.css or any other css file describing the look | |-----------------------------------------------------------------------------| | 2002-10-14 | Original version released | | 2003-03-27 | Added a test in the constructor for missing oElement arg | | 2003-11-27 | Only use mousewheel when focused | | 2006-05-28 | Changed license to Apache Software License 2.0. | |-----------------------------------------------------------------------------| | Created 2002-10-14 | All changes are in the log above. | Updated 2006-05-28 | \----------------------------------------------------------------------------*/ Slider.isSupported = typeof document.createElement != "undefined" && typeof document.documentElement != "undefined" && typeof document.documentElement.offsetWidth == "number"; function Slider(oElement, oInput, sOrientation) { if (!oElement) return; this._orientation = sOrientation || "horizontal"; this._range = new Range(); this._range.setExtent(0); this._blockIncrement = 10; this._unitIncrement = 1; this._timer = new Timer(100); if (Slider.isSupported && oElement) { this.document = oElement.ownerDocument || oElement.document; this.element = oElement; this.element.slider = this; this.element.unselectable = "on"; // add class name tag to class name this.element.className = this._orientation + " " + this.classNameTag + " " + this.element.className; // create line this.line = this.document.createElement("DIV"); this.line.className = "line"; this.line.unselectable = "on"; this.line.appendChild(this.document.createElement("DIV")); this.element.appendChild(this.line); // create handle this.handle = this.document.createElement("DIV"); this.handle.className = "handle"; this.handle.unselectable = "on"; this.handle.appendChild(this.document.createElement("DIV")); this.handle.firstChild.appendChild( this.document.createTextNode(String.fromCharCode(160))); this.element.appendChild(this.handle); } this.input = oInput; // events var oThis = this; this._range.onchange = function () { oThis.recalculate(); if (typeof oThis.onchange == "function") oThis.onchange(); }; if (Slider.isSupported && oElement) { this.element.onfocus = Slider.eventHandlers.onfocus; this.element.onblur = Slider.eventHandlers.onblur; this.element.onmousedown = Slider.eventHandlers.onmousedown; this.element.onmouseover = Slider.eventHandlers.onmouseover; this.element.onmouseout = Slider.eventHandlers.onmouseout; this.element.onkeydown = Slider.eventHandlers.onkeydown; this.element.onkeypress = Slider.eventHandlers.onkeypress; this.element.onmousewheel = Slider.eventHandlers.onmousewheel; this.handle.onselectstart = this.element.onselectstart = function () { return false; }; this._timer.ontimer = function () { oThis.ontimer(); }; // extra recalculate for ie window.setTimeout(function() { oThis.recalculate(); }, 1); } else { this.input.onchange = function (e) { oThis.setValue(oThis.input.value); }; } } Slider.eventHandlers = { // helpers to make events a bit easier getEvent: function (e, el) { if (!e) { if (el) e = el.document.parentWindow.event; else e = window.event; } if (!e.srcElement) { var el = e.target; while (el != null && el.nodeType != 1) el = el.parentNode; e.srcElement = el; } if (typeof e.offsetX == "undefined") { e.offsetX = e.layerX; e.offsetY = e.layerY; } return e; }, getDocument: function (e) { if (e.target) return e.target.ownerDocument; return e.srcElement.document; }, getSlider: function (e) { var el = e.target || e.srcElement; while (el != null && el.slider == null) { el = el.parentNode; } if (el) return el.slider; return null; }, getLine: function (e) { var el = e.target || e.srcElement; while (el != null && el.className != "line") { el = el.parentNode; } return el; }, getHandle: function (e) { var el = e.target || e.srcElement; var re = /handle/; while (el != null && !re.test(el.className)) { el = el.parentNode; } return el; }, // end helpers onfocus: function (e) { var s = this.slider; s._focused = true; s.handle.className = "handle hover"; }, onblur: function (e) { var s = this.slider s._focused = false; s.handle.className = "handle"; }, onmouseover: function (e) { e = Slider.eventHandlers.getEvent(e, this); var s = this.slider; if (e.srcElement == s.handle) s.handle.className = "handle hover"; }, onmouseout: function (e) { e = Slider.eventHandlers.getEvent(e, this); var s = this.slider; if (e.srcElement == s.handle && !s._focused) s.handle.className = "handle"; }, onmousedown: function (e) { e = Slider.eventHandlers.getEvent(e, this); var s = this.slider; if (s.element.focus) s.element.focus(); Slider._currentInstance = s; var doc = s.document; if (doc.addEventListener) { doc.addEventListener("mousemove", Slider.eventHandlers.onmousemove, true); doc.addEventListener("mouseup", Slider.eventHandlers.onmouseup, true); } else if (doc.attachEvent) { doc.attachEvent("onmousemove", Slider.eventHandlers.onmousemove); doc.attachEvent("onmouseup", Slider.eventHandlers.onmouseup); doc.attachEvent("onlosecapture", Slider.eventHandlers.onmouseup); s.element.setCapture(); } if (Slider.eventHandlers.getHandle(e)) { // start drag Slider._sliderDragData = { screenX: e.screenX, screenY: e.screenY, dx: e.screenX - s.handle.offsetLeft, dy: e.screenY - s.handle.offsetTop, startValue: s.getValue(), slider: s }; } else { var lineEl = Slider.eventHandlers.getLine(e); s._mouseX = e.offsetX + (lineEl ? s.line.offsetLeft : 0); s._mouseY = e.offsetY + (lineEl ? s.line.offsetTop : 0); s._increasing = null; s.ontimer(); } }, onmousemove: function (e) { e = Slider.eventHandlers.getEvent(e, this); if (Slider._sliderDragData) { // drag var s = Slider._sliderDragData.slider; var boundSize = s.getMaximum() - s.getMinimum(); var size, pos, reset; if (s._orientation == "horizontal") { size = s.element.offsetWidth - s.handle.offsetWidth; pos = e.screenX - Slider._sliderDragData.dx; reset = Math.abs(e.screenY - Slider._sliderDragData.screenY) > 100; } else { size = s.element.offsetHeight - s.handle.offsetHeight; pos = s.element.offsetHeight - s.handle.offsetHeight - (e.screenY - Slider._sliderDragData.dy); reset = Math.abs(e.screenX - Slider._sliderDragData.screenX) > 100; } s.setValue(reset ? Slider._sliderDragData.startValue : s.getMinimum() + boundSize * pos / size); return false; } else { var s = Slider._currentInstance; if (s != null) { var lineEl = Slider.eventHandlers.getLine(e); s._mouseX = e.offsetX + (lineEl ? s.line.offsetLeft : 0); s._mouseY = e.offsetY + (lineEl ? s.line.offsetTop : 0); } } }, onmouseup: function (e) { e = Slider.eventHandlers.getEvent(e, this); var s = Slider._currentInstance; var doc = s.document; if (doc.removeEventListener) { doc.removeEventListener("mousemove", Slider.eventHandlers.onmousemove, true); doc.removeEventListener("mouseup", Slider.eventHandlers.onmouseup, true); } else if (doc.detachEvent) { doc.detachEvent("onmousemove", Slider.eventHandlers.onmousemove); doc.detachEvent("onmouseup", Slider.eventHandlers.onmouseup); doc.detachEvent("onlosecapture", Slider.eventHandlers.onmouseup); s.element.releaseCapture(); } if (Slider._sliderDragData) { // end drag Slider._sliderDragData = null; } else { s._timer.stop(); s._increasing = null; } Slider._currentInstance = null; }, onkeydown: function (e) { e = Slider.eventHandlers.getEvent(e, this); //var s = Slider.eventHandlers.getSlider(e); var s = this.slider; var kc = e.keyCode; switch (kc) { case 33: // page up s.setValue(s.getValue() + s.getBlockIncrement()); break; case 34: // page down s.setValue(s.getValue() - s.getBlockIncrement()); break; case 35: // end s.setValue(s.getOrientation() == "horizontal" ? s.getMaximum() : s.getMinimum()); break; case 36: // home s.setValue(s.getOrientation() == "horizontal" ? s.getMinimum() : s.getMaximum()); break; case 38: // up case 39: // right s.setValue(s.getValue() + s.getUnitIncrement()); break; case 37: // left case 40: // down s.setValue(s.getValue() - s.getUnitIncrement()); break; } if (kc >= 33 && kc <= 40) { return false; } }, onkeypress: function (e) { e = Slider.eventHandlers.getEvent(e, this); var kc = e.keyCode; if (kc >= 33 && kc <= 40) { return false; } }, onmousewheel: function (e) { e = Slider.eventHandlers.getEvent(e, this); var s = this.slider; if (s._focused) { s.setValue(s.getValue() + e.wheelDelta / 120 * s.getUnitIncrement()); // windows inverts this on horizontal sliders. That does not // make sense to me return false; } } }; Slider.prototype.classNameTag = "dynamic-slider-control", Slider.prototype.setValue = function (v) { this._range.setValue(v); this.input.value = this.getValue(); }; Slider.prototype.getValue = function () { return this._range.getValue(); }; Slider.prototype.setMinimum = function (v) { this._range.setMinimum(v); this.input.value = this.getValue(); }; Slider.prototype.getMinimum = function () { return this._range.getMinimum(); }; Slider.prototype.setMaximum = function (v) { this._range.setMaximum(v); this.input.value = this.getValue(); }; Slider.prototype.getMaximum = function () { return this._range.getMaximum(); }; Slider.prototype.setUnitIncrement = function (v) { this._unitIncrement = v; }; Slider.prototype.getUnitIncrement = function () { return this._unitIncrement; }; Slider.prototype.setBlockIncrement = function (v) { this._blockIncrement = v; }; Slider.prototype.getBlockIncrement = function () { return this._blockIncrement; }; Slider.prototype.getOrientation = function () { return this._orientation; }; Slider.prototype.setOrientation = function (sOrientation) { if (sOrientation != this._orientation) { if (Slider.isSupported && this.element) { // add class name tag to class name this.element.className = this.element.className.replace(this._orientation, sOrientation); } this._orientation = sOrientation; this.recalculate(); } }; Slider.prototype.recalculate = function() { if (!Slider.isSupported || !this.element) return; var w = this.element.offsetWidth; var h = this.element.offsetHeight; var hw = this.handle.offsetWidth; var hh = this.handle.offsetHeight; var lw = this.line.offsetWidth; var lh = this.line.offsetHeight; // this assumes a border-box layout if (this._orientation == "horizontal") { this.handle.style.left = (w - hw) * (this.getValue() - this.getMinimum()) / (this.getMaximum() - this.getMinimum()) + "px"; this.handle.style.top = (h - hh) / 2 + "px"; this.line.style.top = (h - lh) / 2 + "px"; this.line.style.left = hw / 2 + "px"; //this.line.style.right = hw / 2 + "px"; this.line.style.width = Math.max(0, w - hw - 2)+ "px"; this.line.firstChild.style.width = Math.max(0, w - hw - 4)+ "px"; } else { this.handle.style.left = (w - hw) / 2 + "px"; this.handle.style.top = h - hh - (h - hh) * (this.getValue() - this.getMinimum()) / (this.getMaximum() - this.getMinimum()) + "px"; this.line.style.left = (w - lw) / 2 + "px"; this.line.style.top = hh / 2 + "px"; this.line.style.height = Math.max(0, h - hh - 2) + "px"; //hard coded border width //this.line.style.bottom = hh / 2 + "px"; this.line.firstChild.style.height = Math.max(0, h - hh - 4) + "px"; //hard coded border width } }; Slider.prototype.ontimer = function () { var hw = this.handle.offsetWidth; var hh = this.handle.offsetHeight; var hl = this.handle.offsetLeft; var ht = this.handle.offsetTop; if (this._orientation == "horizontal") { if (this._mouseX > hl + hw && (this._increasing == null || this._increasing)) { this.setValue(this.getValue() + this.getBlockIncrement()); this._increasing = true; } else if (this._mouseX < hl && (this._increasing == null || !this._increasing)) { this.setValue(this.getValue() - this.getBlockIncrement()); this._increasing = false; } } else { if (this._mouseY > ht + hh && (this._increasing == null || !this._increasing)) { this.setValue(this.getValue() - this.getBlockIncrement()); this._increasing = false; } else if (this._mouseY < ht && (this._increasing == null || this._increasing)) { this.setValue(this.getValue() + this.getBlockIncrement()); this._increasing = true; } } this._timer.start(); };ocsinventory-server-2.2+dfsg/ocsreports/js/timer.js000077500000000000000000000055631303466605000226560ustar00rootroot00000000000000/*----------------------------------------------------------------------------\ | Timer Class | |-----------------------------------------------------------------------------| | Created by Erik Arvidsson | | (http://webfx.eae.net/contact.html#erik) | | For WebFX (http://webfx.eae.net/) | |-----------------------------------------------------------------------------| | Object Oriented Encapsulation of setTimeout fires ontimer when the timer | | is triggered. Does not work in IE 5.00 | |-----------------------------------------------------------------------------| | Copyright (c) 2002, 2006 Erik Arvidsson | |-----------------------------------------------------------------------------| | Licensed under the Apache License, Version 2.0 (the "License"); you may not | | use this file except in compliance with the License. You may obtain a copy | | of the License at http://www.apache.org/licenses/LICENSE-2.0 | | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | | Unless required by applicable law or agreed to in writing, software | | distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | | WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | | License for the specific language governing permissions and limitations | | under the License. | |-----------------------------------------------------------------------------| | 2002-10-14 | Original version released | | 2006-05-28 | Changed license to Apache Software License 2.0. | |-----------------------------------------------------------------------------| | Created 2002-10-14 | All changes are in the log above. | Updated 2006-05-28 | \----------------------------------------------------------------------------*/ function Timer(nPauseTime) { this._pauseTime = typeof nPauseTime == "undefined" ? 1000 : nPauseTime; this._timer = null; this._isStarted = false; } Timer.prototype.start = function () { if (this.isStarted()) this.stop(); var oThis = this; this._timer = window.setTimeout(function () { if (typeof oThis.ontimer == "function") oThis.ontimer(); }, this._pauseTime); this._isStarted = false; }; Timer.prototype.stop = function () { if (this._timer != null) window.clearTimeout(this._timer); this._isStarted = false; }; Timer.prototype.isStarted = function () { return this._isStarted; }; Timer.prototype.getPauseTime = function () { return this._pauseTime; }; Timer.prototype.setPauseTime = function (nPauseTime) { this._pauseTime = nPauseTime; };ocsinventory-server-2.2+dfsg/ocsreports/js/tooltip.js000077500000000000000000000024201303466605000232150ustar00rootroot00000000000000/* * * tx to Damien ALEXANDRE * http://damienalexandre.fr/Info-Bulle-en-Javascript.html * * * */ var i=false; // visible or not? function GetId(id) { return document.getElementById(id); } function move(e) { if(i) { // calcul the position if (navigator.appName!="Microsoft Internet Explorer") { // IE or other? GetId("mouse_pointer").style.left=e.pageX + 5+"px"; GetId("mouse_pointer").style.top=e.pageY + 10+"px"; } else { // TeDeum Modif if(document.documentElement.clientWidth>0) { GetId("mouse_pointer").style.left=20+event.x+document.documentElement.scrollLeft+"px"; GetId("mouse_pointer").style.top=10+event.y+document.documentElement.scrollTop+"px"; } else { GetId("mouse_pointer").style.left=20+event.x+document.body.scrollLeft+"px"; GetId("mouse_pointer").style.top=10+event.y+document.body.scrollTop+"px"; } } } } function show_me(text) { if(i==false) { GetId("mouse_pointer").style.visibility="visible"; // show tooltip. GetId("mouse_pointer").innerHTML = text; // copy the text in html i=true; } } function hidden_me() { if(i==true) { GetId("mouse_pointer").style.visibility="hidden"; // hidden tooltip i=false; } } document.onmousemove=move; // when mouse move, calcul again the mouse pointer. //--> ocsinventory-server-2.2+dfsg/ocsreports/libraries/000077500000000000000000000000001303466605000225245ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/libraries/gz.php000077500000000000000000000026251303466605000236650ustar00rootroot00000000000000// ocsinventory-server-2.2+dfsg/ocsreports/libraries/password_compat/000077500000000000000000000000001303466605000257315ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/libraries/password_compat/LICENSE.md000066400000000000000000000020421303466605000273330ustar00rootroot00000000000000Copyright (c) 2012 Anthony Ferrara Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.ocsinventory-server-2.2+dfsg/ocsreports/libraries/password_compat/README.md000066400000000000000000000071331303466605000272140ustar00rootroot00000000000000password_compat =============== [![Build Status](https://travis-ci.org/ircmaxell/password_compat.png?branch=master)](https://travis-ci.org/ircmaxell/password_compat) This library is intended to provide forward compatibility with the [password_*](http://php.net/password) functions being worked on for PHP 5.5. See [the RFC](https://wiki.php.net/rfc/password_hash) for more detailed information. Requirements ============ This library requires `PHP >= 5.3.7` OR a version that has the `$2y` fix backported into it (such as RedHat provides). Note that Debian's 5.3.3 version is **NOT** supported. The runtime checks have been removed due to this version issue. To see if password_compat is available for your system, run the included `version-test.php`. If it outputs "Pass", you can safely use the library. If not, you cannot. If you attempt to use password-compat on an unsupported version, attempts to create or verify hashes will return `false`. You have been warned! The reason for this is that PHP prior to 5.3.7 contains a [security issue with its BCRYPT implementation](http://php.net/security/crypt_blowfish.php). Therefore, it's highly recommended that you upgrade to a newer version of PHP prior to using this layer. Installation ============ To install, simply `require` the `password.php` file under `lib`. You can also install it via `Composer` by using the [Packagist archive](http://packagist.org/packages/ircmaxell/password-compat). Usage ===== **Creating Password Hashes** To create a password hash from a password, simply use the `password_hash` function. ````PHP $hash = password_hash($password, PASSWORD_BCRYPT); ```` Note that the algorithm that we chose is `PASSWORD_BCRYPT`. That's the current strongest algorithm supported. This is the `BCRYPT` crypt algorithm. It produces a 60 character hash as the result. `BCRYPT` also allows for you to define a `cost` parameter in the options array. This allows for you to change the CPU cost of the algorithm: ````PHP $hash = password_hash($password, PASSWORD_BCRYPT, array("cost" => 10)); ```` That's the same as the default. The cost can range from `4` to `31`. I would suggest that you use the highest cost that you can, while keeping response time reasonable (I target between 0.1 and 0.5 seconds for a hash, depending on use-case). Another algorithm name is supported: ````PHP PASSWORD_DEFAULT ```` This will use the strongest algorithm available to PHP at the current time. Presently, this is the same as specifying `PASSWORD_BCRYPT`. But in future versions of PHP, it may be updated to use a stronger algorithm if one is introduced. It can also be changed if a problem is identified with the BCRYPT algorithm. Note that if you use this option, you are **strongly** encouraged to store it in a `VARCHAR(255)` column to avoid truncation issues if a future algorithm increases the length of the generated hash. It is very important that you should check the return value of `password_hash` prior to storing it, because a `false` may be returned if it encountered an error. **Verifying Password Hashes** To verify a hash created by `password_hash`, simply call: ````PHP if (password_verify($password, $hash)) { /* Valid */ } else { /* Invalid */ } ```` That's all there is to it. **Rehashing Passwords** From time to time you may update your hashing parameters (algorithm, cost, etc). So a function to determine if rehashing is necessary is available: ````PHP if (password_verify($password, $hash)) { if (password_needs_rehash($hash, $algorithm, $options)) { $hash = password_hash($password, $algorithm, $options); /* Store new hash in db */ } } ```` ocsinventory-server-2.2+dfsg/ocsreports/libraries/password_compat/password.php000077500000000000000000000302131303466605000303060ustar00rootroot00000000000000 * @license http://www.opensource.org/licenses/mit-license.html MIT License * @copyright 2012 The Authors */ namespace { if (!defined('PASSWORD_BCRYPT')) { /** * PHPUnit Process isolation caches constants, but not function declarations. * So we need to check if the constants are defined separately from * the functions to enable supporting process isolation in userland * code. */ define('PASSWORD_BCRYPT', 1); define('PASSWORD_DEFAULT', PASSWORD_BCRYPT); define('PASSWORD_BCRYPT_DEFAULT_COST', 10); } if (!function_exists('password_hash')) { /** * Hash the password using the specified algorithm * * @param string $password The password to hash * @param int $algo The algorithm to use (Defined by PASSWORD_* constants) * @param array $options The options for the algorithm to use * * @return string|false The hashed password, or false on error. */ function password_hash($password, $algo, array $options = array()) { if (!function_exists('crypt')) { trigger_error("Crypt must be loaded for password_hash to function", E_USER_WARNING); return null; } if (is_null($password) || is_int($password)) { $password = (string) $password; } if (!is_string($password)) { trigger_error("password_hash(): Password must be a string", E_USER_WARNING); return null; } if (!is_int($algo)) { trigger_error("password_hash() expects parameter 2 to be long, " . gettype($algo) . " given", E_USER_WARNING); return null; } $resultLength = 0; switch ($algo) { case PASSWORD_BCRYPT: $cost = PASSWORD_BCRYPT_DEFAULT_COST; if (isset($options['cost'])) { $cost = $options['cost']; if ($cost < 4 || $cost > 31) { trigger_error(sprintf("password_hash(): Invalid bcrypt cost parameter specified: %d", $cost), E_USER_WARNING); return null; } } // The length of salt to generate $raw_salt_len = 16; // The length required in the final serialization $required_salt_len = 22; $hash_format = sprintf("$2y$%02d$", $cost); // The expected length of the final crypt() output $resultLength = 60; break; default: trigger_error(sprintf("password_hash(): Unknown password hashing algorithm: %s", $algo), E_USER_WARNING); return null; } $salt_requires_encoding = false; if (isset($options['salt'])) { switch (gettype($options['salt'])) { case 'NULL': case 'boolean': case 'integer': case 'double': case 'string': $salt = (string) $options['salt']; break; case 'object': if (method_exists($options['salt'], '__tostring')) { $salt = (string) $options['salt']; break; } case 'array': case 'resource': default: trigger_error('password_hash(): Non-string salt parameter supplied', E_USER_WARNING); return null; } if (PasswordCompat\binary\_strlen($salt) < $required_salt_len) { trigger_error(sprintf("password_hash(): Provided salt is too short: %d expecting %d", PasswordCompat\binary\_strlen($salt), $required_salt_len), E_USER_WARNING); return null; } elseif (0 == preg_match('#^[a-zA-Z0-9./]+$#D', $salt)) { $salt_requires_encoding = true; } } else { $buffer = ''; $buffer_valid = false; if (function_exists('mcrypt_create_iv') && !defined('PHALANGER')) { $buffer = mcrypt_create_iv($raw_salt_len, MCRYPT_DEV_URANDOM); if ($buffer) { $buffer_valid = true; } } if (!$buffer_valid && function_exists('openssl_random_pseudo_bytes')) { $buffer = openssl_random_pseudo_bytes($raw_salt_len); if ($buffer) { $buffer_valid = true; } } if (!$buffer_valid && @is_readable('/dev/urandom')) { $f = fopen('/dev/urandom', 'r'); $read = PasswordCompat\binary\_strlen($buffer); while ($read < $raw_salt_len) { $buffer .= fread($f, $raw_salt_len - $read); $read = PasswordCompat\binary\_strlen($buffer); } fclose($f); if ($read >= $raw_salt_len) { $buffer_valid = true; } } if (!$buffer_valid || PasswordCompat\binary\_strlen($buffer) < $raw_salt_len) { $bl = PasswordCompat\binary\_strlen($buffer); for ($i = 0; $i < $raw_salt_len; $i++) { if ($i < $bl) { $buffer[$i] = $buffer[$i] ^ chr(mt_rand(0, 255)); } else { $buffer .= chr(mt_rand(0, 255)); } } } $salt = $buffer; $salt_requires_encoding = true; } if ($salt_requires_encoding) { // encode string with the Base64 variant used by crypt $base64_digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; $bcrypt64_digits = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; $base64_string = base64_encode($salt); $salt = strtr(rtrim($base64_string, '='), $base64_digits, $bcrypt64_digits); } $salt = PasswordCompat\binary\_substr($salt, 0, $required_salt_len); $hash = $hash_format . $salt; $ret = crypt($password, $hash); if (!is_string($ret) || PasswordCompat\binary\_strlen($ret) != $resultLength) { return false; } return $ret; } /** * Get information about the password hash. Returns an array of the information * that was used to generate the password hash. * * array( * 'algo' => 1, * 'algoName' => 'bcrypt', * 'options' => array( * 'cost' => PASSWORD_BCRYPT_DEFAULT_COST, * ), * ) * * @param string $hash The password hash to extract info from * * @return array The array of information about the hash. */ function password_get_info($hash) { $return = array( 'algo' => 0, 'algoName' => 'unknown', 'options' => array(), ); if (PasswordCompat\binary\_substr($hash, 0, 4) == '$2y$' && PasswordCompat\binary\_strlen($hash) == 60) { $return['algo'] = PASSWORD_BCRYPT; $return['algoName'] = 'bcrypt'; list($cost) = sscanf($hash, "$2y$%d$"); $return['options']['cost'] = $cost; } return $return; } /** * Determine if the password hash needs to be rehashed according to the options provided * * If the answer is true, after validating the password using password_verify, rehash it. * * @param string $hash The hash to test * @param int $algo The algorithm used for new password hashes * @param array $options The options array passed to password_hash * * @return boolean True if the password needs to be rehashed. */ function password_needs_rehash($hash, $algo, array $options = array()) { $info = password_get_info($hash); if ($info['algo'] != $algo) { return true; } switch ($algo) { case PASSWORD_BCRYPT: $cost = isset($options['cost']) ? $options['cost'] : PASSWORD_BCRYPT_DEFAULT_COST; if ($cost != $info['options']['cost']) { return true; } break; } return false; } /** * Verify a password against a hash using a timing attack resistant approach * * @param string $password The password to verify * @param string $hash The hash to verify against * * @return boolean If the password matches the hash */ function password_verify($password, $hash) { if (!function_exists('crypt')) { trigger_error("Crypt must be loaded for password_verify to function", E_USER_WARNING); return false; } $ret = crypt($password, $hash); if (!is_string($ret) || PasswordCompat\binary\_strlen($ret) != PasswordCompat\binary\_strlen($hash) || PasswordCompat\binary\_strlen($ret) <= 13) { return false; } $status = 0; for ($i = 0; $i < PasswordCompat\binary\_strlen($ret); $i++) { $status |= (ord($ret[$i]) ^ ord($hash[$i])); } return $status === 0; } } } namespace PasswordCompat\binary { if (!function_exists('PasswordCompat\\binary\\_strlen')) { /** * Count the number of bytes in a string * * We cannot simply use strlen() for this, because it might be overwritten by the mbstring extension. * In this case, strlen() will count the number of *characters* based on the internal encoding. A * sequence of bytes might be regarded as a single multibyte character. * * @param string $binary_string The input string * * @internal * @return int The number of bytes */ function _strlen($binary_string) { if (function_exists('mb_strlen')) { return mb_strlen($binary_string, '8bit'); } return strlen($binary_string); } /** * Get a substring based on byte limits * * @see _strlen() * * @param string $binary_string The input string * @param int $start * @param int $length * * @internal * @return string The substring */ function _substr($binary_string, $start, $length) { if (function_exists('mb_substr')) { return mb_substr($binary_string, $start, $length, '8bit'); } return substr($binary_string, $start, $length); } /** * Check if current PHP version is compatible with the library * * @return boolean the check result */ function check() { static $pass = NULL; if (is_null($pass)) { if (function_exists('crypt')) { $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG'; $test = crypt("password", $hash); $pass = $test == $hash; } else { $pass = false; } } return $pass; } } }ocsinventory-server-2.2+dfsg/ocsreports/plugins/000077500000000000000000000000001303466605000222315ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/000077500000000000000000000000001303466605000254115ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_admininfo/000077500000000000000000000000001303466605000300235ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_admininfo/cd_admininfo.php000077500000000000000000000250261303466605000331560ustar00rootroot00000000000000getConfigValue('ACCOUNTINFO') == 'YES' and isset($_SESSION['OCS']['ADMIN']['ACCOUNTINFO'])) $admin_accountinfo=true; $list_tab=find_all_account_tab('TAB_ACCOUNTAG','COMPUTERS',1); if ($list_tab != ''){ if ($protectedPost['Valid_modif'] != ""){ if (!isset($protectedPost['onglet']) or $protectedPost['onglet'] == '' or ! is_numeric($protectedPost['onglet'])) $protectedPost['onglet'] = $list_tab['FIRST']; $sql_admin_info = "select ID, NAME_ACCOUNTINFO from accountinfo_config where ID_TAB = %s and account_type='COMPUTERS' order by SHOW_ORDER ASC"; $arg_admin_info = array($protectedPost['onglet']); $res_admin_info = mysql2_query_secure($sql_admin_info, $_SESSION['OCS']["readServer"], $arg_admin_info); while ( $val_admin_info = mysqli_fetch_array($res_admin_info) ) { if ($val_admin_info['NAME_ACCOUNTINFO']) { $data_fields_account[$val_admin_info['NAME_ACCOUNTINFO']] = ""; } else { $data_fields_account["fields_" . $val_admin_info["ID"]] = ""; } } foreach ($protectedPost as $field=>$value){ $temp_field=explode('_',$field); if (array_key_exists( $temp_field[0] . '_' . $temp_field[1],$info_account_id) or $temp_field[0] == 'TAG'){ //cas of checkbox if (isset($temp_field[2])){ $data_fields_account[$temp_field[0] . "_" . $temp_field[1]].=$temp_field[2] . "&&&"; } else $data_fields_account[$field]=$value; } } updateinfo_computer($systemid,$data_fields_account); //search all admininfo for this computer $info_account_id=admininfo_computer($systemid); } unset($action_updown); //UP/DOWN if ((isset($protectedPost['UP']) and $protectedPost['UP'] != '')) $action_updown='UP'; if (isset($protectedPost['DOWN']) and $protectedPost['DOWN'] != '') $action_updown='DOWN'; if (isset($action_updown)){ $new_order=find_new_order($action_updown,$protectedPost[$action_updown],'COMPUTERS',$protectedPost['onglet']); if ($new_order){ // $array_info_account=find_info_accountinfo($new_order['NEW']); update_accountinfo_config($new_order['OLD'],array('SHOW_ORDER'=>$new_order['NEW_VALUE'])); update_accountinfo_config($new_order['NEW'],array('SHOW_ORDER'=>$new_order['OLD_VALUE'])); } } if (!isset($protectedPost['onglet']) or $protectedPost['onglet'] =='' or !is_numeric($protectedPost['onglet'])) $protectedPost['onglet'] = $list_tab['FIRST']; unset($list_tab['FIRST']); echo open_form($form_name); if (!$show_all_column){ onglet($list_tab,$form_name,"onglet",6); $sql_admin_info="select ID,TYPE,NAME,COMMENT,NAME_ACCOUNTINFO,SHOW_ORDER,DEFAULT_VALUE from accountinfo_config where ID_TAB = %s and account_type='COMPUTERS' order by SHOW_ORDER ASC"; $arg_admin_info=array($protectedPost['onglet']); }else{ $sql_admin_info="select ID,TYPE,NAME,COMMENT,NAME_ACCOUNTINFO,SHOW_ORDER,DEFAULT_VALUE from accountinfo_config where account_type='%s' order by SHOW_ORDER ASC"; $arg_admin_info=array('COMPUTERS'); } echo '
'; if ($_SESSION['OCS']['profile']->getConfigValue('ACCOUNTINFO') == 'YES' and !$show_all_column){ $show_admin_button = ""; if (isset($_SESSION['OCS']['ADMIN']['ACCOUNTINFO'])) $show_admin_button .= ""; else $show_admin_button .= ""; }else $show_admin_button=''; $res_admin_info=mysql2_query_secure($sql_admin_info,$_SESSION['OCS']["readServer"],$arg_admin_info); $num_row=mysqli_num_rows($res_admin_info); $name_field=array(); $tab_name=array(); $type_field=array(); $value_field=array(); $config['COMMENT_AFTER']=array(); $config['SELECT_DEFAULT']=array(); $config['JAVASCRIPT']=array(); $config['SIZE']=array(); $config['DDE']=array(); $nb_row=1; while ($val_admin_info = mysqli_fetch_array( $res_admin_info )){ array_push($config['DDE'],$systemid); //if name_accountinfo is not null //column name in accountinfo table is name_accountinfo //functionality for compatibility with older version of OCS //we can't change the name TAG in accountinfo table if ($val_admin_info['NAME_ACCOUNTINFO'] != '') $name_accountinfo=trim($val_admin_info['NAME_ACCOUNTINFO']); else $name_accountinfo='fields_' . $val_admin_info['ID']; $up_png=""; if ($nb_row!=1) $up_png.=updown($val_admin_info['ID'],'UP'); if ($nb_row!=$num_row) $up_png.=updown($val_admin_info['ID'],'DOWN'); if ($val_admin_info['TYPE'] == 2 or $val_admin_info['TYPE'] == 4 or $val_admin_info['TYPE'] == 7 ){ array_push($config['JAVASCRIPT'],''); array_push($config['SIZE'],''); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png . ""); else array_push($config['COMMENT_AFTER'],''); array_push($config['SELECT_DEFAULT'],'YES'); $field_select_values=find_value_field("ACCOUNT_VALUE_".$val_admin_info['NAME']); //cas of checkbox if ($val_admin_info['TYPE'] == 4){ $temp_val=explode('&&&',$info_account_id[$name_accountinfo]); $i=0; $tp_readonly=""; while (isset($temp_val[$i]) and $temp_val[$i] != ''){ if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') == "YES"){ $protectedPost[$name_accountinfo . '_' . $temp_val[$i]]='on'; }else{ $tp_readonly .= $field_select_values[$temp_val[$i]].";"; } $i++; } if($tp_readonly != ''){ array_push($value_field,substr($tp_readonly,0,-1)); }else{ array_push($value_field,$field_select_values); } }else{ $protectedPost[$name_accountinfo]=$info_account_id[$name_accountinfo]; if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') == "YES") array_push($value_field,$field_select_values); else array_push($value_field,$field_select_values[$protectedPost[$name_accountinfo]]); } }elseif ($val_admin_info['TYPE'] == 6){ array_push($value_field,$info_account_id[$name_accountinfo]); if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') == "YES"){ if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png . datePick($name_accountinfo)); else array_push($config['COMMENT_AFTER'],datePick($name_accountinfo)); array_push($config['JAVASCRIPT'],"READONLY ".dateOnClick($name_accountinfo)); array_push($config['SELECT_DEFAULT'],''); array_push($config['SIZE'],'8'); } }elseif ($val_admin_info['TYPE'] == 5){ array_push($value_field,"accountinfo"); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png); else array_push($config['COMMENT_AFTER'],""); array_push($config['SELECT_DEFAULT'],''); array_push($config['JAVASCRIPT'],''); array_push($config['SIZE'],''); }elseif ($val_admin_info['TYPE'] == 8){ //QRCODE array_push($value_field,$info_account_id[$name_accountinfo]); if ($admin_accountinfo){ array_push($config['COMMENT_AFTER'],$up_png); }else array_push($config['COMMENT_AFTER'],""); array_push($config['SELECT_DEFAULT'],"index.php?".PAG_INDEX."=".$pages_refs['ms_qrcode']."&no_header=1&default_value=".$val_admin_info['DEFAULT_VALUE']."&systemid=".$protectedGet['systemid']); array_push($config['JAVASCRIPT'],"onclick=window.open(\"index.php?".PAG_INDEX."=".$pages_refs['ms_qrcode']."&no_header=1&default_value=".$val_admin_info['DEFAULT_VALUE']."&systemid=".$protectedGet['systemid']."\")"); array_push($config['SIZE'],'width=80 height=80'); }else{ array_push($value_field,$info_account_id[$name_accountinfo]); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png); else array_push($config['COMMENT_AFTER'],""); array_push($config['SELECT_DEFAULT'],''); array_push($config['JAVASCRIPT'],''); array_push($config['SIZE'],''); } array_push($name_field,$name_accountinfo); array_push($tab_name,$val_admin_info['COMMENT']); if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') == "YES") array_push($type_field,$convert_type[$val_admin_info['TYPE']]); else array_push($type_field,3); $nb_row++; } $tab_typ_champ=show_field($name_field,$type_field,$value_field,$config); if ($_SESSION['OCS']['profile']->getConfigValue('ACCOUNTINFO') == 'YES') $tab_hidden=array('ADMIN'=>'','UP'=>'','DOWN'=>''); //echo ""; if ($show_all_column or $admin_accountinfo) $showbutton=false; else $showbutton=true; if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') != "YES") $showbutton=false; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'show_button' => $showbutton, 'form_name' => $form_name='NO_FORM', 'top_action' => $show_admin_button, 'show_frame' => false )); echo '
'; echo close_form(); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_bios/000077500000000000000000000000001303466605000270135ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_bios/cd_bios.php000077500000000000000000000057221303466605000311370ustar00rootroot00000000000000g(273)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; if ($protectedPost['OTHER_BIS'] != ''){ $sql="INSERT INTO blacklist_serials (SERIAL) value ('%s')"; $arg=array($protectedPost['OTHER_BIS']); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); } if ($protectedPost['OTHER'] != ''){ $sql="DELETE FROM blacklist_serials WHERE SERIAL='%s'"; $arg=array($protectedPost['OTHER']); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); } echo open_form($form_name); $list_fields=array($l->g(36) => 'SSN', $l->g(64) => 'SMANUFACTURER', $l->g(65) => 'SMODEL', $l->g(66) => 'TYPE', $l->g(284) => 'BMANUFACTURER', $l->g(209) => 'BVERSION', $l->g(210) => 'BDATE', $l->g(216) => 'ASSETTAG', $l->g(1382) => 'MSN', $l->g(1383) => 'MMANUFACTURER', $l->g(1384) => 'MMODEL', ); $sql="select SSN from bios WHERE (hardware_id=%s)"; $arg=array($systemid); $resultDetails = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $item = mysqli_fetch_object($resultDetails); $sql="select ID from blacklist_serials where SERIAL='%s'"; $arg=array($item->SSN); $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); if ($_SESSION['OCS']['ADMIN_BLACKLIST']['SERIAL']=='YES'){ if ( mysqli_num_rows($result) == 1 ){ $tab_options['OTHER'][$l->g(36)][$item->SSN]=$item->SSN; $tab_options['OTHER']['IMG']='image/red.png'; }else{ $tab_options['OTHER_BIS'][$l->g(36)][$item->SSN]=$item->SSN; $tab_options['OTHER_BIS']['IMG']='image/green.png'; } } if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del[$l->g(36)]=$l->g(36); $default_fields= $list_fields; $queryDetails = "SELECT "; foreach ($list_fields as $lbl=>$value){ $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1)." FROM bios WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_comments/000077500000000000000000000000001303466605000277045ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_comments/cd_comments.php000077500000000000000000000124531303466605000327200ustar00rootroot00000000000000g(1128); $list_fields=array(); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $tab_options=$protectedPost; print_item_header($l->g(1128)); $form_name="affich_notes"; $table_name=$form_name; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); //delete a list of notes if ($protectedPost['del_check'] != ''){ $arg_sql=array(); $sql="update itmgmt_comments set visible=0 where id in "; $sql=mysql2_prepare($sql,$arg_sql,$protectedPost['del_check']); mysql2_query_secure($sql['SQL'], $_SESSION['OCS']["writeServer"],$sql['ARG'],'DEL_NOTES'); //update table cache $tab_options['CACHE']='RESET'; } if ($protectedPost['SUP_PROF'] != '' and isset($protectedPost['SUP_PROF'])){ $sql="update itmgmt_comments set visible=0 where id=%s"; $arg=array($protectedPost['SUP_PROF']); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg,'DEL_NOTE'); //update table cache $tab_options['CACHE']='RESET'; } if ($protectedPost['Valid_modif'] != '' and isset($protectedPost['Valid_modif'])){ //ajout de note if (trim($protectedPost['NOTE']) != '' and isset($protectedPost['NOTE'])){ $sql="insert into itmgmt_comments (HARDWARE_ID,DATE_INSERT,USER_INSERT,COMMENTS,ACTION) value (%s,%s,'%s','%s','%s')"; $arg=array($systemid,"sysdate()",$_SESSION['OCS']["loggeduser"],$protectedPost['NOTE'],"ADD_NOTE_BY_USER"); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg,'ADD_NOTE_BY_USER'); unset($protectedPost['NOTE']); //regénération du cache $tab_options['CACHE']='RESET'; }elseif (trim($protectedPost['NOTE_MODIF']) != '' and isset($protectedPost['NOTE_MODIF'])){ $sql="update itmgmt_comments set COMMENTS='%s'"; $arg=array($protectedPost['NOTE_MODIF']); if (!strstr($protectedPost['USER_INSERT'], $_SESSION['OCS']["loggeduser"])){ $sql.=" , USER_INSERT = '%s/%s'"; array_push($arg,$protectedPost['USER_INSERT'],$_SESSION['OCS']["loggeduser"]); } $sql.=" where id=%s"; array_push($arg,$protectedPost['ID_MODIF']); $lbl_log.= " Old Comments=".$protectedPost['OLD_COMMENTS']; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg,'UPDATE_NOTE'); //regénération du cache $tab_options['CACHE']='RESET'; } } if ($protectedPost['ADD_NOTE']){ $tab_name[1]=$l->g(1126).": "; $tab_name[2]=$l->g(1127).": "; $tab_name[3]=$l->g(1128).": "; $tab_typ_champ[1]['DEFAULT_VALUE']=date("d/m/Y"); $tab_typ_champ[2]['DEFAULT_VALUE']=$_SESSION['OCS']["loggeduser"]; $tab_typ_champ[1]['INPUT_TYPE']=3; $tab_typ_champ[2]['INPUT_TYPE']=3; $tab_typ_champ[3]['INPUT_NAME']='NOTE'; $tab_typ_champ[3]['INPUT_TYPE']=1; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden); } $queryDetails = "SELECT ID,DATE_INSERT,USER_INSERT,COMMENTS,ACTION FROM itmgmt_comments WHERE (visible is null or visible =1) and hardware_id=$systemid"; $list_fields=array($l->g(1126) => 'DATE_INSERT', $l->g(899) => 'USER_INSERT', $l->g(51) => 'COMMENTS', $l->g(443)=>'ACTION'); if (!$show_all_column){ $list_fields['MODIF']='ID'; $list_fields['SUP']='ID'; $list_fields['CHECK']='ID'; } $list_col_cant_del=$list_fields; $default_fields= $list_fields; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if (!$show_all_column){ echo ""; del_selection($form_name); } if (isset($protectedPost['MODIF']) and $protectedPost['MODIF'] != ''){ $queryDetails = "SELECT ID,DATE_INSERT,USER_INSERT,COMMENTS,ACTION FROM itmgmt_comments WHERE id=%s"; $argDetail=array($protectedPost['MODIF']); $resultDetails = mysql2_query_secure($queryDetails, $_SESSION['OCS']["readServer"],$argDetail); $item=mysqli_fetch_array($resultDetails,MYSQL_ASSOC); $tab_name[1]= $l->g(1126) . ": "; $tab_name[2]= $l->g(1127) . ": "; $tab_name[3]= $l->g(1128) . ": "; $tab_typ_champ[1]['DEFAULT_VALUE']=$item['DATE_INSERT']; $tab_typ_champ[2]['DEFAULT_VALUE']=$item['USER_INSERT']; $tab_typ_champ[3]['DEFAULT_VALUE']=$item['COMMENTS']; $tab_typ_champ[1]['INPUT_TYPE']=3; $tab_typ_champ[2]['INPUT_TYPE']=3; $tab_typ_champ[3]['INPUT_NAME']='NOTE_MODIF'; $tab_typ_champ[3]['INPUT_TYPE']=1; $tab_hidden['USER_INSERT']=$item['USER_INSERT']; $tab_hidden['ID_MODIF']=$protectedPost['MODIF']; $tab_hidden['OLD_COMMENTS']=$item['COMMENTS']; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden); } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_configuration/000077500000000000000000000000001303466605000307265ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_configuration/affect_again.php000077500000000000000000000036451303466605000340410ustar00rootroot00000000000000g(584); $choise_req_selection['SEL']=$l->g(585); $select_choise=show_modif($choise_req_selection,'CHOISE',2,$form_name); } echo ""; if ($protectedPost['CHOISE'] == 'REQ' or $protectedGet['idchecked'] == '' or $protectedPost['CHOISE'] == ''){ echo $l->g(901); $list_id=$_SESSION['OCS']['ID_REQ']; } if ($protectedPost['CHOISE'] == 'SEL'){ echo $l->g(902); $list_id=$protectedGet['idchecked']; } //gestion tableau if (is_array($list_id)) $list_id=implode(",", $list_id); }else $list_id=$protectedGet['idchecked']; echo ""; if (strpos($protectedGet['img'], "config_search.png")) include ("opt_param.php"); if (strpos($protectedGet['img'], "groups_search.png")) include ("opt_groups.php"); if (strpos($protectedGet['img'], "tele_search.png")) include ("opt_pack.php"); if (strpos($protectedGet['img'], "delete.png")) include ("opt_sup.php"); ?> cd_configuration.php000077500000000000000000000317061303466605000347070ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_configuration3 mounths if (isset($protectedGet['reset_notified']) and is_numeric($protectedGet['reset_notified'])){ desactive_packet($systemid,$protectedGet['reset_notified']); } //affect again a packet if ($protectedPost['Valid_modif']){ if (trim($protectedPost['MOTIF'])){ if ($protectedPost["ACTION"] == "again"){ //delete all info of specific teledeploy desactive_download_option($systemid,$protectedGet['affect_again']); active_option('DOWNLOAD',$systemid,$protectedGet['affect_again']); }elseif($protectedPost["ACTION"] == "reset"){ desactive_packet($systemid,$protectedGet['affect_reset']); } mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); if (mysqli_affected_rows($_SESSION['OCS']["writeServer"]) != 0){ $sql="INSERT INTO itmgmt_comments (hardware_id,comments,user_insert,date_insert,action) values ('%s','%s','%s',%s,'%s => %s')"; $arg=array($systemid,$protectedPost['MOTIF'],$_SESSION['OCS']["loggeduser"], "sysdate()",$protectedPost["ACTION"],$protectedPost['NAME_PACK']); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } }else msg_error($l->g(903)); } if ($protectedPost['Reset_modif']) unset($protectedGet['affect_again'],$protectedGet['affect_reset']); if ($protectedGet['affect_again'] or $protectedGet['affect_reset']){ if ($protectedGet['affect_again']){ $id_pack_affect=$protectedGet['affect_again']; $hidden_action='again'; $title_action=$l->g(904); $lbl_action=$l->g(905); }else{ $id_pack_affect=$protectedGet['affect_reset']; $hidden_action='reset'; $title_action=$l->g(906); $lbl_action=$l->g(907); } $sql="select da.name from devices d, download_enable de, download_available da where de.id='%s' and de.FILEID=da.FILEID and d.IVALUE=de.ID AND d.hardware_id='%s' AND d.name='%s' and (tvalue like '%s' or tvalue like '%s') "; $arg=array($id_pack_affect,$protectedGet['systemid'],"DOWNLOAD","ERR_%","EXIT_CODE%"); $res = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg ); $val = mysqli_fetch_array( $res ); if (isset($val['name'])){ $tab_typ_champ[0]['INPUT_NAME']="MOTIF"; $tab_typ_champ[0]['INPUT_TYPE']=1; $data_form[0]="
".$lbl_action."
"; tab_modif_values($data_form,$tab_typ_champ,array('NAME_PACK'=>$val['name'],'ACTION'=>$hidden_action), array( 'title' => $title_action.$val['name'] )); } } if( isset( $protectedGet["suppack"] ) & $_SESSION['OCS']['profile']->getConfigValue('TELEDIFF')=="YES" ) { if( $_SESSION['OCS']["justAdded"] == false ){ desactive_packet($systemid,$protectedGet["suppack"]); }else $_SESSION['OCS']["justAdded"] = false; addLog($l->g(512), $l->g(886)." ".$protectedGet["suppack"]." => ".$systemid ); } else $_SESSION['OCS']["justAdded"] = false; if( isset( $protectedGet["actgrp"] )) { //this id is it a group? $reqGroups = "SELECT h.id id FROM hardware h WHERE h.deviceid='_SYSTEMGROUP_' "; //If you hav'nt permission => see only visible groups if (!($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES")) $reqGroups .= " and h.workgroup = 'GROUP_4_ALL'"; $resGroups = mysql2_query_secure( $reqGroups, $_SESSION['OCS']["readServer"] ); $valGroups = mysqli_fetch_array( $resGroups ); if (isset($valGroups['id'])){ $reqDelete = "DELETE FROM groups_cache WHERE hardware_id=%s AND group_id=%s"; if( $protectedGet["actgrp"] == 0 ) $reqDelete .= " AND static<>0"; $argDelete=array($systemid,$protectedGet["grp"]); $reqInsert = "INSERT INTO groups_cache(hardware_id, group_id, static) VALUES (%s, %s, %s)"; $argInsert=array($systemid,$protectedGet["grp"],$protectedGet["actgrp"]); mysql2_query_secure( $reqDelete, $_SESSION['OCS']["writeServer"],$argDelete ); if( $protectedGet["actgrp"] != 0 ) mysql2_query_secure( $reqInsert, $_SESSION['OCS']["writeServer"],$argInsert ); } } $td1 = ""; $td2 = ""; $td3 = $td2; $td4 = ""; $i=0; $queryDetails = "SELECT * FROM devices WHERE hardware_id=%s"; $argDetail=$systemid; $resultDetails = mysql2_query_secure($queryDetails, $_SESSION['OCS']["readServer"],$argDetail); $form_name='config_mach'; echo open_form($form_name); echo ""; while($item=mysqli_fetch_array($resultDetails,MYSQL_ASSOC)) { $optPerso[ $item["NAME"] ][ "IVALUE" ] = $item["IVALUE"]; $optPerso[ $item["NAME"] ][ "TVALUE" ] = $item["TVALUE"]; } $ii++; $td3 = $ii%2==0?$td2:$td4; $field_name=array('DOWNLOAD','DOWNLOAD_CYCLE_LATENCY','DOWNLOAD_PERIOD_LENGTH','DOWNLOAD_FRAG_LATENCY', 'DOWNLOAD_PERIOD_LATENCY','DOWNLOAD_TIMEOUT','PROLOG_FREQ','SNMP'); $optdefault=look_config_default_values($field_name); //IPDISCOVER echo " "; echo $td3.$l->g(489).""; if( isset( $optPerso["IPDISCOVER"] )) { if( $optPerso["IPDISCOVER"]["IVALUE"]==0 ) echo $td3.$l->g(490).""; else if( $optPerso["IPDISCOVER"]["IVALUE"]==2 ) echo $td3.$l->g(491)." ".$optPerso["IPDISCOVER"]["TVALUE"].""; else if( $optPerso["IPDISCOVER"]["IVALUE"]==1 ) echo $td3.$l->g(492)." ".$optPerso["IPDISCOVER"]["TVALUE"].""; } else { echo $td3.$l->g(493).""; } //Can you modify configuration of this computer? if( $_SESSION['OCS']['profile']->getConfigValue('CONFIG')=="YES" ){ echo ""; } $ii++; $td3 = $ii%2==0?$td2:$td4; //FREQUENCY echo ""; echo $td3.$l->g(494).""; if( isset( $optPerso["FREQUENCY"] )) { if( $optPerso["FREQUENCY"]["IVALUE"]==0 ) echo $td3.$l->g(485).""; else if( $optPerso["FREQUENCY"]["IVALUE"]==-1 ) echo $td3.$l->g(486).""; else echo $td3.$l->g(495)." ".$optPerso["FREQUENCY"]["IVALUE"]." ".$l->g(496).""; } else { echo $td3.$l->g(497).""; } echo ""; //DOWNLOAD_SWITCH echo ""; echo $td3.$l->g(417)." DOWNLOAD"; if( isset( $optPerso["DOWNLOAD_SWITCH"] )) { if( $optPerso["DOWNLOAD_SWITCH"]["IVALUE"]==0 ) echo $td3.$l->g(733).""; else if( $optPerso["DOWNLOAD_SWITCH"]["IVALUE"]==1 ) echo $td3.$l->g(205).""; else echo $td3.""; } else { echo $td3.$l->g(488)." ("; if ($optdefault['ivalue']["DOWNLOAD"] == 1) echo $l->g(205); else echo $l->g(733); echo ")"; } echo ""; //DOWNLOAD_CYCLE_LATENCY optperso("DOWNLOAD_CYCLE_LATENCY",$l->g(720)." DOWNLOAD_CYCLE_LATENCY",$optPerso,0,$optdefault['ivalue']["DOWNLOAD_CYCLE_LATENCY"],$l->g(511)); //DOWNLOAD_FRAG_LATENCY optperso("DOWNLOAD_FRAG_LATENCY",$l->g(721)." DOWNLOAD_FRAG_LATENCY",$optPerso,0,$optdefault['ivalue']["DOWNLOAD_FRAG_LATENCY"],$l->g(511)); //DOWNLOAD_PERIOD_LATENCY optperso("DOWNLOAD_PERIOD_LATENCY",$l->g(722)." DOWNLOAD_PERIOD_LATENCY",$optPerso,0,$optdefault['ivalue']["DOWNLOAD_PERIOD_LATENCY"],$l->g(511)); //DOWNLOAD_PERIOD_LENGTH optperso("DOWNLOAD_PERIOD_LENGTH",$l->g(723)." DOWNLOAD_PERIOD_LENGTH",$optPerso,0,$optdefault['ivalue']["DOWNLOAD_PERIOD_LENGTH"]); //PROLOG_FREQ optperso("PROLOG_FREQ",$l->g(724)." PROLOG_FREQ",$optPerso,0,$optdefault['ivalue']["PROLOG_FREQ"],$l->g(730)); //PROLOG_FREQ optperso("DOWNLOAD_TIMEOUT",$l->g(424)." DOWNLOAD_TIMEOUT",$optPerso,0,$optdefault['ivalue']["DOWNLOAD_TIMEOUT"],$l->g(496)); //PROLOG_FREQ //optperso("SNMP_SWITCH",$l->g(1197)." SNMP_SWITCH",$optPerso,0,$optdefault["SNMP_SWITCH"],$l->g(496)); //DOWNLOAD_SWITCH echo ""; echo $td3.$l->g(1197)." SNMP_SWITCH"; if( isset( $optPerso["SNMP_SWITCH"] )) { if( $optPerso["SNMP_SWITCH"]["IVALUE"]==0 ) echo $td3.$l->g(733).""; else if( $optPerso["SNMP_SWITCH"]["IVALUE"]==1 ) echo $td3.$l->g(205).""; else echo $td3.""; } else { echo $td3.$l->g(488)." ("; if ($optdefault['ivalue']["SNMP"] == 1) echo $l->g(205); else echo $l->g(733); echo ")"; } echo ""; //GROUPS $sql_groups="SELECT static, name, group_id,workgroup FROM groups_cache g, hardware h WHERE g.hardware_id=%s AND h.id=g.group_id"; $arg_groups=$systemid; $resGroups = mysql2_query_secure($sql_groups, $_SESSION['OCS']["readServer"],$arg_groups); echo ""; if( mysqli_num_rows( $resGroups )>0 ) { while( $valGroups = mysqli_fetch_array( $resGroups ) ) { $ii++; $td3 = $ii%2==0?$td2:$td4; echo ""; echo ""; echo $td3.$l->g(607)." "; if( $_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES" || $valGroups["workgroup"]=="GROUP_4_ALL") echo "".$valGroups["name"].""; else echo "".$valGroups["name"].""; echo $td3.$l->g(81).": "; switch( $valGroups["static"] ) { case 0: echo "".$l->g(596).""; break; case 1: echo "".$l->g(610).""; break; case 2: echo "".$l->g(597).""; break; } if( $_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES" || $valGroups["workgroup"]=="GROUP_4_ALL") { $hrefBase = "index.php?".PAG_INDEX."=".$pages_refs['ms_computer']."&head=1&systemid=".urlencode($systemid)."&option=cd_configuration&grp=".$valGroups["group_id"]; switch( $valGroups["static"] ) { case 0: echo $td3."".$l->g(598)."     ".$l->g(600).""; break; case 1: echo $td3."".$l->g(818).""; break; case 2: echo $td3."".$l->g(598)."     ".$l->g(41).""; break; } } echo ""; echo ""; } } echo ""; //TELEDEPLOY show_packages($systemid); $hrefBase = "index.php?".PAG_INDEX."=".$pages_refs['ms_computer']."&head=1&systemid=".urlencode($systemid)."&option=cd_configuration"; echo ""; //} echo "
".(isset($optPerso["IPDISCOVER"])&&$optPerso["IPDISCOVER"]["IVALUE"]!=1?"":" ")."
".(isset($optPerso["FREQUENCY"])?"":" ")."
".(isset($optPerso["DOWNLOAD_SWITCH"])?"":" ")."
".(isset($optPerso["SNMP_SWITCH"])?"":" ")."
 
"; if( $_SESSION['OCS']['profile']->getConfigValue('TELEDIFF')=="YES" ) echo "".$l->g(501)." "; $reqGroups = "SELECT h.name,h.id,h.workgroup FROM hardware h,groups g WHERE g.hardware_id=h.id and h.deviceid='_SYSTEMGROUP_'"; if( !($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES") ) $reqGroups .= " and workgroup = 'GROUP_4_ALL'"; $reqGroups .= " order by h.name"; $resGroups =mysql2_query_secure( $reqGroups, $_SESSION['OCS']["readServer"] ); $first = true; while( $valGroups = mysqli_fetch_array( $resGroups ) ) { if( $first ) { echo $l->g(386)." ". $l->g(589).""; echo " "; echo "
"; echo close_form(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_controllers/000077500000000000000000000000001303466605000304255ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_controllers/cd_controllers.php000077500000000000000000000034311303466605000341560ustar00rootroot00000000000000g(93)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_controllers"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(64) => 'MANUFACTURER', $l->g(49) => 'NAME', $l->g(66) => 'TYPE', $l->g(80) => 'CAPTION', $l->g(53) => 'DESCRIPTION', $l->g(277)=> 'VERSION'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del[$l->g(66)]=$l->g(66); $default_fields= array($l->g(64)=>$l->g(64),$l->g(49)=>$l->g(49),$l->g(66)=>$l->g(66)); $queryDetails = "SELECT "; foreach ($list_fields as $lbl=>$value){ $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1)." FROM controllers WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_drives/000077500000000000000000000000001303466605000273535ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_drives/cd_drives.php000077500000000000000000000035311303466605000320330ustar00rootroot00000000000000g(92)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_drives"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(85) => 'LETTER', $l->g(66) => 'TYPE', $l->g(70) => 'VOLUMN', $l->g(86) => 'FILESYSTEM', $l->g(88)." (MB)"=>'FREE', $l->g(87)." (MB)"=> 'TOTAL', "PERCENT_BAR" => 'CAPACITY'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array('PERCENT_BAR'=>'PERCENT_BAR',$l->g(85)=>$l->g(85)); $default_fields= $list_fields; $tab_options['LBL']['PERCENT_BAR']=$l->g(83); $tab_options["replace_query_arg"]['CAPACITY']=" round(100-(FREE*100/TOTAL)) "; $queryDetails = "SELECT *, round(100-(FREE*100/TOTAL)) AS CAPACITY FROM drives WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_inputs/000077500000000000000000000000001303466605000274015ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_inputs/cd_inputs.php000077500000000000000000000031541303466605000321100ustar00rootroot00000000000000g(91)); $form_name="affich_inputs"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(66) => 'TYPE', $l->g(64) => 'MANUFACTURER', $l->g(80) => 'CAPTION', $l->g(53) => 'DESCRIPTION', $l->g(84) => 'INTERFACE'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(66)=>$l->g(66),$l->g(84)=>$l->g(84)); $default_fields= $list_fields; $queryDetails = "SELECT * FROM inputs WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_memories/000077500000000000000000000000001303466605000276775ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_memories/cd_memories.php000077500000000000000000000033371303466605000327070ustar00rootroot00000000000000g(26)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_memories"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(80) => 'CAPTION', $l->g(53) => 'DESCRIPTION', $l->g(83)." (MB)" => 'CAPACITY', $l->g(283) => 'PURPOSE', $l->g(66) => 'TYPE', $l->g(268) => 'SPEED', $l->g(94) => 'NUMSLOTS', $l->g(36)=>'SERIALNUMBER'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(80)=>$l->g(80),$l->g(83)=>$l->g(83)); $default_fields= $list_fields; $queryDetails = "SELECT * FROM memories WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_modems/000077500000000000000000000000001303466605000273435ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_modems/cd_modems.php000077500000000000000000000030771303466605000320200ustar00rootroot00000000000000g(270)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_modems"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(49) => 'NAME', $l->g(65) => 'MODEL', $l->g(53) => 'DESCRIPTION', $l->g(66) => 'TYPE'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(49)=>$l->g(49),$l->g(66)=>$l->g(66)); $default_fields= $list_fields; $queryDetails = "SELECT * FROM modems WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_monitors/000077500000000000000000000000001303466605000277315ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_monitors/cd_monitors.php000077500000000000000000000031431303466605000327660ustar00rootroot00000000000000g(97)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_monitors"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(64) => 'MANUFACTURER', $l->g(80) => 'CAPTION', $l->g(360) => 'DESCRIPTION', $l->g(66) => 'TYPE', $l->g(36)=> 'SERIAL'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(64)=>$l->g(64),$l->g(36)=>$l->g(36)); $default_fields= $list_fields; $queryDetails = "SELECT * FROM monitors WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_networks/000077500000000000000000000000001303466605000277335ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_networks/cd_networks.php000077500000000000000000000067231303466605000330010ustar00rootroot00000000000000g(82)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; //p($protectedPost); $tab_options=$protectedPost; if ($protectedPost['OTHER_BIS'] != ''){ //verify @mac if ( preg_match( '/([0-9A-F]{2}:){5}[0-9A-F]{2}$/i', $protectedPost['OTHER_BIS']) ){ $sql="INSERT INTO blacklist_macaddresses (macaddress) value ('%s')"; $arg=$protectedPost['OTHER_BIS']; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); $tab_options['CACHE']='RESET'; } } if ($protectedPost['OTHER'] != ''){ //verify @mac if ( preg_match( '/([0-9A-F]{2}:){5}[0-9A-F]{2}$/i', $protectedPost['OTHER']) ){ $sql="DELETE FROM blacklist_macaddresses WHERE macaddress='%s'"; $arg=$protectedPost['OTHER']; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); $tab_options['CACHE']='RESET'; } } $form_name="affich_networks"; $table_name=$form_name; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(53) => 'DESCRIPTION', $l->g(66) => 'TYPE', $l->g(268) => 'SPEED', $l->g(95)=> 'MACADDR', $l->g(81) => 'STATUS', $l->g(34) => 'IPADDRESS', $l->g(208) => 'IPMASK', $l->g(207)=>'IPGATEWAY', $l->g(331)=>'IPSUBNET', $l->g(281)=>'IPDHCP'); if ($_SESSION['OCS']['ADMIN_BLACKLIST']['MACADD']=="YES"){ //$list_fields['OTHER_GREEN']='MACADDR'; //$list_col_cant_del['OTHER_GREEN']='OTHER_GREEN'; // $tab_options['LBL']['OTHER_GREEN']=$l->g(703); $sql="select MACADDR from networks WHERE (hardware_id=%s)"; $arg=$systemid; $resultDetails = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); while($item = mysqli_fetch_object($resultDetails)){ $sql="select ID from blacklist_macaddresses where macaddress='%s'"; $arg=$item->MACADDR; $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); if (mysqli_num_rows($result) == 1){ $tab_options['OTHER'][$l->g(95)][$item->MACADDR]=$item->MACADDR; $tab_options['OTHER']['IMG']='image/red.png'; }else{ $tab_options['OTHER_BIS'][$l->g(95)][$item->MACADDR]=$item->MACADDR; $tab_options['OTHER_BIS']['IMG']='image/green.png'; } } } if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del[$l->g(34)]=$l->g(34); $default_fields= $list_fields; $queryDetails = "SELECT "; foreach ($list_fields as $lbl=>$value){ $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1)." FROM networks WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_packets/000077500000000000000000000000001303466605000275115ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_packets/cd_packets.php000077500000000000000000000043471303466605000323350ustar00rootroot00000000000000g(512)); $form_name="affich_packets"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(475) => 'PKG_ID', $l->g(49) => 'NAME', $l->g(440)=>'PRIORITY', $l->g(464)=>'FRAGMENTS', $l->g(462)." Ko"=>'SIZE', $l->g(25)=>'OSNAME', 'COMMENT'=>'COMMENT'); $list_col_cant_del=array($l->g(475)=>$l->g(475),$l->g(49)=>$l->g(49)); $default_fields= $list_col_cant_del; $pack_sup= $l->g(561); $queryDetails = "SELECT PKG_ID,NAME,PRIORITY,FRAGMENTS,round(SIZE/1024,2) as SIZE,OSNAME,COMMENT FROM download_history h LEFT JOIN download_available a ON h.pkg_id=a.fileid where hardware_id=%s and name is not null"; $arg=array($systemid); if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES"){ $queryDetails .= " and a.comment not like '%s'"; array_push($arg,'%[VISIBLE=0]%'); } $queryDetails .= " union SELECT PKG_ID,'%s','%s','%s','%s','%s','%s' FROM download_history h LEFT JOIN download_available a ON h.pkg_id=a.fileid where hardware_id=%s and name is null"; $i=0; while ($i<6){ array_push($arg,$pack_sup); $i++; } array_push($arg,$systemid); $tab_options['ARG_SQL']=$arg; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_ports/000077500000000000000000000000001303466605000272265ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_ports/cd_ports.php000077500000000000000000000030601303466605000315560ustar00rootroot00000000000000g(272)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_ports"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(66) => 'TYPE', $l->g(49) => 'NAME', $l->g(84) => 'CAPTION', $l->g(53) => 'DESCRIPTION'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; // $tab_options['FILTRE']=array('NAME'=>$l->g(49),'MANUFACTURER'=>$l->g(64),'TYPE'=>$l->g(66)); $queryDetails = "SELECT * FROM ports WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_printers/000077500000000000000000000000001303466605000277255ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_printers/cd_printers.php000077500000000000000000000042011303466605000327520ustar00rootroot00000000000000g(79)); $form_name="affich_printers"; $table_name=$form_name; echo open_form($form_name); $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(49) => 'NAME', $l->g(278) => 'DRIVER', $l->g(279) => 'PORT', $l->g(53) =>'DESCRIPTION', $l->g(1323) =>'SERVERNAME', $l->g(1324) =>'SHARENAME', $l->g(1325) =>'RESOLUTION', $l->g(51) =>'COMMENT', $l->g(1326) =>'SHARED', $l->g(1327) =>'NETWORK'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $tab_options['FILTRE'] = array_flip($list_fields); $queryDetails = "SELECT * FROM printers WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_processors/000077500000000000000000000000001303466605000302615ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_processors/cd_processors.php000077500000000000000000000045661303466605000336600ustar00rootroot00000000000000g(54)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_processors"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $sql="select id from cpus where hardware_id=%s"; $arg=$systemid; $res =mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg); $val = mysqli_fetch_array( $res ); if (isset($val['id'])){ $list_fields=array($l->g(64) => 'MANUFACTURER', $l->g(66) => 'TYPE', $l->g(36) => 'SERIALNUMBER', $l->g(429) => 'SPEED', $l->g(1317) => 'CORES', $l->g(1318) => 'L2CACHESIZE', $l->g(1247) => 'CPUARCH', $l->g(1312) => 'DATA_WIDTH', $l->g(1313) => 'CURRENT_ADDRESS_WIDTH', $l->g(1314) => 'LOGICAL_CPUS', $l->g(1319) => 'VOLTAGE', $l->g(1315) => 'CURRENT_SPEED', $l->g(1316) => 'SOCKET'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $queryDetails = "SELECT * FROM cpus WHERE (hardware_id=$systemid)"; }else{ $list_fields=array($l->g(66) => 'PROCESSORT', $l->g(377) => 'PROCESSORS', $l->g(55) => 'PROCESSORN'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; // $tab_options['FILTRE']=array('NAME'=>$l->g(49),'MANUFACTURER'=>$l->g(64),'TYPE'=>$l->g(66)); $queryDetails = "SELECT * FROM hardware WHERE (id=$systemid)"; } ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_registry/000077500000000000000000000000001303466605000277275ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_registry/cd_registry.php000077500000000000000000000026261303466605000327670ustar00rootroot00000000000000g(211)); $form_name="affich_registry"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(212) => 'NAME', $l->g(213) => 'REGVALUE'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $tab_options['FILTRE']=array('NAME'=>$l->g(212),'REGVALUE'=>$l->g(213));; $queryDetails = "SELECT * FROM registry WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_slots/000077500000000000000000000000001303466605000272235ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_slots/cd_slots.php000077500000000000000000000030011303466605000315430ustar00rootroot00000000000000g(271)); $form_name="affich_slots"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(49) => 'NAME', $l->g(53) => 'DESCRIPTION', $l->g(70) => 'DESIGNATION'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; //$tab_options['FILTRE']=array('NAME'=>$l->g(212),'REGVALUE'=>$l->g(213));; $queryDetails = "SELECT * FROM slots WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_softwares/000077500000000000000000000000001303466605000300745ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_softwares/cd_softwares.php000077500000000000000000000050161303466605000332750ustar00rootroot00000000000000g(20)); $form_name="affich_soft"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields[$l->g(69)] = 'PUBLISHER'; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $queryDetails = "SELECT s.PUBLISHER, s_name.NAME as NAME, s_version.NAME as VERSION, s.COMMENTS,s.FOLDER,s.FILENAME,s.FILESIZE,s.GUID, s.LANGUAGE,s.INSTALLDATE,s.BITSWIDTH FROM softwares s left join type_softwares_name s_name on s_name.id= s.name_id left join type_softwares_version s_version on s_version.id=s.version_id WHERE (hardware_id=$systemid)"; $list_fields[$l->g(49)] = 's_name.NAME'; }else{ $queryDetails = "SELECT * FROM softwares WHERE (hardware_id=$systemid)"; $list_fields[$l->g(49)] = 'NAME'; } $list_fields[$l->g(277)] = 'VERSION'; $list_fields[$l->g(51)]='COMMENTS'; if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(49)=>$l->g(49)); $default_fields= $list_fields; $list_fields[$l->g(1248)]='FOLDER'; $list_fields[$l->g(446)]='FILENAME'; $list_fields[ucfirst(strtolower($l->g(953)))]='FILESIZE'; $list_fields['GUID']='GUID'; $list_fields[ucfirst(strtolower($l->g(1012)))]='LANGUAGE'; $list_fields[$l->g(1238)]='INSTALLDATE'; $list_fields[$l->g(1247)]='BITSWIDTH'; $tab_options['FILTRE']=array_flip($list_fields);//array('NAME'=>$l->g(49),'VERSION'=>$l->g(277),'PUBLISHER'=>$l->g(69)); ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_sounds/000077500000000000000000000000001303466605000273725ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_sounds/cd_sounds.php000077500000000000000000000031511303466605000320670ustar00rootroot00000000000000g(96)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_sounds"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(49) => 'NAME', $l->g(64) => 'MANUFACTURER', $l->g(53) => 'DESCRIPTION'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(49)=>$l->g(49)); $default_fields= $list_fields; // $tab_options['FILTRE']=array('NAME'=>$l->g(49),'MANUFACTURER'=>$l->g(64),'TYPE'=>$l->g(66)); $queryDetails = "SELECT * FROM sounds WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_storages/000077500000000000000000000000001303466605000277065ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_storages/cd_storages.php000077500000000000000000000033241303466605000327210ustar00rootroot00000000000000g(63)); $form_name="affich_rstorages"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(49) => 'NAME', $l->g(64) => 'MANUFACTURER', $l->g(65) => 'MODEL', $l->g(53) => 'DESCRIPTION', $l->g(66) => 'TYPE', $l->g(67)." (MB)" => 'DISKSIZE', $l->g(36) => 'SERIALNUMBER', $l->g(1229)=> 'FIRMWARE'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(49)=>$l->g(49)); $default_fields= $list_fields; $tab_options['FILTRE']=array('NAME'=>$l->g(49),'MANUFACTURER'=>$l->g(64),'TYPE'=>$l->g(66)); $queryDetails = "SELECT * FROM storages WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_videos/000077500000000000000000000000001303466605000273505ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_videos/cd_videos.php000077500000000000000000000031701303466605000320240ustar00rootroot00000000000000g(61)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_videos"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(49) => 'NAME', $l->g(276) => 'CHIPSET', $l->g(26)." (MB)" => 'MEMORY', $l->g(62) => 'RESOLUTION'); if($show_all_column) $list_col_cant_del=$list_fields; else $list_col_cant_del=array($l->g(49)=>$l->g(49)); $default_fields= $list_fields; //$tab_options['FILTRE']=array('NAME'=>$l->g(212),'REGVALUE'=>$l->g(213));; $queryDetails = "SELECT * FROM videos WHERE (hardware_id = $systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_vm/000077500000000000000000000000001303466605000265015ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/cd_vm/cd_vm.php000077500000000000000000000035471303466605000303160ustar00rootroot00000000000000g(1266)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name="affich_vm"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array($l->g(49).' VM' => 'vm.NAME', $l->g(1046).' VM' => 'vm.STATUS', $l->g(25).' VM' => 'vm.SUBSYSTEM', $l->g(66).' VM' =>'vm.VMTYPE', 'UUID'=>'vm.UUID', $l->g(54).' VM' =>'vm.VCPU', $l->g(26).' VM' =>'vm.MEMORY', 'NAME'=>'h.name', $l->g(25) => "h.osname", ); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql=prepare_sql_tab($list_fields); $sql['SQL'] .= ",h.ID FROM virtualmachines vm left join hardware h on h.uuid=vm.uuid WHERE (hardware_id=%s)"; array_push($sql['ARG'],$systemid); $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['ARG_SQL_COUNT']=$systemid; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/require/000077500000000000000000000000001303466605000270655ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/computer_detail/require/fonction.php000077500000000000000000000034301303466605000314200ustar00rootroot00000000000000g(64) => 'MANUFACTURER', // $l->g(49) => 'NAME', // $l->g(66) => 'TYPE', // 'Caption'=>'CAPTION', // $l->g(53)=>'DESCRIPTION', // $l->g(277)=> 'VERSION'); // //$list_fields['SUP']= 'ID'; // $list_col_cant_del[$l->g(66)]=$l->g(66); // $default_fields= array($l->g(64)=>$l->g(64),$l->g(49)=>$l->g(49),$l->g(66)=>$l->g(66)); $queryDetails = "SELECT "; foreach ($list_fields as $lbl=>$value){ $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1)." FROM ".$table." WHERE (hardware_id=$systemid)"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/000077500000000000000000000000001303466605000240145ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/brazilian_portuguese/000077500000000000000000000000001303466605000302515ustar00rootroot00000000000000brazilian_portuguese.png000077500000000000000000000254701303466605000351500ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/brazilian_portuguesePNG  IHDRqG??7 pHYs  tIME 0S IDATx|yeUy{ᄅyf*爳QWtIhƥFb$FE" H1P@Qs՛ϸ{WjNSZ{sݿo}߷ "` @, ȐAւ0D$ X9`Ad0A'kn] '0)Ο03`;yF@`[ ,>P_qr1ezNBمd!-$Cg-Y# @X}T=t1%=M`bKFP,!- `@ K<PX:z@@1 `0@}G`- gdH`}pK85s5݇=E.L UD@0@N[ rQWvA8)DZXXe3{:HDO8Ѯ>z2 kܻ$:=0,9,d v %%0!ӯfs_hyN(;7·RoXehKV0 A`dɾ>@D$& <r@*]Āc $CX$6:5ܗs}}|3D>ہ6BhkAb y +ݴ` HѶbBRpW47 4EyPĹM3خ1$ՓH m/68鱩t崷@$!chn ?Y{J˼8T<XI(l^{jޞl99iVb 3uX5ei%v ѝA'B زqeYƁ9U#OL;BGOqAhZ,\:kΦ4SXkQ/ @11 0-T KWl(bLT) ba-uLͶ#!Z[W[xKX܁i5j#ɑ30g~E_i/75]ZǏPo칎 e@Fֆƚp醗^rI3^QIy E*Ʌsh%GPޙV.7Z:ضIޜl tOՠ'JͲ D9cLSw{/'! G)1tA{kZ=  ]=wey~ R"BU3*Pj^XEIz1ם)A>hlR]ͥoa$ !VX`qp6vM<=G4Ą~LPا H`1P-`' UWR2]7Ӹ\6.+E$qgo(#T1:[Μl`߁tM=Sf3ZhSiBh\)fa ~<_Dɞ y_z "ڽw3%>{q.8GK,d w~psn_QZL< HEos}o?>;9LE:wekqd:AEm&֮]p5n|f~W=f‘o~`WcxU 7։qHIm3Bt]t XҖ8PIn].sw$`] ]I!+ Jٰ6,ƫ/[ufhT QGiEgQY^oŝ~xpI[8²@9B`$'+`/'h9Ytsݖ%]s*<#N}?L R 8(BjcH⌅غ-sGd 2d)š߻1.e\X)0s^G9|Ȝ; t)eQsid놡tɲ2S|b3N;m^xY)2Ag$4/]9vYRq q ašj*nkuDV1+@!4{ht.;G^!-_Q\ǘ'z,%b}>&.\w\Uҥ8&`m=ͯԦ9CGBxHEnH2\d2u:2TXǶm[]htCzD`lQ E6lXI^tŵP}{8N5wlRe ְ/ I^`>$I\%]T@SP@OO}u0+Z:|ci C pbM(𜂶@qD/-wpy[n1ix.#`Xɵq$߸`DYg:dKyCc ۾1UF[Ǵ)uYuARB3IhB!a"̈?yS镧{,򍏦A "Ch5Pg,=>hOoP D踁k$;&iz}u͋v=grl+6c! A sk_1㊕,aV!$)V`k؄sK!t }34ߋA,Ggߝ~𑕂OI` ᦉRTFN6odxeՊLD"o'fѧ>y{~obQ˦l c}2 '[Q4jXBք9&U Z8m4d "hXbw@Er_Z+9cT0=A@%jgu-{`c"n2 OR8H]?,_npsw{p"#jZ.[f l5/_:15^<<~mE}ۣ uZɱ6GVOL) J((4'I#EL~+ϜS j[J !p^Vk+eŷsֆ.$#g ݛ~vEPB.ݱgkί\q);B2 FHPr1ȣ׿c}Ndwg{T[+^_{+oUx)jv;픗웎C}:L*(%q7JVK,v{G/+!SI4)r_Q;WH0xew÷ܣ|xao+ 2K'^{lL΋ m@$9EqJ\qaSȏd$A p BMe !gvЬ'7]?S^_֤qyW=Gڭ_rKWgzh@=̶lKj գGYVq'JR-63rre2L %`d5]_( б"uuZ0Kn=ndH3X!!%A)ST]}\+0)0Tź ʿa,SJsuFB@[6 c $$obX=@{|'g˕x~fْe#U>6emr˯~]X37+6 ~K\^uzoN9pho?16{cࢿ/_x dke`ym7Ic- @ eEFx52=f%u#Qdytr}LY*f X. SuJ{ t tp oݺicI+pːc bU&9MsEa43Q'5>݁seze\~ֶ&/ nԏ~)N3!LPbX52v{+NY^sO/[O?cyz;BK_|"3i#!{%]oЫwQECO]uU~ɤ\D4Op c6$qu@!K ]`3pa 3E:b*I0!2DX,1e2 f8*0*ח9|I~ߞH.©=wǯs^Q-ު5^}I):a(fɖȂ4X bfbcӴ̅dEIJfW\u쑣Q$-2dpҺER02V@>AtlFE+0aC#az$K?rCP+d3nz}GdFvRnzg׮;/]c?À-ZkQ=CUn(Qn5:Ћo ƽjKڂۿ]+w>fb /$q$L7%Tj>C԰A %<n\b(W-m-|wn^ /\x1&e.c uk!=8 ʥdaF+-MqڄXh@lij8xGY4N:8+Ui a߯%d/kێ?"Bxř^vޮ[r?W]`zb5Ӯ 5`@9fJːMZ$r@ᾎᶇnRSXҵ!!P5aI kL h41җ Dچ/rwo*8 $H􊝝xhxd+NVm2 ~ Hh큁֬3_rQZ^-,+ǎ a`S8њx]KWHlr4:ܡnr?7d'M,Ms#clh sXCbRS'3Ve:PERt {N_鋷T\c$gԭ9r/HҒkIJ( !Ul YbM8W-R@yp9.E9׺5`O :2d'%,vI@hEsl[_< O5F=f& mGb7{Y&I`\ ?{))#~Ow I  (A V] rbEg6cN<76ӑ|R2L,(#hKH&e!sHPi;AȎLv]w>6(z^Xh=|fk$t O%IL}uȽ1^7m<4ĵZ}YnzZyL[J)pe6A䦠& 1xOW޶=-SsZ2#`9`F$K[7f-J%@Eɲ!8qԵǮ/|甪O kn !\*DJZ9NoO{랿c<,ٴMdO dcF^AVnJh ٭ @d1< a]?,Uis?~ԘĩoJ~9P.5A"nD^~3OOMN&+b1auTّvV[bDX(Q8N!:릛߾>28}5yvի>/>GsAqryYL)!p]<[^aHXܢƲZWv50MЂ@3uW!0@ ²nvJPYlBK䒵D.BNFv 0 9E9i׏E:ᡧD+G8'}Ḑ y)UQeSgEw޽LM5Wc㌌T>1 IDAT?Mc?0(:sdY؞=~㍯=xh柿 -wN-¸XJ9mˁ!f 0TVi;Rww}JP]Pa-w|=wMOU’8ʫy;a؜(`+J;qR ~"R_3N#͋C "ϝ ڍbeiG?|0h"@;4NȽߡ)4`VZX 6`;x~4(gc֩e=n#8թ0.2<3v;o*ifs2) $$!uW-5O?9 (kRHV)7lXgy|jz"7$TP=O}:z6M,/x= B($'>uØ%D" @2)@@k些 (8˞teE.7-^;RIUXѹf%ItJ Igd[~(_Qif \o3f;8'Zj- &*w>[t':|/<6}6Bc [\s^{ɚk NݙsF-xNZmG6jAL  SA`:3!$ " !W7{6:&MOޖ/0Ѐ1=B@$s +,qٸp&U0qj\K∎B_NwBqxrlRܠDBk!Hc0~e MzO>{@hO^ ǧJWI!JKChh롡q`?َ3G=Q9c G&=GDCDZ(9!MnNZYwc w>oD\8x K`c N/pϙp0̆{GEQZ%) -XTQŽ"U`id,,ǥg$|Nh!b>EסSRfn3pd@"A2Y_rs8wPKBX~qP}L"ar$: Q%ढ़v BI:E % r@wX$emۜL Você deve fazer uma busca por computadores, e então clicar em 'configurar' para afetar estes pacotes ativos
Você pode também afetar um pacote em um único computador usando a aba 'customização' nos detalhes de qualquer computador. 553 Chave do Windows 554 Monitor: Serial 555 Monitor: Fabricante 556 Monitor: Resolução 557 Usuário de Dominio 558 Pacotes afetados 559 Arquivo não é um .ocs 560 Ao servidor 561 Desconhecido (pacote deletado) 562 Redes com uid: 563 Fabricante 564 Freqüência da auto-execução do agente 567 Latência da descoberta de IPs 568 RAM(MB) 569 CPU(MHz) 570 Ajuda 571 Valida tudo 572 Sucesso 573 Erros 574 Stats 575 Unaffect not notified 576 Descoberta de IP’s customizada 577 Nome do Grupo 580 Todos Computadores (replay) 581 Todos os Computadores (cached) 582 e 583 Grupos 584 Para a requisição 585 Para a Seleção 586 Novo Grupo 587 Novo grupo estático 588 Sobregravar Grupo 589 Adicionar a Grupo estático 590 Resetar estado 591 Incluir estaticamente 592 Excluir estaticamente 593 Data de criação 594 Cache gerado em 595 GRUPO ESTÁTICO 596 INCLUIDO DINAMICAMENTE 597 EXCLUIDO ESTATICAMENTE 598 Incluir 599 Resetar 600 Excluir 601 Afetação de Massa 602 Você precisa enviar o arquivo 603 Nenhum Computador encontrado, verifique o arquivo 604 computador(es) Afetado(s) com Sucesso 605 computador(es) Mal-sucedido 606 Arquivo de Computadores 607 Grupo 608 criado 609 sobregravado 610 ESTATICAMENTE INCLUIDO 611 NO CACHE 612 ESTATICO 613 DINAMICO 614 EXCLUIDO 615 Pesquisa 616 Perímetro do Usuário 617 Novo 618 Perímetro 619 Usuário Local 620 Nenhum computador nesse perímetro. 621 O Grupo não foi criado, este grupo já existe 622 Cached 623 A informação que você está tentado acessar não existe 624 Realmente deseja excluir este grupo? 625 Ativar esta afecção 626 Desativar esta afecção 627 Pelo menos um dos campos está vazio... Não houve mudanças. 628 Servidores 629 Novo Grupo de servidores de redistribuição 630 Um grupo de servidores já existente 631 Adicionar em 632 Minimizar 633 Grupo de servidores de Gestão 634 Ação desejada 635 Novo nome 636 Descrição 637 Substituir 638 O NOME DO GRUPO(S) NÃO PODEM SER NULOS 639 TESTE GRUPO DE SERVIDORES NÃO EXISTE 640 Deseja realmente apagar 641 Grupo de servidores de Redistribuição 642 o grupo 643 todas as máquinas 644 esta máquina 645 DETALHE DO GRUPO 646 URL 647 NUMERO DA PORTA 648 COMPARTIMENTO DE REPERTÓRIO 649 AUTOMÁTICA 650 MANUAL 651 Grupo de Servidores 652 Máquina(s) 653 Lista negra de endereços (MAC) 654 Entre com um novo endereço para a lista negra de (MAC) 655 Inserção feita 656 Este dado já existe na lista 657 Campos em vermelho com ERRO!!! (Espaços Vazios ou tamanho < 2) 658 máquina não tem um servidor de redistribuição.
É necessário para a afecção de pacotes manualmente. 659 Máquinas já possuem este pacote teleimplantado. Este pacote de status dessas máquinas é agora 660 GRUPO DE SERVIDORES NÃO EXISTE 661 PACOTES PARA SERVIDORES DE REDISTRIBUIÇÃO 662 Regras de afectação 663 PROBLEMAS INTERNOS 664 Ação realizada 665 NENHUMA MÁQUINA FOI SELECIONADA. GRUPO DE SERVIDOR NÃO CRIADO 666 Grupo de servidores criados 667 PARA O PACOTE 668 afetar com que regra? 669 ATENÇÃO: existem dobrões de prioridade
A única regra será mantida! 670 A regra já contém este nome 672 Esta regra não existe! 673 Administração das regras de afectação 674 NOME DA REGRA 675 PRIORIDADE 676 VALOR MÁQUINA 677 OPERADOR 678 VALOR SERVIDOR 679 NOME 680 DOMINIO 681 USUÁRIO 682 Para adicionar uma condição suplementar 683 Validar a regra 684 Os campos a seguir devem ser apreendidos 685 Adicionar a regra 686 A condição 687 Você não pode apagar isto! 688 Pacotes são afetados neste grupo! 689 Pacotes são afetados neste servidor! 690 Você nçao pode apagar todas as máquinas 691 Valores Genéricos: $IP$ e $NAME$ 692 Você irá modificar TODOS os valores dos servidores 693 Você irá modificar TODOS os valores dos seguintes servidores 694 para encontrar o valor padrão, valide os campos nulos 695 Você irá modificar o grupo de servidores 696 mostrar pacotes ativado para afetar 697 a máquina 698 o grupo de servidores 699 Tem certeza de querer afectar este pacote nessas máquinas? 700 Escolhas de Lista Negras 701 Lista Negra de números seriais 702 Adicionar um novo número serial para a Lista Negra 703 Lista Negra 704 Está certo que deseja uma adicionar a uma lista negra 705 Está certo que deseja remover de uma lista negra 706 Removido da Lista Negra 707 este número de série 708 este endereço MAC 709 Customizado PROLOG_FREQ 710 Customizado download 711 Tomadas em modificações de contas 712 Arquivo de dicionário 713 Está certo que deseja substituir este dicionário 714 Dicionário de referencia 715 Escolha um dicionário para modificar 716 Atualize o arquivo de dicionário 717 customizado 718 Ignore 719 (por segundo) 720 Tempo de espera entre 2 ciclos de implantação 721 Tempo de espera entre 2 ciclos de download 722 Tempo de espera entre 2 ciclos de implantação 723 Prioridade máxima de
pacotes baixados (os pacotes de prioridade superior são ignorados) 724 Tempo de contato entre 2 entre o agente e o servidor 725 (na hora) 726 URL do servidor de redistribuição (IP $ e $ NAME são os valores genéricos) 727 Diretório de destino dos pacotes. 728 Inventário 729 computadores 730 horas 731 Recurso nomeados na base de cada seção de inventário. 732 milissegundo(s) 733 Inativo 734 Arquivo de Inventário 735 Filtros 736 Permitem que o computador de grupos de recurso 737 número aleatório computados no intervalo definido. Projetado para evitar a computação de muitos grupos no mesmo processo 738 Especificar a validade de grupos computador (padrão: calculá-lo uma vez por dia - veja o offset) 739 Melhorias de Seguranças futuras 740 Validade do bloqueio de um computador 741Configure automação para atualização do inventário sobre a CHECKSUM valor (agente de carga inferior registrado DB) 742 Faça a automação considerar um inventário como uma transação (menor concorrencia, melhor uso de disco) 743 Configurar a automação para fazer uma atualização diferencial de seções de inventário (nível de linha). Baixa carga DB registrado, maior carga de Interface do usuário 744 Aceitar um inventário somente se solicitado pelo servidor (Recusa inventário "forçado") 745 Especifique quando a automação irá limpar o cache da estrutura de inventário 746 Especifique a diferença mínima para substituir um agente descobridor de IP "ipdiscover" 747 Desativar o tempo antes de uma primeira eleição (não recomendado) 748 Habilitar grupos de descoberta de IP "ipdiscover"(por exemplo, você pode querer impedir que alguns grupos a serem agentes ipdiscover) 749 Use com injector-ocsinventory, permitir que as entidades multi recurso 750 Gerar arquivo compactado ou XML ou texto plano 751 Especifique se você deseja manter o traço de todo o inventário entre a sincronização com o servidor de nível superior 752 Caminho para o diretório de arquivos OCS (deve ser gravável (+w)) 753 Ativar pilha de filtro PROLOG 754 Habilitar sistema de filtro principal para modificar algumas coisas "on the fly - na mosca" 755 Ativar filtro de população de inventário. Um endereço de IP dedicado, é permitido para o envio de um novo computador apenas uma vez neste período 756 Periodo definido por INVENTORY_FILTER_FLOOD_IP 757 Ativar pilha de filtro de inventário 758 Especifique se você deseja acompanhar pacotes afectados a um grupo no nível do computador 759 É necessário ser superior ou igual 760 Serviço WEB 761 Habilita/Desabilita o serviço SOAP 762 Resultado por tamanho (esteje ciente dos problemas de desempenho) 763 Incluir arquivos de seus próprios módulos 764 Opções a seguir não são configuráveis pelo GUI.
(edite manualmente ocsinventory-server.conf) 765 Todos os programas 766 SEM RESULTADO 767 CAUTELA: RESULTADO FILTRADO 768 Numero de gravações 769 Transferência feita 770 ATUALIZADO DE 771 Esta categoria já existe 772 O nome da categoria não pode ser nulo 773 Você deve selecionar o nome da categoria 774 Você está tentando fazer uma transferência da categoria para a mesma categoria (Impossível) 775 Diretório de criação de pacote 776 Diretório de participação em cache das análises de "ipdiscover" 777 Validade da Seção 778 Número de GRUPO DE TRABALHO diferente(s) 779 Diferente TAG 780 Diferente IPSUBNET 781 Máquinas tem um software implantação pendentes 782 Máquinas com um pacote de erro 783 Número diferente de OS 784 Agente diferente 785 Processadores diferentes 786 Resoluções diferentes 787 Máquinas com um processador >= 788 Máquinas com um processador =< 789 Máquinas com um processador entre 790 Máquinas com memória RAM >= 791 Máquinas com memória RAM =< 792 Máquinas com memória RAM entre 793 Maquinas com base 794 Máquinas em atividade 795 Máquinas que conectaram ao servidor hoje 796 Numeros de máquinas inventáriadas hoje 797 Máquinas não vistas a mais de 798 ATIVIDADE 799 HARDWARE 800 SENÃO 801 Não mostre esse campo 802 Mostre esse campo 803 Conta em dias que a máquina já não se conecta com o servidor 804 Velocidade mínima de processador 805 Velocidade máxima de processador 806 Montante mínimo de RAM 807 Montante máximo de RAM 808 Repartição 809 GRUPOS ESTÁTICOS 810 GRUPOS DINAMICOS 811 Tem certeza de querer modificar a visibilidade do grupo 812 O software em 0 está presente no cache, mas não são mais resolvidos nas máquinas.
Eles não podem ser colocados em uma categoria do dicionário 813 Disco rígido com espaço restante > 814 Disco rígido com espaço restante < 815 Disco rígido com espaço restante entre 816 Disco rígido com espaço máximo restante 817 Disco rígido com espaço máximo restante 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volume Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one server group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection ? 901 Action sur le résultat de la requête 902 Action sur le résultat de la sélection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect packageuet 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 Vo you cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The netword ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Linux (ALL) 966 Windows (ALL) 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 PTo come back to a standard state, you will have to cli on the icon e which is at the right top of the interfaceace 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Soft search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your email is not valid 1056 Contact your OCS administrator 1057 Failed to connect to mailserver 1058 no email is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' fonction is not activate. 1075 Active it for use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of Note 1127 Autor of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on server group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Configuration profiles files directory 1253 Directory of old conf profiles files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profile 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profile (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 Your install.php exists in your installation directory. 2021 Your logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default SQL login/password is activate on your database: 2025 Change your login password for 'ocs' user in MySQL 2026 The default login/password is activate on OCS-NG GUI 2027 Change your 'admin' password on OCS-NG GUI 2028 Authentication key 2030 OCS Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 automatic install launched 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySql for PHP is not properly installed.
Try installing mysql for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your mysql server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet mysql value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySql authentication problem. 2047 You must add the 'old-passwords' in your mysql configuration file (my.ini). Then restart mysql, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySql config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB mysql engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your mysql config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP mysql engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet mysql value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: Zip for PHP is not properly installed.
Try uncommenting extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try installing the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forget to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/english/000077500000000000000000000000001303466605000254455ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/english/english.png000077500000000000000000000022311303466605000276050ustar00rootroot00000000000000PNG  IHDRPLTE{s A }tRNS@fbKGDH pHYs  tIME"6`gIDATx}R[!pЪ+`Yakɋȃq3 g+{y%ҮS]3Wȩ|w&8zN盼;&syO]UL=#p'!F&h^F1V7MҖ[9e >}ɟfe)T.r09&IY&/Rg)YɺʅɛK+3fdȍ,:-Gȭ,nY+NwQ+Ne#뒿w;@KA Dle69Ԡu+YO.kB6gI\=KzY3w5%\,2 z7fd}$.99jg)nTVsesΝʚ pYu~Á7>'d1:~x%zMN~whf䑞~o70[C 2-.鷴hYzKzZ{ڞ äGAIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/english/english.txt000077500000000000000000001232741303466605000276530ustar00rootroot000000000000002 All computers 9 Search with various criteria 13 Send 17 Agent 18 Revision 19 Software version 20 Software 23 Computer 24 User 25 Operating system 26 Memory 27 Memory Speed (MHz) 28 Computer count 30 Search 31 Choose a parameter 32 Choose 33 Domain 34 IP address 35 Computer name 36 Serial number 41 Reset 42 No result 43 Main menu 45 Free space 46 Last inventory 48 Computer details 49 Name 50 Swap 51 Comments 52 Visible 53 Description 54 Processor(s) 55 Number 56 Administrative data 61 Video card 62 Resolution 63 Storage 64 Manufacturer 65 Model 66 Type 67 Disk size 69 Editor 70 Designation 79 Printer(s) 80 Caption 81 Status 82 Network(s) 83 Capacity 84 Interface 85 Letter 86 File System 87 Total 88 Free 90 Result(s) 91 Input devices 92 Disk(s) 93 Controller(s) 94 Slot number 95 MAC address 96 Sound 97 Monitor(s) 103 Update 107 Config 108 Registry requests 111 Windows licence 113 Cancel 114 Register 115 Update 116 Add 119 Do you really want to delete computer 122 Delete 129 LIKE 130 DIFFERENT 134 Add a new file in the database 135 Be careful, you're about to delete this file permanently ! 137 File 140 Super administrators 141 Administrators 142 Local administrators 143 teledeploy requesters 162 Remove Selected 168 This format file is invalid (it must be exe) 170 The same file already exists ! 171 File deleted 172 An error is appeared, the file 173 don't be added to the base 174 Security 175 Duplicates 176 IP 177 Merge redundant computers 178 Computers per tag 180 User not registered 182 Computers having a given tag 183 Download 184 This file does not contain "use constant version" 185 Version must be over 1 186 This file does not contain the ver file 187 This file is not a valid zip file 188 Back 189 You must select at least 2 computers 190 Accountinfo: 191 deleted 192 Duplicates summary 193 Hostname + Serial number 194 Hostname + MAC address 195 MAC address + Serial number 196 Hostname only 197 Serial only 198 MAC address only 199 Duplicates 200 Corresponding relay decremented 201 SMALLER 202 BIGGER 203 BETWEEN 204 OUT OF 205 Enabled 206 saved for 207 Gateway 208 Netmask 209 BIOS Version 210 BIOS Date 211 Registry 212 Key name 213 Key value 214 Print this page 215 Show everything 216 ASSETTAG 217 Password 218 Agent versions 219 uninventoried network interfaces 220 deleted 221 IP gathering computers 222 Warning ! All selected computers are going to be merged in a single computer! Are you sure? 223 Information 224 Value 225 Admininfo 226 was successfully deleted from accountinfo table 227 Are you sure you want to delete the column 228 Enter the new administrative info 229 Text (255) 230 Integer 231 Real 232 Date 233 Current data 234 was successfully inserted 235 Users 236 Change pass 237 New password 238 Confirmation 239 You must fill every field 240 Your passwords differs 241 Your password was successfully modified 242 Administrator 243 User 244 Add a new user 245 was successfully deleted 246 Are you sure you want to delete user 247 MySQL login 248 MySQL password 249 Can't connect to MySQL. Please enter a valid login/password. 250 MySQL HostName 251 Logout 252 Name (you choose) 253 Registry hive 254 Path of the key (Ex: SOFTWARE\Mozilla) 255 Name of the key that will be read (* for all) 256 Choose 257 Registry key 258 Registry key value 259 Error, the data could not be inserted (special characters are not allowed) 260 Label file modification ok 261 Label file deleted 262 Type in a label 263 Label file configuration 264 No label file now 265 Anything 266 Invalid date 267 dd/mm/yyyy 268 Speed 269 %m/%d/%Y 270 Modem(s) 271 Slot(s) 272 Port(s) 273 BIOS 274 OS Name 275 OS Version 276 Chipset 277 Version 278 Driver 279 Port 280 MIB Type 281 DHCP IP 282 Gateways 283 Purpose 284 BIOS Manufacturer 285 Select a parameter to be modified 286 Service pack 287 Local import 288 Local importation 289 Network information 290 Ip querying 291 Expert mode 292 Add / delete a network device 293 Network devices types 294 Subnet names 295 Localization 296 Id 297 Can't write in directory 298 All fields must be filled 299 Invalid IP address (must be: x.x.x.x) 300 Invalid mask: must be: x.x.x.x 301 Network inserted 302 Network deleted 303 Add a subnet 304 Network name 305 Uid 306 Subnet list 307 Add a type 308 Type name 309 Network devices types 310 IpDiscover less than 311 Hosts 312 IpDiscover 313 Gateway computers 314 IpDiscover gateway computers 315 Non inventoried computers 316 Subnet 317 ANALYZE 318 DNS name 319 Network analyze results 320 This analyze was already done on 321 do you want to see cached data? 322 Data from cache 323 generated on 324 HOSTS EVALUATED AS 325 empty 326 no mask typed 327 Computer details 328 Discovered 329 Inventoried 330 NetBIOS Name 331 Network number 332 Please wait... 333 Add a new network device 334 Network devices list 335 Device type 336 Device description 337 THE PROGRAM DID NOT SEND ANYTHING 338 Limited mode 339 You need ipdiscover-util.pl (Linux only) for expert mode 340 Show 341 can't be launched, you must set execution rights 342 You need to set writing rights on the root directory in order to use 344 Error 345 THIS ANALYZE IS CURRENTLY RUNNING, PLEASE TRY AGAIN IN A FEW MINUTES 346 BEFORE 347 AFTER 348 Windows user 349 Add column 350 CPU type 351 CPU number 352 Last come 353 Quality 354 Fidelity 355 Company 356 Owner 357 User agent 358 Jokers: ? (one character), * (several characters) 359 Monitor serial 360 Manufactured on (week/year) 362 The network 363 already exists 364 Inventoried 365 Non- inventoried 366 Identified 367 Devices of network 368 of network 369 Submitted by 370 Deployment 371 All components 372 Choose the components 373 Registered user 374 Updated user 375 OCS-NG Agent Version 376 Computer locked. Please retry in a few minutes 377 Processor Speed (MHz) 380 Dictionary 381 Number of installation 382 Software name 383 The page 384 Move ALL 385 to a new category 386 OR 387 to an existing category 388 Category 389 Nothing 390 Dictionary categories 391 Category name 393 Search 394 Search Category 395 Search software EVERYWHERE 396 Reset 397 Go to the category 398 Categories list 410 EXACTLY 411 Fields must contain only numbers ! 412 Registry key gathering functionality 413 Automatic update functionality 414 Automatic deployment functionality 415 Deletion logging functionality (needed by GLPI) 416 Logging functionality 417 Automatic software distribution functionality 418 Differentiate inventories functionality 419 Maximum number of day before an ipdiscover computer is replaced 420 Automatic software distribution: see documentation. 421 Automatic software distribution: see documentation. 422 Automatic software distribution: see documentation. 423 Automatic software distribution: see documentation. (Packages with a higher or equal priority won't be downloaded anymore). 424 Validity of a package as from its consideration by the agent 425 Max number of computers per gateway retrieving IP on the network 426 Validity of inventories. (ALWAYS: inventory at each login. NEVER: no inventory) 427 Defines criteria that must be equal for two computers to be automatically merged 428 Deploy 429 Frequency 430 Mass processing 431 Activate 432 Non notified 433 Affect 434 Package builder 435 Build new packages 436 Can't open file 437 Your package was successfully created in the directory 438 New package building 439 Protocol 440 Priority 441 Digest algorithm 442 Digest encoding 443 Action 444 Command 445 Path 446 File name 447 User notifications 448 Warn user 449 Text 450 Countdown 451 User can abort 452 User can delay 453 Installation completion need user action 454 NO 455 YES 456 Execute 457 Store 458 Launch 459 Countdown must be a number 460 Unique identifier 461 Digest 462 Total size 463 Fragments size 464 Fragments number 465 Package activation 466 WARNING: Can't find information file at 467 WARNING: Can't find fragments files at 468 Are you sure to want to activate this package? 469 Package activated, it can now be affected 470 Https url 471 Fragments url 472 ERROR: Can't delete directory 473 Timestamp must be a number 474 Timestamp must be 10 digits long 475 Timestamp 476 Or activate a package manually 477 Affect a package 478 Computer(s) 479 No computer selected 480 fragments 481 Activated packages 482 WAITING NOTIFICATION 483 Validate SUCCESSES 484 Custom frequency 485 Always inventoried 486 Never inventoried 487 Custom 488 Default 489 IpDiscover behaviour 490 NEVER IpDiscover 491 ALWAYS IpDiscover of network 492 ELECTED IpDiscover of network 493 Default (can be elected) 494 Custom inventory frequency 495 Inventoried every 496 day(s) 497 Default, uses the 'FREQUENCY' parameter. 498 Package 499 Server 500 Customization 501 Add package 502 Elected 503 Force elected 504 Not elected 505 Electable 506 Not electable 507 HAVING 508 NOT HAVING 509 ANY 510 No package 511 seconds 512 Deployment 513 Build 514 Activate 515 Activated 516 KB 517 This option can only be affected to one computer at a time. 518 Force IpDiscover 519 Computer already elected for network 520 Computer already FORCED ipdiscover for network 521 Computer already FORCED unelectable 522 Standard computer 523 Revert back to standard state 524 NEVER affect again 525 ARE YOU SURE? 526 NO COMPUTER AFFECTED 527 January 528 February 529 March 530 April 531 May 532 June 533 July 534 August 535 September 536 October 537 November 538 December 539 Sunday 540 Monday 541 Tuesday 542 Wednesday 543 Thursday 544 Friday 545 Saturday 546 in state 547 all 548 All but SUCCESS 549 File (deployed on client computers) 550 File (not mandatory, may be used by "execute" commmand) 551 This package name already exists 552 You must make a computer search, and then click 'deploy' to affect these activated packages
You may also affect a package to a single computer by using the 'customization' tab of any computer details
. 553 Windows key 554 Monitor: serial 555 Monitor: manufacturer 556 Monitor: caption 557 Userdomain 558 Affected packages 559 This file is not .ocs 560 To server 561 Unknown (deleted package) 562 Show networks having uid: 563 Manufacturer 564 Agent auto-launching frequency 565 Address used for local inventories 567 Ipdiscover latency 568 RAM (MB) 569 CPU (MHz) 570 Help 571 Validate all 572 Success 573 Errors 574 Stats 575 Unaffect not notified 576 Customized ipdiscover 577 Group name 580 All computers (replay) 581 All computers (cached) 582 and 583 Groups 584 For the request 585 For selection 586 New group 587 New static group 588 Overwrite group 589 statically add to group 590 Reset state 591 Include statically 592 Exclude statically 593 Creation date 594 Cache generated on 595 STATIC GROUP 596 DYNAMICALLY INCLUDED 597 STATICALLY EXCLUDED 598 Include 600 Exclude 601 Mass affectation 602 You need to send a file 603 No computer found, please check your file 604 computer(s) successfully affected(s) 605 computer(s) failed 606 Computers file 607 Group 608 created 609 overwritten 610 STATICALLY INCLUDED 611 NO CACHE 612 STATIC 613 DYNAMIC 614 EXCLUDED 615 Query 616 Perimeter of user 617 New 618 Perimeter 619 Local user 620 No computer in your perimeter. 621 The group was not created. Its name is already in use 622 Cached 623 The information you are trying to access does not exist 624 Do you really want to delete group 625 Enable this alteration 626 Disable this alteration 627 At least one of the fields is empty... Not made Update. 628 Redistribution Servers 629 New group of redistribution 630 A group of existing redistribution 631 Add to 632 Crush 633 Management redistribution groups 634 Wished action 635 New name 637 Replace 638 THE GROUP'S NAME CAN'T BE EMPTY 639 THIS GROUP'S REDISTRIBUTION NOT EXIST 640 Do you really want to delete 641 Management of the redistribution servers 642 the group 643 All machine 644 this machine 645 GROUP DETAIL 646 URL 647 PORT NUMBER 648 REPERTOIRE STORE 649 AUTOMATIC 650 MANUAL 651 Redistribution group 652 Machine(s) 653 Blacklist MAC address 654 Enter a new MAC address for blacklist 655 Insertion made 656 This datum already exists in the list 657 Fields in red are in error!!! (Empty fields or size < 2) 658 machine don't have redistribution servers.
It is thus necessary to affect this package individually. 659 Machines already have this teledeploy package. This package's status for these machines is now 660 GROUP OF REDISTRIBUTION NOT EXIST 661 PACKAGES FOR REDISTRIBUTION 662 Rules of affectation 663 INTERNES PROBLEM 664 Action made 665 NO SELECTED MACHINE. GROUP OF REDISTRIBUTION NOT CREATED 666 Group of redistribution made 667 FOR THE PACKAGE 668 to Affect with which rule? 669 ATTENTION: there are doubloons of priority
A single rule will be retained! 670 A rule already carries this name 672 This rule does not exist!!! 673 Administration of the rules of affectation 674 NAME OF THE RULE 675 PRIORITY 676 MACHINE VALUE 677 OPERATOR 678 SERVER VALUE 679 NAME 680 DOMAIN 681 USER 682 to Add a supplementary condition 683 Validate the rule 684 The following fields must be seized 685 Add a rule 686 The condition 687 You cannot delete it. 688 Packages are affected on this goupe! 689 Packages are affected on this server! 690 You cannot delete all the machines. 691 Generic Values: $IP$ and $NAME$ 692 You modify ALL the values of the servers 693 You modify the values of the following server: 694 to find the default values, validate the vacuous fields 695 You modify the group of redistribution 696 to Show packages activated to affect on 697 a machine 698 a group of redistribution 699 Are you sure to want to affect this package in these machines? 700 Blacklist choices 701 Blacklist of serial number 702 Enter a new serial number to blacklister 703 Blacklist 704 Are you sure to want to blacklister 705 Are you sure to want to unblacklister 706 Unblacklister 707 this serial number 708 this MAC address 709 Customized PROLOG_FREQ 710 Customized download 711 Taken into account modifications 712 Language file 713 Are you sure to replace this language file 714 Reference language file 715 Choose the language file to modify 716 Update the language file 717 customized 718 Ignore 719 (per second) 720 Waiting time between 2 cycles of deployment 721 Waiting time between 2 downloaded fragments 722 Waiting times between 2 periods of deployment 723 maximum priority of the downloaded packages
(The packages of a superior priority are ignored) 724 Time between 2 contacting between the agent and the server 725 (in the hour) 726 URI of the servers of redistribution ($IP and NAME$ are the generic values) 727 Directory of destination of packages. 728 Inventory 729 computers 730 hours 731 Feature of appointed on the base to every section of inventory. 732 milisecond(s) 733 Inactive 734 Inventory files 735 Filters 736 Enable the computer's groups feature 737 Random number computed in the defined range. Designed to avoid computing many groups in the same process 738 Specify the validity of computer's groups (default: compute it once a day - see offset) 740 Validity of a computer's lock 741 Configure engine to update inventory using the CHECKSUM agent value (lower DB backend load) 742 Make engine consider an inventory as a transaction (lower concurency, better disk usage) 743 Configure engine to make a differential update of inventory sections (row level). (Lower DB backend load, higher frontend load) 744 Accept an inventory only if required by server (refuse "forced" inventory) 745 Specify when the engine will clean the inventory cache structures 746 Specify the minimal difference to replace an ipdiscover agent 747 Disable the time before a first election (not recommended) 748 Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents) 749 Use with ocsinventory-local, enable the multi entities feature 750 Generate either compressed file or clear XML text 751 Specify if you want to keep trace of all inventory between to synchronisation with the higher level server 752 Path to ocs files directory (must be writable) 753 Enable prolog filter stack 754 Enable core filter system to modify some things "on the fly" 755 Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period 756 Period definition for INVENTORY_FILTER_FLOOD_IP 757 Enable inventory filter stack 758 Specify if you want to track packages affected to a group on computer's level 759 Must be greater than or equal to 760 Webservice 761 Enable/Disable the soap service 762 Result page size (be aware of performances issues) 763 Include file of your own modules 764 Options below are not settable by GUI.
(see ocsinventory-server.conf) 765 All softwares 766 NO RESULT 767 BE CAREFUL: RESULT WITH FILTER 768 Number of recording 769 Transfer Made 770 UPDATE OF 771 This category already exists 772 The category's name can't be null 773 You must select category's name 774 You try to make a transfer of the category towards the same category 775 Directory of creation of packages 776 Directory of stake in cache of the analyses of ipdiscover 777 Validity of a session 778 Number of different WORKGROUPs 779 Different TAGs 780 Different IPSUBNETs 781 Machines having a software deployment pending 782 Machines having a package error 783 OS Versions 784 Agent Versions 785 Different processors 786 Different resolutions 787 Machines with a processor >= 788 Machines with a processor =< 789 Machines with a processor between 790 Machines with RAM >= 791 Machines with RAM =< 792 Machines with RAM between 793 Machines in DB 794 Machines Inventoried 795 Machines contacted today 796 Machines Inventoried today 797 Machines not seen in more than 798 ACTIVITY 799 HARDWARE 800 OTHER 801 Don't show this field 802 Show this fied 803 Counts in the daytime since the machine don't contact server 804 Minimum speed processor 805 Maximum speed processor 806 Minimum RAM amount 807 Maximum RAM amount 808 Repartition 809 STATIC GROUPS 810 DYNAMIC GROUPS 811 Are you sure to want to modify the visibility of the group 812 The software in 0 is present in CACHE but are not any more settled on machines.
They cannot be put in a category of dictionary 813 hard disk number with remaining size > 814 hard disk number with remaining size < 815 hard disk number with remaining size between 816 hard disk maximum remaining size 817 hard disk minimum remaining size 818 Remove from group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volumn Name 844 Group: Id 845 Group: Static? 846 Software: Company 847 Software: Name 848 Software: Version 849 Software: Install directory 850 Software: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one redistribution group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: Results Filtered 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criteria 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection? 901 Action on the query result 902 Action on the result of selection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect package 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 You cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The network ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criteria results 979 To come back to a standard state, you will have to click on the icon e which is at the right top of the interface 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 Login 996 Last name 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Path on remote server 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Software search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your e-mail is not valid 1056 Contact your OCS-NG administrator 1057 Failed to connect to mailserver 1058 no e-mail is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' function is not activate. 1075 Activate this functionality to use it 1076 ERROR: SEARCH STATUS IS NOT DEFINED 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Count 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of note 1127 Author of note 1128 Notes 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) already exist in redistribution group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all subnets 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING: No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data is updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Configuration profiles files directory 1253 Directory of old conf profiles files 1254 Directory of scripts logs 1255 Connection number by day 1256 Bad connection number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profile 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 MMDDYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profile updated 1275 Profiles can't be deleted. 1276 Profile created 1277 Default profile (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order sent 1283 Do you want a Wake On Lan on this computer 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1303 Export 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 1328 Manage 1329 Administration 1330 Hardware 1331 Devices 1332 Miscellaneous 1333 Configuration 1334 No data available in table 1335 Showing _START_ to _END_ of _TOTAL_ entries 1336 Showing 0 to 0 of 0 entrie 1337 (filtered from _MAX_ total entries) 1338 Show _MENU_ entries 1339 Loading... 1340 Processing... 1341 Search: 1342 No matching records found 1343 First 1344 Last 1345 Next 1346 Previous 1347 activate to sort column ascending 1348 activate to sort column descending 1349 Show / Hide 1350 , 1351 . 1352 Server understood the request but request content was invalid 1353 Unauthorised access 1354 Forbidden ressource can't be accessed 1355 Page not found 1356 Request-URI Too Long, try to clean Cookies 1357 Internal Server Error 1358 Service Unavailable 1359 User Logged Out 1360 Server informations 1361 My account 1362 About 1363 OK 1364 Cancel 1365 My account 1366 First name 1367 Network 1368 CPU 1369 PHP Version 1370 Web Server 1371 Database Server 1372 Kernel 1373 Distribution 1374 Access the website 1375 Old Forums 1376 Q&A 1377 Question and answers 1378 Free RAM 1379 RAM installed 1380 Reset table columns 1381 Actions 1382 Motherboard Serial 1383 Motherboard Manufacturer 1384 Motherboard Model 1385 Update user 1386 Create user 1387 System 1388 Network 1389 Hardware 1390 Agent 1391 This field is mandatory 1392 Invalid value 1393 This package name already exists 1394 This field should only contain numbers and alphanumeric characters 1395 A profile with this name already exists. Please pick a new one 1396 Identifier (ex: admin) 1397 Display name (ex: Administrators) 1398 Copy profile data 1399 Create profile 1400 Users 1401 Profiles 1402 Identifier 1403 Create user 1404 Some errors were found while validating the profile 1405 The profile was successfully created 1406 An error occurred while trying to create the profile, please check the filesystem or contact an administrator 1407 The profile file is not writable 1408 The profile was successfully updated 1409 An error occurred while trying to update the profile, please check the filesystem or contact an administrator 1410 Users 1411 Display name 1412 Edit profile 1413 New label 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 Your install.php exists in your installation directory. 2021 Your logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default SQL login/password is activate on your database: 2025 Change your login password for 'ocs' user in MySQL 2026 The default login/password is activate on OCS-NG GUI 2027 Change your 'admin' password on OCS-NG GUI 2028 Authentication key 2029 The config directory is not writable 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successful) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb) or user (ocs), don't forget to update the file 'z-ocsinventory-server.conf' in your Apache configuration directory 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 2113 Your PHP installation is older than version 5.3.7 and will not be compatible with incoming versions ( version : 2114 No sql file found for version 2115 The user you typed does not seem to be root 2116 The config/profiles directory is not writable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Select columns to show / hide 6003 Plugin 6004 Total available 6005 Power on/off 6006 WARNING : Please install php-soap, the plugin engine can't work without it 7000 Plugins 7001 Plugins manager 7002 Plugin's name 7003 Version 7004 Licence 7005 Author 7006 Last updated 7007 Are you sure you want to delete this plugin 7008 Plugin Install 7009 Installed Plugins 7010 This plugin has been already installed 7011 is an invalid plugin, check your sources. 7012 Installation aborted ! 7013 installed 7014 There is currently no plugin available for installation 7015 Select at least one computer ! ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/french/000077500000000000000000000000001303466605000252615ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/french/french.png000077500000000000000000000005561303466605000272450ustar00rootroot00000000000000PNG  IHDRHYTPLTEcccRBJs1!-B pHYs  tIME ' ~IDATx1 XA A% b(ALWAYS: toujours inventorié, NEVER:inventaires désactivés) 427 Définit les critères devant être identiques pour qu'une fusion automatique ait lieu 428 Télédéployer 429 Fréquence 430 Traitement par lots 431 Activer 432 Non notifiés 433 Affecter 434 Fabrication d'un paquet de télédéploiement 435 Créer des paquets 436 Ne peut pas ouvrir le fichier: 437 Votre paquet a bien été créé dans le répertoire 438 Création d'un nouveau paquet 439 Protocole 440 Priorité 441 Algorithme de digest 442 Encodage digest 443 Action 444 Commande 445 Chemin 446 Nom du fichier 447 Interactions utilisateur 448 Prévenir utilisateur 449 Texte 450 Compte à rebours 451 L'utilisateur peut annuler 452 L'utilisateur peut remettre à plus tard 453 La fin de l'installation nécessite une intervention utilisateur 454 NON 455 OUI 456 Exécuter 457 Stocker 458 Lancer 459 Le compte à rebours doit être un nombre 460 Identifiant unique 461 Digest 462 Taille totale 463 Taille fragment 464 Nombre de fragments 465 Activation de paquets 466 ATTENTION: Le fichier d'information est introuvable à l'adresse 467 ATTENTION: Les fragments sont introuvables à l'adresse 468 Etes-vous sûr de vouloir tout de même activer le paquet avec ces paramètres ? 469 Paquet activé, il peut maintenant être affecté 470 Serveur https 471 Serveur de fichiers 472 ERREUR: Ne peut supprimer le répertoire 473 Le timestamp doit être un nombre 474 Le timestamp doit faire dix chiffres de long 475 Timestamp 476 Ou activer un paquet manuellement 477 Affecter un paquet 478 Machine(s) 479 PAS DE MACHINE SELECTIONNEE 480 fragments 481 Paquets activés 482 ATTENTE NOTIFICATION 483 Valider SUCCES 484 Fréquence personnalisée 485 Toujours inventorié 486 Jamais inventorié 487 Personnalisé 488 Défaut 489 Comportement IpDiscover 490 Forcé JAMAIS IpDiscover du réseau 491 Forcé TOUJOURS IpDiscover du réseau 492 ELUE IpDiscover du réseau 493 Standard (éligible) 494 Fréquence d'inventaire personnalisée 495 Inventorier tous les 496 jours 497 Par défaut, utilise le paramètre 'FREQUENCY' des options générales. 498 Paquet 499 Serveur 500 Traitements personnalisés 501 Ajouter paquet 502 Elu 503 Elu forcé 504 Non élu 505 Eligible 506 Non éligible 507 AYANT 508 N'AYANT PAS 509 INDIFFERENT 510 Pas de paquet 511 secondes 512 Télédéploiement 513 Création 514 Activation 515 Activés 516 Ko 517 Cette option ne peut être affectée que pour une machine à la fois 518 Forcer IpDiscover 519 Machine déjà ELUE ipdiscover pour le réseau 520 Machine déjà FORCEE ipdiscover pour le réseau 521 Machine déjà FORCEE inéligible ipdiscover 522 Machine standard 523 Remettre dans l'état par défaut 524 Ne PLUS JAMAIS affecter 525 ETES-VOUS SUR ? 526 PAS DE MACHINE AFFECTEE 527 Janvier 528 Février 529 Mars 530 Avril 531 Mai 532 Juin 533 Juillet 534 Août 535 Septembre 536 Octobre 537 Novembre 538 Décembre 539 Dimanche 540 Lundi 541 Mardi 542 Mercredi 543 Jeudi 544 Vendredi 545 Samedi 546 dans l'état 547 tous 548 Tout sauf SUCCESS 549 Fichier (déployé sur les ordinateurs clients) 550 Fichier (facultatif, peut être utilisé par "exécuter") 551 Ce nom de paquet est déja utilisé 552 Vous devez faire une recherche multicritères puis cliquer sur 'Télédéployer' pour affecter un de ces paquets activés à des machines
Vous pouvez aussi affecter un paquet à une machine unique en utilisant l'onglet 'Traitements personnalisés' dans les détails d'une machine
. 553 Clé Windows 554 Ecran: numéro de série 555 Ecran: fabricant 556 Ecran: description 557 Domaine de l'utilisateur 558 Paquets affectés 559 Ce fichier n'est pas un .ocs 560 Vers serveur 561 Inconnu (paquet supprimé) 562 Afficher les réseaux ayant l'uid: 563 Constructeur 564 Fréquence de lancement de l'agent par le service 565 Adresse utilisée pour les imports locaux 567 Latence de l'ipdiscover 568 RAM(MB) 569 CPU(MHz) 570 Aide 571 Tout valider 572 Succès 573 Erreurs 574 Stats 575 Désaffecter non notifiés 576 Ipdiscover personnalisé 577 Nom du groupe 580 Toutes les machines (rejouer) 581 Toutes les machines (cache) 582 et 583 Groupes 584 Pour la requête 585 Pour la sélection 586 Créer groupe 587 Créer groupe statique 588 Ecraser groupe 589 Ajouter statiquement à 590 Réinitialiser état 591 Inclure statiquement 592 Exclure statiquement 593 Date de création 594 Régénération du cache 595 GROUPE STATIQUE PUR 596 INCLU DYNAMIQUEMENT 597 EXCLU STATIQUEMENT 598 Inclure 600 Exclure 601 Affectation de masse 602 Vous devez envoyer un fichier 603 Aucune machine n'a été trouvée, merci de vérifier votre fichier 604 machine(s) affectée(s) avec succès. 605 machine(s) en erreur 606 Fichier des machines à affecter 607 Groupe 608 créé 609 écrasé 610 INCLU STATIQUEMENT 611 PAS CACHE 612 STATIQUE 613 DYNAMIQUE 614 EXCLU 615 Requête 616 Périmètre de l'utilisateur 617 Nouveau 618 Périmètre 619 Utilisateur restreint 620
Vous n'avez aucune machine affectée, merci de faire une demande d'affectation de droits

en spécifiant sur quels tags vous devez avoir la visibilité. 621 Ce groupe n'a pas été créé. Ce nom existe déjà. 622 En cache 623 L'information que vous essayez de voir n'existe pas. 624 Voulez-vous vraiment supprimer le groupe 625 Valider les modifications 626 Annuler les modifications 627 Au moins un des champs est vide... Mise à jour non effectuée. 628 Serveurs de redistribution 629 Nouveau groupe de redistribution 630 Un groupe de redistribution existants 631 Ajouter à 632 Ecraser 633 Gestion des groupes de redistribution 634 Action désirée 635 Nouveau nom 637 Remplacer 638 LE NOM DU GROUPE NE PEUT ETRE VIDE 639 CE GROUPE DE REDISTRIBUTION N EXISTE PAS 640 Etes-vous sûr de vouloir supprimer 641 Administration des serveurs de redistribution 642 le groupe 643 TOUTES les machines 644 la machine 645 DETAILS DU GROUPE 646 URL 647 NUMERO DU PORT 648 REPERTOIRE STORE 649 AUTOMATIQUE 650 MANUELLE 651 Groupe de redistribution 652 Machine(s) 653 Blacklist d'adresse MAC 654 Entrez une nouvelle adresse MAC à blacklister 655 Insertion effectuée 656 Cette donnée existe déjà dans la liste 657 Les champs en rouge sont en erreur!!! (champs vides ou taille <2) 658 machines n'ont pas de serveurs de redistribution.
Il faut donc affecter ce paquet individuellement. 659 machines ont déjà ce paquet télédéployé. Le statut de ce paquet pour ces machines est donc à nouveau 660 GROUPE DE REDISTRIBUTION INEXISTANT 661 PAQUETS POUR LA REDISTRIBUTION 662 Règles d'affectation 663 PROBLEME INTERNE 664 Action effectuée 665 AUCUNE MACHINE SELECTIONNEE. GROUPE DE REDISTRIBUTION NON CREE 666 Groupe de redistribution créé 667 POUR LE PAQUET 668 Affecter avec quelle règle? 669 ATTENTION: il existe des doublons de priorité
Une seule règle sera retenue! 670 Une règle porte déjà ce nom 672 Cette règle n'existe pas!!! 673 Administration des règles d'affectation 674 NOM DE LA REGLE 675 PRIORITE 676 VALEUR MACHINE 677 OPERATEUR 678 VALEUR SERVEUR 679 NOM 680 DOMAINE 681 UTILISATEUR 682 Ajouter une condition supplémentaire 683 Valider la règle 684 Les champs suivants doivent être saisis 685 Ajouter une règle 686 La condition 687 Vous ne pouvez pas le supprimer. 688 Des paquets sont affectés sur ce groupe! 689 Des paquets sont affectés sur ce serveur! 690 Vous ne pouvez pas supprimer toutes les machines. 691 Valeurs génériques: $IP$ et $NAME$ 692 Vous modifiez TOUTES les valeurs des serveurs 693 Vous modifiez les valeurs du serveur suivant: 694 Pour retrouver les valeurs par défaut, valider les champs à vide 695 Vous modifiez le groupe de redistribution 696 Visualiser les paquets activés à affecter sur 697 une machine 698 un groupe de redistribution 699 Etes-vous sûr de vouloir affecter ce paquet à ces machines? 700 Choix Blacklist 701 Blacklist de numéro de série 702 Entrez un nouveau numéro de série à blacklister 703 Blacklist 704 Etes-vous sûr de vouloir blacklister 705 Etes-vous sûr de vouloir déblacklister 706 Déblacklister 707 ce numéro de série 708 cette adresse MAC 709 Cycles de latence personnalisés 710 Paramètres de téléchargements personnalisés 711 Modifications prises en compte 712 Fichier langue 713 Etes-vous sûr de vouloir remplacer le fichier de langue 714 Fichier de langue de référence 715 Choisir le fichier de langue à modifier 716 Remplacer le fichier de langue 717 personnalisé 718 Ignorer 719 (en seconde) 720 Temps d'attente entre 2 cycles de télédéploiement 721 Temps d'attente entre 2 fragments téléchargés 722 Temps d'attente entre 2 périodes de télédéploiement 723 Priorité maximum des paquets téléchargés
(Les paquets d'une priorité supérieure sont ignorés) 724 Temps entre 2 prises de contacts entre l'agent et le serveur 725 (en heure) 726 URI des serveurs de redistribution ($IP$ et $NAME$ sont les valeurs génériques) 727 Répertoire de destination des paquets. 728 Inventaire 729 ordinateurs 730 heures 731 Fonctionnalité de commit sur la base à chaque section d'inventaire. 732 milliseconde(s) 733 Inactif 734 Fichiers inventaire 735 Filtres 736 Active la fonctionnalité de groupes de machines 737 Nombre aléatoire compris entre 0 et la valeur définie (évite le calcul simultané de tous les groupes) 738 Spécifie la validité d'un groupe (par défaut : calculé une fois par jour - voir la valeur précédente)739 Amélioration futur de la sécurité 740 Validité du lock d'un ordinateur 741 Configuration du moteur pour mettre à jour les sections d'inventaire en fonction du CHECKSUM (pour baisser la charge de DB backend ) 742 Faire que le moteur considère un inventaire comme une transaction (accès concurrentiel plus bas, meilleure utilisation du disque) 743 Configuration du moteur pour une mise à jour différentielle des sections d'inventaire (au niveau des rangées). Diminue la charge du backend DB, augmente la charge du frontend 744 N'accepter un inventaire que si une session est active (refus du /FORCE) 745 Indique quand le moteur nettoiera les structures en cache de l'inventaire 746 Spécifie la différence minimale pour remplacer un agent ipdiscover 747 Désactive la durée avant une première élection (non recommandé) 748 Active les groupes pour ipdiscover (par exemple, vous souhaitez empêcher certains groupes d'être des agents ipdiscover) 749 Utiliser avec ocsinventory-injector, active la fonctionnalité multi entités 750 Génère ou bien un fichier compressé, ou bien un fichier texte XML en clair 751 Spécifie si vous souhaitez garder une trace de tous les inventaires entre une synchronisation avec un serveur de plus haut niveau 752 Chemin vers le répertoire des fichiers ocs (les droits d'écriture doivent être activés) 753 Active la pile du filtre du prolog 754 Autorise le système de filtre à modifier des choses "à la volée" 755 Active le filtre anti-flooding d'inventaire. Une même adresse IP ne peut envoyer un nouvel ordinateur qu'une seule fois dans la période 756 Définition de la période pour INVENTORY_FILTER_FLOOD_IP 757 Active la pile de filtre d'inventaire 758 Spécifie si vous souhaitez suivre les paquets affectés à un groupe de niveau ordinateur 759 Doit être supérieur ou égal à 760 Webservice 761 Activer/désactiver le webservice 762 Taille de la page de résultats (a des conséquences sur les performances) 763 Fichiers d'inclusion de vos propres extensions 764 Ces options ne sont pas modifiables par la GUI.
(modifier directement dans ocsinventory-server.conf) 765 Tous les logiciels 766 AUCUN RESULTAT 767 ATTENTION: RESULTATS AVEC FILTRE 768 Nombre d'enregistrement 769 Transfert effectué 770 MISE A JOUR DE 771 Cette catégorie existe déjà 772 Le nom de la nouvelle catégorie ne peut être nul 773 Vous devez sélectionner un nom de catégorie 774 Vous essayez de faire un transfert de la catégorie vers la même catégorie 775 Répertoire de création des paquets 776 Répertoire de mise en cache des analyses d'ipdiscover 777 Durée de validité d'une session 778 Nombre de WORKGROUP différents 779 TAG différents 780 Sous-réseaux différents 781 Machines ayant un paquet en cours de télédéploiement 782 Machines ayant un paquet en erreur 783 Nombre d'OS différents 784 Agents différents 785 Processeurs différents 786 Résolutions différentes 787 Machine avec un processeur >= 788 Machine avec un processeur =< 789 Machine avec un processeur entre 790 Machine avec RAM >= 791 Machine avec RAM =< 792 Machine avec RAM entre 793 Machines en base 794 Machines vues 795 Machines ayant pris contact aujourd'hui 796 Nombre d'inventaires aujourd'hui 797 Machines absentes depuis plus de 798 ACTIVITE 799 MATERIEL 800 DIVERS 801 Ne plus afficher cette donnée 802 Afficher cette donnée 803 Nombre de jours depuis que la machine n'a pas pris contact 804 Vitesse processeur minimum 805 Vitesse processeur maximum 806 Taille RAM minimum 807 Taille RAM maximum 808 Répartition 809 GROUPES STATIQUES 810 GROUPES DYNAMIQUES 811 Etes-vous sûr de vouloir modifier la visibilité du groupe 812 Les logiciels à 0 sont présents en cache mais ne sont plus installés sur les machines.
Ils ne peuvent pas être mis dans une catégorie de dictionnaire 813 Nombre disque dur avec taille restante > 814 Nombre disque dur avec taille restante < 815 Nombre disque dur avec taille restante entre 816 Taille disque restante maximum 817 Taille disque restante minimum 818 Sortir du groupe 819 machine(s) ajoutée(s) au groupe 820 Dernier contact 821 MODIFICATION DE LA CONFIGURATION DU SERVEUR 822 Personnaliser 823 Par défaut 824 Activation des logs de l'interface 825 Répertoire des logs 826 Adresse où se trouvent les fragments des paquets de télédéploiement à activer 827 Adresse où se trouvent les fichiers INFO des paquets de télédéploiement à activer 828 Suppression des machines dont l'inventaire est plus vieux de 829 Répertoire de création des paquets de redistribution 830 Adresse du serveur Ldap 831 Port du serveur Ldap 832 Nom de la base Ldap + dc 833 Nom du champ définissant le login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Ajouter un RSX 836 Administrer les TYPES 837 Vous n'avez pas accès à cette donnée 838 Disque: Lettre de lecteur 839 Disque: Type 840 Disque: Format 841 Disque: Capacité 842 Disque: Espace libre 843 Disque: Nom du volume 844 Groupe: Id 845 Groupe: Statique? 846 Logiciels: Société 847 Logiciels: Nom 848 Logiciels: Version 849 Logiciels: Répertoire install 850 Logiciels: Commentaires 851 Bios: Fabricant ordi 852 Bios: Modèle 853 Bios: Numéro de Série 854 Bios: Type ordi 855 Bios: Fabricant 856 Bios: Version 857 Bios: Date 858 Moniteur: Fabricant 859 Moniteur: Nom 860 Moniteur: Description 861 Moniteur: Type 862 Moniteur: Numéro de série 863 Réseaux: Description 864 Réseaux: Type 865 Réseaux: TypeMib 866 Réseaux: Vitesse 867 Réseaux: Adresse MAC 868 Réseaux: Status 869 Réseaux: Adresse IP 870 Réseaux: Masque IP 871 Réseaux: IP Sous-Réseaux 872 Réseaux: IP Passerelle 873 Réseaux: IP DHCP 874 Clé de registre: Nom 875 Clé de registre: Valeur 876 DESaffectation simple GROUPE REDISTRIBUTION 877 DES MACHINES N'ONT PAS ETE AJOUTEES AU GROUPE CAR: 878 Rappel: une machine ne peut faire partie que d'un seul groupe de redistribution 879 GROUPE REMPLACE 880 GROUPE CREE 881 machines ajoutées 882 machines supprimées du groupe 883 Restreindre l'affichage 884 ATTENTION: Visualisation AVEC FILTRE 885 inconnu 886 DESaffectation simple 887 Il est aussi possible que ce paquet ne soit pas affecté sur leur serveur de redistribution 888 Suppression 889 connecté en tant que 890 L'interface est actuellement verrouillée sur une recherche multicritère 891 DEVERROUILLER l'interface 892 se connecter avec un autre compte 893 PAS DE TAG AFFECTE A VOTRE PROFIL 894 PAS DE NIVEAU DE DROITS DEFINI POUR VOTRE PROFIL 895 Modification d'un TAG 898 Ajouter une annotation 899 Rédacteur 900 Etes-vous sûr de vouloir supprimer la sélection? 901 Action sur le résultat de la requête 902 Action sur le résultat de la sélection 903 Le champ d'explication est obligatoire 904 Réaffectation du paquet 905 Explication des actions effectuées
sur le poste pour permettre
l'affectation du paquet 906 Suppression du télédéploiement du paquet 907 Explication de la suppression du paquet
sur cette machine 908 Infos du terminal mobile 909 MODIFICATION NON EFFECTUEE: NOUVEAU PROFIL INCORRECT 910 Valider 911 Changement de profil de 912 Exporter la liste des machines ayant ces logiciels 913 Nombre d'interfaces réseau non inventoriées 914 Nombre d'agent n'envoyant plus d'inventaire depuis au moins 915 messages 916 La valeur doit être supérieur à 917 valeur de FREQUENCY 918 Différentiel entre LASTDATE et LASTCOME 919 Etes-vous sûr de vouloir supprimer ce message 920 ERREUR, le fichier demandé n'existe pas. 921 Supprimer cette catégorie 922 Pour Fusionner, il faut au moins sélectionner 2 machines 923 Vous n'avez aucun ordinateur en compte 924 REQUETE D'EXTRACTION NON CONFORME! 925 Fonctionnalité FUSER 926 Login Fuser: 927 LE CACHE N'EST PAS REGENERE PAR CETTE ACTION 928 Visualisation des logs 929 la gestion des sous-reseaux n'est pas faite en local. 930 Vous ne pouvez donc pas ajouter/modifier/supprimer des sous-réseaux 931 Modifier un sous-réseau 932 L'adresse IP ne peut pas être vide 933 Le nom du réseau ne peut pas être vide 934 L'ID du réseau ne peut pas être vide 935 L'adresse du masque ne peut pas être vide 936 Le type ne peut pas être vide 937 Ce type existe déjà 938 Nouveau type 939 Les machines présentes dans le groupe 940 Toutes les machines ayant ce paquet 941 AFFICHAGE DES STATISTIQUES SUR 942 Vous devez mettre un commentaire pour ce périphérique 943 Vous devez choisir le type de périphérique 944 Donnée entrée par 945 Modification d'un périphérique 946 Ajout d'un nouveau périphérique 947 Liste des périphériques non identifiés 948 Liste des périphériques identifiés 949 Id de la machine 950 NOM FICHIER 951 FICHIER CREE LE 952 FICHIER MODIFIE LE 953 TAILLE 954 Une perte de SESSION a eu lieu 955 PAS DE SYSTEME TROUVE EN BASE 956 Toutes les erreurs 957 Tous les SUCCESS 958 PROBLEME DE VALEUR DE TELEDEPLOIEMENT 959 TROP DE LOGICIELS REMONTES. SOYEZ PLUS PRECIS DANS LA RECHERCHE 960 AUCUN LOGICIEL CORRESPONDANT A LA RECHERCHE 961 LISTE DE 962 (une ',' entre chaque) 963 DIFFERENT LISTE DE 964 Nom de la partition 965 Ecran 966 Agent 967 APPARTIENT 968 N'APPARTIENT PAS 969 Historique des paquets 970 Paquets 971 SUPPRESSION DES MACHINES DU GROUPE 972 Les machines ont bien été enlevées du groupe 973 AJOUT DES MACHINES AU GROUPE 974 machines insérées dans le cache 975 Ajouter au groupe 976 LOCK de L'INTERFACE SUR LE RESULTAT DE LA REQUETE 977 LOCK 978 Vous aller verrouiller toute l'interface sur les résultats de cette recherche multicritère 979 Pour revenir à un état normal, vous cliquerez sur l'icône se trouvant en haut à droite de l'interface 980 Paquets sur les machines 981 Paquets sur les groupes de redistribution 982 AUCUNE REGLE D'AFFECTATION N'EXISTE. PAS DE REDISTRIBUTION POSSIBLE. 983 Vous devez choisir sur quel type doit s'effectuer les modifications 984 Modifications 985 SUPPRESSION DE MACHINES 986 SUPPRIMER LES MACHINES POUR 987 Cette clé de registre existe déjà 988 TOUS LES CHAMPS SONT OBLIGATOIRES 989 LES DONNEES N EXISTENT PAS. LES HEURES DES ETATS NE SONT PAS PRESENTES EN BASE POUR CE PAQUET 990 Paquets créés manuellement 991 Paquets créés automatiquement 992 Estimation du temps de télédéploiement 993 Les champs en rouge sont en erreur 994 PDA/SMARTPHONE 995 Login 996 Nom 997 ID utilisateur obligatoire 998 choisissez un profil valide 999 Cet ID utilisateur existe déjà 1000 Notifié 1001 Les champs en rouge sont en erreur! 1002 Temps estimé de déploiement 1003 Paramètre du paquet des serveurs de redistribution 1004 Impossible de créer le répertoire de création des paquets 1005 La création de paquet est donc impossible 1006 ne possède pas les droits d'écriture 1007 Le répertoire 1008 Utilisation sur ce paquet de la redistribution 1009 Chemin sur le serveur 1010 NORMAL 1011 DEBUG 1012 LANGUE 1013 MAINTENANCE 1014 Passer en mode 1015 Mode de fonctionnement 1016 Identifiant ROOT 1017 Mot de passe ROOT 1018 (Laisser à vide pour une connexion anonyme) 1019 Lock du résultat 1020 Libellé du TAG 1021 Gestion des télédéploiements 1022 Gestion des TAG 1023 paquets affectés dans l'état 1024 vont être supprimés 1025 Désaffecter 1026 paquets supprimés sur les machines 1027 Categories 1028 Nouveau 1029 Ignore 1030 Unchanged 1031 Demandes 1032 Activer le workflow pour le télédéploiement 1033 Inf. demandeur 1034 Inf. générales Paquet 1035 Inf. techniques Paquet 1036 Inf. validation 1037 Nom du paquet 1038 Demandeur 1039 Priorité 1040 Utilisateur notifié 1041 Utilisateur peut reporter 1042 Entraine un reboot 1043 Actions de contrôle pour valider l'installation 1044 Par liste 1045 Par visuel 1046 Statut 1047 INFO 1048 Ajouter un fichier 1049 ACTION INTERDITE 1050 Recherche logiciels 1051 Recherche 1052 Historique 1053 Demande modifiée 1054 Demande effectuée 1055 Votre adresse mail n'est pas valide 1056 Contactez votre administrateur OCS-NG 1057 Impossible de se connecter au serveur de mail 1058 Aucun email n'est valide 1059 Données existantes 1060 Nouvelle donnée 1061 Onglet 1062 Champ 1063 Libellé 1064 Champ obligatoire 1065 Champ restreint 1066 Lié à un statut 1067 Ce nom de champ est déjà utilisé 1068 Le nom du champ ne peut pas être vide 1069 Ajout de la valeur effectuée 1070 Nouveau Champ 1071 Type de champ 1072 Suivi des demandes 1073 Faire une demande 1074 La fonctionnalité 'Workflow' n'est pas activée. 1075 Veuillez activer la fonctionnalité pour l'utiliser 1076 ERROR: STATUS RECHERCHE NON DEFINI 1077 Niveau de création de paquet 1078 Niveau de test 1079 Niveau du périmètre restreint 1080 Niveau du périmètre total 1081 Signalement par mail 1082 Groupe des administrateurs du workflow 1083 Identification des périmètres 1084 Nom du groupe de test 1085 Nom du groupe du périmètre restreint 1086 Libellé du TAG de définition du paramètre 1087 Valeur du tag de test 1088 Valeur du tag du périmètre restreint 1089 Aucun status n'est actif. Commencer par en activer un. 1090 a modifié la demande n° 1091 Une nouvelle demande vient d'être postée 1092 a posté une nouvelle demande 1093 La base de donnée est incomplète 1094 Veuillez rejouer l installation complète de la base 1095 Admin status 1096 Liste des champs 1097 Liste des onglets 1098 Nom du champ 1099 Valeur par défaut 1100 Liste des statuts 1101 Ce champ n'est pas modifiable 1102 Statut actif 1103 ID du statut 1104 Niveau 1105 La fonctionnalité de Workflow pour le télédéploiement est activée 1106 Il n'est possible de créer un paquet que si une demande préalable existe 1107 Et qu'elle soit en statut de création de paquet 1108 Configuration LDAP 1109 Filtrer 1110 L'affectation d'un paquet dépend du statut de la demande 1111 Nom du premier attribut qui sera utilisé pour évaluer le niveau de sécurité d'un utilisateur LDAP (vide pour aucun) 1112 Valeur du premier attribut qui sera utilisé pour évaluer le niveau de sécurité d'un utilisateur LDAP (vide pour aucun) 1113 Si le premier attribut est trouvé et la valeur correspond, réglez ce profil d'utilisateur automatiquement 1114 Nom du deuxième attribut qui sera utilisé pour évaluer le niveau de sécurité d'un utilisateur LDAP (vide pour aucun) 1115 Valeur du deuxième attribut qui sera utilisé pour évaluer le niveau de sécurité d'un utilisateur LDAP (vide pour aucun) 1116 Si le second attribut est trouvé et la valeur correspond, réglez ce profil d'utilisateur automatiquement 1117 E-mail 1118 Editer 1119 Sélectionner 1120 Quantité 1121 Mise à jour effectuée 1122 Wiki 1123 IRC 1124 Forums 1125 Pourcentage 1126 Date de la note 1127 Auteur de la note 1128 Note 1129 PAQUET SUPPRIME 1130 EDITION LANGUE 1131 Mot 1132 ID mot 1133 Nouveau libellé 1134 Pas de donnée Ipdiscover 1135 machine(s) sont déjà présentes dans le groupe de redistribution 1136 Snmp 1137 Activer/désactiver le snmp 1138 Afficher tous mes réseaux 1139 Administrer 1140 Administrer les sous-réseaux 1141 Sous-réseau ajouté 1142 Ajouter un sous-reseau à blacklister 1143 Masque sous-reseau 1144 Adresse MAC non valide. (format XX.XX.XX.XX.XX.XX) 1145 La valeur doit être comprise entre 1146 Administrer les profils 1147 Vous ne pourrez pas le modifier. 1148 ATTENTION: Aucune sauvegarde automatique des fichiers de configuration ne sera possible 1149 Nom du nouveau profil 1150 Profil de référence 1151 Libellé du profil 1152 ATTENTION: la suppression des profils peut entraîner une instabilité de OCS-NG 1153 Nom du profil 1154 Sur les machines 1155 Sur le workflow de télédéploiement 1156 Administrer le workflow de téléploiement 1157 Sur les champs du workflow de télédéploiement 1158 Sur l'activation des paquets 1159 Sur les adresses MAC 1160 Sur les numéros de série 1161 Sur les sous-réseaux de l'ipdiscover 1162 Administrer la télédiff 1163 Modifier la configuration 1164 Administrer les groupes 1165 Administrer la console 1166 Voir les messages d'alerte de la GUI 1167 Administrer les accountinfos 1168 Peut changer les accountinfos des machines 1169 Peut changer son groupe d'appartenance 1170 Administrer les profils 1171 Administrer les groupes des profils 1172 Administrer l'ipdiscover 1173 Information du profil 1174 Pages utilisateur 1175 Restrictions 1176 Droits Blacklist 1177 Droits configuration 1178 Ce champ 1179 est une variable. Il ne peut contenir de caractères spéciaux. 1180 ne peut pas être vide 1181 Fonctionnalité Serveur de redistribution 1182 Vous ne pouvez pas administrer les règles de redistribution, la fonctionnalité est désactivée 1183 Liste des paquets à créer 1184 Clé ajoutée 1185 Clé modifiée 1186 Vos données ont été mises à jour 1187 En cours de configuration 1188 Ce groupe est déclaré comme un périmètre de TEST 1189 Ce groupe est déclaré comme un périmètre RESTREINT 1190 Vous ne pouvez affecter des paquets que de niveau supérieur à 1191 Rappel: la configuration du workflow de télédéploiement est actuellement sur 1192 Groupe pouvant recevoir des paquets de TEST 1193 Groupe pouvant recevoir des paquets de périmètre RESTREINT 1194 Seuls les paquets de niveau supérieur à 1195 peuvent être affectés 1196 Profil 1197 Fonctionnalité SNMP 1198 Scans réseaux 1199 Version SNMP 1200 Valeur modifiée 1201 Ecran 1202 Linux (TOUS) 1203 Windows (TOUS) 1204 IpDiscover 1205 Administrer les communautés SNMP 1206 Répertoire du fichier des communautés SNMP 1207 Ajouter une communauté 1208 Communauté ajoutée 1209 Communauté modifiée 1210 Account info: 1211 URL du fichier des communautés SNMP 1212 Communauté supprimée 1213 Séparateur des fichiers d'export 1214 Configurer le moteur pour mettre à jour l'inventaire snmp en se basant sur la table snmp_laststate (charge inférieure backend DB) 1215 Serveur Blade 1216 Pare-feu 1217 Répartiteur de charge 1218 Switch(s) 1219 Cartes 1220 Cartouches 1221 Disques 1222 Ventillateurs 1223 Alimentation 1224 Bacs 1225 Capacité maximale 1226 Couleur 1227 Contact 1228 Identifiant SNMP 1229 Firmware 1230 Nom du volume 1231 le format de fichier doit être en ZIP 1232 le format de fichier doit être en TAR.GZ 1233 Nom de la base donnée 1234 La description ne peut pas être vide 1235 Référence 1236 Version du logiciel 1237 Version du firmware 1238 Date d'installation 1239 MHz 1240 MB 1241 Nombre de périphériques SNMP remontés 1242 d/m/y 1243 Seuls les fichiers ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe et ocspackage.exe peuvent être envoyés 1244 Le fichier ne peut pas être vide 1245 Administrer les clients OCS-NG 1246 Affecter à nouveau 1247 Architecture 1248 Répertoire 1249 Activation du cache des tableaux (permet de moins soliciter la base MySQL) 1250 Vitesse de télédéploiement 1251 Statistiques 1252 Répertoire des fichiers de conf profils 1253 Répertoire des sauvegardes des fichiers de conf profils 1254 Répertoire des logs des scripts 1255 Nombre de Connexion par jour 1256 Nombre d'erreurs de connexion par jour 1257 Utilisation du flash dans la GUI 1258 Entrée Manuelle 1259 Sur une semaine 1260 Sur un mois 1261 Vider le cache 1262 Aucun module activé pour votre profil 1263 ALERTE SECURITE! 1264 Suite 1265 Activation des tables de cache 1266 Machines Virtuelles 1267 Type de Machine Virtuelle 1268 Uuid 1269 Machine hébergée par 1270 DDMMYYYY 1271 Liste des machines du sous-réseau 1272 Supprimer ses machines 1273 Vous n'avez pas le droit de supprimer une machine 1274 Profil mis à jour 1275 Les profils ne peuvent être supprimés. 1276 Profil créé 1277 Profil par défaut (vide pour aucun) 1278 Vous n'êtes pas autorisé à vous connecter 1279 WOL 1280 Wake On Lan 1281 Sur le Wake On Lan 1282 Ordre de Wake On Lan envoyé 1283 Exécuter un Wake On Lan sur cette machine 1292 Utiliser les options avancées de téléploiement 1293 Forcer le télédéploiement 1294 Heure d'installation 1295 Date d'installation 1296 Offres commerciales 1297 Numéro d'identification 1298 Gestion des QRCode 1299 QRCode 1300 Vérifier QRCode 1301 Sur les paquets invisibles 1302 Développement 1303 Exporter 1304 XML 1305 Sur la génération XML d'un inventaire 1306 Gérer les plugins 1307 Plugins actifs 1308 Ajouter plugins 1309 Options de télédéploiement 1310 Arrêt 1311 Redémarrage 1312 Taille transfert du bus 1313 Taille adressage des données 1314 Nombre de coeurs logiques 1315 Fréquence de fonctionnement 1316 Type de socket 1317 Nombre de coeurs 1318 Cache L2 1319 Tension 1320 Utiliser , pour séparer les informations 1321 Aucun port WOL défini 1322 Impossible d'ouvrir la socket pour le WOL 1323 Serveur de partage imprimante 1324 Partage imprimante sur serveur 1325 Résolution format horizontal/vertical 1326 Partagée 1327 Local/Réseaux 1328 Gestion 1329 Administration 1330 Matériel 1331 Périphériques 1332 Divers 1333 Configuration 1334 Aucune donnée dans le tableau 1335 Affichage de _START_ à _END_ de _TOTAL_ résultats 1336 Affichage de 0 à 0 de 0 résultat 1337 (Filtré depuis _MAX_ résultats) 1338 Afficher _MENU_ résultats 1339 Chargement en cours... 1340 Traitement en cours... 1341 Rechercher: 1342 Aucun résultat à afficher 1343 Premier 1344 Dernier 1345 Suivant 1346 Précédent 1347 activer pour trier la colonne par ordre croissant 1348 activer pour trier la colonne par ordre décroissant 1349 Afficher / Cacher 1350 . 1351 , 1352 Contenu de la requête invalide 1353 Accès non autorisé 1354 Les droits ne sont pas suffisants pour accéder à la ressource demandée 1355 Page non-trouvée 1356 L'URL demandé est trop long, essayez de supprimer les cookies d'OCS ( vous serez déconnecté ) 1357 Erreur interne du serveur 1358 Le service n'est pas disponible 1359 Utilisateur déconnecté 1360 Informations du serveur 1361 Mon compte 1362 A propos 1363 OK 1364 Annuler 1365 Mon compte 1366 Prénom 1367 Réseau 1368 CPU 1369 Version de PHP 1370 Serveur Web 1371 Serveur SQL 1372 Kernel 1373 Distribution 1374 Accéder au site 1375 Anciens Forums 1376 Q&R 1377 Questions et réponses 1378 RAM disponible 1379 RAM totale 1380 Afficher les colonnes par default 1381 Actions 1382 Numéro de série de la carte mère 1383 Fabriquant de la carte mère 1384 Modèle de la carte mère 1385 Modifier un utilisateur 1386 Créer un utilisateur 1387 Système 1388 Réseau 1389 Matériel 1390 Agent 1391 Ce champ est obligatoire 1392 Cette valeur n'est pas valide 1393 Ce nom de paquet existe déjà 1394 Ce champ doit contenir uniquement des nombres et des lettres 1395 Un profil avec ce nom existe déjà 1396 Identifiant (ex: admin) 1397 Nom affiché (ex: Administrateurs) 1398 Copier les données du profil 1399 Créer un profil 1400 Utilisateurs 1401 Profils 1402 Identifiant 1403 Créer un utilisateur 1404 Des erreurs ont été rencontrées durant la validation de ce profil 1405 Le profil a été créé avec succès 1406 Une erreur s'est produite durant la création du profil, veuillez vérifier le système de fichiers ou contacter un administrateur 1407 Impossible d'écrire dans le fichier du profil 1408 Le profil a été mis à jour avec succès 1409 Une erreur s'est produite durant la modification du profil, veuillez vérifier le système de fichiers ou contacter un administrateur 1410 Utilisateurs 1411 Nom affiché 1412 Modifier profil 1413 Nouveau label 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERREUR: 2002 ERREUR: ligne 2003 ERREUR MySQL: 2004 (Utilisation d'un nouveau compte OCS) 2005 Sous-réseaux 2006 AVERTISSEMENT: 2007 Compte 2008 Erreur 2009 a échoué 2010 hôte 2011 Login 2012 n'est pas inséré 2013 nécessaires 2014 mot de passe 2015 requêtes 2016 réussie 2017 à l'aide 2018 a été importé 2019 étaient déjà importés 2020 Le fichier install.php est présent dans votre répertoire d'interface. 2021 Le répertoire de LOGS n'est pas ouvert en écriture 2022 Vous ne pouvez envoyer un fichier d'une taille supérieur à 2023 Supprimez le. 2024 Le compte/mot de passe par défaut est actif sur votre base de donnée: 2025 Changer le mot de passe du compte 'ocs' dans MySQL 2026 Le compte/mot de passe par défaut de l'interface WEB est actif 2027 Changer le mot de passe du compte 'admin' dans l'interface web 2028 Authentication key 2029 Le répertoire config n'est pas disponible en écriture 2030 Installation d'OCS-NG Inventory 2031 version actuellement installée 2032 est inférieur à cette version 2033 Installation automatique lancée. 2034 Le fichiers de configuration de BDD n'est pas valide. Installation automatique lancée 2035 ERREUR: Les sessions pour PHP ne sont pas installées correctement.
Essayez d'installer le paquet php-session. 2036 AVERTISSEMENT: XML pour PHP n'est pas installé correctement, vous ne serez pas en mesure d'utiliser ipdiscover-util. 2037 ERREUR: MySQL pour PHP n'est pas installé correctement.
Essayez d'installer MySQL pour PHP paquet (Debian: php5-mysql) 2038 AVERTISSEMENT: La librairie GD de PHP n'est pas installée correctement.
Les graphiques ne seront utilisables qu'en flash
Pour corriger cela, essayez en décommentant extension = php_gd2.dll (Windows) en supprimant le point-virgule dans le fichier php.ini, ou essayez d'installer le paquet php5-gd (Linux). 2039 AVERTISSEMENT: OpenSSL pour PHP n'est pas installé correctement.
Certaines fonctionnalités de déploiement automatique ne sera pas disponible
Essayez en décommentant extension = php_openssl.dll (Windows) en supprimant le point-virgule dans le fichier php.ini, ou essayez d'installer le paquet php-openssl (Linux). 2040 AVERTISSEMENT: Vous ne serez pas en mesure de construire un paquet de déploiement d'une taille plus grande que 2041 Vous devez modifier post_max_size et upload_max_filesize dans php.ini, pour augmenter cette limite. 2042 AVERTISSEMENT: votre mot de passe root par défaut est défini sur votre serveur MySQL. Changez-le dès que possible. (Mot de passe root => vide) 2043 AVERTISSEMENT: L'utilisateur que vous avez tapé ne semble pas être root
Si vous rencontrez un problème avec l'insertion des fichiers, essayez de définir la valeur de max_allowed_packet de MySQL à au moins 2 Mo sur votre serveur le fichier de configuration. 2044 Label ajouté 2045 Label pas encore ajouté (Au lancement du client, aucune demande de TAG ne sera faite) 2046 ERREUR: problème d'authentification MySQL. 2047 Vous devez ajouter les "old-passwords" dans votre fichier de configuration MySQL (my.ini). Puis redémarrer MySQL, et relancez install.php 2050 Installation terminée, vous pouvez vous connecter avec le login = admin et pass = admin 2051 Cliquez ici pour entrer dans l'interface OCS-NG 2052 ERREUR: impossible d'écrire dans le répertoire (dans dbconfig.inc.php), veuillez définir les droits nécessaires pour installer ocsinventory (vous devez ajouter les droits d'écriture, et relancer l'installation) 2053 Patientez, mettre à jour la base de données peut prendre jusqu'à 30 minutes ... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Base de données générée 2056 Fichier de config MySQL correctement écrit 2057 mise à jour de la base de données existante 2058 contrôle du moteur de base de données ... 2059 ERREUR: requête de mise à jour a échoué 2060 ERREUR: requête SHOW TABLE STATUS a échoué 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Moteur de base mis à jour 2064 table(s) modifiée(s) 2065 ERREUR: Le programme d'installation terminée en erreur, relancez install.php une fois que les problèmes sont corrigés 2066 AVERTISSEMENT: le répertoire "files" est manquants, il est impossible d'importer 2067 dès qu'il 2068 n'a pas été inséré. Vous devez définir la valeur de max_allowed_packet MySQL pour au moins 2 Mo 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 AVERTISSEMENT: Un ou plusieurs fichiers ont été déjà insérés 2072 les fichiers de déploiement ont été insérés 2073 Table 'files' tronquée 2074 Table 'files' était vide 2076 Pas de fichier subnet.csv à importer 2077 Insertion des réseaux de subnet.csv 2078 ERREUR: Impossible d'insérer le réseau 2079 dans le tableau de sous-réseau, l'erreur 2080 AVERTISSEMENT: Réseau 2081 n'a pas été inséré (ip valide ou un masque 2082 Network netid computing. Please wait... 2083 ERREUR: Impossible de mettre à jour netid 2084 netid réseau a été calculé 2085 étaient déjà calculés 2086 ne sont pas calculables 2087 Netmap netid computing. Please wait... 2089 a été calculé netid NETMAP 2090 Effacement des orphelins... 2091 ERREUR: Impossible d'effacer 2092 lignes orphelines supprimées 2093 Suppression de NETMAP... 2094 ERREUR: Impossible d'effacer NETMAP 2095 lignes NETMAP supprimées 2096 Entrer le label pour les clients windows (fenêtre de saisie lors du lancement du client): 2097 Laissez vide si vous ne voulez pas qu'une popup s'affiche au premier lancement de l'agent 2098 ERROR: ZIP for PHP is not properly installed.
Try uncommenting extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try installing the libphp-pclzip package (Linux). 2099 ERROR: ce compte MySQL n'a pas les droits de création de database 2100 Update anciens accountinfos 2101 Ajouté par script 2102 ATTENTION: Si vous changer le nom de la base (ocsweb), pensez à modifier vos fichiers de conf moteur (file z-ocsinventory-server.conf) 2103 Mode DEMO: vous ne pouvez mettre à jour les données 2104 VOUS ETES SUR LA VERSION DE DEMO LA 2105 Votre base de données est à jour.
Aucune action a effectuer. 2106 La configuration max_allowed_packet de MySQL n'autorise que des fichiers de < 2107 La version de votre interface WEB est inférieur à la version de la base de données 2108 La version de la base de données doit OBLIGATOIREMENT être inférieure ou égale à la version de l'interface WEB 2109 Version actuelle 2110 Version attendue 2111 Effectuer la mise à jour 2112 Le fichier suivant n'est pas présent ou n'est pas accessible en lecture 2113 La version actuelle de php est inferieure à la version 5.3.7 et ne sera plus compatible dans le futur ( version : 2114 Aucun fichier sql pour la version 2115 L'utilisateur que vous avez tapé ne semble pas être root 2116 Le répertoire config/profiles n'est pas disponible en écriture 5000 [DEBUG]requête d'insertion de machines =>[DEBUG] 5001 [DEBUG]REQUETE JOUEE => [DEBUG] 5002 [DEBUG] => poids: [DEBUG] 5003 [DEBUG]Régénération du cache[DEBUG] 5004 [DEBUG]forçage de la limite de cache ancienne valeur[DEBUG] 5005 [DEBUG]Utilisation total du cache[DEBUG] 5006 [DEBUG]requête count tableau[DEBUG] 5007 [DEBUG]Utilisation du cache pour le nombre de lignes[DEBUG] 5008 [DEBUG]requête du tableau[DEBUG] 5009 [DEBUG]DONNEES BRUTES[DEBUG] 5010 [DEBUG]champ de la table=[DEBUG] 5011 [DEBUG]champ de comparaison=[DEBUG] 5012 [DEBUG]valeur à chercher=[DEBUG] 5013 [DEBUG]Champ complémentaire=[DEBUG] 5014 [DEBUG]Champ AND OR=[DEBUG] 5015 [DEBUG]OUBLIE DU CHAMP COMPLEMENTAIRE SUR LA TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]champ =>[DEBUG] 5018 [DEBUG]comparaison =>[DEBUG] 5019 [DEBUG]valeur à chercher =>[DEBUG] 5020 [DEBUG]champ complementaire =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]REQUETE CONDITION NORMALE[DEBUG] 5023 [DEBUG]REQUETE CONDITION DIFF[DEBUG] 6000 Plugins 6001 Selectionner la colonne a afficher / masquer 6003 Plugin 6004 Nombre Total disponible 6005 Eteinte/allumée 6006 AVERTISSEMENT : Le module php-soap n'est pas installé, le moteur de plugin ne fonctionnera pas. 7000 Plugins 7001 Gestionnaire de plugins 7002 Nom du plugin 7003 Version 7004 Licence 7005 Auteur 7006 Dernière mise a jour 7007 Etes-vous sûr de vouloir supprimer ce plugin 7008 Installer un plugin 7009 Plugins installé 7010 Ce plugin a déja été installé 7011 est un plugin non valide, vérifiez vos sources. 7012 Installation annulée ! 7013 installé 7014 Il n'y a aucun plugin disponible 7015 Selectionner au minimum un ordinateur ! ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/german/000077500000000000000000000000001303466605000252655ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/german/german.png000077500000000000000000000001721303466605000272470ustar00rootroot00000000000000PNG  IHDRlp PLTEs;,IDATx1 0LbhXHڻUhm۶}ܝm۶^ 3N ,IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/german/german.txt000077500000000000000000001324361303466605000273130ustar00rootroot000000000000001 Anfragen 2 Alle Rechner 3 Rechner mit Software... 4 Rechner ohne Software... 5 Unity-Codes unter meiner Verantwortung 6 Geräte mit abgelaufener Garantie 7 Details zu Geräten mit abgelaufener Garantie 8 Wählen Sie Ihre Anfrage 9 Suche mit verschiedenen Kriterien 10 Rechner nach TAGS 11 Rechner nach TAGS 12 TAG-Wert 13 Senden 14 Verwaltung 15 TAGS 16 Admins 17 Agent 18 Revision 19 Software-Version 20 Software 21 erstes Datum 22 Garantiezeit abgelaufen 23 Rechner 24 Benutzer 25 Betriebssystem 26 Speicher 27 Speichertakt (MHz) 28 Anzahl Maschinen 29 Der LDAP-Server antwortet nicht 30 Suche 31 Parameter auswählen 32 Auswählen 33 Domäne 34 IP-Addresse 35 Rechnername 36 Seriennummer 37 Befehls-Buchstabe 38 Auslieferungsreihenfolge 39 Quelle 40 Code 41 Zurücksetzen 42 Kein Ergebnis 43 Hauptmenü 44 Optionen auswählen 45 Freier Speicherplatz 46 Letze Inventarisierung 47 Letzte Seite 48 Rechner Details 49 Name 50 Auslagerungsdatei 51 Kommentare 52 Lizenz 53 Beschreibung 54 Prozessor(en) 55 Anzahl 56 Administrative Informationen 57 Auftrags-Nummer 58 Auftrags-Datum 59 Code 60 Auslieferungsauftrag 61 Grafikkarte 62 Auflösung 63 Plattenspeicher 64 Hersteller 65 Modell 66 Typ 67 Festplattenkapazität 68 Ordner 69 Editor 70 Verwendung 71 Garantie 72 Eingriff(e) 73 Preis 74 Anforderungsdatum 75 Anforderungstyp 76 Eingriffsdatum 77 Eingriffstyp 78 Konto 79 Drucker 80 Überschrift 81 Status 82 Netzwerk(e) 83 Kapazität 84 Schnittstelle 85 Buchstabe 86 Dateisystem 87 Gesamt 88 Frei 89 Auslieferungsdatum 90 Ergebnis(se) 91 Eingabegeräte 92 Festplatte(n) 93 Controller 94 Einschub Nummer 95 MAC-Adresse 96 Soundkarte 97 Bildschirm(e) 98 Achtung, Sie können nur 8 Optionen wählen! 99 Rechner-Details 100 Parameter initialisieren 101 Sortieren 102 Neue Suche 103 Aktualisierung 104 direkt betroffen 105 in Einheiten 106 Konfigurationsoptionen 107 Konfiguration 108 Registry-Abfragen 109 Rechner-Typ 110 zu 111 Windows Produkt-Schlüssel 112 Garantiedatum 113 Abbrechen 114 Register 115 Update 116 Hinzufügen 117 Registry 118 Gehe zu Seite 119 Wollen Sie wirklich ID löschen 120 Null 121 Rechner löschen 122 Löschen 123 Rechner-Typ ändern 124 Neuen Geräte-Typ hinzufügen 125 Letzte 126 Nächste 127 Erste 128 Zurück 129 WIE 130 NICHT GLEICH 131 Icondatei 132 Bilddatei 133 Inventar 134 Neue Datei in Basis einfügen 135 Vorsicht, sie sind dabei diese Datei endgültig zu löschen! 136 Exportieren 137 Datei 138 Erstellen 139 Erstellen / Löschen von 140 Super-Administratoren 141 Administratoren 142 Lokale Administratoren 143 Software-Verteiler 162 Auswahl löschen 163 Service Grade Name 164 Personen verantwortlich für Unity-Tag 165 Sie müssen einen Namen oder eine Diffusionsliste für die Suche eingeben! 166 Sie müssen ein Element aus der Liste wählen! 167 Details anzeigen 168 Das Format dieser Datei ist ungültig (Nur .exe-Dateien erlaubt)! 169 zur Basis hinzufügen 170 Eine gleiche Datei existiert bereits! 171 Datei gelöscht 172 Ein Fehler ist aufgetreten, die Datei 173 wird nicht zur Basis hinzugefügt 174 IP-Discover 175 Duplikate 176 IPs 177 Doppelte Geräte zusammenführen 178 Anzahl der PCs mit Tag(s) 179 Einheit-Name 180 Nutzer nicht registriert 181 Login-Problem 182 Rechner mit bestimmtem TAG 183 Exportieren 184 Diese Datei enthält kein "use constant version" 185 Version muss grösser 1 sein 186 Diese Datei ist keine gültige .ver-Datei 187 Diese Datei ist keine gültige ZIP-Datei 188 Zurück 189 Sie müssen mindestens 2 Rechner wählen 190 Kontoinfo: 191 gelöscht 192 Zusammenfassung doppelter Geräte 193 Hostname und Seriennummer 194 Hostname und MAC-Adresse 195 MAC-Adresse und Seriennummer 196 Nur Hostname 197 Nur Seriennummer 198 Nur MAC-Adresse 199 Doppelte Geräte 200 Corresponding relay decremented 201 KLEINER 202 GRÖSSER 203 ZWISCHEN 204 VON 205 Aktiviert 206 gespeichert für 207 Gateway 208 Maske 209 BIOS-Version 210 BIOS-Datum 211 Registrierung 212 Schlüsselname 213 Schlüsselwert 214 Seite ausdrucken 215 Alles anzeigen 216 Passwort-Fehler 217 Passwort 218 Agent-Versionen 219 Unbekannte IPs 220 gelöscht 221 IP-Discover-Agent 222 Warnung! Alle gewählten Rechner werden zu einem Rechner zusammengefasst! Sind Sie sicher? 223 Information 224 Werte 225 Admin-Info 226 wurde erfolgreich aus Kontoinfo-Tabelle gelöscht 227 Sind Sie sicher, dass sie die Spalte löschen wollen? 228 Neue Administrative Informationen eingeben 229 Text (255 Zeichen) 230 Ganzzahl 231 Real 232 Datum 233 aktuelle Daten 234 wurde erfolgreich eingefügt 235 Nutzer 236 Passwort ändern 237 Neues Passwort 238 Bestätigung 239 Sie müssen jedes Feld ausfüllen 240 Die Passwörter stimmen nicht überein 241 Ihr Passwort wurde erfolgreich geändert 242 Administrator 243 Nutzer 244 Neuen Nutzer hinzufügen 245 wurde erfolgreich gelöscht 246 Sind sie sicher, dass Sie den Nutzer löschen wollen? 247 MySql-Login 248 MySql-Passwort 249 Kann nicht zum MySQL-Server verbinden, bitte gültigen Benutzer und Passwort eingeben 250 MySQL-Hostname 251 Ausloggen 252 Name (sie wählen) 253 Registry-Hive 254 Pfad des Schlüssels (z.B. SOFTWARE/Microsoft) 255 Name des Schlüssels der gelesen wird (* für alles) 256 Auswählen 257 Registrierungsschlüssel 258 Registrierungsschlüsselwert 259 Fehler, die Daten konnten nicht eingefügt werden (Sonderzeichen sind nicht erlaubt) 260 Änderung am Label ok 261 Label-Datei gelöscht 262 Label eingeben 263 Label-Datei konfigurieren 264 Keine Label-Datei vorhanden 265 Alles 266 ungültiges Datum 267 dd/mm/yyyy 268 Taktfrequenz 269 %d/%m/%Y 270 Modem(s) 271 Steckplätze 272 Port(s) 273 BIOS 274 BS-Name 275 BS-Version 276 Chipsatz 277 Version 278 Treiber 279 Port 280 MIB-Typ 281 DHCP-IP 282 Gateway(s) 283 Zweck 284 BIOS-Hersteller 285 Wählen Sie einen zu ändernden Parameter 286 Service-Pack 287 Lokaler Import 288 Lokaler Import 289 Netzwerkinformation 290 IP-Abfrage 291 Experten-Modus 292 Hinzufügen / Löschen von Netzwerkgeräten 293 Netzwerkgeräte-Typen 294 Subnetz-Namen 295 Lokalisierung 296 UID 297 Kann nicht in Verzeichnis schreiben 298 Alle Felder müssen ausgefüllt werden 299 Ungültige IP Adresse (muss sein: x.x.x.x) 300 Ungültige Netzmaske (muss sein: x.x.x.x) 301 Netzwerk eingefügt 302 Netzwerk gelöscht 303 Hinzufügen eines Subnetzes 304 Subnetz-Name (IP-Bereich) 305 UID 306 Subnetz-Liste 307 Hinzufügen eines Typs 308 Typ-Name 309 Netzwerkgeräte Typen 310 IP-Discover weniger als 311 Hosts 312 IP-Discover 313 Gateway-Rechner 314 IP-Discover Gateway-Rechner 315 Nicht inventarisierte Rechner 316 Subnetz 317 ANALYSIEREN 318 DNS-Name 319 Netzwerk-Ergebnisse analysieren 320 Diese Analyse wurde bereits gemacht auf 321 Wollen Sie die Cache-Daten sehen? 322 Daten aus dem Cache 323 generiert auf 324 HOSTS AUSGEWERTET ALS 325 leer 326 keine Maske eingegeben 327 Rechner-Details 328 Entdeckt 329 Inventarisiert 330 NetBIOS Name 331 Netzwerk-Nummer 332 Bitte warten... 333 Hinzufügen eines neuen Netzwerkgeräts 334 Netzwerkgeräte-Liste 335 Gerätetyp 336 Gerätebeschreibung 337 DAS PROGRAMM SENDETE NICHTS 338 Eingeschränkter Modus 339 Sie benötigen ipdiscover-util.pl (nur Linux) für den Experten-Modus. 340 Zeigen 341 kann nicht gestartet werden, sie müssen die Berechtigung zum Ausführen erteilen 342 Sie müssen Schreibberechtigung auf das root Verzeichnis erteilen zur Nutzung von 344 Fehler 345 DIESE ANALYSE LAEUFT GERADE, BITTE VERSUCHEN SIE ES IN EIN PAAR MINUTEN WIEDER 346 VORHER 347 NACHHER 348 Windows-Benutzer 349 Hinzufügen einer Spalte 350 CPU-Typ 351 CPU-Anzahl 352 Letzer 353 Qualität 354 Genauigkeit 355 Firma 356 Besitzer 357 Agent-Version 358 Joker: ? (ein Zeichen), * (mehrere Zeichen) 359 Bildschirm-Seriennummer 360 Hergestellt am (Woche/Jahr) 362 Das Netzwerk 363 existiert bereits 364 Inventarisiert 365 Nicht-Inventarisiert 366 Identifiziert 367 Geräte von Netzwerk 368 von Netzwerk 369 Übermittelt von 370 Entfaltung 371 Alle Komponenten 372 Komponenten auswählen 373 Registrierter Nutzer 374 Registrierte Gesellschaft 375 OCS-NG Agent-Version 376 Der Rechner ist gesperrt, bitte versuchen Sie es später erneut. 377 Taktfrequenz 380 Software-Verzeichnis 381 Anzahl 382 Software-Name 383 Die Seite 384 ALLE verschieben 385 in eine neue Kategorie 386 oder 387 in eine vorhandene Kategorie 388 Kategorie 389 Nichts 390 Verzeichnis-Kategorien 391 Kategorie-Name 392 Löschen 393 Suchen 394 Kategorie-Suche 395 Software ÜBERALL suchen 396 Zurücksetzen 397 Gehe zur Kategorie 398 Kategorie-Liste 410 GENAU 411 Felder dürfen nur Zahlen enthalten! 412 Schlüssel-Verwaltungs-Funktion 413 Automatische Aktualisierungs-Funktion 414 Automatische Entfaltung 415 Lösch-Protokoll-Funktion (benötigt von GLPI) 416 Protokoll-Funktion 417 Automatische Software-Verteilung 418 Differentiate inventories functionality. 419 Maximaler Zeitraum in Tagen bevor ein IP-Discover-Agent ersetzt wird. 420 Automatische Software-Verteilung: siehe Dokumentation. 421 Automatische Software-Verteilung: siehe Dokumentation. 422 Automatische Software-Verteilung: siehe Dokumentation. 423 Automatische Software-Verteilung: siehe Dokumentation. (Pakete mit gleicher oder höherer Priorität werden nicht mehr heruntergeladen). 424 Gültigkeit eines Pakets nach Beurteilung des Agenten 425 Maximale Anzahl von Rechnern pro Gateway deren IP gespeichert wird. 426 Gültigkeit von Warenbeständen. (IMMER: Warenbestand an jedem LOGON. NIE: kein Warenbestand) 427 Definiert die Kriterien nach denen doppelte Rechner automatisch zusammengeführt werden. 428 Verteilen 429 Taktfrequenz 430 Massenverarbeitung 431 Aktivieren 432 Nicht benachrichtigt 433 Ausführen 434 Paket-Ersteller 435 Neues Paket erstellen 436 Kann Datei nicht lesen 437 Ihr Paket wurde erfolgreich erstellt im Verzeichnis 438 Paketerstellung 439 Protokoll 440 Priorität 441 Zusammenfassungs-Algorhytmus 442 Zusammenfassungs-Kodierung 443 Aktion 444 Befehl 445 Pfad 446 Dateiname 447 Nutzer-Benachrichtigung 448 Nutzer warnen 449 Text 450 Countdown 451 Nutzer Abbruch erlauben 452 Nutzer Verschieben erlauben 453 Abschluss der Installation benötigt Nutzereingriff 454 NEIN 455 JA 456 Ausführen 457 Speichern 458 Starten 459 Countdown muss eine Zahl sein 460 UID 461 Zusammenfassung 462 Gesamtgröße 463 Fragment-Größe (1 KB min) 464 Anzahl Fragmente 465 Paket-Aktivierung 466 WARNUNG: Kann folgende Informations-Datei nicht finden: 467 WARNUNG: Kann folgende Fragment-Datei nicht finden: 468 Wollen Sie dieses Paket wirklich aktivieren? 469 Paket aktiviert, es kann jetzt verteilt werden. 470 HTTPS-Adresse 471 Fragment-Adresse 472 FEHLER: kann Verzeichnis nicht löschen! 473 Zeitstempel muss eine Zahl sein 474 Zeitstempel muss 10 Zeichen lang sein 475 Zeitstempel 476 oder Paket manuell aktivieren 477 Paket verteilen 478 Gerät(e) 479 Kein Gerät ausgewählt 480 Fragmente 481 Aktivierte Pakete 482 WARTET AUF BENACHRICHTIGUNG 483 Überprüfe ERFOLG 484 Eigenener Intervall 485 Immer inventarisiert 486 Nie inventarisiert 487 Eigen 488 Standard 489 IP-Discover-Verhalten 490 KEIN IP-Discover des Netzwerks 491 IMMER IP-Discover des Netzwerks 492 AUSGEÄHLTES IP-Discover des Netzwerks 493 Standard (kann ausgewählt werden) 494 Benutzerdefinierter Inventur-Intervall 495 Inventur alle 496 Tag(e) 497 Standard, nutzt den 'INTERVALL'-Parameter. 498 Paket 499 Server 500 Benutzerdefiniert 501 Paket hinzufügen 502 ausgewählt 503 ausgewählt - erzwungen 504 nicht ausgewählt 505 auswählbar 506 nicht auswählbar 507 ENTHÄLT 508 ENTHÄLT NICHT 509 ALLE 510 Kein Paket 511 Sekunden 512 Software-Verteilung 513 Pakete erstellen 514 Aktivieren 515 Aktiviert 516 KB 517 Diese Option kann immer nur auf einen einzelnen Rechner angewendet werden. 518 Erzwinge IP-Discover 519 Rechner wurde bereits für das Netzwerk gewählt 520 Rechner hat bereits IP-Discover für das Netzwerk erzwungen 521 Dieser Rechner wurde bereits als nicht auswählbar markiert 522 Standard-Rechner 523 Auf Standard-Satus zurücksetzen 524 NIE wieder anwenden 525 SINDE SIE SICHER? 526 KEIN RECHNER AUSGEWÄHLT 527 Januar 528 Februar 529 März 530 April 531 Mai 532 Juni 533 Juli 534 August 535 September 536 Oktober 537 November 538 Dezember 539 Sonntag 540 Montag 541 Dienstag 542 Mittwoch 543 Donnerstag 544 Freitag 545 Samstag 546 mit Status 547 Alle 548 Alle außer ERFOLGREICH 549 Datei (wird auf Client-Rechner installiert) 550 Datei (optional, kann mit 'AUSFÜHREN' auf dem Client-Rechner gestartet werden) 551 Dieser Paketname existiert bereits. 552 Sie müssen eine Suche durchführen und dann auf das Ergebnis der Abfrage diese aktivierten Pakete anwenden.
Sie können auch ein Paket auf einem einzelnen Rechner installieren wenn Sie den Tab 'Benutzerdefiniert' in den Rechner-Details auswählen.
. 553 Windows Lizenz-Nr. 554 Bildschirm: Serien-Nr. 555 Bildschirm: Hersteller 556 Bildschirm: Überschrift 557 Nutzer-Domäne 558 Betroffene Pakete 559 Diese Datei hat nicht das .ocs-Format 560 Zum Server 561 Unbekannt (gelöscht) 562 Netzwerk mit UID: 563 Hersteller 564 Agent Autostart-Intervall 565 Adresse für lokales Inventar 567 IP-Discover Latenz 568 RAM (MB) 569 CPU (MHz) 570 Hilfe 571 Alle übeprüfen 572 Erfolgreich 573 Fehler 574 Statistik 575 nicht ausgewählt, nicht benachrichtigt 576 Benutzerdefiniertes IP-Discover 577 Gruppenname 580 Alle Rechner (erneuern) 581 Alle Rechner (aus dem Cache) 582 und 583 Gruppen 584 Für die Abfrage 585 Für die Auswahl 586 Neue Gruppe 587 Neue statische Gruppe 588 Gruppe überschreiben 589 statisch zur Gruppe hinzufügen 590 Status zurücksetzen 591 statisch hinzufügen 592 dauerhaft entfernen 593 Erstellungs-Datum 594 Cache erzeugt am 595 STATISCHE GRUPPE 596 DYNAMISCH HINZUGEFÜGT 597 DAUERHAFT ENTFERNT 598 Hinzufügen 599 Zurücksetzen 600 Entfernen 601 Massen-Verarbeitung 602 Sie müssen eine Datei übertragen 603 Keine Rechner gefunden, bitte überprüfen Sie Ihre Datei 604 mal erfolgreich angewendet. 605 mal fehlgeschlagen. 606 Datei mit Rechner-Informationen 607 Gruppe 608 erzeugt 609 überschrieben 610 STATISCH HINZUGEFÜGT 611 NICHT CACHEN 612 STATISCH 613 DYNAMISCH 614 ENTFERNT 615 Abfrage 616 Nutzerkreis 617 Neu 618 Perimeter 619 Lokaler Nutzer 620 Kein Rechner in Ihrem Umkreis. 621 Die Gruppe wurde nicht erstellt, Der Name wird bereits verwendet. 622 Gespeichert 623 Die Information auf die Sie zugreifen möchten existiert nicht. 624 Möchten Sie die Gruppe wirklich löschen? 625 Diese Änderung(en) anwenden 626 Diese Änderung(en) verwerfen 627 Mindestens ein Feld ist leer... Update nicht durchgeführt. 628 Weiterverteilungs-Server 629 Neue Server-Gruppe zur Weiterverteilung 630 Eine existierende Weiterverteilungs-Gruppe 631 Hinzufügen zu 632 Crush 633 Verwaltung von Server-Gruppen 634 gewünschte Aktion 635 Neuer Name 637 Ersetzen 638 DER NAME DER GRUPPE DARF NICHT LEER SEIN 639 SERVER DIESER GRUPPE EXISTIERT NICHT 640 Wollen Sie wirklich löschen 641 Verwaltung der Weiterverteilungsserver 642 Die Gruppe 643 Alle Geräte 644 Dieses Gerät 645 GRUPPEN-DETAILS 646 URL 647 PORT-NUMMER 648 SPEICHER-INHALT 649 AUTOMATISCH 650 MANUELL 651 Server-Gruppen 652 Gerät(e) 653 MAC-Adresse zur schwarzen Liste hinzufügen 654 Neue MAC-Adresse für schwarze Liste eingeben 655 eingefügt 656 Dieses Datum existiert schon in der Liste 657 Felder in rot sind Fehlerhaft (Leere Felder oder Größe < 2) 658 Rechner haben keinen Weiterverteilungsservers.
Auf diesen müssen die Pakete gesondert installiert werden. 659 Rechner haben dieses Paket bereits installiert. Der Status des Pakets auf diesen Rechnern ist jetzt 660 SERVERGRUPPE EXISTIERT NICHT 661 PAKETE FÜR WEITERVERTEILUNGSSERVER 662 Auswahlregeln 663 INTERNES PROBLEM 664 Aktion ausgeführt 665 KEINE RECHNER AUSGEWÄHLT, GRUPPE NICHT ERSTELLT. 666 Server-Gruppe erstellt. 667 FÜR DAS PAKET. 668 welche Regel anwenden? 669 ACHTUNG: es gibt Dubletten bei der Priorität
es wird nur eine Regel angewendet! 670 Es gibt schon eine Regel mit diesem Namen! 672 Diese Regel existiert nicht. 673 Verwaltung der Verteilungs-Regeln. 674 NAME DER REGEL 675 PRIORITÄT 676 RECHNER-WERT 677 OPERATOR 678 SERVER-WERT 679 NAME 680 DOMÄNE 681 NUTZER 682 um eine Ergänzungs-Regel hinzuzufügen 683 Regel überprüfen 684 The following fields must be seized 685 Eine Regel hinzufügen 686 The condition 687 Sie können sie nicht löschen. 688 Pakete Sind in dieser Gruppe betroffen! 689 Pakete auf diesem Server sind betroffen! 690 Sie können nicht alle Rechner entfernen. 691 Allgemeine Werte: $IP$ und $NAME$ 692 Sie ändern ALLE Werte der Server 693 Sie ändern die Werte folgender Server: 694 um die Standard-Werte herauszufinden lassen Sie leere Felder überprüfen 695 Sie ändern die Servergruppe 696 um aktivierte Pakete zu zeigen die angewendet werden auf 697 ein Gerät 698 eine Server-Gruppe 699 Sind Sie sicher dass Sie dieses Paket zur Verteilung auf diese Rechner auswählen wollen? 700 Auswahlkriterium für schwarze Liste 701 Seriennummer zur schwarzen Liste hinzufügen 702 Geben Sie die Seriennumer ein, die zur schwarzen Liste hinzugefügt werden soll. 704 Sind Sie sicher? 705 Aus der schwarzen Liste entfernen? 706 Entfernen 707 Diese Seriennummer 708 Diese MAC-Adresse 709 Benutzerdefinierte PROLOG_FREQ 710 Benutzerdefinierter Download 711 Taken into account modifications 712 Sprachdatei 712 Sprachdatei 713 Wollen Sie diese Sprachdatei wirklich ersetzen? 714 Referenz-Sprachdatei 715 Wählen Sie die zu bearbeitende Sprachdatei 716 Sprachdatei aktualisieren 717 benutzerdefiniert 718 Ignorieren 719 (pro Sekunde) 720 Wartezeit zwischen zwei Verteilungs-Zyklen 721 Wartezeit zwischen zwei Fragment-Downloads 722 Wartezeit zweischen zwei Verteilungs-Perioden 723 maximale Priorität für Pakete die heruntergeladen werden sollen
(Pakete mit höherer Priorität werden ignoriert) 724 Zeitspanne zwischen zwei Kontaktaufnahmen von Client und Server 725 (in der Stunde) 726 URI der Weiterverteilungsserver ($IP und NAME$ sind die Standardwerte) 727 Zielverzeichnis für die Installationspakete. 728 Inventar 729 Rechner 730 Stunden 731 Feature of appointed on the base to every section of inventory. 732 Millisekunde(n) 733 Inaktiv 734 Inventar-Dateien 735 Filter 736 Die Gruppen-Funktion auf diesem Rechner einschalten 737 Zufallszahl im definierten Bereich erzeugt. Dies dient dazu, die Verarbeitung vieler Gruppen im gleichen Prozess zu verhindern. 738 Gültigkeitsdauer für Rechner-Gruppen angeben (Standard: ein Tag - siehe Offset) 739 Zukünftige Sicherheitsmaßnahmen 740 Gültigkeitsdauer für Rechner-Sperre 741 OCS-Engine so Konfigurieren, dass die Inventur in Abhängigkeit von der CHECKSUM-Variable des Agenten durchgeführt wird (geringere Belastung der Datenbank). 742 OCS-Engine so Konfigurieren, dass die Inventur als Transaktion behandelt wird. (Weniger gleichzeitige Zugriffe, bessere Plattenausnutzung). 743 OCS-Engine so Konfigurieren, dass nur die Änderungen im Inventar (Zeilewnweise) übertragen werden. (Geringere Belastung des DB-Backends, höhere Belastung des Frontends) 744 Inventur nur akzeptieren wenn der Server es für notwendig hält. (Verhindert erzwungene Inventur mit FORCE). 745 Angeben wie oft der Inventar-Cache bereinigt wird. 746 Minimaler Zeitraum in Tagen, bevor ein IP-Discover-Agent ersetzt wird 747 Wartezeit vor dem ersten auswählen eines IP-Discover-Agenten abschalten (nicht empfohlen) 748 Gruppen für IP-Discover aktivieren. (Zum Beispiel, um zu verhindern, dass bestimmte Gruppen als IPdiscover-Agenten ausgewählt werden.) 749 Use with ocsinventory-local, enable the multi entities feature 750 Erzeugt entweder komprimierte Dateien oder XML-Klartext. 751 Specify if you want to keep trace of all inventory between to synchronisation with the higher level server 752 Pfad zum OCS 'Datei'-Verzeichnis (muss Schreibrechte haben) 753 Prolog-Filterstack aktivieren 754 Core-Filtersystem erlauben, Änderungen "on the fly" vorzunehmen 755 Aktiviere Inventar-Flooding-Filter. Eine bestimmte IP-Adresse darf einen neuen Computer nur einmal in dieser Zeitspanne senden. 756 Zeitspanne für INVENTORY_FILTER_FLOOD_IP 757 Aktiviere Inventar-Filter-Stack 758 Sollen Pakete, die an eine Gruppe verteilt wurden, auf Rechner-Ebene verwaltet werden? 759 Größer oder gleich 760 Webdienst 761 SOAP-Dienst ein-/ausschalten 762 Größe der Ergebnisseite (kann zu Leistungsproblemen führen) 763 Datei aus eigenen Modulen einschliessen 764 Die folgenden Optionen können nicht über die GUI gesetzt werden. Siehe ocsinventory-server.conf 765 Gesamte Software 766 DIE ABFRAGE WAR OHNE ERGEBNIS 767 ACHTUNG: ERGEBNIS MIT AKTIVEM FILTER 768 Aufnahme-Nummer 769 Verschoben. 770 AKTUALISIERUNG VON 771 Diese Kategorie existiert bereits. 772 Der Kategoriename darf nicht leer sein. 773 Sie müssen einen Kategorie-Namen auswählen. 774 Sie versuchen eine Kategorie in sich selbst zu verschieben 775 Verzeichnis zur Paket-Erstellung 776 Verzeichnis für das Cachen der IP-Discover-Analysedaten 777 Sitzungsdauer 778 Anzahl verschiedener ARBEITSGRUPPEN 779 Unterschiedliche TAGs 780 Unterschiedliche SUBNETZE 781 Geräte die auf Software-Verteilung warten 782 Geräte mit Fehler bei der Software-Verteilung 783 Anzahl unterschiedlicher Betriebssystem-Versionen 784 Unterschiedliche Agent-Versionen 785 Unterschiedliche Prozessoren 786 Unterschiedliche Bildschirm-Auflösungen 787 Geräte mit Prozessor >= 788 Geräte mit Prozessor =< 789 Geräte mit Prozessor zwischen 790 Geräte mit RAM >= 791 Geräte mit RAM =< 792 Geräte mit RAM zwischen 793 Geräte in Datenbank 794 Geräte im Netz sichtbar 795 Geräte die heute Verbindung hatten 796 Geräte mit Inventur heute 797 Geräte nicht gesehen seit 798 AKTIVITÄT 799 HARDWARE 800 VERSCHIEDENES 801 Dieses Feld verbergen 802 Dieses Feld anzeigen 803 Anzahl der Tage seit dem letzten Kontakt zum Server 804 Prozessor-Takt mindestens 805 Prozeesor-Takt höchstens 806 Minimum RAM 807 Maximum RAM 808 Repartitionieren 809 STATISCHE GRUPPEN 810 DYNAMISCHE GRUPPEN 811 Sind Sie sicher dass Sie die Sichtbarkeit der Gruppe ändern wollen? 812 Die Software in 0 ist im CACHE vorhanden aber nicht mehr auf einem Gerät installiert.
Es kann daher nicht zu einer Kategorie hinzugefügt werden. 813 Anzahl Festplatten mit verbleibendem Speicherplatz > 814 Anzahl Festplatten mit verbleibendem Speicherplatz < 815 Anzahl Festplatten mit verbleibendem Speicherplatz zwischen 816 Maximal noch freier Plattenplatz 817 Minimal noch freier Plattenplatz 818 Aus der Gruppe entfernen 819 Rechner zur Gruppe hinzugefügt 820 Letzter Kontakt 821 SERVER CONFIGURATION MODIFICATION 822 Anpassen 823 Standardmäßig 824 GUI-Log-Aktivierung 825 Logdatei-Verzeichnis 826 Adresse für zu aktivierende Fragment-Dateien zur Software-Verteilung 827 Adresse für zu aktivierende INFO-Dateien zur Software-Verteilung 828 Rechner aus der Liste entfernen wenn Inventar älter als 829 Verzeichnes zur Erstellung von Paketen für die Weiterverteilung 830 LDAP Server-Adresse 831 LDAP Server-Port 832 LDAP Base-Name + dc 833 Name des Feldes mit dem Login 834 Version von LDAP_OPT_PROTOCOL_VERSION 835 RSX hinzufügen 836 Verwalte Typen 837 Sie haben keinen Zugriff auf diese Daten 838 Laufwerk: Laufwerksbuchstabe 839 Laufwerk: Typ 840 Laufwerk: Format 841 Laufwerk: Kapazität 842 Laufwerk: Freier Speicherplatz 843 Laufwerk: Name 844 Gruppe: ID 845 Gruppe: statisch? 846 Software: Hersteller 847 Software: Name 848 Software: Version 849 Software: Installations-Verzeichnis 850 Software: Kommentare 851 Bios: Rechner-Hersteller 852 Bios: Modell 853 Bios: Seriennummer 854 Bios: Rechner-Typ 855 Bios: Hersteller 856 Bios: Version 857 Bios: Datum 858 Bildschirm: Hersteller 859 Bildschirm: Name 860 Bildschirm: Beschreibung 861 Bildschirm: Typ 862 Bildschirm: Seriennumer 863 Netzwerk: Beschreibung 864 Netzwerk: Typ 865 Netzwerk: MibTyp 866 Netzwerk: Geschwindigkeit 867 Netzwerk: MAC-Adresse 868 Netzwerk: Status 869 Netzwerk: IP-Adresse 870 Netzwerk: Netzmaske 871 Netzwerk: Subnetz-IP 872 Netzwerk: Gateway-IP 873 Netzwerk: DHCP-IP 874 Registrierungs-Schlüssel: Name 875 Registrierungs-Schlüssel: Wert 876 Einfache Weiterverteilngsgruppe ohne Verteilung 877 Einige Rechner konnten aus folgendem Grund nicht zur Gruppe hinzugefügt werden: 878 Hinweis: Ein Rechner darf nur Mitglied EINER Weiterverteilungsgruppe sein 879 GRUPPE ERSETZT 880 GRUPPE ERSTELLT 881 Rechner hinzugefügt 882 Rechner aus der Gruppe gelöscht 883 Filter-Kriterien 884 WARNUNG: ANZEIGE MIT FILTER 885 unbekannt 886 Einfaches Zurücknehmen 887 Es ist möglich, dass dieses Paket nicht auf die Weiterverteilungsserver übertragen wurde. 888 Entfernen 889 Verbunden als 890 Oberfläche ist momentant wegen einer Suche mit mehreren Kriterien gesperrt. 891 Sperre der Oberfläche entfernen. 892 verbinde mit anderem Konto 893 IHREM PROFIL IST KEIN TAG ZUGEWIESEN 894 FÜR IHR KONTO SIND KEINE ZUGRIFFSRECHTE DEFINIERT 895 TAG ändern 898 Notiz hinzufügen 899 Verfasser 900 Abschnitt wirklich löschen? 901 Aktion auf das Abfrage-Ergebnis anwenden 902 Aktion auf die Auswahl anwenden 903 Sie müssen das Feld mit der Beschreibung ausfüllen 904 Paket erneut zuweisen 905 Beschreibung der auszuführenden Aktionen
für Rechner denen Paket zugewiesen werden soll 906 Software-Paket aus Verteilung entfernen 907 Beschreibung um Pakete von diesem Rechner zu entfernen 908 Mobile terminal informations 909 ÄNDERUNG NICHT DURCHGEFÜHRT: UNGÜLTIGES NEUES PROFIL 910 Überprüfen 911 Zu Profil wechseln 912 Liste der Rechner mit dieser Software exportieren 913 Anzahl nicht erfasster Netzwerk-Schnittstellen 914 Anzahl der Agenten die keine Inventar versendet haben seit mindestens 915 Abfragen 916 Der Wert muss höher sein als 917 INTERVALL-Wert 918 Unterschied zwischen LASTDATE und LASTCOME 919 Wollen Sie diese Meldung wirklich löschen? 920 Fehler, Angefragtes existiert nicht. 921 Diese Kategorie löschen 922 Sie müssen mindestens ZWEI Rechner zum Zusammenfassen auswählen. 923 Es gibt keine doppelten Rechner 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER-Funktionalität 926 FUSER-Login: 927 DER CACHE WIRD BEI DIESER AKTION NICHT ERNEUERT 928 Logdatei-Anzeige 929 Subnetz-Verwaltung wird nicht lokal durchgeführt. 930 Sie können kein Subnetz hinzufügen, ändern oder löschen. 931 Subnetz ändern 932 Das Feld für die IP-Adresse darf nicht leer sein. 933 Das Feld für den Netzwerk-Namen darf nicht leer sein. 934 Das Feld für die Netzwerk-ID darf nicht leer sein. 935 Das Feld für die Netzmaske darf nicht leer sein. 936 Das Feld für den Typ darf nicht leer sein. 937 Dieser Typ existiert bereits. 938 Neuer Typ 939 Rechner die Mitglieder dieser Gruppe sind 940 Alle Rechner auf denen dieses Paket installiert ist 941 ZEIGE STATISTIK FÜR 942 Sie müssen einen Kommentar für dieses Peripherie-Gerät eingeben. 943 Sie müssen einen Geräte-Typ auswählen. 944 Informationen eingegeben von 945 Peripherie-Gerät ändern 946 Neues Peripherie-Gerät hinzufügen 947 Nicht identifizierte Perihperie-Geräte 948 Liste der identifizierten Peripherie-Geräte 949 Rechner-ID 950 DATEINAME 951 DATEI ERZEUGT 952 DATEI GEÄNDERT 953 GRÖSSE 954 Die Sitzung wurde unterbrochen 955 KEIN RECHNER IN DER DATENBANK 956 Alle Fehler 957 Alle Statusmeldungen 958 FALSCHER WERT FÜR ENTFALTUNG 959 ZU VIELE PROGRAMME GEFUNDEN. BITTE GRENZEN SIE IHRE SUCHE EIN 960 DIE SUCHE BLIEB OHNE ERGEBNIS 961 LISTE VON 962 (eine, zwischen jeder) 963 DIFFERENT LIST OF 964 Partitions-Name 965 Anzeige 966 Agent 967 Gehört/gehören zu 968 Gehört/gehören nicht zu 969 Paket-Verlauf 970 Pakete 971 RECHNER AUS GRUPPEN ENTFERNEN 972 RECHNER WURDEN ERFOLGREICH AUS DER GRUPPE ENTFERNT 973 RECHNER ZUR GRUPPE HINZUFÜGEN 974 Rechner zum Cache hinzugefügt 975 Zur Gruppe hinzufügen 976 OBERFLÄCHE GESPERRT FÜR ANFRAGE-ERGEBNIS 977 Sperren 978 Sie werden die das Suchinterface für die Suche mit verschiedenen Kriterien sperren. 979 Um den Normalzustand wiederherzustellen, müssen Sie auf das Icon klicken, welches sich rechts oben in der Oberfläche befindet. 980 Pakete auf Rechnern 981 Pakete auf Server-Gruppen 982 KEINE VERTEILULNGSREGELN VORHANDEN. WEITERVERTEILUNG NICHT MÖGLICH. 983 Sie müssen auswählen welcher Typ geändert werden soll. 984 VERÄNDERUNGEN 985 RECHNER ENTFERNEN 986 RECHNER ENTFERNEN FÜR 987 Dieser Registrierungsschlüssel existiert bereits. 988 ES MÜSSEN ALLE FELDER AUSGEFÜLLT WERDEN. 989 DIE ANGEFORDERTEN DATEN EXISTIEREN NICHT. DIE DATEN KONNTEN IN DER DATENBANK NICHT GEFUNDEN WERDEN. 990 Manuell erstellte Pakete 991 Automatisch erstellte Pakete 992 Voraussichtliche Dauer der Verteilung 993 Rot markierte Felder sind fehlerhaft 994 PDA/SMARTPHONE 995 Nutzer-ID 996 Nachname 997 Nutzer-ID muss angegeben werden 998 Gültiges Profil auswählen 999 Nutzer-ID existiert bereits! 1000 Benachrichtigt 1001 Rot markierte Felder sind fehlerhaft! 1002 Voraussichtliche Dauer der Verteilung 1003 Redistribution servers packages parameters 1004 Das Verzeichnis für die Paket-Erstellung kann nicht angelegt werden. 1005 Es können keine Pakete erstellt werden. 1006 keine Schreibrechte 1007 Das Verzeichnis 1008 Auf dieses Weiterverteilungs-Paket anwenden 1009 Server Ablage-Verzeichnis 1010 NORMAL 1011 DEBUG 1012 ÜBERSETZUNG 1013 WARTUNG 1014 Wechseln zu 1015 Nutzer-Modus 1016 ROOT-Login 1017 ROOT-Passwort 1018 (Nichts eingeben für anonyme Verbindung) 1019 Ergebnis sperren 1020 Name of the tag information 1021 Software-Verteilung verwalten 1022 Tag-Verwaltung 1023 Verteilte Pakete mit Status 1024 wird gelöscht 1025 Zurücknehmen 1026 Paket auf Rechnern gelöscht 1027 Kategorien 1028 Neu 1029 Ignoriert 1030 Unverändert 1031 Workflow für Verteilung 1032 Workflow für Verteilung einschalten 1033 Informationen anfordern 1034 Allgemeine Paket-Informationen 1035 Technische Paket-Informaitonen 1036 Validierungs-Informationen 1037 Paket-Name 1038 Anfordern 1039 Priorität 1040 Nutzer informieren 1041 Nutzer kann verzögern 1042 Neustart auslösen 1043 Stock control to validate the installation 1044 Als Liste 1045 Visualisiert 1046 Status 1047 INFO 1048 Datei hinzufügen 1049 ILLEGALE AKTION 1050 Installierte Programme suchen 1051 Suche 1052 Verlauf 1053 Änderung anwenden 1054 anwenden 1055 Ungültige E-Mail-Adresse 1056 Benachrichtigen Sie Ihren Administrator 1057 Verbindung zum Mail-Server fehlgeschlagen 1058 Keine gültige E-Mail-Adresse 1059 Vorhandene Felder 1060 Neues Feld 1061 Tab 1062 Feld 1063 Beschreibung 1064 Pflicht 1065 Feld-Einschränkung 1066 Verknüpft mit einem Status 1067 Dieser Feldname ist schon in Benutzung 1068 Der Feldname darf nicht leer sein. 1069 Wert hinzugefügt 1070 Feldname 1071 Feldtyp 1072 Wartende Anfragen 1073 Anfrage starten 1074 'Workflow'-Funktion ist deaktiviert. 1075 Aktivieren Sie die Funktion. 1076 FEHLER: DER SUCH-STATUS IST NICHT DEFINIERT 1077 Status für Paket-Erstellung 1078 Status-Abfrage 1079 restraint perimeter status 1080 global perimeter status 1081 Information per E-Mail 1082 Workflow Admin-Gruppe 1083 Perimeter identification 1084 Gruppen-Name für den Test 1085 Group name for restraint perimeter 1086 TAG-Wert für den Test 1087 Wert für den Test-TAG 1088 TAG value for restraint perimeter 1089 Kein Status aktiv. Beginnen Sie in dem Sie einen aktivieren. 1090 hat folgende Anfrage geändert: n° 1091 Es gibt eine neue Anfrage 1092 eine neue Anfrage stellen 1093 Datenbank ist unvollständig 1094 Bitte richten Sie die Datenbank erneut vollständig ein. 1095 Status-Verwaltung 1096 Feldliste 1097 Tabliste 1098 Feldname 1099 Standard-Wert 1100 Statusliste 1101 Dieses Feld kann nicht aktualisiert werden. 1102 Aktiver Status 1103 Status-ID 1104 Ebene 1105 Workflow-Funktion ist eingeschaltet. 1106 Es ist nur möglich ein Paket zu erstellen, wenn vorher eine Anfrage existiert 1107 und wenn der Status korrekt ist. 1108 LDAP-Konfiguration 1109 Filter 1110 Die Zuweisung eines Pakets hängt vom Status der Anfrage ab. 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-Mail 1118 Bearbeiten 1119 Auswählen 1120 Anzahl 1121 Aktualisiert 1122 Wiki 1123 IRC 1124 Foren 1125 Prozentsatz 1126 Datum der Notiz 1127 Verfasser der Notiz 1128 Notiz 1129 Gelöschtes Paket 1130 Sprach-Editor 1131 Beschreibung des Eintrags 1132 ID des Eintrags 1133 Neuer Eintrag 1134 Keine IpP-Discover-Daten 1135 Rechner ist schon in der Weiterverteilungsgruppe 1136 SNMP 1137 SNMP-Dienst aktivieren/deaktivieren 1138 Zeige alle Subnetze 1139 Verwalten 1140 Subnetze verwalten 1141 Subnetz hinzugefügt 1142 Neues Subnetz für schwarze Liste eingeben 1143 Subnetzmaske 1144 Ungültige MAC-Adresse (Format: XX.XX.XX.XX.XX.XX). 1145 es sind nur Werte erlaubt zwischen 1146 Profile verwalten 1147 Aktualisierung nicht möglich. 1148 WARNUNG:Automatische Sicherung der Konfigurationsdateien NICHT möglich! 1149 Name des neuen Profils 1150 Referenzprofil 1151 Textprofil 1152 WARNUNG: Das Löschen von Basisprofilen kann zu Fehlfunktionen von OCS-NG führen. 1153 Profilname 1154 Auf Rechnern 1155 Über den Verteilungs-Workflow 1156 Verwalte Verteilungs-Workflow 1157 Über die Felder des Verteilungs-Workflow 1158 Über die Paket-Aktivierung 1159 Über MAC-Adressen 1160 Über Seriennummern 1161 Über das IP-Discover-Subnetz 1162 Verteilung verwalten 1163 Konfiguration aktualisieren 1164 Gruppen verwalten 1165 Konsole verwalten 1166 Warnmeldungen der GUI anzeigen 1167 Konten-Informationen verwalten 1168 darf Konten, Informationen und Computer ändern 1169 darf die Gruppenzugehörigkeit ändern 1170 Profile verwalten 1171 Profilgruppen verwalten 1172 IP-Discover verwalten 1173 Profil-Informationen 1174 Nutzer-Seiten 1175 Einschränkungen 1176 Rechte auf die Blacklist 1177 Rechte zum Verwalten 1178 Dieses Feld 1179 ist eine Variable. Es darf keine Sonderzeichen enthalten. 1180 darf nicht leer sein. 1181 Weiterverteilungsserver-Funktion 1182 Sie können die Weiterverteilungsregeln nicht bearbeiten, die Funktion ist abgeschaltet. 1183 Liste der zu erstellenden Pakete 1184 Schlüssel hinzugefügt 1185 Schlüssel aktualisiert 1186 Ihre Daten wurden aktualisiert. 1187 Konfiguration noch nicht abgeschlossen. 1188 Diese Gruppe ist als TEST deklariert 1189 Diese Gruppe ist als EINGESCHRÄNKT deklariert 1190 Sie können keinem Paket einen höhern Level zuweisen 1191 Information: Die Konfiguration der 'Workflow'-Funktion läuft 1192 Gruppe kann TEST Pakete erhalten 1193 Gruppe kann EINGESCHRÄNKTE Pakete erhalten 1194 Nur Pakete mit höherem Level 1195 können angewendet werden 1196 Profil 1197 SNMP-Funktion 1198 Netzwerk-Scan 1199 Version der SNMP-Communities 1200 Wert wurde aktualisiert 1201 Anzeige 1202 Linux (ALLE) 1203 Windows (ALLE) 1204 IP-Discover 1205 SNMP-Communities verwalten 1206 Verzeichnis der SNMP-Community-Dateien 1207 Community hinzufügen Community 1208 Community hinzugefügt 1209 Community aktualisiert 1210 Admin-Info: 1211 URL der SNMP-Community-Datei 1212 Community gelöscht 1213 Feldtrenner der Export-Datei 1214 OCS-Enginge so Konfigurieren, dass SNMP-Inventur abhängig von snmp_laststate-Tabelle durchgeführt wird (Geringere DB-Backend-Belastung). 1215 Blade-Server 1216 Firewall 1217 Last-Verteiler 1218 Switche 1219 Karten 1220 Patronen 1221 Laufwerke 1222 Lüfter 1223 Netzteile 1224 Trays 1225 Maximale Kapazität 1226 Farbe 1227 Kontakt 1228 Geräte-SNMP 1229 Firmware 1230 Laufwerks-Name 1231 Das Dateiformat muss .ZIP sein 1232 Das Dateiformat muss .TAR.GZ sein 1233 Datenbank-Name 1234 Die Beschreibung darf nicht leer sein 1235 Referenz 1236 Software-Version 1237 Firmware-Version 1238 Installations-Datum 1239 MHz 1240 MB 1241 Anzahl SNMP-Geräte 1242 M/T/J 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 Diese Datei darf nicht leer sein. 1245 OCS-NG-Clients verwalten 1246 erneut verteilen 1247 Architektur 1248 Ordner 1249 Datenbank-Tabelle cachen (entlastet den MySQL-Server) 1250 Software-Verteilungs-Geschwindigkeit 1251 Statistiken 1252 Verzeichnis für Konfigurationsprofile 1253 Verzeichnis für alte Konfigurationsprofile 1254 Verzeichnis für Log-Skripte 1255 Anzahl Verbindungen pro Tag 1256 Anzahl fehlgeschlagene Verbindungen pro Tag 1257 Benutze Flash in GUI 1258 Manueller Eintrag 1259 Für eine Woche 1260 Für einen Monat 1261 Cache leeren 1262 Für Ihr Profil sind keine Plugins aktviert 1263 SICHERHEITS-ALARM!!! 1264 Weiter 1265 Tabellen-Cache aktivieren 1266 Virtuelle Maschinen 1267 Art der virtuellen Maschine 1268 UUID 1269 Maschine gehostet von 1270 TTMMJJJJ 1271 Rechner im Subnetz 1272 Rechner löschen 1273 Sie haben nicht die Berechtigung Rechner zu löschen. 1274 Profil aktualisiert. 1275 Profil kann nicht gelöscht werden. 1276 Profil erstellt. 1277 Standard-Profil (leer lassen für keins) 1278 Sie dürfen sich nicht verbinden. 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 WOL-Anforderung gesendet 1292 Erweiterte Verteilungsoptionen anzeigen 1293 Verteilung erzwingen 1294 Installationszeit 1295 Installationsdatum 1296 Angebote 1297 SNMP Geräteidentifikation 1298 QRCode-Administration 1299 QRCode 1300 Teste QRCode 1301 auf unsichtbaren Seiten 1302 Entwicklung 1304 XML 1305 On the generation of an XML inventory 1306 Erweiterungen verwalten 1307 Aktive Erweiterungen 1308 Erweiterung hinzufügen 1309 Verteilungsoptionen 1310 Ausschalten 1311 Neustart 1312 Daten-Breite 1313 Address-Breite 1314 Logische CPUs 1315 Momentane Taktfrequenz 1316 Sockel 1317 Anzahl Kerne 1318 L2-Cache-Größe 1319 Spannung 1320 kommagetrennt 1321 Kein Port für WOL definiert 1322 Kann Socket für WOL nicht öffnen 1323 Server Druckerfreigabe 1324 Drucker freigegeben auf Server 1325 Bildschirm horizontal / vertikal 1326 Freigegeben 1327 Lokal / Netzwerke 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 Fehler: 2002 Fehler: Zeile 2003 MySQL-Fehler: 2004 (mit neuem OCS-Konto) 2005 Subnetz 2006 WARNUNG: 2007 Konto 2008 Fehler 2009 fehlgeschlagen 2010 Host 2011 Login 2012 nicht eingefügt 2013 benötigt 2014 Passwort 2015 Abfrage 2016 erfolgreich 2017 mit 2018 wurde importiert 2019 wurden bereits importiert 2020 Die install.php ist noch im OCS-Verzeichnis vorhanden! 2021 Ihr GUI-Logverzeichnis ist schreibgeschützt/nicht vorhanden! 2022 Sie können keine Datei hochladen die größer ist als 2023 Löschen 2024 Sicherheitsproblem: Sie verwenden das Standard-Datenbankpasswort! 2025 Ändern Sie das OCS-Datenbankpasswort in MySQL 2026 Sicherheitsproblem: Sie verwenden das Standard-Admin-Passwort für die OCS-GUI! 2027 Ändern Sie das Admin-Kennwort in der OCS-GUI! 2028 Authentifizierungs-Schlüssel 2030 OCS-NG Inventory Installation 2031 Derzeit installierte Version 2032 ist niedriger als diese Version 2033 Automatische Installation gestartet 2034 DB-Konfiguration unvollständig. Automatische Installation gestartet. 2035 FEHLER: SESSIONS für PHP ist nicht installiert/verfügbar.
Versuchen Sie das php-session-Paket zu installieren. 2036 WARNUNG: XML für PHP ist nicht oder unvollständig installiert. IP-Discover wird nicht verfügbar sein. 2037 FEHLER: MySQL für PHP ist nicht oder unvollständig installed.
Versuchen sie PHP-MySQL zu installieren (Debian: php5-mysql). 2038 WARNUNG: GD für PHP ist nicht oder unvollständig installiert.
Die grafischen Darstellungen werden nicht verfügbar sein.
Versuchen Sie extension=php_gd2.dll (Windows) in der php.ini auszukommentieren, oder versuchen Sie GD zu installieren (php5-gd, Linux). 2039 WARNUNG: OpenSSL für PHP ist nicht oder unvollständig installiert.
Nicht alle Teile der automatischen Software-Verteilung werden verfügbar sein. Versuchen Sie php-openssl zu installieren (Linux). 2040 WARNUNG: Sie werden keine Software-Pakete verteilen können die größer sind als 2041 Sie müssen sowohl post_max_size als auch upload_max_filesize in Ihrer php.ini anpassen um dieses Limit zu erhöhen. 2042 WARNUNG: Das Standard-Root-Passwort ist auf dem MySQL-Server gesetzt. Ändern Sie es bitte SOFORT! (Mit: root password=blank) 2043 WARNUNG: Der Nutzer den Sie angegeben haben ist nicht Root.
Wenn Sie Probleme mit dem Datei-Upload haben versuchen Sie max_allowed_packet inder MySQL-Konfiguration auf mindestens 2 MB zu erhöhen. 2044 Label hinzugefügt. 2045 Label NICHT hinzugefügt (es wird beim Start auf dem Client nicht nach einem TAG gefragt.) 2046 FEHLER: MySQL Login-Problem. 2047 Sie müssen 'old-passwords' zu Ihrer MySQL-Konfiguration hinzufügen und MySQL neu starten. Rufen Sie dann install.php erneut auf. 2050 Instalation abgeschlossen. Sie können sich jetzt mit dem Nutzer 'admin' und dem Passwort 'admin' anmelden (und das Passwort dann SOFORT ändern). 2051 Klicken Sie hier um zur OCS-NG-GUI zu gelangen. 2052 FEHLER: kann dbconfig.inc.php nicht in das Verzeichnis schreiben, bitte setzen Sie die benötigten Schreibrechte. Vergessen Sie nicht, die Rechte nach der Installation wieder zurück zu nehmen. 2053 Bitte warten, das Aktualisieren der Datenbank kann bis zu 30 Minuten dauern (abhängig von der Größe der Datenbank und der Serverhardware) ... 2054 fehlgeschlagen, SCHLÜSSEL war zu lang.
Sie müssen diese Abfrage später erneut ausführen oder Sie werden erhebliche Leistungsprobleme bekommen. 2055 Datenbank erfolgreich erzeugt. 2056 MySQL-Konfigurationsdatei erfolgreich geschrieben. 2057 Existierende Datenbank aktualisiert. 2058 Prüfe Datenbank-Engine ... 2059 FEHLER: 'Alter'-Abfrage fehlgeschlagen. 2060 FEHLER: 'Show table status'-Abfrage fehlgeschlagen. 2061 FEHLER: InnoDB-Konvertierung fehlgeschlagen, installieren Sie InnoDB MySQL-Engine-Unterstützung auf Ihrem Server
oder Sie werden erhebliche Leistungsprobleme bekommen.
(Eventuell hilft es 'skip-innodb' in der MySQL-Konfiguration auszukommentieren.)
Starten Sie die Installation dann erneut. 2062 FEHLER: 'HEAP'-Konvertierung fehlgeschlagen. Installieren Sie HEAP-MySQL-Eengine-Unterstützung auf Ihrem Server
oder Sie werden erhebliche Leistungsprobleme bekommen. 2063 Datenbank-Engine erfolgreich aktualisiert. 2064 Tabelle(n) aktualisiert 2065 FEHLER: DIE INSTALLATION WURDE WEGEN FEHLERN ABGEBROCHEN. Rufen Sie install.php erneut auf, wenn die Probleme behoben sind. 2066 WARNUNG: 'Datei'-Verzeichnis fehlt, Import von 2067 daraus nicht möglich. 2068 konnte nicht eingefügt werden. Sie müssen max_allowed_packet in der MySQL-Konfiguration auf mindestens 2 MB erhöhen. 2070 fehlt. Wenn Sie die Installation nicht erneut durchführen wird die Software-Verteilung nicht verfügbar sein. 2071 WARNUNG: Eine oder mehrere Dateien wurden bereits eingfügt. 2072 Dateien für Verteilung erfolgreich eingefügt. 2073 Tabelle 'Dateien' abgeschnitten. 2074 Tabelle 'Dateien' ist leer. 2076 Keine 'subnet.csv'-Datei zum importieren vorhanden. 2077 Füge Subnetze aus 'subnet.csv' hinzu. 2078 FEHLER beim Einfügen des Netzwerks 2079 in die Tabelle 'subnet'. 2080 WARNUNG: Netzwerk 2081 wurde nicht eingefügt (fehlerhafte IP oder Netzmaske) 2082 Netzwerk netid wird berechnet. Bitte warten ... 2083 FEHLER: Konnte netid nicht aktualisieren auf 2084 Netzwerk netid wurde berechnet 2085 wurde schon berechnet 2086 konnte nicht berechnet werden 2087 Netmap netid wird berechnet. Bitte warten ... 2089 Netmap netid wurde berechnet 2090 Lösche verwaiste einträge ... 2091 FEHLER: konnte nicht bereinigen 2092 verwaiste Einträge gelöscht 2093 Bereinige Netmap ... 2094 Fehler: Konnte Netmap nicht bereinigen 2095 Netmap-Einträge gelöscht. 2096 Bitte geben Sie den TAG für die Windows-Clients ein: 2097 Lassen Sie dieses Feld leer wenn die Abfrage des TAGS nicht beim Start der Windows-Clients angezeigt werden soll. 2098 FEHLER: ZIP für PHP ist nicht oder unvollständig installiert.
Kommentieren Sie 'extension=php_zip.dll' in Ihrer php.ini aus (Windows), oder installieren Sie 'libphp-pclzip' (Linux). 2099 FEHLER: Dieses MySQL-Konto hat nicht genügend Rechte um die Datenbank zu erstellen. 2100 Alte Konten aktualisieren 2101 von Skript hinzugefügt. 2102 WARNUNG: Wenn Sie den Standard-Datenbank-Namen (ocsweb) ändern müssen auch die OCS-Engine-Dateien angepasst werden. 2103 DEMO-Modus: Sie können keine Daten aktualisieren. 2104 DIES IST DER DEMO-MODUS VON: 2105 Ihre Datenbank ist OK.
Keine Änderungen vorgenommen. 2106 die MySQL-Konfiguration erlaubt durch die gesetzte Variable 'max_allowed_packet' nur eine Dateigröße < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Cache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Office-Lizenzen 6002 Verteilung der Office-Lizenzen 6003 Anzahl der Lizenzen 6004 Insgesamt verfügbar 6005 Ein-/Ausschalten ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/hungarian/000077500000000000000000000000001303466605000257705ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/hungarian/hungarian.png000077500000000000000000000005441303466605000304600ustar00rootroot00000000000000PNG  IHDRlàpbKGD pHYs  tIME )\IDATxQ EQpV͍5;'{dET 4 F h4A h4AA h4AA h AA AfGyAA A4 A#h4 F h4A h4AA h4  A#h4 F h4A h4AA h4AA h AA G)IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/hungarian/hungarian.txt000077500000000000000000001303551303466605000305170ustar00rootroot000000000000000 UTF-8 1 Kďż˝rďż˝sek 2 ďż˝sszes szďż˝mďż˝tďż˝gďż˝p 3 Szďż˝mďż˝tďż˝gďż˝pek szoftver nďż˝lkďż˝l... 4 szďż˝mďż˝tďż˝gďż˝p szoftverrel... 5 Hatďż˝skďż˝rďż˝mbe tartozďż˝ egysďż˝gek 6 Lejďż˝rt garanciďż˝jďż˝ gďż˝pek 7 Lejďż˝rt garanciďż˝jďż˝ gďż˝pek rďż˝szletesen 8 Vďż˝lassza ki, mit kďż˝vďż˝n 9 Paramďż˝terek szerinti keresďż˝s 10 Szďż˝mďż˝tďż˝gďż˝pek jellemzok szerint 11 Szďż˝mďż˝tďż˝gďż˝pek jellemzok szerint 12 Szoba 13 Kďż˝ld 14 Menedzselďż˝s 15 Azonosďż˝tďż˝k 16 Adminisztrďż˝torok 17 ďż˝gynďż˝k 18 Revision 19 Szoftver verziďż˝ 20 Szoftver 21 Elso dďż˝tum 22 Garancia lejďż˝rata 23 Szďż˝mďż˝tďż˝gďż˝p 24 Felhasznďż˝lďż˝ 25 Operďż˝ciďż˝s rendszer 26 Memďż˝ria 27 CPU ďż˝rajel (MHz) 28 Gďż˝pek szďż˝ma 29 Az LDAP szerver nem vďż˝laszol 30 Keresďż˝s 31 Vďż˝lasszon paramďż˝tert 32 Vďż˝laszt 33 Domďż˝n 34 IP cďż˝m 35 Szďż˝mďż˝tďż˝gďż˝p neve 36 Szďż˝ria szďż˝m 37 Parancs 38 Megrendelďż˝s 39 Eredet 40 Kďż˝d 41 Alapďż˝llapot 42 Nincs eredmďż˝ny 43 Fomenu 44 Vďż˝lasszon opciďż˝kat 45 Szabad hely 46 Utolsďż˝ leltďż˝r 47 Utolsďż˝ lap 48 Szďż˝mďż˝tďż˝gďż˝p rďż˝szletek 49 Nďż˝v 50 Swap 51 Megjegyzďż˝s 52 Licenc 53 Leďż˝rďż˝s 54 Processor(ok) 55 Szďż˝m 56 Adminisztratďż˝v adatok 57 Parancs szďż˝m 58 Parancs dďż˝tum 59 Kďż˝d 60 Szďż˝llďż˝tďż˝levďż˝l 61 Video kďż˝rtya 62 Felbontďż˝s 63 Tďż˝rolďż˝k 64 Gyďż˝rtďż˝ 65 Modell 66 Tďż˝pus 67 Diszk mďż˝ret 68 Kďż˝nyvtďż˝r 69 Gyďż˝rtďż˝ 70 Designation 71 Garancia 72 Beavatkozďż˝s(ok) 73 ďż˝r 74 Demand date 75 Demand type 76 Leltďż˝r dďż˝tuma 77 Leltďż˝r tďż˝pus 78 Szďż˝mla 79 Printer(ek) 80 Mukďż˝dďż˝s 81 Stďż˝tusz 82 Hďż˝lďż˝zat(ok) 83 Kapacitďż˝s 84 Interface 85 Levďż˝l 86 File rendszer 87 ďż˝sszesen 88 Szabad 89 Delivery order date 90 talďż˝lat 91 Input eszkďż˝zďż˝k 92 Diszk(ek) 93 Kontroler(ek) 94 Slot szďż˝m 95 MAC cďż˝m 96 Hang 97 Monitor(ok) 98 Vigyďż˝zat, csak 8 opciďż˝t vďż˝laszthat ! 99 Szďż˝mďż˝tďż˝gďż˝p rďż˝szletek 100 Kezdeti paramďż˝terek 101 Rendezďż˝s 102 ďż˝j keresďż˝d 103 Modosďż˝tďż˝s 104 kďż˝zvetlenďż˝l ďż˝rintett 105 Egysďż˝gekben 106 Konfigurďż˝ciďż˝s beďż˝llďż˝tďż˝sok 107 Konfigurďż˝ciďż˝ 108 Registry kďż˝rďż˝sek 109 Szďż˝mďż˝tďż˝gďż˝p tďż˝pus 110 -hoz 111 Windows licenc szďż˝m 112 Garancia dďż˝tum 113 Mďż˝gsem 114 Rendben 115 Mďż˝dosďż˝t 116 ďż˝j 117 Registry 118 Lapra ugrďż˝s 119 Valďż˝ban tďż˝rďż˝lni akarja: 120 null 121 Szďż˝mďż˝tďż˝gďż˝p tďż˝rlďż˝s 122 Tďż˝RLďż˝S 123 Szďż˝mďż˝tďż˝gďż˝p tďż˝pus mďż˝dosďż˝tďż˝s 124 ďż˝j szďż˝mďż˝tďż˝gďż˝p tďż˝pus 125 Utolsďż˝ 126 Kďż˝vetkezo 127 Elso 128 Vissza 129 EGYENLO 130 NEM EGYENLO 131 Icon ďż˝llomďż˝ny 132 Image ďż˝llomďż˝ny 133 Leltďż˝r 134 ďż˝j zip ďż˝llomďż˝ny hozzďż˝adďż˝sa 135 Vigyďż˝zat, vďż˝glegesen tďż˝rli az ďż˝llomďż˝nyt ! 136 Letďż˝ltďż˝s 137 ďż˝llomďż˝ny 138 Lďż˝trehozďż˝s 139 Lďż˝trehozďż˝s / tďż˝rlďż˝s 140 Szuper adminisztrďż˝torok 141 Adminisztrďż˝torok 142 Helyi adminisztrďż˝torok 143 The super administrators see all the machines and can give unity tag to the administrators. 144 The administrators see all the machines but cannot give unity tag. 145 The local administrators see only their machine and cannot give unity tag. 146 Choose an administrator 147 Be careful, you're about to delete the rights definitively ! 148 ISMERETLEN TAG 149 Unity tags under the responsibility of 150 jog(ok) mďż˝dosďż˝tva 151 jog(ok) tďż˝rďż˝lve 152 Vigyďż˝zat, ez a muvelet tďż˝rli az ďż˝rintett adminisztrďż˝tor jogait ! 153 No tag unity affected to this administator 154 Add a tag to an administrador 155 Add administrator to a tag 156 Add a unity tag 157 Mďż˝sol 158 Copy the rights to 159 rights copied from 160 No administrator for this tag 161 Unity tag under the responsibility of 162 Delete the selection 163 Service Grade Name 164 Persons responsible of unity tag 165 You have to enter a name or a difusion list to search ! 166 You have to choose an element from the list ! 167 See the details 168 This format file is invalid (it must be zip, pl or unix binary) 169 hozzďż˝dďż˝s 170 Ez az ďż˝llomďż˝ny mďż˝r lďż˝tezik ! 171 ďż˝llomďż˝ny tďż˝rďż˝lve 172 Hiba tďż˝rtďż˝nt, az ďż˝llomďż˝ny: 173 nem adthatďż˝ hozzďż˝ 174 IP keresďż˝s 175 Duplikďż˝tumok 176 IP-k 177 Redundďż˝ns gďż˝pek ďż˝sszefuzďż˝se 178 Szoba / gďż˝pek szďż˝ma 179 Egysďż˝g neve 180 Rossz felhasznĂĄlĂłi nĂŠv vagy jelszĂł 181 Bejelentkezďż˝si problďż˝ma 182 A megadott tulajdonsďż˝ggal rendelkezo gďż˝pek 183 Letďż˝ltďż˝s 184 This file does not contain "use constant version" 185 Version must be over 1 186 This file does not contain the ver file 187 This file is not a valid zip file 188 Vissza 189 Legalďż˝bb 2 gďż˝pet ki kellvďż˝lasztani 190 Szďż˝mla infďż˝: 191 tďż˝rďż˝lve 192 Redundancia ďż˝zssefoglalďż˝s 193 Hosztnďż˝v + Szďż˝ria szďż˝m 194 Hosztnďż˝v + Mac cďż˝m 195 Mac cďż˝m + Szďż˝ria szďż˝m 196 Hosztnďż˝v 197 Szďż˝ria szďż˝m 198 Mac cďż˝m 199 Redundancia 200 A szďż˝mlďż˝lďż˝ csďż˝kkentve 201 KISEBB 202 NAGYOBB 203 Kďż˝Zďż˝TT 204 Kďż˝Vďż˝L 205 Enabled 206 saved for 207 ďż˝tjďż˝rďż˝ 208 maszk 209 BIOS Verziďż˝ 210 BIOS Dďż˝tum 211 Registry 212 Kulcs nďż˝v 213 Kulcs ďż˝rtďż˝k 214 Nyomtat 215 ďż˝sszes informďż˝ciďż˝ 216 Rossz felhasznĂĄlĂłi nĂŠv vagy jelszĂł 217 Jelszďż˝ 218 ďż˝gynďż˝k verziďż˝k 219 Nem leltďż˝rozott hďż˝lďż˝zati csatolďż˝ 220 tďż˝rďż˝lt 221 IP cďż˝m felderďż˝to gďż˝pek 222 Vigyďż˝zat ! Az ďż˝sszes kijelďż˝lt gďż˝pet ďż˝sszefuzďż˝ ! Biztos benne ? 223 Informďż˝ciďż˝ 224 ďż˝rtďż˝k 225 Admin.infďż˝ 226 sikeresen a tďż˝rďż˝lve az accountinfo tďż˝blďż˝bďż˝l 227 Biztos, hogy tďż˝rli az oszlopot 228 ďż˝rja be az ďż˝j adminisztratďż˝v informďż˝ciďż˝t 229 Szďż˝veg (255) 230 Egďż˝sz 231 Valďż˝s 232 Dďż˝tum 233 Aktuďż˝lis adat 234 sikeresen beszďż˝rva 235 Felhasznďż˝lďż˝k 236 Jelszďż˝ vďż˝ltďż˝s 237 ďż˝j jelszďż˝ 238 Megerosďż˝tďż˝s 239 Minden mezot ki kell tďż˝lteni 240 A jelszavak nem egyeznek meg 241 A jelszďż˝ sikeresen mďż˝dosďż˝tva 242 Adminisztrďż˝tor 243 Felhasznďż˝lďż˝ 244 ďż˝j felhasznďż˝lďż˝ 245 sikeresen tďż˝rďż˝lve 246 Biztos, hogy tďż˝rli a felhasznďż˝lďż˝t 247 MySql bejelentkezďż˝s 248 MySql jelszďż˝ 249 MySql nem elďż˝rheto. Kďż˝rem, adjon meg helyes bejelentkezďż˝st/jelszďż˝t. 250 MySql Hosztnďż˝v 251 Kilďż˝pďż˝s 252 Nďż˝v (ďż˝n vďż˝lasztja) 253 A registry "fejezet" szďż˝ma
(0: HKEY_CLASSES_ROOT, 1: HKEY_CURRENT_USER stb.) 254 A kulcs helye (pl.: SOFTWARE/Mozilla) 255 A kulcs megnevez�se 256 V�laszt�s 257 Registry kulcs 258 Registry kulcs �rt�k 259 Hiba, az adat nem sz�rhat� be (speci�lis karakterek nem megengedettek) 260 C�mke �llom�ny m�dos�t�s rendben 261 C�mke �llom�ny t�r�lve 262 �rjon be egy c�mk�t 263 C�mke �llom�ny konfigur�ci� 264 Nincs c�mke �llom�ny 265 B�rmi 266 Hib�s d�tum 267 yyyy/mm/dd 268 Sebess�g 269 %Y/%m/%d 270 Modem(ek) 271 Slot(ok) 272 Port(ok) 273 BIOS 274 Op.rsz. neve 275 Op.rsz. verzi�ja 276 Chip k�szlet 277 Verzi� 278 Meghajt� 279 Port 280 MIB t�pus 281 DHCP IP 282 �tj�r�k 283 Lehetos�g 284 BIOS gy�rt� 285 V�lassza ki a m�dos�tand� param�tert 286 Szerv�z csomag 287 Helyi import 288 Helyi import�l�s 289 H�l�zat inform�ci� 290 Ip lek�rdez�s 291 Gyakorlott m�d 292 H�l�zati eszk�z felv�tel / t�rl�s 293 H�l�zati eszk�z t�pusok 294 Alh�l�zat nevek 295 Hely 296 Uid 297 Can't write in directory 298 Minden mezot ki kell t�lteni 299 Helytelen IP c�m (form�tum: x.x.x.x) 300 Helytelen maszk: form�tum: x.x.x.x or xx (xx<32) 301 H�l�zat felv�ve 302 H�l�zat t�r�lve 303 Alh�l�zat hozz�ad�sa 304 H�l�zat n�v 305 Uid 306 Alh�l�zat lista 307 �j t�pus 308 T�pus neve 309 H�l�zati eszk�z t�pusok 310 IpFelder�t�s kisebb mint 311 G�p 312 Ip felder�t�s 313 Gateway sz�m�t�g�pek 314 Ip felderito gateway sz�m�t�g�pek 315 Nem lelt�rozott sz�m�t�g�pek 316 Alh�l�zat 317 VIZSZG�L 318 DNS n�v 319 H�l�zat vizsg�lat eredm�nyei 320 Ez az anal�zis m�r v�grehajt�dott 321 l�tni akarja cache adatait ? 322 Adat a cache-b�l 323 k�sz�lt 324 A G�P ELNEVEZVE MINT 325 �res 326 nincs maszk megadva 327 Sz�m�t�g�p r�szletek 328 Felfedezett 329 Lelt�rozott 330 NetBIOS n�v 331 H�l�zat sz�m 332 K�rem , v�rjon ... 333 �j h�l�zati eszk�z 334 H�l�zati eszk�z lista 335 Eszk�z t�pus 336 Eszk�z le�r�sa 337 A PROGRAM NEM K�LD SEMMIT 338 Cs�kkentett m�d 339 A gyakorlott m�dhoz sz�ks�g van az ipdiscover-util.pl programra (Csak Linuxon fut) 340 Megtekint 340 Sorok sz�ma 341 nem ind�that�, �ll�tsa be a v�grehajt�si jogokat 342 �r�si jogot kell b�ll�tania a gy�k�r k�nyvt�rra , hogy haszn�lhassa 344 Hiba 345 EZ AZ ANAL�ZIS FOLYAMATBAN VAN, PR�B�LJA K�SOBB 346 ELOTT 347 UT�N 348 Windows felhaszn�l� 349 �j oszlop 350 CPU t�pus 351 CPU sz�m 352 Utols� bel�p�s 353 Minos�g 354 �rz�kenys�g 355 C�g 356 Tulajdonos 357 OCS �gens 358 Jokerek: ? (egy karakter), * (t�bb karakter) 359 Monitor sz�riasz�ma 360 Gy�rtva (h�t/�v) 362 A h�l�zat 363 m�r l�tezik 364 Lelt�rozott 365 Nem lelt�rozott 366 Felismert 367 H�l�zati eszk�z�k 368 h�l�zat 369 R�gz�tette 370 K�zz�t�tel 371 �sszes komponens 372 V�lasszon komponenst 373 Regisztr�lt felhaszn�l� 374 Regisztr�lt szervezet 375 OCS NG Agens verzi� 376 A sz�m�t�g�p z�rolt. Pr�b�lja k�sobb 377 Processzor sebess�g (Mhz) 380 Szoftver 381 Sz�m 382 Szoftver n�v 383 Lap 384 Mindet mozgatja 385 �j kateg�ri�ba 386 VAGY 387 l�tezo kateg�ri�ba 388 Kateg�ria 389 Semmi 390 Szofver kateg�ri�k 391 Kateg�ria n�v 392 T�rl�s 393 Keres�s 394 Kateg�ria keres�s 395 Szoftver keres�s MINDENHOL 396 Reset 397 Ugr�s kateg�ri�ra 398 Kateg�ria lista 410 EXACTLY 411 Fields must contain only numbers ! 412 Registry key gathering functionality 413 Automatic update functionality 414 Automatic deployment functionality 415 Deletion logging functionality (needed by GLPI). 416 Logging functionality. 417 Automatic software distribution functionality. 418 Differentiate inventories functionality. 419 Maximum number of day before an ipdiscover computer is replaced. 420 Automatic software distribution: see documentation. 421 Automatic software distribution: see documentation. 422 Automatic software distribution: see documentation. 423 Automatic software distribution: see documentation. (Packages with a higher or equals priority won't be downloaded anymore). 424 Validity of a package as from its consideration by the agent. 425 Max number of computers per gateway retrieving IP on the network. 426 Validity of inventories. (ALWAYS: inventory at each login. NEVER: no inventory) 427 Defines criteria that must be equals for two computers to be automatically merged. 428 Deploy 429 Frequency 430 Mass processing 431 Activate 432 Non notified 433 Affect 434 Package builder 435 New package building 436 Can't open file 437 Your package was successfully created in the directory 438 New package building 439 Protocol 440 Priority 441 Digest algorithm 442 Digest encoding 443 Action 444 Command 445 Path 446 File name 447 User notifications 448 Warn user 449 Text 450 Countdown 451 User can abort 452 User can delay 453 Installation completion need user action 454 NO 455 YES 456 Execute 457 Store 458 Launch 459 Countdown must be a number 460 Unique identifier 461 Digest 462 Total size 463 Fragments size (1 KB min) 464 Fragments number 465 Package activation 466 WARNING: Can't find information file at 467 WARNING: Can't find fragments files at 468 Are you sure to want to activate this package ? 469 Package activated, it can now be affected 470 Https url 471 Fragments url 472 ERROR: Can't delete directory 473 Timestamp must be a number 474 Timestamp must be 10 digits long 475 Timestamp 476 Or activate a package manually 477 Affect a package 478 Computer(s) 479 No computer selected 480 fragments 481 Activated packages 482 WAITING NOTIFICATION 483 Validate SUCCESSES 484 Custom frequency 485 Always inventoried 486 Never inventoried 487 Custom 488 Default 489 IpDiscover behaviour 490 NEVER IpDiscover 491 ALWAYS IpDiscover of network 492 ELECTED IpDiscover of network 493 Default (can be elected) 494 Custom inventory frequency 495 Inventoried every 496 day(s) 497 Default, uses the 'FREQUENCY' parameter. 498 Package 499 server 500 Customization 501 add package 502 Elected 503 Force elected 504 Not elected 505 Electable 506 Not electable 507 HAVING 508 NOT HAVING 509 ANY 510 No package 511 seconds 512 Deployment 513 Build 514 Activate 515 Activated 516 KB 517 This option can only be affected to one computer at a time. 518 Force IpDiscover 519 Computer already elected for network 520 Computer already FORCED ipdiscover for network 521 Computer already FORCED unelectable 522 Standard computer 523 Revert back to standard state 524 NEVER affect again 525 ARE YOU SURE ? 526 NO COMPUTER AFFECTED 527 January 528 February 529 March 530 April 531 May 532 June 533 July 534 August 535 September 536 October 537 November 538 December 539 Sunday 540 Monday 541 Tuesday 542 Wednesday 543 Thursday 544 Friday 545 Saturday 546 in state 547 all 548 All but SUCCESS 549 File (deployed on client computers) 550 File (not mandatory, may be used by "execute" commmand) 551 This package name already exists 552 You must make a computer search, and then click 'deploy' to affect these activated packages
You may also affect a package to a single computer by using the 'customization' tab of any computer details
. 553 Windows key 554 Monitor: serial 555 Monitor: manufacturer 556 Monitor: caption 557 Userdomain 558 Affected packages 559 This file is not .ocs 560 To server 561 Unknown (deleted package) 562 Networks having uid: 563 Manufacturer 564 Agent auto-launching frequency 565 Address used for local inventories 567 Ipdiscover latency 568 RAM(MB) 569 CPU(MHz) 570 Help 571 Validate all 572 Success 573 Errors 574 Stats 575 Unaffect not notified 576 Customized ipdiscover 577 Group name 580 All computers (replay) 581 All computers (cached) 582 and 583 Groups 584 For the request 585 For selection 586 New group 587 New static group 588 Overwrite group 589 statically add to group 590 Reset state 591 Include statically 592 Exclude statically 593 Creation date 594 Cache generated on 595 STATIC GROUP 596 DYNAMICALLY INCLUDED 597 STATICALLY EXCLUDED 598 Include 599 Reset 600 Exclude 601 Mass affectation 602 You need to send a file 603 No computer found, please check your file 604 computer(s) successfully affected(s) 605 computer(s) failed 606 Computers file 607 Group 608 created 609 overwritten 610 STATICALLY INCLUDED 611 NO CACHE 612 STATIC 613 DYNAMIC 614 EXCLUDED 615 Query 616 Perimeter of user 617 New 618 Perimeter 619 Local user 620 No computer in your perimeter. 621 The group was not created. Its name is already in use 622 Cached 623 The information you are trying to access does not exist 624 Do you really want to delete group 625 Enable this alteration 626 Disable this alteration 627 At least one of the fields is empty... Not made Update. 628 Servers 629 New group of servers of redistribution 630 A group of existing servers 631 Add to 632 Crush 633 Management groups servers 634 Wished action 635 New name 636 Description 637 Replace 638 THE GROUP'S NAME CAN'T BE EMPTY 639 THIS GROUP'S SERVER NOT EXIST 640 Do you really want to delete 641 Management of the redistribution servers 642 the group 643 All machine 644 this machine 645 GROUP DETAIL 646 URL 647 PORT NUMBER 648 REPERTOIRE STORE 649 AUTOMATIC ACTIVATION 650 MANUAL ACTIVATION 651 Servers group 652 Machine(s) 653 Blacklist MAC address 654 Enter a new MAC address for blacklist 655 Insertion made 656 This datum already exists in the list 657 Fields in red are in error!!! (Empty fields or size < 2) 658 machine don't have redistribution servers.
It is thus necessary to affect this package individually. 659 Machines already have this teledeploy package. This package's statut for these machines is now 660 GROUP OF SERVEUR NOT EXIST 661 PACKAGES FOR SERVER OF REDISTRIBUTION 662 Rules of affectation 663 INTERNES PROBLEM 664 Action made 665 NO SELECTED MACHINE. GROUP OF SERVER NOT CREATED 666 Group of server made 667 FOR THE PACKAGE 668 to Affect with which rule? 669 ATTENTION: there are doubloons of priority < br > A single rule will be retained! 670 A rule already carries this name 672 This rule does not exist!!! 673 Administration of the rules of affectation 674 NAME OF THE RULE 675 PRIORITY 676 MACHINE VALUE 677 OPERATOR 678 SERVER VALUE 679 NAME 680 DOMAIN 681 USER 682 to Add a supplementary condition 683 Validate the rule 684 The following fields must be seized 685 Add a rule 686 The condition 687 You cannot delete it. 688 Packages are affected on this goupe! 689 Packages are affected on this server! 690 You cannot delete all the machines. 691 Generic Values: $IP$ and $NAME$ 692 You modify ALL the values of the servers 693 You modify the values of the following server: 694 to find the default values, validate the vacuous fields 695 You modify the group of servers 696 to Show packages activated to affect on 697 a machine 698 a group of server 699 Are you sure to want to affect this package in these machines? 700 Blacklist choices 701 Blacklist of serial number 702 Enter a new serial number to blacklister 703 Blacklist 704 Are you sure to want to blacklister 705 Are you sure to want to unblacklister 706 Unblacklister 707 this serial number 708 this mac address 709 Customized PROLOG_FREQ 710 Customized download 711 Taken into account modifications 712 Language file 712 Language file 713 Are you sure to replace this language file 714 Reference language file 715 Choose the language file to modify 716 Update the language file 717 customized 718 Ignore 719 (per second) 720 Waiting time between 2 cycles of deployment 721 Waiting time between 2 downloaded fragments 722 Waiting times between 2 periods of deployment 723 maximum Priority of the downloaded packages
(The packages of a superior priority are ignored) 724 Time between 2 contacting between the agent and the server 725 (in the hour) 726 URI of the servers of redistribution ($IP and NAME$ are the generic values) 727 Directory of destination of packages. 728 Inventory 729 computers 730 hours 731 Feature of appointed on the base to every section of inventory. 732 milisecond(s) 733 Inactive 734 Inventory files 735 Filters 736 Enable the computer's groups feature 737 Random number computed in the defined range. Designed to avoid computing many groups in the same process 738 Specify the validity of computer's groups (default: compute it once a day - see offset) 739 Futur security improvements 740 Validity of a computer's lock 741 Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load) 742 Make engine consider an inventory as a transaction (lower concurency, better disk usage) 743 Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load 744 Accept an inventory only if required by server ( Refuse "forced" inventory) 745 Specify when the engine will clean the inventory cache structures 746 Specify the minimal difference to replace an ipdiscover agent 747 Disable the time before a first election (not recommended) 748 Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents) 749 Use with ocsinventory-injector, enable the multi entities feature 750 Generate either compressed file or clear XML text 751 Specify if you want to keep trace of all inventory between to synchronisation with the higher level server 752 Path to ocs files directory (must be writeable) 753 Enable prolog filter stack 754 Enable core filter system to modify some things "on the fly" 755 Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period 756 Period definition for INVENTORY_FILTER_FLOOD_IP 757 Enable inventory filter stack 758 Specify if you want to track packages affected to a group on computer's level 759 Must be superior or egal in 760 Webservice 761 Enable/Disable the soap service 762 Result page size (be aware of performances issues) 763 Include file of your own modules 764 Options below are not settable by GUI.
(see ocsinventory-server.conf) 765 All softwares 766 NO RESULT 767 BE CAREFUL: RESULT WITH FILTER 768 Number of recording 769 Tranfer Made 770 UPDATE OF 771 This category already exists 772 The category's name can't be null 773 You must select category's name 774 You try to make a transfer of the category towards the same category 775 Directory of creation of packages 776 Directory of stake in cache of the analyses of ipdiscover 777 Validity of a session 778 Number of different WORKGROUP 779 Different TAG 780 Different IPSUBNET 781 Machines having a software deployement pending 782 Machines having a package in error 783 Number of different OS 784 Different agent 785 Different processors 786 Different resolutions 787 Machines with a processor >= 788 Machines with a processor =< 789 Machines with a processor between 790 Machines with RAM >= 791 Machines with RAM =< 792 Machines with RAM between 793 Machines in base 794 Seen machines 795 Machines contact server today 796 Number of inventory machine today 797 Machines not see since more of 798 ACTIVITY 799 HARDWARE 800 ELSE 801 Don't show this field 802 Show this fied 803 Counts in the daytime since the machine don't contact server 804 Minimum speed processor 805 Maximum speed processor 806 Minimum RAM amount 807 Maximum RAM amount 808 Repartition 809 STATICS GROUPS 810 DYNAMICS GROUPS 811 Are you sure to want to modify the visibility of the group 812 The software in 0 is present in CACHE but are not any more settled on machines.
They cannot be put in a category of dictionary 813 hard disk number with remaining size > 814 hard disk number with remaining size < 815 hard disk number with remaining size between 816 hard disk maximum remaining size 817 hard disk minimum remaining size 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volumn Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one redistribution group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection? 901 Action on the query result 902 Action on the result of selection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect package 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 You cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The network ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 To come back to a standard state, you will have to click on the icon e which is at the right top of the interface 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Software search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your e-mail is not valid 1056 Contact your OCS-NG administrator 1057 Failed to connect to mailserver 1058 no e-mail is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' function is not activate. 1075 Activate this functionality to use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of note 1127 Author of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on redistribution group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profil 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profil (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 The install.php exists in ocsreports directory 2021 Your GUI logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default sql login/password is activate on your database: 2025 Change your password for ocs login in MySQL 2026 The default login/password is activate on OCS GUI 2027 Change admin password on OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forgot to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/italian/000077500000000000000000000000001303466605000254355ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/italian/italian.png000077500000000000000000000027171303466605000275760ustar00rootroot00000000000000PNG  IHDR`@jVY,tEXtCreation Timeven 30 dic 2005 15:55:19 +0100XtIME 8K pHYsiTSgAMA a&IDATxK4˯ĝa%8pF\^8s0>L3bN3 +$W{Enw:)W~UvRf?N&vI/3<"tx~!vw|^VYrdtf~m7U?SyEvx8 1?)CJ)v]Ԗe b?dV"Xe#ԏOg)-oUFu]ha X ,3ǝuΓ,w5/C~rw+|t ?e@64 E20gI,Ec,`40k0.\.S(XyLr2L2<:8k]9+Oٚs\Z3:R=_/}F e c+&-A*EL8nЕ!{+e>Kf[$tCL|i'_lyA-9<|Ɏ YK25$\uG[+O齉VNxIq+C/Bmy&.C"E4B- j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j YN߰S]JӞCUÜv^l'~wشNZcWe|0~dLX ,afŜp-mS5_ " {B8Tbu >BrF 9iOTOu8t^)p. Z D3El_MSb`ݪf,8tReaD@uπbHl8xYYKzn :NeV`b8Ȁ̀ =) Pݡ a\1O j †!<m@,㫰liO#ɀ9ۜўPN>G09Z%^gpc\yCNH^gT2kceTI V_/1Dj_3632}2)}k:,ĕJJ@,^_ T)]^^{林.+mq|7av,FPIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/italian/italian.txt000077500000000000000000001271341303466605000276320ustar00rootroot000000000000002 Tutti i computer 9 Ricerca con criteri multipli 13 Invia 17 Agente 18 Revisione 19 Versione software 20 Software 23 Computer 24 Utente 25 Sistema operativo 26 Memoria 27 Velocita della RAM (MHz) 28 Numero di computer 30 Ricerca 31 Scegli un parametro 32 Scegli 33 Dominio 34 Indirizzo IP 35 Nome computer 36 Numero di serie 41 Reset 42 Nessun risultato 43 Menù principale 45 Spazio libero 46 Ultimo inventario 48 Dettagli computer 49 Nome 50 File di swap (MB) 51 Commenti 52 Visibile 53 Descrizione 54 Processore (CPU) 55 Numero 56 Dati amministrativi 61 Scheda video 62 Risoluzione 63 Unità di memorizzazione 64 Produttore 65 Modello 66 Tipo 67 Capacità disco 69 Produttore 70 Denominazione 79 Stampanti 80 Nome 81 Stato 82 Reti 83 Capacità 84 Interfaccia 85 Lettera 86 File system 87 Totale 88 Spazio disponibile 90 Risultati 91 Dispositivi di input 92 Dischi 93 Controller 94 Numero slot 95 Indirizzo MAC 96 Suono 97 Monitor 103 Aggiorna 107 Configurazione 108 Richieste registro 111 Licenza Windows 113 Annulla 114 Registra 115 Aggiorna 116 Aggiungi 119 Vuoi veramente eliminare il computer 122 Elimina 129 COME 130 DIVERSO 134 Aggiungi un nuovo file nel database 135 Attenzione, stai per eliminare questo file definitivamente! 137 File 140 Super amministratori 141 Amministratori 142 Amministratori locali 143 Richiedenti Teledeploy 162 Elimina selezionati 168 Il formato del file non è valido (deve essere exe) 170 Esiste già lo stesso file! 171 File eliminato 172 Errore, il file 173 non è stato aggiunto al database 174 Sicurezza 175 Duplicati 176 IP 177 Unisci i computer duplicati 178 Etichetta / Numero di ripartizione PC 180 Nome utente o password errata 182 I computer hanno un'etichetta assegnata 183 Scarica 184 Questo file non contiene "use constant version" 185 La versione deve essere >= 1 186 Il file non contiene la versione 187 Questo non è un file zip valido 188 Indietro 189 Devi selezionare almeno 2 computer 190 Resoconto: 191 eliminato 192 Sommario duplicazioni 193 Nome computer + numero di serie 194 Nome computer + indirizzo MAC 195 Indirizzo MAC + numero di serie 196 Solo nome computer 197 Solo numero di serie 198 Solo indirizzo MAC 199 Duplicati 200 Diminuzione interruttore corrispondente 201 MINORE DI 202 MAGGIORE DI 203 TRA 204 AL DI FUORI 205 Abilitato 206 salvato per 207 Gateway 208 Netmask 209 Versione BIOS 210 Data BIOS 211 Registro 212 Nome chiave 213 Valore chiave 214 Stampa questa pagina 215 Mostra tutto 216 ASSET TAG 217 Password 218 Versione agente 219 Interfacce di rete non inventariate 220 eliminato 221 Acquisizione indirizzi IP dei computer 222 ATTENZIONE! Tutti i computer selezionati saranno uniti in un singolo computer! Sei sicuro? 223 Informazioni 224 Valore 225 Informazioni amministrative 226 è stato cancellato dalla tabella delle informazioni amministrative 227 Sei sicuro di voler cancellare la colonna 228 Inserisci una nuova informazione amministrativa 229 Testo (255) 230 Intero 231 Reale 232 Data 233 Tipo attuale 234 inserito con successo 235 Utenti 236 Cambio password 237 Nuova password 238 Conferma 239 Devi riempire ogni campo 240 Le password sono differenti 241 La password è stata modificata con successo 242 Amministratori 243 Utenti 244 Aggiungi nuovo utente 245 è stato eliminato con successo 246 Sei sicuro di voler eliminare l'utente 247 Utente MySQL 248 Password MySQL 249 Impossibile connettersi a MySQL. Inserisci utente e/o password validi. 250 Server MySQL 251 Esci 252 Nome (scegli) 253 Chiave di registro (hive) 254 Percorso della chiave (Es: SOFTWAREMozilla) 255 Nome della chiave che si vuole leggere (* per tutte) 256 Scelta 257 Chiave registro 258 Valore chiave registro 259 Errore, il dato non può essere inserito (i caratteri speciali non sono ammessi) 260 La descrizione del file è stata modificata 261 La descrizione del file è stata eliminata 262 Inserisci o modifica l'etichetta 263 Configurazione dell'etichetta 264 Non esiste nessuna etichetta 265 Qualsiasi 266 Data non valida 267 gg/mm/aaaa 268 Velocità 269 %d/%m/%Y 270 Modem 271 Slot 272 Porte 273 BIOS 274 Sistema Operativo 275 Versione del Sistema Operativo 276 Chipset 277 Versione 278 Driver 279 Porta 280 Tipo MIB 281 DHCP IP 282 Gateway 283 Scopo 284 Costruttore BIOS 285 Selezionare un parametro da modificare 286 Service pack 287 Importazione locale 288 Importa localmente 289 Informazione di rete 290 Ricerca indirizzi IP 291 Modalità avanzata 292 Aggiungi / rimuovi unità di rete 293 Tipi unità di rete 294 Nomi sottoreti 295 Ubicazione 296 Id 297 Non è possibile scrivere nella directory 298 Tutti i campi devono essere riempiti 299 Indirizzo IP errato (deve essere: x.x.x.x) 300 Netmask errata: deve essere: x.x.x.x 301 La rete è stata inserita 302 La rete è stata eliminata 303 Aggiungi una sottorete 304 Nome rete 305 Reparto 306 Elenco sotterete 307 Aggiungi un tipo 308 Nome tipo 309 Tipi apparati di rete 310 IpDiscover minore di 311 Apparati 312 IpDiscover 313 Gateway computer 314 Computer gateway per ricerca IP 315 Computer non inventariati 316 Sottorete 317 ANALIZZA 318 Nome DNS 319 Risultati dell'analisi di rete 320 Questa analisi è già stata eseguita 321 vuoi vedere le informazioni memorizzate? 322 Informazioni memorizzate 323 generate da 324 APPARATI ANALIZZATI COME 325 vuoto 326 non è stata inserita la netmask 327 Dettagli computer 328 Ricercati 329 Inventariati 330 Nome NetBIOS 331 Rete 332 Attendere prego... 333 Aggiungi un nuovo apparato di rete 334 Elenco apparati di rete 335 Tipo apparato 336 Descrizione apparato 337 IL PROGRAMMA NON HA INVIATO NULLA 338 Modalità limitata 339 Hai bisogno di IpDiscover-util.pl (solo Linux) in modalità avanzata 340 Visualizza 341 Non è eseguibile, devi assegnare i diritti di esecuzione 342 Devi assegnare i diritti di scrittura sulla root directory per usarlo 344 Errore 345 L'ANALISI E' ANCORA IN ESECUZIONE, RIPROVA TRA POCO 346 prima del 347 dopo il 348 Utente Windows 349 Aggiungi colonna 350 Tipo CPU 351 Numero CPU 352 Ultimo aggiornamento 353 Qualità 354 Fedeltà 355 Società 356 Proprietario 357 Versione agente 358 Caratteri jolly: ? (un solo carattere), * (più caratteri) 359 Numero di serie del monitor 360 Costruito nel (settimana/anno) 362 La rete 363 esiste già 364 Inventariato 365 Non inventariato 366 Identificato 367 Apparati di rete 368 di rete 369 Eseguito da 370 Distribuito 371 Tutti i componenti 372 Scegli i componenti 373 Utente registrato 374 Utente aggiornato 375 Versione agente OCS-NG 376 Computer bloccato. Riprova tra qualche minuto 377 Velocità CPU (MHz) 380 Dizionario 381 Numero di installazioni 382 Nome del software 383 La pagina 384 Sposta tutto 385 in una nuova categoria 386 O 387 in una categoria esistente 388 Categoria 389 Niente 390 Categorie del dizionario 391 Nome categoria 393 Cerca 394 Cerca categoria 395 Cerca software OVUNQUE 396 Reset 397 Vai alla categoria 398 Elenco categorie 410 ESATTAMENTE 411 I campi devono contenere solo numeri! 412 Funzionalità acquisizione chiavi di registro 413 Funzionalità aggiornamento automatico 414 Funzionalità distibuzione automatica 415 Funzionalità eliminazione log distribuzione (necessaria a GLPI) 416 Funzionalità log 417 Funzionalità distribuzione automatica dei software 418 Funzionalità inventari differenziati 419 Numero massimo di giorni prima che un computer ricercato con IP sia sostituito. 420 Distribuzione automatica del programma: consultare la documentazione. 421 Distribuzione automatica del programma: consultare la documentazione. 422 Distribuzione automatica del programma: consultare la documentazione. 423 Distribuzione automatica del programma: consultare la documentazione. (I componenti con una priorità >= non devono essere scaricati ulteriormente) 424 Validità di un pacchetto come considerato dall'agente 425 Numero massimo di computer per gateway trovati sulla rete 426 Validità degli inventari (SEMPRE: inventario ad ogni login - MAI: nessun inventario) 427 Definisce il criterio per il quale due computer devono essere uniti automaticamente 428 Distribuzione 429 Frequenza 430 Elaborazione di massa 431 Attivare 432 Non notificato 433 Riguarda 434 Generatore pacchetti 435 Nuovo pacchetto generato 436 Non posso aprire il file 437 Il tuo pacchetto è stato generato con successo nella directory 438 Generazione nuovo pacchetto 439 Protocollo 440 Priorità 441 Algoritmo di hash 442 Codifica di hash 443 Azione 444 Comando 445 Percorso 446 Nome file 447 Notifica utente 448 Avviso all'utente 449 Testo 450 Conto alla rovescia 451 L'utente può annullare 452 L'utente può ritardare 453 Per completare l'installazione è necessario l'intervento dell'utente 454 NO 455 SI 456 Esegui 457 Immagazzina 458 Lancia 459 Il conto alla rovescia deve essere un numero 460 Identificatore univoco 461 Hash 462 Dimensione totale 463 Dimensione frammenti (min. 1 KB) 464 Numero frammenti 465 Attivazione pacchetto 466 AVVISO: non è stato trovato il file delle informazioni in 467 AVVISO: non è stato trovato il file dei frammenti in 468 Sei sicuro di voler attivare questo pacchetto? 469 Pacchetto attivato, ora può essere ricercato 470 Indirizzo Https 471 Indirizzo dei frammenti 472 ERRORE: la cartella non può essere eliminata 473 L'identificativo deve essere un numero 474 L'identificativo deve essere lungo 10 cifre 475 Identificativo 476 od attivare un pacchetto manualmente 477 Interessa il pacchetto 478 Computer 479 Nessun computer selezionato 480 frammenti 481 Pacchetti attivati 482 ATTESA NOTIFICA 483 Validazione riuscita 484 Frequenza personalizzata 485 Sempre inventariato 486 Mai inventariato 487 Personalizzato 488 Default 489 Comportamento IpDiscover 490 Non usare IpDiscover 491 Usa IpDiscover della rete 492 ELETTO IpDiscover della rete 493 Default (può essere eletto) 494 Frequenza di inventario personalizzata 495 Inventariato ogni 496 giorni 497 Predefinito (usa il parametro 'FREQUENCY') 498 Pacchetto 499 Server 500 Personalizzazione 501 aggiungi pacchetto 502 Eletto 503 Eletto forzatamente 504 Non eletto 505 Elegibile 506 Non elegibile 507 HA 508 NON HA 509 TUTTI 510 Nessun pacchetto 511 secondi 512 Distribuzione 513 Costruire 514 Attivare 515 Attivato 516 KB 517 Questa operazione può essere eseguita su un computer per volta. 518 Forza IpDiscover 519 Computer già eletto per la rete 520 Computer già obbligato a ricercare indirizzi IP della rete 521 Computer già obbligato a non essere eletto 522 Computer standard 523 Ritorna allo stato originario 524 NON più di interesse 525 SEI SICURO? 526 NESSUN COMPUTER INTERESSATO 527 Gennaio 528 Febbraio 529 Marzo 530 Aprile 531 Maggio 532 Giugno 533 Luglio 534 Agosto 535 Settembre 536 Ottobre 537 Novembre 538 Dicembre 539 Domenica 540 Lunedì 541 Martedì 542 Mercoledì 543 Giovedì 544 Venerdì 545 Sabato 546 in posizione 547 tutti 548 tutti i RIUSCITI 549 File (distribuito sui computer client) 550 File (non obbligatorio, può essere usato dal comando "esegui") 551 Il nome del pacchetto esiste già 552 Devi eseguire una ricerca computer, quindi cliccare 'distribuire' perchè venga distribuito il pacchetto.
Puoi anche distribuire un pacchetto su un singolo computer usando la linguetta 'personalizzazione'
. 553 Windows S/N 554 Monitor: numero di serie 555 Monitor: produttore 556 Monitor: legenda 557 Dominio dell'utente 558 Pacchetto interessato 559 Questo file non è .ocs 560 Al server 561 Sconosciuto (pacchetto cancellato) 562 Rete con uid: 563 Produttore 564 Frequenza di lancio automatico dell'agente 565 Indirizzo usato per gli inventari locali 567 Latenza IpDiscover 568 RAM (MB) 569 CPU (MHz) 570 Aiuto 571 Convalida tutti 572 Eseguito 573 Errore 574 Statistiche 575 Non interessati non notificati 576 IpDiscover personalizzato 577 Nome gruppo 580 Tutti i computer (replay) 581 Tutti i computer (in cache) 582 e 583 Gruppi 584 Per la richiesta 585 Per la selezione 586 Nuovo gruppo 587 Nuovo gruppo statico 588 Sovrascrivi gruppo 589 assegna ad un gruppo 590 Reset dello stato 591 Includi staticamente 592 Escludi staticamente 593 Data creazione 594 Cache generata su 595 GRUPPO STATICO 596 INCLUSO DINAMICAMENTE 597 ESCLUSO STATICAMENTE 598 Incluso 600 Escluso 601 Assegnazione di massa 602 Devi inviare un file 603 Nessun computer trovato, verifica il tuo file 604 computer interessati con successo 605 computer falliti 606 Computer file 607 Gruppo 608 creato 609 sovrascritto 610 INCLUSO STATICAMENTE 611 Nessuna cache 612 STATICO 613 DINAMICO 614 ESCLUSO 615 Query 616 Perimetro utente 617 Nuovo 618 Perimetro 619 Utente locale 620 Nessun computer nel tuo perimetro. 621 Il gruppo non è stato creato. Nome già in uso 622 Cache 623 L'informazione che stai cercando non esiste 624 Vuoi davvero eliminare il gruppo 625 Conferma 626 Annulla 627 Almeno uno dei campi è vuoto... Aggiornamento non effettuato. 628 Server di ridistribuzione 629 Nuovo gruppo di ridistribuzione 630 Gruppo di ridistribuzione esistente 631 Aggiungi a 632 Eliminare 633 Gestione dei gruppi di ridistribuzione 634 Azione desiderata 635 Nuovo nome 637 Rimpiazza 638 IL NOME DEL GRUPPO NON PUO' ESSERE VUOTO 639 QUESTO GRUPPO DI RIDISTRIBUZIONE NON ESISTE 640 Vuoi davvero eliminare 641 Amministrazione dei server di ridistribuzione 642 il gruppo 643 Tutte le macchine 644 questa macchina 645 DETTAGLI GRUPPO 646 URL 647 NUMERO PORTA 648 REPERTOIRE STORE 649 AUTOMATICA 650 MANUALE 651 Gruppo di ridistribuzione 652 Macchine 653 Blacklist indirizzi MAC 654 Inserisci un nuovo indirizzo MAC nella blacklist 655 Inserimento effettuato 656 Questo valore è già presente nella lista 657 I campi in rosso contengono errori! (Campo vuoto o valore < 2) 658 macchine senza server di ridistribuzione.
Pertanto è necessario agire sul pacchetto individualmente. 659 Le macchine hanno già questo pacchetto Teledeploy. Lo stato del pacchetto per queste macchine è ora 660 IL GRUPPO DI RIDISTRIBUZIONE NON ESISTE 661 PACCHETTI PER LA RIDISTRIBUZIONE 662 Regole di comportamento 663 PROBLEMA INTERNET 664 Azione effettuata 665 NESSUNA MACCHINA SELEZIONATA. GRUPPO DI RIDISTRIBUZIONE NON CREATO 666 Gruppo di ridistribuzione creato 667 PER IL PACCHETTO 668 quale regola applicare? 669 ATTENZIONE: ci sono duplicati di priorità
Una singola regola verrà mantenuta! 670 Una regola ha già questo nome 672 Questa regola non esiste! 673 Amministrazione delle regole di comportamento 674 NOME DELLA REGOLA 675 PRIORITA' 676 VALORE MACCHINA 677 OPERATORE 678 NOME SERVER 679 NOME 680 DOMINIO 681 UTENTE 682 aggiungi una condizione supplementare 683 Convalida la regola 684 I seguenti campi devono essere bloccati 685 Aggiungi una regola 686 La condizione 687 Non puoi cancellarlo. 688 I pacchetti sono assegnati a questo gruppo! 689 I pacchetti sono assegnati a questo server! 690 Non puoi cancellare tutte le macchine. 691 Valori generici: $IP$ e $NAME$ 692 Stai cambiando TUTTI i valori dei server 693 Stai cambiando i valori del seguente server: 694 per ripristinare i valori di default, convalidare i campi vuoti 695 Modifica il gruppo di ridistribuzione 696 per mostrare i pacchetti attivati da applicare 697 una macchina 698 un gruppo di ridistribuzione 699 Sei sicuro di voler far puntare questo pacchetto a queste macchine? 700 Scelta blacklist 701 Numeri di serie nella blacklist 702 Inserisci un nuovo numero di serie nella blacklist 703 Blacklist 704 Sei sicuro di volerlo inserire nella blacklist 705 Sei sicuro di volerlo togliere dalla blacklist 706 Rimosso dalla blacklist 707 questo numero di serie 708 questo indirizzo MAC 709 Personalizza PROLOG_FREQ 710 Download personalizzato 711 Modifiche prese in considerazione 712 File della lingua 713 Sei sicuro di voler rimpiazzare questo file della lingua 714 File della lingua di riferimento 715 Scegli il file della lingua da modificare 716 Aggiorna il file della lingua 717 personalizzato 718 Ignora 719 (per secondo) 720 Tempo di attesa tra 2 cicli di distribuzione 721 Tempo di attesa tra 2 frammenti scaricati 722 Tempo di attesa tra 2 periodi di distribuzione 723 massima priorità dei pacchetti scaricati
(i pacchetti con priorità superiore sono ignorati) 724 Tempo tra 2 contatti tra agente e server 725 (in ore) 726 URI dei server di ridistribuzione ($IP$ e $NAME$ sono valori generici) 727 Directory di destinazione dei pacchetti. 728 Inventario 729 computer 730 ore 731 Funzionalità di impegnarsi sulla base di ogni sezione dell'inventario. 732 millisecondi 733 Inattivo 734 File di inventario 735 Filtri 736 Abilita la funzionalità dei gruppi di computer 737 Numero casuale calcolato nel range definito. Progettato per evitare di calcolare tutti i gruppi allo stesso tempo 738 Specificare la validità di un gruppo (default: calcolato una volta al giorno - vedi offset) 740 Durata di un blocco del computer 741 Configura il motore per aggiornare l'inventario secondo il valore del CHECKSUM dell'agente (diminuisce il carico del DB backend) 742 Istruire il motore perchè consideri un inventario come una transazione (meno accessi concorrenziali, miglior utilizzo del disco) 743 Configurare il motore per fare aggiornamenti differenziali delle sezioni dell'inventario (righe). Carico inferiore del DB backend, carico superiore per il frontend) 744 Accetta un inventario solo se richiesto dal server (rifiuta quelli "forzati") 745 Specifica quando la struttura della cache sarà pulita 746 Specifica la differenza minima per sostituire un agente IpDiscover 747 Disattivare il tempo che precede una prima elezione (non raccomandato) 748 Abilita gruppi per IpDiscover (es: potresti non volere che alcuni gruppi siano agenti IpDiscover) 749 Utilizzo con ocsinventory-injector, attiva la funzione multi entità 750 Genera file compresso o testo XML in chiaro 751 Specifica se si desidera mantenere traccia di tutti gli inventari con la sincronizzazione al server di livello superiore 752 Percorso della directory dei file OCS-NG (deve essere scrivibile) 753 Attiva filtro prolog stack 754 Attiva il sistema di filtri interno per modificare alcune cose "al volo" 755 Attiva filtro inventory flooding. Un indirizzo IP dedicato è abilitato a trasmettere un nuovo computer solo una volta in questo periodo 756 Definizione del periodo per INVENTORY_FILTER_FLOOD_IP 757 Attiva il filtro stack inventario 758 Specificare se si desidera tenere traccia dei pacchetti destinati ad un gruppo a livello computer 759 Deve essere >= 760 Webservice 761 Abilita/Disabilita il servizio webservice 762 Dimensioni della pagina dei risultati (influeza le prestazioni) 763 File di inclusione delle proprie estensioni 764 Le seguenti opzioni non sono selezionabili tramite GUI.
(vedi ocsinventory-server.conf) 765 tutti i software 766 NESSUN RISULTATO 767 ATTENZIONE: RISULTATO FILTRATO 768 Numero di record 769 Trasferimento effettuato 770 AGGIORNAMENTO DEL 771 Questa categoria esiste già 772 Il nome della categoria non può essere nullo 773 Devi selezionare il nome della categoria 774 Stai provando a trasferire una categoria verso la stessa categoria 775 Directory di creazione dei pacchetti 776 Directory di cache per analisi IpDiscover 777 Validità della sessione 778 Numero di WORKGROUP 779 Etichette diverse 780 IPSUBNET diverse 781 Macchine con distribuzione dei pacchetti in attesa 782 Macchine con pacchetti in errore 783 Tipi di sistemi operativi 784 Versioni di agenti 785 Tipi di CPU 786 Risoluzioni video utilizzate 787 Macchine con CPU >= 788 Macchine con CPU <= 789 Macchine con CPU tra 790 Macchine con RAM >= 791 Macchine con RAM <= 792 Macchine con RAM tra 793 Macchine inventariate 794 Macchine conosciute 795 Macchine che hanno contattato il server oggi 796 Macchine inventariate oggi 797 Macchine assenti da oltre 798 ATTIVITA' 799 HARDWARE 800 ALTRO 801 Non mostrare questo campo 802 Mostra questo campo 803 Numero di giorni da quando la macchina non ha contattato il server 804 Velocità minima della CPU 805 Velocità massima della CPU 806 Quantità minima di RAM 807 Quantità massima di RAM 808 Ripartizione 809 GRUPPI STATICI 810 GRUPPI DINAMICI 811 Sei sicuro di voler modificare la visibilità del gruppo 812 Il software con 0 è presente nella cache ma non è più installato sulle macchine.
Non può essere collocato in una categoria del dizionario 813 Hard disk con spazio libero > 814 Hard disk con spazio libero < 815 Hard disk con spazio libero tra 816 hard disk con spazio libero massimo 817 hard disk con spazio libero minimo 818 Togli dal gruppo 819 Macchine aggiunte ai gruppi 820 Ultimo contatto 821 SERVER CONFIGURATION MODIFICATION 822 Personalizzato 823 Predefinito 824 Attivazione di log dell'interfaccia 825 Directory dei log 826 Indirizzo dove trovare i file del pacchetto Teledeploy da attivare 827 Indirizzo dove trovare il file INFO del pacchetto da attivare 828 Cancella i computer il cui inventario è più vecchio di 829 Directory di creazione dei pacchetti per la distribuzione 830 Indirizzo del server LDAP 831 Porta del server (Predefinita=389) 832 Valore BaseDN + DC 833 Nome del campo login 834 Versione del protocollo 835 Aggiungi sottorete 836 Gestione dei tipi 837 Non hai accesso a questi dati 838 Disco: Lettera del drive 839 Disco: Tipo 840 Disco: Formato 841 Disco: Capacità 842 Disco: Spazio libero 843 Disco: Nome del volume 844 Gruppo: Id 845 Gruppo: Statico 846 Software: Produttore 847 Software: Nome 848 Software: Versione 849 Software: Directory di installazione 850 Software: Commenti 851 BIOS: Costruttore computer 852 BIOS: Modello 853 BIOS: Numero di serie 854 BIOS: Tipo computer 855 BIOS: Produttore 856 BIOS: Versione 857 BIOS: Data 858 Monitor: Produttore 859 Monitor: Nome 860 Monitor: Descrizione 861 Monitor: Tipo 862 Monitor: Numero di serie 863 Network: Descrizione 864 Network: Tipo 865 Network: Tipo MIB 866 Network: Velocità 867 Network: MAC 868 Network: Stato 869 Network: Indirizzo IP 870 Network: Netmask 871 Network: Sottorete IP 872 Network: Gateway 873 Network: DHCP IP 874 Chiave del registro: Nome 875 Chiave del registro: Valore 876 Simple unaffect REDISTRIBUTION GROUP 877 ALCUNI COMPUTER NON SONO STATI AGGIUNTI AL GRUPPO IN QUANTO: 878 Ricorda: un computer può essere membro di un solo gruppo di ridistribuzione 879 GRUPPO SOSTITUITO 880 GROUP CREATO 881 Computer aggiunto 882 Computer rimosso dal gruppo 883 Vista limitata 884 ATTENZIONE: VISTA FILTRATA 885 sconosciuto 886 Semplice disaffezione 887 E' possibile che questo pacchetto non sia interessato dalla distribuzione dei server 888 Rimosso 889 Connesso come 890 L'interfaccia è attualmente bloccata in una ricerca con criteri multipli 891 Rimouovi il blocco sull'interfaccia 892 connessione con altro account 893 NESSUNA ETICHETTA INTERESSA IL TUO PROFILO 894 NESSUN LIVELLO DI PERMESSO DEFINITO PER IL TUO PROFILO 895 Modifica ETICHETTA 898 Aggiungi una nota 899 Editore 900 Vuoi davvero cancellare le voci selezionate? 901 Azione in base al risultato della query 902 Azione in base al risultato della selezione 903 Devi riempieri il campo motivazione 904 Riassegnazione del pacchetto 905 Motivazione circa le azioni eseguite
sul computer per essere in grado di
distribuire il pacchetto 906 Rimozione pacchetto Teledeploy 907 Motivazione circa la rimozione del pacchetto
da questo computer 908 Informazioni sul terminale mobile 909 MODIFICA NON EFFETTUATA: IL NUOVO PROFILO E' ERRATO 910 Validazione 911 Cambio profilo di 912 Esporta la lista dei computer che hanno questi software 913 Interfacce di rete non inventariate 914 Numero degli agenti che non hanno inviato inventari da almeno 915 messaggi 916 Il valore deve essere > di 917 Valore di FREQUENCY 918 Differenza tra LASTDATE e LASTCOME 919 Sei sicuro di voler cancellare questo messaggio 920 ERRORE, il percorso non esiste! 921 Elimina questa categoria 922 Per unirli, devi selezionare almeno 2 computer 923 Non hai nessun computer 924 RICHIESTA DI ESTRAZIONE NON CONFORME! 925 Funzionalità FUSER 926 Fuser login: 927 LA CACHE NON SARA' RIGENERATA DA QUESTA AZIONE 928 Visualizza log 929 la gestione delle sottoreti non è eseguita localmente. 930 Non puoi aggiungere/modificare/rimuovere sottoreti 931 Modifica una sottorete 932 Il campo indirizzo IP non può essere vuoto 933 Il campo nome della rete non può essere vuoto 934 Il campo ID della rete non può essere vuoto 935 Il campo netmask non può essere vuoto 936 Il campo tipo non può essere vuoto 937 Questo tipo già esiste 938 Nuovo tipo 939 Computer membri di un gruppo 940 Tutti i computer che hanno questo pacchetto 941 MOSTRA STATISTICHE ATTIVO 942 Devi inserire un commento per questa periferica 943 Devi selezionare il tipo di periferica 944 Dati inseriti da 945 Modifica periferica 946 Aggiungi nuova periferica 947 Lista delle periferiche non identificate 948 Lista delle perifiriche identificate 949 Id computer 950 NOME FILE 951 CREATO IL 952 MODIFICATO IL 953 DIMENSIONI 954 Si è verificata una perdita di sessione 955 NESSUN SISTEMA TROVATO NEL DATABASE 956 Tutti gli errori 957 Tutti i riusciti 958 PROBLEMA CON IL VALORE DI INSTALLAZIONE 959 TROPPI SOFTWARE TROVATI. SII PIU' SPECIFICO NELLA RICERCA 960 NESSUN SOFTWARE TROVATO 961 LISTA DI 962 (uno ',' tra ogni) 963 LISTA DEI DIFFERENTI 964 Nome partizione 965 Mostra 966 Agente 967 APPARTENENTI A 968 NON APPARTENENTI A 969 Storico dei pacchetti 970 Pacchetti 971 RIMUOVI GRUPPO DI COMPUTER 972 Computer rimossi dal gruppo 973 COMPUTER AGGIUNTI AL GRUPPO 974 computer inseriti nella cache 975 Aggiungi a gruppo 976 INTERFACCIA BLOCCATA SUI RISULTATI OTTENUTI 977 Blocca 978 Stai per bloccare tutte le interfacce sui risultati di ricerca con criteri multipli 979 Per ritornare allo stato predefinito, devi cliccare sull'icona che si trova in alto a destra dell'interfaccia 980 Pacchetti nei computer 981 Pacchetti nei gruppi di server 982 NON SONO DISPONIBILI REGOLE VALIDE. NON E' POSSIBILE PROSEGUIRE LA RIDISTRIBUZIONE. 983 Devi scegliere quale tipo di modifica effettuare 984 Modifiche 985 RIMUOVI I COMPUTER 986 RIMUOVI I COMPUTER PER 987 Questa chiave di registro esiste già 988 DEVI RIEMPIRE TUTTI I CAMPI 989 I DATI NON ESISTONO. STATO DELLE ORE PER QUESTO PACCHETTO NON PRESENTE NEL DATABASE 990 Pacchetto creato manualmente 991 Pacchetto creato automaticamente 992 Tempo stimato per l'installazione 993 I campi in rosso presentano errori 994 PDA/SMARTPHONE 995 ID utente 996 Cognome 997 Devi riempire il campo ID utente 998 scegli un profilo valido 999 Questo ID utente è già presente 1000 Notificato 1001 I campi in rosso presentano errori! 1002 Tempo stimato per l'installazione 1003 Parametri dei pacchetti dei server di distribuzione 1004 Non è possibile creare la directory per la realizzazione del pacchetto 1005 Non è possibile creare il pacchetto 1006 non hai i diritti di scrittura 1007 La directory 1008 Utilizzalo in questo pacchetto di ridistribuzione 1009 Directory di salvataggio dei server 1010 NORMALE 1011 DEBUG 1012 LINGUA 1013 MANUTENZIONE 1014 Modalità operativa 1015 Modalità utente 1016 Login per l'autenticazione 1017 Password di root 1018 (Non inserire nulla per utilizzare connessioni anonime) 1019 Risultato bloccato 1020 Nome dell'etichetta informativa 1021 Amministrazione Teledeploy 1022 Amministrazione etichette 1023 Pacchetti coinvolti in base allo stato 1024 sarà cancellato 1025 Non coinvolto 1026 Pacchetto rimosso dai computer 1027 Categorie 1028 Nuovo 1029 Ignorato 1030 Invariato 1031 Applicazioni 1032 Attiva workflow per Teledeploy 1033 Informazioni del richiedente 1034 Informazioni generali del pacchetto 1035 Informazioni tecniche del pacchetto 1036 Informazioni di convalida 1037 Nome del pacchetto 1038 Richiedente 1039 Priorità 1040 Notifica utente 1041 L'utente può ritardare 1042 Provoca un riavvio 1043 Azioni di controllo per convalidare l'installazione 1044 Da lista 1045 Da visualizzazione 1046 Stato 1047 INFO 1048 Aggiungi un file 1049 AZIONE NON PERMESSA 1050 Ricerca software 1051 Ricerca 1052 Cronologia 1053 Richiesta modificata 1054 Richiesta eseguita 1055 La tua e-mail non è valida 1056 Contatta l'amministratore di OCS-NG 1057 Errore nella connessione al server e-mail 1058 Alcune e-mail non sono valide 1059 Dati esistenti 1060 Nuovi dati 1061 Tab 1062 Campo 1063 Nome 1064 Obbligatorio 1065 Campo di controllo 1066 Linked to a status 1067 Nome del campo già in uso 1068 Il nome del campo non può essere vuoto 1069 Valore aggiunto correttamente 1070 Nuovo campo 1071 Tipo campo 1072 Richieste in attesa 1073 Crea una richiesta 1074 La funzionalità 'Workflow' non è attivata. 1075 Attiva la funzionalità per utilizzarla 1076 ERRORE: STATO RICERCA NON DEFINITO 1077 Stato della creazione del pacchetto 1078 Test dello stato 1079 controllo perimetro di stato 1080 perimetro di stato globale 1081 Informazioni tramite e-mail 1082 Gruppo amministrativo Workflow 1083 Identificazione del perimetro 1084 Nome del gruppo per test 1085 Nome del gruppo per la restrizione del perimetro 1086 Nome dell'etichetta di definizione dei parametri 1087 Valore dell'etichetta per test 1088 Valore dell'etichetta per la restrizione del perimetro 1089 Nessuno stato è attivo. Inizia attivandone uno. 1090 E' stata modificata la richiesta n° 1091 E' stata inviata una nuova richiesta 1092 invia una nuova richiesta 1093 Il database è incompleto 1094 Per favore, ripeti da capo l'installazione del database 1095 Amministrazione stato 1096 Lista dei campi 1097 Lista dei Tab 1098 Nome campo 1099 Valore predefinito 1100 Lista dello stato 1101 Questo campo non può essere aggiornato 1102 Stato attivo 1103 ID stato 1104 Livello 1105 La funzionalità 'Workflow' è attivata 1106 E' possibile creare un pacchetto solo se esiste una precedente richiesta 1107 e lo stato è corretto 1108 Configurazione LDAP 1109 Filtra 1110 L'assegnazione di un pacchetto dipende dallo stato della richiesta 1111 Nome del primo attributo che sarà utilizzato per valutare il livello di autorizzazioni di un utente LDAP (vuoto per nessuno) 1112 Valore del primo attributo che sarà utilizzato per valutare il livello di autorizzazioni di un utente LDAP (vuoto per nessuno) 1113 Se il primo attributo viene trovato ed il valore corrisponde, impostare il profilo utente automaticamente a 1114 Nome del secondo attributo che sarà utilizzato per valutare il livello di autorizzazioni di un utente LDAP (vuoto per nessuno) 1115 Valore del secondo attributo che sarà utilizzato per valutare il livello di autorizzazioni di un utente LDAP (vuoto per nessuno) 1116 Se il secondo attributo viene trovato ed il valore corrisponde, impostare il profilo utente automaticamente a 1117 E-mail 1118 Modifica 1119 Seleziona 1120 Quantità 1121 Aggiornamento effettuato 1122 Wiki 1123 IRC 1124 Forum 1125 Percentuale 1126 Data della nota 1127 Autore della nota 1128 Note 1129 PACCHETTO RIMOSSO 1130 Editor della lingua 1131 Parola 1132 ID parola 1133 Nuova parola 1134 Nessun dato ipdiscover 1135 computer già presenti nel gruppo di ridistribuzione 1136 SNMP 1137 Abilita/Disabilita il servizio SNMP 1138 Mostra tutte le mie sottoreti 1139 Amministra 1140 Amministra sottoreti 1141 Sottorete aggiunta 1142 Inserisci una nuova sottorete nella blacklist 1143 Subnet mask 1144 Indirizzi MAC (deve essere: XX.XX.XX.XX.XX.XX) 1145 il valore deve essere compreso 1146 Amministra profili 1147 Non puoi aggiornarlo. 1148 ATTENZIONE: Non sarà possibile effettuare il backup automatico dei file di configurazione 1149 Nome del nuovo profilo 1150 Profilo di riferimento 1151 Nome del profilo 1152 ATTENZIONE: la cancellazione dei profili di base potrebbe causare instabilità in OCS-NG 1153 Nome del profilo 1154 Sui computer 1155 Sul flusso del Teledeploy 1156 Gestisci flusso del Teledeploy 1157 Sui campi del flusso del Teledeploy 1158 Sull'attivazione dei pacchetti 1159 Su gli indirizzi MAC 1160 Sui numeri di serie 1161 Sulla sottorete dell'ipdiscover 1162 Gestione Teledeploy 1163 Aggiorna la configurazione 1164 Gestione gruppi 1165 Gestione console 1166 Visualizza messaggi di avviso della GUI 1167 Gestione informazioni account 1168 può cambiare le informazioni dei computer 1169 possono cambiare il proprio gruppo di appartenenza 1170 Gestione profili 1171 Gestione profili di gruppo 1172 Gestione ipdiscover 1173 Informazione del profilo 1174 Pagine utente 1175 Restrizioni 1176 Permessi sulle Blacklist 1177 Permessi di gestione 1178 Il campo 1179 è una variabile. Non può contenere caratteri speciali 1180 non può essere vuoto 1181 Funzionalità server di ridistribuzione 1182 Non puoi gestire le regole di ridistribuzione, questa funzionalità è disabilitata 1183 Lista dei pacchetti da creare 1184 Chiave aggiunta 1185 Chiave aggiornata 1186 Informazioni aggiornate 1187 In fase di configurazione 1188 Questo gruppo è dichiarato come perimetro TEST 1189 Questo gruppo è dichiarato come perimetro RESTRAINT 1190 Non puoi disporre dei pacchetti di livello superiore a 1191 Informazione: la configurazione del flusso è attivata 1192 Il gruppo può ricevere pacchetti TEST 1193 Il gruppo può ricevere pacchetti RESTRAINT 1194 Puoi disporre solo dei pacchetti di livello superiore a 1195 possono essere interessati 1196 Profilo 1197 Funzionalità SNMP 1198 Scansione delle reti 1199 Versione SNMP 1200 Valore aggiornato 1201 Mostra 1202 Linux (tutti) 1203 Windows (tutti) 1204 IpDiscover 1205 Gestione delle comunità SNMP 1206 Directory dei file delle comunità SNMP 1207 Aggiungi comunità 1208 Comunità aggiunta 1209 Comunità aggiornata 1210 Account info: 1211 URL dei file della comunità SNMP 1212 Comunità cancellata 1213 Carattere separatore per il file di export 1214 Configura il motore per aggiornare l'inventario SNMP secondo il valore di snmp_laststate table (diminuisce il carico del DB backend) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch 1219 Scheda 1220 Cartuccia 1221 Drive 1222 Ventole 1223 Alimentatori 1224 Alloggiamento 1225 Capacità massima 1226 Colore 1227 Contatto 1228 Periferica SNMP 1229 Firmware 1230 Nome colonna 1231 Il formato del file deve essere ZIP 1232 Il formato del file deve essere TAR.GZ 1233 Nome del database 1234 La descrizione non può essere vuota 1235 Riferimento 1236 Versione software 1237 Versione firmware 1238 Data di installazione 1239 MHz 1240 MB 1241 Numero di periferiche SNMP 1242 d/m/y 1243 I soli file ammessi sono ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe ed ocspackage.exe 1244 Questo file non può essere vuoto 1245 Gestione client OCS-NG 1246 Interessa nuovamente 1247 Architettura 1248 Percorso 1249 Attivazione della cache per le tabelle (consente di diminuire il carico del database MySQL) 1250 Velocità Teledeploy 1251 Statistiche 1252 Directory dei profili di configurazione 1253 Directory dei vecchi profili di configurazione 1254 Directory di log degli script 1255 Numero di connessioni al giorno 1256 Numero di connessioni errate al giorno 1257 Utilizza flash per la GUI 1258 Immissione manuale 1259 Per una settimana 1260 Per un mese 1261 Pulisci la cache 1262 Nessun plugin abilitato per il tuo profilo 1263 AVVISO DI SICUREZZA! 1264 Prossimo 1265 Abilita tabelle cache 1266 Virtual Machine 1267 Tipo Virtual Machine 1268 Uuid 1269 Virtual Machine ospitata su 1270 DDMMYYYY 1271 Computer della sottorete 1272 Elimina il suo computer 1273 Non hai i privilegi per rimuovere una macchina 1274 Profilo aggiornato 1275 Il profilo non può essere eliminato. 1276 Profilo creato 1277 Profilo predefinito (vuoto per nessuno) 1278 Non hai i permessi per connetterti 1279 WOL 1280 Wake On Lan 1281 Su Wake On Lan 1282 Pacchetto Wake On Lan inviato 1283 Esegui Wake On Lan su questo computer 1292 Gestione opzioni avanzate Teledeploy 1293 Forza Teledeploy 1294 Ora dell'installazione 1295 Data dell'installazione 1296 Offerta commerciale 1297 Identificativo periferica 1298 Amministrazione QRCode 1299 QRCode 1300 Verifica QRCode 1301 Su pacchetti invisibili 1302 Sviluppo 1303 Esporta 1304 XML 1305 Nella generazione di un inventario XML 1306 Gestione plugin 1307 Attiva plugin 1308 Aggiungi plugin 1309 Opzioni Teledeploy 1310 Spegnimento 1311 Riavvio 1312 Ampiezza bus di trasferimento 1313 Capacità di indirizzamento dei dati 1314 Numero CPU logiche 1315 Frequenza di funzionamento 1316 Tipo di Socket 1317 Numero di Core 1318 Cache L2 1319 Voltaggio 1320 Usa , per separare le informazioni 1321 Nessuna porta WOL definita 1322 Impossibile aprire il socket per WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERRORE: 2002 ERRORE: linea 2003 Errore MySQL: 2004 (usando il nuovo account ocs) 2005 Sottoreti 2006 ATTENZIONE: 2007 account 2008 errore 2009 fallito 2010 host 2011 login 2012 non inserito 2013 necessario 2014 password 2015 query 2016 correttamente 2017 usando 2018 importati 2019 importati in precedenza 2020 Il file install.php è ancora presente nella directory di OCS-NG. 2021 Non posso scrivere nella directory dei log 2022 Non puoi inviare un file di dimensioni superiori a 2023 Cancellalo 2024 Sono attive le credenziali SQL di default per l'accesso al database: 2025 Cambia la password dell'account 'ocs' in MySQL 2026 Sono attive le credenziali di default per l'accesso alla GUI di OCS-NG 2027 Cambia la password dell'account 'admin' per l'accesso alla GUI di OCS-NG 2028 Chiave di autenticazione 2030 Installazione OCS-NG Inventory 2031 La versione attualmente installata 2032 è precedente a questa versione 2033 E' stata avviata l'installazione automatica. 2034 configurazione del DB incompleta. Lancio l'installazione automatica 2035 ERRORE: PHP sessions non installate correttamente.
Installa il pacchetto php-session. 2036 ATTENZIONE: l'estensione XML per PHP non installata correttamente, non sarai in grado di utilizzare ipdiscover-util. 2037 ERRORE: l'estensione MySQL per PHP non installata correttamente.
Installa il pacchetto MySQL per PHP (Debian: php5-mysql) 2038 ATTENZIONE: l'estensione GD non installata correttamente.
Non sarai in grado di visualizzare nessun oggetto grafico
Prova ad abilitare la voce extension=php_gd2.dll (Windows) rimuovendo il punto e virgola nel file php.ini, oppure prova ad installare il pacchetto php5-gd (Linux). 2039 ATTENZIONE: l'estensione OpenSSL per PHP non installata correttamente.
Alcune caratteristiche dell'installazione automatica non saranno disponibili.
Prova ad abilitare la voce extension=php_openssl.dll (Windows) rimuovendo il punto e virgola nel file php.ini, oppure prova ad installare il pacchetto php-openssl (Linux). 2040 ATTENZIONE: non sarai in grado di creare nessun pacchetto d'installazione di grandezza superiore a 2041 Devi incrementare entrambi i parametri post_max_size e upload_max_filesize nel file php.ini per superare questo limite. 2042 ATTENZIONE: il tuo account root in MySQL ha la password predefinita. Cambiala appena possibile. (root password=blank) 2043 ATTENZIONE: l'utente fornito non è root.
Se hai problemi con il caricamento di file, prova a modificare il parametro globale di MySQL max_allowed_packet ad un valore di almeno 2MB nel file di configurazione. 2044 Etichetta inserita 2045 Etichetta NON inserita (all'avvio del client non sarà richiesto nessun tag) 2046 ERRORE: MySQL ha rilevato problemi con autenticazione. 2047 Devi specificare la vecchia passaword nel tuo file di configurazione di MySQL (my.ini), riavviare MySQL e rilanciare install.php 2050 Installazione terminata. Puoi effettuare il login alla pagina index.php utilizzando "admin" sia come utente che come password 2051 Fai click qui per accedere alla GUI di OCS-NG 2052 ERRORE: non posso scrivere nella directory (dove risiede dbconfig.inc.php), per favore assegna i diritti necessari all'installazione di ocsinventory
(potrai rimuovere i diritti di scrittura una volta terminata l'installazione) 2053 Attendere prego, l'aggiornamento del database potrebbe richiedere fino a 30 minuti... 2054 fallita, KEY troppo lunga
Devi eseguire nuovamente questa query in futuro altrimenti potresti riscontrare problemi di prestazioni. 2055 Database generato correttamente 2056 La configurazione di MySQL è stata salvata correttamente 2057 Il database esistente è stato aggiornato 2058 Controllo della versione del database... 2059 ERRORE: alter query fallita 2060 ERRORE: show table status query fallita 2061 ERRORE: conversione InnoDB fallita. Installa il supporto InnoDB MySQL nel server
altrimenti potresti riscontrare problemi di prestazioni.
(Prova ad abilitare la voce skip-innodb nel file di configurazione di MySQL).
Riavvia l'installazione una volta apportata la correzione. 2062 ERRORE: conversione HEAP fallita. Installa il supporto HEAP MySQL nel tuo server
altrimenti potresti riscontrare problemi di prestazioni. 2063 Versione del database correttamente aggiornata 2064 tabelle modificate 2065 ERRORE: L'installazione di è interrota in modo inaspettato, esegui nuovamente install.php una volta corretto il problema 2066 ATTENZIONE: la directory 'files' è mancante, non posso eseguire l'importazione 2067 da 2068 non è stato inserito. Devi configurare la voce max_allowed_packet in MySQL con, almeno, il valore minimo di 2MB 2070 mancante, se non effettui una nuova installazione la funzione di DEPLOY non sarà disponibile 2071 ATTENZIONE: uno o più file erano già caricati 2072 File di Deploy correttamente caricati 2073 Tabella 'files' troncata 2074 Tabella 'files' vuota 2076 Nessun file subnet.csv da importare 2077 Inserimento delle reti da subnet.csv 2078 ERRORE: non posso inserire le reti 2079 errore nella tabella delle sottoreti 2080 ATTENZIONE: la rete 2081 non è stata inserita (IP o netmask errati 2082 Calcolo netid delle reti. Attendere prego... 2083 ERRORE: non posso aggiornare netid a 2084 Reti netid sono state calcolate 2085 erano state già calcolate 2086 non erano state calcolate 2087 Calcolo NETMAP netid. Attendere prego... 2089 NETMAP netid calcolate 2090 Pulizia linee orfane... 2091 ERRORE: pulizia non eseguita 2092 linee orfane cancellate 2093 Pulizia NETMAP... 2094 ERRORE: non posso pulire NETMAP 2095 linee NETMAP cancellate 2096 Per favore inserisci il valore dell'etichetta che verrà mostrata nella finestra di input dei client: 2097 Non inserire nulla se non vuoi far apparire il pop-up ad ogni esecuzione dell'agente 2098 ERRORE: l'estensione ZIP per PHP non installata correttamente.
Prova ad abilitare la voce extension=php_zip.dll (Windows) rimuovendo il punto e virgola nel file php.ini, oppure prova ad installare il pacchetto libphp-pclzip (Linux). 2099 ERRORE: le credenziali MySQL fornite non hanno i diritti necessari per la creazione del database 2100 Aggiorna le vecchie informazioni account 2101 Aggiunto dallo script 2102 ATTENZIONE: se cambi i valori di default, del database (ocsweb) o dell'utente (ocs), non dimenticare di aggiornare il file 'z-ocsinventory-server.conf' nella directory di configurazione di Apache 2103 Modalità dimostrativa: non puoi aggiornare i dati 2104 STAI UTILIZZANDO LA VERSIONE DIMOSTRATIVA DI 2105 Il database è aggiornato.
Nessuna modifica apportata. 2106 la configurazione di MySQL, variabile 'max_allowed_packet', permette file grandi fino a < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Cache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATA[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugin 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/lang_config.txt000077500000000000000000000005461303466605000270330ustar00rootroot00000000000000 french english german spanish italian brazilian_portuguese polish hungarian portuguese russian slovenian turkish brazilian_portuguese:brazilian english:english french:french german:german hungarian:hungarian italian:italian polish:polish portuguese:portuguese russian:russian slovenian:slovenian spanish:spanish turkish:turkish ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/language.php000077500000000000000000000017731303466605000263230ustar00rootroot00000000000000'MULTI2','LBL'=>'MULTI'); $language_data=read_configuration($ms_cfg_file,$search); $list_plugins=$language_data['ORDER']; $list_lbl=$language_data['LBL']; } $i=0; while (isset($list_plugins[$i])){ if (file_exists($Directory.$list_plugins[$i]."/".$list_plugins[$i].".png")) $show_lang.= " "; else $show_lang.= "".$list_lbl[$list_plugins[$i]]." "; $i++; } echo $show_lang; ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/polish/000077500000000000000000000000001303466605000253125ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/polish/polish.png000077500000000000000000000014501303466605000273210ustar00rootroot00000000000000PNG  IHDRN! pHYs  ~ tEXtComment*IDATx1n#AP]I|.#M4ƍֻ!J^^xN{{/_><|Zk]TkjuQ.EֺZZZk]TkjuQ.EֺZZZk]TkjuQ0+yAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j Td_{IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/polish/polish.txt000077500000000000000000001224731303466605000273650ustar00rootroot000000000000002 Wszystkie komputery 3 Komputery z oprogramowaniem... 5 Unity codes under my responsibility 9 Szukaj w/g określonych kryteriów 12 Wartość Tag-u 13 Wyślij 17 Agent 18 Korekta 19 Wersja oprogramowania 20 Oprogramowanie 23 Komputer 24 Użytkownik 25 System Operacyjny 26 Pamięć 27 Częstotliwość Pamięci (MHz) 28 Numery maszyn 30 Szukaj 31 Wybierz parametr 32 Wybierz 33 Domena 34 Adress IP 35 Nazwa Komputera 36 Numer Seryjny 41 Reset 42 Brak rezultatów 43 Główne menu 45 Wolne miejsce 46 Ostatnia inventaryzacja 48 Informacje o komputerze 49 Nazwa 50 Plik wymiany 51 Komentarz 53 Opis 54 Procesor(y) 55 Numer 56 Dane Administracyjne 61 Karta Graficzna 62 Rozdzielczość 63 Magazyn 64 Producent 65 Model 66 Typ 67 Rozmiar dysku 69 Producent 70 Przeznaczenie 79 Drukarka(i) 80 Nazwa 81 Status 82 Sieć(i) 83 Pojemność 84 Interfejs 85 Litera 86 System plików 87 Ogółem 88 Wolne 90 Rezultat(y) 91 Urządzenia wejściowe 92 Dysk(i) 93 Kontroler(y) 94 Numer slotu 95 Adres MAC 96 Dźwięk 97 Monitor(y) 98 Bądź ostrożny, możesz zaznaczyć tylko 8 opcji ! 99 Szczegóły komputera 103 Aktualizuj 107 Konfiguracja 108 Zapytania rejestru 111 Licencja windows 113 Cancel 114 Rejestruj 115 Aktualizuj 116 Dodaj 117 Rejestr 119 Naprawdę chcesz usunąć 122 Usuń 129 PASUJE 130 RÓŻNI SIĘ 134 Dodaj nowy plik do bazy 135 Ostrożnie, ten plik zostanie usunięty definitywnie ! 136 Pobierz 137 Plik 140 Super administratorzy 141 Administratorzy 142 Lokalni administratorzy 143 Wdrożeniowcy 162 Usuń zaznaczone 168 Ten format pliku jest nieodpowiedni (to musi być zip, pl albo unixowa binarka) 170 Taki sam plik już istnieje ! 171 Plik usunięty 172 Pojawił się błąd, plik 173 nie zostanie dodany do bazy 174 Bezpieczeństwo 175 Duplikaty 176 Ips 177 Połącz nadmiarowe komputery 178 Tag / Ilość rozdzielonych PC 180 Użytkownik nie zarejestrowany 182 Komputery posiadające TAG 183 Pobierz 184 Plik nie zawiera "użyj stałej wersji" 185 Wersja musi być wieksza od 1 186 Ten plik nie zawiera pliku ver 187 Ten plik nie jest prawidłowym plikiem zip 188 Powrót 189 Musisz zaznaczyć co najmniej 2 komputery 190 Informacje o koncie: 191 usunięty 192 Suma różnic 193 Nazwa + Numer seryjny 194 Nazwa + Adres MAC 195 Adres MAC + Numer seryjny 196 Tylko nazwa 197 Tylko Numer 198 Tylko Adres MAC 199 Duplikaty 200 Odpowiadający parametr zmniejszony 201 MNIEJSZY 202 WIĘKSZY 203 POMIĘDZY 204 POZA 205 Wyłączony 206 zapisany dla 207 Brama 208 Maska 209 Wersja BIOS 210 Data BIOS 211 Rejestr 212 Nazwa klucza 213 Wartość klucza 214 Drukuj tę stronę 215 Pokaż wszystko 216 Błąd hasła 217 Hasło 218 Wersje agentów 219 niezinwentaryzowane interfejsy sieciowe 220 usunięte 221 komputery posiadające IP 222 Uwaga ! Wszystkie zaznaczone komputery zostaną połączone w pojedynczy komputer ! Jesteś pewny ? 223 Informacje 224 Wartość 225 Admininfo 226 usunięto z tabeli accountinfo 227 Jesteś pewny, że chcesz usunąć tą kolumnę ? 228 Wprowadź nową informację administracyjną 229 Tekst (255) 230 Liczba całkowita 231 Liczba naturalna 232 Data 233 Bierzące dane 234 został pomyślnie dodany 235 Użytkownicy 236 Zmień hasło 237 Nowe hasło 238 Potwierdzenie 239 Musisz wypełnić wszystkie pola 240 Podane hasła różnią się 241 Twoje hasło zostało zmienione 242 Administrator 243 Użytkownik 244 Dodaj nowego użytkownika 245 został pomyślnie usunięty 246 Jesteś pewien, że chcesz usunąć tego Użytkownika? 247 Login MySQL 248 Hasło MySQL 249 Nie można połączyć się z MySql. Proszę podać prawidłowy(e) login/hasło. 250 Nazwa hosta MySQL 251 Wyloguj 252 Nazwa (wybierz) 253 Klucz rejestru 254 Ścieżka klucza (np: SOFTWAREMozilla) 255 Nazwa klucza do odczytania (* dla wszystkich) 256 Wybierz 257 Klucz rejestru 258 Wartość klucza rejestru 259 Błąd, dane nie mogły zostać dodane (znaki specjalne nie są dozwolone) 260 Etykieta pliku zmieniona 261 Etykieta pliku usunięta 262 Wpisz etykietę 263 Konfiguracja etykiety pliku 264 Brak etykiety pliku 265 Cokolwiek 266 Nieprawidłowa data 267 dd/mm/rrrr 268 Szybkość 269 %m/%d/%R 270 Modem(y) 271 Slot(y) 272 Port(y) 273 BIOS 274 Nazwa OS 275 Wersja OS 276 Chipset 277 Wersja 278 Sterownik 279 Port 280 MIB Type 281 DHCP IP 282 Bramy 283 Cel 284 Producent BIOS 285 Zaznacz parametr do modyfikacji 286 Service pack 287 Import lokalny 288 Import lokalny 289 Informacje o sieci 290 Odpytywanie IP 291 Tryb eksperta 292 Dodaj / Usuń urządzenie sieciowe 293 Typy urządzeń sieciowych 294 Nazwy Podsieci 295 Lokalizacje 296 UId 297 Nie można zapisywać w katalogu 298 Wszystkie pola muszą być wypełnione 299 Nieprawidłowy adres IP (musi być: x.x.x.x) 300 Nieprawidłowa maska: musi być: x.x.x.x 301 Sieć dodana 302 Sieć usunięta 303 Dodaj podsieć 304 Nazwa sieci 305 UId 306 Lista podsieci 307 Dodaj typ 308 Nazwa typu 309 Typy urządzeń sieciowych 310 IpDiscover mniejsze niż 311 Hosty 312 IpDiscover 313 Bramy 314 IpDiscover bramy 315 Nie zinwentaryzowane komputery 316 Podsieć 317 ANALIZUJ 318 Nazwa DNS 319 Rezultaty analizy sieci 320 Ta analiza została już wykonana 321 chcesz zobaczyć zebrane dane? 322 Dane z cache'u 323 wygenerowano 324 HOSTY ZAKWALIFIKOWANE JAKO 325 puste 326 nie wpisano maski 327 Szczegóły komputera 328 Wykryte 329 Zinwentaryzowane 330 Nazwa NetBIOS 331 IP sieci 332 Proszę czekać... 333 Dodaj nowe urządzenie NetBIOS 334 Lista urządzeń sieciowych 335 Typ urządzenia 336 Opis urządzenia 337 PROGRAM NIC NIE WYSŁAŁ 338 Tryb limitowany 339 Potrzebujesz ipdiscover-util.pl (Linux only) dla trybu experta 340 Pokaż 341 nie można uruchomić, musisz ustawić prawa wykonywania 342 Misisz ustawić prawa zapisu dla głwnego katalogu 344 Błąd 345 AKTUALNIE URUCHOMIONY JEST PROCES ANALIZY, PROSZĘ SPRÓBOWAĆ PONOWNIE ZA KILKA MINUT 346 PRZED 347 PO 348 Użytkownik windows 349 Dodaj kolumnę 350 Typ CPU 351 Numer CPU 352 Ostatnia wizyta 353 Jakość 354 Dokładność 355 Firma 356 Właściciel 357 Agent 358 Maska: ? (jeden znak), * (wiele znaków) 359 Numer seryjny monitora 360 Wyprodukowano (miesiac/rok) 362 Sieć 363 już isnieje 364 Zinwentaryzowany 365 Nie ziwentaryzowany 366 Zidentyfikowany 367 Urządzenie sieciowe 368 sieci 369 Wysłane przez 370 Rozmieszczenie 371 Wszystkie komponenty 372 Wybierz komponenty 373 Zalogowany użytkownik 374 Zarejestrowany ogół 375 Wersja agenta OCS NG 376 Komputer zablokowany. Proszę spróbować za kilka minut 377 Częstotliwość procesora (MHz) 380 Słownik 381 Numer 382 Nazwa oprogramowania 383 Wszystko 384 Przenieś WSZYSTKO 385 do nowej kategorii 386 LUB 387 do istniejącej kategorii 388 Kategoria 389 Nic 390 Kategorie słownikowe 391 Nazwa kategorii 392 Usuń 393 Szukaj 394 Szukaj kategorii 395 Szukaj oprogramowania WSZĘDZIE 396 Reset 397 Idź do kategorii 398 Lista kategorii 410 DOKŁADNIE 411 Pole może zawierać tylko liczby! 412 Funkcjonalność pobierania danych z kluczy rejstru Windows 413 funkcje automatycznej aktualizacji 414 Automatyczna funkcja rozmieszczenia 415 Usunięcie funkcji logowania (potrzebne GLPI). 416 Funkcjonalność logowania zdarzeń 417 funkcje automatycznej dystrybucji oprogramowania. 418 Zróżnicowanie funkcji zapasów. 419 Maksymalna liczba dni przed ipdiscover komputer otrzymuje. 420 Automatyczna dystrybucja oprogramowania: w dokumentacji. 421 Automatyczna dystrybucja oprogramowania: w dokumentacji. 422 Automatyczna dystrybucja oprogramowania: w dokumentacji. 423 Automatyczna dystrybucja oprogramowania: w dokumentacji. (Opakowania z wyższym lub równe pierwszeństwo nie będzie już pobrany). 424 Ważność pakietu od dnia jej rozpatrzenia przez agenta. 425 Maksymalna liczba komputerów na bramę pobieranie IP w sieci. 426 Ważność zapasów. (Zawsze: spis każdego logowania. NIGDY: nie inwentaryzacji) 427 określa, że kryteria muszą być równa dla dwóch komputerów, które mają być automatycznie łączone. 428 Wdrożenia 429 Częstotliwość 430 Masowe przetwarzanie 431 Uaktywnij 432 nienotyfikowana 433 Dotyczy 434 Tworzenie pakietów 435 Pakiet Nowy budynek 436 Nie można otworzyć pliku 437 Pakiet został utworzony w katalogu 438 Tworzenie nowej paczki 439 Protokół 440 Priorytet 441 Algorytm Digest 442 Kodowanie Digest 443 Działanie 444 Polecenie 445 Ścieżka 446 Nazwa pliku 447 Informowanie użytkownika 448 Poinformuj użytkownika 449 Tekst 450 Odliczanie 451 Użytkownik może przerwać 452 Użytkownik może opóźnić 453 Czy do zakończenia instalacji potrzebna jest reakcja użytkownika 454 NIE 455 TAK 456 Wykonaj 457 Magazyn 458 Uruchom 459 Odliczanie musi być liczbą 460 Niepowtarzalny identyfikator 461 Digest 462 Rozmiar 463 Rozmiar fragmentu (min 1kB) 464 Ilość fragmentów 465 Pakiet aktywacyjny 466 UWAGA: Nie można odnaleźć pliku informacji 467 UWAGA: Nie można odnaleźć fragmenty plików 468 Czy na pewno chcesz chcesz uaktywnić ten pakiet? 469 Pakiet uaktywniony, może zostać wdrożony 470 Https url 471 Url fragmentów 472 BŁĄD: Nie można usunąć katalogu 473 Sygnatura czasowa musi być liczbą 474 Sygnatura czasowa musi mieć 10 cyfr 475 Sygnatura czasowa 476 lub aktywować pakiet ręcznie 477 dotyczą pakietu 478 Komputery (ów) 479 żaden komputer nie został zaznaczony 480 fragmenty 481 aktywowane pakiety 482 CZEKA ZAWIADOMIENIE 483 Potwierdzone SUKCESY 484 Własna częstotliwość 485 Zawsze zinwentaryzowane 486 Nigdy nie zinwentaryzowane 487 Własne 488 domyślne 489 zachowanie IpDiscover 490 Nie używaj IpDiscover 491 Zawsze używaj IpDiscover sieci 492 Wybrane IpDiscover sieci 493 domyślna (może być wybrany) 494 Własna częstotliwość inwentaryzacji 495 Inwentaryzuj co 496 dni/dzień 497 Domyślnie używaj parametru "częstotliwość". 498 Pakiet 499 Serwer 500 Personalizacja 501 Dodaj pakiet 502 Wybrani 503 Wybrany siłą 504 nie została wybrana 505 Wybieralny 506 Niewybieralny 507 Posiada 508 Nie posiada 509 Dowolny 510 nr pakietu 511 sekund 512 Wgrywanie 513 Twórz paczkę 514 Uaktywnij 515 Uaktywniony 516 KB 517 Opcja ta może mieć wpływ tylko na jednym komputerze naraz. 518 Wymuś IpDiscover 519 Komputer już wybrany do sieci 520 Komputer już zmuszony do ipdiscover sieci 521 Komputer już zmuszony jako niewybieralny 522 Komputer standardowy 523 powrót do standardowych 524 NIGDY nie wpływa ponownie 525 JESTEŚĆ PEWNY? 526 Nie zastosowano do żadnego komputera 527 Styczeń 528 Luty 529 Marzec 530 Kwiecień 531 Maj 532 Czerwiec 533 Lipiec 534 Sierpień 535 Wrzesień 536 Październik 537 Listopad 538 Grudzień 539 Niedziela 540 Poniedziałek 541 Wtorek 542 Środa 543 Czwartek 544 Piątek 545 Sobota 546 w stanie 547 wszystkich 548 Wszystkie z wyjątkiem SUCCESS 549 plik (rozsyłany do komputerów klienckich) 550 plik (nieobowiązkowy, może być wykorzystany przez polecenie "wykonaj") 551 ta nazwa pakietu już istnieje 552 Należy wyszukać komputery, a następnie kliknąć przycisk "wdrażania" aby wysłać pakiet
Można również wysłać pakiet na jednym komputerze przy użyciu "wdrażania" na karcie szczegółów komputera . 553 Klucz windows 554 Monitor: seryjny 555 Monitor: producent 556 Monitor: caption 557 Domena użytkownika 558 pakietów, których dotyczy problem 559 Plik nie jest typu .ocs 560 do serwera 561 Nieznany (skreślony pakiet) 562 Sieci o uid: 563 Producent 564 Częstotliwość auto-uruchamiania agenta 565 Adres użyty do lokalnej inwentaryzacji 567 częstotliwość Ipdiscover 568 MB pamięci RAM (MB) 569 CPU (MHz) 570 Pomoc 571 Zatwierdź 572 Sukces 573 Błąd 574 Statystyki 575 Unaffect nie głoszone 576 Własne ipdiscover 577 Nazwa grupy 580 komputerów (replay) 581 komputerów (kopia) 582 i 583 Grupy 584 Na życzenie 585 Do wyboru 586 Nowa grupa 587 Nowa statyczna grupa 588 Zastępuje grupę 589 statycznie dodaj do grupy 590 Reset stanu 591 Dołącz statycznie 592 Wyklucz statycznie 593 Data utworzenia 594 cache wygenerowany na 595 GRUPA STATYCZNA 596 DODANE DYNAMICZNIE 597 WYKLUCZONE STATYCZNIE 598 Dołącz 599 Wyczyść 600 Wyklucz 601 Przetwarzanie masowe 602 Musisz wysłać plik 603 Nie znaleziono komputera, sprawdź plik 604 komputer(ów) z poprawym wdrożeniem (s) 605 komputer(ów) zakończonych niepowodzeniem 606 Komputery plik 607 Grupa 608 utworzonych 609 nadpisane 610 DODANE STATYCZNIE 611 Brako Cache 612 STATYCZNY 613 DYNAMICZNY 614 WYŁĄCZONE 615 Zapytanie 616 Zakres użytkownika 617 Nowy 618 Zakres 619 użytkownik lokalny 620 Brak komputerów w twoim zakresie. 621 Grupa nie została utworzona. Jej nazwa jest już w użyciu. 622 Cached 623 Informacja, którą próbujesz obejrzeć, nie istnieje. 624 Czy na pewno chcesz usunąć grupy 625 Włącz te zmiany 626 Wyłącz te zmiany 627 Co najmniej jedno z pól jest puste ... Nie wykonano Update. 628 Serwery dystrybucyjne 629 Nowa grupa serwerów redystrybucji 630 Grupa istniejących serwerów 631 Dodaj do 632 Crush 633 Zarządzanie grupami serwerów 634 Wybrane działania 635 Nowa nazwa 637 Wymień 638 Nazwa grupy nie może być pusta 639 Redystrybucja tej grupy nie istnieje 640 Czy na pewno chcesz usunąć 641 Zarządzanie serwerami redystrybucji 642 grupy 643 Wszystkie maszyny 644 tej maszyny 645 Szczegóły grupy 646 URL 647 numer portu 648 REPERTUAR STORE 649 automatyczna aktywacja 650 URUCHAMIANIE RĘCZNE 651 Serwery 652 Maszyna (y) 653 Czarna lista adresów MAC 654 Wprowadź nowy adres MAC do czarnej listy 655 Wstawienie wykonane 656 Ten wpis jest już na liście 657 Pola na czerwono zawierają błędy! (Puste pola lub rozmiar <2) 658 Maszyny nie mają serwerów redystrybucji.
Konieczne jest rozsyłanie każdego pakietu indywidualnie. 659 Maszyny posiadają już zlecenie rozesłania pakietu. Ten pakiet ma teraz status 660 GRUPA REDYSTRYBUCJI NIE ISTNIEJE 661 paczek dla serwerów redystrybucji 662 Reguły aktywacji 663 Problem wewnętrzny 664 Działanie wykonane 665 Nie wybrano żadnej maszyny.Nie utworzono grupa redystrybucji 666 Grupa redystrybucji utworzona 667 Dla pakietu 668 Dystrybucja z którą zasadą? 669 UWAGA: istnieją powielone pierwszeństwa
Pojedyncze zasady zostaną zachowane! 670 Zasada, już posiada tę nazwę 672 Zasada ta nie istnieje! 673 Administracja zasadami wdrażania 674 NAZWA ZASADY 675 PRIORYTET 676 WARTOŚĆ MASZYNY 677 OPERATOR 678 WARTOŚĆ SERWERA 679 NAZWA 680 DOMENA 681 UŻYTKOWNIK 682 dodać dodatkowy warunek 683 Sprawdź zasady 684 Następujące pola muszą być wypełnione 685 Dodaj zasadę 686 Warunek 687 Nie można go usunąć. 688 Pakiety są już wdrożone do tej grupy! 689 Pakiety są już wdrożone do tego serwera! 690 Nie można usunąć wszystkich maszyn. 691 Generic wartości: $ IP $ i $ name $ 692 modyfikować wszystkie wartości serwerów 693 Modyfikujesz wartości następujących serwerów: 694 W celu znalezienia wartości domyślnych, zrób walidację pól 695 Modyfikujesz grupy redystrybucji 696 aby pokazać pakiety aktywowane na 697 maszyna 698 grupa redystrybucji 699 Czy na pewno chcesz wdrożyć ten pakiet na tych maszynach? 700 Czarna lista wyborów 701 Czarna lista numerów seryjnych 702 Wprowadź nowy numer seryjny na czarną listę 703 Czarna lista 704 Czy na pewno chcesz chcesz dodać do czarnej listy 705 Czy na pewno chcesz chcesz usunąć z czarnej listy 706 Usunąć z czarnej listy 707 ten numer seryjny 708 ten mac adres 709 Własny PROLOG_FREQ 710 Własny download 711 Dodane do modyfikacji kont 712 Plik językowy 713 Czy na pewno chcesz zastąpić ten plik językowy 714 Referencyjny plik językowy 715 Wybierz plik językowy do modyfikacji 716 Aktualizacja plików językowych 717 własny 718 Ignoruj 719 (na sekundę) 720 Czas oczekiwania pomiędzy 2 cyklami rozsyłania 721 Czas oczekiwania pomiędzy pobraniem 2 fragmentów 722 Czas oczekiwania pomiędzy 2 okresami rozsyłania 723 Maksymalny priorytet pbieranych pakietów
(paczki priorytetowe są ignorowane) 724 Czas pomiędzy 2 kontaktami pomiędzy agentem a serwerem 725 (w godzinach) 726 URI serwerów redystrybucji ($ IP i nazwę $ są ogólne wartości) 727 Katalog przeznaczenia pakietu. 728 Inwentaryzacja 729 komputerów 730 godzin 731 Reportaż z wyznaczonymi na podstawie do wszystkich sekcji zapasów. 732 milisekundy 733 Nieaktywne 734 Pliki inwentaryzacji 735 Filtry 736 Włączanie funkcjonalności grup komputerów 737 Liczba losowa z określonego zakresu. Zaprojektowane, aby uniknąć przetwarzania wielu grup jednocześnie 738 Sprawdź poprawność grup komputerów (domyślnie: raz dziennie - patrz offset) 739 poprawy bezpieczeństwa Futur 740 Poprawność blokady komputerów 741 Skonfiguruj Engine do aktualizacji Inwentaryzacji używając sumy kontrolnej agenta (mniejsze obciążenie zaplecza) 742 Niech Engine traktuje inwentaryzację jako transakcję (niższa wartość, lepsze użycie dysku) 743 Niech Engine wykonuje aktualizację różnicową (rząd wielkości ). (Mniejsze obciążenie zaplecza większe obciążenie klienta.) 744 Zaakceptuj Inwentaryzację tylko wówczas, gdy jest wymagana przez serwer (odmawia "wymuszonej" inwentaryzacji) 745 Określ, kiedy Engine ma wyczyścić cache inwentaryzacji 746 Określić minimalną różnicę aby zastąpić agenta ipdiscover 747 Wyłącz czas oczekiwania przed pierwszym wyborami (nie zalecane) 748 Włącz ipdiscover dla grup (na przykład, może nie chcesz, aby pewne grupy, wykonywały ipdiscover agentów) 749 Używaj z ocsinventory-local, funkcjonalność dla wielu jednostek 750 Generowanie albo skompresowanego pliku lub zwykłego tekstu XML 751 Określ, czy chcesz zachować ślad wszystkich inwentaryzacji do synchronizacji z serwerem wyższego poziomu 752 Ścieżka do katalogu plików OCS (musi być zapisywalny) 753 Włącz filtr prologu stosu 754 Włącz system filtrów
aby zmienić niektóre rzeczy "w locie" 755 Włącz filtr powodzi inwentaryzacji. Dedykowany adres IP ma możliwość wysyłania nowego komputera tylko raz w tym okresie 756 Definicja odstępów INVENTORY_FILTER_FLOOD_IP 757 Włącz filtr stosu 758 Określ, czy chcesz śledzić pakiety dla grup na poziomie komputera 759 Musi być większe lub równe 760 Webservice 761 Włącz/Wyłącz usług SOAP 762 Rozmiar obszaru wyników (należy uważać na spadek wydajności) 763 Dołącz plik własnych modułów 764 Opcje poniżej nie są ustawiane przez GUI.
(Patrz ocsinventory-server.conf) 765 Całe oprogramowanie 766 Brak wyników 767 uważaj: WYNIK FILTROWANY 768 Liczba rejestracji 769 Transfer zakończony 770 AKTUALIZACJA 771 Ta kategoria już istnieje 772 Nazwa kategorii nie może być null 773 Należy wybrać nazwę kategorii 774 Próbujesz dokonać transferu kategorii do tej samej kategorii 775 Katalog przechowywania pakietów 776 Katalog cache ipdiscover 777 Ważność sesji 778 Liczba różnych "GRUP ROBOCZYCH" 779 Różne TAGi 780 Różne IPSUBNET 781 Maszyny posiadające zadania wdrożenia 782 Maszyny posiadające zadania wdrożenia zakończone błędem 783 Liczba różnych systemów operacyjnych 784 Różne wersje agenta 785 Różnych procesorów 786 Różnych rozdzielczości 787 Maszyny z procesorem> = 788 Maszyny z procesorem = < 789 Maszyny z procesorem między 790 Maszyny z pamięcią RAM> = 791 Maszyny z pamięcią RAM = < 792 Maszyny z pamięcią RAM między 793 Maszyn w bazie 794 Widzianych maszyn 795 Liczba kontaktujących się dziś maszyn 796 Liczba zinwnetaryzowanych dziś maszyn 797 Maszyny nie widziane od 798 DZIAŁALNOŚĆ 799 HARDWARE 800 Inne 801 Nie pokazuj tej dziedzinie 802 Pokaż ten nych 803 liczy się w ciągu dnia, ponieważ maszyny nie kontaktować się z serwerem 804 Minimalna prędkość procesora 805 Maksymalna prędkość procesora 806 Minimalna ilość pamięci RAM 807 Maksymalna ilość pamięci RAM 808 Podział 809 Statyczne grupy 810 Dynamiczne grupy 811 Czy na pewno chcesz chcesz zmodyfikować widoczności grupy 812 Oprogramowanie w 0 jest w pamięci podręcznej, ale nie jest przetrzymywane na maszynach.
Nie mogże być one umieszczone słowniku 813 Liczba dysków twardych o rozmiarze powyżej 814 Liczba dysków twardych o rozmiarze poniżej 815 Liczba dysków twardych o rozmiarze między 816 Największa ilość wolnego miejsca na twardym dysku 817 Najmniejsza ilość wolnego miejsca na twardym dysku 818 Wyrzuć z grupy 819 Komputer (y) dodany do grupy 820 Ostatni kontakt 821 ZMIANA KONFIGURACJI SERWERA 822 Dostosuj 823 Domyślnie 824 Aktywacja logów dla interfejsu 825 Dziennik Logów 826 Adres do znalezienia fragmentów paczek 827 Adres do znalezienia plików INFO paczek 828 Usuń komputery z inwentaryzacji starsze niż 829 Katalog tworzenia paczek redystrybucji 830 Adres serwera LDAP 831 Port serwera LDAP 832 Nazwa bazy LDAP + DC 833 Nazwa pola do definicji loginu 834 LDAP_OPT_PROTOCOL_VERSION 835 Dodaj RSX 836 Zarządzanie Typami 837 Nie masz dostępu do tych danych 838 Dysk: litera dysku 839 Dysk: Typ 840 Dysk: Format 841 Dysk: Pojemność 842 Dysk: Wolne miejsce 843 Dysk: Nazwa Wolumenu 844 Grupa: Id 845 Grupa: Static? 846 Oprogramowanie: Firma 847 Oprogramowanie: Nazwa 848 Oprogramowanie: Version 849 Oprogramowanie: Instalacja w katalogu 850 Oprogramowanie: Komentarze 851 BIOS: Producent komputera 852 BIOS: Model 853 BIOS: Numer seryjny 854 BIOS: Typ komputera 855 BIOS: Producent 856 BIOS: Version 857 BIOS: Data 858 Monitor: Producent 859 Monitor: Nazwa 860 Monitor: Opis 861 Monitor: Typ 862 Monitor: Numer seryjny 863 Sieć: Opis 864 Sieć: Typ 865 Sieć: Typ MIB 866 Sieć: Prędkość 867 Imię i nazwisko: Adres MAC 868 Sieć: Status 869 Imię i nazwisko: Adres IP 870 Sieć: Maska IP 871 Sieć: Podsieć IP 872 Sieć: Bramka IP 873 Sieć: DHCP IP 874 klucz rejestru: Nazwa 875 klucz rejestru: Wartość 876 Niepowodzenie REDYSTRYBUCJA GROUP 877 Niektóre komputery nie dodano do grupy, ponieważ: 878 Przypomnienie: komputer może być członkiem tylko jednej grupy 879 Grupa podmieniona 880 Grupa została utworzona 881 Komputery dodane 882 Komputery usunięte z grupy 883 Ogranicz widok 884 UWAGA: wizualizacja z FILTREM 885 nieznany 886 Wycofanie z dystrybucji 887 Możliwe, że ten pakiet nie jest wdrożony na serwerach redystrybucji 888 Usuwanie 889 podłączony jako 890 Interfejs jest aktualnie zablokowany na wyszukiwanie według różnych kryteriów 891 Usuń blokadę interfejsu 892 połączyć z innym kontem 893 Nie zdefiniowano TAGu do twojego profilu 894 Nie zdefiniowano uprawnień do twojego profilu 895 Modyfikacja TAGu 896 Adnotacje 897 Uwaga daty 898 Dodaj adnotacje 899 Autor 900 Czy na pewno chcesz usunąć zaznaczenie? 901 Wynik działania zapytania 902 Wynik działania zaznaczenia 903 należy wypełnić pole objaśnienia 904 Pakiet relokacji 905 Wyjaśnienie na temat wykonanego zadania
na komputerze aby mieć
wpływ na pakiet 906 Pakiet teledeploy usunięcia 907 Wyjaśnienie na temat usuwanego pakietu
na tym komputerze 908 informacje o przenośnych Terminalach 909 MODYFIKACJA NIE POWIODŁA SIĘ: NIEPRAWIDŁOWY NOWY PROFIL 910 Validacja 911 Wyloguj się 912 Eksportuj listę komputerów dla tego oprogramowania 913 Liczba niezinwentaryzowanych interfejsów sieciowych 914 Liczba agentów które nie przesyłają inwentaryzacji od co najmniej 915 wiadomości 916 wartość musi być wyższa niż 917 Wartość częstotliwości 918 różnica między LASTDATE i LASTCOME 919 Czy na pewno chcesz chcesz usunąć tę wiadomość 920 Błąd, żądany plik nie istnieje. 921 Usunąć tą kategorię 922 Aby scalić, należy wybrać co najmniej 2 komputery 923 Nie masz komputerów do zliczenia 924 WYDOBYCIE wniosek nie OPRAWY! 925 funkcjonalności 926 login 927 CACHE nie zostanie odświeżona przez to działanie 928 Wizualizacja logów 929 zarządzanie podsiecią nie jest wykonywane lokalnie. 930 nie można dodawać/modyfikować/usuwać podsieci 931 Modyfikacja podsieci 932 pole adresu IP nie może być puste 933 pole Nazwa Sieci nie może być puste 934 pole ID Sieci nie może być puste 935 pole Adresu Maski Sieci nie może być puste 936 pole Typ nie może być puste 937 pole Typ już istnieje 938 Nowe pole Typ 939 członkiwie grupy Computers 940 Wszystkie komputery posiadaja tą paczkę 941 Wyświetlanie statystyk Włączone 942 Musisz wprowadzić objaśnienia dla urządzeń 943 Musisz wybrać typ urządzenia 944 Dane wprowadzone przez 945 zmiana urządzenia 946 dodawanie nowych urządzeń 947 Nie określono listy urządzeń 948 Określono listę urządzeń 949 Id Komputera 950 NAZWA PLIKU 951 PLIK UTWORZONY W 952 PLIK ZMODYFIKOWANY W 953 WIELKOŚĆ 954 PRZERWANIE SESJI 955 Nie znaleziono Systemu w bazie 956 Wszystkie błędy 957 Wszystkie SUKCESY 958 PROBLEM WARTOŚCI WDROŻENIA 959 Zbyt duża liczba wyników. Uszczegółowij zapytanie 960 Nie znaleziono szukanego słowa 961 WYKAZ 962 (jeden, pomiędzy każdym) 963 ROŻNE WYKAZY 964 Nazwy partycji 965 Wyświetlacz 966 Agent 967 NALEŻĄ DO 968 NIE NALEŻĄ DO 969 Historyczne pakiety 970 Pakiety 971 PRZENIESIENIE GRUPY KOMPUTERÓW 972 Komputery zostały usunięte z grupy oraz 973 DODAWANIE KOMPUTERÓW DO GRUPY 974 komputerów w pamięci podręcznej 975 Dodaj do grupy 976 REZULTAT ZABLOKOWANIA INTERFEJSU NA ŻYCZENIE 977 LOCK 978 Zamierzasz zablokować wszystkie interfejsy według wyników wyszuukiwania 979 Aby wrócić do standardowych ustawień , będziesz musiał klinąć na ikonę , która jest w prawym górnym rogu interfejsu 980 pakietów na komputerach 981 pakietów na serwerach grup 982 Nie istnieje żadna regułą wdrażania. Redystrybucja nie możlwa. 983 Musisz wybrać, jakiego rodzaju zmiany wykonać 984 Zmiany 985 PRZENIESIENIE KOMPUTERÓW 986 PRZENIESIENIE KOMPUTERÓW DO 987 Ten klucz rejestru już istnieje 988 MUSISZ wypełnienie wszystkich pól 989 Daty nie istnieje. PAŃSTWA godzin nie można znaleźć w bazie danych dla tego pakietu 990 Ręczne tworzenie pakietów 991 Automatyczne tworzenie pakietów 992 Szacowany czas wdrożenia 993 Czerwone pola zawierają błędy 994 PDA / SmartPhone 995 ID użytkownika 996 Nazwisko 997 Wpisz identyfikator użytkownika 998 wybierz prawidłowy profil 999 Ten identyfikator użytkownika już istnieje 1000 Notyfikowane 1001 Czerwone pola zawierają błędy 1002 Szacunkowy czas wdrożenia 1003 Redystrybucja parametrów pakietów serwera 1004 Nie jest możliwe stworzenie tworzenia pakietów w katalogu 1005 Utworzenie pakietu niemożliwe 1006 nie ma prawa wrinting 1007 Katalog 1008 Użyj tego pakietu do redystrybucji 1009 Katalog serwery danych 1010 NORMALNA 1011 DEBUG 1012 JĘZYK 1013 KONSERWACJA 1014 Switch to 1015 Tryb użytkownika 1016 Logowania użytkownika root 1017 Hasło roota 1018 (Nie zapisuj nic, jeśli chcesz użyć anonimowego połączenia) 1019 Wynik blokady 1020 Nazwa informacji tag 1021 admin Teledeploy 1022 admin TAG 1023 Opakowania wpływa z statut 1024 zostaną usunięte 1025 Unaffect 1026 Opakowania skreślony computers 1027 Kategorie 1028 Nowe 1029 Ignorowane 1030 Bez zmian 1031 Zestaw IT Management 1032 Aktywuj zestaw zarządzania IT dla Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Nazwa paczki 1038 Pytający 1039 Priorytet 1040 Użytkownik powiadomiony 1041 Użytkownik może odraczać 1042 trigger-y zrestartowane 1043 Stock control to validate the installation 1044 Jako lista 1045 Wizualnie 1046 Statut 1047 Info 1048 Dodaj plik 1049 ZŁA CZYNNOŚĆ 1050 Szukaj oprogramowania 1051 Szukaj 1052 Historia 1053 Demande modifiee 1054 Demande effectuee 1055 Twój e-mail jest nie prawidłowy 1056 Skontaktuj się z administratorem OCS-NG 1057 Błąd z połączeniem do serwera pocztowego 1058 brak prawidłowego adresu e-mail 1059 Dostępne dane 1060 Nowe dane 1061 Etykieta 1062 Pole 1063 Formułowanie 1064 Obowiązkowy 1065 Ograniczenie pola 1066 Linked to a status 1067 Nazwa jest już używana 1068 Nazwa pola nie możę być pusta 1069 Dodano wartość 1070 Nowe pole 1071 Typ pola 1072 Zapytanie w trakcie wykonania 1073 Wykonaj zapytanie 1074 Funkcja 'Workflow' nie jest aktywna. 1075 Najpierw uaktywnij tą funkcjonalność. 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Stan tworzenia paczki 1078 Stan testu 1079 restraint perimeter status 1080 global perimeter status 1081 Informacja na email 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 Nie ma żadnego aktywnego statusu.Rozpocznij by aktywować jeden 1090 has modify request n° 1091 Nowe żądanie zostało wysłane 1092 wyśli nowe żądanie 1093 Baza danych jest niekompletna 1094 Proszę powtórz kompletną instalację bazy danych 1095 Status Admin 1096 Lista pól 1097 Tabs list 1098 Nazwa pola 1099 Wartość domyślna 1100 Lista statusów 1101 To pole nie może zostać uaktualnione 1102 Aktywuj status 1103 Status ID 1104 Poziom 1105 Funkcjonalność Workflow jest włączona 1106 Utworzenie paczki jest możliwe tylko jeżeli wcześniej wysłano zapytanie 1107 And the status is correct 1108 LDAP configuracja 1109 Filtr 1110 Przypisanie paczki zależy od pozycji prośby 1111 Nazwa pierwszej cechy, która będzie użyta do oceniania poziomu bezpieczeństwa użytkownika LDAP (czystego dla żadnego) 1112 Wartość pierwszej cechy, która będzie użyta do oceniania poziomu bezpieczeństwa użytkownika LDAP (czystego dla żadnego) 1113 Jeżeli pierwsza cecha jest znaleziona i pasuje wartości, ustawić tę rolę użytkownika automatycznie 1114 Nazwa drugiej cechy, która będzie użyta do oceniania poziomu bezpieczeństwa użytkownika LDAP (czystego dla żadnego) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 Jeżeli druga cecha jest znaleziona i pasują wartości, ustawić tę rolę użytkownika automatycznie 1117 E-mail 1118 Edytuj 1119 Wybierz 1120 Quantity 1121 Aktualizacja skończona 1122 Wiki 1123 IRC 1124 Forums 1125 Procentowo 1126 Data notatki 1127 Autor notatki 1128 Notatka 1129 Skasowana paczka 1130 Edytor języków 1131 Słowo 1132 ID słowa 1133 Nowe słowo 1134 No ipdiscover data 1135 Komputer(y) istnieje już w grupie redystrybucyjnych 1136 Snmp 1137 Włącz/Wyłącz usługę snmp 1138 Pokaż wszystkie moje podsieci 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Wprowadź nową podsieć dla blacklist 1143 Maska podsieci 1144 Nieprawidłowy MAC addres. (musi być: XX.XX.XX.XX.XX.XX) 1145 wartość musi być pomiędzy 1146 Zarządzaj profilami 1147 Nie możesz tego zaktualizować. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Nazwa nowego profilu 1150 Preferencje profilu 1151 Text profile 1152 WARNING: usuń podstawowe prfile bo mogą powodować niestabilność w OCS-NG 1153 Nazwa profilu 1154 na komputerze 1155 na teledeploy's workflow 1156 Zarządzaj wdrożeniami workflow 1157 On the fields of teledeploy's workflow 1158 na pakiecie aktywacyjnym 1159 na MAC adresie 1160 na numerze seryjnym 1161 na podsieci ipdiscover's 1162 Zarządzaj wdrożeniem 1163 Uaktualniona konfiguracja 1164 Zarządzaj grupą 1165 Konsola zarządzania 1166 Zobacz ostrzeżenia w GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 strona użytkownika 1175 Ograniczenia 1176 Prawa do Blacklist 1177 Uprawnienia do zarządzania 1178 To pole 1179 is a variable. It can not contain special characters 1180 nie może być puste 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Klucz dodany 1185 Klucz uaktualniony 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Skanowanie sieci 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Zarządzanie społecznościami SNMP 1206 Directory of SNMP communities file 1207 Dodaj społeczność 1208 Społeczność dodana 1209 Zaktualizowano społeczność 1210 Informacje o koncie: 1211 URL where SNMP community file is 1212 Skasowano społeczność 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Wentylatory 1223 Power supplies 1224 Trays 1225 Maksymalna pojemność 1226 Kolor 1227 Kontact 1228 Urządzenie SNMP 1229 Firmware 1230 Volumn Name 1231 Format pliku musi być ZIP 1232 Format pliku musi być TAR.GZ 1233 Nazwa bazy danych 1234 Opis nie może być pusty 1235 Reference 1236 wersja oprogramowania 1237 Firmware wersja 1238 Data instalacji 1239 MHz 1240 MB 1241 Liczba urządzeń SNMP 1242 m/d/y 1243 Wysłać można tylko pliki: ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe i ocspackage.exe 1244 Ten plik nie może być pusty 1245 Zarządzaj klientami OCS-NG 1246 Affect again 1247 Architektura 1248 Katalog 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statystyki 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Liczba połączeń w ciągu dnia 1256 Liczba złych połączeńw ciągu dnia 1257 Use flash on GUI 1258 Manual Entry 1259 Przez jeden tydzień 1260 Przez jeden miesiąc 1261 Clear cache 1262 No plugin enabled for your profil 1263 ALERT Zabezpieczeń! 1264 Następny 1265 Enable cache tables 1266 Virtualne Maszyny 1267 Typ Virtualych Maszyn 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computery w podsieci 1272 Usuń ten komputer 1273 Nie masz uprawnień do usunięcia tego komputera 1274 Profil zaktualizował się 1275 Profil nie może być usunięty 1276 Profil utworzony 1277 Default profil (blank for none) 1278 Nie moasz pozwolenia do połączenia 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP identyfikacja urządzenia 1298 QRCode administration 1299 QRCode 1300 Sprawdź QRCode 1301 na niewidocznych paczkach 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Podsieć 2006 WARNING: 2007 konto 2008 error 2009 failed 2010 host 2011 login 2012 nie włożony 2013 wymagany 2014 Hasło 2015 Pytanie 2016 successful 2017 używając 2018 był importowany 2019 już były importowane 2020 install.php istnieje w katalogu ocsreports 2021 Your GUI logs directory is not writable 2022 Nie możesz wysłać większego pliku niż 2023 Usuń to 2024 Domyślny sql login/hasło jest aktywne w twojej bazie: 2025 Zmień swoje hasło dla OCS do logowania w MySQL 2026 Domyślny login/hasło jest aktywne w OCS GUI 2027 Zmień hasło administratora w OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Dodano etykietę 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 OSTRZEŻENIE: Jeśli zmienisz nazwę domyślnej bazy danch (ocsweb), nie zapomnij zaktualizować plików konfiguracyjnych OCS 2103 Tryb DEMO: nie możesz aktualizować danych 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Twoja baza danych jest poprawna.
Nie podjeto żadnej akcji 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/portuguese/000077500000000000000000000000001303466605000262165ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/portuguese/portuguese.png000077500000000000000000000121261303466605000311330ustar00rootroot00000000000000PNG  IHDRʬPLTEq !u#om  !#4! #!#| '####)+3OR   #'###& %'& '.4&$q,**%%!F8\*411'm׉=<&=Kw:6-('C pHYs  tIME LC IDATx}PמvݵkktQPFRX$jF. tJ֝?L]gkK  I$y*W*h]q-coD]t< ->?3|Geh/f`>Zfq?=xdGydGydGydGydGydGydGydGy䉷{h/q?u'nHJN'Gr|A9bIӇC`ujNt"Eѩmm̭QwwWӠ~ >-өUnK2ʻ*z  C+C)[ҕqrcC fVJN_e+Fv̩Vz{+X`s>rluꌎl$|,Tnv׍ۍeK0U HCDl : %+e'0 >B^Yu$|a2iԸ͙/8 MQ0WQY[W_/# rss iYS&ıx!GTeouQc;XܼQ`N0FT"y #wv;@l]Wh@O@ugjt~h޳3`a]qqq).^w 2bP헠0]4cEf̘lFXb+=9j-Z<*[zǤSN]NP.;ST )?ߢN΢*KqLRF,eIIwbXvOJ-:yV@QJC)Ji'F͓P[^["; vɬX<^UTXqyt=)>vU"HyZߐ cIm{g?8ALy}Ա=xJySֻ)daIթaTuL}KG8.'D;>:T9Ω|ҒYR3ȍ@wwum2.7FAՋ%GHl~VO1,Ǯ:BwusPNp@&*{lzr&@~YA)HZ; ƈʍ;/XgQQBe8ePɣ3QNcWC93net2xw_k@OK\:fdpm)-N.4[ʛ;I) @Ѵ&sQ{*j4xpES?z,&iˇL^T6&M{T390@cR}edRdvff*7(En.vW @akc rJ08\2. :Y=K=8y.r|pKႇRDʃ A.R^dÁ$lo*ylK9A^ײ4yYJ3kڂ7WgOɍBXNAQcCంSk$9T_Jn\Oׂq0#K0:#*4_JC2܋TŶi١NWYk9lk@Jee;T_RO c[@%2nWk%B^nKT#Xtq9; =Yq=|m5Q|oKu}]cv q+!./++'䐹ϲ\g¿PHO68TyNMUr$||}KyfRurg8|9rd6SsfEBiG1vz{\n&yLpݘ[JKI |vMCS%}Τ'n0u!yYh<ET*oU$ođ7аd牛P{~ & XLJ!΂C;?Z<24,; ϐ~1KAm+v_L:)xUdy! q?6~!f!-('Ը{/(Zv 8W)ѵ99_oK s UFZ/= ;XY_[u/DzOm}q;/o"Q[ n^BNWph7gBIQ"#DI.+d)2UXX[u@*=^;ң^+p>em3;N~piq}N yh[[λ2?u?oATd(~o! Hv/oHP I/MZNDvΝpz}}yaQt*/*FLwx(3 {y1ISWkV}3#DFr3)G־$JOP2ЃXM aL wH(>'ϻ$#f0wی'U8QcyƴT6G*DCG7&-T~/'1{s"Ɖwj$hcT3i'pY$Q V%nx{+NAwn?HF<ӹsOcE& vHv@=[ 6Ũn{ZڪD=^8.m/Ό-tKcE;#1{ f}kfR<8P̋#&LU(m_O͚CoK9ĩqPGwqfgOҮZ\nK&ݯ$_]ݩقtk9 `eFXsDNtE3 '3G(3xqx0U.4ZckCc5MEycB'g䁽Os^|Z&(jn, ߸wVcG w6mڸ&15r89"J*I!'.ۨ8l8[;u6RlsWO/ -ě'WNfZ]a쩄ȊlU/r8{F'9컊Mg (%}# ̟ ѣg$̙ʢҞ7B6hFnƪ3ܐ,_k*FZ" F;qv]zg>D5 Yc^ 3Ł"|i/7Uqwwn,߼o^ʾ{:7r:LC vYɢB~ pM*񩯚O|IW.r;629>>FUyBʀHEu] !== _pCjB45:91wWM=V^<{3Йܜ*8 fyLjϣ` m#1O(o~c+QtT /uʑ}advUZ SSr܍F!d I8(zT V 6rbK6zIIFe f8|JcmU7Ȭ&.<2Vn1P'VfTߦ2^s隆.Nep)fJ*Y> O3r5/c>oXed8H+%A-Rj[OiHU˗M 2j72W,Mn vlz8d6v]Oy/22;622;62;622;62yUUyUUyUUyUU?1ss~'~@;e6IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/portuguese/portuguese.txt000077500000000000000000001256711303466605000312000ustar00rootroot000000000000000 ISO-8859-1 1 Requisições 2 Todos os computadores 3 Computadores com software... 4 Computadores sem software... 5 Códigos de unidade sob minha responsabilidade 6 Equipamentos fora de garantia 7 Detalhes de equipamentos fora de garantia 8 Escolha sua requisições 9 Escolha com vários critérios 10 Computadores por etiquetas 11 Computadores por etiquetas 12 Nome da Etiqueta 13 Envio 14 Gerenciamento 15 Etiquetas 16 Administração 17 Agente 18 Revision 19 Versão do software 20 Software 21 Primeira data 22 Data fora da garantia 23 Computador 24 Usuário 25 Sistema Operacional 26 Memória 27 Velocidade de Memória (MHz) 28 Número da Máquina 29 O servidor LDAP não responde 30 Procurar 31 Escolha um parâmetro 32 Escolha 33 Domínio 34 Endereço IP 35 Nome do computador 36 N. de série 37 Ordem 38 Ordem de entrega 39 Origem 40 Código 41 Limpar 42 Nenhum resultado 43 Menu Principal 44 Escolha a opção 45 Espaço livre 46 Último inventário 47 Última página 48 Detalhes do Computador 49 Nome 50 Swap 51 Comentários 52 Licença 53 Descrição 54 Processador(es) 55 Número 56 Dados Administrativos 57 Número comando 58 Data comando 59 Código 60 Ordem de Entrega 61 Placa de Vídeo 62 Resolução 63 Armazenamento 64 Fabricante 65 Modelo 66 Tipo 67 Tamanho do disco 68 Diretório 69 Editor 70 Designação 71 Garantia 72 Intervenção(ções) 73 Valor 74 Data da demanda 75 Tipo de demanda 76 Data de Intervenção 77 Tipo de Intervenção 78 Conta 79 Impressora(s) 80 Nome 81 Status 82 Rede(s) 83 Capacidade 84 Interface 85 Unidade 86 Sistema de arquivos 87 Total 88 Livre 89 Data da ordem de entrega 90 Resultado 91 Dispositivos de entrada 92 HD(s) 93 Controladora(s) 94 Número do Slot 95 Endereço MAC 96 Som 97 Monitor(es) 98 Atenção, você só pode selecionar 8 opções! 99 Detalhes do computador 100 Parâmetros de inicialização 101 Ordenar 102 Nova Busca 103 Atualizar 104 diretamente afetados 105 nas unidades 106 Opções de configuração 107 Configurações 108 Solicitações de registro 109 Tipo de Computador 110 para 111 Número de licença do Windows 112 Data garantia 113 Cancela 114 Grava 115 Atualiza 116 Adicione 117 Registro 118 Vá para a página 119 Você realmente quer apagar 120 nulo 121 Apaga o computador 122 Apaga 123 Modificação de tipo de computador 124 Adicione novo tipo de máquina 125 Último 126 Próximo 127 Primeiro 128 Volta 129 COMO 130 DIFERENTE 131 Arquivo de ícone 132 Arquivo de imagem 133 Inventário 134 Adicione novo arquivo na base 135 Cuidado, você irá deletar este arquivo permanentemente !!! 136 Download 137 Arquivo 138 Cria 139 Criar/Apagar 140 Super administradores 141 Administradores 142 Administradores locais 143 teledeploy requesters 162 Apague a seleção 163 Número do tipo de registro 164 Pessoas responsáveis pela etiqueta de unidade 165 Você deve entrar com um nome ou uma lista para procurar ! 166 Você deve escolher um item da lista ! 167 Veja os detalhes 168 Este formato de arquivo é inválido (deve ser um .zip, .pl ou binário UNIX) 169 adiciona à base 170 O mesmo arquivo já existe !!! 171 Arquivo apagado 172 Um erro aconteceu. O arquivo 173 não foi adicionado à base. 174 Descobrir IPs 175 Duplicados 176 IPS 177 Reúne computadores redundantes 178 Etiqueta/Número de divisões de PC’s 179 Nome da Unidade 180 Usuário não registrado 181 Errado de usuário ou senha 182 Computadores que contém um determinado TAG 183 Download 184 Este arquivo não contem "use Versão constante" 185 Versão deve ser maior que 1 186 Este arquivo não contem o arquivo .ver 187 Este arquivo, não é um arquivo zipado válido 188 Volta 189 Você deve selecionar pelo menos 2 computadores 190 infoconta: 191 apagado 192 Sumário de Redundância 193 Hostname + N. Serial 194 Hostname + Endereço MAC 195 Endereço MAC + N. Serial 196 Somente Hostname 197 Somente Serial 198 Somente Endereço MAC 199 Redundância 200 Relay correspondente diminuído 201 MENOR 202 MAIOR 203 ENTRE 204 FORA DE 205 Habilitado 206 salvo por 207 Gateway 208 máscara 209 Versão da BIOS 210 Data de BIOS 211 Registro 212 Nome da chave 213 Valor da chave 214 Imprime essa página 215 Mostra todos 216 Erro de usuário ou senha 217 Senha 218 Versões de agentes 219 IP’s desconhecidos 220 apagado 221 Computadores coletados pelo IP 222 Atenção !!! Todos os computadores selecionados serão reunidos num único computador! Tem certeza? 223 Informação 224 Valor 225 Informação administrativa 226 foi deletado com sucesso da tabela infoconta 227 Tem certeza que quer apagar a coluna 228 Entre com a nova informação administrativa 229 Texto(255) 230 Número inteiro 231 Número Real 232 Data 233 Data atual 234 foi inserido com sucesso 235 Usuários 236 Muda senha 237 Nova senha 238 Confirmação 239 Você deve preencher todos os campos 240 Sua senha não confere 241 Sua senha foi modificada com sucesso 242 Administrador 243 Usuário 244 Adicione novo Usuário 245 foi apagado com sucesso 246 Tem certeza que quer apagar o Usuário? 247 Usuário do Mysql 248 Senha do Usuário do Mysql 249 Não foi possível conectar-se ao Mysql. Por favor entre com um Usuário/senha válidos. 250 Hostname do servidor Mysql 251 Sair 252 Nome (você escolhe) 253 Registro "hive" 254 Caminho da chave (Ex: SOFTWARE Mozilla) 255 Nome da chave que ser lida (* para todos) 256 Escolha 257 Nome da chave do registro 258 Valor da chave do registro 259 Erro, o dado não pode ser inserido (Caracteres especiais não são permitidos) 260 Descrição modificada com sucesso 261 Descrição apagada 262 Digite uma Descrição 263 Configuração do arquivo de descrição 264 Nenhum arquivo "descrição" agora 265 Nada 266 Data inválida 267 dd/mm/aaaa 268 Velocidade 269 %d/%m/%Y 270 Modem(s) 271 Slot(s) 272 Porta(s) 273 BIOS 274 Nome do Sistema Operacional 275 Versão do SO 276 Chipset 277 Versão 278 Driver 279 Porta 280 Tipo da MIB 281 DHCP IP 282 Gateways 283 Propósito 284 Fabricante da BIOS 285 Selecione um parâmetro a ser modificado 286 Service pack 287 Importar 288 Importar arquivo 289 Informações da rede 290 Busca por IP 291 Modo expert 292 Adicionar/Remover um equipamento de rede 293 Tipos de equipamento de rede 294 Nome das sub-redes 295 Localização 296 Uid 297 Não pode escrever no diretório 298 Todos os campos devem ser preenchidos 299 Endereço IP inválido (deve ser: x.x.x.x) 300 Máscara de rede inválida: deve ser: x.x.x.x 301 Rede adicionada 302 Rede apagada 303 Adicionar uma sub-rede 304 Nome da rede 305 Uid 306 Lista de sub-redes 307 Adicionar um tipo 308 Nome do tipo 309 Tipos de equipamento de rede 310 Descobrir IPs menor que 311 Hosts 312 Descoberta de IPs 313 Computadores gateway 314 Computadores gateway para descoberta de IPs 315 Nenhum computador cadastrado no inventário 316 Sub-rede 317 ANALIZAR 318 Nome DNS 319 Resultado da análise da rede 320 Esta análise já foi feita em 321 Você deseja ver os dados em cache? 322 Data do cache 323 gerado em 324 HOST AVALIADO COMO 325 Vazio 326 nenhuma máscara 327 Detalhes do computador 328 Atingido 329 Cadastrado no inventário 330 Nome NetBIOS 331 Endereço da rede 332 Por favor aguarde... 333 Adicionar um novo dispositivo de rede 334 Lista de equipamentos de rede 335 Tipo de equipamento 336 Descrição do equipamento 337 O PROGRAMA NÃO ENVIOU NADA 338 Modo limitado 339 Você precisa do arquivo ipdiscover-util.pl (somente no Linux) para usar o modo expert 340 Exibir 341 Não foi possível inicializar, você deve configurar os direitos de execução 342 Você deve configurar permissões de escrita no diretório raiz 344 Erro 345 ESTA ANALISE JÁ SE ENCONTRA EM EXECUÇÃO, POR FAVOR TENTE NOVAMENTE MAIS TARDE 346 ANTES 347 DEPOIS 348 Usuário Windows 349 Adicionar coluna 350 Tipo de CPU 351 Número de CPU(s) 352 Última coleta 353 Qualidade 354 Fidelidade de coletas 355 Empresa 356 Dono 357 Versão do agente OCS NG 358 Coringas: ? (um caractere), * (vários caracteres) 359 Serial do Monitor 360 Fabricado em (semana/ano) 362 A rede 363 Já existe 364 Cadastrados no inventário 365 Não cadastrados no inventário 366 Identificado 367 Equipamento da rede 368 da rede 369 Enviado por 370 Distribuição 371 Todos os componentes 372 Escolha os componentes 373 Usuário registrado 374 Sociedade registrada 375 Versão do agente OCS NG 376 Computador indisponível. Por favor tente novamente em alguns instantes. 377 Velocidade do processador (MHz) 380 Dicionário 381 Número 382 Nome do software 383 A página 384 Mover tudo 385 para uma nova categoria 386 OU 387 para uma categoria existente 388 Categoria 389 Nada 390 Categorias de dicionário 391 Nome da categoria 392 Apagar 393 Buscar 394 Buscar categoria 395 Buscar software em qualquer lugar 396 Aplicar 397 Ir para a categoria 398 Lista de categorias 410 EXATAMENTE 411 Campos devem conter apenas Números 412 Coleta de chaves do registro 413 Atualização automática 414 Configuração/distribuição automática 415 Deletamento automático dos logs (utilizado pela GLPI). 416 Registro (log) das atividades 417 Distribuição automática de software 418 Diferenciação automática de inventários 419 Número máximo de dias para um computador do inventário ser atualizado 420 Distribuição automática de software: Consulte a documentação. 421 Distribuição automática de software: Consulte a documentação. 422 Distribuição automática de software: Consulte a documentação. 423 Distribuição automática de software: Consulte a documentação.(Não será feito download de pacotes com uma prioridade igual ou maior). 424 Validez de um pacote como de sua consideração pelo agente. 425 Número máximo de computadores por gateway consultando ips na rede 426 Validez dos inventários. (SEMPRE: inventário em cada início de uma sessão. NUNCA: nenhum inventário) 427 Define critérios que devem ser iguais para que dois computadores se agrupem automaticamente. 428 Configurar 429 Freqüência 430 Processamento massivo 431 Ativar 432 Não identificado 433 Alterar 434 Construtor de pacotes 435 Construir novo pacote 436 Não podem abrir o arquivo 437 O pacote for criado com êxito no diretório 438 Construir novo pacote 439 Protocolo 440 Prioridade 441 Algoritmo Digest 442 Codificação Digest 443 Ação 444 Comando 445 Caminho 446 Nome do arquivo 447 Notificação do Usuário 448 Alertar Usuários 449 Texto 450 Contador 451 Usuário pode abortar 452 Usuário pode adiar 453 Foi necessário Intervenção do Usuário para concluir a operação 454 NÃO 455 SIM 456 Executar 457 Armazenar 458 Lançar 459 Contador deve ser um Número 460 Identificador único 461 Sumário 462 Tamanho total 463 Tamanho das partes (1 KB min) 464 Número das partes 465 Ativação de pacote 466 ATENÇÃO: Não foi possível encontrar o arquivo de informações em 467 ATENÇÃO: Não foi possível encontrar partes do arquivo em 468 Você tem certeza que deseja ativar este pacote 469 Pacote ativado, pode ser afetado agora 470 Https url 471 Partes da url 472 ERRO: Não podem escrever no diretório 473 Timestamp deve ser um Número 474 Timestamp deve ser um Número de 10 dígitos 475 Timestamp 476 Ou ativar um pacote manualmente 477 Afetar um pacote 478 Computador(es) 479 Nenhum computador selecionado 480 partes 481 Pacotes ativos 482 AGUARDANDO NOTIFICAÇÃO 483 Validação com SUCESSO 484 Freqüência configurada 485 Sempre inventariado 486 Nunca inventariado 487 Personalizado 488 Padrão 489 Comportamento da descoberta de IPs 490 Nunca descobrir os IPs 491 SEMPRE descobrir os IPs da rede 492 ELEITO Descoberta de IPs da rede 493 Padrão (pode ser eleito) 494 Configurar a freqüência das coletas 495 Sempre coletado 496 Dia(s) 497 Padrão, utiliza o parâmetro freqüência 498 Pacote 499 servidor 500 Personalização 501 adicionar pacote 502 Eleito 503 Forçar eleição 504 Não eleito 505 Elegível 506 Não elegível 507 CONTENDO 508 NÃO CONTENDO 509 NENHUM 510 Nenhum pacote 511 segundos 512 Configuração 513 Construir 514 Ativo 515 Desativado 516 KB 517 Esta opção só pode ser usada em um computador por vez 518 Forçar descoberta de IPs 519 Computador já eleito para a rede 520 Computador já FORÇOU descoberta de IPs para a rede 521 Computador já FORÇADO como não elegível 522 Computador 523 Desfazer e voltar para o estado padrão 524 NUNCA afetar novamente 525 Você TEM CERTEZA ? 526 NENHUM COMPUTADOR AFETADO 527 Janeiro 528 Fevereiro 529 Março 530 Abril 531 Maio 532 Junho 533 Julho 534 Agosto 535 Setembro 536 Outubro 537 Novembro 538 Dezembro 539 Domingo 540 Segunda 541 Terça 542 Quarta 543 Quinta 544 Sexta 545 Sábado 546 com status 547 tudo 548 Êxito SUSSESSO 549 Arquivo (distribuído nos computadores clientes) 550 Arquivo (não obrigatório, pode ser usado pelo comando 'executa') 551 Já existe um pacote com este nome 552 Você deve fazer uma busca por computadores, e então clicar em 'configurar' para afetar estes pacotes ativos
Você pode também afetar um pacote em um único computador usando a aba 'customização' nos detalhes de qualquer computador
. 553 Chave do Windows 554 Monitor: Serial 555 Monitor: Fabricante 556 Monitor: Resolução 557 Usuário de Dominio 558 Pacotes afetados 559 Arquivo não é um .ocs 560 Ao servidor 561 Desconhecido (pacote deletado) 562 Redes com uid: 563 Fabricante 564 Freqüência da auto-execução do agente 565 Address usado para coletas locais 567 Latência da descoberta de IPs 568 RAM(MB) 569 CPU(MHz) 570 Ajuda 571 Valida tudo 572 Sucesso 573 Erros 574 Stats 575 Unaffect not notified 576 Descoberta de IP’s customizada 577 Nome do Grupo 580 Todos Computadores (replay) 581 Todos os Computadores (cached) 582 e 583 Grupos 584 Para a requisição 585 Para a Seleção 586 Novo Grupo 587 Novo grupo estático 588 Sobregravar Grupo 589 Adicionar a Grupo estático 590 Resetar estado 591 Incluir estaticamente 592 Excluir estaticamente 593 Data de criação 594 Cache gerado em 595 GRUPO ESTÁTICO 596 INCLUIDO DINAMICAMENTE 597 EXCLUIDO ESTATICAMENTE 598 Incluir 599 Resetar 600 Excluir 601 Afetação de Massa 602 Você precisa enviar o arquivo 603 Nenhum Computador encontrado, verifique o arquivo 604 computador(es) Afetado(s) com Sucesso 605 computador(es) Mal-sucedido 606 Arquivo de Computadores 607 Grupo 608 criado 609 sobregravado 610 ESTATICAMENTE INCLUIDO 611 NO CACHE 612 ESTATICO 613 DINAMICO 614 EXCLUIDO 615 Pesquisa 616 Perímetro do Usuário 617 Novo 618 Perímetro 619 Usuário Local 620 Nenhum computador nesse perímetro. 621 O Grupo não foi criado, este grupo já existe 622 Cached 623 A informação que você está tentado acessar não existe 624 Realmente deseja excluir este grupo? 625 Ativar esta afecção 626 Desativar esta afecção 627 Pelo menos um dos campos está vazio... Não houve mudanças. 628 Servidores 629 Novo Grupo de servidores de redistribuição 630 Um grupo de servidores já existente 631 Adicionar em 632 Minimizar 633 Grupo de servidores de Gestão 634 Ação desejada 635 Novo nome 636 Descrição 637 Substituir 638 O NOME DO GRUPO(S) NÃO PODEM SER NULOS 639 TESTE GRUPO DE SERVIDORES NÃO EXISTE 640 Deseja realmente apagar 641 Grupo de servidores de Redistribuição 642 o grupo 643 todas as máquinas 644 esta máquina 645 DETALHE DO GRUPO 646 URL 647 NUMERO DA PORTA 648 COMPARTIMENTO DE REPERTÓRIO 649 AUTOMÁTICA 650 MANUAL 651 Grupo de Servidores 652 Máquina(s) 653 Lista negra de endereços (MAC) 654 Entre com um novo endereço para a lista negra de (MAC) 655 Inserção feita 656 Este dado já existe na lista 657 Campos em vermelho com ERRO!!! (Espaços Vazios ou tamanho < 2) 658 máquina não tem um servidor de redistribuição.
É necessário para a afecção de pacotes manualmente. 659 Máquinas já possuem este pacote teleimplantado. Este pacote de status dessas máquinas é agora 660 GRUPO DE SERVIDORES NÃO EXISTE 661 PACOTES PARA SERVIDORES DE REDISTRIBUIÇÃO 662 Regras de afectação 663 PROBLEMAS INTERNOS 664 Ação realizada 665 NENHUMA MÁQUINA FOI SELECIONADA. GRUPO DE SERVIDOR NÃO CRIADO 666 Grupo de servidores criados 667 PARA O PACOTE 668 afetar com que regra? 669 ATENÇÃO: existem dobrões de prioridade
A única regra será mantida! 670 A regra já contém este nome 672 Esta regra não existe! 673 Administração das regras de afectação 674 NOME DA REGRA 675 PRIORIDADE 676 VALOR MÁQUINA 677 OPERADOR 678 VALOR SERVIDOR 679 NOME 680 DOMINIO 681 USUÁRIO 682 Para adicionar uma condição suplementar 683 Validar a regra 684 Os campos a seguir devem ser apreendidos 685 Adicionar a regra 686 A condição 687 Você não pode apagar isto! 688 Pacotes são afetados neste grupo! 689 Pacotes são afetados neste servidor! 690 Você nçao pode apagar todas as máquinas 691 Valores Genéricos: $IP$ e $NAME$ 692 Você irá modificar TODOS os valores dos servidores 693 Você irá modificar TODOS os valores dos seguintes servidores 694 para encontrar o valor padrão, valide os campos nulos 695 Você irá modificar o grupo de servidores 696 mostrar pacotes ativado para afetar 697 a máquina 698 o grupo de servidores 699 Tem certeza de querer afectar este pacote nessas máquinas? 700 Escolhas de Lista Negras 701 Lista Negra de números seriais 702 Adicionar um novo número serial para a Lista Negra 703 Lista Negra 704 Está certo que deseja uma adicionar a uma lista negra 705 Está certo que deseja remover de uma lista negra 706 Removido da Lista Negra 707 este número de série 708 este endereço MAC 709 Customizado PROLOG_FREQ 710 Customizado download 711 Tomadas em modificações de contas 712 Arquivo de dicionário 713 Está certo que deseja substituir este dicionário 714 Dicionário de referencia 715 Escolha um dicionário para modificar 716 Atualize o arquivo de dicionário 717 customizado 718 Ignore 719 (por segundo) 720 Tempo de espera entre 2 ciclos de implantação 721 Tempo de espera entre 2 ciclos de download 722 Tempo de espera entre 2 ciclos de implantação 723 Prioridade máxima de
pacotes baixados (os pacotes de prioridade superior são ignorados) 724 Tempo de contato entre 2 entre o agente e o servidor 725 (na hora) 726 URL do servidor de redistribuição (IP $ e $ NAME são os valores genéricos) 727 Diretório de destino dos pacotes. 728 Inventário 729 computadores 730 horas 731 Recurso nomeados na base de cada seção de inventário. 732 milissegundo(s) 733 Inativo 734 Arquivo de Inventário 735 Filtros 736 Permitem que o computador de grupos de recurso 737 número aleatório computados no intervalo definido. Projetado para evitar a computação de muitos grupos no mesmo processo 738 Especificar a validade de grupos computador (padrão: calculá-lo uma vez por dia - veja o offset) 739 Melhorias de Seguranças futuras 740 Validade do bloqueio de um computador 741Configure automação para atualização do inventário sobre a CHECKSUM valor (agente de carga inferior registrado DB) 742 Faça a automação considerar um inventário como uma transação (menor concorrencia, melhor uso de disco) 743 Configurar a automação para fazer uma atualização diferencial de seções de inventário (nível de linha). Baixa carga DB registrado, maior carga de Interface do usuário 744 Aceitar um inventário somente se solicitado pelo servidor (Recusa inventário "forçado") 745 Especifique quando a automação irá limpar o cache da estrutura de inventário 746 Especifique a diferença mínima para substituir um agente descobridor de IP "ipdiscover" 747 Desativar o tempo antes de uma primeira eleição (não recomendado) 748 Habilitar grupos de descoberta de IP "ipdiscover"(por exemplo, você pode querer impedir que alguns grupos a serem agentes ipdiscover) 749 Use com injector-ocsinventory, permitir que as entidades multi recurso 750 Gerar arquivo compactado ou XML ou texto plano 751 Especifique se você deseja manter o traço de todo o inventário entre a sincronização com o servidor de nível superior 752 Caminho para o diretório de arquivos OCS (deve ser gravável (+w)) 753 Ativar pilha de filtro PROLOG 754 Habilitar sistema de filtro principal para modificar algumas coisas "on the fly - na mosca" 755 Ativar filtro de população de inventário. Um endereço de IP dedicado, é permitido para o envio de um novo computador apenas uma vez neste período 756 Periodo definido por INVENTORY_FILTER_FLOOD_IP 757 Ativar pilha de filtro de inventário 758 Especifique se você deseja acompanhar pacotes afectados a um grupo no nível do computador 759 É necessário ser superior ou igual 760 Serviço WEB 761 Habilita/Desabilita o serviço SOAP 762 Resultado por tamanho (esteje ciente dos problemas de desempenho) 763 Incluir arquivos de seus próprios módulos 764 Opções a seguir não são configuráveis pelo GUI.
(edite manualmente ocsinventory-server.conf) 765 Todos os programas 766 SEM RESULTADO 767 CAUTELA: RESULTADO FILTRADO 768 Numero de gravações 769 Transferência feita 770 ATUALIZADO DE 771 Esta categoria já existe 772 O nome da categoria não pode ser nulo 773 Você deve selecionar o nome da categoria 774 Você está tentando fazer uma transferência da categoria para a mesma categoria (Impossível) 775 Diretório de criação de pacote 776 Diretório de participação em cache das análises de "ipdiscover" 777 Validade da Seção 778 Número de GRUPO DE TRABALHO diferente(s) 779 Diferente TAG 780 Diferente IPSUBNET 781 Máquinas tem um software implantação pendentes 782 Máquinas com um pacote de erro 783 Número diferente de OS 784 Agente diferente 785 Processadores diferentes 786 Resoluções diferentes 787 Máquinas com um processador >= 788 Máquinas com um processador =< 789 Máquinas com um processador entre 790 Máquinas com memória RAM >= 791 Máquinas com memória RAM =< 792 Máquinas com memória RAM entre 793 Maquinas com base 794 Máquinas em atividade 795 Máquinas que conectaram ao servidor hoje 796 Numeros de máquinas inventáriadas hoje 797 Máquinas não vistas a mais de 798 ATIVIDADE 799 HARDWARE 800 SENÃO 801 Não mostre esse campo 802 Mostre esse campo 803 Conta em dias que a máquina já não se conecta com o servidor 804 Velocidade mínima de processador 805 Velocidade máxima de processador 806 Montante mínimo de RAM 807 Montante máximo de RAM 808 Repartição 809 GRUPOS ESTÁTICOS 810 GRUPOS DINAMICOS 811 Tem certeza de querer modificar a visibilidade do grupo 812 O software em 0 está presente no cache, mas não são mais resolvidos nas máquinas.
Eles não podem ser colocados em uma categoria do dicionário 813 Disco rígido com espaço restante > 814 Disco rígido com espaço restante < 815 Disco rígido com espaço restante entre 816 Disco rígido com espaço máximo restante 817 Disco rígido com espaço máximo restante 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volume Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one server group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection ? 901 Action sur le résultat de la requête 902 Action sur le résultat de la sélection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect packageuet 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 Vo you cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The netword ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Linux (ALL) 966 Windows (ALL) 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 PTo come back to a standard state, you will have to cli on the icon e which is at the right top of the interfaceace 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Soft search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your email is not valid 1056 Contact your OCS administrator 1057 Failed to connect to mailserver 1058 no email is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' fonction is not activate. 1075 Active it for use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of Note 1127 Autor of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on server group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profil 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profil (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 The install.php exists in ocsreports directory 2021 Your GUI logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default sql login/password is activate on your database: 2025 Change your password for ocs login in MySQL 2026 The default login/password is activate on OCS GUI 2027 Change admin password on OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forgot to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/russian/000077500000000000000000000000001303466605000255005ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/russian/russian.png000077500000000000000000000027161303466605000277030ustar00rootroot00000000000000PNG  IHDRdS9 pHYs  gAMA|Q cHRMz%u0`:o_FPLTEQ !!!"""###$$$%%%&&&'''((()))***+++,,,---...///000111222333444555666777888999:::;;;<<<===>>>???@@@AAABBBCCCDDDEEEFFFGGGHHHIIIJJJKKKLLLMMMNNNOOOPPPQQQRRRSSSTTTUUUVVVWWWXXXYYYZZZ[[[\\\]]]^^^___```aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz{{{|||}}}~~~}8IDATxbdf ip@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg u@ Rg `t@ A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A:@4h: h: h: h: h: h: h: h: h: h: h: h: h: h: h: h: @VIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/russian/russian.txt000077500000000000000000001436631303466605000277450ustar00rootroot000000000000000 UTF-8 2 Все компьютеры 3 Computers with sotfware... 5 Unity codes under my responsibility 9 Поиск по критериям 12 Значение тэга 13 Принять 17 Агент 18 Revision 19 Версия программного обеспечения 20 Программное обеспечение 23 Компьютер 24 Пользователь 25 Операционная система 26 RAM 27 RAM - частота, МГц 28 Число устройств 30 Поиск 31 Выбор параметра 32 Выбор 33 Доменный суффикс 34 IP-адрес 35 Имя компьютера 36 Серийный номер 41 Сброс 42 Нет результатов 43 Главное меню 45 Свободное место 46 Последнее обновление 48 Детали компьютера 49 Имя 50 Файл покачки 51 Комментарии 53 Описание 54 Процессор(ы) 55 Число 56 Административные данные 61 Видеокарта 62 Разрешение 63 Накопители 64 Производитель 65 Модель 66 Тип 67 Объем диска 69 Производитель 70 Назначение 79 Принтер(ы) 80 Заголовок 81 Состояние 82 Сеть(и) 83 Емкость 84 Интерфейс 85 Letter 86 Файловая система 87 Всего 88 Свободно 90 всего 91 Устройства ввода 92 Диск(и) 93 Контроллер(ы) 94 Номер слота 95 MAC-адрес 96 Звук 97 Монитор(ы) 98 Будьте внимательны, Вы можете выбрать только 8 опций ! 99 Детали компьютера 103 Обновить 107 Конфигурация 108 Операции с реестром 111 Лицензия Windows 113 Отменить 114 Регистрировать 115 Обновить 116 Добавить 117 Реестр 119 Вы действительно хотите удалить компьютер? 122 Удалить 129 СОДЕРЖИТ 130 НЕ СОДЕРЖИТ 134 Добавить новый файл в базу данных 135 Будьте внимательны! Выдействительно хотите удалить файл? 136 Сохранить 137 Файл 168 Неверный формат файла (должен быть zip, ocsagent.exe, ocspackage.exe, pl или двоичный файл unix) 170 Такой файл уже существует ! 171 Файл удален 172 Возникла ошибка, файл 173 не может быть добавлен в базу данных 174 Безопасность 175 Дубликаты 176 Ips 177 Слить записи 178 Группировка по Tag 180 Пользователь не зарегистрирован 182 Компьютеры с установленным тэгом 183 Сохранить 184 Этот файл не содержит "use constant version" 185 Номер версии должен быть более 1 186 Этот файл не содержит "версию файла" 187 Это неправильный zip-архив 188 Назад 189 Вы должны выбрать как минимум 2 компьютера 190 О пользователе: 191 удален 192 Всего дубликатов 193 Совпадают и имя хоста, и сер.номер 194 Совпадают и имя хоста, и MAC-адрес 195 Совпадают и MAC-адрес, и сер.номер 196 Одинаковых имен хостов 197 Одинаковых сер.номеров 198 Совпадений MAC-адресов 199 Дубликаты 200 Corresponding relay decremented 201 менее, чем 202 более, чем 203 между 204 вне диапазона 205 Включено 206 записан на 207 Шлюз 208 маска 209 Версия BIOS 210 Дата BIOS 211 Реестр 212 Имя ключа 213 Значение ключа 214 Напечатать эту страницу 215 Показать все 216 Ошибка пароля 217 Пароль 218 Версии агентов 219 неучтенных сетевых устройств 220 удалено 221 Накопление IP компьютеров 222 Предупреждение! Слияние всех выбранных компьютеров в один! Вы уверены? 223 Информация 224 Значение 225 Административная информация 226 успешно удален из accountinfo таблицы 227 Вы уверены, что хотите стереть колонку 228 Введите новую административную информацию 229 Текст (255) 230 Целое число 231 Число с плав. запятой 232 Дата 233 На текущий момент 234 вставка прошла успешно 235 Пользователи 236 Изменить пароль 237 Новый пароль 238 Подтверждение 239 Вы должны заполнить каждое поле 240 Пароли различаются! 241 Ваш пароль успешно изменен. 242 Администратор 243 Пользователь 244 Добавить нового пользователя 245 удаление прошло успешно 246 Вы действительно хотите удалить пользователя? 247 Имя пользователя MySql 248 Пароль MySql 249 Невозможно соединиться с сервером MySql. Пожалуйста, введите правильное имя пользователя и пароль. 250 Имя сервера MySql 251 Выход 252 Имя (по Вашему выбору) 253 Раздел 254 Расположение ключа (Ex: SOFTWAREMozilla) 255 Имя ключа который будет считан (* означает все) 256 Выбрать 257 Ключ реестра 258 Значение ключа 259 Ошибка, данные не могут быть внесены (спец. символы не разрешены) 260 Метка файла модификация ok 261 Метка файла Удалён 262 Введите маркировку 263 Конфигурация файла маркировок 264 Пока нет файла маркировок 265 Всё что угодно 266 Неправильная дата 267 дд/мм/ГГГГ 268 Скорость 269 %m/%d/%Y 270 Модем(ы) 271 Слот(ы) 272 Порт(ы) 273 BIOS 274 Название ОС 275 Версия ОС 276 Чипсет 277 Версия 278 Драйвер 279 Порт 280 MIB Type 281 DHCP IP 282 Шлюз 283 Назначение 284 Производитель BIOS 285 Выберите параметр который хотите редактировать 286 Подверсия ОС 287 Local import 288 Local Importation 289 Сетевая информация 290 Опрос IP 291 Экспертный режим 292 Добавить / Удалить сетевое устройство 293 Типы сетевых устройств 294 Имена подсетей 295 Имя сети 296 Uid 297 Не могу записать в директорию 298 Все поля должны быть отфильтрованы 299 Не правильный IP адрес (должен быть: x.x.x.x) 300 Не правильная маска (должно быть: x.x.x.x или xx) 301 Добавлена новая сеть 302 Сеть удалена 303 Добавить подсеть 304 Сетевая принадлежность 305 Uid 306 Список подсетей 307 Добавить тип 308 Введите имя 309 Типы сетевых устройств 310 СборщиковIP меньше чем 311 Сетевые устройства 312 СборщикIP 313 Шлюзовые компьютеры 314 Шлюзы СборщиковIP 315 Неинвентаризованные компьютеры 316 Подсеть 317 ОПРЕДЕЛИТЬ 318 DNS имя 319 Результат анализа сети 320 Этот анализ уже выполнялся в 321 вы хотите увидеть cached данные ? 322 Данные из кеша 323 сгенерировано в 324 ХОСТЫ ОПРЕДЕЛЕНЫ КАК 325 пусто 326 no mask typed 327 подробности 328 Проанализировано 329 Инвентаризировано 330 NetBIOS имя 331 Номер сети 332 Пожалуйста ждите... 333 Добавить новое сетевое устройство 334 Список сетевых устройств 335 Тип устройства 336 Описание устройства 337 THE PROGRAM DID NOT SEND ANYTHING 338 Ограниченный режим 339 Для режима Эксперт, вам нужен скрипт ipdiscover-util.pl (только для Linux) 340 Показать 341 не может быть запущен, вам нужно разрешить права на запуск 342 Вы должны установить права на запись на корневую папку, чтобы использовать 344 Ошибка 345 АНАЛИЗ ЗАПУЩЕН, ПОВТОРИТЕ ПОПЫТКУ ЧЕРЕЗ НЕСКОЛЬКО МИНУТ 346 ДО 347 ПОСЛЕ 348 Пользователь Windows 349 Добавить столбец 350 CPU тип 351 CPU ядер 352 Последний сеанс 353 Качество (сеансов/сут) 354 Лояльность (сеансов) 355 Компания 356 Владелец 357 Агент инвентаризации 358 Шаблоны: ? (один любой символ), * (любое количество любых символов) 359 Монитор - серия 360 Собрано в (неделя/год) 362 Сеть 363 уже существует 364 Подотчетных 365 Диких 366 Определен 367 Устройства в сети 368 в сети 369 Представлено 370 Развертывание 371 Все компоненты 372 Выберите компоненты 373 Зарегистрированный пользователь 374 Registered society 375 Версия OCS NG агента 376 Компьютер заблокирован. Пожалуйста попробуйте через несколько минут 377 Частота процессора, Мгц 380 Категории ПО для GLPI 381 Номер 382 Название ПО 383 Все на странице 384 Переместить ВСЕ 385 в новую категорию 386 ИЛИ 387 в существующую категорию 388 Категория 389 отменить все 390 Категории Словаря 391 Имя категории 392 Удалить 393 Поиск 394 Найти Категорию 395 Искать ПО Везде 396 Сброс 397 Перейти в категорию 398 Список категорий 410 В ТОЧНОСТИ 411 Поля должны содержать только номера ! 412 Вкл/Выкл сбор значений в Реестре 413 Вкл/Выкл автоматическое обновление 414 Вкл/Выкл автоматическое развертывание 415 Регистрировать удаление/переименование компьютеров (необходимо для GLPI). 416 Детальный журнал событий на сервере. 417 Вкл/Выкл автоматическое распростанение ПО. 418 Вкл/Выкл the differentiate inventories functionality. 419 Через сколько дней отсутствия связи активировать другого СборщикаIP. 420 Автоматическое распространение ПО: см. документацию. 421 Автоматическое распространение ПО: см. документацию. 422 Автоматическое распространение ПО: см. документацию. 423 Автоматическое распространение ПО: см. документацию. (Пакеты с большим или равным приоритетом больше загружаться не будут). 424 Максимальное число дней до устаревания загруженной в компьютер упаковки. 425 Максимальное количество активных сборщиков в одной подсети. 426 Частота инвентаризации. (ALWAYS: инвентаризировать при каждом входе. NEVER: не инвентаризировать) 427 Критерии, при равенстве которых дублирующие записи компьютеров будут автоматически объединены. 428 Развёртывание 429 Частота 430 Массовые операции 431 Активировать 432 Без уведомления 433 Распространение 434 Изготовитель пакетов 435 Собрать новый пакет 436 Не могу открыть файл 437 Ваш пакет был успешно собан в директории 438 Собрать пакет 439 Протокол 440 Приоритет 441 Digest algorithm 442 Digest encoding 443 Действие 444 Команда 445 Путь 446 Имя файла 447 Оповещение пользователя 448 Предупреждение пользователя 449 Текст 450 Countdown 451 Пользователь может прервать 452 Пользователь может приостановить 453 Установка с участием пользователя 454 NO 455 YES 456 Execute 457 Store 458 Launch 459 Countdown must be a number 460 Уникальный идентификатор 461 Digest 462 Общий размер 463 Размер фрагмента (не менее 1КБ) 464 Фрагментов 465 Активация пакета 466 WARNING: Can't find information file at 467 WARNING: Can't find fragments files at 468 Вы уверены что хотите активировать пакет ? 469 Пакет активирован и годен к распространению 470 Https адрес 471 Фрагменты адреса 472 ERROR: Не могу удалить папку 473 Timestamp - должно быть число 474 Timestamp должна состоять из 10 цифр 475 Timestamp 476 Или активировать пакет вручную 477 Распространить пакет 478 Компьютер(ы) 479 Не выбраны компьютеры 480 фрагменты 481 Активированные пакеты 482 WAITING NOTIFICATION 483 Проверка прошла УСПЕШНО 484 Affect a custom frequency 485 Всегда инвентаризировать 486 Никогда не инвентаризировать 487 Выборочно 488 По умолчанию 489 Режим работы СборщикаIP 490 НИКОГДА не быть СборщикомIP 491 ВСЕГДА быть СборщикомIP в сети 492 ИЗБРАН СборщикомIP в сети 493 По умолчанию (участие в выборах) 494 Периодичность инвентаризации 495 Инветоризировать каждые 496 дней 497 По умолчанию, в соответствии с параметром 'FREQUENCY'. 498 Пакет 499 Сервер 500 Настройка 501 Добавить пакет 502 Выбраны 503 Назначены 504 Остальные 505 Учавствующие в выборах 506 Не учавствующие в выборах 507 HAVING 508 NOT HAVING 509 ЛЮБОЙ 510 Нет пакета 511 секунд 512 Развертывание 513 Собрать 514 Активировать 515 Активирован 516 КБ 517 Эта опция может быть установленна только для одного компьютера за раз. 518 Запуск СборщикаIP 519 Выбран для сети 520 Назначен быть СборщикомIP 521 Запрещено быть СборщикомIP 522 Обычный компьютер 523 На общих правах 524 Выключить 525 ВЫ УВЕРЕНЫ ? 526 НЕ РАСПРОСТРАНЕНО НИКУДА 527 Январь 528 Февраль 529 Март 530 Апрель 531 Май 532 Июнь 533 Июль 534 Август 535 Сентябрь 536 Октябрь 537 Ноябрь 538 Декабрь 539 Воскресенье 540 Понедельник 541 Вторник 542 Среда 543 Четверг 544 Пятница 545 Суббота 546 в состоянии 547 все 548 All but SUCCESS 549 Файл (помещаемый на клиентский компьютер) 550 File (not mandatory, may be used by "execute" commmand) 551 Пакет с таким именем уже существует 552 You must make a computer search, и нажмите 'deploy' для распространения этих активированных пакетов
Вы можете также распространить пакет на один компьютер, используя 'customization' закладку в свойствах компьютера
. 553 Windows key 554 Монитор: серийный № 555 Монитор: производитель 556 Монитор: модель 557 Домен MS 558 Распространенные пакеты 559 Это не .ocs файл 560 На сервер 561 Неизвестно (удаленный пакет) 562 Сети с назначенными uid: 563 Производитель 564 Периодичность сеансов связи агента к серверу 565 Хост сервера инвентаризации (имя или IP) 567 Время ожидания ответа и переход к следующему IP 568 RAM(MB) 569 CPU(MHz) 570 Помощь 571 Проверить все 572 Успешно 573 Ошибок 574 Статистика 575 Об нераспространении не извещать 576 Customized ipdiscover 577 Имя группы 580 Все компьютеры (повторить) 581 Все компьютеры (из кэша) 582 и 583 Группы 584 По параметрам 585 Ручное назначение 586 Новая группа 587 Новая статичная группа 588 Перезаписать существующую 589 добавить в существующую 590 Сбросить статус 591 Включить статично 592 Исключить статично 593 Дата создания 594 Cache сгенерирован 595 СТАТИЧНАЯ ГРУППА 596 ДИНАМИЧЕСКОЕ ЧЛЕНСТВО 597 РУЧНОЕ ИСКЛЮЧЕНИЕ 598 Включить 599 Сбросить 600 Исключить 601 Массовое распространение 602 You need to send a file 603 Компьютеры не найдены, проверьте ваш файл 604 компьютеров с успешным распространением 605 компьютеров с проваленным 606 Computers file 607 Группа 608 создано 609 изменено 610 STATICALLY INCLUDED 611 NO CACHE 612 СТАТИЧНО 613 ДИНАМИЧНО 614 EXCLUDED 615 Запрос 616 Perimeter of user 617 Новое 618 Perimeter 619 Local user 620 No computer in your perimeter. 621 The group was not created. Its name is already in use 622 Cached 623 The information you are trying to access does not exist 624 Do you really want to delete group 625 Принять изменения 626 Отменить изменения 627 At least one of the fields is empty... Not made Update. 628 Redistribution Servers 629 New group of servers of redistribution 630 A group of existing servers 631 Добавить в 632 Crush 633 Management groups servers 634 Желаемое действие 635 Новое имя 636 Описание 637 Заменить 638 ИМЯ ГРУППЫ НЕ МОЖЕТ БЫТЬ ПУСТЫМ 639 THIS GROUP'S SERVER NOT EXIST 640 Вы действительно хотите удалить 641 Management of the redistribution servers 642 группа 643 All machine 644 this machine 645 GROUP DETAIL 646 URL 647 PORT NUMBER 648 REPERTOIRE STORE 649 AUTOMATIC ACTIVATION 650 MANUAL ACTIVATION 651 Servers group 652 Machine(s) 653 ЧерныйСписок MAC-адресов 654 Введите MAC-адрес для добавления в ЧерныйСписок 655 Insertion made 656 This datum already exists in the list 657 Fields in red are in error!!! (Empty fields or size < 2) 658 машина не имеет сервера развертывания.
Необходимо распространить этот пакет индивидуально 659 Machines already have this teledeploy package. This package's statut for these machines is now 660 GROUP OF SERVEUR NOT EXIST 661 PACKAGES FOR SERVER OF REDISTRIBUTION 662 Правила распространения 663 INTERNES PROBLEM 664 Action made 665 NO SELECTED MACHINE. GROUP OF SERVER NOT CREATED 666 Group of server made 667 FOR THE PACKAGE 668 С какими правилами распространять? 669 ATTENTION: there are doubloons of priority < br > A single rule will be retained! 670 A rule already carries this name 672 This rule does not exist!!! 673 Администрирование правил распространения 674 NAME OF THE RULE 675 PRIORITY 676 MACHINE VALUE 677 OPERATOR 678 SERVER VALUE 679 ИМЯ 680 DOMAIN 681 USER 682 to Add a supplementary condition 683 Validate the rule 684 The following fields must be seized 685 Добавить правило 686 Условия 687 Вы не можете стереть это. 688 Пакеты распространены на эту группу! 689 Пакеты распространены на этот сервер! 690 You cannot delete all the machines. 691 Generic Values: $IP$ and $NAME$ 692 You modify ALL the values of the servers 693 You modify the values of the following server: 694 to find the default values, validate the vacuous fields 695 You modify the group of servers 696 Показать пакеты, активированные к распространению на 697 машина 698 группа серверов 699 Вы уверены, что хотите распространить этот пакет на эти машины? 700 Выбор ЧерногоСписка 701 ЧерныйСписок серийных номеров 702 Введите новый серийный номер для ЧерногоСписка 703 ЧерныйСписок 704 Вы уверены, что хотите добавить в ЧерныйСписок 705 Вы уверены, что хотите убрать из ЧерногоСписка 706 Из ЧерногоСписка 707 этот серийный номер 708 этот MAC-адрес 709 Customized PROLOG_FREQ 710 Выборочная загрузка 711 Taken into account modifications 712 Перевод 712 Перевод 713 Вы уверены, что хотите заменить этот перевод 714 Исходный перевод 715 Выберите перевод для исправления 716 Обновить перевод 717 customized 718 Не менять 719 (в секунду) 720 Период ожидания между 2 циклами развертывания 721 Период ожидания между загрузками 2 фрагментов 722 Период ожидания между 2 периодами развертывания 723 maximum Priority of the downloaded packages
(The packages of a superior priority are ignored) 724 Время между 2 подключениями агента к серверу 725 (в час) 726 URI of the servers of redistribution ($IP and NAME$ are the generic values) 727 Directory of destination of packages. 728 Инвентаризация 729 computers 730 часов 731 Feature of appointed on the base to every section of inventory. 732 милисекунд 733 Inactive 734 Inventory files 735 Filters 736 Разрешить группировку компьютеров 737 Random number computed in the defined range. Designed to avoid computing many groups in the same process 738 Specify the validity of computer's groups (default: compute it once a day - see offset) 739 Futur security improvements 740 Validity of a computer's lock 741 Передаются только изменения, а не все данные (снижает нагрузку БД) 742 Передавать данные транзакцией и сохранять по корректной обработке всех данных (снижает параллелизм, лучше использование диска) 743 Построчное обновление секций инвентаря. Снижает нагрузку DB, увеличивает нагрузку оболочки 744 Принимать инвентаризацию, только по желанию сервера (Отвергать ручные внеплановые передачи) 745 Specify when the engine will clean the inventory cache structures 746 Specify the minimal difference to replace an ipdiscover agent 747 Выключить отсрочку перед первыми выборами (не рекомендуется) 748 Наличие групп в процессе сбора IP (например, для исключения возможности быть СборщикомIP целой группе) 749 Use with ocsinventory-injector, enable the multi entities feature 750 Сжатый файл или чисто текстовый XML 751 Specify if you want to keep trace of all inventory between to synchronisation with the higher level server 752 Папка с файлами ocs (должна быть доступна на запись) 753 Enable prolog filter stack 754 Enable core filter system to modify some things "on the fly" 755 Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period 756 Period definition for INVENTORY_FILTER_FLOOD_IP 757 Enable inventory filter stack 758 Если вы хотите отслеживать распространение пакетов на группу подробно по каждому компьютеру 759 Должно быть больше или равно 760 Webservice 761 Enable/Disable the soap service 762 Result page size (be aware of performances issues) 763 Include file of your own modules 764 Настройки ниже не доступны из GUI.
(see ocsinventory-server.conf) 765 Все программы 766 Ничего не найдено 767 ВНИМАНИЕ: РЕЗУЛЬТАТ ФИЛЬТРАЦИИ 768 Количество записей 769 Tranfer Made 770 UPDATE OF 771 Эта категория уже существует 772 Имя категории не должно быть нулевым 773 Вы должны выбрать имя категории 774 You try to make a transfer of the category towards the same category 775 Directory of creation of packages 776 Directory of stake in cache of the analyses of ipdiscover 777 Проверка сессии 778 Рабочих групп 779 TAG -ов 780 Подсетей 781 Машин с зависшим процессом развертывания 782 Машин с ошибками в пакетах 783 (Зоо)парк операционных систем 784 Разновидностей агентов 785 Парк процессоров 786 Разные разрешения экрана 787 С частотой процессора >= 788 С частотой процессора =< 789 С частотой процессора в диапазоне 790 С объемом RAM >= 791 С объемом RAM =< 792 Объемом RAM в диапазоне 793 Всего в базе 794 Доступно для просмотра 795 Сегодня подключилось 796 Сегодня инвентаризировано 797 Недоступны для просмотра уже более, чем 798 Активность 799 Техническое обеспечение 800 Разное 801 Не показывать эти поля 802 Show this fied 803 Дней после последнего контакта с сервером 804 Низкая частота процессора 805 Высокая частота процессора 806 Малый обьем памяти 807 Большой объем памяти 808 Распределение 809 Статичные группы 810 Динамические группы 811 Are you sure to want to modify the visibility of the group 812 The software in 0 is present in CACHE but are not any more settled on machines.
They cannot be put in a category of dictionary 813 Свободного места на диске > 814 Свободного места на диске < 815 Сводного места на диске в диапазоне 816 Достаточно свободного места на диске 817 Мало свободного места на диске 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volumn Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one redistribution group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection? 901 Action on the query result 902 Action on the result of selection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect package 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 You cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The network ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 To come back to a standard state, you will have to click on the icon e which is at the right top of the interface 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Software search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your e-mail is not valid 1056 Contact your OCS-NG administrator 1057 Failed to connect to mailserver 1058 no e-mail is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' function is not activate. 1075 Activate this functionality to use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of note 1127 Author of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on redistribution group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profil 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profil (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 The install.php exists in ocsreports directory 2021 Your GUI logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default sql login/password is activate on your database: 2025 Change your password for ocs login in MySQL 2026 The default login/password is activate on OCS GUI 2027 Change admin password on OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forgot to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/slovenian/000077500000000000000000000000001303466605000260125ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/slovenian/slovenian.png000077500000000000000000000114561303466605000305300ustar00rootroot00000000000000PNG  IHDRbKGDtIME )9vIDATxyxTߙ$61$-bQ@DYAz]Zŭ[)Zh{׶ޫ^jjUk]kQ"к -EC$d'dsH&IfLy|{9Xm A&0B@F! #`0B@F! #`0B@F! #`0B@F! #`8zHvhgeD UGUUcHTjhJ2,:-Zr(7ˡCC<ӭ>~%@@z͞ԚOCZ_?wUVIʺs:yKc:uNcRne۶;q4hlxC@[Њ-A wԔWBnB_Lտ/,N]^]Ӣ>hֲAݿCnSo&k'>"->8ǥ҉n}mR # obmQs0ϗ^^tx5:om9Km:[^A˝QnMF*.ҏݦnC3&MgztXRh $I~?7>U9xHRmsV)CW+'A+vwwNT^fx5`ID7t}*~>TS"Sww>3+OyIQ!۶4W#Vtܘ͚8dCQۡ+/hvUGT_aäRu@ Š/ʌ,[yE=]nWml>*:VO +I|8+o.śCn5Z\2] E\]%[t߻󵯩t}$oݞ|o!xy쨼=<϶-m{B@F-Iޚrnzī_޴hHx$wQī폮759gwƲz[i\?$^{mn%'kʼnH& IꪇTMr3j4n-8GOvGO@xb%%L۫лGg_mo8ې$3sŠW, Ѧ:3Inhl스ohiHF $?JkO?yc_0.Y|RO{$^꒾= a{wfUhSňoC#I@@ Hsmḿ+م ?# wĜ76z" + _CQEoSu@xՔ&n^ko=I@@pHU_ҽ+ nONȁ3 i?F@$Iϧڽr_d(caI];{I@@=A}(W]&yb7 rjcxu܀I. H" -K9zֹ5:F1BFts$I9KU3 ;)r%^IB@ H$K8'C?p)!=sW^G(ējv  sחgǷ o"'Ȅ.C~? ǡg`(%dA~\hŖ^j^;)+?E7pGS%tؼGj'fJՙ#?ctY]kZiU;}N5z2@8/}oq^*wTJytDrGa)z!VD 9c$uy-՝>y#_ATߜ t$:uzalH~Cr5Dz$Ш<ݼǑ!&I*]p" 9\tjlwHuH<}[B$ABy~9yn>dbǪMQsO $A}$Iy-Uӎy\?ˣK&F _N|'^8$id}$}>љZ/Rz#8r^ےͻ;?ymj*Iܱ};2$A|Umʒeln"3o"VLp4! Z^8K_C]\H&iָ I:X/K$bwqS˅"ǟdc@muzّ/ֵ-jGH`,Zm/Fmw$I rKW/:pECʩ噷C<#]w^烔VGh_OLytlFw4,\s,Wcѓ6'm;K64S}cB.;?.i$wΙjSsmO+yN7>R#݋u=5bk-RqI|%5KFoWhhS}neitSW' v%ꈮzN+Ω|kszPmj.' 8H/*hТeWj\?FsfYi>:-}ln9?S36mf^Ԩzp_X:g3="8P~]eEмi!I8tL-8swa[ϼ׬_il}yz`97ڝ>^#7ʛRuuGYnKOI׷gzc~=V݇?ٻWOq_ЧR߬矮ҶX/߲O]}IRqZ0.dnpD>0f~W$i{P2V-4K!˩Jj7H?Ti)߲9B@Ф5ƇtNRF;ބ*j9T?Up=ρ~:]/rKS/՟}+\# #0B@F! #`0B@F! #`0B@F! #`0B@F! #` 'z,[z'z80B@F! #`0B@F! #`0B@F! #`0B@F! #`0B@F! #`0B@F! #`0B@F! #`0B@F! #`0n~``FIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/slovenian/slovenian.txt000077500000000000000000001201071303466605000305550ustar00rootroot000000000000002 Vsi raÄ?unalniki 3 RaÄ?unalniki z programsko opremo... 5 Unity codes under my responsibility 9 Iskanje po razliÄ?nih kriterijih 12 Vrednost oznake 13 PoĹĄlji 17 Agent 18 Revision 19 Verzija programske opreme 20 Programska oprema 23 RaÄ?unalnik 24 Uporabnik 25 Operacijski sistem 26 Pomnilnik 27 Hitrost pomnilnika (MHz) 28 Ĺ tevilo raÄ?unalnikov 30 Iskanje 31 Izberi parametre 32 Izberi 33 Domena 34 IP ĹĄtevilka 35 Ime raÄ?unalnika 36 Serijska ĹĄtevilka 41 Ponovni zagon 42 Ni rezultatov 43 Osnovni meni 45 Prazen prostor 46 Zadnji popis 48 Podrobnosti raÄ?unalnika 49 Ime 50 Menjava 51 Komentarji 53 Opis 54 Procesor(ji) 55 Ĺ tevilka 56 Administrtrativni podatki 61 Video kartica 62 Resolucija 63 SkladiĹĄÄ?e 64 Proizvajalec 65 Model 66 Tip 67 Velikost diska 69 Urejevalnik 70 DoloÄ?itev 79 Tiskalnik (i) 80 Zajem 81 Status 82 OmreĹžje(a) 83 Kapaciteta 84 Vmesnik 85 Pismo 86 DatoteÄ?ni sistem 87 KonÄ?no 88 Prosto 90 Rezultat(i) 91 Vhodne enote 92 Disk(i) 93 Kontroler(ji) 94 Ĺ tevilka Slota 95 MAC ĹĄtevilka 96 Zvok 97 Monitor(ji) 98 Bodi pazljiv, izbereĹĄ lahko samo 8 moĹžnosti! 99 Podrobnosti raÄ?unalnika 103 Nadgradnja 107 Nastavitve 108 Zahteva registra 111 Windows licenca 113 PrekliÄ?i 114 Register 115 Nadgradi 116 Dodaj 117 Registrer 119 Ali res ĹželiĹĄ izbrisati ta raÄ?unalnik 122 IzbriĹĄi 129 Je enako 130 Ni enako 134 Dodaj novo datoteko v podatkovno bazo 135 Bodi previden, si tik pred tem, da za vedno izbriĹĄeĹĄ to datoteko! 136 Prenos 137 Datoteka 168 Ta format datoteke je napaÄ?en (biti mora zip, ocsagent.exe, ocspackage.exe, pl ali unix binary) 170 Datoteka Ĺže obstaja ! 171 Datoteka izbrisana 172 Pojavila se je napaka, datoteka je 173 ne bo dodano v podatkovno bazo 174 Varnost 175 Duplikati 176 IPs 177 ZdruĹži odveÄ?ne raÄ?unalnike 178 SeĹĄtevek raÄ?unalnikov z oznakami 180 Uporabnik ni registriran 182 RaÄ?unalniki z doloÄ?eno oznako 183 Prenos 184 Ta datoteka ne vsebuje "use constant version" 185 Vrednost mora biti nad 1 186 Ta datoteka ne vsebuje "ver"-podatkov 187 To ni veljavna zip datoteka 188 Nazaj 189 Izbrati morate najmanj dva raÄ?unalnika 190 Informacija o raÄ?unu 191 izbriĹĄi 192 Redundancy summary 193 Ime gostitelja + Serijska ĹĄtevilka 194 Ime gostitelja + Mac ĹĄtevilka 195 Mac ĹĄtevilka + Serijska ĹĄtevilka 196 Samo ime gostitelja 197 Samo serijsko 198 Samo Mac ĹĄtevilko 199 Redundancy 200 Corresponding relay decremented 201 MANJĹ I KOT 202 VEČJIKOT 203 MED 204 IZVEN 205 OmogoÄ?eno 206 shranjeno za 207 Prehod 208 maska 209 BIOS Verzija 210 BIOS Datum 211 Register 212 Ime kljuÄ?a 213 Vrednost KljuÄ?a 214 Natisni to stran 215 PokaĹži vse 216 Geslo je napaÄ?no 217 Geslo 218 Verzija Agentov 219 nepopisan mreĹžni vmesnik 220 izbriĹĄi 221 RaÄ?unalniki zbrani po IP ĹĄtevilki 222 Opozorilo! Vsi izbrani raÄ?unalniki bodo zdruĹženi v en raÄ?unalnik! Ste prepriÄ?ani? 223 Informacije 224 Vrednost 225 Podatki administratorja 226 je bil uspeĹĄno izbrisan iz uporabniĹĄke tabele 227 Ste prepriÄ?ani da Ĺželite izbrisati stolpec 228 Vnesite nove administrativne podatke 229 Besedilo (255) 230 Ĺ tevilo 231 Real 232 Datum 233 Trenutni podatki 234 je bilo uspeĹĄno venĹĄeno 235 Uporabniki 236 Spremeni geslo 237 Novo geslo 238 Potrditev 239 Izpolniti morate vsa polja 240 Geslo se ne ujema 241 Geslo je bilo uspeĹĄno spremenjeno 242 Administrator 243 Uporabnik 244 Dodaj novega uporabnika 245 je bil uspeĹĄno izbrisan 246 Si prepriÄ?an, da ĹželiĹĄ izbrisati uporabnika 247 MySql uporabnik 248 MySql geslo 249 Ne morem se povezati v MySql. Prosim vnesi pravilno uporabnika/geslo. 250 MySql gostitelj 251 Odjava 252 Ime (ti izbiraĹĄ) 253 Registersko gnezdo 254 Pot do kljuÄ?a(Primer: Programska opremaMozilla) 255 Ime kljuÄ?a, ki bo bran (* za vse) 256 Izberi 257 KljuÄ? za registracijo 258 Vrednost registrirnega kljuÄ?a 259 Napaka, podatek ne more biti vstavljen (specialni znaki niso dovoljeni 260 OznaÄ?ba spremenjene datoteke je pravilna 261 OznaÄ?ena datoteka je izbrisana 262 Vrsta v oznaki 263 OznaÄ?ite datoteÄ?no nastavitev 264 Ne oznaÄ?i datoteke 265 Kar koli 266 NapaÄ?en datum 267 mm/dd/yyyy 268 Hitrost 269 %d/%m/%Y 270 Modem(i) 271 Vodilo(a) 272 Vrata 273 BIOS 274 Ime OS 275 Verzija OS 276 Chipset 277 Verzija 278 Gonilnik 279 Vrata 280 MIB Tip 281 DHCP IP 282 Prehodi 283 Namen 284 Proizvajalec BIOS-ov 285 Izberite parameter, ki ga Ĺželite spremeniti 286 Service pack 287 Lokalni uvoz 288 Lokalno uvaĹžanje 289 Podatki o omreĹžju 290 Ip povpraĹĄevanje 291 Experten naÄ?in 292 Dodaj / izbriĹĄi mreĹžno napravo 293 Tipi mreĹžnih naprav 294 Imena poddomen 295 Klikni za urejanje 296 Uid 297 Ne morem pisati v mapo 298 Vsa polja morajo biti polna 299 NapaÄ?na IP ĹĄtevilka (biti mora: x.x.x.x) 300 NapaÄ?na maska: biti mora: x.x.x.x 301 OmreĹžje vstavljeno 302 OmreĹžje izbrisano 303 Dodaj poddomeno 304 Ime omreĹžja 305 Uid 306 Lista podomreĹžij 307 Dodaj tip 308 Ime tipa 309 Tip mreĹžne naprave 310 IpDiscover less than 311 Gostitelji 312 IpDiscover 313 Prehodi raÄ?unalnikov 314 IpDiscover gateway computers 315 Ne popisani raÄ?unalniki 316 PodmreĹža 317 ANALIZIRANJE 318 DNS ime 319 Podatki analize omreĹžja 320 Te analize so Ĺže bile izvedene 321 Ali ĹželiĹĄ videti podatke iz vmesnika (cache) ? 322 Podatki iz vmesnika (cache) 323 generirano na 324 Gostitelj je ocenjen kot 325 prazno 326 nebena maska ni vpisana 327 Podrobnosti raÄ?unalnika 328 Odkrito 329 Popisano 330 NetBIOS ime 331 Ĺ tevilka omreĹžja 332 Prosim poÄ?akaj... 333 Dodaj novo mreĹžno napravo 334 Lista mreĹžnih naprav 335 Tip naprave 336 Opis naprave 337 PROGRAM NI POSLAL NIČESAR 338 Omejen mode 339 Potrebujete ipdiscover-util.pl (Samo Linux) za napredni naÄ?in 340 PrikaĹži 341 ni izvedljivo, nastaviti morate pravice izvajanja 342 Nastaviti morate pravico pisanja v korensko mapo 344 NAPAKA 345 TA ANALIZA TRENUTNO POTEKA, PROSIM POSKUSI ČEZ NEKAJ MINUT 346 PRED 347 ZA 348 Uporabnik Windows-ov 349 Dodaj stolpec 350 Tip CPU-ja 351 ĹĄtevilo CPU-jev 352 Na zadnje prispelo 353 Kvaliteta 354 Zvestoba 355 Podjetje 356 Lastnik 357 UporabniĹĄki agent 358 Wildcards: ? (en znak), * (nekaj znakov) 359 Serijska ĹĄt. Monitorja 360 Proizvedeno(teden/leto) 362 OmreĹžje 363 Ĺže obstaja 364 Popisano 365 Ne- popisano 366 Identificirano 367 Naprave omreĹžja 368 omreĹžja 369 Dodano od 370 Postavitev 371 Vse komponente 372 Izberi komponente 373 Registrirani uporabniki 374 Registrirana druĹžba 375 OCS NG Verzija agenta 376 RaÄ?unalnik je zaklenjen. Prosim ponovno poskusi Ä?ez nekaj minut. 377 Hitrost procesorja(MHz) 380 Slovar 381 Ĺ tevilo 382 Ime programske opreme 383 Stran 384 Premakni VSE 385 v novo kategorijo 386 ALI 387 na obstojeÄ?o kategorijo 388 Kategorija 389 NiÄ? 390 Kategorije slovarja 391 Ime kategorije 392 IzbriĹĄi 393 IĹĄÄ?i 394 IĹĄÄ?i po kategoriji 395 IĹĄÄ?i programsko opremo POVSOD 396 Ponastavi 397 Pojdi v kategorijo 398 Lista kategorijCategories list 410 NATANČNO TAKO 411 Polje mora vsebovati samo ĹĄtevilke ! 412 Zbrano funkcionalnost kljuÄ?a registra 413 Samodejno nadgradnjo funkcionalnosti 414 Samodejno uporabno postavitev 415 Deletion logging functionality (needed by GLPI). 416 Logging functionality. 417 Automatic software distribution functionality. 418 Differential inventory functionality. 419 Maximum number of day before an ipdiscover computer is replaced. 420 Automatic software distribution: see documentation. 421 Automatic software distribution: see documentation. 422 Automatic software distribution: see documentation. 423 Automatic software distribution: see documentation. (Packages with a higher or equivalent priority won't be downloaded anymore). 424 Validity of a package as from its consideration by the agent. 425 Max number of computers per gateway retrieving IP on the network. 426 Validity of inventories. (ALWAYS: inventory at each login. NEVER: no inventory) 427 Defines criteria that must be equals for two computers to be automatically merged. 428 Razviti 429 Frekvenca 430 MnoĹžiÄ?na obdelava 431 Aktiviraj 432 Ne obveĹĄÄ?en 433 Vpliv 434 Gradnik paketov 435 Gradnja novega paketa 436 Ne morem odpreti datoteke 437 VaĹĄ paket je bil uspeĹĄno izdelan v mapi 438 Gradnja novega paketa 439 Protokol 440 Prioritete 441 Digest algorithm 442 Digest encoding 443 Akcija 444 Ukaz 445 Pot 446 Ime datoteke 447 Obvesti uporabnika 448 Upozori uporabnika 449 Besedilo 450 OdĹĄtevanje 451 Uporabnik lahko prekine 452 Uporabnik lahko odlaĹĄa 453 DokonÄ?anje namestitve potrebuje poseg uporabnika 454 NE 455 DA 456 Izvedi 457 Shrani 458 ZaĹženi 459 OdĹĄtevanje mora biti ĹĄtevilka 460 Unikaten oznaÄ?evalnik 461 Digest 462 Celotna velikost 463 Velikost odlomkov(1 KB min) 464 Ĺ tevilo odlomkov 465 Aktivacija paketa 466 OPOZORILO: Ne najdem informacijske datoteke v 467 OPOZORILO: Ne najdem odlomkov datotek pri 468 Si prepriÄ?an, da ĹželiĹĄ vkljuÄ?iti ta paket ? 469 Paket je aktivirn, sedaj je lahko razvit 470 Https url (varni url) 471 Odlomki url 472 NAPAKA: ne morem izbrisati mape 473 Časovni Ĺžig mora biti ĹĄtevilka 474 Časovni Ĺžig mora biti dolg 10 digitov 475 Časovni Ĺžig 476 Ali omogoÄ?i paket roÄ?no 477 Delujte na paket 478 RaÄ?unalnik(i) 479 Noben raÄ?unalnik ni izbran 480 odlomki 481 Aktivirani paketi 482 ČAKAJOČE OBVESTILO 483 Potrditev USPEĹ NA 484 Delujte na po meri narejeno pogostnost 485 Zmeraj popisano 486 Nikoli popisano 487 RoÄ?no 488 Privzeto 489 ObnaĹĄanje IPraziskovaleca 490 NIKOLI IPraziskovalec 491 ZMERAJ IPraziskovalec omreĹžij 492 IZVOLJEN IPraziskovalec omreĹžja 493 Privzeto Default (lahko je izvoljen) 494 Po meri izdelana pogostost popisa 495 Popisan vsak 496 dan(dnevov) 497 Privzeto, uporabljen je 'FREQUENCY' parameter. 498 Paket 499 streĹžnik 500 Customization 501 dodaj paket 502 Izvoljen 503 Prisili izvoljenega 504 Ni izvoljen 505 Izvoljiv 506 Ni izvoljiv 507 POSEDOVATI 508 NE POSEDOVATI 509 POLJUBNO 510 Ni paketov 511 sekunde 512 Razvrstitev 513 Izdelava paketov 514 Aktiviraj 515 Aktivirano 516 KB 517 Ta obcija je lahko razvita samo na enem raÄ?unalniku v danem Ä?asu. 518 Prisili IPrazikovalec 519 RaÄ?unalnik je Ĺže izvoljen za omreĹžje 520 RaÄ?unalnik je Ĺže PRISILIL IPraziskovalec za omreĹžje 521 RaÄ?unalnik je Ĺže PRISILJEN v ne izvoljivost 522 Standardni raÄ?unalnik 523 Vrni se nazaj k standardnemu stanju 524 NIKOLI VEČ ne vplivaj 525 SI PREPRIČAN ? 526 NOBEN RAČUNALNIK NI SIMULIRAN 527 Januar 528 Februar 529 Marec 530 April 531 Maj 532 Junij 533 Julij 534 Avgust 535 September 536 Oktober 537 November 538 December 539 Nedelja 540 Ponedeljek 541 Torek 542 Sreda 543 Četrtek 544 Petek 545 Sobota 546 in state 547 vse 548 Vse razen USPEHA 549 Datoteka (razvita na raÄ?unalnikih odjemalcev) 550 Datoteka File (ne obvezna, lahko uporabljena od "execute" ukaza) 551 Ime tega paketa Ĺže obstaja 552 MoraĹĄ narediti raÄ?unalniĹĄko iskanje in nato pritisni na 'razviti' za namestitev teh aktiviranih paketov
Prav tako lahko namestite paket na posamezen raÄ?unalnik z uporabo 'customization' ukaza za katerokoli podrobnost raÄ?unalnika
. 553 Windows kljuÄ? 554 Monitor: serijska ĹĄtevilka 555 Monitor: proizvajalec 556 Monitor: zajeto 557 Uporabnikova domena 558 Simulirani paketi 559 Ta datoteka ni .ocs 560 Na streĹžnik 561 Neznano (izbrisan paket) 562 OmreĹžja imajo uid: 563 Proizvajalec 564 Agent za avto-sproĹžitev pogostosti 565 StreĹžnik uporabljen za lokalni popise 567 IPraziskovalec latenca 568 RAM(MB) 569 CPU(MHz) 570 PomoÄ? 571 Potrdi vse 572 Uspelo 573 Napake 574 Stanja 575 NedelujoÄ?i niso obveĹĄÄ?eni 576 Prilagojeno IPraziskovalcu 577 Group name 580 All computers (replay) 581 All computers (cached) 582 and 583 Groups 584 For the request 585 For selection 586 New group 587 New static group 588 Overwrite group 589 statically add to group 590 Reset state 591 Include statically 592 Exclude statically 593 Creation date 594 Cache generated on 595 STATIC GROUP 596 DYNAMICALLY INCLUDED 597 STATICALLY EXCLUDED 598 Include 599 Reset 600 Exclude 601 Mass affectation 602 You need to send a file 603 No computer found, please check your file 604 computer(s) successfully affected(s) 605 computer(s) failed 606 Computers file 607 Group 608 created 609 overwritten 610 STATICALLY INCLUDED 611 NO CACHE 612 STATIC 613 DYNAMIC 614 EXCLUDED 615 Query 616 Perimeter of user 617 New 618 Perimeter 619 Local user 620 No computer in your perimeter. 621 The group was not created. Its name is already in use 622 Cached 623 The information you are trying to access does not exist 624 Do you really want to delete group 625 Enable this alteration 626 Disable this alteration 627 At least one of the fields is empty... Not made Update. 628 Servers 629 New group of servers of redistribution 630 A group of existing servers 631 Add to 632 Crush 633 Management groups servers 634 Wished action 635 New name 637 Replace 638 THE GROUP'S NAME CAN'T BE EMPTY 639 THIS GROUP'S SERVER NOT EXIST 640 Do you really want to delete 641 Management of the redistribution servers 642 the group 643 All machine 644 this machine 645 GROUP DETAIL 646 URL 647 PORT NUMBER 648 REPERTOIRE STORE 649 AUTOMATIC 650 MANUAL 651 Servers group 652 Machine(s) 653 Blacklist MAC address 654 Enter a new MAC address for blacklist 655 Insertion made 656 This datum already exists in the list 657 Fields in red are in error!!! (Empty fields or size < 2) 658 machine don't have redistribution servers.
It is thus necessary to affect this package individually. 659 Machines already have this teledeploy package. This package's statut for these machines is now 660 GROUP OF SERVEUR NOT EXIST 661 PACKAGES FOR SERVER OF REDISTRIBUTION 662 Rules of affectation 663 INTERNES PROBLEM 664 Action made 665 NO SELECTED MACHINE. GROUP OF SERVER NOT CREATED 666 Group of server made 667 FOR THE PACKAGE 668 to Affect with which rule? 669 ATTENTION: there are doubloons of priority < br > A single rule will be retained! 670 A rule already carries this name 672 This rule does not exist!!! 673 Administration of the rules of affectation 674 NAME OF THE RULE 675 PRIORITY 676 MACHINE VALUE 677 OPERATOR 678 SERVER VALUE 679 NAME 680 DOMAIN 681 USER 682 to Add a supplementary condition 683 Validate the rule 684 The following fields must be seized 685 Add a rule 686 The condition 687 You cannot delete it. 688 Packages are affected on this goupe! 689 Packages are affected on this server! 690 You cannot delete all the machines. 691 Generic Values: $IP$ and $NAME$ 692 You modify ALL the values of the servers 693 You modify the values of the following server: 694 to find the default values, validate the vacuous fields 695 You modify the group of servers 696 to Show packages activated to affect on 697 a machine 698 a group of server 699 Are you sure to want to affect this package in these machines? 700 Blacklist choices 701 Blacklist of serial number 702 Enter a new serial number to blacklister 703 Blacklist 704 Are you sure to want to blacklister 705 Are you sure to want to unblacklister 706 Unblacklister 707 this serial number 708 this mac address 709 Customized PROLOG_FREQ 710 Customized download 711 Taken into account modifications 712 Language file 712 Language file 713 Are you sure to replace this language file 714 Reference language file 715 Choose the language file to modify 716 Update the language file 717 customized 718 Ignore 719 (per second) 720 Waiting time between 2 cycles of deployment 721 Waiting time between 2 downloaded fragments 722 Waiting times between 2 periods of deployment 723 maximum Priority of the downloaded packages
(The packages of a superior priority are ignored) 724 Time between 2 contacting between the agent and the server 725 (in the hour) 726 URI of the servers of redistribution ($IP and NAME$ are the generic values) 727 Directory of destination of packages. 728 Inventory 729 computers 730 hours 731 Feature of appointed on the base to every section of inventory. 732 milisecond(s) 733 Inactive 734 Inventory files 735 Filters 736 Enable the computer's groups feature 737 Random number computed in the defined range. Designed to avoid computing many groups in the same process 738 Specify the validity of computer's groups (default: compute it once a day - see offset) 739 Futur security improvements 740 Validity of a computer's lock 741 Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load) 742 Make engine consider an inventory as a transaction (lower concurency, better disk usage) 743 Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load 744 Accept an inventory only if required by server ( Refuse "forced" inventory) 745 Specify when the engine will clean the inventory cache structures 746 Specify the minimal difference to replace an ipdiscover agent 747 Disable the time before a first election (not recommended) 748 Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents) 749 Use with ocsinventory-local, enable the multi entities feature 750 Generate either compressed file or clear XML text 751 Specify if you want to keep trace of all inventory between to synchronisation with the higher level server 752 Path to ocs files directory (must be writeable) 753 Enable prolog filter stack 754 Enable core filter system to modify some things "on the fly" 755 Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period 756 Period definition for INVENTORY_FILTER_FLOOD_IP 757 Enable inventory filter stack 758 Specify if you want to track packages affected to a group on computer's level 759 Must be superior or egal in 760 Webservice 761 Enable/Disable the soap service 762 Result page size (be aware of performances issues) 763 Include file of your own modules 764 Options below are not settable by GUI.
(see ocsinventory-server.conf) 765 All softwares 766 NO RESULT 767 BE CAREFUL: RESULT WITH FILTER 768 Number of recording 769 Tranfer Made 770 UPDATE OF 771 This category already exists 772 The category's name can't be null 773 You must select category's name 774 You try to make a transfer of the category towards the same category 775 Directory of creation of packages 776 Directory of stake in cache of the analyses of ipdiscover 777 Validity of a session 778 Number of different WORKGROUP 779 Different TAG 780 Different IPSUBNET 781 Machines having a software deployement pending 782 Machines having a package in error 783 Number of different OS 784 Different agent 785 Different processors 786 Different resolutions 787 Machines with a processor >= 788 Machines with a processor =< 789 Machines with a processor between 790 Machines with RAM >= 791 Machines with RAM =< 792 Machines with RAM between 793 Machines in base 794 Seen machines 795 Machines contact server today 796 Number of inventory machine today 797 Machines not see since more of 798 ACTIVITY 799 HARDWARE 800 ELSE 801 Don't show this field 802 Show this fied 803 Counts in the daytime since the machine don't contact server 804 Minimum speed processor 805 Maximum speed processor 806 Minimum RAM amount 807 Maximum RAM amount 808 Repartition 809 STATICS GROUPS 810 DYNAMICS GROUPS 811 Are you sure to want to modify the visibility of the group 812 The software in 0 is present in CACHE but are not any more settled on machines.
They cannot be put in a category of dictionary 813 hard disk number with remaining size > 814 hard disk number with remaining size < 815 hard disk number with remaining size between 816 hard disk maximum remaining size 817 hard disk minimum remaining size 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volumn Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one redistribution group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection? 901 Action on the query result 902 Action on the result of selection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect package 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 You cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The network ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 To come back to a standard state, you will have to click on the icon e which is at the right top of the interface 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Software search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your e-mail is not valid 1056 Contact your OCS-NG administrator 1057 Failed to connect to mailserver 1058 no e-mail is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' function is not activate. 1075 Activate this functionality to use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of note 1127 Author of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on redistribution group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profil 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profil (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 The install.php exists in ocsreports directory 2021 Your GUI logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default sql login/password is activate on your database: 2025 Change your password for ocs login in MySQL 2026 The default login/password is activate on OCS GUI 2027 Change admin password on OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forgot to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/spanish/000077500000000000000000000000001303466605000254615ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/spanish/spanish.png000077500000000000000000000336041303466605000276450ustar00rootroot00000000000000PNG  IHDR pHYs  tIME /!\I IDATxw^Gu֚kwnXErl1b ڏBrR!^!00ݸwɖdYWvG&!pys#={}kfϬO gYYFJb~0bCL댗 >0+:ZN | ꌗWdDA PU*8O/+yfN@% EP )u, a" h1;T " ٝx0[3h%y R&t˗+݌WdZiiiiiiiiiiiiiiiiiiiiiiiiiiiqB 1zl<lVʼ hba9nj" ?__Ե:~6z1?Xf_n ^` ˈ"\!QTx*B?/ ~yt=1Z28JN[*ͧ.8w.(`%YR}#y"_򥝋?QXVB&`ʅ*ΰ5'ŋ1?o8`de byvR?EQd0UT|&! jB @䄉 VJ h" f'/<_ jUM*_Y;Ǜ3)+dQ) ƛ<[capҪ`545cy{EqgWnKׯV2;h /<;B ĎPwwFM+#P.دle֗A,E4 "#YDt! w]MSd[o0d"vh;Ev%"w LnK)Z #A ,X3;m1Q稞ќn }3r-ط-,04]j\{ 2*S$YH&@B峝7<#WB'hS@G6Ttx m^oJ袥ͅB:QA3G]#Q=շoy}~L] gNbRFp"(ڠ23_ɤ4Gp::se ~;;Йk-#9gInfjrMjz2ٺGUrjyWPׯ)[n8a5 `ƒp}@- ) D0W_>n \ }ꡱ=6Z|_"{ߠŸ |>I*9L#: uɹmnuU l$WLx9ݱzX-Mg{eWP񌞚vRtpa~P\,m4eimjs2Vw%gdh»Ûw\8E2c2Z0 XK:)jx&aR?3iMsb@1PUJ0ck Ujj ١$z9K+soY.:P+W"O=w9+`R23%YA%BR&߿ [5 8*)ԛx@/l#1(z7(݆Ǻk])/%͔&P-l6~P(lL݂-O'-UN euFQwݳ=\2z;rJGF̡c5XӯN7!ue8J{Hxx_no_U? =PNkAyskɒ#"F<^gnmFgT.`;wd=麕# _Xy6;et %O7ʫ=qo5M:̖Wc^i450V;O|oz|B9=7[4 mOWmr0F1A+p9}"'! ď*هUAM槕t>rh+3BЗ8pV=3%U?}8J+D͉uVJ%y*=n}[[w T{Ю^,PJz8J8(Ls&(Nг q~L'7)]=tQCAW//bS!GwtĜs.ߎ,|뎹TTއ%+h a**u_].ystݽZUOL=+"J~LbkڠR um]m:)mN=V&U`}r\bHU,3E$3.j2Ze-j~#NZD]@,W~}Hr䣏utYF3z:|dL :M=Bm9--vsW_%DFTkl-tNJPݽS S>MÔXY7YVs\ǁ5Essu1/)#]ս{I@4Rc{. s帱nJDEH4tC`Ӡ M&Rf1j?aSskoLfBSktZ Mo!D aQ8 b=ϸʈS7b|Q'2'!5,ž©ZTWpds)#oS6|ls;̎:y/.w%=` G6wS*h {hfx.goOd0еRJUe-S?n|2sΐN8XP{]kt:h!PJ WX`[5{{bPi}DB7siIpJ ";ʂHו&̥ΔVLNWGOxdA@S.8_}4q]䱝F¨c|}Tr3Vy8ˬQ=ʤrmz$J"+h"O2_$ढ़22A EҞO"tU-'( 8D/!Qg 5@qK-阁\T* -K08#, "1=K~䟿<#3 NC?PZە ey1@i8@Rg@$tBJgGA?XM4q',H%$;S%z,0t,R=z0+.wsjT"gN ߊK[ԉKQE/@]炋C|)>Mi˛Tq 'n@;Npb"b@."4(AyJ<<󊊌/ۢO }Wm+gr b;/㽫?V7|TNM֡tԗsWe6(x ٤Du8b$9@z·8s\HPs 'hO_gWmN-fսX4HR3B'#cOl%Uڏ&_ʃ=ўB$„ o|{ojz]-C}3sQX{~wjםuD}M6U&h`&Jueym퍝K:ZX&jE1bC{;۾d? L4=&s=I:Pgŧwz4SUt3M.[}(XXOkiߓVK[4@!<{lxh-NQD0|6؝&KFw}g}-EҶɛd. D_uw?chuZʹفZ[UIÏ* RlL&|)XXiX\H{(?|-C0E'阗BkBDAzzY[mM,ĵS[ ă5Iyv\.!7\Ǎc%).m-G/nR>>P;6b]-׏Fj_}=g)^}36T ]WC+1pi@ ׽!o}>տ_7) ,X @DB$HWAuRYZRclT˿&hbbTD޾ƙ1);z,|07¹yէTUGZ{6_ֆn^hѵʓ!blw<ޒ? nAT|ڿ者+,mr>^&vo}ooK|t"`] ?yzn8:Uh)yOhуF}_륔ZJO&kΑFkG'Z~ !tL>J;~xqj̑GC~z`_z'踐]WoԔHHR҉UR'OVoؼgb.?H( V`GӦڷ`Bt. L>3's0Zc!h'aZU/mNR$hsIT_c,HGX23@-IDATCP ǎN$<&F)F߻8Ƒ=:³<9nY\89:|5>ڟ@2ˆނR,xHVXs 37PŢH2NhQh[P[&ݵn=5էqՁi&7{N^%+·r2XdglX?{էUk^KF؝>;P)L&! XċUʳTQ'anz|뗾=hGⰹ|gaU͈KBSՠ2-sw<f9^Ex-.Sm]~VޓlLzNK/8~sppT<540c5 іâ͸ dLJWc<IY˂c`'L =R:~" .Sm1삭zntqYᠮjX ȓT |j,}a {nSc,E*1~n; ij 7ͦKY5SqѺMM3R#9zC[WGLèk;kaNxST9ϳ k-5y׬]2[ h_nmhxWn@TW,IJ!9?ɓ 95 3޴-V*0r|+?7*@C! ZZ _CSċV</ ο۽*q1\{FFf+#Lk@9&XRo>ψ}z.3q]X9F{ *._΁ZO[HuIHO__]n <'Ao\?>nT)yQD,G&ͨ˭5k{_?~k]ױ |N*ـ p-5sˑG8\Ϥ5C QoyM0Y-lb=ݷ>-Uk vnzr߂;t:a.I@Zĕb[^7fCE{&NN~:lqin<뜣o'?ϯ mlIMzJ2O '+}KYf7M5%$T`$#QDa@i :i(X9IQ哩.? M=.z-}qH>ٖ-\UJt;ƾQM\bN 1 UA䄔Zg.EL-YԹSq±B̴Ĭ ̰z>M4a|XJӫ3gfMrj!4C&aD[LB`P%A *&#.'Ur/[?/̑-Trfp2:߮ qK{iv.nE+4d.\(,cz}seKRBu&!NK}ù-1 ikfY"ijS4]~R g$;uj-lX^ضH#"3#bǎ!P(8Sss>`" vb, ڊJ')k\[ `z=C 낾p|_ Dzt d1(!31BUֳNw(Ϧ՚4(0\joavJ|A"bN@#B [(z^HI+`\`~\o+XQ*nS0?kn>45#8Aw7L'xZ!+ˠR"d.:Ϛ?lS 3eѬxJ E{DD@$w9h`rC0I 牭CV>ԗT{b&rl.JO?d;jҿpS*~x-ƹI&*zJ|9b.X&BW`!bhѠ(sD(>%@.ݷۦi}ṹ;Шu5$ &=9-10"ŠRɜ1ehfWfYkJ GA*'ڪT-R>'2>A뜸*t-2X{SV^D9YnD @`ى5cœh|^)bg5էm"ͩb FӎŤS%(lE"|a_9H e 8Xbo&w5Px= NT)XM~.!Z+bcSsBl7[ٝ[So'^\0NW5% 6@%!'JxLΪPr9Pʧ&M"s ̩@+[o" W(H D0$@iG{VnM["N'D,[Fv"⺎Zz .Ui{Ma_Tb*0Hzsu$CdRzrD, xɥEa5M kUmUб-{Qdzr%[N9pi~ˋZOqu%]?VAgO_:^_5t(cZ2/(߹asb}?11(@y݉sDOqɽ?i m(E>iU05S$a߼|׶dҩ5N}' riN 7 ~Qs[?؞lr;h)_g0Yw&z̏.O vhu-Wpi ¡ud|/,5vP)]ɸ->c'^ncm}&^k(Lj 9, ᥕ]k[.'}xp恧}<6S>bx*Ү!:uZҶiObܝ.7yM׉=!#sj:\\@h[՛@LMs=7 [TԶf3u~bn(ywm# dFOT yix;Z[F9,S[Kh외42V7+G寿V~r?j 1&. iD~Ճ׿iSuh >O_x}mA͘*6^Z1'*Ɩ\ykp1ZANYkjCSOTaNtc[Öu'sw"F?K"B-RP&zHQ!:}l9(TAw:y71sƊ"1WZ)+ "k뤦cT3`eA;aˠ#G$(Na+"v!!hRzJP1"X;Q@X X@R 5:Pk10;Hs/Z.+ (2@fO@/d~@r @@ r4><``O'7$)0TZeAr G ~WC$F2Ğ9D Ie&ƁjXњE@d"0&L*@@/禂+&Oz@`y@]&4 !/wc1> dQ JNU<E@Ew2#Hga una búsqueda de computadores y luego haga clic en 'instalar' para afectar los paquetes activados.
También puede afectar un paquete a un computador utilizando la opción 'personalizar' de la página de detalles del computador deseado
. 553 Clave Windows 554 Monitor: serial 555 Monitor: fabricante 556 Monitor: identificador 557 Dominiousuario 558 Paquetes afectados 559 Este archivo no es .ocs 560 Al servidor 561 Desconocido (paquete borrado) 562 Redes que tienen uid: 563 Fabricante 564 Frecuencia de auto-ejecución del agente 565 Servidor usado para inventarios locales 567 Latencia de ipdiscover 568 RAM(MB) 569 CPU(MHz) 570 Ayuda 571 Validar todos 572 Éxito 573 Errores 574 Estadísticas 575 Sin afectar no notificados 576 Ipdiscover personalizado 577 Nombre del grupo 580 Todos los computadores (replay) 581 Todos los computadores (en caché) 582 y 583 Grupos 584 Para la consulta 585 Para la selección 586 Nuevo grupo 587 Nuevo grupo estático 588 Sobreescribir grupo 589 adicionar estáticamente al grupo 590 Inicializar estado 591 Incluir estáticamente 592 Excluir estáticamente 593 Fecha de creación 594 Caché generado el 595 GRUPO ESTÁTICO 596 INCLUIDO DINÁMICAMENTE 597 EXCLUIDO ESTÁTICAMENTE 598 Incluir 599 Inicializar 600 Excluir 601 Afectación masiva 602 Necesita enviar un archivo 603 Ningún computador encontrado, por favor revise su archivo 604 computador(es) exitosamente afectado(s) 605 computador(es) fallido(s) 606 Archivo de computadores 607 Grupo 608 creado 609 sobreescrito 610 ESTáTICAMENTE INCLUIDO 611 SIN CACHE 612 ESTÁTICO 613 DINÁMICO 614 EXCLUIDO 615 Consulta 616 Perímetro de usuario 617 Nuevo 618 Perímetro 619 Usuario local 620 Ningún computador en su perímetro. 621 El grupo no fue creado, el nombre ya está en uso 622 En caché 623 La información que intenta acceder no existe 624 ¿Realmente desea borrar el grupo? 625 Habilitar este cambio 626 Deshabilitar este cambio 627 Al menos uno de los campos está vacío... No se hace la Actualización. 628 Servidores 629 Nuevo grupo de servidores de redistribución 630 Un grupo de servidores existentes 631 Adicionar a 632 Colapsar (crush) 633 Administración de grupos de servidores 634 Acción deseada 635 Nuevo nombre 637 Reemplazar 638 EL NOMBRE DEL GRUPO NO PUEDE ESTAR VACÍO 639 ESTE SERVIDOR DE GRUPOS NO EXISTE 640 ¿Realmente desea borrar 641 Administración de servidores de redistribución 642 el grupo 643 Todos los computadores 644 esta máquina 645 DETALLE DE GRUPOS 646 URL 647 NÚMERO DE PUERTO 648 LISTA DE ALMACÉN (STORE) 649 AUTOMÁTICA 650 MANUAL 651 Grupo de servidores 652 Maquina(s) 653 Lista negra DE direcciones MAC 654 Introduzca una nueva dirección MAC para incluir en lista negra 655 Inserción realizada 656 Este dato ya existe en la lista 657 ¡¡¡Los campos en rojo tiene error!!! (campos vacíos o tamaño < 2) 658 la máquina no tiene servidores de redistribución.
Es necesario así afectar este paquete individualmente. 659 Los computadores ya tienen este paquete instalado remotamente. El estado de paquete para estos equipos es ahora 660 GRUPO DE SERVIDORES NO EXISTE 661 PAQUETES PARA SERVIDOR DE REDISTRIBUCIÓN 662 Reglas de afectación 663 PROBLEMA INTERNO 664 Acción efectuada 665 MÁQUINA NO SELECCIONADA. GRUPO DE SERVIDORES NO CREADO 666 Grupo de servidores hecho 667 PARA EL PAQUETE 668 ¿afectar con cual regla? 669 ATENCIÓN: hay duplicados de prioridad < br > Solo se mantendrá una regla! 670 Una regla ya tiene este nombre 672 ¡¡¡Esta regla no existe!!! 673 La administración de las reglas de afectación 674 NOMBRE DE LA REGLA 675 PRIORIDAD 676 VALOR DE MÁQUINA 677 OPERADOR 678 VALOR DEL SERVIDOR 679 NOMBRE 680 DOMINIO 681 USUARIO 682 para Adicionar una condición adicional 683 Validar la regla 684 Se debe cambiar el tamaño de los siguientes campos 685 Adicionar una regla 686 La condición 687 Usted no puede borrarlo. 688 ¡Los paquetes están afectados a este grupo! 689 ¡Los paquetes están afectados a este servidor! 690 Usted no puede borrar todas los computadores. 691 Valores genéricos: $IP$ y $NAME$ 692 Usted modifica TODOS ALL los valores de los servidores 693 Usted modifica los valores de los siguientes servidores 694 para encontrar los valores predeterminados, valide los campos libres 695 Modifique el grupo de servidroes 696 para Mostrar los paquetes activados para afectar en 697 una máquina 698 un grupo de servidores 699 ¿Está seguro que desea afectar este paquete en estos computadores? 700 Opciones de lista negra 701 Lista negra del número serial 702 Introduzca un nuevo número serial para colocar en lista negra 703 Listas negras 704 ¿Está seguro que desea colocar en lista negra 705 ¿Está seguro que desea quitar de la lista negra 706 Quitar de lista negra 707 este número serial 708 esta dirección mac 709 PROLOG_FREQ personalizado 710 Customized download 711 Taken into account modifications 712 Archivo de idioma 712 Archivo de idioma 713 ¿Está seguro que desea reemplazar este archivo de idioma? 714 Archivo de idioma de referencia 715 Seleccione el archivo de idioma a modificar 716 Actualizar archivo de idioma 717 Personalizado 718 Ignorar 719 (por segundo) 720 Tiempo de espera entre 2 ciclos de distribución 721 Tiempo de espera entre 2 fragmentos descargados 722 Tiempos de espera entre 2 periodos de distribución 723 prioridad máxima de paquetes descargados
(los paquetes de una prioridad más alta son ignorados) 724 Tiempo entre 2 contactos entre el agente y el servidor 725 (en la hora) 726 URI de servidores de redistribución ($IP y NAME$ son los valores genéricos) 727 Directorio de destino de los paquetes 728 Inventario 729 computadores 730 horas 731 Opción de registro en la bse de toda acción de inventarios. 732 milisegundo(s) 733 Inactivo 734 Archivos de inventario 735 Filtros 736 Habilitar la opción de grupos de computadores 737 Número aleatorio calculado en el rango definido. Diseñado para evitar el cómputo de muchos grupos en el mismo proceso 738 Especifique la validez de los grupos de computadores (predeterminado: calcular una vez al día - mire lapso (offset)) 739 Mejoras de seguridad futuras 740 Validez de un bloqueo de computador 741 Configurar el motor para actualizar el inventario respecto al valor CHECKSUM del agente (carga backend DB más bajo) 742 Hace que el motor considereun inventario como una transacción (menor concurrencia, mejor uso del disco) 743 Configurar motor para hacer una actualización diferencial de las secciones del inventario (a nivel de registro). Carga backend DB más bajo, carga de frontend más alto 744 Aceptar un inventario únicamente si lo solicita el servidor(rechazar inventarios "forzados") 745 Especifique cuando el motor limpiará las estructuras de caché del inventario 746 Especifique la diferencia mínima para reemplazar un agente ipdiscover 747 Deshabilitar el tiempo antes de una primera elección (no recomendado) 748 Habilitar grupos para ipdiscover (por ejemplo, para prevenir que algunos grupos sean agentes ipdiscover) 749 Use con ocsinventory-local, habilitar la opción multi entidades 750 Generar ya sea archivo comprimido o texto XML limpio 751 Especifique si desea hacer seguimiento de todos los inventarios entre sincronizaciones con el servidor de más alto nivel 752 Ruta del directorio de archivos ocs (debe tener permiso de escritura) 753 Habilitar filtros stack prolog 754 Habilitar el sistema de filtros básicos para algunas cosas "al vuelo" 755 Habilitar el filtro flooding de inventarios. Se permite una dirección ip dedicada para enviar un computador nuevo únicamente una vez en este periodo 756 Definición de periodo para INVENTORY_FILTER_FLOOD_IP 757 Habilitar filtro stack para inventarios 758 Especifique si desea hacer seguimiento a paquetes afectados para un grupo a nivel de computadores 759 debe ser mayor o igual a 760 Servicio web 761 Habilitar/deshabilitar servicio soap 762 Tamaño de la página de resultados (tenga en cuenta los factores de desempeño) 763 Incluir el archivo de sus propios módulos 764 Las opciones de abajo no son parametrizables vía GUI.
(consulte ocsinventory-server.conf) 765 todos los programas 766 NINGÚN RESULTADO 767 TENGA CUIDADO: RESULTADO CON FILTRO 768 Número de registros 769 Transferencia hecha 770 ACTUALIZACIÓN DE 771 Esta categoría ya existe 772 El nombre de la categoría no puede ser nula 773 Debe seleccionar el nombre de la categoría 774 Trae de hacer una transferencia de esta categoría hace la misma categoría 775 Directorio de creación de paquetes 776 Directorio de interés en cache de análisis de ipdiscover 777 Validez de una sesión 778 GRUPOS DE TRABAJO diferentes 779 TAG diferentes 780 IPSUBNET diferentes 781 Equipos con distribución de software pendiente 782 Equipos con paquetes con error 783 Número de SO diferentes 784 Versiones de agentes 785 Procesadores diferentes 786 Resoluciones diferentes 787 Computadores con procesador >= 788 Computadores con procesador =< 789 Computadores con procesador entre 790 Computadores con RAM >= 791 Computadores con RAM =< 792 Computadores con RAM entre 793 Computadores en la base 794 Computadores vistos 795 Computadores que contactaron al servidor hoy 796 Número de computadores inventariados hoy 797 Computadores no vistos desde hace más de 798 ACTIVIDAD 799 HARDWARE 800 OTROS 801 No mostrar este campo 802 Mostrar este campo 803 Límite de tiempo desde que el equipo no contacta al servidor 804 Velocidad mínima del procesador 805 Velocidad máxima del procesador 806 Cantidad de RAM mínima 807 Cantidad de RAM máxima 808 Distribución 809 GRUPOS ESTÁTICOS 810 GRUPOS DINÁMICOS 811 ¿Está seguro de que quiere modificar la visibilidad del grupo 812 El software en 0 está presente en el CACHE pero no hay más settled en los equipos.
No se puede colocar en una categoría de diccionario 813 número de discos duro con espacio libre > 814 número de discos duro con espacio libre < 815 número de discos duro con tamaño restante entre 816 tamaño de disco duro máximo restante 817 tamaño de disco duro mínimo restante 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volumn Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one redistribution group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection? 901 Action on the query result 902 Action on the result of selection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect package 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 You cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The network ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 To come back to a standard state, you will have to click on the icon e which is at the right top of the interface 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Software search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your e-mail is not valid 1056 Contact your OCS-NG administrator 1057 Failed to connect to mailserver 1058 no e-mail is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' function is not activate. 1075 Activate this functionality to use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of note 1127 Author of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on redistribution group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profil 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profil (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 The install.php exists in ocsreports directory 2021 Your GUI logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default sql login/password is activate on your database: 2025 Change your password for ocs login in MySQL 2026 The default login/password is activate on OCS GUI 2027 Change admin password on OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forgot to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/offocsinventory-server-2.2+dfsg/ocsreports/plugins/language/turkish/000077500000000000000000000000001303466605000255055ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/turkish/turkish.png000077500000000000000000000301021303466605000277030ustar00rootroot00000000000000PNG  IHDRtIME  % pHYs  ~gAMA a/IDATx} \Wu]R[oڬ]B-ɖ&1lBk$LɄ6$dBB OB&@ 0dMزe[jV{n9R[.3RWwVwzw= ݵq%)P_z 8(]P@_ tBA}   B+.W(]P@_ tBA}   B+.W(]P@_ tBA}   B+.W(]P@_ tBA}  Dϋ8iRf59J%7DXb18-tNteYF:j,10c]HmjD Od;kLL(#\1LY+ufc(|tZp J)0PxSeX]jE.\BZƆjy(e@L45jSs0d>kEdHX}KŬU:$\ֆKuF.IeC'@l!,'.3kLL5R ο~U-dRZ +hi|]6h[`d[]GwQ}ߡu Į 'datJl [pvjoC^_3 ЖZā`&TJ ^0n_TJlFP'.P4X9rr4y"KI-r聩-mwi_T %M. (ɕL^aZ1:Oe㶙?JW  .% [g5 yK[K}KPQ|~RnƔ}hw+_WXfx na !JF:`i"ΨFϖ4l_:tՃϾ>ܰ@G[d`&Hx %nG: . ( XUw=0O}-SXb)R p<2ӶחƂ!D\%hTw6=w㪗>%EKIuy+ 4TDlLra#+ xt#c|y=9-7 Ǭ59 A'OtCw3Ig>;L(A"S;BXV6&RFq-yT1r˯bP݂dm.(J _"91gg|am`,c۳Ղ`q[8m){7/}irHf 1̺ ;B;VV:p!w:=ܤ|<l&5e&;JP=1j55*kQtkp?zHd>n4qOCC5+ސڵyRb7 HhUƃ^_3ƦQy=]'TdX@e$Ye{y/$եwv>ЁXFIW >A99;ة;bIƁeK ŋYK+kVE#$(Ë  !$lnWL nL0J&7q/yGh\Й]y7ٟǗlMjtг1:`+ <#Vze0$6`ib : $b^mѶѶKIZ2Niwͷ#Sb*8/vЎrj4pV#lu׭I}&A瑱G4^3 6Xfwk[{v ɔ 8rp.W&.Ќ-AZke0 X\^vK i${O}4TжەTK{F`HtX&=43xuvb1nXF!pL4&ASN5؇M1 ~&„!^o)Kp'0f 2(Am>Nr/Olѯ02Sܑ}GG>pPpYds;R{x5ts~9x .zWqF}`fm1[{''FQi- "h㫨L :˘ä +Q8J3F2AR\%" xvNyoCbÚG︷$TP0 ;BSƺIUs?~[)`&xFèj]Dpw/fʢH!lOE@0@9hO^v٤hh!\H]hmxn'(^ɸјv3FzkPbFĔIKsIXx( C%@#+"4Ӆ]S~t*~3pw}{ol~keYIZљI!mK[?p|VXM8 Dy; =ոq`iFuH]9ܿ||4 Dc?XHF01RFҜ?}ӷNCiU|cO/]Tь5훾UY^WtځA!L8u +9(Ü$֖iO*y`ǬQ#pHS5 jp݀V>r;~ޝ2Oc# y+Ӊw^@F_÷lLa(̴\aO9zFù4p)IL{7$r5%@. BBdl%zw7i1X3Հ:h ۱l8pbĖD:|w;ij0 8<`J VJ\0E ~vIç\/ߍ~WL-{\V60QҩCDk%a30oNyQ>fM;,︷>(V:nuI5Y gaҰaI,Mi0|Û_V!K1S.ktD_w6>0iu0 *ƅ`M6}O,Kڜ'Lp5/ג$ 羼׫ PO5zFhcI 0ډ粫^ @fbРoq&8CGÂ( Pjpc`?JNTxVs1 8d;<]<}3B*[fEɒj׾oGt o al͗7ZLX#Ә͔6i)t6:ZBÆT E8Y6 ?=hm)p*ѳ Z,$aȳ15sVcuڂ]Ur6V3j˵~BQ+r6 VRMh֜/x2G-8aY0yhf,#i8aÒUz4Wh &u&Gc3Bs(g3VeK^2dkDO|} mk3cq|#37a:;Mn._b}dU$V91? `4=;ap]fIgo/Xp!'jp2eSĄ k Boq\^׺gͦÊ1ٜoOLܲv+%֯~61Nìp] Ǎ}On~ea60fS'Ȩl$UwmFڴI<鼸N`\I9׽>ӈN"XPu\v!-4<ďuIjNcB-.em'P9 KVqV5[{٤٢UiQYf%Wmx3.obe}\`Nf3Bwe M;iC`y/Wϼ}nYOf5WKWlu_eN>Y5e臭c.$nAs*\VGNs3NR31wٻWk‡ XkN>hNpr 7}9䗮.&/Ԇ.g84}ߣweG6OzS8n_1wG 6|*bC;ħjxVw}Nj؊pTA3PZQ!pax,tjK&4XߜL`CmȖxiN\E+Jh1deY.X㇌U!/)gЮ4J1HM*- W=r Zs"-QZ[p]eBu *wqv[8 :'&6+UPCh_,SiK"ZÙuMlנxo?9fxM8F8jCXc]<Qxq>VHk]3#$siA)jǙד[ZQͶ.L]0Z;˨ T4me>cL[&9뗜wQmwrYw DD ~6G8NaԆ>'3VY욍VLz\#0g.rڷBDd_ЅcqBS@ɀIA-Qښ蜍s6r8g\Z!Xg ^'~DZ;~_M$Og 4L3X<;埗*lf")_(֬B1YSq %E,/+[zVl֓%A|L/mإ`81 ʝgsl}rErDʠmupJt{q }B|,Rl@X]&hu&,Tk;ySxixp|* ֭捥5I ıêAjChZH)'esGXn(p.0,4UFrǟ"̑q$rte˓l>UHnfb|XR7i8Pࢡ_~AxզO:8θ "PIt}F;4吇YDgfNYD#}I  ʩA! r`m嚱!Ho00_ Wo}׼NX:[?~rr aHzq7Y{=KP~uvڵ-FITv3p]sN$T l^M;nw  f$naZ SSErz5y'4misе[kj@ n=4'j.Q>i1κ0m- WrSYtNhn&GkJm G7n ׮KfZ fXC3 ;).K ;@1<)b$ W#{E1Pd#kr$>9\vU3u b/I>((d 38'L/ >sAΣ(<o2ں.^fkVDn]]"[ A|.9& ђKt$C ߐjV. *g\otU@a$4}8. 'Pe{i93;agHk Iښ쾻yIC']pldX&iMPXaE C-A,Skn%͙6hV,Dž{t9Z}k[k j=i pGʠ#BSIr0f%iBXP?F 'lۃ>9Xh\{G1y ذr ϰԤ^9㍚b"<? OBqSK.SFUw3s5Ao|OR!ſr[.1M gk;{ӫePSȉNrZ)ET)ݷ$ķ*Yv^7m <.Op< FT~da X+}Bs]:ĉ!a&@^6 4K ,2fx]*M;v~ukz}sJЇ6vY1}5YW]mH4zLVN]$wg2E1-i?կDEݎWah-V^10f5?k{P뻷:K]~7T<ٮ6TN8 pf>{agx {P Y̺OL)q ^Y&ROcѻf/)V>v!|0&і̓^k'0+p^ `'4,6T&}ߵv(uv;)fmf.d4=B$#. o'l4hPQ33cԞD*.I>MVD-y`sb:B΅LWTf hF}T|O(3A|*Q<$hK+t eI^R?-56[ַo h8co>1A h̀}@ᘄ Ν!!3X(;~!)ةёÛo}WJ@3 lу ,oru:#)9sd<FA:WpVc P* 4 叨~"'IRĶ~0bܖs2 B=#4<Dk1dsa/lyF6"aȳVji書x\iG) XH,?b*ߜ]L>7rx[Uc Xӊ9a dl>L\yMg(4}A2EA 6n~MaN{@[d8޲z[Gx{Q.{I쒴`oX;BS [hۆ׈r8s\tqn5*:;ߗf=P^b3=1yXƙ& Jd90V>j8^b@(0$ٜg\u Ěf}0PtwY+7 u dt=vhrby7Ÿ+=|.{. :2)jO{r{pGSߎ\Y7 '.1 2Kfhٓ.-Qڏ1 }]}MD:S6rYX`t/${I";n;z-O`> O+̅ ;`OJM4pS؞w й~顠\-3x˞%|1 = vxfL @8ㅆ>)z9RP}t9[pN{S gkbU^#XpG<ߠt+:x`=4&K$`7Q`D,~hKeoqxO8 "tAgɪ 3&3##X819.`onE/]f% h,^EQ9'l^hÝN@D3t1?]`?]-] L; Qo)u)VG=cK(r@>EIʙ%dBoơ-kq}fN{Mm\W:ܤS$*TΌŋW{^z~JyO8w۸SEˈi|W?]vg;Brv5v?޷rtpK?Wsؼ3%[~O V,ʱzRoH 2`ީ1Q`pX?7ݱΑ%#y؅8k8EI(Vd3#j"VY.} rV K0{fMS?niaȕOjڤ 6:e8^PiޢWa[1܅r>XtX \7W~~Cvي@"d q1 6lmohF9›J#N"$nHo\Wב׾ڬ>782?3[!iFuI-|ZAwm\(e>j2rEr <e|e8,$w[;TcnF< fu,Zk͗Ax)7T.t+7 xhßk'(iDK{F`0 t x}qM|*ZgAdPfSB;!0|/?ڂܼ̏s{́W1WRN_iD*C!qĶ󢋟Hp dLfV][P͂f19ЏzsRɚf0PZ7T_kdp Vu|2>^ŝ8xwڜ8Z?4$ NHQe.HTЈX\]+ׯKcҔ! 2ڭ _xMЮr\Fr{ӍyG>x!<nӘ^nAjE@ өos 1gw>az ņ2VRXd˖/ya^-]F O]Wc Y/uC *OM>ˡOԝV @MttMxlta Џ ;\'/>yK~BrRUoL\zg\3pݵ-<dv'SG^S2ysXA_;=a:o|c7h1j4gOkBr#s,f"jr"ELi<7,6o"#,.c+|ڿi݅VO]rз%V*iU3kLl~#}>E$ԙ\sZ#Ziǐhol|fY&3k,fM-V*AOm8;0RLC| I-oWo|s򃻲D!D e'G@awaN^_3ЏUMbU TA!;/ZXF1ߡ6-抢VrKPr}#\iGDaj8؈,w|oS`>bG"u\8~:Ϋqls8S9͋/ CSP@_ tBA}   B+.W(]P@_ tBA}   B+.W(]P@_ tBA}   B+.W(]P@_ tI`EIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/language/turkish/turkish.txt000077500000000000000000001162141303466605000277470ustar00rootroot000000000000002 Bütün Bilgiyarlar 3 Bilgisayar ve Bilgisayar yazýlýmý... 5 Sorumluluðum Altýndaki Birlik 9 Arama ve Kriterler 12 Etki deðeri 13 Gönder 17 Temsilci 18 Revision 19 Yazýlým versiyonu 20 Yazýlým 23 Bilgisayar 24 Kullanýcý 25 Ýþletim sistemi 26 Bellek 27 Bellek Hýzý (MHz) 28 Bilgisayar Sayýsý 30 Arama 31 Bir parametre 32 Seçim 33 Alan 34 IP Adresi 35 Bilgisayar Adý 36 Seri Numarasý 41 Yenile 42 Sonuç yok 43 Ana Mönü 45 Boþ yer 46 Son envanter 48 Bilgisayar ayrýntýsý 49 Adý 50 Deðiþtir 51 Yorumlar 53 Taným 54 Ýþlemci 55 Sayý 56 Yönetimsel Bilgi 61 Video Kartý 62 Önerilen 63 Depo 64 Yapýmcý 65 Model 66 Tür 67 Disk Boyutu 69 Editör 70 Ata 79 Yazýcý(s) 80 Baþlýk 81 Konum 82 Að(s) 83 Kapasite 84 Arayüz 85 Mektup 86 Sistem Dosyalarý 87 Toplam 88 Boþ 90 Sonuç(s) 91 Giriþ Aleti 92 Disk(s) 93 Kontrol(s) 94 Slot numarasý 95 MAC adresi 96 Güvenli 97 Monitör(s) 98 Dikkat,Sadece 8 seçim hakkýnýz var ! 99 Bilgisayar ayrýntýlarý 103 Güncelle 107 Biçim 108 Kayýt Talebi 111 Pencere izni 113 Ýptal 114 Kayýt 115 Güncelle 116 Ekle 117 Kayýt 119 Silmek istediðinizden eminmisiniz ID n° 122 sil 129 Eþitler 130 Baþka 134 Veri tabanýna yeni bir dosya ekle 135 Dikkat, Dosyayý tamamen siliyorsunuz! 136 Ýndir 137 Dosya 168 Bu biçimlendirme dosyasý geçersiz (dosya zip, pl veya unix binary olmalý) 170 Ayný dosya zaten var ! 171 Dosyayý Sil 172 Bu dosya hatalý! 173 Temele eklenmedi 174 Güvenlik 175 Çoðalt 176 Ips 177 Birleþtirmede gereðinden fazla bilgisayar var. 178 Etiket/ Number of PC repartition 180 Kullanýcý kayýtlý deðil 182 Bilgisayarlarýn belirli bir etiketi var 183 Ýndir 184 Bu dosya içermemekte\"Deðiþik versiyon\" 185 Versin 1 186 Bu dosya balkon dosya içermemekte 187 Bu dosya geçerli sýkýþtýrma dosyasý deðil 188 Geri 189 En iki bilgisayar seçmelisiniz 190 Rapor bilgisi: 191 Silindi 192 Gereksiz özet 193 Sunucu Adý + Seri numarasý 194 Sunucu Adý + Mac adresi 195 Mac adresi+ Seri numarasý 196 Yanlýzca sunucu adý 197 yanlýzca serinumarasý 198 Yanlýzca mac adresi 199 Gereksiz 200 Uygun görülen artýklardaki azalma miktarý 201 Küçükler 202 Büyükler 203 Arasýnda 204 Dýþarda 205 Kullanýlabilir 206 Kaydet 207 Að Geçidi 208 Maske 209 BIOS Versiyon 210 BIOS Tarihi 211 Sistem kütüðü 212 Anahtar Adý 213 Anahtar Deðeri 214 Bu sayfayý yazdýr 215 Þifre Hatalý 217 Þifre 218 Acenta Verisoyu 219 uninventoried Að arayüzü 220 Silindi 221 IP Toplantý Bilgisayarlarý 222 Uyarý! Seçili tüm bilgisayarlar tek bir bilgisayara doðru birleþtiriliyor ! Eminmisiniz ? 223 Danýþma 224 Deðer 225 Yönetici Bilgisi 226 Rapor bilgisi tablosu baþarýyla silindi 227 sütünü silmek istediðinizden eminmisiniz? 228 Yeni bir yönetel bilgi giriþi 229 Yazý(255) 230 Tamsayý 231 Gerçek 232 Tarih 233 Güncel bilgi 234 Baþarýyla eklendi 235 Kullanýcýlar 236 Deðiþtire geç 237 Yeni þifre 238 Doðrulama 239 Her bir alan doldu 240 Þifreniz farklý 241 Þifreniz baþarýyla deðiþtirildi 242 Yönetici 243 Kullanýcý 244 Yeni Bir kullanýcý 245 Baþarýyla silindi 246 Kullanýcýyý silmek istediðinizden eminmisiniz? 247 MySql Oturumu aç 248 MySql Þifresi 249 MySql baðlantýsý kurulmadý. Lütfen geçerli oturumu giriþini yapýnýz/Devam. 250 MySql Sunucu Adý 251 Oturum Kapat 252 Adý (seçiminiz) 253 Sistem kütüðü 254 Anahtar yolu (Ex: yazýlým\Mozilla) 255 Anahtar adý okunacak (* tamamý) 256 seçim 257 Sistem kütüðü anahtarý 258 Sistem kütüðü anahtarý deðeri 259 Hata ,Bilgi girilemedi (Özel karakter kullanmayýnýz) 260 Label file modification ok 261 Label file deleted 262 Type in a label 263 Dosya etiketi biçimi 264 Dosya etiketi yok 265 Herhangi biri 266 Geçersiz tarih 267 dd/mm/yyyy 268 Hýz 269 %m/%d/%Y 270 Modem(s) 271 Yarýk(s) 272 Baðlama noktasý(s) 273 BIOS 274 Ýþletim sistemi adý 275 Ýþletim sistemi Versiyonu 276 Tümdevre ailesi 277 Versiyon 278 sürücü 279 Baðlama noktasý 280 MIB tipi 281 DHCP IP 282 Að Geçidi 283 Amaç 284 BIOS Yapýmcýsý 285 Deðiþik bir parametre seçiniz 286 Hizmet paketi 287 Yerele getir 288 Yerele ithal et 289 Að danýþmaný 290 Ip sorgusu 291 Uzman modu 292 Ekle/ að aygýtý sil 293 að aygýtý tipi 294 Alt að isimleri 295 Düzelte týkla 296 Uid 297 Adres defterine yazýlmadý 298 Bütün alanlar dolu 299 Geçersiz ip adresi (olmalý: x.x.x.x) 300 Geçersiz mask: olmalý: x.x.x.x or xx (xx<32) 301 Aða girildi 302 Að silindi 303 Alt að ekle 304 Að adý 305 Uid 306 Alt að listesi 307 Yeni bir tip ekle 308 Tip adý 309 Að aygýtý tipi 310 Ip sayýsý daha az olmalý 311 Sunucular 312 IpDis 313 Að geçidi bilgisayarlarý 314 IpDiscover Að geçidi bilgisayarlarý 315 Saldýran bilgisayarlar 316 Alt að 317 Analiz 318 DNS Adý 319 að analiz sonucu 320 bu analiz zaten bitti 321 gizli dosyalarý görmek istermisiniz ? 322 Gizli Dosyalar için 323 Oluþtur 324 Sunucu deðerlendir 325 Boþ 326 Meske tipi yok 327 Bilgisayar detaylarý 328 Bulundu 329 Stok 330 NetBIOS adý 331 Að numarasý 332 Lütfen bekleyiniz... 333 Yenir br að aygýtý ekle 334 Að aygýtý listesi 335 Aygýt tipi 336 aygýt tanýmý 337 Bu program hiçbir þeye gönderilemedi 338 Sýnýrlý mod 339 Bulmanýz gereken -util.pl (Linux only) Uzman modu için 340 Göster 341 Baþlatýlamadý, ayarlarýnýzý düzgün yapmalýsýnýz 342 Diðer kullancýlarý kök dizine doðru bir þekilde yazmanýz gerekiyor. 344 Hata 345 Bu analiz þu anda çalýþýyor, Lütfen bir kaç saniye sonra tekrar deneyniz 346 Önceki 347 Sonraki 348 Pencere kullanýcýsý 349 Sütün ekle 350 CPU tipi 351 CPU mumarasý 352 Son 353 Nitelik 354 Baðlýlýk 355 Þirket 356 sahip 357 Kullanýcý acentasý 358 Joker: ? (Bir karakter), * (Bir kaç karakter) 359 Monitör seri 360 Yapým (haftasý/yýlý) 362 Að 363 Zaten var 364 Bulundu 365 Saldýrý bulundu 366 Kimlik saptandý 367 Að aygýtý 368 Að kapalý 369 sunuldu 370 Yayýlma 371 Bütün bilgisayarlar 372 Bilgisayar seçimi 373 Kayýtlý kullanýcý 374 Kayýtlý Kurum 375 OCS NG Acenta versiyonu 376 Bilgisayar kapalý. Lütfen bir kaç saniye sonra tekrar deneyiniz. 377 Ýþlemci hýzý (Mhz) 380 Sözlük 381 Sayý 382 Yazýlým adý 383 Sayfa 384 Tümünü Taþý 385 Yeni kategori 386 Veya 387 Kategori bulundu 388 Kategori 389 Hiç 390 sölzük kategorisi 391 Kategori adý 392 sil 393 Ara 394 Arama Kategorisi 395 Yazýlýmý her yerde ara 396 Yeniden baþlat 397 Kategoriye git 398 Kategori listesi 410 Tamamen 411 Alanlar sadece Sayýlarý kapsamakta ! 412 Seçilebilir/Seçilemez the Sistem kütüðü anahtarý geçerli 413 Seçilebilir/Seçilemez Otomatik güncelleme geçerli 414 Seçilebilir/Seçilemez otomatik yayýlma geçerli 415 Seçilebilir/Seçilemez the deletion logging functionality (needed by GLPI). 416 Seçilebilir/Seçilemez the logging functionality. 417 Seçilebilir/Seçilemez the automatic software distribution functionality. 418 Seçilebilir/Seçilemez the differentiate inventories functionality. 419 Maximum number of day before an ipdiscover computer is replaced. 420 Automatic software distribution: see documentation. 421 Automatic software distribution: see documentation. 422 Automatic software distribution: see documentation. 423 Automatic software distribution: see documentation. (Packages with a higher or equals priority won't be downloaded anymore). 424 Maximum number of days before a package to be downloaded on a computer become obsolete. 425 Max number of computers per gateway retrieving IP on the network. 426 Specify the frequency (days) of inventories. (0: inventory at each login. -1: no inventory) 427 Defines criteria that must be equals for two computers to be automatically merged. 428 Mevzilendir 429 Frekans 430 Küme yýðýný 431 Etkinleþtir 432 Non notified 433 Affect 434 paket kuruldu 435 Yeni paket oluþtur 436 Dosya açýlmýyor 437 Paketiniz baþarýlý bir þekilde dizine oluþturuldu 438 Yei paket oluþtur 439 Protokol 440 Öncelik 441 Algoritma 442 Kodlayýcý 443 Hareket 444 Komut 445 yol 446 Dosya adý 447 User notifications 448 Kullancýyý uyar 449 Yazý 450 Geri sayým 451 Kullanýcý durduruldu 452 Kullanýcý ertelendi 453 Installation completion need user action 454 Hayýr 455 Evet 456 Yürüt 457 Stok 458 Baþlat 459 Geri sayýlacak sayý 460 Unique identifier 461 Digest 462 Toplam boyut 463 Parça boyutu (1 KB min) 464 Parça numarasý 465 Etkin paket 466 Uyarý: Bilgi dosyasý bulunamadý 467 Uyarý: Dosya parçasý bulunamadý 468 Bu paketi aktif hale getirmek istediðinizden eminmisiniz? 469 Paket aktif, Sanal yapýlsýnmý? 470 Https url 471 Parça url 472 Hata: Parça silinmedi 473 Zaman izni numarasý 474 Zaman izni 10 dan uzun 475 Zaman izni 476 Veya Paketi elle etiki hale getir 477 Paketi etkile 478 Bilgisayar(lar) 479 Bilgisayar seçilmedi 480 Parçalar 481 Aktif paketler 482 Uyarý Bildiri 483 Onay Baþarýlý 484 Özel frakansý etkile 485 Herzaman Bul 486 Asla Bulma 487 Özel 488 Varsayýlan 489 Harekete izin ver 490 Harekete Asla izin verme 491 Harekete herzaman izin ver aðda 492 ELECTED IpDiscover of network 493 Default (can be elected) 494 Custom inventory frequency 495 Inventoried every 496 Gün(s) 497 Varsayýlan, Kullanýcý parametre frekansý. 498 Paket 499 Sunucu 500 Masa üstü uygulamasý 501 Paket ekle 502 Seçim 503 Güç seçimi 504 Seçim yok 505 Seçimler 506 seçimler yok 507 Al 508 Alma 509 Biraz 510 Paket yok 511 Ýkinci 512 Yayýlma 513 Oluþturmak 514 Çalýþtýr 515 Çalýþtýrýldý 516 KB 517 Bu seçim sadece sahte birbilgisayarda yapýlýr. 518 Güç keþfi 519 Bilgisayar zaten að için seçilmiþ. 520 Bilgisayar zaten zorunlu að için bulundu 521 Bilgisayar zaten zorunlu seçimde 522 Standart bilgisayar 523 Eski duruma geri dön 524 Birdaha tekrar etkileme 525 Eminmisiniz? 526 Sahte bilgisayar yok 527 Ocak 528 Þubat 529 Nisan 531 Mayýs 532 Haziran 533 Temmuz 534 Aðustos 535 Eylül 536 Ekim 537 Kasým 538 Aralýk 539 Pazar 540 Pazartesi 541 Salý 542 Çarþamba 543 Perþembe 544 Cuma 545 Cumartesi 546 Durum 547 Hepsi 548 Tümü ama baþarýlý 549 Dosya(Ekle, client bilgisayara) 550 File (Zorunlu deðil, komutu geçmiþe"Uygula" ) 551 Bu paketin ismi zaten var 552 Bilgisayar aramanýz gerekiyor, ve aktivasyon paketinin mevkisini týklayýn
Hem bir bilgisara hemde bir pakete etki ediyor
. 553 Pencere anahtarý 557 Userdomain 558 Affected packages 559 This file is not .ocs 560 To server 561 Unknown (deleted package) 562 Networks having uid: 563 Manufacturer 564 Agent auto-launching frequency 565 Address used for local inventories 567 Ipdiscover latency 568 RAM(MB) 569 CPU(MHz) 570 Help 571 Validate all 572 Success 573 Errors 574 Stats 575 Unaffect not notified 576 Customized ipdiscover 577 Group name 580 All computers (replay) 581 All computers (cached) 582 and 583 Groups 584 For the request 585 For selection 586 New group 587 New static group 588 Overwrite group 589 statically add to group 590 Reset state 591 Include statically 592 Exclude statically 593 Creation date 594 Cache generated on 595 STATIC GROUP 596 DYNAMICALLY INCLUDED 597 STATICALLY EXCLUDED 598 Include 599 Reset 600 Exclude 601 Mass affectation 602 You need to send a file 603 No computer found, please check your file 604 computer(s) successfully affected(s) 605 computer(s) failed 606 Computers file 607 Group 608 created 609 overwritten 610 STATICALLY INCLUDED 611 NO CACHE 612 STATIC 613 DYNAMIC 614 EXCLUDED 615 Query 616 Perimeter of user 617 New 618 Perimeter 619 Local user 620 No computer in your perimeter. 621 The group was not created. Its name is already in use 622 Cached 623 The information you are trying to access does not exist 624 Do you really want to delete group 625 Enable this alteration 626 Disable this alteration 627 At least one of the fields is empty... Not made Update. 628 Servers 629 New group of servers of redistribution 630 A group of existing servers 631 Add to 632 Crush 633 Management groups servers 634 Wished action 635 New name 637 Replace 638 THE GROUP'S NAME CAN'T BE EMPTY 639 THIS GROUP'S SERVER NOT EXIST 640 Do you really want to delete 641 Management of the redistribution servers 642 the group 643 All machine 644 this machine 645 GROUP DETAIL 646 URL 647 PORT NUMBER 648 REPERTOIRE STORE 649 AUTOMATIC 650 MANUAL 651 Servers group 652 Machine(s) 653 Blacklist MAC address 654 Enter a new MAC address for blacklist 655 Insertion made 656 This datum already exists in the list 657 Fields in red are in error!!! (Empty fields or size < 2) 658 machine don't have redistribution servers.
It is thus necessary to affect this package individually. 659 Machines already have this teledeploy package. This package's statut for these machines is now 660 GROUP OF SERVEUR NOT EXIST 661 PACKAGES FOR SERVER OF REDISTRIBUTION 662 Rules of affectation 663 INTERNES PROBLEM 664 Action made 665 NO SELECTED MACHINE. GROUP OF SERVER NOT CREATED 666 Group of server made 667 FOR THE PACKAGE 668 to Affect with which rule? 669 ATTENTION: there are doubloons of priority < br > A single rule will be retained! 670 A rule already carries this name 672 This rule does not exist!!! 673 Administration of the rules of affectation 674 NAME OF THE RULE 675 PRIORITY 676 MACHINE VALUE 677 OPERATOR 678 SERVER VALUE 679 NAME 680 DOMAIN 681 USER 682 to Add a supplementary condition 683 Validate the rule 684 The following fields must be seized 685 Add a rule 686 The condition 687 You cannot delete it. 688 Packages are affected on this goupe! 689 Packages are affected on this server! 690 You cannot delete all the machines. 691 Generic Values: $IP$ and $NAME$ 692 You modify ALL the values of the servers 693 You modify the values of the following server: 694 to find the default values, validate the vacuous fields 695 You modify the group of servers 696 to Show packages activated to affect on 697 a machine 698 a group of server 699 Are you sure to want to affect this package in these machines? 700 Blacklist choices 701 Blacklist of serial number 702 Enter a new serial number to blacklister 703 Blacklist 704 Are you sure to want to blacklister 705 Are you sure to want to unblacklister 706 Unblacklister 707 this serial number 708 this mac address 709 Customized PROLOG_FREQ 710 Customized download 711 Taken into account modifications 712 Language file 712 Language file 713 Are you sure to replace this language file 714 Reference language file 715 Choose the language file to modify 716 Update the language file 717 customized 718 Ignore 719 (per second) 720 Waiting time between 2 cycles of deployment 721 Waiting time between 2 downloaded fragments 722 Waiting times between 2 periods of deployment 723 maximum Priority of the downloaded packages
(The packages of a superior priority are ignored) 724 Time between 2 contacting between the agent and the server 725 (in the hour) 726 URI of the servers of redistribution ($IP and NAME$ are the generic values) 727 Directory of destination of packages. 728 Inventory 729 computers 730 hours 731 Feature of appointed on the base to every section of inventory. 732 milisecond(s) 733 Inactive 734 Inventory files 735 Filters 736 Enable the computer's groups feature 737 Random number computed in the defined range. Designed to avoid computing many groups in the same process 738 Specify the validity of computer's groups (default: compute it once a day - see offset) 739 Futur security improvements 740 Validity of a computer's lock 741 Configure engine to update inventory regarding to CHECKSUM agent value (lower DB backend load) 742 Make engine consider an inventory as a transaction (lower concurency, better disk usage) 743 Configure engine to make a differential update of inventory sections (row level). Lower DB backend load, higher frontend load 744 Accept an inventory only if required by server ( Refuse "forced" inventory) 745 Specify when the engine will clean the inventory cache structures 746 Specify the minimal difference to replace an ipdiscover agent 747 Disable the time before a first election (not recommended) 748 Enable groups for ipdiscover (for example, you might want to prevent some groups to be ipdiscover agents) 749 Use with ocsinventory-local, enable the multi entities feature 750 Generate either compressed file or clear XML text 751 Specify if you want to keep trace of all inventory between to synchronisation with the higher level server 752 Path to ocs files directory (must be writeable) 753 Enable prolog filter stack 754 Enable core filter system to modify some things "on the fly" 755 Enable inventory flooding filter. A dedicated ipaddress ia allowed to send a new computer only once in this period 756 Period definition for INVENTORY_FILTER_FLOOD_IP 757 Enable inventory filter stack 758 Specify if you want to track packages affected to a group on computer's level 759 Must be superior or egal in 760 Webservice 761 Enable/Disable the soap service 762 Result page size (be aware of performances issues) 763 Include file of your own modules 764 Options below are not settable by GUI.
(see ocsinventory-server.conf) 765 All softwares 766 NO RESULT 767 BE CAREFUL: RESULT WITH FILTER 768 Number of recording 769 Tranfer Made 770 UPDATE OF 771 This category already exists 772 The category's name can't be null 773 You must select category's name 774 You try to make a transfer of the category towards the same category 775 Directory of creation of packages 776 Directory of stake in cache of the analyses of ipdiscover 777 Validity of a session 778 Number of different WORKGROUP 779 Different TAG 780 Different IPSUBNET 781 Machines having a software deployement pending 782 Machines having a package in error 783 Number of different OS 784 Different agent 785 Different processors 786 Different resolutions 787 Machines with a processor >= 788 Machines with a processor =< 789 Machines with a processor between 790 Machines with RAM >= 791 Machines with RAM =< 792 Machines with RAM between 793 Machines in base 794 Seen machines 795 Machines contact server today 796 Number of inventory machine today 797 Machines not see since more of 798 ACTIVITY 799 HARDWARE 800 ELSE 801 Don't show this field 802 Show this fied 803 Counts in the daytime since the machine don't contact server 804 Minimum speed processor 805 Maximum speed processor 806 Minimum RAM amount 807 Maximum RAM amount 808 Repartition 809 STATICS GROUPS 810 DYNAMICS GROUPS 811 Are you sure to want to modify the visibility of the group 812 The software in 0 is present in CACHE but are not any more settled on machines.
They cannot be put in a category of dictionary 813 hard disk number with remaining size > 814 hard disk number with remaining size < 815 hard disk number with remaining size between 816 hard disk maximum remaining size 817 hard disk minimum remaining size 818 Get out of group 819 computer(s) added to group 820 Last contact 821 SERVER CONFIGURATION MODIFICATION 822 Customize 823 By default 824 Interface logs activation 825 Logs directory 826 Address to find teledeploy packages fragments to activate 827 Address to find teledeploy packages INFO files to activate 828 Remove computers with inventory older than 829 Redistribution packages creation directory 830 Ldap server address 831 Ldap server port 832 Ldap base name + dc 833 Field name to define login 834 Version LDAP_OPT_PROTOCOL_VERSION 835 Add RSX 836 Manage TYPES 837 You don't have access to this datas 838 Disk: Drive letter 839 Disk: Type 840 Disk: Format 841 Disk: Capacity 842 Disk: Free Space 843 Disk: Volumn Name 844 Group: Id 845 Group: Static? 846 Softwares: company 847 Softwares: Name 848 Softwares: Version 849 Softwares: Install directory 850 Softwares: Comments 851 Bios: Computer manufacturer 852 Bios: Model 853 Bios: Serial number 854 Bios: Computer type 855 Bios: Manufacturer 856 Bios: Version 857 Bios: Date 858 Monitor: Manufacturer 859 Monitor: Name 860 Monitor: Description 861 Monitor: Type 862 Monitor: Serial number 863 Network: Description 864 Network: Type 865 Network: MibType 866 Network: Speed 867 Network: MAC Address 868 Network: Status 869 Network: IP Address 870 Network: IP Netmask 871 Network: Subnetwork IP 872 Network: Gateway IP 873 Network: DHCP IP 874 Registry key: Name 875 Registry key: Value 876 Simple unaffect REDISTRIBUTION GROUP 877 SOME COMPUTERS HAVEN'T BEEN ADDED TO GROUP BECAUSE: 878 Reminder: a computer can be a member of one redistribution group only 879 GROUPE REPLACED 880 GROUP CREATED 881 Computers added 882 Computers deleted from group 883 Restrict view 884 WARNING: WITH FILTER visualisation 885 unknown 886 Simple desaffection 887 It's possible that this package is not affected to redistribution servers 888 Removal 889 Connected as 890 Interface is actually locked on a search with various criterias 891 Remove interface LOCK 892 connect with another account 893 NO TAG AFFECTEID TO YOUR PROFILE 894 NO RIGHTS LEVEL DEFINED TO YOUR PROFILE 895 TAG Modification 898 Add an annotation 899 Writer 900 Do you really want to delete selection? 901 Action on the query result 902 Action on the result of selection 903 You must fill the explanation field 904 Package reassignment 905 Explanation about perfomed actions
on computer to be able to
affect package 906 Package teledeploy removal 907 Explanation about package removal
on this computer 908 Mobile terminal informations 909 MODIFICATION NOT PERFOMAED: WRONG NEW PROFILE 910 Validate 911 Switch profile of 912 Export list of computers that have this softwares 913 Number of non inventoried network interfaces 914 Number of agents that didn't send inventory since at least 915 messages 916 The value must be higher than 917 FREQUENCY value 918 Differential between LASTDATE and LASTCOME 919 Are you sure to want to delete this message 920 ERROR, the requested doesn't exists. 921 Delete this category 922 To merge, you have to select 2 computers at least 923 You have no computer in count 924 EXTRACTION REQUEST NOT CONVENTIONAL! 925 FUSER functionality 926 Fuser login: 927 CACHE S NOT REGENERATED BY THIS ACTION 928 Logs visualization 929 subnetworks managementn is not performed locally. 930 You cannot add/modify/remove subnetworks 931 Modify a subnetwork 932 The IP address field cannot be blank 933 The network name field cannot be blank 934 The network ID field cannot be blank 935 The netmask address field cannot be blank 936 The type field cannot be blank 937 This type already exists 938 New type 939 Computers members of the group 940 All computers having this package 941 DISPLAYING STATISTICS ON 942 You have enter a commentary for this peripheral 943 You have to choose the peripheral type 944 Data entered by 945 Peripheral modification 946 New peripheral addition 947 Non identified peripherals list 948 Identified peripherals list 949 Computer Id 950 FILE NAME 951 FILE CREATED IN THE 952 FILE MODIFIED IN THE 953 SIZE 954 A SESSION loss happened 955 NO SYSTEM FOUND IN DATABASE 956 All the errors 957 All the SUCCESS 958 TELEDEPLOY VALUE PROBLEM 959 TO MUCH SOFTWARES PULLED UP. BE MORE SPECIFIC WITH THE SEARCH 960 NO SOFTWARE CORRESPONDING TO THE SEARCH 961 LIST OF 962 (one , between every) 963 DIFFERENT LIST OF 964 Partition name 965 Display 966 Agent 967 BELONG TO 968 DON'T BELONG TO 969 Packages historic 970 Packages 971 GROUP COMPUTERS REMOVAL 972 Computers have been removed from group well 973 COMPUTERS ADDITION TO GROUP 974 computers inserted into cache 975 Add to group 976 INTERFACE LOCK ON REQUEST RESULT 977 Lock 978 You are going to lock all the interface on the search with criterias results 979 To come back to a standard state, you will have to click on the icon e which is at the right top of the interface 980 Packages on computers 981 Packages on servers groups 982 NO AFFECTATION RULE IS AVAILABLE. NO REDISTRIBUTION POSSIBLE. 983 You have to choose on which type modifications has to perform 984 Modifications 985 COMPUTERS REMOVAL 986 REMOVE COMPUTERS FOR 987 This registry key already exists 988 YOU MUST FILL ALL THE FIELDS 989 THE DATAS DOESN'T EXIST. THE STATES HOURS CAN NOT BE FOUND IN DATABASE FOR THIS PACKAGE 990 Packages created manually 991 Packages created automatically 992 Teledeploy time estimate 993 Red fields are in error 994 PDA/SMARTPHONE 995 user ID 996 LASTNAME 997 You must fill user ID 998 choose a valid profile 999 This user ID already exists 1000 Notified 1001 Red fields are in errors! 1002 Estimated time for deploy 1003 Redistribution servers packages parameters 1004 It's not possible to create the packages creation directory 1005 The package creationis not possible so 1006 don't have wrinting rights 1007 The directory 1008 Use on this redistribution package 1009 Servers storage directory 1010 NORMAL 1011 DEBUG 1012 LANGUAGE 1013 MAINTENANCE 1014 Switch to 1015 User mode 1016 Login ROOT 1017 Password ROOT 1018 (Don't write anything if you want use anonymous connection) 1019 Lock result 1020 Name of the tag information 1021 Teledeploy admin 1022 TAG admin 1023 Packages affect with status 1024 will be deleted 1025 Unaffect 1026 Packages deleted on computers 1027 Categories 1028 New 1029 Ignored 1030 Unchanged 1031 workflow for Teledeploy 1032 Activate workflow for Teledeploy 1033 Requester Information 1034 General Information Package 1035 Technical Information Package 1036 Validation information 1037 Package Name 1038 Requester 1039 Priority 1040 User notified 1041 User can defer 1042 triggers a reboot 1043 Stock control to validate the installation 1044 By list 1045 By visual 1046 Statut 1047 INFO 1048 Add file 1049 BAD ACTION 1050 Software search 1051 Search 1052 History 1053 Demande modifiee 1054 Demande effectuee 1055 Your e-mail is not valid 1056 Contact your OCS-NG administrator 1057 Failed to connect to mailserver 1058 no e-mail is valid 1059 Data available 1060 New data 1061 Tab 1062 Field 1063 Wording 1064 Mandatory 1065 Field restraint 1066 Linked to a status 1067 Field name is already used 1068 The name of the field can not be empty 1069 Adding value done 1070 New Field 1071 Field Type 1072 Pending resquests 1073 Make a request 1074 'Workflow' function is not activate. 1075 Activate this functionality to use it 1076 ERROR: SEARCH STATUS IS NOT DEFINE 1077 Status for creating package 1078 Test status 1079 restraint perimeter status 1080 global perimeter status 1081 Information by mail 1082 Workflow admin group 1083 Perimeter identification 1084 Group name for test 1085 Group name for restraint perimeter 1086 TAG value for test 1087 Value of the test tag 1088 TAG value for restraint perimeter 1089 No status is active. Start by activating one 1090 has modify request n° 1091 A new request has been posted 1092 post a new request 1093 Database is incomplete 1094 Please replay the complete installation of the database 1095 Status Admin 1096 Fields list 1097 Tabs list 1098 Field name 1099 Default value 1100 Status list 1101 This field can't be updated 1102 Active status 1103 Status ID 1104 Level 1105 Workflow functionality is enabled 1106 It is possible to create a package only if a request exist before 1107 And the status is correct 1108 LDAP configuration 1109 Filter 1110 The assignment of a package depends on the status of the request 1111 Name of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1112 Value of the first attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1113 If the first attribute is found and the value matches, set this user role automatically 1114 Name of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1115 Value of the second attribute that will be used for evaluating the security level of a LDAP user (blank for none) 1116 If the second attribute is found and the value matches, set this user role automatically 1117 E-mail 1118 Edit 1119 Select 1120 Quantity 1121 Update done 1122 Wiki 1123 IRC 1124 Forums 1125 Percentage 1126 Date of note 1127 Author of note 1128 Note 1129 REMOVED PACKAGE 1130 Language editor 1131 Word 1132 ID word 1133 New word 1134 No ipdiscover data 1135 computer(s) are already exist on redistribution group 1136 Snmp 1137 Enable/Disable the snmp service 1138 Show all my subnet 1139 Administer 1140 Administer subnet 1141 Subnet added 1142 Enter a new subnet for blacklist 1143 Subnet mask 1144 Invalid MAC address. (must be: XX.XX.XX.XX.XX.XX) 1145 the value must be between 1146 Administer profiles 1147 You can't update it. 1148 WARNING:No automatic backup of configuration files will be possible 1149 Name of new profile 1150 Reference profile 1151 Text profile 1152 WARNING: delete basic profiles may cause instability in OCS-NG 1153 Profile name 1154 On computers 1155 On teledeploy's workflow 1156 Manage teledeploy's workflow 1157 On the fields of teledeploy's workflow 1158 On the packets activation 1159 On MAC addresses 1160 On serial numbers 1161 On the ipdiscover's subnet 1162 Manage teledeploy 1163 Update Configuration 1164 Manage groups 1165 Manage console 1166 See warning messages of the GUI 1167 Manage accounts info 1168 may change accounts info computers 1169 may change their membership group 1170 Manage profiles 1171 Manage profiles group 1172 Manage ipdiscover 1173 Profile information 1174 User Pages 1175 Restrictions 1176 Rights to Blacklist 1177 Rights to Manage 1178 This field 1179 is a variable. It can not contain special characters 1180 can't be empty 1181 Redistribution server functionality 1182 You can't manage redistribution rules, this functionality is disable 1183 List of packages to create 1184 Key added 1185 Key updated 1186 Your data are updated 1187 Configuration is pending 1188 This group is declared as a TEST perimeter 1189 This group is declared as a RESTRAINT perimeter 1190 You can't assign packages higher level 1191 Information: the configuration of workflow is currently on 1192 Group may receive TEST packets 1193 Group may receive RESTRAINT packets 1194 Only packets at a higher level 1195 may be affected 1196 Profile 1197 SNMP functionality 1198 Networks scans 1199 Version of SNMP communities 1200 Value is updated 1201 Display 1202 Linux (ALL) 1203 Windows (ALL) 1204 IpDiscover 1205 Manage SNMP communities 1206 Directory of SNMP communities file 1207 Add community 1208 Community added 1209 Community updated 1210 Account info: 1211 URL where SNMP community file is 1212 Community deleted 1213 Separator of export file 1214 Configure engine to update snmp inventory regarding to snmp_laststate table (lower DB backend load) 1215 Blade server 1216 Firewall 1217 Load balancer 1218 Switch(es) 1219 Cards 1220 Cartridges 1221 Drives 1222 Fans 1223 Power supplies 1224 Trays 1225 Maximum capacity 1226 Color 1227 Contact 1228 Device SNMP 1229 Firmware 1230 Volumn Name 1231 The file format must be ZIP 1232 The file format must be TAR.GZ 1233 Name of Database 1234 Description can't be empty 1235 Reference 1236 Soft version 1237 Firmware version 1238 Installation date 1239 MHz 1240 MB 1241 Number of SNMP devices 1242 m/d/y 1243 Only ocsagent.exe, OCS-NG-Windows-Agent-Setup.exe and ocspackage.exe files can be post 1244 This file can't be empty 1245 Manage your OCS-NG clients 1246 Affect again 1247 Architecture 1248 Folder 1249 Activation of cache tables (allows less solicit the MySQL database) 1250 Teledeploy speed 1251 Statistics 1252 Conf profils files directory 1253 Directory of old conf profils files 1254 Directory of scripts logs 1255 Connexion number by day 1256 Bad connexion number by day 1257 Use flash on GUI 1258 Manual Entry 1259 For one week 1260 For one months 1261 Clear cache 1262 No plugin enabled for your profil 1263 SECURITY ALERT! 1264 Next 1265 Enable cache tables 1266 Virtual Machines 1267 Type of Virtual Machines 1268 Uuid 1269 Machine hosted by 1270 DDMMYYYY 1271 Computers of the subnet 1272 Delete his computers 1273 You do not have the right to remove a machine 1274 Profil updated 1275 Profils can't be deleted. 1276 Profil created 1277 Default profil (blank for none) 1278 You are not allowed to connect 1279 WOL 1280 Wake On Lan 1281 On Wake On Lan 1282 Wake On Lan order send 1292 Use the advanced options of teledeploy 1293 Teledeploy force 1294 Installation time 1295 Installation date 1296 Trade offer 1297 SNMP device identification 1298 QRCode administration 1299 QRCode 1300 Check QRCode 1301 on invisible packages 1302 development 1304 XML 1305 On the generation of an XML inventory 1306 Manage plugins 1307 Active Plugins 1308 Add plugins 1309 Teledeploy options 1310 Shutdown 1311 Reboot 1312 Data width 1313 Current address width 1314 Logical CPUS 1315 Current speed 1316 Socket type 1317 Cores number 1318 L2 cache size 1319 Voltage 1320 Use , between data 1321 No port defined for WOL 1322 Unable to open socket for WOL 1323 Server printer sharing 1324 Sharing printer on server 1325 screen horizontal / vertical 1326 Shared 1327 Local / Networks 2000 * SETUP voices 2000-2200 * (2000-2029 Common voices *** 2030-2200 Setup voices) 2001 ERROR: 2002 ERROR: line 2003 MySQL error: 2004 (using new ocs account) 2005 Subnet 2006 WARNING: 2007 account 2008 error 2009 failed 2010 host 2011 login 2012 not inserted 2013 needed 2014 password 2015 query 2016 successful 2017 using 2018 was imported 2019 were already imported 2020 The install.php exists in ocsreports directory 2021 Your GUI logs directory is not writable 2022 You can't send a file larger than 2023 Delete it 2024 The default sql login/password is activate on your database: 2025 Change your password for ocs login in MySQL 2026 The default login/password is activate on OCS GUI 2027 Change admin password on OCS GUI 2028 Authentication key 2030 OCS-NG Inventory Installation 2031 Current installed version 2032 is lower than this version 2033 Automatic install launched. 2034 DB configuration not completed. Automatic install launched 2035 ERROR: Sessions for PHP is not properly installed.
Try installing the php-session package. 2036 WARNING: XML for PHP is not properly installed, you will not be able to use ipdiscover-util. 2037 ERROR: MySQL for PHP is not properly installed.
Try installing MySQL for php package (Debian: php5-mysql) 2038 WARNING: GD for PHP is not properly installed.
You will not be able to see any graphical display
Try uncommenting extension=php_gd2.dll (Windows) by removing the semicolon in file php.ini, or try installing the php5-gd package (Linux). 2039 WARNING: OpenSSL for PHP is not properly installed.
Some automatic deployment features won't be available
Try uncommenting extension=php_openssl.dll (Windows) by removing the semicolon in file php.ini, or try installing the php-openssl package (Linux). 2040 WARNING: You will not be able to build any deployment package with size greater than 2041 You must raise both post_max_size and upload_max_filesize in your php.ini to encrease this limit. 2042 WARNING: your the default root password is set on your MySQL server. Change it asap. (using root password=blank) 2043 WARNING: The user you typed does not seem to be root
If you encounter any problem with files insertion, try setting the global max_allowed_packet MySQL value to at least 2MB in your server config file. 2044 Label added 2045 Label NOT added (not tag will be asked on client launch) 2046 ERROR: MySQL authentication problem. 2047 You must add the 'old-passwords' in your MySQL configuration file (my.ini). Then restart MySQL, and relaunch install.php 2050 Installation finished you can log in index.php with login=admin and password=admin 2051 Click here to enter OCS-NG GUI 2052 ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull) 2053 Please wait, database update may take up to 30 minutes... 2054 failed, KEY was too long
You need to redo this query later or you will experience severe performance issues. 2055 Database successfully generated 2056 MySQL config file successfully written 2057 Existing database updated 2058 Database engine checking... 2059 ERROR: Alter query failed 2060 ERROR: Show table status query failed 2061 ERROR: InnoDB conversion failed, install InnoDB MySQL engine support on your server
or you will experience severe performance issues.
(Try to uncomment skip-innodb in your MySQL config file.)
Reinstall when corrected. 2062 ERROR: HEAP conversion failed, install HEAP MySQL engine support on your server
or you will experience severe performance issues. 2063 Database engine successfully updated 2064 table(s) altered 2065 ERROR: The installer ended unsuccessfully, rerun install.php once problems are corrected 2066 WARNING: 'files' directory missing, can't import 2067 from it 2068 was not inserted. You need to set the max_allowed_packet MySQL value to at least 2MB 2070 missing, if you do not reinstall the DEPLOY feature won't be available 2071 WARNING: One or more files were already inserted 2072 Deploy files successfully inserted 2073 Table 'files' truncated 2074 Table 'files' was empty 2076 No subnet.csv file to import 2077 Inserting subnet.csv networks 2078 ERROR: Could not insert network 2079 in the subnet table, error 2080 WARNING: Network 2081 was not inserted (invalid ip or mask 2082 Network netid computing. Please wait... 2083 ERROR: Could not update netid to 2084 Network netid was computed 2085 were already computed 2086 were not computable 2087 Netmap netid computing. Please wait... 2089 Netmap netid was computed 2090 Cleaning orphans... 2091 ERROR: Could not clean 2092 orphan lines deleted 2093 Cleaning netmap... 2094 ERROR: Could not clean netmap 2095 netmap lines deleted 2096 Please enter the label of the windows client tag input box: 2097 Leave empty if you don't want a popup to be shown on each agent launch 2098 ERROR: ZIP for PHP is not properly installed.
Try to uncomment extension=php_zip.dll (Windows) by removing the semicolon in file php.ini, or try to install the libphp-pclzip package (Linux). 2099 ERROR: this MySQL login doesn't have the rights to create the database 2100 Update old account infos 2101 Add by script 2102 WARNING: If you change default database name (ocsweb), don't forgot to update your ocs engine files 2103 DEMO mode: you can't update data 2104 YOU ARE WATCHING THE DEMO VERSION OF 2105 Your database is OK.
No action taken. 2106 in MySQL configuration, the variable 'max_allowed_packet' allows only file size < 2107 The version of WEB interface is lower than the version of the database 2108 The version of the database MUST be less than or equal to the version of the web interface 2109 Current version 2110 Expected version 2111 Perform the update 2112 The following file is not present or is not readable 5000 [DEBUG]computers insertions request =>[DEBUG] 5001 [DEBUG]REQUEST MADE => [DEBUG] 5002 [DEBUG] => weight: [DEBUG] 5003 [DEBUG]Rache regeneration[DEBUG] 5004 [DEBUG]forcing cache limit old value[DEBUG] 5005 [DEBUG]Cache total use[DEBUG] 5006 [DEBUG]array count request[DEBUG] 5007 [DEBUG]Cache use for lines number[DEBUG] 5008 [DEBUG]array request[DEBUG] 5009 [DEBUG]RAW DATAS[DEBUG] 5010 [DEBUG]table field=[DEBUG] 5011 [DEBUG]Comparison field=[DEBUG] 5012 [DEBUG]value to search=[DEBUG] 5013 [DEBUG]Complementary field=[DEBUG] 5014 [DEBUG]AND OR Field=[DEBUG] 5015 [DEBUG]COMPLEMENTARY FIELD OMISSION ON TABLE[DEBUG] 5016 [DEBUG]table =>[DEBUG] 5017 [DEBUG]filed =>[DEBUG] 5018 [DEBUG]comparison =>[DEBUG] 5019 [DEBUG]value to search =>[DEBUG] 5020 [DEBUG]complementary field =>[DEBUG] 5021 [DEBUG]AND_OR =>[DEBUG] 5022 [DEBUG]NORMAL CONDITION REQUEST[DEBUG] 5023 [DEBUG]DIFF CONDITION REQUEST[DEBUG] 6000 Plugins 6001 Offices Licences 6002 Distribution of Offices Licences 6003 Number of licence 6004 Total available 6005 Power on/off ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/000077500000000000000000000000001303466605000250645ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/000077500000000000000000000000001303466605000256405ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_admininfo.png000077500000000000000000000032401303466605000310130ustar00rootroot00000000000000PNG  IHDR00` PLTEѦ򠀦MÌɎœtB奚ig|馺ˤȣQZXhnsb_ZŸH\RԤNϩcݴlic?~ɤݥ8|BtRNS@f pHYs.#.#x?v9IDATxڥVy_0HUTTPA e0ؐ͝niڒp{xA,߈'!"‹t#5s$)3 5:n9tdV\H!NK(I:ѳcL&_y$&-.%Pjeu zn%on s{cp< *ݽ\*(.c7Θ98:6wUᔃ k[-xpNYe',d`epgi>Y,C.`5=qsK6sK逃VS۲qf05tAЍKlWt;=phSg BB Qds]+? Up JUXv- A@tp #sڝ'ǵC DB:Gji9X!*zB@CT!B9!Q}C@DHk1M3 x1%r8#2i!QF́Œe86t} (IGGr`j!ul Vv"e[ݭ! ["!GKdf2sMv %!?\_ٕN`y#,bwl+,^ ]-$~2«8H$NKKߧhp$Oˤ<ViаP7!@d"Hc dZ㝁4H "ҾB V@A1=3EҚYHͣxl6NH|XHa &N^?1z}= IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_admininfo_a.png000077500000000000000000000034711303466605000313210ustar00rootroot00000000000000PNG  IHDR00` PLTEaJB: $2 t ?gۊh#3 ֫PƮ_7? 7;x yFfy摮!h<2?0RJb ?5x%L@ևrڊGR<_\1Bʬ8]y1czCV:jb;{fkg7A<0Ild[bE1E\еJLf{ } {vb_B,]M}RYz \ɥªﰖIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_all_computers.png000077500000000000000000000033461303466605000317270ustar00rootroot00000000000000PNG  IHDR00` PLTEPX`qǕGiaۘɠͰJW܍QٟxeuiC^YeYС΄Hүյ؅AYRǰԸޖxqvN6ztqzDPDP DlDl ťѤTդVФTӤWФGبددد9#tRNS@f pHYs.#.#x?vIDATxڥU{_0Us)Ք[c]Hq:H=tnsNMR2?vSO8'{sy$,_x(|)°ar ON~Lh%:Q*fM4|WRB >Wiִ qy^T7)jM(W&}m5? M[6):"X >dפFDN`%e&lmw^FP  oB@|cxFy\Yd3)L=}J0RUz'vFJLI8\!xH3*)^rDkk; xr~8GiE=T$H+ G&5fcqF A8b , bQCM]꟢MJFIˆv40~U:BDq"iBF! >~@vVc攂p8 "Gl̬ҳ8VՓN!dOfŖQfZNiuaD5E.rP?rͤjՂͲl)X(|/P`;mV`ǦELt:hU숀bBN7j!U[mn4A34 +~GBKHPQF+wuUky1~twwwPL`}OLͳepv]CAlI(9x4n㋗Rؓ0ceU^SxJ Q)Q;n)3;r55LuK(PS(#(6ĩSYtљ )9p<𹞡`-1Nd&̵B c-q Ό1IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_all_computers_a.png000077500000000000000000000035441303466605000322270ustar00rootroot00000000000000PNG  IHDR00` PLTEu9 4aߗxhB|QXܻȥxZb e\jY5iaҨۀ˅ΟصQ\ݰc(iXpyQM*iI|8rIg]AwЊ V|]Y`K,ӬL4oCz]em\~H||ʩsȝ Y6l*e1nvsCKvKy0!|XdʣL@CR4T˺ @Xr&tRNS@f pHYs.#.#x?vIDATxڍV [G]_EvZ1.Y!m* *)Y5AQڴM@[kZ;3.`|3ޙ@bffvn^0,|Zt#>9#7+1 &GBwbL<#Mu@Is\SB^C9DO(܇c DӨHBFҍiMd2+E 8Ft1y&TXGD ~b;#&`vsv`;אൾB5R*GP}&)e!J` xנ\10 BZ` G6eK:@!Kds# 4x='cB^q)4 y#vBB֝S+KK1&˭pxvv:As~X} B\<1..G(9T} HNj5J$g#B1YH5Z3Iu, œs[B+f@!TH$}^KcD0+1Lۣ/-Abܡ`@ n?EYAHς*O r}coiwP?0rfS3"%WNyeGǸ܏Cv8o\*HţN$i ;{yR6 ssD6r. 5'=Z<>aH.\iwd~E>ZnDZ/\\Q DZZ#hq^cO?W;Ą7%|2VD=?j; hVi͚BE|v<`uإQko.s$9xido@w4 [6Hq MԎyi=޾`Md G)U'BiR ZTZG%Si;6i׎&j;]2l, 6U6|?^B4ct4o_F8g.?+GN1 sGҚu߶5EaCHeC\y C[J "(qIQ&J%'Mʍ(;gyf~^#T,?l 2{Ƿ…1ƧgsN5E|{{ ϞNCۖ `*,T-D6겜 ?gyۼ7OuR+䴭ˆq&sX_[7$/:9Z\~,HϽQSV$fs´&6 #kys4rcLL$"I!QfB$ qCfp$~L%M9J\풼avX]()s&qdBmVS2UPxç:џaI!۲PA^=u)-qɌ%ԿWRBO%HӜ/#QbBr268n C08>E{P.'k0m\;B&#=.{|}}R ,<h. I`$qD@\H]Y.6K2dlj}'ډ9;ooim/X7 LgxRRx,E>JǛI@vcyv8t^!3~ ^7јrq{ ˰Oj EbKpŅ%w"Bk}-۠ lkqŔ9x|qri2[^B˥*͒IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_all_computersred_a.png000077500000000000000000000046111303466605000327160ustar00rootroot00000000000000PNG  IHDR00WbKGD pHYs.#.#x?vtIME *4IJ IDATx͚ktT;7c$ DK]hW}U>(>EąUWײU*/]X-RTb $d2ddf2I@9?g}F(7`TY[*4!05p4M`hyRdvFEڪ)= Nc'R=9>ϑѮ1ocTd阚 # ?ab&dꈳRp5;ٶG7cjlz [,}mXj涟& {-qe봛y3R%)R;.XRE}Er~~,QwdXqW_B]1ܷA%E󹽺f{ډi#o))Gb+Y%1>4w1߄%ߚ86}> xe@ADUJP!˦,?A(1UX@אedwLYY;ÙRۖ(XȄǷFCχ,;s]s; mq]ka<>* c0  W:O6oyk13Ljo35wp3QJ1t bVc]=۶PJ!(humL4=z1޵[p;D4/pcFy1y=h@R)]dydQ1jLC[7l-TA \oynFnfsÝF6?p󯼀mŖO {0S:/R"B-J@-#)Bd4+{l#}注6"|ɖhʭdv`n~c[}=ni4tp.^u67БJ1(Es.d攢hp3&3dbd{x˵ (0t,[bKаl9CGo>)y,]:/rycc$ϒ.eќY4v7rbp,]:9[?0BvP\XYJ l򞏘^61%maV,wjqaްG)!|]ZB^߹ }|TRhҿ\ܖ/!S o]F\lqqLA )3DT,[ I[~08Ǧk_ 蚆9fKEmyN7, M[-`ޥ5=ф @IŮmb2"í Sג|_?o?4 4q:ϜPXT̚rӡ Fd)%yY+ەFi^6 @00&4'e >24Mi?u-'Si>34MLWK'%o_/`I~Jy 1ͱnrQU=>ADb;l٘];^D$l\ڨod 7 0a蘦/6H-r#iӪyv^In+F幙II]~tMǁpuvGY{);T)`F>ijgNm%ljpbm>oW~cA6@(RpMf WnnQ=.ӌʁ4&dXh.WϨYc??]T'{MC$n=w8Gi Y4}D ic׏wS^˲0ѝA35sJNtbEHjlpZG)^.ٱq^@b2̭7n!ޕ? T~?z:&%_eےd@wn*n6fLNPx-2לTQdَ j )>'wZr\F+~W(h G'V1 1B@(mo)BBz c94dlS#m|s^7}IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_all_soft.png000077500000000000000000000030041303466605000306500ustar00rootroot00000000000000PNG  IHDR00` PLTEhTZtʀQջۺڨI|LQCcsbk܏ůciZf`eX~߶٫~sNxt邻֙Ж衾ϙzϞh\`p`FxDʣl/8D@CR4tCR4`/x`/8ʤN4y&4&4J e GEj.*|)gpj.|ʦ,ʦ,ȑ dtRNS@f pHYs.#.#x?vIDATxڕ [0XvlsISJt/y>9PW,eȿ JvN.vuܣT@7s.0~t߹M:dK^<#, &(0Zqbr9dE{\g@4qH|`[ZDFm`ǏYP*0u3-:a!<0aK EaL(`>!‘CG12^(3~`j!1<b;G)]A >dr9^& YWiE2ÑMZ1)|,S,e Y~)sZ]ǥG3xM Aг Űv7J Rز7 I?Q blRe"136RpPqf#B\|vH (ʊx jӂTM8<۔Ih;guJ8!dz^%Y" VIk,̄BgvkQN,l(B[v3y88 Ui-%)^Ś.xLg kXꉚ}q;(A4'\0*rU:X-C,OJ-%?8!Jzyw٪wY:*2֮p aB"tzp6iC %愲Cq-tn|LO0  .D~V"y^Lt &v2- 쟿 @`(܂Xojq>0)<qL-)CIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_codes.png000077500000000000000000000031071303466605000301460ustar00rootroot00000000000000PNG  IHDR00` PLTEڤѤ|PQ^ȣ̤}ZĢBhiդ|KաJȞ̈ZH”gŽqOԤףϩak\avΗɾHfޥ`DNͤsʤH@@CR4ʣ``HʣtXH@CR4`t `tʢ`NxtRNS@f pHYs.#.#x?vIDATxڥVv@a3!eP( ( TjVU@B=YLNݹ3;K,߶bBXFFmC2A/1+zvP8  iE=w4tzCD3JWsx32l.K=cN1[bi\٬֒cVJߪ7\nv{q{{rn5|/ۺ)Fp "t@xؔ- 'DXjU61<ςO ,NP85`Y8+$F3;,, a\S#4NE-'4Ekz 1- [B[Gh” \‡tuC#$owd)L5]Q2`-t%%t_Beg,klu9'S#o(^I1,@%ΛeAρTRF}ެ>`>BVY/k`u9Bz72i^̑b^_mrA]ɶQzT #a|Wcp A~0lO(!t~6#^wp0NM WxWvdUVO8ʮ!e! nGu[-}EL~z>E&7cۦx/h@}ۤ#(xEzNK(׋7!C7cގGN,>=e9-(j& _aoIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_codes_a.png000077500000000000000000000033371303466605000304530ustar00rootroot00000000000000PNG  IHDR00` PLTEaJB:q$J(:Us1oo㲿SI>P0X/̴)W% :$keFl: J껆ůJs!7n\lb B{˰UתF'9.>Bv,DQMxBON<Gh]wb-r>LjiBjSFGBuzٔhk=;WLݣQǫ8IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_config.png000077500000000000000000000031411303466605000303140ustar00rootroot00000000000000PNG  IHDR00` PLTE襡j`ap֣饪t]jƤүرِNФɣV~]ߥMsզn_`󨈫P䘴PڤKŖvPAx^ɣDhkdB)tRNS@f pHYs.#.#x?vIDATxڥVV@0 lh{[Bcڪlk/d_wb̽s>d2mY%1+p5#ƔgO~:Fer8B$EM&YgOR7HW<4 I/, E!]ʕjrc@RA [Xg= 06"{Yo9E+W[z`۽H(n!@@Qd߼=\ChFR0 x91˭;KD"݉!ú7%W@6r|4+~rKnn㍟8Y+O%EЈ8UZk8Dnj}B MM8U|uVjVwkQ%_|y'OeSڨ;̉ogc:H;w  .7J ?*nfiM*cTgI4 ($rGrd Pjv  ,YGF+9GIme>/rڷȨ7TSeȜDrtXpgPXe4+5\K++EzZ8&ώ;.Bs/z˦Jo_J׶m!2wr> x/ ././/////>> ?? t  !!""tRNS@f pHYs.#.#x?vnz],)S~ Z8: Ɛa(|ulFЫ.V9Lԅ@t<vW^u^(íi{N6Հ3~:rg:\/q<&sdɵ$ ǜQ]5܊5p!H9?1n]1x<~ãr]}nex졧獨0`XSxcY`xe`081#LxW!qs\2 y|&< F_3Y^ZσrK~cɝ]VKLjD4XrB]_HU8bby/8 w8^Bqhy5zM4oPT &cE5|1oIE/ <9 ᑠaIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_dict_a.png000077500000000000000000000035061303466605000302770ustar00rootroot00000000000000PNG  IHDR00` PLTEbU<:@JY~0-0rz*<889! F @J +߂UIՒ;Ϗ TAbl`qVmC;>TɎ̣i .Z o@q9EG)~n6#l]Ԁ.4 4'<ih N/0Q,]A L~@0_UYUNש֗ <7F}1OL& 7q`ONV]Ts=V2Tnf=.3>?&s5{MaSONS<̉n9腂M_۽)eC W5|6՗z !״/$] iti}']ڢTJJ`\|X{lݻقyu4gNF6^G=0&٬5x%.ԟ]<^6!,ܜ _[]QH9}K񭱊H8`p48Jxw\ĖM899:NNOLx%`Nr=$7& *~QB$M#)ҧIXa~Q4PB!C8 XU,͐b Ad+ Jco~@р{vy@ٹ9x(ZaT.ΰ!%#Y^Q}cEt?5KO,xjObRdbENAy}y})9bq061& vv^i4x[mZ}@0=AۊXͭvG`/UF_}wdmː &3>~?XRT)8Zˡv8 ;ǭ3kntW7K:};k[o WrCIsh 63A >*j !K՚{BXtϺ tgp`=_n1K\.^^8u-eCjY41$ L5T!v|IA((mefD7sEO _rI@th}!jK) H$:b<V\J'*ZgIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_groups.png000077500000000000000000000034371303466605000303760ustar00rootroot00000000000000PNG  IHDR00` PLTE`ruzpxk᡾Υj֔m֖ޙivJNWϰ{؃cȗo`hgўڣڨAAFJd xK/`|x 8HRh \ tRNS@f pHYs.#.#x?vIDATxڥ[[@f$4JEI"D*bRZ--mG:9ࡽ0}/B ^]gyYʚa,Z65]x*X+zi4Vq5,mTޤGa}q^ksaoc1 B-&=,&b{#7lu[嗟<=`S _ B`'rbV0&P2N?a IVQh4j .´ W4q}x<^h-P(yr:wGY>ړ-kܾbˍNw}vvd5 s˓/A0uMKR8uYyDI?C̓9 _D m[ȓHD4r<"6"{mbǣ3\P!9gdu`gDһ:0DL1_u$#QG(\L-O-(1&t7 eޙbޢ:/oA͸Ej#b{Oa :4UL6eO3I:): 21"U cE:,ŋ`LL3Y A/2" .dJ"'Z}Htu'$t#Cz^fBHRIbN`nɝm$! Zr5֏ѥR++^8! $NVI{D&I!<(>)zԊ(so5QřZslՙ*hTe7(atS(Ĕ3mIy:?kξi? L0~?L +GQNf"ثfjs[ aK/Eynɝ\z9ǡ0FT,r?BNnIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_groups_a.png000077500000000000000000000027151303466605000306740ustar00rootroot00000000000000PNG  IHDR00` PLTE d#%87TP@:<:H^lqlqjdoxut MU㜼7 _ԽJZ־GW'A!ֵY'bճ:dYWE^aHNtWOJS Jʆ޳\Oܻۙȗǂ6Tҩѡ;8]jlkadgQ4ABHPI908DtpMNvbenolocalBPknercaBorgdnbaTedrx<<<.<<<<6ebx|<<<*5ǘtRNS@f pHYs.#.#x?vfIDATxc`021# Al\<|@=B W(Rv6e]=}00426 b*7 llava>3;D7BERH"qz OLLBAOFɔԴ̬ܼ|0k@ ɂ¢bҲJT*XduQmmZ]}CcZ4dsKkwtvuqXZHO0q)S14I$3g͞3wtt̼9$7 $.dfnFIYnArH= D zd$ !2 !C5e@* )$тI@mD0-V0/kPƙ1ʜe` 7Fw(s ;yc9@ +$o2PF+!p'oHgUxj+q-I(^I(QId!4HFm@.7"0HA \0JfLdU/+-6FK `QQobF/sՇ(`3ZnaQ"Z'`umch(TϙIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_help.png000077500000000000000000000032131303466605000277770ustar00rootroot00000000000000PNG  IHDR00` PLTE數xRRiڵȦ``ʿޞsyؤMBɢOZڥ󨡺ҥ^}It\yqaiifŤդmhbZ[IHrZuX禙rmɤ~զ`ɦ`(G|LL\x4|@CR4{`RixДbRV+OWkȜrh*66\f"nvE=C3/q%z*|j՜N+Km$ٓ5KzAD%~/dP\ *V@X=Ni2&%.X|<쑰?I NRb;PY5Ϣv){X Gq-gPuH3eCW{r2t 7aAt~jK.'D]GsBKsՃ~D(cS<=WK`!kdsP@rl"\!eJGdoAD_ܨ$ 0R خeFΌ@Dv'ܞ Pr|[ZDD, 1h}ukXkASS/ s@u8s8!Z ЭVٛz&ԘV8dr^'jҌ)0.n帐AioUs`arƷG ٨Kg-K-W$fF+R:zՁaX@!qo X<VC` ! *{3 [Gd%%^ۂ] |Iv6¾rIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_help_a.png000077500000000000000000000034151303466605000303030ustar00rootroot00000000000000PNG  IHDR00` PLTEaJ@<:BY~00t::96i*T2M=HFO2d.0r09y5JH档s|>68*YbC<6WTB6U9䘚]10㖘骫8|zH/r+U*TP1,1yvYB겲a,mfh^NPQPBX9w9:gb5<+4k15Y\Z.x0|/zb^:8囝埧rxBH! ! ɦ{ܦƃ=N<|pȦ|ܦVBxɦ{ܦ󦕠HtRNS@f pHYs.#.#x?vIDATxڥVi[@."ZEZz⭈96iQ䃓&Oyg޹vL濥= @)й|ǞН1F!Xcr]mww94h#`lN6^t4þb/$m|6{ؼvgi_y\?xS؎yC >2:vl|(lK&g*^gX@-݁J:]Hs~;8T=ӊTN0u4 *b&15(-yOF/\ۙKR;$ ]1ҿOK+WŻk[Gbr?[`WnНWss/bNV0 oޢ۫6wH!OwY-s< Sf%צ/c~#̰`BઓKVxWxbk3_!Κd*>Cښ3;˞;֚tk?#N\~dW K2.4IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_ipdiscover.png000077500000000000000000000034151303466605000312220ustar00rootroot00000000000000PNG  IHDR00` PLTE󨚶]ڤ`DХg|5zwb[ʤhzqs親DnQBNfQ妳ƣIդNȤix>}k􏰤ۈ9|΂ôiƱ֨vavq]XLѥϤ@CR4LCR4>ɨdΰW@CR4CR4ɩ$65@6XCR4ɩ,ctRNS@f pHYs.#.#x?vIDATxڥU_GV]]5Cdgvgf_cqBD7 aYB|x>; f2R5=!52IHĆ_LĄ"XH]׵?HghmBD&NfWsdGЅ !:L&`T[n?S S3ulm䞗uOrf, /*UnrfϬhԭW %BB9֛Jg˯m~K(APJީ-rW+9zw(tSK Tqrh\ڼ.ܓ֑m~* 2>KK6;~,/LCt.8.7Ojf$# aήKB.<+aHQ'8G>O>Ri#g×c_*#QòԹk;#/t z ]w.cnHrɱq8]>6-<#}C0WvIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_label.png000077500000000000000000000032211303466605000301250ustar00rootroot00000000000000PNG  IHDR00` PLTEؤۥȥ]P{vD¥ԥQx9|rc妾vĥirz4xJɥaذO˥X֤IgצGΟФ\^T妼ͤRLʿI<#!! ^8ɫ$@CR4?@CR4| @^^  hɦ{2iĩtRNS@f pHYs.#.#x?v*IDATxڥUZ@0; AIBbS[zFgvO⧙g=3,H23wgl&䦯u2),2i_S Npo3Pܥc2J#@p}P: ܼ"QJ %f*t)̆WX+UgFFOO  )!$Focs APF)`wRH7r bȳ_",s}"EKX{qXGD j an}NxZt꼐XQelNUx69vKX:²zwEH [h)B5z^GVܯ` lR+|&{`S1HA$ ӣ "\Q61Cu[ V|)U0@½?~, m0#! lrB%7 Kip4^iLP(DRY䁾\'(KQ녑> Otj o3 f1h_ h}*t텠 5Y4?<(ثdء"wQ=0fc6ϣ?]:kxS-M%S];M Jt=O)]sl/psQRhNQ[4Ҕ{./2AU*)1x/rBJBÔ{K.i}} dP(͊ +!nT2]޾n=^OVY!IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_label_a.png000077500000000000000000000033261303466605000304330ustar00rootroot00000000000000PNG  IHDR00` PLTEaJ<<<@X~2.0enr*<:9:<::::T0I9P=Q:KAx0h:C:r::<:81PK棤xx24`:6n@w:G%Xk `-Ie8>* z1&嶛 0C&9$M$SȄL%:di۲هu//gg]<$/,:–ZZ~O3*x(q\@mO{ˈ#=]n6ZJ_Lll :Ϟ/vQN[g\q*g<^Xt?IQ >"f^rRvi pK@Jΐ^*D804O#JGeώG`׭5(;ePJeb %̬ޙeJ uʗw 5AxF0F6J2];!N'%p@*1e.{So UO4"gJ|~~zJ(2!s^O|dkܝ4`)3{i`V9`\T{Yrޝԗzt@%ɾƀ\`XlT`OJOC¾) Txd3`o11_>92;5]$K~Z:eO+3L|eZWnco*;~ިE1pi,(~n{ooXjSb?{mM֛vqG:&"!cğ'E 't! C ߨCwѱ1i0֛ڠrśb!9Uܧ"IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_local.png000077500000000000000000000030301303466605000301360ustar00rootroot00000000000000PNG  IHDR00` PLTEѤԥڤl]aba]٤BDV׵ج|ҙ{xNH}ǀ<|PvD~2x?~h|=}psᠽ_Ƥ¤vzX妛ϤaCoitC&ibm recev alnarrapecntcallehCekcT rObreaTotSO ilC kitphCnegnT idatuB noeRBalpretfe``ThtHhgitpanomeRcall rrt psnnera eeutelObaredOilC kitphCnegnT oloidEoC ErotitfeTpdiWYhieHthoB redlytbniSelolocalBC kotsxeTAertoc uel..seRnOd yhCnegnpO ``\CT kcexonABeluarTpstfeTpiWhtHhgitpanositc ret asnaeraecObaʖ"tRNS@f pHYs.#.#x?vIDATxڥVV@屻*PkW* JR)-m?ҙM؄$Ν;Z(72!RBXThnUh t/ϼJw˔(1 )Zm 9IcKtf,q{Fkpovl䬪 Xmש+O^s !?hL4[%x@}TcVhs,DJ?=W'Q0l{tͦhhB LgQՀ~z&($-ɈP:+ޤ?](MUDZ!"4/9i0QM|6D.zxr8_9B$;C|!z904p`6؉Nϗ^v$A:Vo#2~Ia;%Z>60$EH| <~Ύ,Zf5vo]ѓn'LR-qѳ_'OI;SMИ$v%1ܹrOEi,2]sE}iSB "^Zi,zg.UJSzZ&j .IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_local_a.png000077500000000000000000000032451303466605000304460ustar00rootroot00000000000000PNG  IHDR00` PLTEaJ<<<@X~2.0fr*<8:67c.YNZPd\^VX26?7ውAH6J@겮괰뷴鬨y|0m]V塛䗑q27z.訣phC8~t,Tzr<0C8@58+⏊ހz6*J?Alpm2OD߄ހz~</00=ppp+4ǦTǦTD+t@CR4CCR4tJ?@tRNS@f pHYs.#.#x?v>IDATxڥV_0.$E%@7P)Epнi4Ц5 ]PK/"LXЃՉxvQJѣHx"Iu `I{th> "= I 0}02۠01 $9uIcspbpIm00Um|>26U& TvzFc In&h^zDl\zBsȵe;| ^lqs˲m~a{eeg[a!؛J)hb\l,ká?P+ ;,e'@f7uwr̢@A%a㜝8uk!sgXT]qGjaΐ  ?lyAb0A .8ټg]!>ǻ-Jni <;إ s^8P Gm[[|3 r\"StK3۾,5t)̋!wְ A< =~'h)| :?@&7+Ŋ$vf!Q̢?{/N>7nn.;N/vo}EI]Wi!L_*clAxPhb*lIRg`Gn!V ͔wJ4_i@B B]5Ѵ³G^+>?8M.FƕQ6BQW5ydҀ+I Fz|P)d4uHM*,IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_logs.png000077500000000000000000000035071303466605000300210ustar00rootroot00000000000000PNG  IHDR00` PLTE㩶Ȭx駭­yݩqٸһ˫٪v㈩Іݩn਩ͦɈ˾鈴vߺ⦿ߪ֨ǠɟzիÐƭ̱ŭxԲϫҫڪtRNS@f pHYs<IDATxڍVvF TAk-#캲[7iR'.q4m&v>$#ݝ3{Gu+K KJ>~[VB8"9!cwc ܑZ_bwfѐYi^/Gr حDWVnj(<>&DSյZ]# xȚn4,0tdy|9 hv͢\n*tQŔ۲Z%BɌ儎 +2QB|5Heg%$n9Dz2cU2bYD#G̀)uTd(Q. YSs!^>A)#~ĀBFq o*ěҮ2 i6{T&Pzk؟ZG'@^-)[AMB3M ;:ԈK갬E&[po0~ivXPض}}l3z5+pnORFp_pH;;A7h9EOǡm<bċw獠^ Ǐ?KLL^ukCp$\N&=쿺/?np!Џ; 0dLcCo ;/07uN^ /k'Á+f:)h~T 5Х:BgV@8+ɽocn*t3HIbz?Sp*&H LJ jg3=Je٭]c!zg쀝v G\*ǵOOfhfj\^LUNܐQD8RD3BtPa@(_D9uP4?yS"n?`KzbC[@өL 'J?!/Ί@1=UNI-bY@7>,Eh83J0 @;51k82?g$2l:_5kj2 >"lr"O/":!+ aFض?lXEj9U#* KS& !O*8Ve1{KWei!tE|7pv)J6QW=k1ʇz%k<ؼ}\+md~LKpCGhr UnJ?E 7"q{_^n ʲ(cW9=WaA&C]Yo7A$4clt Gko~$Ы!E~*)E _W_oh8tbϓmTy!mZKo=h &$:b RMsIRze[J=fj;No%==NZj=ǷeJ4*eb7D&-, _,>2Rţ:#jYf%0Wv,>{8H*ڔ](~)=/j9~s]XA)2^ط@׌>_['5⪹{zfߺ T?%韬G˾Dn+Z$DBgq{ܩVAnA2JiKve c}7ډbS1)6_xn_` !0kѬbtaIc^} }P<3vy x 11|]u_aQyaן8ಔBIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_multi_search.png000077500000000000000000000030211303466605000315230ustar00rootroot00000000000000PNG  IHDR00` PLTE{~ԈڙMNb{]TZaTeuЎ§љɐŴjb~hrȻYw͡lƹؕAd8{^I͜RUpXȗ艮yτؚyCR4V`t`L `HшX`щX`&щgXbhъ@CR4ItRNS@f pHYs.#.#x?vIDATxڥViw@0 b#&!1(j*qk6tO7:lqz ޹sk뿑aXrT6! e:P G6N b螄MߑlEE4;d'P,Y!'r"K"]!Ʌju(X9ßl6lIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_multi_search_a.png000077500000000000000000000035321303466605000320320ustar00rootroot00000000000000PNG  IHDR00` PLTEhB 4aߗ|0жxQ\ݺXxr(Q\1le[&fV9Y鉨`eQpǁ}sģAr`X՝1hiҪܘ"eK,չ蝷ج~,j Xe*haҨhp9rKAzFH|O|ơVyYiT W|Z!^ + + +, ,- - -...///////// / / / / /////////1t1t TmtRNS@f pHYs.#.#x?vIDATxڍV_Vm{1.N;ӆȶ-"icDܦ{}q@9y],,H$IB: !E.SN|0K[i(%\BMf Y%;S. %NѦ/'"A)EHUx_cg:BHux=ȩM&p 1+T.9&/ ])𵒳Q .W>ӊ ބ0r>7yV \D!17E\j-__km|I4+g| Uyk~rV t0 Voov;zO*Ӣ x;MWP5;ۀ";w{][J5V#tjGB<4qBIFSw (2NBivQܾ/ՖbrQ]VЭX7[^Vr#+IAgP G湶rzSnySVJ`ڻ?m?<Ű7׮y0CqdMHM?{>f_+OYYfḿ Qφձ*o^i)qr 8_G8l!SwI"@vPA#3xTzҌM;ޭτ5w`1 ۻr%m4"ͿFN{d %$x*0Neko<9&i.N `e'%Bض()M::.-؁0q:vxTy e= "'\Li\c(ά229'XS'L(ՆQz۞54uMK V(z=p?5R|H@HVAoSHXotkK`^]ٰR3̙c"^KjotIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_pass.png000077500000000000000000000025111303466605000300150ustar00rootroot00000000000000PNG  IHDR(P.PLTEݹȑнyƸpsloʼnذsƿ~Сӥ٩pvq`{gbqqvXzЮfpnmXlynpwojhjrhndqqqzYpVvkşbԩ۝˖L}nuzunqq`yksDk\dtkznhv~Ώfxvs̙ϟ``2(+tRNS@f pHYs.#.#x?vIDATxmR [0jn@kSX * Í MS};IK= &<@YeB^ Jڶ Q$_k}Y Xrk%+սAhdk\%"{ ,i&`?n؃$ǁ.N(}P$~*Pgcy{Hf罋FA'" NKTf\q5KAw^䈉(ǗڿΖGJF鋗tD!WJln0Mo EaGw{-\m #NЬ,l޼{>fQv,*-܁Oi|_#Dsٜs^dD f۶^e-o)|gY6'104n*!A]J"PE|XBE^B8iۧ,N嗫ىVwl"zU] L~n6a._%<]IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_pass_a.png000077500000000000000000000025631303466605000303240ustar00rootroot00000000000000PNG  IHDR(P.PLTEѪȸwQHyFx@ r:qd9ʘ{@uP|Hx^ai?hAw*l-/xXaah9> j9qoGŵ""pǸAI(itN+.w,1xV\0nOZGPhY+m̂ hFJBL.3yKS&p.%u" o*#s"mˮ% i;sny;Br(qlw2 nWcӰ[c dt}qzo -s3p a ]cmypv%n_2Jy*2w7>O}g=HwQ ~V&crKzUxQtRNS@f pHYs.#.#x?v IDATxmS{0>.v`d8cq̢lԹEe?k:=]orH/åĠԼh+W<@IGgF+i # uD<^n8nL -Mbp%;$l7f.+]TVc{9sbq*@tz}P£""'Ri,s3w7MՊo~+/%+\~ 6;+IΤTje1Ac^<'X+_!c~Y 5R)=)b,i`ɻF}vY|| <|fZ;Cs4]h69Ny!Psꐭ}? K-Օ!we8"u# PYfZ[EaŽZ?~d^&[D4J*g[H8ѩtX6ӿH6T\cF&E1W6N'aH0" 0Fÿ^Mzozr2̿[b1}QIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_plugins.png000077500000000000000000000061041303466605000305320ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYsrr3tEXtSoftwarewww.inkscape.org< IDATh՚ipTWv^_Z+ r h0;=,0,NM*2H̤jI*[yP3Rخl1A,6@ jmz{C@%8)?u{w9OH)ʸ[u/X!@)aZ"U*N7>i-V@8rjkQXd%х`?+'gSݭ?޻4"fh/PWѱt7U?_1+ܢ7d;6 wxSnvrۏ=M/.z"*9.ɥ@ E\R9jY0! Tol#+Ƹ^S +kQ)((UtAv /mXE[w/w =ɜJ?:8| C!vz -_. d 3ٜ5)غϋ3-+l4>ȾGƮTQQߪhwU|8qjEϺcd+:v~=0WD=RdBwhs7`VETē).&RV1P]V< / LqsM:n7g4g H#?=iCcjV[R?8lgq1KBK%}Q7>A/g(+VM6fN*gskK|6~ǹlbq|Lb{Gq; L6Q^(4vS]ZH?Jΐ/<%S1 ܉X2EH1,{ʫiƌNj{O38z],g"ߝ3 &%xi9zBY?y%@yQ.Q|'U%vBkd 3u=Op9$}Q*d'b(g'YXOBl}F~8{>ӮRSQL4xMd%_r+҇Le6f&997E , <ħH 1=Gc vHL`$ _n2S\r%;qݟklyvIsWψ `;xyqO'L-AF *+yry\wBXXfwFld90߯]@ͤ|zu^KQBك˱u=vݾS mYH㞊r5H)-,i!e>b0/,g`MZz3쇆ƭ y+kye]'ݸ&ZS$Mfc>Dvz^n|ul\ ة ²]Eq3wj9æGAeq'lN2˷tp9MMyz=ǒ).v3 "o Jr l VYSc9;q=#EUɻ' ~_whq>TE!J2x~6u8zBO/Lc;-]!r=Bz6(éߩI0>b /9n9NR;)N}s7xQN^qť^|n;Q#AYaVjKF_oV$9v3XҢljT({@n$L<hNaYu{,V)EӦUGvfˣBtVݻaI=ē.Vͩ;3' I>MWکPՋx+c!- n$ UKmdun9VzUC{//c#丳NGLŜ[ԍύ|SP5~=YWN(Ț<@ $uCnD[gcbţc8G H)?bq5LΔ`:wƫj6q?\$ g[0wJ͍b$<uZ8manCg{'ϱiEWVϛ[n J-+#S<0B4f/;`XBh,Oΰ2F$>8~d6?6ۉG{qN.9@ڌO]/[D(KHF*uߝU!ihs@(bck {rwR)?^z/31Ϸ#_PT~(QL(d,9eи}I Bι}mH;i ͘ŞcBNRaRӈ5UWcb@{v6|J sxT l*S'ylqt8&Ό*СAT)+̡ţ $}Eإ󄃪XUk\2-| ݃`0{d6 )*fIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_plugins_a.png000077500000000000000000000061171303466605000310360ustar00rootroot00000000000000PNG  IHDR00WsBIT|d pHYsrr3tEXtSoftwarewww.inkscape.org< IDAThypu?==-Hh+HD6c4g68n&ЦqfI8mL1x8zd걍1 $ӆ6[n ==N;~{ss~BJɧFjFYe@9P6& t!dKÉO۵]R!3C qokOΆP5Ro6NfATHvhnu%ݪt̝ͬ+`^tE''⡚2}Z9P lY0ږ]/~fr!٠?yt:9eM& uj6 )^>AC`KmH!7;z%~0ږ]/x3: ?q r#m3:INHѶL6&9ՔIY>ӱcTJT?$8H]U]Rp )0UfamC>^.~cLq%]|σoH J۳%<@spTOPa0O^@Sg&ujThilD?>~Ga-g673r"}ųx1y+Wxd^x>#u6)򘈢,-YzIk ^pBD88 ޴fZwB3gb/Ya йڭX:2l=/#?Hzx "+C M:vk*}GǞ (F 4gYz^]bM0Qx-鶺Cl^hE ǜBEĊ,{epwl;ة%Un$?>sTPt.J7v㫕5+D$:$ CU[ߟs g|[dW[1D8V 'z$#A] (X{%7* Aʕ$Fo&9 yoq!(NbݨӇH!:*'iA>B؎yM6NWy3Ӿۇ̿ Rq8H!@35 B{(./ՏmQT~%(;}/?:s_Jk-4L}&rcHк݋mj,~I9w~%}}wX`g9oAT׬*O6O ɎtI !lxJd/X0g~%r'ɎK*`ChDwT=DQq(XS)Z~CWtP.k6)*4lҘv7cxos?z#HѵةTF uze窄he:Q)F^?$J2?Gd#>J| 5qz5{d6 `3Rq"IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_regconfig.png000077500000000000000000000033341303466605000310160ustar00rootroot00000000000000PNG  IHDR00` PLTEФO~դPqؤAx<|ZڤչɤjqؐԵȤxb޻=}gQΥJvz`_ъwÒfBߥIjk怜¤ȹ򠁩B\ha妿V⦦Ѥ$X@ FIѥTCR4M #!!Ѧv8_ѩf~@L xѦP@*¹tRNS@f pHYs.#.#x?vuIDATxڥVCPC^M4\KcHqC=1giEVblS |;=K_["O$TrRtJ1r{RS)s-.tlb O"v:4|u$3:K 9;:,P,T&Gk8O)2 pcx.@tlf@0;~  ? \ PZ w_I!H<ۋK$.n-"ѕu1J}XYr~n R6׈"3xB'%jvN3-`X`e\$ݒFy.vjB7k6gQ:h/FYR~ŵδQ7 ћ<fsdMk ,2,m#зﴽ9m-5dpE75j_!Ez:^ ak Z;::b*!@s*PO |6yݻUP)F?MaSB: mܭ]ӆG(ª"5Ckf9BpK")L A1 _t`b ` i<`z扨o"j:;Δ;ACw(CP %sg,x6_ղY§h«ּa CG fHSZm[A~<%FX5H_v6m4ė?!J )pNspv_\N41f(;]%֍U=|oݡ镍7/B7boX1bF\+N؟ } kH;Rݎ.r,I ;f<$/կ}?IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_regconfig_a.png000077500000000000000000000036561303466605000313250ustar00rootroot00000000000000PNG  IHDR00` PLTEbJ@::0yr8b-9F=`+0hiCF]Z{6U4TzBL^)gzf0X H'ι= OyLȪ^�ϭ޿NX&Xi m!Y\0>h'eǔ2'vQ^9pIX@d? qB_,t_ux%FF:P$;G&:MGbhrT6;_c\A%C7M˩c |Qz$wKdx0~1ى;9pݪ' SPlH .]^^|wGE/̦еt!!~ hs+WYZд<#* t,Hgo@(+ (H᜻iQ !=Cw!ʚ<|d 1 !Fe4B$DTC|] %Dӵ%LV4j5 !Z2Z|V)[Bʎ65g89#X ;zzM-I @̐ݯT)1[UķY@ TԱH96 6FRuxq%[Q͟ptLhwʊ#}ms,o> Z'vͺh/d(bj2YQ 3hsp=-82B3N58$\"C҈ůne"& Qmq1 EV.OEp|a!$_e{%ic!'nb^H8i0VS`yWVL BIͭXp~{03'IENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_stats.png000077500000000000000000000032071303466605000302100ustar00rootroot00000000000000PNG  IHDR00` PLTEݡQiǝ棬hΏԟY쀥bP腨ۡΟɝП{bpظҸȝ]`ޢСa˝u١{]rɃԠĜȝ͞ƙmxЮœxܪ88 ڤXIQܪꥪԤQڤ^ܢ復ФQޫڤX𚺅४W(tRNS@f pHYs 0 IDATxڍVV@ iр #b ܠZ5֥Vk?YLB{ ryof 1bQ>x t x("c^@ob,?%19OF +ZtoOo05 pZ㉙Y21?_ :0L/""0ɚd:!BjINgń;aY\<*ƦV 5("F;B{;nѳ^lyuC\F|U TFF^j.W(1z^4L ;M-{`y@vDzd5'dUshBGtOQdyx =ca1ci rHYh)z_r%AD1\Asje8.O!A/f>x0 Aq@@)PY~hiGӝ^fاo ;;X͆۵{zQ~)u\C&4rܤ0w-y"XOЙ6A=fA#GhBk/0ȟf _~cxXqAjw1 \:5'X̋.lUOGwBL$7=i֜E)twc1x/z@0]Z*#IK?ynjC/M{31cڌu396FA5^<=+f5JjteMR 1V h7ь0_fJohFpōc%3;HDewh>mE F?H?1pnNYJIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_teledeploy.png000077500000000000000000000035611303466605000312230ustar00rootroot00000000000000PNG  IHDR00` PLTE榲ţڤꥪФJcлûʥ^gyw^bmCXe芮pQƝqQ8{k𡺥ړǁĚè@{XX4xcȤN@ϡͽͤ^Ԥؤ󞹤nhIޥܥpcťK~I9+}⑑4<:@<*:<:<@;fb`wޗPe,A H8EXs)@ϩ}mA<<(Gd]DV1a`_ĆA#] D9bl`o"$@OHLN: 2J$ӌ=13;7?0IHρť[ dVDj.D P { ¾Y&Uz%Pb,dw|a)Vf|Ǩ/#ս}ɛSn%#knўd+o9n=y^[[(--b0pF۴"J` AS܇Orb0byMieTJ$Q@ Ei%"JWOe8&c0JZ0c,34VniSS@vm叁>ZqA(4!4I1>CTw[樓w=djj(cT]0ϭ'/1& ~Ʌ [(Ilp[\e;Ʒ%QX7^ps@@#bO? V8#%fbQ?'/fa dG}Cz>1O9Iq7rCLxgwy$YKN#R%ke?gZKzbW\Lf꟩Z&SKGsx8J_`9G7GN~xT x#r_4q¡#BIpX%mVqqՈx!"Y9++@';9QaIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_upload_file.png000077500000000000000000000033731303466605000313410ustar00rootroot00000000000000PNG  IHDR00` PLTEڤMP[ɣpy饆]]۪kj>~BOb咽ӋřMԤg8z5y¹ɢia`ҽФ1vQ`wxWx󨟼򠕴o_~=|yؤnKY쥓Qe抮BVr%IܒzJJJzzzbbbbbbbbbbbbbbbbbbbbbbbbbbbJJJzzzbbbbbbbbbbbbJJJzzzJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJnnnJJJnnnJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJߘ,:tRNS@f pHYs.#.#x?vIDATxڥV_A5+c5G@ԅ QX4%˲wߺ3Et3w:5v)'PJ  .=&͘B#??>]9$ݓZ`Rt=G f+'e 2>ѽUU][(N8'9ߺ"=qJToI@l?+G:O&ˆqΚJ~GOsg&Įl7yJA'y"j @94~;C= p2ɝT #g?5MpZž<՟q`N Bxg,?9_t6jx^c0VokeӾ|*RF";!efg͓tlzݣ|cϭ,=dt9̋T5xF: 8=E};"h zPʢKkq]ljM?*D'Ѫ 50\dNDDzIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_upload_file_a.png000077500000000000000000000036241303466605000316400ustar00rootroot00000000000000PNG  IHDR00` PLTEbU<:@JY~0-:*0r:89;IAQ@TI:81z5/d:h_RPy0覢IF[G^,RRun椢갮8ŰutRNS@f pHYs.#.#x?v-IDATxڍV _W{`Y &4AՒDFbPTA~;v]/;g0G@PJ  {/6Lxi7{%fQ@_!ʹo';_?NA E#'@* h4 A[Y?SVD7%CÐ6Lw~[ۤ~wFOz p>n:^&!T/}mL>& $%fPsOqI+ʰsZC港s>5]4/iu.2r1HAԃX fP |40~=)6ҪѼ Yq?Y `"~fkV vYk^^Yb{_ L O@Q[~&9hTƈtu cU/H]LTaoϦ?Ύ__q7\Jt@ m|5v+}^ޘVBuy|TΟ([[Ew Wg ٯMA@_gt;B@U{k䛻6Ǖ2ߩokЃTJ*ӓG~s|gGͽQk I]~O? *(1dO&rO z=L23vDFѹX񳿇Y0qJ3)SǟݎV9CTtA\hˁq$ >mzA]>hlN&uY`|e 0 bA4 |3 DaOIi_F=٭cۮ=n/r?<(lLPBbJOhm7>6GOVJ SF{qבm)U [*ڻ1~b108)elgZWꄝHT/W&属C,2b\l~ W*/^M25ft@[_o@Yk84 KV \ <:ŢƠ#46| s]~Lm${q;*E+EyMjI;LkT[G~fRYU2L!<*'o[/j!tv.D@e90e^*>-@S!\]r@(gpIү`oUXcѱ.{yu{09ǚT+%R*z@J\P,]hLE,=5ji@Bk0fsb/sAb1/oϳs esmpbs?;fΦIENDB`ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/img/ms_users_a.png000077500000000000000000000035671303466605000305240ustar00rootroot00000000000000PNG  IHDR00` PLTEbU<9@JY~0-0rz*<::8<1I9PIIB:>.BFPG解곳qvpeha칺],16┓ހ}<7ZL<0VP{8:ach7堠嚖߀z9m9\[訣/"Q6J0P?Z6]2i4@kQ/ <˔pyY7j 9'?57?.JQ?5u{lv:dK絨"r#T.hֈ@@7m >[sO~u7N #0mWF\. {_ݟ|[eD4׀1^T }_^bu $ A `=fo؞^83MSĕLhma CSS Star Wars Crawling Titles

A long long story of a opensource solution

OCSInventoryNGOpen Computers and Software Inventory Next Generation

LICENCE

Learn more about how OCS Inventory is licensed and how this affects you.

OCS Inventory is released under the GNU General Public License, version 2.0 (GNU GPLv2).

The GNU GPL provides for a person or persons to distribute OCS Inventory for a fee,

but not actually charging for the software itself, because OCS Inventory is free.

OCS Inventory is free to share and change, but if you do change it in anyway, can you also change the license and make it commercial?

No! The whole GPL is devoted to ensuring this does not happen. Copyright, a much more refined and stringent law will prevent this as well.

So with regard to OCS Inventory, the GPL and copyright:

You MAY distribute it and charge for that service. You MAY change it, add design and content to it and you MAY charge for that.

You may NOT alter the license and you must NOT alter the copyright.

In other words, you must NOT pretend that OCS Inventory is yours, and you must NOT charge people for OCS Inventory.

Use OCS Inventory to empower yourself and your clients. Charge for the value you add and not for the hard work

that OCS Inventory Development Team and the OCS Inventory community have put into it.

Guidelines

OCS Inventory is "free" software released under the GNU General Public License, version 2.0 (GNU GPLv2).

The word "free" has two legitimate general meanings; it can refer either to freedom or to price.

When we speak of "free software", we're talking about freedom, not price. (Think of "free speech", not "free beer".)

Free software is a matter of the users' freedom to run, copy, distribute, study, change and improve the software.

More precisely, it refers to four kinds of freedom, for the users of the software:

The freedom to run the program, for any purpose.

The freedom to study how the program works, and adapt it to your needs (Access to the source code is a precondition for this.)

The freedom to redistribute copies so you can help your neighbour.

The freedom to improve the program, and release your improvements to the public, so that the whole community benefits.

(Access to the source code is a precondition for this)

Who owns the copyright to OCS Inventory? The copyright to OCS Inventory is held by OCS Inventory Development Team.

Are there any restrictions to your use of OCS Inventory? The GNU GPL grants you the freedom to use the software

for whatever purpose you see fit.

May I charge money for OCS Inventory? The GPL allows everyone the freedom to do this. The right to charge money

to distribute OCS Inventory is part of the definition of "free" software.When people think of "selling software",

they usually imagine doing it the way most companies do it: making the software proprietary rather than free.

So to avoid ambiguity you may charge to distribute the software and any other service you provide along the way.

You may not charge for the software itself.Remember if someone pays your fee the GPL also gives him or her the freedom

to pass on the software with or without a fee.

May I remove the "copyright" statements from the source code to OCS Inventory? No, you must keep all copyright

notices and credits in the source code.

I have modified OCS Inventory for my own use. Do I have to release these modifications?

The GPL permits anyone to make a modified version for their own use without the requirement to distribute it

or pass on those changes to others.

I have made a modification to the OCS Inventory core code. Do I have to release it under the GPL?

If you chose to distribute your modifications to others it must be released under the same terms

that you received the original code. So your modifications must be released under the GPL.

You may of course in this case modify the headers for the source code to include your own copyright statement.

If you do so you must clearly annotate in the source code your amendments, changes or additions.

I have written an extension or additional module for OCS Inventory. Do I have to release it under the GPL? No.

The GPL allows you to write your own extensions for OCS Inventory and to release those extensions under whatever license you chose.

Disclaimer

This document refers to the software program OCS Inventory, Version 1.x and all subsequent versions,

released under the GNU General Public License and copyright OCS Inventory Development Team.

This document is subject to additions, modifications and other changes at any time without notice.

A lawyer has not prepared this document. You should consult a lawyer experienced in copyright,

licensing and intellectual property for clarification.

ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_admininfo/000077500000000000000000000000001303466605000275275ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_admininfo/ms_admininfo.php000077500000000000000000000173001303466605000327070ustar00rootroot00000000000000g(729); $accountinfo_choise['SNMP']=$l->g(1136); if (!isset($protectedPost['onglet']) or $protectedPost['onglet']=='') $protectedPost['onglet'] = 1; $form_name='admin_info'; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $data_on[1]=$l->g(1059); $data_on[2]=$l->g(1060); //$yes_no=array($l->g(454),$l->g(455)); if (isset($protectedPost['MODIF']) and is_numeric($protectedPost['MODIF']) and !isset($protectedPost['Valid_modif'])){ $protectedPost['onglet'] = 2; $accountinfo_detail= find_info_accountinfo($protectedPost['MODIF']); $protectedPost['newfield']=$accountinfo_detail[$protectedPost['MODIF']]['name']; $protectedPost['newlbl']=$accountinfo_detail[$protectedPost['MODIF']]['comment']; $protectedPost['newtype']=$accountinfo_detail[$protectedPost['MODIF']]['type']; $protectedPost['account_tab']=$accountinfo_detail[$protectedPost['MODIF']]['id_tab']; $protectedPost['accountinfo']=$accountinfo_detail[$protectedPost['MODIF']]['account_type']; $protectedPost['default_value']=$accountinfo_detail[$protectedPost['MODIF']]['default_value']; $hidden=$protectedPost['MODIF']; } if (isset($protectedPost['MODIF_OLD']) and is_numeric($protectedPost['MODIF_OLD']) and $protectedPost['Valid_modif'] != ""){ //UPDATE VALUE $msg=update_accountinfo($protectedPost['MODIF_OLD'], array('TYPE'=>$protectedPost['newtype'], 'NAME'=>$protectedPost['newfield'], 'COMMENT'=>$protectedPost['newlbl'], 'ID_TAB'=>$protectedPost['account_tab'], 'DEFAULT_VALUE'=>$protectedPost['default_value']),$protectedPost['accountinfo']); $hidden=$protectedPost['MODIF_OLD']; }elseif( $protectedPost['Valid_modif'] != "" ) { //ADD NEW VALUE $msg=add_accountinfo($protectedPost['newfield'], $protectedPost['newtype'], $protectedPost['newlbl'], $protectedPost['account_tab'], $protectedPost['accountinfo'], $protectedPost['default_value']); } if (isset($msg['ERROR'])) msg_error($msg['ERROR']); if (isset($msg['SUCCESS'])){ msg_success($msg['SUCCESS']); $protectedPost['onglet'] = 1; } echo open_form($form_name); show_tabs($data_on,$form_name,"onglet",2); echo '
'; $table="accountinfo"; if ((isset($protectedPost['ACCOUNTINFO_CHOISE']) and $protectedPost['ACCOUNTINFO_CHOISE'] == 'SNMP' and $protectedPost['onglet'] == 1) or (isset($protectedPost['accountinfo']) and $protectedPost['accountinfo'] == 'SNMP' and $protectedPost['onglet'] == 2)){ $array_tab_account=find_all_account_tab('TAB_ACCOUNTSNMP'); $account_field="TAB_ACCOUNTSNMP"; } else{ $array_tab_account=find_all_account_tab('TAB_ACCOUNTAG'); $account_field="TAB_ACCOUNTAG"; } if ($protectedPost['onglet'] == 1){ echo $l->g(56).": ".show_modif($accountinfo_choise,'ACCOUNTINFO_CHOISE',2,$form_name,array('DEFAULT' => "NO")); if ($protectedPost['ACCOUNTINFO_CHOISE'] == "SNMP") $account_choise = "SNMP"; else $account_choise = "COMPUTERS"; $tab_options['CACHE']='RESET'; if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != ''){ $list = $protectedPost['del_check']; $tab_values=explode(',',$list); $i=0; while($tab_values[$i]){ del_accountinfo($tab_values[$i]); $i++; } } if(isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != '') { del_accountinfo($protectedPost['SUP_PROF']); } $array_fields=array($l->g(1098)=>'NAME', $l->g(1063)=>'COMMENT', $l->g(66)=>'TYPE', $l->g(1061)=>'ID_TAB'); $queryDetails ="select ID,".implode(',',$array_fields)." from accountinfo_config where ACCOUNT_TYPE = '".$account_choise."'"; if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; if (!(isset($protectedPost["pcparpage"]))) $protectedPost["pcparpage"]=10; $list_fields= $array_fields; $list_fields['SUP']='ID'; $list_fields['CHECK']='ID'; $list_fields['MODIF']='ID'; $list_col_cant_del=array($l->g(1063)=>$l->g(1063),$l->g(66)=>$l->g(66),$l->g(1061)=>$l->g(1061),'SUP'=>'SUP','CHECK'=>'CHECK','MODIF'=>'MODIF'); $default_fields=$list_col_cant_del; $tab_options['REPLACE_VALUE'][$l->g(66)]=$type_accountinfo; $tab_options['REPLACE_VALUE'][$l->g(1061)]=$array_tab_account; $tab_options['LBL_POPUP']['SUP']='NAME'; $tab_options['REQUEST']['SUP']="select name_accountinfo AS FIRST from accountinfo_config where ACCOUNT_TYPE = '".$account_choise."'"; $tab_options['FIELD']['SUP']='NAME'; $tab_options['EXIST']['SUP']='NAME'; $tab_options['REQUEST']['CHECK']="select name_accountinfo AS FIRST from accountinfo_config where ACCOUNT_TYPE = '".$account_choise."'"; $tab_options['FIELD']['CHECK']='NAME'; $tab_options['EXIST']['CHECK']='NAME'; $nb_result=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //traitement par lot del_selection($form_name); //} }elseif ($protectedPost['onglet'] == 2){ //NAME FIELD $config['JAVASCRIPT'][1]=$sql_field; $name_field=array("accountinfo","newfield"); $tab_name= array($l->g(56).": ",$l->g(1070).": "); if (isset($protectedPost['MODIF_OLD']) or $protectedPost['MODIF']!=''){ $hidden=($protectedPost['MODIF'] != '' ? $protectedPost['MODIF']:$protectedPost['MODIF_OLD']); $type_field= array(3,3); $value_field=array($protectedPost['accountinfo'],$protectedPost['newfield']); } else{ $type_field= array(2,0); $value_field=array($accountinfo_choise,$protectedPost['newfield']); } if ( isset($hidden) and is_numeric($hidden)){ $tab_hidden['MODIF_OLD']=$hidden; } //if (isset($protectedGet['admin'])){ array_push($name_field,"newlbl"); array_push($tab_name,$l->g(80).":"); array_push($type_field,0); array_push($value_field,$protectedPost['newlbl']); array_push($name_field,"newtype"); array_push($tab_name,$l->g(1071).":"); array_push($type_field,2); array_push($value_field,$type_accountinfo); array_push($name_field,"account_tab"); array_push($tab_name,$l->g(1061).":"); array_push($type_field,2); array_push($value_field,$array_tab_account); if ($protectedPost['newtype']==8){ //for QRCODE type array_push($name_field,"default_value"); array_push($tab_name,$l->g(1099).":"); array_push($type_field,2); array_push($value_field,$array_qr_values); } $tab_typ_champ=show_field($name_field,$type_field,$value_field,$config); $tab_typ_champ[1]['CONFIG']['SIZE']=30; $tab_typ_champ[2]['CONFIG']['SIZE']=30; $tab_typ_champ[4]['COMMENT_AFTER']=""; $tab_typ_champ[0]['RELOAD']=$form_name; $tab_typ_champ[3]['RELOAD']=$form_name; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'form_name' => 'NO_FORM', 'show_frame' => false )); } echo "
"; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_all_computers/000077500000000000000000000000001303466605000304345ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_all_computers/ms_all_computers.php000077500000000000000000000161021303466605000345200ustar00rootroot00000000000000$value){ $checkbox=explode('check',$key); if(isset($checkbox[1])){ deleteDid($checkbox[1]); } } $tab_options['CACHE']='RESET'; } //delete one computer if ($protectedPost['SUP_PROF'] != ''){ deleteDid($protectedPost['SUP_PROF']); $tab_options['CACHE']='RESET'; } if (!isset($protectedPost['tri_'.$table_name]) or $protectedPost['tri_'.$table_name] == ""){ $protectedPost['tri_'.$table_name]="h.lastdate"; $protectedPost['sens_'.$table_name]="DESC"; } echo open_form($form_name); //BEGIN SHOW ACCOUNTINFO $accountinfo_value=interprete_accountinfo($list_fields,$tab_options); if (array($accountinfo_value['TAB_OPTIONS'])) $tab_options=$accountinfo_value['TAB_OPTIONS']; if (array($accountinfo_value['DEFAULT_VALUE'])) $default_fields=$accountinfo_value['DEFAULT_VALUE']; $list_fields=$accountinfo_value['LIST_FIELDS']; //END SHOW ACCOUNTINFO $list_fields2 = array ( $l->g(46) => "h.lastdate", 'NAME'=>'h.name', $l->g(949) => "h.ID", $l->g(24) => "h.userid", $l->g(25) => "h.osname", $l->g(568) => "h.memory", $l->g(569) => "h.processors", $l->g(33) => "h.workgroup", $l->g(275) => "h.osversion", $l->g(286) => "h.oscomments", $l->g(350) => "h.processort", $l->g(351) => "h.processorn", $l->g(50) => "h.swap", $l->g(352) => "h.lastcome", $l->g(353) => "h.quality", $l->g(354) => "h.fidelity", $l->g(53) => "h.description", $l->g(355) => "h.wincompany", $l->g(356) => "h.winowner", $l->g(357) => "h.useragent", $l->g(64) => "e.smanufacturer", $l->g(284) => "e.bmanufacturer", $l->g(36) => "e.ssn", $l->g(65) => "e.smodel", $l->g(209) => "e.bversion", $l->g(34) => "h.ipaddr", $l->g(557) => "h.userdomain", $l->g(1247)=> "h.ARCH", $l->g(210) => "e.bdate"); if ($show_mac_addr){ $list_fields2[$l->g(95)]="n.macaddr"; $list_fields2[$l->g(208)]="n.ipmask"; $list_fields2[$l->g(207)]="n.ipgateway"; $list_fields2[$l->g(331)]="n.ipsubnet"; } $list_fields=array_merge ($list_fields,$list_fields2); //asort($list_fields); $tab_options['FILTRE']=array_flip($list_fields); $tab_options['FILTRE']['h.name']=$l->g(23); asort($tab_options['FILTRE']); if ($_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES"){ $list_fields['CHECK']='h.ID'; $list_fields['SUP']='h.ID'; } $list_col_cant_del=array('SUP'=>'SUP','NAME'=>'NAME','CHECK'=>'CHECK'); $default_fields2= array($_SESSION['OCS']['TAG_LBL']['TAG']=>$_SESSION['OCS']['TAG_LBL'],$l->g(46)=>$l->g(46),'NAME'=>'NAME',$l->g(23)=>$l->g(23), $l->g(24)=>$l->g(24),$l->g(25)=>$l->g(25),$l->g(568)=>$l->g(568), $l->g(569)=>$l->g(569)); $default_fields=array_merge($default_fields,$default_fields2); $sql=prepare_sql_tab($list_fields,array('SUP','CHECK')); $tab_options['ARG_SQL']=$sql['ARG']; $queryDetails = $sql['SQL']." from hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id "; if ($show_mac_addr){ $queryDetails .= " LEFT JOIN networks n ON n.hardware_id=h.id "; $queryDetails .= " AND h.IPADDR=n.IPADDRESS "; } $queryDetails .= "LEFT JOIN bios e ON e.hardware_id=h.id where deviceid<>'_SYSTEMGROUP_' AND deviceid<>'_DOWNLOADGROUP_' "; if (isset($_GET['value']) and $_GET['filtre'] == "a.TAG"){ $tag = $_GET['value']; $queryDetails .= "AND a.TAG= '$tag' "; } if (isset($_SESSION['OCS']["mesmachines"]) and $_SESSION['OCS']["mesmachines"] != '') $queryDetails .= "AND ".$_SESSION['OCS']["mesmachines"]; $queryDetails .=" group by h.id"; $tab_options['LBL_POPUP']['SUP']='name'; $tab_options['LBL']['SUP']=$l->g(122); $tab_options['TRI']['DATE']['e.bdate']="%m/%d/%Y"; $entete = ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); // Mass_action boutons // Groups / Delete / Lock result / mass processing / Config / deploy if ($_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES"){ $list_fonct["image/delete.png"]=$l->g(122); $list_pag["image/delete.png"]=$pages_refs["ms_custom_sup"]; $tab_options['LBL_POPUP']['SUP']='name_of_machine'; } $list_fonct["image/cadena_ferme.png"]=$l->g(1019); $list_fonct["image/mass_affect.png"]=$l->g(430); if ($_SESSION['OCS']['profile']->getConfigValue('CONFIG') == "YES"){ $list_fonct["image/config_search.png"]=$l->g(107); $list_pag["image/config_search.png"]=$pages_refs['ms_custom_param']; } if ($_SESSION['OCS']['profile']->getConfigValue('TELEDIFF') == "YES"){ $list_fonct["image/tele_search.png"]=$l->g(428); $list_pag["image/tele_search.png"]=$pages_refs["ms_custom_pack"]; } $list_pag["image/groups_search.png"]=$pages_refs["ms_custom_groups"]; $list_pag["image/cadena_ferme.png"]=$pages_refs["ms_custom_lock"]; $list_pag["image/mass_affect.png"]=$pages_refs["ms_custom_tag"]; add_trait_select($list_fonct,$list_id,$form_name,$list_pag,true); echo "

"; if ($entete and $_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES"){ //echo ""; echo ""; echo ""; } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_all_soft/000077500000000000000000000000001303466605000273665ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_all_soft/ms_all_soft.php000077500000000000000000000307031303466605000324070ustar00rootroot00000000000000$values){ array_push($arr,$values); } return $arr; } if ($protectedPost['RESET']){ unset($protectedPost['NAME_RESTRICT']); unset($protectedPost['NBRE']); unset($protectedPost['CLASS']); } if ($protectedPost['SUBMIT_FORM']) $tab_options['CACHE']='RESET'; $sql_fin['SQL']=""; $sql_fin['ARG']=array(); $sql_list_alpha['ARG']=array(); if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $info_name_soft=array("table"=>"type_softwares_name","field"=>"name","field_name_soft"=>'name_id'); }elseif($_SESSION['OCS']["usecache"] == 1){ $info_name_soft=array("table"=>"softwares_name_cache","field"=>"name","field_name_soft"=>'name'); }else{ $info_name_soft=array("table"=>"softwares","field"=>"name","field_name_soft"=>'name'); } $field_name_soft=$info_name_soft['table'].".".$info_name_soft['field']; $sql_list_alpha['SQL'] ="select substr(trim(".$field_name_soft."),1,1) alpha, ".$field_name_soft." "; if (isset($protectedPost['NBRE']) and $protectedPost['NBRE'] != "" and isset($protectedPost['COMPAR']) and $protectedPost['COMPAR'] != ""){ $sql_list_alpha['SQL'] .=",count(*) nb "; $sql_fin['SQL']=" having nb %s %s "; $sql_fin['ARG']=array($protectedPost['COMPAR'],$protectedPost['NBRE']); } $sql_list_alpha['SQL'] .=" from "; $and_where=""; //if ($_SESSION['OCS']["usecache"] == 1 and $protectedPost['NBRE'] == ""){ $sql_list_alpha['SQL'] .=$info_name_soft['table']." left join dico_soft on dico_soft.extracted=".$field_name_soft; // $and_where=" where "; //}else{ // $sql_list_alpha['SQL'] .=" softwares s left join dico_soft on dico_soft.extracted=s.name "; /*if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $sql_list_alpha['SQL'] .=" left join type_softwares_name type_soft_name on type_soft_name.id=s.name "; }*/ if ($_SESSION['OCS']["mesmachines"] != ""){ if ($info_name_soft['table'] != 'softwares'){ $join=" left join softwares on softwares.".$info_name_soft['field_name_soft']."=".$field_name_soft." "; }else{ $join=""; } // left join softwares s on s.".$info_name_soft['field_name_soft']."=".$field_name_soft." $sql_list_alpha['SQL'] .=$join.",accountinfo a where ".$_SESSION['OCS']["mesmachines"]." and a.hardware_id=softwares.HARDWARE_ID "; $and_where=" and "; }else $and_where=" where "; //} $sql_list_alpha['SQL'] .=$and_where." substr(trim(".$field_name_soft."),1,1) is not null "; if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != ""){ $sql_list_alpha['SQL'] .=" and ".$field_name_soft." like '%s' "; $sql_list_alpha['ARG']=array('%'.$protectedPost['NAME_RESTRICT'].'%'); } /*if (isset($protectedPost['CLASS']) and $protectedPost['CLASS'] != ""){ $sql_list_alpha['SQL'].=" and (dico_soft.formatted in "; $sql_list_alpha=mysql2_prepare($sql_list_alpha['SQL'],$sql_list_alpha['ARG'],$list_soft_by_statut[$protectedPost['CLASS']]); $sql_list_alpha['SQL'] .=" ) "; }*/ $sql_list_alpha['SQL'] .=" group by ".$field_name_soft." ".$sql_fin['SQL']; //if ($sql_list_alpha['ARG'] != array() and $sql_fin['ARG'] != array()) $sql_list_alpha['ARG']=array_merge_values($sql_list_alpha['ARG'],$sql_fin['ARG']); //elseif ($sql_fin['ARG'] != array() and $sql_list_alpha['ARG'] == array()) // $sql_list_alpha['ARG']=$sql_fin['ARG']; unset($_SESSION['OCS']['REQ_ONGLET_SOFT']); /*p($sql_fin['ARG']); p($sql_list_alpha['ARG']);*/ //execute the query only if necessary if($_SESSION['OCS']['REQ_ONGLET_SOFT'] != $sql_list_alpha or !isset($protectedPost['onglet'])){ $result_list_alpha = mysql2_query_secure( $sql_list_alpha['SQL'], $_SESSION['OCS']["readServer"],$sql_list_alpha['ARG']); while($item_list_alpha = mysqli_fetch_object($result_list_alpha)){ if (mb_strtoupper($item_list_alpha -> alpha) == '"') $car="'"; else $car=mb_strtoupper($item_list_alpha -> alpha); if ($car != ""){ if (!isset($protectedPost['onglet'])) $protectedPost['onglet']=$car; $list_alpha[$car]=$car; if (!isset($first)){ $first=$car; } } } if (!isset($list_alpha[$protectedPost['onglet']])){ $protectedPost['onglet']=$first; } $_SESSION['OCS']['REQ_ONGLET_SOFT']= $sql_list_alpha; $_SESSION['OCS']['ONGLET_SOFT']=$list_alpha; } $form_name = "all_soft"; $table_name="all_soft"; echo open_form($form_name); onglet($_SESSION['OCS']['ONGLET_SOFT'],$form_name,"onglet",20); echo '
'; if ((isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != "") or ((isset($protectedPost['NBRE']) and $protectedPost['NBRE'] != ""))) msg_warning($l->g(767)); //use cache if ($_SESSION['OCS']["usecache"] == 1 and !(isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1)){ $search_soft['SQL']="select name,id from softwares_name_cache"; //$forcedRequest['SQL']=$search_soft['SQL']; if(isset($protectedPost['onglet'])){ $search_soft['SQL'].=" where name like '%s'"; $search_soft['ARG']=array($protectedPost['onglet']."%"); $and_where=" where "; if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != ""){ //$forcedRequest['SQL'].= $and_where." name like '%s' "; //$forcedRequest['ARG']=array("%".$protectedPost['NAME_RESTRICT']."%"); $search_soft['SQL'].=" and name like '%s' "; array_push($search_soft['ARG'],"%".$protectedPost['NAME_RESTRICT']."%"); $and_where=" and "; } }else{ if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != ""){ //$forcedRequest['SQL'].= $and_where." name like '%s' "; //$forcedRequest['ARG']=array("%".$protectedPost['NAME_RESTRICT']."%"); $search_soft['SQL'].=" WHERE name like '%s' "; $search_soft['ARG'][]="%".$protectedPost['NAME_RESTRICT']."%"; } } /*if (isset($protectedPost['CLASS']) and $protectedPost['CLASS'] != ""){ // $fin_sql=" and dico_soft.extracted is not null "; $forcedRequest.= $and_where." (dico_soft.formatted in ('".implode("','",$list_soft_by_statut[$protectedPost['CLASS']])."') ) and "; $search_soft.=" and (dico_soft.formatted in ('".implode("','",$list_soft_by_statut[$protectedPost['CLASS']])."') ) "; }*/ $result_search_soft = mysql2_query_secure( $search_soft['SQL'], $_SESSION['OCS']["readServer"],$search_soft['ARG']); $list_soft=""; while($item_search_soft = mysqli_fetch_object($result_search_soft)){ if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $list_soft[]=$item_search_soft->id; }else{ $list_soft[]=$item_search_soft->name; } } } if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $field_name_soft="s.name_id"; }elseif($_SESSION['OCS']["usecache"] == 1){ $field_name_soft="s.name"; }else{ $field_name_soft="s.name"; $info_name_soft['table']="s"; } /* if ((!isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) or $_SESSION['OCS']['USE_NEW_SOFT_TABLES']!= 1) and $_SESSION['OCS']["usecache"] == 1){ $field_name_soft="s.name"; }else{ $field_name_soft="s.name_id";*/ if ($list_soft != ""){ $and_where=""; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $sql_re['SQL']="select ".$info_name_soft['table'].".name , count(s.".$info_name_soft['field_name_soft'].") nb, s.".$info_name_soft['field_name_soft']." id from softwares s left join ".$info_name_soft['table']." on ".$info_name_soft['table'].".id=s.".$info_name_soft['field_name_soft']." "; }else{ $sql_re['SQL']="select s.".$info_name_soft['field_name_soft']." , count(s.".$info_name_soft['field_name_soft'].") nb, s.".$info_name_soft['field_name_soft']." id from softwares s "; } if (isset($_SESSION['OCS']["mesmachines"]) and $_SESSION['OCS']["mesmachines"] != ''){ $sql_re['SQL'].=",accountinfo a where ".$_SESSION['OCS']["mesmachines"]." and a.hardware_id=s.HARDWARE_ID"; $and_where=" and "; }else $and_where=" where "; //$_SESSION['OCS']["forcedRequest"]=$sql['SQL'].$and_where." name in (".$forcedRequest.")"; $sql_re['SQL'].=$and_where." s.".$info_name_soft['field_name_soft']." in "; $sql_re['ARG']=array(); $sql=mysql2_prepare($sql_re['SQL'],$sql_re['ARG'],$list_soft); //$sql['ARG']=('".implode("','",$list_soft)."')"; //$sql.=$fin_sql; }elseif(!isset($list_soft)){ $and_where=""; $sql['SQL']="select ".$info_name_soft['table'].".".$info_name_soft['field'].", count(s.".$info_name_soft['field_name_soft'].") nb, s.".$info_name_soft['field_name_soft']." id from softwares s"; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $sql['SQL'] .=" left join ".$info_name_soft['table']." on ".$info_name_soft['table'].".id=s.".$info_name_soft['field_name_soft']." "; } $sql['ARG']=array(); if (isset($_SESSION['OCS']["mesmachines"]) and $_SESSION['OCS']["mesmachines"] != ''){ $sql['SQL'].=",accountinfo a where ".$_SESSION['OCS']["mesmachines"]." and a.hardware_id=s.HARDWARE_ID"; $and_where=" and "; }else $and_where=" where "; //$_SESSION['OCS']["forcedRequest"]=$sql; $sql['SQL'].=$and_where." ".$info_name_soft['table'].".".$info_name_soft['field']." like '%s'"; array_push($sql['ARG'],$protectedPost['onglet']."%"); if (isset($protectedPost['NAME_RESTRICT']) and $protectedPost['NAME_RESTRICT'] != ""){ $sql['SQL'].=" and ".$info_name_soft['table'].".".$info_name_soft['field']." like '%s' "; array_push($sql['ARG'],"%".$protectedPost['NAME_RESTRICT']."%"); //$_SESSION['OCS']["forcedRequest"].=$and_where."name like '%".$protectedPost['NAME_RESTRICT']."%'" ; } } if (isset($sql)){ $sql['SQL'].=" group by ".$field_name_soft; // $_SESSION['OCS']["forcedRequest"].=" group by name"; if ($sql_fin['SQL'] != ''){ $sql['SQL'].=$sql_fin['SQL']; $sql['ARG']= array_merge_values($sql['ARG'],$sql_fin['ARG']); // $_SESSION['OCS']["forcedRequest"].=$sql_fin; } $list_fields= array('name'=>'name', 'nbre'=>'nb' ); $default_fields= $list_fields; $list_col_cant_del=$default_fields; $tab_options['LIEN_LBL']['nbre']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_multi_search'].'&prov=allsoft&value='; $tab_options['LIEN_CHAMP']['nbre']='id'; $tab_options['LBL']['name']=$l->g(847); $tab_options['LBL']['nbre']=$l->g(1120); $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); } echo "

".$l->g(735)."

"; echo "

".$l->g(382).": ".show_modif($protectedPost['NAME_RESTRICT'],'NAME_RESTRICT',0)."

"; echo "

".$l->g(381).": ".show_modif(array('<'=>'<','>'=>'>','='=>'='),'COMPAR',2); echo show_modif($protectedPost['NBRE'],'NBRE',0,'',array('MAXLENGTH'=>100,'SIZE'=>10,'JAVASCRIPT'=>$numeric))."

"; //echo ""; echo "".$l->g(183)." ".$l->g(765).""; if ($protectedPost['COMPAR'] == '<' and $protectedPost['NBRE']<=15 and $protectedPost['NBRE'] != "") echo "".$l->g(912).""; echo "

"; echo '
'; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_computer/000077500000000000000000000000001303466605000274215ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_computer/ms_computer.php000077500000000000000000000072131303466605000324750ustar00rootroot00000000000000DEVICEID == "_DOWNLOADGROUP_" or $item->DEVICEID == "_SYSTEMGROUP_"){ die('FORBIDDEN'); } $systemid = $item->ID; if (!isset($protectedGet['option']) and !isset($protectedGet['cat'])) { $protectedGet['cat'] = 'admin'; } echo '
'; show_computer_menu($item->ID); echo '
'; echo '
'; show_computer_title($item); if (isset($protectedGet['cat']) and $protectedGet['cat'] == 'admin') { show_computer_summary($item); } //Wake On Lan function if (isset($protectedPost["WOL"]) and $protectedPost["WOL"] == 'WOL' and $_SESSION['OCS']['profile']->getRestriction('WOL', 'NO')=="NO"){ require_once('require/function_wol.php'); $wol = new Wol(); $sql = "select MACADDR,IPADDRESS from networks WHERE (hardware_id=%s) and status='Up'"; $arg = array($item->ID); $resultDetails = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"], $arg); $msg = ""; while ($item = mysqli_fetch_object($resultDetails)){ $wol->wake($item->MACADDR,$item->IPADDRESS); if ($wol->wol_send == $l->g(1282)) { msg_info($wol->wol_send."=>".$item->MACADDR."/".$item->IPADDRESS); } else { msg_error($wol->wol_send."=>".$item->MACADDR."/".$item->IPADDRESS); } } } if ($ajax) { ob_end_clean(); } $plugins_serializer = new XMLPluginsSerializer(); $plugins = $plugins_serializer->unserialize(file_get_contents('config/computer/plugins.xml')); if (isset($protectedGet['cat']) and in_array($protectedGet['cat'], array('software', 'hardware', 'devices', 'admin', 'config', 'other'))) { // If category foreach ($plugins as $plugin) { if ($plugin->getCategory() == $protectedGet['cat']) { $plugin_file = PLUGINS_DIR."computer_detail/".$plugin->getId()."/".$plugin->getId().".php"; $protectedPost['computersectionrequest'] = $plugin->getId(); if (file_exists($plugin_file)) { if ($plugin->getHideFrame()) { require $plugin_file; } else { echo '
'; require $plugin_file; echo '
'; } } } } } else if (isset($protectedGet['option']) and isset($plugins[$protectedGet['option']])) { // If specific plugin $plugin = $plugins[$protectedGet['option']]; $plugin_file = PLUGINS_DIR."computer_detail/".$plugin->getId()."/".$plugin->getId().".php"; if (file_exists($plugin_file)) { if (!$ajax) echo '
'; require $plugin_file; if (!$ajax) echo '
'; } } else { // Else error msg_error('Page not found'); } echo '
'; if ($ajax) { ob_end_clean(); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_computer/ms_computer_views.php000077500000000000000000000114411303466605000337100ustar00rootroot00000000000000unserialize(file_get_contents('config/computer/menu.xml')); $menu_renderer = new ComputerMenuRenderer($computer_id, $_SESSION['OCS']['url_service']); echo ''; } function show_computer_title($computer) { global $l; $urls = $_SESSION['OCS']['url_service']; echo '

'; echo $computer->NAME; if ($_SESSION['OCS']['profile']->getRestriction('EXPORT_XML', 'NO') == "NO") { echo ' '.$l->g(1304).''; } echo '

'; } function show_computer_summary($computer) { global $l; $urls = $_SESSION['OCS']['url_service']; $labels = array( 'SYSTEM' => array( 'USERID' => $l->g(24), 'OSNAME' => $l->g(274), 'OSVERSION' => $l->g(275), 'OSCOMMENTS' => $l->g(286), 'DESCRIPTION'=> $l->g(53), 'WINCOMPANY' => $l->g(51), 'WINOWNER' => $l->g(348), 'WINPRODID' => $l->g(111), 'WINPRODKEY' => $l->g(553), 'VMTYPE' => $l->g(1267), ), 'NETWORK' => array( 'WORKGROUP' => $l->g(33), 'USERDOMAIN' => $l->g(557), 'IPADDR' => $l->g(34), 'NAME_RZ' => $l->g(304), ), 'HARDWARE' => array( 'SWAP' => $l->g(50), 'MEMORY' => $l->g(26), 'UUID' => $l->g(1268), 'ARCH' => $l->g(1247) ), 'AGENT' => array( 'USERAGENT' => $l->g(357), 'LASTDATE' => $l->g(46), 'LASTCOME'=> $l->g(820), ), ); $cat_labels = array( 'SYSTEM' => $l->g(1387), 'NETWORK' => $l->g(1388), 'HARDWARE' => $l->g(1389), 'AGENT' => $l->g(1390), ); foreach ($labels as $cat_key => $cat) { foreach ($cat as $key => $lbl) { if ($key == "MEMORY") { $sqlMem = "SELECT SUM(capacity) AS 'capa' FROM memories WHERE hardware_id=%s"; $argMem = $computer->ID; $resMem = mysql2_query_secure($sqlMem, $_SESSION['OCS']["readServer"], $argMem); $valMem = mysqli_fetch_array($resMem); if ($valMem["capa"] > 0) { $memory = $valMem["capa"]; } else { $memory = $computer->$key; } $data[$key]=$memory; } elseif ($key == "LASTDATE" or $key == "LASTCOME") { $data[$key]=dateTimeFromMysql($computer->$key); } elseif ($key == "NAME_RZ") { $data[$key]=""; $data_RZ=subnet_name($computer->ID); $nb_val=count($data_RZ); if ($nb_val == 1) { $data[$key] = $data_RZ[0]; } elseif (isset($data_RZ)) { foreach($data_RZ as $index => $value) { $data[$key] .= $index." => ".$value."
"; } } } elseif ($key == "VMTYPE" and $computer->UUID != '') { $sqlVM = "select vm.hardware_id,vm.vmtype, h.name from virtualmachines vm left join hardware h on vm.hardware_id=h.id where vm.uuid='%s' order by h.name DESC"; $argVM = $computer->UUID; $resVM = mysql2_query_secure($sqlVM,$_SESSION['OCS']["readServer"],$argVM); $valVM = mysqli_fetch_array( $resVM ); $data[$key]=$valVM['vmtype']; $link_vm="".$valVM['name'].""; $link[$key]=true; if ($data[$key] != '') { msg_info($l->g(1266)."
".$l->g(1269).': '.$link_vm); } } elseif ($key == "IPADDR" and $_SESSION['OCS']['profile']->getRestriction('WOL', 'NO')=="NO") { $data[$key] = $computer->$key." WOL"; $link[$key] = true; } elseif ($computer->$key != '') { $data[$key] = $computer->$key; } } } echo open_form("bandeau"); show_summary($data, $labels, $cat_labels, $link); echo ""; echo close_form(); } function show_summary($data, $labels, $cat_labels, $links = array()) { global $protectedGet, $pages_refs; $data = data_encode_utf8($data); $nb_col = 2; $i = 0; echo ''; foreach ($labels as $cat_key => $cat) { if ($i % $nb_col == 0) { echo ''; } echo ''; $i++; if ($i % $nb_col == 0) { echo ''; } } if ($i % $nb_col != 0) { echo ''; } echo '
'; echo '
'.mb_strtoupper($cat_labels[$cat_key]).'
'; foreach ($cat as $name => $label) { $value = $data[$name]; if (trim($value) != '') { if (!array_key_exists($name, $links)) { $value = strip_tags_array($value); } if ($name == "IPADDR") { $value = preg_replace('/([x0-9])\//', '$1 / ', $value); } echo '
'.$label.' :
'; echo '
'.$value.'
'; } } echo '
'; } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_computer/ms_qrcode.php000077500000000000000000000026711303466605000321170ustar00rootroot00000000000000getBarcodeObj('QRCODE,H', $msg, 400, 400, 'black',array(20,20,20,20)); $qrcode->getPng(); } ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/000077500000000000000000000000001303466605000270305ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_adminvalues.php000077500000000000000000000153331303466605000325600ustar00rootroot00000000000000g(1059); $data_on[2]=$l->g(1060); if (isset($protectedGet['new_field']) and is_numeric($protectedGet['new_field'])) $lbl_new_field=$l->g($protectedGet['new_field']); else $lbl_new_field=$l->g(80); //if no tab selected if (!isset($protectedPost['onglet']) or $protectedPost['onglet']=='') $protectedPost['onglet'] = 1; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; //faire la vérif sur le tag en get //for update name if (isset($protectedPost['MODIF']) and is_numeric($protectedPost['MODIF']) and !isset($protectedPost['Valid_modif'])){ $protectedPost['onglet'] = 2; $val_info=look_config_default_values(array($protectedGet['tag']."_".$protectedPost['MODIF'])); $protectedPost['newfield']=$val_info['tvalue'][$protectedGet['tag']."_".$protectedPost['MODIF']]; if (isset($protectedGet['nb_field']) and is_numeric($protectedGet['nb_field'])) $protectedPost['2newfield']=$val_info['comments'][$protectedGet['tag']."_".$protectedPost['MODIF']]; $hidden=$protectedPost['MODIF']; } echo open_form($form_name); onglet($data_on,$form_name,"onglet",2); echo '
'; if ($protectedPost['onglet'] == 1){ $tab_options['CACHE']='RESET'; //delete few fields if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != ''){ $list = $protectedPost['del_check']; $sql_delete="DELETE FROM config WHERE name like '%s' and ivalue in (%s)"; $arg_delete=array($protectedGet['tag']."_%",$list); mysql2_query_secure($sql_delete,$_SESSION['OCS']["readServer"],$arg_delete); if ($protectedGet['form']) reloadform_closeme($protectedGet['form']); } //delete on field if(isset($protectedPost['SUP_PROF'])) { delete($protectedGet['tag']."_".$protectedPost['SUP_PROF']); } $queryDetails ="select IVALUE,TVALUE from config where name like '".$protectedGet['tag']."\_%'"; if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; if (!(isset($protectedPost["pcparpage"]))) $protectedPost["pcparpage"]=5; $list_fields[$l->g(224)]='TVALUE'; $list_fields['SUP']='IVALUE'; $list_fields['MODIF']='IVALUE'; $list_fields['CHECK']='IVALUE'; $tab_options['LBL_POPUP']['SUP']='TVALUE'; $list_col_cant_del=$list_fields; $default_fields=$list_col_cant_del; $are_result=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //traitement par lot if ($are_result){ del_selection($form_name); if ($protectedGet['form']) reloadform_closeme($protectedGet['form']); } }elseif ($protectedPost['onglet'] == 2){ if (isset($protectedPost['MODIF_OLD']) and is_numeric($protectedPost['MODIF_OLD']) and $protectedPost['Valid_modif'] != ""){ //UPDATE VALUE update_config($protectedGet['tag']."_".$protectedPost['MODIF_OLD'],'TVALUE',$protectedPost['newfield']); if (isset($protectedPost['2newfield'])) update_config($protectedGet['tag']."_".$protectedPost['MODIF_OLD'],'COMMENTS',$protectedPost['2newfield'],false); $hidden=$protectedPost['MODIF_OLD']; }elseif( $protectedPost['Valid_modif'] != "" ) { //ADD NEW VALUE //vérification que le nom du champ n'existe pas pour les nouveaux champs if (trim($protectedPost['newfield']) != ''){ $sql_verif="SELECT count(*) c FROM config WHERE TVALUE = '%s' and NAME like '%s'"; //echo $sql_verif; $arg_verif=array($protectedPost['newfield'],$protectedGet['tag']."_%"); $res_verif = mysql2_query_secure( $sql_verif, $_SESSION['OCS']["readServer"],$arg_verif); //echo $val_verif = mysqli_fetch_array( $res_verif ); $val_verif = mysqli_fetch_array( $res_verif ); if ($val_verif['c'] > 0) $ERROR=$l->g(656); }else $ERROR=$l->g(1068); if (!isset($ERROR)){ $sql_new_value="SELECT max(ivalue) max FROM config WHERE NAME like '%s'"; $arg_new_value=array($protectedGet['tag']."_%"); $res_new_value = mysql2_query_secure( $sql_new_value, $_SESSION['OCS']["readServer"],$arg_new_value); $val_new_value = mysqli_fetch_array( $res_new_value ); if ($val_new_value['max'] == "") $val_new_value['max']=0; $val_new_value['max']++; $sql_insert="INSERT INTO config (NAME,TVALUE,IVALUE"; if (isset($protectedPost['2newfield'])) $sql_insert.=",COMMENTS"; $sql_insert.=") VALUES('%s','%s','%s'"; if (isset($protectedPost['2newfield'])) $sql_insert.=",'%s'"; $sql_insert.=")"; $arg_insert=array($protectedGet['tag']."_".$val_new_value['max'],$protectedPost['newfield'],$val_new_value['max']); if (isset($protectedPost['2newfield'])) array_push($arg_insert,$protectedPost['2newfield']); mysql2_query_secure($sql_insert,$_SESSION['OCS']["readServer"],$arg_insert); //si on ajoute un champ, il faut créer la colonne dans la table downloadwk_pack msg_success($l->g(1069)); if ($protectedGet['form']) reloadform_closeme($protectedGet['form']); }else msg_error($ERROR); } if ( isset($hidden) and is_numeric($hidden)){ $tab_hidden['MODIF_OLD']=$hidden; } //NAME FIELD $name_field=array("newfield"); $tab_name[0]=$lbl_new_field; $type_field= array(0); $value_field=array($protectedPost['newfield']); if (isset($protectedGet['nb_field']) and is_numeric($protectedGet['nb_field'])){ array_push($name_field,'2newfield'); array_push($tab_name,$l->g($protectedGet['nb_field'])); array_push($type_field,0); array_push($value_field,$protectedPost['2newfield']); } $tab_typ_champ=show_field($name_field,$type_field,$value_field); $tab_typ_champ[0]['CONFIG']['SIZE']=20; if (isset($protectedGet['nb_field']) and is_numeric($protectedGet['nb_field'])){ $tab_typ_champ[1]['CONFIG']['SIZE']=20; } tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'form_name' => 'NO_FORM' )); } echo "
"; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_blacklist.php000077500000000000000000000125551303466605000322230ustar00rootroot00000000000000g(703)); if ($protectedPost['onglet'] == "" or !isset($protectedPost['onglet'])) $protectedPost['onglet']=1; $tab_options=$protectedPost; //définition des onglets $data_on[1]=$l->g(95); $data_on[2]=$l->g(36); $data_on[3]=$l->g(2005); $data_on[4]=$l->g(116); if (isset($protectedPost['enre'])){ if ($protectedPost['BLACK_CHOICE'] == 1){ $ok=add_mac_add($protectedPost); } if ($protectedPost['BLACK_CHOICE'] == 3){ $ok=add_subnet_add($protectedPost); } if ($protectedPost['BLACK_CHOICE'] == 2){ $ok=add_serial_add($protectedPost); } if ($ok){ msg_error($ok); }else unset($_SESSION['OCS']['DATA_CACHE'],$_SESSION['OCS']['NUM_ROW']); } echo open_form($form_name); show_tabs($data_on,$form_name,"onglet",10); echo '
'; if ($protectedPost['onglet'] == 1){ $table_name="blacklist_macaddresses"; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields= array('ID'=>'ID', 'MACADDRESS'=>'MACADDRESS', 'SUP'=>'ID', //'MODIF'=>'ID', 'CHECK'=>'ID'); $list_col_cant_del=$list_fields; $default_fields=$list_fields; $tab_options['FILTRE']=array('MACADDRESS'=>'MACADDRESS'); $tab_options['LBL_POPUP']['SUP']='MACADDRESS'; $tab_options['LBL']['MACADDRESS']=$l->g(95); }elseif($protectedPost['onglet'] == 2){ $table_name="blacklist_serials"; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields= array('ID'=>'ID', 'SERIAL'=>'SERIAL', 'SUP'=>'ID', //'MODIF'=>'ID', 'CHECK'=>'ID'); $list_col_cant_del=$list_fields; $default_fields=$list_fields; $tab_options['FILTRE']=array('SERIAL'=>'SERIAL'); $tab_options['LBL_POPUP']['SUP']='SERIAL'; $tab_options['LBL']['SERIAL']=$l->g(36); }elseif($protectedPost['onglet'] == 3){ $table_name="blacklist_subnet"; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields= array('ID'=>'ID', 'SUBNET'=>'SUBNET', 'MASK'=>'MASK', 'SUP'=>'ID', //'MODIF'=>'ID', 'CHECK'=>'ID'); $list_col_cant_del=$list_fields; $default_fields=$list_fields; $tab_options['FILTRE']=array('SUBNET'=>'SUBNET','MASK'=>'MASK'); $tab_options['LBL_POPUP']['SUP']='SUBNET'; $tab_options['LBL']['SUBNET']=$l->g(2005); }elseif ($protectedPost['onglet'] == 4){ $list_action[1]=$l->g(95); $list_action[2]=$l->g(36); $list_action[3]=$l->g(2005); echo "

".$l->g(700).": ".show_modif($list_action,"BLACK_CHOICE",2,$form_name)."

"; if (isset($protectedPost['BLACK_CHOICE']) and $protectedPost['BLACK_CHOICE'] != ''){ $aff=""; } if (isset($aff)){ $aff.="
"; if ($protectedPost['BLACK_CHOICE'] == 1){ $aff.=$l->g(654).": "; $aff=show_blacklist_fields($MACnb_field,$protectedPost,$MACfield_name,$MACnb_value_by_field,$MACsize,$MACseparat,$javascript_mac); }elseif ($protectedPost['BLACK_CHOICE'] == 3){ $aff.=$l->g(1142).": "; $aff=show_blacklist_fields($SUBnb_field,$protectedPost,$SUBfield_name,$SUBnb_value_by_field,$SUBsize,$SUBseparat,$chiffres); $aff.=$l->g(1143).": "; $aff=show_blacklist_fields($MASKnb_field,$protectedPost,$MASKfield_name,$MASKnb_value_by_field,$MASKsize,$MASKseparat,$chiffres); }elseif ($protectedPost['BLACK_CHOICE'] == 2){ $aff.=$l->g(702).": "; $aff=show_blacklist_fields($SERIALnb_field,$protectedPost,$SERIALfield_name,$SERIALnb_value_by_field,$SERIALsize,$SERIALseparat); //$aff.="
"; echo $aff; } } } if (isset($list_fields)){ //cas of delete mac address or serial if(isset($protectedPost["SUP_PROF"]) and is_numeric($protectedPost["SUP_PROF"])){ $sql="delete from %s where id=%s"; $arg=array($table_name,$protectedPost["SUP_PROF"]); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != ''){ $sql="delete from %s where id in (%s)"; $arg=array($table_name,$protectedPost['del_check']); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); $tab_options['CACHE']='RESET'; } $sql=prepare_sql_tab($list_fields,array('SUP','CHECK','MODIF')); $sql['SQL'].= " from ".$table_name; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); del_selection($form_name); } echo "
"; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_config.php000077500000000000000000000062641303466605000315200ustar00rootroot00000000000000g(728); //Inventory $def_onglets['SERVER']=$l->g(499); //Server $def_onglets['IPDISCOVER']=$l->g(312); //IP Discover $def_onglets['TELEDEPLOY']=$l->g(512); //Teledeploy $def_onglets['REDISTRIB']=$l->g(628); //redistribution servers $def_onglets['GROUPS']=$l->g(583); //Groups $def_onglets['REGISTRY']=$l->g(211); //Registry $def_onglets['INV_FILE']=$l->g(734); //Inventory file $def_onglets['FILTER']=$l->g(735); //Filter $def_onglets['WEBSERVICES']=$l->g(760); //Webservice $def_onglets['GUI']=$l->g(84); //GUI $def_onglets['CNX']=$l->g(1108); //connexion $def_onglets['SNMP']=$l->g(1136); //SNMP $def_onglets['WOL']=$l->g(1279); //WOL $def_onglets['PLUGINSCONF']=$l->g(6000); //Plugins Configuration if (DEV_OPTION) $def_onglets['DEV']=$l->g(1302); if ($protectedPost['Valid'] == $l->g(103)){ $etat=verif_champ(); if ($etat == ""){ update_default_value($protectedPost); //function in function_config_generale.php $MAJ=$l->g(1121); }else{ $msg=""; foreach ($etat as $name=>$value){ if (!is_array($value)) $msg.=$name." ".$l->g(759)." ".$value."
"; else{ if (isset($value['FILE_NOT_EXIST'])){ if ($name == 'DOWNLOAD_REP_CREAT'){ $msg.= $name.": ".$l->g(1004)." (".$value['FILE_NOT_EXIST'].")
"; }else{ $msg.= $name.": ".$l->g(920)." ".$value['FILE_NOT_EXIST']."
"; } } } } msg_error($msg); } } if (isset($MAJ) and $MAJ != '') msg_success($MAJ); $form_name='modif_onglet'; echo open_form($form_name); onglet($def_onglets,$form_name,'onglet',8); echo '
'; switch ($protectedPost['onglet']){ case 'CNX': pageConnexion($form_name); break; case 'GUI': pageGUI($form_name); break; case 'INVENTORY': pageinventory($form_name); break; case 'SERVER': pageserveur($form_name); break; case 'IPDISCOVER': pageipdiscover($form_name); break; case 'TELEDEPLOY': pageteledeploy($form_name); break; case 'REDISTRIB': pageredistrib($form_name); break; case 'GROUPS': pagegroups($form_name); break; case 'REGISTRY': pageregistry($form_name); break; case 'INV_FILE': pagefilesInventory($form_name); break; case 'FILTER': pagefilter($form_name); break; case 'WEBSERVICES': pagewebservice($form_name); break; case 'SNMP': pagesnmp($form_name); break; case 'DEV': pagesdev($form_name); break; case 'PLUGINSCONF': pagesplugin($form_name); break; case 'WOL': pageswol($form_name); break; default: pageinventory($form_name); } echo ""; echo "
"; echo close_form();ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_custom_download.php000077500000000000000000000075441303466605000334560ustar00rootroot00000000000000g(710)); debut_tab(array('CELLSPACING'=>'5', 'WIDTH'=>'70%', 'BORDER'=>'0', 'ALIGN'=>'Center', 'CELLPADDING'=>'0', 'BGCOLOR'=>'#C7D9F5', 'BORDERCOLOR'=>'#9894B5')); if(!isset($optvalue['DOWNLOAD_SWITCH'])) $optvalueselected='SERVER DEFAULT'; elseif($optvalue['DOWNLOAD_SWITCH'] == 0) $optvalueselected='OFF'; elseif($optvalue['DOWNLOAD_SWITCH'] == 1) $optvalueselected='ON'; $champ_value['VALUE']=$optvalueselected; $champ_value['ON']='ON'; $champ_value['OFF']='OFF'; $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("DOWNLOAD_SWITCH",$l->g(417),'radio',$champ_value); unset($champ_value); if(!isset($optvalue['DOWNLOAD_CYCLE_LATENCY'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("DOWNLOAD_CYCLE_LATENCY",$l->g(720),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['DOWNLOAD_CYCLE_LATENCY'],'END'=>$l->g(511),'JAVASCRIPT'=>$numeric)); if(!isset($optvalue['DOWNLOAD_FRAG_LATENCY'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("DOWNLOAD_FRAG_LATENCY",$l->g(721),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['DOWNLOAD_FRAG_LATENCY'],'END'=>$l->g(511),'JAVASCRIPT'=>$numeric)); if(!isset($optvalue['DOWNLOAD_PERIOD_LATENCY'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("DOWNLOAD_PERIOD_LATENCY",$l->g(722),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['DOWNLOAD_PERIOD_LATENCY'],'END'=>$l->g(511),'JAVASCRIPT'=>$numeric)); if(!isset($optvalue['DOWNLOAD_PERIOD_LENGTH'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("DOWNLOAD_PERIOD_LENGTH",$l->g(723),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['DOWNLOAD_PERIOD_LENGTH'],'JAVASCRIPT'=>$numeric)); if(!isset($optvalue['DOWNLOAD_TIMEOUT'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("DOWNLOAD_TIMEOUT",$l->g(424),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['DOWNLOAD_TIMEOUT'],'END'=>$l->g(496),'JAVASCRIPT'=>$numeric)); fin_tab($form_name); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_custom_frequency.php000077500000000000000000000026651303466605000336470ustar00rootroot00000000000000'5', 'WIDTH'=>'80%', 'BORDER'=>'0', 'ALIGN'=>'Center', 'CELLPADDING'=>'0', 'BGCOLOR'=>'#C7D9F5', 'BORDERCOLOR'=>'#9894B5')); if ($optvalue['FREQUENCY'] == 0 and isset($optvalue['FREQUENCY'])) $optvalueselected = 'ALWAYS'; elseif($optvalue['FREQUENCY'] == -1) $optvalueselected = 'NEVER'; elseif(!isset($optvalue['FREQUENCY'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected ='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['ALWAYS']=$l->g(485); $champ_value['NEVER']=$l->g(486); $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("FREQUENCY",$l->g(494),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['FREQUENCY'],'END'=>$l->g(496),'JAVASCRIPT'=>$numeric)); fin_tab($form_name); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_custom_ipdiscover.php000077500000000000000000000060271303466605000340110ustar00rootroot00000000000000'5', 'WIDTH'=>'80%', 'BORDER'=>'0', 'ALIGN'=>'Center', 'CELLPADDING'=>'0', 'BGCOLOR'=>'#C7D9F5', 'BORDERCOLOR'=>'#9894B5')); $mode = 0; if( $optvalueTvalue['IPDISCOVER'] && $optvalue['IPDISCOVER']==1 ) { $select_value=$optvalueTvalue['IPDISCOVER']; echo "
".$l->g(519).": ".$optvalueTvalue['IPDISCOVER']."
"; $mode = 1; } else if( $optvalue['IPDISCOVER']==2 ) { $select_value=$optvalueTvalue['IPDISCOVER']; echo "
".$l->g(520).": ".$optvalueTvalue['IPDISCOVER']."
"; $mode = 3; } else if( $optvalue['IPDISCOVER']==="0" ) { $select_value="OFF"; echo "
".$l->g(521)."
"; $mode = 2; } elseif(isset($protectedGet['idchecked'])) { echo "
".$l->g(522)."
"; } elseif(!isset($protectedGet['idchecked'])){ $mode = 2; } $lesRez['des']=$l->g(523); $lesRez['OFF']=$l->g(524); if (isset($protectedGet['idchecked']) and is_numeric($protectedGet['idchecked'])){ $sql="SELECT ipaddress FROM networks WHERE hardware_id=%s"; $arg=$protectedGet['idchecked']; $resInt = mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg ); while( $valInt = mysqli_fetch_array( $resInt )){ $sql="SELECT ipsubnet FROM networks WHERE ipaddress='%s' AND hardware_id=%s"; $arg=array($valInt["ipaddress"],$protectedGet["idchecked"]); $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg ); while( $val = mysqli_fetch_array( $res )) $lesRez[$val["ipsubnet"]] = $val["ipsubnet"]; } } ligne('IPDISCOVER',$l->g(518),'select',array('SELECT_VALUE'=>$lesRez,'VALUE'=>$select_value)); if(!isset($optvalue['SNMP_SWITCH'])) $optvalueselected='SERVER DEFAULT'; elseif($optvalue['SNMP_SWITCH'] == 0) $optvalueselected='OFF'; elseif($optvalue['SNMP_SWITCH'] == 1) $optvalueselected='ON'; $champ_value['VALUE']=$optvalueselected; $champ_value['ON']='ON'; $champ_value['OFF']='OFF'; $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } //p($optvalueTvalue); ligne("SNMP_SWITCH",$l->g(1197),'radio',$champ_value); //ligne("DOWNLOAD_TIMEOUT",$l->g(424),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['DOWNLOAD_TIMEOUT'],'END'=>$l->g(496),'JAVASCRIPT'=>$numeric)); ligne('SNMP_NETWORK',$l->g(1198),'long_text',array('VALUE'=>$optvalueTvalue['SNMP_NETWORK'],'COLS'=>40,'ROWS'=>1)); //ligne("SNMP_NETWORK",$l->g(1197),'input',$champ_value); unset($champ_value); fin_tab($form_name); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_custom_param.php000077500000000000000000000077711303466605000327510ustar00rootroot00000000000000g(601)); /*if ($protectedPost['onglet'] == "" or !isset($protectedPost['onglet'])) $protectedPost['onglet'] = $l->g(499);*/ $def_onglets['SERV']=$l->g(499); //Serveur $def_onglets['INV']=$l->g(728); //Inventaire $def_onglets['TELE']=$l->g(512); //Télédéploiement $def_onglets['RSX']=$l->g(1198); //ipdiscover //update values if ($protectedPost['Valid']==$l->g(103)){ if($list_id){ //more then one value if (strstr($list_id,',') != ""){ $tab_hadware_id=explode(",",$list_id); $add_lbl=" (".count($tab_hadware_id)." ".$l->g(652).")"; }else $list_hardware_id=$list_id; } if (isset($list_hardware_id) or isset($tab_hadware_id)){ foreach ($protectedPost as $key => $value){ if ($key != "systemid" and $key != "origine"){ if ($value == "SERVER DEFAULT" or $value == "des" or trim($value) == "") erase($key); elseif ($value == "CUSTOM"){ insert($key,$protectedPost[$key.'_edit']); } elseif ($value == "ALWAYS"){ insert($key,0); } elseif ($value == "NEVER"){ insert($key,-1); } elseif ($value == "ON"){ insert($key,1); } elseif ($value == "OFF"){ insert($key,0); }elseif (($key == "IPDISCOVER" and $value != "des" and $value != "OFF") or ($key == "SNMP_NETWORK") ){ insert($key,2,$value); } } } $MAJ=$l->g(711); msg_success($MAJ.$add_lbl); if (isset($protectedGet['origine']) and $protectedGet['origine'] == 'machine'){ $form_to_reload='config_mach'; }elseif (isset($protectedGet['origine']) and $protectedGet['origine'] == 'group'){ $form_to_reload='config_group'; } if (isset($form_to_reload)) echo ""; }else echo ""; } $default=look_config_default_values(array('DOWNLOAD','DOWNLOAD_CYCLE_LATENCY','DOWNLOAD_PERIOD_LENGTH', 'DOWNLOAD_FRAG_LATENCY','DOWNLOAD_PERIOD_LATENCY', 'DOWNLOAD_TIMEOUT','PROLOG_FREQ')); $optdefault = $default["ivalue"]; //not a sql query if (isset($protectedGet['origine']) and is_numeric($protectedGet['idchecked'])){ //looking for value of systemid $sql_value_idhardware="select NAME,IVALUE,TVALUE from devices where name != 'DOWNLOAD' and hardware_id=%s"; $arg_value_idhardware=$protectedGet['idchecked']; $result_value = mysql2_query_secure($sql_value_idhardware, $_SESSION['OCS']["readServer"],$arg_value_idhardware); while($value=mysqli_fetch_array($result_value)) { $optvalue[$value["NAME"] ] = $value["IVALUE"]; $optvalueTvalue[$value["NAME"]]=$value["TVALUE"]; } $champ_ignored=0; }elseif($list_id){ $tab_hadware_id=explode(",",$list_id); $champ_ignored=1; } if ($list_id){ onglet($def_onglets,$form_name,'onglet',7); echo '
'; if ($protectedPost['onglet'] == 'INV'){ include ('ms_custom_frequency.php'); } if ($protectedPost['onglet'] == 'SERV'){ include ('ms_custom_prolog.php'); } if ($protectedPost['onglet'] == 'TELE'){ include ('ms_custom_download.php'); } if ($protectedPost['onglet'] == 'RSX'){ include ('ms_custom_ipdiscover.php'); } echo "
"; } echo close_form(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_custom_prolog.php000077500000000000000000000023201303466605000331340ustar00rootroot00000000000000'5', 'WIDTH'=>'70%', 'BORDER'=>'0', 'ALIGN'=>'Center', 'CELLPADDING'=>'0', 'BGCOLOR'=>'#C7D9F5', 'BORDERCOLOR'=>'#9894B5')); if(!isset($optvalue['PROLOG_FREQ'])) $optvalueselected='SERVER DEFAULT'; else $optvalueselected='CUSTOM'; $champ_value['VALUE']=$optvalueselected; $champ_value['CUSTOM']=$l->g(487); $champ_value['SERVER DEFAULT']=$l->g(488); if (!isset($protectedGet['origine'])){ $champ_value['IGNORED']=$l->g(718); $champ_value['VALUE']='IGNORED'; } ligne("PROLOG_FREQ",$l->g(724),'radio',$champ_value,array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$optvalue['PROLOG_FREQ'],'END'=>$l->g(730),'JAVASCRIPT'=>$numeric)); fin_tab($form_name); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/ms_label.php000077500000000000000000000032401303466605000313210ustar00rootroot00000000000000g(261); if (trim ($protectedPost['lbl']) != ""){ $protectedPost["lbl"] = str_replace(array("\t","\n","\r"), array("","",""), $protectedPost["lbl"] ); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); $sql="INSERT INTO deploy VALUES('%s','%s')"; $arg=array('label',$protectedPost["lbl"]); $msg=$l->g(260); } mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); msg_success($msg); } //Looking for the label $reqL="SELECT content FROM deploy WHERE name='%s'"; $arg="label"; $resL=mysql2_query_secure($reqL,$_SESSION['OCS']["readServer"],$arg); $val = mysqli_fetch_object($resL); printEntete($l->g(263)); $form_name='admin_info'; echo open_form($form_name); $name_field=array("lbl"); $tab_name= array($l->g(262).": "); $type_field= array(1); $value_field=array($val->content); $tab_typ_champ=show_field($name_field,$type_field,$value_field); //$tab_typ_champ[0]['CONFIG']['SIZE']=100; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'form_name' => 'NO_FORM' )); echo close_form(); ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/require/000077500000000000000000000000001303466605000305045ustar00rootroot00000000000000function_blacklist.php000077500000000000000000000072361303466605000350260ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_config/requireg(1144); insert_blacklist_table($MACtable,$MACfield,$field_value); } function add_serial_add($serial_value){ global $l,$SERIALnb_field,$SERIALnb_value_by_field,$SERIALfield_name,$SERIALseparat,$SERIALtable,$SERIALfield,$SERIALnb_field; $field_value=generate_value($serial_value,$SERIALfield_name,$SERIALseparat,$SERIALnb_field); if (!isset($field_value)) $field_value = ''; insert_blacklist_table($SERIALtable,$SERIALfield,$field_value); } function add_subnet_add($subnet_value){ global $l,$SUBnb_field,$SUBnb_value_by_field,$SUBfield_name,$SUBseparat,$SUBtable,$SUBfield,$SUBnb_field, $MASKnb_field,$MASKnb_value_by_field,$MASKfield_name,$MASKseparat,$MASKtable,$MASKfield,$MASKnb_field; $field_value_SUB=generate_value($subnet_value,$SUBfield_name,$SUBseparat,$SUBnb_field,array('DOWN'=>0,'UP'=>255)); if (!$field_value_SUB) return $l->g(299); if (is_array($field_value_SUB)) return $l->g(1145).' '.implode(',',$field_value_SUB); $field_value_MASK=generate_value($subnet_value,$MASKfield_name,$MASKseparat,$MASKnb_field,array('DOWN'=>0,'UP'=>255)); if (!$field_value_MASK) return $l->g(300); if (is_array($field_value_MASK)) return $l->g(1145).' '.implode(',',$field_value_MASK); insert_blacklist_table($SUBtable,array($SUBfield,$MASKfield),array($field_value_SUB,$field_value_MASK)); } function show_blacklist_fields($nb_field,$default_values,$field_name,$nb_value_by_field,$size,$separat,$javascript = ''){ global $aff; $i=1; while ($i<=$nb_field){ if($i!=1){ $aff.=$separat; } $aff.=show_modif($default_values[$field_name.$i],$field_name.$i,0,'',array('MAXLENGTH'=>$nb_value_by_field,'SIZE'=>$size,'JAVASCRIPT'=>$javascript)); $i++; } $aff.=""; return $aff; } function generate_value($values,$field_name,$separat,$nb_field,$limit=array()){ $field_value=''; $i=1; while ($i<=$nb_field){ if ($i!=1) $field_value.=$separat; if ($values[$field_name.$i] != ''){ if ((isset($limit['DOWN']) and $values[$field_name.$i]<$limit['DOWN']) or (isset($limit['UP']) and $values[$field_name.$i]>$limit['UP'])) return $limit; $field_value.=$values[$field_name.$i]; } else return false; $i++; } return $field_value; } function insert_blacklist_table($table,$field,$field_value){ global $l; $i=1; $sql="insert into %s "; $arg=array($table); $sql=mysql2_prepare($sql,$arg,$field,true); $sql['SQL'].=" value "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$field_value); // //no error mysql2_query_secure($sql['SQL'], $_SESSION['OCS']["writeServer"],$sql['ARG']); msg_success($l->g(655)); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_console/000077500000000000000000000000001303466605000272255ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_console/ms_console.php000077500000000000000000000245411303466605000321100ustar00rootroot00000000000000
'; if ($_SESSION['OCS']['profile']->getConfigValue('CONSOLE') == 'YES'){ echo "
"; if (isset($_SESSION['OCS']['ADMIN_CONSOLE']) and $_SESSION['OCS']['ADMIN_CONSOLE'] == 'ADMIN') echo ""; else echo ""; echo "
"; } if ($data_on['DATA'][$protectedPost['onglet']]){ $fields=list_field($protectedPost['onglet']); show_console_field($fields,$form_name); }else{ $array_group=""; $sql_group="select id,name from hardware where deviceid='_SYSTEMGROUP_'"; $res=mysql2_query_secure($sql_group,$_SESSION['OCS']["readServer"]); while ($value = mysqli_fetch_object($res)){ $array_group[$value->id]=$value->name; } if (is_array($array_group)){ if (isset($protectedPost["SUP_PROF"]) and $protectedPost["SUP_PROF"]!=''){ delete($protectedPost['SUP_PROF']); } if (isset($protectedPost["Valid_modif"]) and $protectedPost["Valid_modif"] != '') { $sql_msg="select name from config where name like '%s'"; $arg="GUI_REPORT_MSG%"; $result_msg = mysql2_query_secure($sql_msg,$_SESSION['OCS']["readServer"],$arg); while($item_msg = mysqli_fetch_object($result_msg)){ $list_name_msg[]=substr($item_msg ->name,14); } if (isset($list_name_msg)){ $i=1; foreach ($list_name_msg as $k=>$v){ if ($v == $i) $i++; } } else { $i=1; } $tab_options=$protectedPost; if (trim($protectedPost['GROUP']) != "" and is_numeric($protectedPost['GROUP']) and trim($protectedPost['MESSAGE'])!=""){ $sql="insert into config (NAME,IVALUE,TVALUE) values ('%s',%s,'%s')"; $arg=array("GUI_REPORT_MSG".$i,$protectedPost['GROUP'],$protectedPost['MESSAGE']); mysql2_query_secure( $sql, $_SESSION['OCS']["writeServer"],$arg ); $tab_options['CACHE']='RESET'; } else { msg_error($l->g(239)); } }else{ $tab_options=$protectedPost; } $table_name=$protectedPost['onglet']; $tab_options['table_name']=$table_name; $tab_options['form_name']=$form_name; $list_fields=array('GROUP_NAME'=>'h.NAME', $l->g(915) => 'tvalue', 'SUP'=>'CNAME'); $sql=prepare_sql_tab($list_fields,array('SUP')); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL'].",c.name as CNAME,ID FROM %s WHERE (c.name like '%s')"; $sql['ARG'][]='config c left join hardware h on c.ivalue=h.id'; $sql['ARG'][]='GUI_REPORT_MSG%'; $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['LBL_POPUP']['SUP']=$l->g(919); $tab_options['LBL']['GROUP_NAME']=$l->g(49); ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo ""; if ($protectedPost["NEW"]){ $name_field=array("GROUP","MESSAGE"); $tab_name=array($l->g(577).": ",$l->g(449).":"); $type_field= array(2,1); $value_field=array($array_group,''); $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=20; } if (isset($tab_typ_champ)){ tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden); } } } } echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; }else echo "
"; if (isset($protectedPost["onglet"]) and isset($protectedPost["old_onglet"]) and $protectedPost["onglet"]!=$protectedPost["old_onglet"]) unset($protectedPost["SHOW_ME"],$protectedPost["SHOW_ME_SAUV"]); if (isset($protectedPost["SHOW_ME"]) and $protectedPost["SHOW_ME"] != '' and $protectedPost["SHOW_ME_SAUV"] != "" and $protectedPost["SHOW_ME"] != $protectedPost["SHOW_ME_SAUV"]){ unset($protectedPost["SHOW_ME_SAUV"]); } if (isset($protectedPost["SHOW_ME_SAUV"]) and $protectedPost["SHOW_ME_SAUV"] != '' and $protectedPost["SHOW_ME"] == "") $protectedPost["SHOW_ME"]=$protectedPost["SHOW_ME_SAUV"]; if ((isset($protectedPost["SHOW_ME"]) and $protectedPost["SHOW_ME"] != "")){ $array_fields=array_values($table_field[$protectedPost["SHOW_ME"]]); echo ""; $table_name=$protectedPost["SHOW_ME"]; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; if (!isset($sql_field[$protectedPost["SHOW_ME"]]['SQL'])) $sql_field[$protectedPost["SHOW_ME"]]['SQL']="select %s from %s %s"; $list_fields=$table_field[$protectedPost["SHOW_ME"]]; $list_fields[$l->g(1120)]='c'; foreach ($table_field[$protectedPost["SHOW_ME"]] as $lbl=>$value){ $recup_list_add_field[]=$value; } $sql_field[$protectedPost["SHOW_ME"]]['ARG'][0]="count(*) c,".implode(',',$recup_list_add_field); if (!preg_match("/where/i", $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2])) $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2].=" where "; else $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2].=" and "; //restriction on computer id if (isset($myids)){ if (mb_strtoupper($sql_field[$protectedPost["SHOW_ME"]]['ARG'][1]) == "HARDWARE") $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2].="id "; else $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2].="hardware_id"; $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2].=" in (".implode(',',$myids['ARG']).") and "; } $sql_field[$protectedPost["SHOW_ME"]]['ARG'][2].= $recup_list_add_field[0]." is not null group by ".implode(',',$recup_list_add_field); $tab_options['SQL_COUNT']="select %s from %s %s"; $tab_options['ARG_SQL_COUNT']=array("count(distinct ".implode(',',$recup_list_add_field).") count_nb_ligne", $sql_field[$protectedPost["SHOW_ME"]]['ARG'][1],$sql_field[$protectedPost["SHOW_ME"]]['ARG'][2]); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $tab_options['ARG_SQL']=$sql_field[$protectedPost["SHOW_ME"]]['ARG']; if (isset($multi_search[$protectedPost["SHOW_ME"]])){ $tab_options['LIEN_LBL'][$l->g(1120)]='index.php?'.PAG_INDEX.'='.$pages_refs['ms_multi_search'].'&fields='; $tab_options['LIEN_LBL'][$l->g(1120)].=$multi_search[$protectedPost["SHOW_ME"]]['FIELD']."&comp=".$multi_search[$protectedPost["SHOW_ME"]]['COMP']."&values="; $tab_options['LIEN_CHAMP'][$l->g(1120)]=$array_fields[0]; } ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); } echo close_form(); //show messages if ($_SESSION['OCS']['profile']->getRestriction('GUI') == "YES"){ $info_msg=look_config_default_values('GUI_REPORT_MSG%','LIKE'); if (is_array($info_msg['ivalue'])) $list_id_groups=implode(',',$info_msg['ivalue']); if ($list_id_groups != ""){ $sql_my_msg="select distinct g_c.group_id groups from accountinfo a ,groups_cache g_c where g_c.HARDWARE_ID=a.HARDWARE_ID and g_c.GROUP_ID in (".$list_id_groups.")"; if (isset($_SESSION['OCS']['mesmachines']) and $_SESSION['OCS']['mesmachines'] != "") $sql_my_msg.= " and ".$_SESSION['OCS']['mesmachines']; $result_my_msg = mysqli_query( $_SESSION['OCS']["readServer"],$sql_my_msg); while($item_my_msg = mysqli_fetch_object($result_my_msg)){ foreach ($info_msg['ivalue'] as $key=>$value){ if ($value == $item_my_msg ->groups){ $msg_group[$key]=$info_msg['tvalue'][$key]; } } } if (isset($msg_group) and $msg_group !=''){ msg_warning(implode('
',$msg_group)); } } } if ($ajax){ ob_end_clean(); if (isset($sql_field[$protectedPost["SHOW_ME"]]['SQL'])){ tab_req($list_fields,$default_fields,$list_col_cant_del,$sql_field[$protectedPost["SHOW_ME"]]['SQL'],$tab_options); } else{ tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); } } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_debug/000077500000000000000000000000001303466605000266515ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_debug/ms_debug.php000077500000000000000000000062151303466605000311560ustar00rootroot00000000000000g(1010); $list_mode[2]=$l->g(1011); $list_mode[3]=$l->g(1012); $list_mode[4]=$l->g(1013); if (isset($_SESSION['OCS']['TRUE_USER'])){ $list_mode[5]='NOFUSER'; }else $list_mode[5]='FUSER'; if ($_SESSION['OCS']["usecache"] == 1) $list_mode[6]='NOCACHE'; else $list_mode[6]='CACHE'; $tab_typ_champ[0]['DEFAULT_VALUE']=$list_mode; $tab_typ_champ[0]['INPUT_NAME']="MODE"; $tab_typ_champ[0]['INPUT_TYPE']=2; $tab_name[0]=$l->g(1014).":"; $tab_typ_champ[0]['RELOAD']="CHANGE"; if ($protectedPost['MODE'] == 5 and $list_mode[$protectedPost['MODE']] == 'FUSER'){ $tab_typ_champ[1]['DEFAULT_VALUE']=$protectedPost['FUSER']; $tab_typ_champ[1]['INPUT_NAME']="FUSER"; $tab_typ_champ[1]['INPUT_TYPE']=0; $tab_name[1]=$l->g(926)." "; } tab_modif_values($tab_name,$tab_typ_champ,'',array( 'title' => $l->g(1015) )); if (isset($protectedPost['Reset_modif'])){ reloadform_closeme('',true); } //passage en mode if (isset($protectedPost['Valid_modif']) and $protectedPost["MODE"] != ""){ AddLog("MODE",$list_mode[$protectedPost["MODE"]]); if ($protectedPost["MODE"] == 1){ unset($_SESSION['OCS']['DEBUG'], $_SESSION['OCS']['MODE_LANGUAGE'], $_SESSION['OCS']["usecache"]); }elseif ($protectedPost["MODE"] == 2){ unset($_SESSION['OCS']['MODE_LANGUAGE']); $_SESSION['OCS']['DEBUG']="ON"; } elseif ($protectedPost["MODE"] == 3){ unset($_SESSION['OCS']['DEBUG']); $_SESSION['OCS']['MODE_LANGUAGE']="ON"; } elseif ($protectedPost["MODE"] == 4){ $_SESSION['OCS']['MODE_LANGUAGE']="ON"; $_SESSION['OCS']['DEBUG']="ON"; }elseif ($protectedPost["MODE"] == 5){ if (!isset($_SESSION['OCS']['TRUE_USER'])){ $true_user=$_SESSION['OCS']['loggeduser']; $list_page_profil=$_SESSION['OCS']['profile']->getPages(); $restriction=$_SESSION['OCS']['profile']->getRestriction('GUI'); $loggeduser=$protectedPost["FUSER"]; unset($_SESSION['OCS']); $_SESSION['OCS']['TRUE_USER']=$true_user; $_SESSION['OCS']['TRUE_PAGES']=$list_page_profil; $_SESSION['OCS']['TRUE_RESTRICTION']=$restriction; $_SESSION['OCS']['loggeduser']=$loggeduser; }else{ $loggeduser=$_SESSION['OCS']['TRUE_USER']; $restriction=$_SESSION['OCS']['TRUE_RESTRICTION']; unset($_SESSION['OCS']); $_SESSION['OCS']['loggeduser']=$loggeduser; $_SESSION['OCS']['profile']->setRestriction('GUI', $restriction); } }elseif ($protectedPost["MODE"] == 6){ if (isset($_SESSION['OCS']["usecache"]) and $_SESSION['OCS']["usecache"] == 1) $_SESSION['OCS']["usecache"] =0; else $_SESSION['OCS']["usecache"] =1; } reloadform_closeme('log_out',true); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_dict/000077500000000000000000000000001303466605000265065ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_dict/ms_dict.php000077500000000000000000000324061303466605000306510ustar00rootroot00000000000000g(1027); //Categories $def_onglets['NEW']=$l->g(1028); //nouveau logiciels $def_onglets['IGNORED']=$l->g(1029); //ignor. $def_onglets['UNCHANGED']=$l->g(1030); //unchanged //défault => first onglet if ($protectedPost['onglet'] == "") $protectedPost['onglet']="CAT"; //reset search if ($protectedPost['RESET']=="RESET") unset($protectedPost['search']); //filtre if ($protectedPost['search']){ $search_cache=" and cache.name like '%".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$protectedPost['search'])."%' "; $search_count=" and extracted like '%".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$protectedPost['search'])."%' "; } else{ $search=""; $search_count = ""; } //show first lign of onglet show_tabs($def_onglets,$form_name,"onglet",0); echo '
'; //attention=> result with restriction if ($search_count != "" or $search_cache != "") msg_warning($l->g(767)); /**************************************ACTION ON DICO SOFT**************************************/ //transfert soft if($protectedPost['TRANS'] == "TRANS"){ if ($protectedPost['all_item'] != ''){ $list_check=search_all_item($protectedPost['onglet'],$protectedPost['onglet_soft']); }else{ foreach ($protectedPost as $key=>$value){ if (substr($key, 0, 5) == "check"){ $list_check[]=substr($key, 5); } } } if ($list_check != '') trans($protectedPost['onglet'],$list_check,$protectedPost['AFFECT_TYPE'],$protectedPost['NEW_CAT'],$protectedPost['EXIST_CAT']); } //delete a soft in list => return in 'NEW' liste if ($protectedPost['SUP_PROF'] != ""){ del_soft($protectedPost['onglet'],array($protectedPost['SUP_PROF'])); } /************************************END ACTION**************************************/ if ($protectedPost['onglet'] != $protectedPost['old_onglet']) unset($protectedPost['onglet_soft']); /*******************************************************CAS OF CATEGORIES*******************************************************/ if ($protectedPost['onglet'] == 'CAT'){ //search all categories $sql_list_cat="select formatted name from dico_soft where extracted!=formatted ".$search_count." group by formatted"; $result_list_cat = mysqli_query($_SESSION['OCS']["readServer"],$sql_list_cat); $i=1; while($item_list_cat = mysqli_fetch_object($result_list_cat)){ if ($i==1) $first_onglet=$i; $list_cat[$i]=$item_list_cat -> name; $i++; } //delete categorie if(isset($protectedPost['SUP_CAT']) and $protectedPost['SUP_CAT']!=""){ if ($protectedPost['SUP_CAT'] == 1) $first_onglet=2; $reqDcat = "DELETE FROM dico_soft WHERE formatted='".$list_cat[$protectedPost['SUP_CAT']]."'"; mysqli_query($_SESSION['OCS']["writeServer"],$reqDcat) or die(mysqli_error($_SESSION['OCS']["writeServer"])); unset($list_cat[$protectedPost['SUP_CAT']]); } //no selected? default=>first onglet if ($protectedPost['onglet_soft']=="" or !isset($list_cat[$protectedPost['onglet_soft']])) $protectedPost['onglet_soft']=$first_onglet; //show all categories if ($i<=20) onglet($list_cat,$form_name,"onglet_soft",5); else echo "

".$l->g(398) . ": ".show_modif($list_cat,'onglet_soft',2,$form_name)."

"; //You can delete or not? if ($i != 1 and isset($list_cat[$protectedPost['onglet_soft']])) echo "g(640)."\");'>".$l->g(921).""; $list_fields= array('SOFT_NAME'=>'EXTRACTED', 'ID'=>'ID', 'SUP'=>'ID', 'CHECK'=>'ID' ); $table_name="CAT_EXIST"; $default_fields= array('SOFT_NAME'=>'SOFT_NAME','SUP'=>'SUP','CHECK'=>'CHECK'); $list_col_cant_del=array('SOFT_NAME'=>'SOFT_NAME','CHECK'=>'CHECK'); $querydico = 'SELECT '; foreach ($list_fields as $key=>$value){ if($key != 'SUP' and $key != 'CHECK') $querydico .= $value.','; } error_log($list_cat[$protectedPost['onglet_soft']]); $querydico=substr($querydico,0,-1); $querydico .= " from dico_soft left join ".$table." cache on dico_soft.extracted=cache.name where formatted='".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$list_cat[$protectedPost['onglet_soft']])."' ".$search_count." group by EXTRACTED"; } /*******************************************************CAS OF NEW*******************************************************/ if ($protectedPost['onglet'] == 'NEW'){ /* MG $search_dico_soft="select extracted name from dico_soft"; $result_search_dico_soft = mysqli_query( $search_dico_soft, $_SESSION['OCS']["readServer"]); $list_dico_soft="'"; while($item_search_dico_soft = mysqli_fetch_object($result_search_dico_soft)){ $list_dico_soft.=addslashes($item_search_dico_soft -> name)."','"; } $list_dico_soft=substr($list_dico_soft,0,-2); if($list_dico_soft == "") $list_dico_soft="''"; $search_ignored_soft="select extracted name from dico_ignored"; $result_search_ignored_soft = mysqli_query( $search_ignored_soft, $_SESSION['OCS']["readServer"]); $list_ignored_soft="'"; while($item_search_ignored_soft = mysqli_fetch_object($result_search_ignored_soft)){ $list_ignored_soft.=addslashes($item_search_ignored_soft -> name)."','"; } $list_ignored_soft=substr($list_ignored_soft,0,-2); if($list_ignored_soft == "") $list_ignored_soft="''"; $sql_list_alpha="select distinct substr(trim(name),1,1) alpha from ".$table." cache where substr(trim(name),1,1) is not null and name not in (".$list_dico_soft.") and name not in (".$list_ignored_soft.") ".$search_cache; */ $sql_list_alpha="select distinct left(trim(name),1) alpha from ".$table." cache where name is not null and name not in (select extracted name from dico_soft) and name not in (select extracted name from dico_ignored) ".$search_cache; $first=''; //execute the query only if necessary /* MG if($_SESSION['OCS']['REQ_ONGLET_SOFT'] != $sql_list_alpha){ */ $result_list_alpha = mysqli_query($_SESSION['OCS']["readServer"], $sql_list_alpha); $i=1; while($item_list_alpha = mysqli_fetch_object($result_list_alpha)){ if (mb_strtoupper($item_list_alpha -> alpha) != ""){ if ($first == ''){ $first=$i; } $list_alpha[$i]=mb_strtoupper($item_list_alpha -> alpha); $i++; } } //execute the query only if necessary $_SESSION['OCS']['REQ_ONGLET_SOFT'] = $sql_list_alpha; $_SESSION['OCS']['ONGLET_SOFT'] = $list_alpha; $_SESSION['OCS']['FIRST_DICO'] = $first; /* MG }else{ $list_alpha=$_SESSION['OCS']['ONGLET_SOFT']; } */ if (!isset($protectedPost['onglet_soft'])) $protectedPost['onglet_soft']=$_SESSION['OCS']['FIRST_DICO']; onglet($list_alpha,$form_name,"onglet_soft",20); //search all soft for the tab as selected /* MG $search_soft="select distinct name from ".$table." cache where name like '".$_SESSION['OCS']['ONGLET_SOFT'][$protectedPost['onglet_soft']]."%' and name not in (".$list_dico_soft.") and name not in (".$list_ignored_soft.") ".$search_cache; */ $search_soft="select distinct trim(name) name from ".$table." cache where name like '".$_SESSION['OCS']['ONGLET_SOFT'][$protectedPost['onglet_soft']]."%' and name not in (select extracted name from dico_soft) and name not in (select extracted name from dico_ignored) ".$search_cache; $result_search_soft = mysqli_query($_SESSION['OCS']["readServer"], $search_soft); $list_soft="'"; while($item_search_soft = mysqli_fetch_object($result_search_soft)){ $list_soft.=addslashes($item_search_soft -> name)."','"; } $list_soft=substr($list_soft,0,-2); if ($list_soft == "") $list_soft="''"; $list_fields= array('SOFT_NAME'=>'NAME', 'ID'=>'ID', 'QTE'=> 'QTE', 'CHECK'=>'ID'); $table_name="CAT_NEW"; $default_fields= array('SOFT_NAME'=>'SOFT_NAME','QTE'=>'QTE','CHECK'=>'CHECK'); $list_col_cant_del=array('SOFT_NAME'=>'SOFT_NAME','CHECK'=>'CHECK'); $querydico = 'SELECT '; foreach ($list_fields as $key=>$value){ if($key != 'CHECK' and $key != 'QTE') $querydico .= $value.','; elseif ($key == 'QTE') $querydico .= ' count(NAME) as '.$value.','; } $querydico=substr($querydico,0,-1); $querydico .= " from softwares where name in (".$list_soft.") and name != '' group by name "; } /*******************************************************CAS OF IGNORED*******************************************************/ if ($protectedPost['onglet'] == 'IGNORED'){ $list_fields= array('SOFT_NAME'=>'EXTRACTED', 'ID'=>'ID', 'SUP'=>'ID', 'CHECK'=>'ID' ); $table_name="CAT_IGNORED"; $default_fields= array('SOFT_NAME'=>'SOFT_NAME','SUP'=>'SUP','CHECK'=>'CHECK'); $list_col_cant_del=array('SOFT_NAME'=>'SOFT_NAME','CHECK'=>'CHECK'); $querydico = 'SELECT '; foreach ($list_fields as $key=>$value){ if($key != 'SUP' and $key != 'CHECK') $querydico .= $value.','; } if ($search_count != ""){ $modif_search = " where ".substr($search_count,5); } $querydico=substr($querydico,0,-1); $querydico .= " from dico_ignored left join ".$table." cache on cache.name=dico_ignored.extracted ".$modif_search." group by EXTRACTED "; } /*******************************************************CAS OF UNCHANGED*******************************************************/ if ($protectedPost['onglet'] == 'UNCHANGED'){ $list_fields= array('SOFT_NAME'=>'EXTRACTED', 'ID'=>'ID', 'SUP'=>'ID', 'CHECK'=>'ID' ); $table_name="CAT_UNCHANGE"; $default_fields= array('SOFT_NAME'=>'SOFT_NAME','SUP'=>'SUP','CHECK'=>'CHECK'); $list_col_cant_del=array('SOFT_NAME'=>'SOFT_NAME','CHECK'=>'CHECK'); $querydico = 'SELECT '; foreach ($list_fields as $key=>$value){ if($key != 'SUP' and $key != 'CHECK') $querydico .= $value.','; } $querydico=substr($querydico,0,-1); $querydico .= " from dico_soft left join ".$table." cache on cache.name=dico_soft.extracted where extracted=formatted ".$search_cache." group by EXTRACTED "; } if (isset($querydico)){ $_SESSION['OCS']['query_dico']=$querydico; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $tab_options['LIEN_LBL']['QTE']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_multi_search'].'&prov=allsoft&value='; $tab_options['LIEN_CHAMP']['QTE']='NAME'; $tab_options['LBL']['SOFT_NAME']=$l->g(382); $tab_options['LBL']['QTE']=$l->g(55); $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); } echo ""; $search=show_modif(stripslashes($protectedPost['search']),"search",'0'); $trans= "".$l->g(384) . " "; //récupération de toutes les catégories $list_categories['IGNORED']="IGNORED"; $list_categories['UNCHANGED']="UNCHANGED"; $sql_list_categories="select distinct(formatted) name from dico_soft where formatted!=extracted order by formatted"; $result_list_categories = mysqli_query($_SESSION['OCS']["readServer"], $sql_list_categories); while($item_list_categories = mysqli_fetch_object($result_list_categories)){ $list_categories[$item_list_categories ->name]=$item_list_categories ->name; } //définition de toutes les options possibles $choix_affect['NEW_CAT']=$l->g(385); $choix_affect['EXIST_CAT']=$l->g(387); $trans.=show_modif($choix_affect,"AFFECT_TYPE",'2',$form_name); if ($protectedPost['AFFECT_TYPE'] == 'EXIST_CAT'){ $trans.=show_modif($list_categories,"EXIST_CAT",'2'); $verif_field="EXIST_CAT"; } elseif ($protectedPost['AFFECT_TYPE'] == 'NEW_CAT'){ $trans.=show_modif(stripslashes($protectedPost['NEW_CAT']),"NEW_CAT",'0'); $verif_field="NEW_CAT"; } if ($protectedPost['AFFECT_TYPE']!='') $trans.= ""; echo "".$search.""; if ($result_exist != FALSE) echo "
".$trans."
"; echo ""; echo '
'; echo ""; echo ""; echo ""; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$querydico,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_doubles/000077500000000000000000000000001303466605000272205ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_doubles/ms_doubles.php000077500000000000000000000316301303466605000320730ustar00rootroot00000000000000$value){ $checkbox=explode('check',$key); if(isset($checkbox[1])){ deleteDid($checkbox[1]); } } } if ($protectedPost['SUP_PROF'] != '' and is_numeric($protectedPost['SUP_PROF'])){ deleteDid($protectedPost['SUP_PROF']); } if ($protectedPost['FUSION']){ foreach ($protectedPost as $name=>$value){ if (substr($name,0,5) == "check"){ $list_id_fusion[]= substr($name,5); } } if (count($list_id_fusion)<2){ echo ""; }else{ $afus=array(); $i=0; while (isset($list_id_fusion[$i])){ $res = mysqli_query($_SESSION['OCS']["readServer"],"SELECT deviceid,id,lastcome FROM hardware WHERE id=".$list_id_fusion[$i]) or die(mysqli_error($_SESSION['OCS']["readServer"])); $afus[] = mysqli_fetch_array($res,MYSQL_ASSOC); $i++; } if (isset($afus)) fusionne($afus); } } //restriction for profils? if ($_SESSION['OCS']['mesmachines']){ $tab_id_mes_machines=computer_list_by_tag('','ARRAY'); if ($tab_id_mes_machines=="ERROR"){ echo $l->g(923); break; } }else{ $tab_id_mes_machines=""; } printEnTete($l->g(199)); /************************ hostname double ***************************************/ $sql_doublon['hostname'] = "select NAME val from hardware "; $arg_doublon['hostname'] = array(); if (isset($tab_id_mes_machines) and $tab_id_mes_machines != ""){ $sql=mysql2_prepare($sql_doublon['hostname'].' where id in ',$arg_doublon['hostname'],$tab_id_mes_machines); $sql_doublon['hostname']=$sql['SQL']; $arg_doublon['hostname']=$sql['ARG']; } $sql_doublon['hostname'] .= " group by NAME having count(NAME)>1"; /************************ serial number double ***************************************/ $sql_doublon['ssn']="select SSN val from bios,hardware h where h.id=bios.hardware_id and SSN not in (select serial from blacklist_serials) "; $arg_doublon['ssn'] = array(); if (isset($tab_id_mes_machines) and $tab_id_mes_machines != ""){ $sql=mysql2_prepare($sql_doublon['ssn'].' and hardware_id in ',$arg_doublon['ssn'],$tab_id_mes_machines); $sql_doublon['ssn']=$sql['SQL']; $arg_doublon['ssn']=$sql['ARG']; } $sql_doublon['ssn'].=" group by SSN having count(SSN)>1"; /************************ macaddress double ***************************************/ $sql_doublon['macaddress']="select h.id, MACADDR val from (select hardware_id,MACADDR from networks group by hardware_id,MACADDR) networks,hardware h where h.id=networks.hardware_id and MACADDR not in (select macaddress from blacklist_macaddresses)"; $arg_doublon['macaddress']=array(); if (isset($tab_id_mes_machines) and $tab_id_mes_machines != ""){ $sql=mysql2_prepare($sql_doublon['macaddress'].' and hardware_id in ',$arg_doublon['macaddress'],$tab_id_mes_machines); $sql_doublon['macaddress']=$sql['SQL']; $arg_doublon['macaddress']=$sql['ARG']; } /*****************************request execution*****************************************/ $sql_doublon['macaddress'].=" group by MACADDR having count(MACADDR)>1"; foreach($sql_doublon as $name=>$sql_value){ $res = mysql2_query_secure($sql_value, $_SESSION['OCS']["readServer"],$arg_doublon[$name]); while( $val = mysqli_fetch_object( $res ) ){ $doublon[$name][] = $val->val; } } //search id of computers => serial number if (isset($doublon['ssn'])){ $sql_id_doublon['ssn']=" select distinct hardware_id id,SSN info1 from bios,hardware h where h.id=bios.hardware_id and SSN in "; $arg_id_doublon['ssn']=array(); $sql=mysql2_prepare($sql_id_doublon['ssn'],$arg_id_doublon['ssn'],$doublon['ssn']); $arg_id_doublon['ssn']=$sql['ARG']; $sql_id_doublon['ssn']=$sql['SQL']; }else $count_id['ssn']=0; ////search id of computers => macaddresses if(isset($doublon['macaddress'])){ $sql_id_doublon['macaddress']=" select distinct hardware_id id,MACADDR info1 from networks,hardware h where h.id=networks.hardware_id and MACADDR in "; $arg_id_doublon['macaddress']=array(); $sql=mysql2_prepare($sql_id_doublon['macaddress'],$arg_id_doublon['macaddress'],$doublon['macaddress']); $arg_id_doublon['macaddress']=$sql['ARG']; $sql_id_doublon['macaddress']=$sql['SQL']; }else $count_id['macaddress']=0; //search id of computers => hostname if(isset($doublon['hostname'])){ $sql_id_doublon['hostname']=" select id, NAME info1 from hardware h,accountinfo a where a.hardware_id=h.id and NAME in "; $arg_id_doublon['hostname']=array(); $sql=mysql2_prepare($sql_id_doublon['hostname'],$arg_id_doublon['hostname'],$doublon['hostname']); $arg_id_doublon['hostname']=$sql['ARG']; $sql_id_doublon['hostname']=$sql['SQL']; }else $count_id['hostname']=0; //search id of computers => hostname + serial number $sql_id_doublon['hostname_serial']="SELECT DISTINCT h.id,h.name info1,b.ssn info2 FROM hardware h LEFT JOIN bios b ON b.hardware_id = h.id LEFT JOIN hardware h2 on h.name=h2.name LEFT JOIN bios b2 on b2.ssn = b.ssn WHERE b2.hardware_id = h2.id AND h.id <> h2.id and b.ssn not in (select serial from blacklist_serials) "; $arg_id_doublon['hostname_serial']=array(); if (isset($tab_id_mes_machines) and $tab_id_mes_machines != ""){ $sql=mysql2_prepare($sql_id_doublon['hostname_serial'].' and h.id in ',$arg_id_doublon['hostname_serial'],$tab_id_mes_machines); $sql_id_doublon['hostname_serial']=$sql['SQL']; $arg_id_doublon['hostname_serial']=$sql['ARG']; } //search id of computers => hostname + mac address $sql_id_doublon['hostname_macaddress']="SELECT DISTINCT h.id,h.name info1,n.macaddr info2 FROM hardware h LEFT JOIN networks n ON n.hardware_id = h.id LEFT JOIN hardware h2 on h.name=h2.name LEFT JOIN networks n2 on n2.MACADDR = n.MACADDR WHERE n2.hardware_id = h2.id AND h.id <> h2.id and n.MACADDR not in (select macaddress from blacklist_macaddresses)"; $arg_id_doublon['hostname_macaddress']=array(); if (isset($tab_id_mes_machines) and $tab_id_mes_machines != ""){ $sql=mysql2_prepare($sql_id_doublon['hostname_macaddress'].' and h.id in ',$arg_id_doublon['hostname_macaddress'],$tab_id_mes_machines); $sql_id_doublon['hostname_macaddress']=$sql['SQL']; $arg_id_doublon['hostname_macaddress']=$sql['ARG']; } $sql_id_doublon['macaddress_serial']="SELECT DISTINCT h.id, n1.macaddr info1, b.ssn info2 FROM hardware h LEFT JOIN bios b ON b.hardware_id = h.id LEFT JOIN networks n1 on b.hardware_id=n1.hardware_id LEFT JOIN networks n2 on n1.macaddr = n2.macaddr LEFT JOIN bios b2 on b2.ssn = b.ssn WHERE n1.hardware_id = h.id AND b2.hardware_id = n2.hardware_id AND b2.hardware_id <> b.hardware_id AND b.ssn not in (select serial from blacklist_serials) AND n1.macaddr not in (select macaddress from blacklist_macaddresses)"; $arg_id_doublon['macaddress_serial']=array(); if (isset($tab_id_mes_machines) and $tab_id_mes_machines != ""){ $sql=mysql2_prepare($sql_id_doublon['macaddress_serial'].' and h.id in ',$arg_id_doublon['macaddress_serial'],$tab_id_mes_machines); $sql_id_doublon['macaddress_serial']=$sql['SQL']; $arg_id_doublon['macaddress_serial']=$sql['ARG']; } foreach($sql_id_doublon as $name=>$sql_value){ $sql_value.=" group by id"; $res = mysql2_query_secure($sql_value, $_SESSION['OCS']["readServer"],$arg_id_doublon[$name]); $count_id[$name] = 0; while( $val = mysqli_fetch_object( $res ) ) { //if restriction => count only computers of profil //else, all computers if (is_array($tab_id_mes_machines) and in_array ($val->id,$tab_id_mes_machines)){ $list_id[$name][$val->id]=$val->id; $count_id[$name]++; }elseif ($tab_id_mes_machines == ""){ $list_id[$name][$val->id]=$val->id; $count_id[$name]++; } $list_info[$name][]=$val->info1; } } $form_name='doublon'; $table_name='DOUBLON'; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); echo ""; foreach ($count_id as $lbl=>$count_value){ echo ""; if ($protectedPost['detail'] == $lbl and $count_value == 0) unset($protectedPost['detail']); } echo "
"; switch($lbl) { case "hostname_serial": echo $l->g(193); break ; case "hostname_macaddress": echo $l->g(194); break ; case "macaddress_serial": echo $l->g(195); break ; case "hostname": echo $l->g(196); break ; case "ssn": echo $l->g(197); break ; case "macaddress": echo $l->g(198); break ; } echo ": "; if ($count_value != 0) echo ""; echo $count_value; if ($count_value != 0) echo ""; echo "
"; echo ""; //show details if ($protectedPost['detail'] != ''){ //BEGIN SHOW ACCOUNTINFO require_once('require/function_admininfo.php'); $accountinfo_value=interprete_accountinfo($list_fields,$tab_options); if (array($accountinfo_value['TAB_OPTIONS'])) $tab_options=$accountinfo_value['TAB_OPTIONS']; if (array($accountinfo_value['DEFAULT_VALUE'])) $default_fields=$accountinfo_value['DEFAULT_VALUE']; $list_fields=$accountinfo_value['LIST_FIELDS']; //END SHOW ACCOUNTINFO $list_fields2= array($l->g(95)=>'n.macaddr', $l->g(36)=>'b.ssn', $l->g(23).": id"=>'h.ID', $l->g(23).": ".$l->g(46)=>'h.LASTDATE', 'NAME'=>'h.NAME', $l->g(82).": ".$l->g(33)=>'h.WORKGROUP', $l->g(23).": ".$l->g(25)=>'h.OSNAME', $l->g(23).": ".$l->g(24)=>'h.USERID', $l->g(23).": ".$l->g(26)=>'h.MEMORY', $l->g(23).": ".$l->g(569)=>'h.PROCESSORS', $l->g(23).": ".$l->g(34)=>'h.IPADDR', $l->g(23).": ".$l->g(53)=>'h.DESCRIPTION', $l->g(23).": ".$l->g(354)=>'h.FIDELITY', $l->g(23).": ".$l->g(820)=>'h.LASTCOME', $l->g(23).": ".$l->g(351)=>'h.PROCESSORN', $l->g(23).": ".$l->g(350)=>'h.PROCESSORT', $l->g(23).": ".$l->g(357)=>'h.USERAGENT', $l->g(23).": ".$l->g(50)=>'h.SWAP', $l->g(23).": ".$l->g(111)=>'h.WINPRODKEY', $l->g(23).": ".$l->g(553)=>'h.WINPRODID'); $list_fields=array_merge ($list_fields,$list_fields2); $list_fields['CHECK']='h.ID'; $list_col_cant_del=array('NAME'=>'NAME','CHECK'=>'CHECK',$l->g(35)); $default_fields2=array($l->g(95)=>$l->g(95),$l->g(36)=>$l->g(36), $l->g(23).": ".$l->g(46)=>$l->g(23).": ".$l->g(46), $l->g(23).": ".$l->g(34)=>$l->g(23).": ".$l->g(34)); $default_fields=array_merge ($default_fields,$default_fields2); if ($_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES"){ $list_fields['SUP']='h.ID'; $list_col_cant_del['SUP']='SUP'; } $sql=prepare_sql_tab($list_fields,array('SUP','CHECK')); $sql['SQL'] .= " from hardware h left join accountinfo a on h.id=a.hardware_id "; $sql['SQL'] .= ",bios b, "; $sql['SQL'] .= " networks n where h.id=n.hardware_id "; $sql['SQL'] .= " and h.id=b.hardware_id and h.id in "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$list_id[$protectedPost['detail']]); if (($protectedPost['detail'] == "macaddress" or $protectedPost['detail'] == "macaddress_serial") and count($list_info)>0){ $sql['SQL'] .= " and n.macaddr in "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$list_info[$protectedPost['detail']]); } $sql['SQL'] .= " group by h.id "; $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['FILTRE']=array('NAME'=>$l->g(35),'b.ssn'=>$l->g(36),'n.macaddr'=>$l->g(95)); $tab_options['LBL_POPUP']['SUP']='NAME'; $tab_options['LBL']['SUP']=$l->g(122); $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($result_exist != "" and $_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES"){ echo ""; echo ""; } echo "

"; echo ""; } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_export/000077500000000000000000000000001303466605000271045ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_export/ms_csv.php000077500000000000000000000157341303466605000311240ustar00rootroot00000000000000g(23)){ if ($_SESSION['OCS']['list_fields'][$protectedGet['tablename']][$name]{1} == ".") $lbl=substr(strrchr($_SESSION['OCS']['list_fields'][$protectedGet['tablename']][$name], "."), 1); else $lbl=$_SESSION['OCS']['list_fields'][$protectedGet['tablename']][$name]; $col[$lbl]=$name; $toBeWritten .=$name.";"; }elseif($name == 'NAME' or $name == $l->g(23)){ $col['name_of_machine']="name_of_machine"; $toBeWritten .="machine".$separator; } } $i=0; while ($_SESSION['OCS']['DATA_CACHE'][$protectedGet['tablename']][$i]){ $toBeWritten .="\r\n"; foreach ($col as $lbl => $name){ if ($lbl == "name_of_machine"){ $lbl='name'; } if ($_SESSION['OCS']['DATA_CACHE'][$protectedGet['tablename']][$i][$lbl]) $toBeWritten .=$_SESSION['OCS']['DATA_CACHE'][$protectedGet['tablename']][$i][$lbl].$separator; } $i++; } }*/ elseif (isset($_SESSION['OCS']['csv']['SQL'][$protectedGet['tablename']])){ $toBeWritten=""; //gestion des entetes foreach ($_SESSION['OCS']['col_tab'][$protectedGet['tablename']] as $name){ if ($name != 'SUP' and $name != 'CHECK' and $name != 'NAME'){ if ($_SESSION['OCS']['list_fields'][$protectedGet['tablename']][$name]{1} == ".") $lbl=substr(strrchr($_SESSION['OCS']['list_fields'][$protectedGet['tablename']][$name], "."), 1); else $lbl=$_SESSION['OCS']['list_fields'][$protectedGet['tablename']][$name]; $col[$lbl]=$name; $toBeWritten .=$name.$separator; }elseif($name == 'NAME' or $name == $l->g(23)){ $col['name_of_machine']="name_of_machine"; $toBeWritten .=$l->g(23).$separator; } } //data fixe if (isset($_SESSION['OCS']['SQL_DATA_FIXE'][$protectedGet['tablename']])){ $i=0; while($_SESSION['OCS']['SQL_DATA_FIXE'][$protectedGet['tablename']][$i]){ $result=mysqli_query($link,$_SESSION['OCS']['SQL_DATA_FIXE'][$protectedGet['tablename']][$i]) or die(mysqli_error($link)); while( $cont = mysqli_fetch_array($result,MYSQL_ASSOC) ) { foreach ($col as $field => $lbl){ if (array_key_exists($lbl,$cont)){ $data_fixe[$cont['HARDWARE_ID']][$field]=$cont[$lbl]; } } } $i++; } } //var_dump($data_fixe); if ($_SESSION['OCS']['csv']['ARG'][$protectedGet['tablename']]) $arg=$_SESSION['OCS']['csv']['ARG'][$protectedGet['tablename']]; else $arg=''; if(isset($protectedGet['nolimit'])){ $result=mysql2_query_secure($_SESSION['OCS']['csv']['SQLNOLIMIT'][$protectedGet['tablename']], $link,$arg); } else{ $result=mysql2_query_secure($_SESSION['OCS']['csv']['SQL'][$protectedGet['tablename']], $link,$arg); } $i=0; require_once('require/function_admininfo.php'); $inter=interprete_accountinfo($col,array()); while( $cont = mysqli_fetch_array($result,MYSQL_ASSOC) ) { unset($cont['MODIF']); foreach ($col as $field => $lbl){ if ($lbl == "name_of_machine" and !isset($cont[$field])){ $field='name'; } $found = false; // find value case-insensitive foreach ($cont as $key => $val) { if (strtolower($key) == strtolower($field)) { if (($field == 'TAG' or substr($field,0,7) == 'fields_') and isset($inter['TAB_OPTIONS']['REPLACE_VALUE'][$lbl])) { // administrative data $data[$i][$lbl]=$inter['TAB_OPTIONS']['REPLACE_VALUE'][$lbl][$val]; } else { // normal data $data[$i][$lbl]=$val; } $found = true; break; } elseif(isset($_SESSION['OCS']['VALUE_FIXED'][$protectedGet['tablename']][$lbl][$cont['ID']]) && isset($cont['ID'])){ $data[$i][$lbl] = $_SESSION['OCS']['VALUE_FIXED'][$protectedGet['tablename']][$lbl][$cont['ID']]; $found = true; break; } } if(isset($_SESSION['OCS']['csv']['REPLACE_VALUE'][$protectedGet['tablename']][$key])){ $data[$i][$key]=$_SESSION['OCS']['csv']['REPLACE_VALUE'][$protectedGet['tablename']][$key][$data[$i][$key]]; } if(isset($_SESSION['OCS']['csv']['REPLACE_VALUE_ALL_TIME'][$protectedGet['tablename']][$key])){ $data[$i][$key] = $_SESSION['OCS']['csv']['REPLACE_VALUE_ALL_TIME'][$protectedGet['tablename']][$data[$i][$_SESSION['OCS']['csv']['FIELD_REPLACE_VALUE_ALL_TIME'][$protectedGet['tablename']]]]; } if (!$found) { // find values case-insensitive if(!is_null($data_fixe[$cont['ID']])){ foreach ($data_fixe[$cont['ID']] as $key => $val) { if (strtolower($key) == strtolower($field) && isset($data_fixe[$cont['ID']][$key])) { $data[$i][$lbl]=$data_fixe[$cont['ID']][$key]; $found = true; break; } } } if (!$found) { $data[$i][$lbl]=""; } } } $i++; } //p($data); $i=0; while ($data[$i]){ $toBeWritten .="\r\n"; foreach ($data[$i] as $field_name=>$donnee){ $toBeWritten .=$donnee.$separator; } $i++; } $filename="export.csv"; } if ($toBeWritten != ""){ // iexplorer problem if( ini_get("zlib.output-compression")) ini_set("zlib.output-compression","Off"); header("Pragma: public"); header("Expires: 0"); header("Cache-control: must-revalidate, post-check=0, pre-check=0"); header("Cache-control: private", false); header("Content-type: application/force-download"); header("Content-Disposition: attachment; filename=\"".$filename."\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".strlen($toBeWritten)); echo $toBeWritten, die(); }else{ $ban_head='no'; require_once (HEADER_HTML); msg_error($l->g(920)); require_once(FOOTER_HTML); die(); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_export/ms_export_ocs.php000077500000000000000000000075501303466605000325130ustar00rootroot00000000000000g(837)); require_once(FOOTER_HTML); die(); } $sql="select * from hardware where id=%s"; $arg=$protectedGet['systemid']; $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); $item_hardware = mysqli_fetch_object($res); $xml= "\n"; $table_not_use=array('accountinfo','groups_cache','download_history','devices'); $xml.= "\n"; $xml.= "\t".$item_hardware->DEVICEID."\n"; $xml.= "\t\n"; foreach ($_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'] as $tablename){ if (!in_array($tablename,$table_not_use)){ //$sql= prepare_sql_tab($_SESSION['OCS']['SQL_TABLE'][$tablename]); $sql="select * from %s where hardware_id=%s"; $arg=array($tablename,$protectedGet['systemid']); $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); while ($item = mysqli_fetch_object($res)){ $xml.= "\t\t<".mb_strtoupper($tablename).">\n"; foreach($_SESSION['OCS']['SQL_TABLE'][$tablename] as $field_name=>$field_type){ if ($field_name != 'HARDWARE_ID'){ if(replace_entity_xml($item->$field_name) != ''){ $xml.= "\t\t\t<".$field_name.">"; $xml.= replace_entity_xml($item->$field_name); $xml.= "\n"; }else{ $xml.= "\t\t\t<".$field_name." />\n"; } } } $xml.= "\t\t\n"; } } } //HARDWARE INFO $xml.= "\t\t\n"; foreach($_SESSION['OCS']['SQL_TABLE']['hardware'] as $field_name=>$field_type){ if ($field_name != 'ID' and $field_name != 'DEVICEID'){ if(replace_entity_xml($item_hardware->$field_name) != ''){ $xml.= "\t\t\t<".$field_name.">"; $xml.= replace_entity_xml($item_hardware->$field_name); $xml.= "\n"; }else $xml.= "\t\t\t<".$field_name." />\n"; } } $xml.= "\t\t\n"; //ACCOUNTINFO VALUES $sql="select * from accountinfo where hardware_id=%s"; $arg=$protectedGet['systemid']; $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); $item_accountinfo = mysqli_fetch_object($res); foreach($_SESSION['OCS']['SQL_TABLE']['accountinfo'] as $field_name=>$field_type){ if ($field_name != 'HARDWARE_ID'){ $xml.= "\t\t\n"; $xml.= "\t\t\t".$field_name."\n"; if (replace_entity_xml($item_accountinfo->$field_name) != '') $xml.= "\t\t\t".replace_entity_xml($item_accountinfo->$field_name)."\n"; else $xml.= "\t\t\t\n"; $xml.= "\t\t\n"; } } $xml.="\t\n"; $xml.="\tINVENTORY\n"; $xml.="\n"; if ($xml != ""){ // iexplorer problem if( ini_get("zlib.output-compression")) ini_set("zlib.output-compression","Off"); header("Pragma: public"); header("Expires: 0"); header("Cache-control: must-revalidate, post-check=0, pre-check=0"); header("Cache-control: private", false); header("content-type: text/xml "); header("Content-Disposition: attachment; filename=\"".$item_hardware->DEVICEID.".xml\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".strlen($xml)); echo $xml, die(); }else{ $ban_head='no'; require_once (HEADER_HTML); msg_error($l->g(920)); require_once(FOOTER_HTML); die(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_export/ms_soft_csv.php000077500000000000000000000154161303466605000321540ustar00rootroot00000000000000','=',''); if (!in_array($protectedGet['comp'],$compartruevalue)) die(); $values=look_config_default_values(array('EXPORT_SEP')); if (isset($values['tvalue']['EXPORT_SEP']) and $values['tvalue']['EXPORT_SEP'] != '') $separator=$values['tvalue']['EXPORT_SEP']; else $separator=';'; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $info_name_soft=array("table"=>"type_softwares_name","field"=>"name","search"=>"id","field_name_soft"=>'name_id'); $alias_name_soft="cachename"; }else{ $info_name_soft=array("table"=>"softwares","field"=>"name","search"=>"name","field_name_soft"=>'name'); $alias_name_soft="sname"; } $field_name_soft=$info_name_soft['table'].".".$info_name_soft['field']; if ($info_name_soft['table'] != 'softwares' or $_SESSION['OCS']["usecache"] == 1){ $sql_list_soft['ARG']=array(); $sql_list_soft['SQL']="select ".$info_name_soft['search']." from ".$info_name_soft['table']." "; if (isset($protectedGet['soft']) and $protectedGet['soft'] != ''){ $sql_list_soft['SQL'].= " where name like '%s'"; $sql_list_soft['ARG']=array('%'.$protectedGet['soft'].'%'); } /*$result_search_soft = mysql2_query_secure( $sql['SQL'], $_SESSION['OCS']["readServer"],$sql['ARG']); $list_soft=""; while($item_search_soft = mysqli_fetch_object($result_search_soft)){ $list_soft[]=$item_search_soft->$info_name_soft['search']; }*/ $sql['SQL']="select count(*) nb, ".$field_name_soft." from softwares "; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $sql['SQL'] .=" left join ".$info_name_soft['table']." on ".$info_name_soft['table'].".".$info_name_soft['search']."=softwares.".$info_name_soft["field_name_soft"]." "; } $sql['SQL'] .=" ,accountinfo a where a.hardware_id=softwares.hardware_id and softwares.".$info_name_soft["field_name_soft"]." in ("; $sql['SQL'] .= $sql_list_soft['SQL']." )"; $sql['ARG'] = $sql_list_soft['ARG']; /*$sql['ARG']=array(); $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$list_soft);*/ if ($_SESSION['OCS']['TAGS'] != ""){ $sql['SQL'].= " and a.tag in "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$_SESSION['OCS']['TAGS']); } $sql['SQL'].=" group by ".$field_name_soft; if (isset($protectedGet['nb']) and $protectedGet['nb'] != '' and isset($protectedGet['comp']) and $protectedGet['comp'] != ''){ $sql['SQL'].= " having nb %s %s"; array_push($sql['ARG'],$protectedGet['comp']); array_push($sql['ARG'],$protectedGet['nb']); } }else{ $sql['SQL']="select count(*) nb, ".$field_name_soft." from ".$info_name_soft['table']; $sql['SQL'].=" , accountinfo a where a.hardware_id=".$info_name_soft['table'].".hardware_id "; if (isset($protectedGet['soft']) and $protectedGet['soft'] != ''){ $sql['SQL'].= " and ".$field_name_soft." like '%s'"; $sql['ARG']=array('%'.$protectedGet['soft'].'%'); } if ($_SESSION['OCS']['TAGS'] != ""){ $sql['SQL'].= " and a.tag in "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$_SESSION['OCS']['TAGS']); } $sql['SQL'].=" group by ".$field_name_soft; if (isset($protectedGet['nb']) and $protectedGet['nb'] != '' and isset($protectedGet['comp']) and $protectedGet['comp'] != ''){ $sql['SQL'].= " having nb %s %s"; array_push($sql['ARG'],$protectedGet['comp']); array_push($sql['ARG'],$protectedGet['nb']); } } if (isset($protectedGet['all_computers']) and isset($protectedGet['nb']) and is_numeric($protectedGet['nb'])and $protectedGet['nb']<16 and isset($protectedGet['comp']) and $protectedGet['comp'] == "<"){ $sql_liste_soft="select count(".$info_name_soft["field_name_soft"].") nb,".$info_name_soft["field_name_soft"]." from softwares group by ".$info_name_soft["field_name_soft"]." having nb<%s"; $arg_liste_soft=$protectedGet['nb']; $result_liste_soft = mysql2_query_secure( $sql_liste_soft, $_SESSION['OCS']["readServer"],$arg_liste_soft); $list_soft=""; while($item_liste_soft = mysqli_fetch_object($result_liste_soft)){ $list_soft[]=$item_liste_soft->$info_name_soft["field_name_soft"]; } $fields= array("a.tag"=>$_SESSION['OCS']['TAG_LBL']['TAG'], $alias_name_soft=>$l->g(20), "h.name"=>$l->g(23), "h.userid"=>$l->g(24), "h.description"=>$l->g(53), "h.lastdate"=>$l->g(728)); /*$result_search_soft = mysql2_query_secure( $sql['SQL'], $_SESSION['OCS']["readServer"],$sql['ARG']); while($item_search_soft = mysqli_fetch_object($result_search_soft)){ $soft[]=$item_search_soft->name; }*/ $sql=prepare_sql_tab(array_keys($fields)); $sql['SQL'].= " from accountinfo a, (select hardware_id, ".$info_name_soft["field_name_soft"]." as sname from softwares where ".$info_name_soft["field_name_soft"]." in "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$list_soft); $sql['SQL'].= ") s"; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $sql['SQL'] .=" left join (select id, name as ".$alias_name_soft." from ".$info_name_soft['table'].") cache on cache.id=s.sname "; } $sql['SQL'] .=",hardware h where a.hardware_id=h.id and s.hardware_id=h.id "; if (isset($_SESSION['OCS']['TAGS'])){ $sql['SQL'].= " and a.tag in "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$_SESSION['OCS']['TAGS']); } $sql['SQL'].=" order by h.name"; }else{ $fields=array('nb'=>$l->g(55),'name'=>$l->g(20)); } //echo generate_secure_sql($sql['SQL'],$sql['ARG']); //die(); $toBeWritten=implode($separator,$fields)."\r\n"; if( ini_get("zlib.output-compression")) ini_set("zlib.output-compression","Off"); header("Pragma: public"); header("Expires: 0"); header("Cache-control: must-revalidate, post-check=0, pre-check=0"); header("Cache-control: private", false); header("Content-type: application/force-download"); header("Content-Disposition: attachment; filename=\"export.csv\""); header("Content-Transfer-Encoding: binary"); $result_search_soft = mysql2_query_secure( $sql['SQL'], $_SESSION['OCS']["readServer"],$sql['ARG']); while($item_search_soft = mysqli_fetch_object($result_search_soft)){ foreach ($fields as $key=>$values){ $trait=explode('.',$key); if (isset($trait[1])) $fi=$trait[1]; else $fi=$trait[0]; $toBeWritten.= $item_search_soft->$fi.$separator; } $toBeWritten.= "\r\n"; } header("Content-Length: ".strlen($toBeWritten)); echo $toBeWritten; die(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_groups/000077500000000000000000000000001303466605000271025ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_groups/ms_custom_groups.php000077500000000000000000000156731303466605000332420ustar00rootroot00000000000000g(601)); /*********************************************TRAITEMENT DES DONNEES*****************************************/ if (isset($protectedPost['VALID_GROUP'])){ //gestion groupe de serveurs if ($protectedPost['onglet'] == mb_strtoupper($l->g(651))){ require_once('require/function_server.php'); //ajout de machines if ($protectedPost['NEW_RAZ'] == "ADD") $action='add_serv'; //nouveau groupe if ($protectedPost['NEW_RAZ'] == "NEW"){ $name_or_id=$protectedPost['NAME_GROUP']; $lbl=$protectedPost['LBL_GROUP']; $action='new_serv'; } //remplacement d'un groupe if ($protectedPost['NEW_RAZ'] == "RAZ") $action='replace_serv'; //suppression de machines dans le groupe de serveur if ($protectedPost['NEW_RAZ'] == "DEL") $action='del_serv'; if (!isset($name_or_id)) $name_or_id=$protectedPost['group_list']; if (!isset($lbl)) $lbl="''"; $msg_error=admin_serveur($action,$name_or_id,$lbl,$list_id); }//gestion groupe de machines else{ if ($protectedPost['onglet'] == $l->g(809)) $group_type="STATIC"; else $group_type="DYNAMIC"; //ajout a un groupe if ($protectedPost['NEW_RAZ'] == "ADD"){ $nb_mach=add_computers_cache($list_id,$protectedPost['group_list'],1); $msg_success=$l->g(973); } //suppression des machines du groupe en masse if ($protectedPost['NEW_RAZ'] == "DEL"){ $nb_mach=remove_of_group($protectedPost['group_list'],$list_id); $msg_success=$l->g(971)."
".$l->g(972); } //Création d'un nouveau groupe if ($protectedPost['NEW_RAZ'] == "NEW"){ $result=creat_group ($protectedPost['NAME_GROUP'],$protectedPost['LBL_GROUP'],$list_id,$_SESSION['OCS']['SEARCH_SQL_GROUP'],$group_type); if ($result['RESULT'] == "ERROR") $nb_mach = "ERROR"; else $nb_mach = $result['LBL']; $msg_success=$l->g(880); } //ecrasement d'un groupe if ($protectedPost['NEW_RAZ'] == "RAZ"){ $nb_mach=replace_group($protectedPost['group_list'],$list_id,$_SESSION['OCS']['SEARCH_SQL_GROUP'],$group_type); $msg_success=$l->g(879); } if ($nb_mach == "ERROR"){ $msg_error=$result['LBL']; }elseif (isset($nb_mach) and $protectedPost['NEW_RAZ'] != "DEL"){ $msg_success.="
".$nb_mach." ".$l->g(974); } } if (isset($msg_success) and $msg_success != '') msg_success($msg_success); if (isset($msg_error) and $msg_error != '') msg_error($msg_error); } /*********************************************CALCUL DES CHAMPS A AFFICHER*************************************/ if ($list_id){ //définition des onglets //for all $def_onglets[$l->g(809)]=$l->g(809); //GROUPES STATIQUES } if ($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES"){ $def_onglets[$l->g(810)]=$l->g(810); //GROUPES DYNAMIQUES $def_onglets[mb_strtoupper($l->g(651))]=mb_strtoupper($l->g(651)); //GROUPES DE SERVEURS //definition of option NEW every time $optionList['NEW']=$l->g(586); } //if no select => first onget selected if ($protectedPost['onglet'] == "" or !isset($protectedPost['onglet'])){ if (isset($def_onglets[$l->g(809)])) $protectedPost['onglet']=$l->g(809); else $protectedPost['onglet']=$l->g(810); } if ($protectedPost['onglet'] == $l->g(810)){ $all_groups=all_groups('DYNAMIC'); } if ($protectedPost['onglet'] == $l->g(809)){ $all_groups=all_groups('STATIC'); $delGroups="select distinct id, name,workgroup from hardware,groups_cache where groups_cache.HARDWARE_ID in (".$list_id.") and groups_cache.group_id=hardware.id and deviceid = '_SYSTEMGROUP_' and groups_cache.static = 1"; if (!($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES")) $delGroups.= " and workgroup = 'GROUP_4_ALL'"; } if ($protectedPost['onglet'] == mb_strtoupper($l->g(651)) and $list_id!= ''){ $all_groups=all_groups('SERVER'); $delGroups="select distinct group_id as id, name from download_servers,hardware where hardware_id in(".$list_id.") and hardware.id=download_servers.group_id"; } //search all groups for listid selection if (isset($delGroups)){ $resDelGroups = mysqli_query($_SESSION['OCS']["readServer"], $delGroups); while($valDelGroups = mysqli_fetch_array( $resDelGroups )){ $groupDelList[$valDelGroups["id"]]=$valDelGroups["name"]; } } if ($protectedPost['onglet'] != $l->g(810)){ $optionList['ADD']=$l->g(975); }else $optionList['ADD']=$l->g(589); //if groups exist => add option for go out of the group if (isset($groupDelList)) $optionList['DEL']=$l->g(818); else{ if ($protectedPost['NEW_RAZ'] == "DEL") unset($protectedPost['NEW_RAZ']); } //} //if group list exist if (isset($all_groups) and $_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES"){ //show RAZ field $optionList['RAZ']=$l->g(588); } $select=show_modif($optionList,'NEW_RAZ',2,$form_name); /******************************************show RESULT************************************************/ //show onglet onglet($def_onglets,$form_name,'onglet',7); //create a "valid" button $valid=""; //open table echo ""; //if user want give up or go out of the group if ($protectedPost['NEW_RAZ'] == "RAZ" or $protectedPost['NEW_RAZ'] == "ADD") $List= $all_groups; if ($protectedPost['NEW_RAZ'] == "DEL") $List= $groupDelList; if($protectedPost['NEW_RAZ'] == "NEW"){ $nom=show_modif($protectedPost['NAME_GROUP'],'NAME_GROUP',0,''); $lbl=show_modif($protectedPost['LBL_GROUP'],'LBL_GROUP',1,''); $addgroup = ""; $addgroup .= ""; $addgroup .=$valid; echo $addgroup; } if ($protectedPost['NEW_RAZ'] == "RAZ" or $protectedPost['NEW_RAZ'] == "DEL" or $protectedPost['NEW_RAZ'] == "ADD"){ $select=show_modif($List,'group_list',2,''); //list of choise $groupList = ""; $groupList.=$valid; echo $groupList; } } echo "
"; echo "
"; if (isset($protectedPost['CHOISE']) and $protectedPost['CHOISE'] != ""){ echo $select; echo "
".$l->g(49).":".$nom."
".$l->g(53).":".$lbl."
"; $groupList.=$select; $groupList.="
"; echo close_form(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_groups/ms_group_show.php000077500000000000000000000542161303466605000325210ustar00rootroot00000000000000g(949) => 'h.ID', 'DEVICEID' => 'h.DEVICEID', 'NAME' => 'h.name', $l->g(25) => 'h.OSNAME', $l->g(275) => 'h.OSVERSION', $l->g(51) => 'h.OSCOMMENTS', $l->g(350) => 'h.PROCESSORT', $l->g(377) =>'h.PROCESSORS', $l->g(351) =>'h.PROCESSORN', $l->g(26) =>'h.MEMORY', $l->g(50) => 'h.SWAP', $l->g(46) => 'h.LASTDATE', $l->g(820) => 'h.LASTCOME', $l->g(353) => 'h.QUALITY', $l->g(354) => 'h.FIDELITY', $l->g(53) => 'h.DESCRIPTION', $l->g(34) =>'h.IPADDR', 'CHECK'=>'h.ID'); $list_fields=array_merge ($list_fields,$list_fields2); $list_col_cant_del=array('NAME'=>'NAME','CHECK'=>'CHECK'); $default_fields2= array('NAME'=>'NAME',$l->g(46)=>$l->g(46),$l->g(820)=>$l->g(820),$l->g(34)=>$l->g(34)); $default_fields=array_merge ($default_fields,$default_fields2); if (isset($protectedGet['systemid'])) { $systemid = $protectedGet['systemid']; if ($systemid == "") { return $l->g(837); die(); } } elseif (isset($protectedPost['systemid'])) { $systemid = $protectedPost['systemid']; } if(!($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES")){ $sql_verif="select workgroup from hardware where workgroup='GROUP_4_ALL' and ID='%s'"; $arg=$systemid; $res_verif = mysql2_query_secure($sql_verif, $_SESSION['OCS']["readServer"],$arg); $item_verif = mysqli_fetch_object($res_verif); if ($item_verif == "") die("FORBIDDEN"); } if (isset($protectedGet['state'])) { $state = $protectedGet['state']; if ($state == "MAJ") echo "\n"; }// fin if if( isset( $protectedGet["suppack"] ) ) { if( $_SESSION['OCS']["justAdded"] == false ){ require_once('require/function_telediff.php'); desactive_packet($systemid,$protectedGet["suppack"]); } else $_SESSION['OCS']["justAdded"] = false; } else $_SESSION['OCS']["justAdded"] = false; //update values if user want modify groups' values if ($protectedPost['Valid_modif'] and !isset($protectedPost['modif'])) { if (trim($protectedPost['NAME'])!= '' and trim($protectedPost['DESCR'])!=''){ $req = "UPDATE hardware SET ". "NAME='%s',". "DESCRIPTION='%s' ". "where ID='%s' and (deviceid = '_SYSTEMGROUP_' or deviceid ='_DOWNLOADGROUP_')"; $arg=array($protectedPost['NAME'],$protectedPost['DESCR'],$systemid); $result = mysql2_query_secure($req, $_SESSION['OCS']["writeServer"],$arg); } else{ echo ""; } } $queryMachine = "SELECT REQUEST, CREATE_TIME, NAME, XMLDEF, DESCRIPTION,LASTDATE,OSCOMMENTS,DEVICEID FROM hardware h left join groups g on g.hardware_id=h.id WHERE ID=%s AND (deviceid ='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')"; $arg=$systemid; $result = mysql2_query_secure( $queryMachine, $_SESSION['OCS']["readServer"] ,$arg); $item = mysqli_fetch_object($result); if( ! $item ) { echo ""; echo "
".$l->g(623)."
"; flush(); die(); } if( $item->REQUEST !="" or $item->XMLDEF != "") $pureStat = false; else{ $pureStat = true; } if ( $item->CREATE_TIME == "") $server_group=true; else $server_group=false; incPicker(); $tdhdpb = ""; $tdhfpb = ""; $tdhd = ""; $tdhf = ":"; $tdpopup = ""; //if user clic on modify if($protectedPost['MODIF_x']){ //don't show the botton modify $img_modif=""; //list of input we can modify $name=show_modif($item->NAME,'NAME',0); $description=show_modif($item->DESCRIPTION,'DESCR',1); //show new bottons $button_valid=""; $button_reset=""; } else{ //only show the botton for modify $img_modif=""; $name=$item->NAME; $description=$item->DESCRIPTION; $button_valid=""; $button_reset=""; } //form for modify values of group's echo open_form('CHANGE'); echo ""; echo "".$tdhd.$l->g(577).$tdhf.$tdhdpb.$name.$tdhfpb; echo $tdhd.$l->g(593).$tdhf.$tdhdpb.dateTimeFromMysql($item->LASTDATE).$tdhfpb; if( ! $pureStat ) echo "".$tdhd.$l->g(594).$tdhf.$tdhdpb.date("F j, Y, g:i a",$item->CREATE_TIME ).$tdhfpb; echo ""; echo $tdhd.$l->g(615).$tdhf."".$tdhd.$l->g(53).$tdhf.$tdhdpb.$description.$tdhfpb; if ($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES") echo ""; echo "$tdhfpb
 
"; if( ! $pureStat ){ echo $item->REQUEST; //affichage des requetes qui ont formé ce groupe if ($item->XMLDEF != ""){ $tab_list_sql=regeneration_sql($item->XMLDEF); $i=1; while ($tab_list_sql[$i]){ echo $i.") => ".$tab_list_sql[$i]."
"; $i++; } } }else { echo $l->g(595); } echo "
".$button_valid."  ".$button_reset."  ".$img_modif."
"; echo close_form(); $td1 = ""; $td2 = ""; $td3 = $td2; $td4 = ""; //*/// END COMPUTER SUMMARY if ($server_group){ $sql_affect_pack="select da.NAME, da.PRIORITY,da.FRAGMENTS,da.SIZE,da.OSNAME,de.INFO_LOC,de.CERT_FILE,de.CERT_PATH,de.PACK_LOC from download_enable de,download_available da where de.GROUP_ID =%s and da.FILEID=de.FILEID group by de.fileid;"; $arg=$systemid; $res_affect_pack = mysql2_query_secure($sql_affect_pack, $_SESSION['OCS']["readServer"],$arg); $i=0; while( $val_affect_pack = mysqli_fetch_array($res_affect_pack)) { $PACK_LIST[$i]['NAME'] = $val_affect_pack['NAME']; $PACK_LIST[$i]['PRIORITY'] = $val_affect_pack['PRIORITY']; $PACK_LIST[$i]['FRAGMENTS'] = $val_affect_pack['FRAGMENTS']; $PACK_LIST[$i]['SIZE'] = $val_affect_pack['SIZE']; $PACK_LIST[$i]['OSNAME'] = $val_affect_pack['OSNAME']; $PACK_LIST[$i]['INFO_LOC'] = $val_affect_pack['INFO_LOC']; $PACK_LIST[$i]['CERT_FILE'] = $val_affect_pack['CERT_FILE']; $PACK_LIST[$i]['CERT_PATH'] = $val_affect_pack['CERT_PATH']; $PACK_LIST[$i]['PACK_LOC'] = $val_affect_pack['PACK_LOC']; $i++; } if (isset($PACK_LIST)){ echo ""; echo ""; echo ""; foreach ($PACK_LIST[0] as $key=>$value){ echo $td2."".$key.""; } echo ""; $i=0; while ($PACK_LIST[$i]){ echo ""; echo ""; $ii++; $td3 = $ii%2==0?$td2:$td4; foreach ($PACK_LIST[$i] as $key=>$value){ echo $td3.$value.""; } echo ""; $i++; //print_r($valDeploy); } echo "
".$l->g(481)."
"; } require(MAIN_SECTIONS_DIR."/".$_SESSION['OCS']['url_service']->getDirectory('ms_server_redistrib')."/ms_server_redistrib.php"); }else{ // if( isset($protectedGet["action"]) || isset($protectedPost["action_form"]) ) { // require("ajout_maj.php"); // die(); // } if( ! isset($protectedGet["option"]) ) { $opt = $l->g(500); } else { $opt = stripslashes(urldecode($protectedGet["option"])); } $lblAdm = Array($l->g(500)); $imgAdm = Array("ms_config"); $lblHdw = Array($l->g(580), $l->g(581)); $imgHdw = Array("ms_all_computersred", "ms_all_computers",); echo ""; echo img($imgAdm[0],$lblAdm[0], 1, $opt); if( ! $pureStat ) echo img($imgHdw[0],$lblHdw[0], 1, $opt); echo img($imgHdw[1],$lblHdw[1], 1, $opt); echo "
"; echo"


"; switch ($opt) : case $l->g(500): print_perso($systemid); break; case $l->g(581): print_computers_cached($systemid); break; case $l->g(580): print_computers_real($systemid); break; default : print_perso($systemid); break; endswitch; } if(!$ajax){ echo ""; flush(); echo ""; echo ""; } ob_end_flush(); function regeneration_sql($valGroup){ $tab=xml_decode($valGroup); $cherche = array( "","",""); $replace = array("","",""); $tab= str_replace($cherche, $replace, $tab); $tab_list_sql=explode("",trim($tab)); unset($tab_list_sql[0]); return($tab_list_sql); } function form_action_group($systemid){ global $l; $reqGrpStat = "SELECT REQUEST,XMLDEF FROM groups WHERE hardware_id=%s"; $resGrpStat = mysql2_query_secure($reqGrpStat, $_SESSION['OCS']["readServer"],$systemid); $valGrpStat = mysqli_fetch_array($resGrpStat); echo "
".$l->g(585).": "; else echo ""; echo "
"; } function update_computer_group($hardware_id,$group_id,$static){ $resDelete = "DELETE FROM groups_cache WHERE hardware_id=%s AND group_id=%s"; $arg=array($hardware_id,$group_id); //echo $resDelete; mysql2_query_secure( $resDelete, $_SESSION['OCS']["writeServer"],$arg ); if( $static != 0 ) { $reqInsert = "INSERT INTO groups_cache(hardware_id, group_id, static) VALUES (%s, %s, %s)"; $arg=array($hardware_id,$group_id,$static); $resInsert = mysql2_query_secure( $reqInsert, $_SESSION['OCS']["writeServer"],$arg ); } } function print_computers_real($systemid) { global $l,$list_fields,$list_col_cant_del,$default_fields,$tab_options,$protectedPost; if( isset($protectedPost["actshowgroup"]) and $protectedPost["modify"] != "") { foreach( $protectedPost as $key=>$val ) {//check65422 if( substr($key,0,5) == "check") { update_computer_group(substr($key,5),$systemid,$protectedPost["actshowgroup"]); } } $tab_options['CACHE']='RESET'; } //group 2.0 version $sql_group="SELECT xmldef FROM groups WHERE hardware_id='%s'"; $arg=$systemid; $resGroup = mysql2_query_secure( $sql_group, $_SESSION['OCS']["readServer"],$arg); $valGroup = mysqli_fetch_array($resGroup);//group old version if( ! $valGroup["xmldef"] ){ $sql_group="SELECT request FROM groups WHERE hardware_id='%s'"; $arg=$systemid; $resGroup = mysql2_query_secure( $sql_group, $_SESSION['OCS']["readServer"] ,$arg); $valGroup = mysqli_fetch_array($resGroup); $request=$valGroup["request"]; $tab_id= array(); $result_value = mysqli_query($_SESSION['OCS']["readServer"],$request) or die(mysqli_error($_SESSION['OCS']["readServer"])); $fied_id_name= mysqli_field_name($result_value, 0); while($value=mysqli_fetch_array($result_value)) { $tab_id[] = $value[$fied_id_name]; } }else{ $tab_list_sql=regeneration_sql($valGroup["xmldef"]); $i=1; $tab_id= array(); while ($tab_list_sql[$i]){ if ($tab_id != array()){ if (strtolower(substr($tab_list_sql[$i],0,19)) == "select distinct id ") $tab_list_sql[$i] .= " and id in (".implode(",",$tab_id).")"; else $tab_list_sql[$i] .= " and hardware_id in (".implode(",",$tab_id).")"; unset($tab_id); } $result_value = mysqli_query($_SESSION['OCS']["readServer"],xml_decode($tab_list_sql[$i])) or die(mysqli_error($_SESSION['OCS']["readServer"])); while($value=mysqli_fetch_array($result_value)) { $tab_id[] = $value["HARDWARE_ID"]; } $i++; } } if ($tab_id == array()){ msg_warning($l->g(766)); return false; } $form_name="calcul_computer_groupcache"; $table_name=$form_name; echo "".$l->g(927).""; echo open_form($form_name); $queryDetails = "SELECT "; foreach ($list_fields as $lbl=>$value){ $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1)." FROM hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id where h.id in (".implode(",",$tab_id).") and deviceid <> '_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_'"; if(isset($mesmachines) and $mesmachines != '') $queryDetails .= $mesmachines; $tab_options['FILTRE']=array('h.NAME'=>'Nom'); $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); form_action_group($systemid); echo close_form(); if(AJAX){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } } function print_computers_cached($systemid) { global $l,$server_group,$protectedPost,$list_fields,$list_col_cant_del,$default_fields,$tab_options; //print_r($protectedPost); //traitement des machines du groupe if( isset($protectedPost["actshowgroup"]) and $protectedPost["modify"] != "") { foreach( $protectedPost as $key=>$val ) {//check65422 if( substr($key,0,5) == "check") { update_computer_group(substr($key,5),$systemid,$protectedPost["actshowgroup"]); } } $tab_options['CACHE']='RESET'; } if ($_SESSION['OCS']['profile']->getRestriction('GUI') == "YES"){ $sql_mesMachines="select hardware_id from accountinfo a where ".$_SESSION['OCS']["mesmachines"]; $res_mesMachines = mysql2_query_secure($sql_mesMachines, $_SESSION['OCS']["readServer"]); $mesmachines="("; while ($item_mesMachines = mysqli_fetch_object($res_mesMachines)){ $mesmachines.= $item_mesMachines->hardware_id.","; } $mesmachines="and e.hardware_id IN ".substr($mesmachines,0,-1).")"; } $form_name="list_computer_groupcache"; $table_name=$form_name; echo open_form($form_name); $queryDetails = "SELECT "; foreach ($list_fields as $lbl=>$value){ $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1)." FROM hardware h LEFT JOIN accountinfo a ON a.hardware_id=h.id ,groups_cache e where group_id='".$systemid."' and h.id=e.HARDWARE_ID "; if(isset($mesmachines) and $mesmachines != '') $queryDetails .= $mesmachines; $tab_options['FILTRE']=array('h.NAME'=>'Nom'); $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $statut=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($statut){ form_action_group($systemid); } echo close_form(); if(AJAX){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); ob_start(); } } function print_perso($systemid) { global $l, $td1, $td2, $td3, $td4,$pages_refs,$protectedGet; $i=0; $queryDetails = "SELECT * FROM devices WHERE hardware_id=$systemid"; $resultDetails = mysqli_query($_SESSION['OCS']["readServer"],$queryDetails) or die(mysqli_error($_SESSION['OCS']["readServer"])); $form_name='config_group'; echo open_form($form_name); echo ""; //echo " $td1 "."Libellé"." $td1 "."Valeur"." "; while($item=mysqli_fetch_array($resultDetails,MYSQL_ASSOC)) { $optPerso[ $item["NAME"] ][ "IVALUE" ] = $item["IVALUE"]; $optPerso[ $item["NAME"] ][ "TVALUE" ] = $item["TVALUE"]; } $ii++; $td3 = $ii%2==0?$td2:$td4; //IPDISCOVER echo " "; echo $td3.$l->g(489).""; if( isset( $optPerso["IPDISCOVER"] )) { if( $optPerso["IPDISCOVER"]["IVALUE"]==0 ) echo $td3.$l->g(490).""; else if( $optPerso["IPDISCOVER"]["IVALUE"]==2 ) echo $td3.$l->g(491)." ".$optPerso["IPDISCOVER"]["TVALUE"].""; else if( $optPerso["IPDISCOVER"]["IVALUE"]==1 ) echo $td3.$l->g(492)." ".$optPerso["IPDISCOVER"]["TVALUE"].""; } else { echo $td3.$l->g(493).""; } if( $_SESSION['OCS']['profile']->getConfigValue('CONFIG') == "YES"){ echo ""; } $ii++; $td3 = $ii%2==0?$td2:$td4; $field_name=array('DOWNLOAD','DOWNLOAD_CYCLE_LATENCY','DOWNLOAD_PERIOD_LENGTH','DOWNLOAD_FRAG_LATENCY', 'DOWNLOAD_PERIOD_LATENCY','DOWNLOAD_TIMEOUT','PROLOG_FREQ','SNMP'); $optdefault=look_config_default_values($field_name); //FREQUENCY echo ""; echo $td3.$l->g(494).""; if( isset( $optPerso["FREQUENCY"] )) { if( $optPerso["FREQUENCY"]["IVALUE"]==0 ) echo $td3.$l->g(485).""; else if( $optPerso["FREQUENCY"]["IVALUE"]==-1 ) echo $td3.$l->g(486).""; else echo $td3.$l->g(495)." ".$optPerso["FREQUENCY"]["IVALUE"]." ".$l->g(496).""; } else { echo $td3.$l->g(497).""; } echo ""; //DOWNLOAD_SWITCH echo ""; echo $td3.$l->g(417)." DOWNLOAD"; if( isset( $optPerso["DOWNLOAD_SWITCH"] )) { if( $optPerso["DOWNLOAD_SWITCH"]["IVALUE"]==0 ) echo $td3.$l->g(733).""; else if( $optPerso["DOWNLOAD_SWITCH"]["IVALUE"]==1 ) echo $td3.$l->g(205).""; else echo $td3.""; } else { echo $td3.$l->g(488)."("; if ($optdefault['ivalue']["DOWNLOAD"] == 1) echo $l->g(205); else echo $l->g(733); echo ")"; } echo ""; //DOWNLOAD_CYCLE_LATENCY optperso("DOWNLOAD_CYCLE_LATENCY",$l->g(720)." DOWNLOAD_CYCLE_LATENCY",$optPerso,1,$optdefault['ivalue']["DOWNLOAD_CYCLE_LATENCY"],$l->g(511)); //DOWNLOAD_FRAG_LATENCY optperso("DOWNLOAD_FRAG_LATENCY",$l->g(721)." DOWNLOAD_FRAG_LATENCY",$optPerso,1,$optdefault['ivalue']["DOWNLOAD_FRAG_LATENCY"],$l->g(511)); //DOWNLOAD_PERIOD_LATENCY optperso("DOWNLOAD_PERIOD_LATENCY",$l->g(722)." DOWNLOAD_PERIOD_LATENCY",$optPerso,1,$optdefault['ivalue']["DOWNLOAD_PERIOD_LATENCY"],$l->g(511)); //DOWNLOAD_PERIOD_LENGTH optperso("DOWNLOAD_PERIOD_LENGTH",$l->g(723)." DOWNLOAD_PERIOD_LENGTH",$optPerso,1,$optdefault['ivalue']["DOWNLOAD_PERIOD_LENGTH"]); //PROLOG_FREQ optperso("PROLOG_FREQ",$l->g(724)." PROLOG_FREQ",$optPerso,1,$optdefault['ivalue']["PROLOG_FREQ"],$l->g(730)); //SNMP_SWITCH echo ""; echo $td3.$l->g(1197)." SNMP_SWITCH"; if( isset( $optPerso["SNMP_SWITCH"] )) { if( $optPerso["SNMP_SWITCH"]["IVALUE"]==0 ) echo $td3.$l->g(733).""; else if( $optPerso["SNMP_SWITCH"]["IVALUE"]==1 ) echo $td3.$l->g(205).""; else echo $td3.""; } else { echo $td3.$l->g(488)."("; if ($optdefault['ivalue']["SNMP"] == 1) echo $l->g(205); else echo $l->g(733); echo ")"; } echo ""; //TELEDEPLOY require_once('require/function_machine.php'); show_packages($systemid,"ms_group_show"); if( $_SESSION['OCS']['profile']->getConfigValue('TELEDIFF') == "YES" ){ echo ""; } echo "
   
".(isset($optPerso["IPDISCOVER"])&&$optPerso["IPDISCOVER"]["IVALUE"]!=1?"":" ")."
".(isset($optPerso["FREQUENCY"])?"":" ")."
".(isset($optPerso["DOWNLOAD_SWITCH"])?"":" ")."
".(isset($optPerso["SNMP_SWITCH"])?"":" ")."
".$l->g(501)."
"; echo close_form(); } function img($i,$a,$avail,$opt) { global $systemid,$protectedGet; if( $opt == $a ) { $suff = "_a"; } if( $avail ) { $href = ""; $fhref = ""; $img = ''; } else { $href = ""; $fhref = ""; $img = ''; } return "".$href.$img.$fhref.""; } function show_stat($fileId){ global $td3,$protectedGet,$pages_refs; echo $td3.""; } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_groups/ms_groups.php000077500000000000000000000162321303466605000316400ustar00rootroot00000000000000getRestriction('GUI') == 'YES'){ $mycomputers=computer_list_by_tag(); if ($mycomputers == "ERROR"){ msg_error($l->g(893)); require_once(FOOTER_HTML); die(); } } //View for all profils? if(!$ajax){ if (isset($protectedPost['CONFIRM_CHECK']) and $protectedPost['CONFIRM_CHECK'] != "") $result=group_4_all($protectedPost['CONFIRM_CHECK']); } //if delete group if ($protectedPost['SUP_PROF'] != ""){ $result=delete_group($protectedPost['SUP_PROF']); if ($result['RESULT'] == "ERROR") msg_error($result['LBL']); $tab_options['CACHE']='RESET'; } $form_name='groups'; $tab_options['form_name']=$form_name; echo open_form($form_name); //view all groups if ($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES"){ $def_onglets['DYNA']=$l->g(810); //Dynamic group $def_onglets['STAT']=$l->g(809); //Static group centraux if ($_SESSION['OCS']["use_redistribution"] == 1) $def_onglets['SERV']=mb_strtoupper($l->g(651)); if ($protectedPost['onglet'] == "") $protectedPost['onglet']="STAT"; //show onglet show_tabs($def_onglets,$form_name,"onglet",0); echo '
'; }else{ $protectedPost['onglet']="STAT"; } $list_fields= array('GROUP_NAME'=>'h.NAME', 'GROUP_ID' =>'h.ID', 'DESCRIPTION'=>'h.DESCRIPTION', 'CREATE'=>'h.LASTDATE', 'NBRE'=>'NBRE'); //only for admins if ($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES"){ if ($protectedPost['onglet'] == "STAT") $list_fields['CHECK']= 'ID'; $list_fields['SUP']= 'ID'; $tab_options['LBL_POPUP']['SUP']='NAME'; $tab_options['LBL']['SUP']=$l->g(122); } //changement de nom à l'affichage des champs $tab_options['LBL']['CHECK']=$l->g(52); $tab_options['LBL']['GROUP_NAME']=$l->g(49); $table_name="LIST_GROUPS"; $tab_options['table_name']=$table_name; $default_fields= array('GROUP_NAME'=>'GROUP_NAME','DESCRIPTION'=>'DESCRIPTION','CREATE'=>'CREATE','NBRE'=>'NBRE','SUP'=>'SUP','CHECK'=>'CHECK'); $list_col_cant_del=array('GROUP_NAME'=>'GROUP_NAME','SUP'=>'SUP','CHECK'=>'CHECK'); $query=prepare_sql_tab($list_fields,array('SUP','CHECK','NBRE')); $tab_options['ARG_SQL']=$query['ARG']; $querygroup=$query['SQL']; //requete pour les groupes de serveurs if ($protectedPost['onglet'] == "SERV"){ $querygroup .= " from hardware h,download_servers ds where ds.group_id=h.id and h.deviceid = '_DOWNLOADGROUP_'"; //calcul du nombre de machines par groupe de serveur $sql_nb_mach="SELECT count(*) nb, group_id from download_servers group by group_id"; }else{ //requete pour les groupes 'normaux' $querygroup .= " from hardware h,groups g "; $querygroup .="where g.hardware_id=h.id and h.deviceid = '_SYSTEMGROUP_' "; if ($protectedPost['onglet'] == "DYNA") $querygroup.=" and ((g.request is not null and trim(g.request) != '') or (g.xmldef is not null and trim(g.xmldef) != ''))"; elseif ($protectedPost['onglet'] == "STAT") $querygroup.=" and (g.request is null or trim(g.request) = '') and (g.xmldef is null or trim(g.xmldef) = '') "; if($_SESSION['OCS']['profile']->getConfigValue('GROUPS')!="YES") $querygroup.=" and h.workgroup='GROUP_4_ALL' "; //calcul du nombre de machines par groupe $sql_nb_mach="SELECT count(*) nb, group_id from groups_cache gc,hardware h where h.id=gc.hardware_id "; if($_SESSION['OCS']['profile']->getRestriction('GUI') == "YES") $sql_nb_mach.=" and gc.hardware_id in ".$mycomputers; $sql_nb_mach .=" group by group_id"; } $querygroup.=" group by h.ID"; $result = mysql2_query_secure($sql_nb_mach, $_SESSION['OCS']["readServer"]) ; while($item = mysqli_fetch_object($result)){ //on force les valeurs du champ "nombre" à l'affichage $tab_options['VALUE']['NBRE'][$item -> group_id]=$item -> nb; $_SESSION['OCS']['VALUE_FIXED'][$tab_options['table_name']]['NBRE'][$item -> group_id]=$item -> nb; } //Modif ajoutée pour la prise en compte //du chiffre à rajouter dans la colonne de calcul //quand on a un seul groupe et qu'aucune machine n'est dedant. if (!isset($tab_options['VALUE']['NBRE'])) $tab_options['VALUE']['NBRE'][]=0; //on recherche les groupes visible pour cocher la checkbox à l'affichage if ($protectedPost['onglet'] == "STAT"){ $sql="select id from hardware where workgroup='GROUP_4_ALL'"; $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"]); while($item = mysqli_fetch_object($result)){ $protectedPost['check'.$item ->id]="check"; } } //on ajoute un javascript lorsque l'on clic sur la visibilité du groupe pour tous $tab_options['JAVA']['CHECK']['NAME']="NAME"; $tab_options['JAVA']['CHECK']['QUESTION']=$l->g(811); $tab_options['FILTRE']=array('NAME'=>$l->g(679),'DESCRIPTION'=>$l->g(53)); //affichage du tableau $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //if your profil is an admin groups, you can create one if ($_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES"){ echo ""; if ($protectedPost['onglet'] == "STAT") echo "

"; } //if user want add a new group if (isset($protectedPost['add_static_group']) and $_SESSION['OCS']['profile']->getConfigValue('GROUPS')=="YES"){ //NAME FIELD $name_field[]="NAME"; $tab_name[]=$l->g(577); $type_field[]=0; $value_field[]=$protectedPost['NAME']; $name_field[]="DESCR"; $tab_name[]=$l->g(53); $type_field[]=1; $value_field[]=$protectedPost['DESCR']; $tab_typ_champ=show_field($name_field,$type_field,$value_field); $tab_typ_champ[0]['CONFIG']['SIZE']=20; $tab_hidden['add_static_group']='add_static_group'; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'form_name' => 'NO_FORM', 'show_frame' => false )); } echo '
'; //fermeture du formulaire echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$querygroup,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_help/000077500000000000000000000000001303466605000265135ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_help/ms_ask.php000077500000000000000000000001311303466605000304770ustar00rootroot00000000000000

g(1377);?>

g(1375);?> g(1123);?> g(1296);?> g(1122);?> g(837)); require_once(FOOTER_HTML); die(); } $protectedPost['onglet'] = 'ADMIN_RSX'; $protectedPost['MODIF']=$protectedGet['value']; $left_menu_displayed=false; }else{ $data_on['ADMIN_RSX']=$l->g(1140); $data_on['ADMIN_TYPE']=$l->g(836); if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_SMTP_COMMUNITIES') == 'YES') $data_on['ADMIN_SMTP']=$l->g(1205); if ($protectedPost['onglet'] != $protectedPost['old_onglet']) unset($protectedPost['MODIF']); show_tabs($data_on,$form_name,"onglet",10); $left_menu_displayed=true; } $class=($left_menu_displayed)?"right-content":""; echo '
'; if ($protectedPost['onglet'] == 'ADMIN_RSX'){ $method=verif_base_methode('OCS'); if (!$method){ if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != ''){ delete_subnet($protectedPost['SUP_PROF']); $tab_options['CACHE']='RESET'; } if (isset($protectedPost['Valid_modif'])){ $result=add_subnet($protectedPost['ADD_IP'],$protectedPost['RSX_NAME'],$protectedPost['ID_NAME'],$protectedPost['ADD_SX_RSX']); if ($result) msg_error($result); else{ if (isset($protectedPost['MODIF'])) msg_success($l->g(1121)); else msg_success($l->g(1141)); //erase ipdiscover cache unset($_SESSION['OCS']['DATA_CACHE'][$table_name],$_SESSION['OCS']["ipdiscover"],$protectedPost['ADD_SUB'],$protectedPost['MODIF']); require_once(BACKEND.'ipdiscover/ipdiscover.php'); if (isset($protectedGet['value']) and $protectedGet['value'] != '') reloadform_closeme("ipdiscover",true); } $tab_options['CACHE']='RESET'; } if (isset($protectedPost['Reset_modif'])){ unset($protectedPost['ADD_SUB'],$protectedPost['MODIF']); if (isset($protectedGet['value']) and $protectedGet['value'] != '') reloadform_closeme("ipdiscover",true); } if (isset($protectedPost['ADD_SUB'])){ echo "g(931); $result=find_info_subnet($protectedPost['MODIF']); if (!isset($protectedPost['RSX_NAME'])) $protectedPost['RSX_NAME']=$result->NAME; if (!isset($protectedPost['ID_NAME'])) $protectedPost['ID_NAME']=$result->ID; if (!isset($protectedPost['ADD_IP'])) $protectedPost['ADD_IP']=$result->NETID; if (!isset($protectedPost['ADD_SX_RSX'])) $protectedPost['ADD_SX_RSX']=$result->MASK; if (isset($protectedGet['value']) and $protectedGet['value'] != '') $protectedPost['ADD_IP']=$protectedGet['value']; }else $title=$l->g(303); $list_id_subnet=look_config_default_values('ID_IPDISCOVER_%','LIKE'); if (isset($list_id_subnet)){ foreach ($list_id_subnet['tvalue'] as $key=>$value){ $list_subnet[$value]=$value; } }else $list_subnet=array(); $list_subnet = array(0 => "") + $list_subnet; $default_values=array('RSX_NAME'=>$protectedPost['RSX_NAME'], 'ID_NAME' =>$list_subnet, 'ADD_IP' =>$protectedPost['ADD_IP'], 'ADD_SX_RSX'=>$protectedPost['ADD_SX_RSX']); form_add_subnet($title,$default_values,$form_name); }else{ $sql="select NETID,NAME,ID,MASK from subnet"; $list_fields= array('NETID' => 'NETID', $l->g(49)=>'NAME', 'ID'=>'ID', 'MASK'=>'MASK', 'MODIF'=>'NETID', 'SUP'=>'NETID'); //$list_fields['SUP']='ID'; $default_fields=$list_fields; $list_col_cant_del=$list_fields; $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo ""; } }else msg_warning($method); }elseif($protectedPost['onglet'] == 'ADMIN_TYPE'){ if (isset($protectedPost['Reset_modif'])){ unset($protectedPost['MODIF']); } if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != ''){ delete_type($protectedPost['SUP_PROF']); $tab_options['CACHE']='RESET'; } if (isset($protectedPost['Valid_modif'])){ $result=add_type($protectedPost['TYPE_NAME'],$protectedPost['MODIF']); if ($result){ msg_error($result); $protectedPost['ADD_TYPE']="VALID"; } else{ $protectedPost = ''; $tab_options['CACHE']='RESET'; $msg_ok=$l->g(1121); } } if ($protectedPost['MODIF'] != ''){ echo "NAME; } $tab_typ_champ[0]['DEFAULT_VALUE']=$protectedPost['TYPE_NAME']; $tab_typ_champ[0]['INPUT_NAME']="TYPE_NAME"; $tab_typ_champ[0]['CONFIG']['SIZE']=60; $tab_typ_champ[0]['CONFIG']['MAXLENGTH']=255; $tab_typ_champ[0]['INPUT_TYPE']=0; $tab_name[0]=$l->g(938).": "; $tab_hidden['pcparpage']=$protectedPost["pcparpage"]; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $title, 'show_frame' => false )); }else{ if (isset($msg_ok)) msg_success($msg_ok); $sql="select ID,NAME from devicetype"; $list_fields= array('ID' => 'ID', $l->g(49)=>'NAME', 'MODIF'=>'ID', 'SUP'=>'ID'); $tab_options['LBL_POPUP']['SUP']='NAME'; $tab_options['LBL']['SUP']=$l->g(122); $default_fields=$list_fields; $list_col_cant_del=$list_fields; $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo ""; } }elseif($protectedPost['onglet'] == 'ADMIN_SMTP' and $_SESSION['OCS']['profile']->getConfigValue('MANAGE_SMTP_COMMUNITIES') == 'YES'){ if (isset($protectedPost['Valid_modif'])){ $msg_result=add_community($protectedPost['MODIF'],$protectedPost['NAME'],$protectedPost['VERSION'], $protectedPost['USERNAME'],$protectedPost['AUTHKEY'], $protectedPost['AUTHPASSWD']); if (isset($msg_result['SUCCESS'])){ unset($protectedPost['MODIF'],$protectedPost['ADD_COMM']); $msg_ok=$msg_result['SUCCESS']; $tab_options['CACHE']='RESET'; }else{ $msg_error=$msg_result['ERROR']; } } if (isset($protectedPost['Reset_modif'])){ unset($protectedPost['MODIF'],$protectedPost['ADD_COMM']); } if (isset($protectedPost['SUP_PROF']) and is_numeric($protectedPost['SUP_PROF'])){ del_community($protectedPost['SUP_PROF']); $msg_ok=$l->g(1212); } if(isset($msg_ok)) msg_success($msg_ok); if (isset($msg_error)) msg_error($msg_error); if ($protectedPost['ADD_COMM'] == $l->g(116) or is_numeric($protectedPost['MODIF'])){ $list_version=array('-1'=>'2c','1'=>'1','2'=>'2','3'=>'3'); $title=$l->g(1207); if (isset($protectedPost['MODIF']) and is_numeric($protectedPost['MODIF']) and !isset($protectedPost['NAME'])){ $info_com=find_community_info($protectedPost['MODIF']); $default_values=array('ID'=>$protectedPost['MODIF'], 'NAME'=>$info_com->NAME, 'VERSION' =>$list_version, 'USERNAME' =>$info_com->USERNAME, 'AUTHKEY'=>$info_com->AUTHKEY, 'AUTHPASSWD'=>$info_com->AUTHPASSWD); if ($info_com->VERSION == "2c") $protectedPost['VERSION']=-1; else $protectedPost['VERSION']=$info_com->VERSION; }else{ $default_values=array('ID'=>$protectedPost['ID'], 'NAME'=>$protectedPost['NAME'], 'VERSION' =>$list_version, 'USERNAME' =>$protectedPost['USERNAME'], 'AUTHKEY'=>$protectedPost['AUTHKEY'], 'AUTHPASSWD'=>$protectedPost['AUTHPASSWD']); } form_add_community($title,$default_values,$form_name); }else{ $sql="select * from snmp_communities"; $list_fields= array($l->g(277)=> 'VERSION', $l->g(49)=>'NAME', $l->g(24)=>'USERNAME', $l->g(2028)=>'AUTHKEY', $l->g(217)=>'AUTHPASSWD', 'MODIF'=>'ID', 'SUP'=>'ID'); //$list_fields['SUP']='ID'; $default_fields=$list_fields; $list_col_cant_del=$list_fields; $tab_options['LBL_POPUP']['SUP']='NAME'; $tab_options['LBL']['SUP']=$l->g(122); $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo ""; $protectedPost['ADD_COMM'] = $l->g(116); } } echo '
'; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_ipdiscover/ms_custom_info.php000077500000000000000000000237751303466605000335100ustar00rootroot00000000000000g(942); if (trim($protectedPost['TYPE']) == "") $ERROR= $l->g(943); if (isset($ERROR) and $protectedPost['MODIF_ID'] != '') $protectedPost['USER']=$protectedPost['USER_ENTER']; if (!isset($ERROR)){ //$post=xml_escape_string($protectedPost); if ($protectedPost['USER_ENTER'] != ''){ $sql="update network_devices set DESCRIPTION = '%s', TYPE = '%s', MACADDR = '%s', USER = '%s' where MACADDR='%s'"; $arg=array($protectedPost['COMMENT'],$protectedPost['TYPE'],$protectedPost['mac'],$user,$protectedPost['MODIF_ID']); }else{ $sql="insert into network_devices (DESCRIPTION,TYPE,MACADDR,USER) VALUES('%s','%s','%s','%s')"; $arg=array($protectedPost['COMMENT'],$protectedPost['TYPE'],$protectedPost['mac'],$user); } mysql2_query_secure( $sql , $_SESSION['OCS']["writeServer"],$arg); //suppression du cache pour prendre en compte la modif unset($_SESSION['OCS']['DATA_CACHE']['IPDISCOVER_'.$protectedGet['prov']]); }else{ $protectedPost['MODIF']=$protectedPost['mac']; } } //formulaire de saisie de l'identification de l'adresse mac if (isset($protectedPost['MODIF']) and $protectedPost['MODIF'] != ''){ //cas d'une modification de la donnée déjà saisie if ($protectedGet['prov'] == "ident" and !isset($protectedPost['COMMENT'])){ $sql="select DESCRIPTION,TYPE,MACADDR,USER from network_devices where id ='%s'"; $arg=$protectedPost['MODIF']; $res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg ); $val = mysqli_fetch_array( $res ); $protectedPost['COMMENT']=$val['DESCRIPTION']; $protectedPost['MODIF']=$val['MACADDR']; $protectedPost['TYPE']=$val['TYPE']; $protectedPost['USER']= $val['USER']; $protectedPost['MODIF_ID']=$protectedPost['MODIF']; } $tab_hidden['USER_ENTER']=$protectedPost['USER']; $tab_hidden['MODIF_ID']=$protectedPost['MODIF_ID']; //si on est dans le cas d'une modif, on affiche le login qui a saisi la donnée if ($protectedPost['MODIF_ID'] != ''){ $tab_typ_champ[3]['DEFAULT_VALUE']=$protectedPost['USER']; $tab_typ_champ[3]['INPUT_NAME']="USER"; $tab_typ_champ[3]['INPUT_TYPE']=3; $tab_name[3]=$l->g(944).": "; $title=$l->g(945); }else{ $title=$l->g(946); } $tab_typ_champ[0]['DEFAULT_VALUE']=$protectedPost['MODIF']; $tab_typ_champ[0]['INPUT_NAME']="MAC"; $tab_typ_champ[0]['INPUT_TYPE']=3; $tab_name[0]=$l->g(95).": "; $tab_typ_champ[1]['DEFAULT_VALUE']=$protectedPost['COMMENT']; $tab_typ_champ[1]['INPUT_NAME']="COMMENT"; $tab_typ_champ[1]['INPUT_TYPE']=0; $tab_typ_champ[1]['CONFIG']['SIZE']=60; $tab_typ_champ[1]['CONFIG']['MAXLENGTH']=255; $tab_name[1]=$l->g(53).": "; $sql="select distinct NAME from devicetype "; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"]); while ($row=mysqli_fetch_object($res)){ $list_type[$row->NAME]=$row->NAME; } $tab_typ_champ[2]['DEFAULT_VALUE']=$list_type; $tab_typ_champ[2]['INPUT_NAME']="TYPE"; $tab_typ_champ[2]['INPUT_TYPE']=2; $tab_name[2]=$l->g(66).": "; $tab_hidden['mac']=$protectedPost['MODIF']; if (isset($ERROR)) msg_error($ERROR); tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $title )); } else{ //affichage des périphériques if (!(isset($protectedPost["pcparpage"]))) $protectedPost["pcparpage"]=5; if (isset($protectedGet['value'])){ if ($protectedGet['prov'] == "no_inv"){ $title=$l->g(947); $sql="SELECT ip, mac, mask, date, name FROM netmap n LEFT JOIN networks ns ON ns.macaddr=n.mac WHERE n.netid='%s' AND (ns.macaddr IS NULL OR ns.IPSUBNET <> n.netid) AND mac NOT IN (SELECT DISTINCT(macaddr) FROM network_devices)"; $tab_options['ARG_SQL']=array($protectedGet['value']); $list_fields= array($l->g(34) => 'ip','MAC'=>'mac', $l->g(208)=>'mask', $l->g(232)=>'date', $l->g(318)=>'name'); $tab_options['FILTRE']=array_flip($list_fields); $tab_options['ARG_SQL_COUNT']=array($protectedGet['value']); $list_fields['SUP']='mac'; $list_fields['MODIF']='mac'; $tab_options['MODIF']['IMG']="image/prec16.png"; $tab_options['LBL']['MODIF']=$l->g(114); $default_fields= $list_fields; }elseif($protectedGet['prov'] == "ident"){ $title=$l->g(948); $sql="select n.ID,n.TYPE,n.DESCRIPTION,a.IP,a.MAC,a.MASK,a.NETID,a.NAME,a.date,n.USER from network_devices n LEFT JOIN netmap a ON a.mac=n.macaddr where netid='%s'"; $tab_options['ARG_SQL']=array($protectedGet['value']); $list_fields= array($l->g(66) => 'TYPE',$l->g(53)=>'DESCRIPTION', $l->g(34)=>'IP', 'MAC'=>'MAC', $l->g(208)=>'MASK', $l->g(316)=>'NETID', $l->g(318)=>'NAME', $l->g(232)=>'date', $l->g(369)=>'USER'); $tab_options['FILTRE']=array_flip($list_fields); $tab_options['ARG_SQL_COUNT']=array($protectedGet['value']); $list_fields['SUP']='MAC'; $list_fields['MODIF']='ID'; $default_fields= array($l->g(34)=>$l->g(34),$l->g(66)=>$l->g(66),$l->g(53)=>$l->g(53), 'MAC'=>'MAC',$l->g(232)=>$l->g(232),$l->g(369)=>$l->g(369),'SUP'=>'SUP','MODIF'=>'MODIF'); }elseif($protectedGet['prov'] == "inv" or $protectedGet['prov'] == "ipdiscover"){ //BEGIN SHOW ACCOUNTINFO require_once('require/function_admininfo.php'); $accountinfo_value=interprete_accountinfo($list_fields,$tab_options); if (array($accountinfo_value['TAB_OPTIONS'])) $tab_options=$accountinfo_value['TAB_OPTIONS']; if (array($accountinfo_value['DEFAULT_VALUE'])) $default_fields=$accountinfo_value['DEFAULT_VALUE']; $list_fields=$accountinfo_value['LIST_FIELDS']; $tab_options['FILTRE']=array_flip($list_fields); //END SHOW ACCOUNTINFO $list_fields2 = array ( $l->g(46) => "h.lastdate", 'NAME'=>'h.name', $l->g(24) => "h.userid", $l->g(25) => "h.osname", $l->g(33) => "h.workgroup", $l->g(275) => "h.osversion", $l->g(34) => "h.ipaddr", $l->g(557) => "h.userdomain"); $tab_options["replace_query_arg"]['MD5_DEVICEID']=" md5(deviceid) "; $list_fields=array_merge ($list_fields,$list_fields2); $sql=prepare_sql_tab($list_fields); $list_fields=array_merge($list_fields,array('MD5_DEVICEID' => "MD5_DEVICEID")); $tab_options['ARG_SQL']=$sql['ARG']; if($protectedGet['prov'] == "inv"){ $title=$l->g(1271); $sql=$sql['SQL'].",md5(deviceid) as MD5_DEVICEID from accountinfo a,hardware h LEFT JOIN networks n ON n.hardware_id=h.id"; $sql.=" where ipsubnet='%s' and status='Up' and a.hardware_id=h.id "; }else{ $title=$l->g(492); $sql=$sql['SQL']." from accountinfo a,hardware h left join devices d on d.hardware_id=h.id"; $sql.=" where a.hardware_id=h.id and (d.ivalue=1 or d.ivalue=2) and d.name='IPDISCOVER' and d.tvalue='%s'"; } array_push($tab_options['ARG_SQL'],$protectedGet['value']); $default_fields['NAME']='NAME'; $default_fields[$l->g(34)]=$l->g(34); $default_fields[$l->g(24)]=$l->g(24); $default_fields[$l->g(25)]=$l->g(25); $default_fields[$l->g(275)]=$l->g(275); $tab_options['ARG_SQL_COUNT']=array($protectedGet['value']); $tab_options['FILTRE']['h.name']=$l->g(49); $tab_options['FILTRE']['h.userid']=$l->g(24); $tab_options['FILTRE']['h.osname']=$l->g(25); $tab_options['FILTRE']['h.ipaddr']=$l->g(34); } printEnTete($title); echo "

"; $tab_options['LBL']['MAC']=$l->g(95); $list_col_cant_del=array($l->g(66)=>$l->g(66),'SUP'=>'SUP','MODIF'=>'MODIF'); $table_name="IPDISCOVER_".$protectedGet['prov']; $tab_options['table_name']=$table_name; $form_name=$table_name; $tab_options['form_name']=$form_name; echo open_form($form_name); $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); $fipdisc = "ipdiscover-util.pl" ; $values=look_config_default_values(array('IPDISCOVER_IPD_DIR'), '', array('IPDISCOVER_IPD_DIR'=>array('TVALUE'=>VARLIB_DIR))); $IPD_DIR=$values['tvalue']['IPDISCOVER_IPD_DIR']."/ipd"; if( $scriptPresent = @stat($fipdisc) ) { $filePresent = true; if( ! is_executable($fipdisc) ) { $msg_info=$fipdisc." ".$l->g(341); } else if( ! is_writable($IPD_DIR) ) { $msg_info=$l->g(342)." ".$fipdisc." (".$IPD_DIR.")"; } if (!isset($msg_info)){ echo "

"; }else msg_info($msg_info); } echo close_form(); } } if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_ipdiscover/ms_ipdiscover.php000077500000000000000000000164231303466605000333220ustar00rootroot00000000000000g(312)); $form_name='ipdiscover'; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; echo open_form($form_name); //delete a subnet if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != '' and $_SESSION['OCS']['profile']->getConfigValue('IPDISCOVER') == "YES"){ $sql_del="delete from subnet where netid='%s'"; $arg_del=$protectedPost['SUP_PROF']; mysql2_query_secure($sql_del, $_SESSION['OCS']["writeServer"],$arg_del); //delete cache unset($_SESSION['OCS']["ipdiscover"]); require_once(BACKEND.'ipdiscover/ipdiscover.php'); $tab_options['CACHE']='RESET'; } if (isset($_SESSION['OCS']["ipdiscover"])){ $dpt=array_keys($_SESSION['OCS']["ipdiscover"]); array_unshift($dpt,""); foreach ($dpt as $key=>$value){ $list_index[$key]=$value; } asort($list_index); echo $l->g(562)." ".show_modif($list_index,'DPT_CHOISE',2,$form_name,array('DEFAULT' => "NO")); }else msg_info(mb_strtoupper($l->g(1134))); if (isset($protectedPost['DPT_CHOISE']) and $protectedPost['DPT_CHOISE'] != '0'){ $array_rsx=find_all_subnet($dpt[$protectedPost['DPT_CHOISE']]); $tab_options['VALUE']['LBL_RSX']=$_SESSION['OCS']["ipdiscover"][$dpt[$protectedPost['DPT_CHOISE']]]; $arg_sql=array(); $sql=" select * from (select inv.RSX as ID, inv.c as 'INVENTORIE', non_ident.c as 'NON_INVENTORIE', ipdiscover.c as 'IPDISCOVER', ident.c as 'IDENTIFIE', CASE WHEN ident.c IS NULL and ipdiscover.c IS NULL THEN 100 WHEN ident.c IS NULL THEN 0 ELSE round(100-(non_ident.c*100/(ident.c+non_ident.c)),1) END as 'pourcentage' from (SELECT COUNT(DISTINCT hardware_id) as c,'IPDISCOVER' as TYPE,tvalue as RSX FROM devices WHERE name='IPDISCOVER' and tvalue in "; $arg=mysql2_prepare($sql,$arg_sql,$array_rsx); $arg['SQL'] .= " GROUP BY tvalue) ipdiscover right join (SELECT count(distinct(hardware_id)) as c,'INVENTORIE' as TYPE,ipsubnet as RSX FROM networks left join subnet on networks.ipsubnet=subnet.netid WHERE ipsubnet in "; $arg=mysql2_prepare($arg['SQL'],$arg['ARG'],$array_rsx); $arg['SQL'] .= " and status='Up' GROUP BY ipsubnet) inv on ipdiscover.RSX=inv.RSX left join (SELECT COUNT(DISTINCT mac) as c,'IDENTIFIE' as TYPE,netid as RSX FROM netmap WHERE mac IN (SELECT DISTINCT(macaddr) FROM network_devices) and netid in "; $arg=mysql2_prepare($arg['SQL'],$arg['ARG'],$array_rsx); $arg['SQL'] .= " GROUP BY netid) ident on ipdiscover.RSX=ident.RSX left join (SELECT COUNT(DISTINCT mac) as c,'NON IDENTIFIE' as TYPE,netid as RSX FROM netmap n LEFT JOIN networks ns ON ns.macaddr=n.mac WHERE n.mac NOT IN (SELECT DISTINCT(macaddr) FROM network_devices) and (ns.macaddr IS NULL OR ns.IPSUBNET <> n.netid) and n.netid in "; $arg=mysql2_prepare($arg['SQL'],$arg['ARG'],$array_rsx); $arg['SQL'] .= " GROUP BY netid) non_ident on non_ident.RSX=inv.RSX ) toto"; $tab_options['ARG_SQL']=$arg['ARG']; $list_fields= array('LBL_RSX' => 'LBL_RSX', 'RSX'=>'ID', 'INVENTORIE'=>'INVENTORIE', 'NON_INVENTORIE'=>'NON_INVENTORIE', 'IPDISCOVER'=>'IPDISCOVER', 'IDENTIFIE'=>'IDENTIFIE'); if ($_SESSION['OCS']['profile']->getConfigValue('IPDISCOVER') == "YES") $list_fields['SUP']='ID'; $list_fields['PERCENT_BAR']='pourcentage'; $table_name="IPDISCOVER"; $tab_options['table_name']=$table_name; $default_fields= $list_fields; $list_col_cant_del=array('RSX'=>'RSX','SUP'=>'SUP'); $tab_options['LIEN_LBL']['INVENTORIE']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_custom_info'].'&head=1&prov=inv&value='; $tab_options['LIEN_CHAMP']['INVENTORIE']='ID'; $tab_options['LIEN_TYPE']['INVENTORIE']='POPUP'; $tab_options['POPUP_SIZE']['INVENTORIE']="width=900,height=600"; $tab_options['NO_LIEN_CHAMP']['INVENTORIE']=array(0); $tab_options['LIEN_LBL']['IPDISCOVER']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_multi_search'].'&prov=ipdiscover1&value='; $tab_options['LIEN_CHAMP']['IPDISCOVER']='ID'; $tab_options['NO_LIEN_CHAMP']['IPDISCOVER']=array(0); $tab_options['LIEN_LBL']['NON_INVENTORIE']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_custom_info'].'&prov=no_inv&head=1&value='; $tab_options['LIEN_CHAMP']['NON_INVENTORIE']='ID'; $tab_options['LIEN_TYPE']['NON_INVENTORIE']='POPUP'; $tab_options['POPUP_SIZE']['NON_INVENTORIE']="width=900,height=600"; $tab_options['NO_LIEN_CHAMP']['NON_INVENTORIE']=array(0); $tab_options['LIEN_LBL']['IDENTIFIE']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_custom_info'].'&prov=ident&head=1&value='; $tab_options['LIEN_CHAMP']['IDENTIFIE']='ID'; $tab_options['LIEN_TYPE']['IDENTIFIE']='POPUP'; $tab_options['POPUP_SIZE']['IDENTIFIE']="width=900,height=600"; $tab_options['REPLACE_WITH_CONDITION']['INVENTORIE'][' ']='0'; $tab_options['REPLACE_WITH_CONDITION']['IPDISCOVER'][' ']='0'; $tab_options['REPLACE_WITH_CONDITION']['NON_INVENTORIE'][' ']='0'; $tab_options['REPLACE_WITH_CONDITION']['IDENTIFIE'][' ']='0'; $tab_options['REPLACE_WITH_CONDITION']['PERCENT_BAR'][' ']=array('IDENTIFIE'=>'0','NON_INVENTORIE'=>'100'); $tab_options['LBL']['LBL_RSX']=$l->g(863); $tab_options['LBL']['RSX']=$l->g(869); $tab_options['LBL']['INVENTORIE']=$l->g(364); $tab_options['LBL']['NON_INVENTORIE']=$l->g(365); $tab_options['LBL']['IPDISCOVER']=$l->g(312); $tab_options['LBL']['IDENTIFIE']=$l->g(366); $tab_options['LBL']['PERCENT_BAR']=$l->g(1125); //you can modify your subnet if ipdiscover is local define if ( $_SESSION['OCS']["ipdiscover_methode"] == "OCS" and $_SESSION['OCS']['profile']->getConfigValue('IPDISCOVER') == "YES"){ $tab_options['LIEN_LBL']['LBL_RSX']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_admin_ipdiscover'].'&head=1&value='; $tab_options['LIEN_CHAMP']['LBL_RSX']='ID'; $tab_options['LIEN_TYPE']['LBL_RSX']='POPUP'; $tab_options['POPUP_SIZE']['LBL_RSX']="width=700,height=500"; } $tab_options['NO_LIEN_CHAMP']['IDENTIFIE']=array(0); $tab_options['NO_TRI']['LBL_RSX']='LBL_RSX'; $val_count=count_noinv_network_devices($dpt[$protectedPost['DPT_CHOISE']]); $strEnTete = "

".$_SESSION['OCS']["ipdiscover_id"]." ".$dpt[$protectedPost['DPT_CHOISE']]."
"; $strEnTete .= "(".$val_count." ".$l->g(219).")

"; printEnTete($strEnTete); $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$arg['SQL'],$tab_options); } ?> ms_ipdiscover_analyse.php000077500000000000000000000044761303466605000347640ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_ipdiscoverarray('TVALUE'=>VARLIB_DIR))); $fname=$values['tvalue']['IPDISCOVER_IPD_DIR']; $file_name=$fname."/ipd/".$pas.".ipd"; //reset cache? if (isset($protectedPost['reset']) and $protectedPost['reset'] != ''){ unlink( $file_name ); reloadform_closeme('',true); }else{ if (!is_readable($file_name)) runCommand("-cache -net=".$pas,$fname); $tabBalises = Array($l->g(34) => "IP", $l->g(95) => "MAC", $l->g(49) => "NAME", $l->g(232) => "DATE", $l->g(66) => "TYPE"); $ret=array(); $ret= parse_xml_file($file_name,$tabBalises,"HOST"); if ($ret != array()){ $sql="select "; $i=0; //var_dump($ret); while ($ret[$i]){ foreach ($ret[$i] as $key=>$value){ $sql.= "'".$value. "' as ".$key.","; } $sql=substr($sql,0,-1)." union select "; $i++; } $sql=substr($sql,0,-13); $default_fields=$tabBalises; $list_col_cant_del=$default_fields; $tab_options['NO_NAME']['NAME']=1; $result_exist=ajaxtab_entete_fixe($tabBalises,$default_fields,$tab_options,$list_col_cant_del); } echo "

"; } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($tabBalises,$default_fields,$list_col_cant_del,$sql,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_logs/000077500000000000000000000000001303466605000265275ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_logs/ms_logs.php000077500000000000000000000051131303466605000307060ustar00rootroot00000000000000$value){ if ($id == 0){ $name='as name'; $date_create='as date_create'; $date_modif='as date_modif'; $size='as size'; }else{ $name=''; $date_create=''; $date_modif=''; $size=''; } $sql.="select '%s' ".$name.",'%s' ".$date_create.",'%s' ".$date_modif.",'%s' ".$size." union "; array_push($arg,$value); array_push($arg,rtrim($data['date_create'][$id],".")); array_push($arg,rtrim($data['date_modif'][$id],".")); array_push($arg,round($data['size'][$id]/1024,3)." ".$l->g(516)); } $sql=substr($sql,0,-6); $list_fields=array('name' => 'name', $l->g(951) => 'date_create', $l->g(952) => 'date_modif', $l->g(953) => 'size' ); $list_col_cant_del=$list_fields; $default_fields= $list_fields; // $sql= "select '%s' as function,%s from deploy"; $tab_options['ARG_SQL']=$arg; $tab_options['LBL']['name']=$l->g(950); $tab_options['LIEN_LBL']['name']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_csv'].'&no_header=1&log='; $tab_options['LIEN_CHAMP']['name']='name'; $tab_options['LIEN_TYPE']['name']='POPUP'; $tab_options['POPUP_SIZE']['name']="width=900,height=600"; printEntete($l->g(928)); $table_name = $form_name; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); }else msg_warning($l->g(766)); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_multi_search/000077500000000000000000000000001303466605000302425ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_multi_search/ms_custom_lock.php000077500000000000000000000025041303466605000340000ustar00rootroot00000000000000g(976)); $form_name="lock_affect"; echo open_form($form_name); echo "
"; $list_id=multi_lot($form_name,$l->g(601)); if ($protectedPost['LOCK'] != '' and isset($protectedPost['LOCK'])){ if (isset($_SESSION['OCS']["mesmachines"])) $_SESSION['OCS']["TRUE_mesmachines"]=$_SESSION['OCS']["mesmachines"]; else $_SESSION['OCS']["TRUE_mesmachines"]=array(); $_SESSION['OCS']["mesmachines"]=" a.hardware_id in (".$list_id.")"; echo ""; } if ($protectedPost['CHOISE'] != ""){ echo "

".$l->g(978).""; echo "

".$l->g(979); echo "

"; } echo "
"; echo close_form(); ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_multi_search/ms_custom_sup.php000077500000000000000000000022361303466605000336610ustar00rootroot00000000000000g(985)); $form_name="del_affect"; echo open_form($form_name); echo "
"; $list_id=multi_lot($form_name,$l->g(601)); if ($protectedPost['SUP'] != '' and isset($protectedPost['SUP'])){ $array_id=explode(',',$list_id); //$i=0; foreach ($array_id as $key=>$hardware_id){ deleteDid($hardware_id); //echo $hardware_id."
"; } } if ($list_id){ echo "

g(122)."\" name='SUP'>"; } echo "
";// echo close_form(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_multi_search/ms_custom_tag.php000077500000000000000000000167251303466605000336350ustar00rootroot00000000000000"; $list_id=multi_lot($form_name,$l->g(601)); if (isset($list_id) and $list_id != ''){ //cas of TAG INFO if (isset($protectedPost['Valid_modif']) and $protectedPost['Valid_modif'] != ''){ $info_account_id=admininfo_computer(); foreach ($protectedPost as $field=>$value){ if (substr($field, 0, 5) == "check"){ $temp=substr($field, 5); if (array_key_exists($temp,$info_account_id)){ //cas of checkbox foreach ($protectedPost as $field2=>$value2){ $casofcheck=explode('_',$field2); if ($casofcheck[0] . '_' . $casofcheck[1] == $temp){ if (isset($casofcheck[2])) $data_fields_account[$temp] .= $casofcheck[2] . "&&&"; } } if (!isset($data_fields_account[$temp])) $data_fields_account[$temp]=$protectedPost[$temp]; } } } if (isset($data_fields_account)){ updateinfo_computer($list_id,$data_fields_account,'LIST'); unset($_SESSION['OCS']['DATA_CACHE']['TAB_MULTICRITERE']); echo ""; echo ""; } } //CAS OF TELEDEPLOY if (isset($protectedPost['RAZ']) and $protectedPost['RAZ'] != "" and $protectedPost['pack_list'] != ""){ $sql="select ID from download_enable where fileid='%s'"; $arg=$protectedPost['pack_list']; $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $item = mysqli_fetch_object($result); require_once('require/function_telediff.php'); $nb_line_affected=desactive_packet($list_id,$item->ID); msg_success($nb_line_affected." ".$l->g(1026)); } //CAS OF WOL if(isset($protectedPost['WOL']) and $protectedPost['WOL'] != ''){ require_once('require/function_wol.php'); $wol = new Wol(); $sql="select IPADDRESS,MACADDR from networks WHERE status='Up' and hardware_id in "; $arg=array(); $tab_result=mysql2_prepare($sql,$arg,$list_id); $resultDetails = mysql2_query_secure($tab_result['SQL'], $_SESSION['OCS']["writeServer"],$tab_result['ARG']); $msg=""; while($item = mysqli_fetch_object($resultDetails)){ $wol->wake($item->MACADDR,$item->IPADDRESS); $msg.= "
".$wol->wol_send."=>".$item->MACADDR."/".$item->IPADDRESS; } msg_info($msg); } //tab definition if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') == "YES") $def_onglets['TAG']=$l->g(1022); else $protectedPost['onglet']='SUP_PACK'; $def_onglets['SUP_PACK']=$l->g(1021); if ($_SESSION['OCS']['profile']->getRestriction('WOL', 'NO')=="NO") $def_onglets['WOL']=$l->g(1280); if ($protectedPost['onglet'] == "") $protectedPost['onglet']="TAG"; //show onglet onglet($def_onglets,$form_name,"onglet",7); if (isset($protectedPost['CHOISE']) and $protectedPost['CHOISE'] != ""){ if (!isset($protectedPost['onglet']) or $protectedPost['onglet']=="TAG"){ require_once('require/function_admininfo.php'); $field_of_accountinfo=witch_field_more('COMPUTERS'); $tab_typ_champ=array(); $i=0; $dont_show_type=array(8,3); foreach ($field_of_accountinfo['LIST_FIELDS'] as $id=>$lbl){ if (!in_array($field_of_accountinfo['LIST_TYPE'][$id],$dont_show_type)){ if ($field_of_accountinfo['LIST_NAME'][$id] == "TAG"){ $truename="TAG"; }else $truename="fields_" . $id; if ($field_of_accountinfo['LIST_TYPE'][$id] == 6){ $tab_typ_champ[$i]['CONFIG']['MAXLENGTH']=10; $tab_typ_champ[$i]['CONFIG']['SIZE']=10; $tab_typ_champ[$i]['COMMENT_AFTER']=calendars($truename,"DDMMYYYY").""; }elseif (in_array($field_of_accountinfo['LIST_TYPE'][$id],array(2,4,7))){ $sql="select ivalue as ID,tvalue as NAME from config where name like 'ACCOUNT_VALUE_%s' order by 2"; $arg= $field_of_accountinfo['LIST_NAME'][$id]."%"; $result=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); while ($val = mysqli_fetch_array( $result )){ $tab_typ_champ[$i]['DEFAULT_VALUE'][$val['ID']]=$val['NAME']; } $tab_typ_champ[$i]['COMMENT_AFTER']=""; }else{ $tab_typ_champ[$i]['COMMENT_AFTER']=""; $tab_typ_champ[$i]['CONFIG']['MAXLENGTH']=100; $tab_typ_champ[$i]['CONFIG']['SIZE']=30; } $tab_typ_champ[$i]['INPUT_NAME']=$truename; $tab_typ_champ[$i]['INPUT_TYPE']=$convert_type[$field_of_accountinfo['LIST_TYPE'][$id]]; $tab_typ_champ[$i]['CONFIG']['JAVASCRIPT']=$java." onclick='document.getElementById(\"check".$truename."\").checked = true' "; //$tab_typ_champ[$i]['DEFAULT_VALUE']=$protectedPost[$truename]; $tab_name[$i]=$lbl; $i++; } } tab_modif_values($tab_name,$tab_typ_champ,array('TAG_MODIF'=>$protectedPost['MODIF'],'FIELD_FORMAT'=>$type_field[$protectedPost['MODIF']]),array( 'title' => $l->g(895) )); }elseif ($protectedPost['onglet']=="SUP_PACK"){ echo "
"; $queryDetails = "select d_a.fileid,d_a.name from download_available d_a, download_enable d_e where d_e.FILEID=d_a.FILEID group by d_a.NAME order by 1 desc"; $resultDetails = mysql2_query_secure($queryDetails, $_SESSION['OCS']["readServer"]); while($val = mysqli_fetch_array($resultDetails)){ $List[$val["fileid"]]=$val["name"]; } $select=show_modif($List,'pack_list',2,$form_name); echo $l->g(970).": ".$select; if ($protectedPost['pack_list'] != ""){ $sql ="select count(*) c, tvalue from download_enable d_e,devices d where d.name='DOWNLOAD' and d.IVALUE=d_e.ID and d_e.fileid='%s' and d.hardware_id in "; $arg = array($protectedPost['pack_list']); $tab_result=mysql2_prepare($sql,$arg,$list_id); $sql= $tab_result['SQL'] . " group by tvalue"; $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$tab_result['ARG'] ); while ($item = mysqli_fetch_object($result)){ if ($item->tvalue == "") $value=$l->g(482); else $value=$item->tvalue; echo "
".$item->c." ".$l->g(1023)." ".$value." ".$l->g(1024); } echo "
"; } echo "
"; }elseif($protectedPost['onglet']=="WOL"){ echo "
"; echo "
"; echo "
"; } } } echo close_form(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_multi_search/ms_multi_search.php000077500000000000000000001651241303466605000341450ustar00rootroot00000000000000$value){ $valeur=explode("-", $key); if ($valeur[0] == "InputValue" or $valeur[0] == "SelFieldValue" or $valeur[0] == "SelFieldValue3" or $valeur[0] == "SelAndOr" or $valeur[0] == "SelComp" ) unset($_SESSION['OCS'][$key]); } $tab_session=explode(',',$protectedGet['fields']); $sel_comp=explode(',',$protectedGet['comp']); $fields_values=explode(',',$protectedGet['values']); $fields_values2=explode(',',$protectedGet['values2']); $type_field=explode(',',$protectedGet['type_field']); if (is_array($tab_session)){ unset($_SESSION['OCS']['multiSearch']); foreach ($tab_session as $key=>$value){ $_SESSION['OCS']['multiSearch'][]=$value; $_SESSION['OCS']['SelComp-'.$value."-".$key]=$sel_comp[$key]; if ($type_field[$key] == 'InputValue' or $type_field[$key] == ''){ $_SESSION['OCS']['InputValue-'.$value."-".$key]=$fields_values[$key]; $protectedPost['InputValue-'.$value."-".$key]=$fields_values[$key]; } if ($type_field[$key] == 'SelFieldValue' or $type_field[$key] == ''){ $_SESSION['OCS']['SelFieldValue-'.$value."-".$key]=$fields_values[$key]; $protectedPost['SelFieldValue-'.$value."-".$key]=$fields_values[$key]; } $_SESSION['OCS']['SelFieldValue2-'.$value."-".$key]=$fields_values2[$key]; $protectedPost['SelComp-'.$value."-".$key]=$sel_comp[$key]; $protectedPost['SelFieldValue2-'.$value."-".$key]=$fields_values2[$key]; } $protectedPost['Valid-search']=$l->g(30); $protectedPost['multiSearch'] = $l->g(32); $protectedPost['Valid']=1; $protectedPost['GET']='GET'; } } //need to delete this part... if (isset($protectedGet['prov']) and (!isset($protectedPost['GET']) or $protectedPost['GET'] == '')){ unset($protectedPost); foreach ($_SESSION['OCS'] as $key=>$value){ $valeur=explode("-", $key); if ($valeur[0] == "InputValue" or $valeur[0] == "SelFieldValue" or $valeur[0] == "SelFieldValue3" or $valeur[0] == "SelAndOr" or $valeur[0] == "SelComp" ) unset($_SESSION['OCS'][$key]); } if ($protectedGet['prov'] == "stat"){ $tab_session[]="DEVICES-DOWNLOAD"; $tab_stat=array('SelComp-DEVICES-DOWNLOAD-0'=>"exact",'SelFieldValue-DEVICES-DOWNLOAD-0'=>$protectedGet['id_pack'],'SelFieldValue2-DEVICES-DOWNLOAD-0'=>$protectedGet['stat']);//unset($_SESSION['OCS']); } if ($protectedGet['prov'] == "allsoft"){ if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $sql="select name from softwares_name_cache where id=%s"; $arg=$protectedGet['value']; $result = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg); $item = mysqli_fetch_object($result); $protectedGet['value']=$item->name; } $tab_session[]="SOFTWARES-NAME"; $tab_stat=array('SelComp-SOFTWARES-NAME-0'=>"exact",'InputValue-SOFTWARES-NAME-0'=>$protectedGet['value']);//unset($_SESSION['OCS']); } if ($protectedGet['prov'] == "ipdiscover" or $protectedGet['prov'] == "ipdiscover1"){ $tab_session[]="NETWORKS-IPSUBNET"; $tab_stat['SelComp-NETWORKS-IPSUBNET-0']="exact"; $tab_stat['InputValue-NETWORKS-IPSUBNET-0']=$protectedGet['value'];//unset($_SESSION['OCS']); } if ($protectedGet['prov'] == "ipdiscover1"){ $tab_session[]="DEVICES-IPDISCOVER"; $tab_session[]="DEVICES-IPDISCOVER"; $tab_stat['SelComp-DEVICES-IPDISCOVER-1'] = "exact"; $tab_stat['SelFieldValue-DEVICES-IPDISCOVER-1']="1"; $tab_stat['SelAndOr-DEVICES-IPDISCOVER-2']= "OR"; $tab_stat['SelComp-DEVICES-IPDISCOVER-2'] = "exact"; $tab_stat['SelFieldValue-DEVICES-IPDISCOVER-2']="2"; } if (isset($tab_stat)){ unset($_SESSION['OCS']['multiSearch']); foreach ($tab_session as $key=>$value) $_SESSION['OCS']['multiSearch'][]=$value; foreach ($tab_stat as $key=>$value) $protectedPost[$key]=$value; $protectedPost['Valid-search']=$l->g(30); $protectedPost['multiSearch'] = $l->g(32); $protectedPost['Valid']=1; } $protectedPost['GET']=$protectedGet['prov']; } //end need to delete this part... //initialisation du tableau //$list_fields_calcul=array(); //ouverture du formulaire echo open_form($form_name); if (isset($protectedPost['GET'])){ echo ""; } //recherche des différents champs de accountinfo require_once('require/function_admininfo.php'); $field_of_accountinfo=witch_field_more('COMPUTERS'); $optSelectField_account=array(); $opt2Select_account=array(); $sort_accountinfo=array(); $list_fields_account_info=array(); foreach ($field_of_accountinfo['LIST_FIELDS'] as $id=>$lbl){ if ($field_of_accountinfo['LIST_NAME'][$id] == "TAG"){ $name_field_accountinfo="TAG"; $delfault_tag = $l->g(1210) . " " . $lbl; }else $name_field_accountinfo="fields_" . $id; $sort_accountinfo['ACCOUNTINFO-' . $name_field_accountinfo] = $l->g(1210) . " " . $lbl; if (in_array($field_of_accountinfo['LIST_TYPE'][$id],array(0,1,3,6))){ $optSelectField_account['ACCOUNTINFO-' . $name_field_accountinfo]= $sort_accountinfo['ACCOUNTINFO-' . $name_field_accountinfo];//"Accinf: ".$lbl; if ($field_of_accountinfo['LIST_TYPE'][$id] == 6){ $optSelectField_account["ACCOUNTINFO-" . $name_field_accountinfo . "-LBL"]="calendar"; $optSelectField_account["ACCOUNTINFO-" . $name_field_accountinfo . "-SELECT"]=array("exact"=>$l->g(410),"small"=>$l->g(346),"tall"=>$l->g(347)); } }elseif (in_array($field_of_accountinfo['LIST_TYPE'][$id],array(2,4,7))){ $opt2Select_account['ACCOUNTINFO-' . $name_field_accountinfo] = $l->g(1210) . " " . $lbl; $opt2Select_account['ACCOUNTINFO-' . $name_field_accountinfo . "-SQL1"] = "select ivalue as ID,tvalue as NAME from config where name like 'ACCOUNT_VALUE_" . $field_of_accountinfo['LIST_NAME'][$id] . "%' order by 2"; if ($field_of_accountinfo['LIST_TYPE'][$id] == 4){ $accountinfo_checkbox[]=$name_field_accountinfo; $opt2Select_account['ACCOUNTINFO-' . $name_field_accountinfo . "-SELECT"] = array('like'=>$l->g(507),'diff'=>$l->g(508)); }else{ $opt2Select_account['ACCOUNTINFO-' . $name_field_accountinfo . "-SELECT"] = array('exact'=>$l->g(507),'diff'=>$l->g(508)); } } // $list_fields_account_info['Accinf: '.$lbl]="a." . $name_field_accountinfo; $Accinfo = $l->g(1210) . " " . $lbl; $list_fields_account_info[$Accinfo]="a." . $name_field_accountinfo; } //si on ajoute un champ de recherche //on efface les données précedemment en cache if ($protectedPost['delfield']!="" or $protectedPost['multiSearch'] != $l->g(32)){ unset($protectedPost['Valid-search']); unset($_SESSION['OCS']['ID_REQ']); unset($_SESSION['OCS']['DATA_CACHE'][$table_tabname]); } //cas d'une suppression de machine if ($protectedPost['SUP_PROF'] != ''){ deleteDid($protectedPost['SUP_PROF']); //on force la valeur cachée de la validation du formulaire //pour rejouer la requete et ne pas utiliser le cache $protectedPost['Valid']="SUP"; } //for save field and value if ($protectedPost['Valid-search'] and $protectedPost['Valid'] != ''){ foreach ($protectedPost as $key=>$value){ $valeur=explode("-", $key); if ($valeur[0] == "InputValue" or $valeur[0] == "SelFieldValue" or $valeur[0] == "SelFieldValue3" or $valeur[0] == "SelAndOr" or $valeur[0] == "SelComp") { $_SESSION['OCS'][$key]=$value; } } }else{ foreach ($_SESSION['OCS'] as $key=>$value){ $valeur=explode("-", $key); if ($valeur[0] == "InputValue" or $valeur[0] == "SelFieldValue" or $valeur[0] == "SelFieldValue3" or $valeur[0] == "SelAndOr" or $valeur[0] == "SelComp" ) $protectedPost[$key]=$value; } } if ($protectedPost['multiSearch'] != '' and $protectedPost['multiSearch'] != $l->g(32)) { $_SESSION['OCS']['multiSearch'][]=$protectedPost['multiSearch']; arsort($_SESSION['OCS']['multiSearch']); } //cas de la réinitialisation if ($protectedPost['reset'] != ""){ unset($_SESSION['OCS']['ID_REQ']); unset ($_SESSION['OCS']['multiSearch']); unset($_SESSION['OCS']['DATA_CACHE'][$table_tabname]); unset ($protectedPost); } if ($protectedPost['delfield'] != ""){ unset ($_SESSION['OCS']['multiSearch'][$protectedPost['delfield']]); } // //une recherche est demandée sur des critères //pas d'utilisation de cache //bouton de validation actionné if ($protectedPost['Valid-search'] and $protectedPost['Valid'] != ''){ unset($_SESSION['OCS']['SQL_DATA_FIXE']); unset($_SESSION['OCS']['ID_REQ']); $sqlRequest_Group=""; //on commence par décomposer tous les postes pour //définir les différentes tables, champs de recherche, valeur à rechercher $i=0; //parcourt du tableau de POST foreach ($protectedPost as $key=>$value){ //on récupère uniquement les POST qui nous intéressent if ($key != 'Valid-search' and $key != 'multiSearch'){ //en fonction du nom de la variable, on arrive a savoir quel est la recherche demandée $valeur=explode("-", $key); if ($valeur[0] == "InputValue" or $valeur[0] == "SelFieldValue") { //en position 1 du tableau, on a toujours le nom de la table sur laquelle s'effectue la recherche $table[$i]=$valeur[1]; //en position 2 du tableau, on a toujours le nom du champ sur lequel on effectue la recherche $field[$i]=$valeur[2]; //en position 3 on a le numéro du champ. $fieldNumber[$i]=$valeur[3]; //on récupère l'élément de comparaison $field_compar[$i]=$protectedPost["SelComp-".$table[$i]."-".$field[$i]."-".$fieldNumber[$i]]; //si le champ de saisi est à vide, on annule la recherche sur ce champ if ($value == ''){ unset($table[$i]); unset($field[$i]); unset($field_compar[$i]); unset($fieldNumber[$i]); }else{ //sinon, on la prend en compte //en fonction de la valeur en position 0, on sait quel genre de recherche on doit effecuter //si on a un SelComp, on récupère la valeur saisie if ($valeur[0] == "InputValue" or $valeur[0] == "SelFieldValue"){ //case of checkbox if (isset($accountinfo_checkbox)){ if (in_array($field[$i],$accountinfo_checkbox)){ $value = $value."&&&"; } } $field_value[$i]=$value; //on vérifie que le premier champ d'une recherche multicritère //ou l'on a plusieur fois le même champ n'est pas vide //ex: 3 * le champ IP ADD mais avec le premier champ vide. // on se retrouve donc avec un champ AND/OR sur le deuxième champ IP ADD // qu'il ne faut pas prendre en compte if ($i!=0){ $k=$i; //on regarde si dans les champs précédent on a bien //le même champ pour traiter le champ AND/OR while ($k>0){ if ($table[$k] == $table[$i] and $field[$k] == $field[$i]){ $field_and_or[$i]=$protectedPost["SelAndOr-".$table[$i]."-".$field[$i]."-".$fieldNumber[$i]]; } $k--; } } if (isset($protectedPost[$valeur[0]."2-".$table[$i]."-".$field[$i]."-".$fieldNumber[$i]])) $field_value_complement[$i]=$protectedPost[$valeur[0]."2-".$table[$i]."-".$field[$i]."-".$fieldNumber[$i]]; elseif (isset($protectedPost["SelFieldValue3-".$valeur[1]."-".$field[$i]."-".$fieldNumber[$i]])){ $field_value_complement[$i]=$protectedPost["SelFieldValue3-".$table[$i]."-".$field[$i]."-".$fieldNumber[$i]]; } } $i++; } } } } if ($_SESSION['OCS']['DEBUG'] == 'ON'){ $debug=$l->g(5009)."
"; if (isset($table)){ foreach($table as $key=>$value) $debug .= $key . " => " .$value . "
"; } $debug .=$l->g(5010) . "
"; if (isset($field)){ foreach($field as $key=>$value) $debug .= $key . " => " .$value . "
"; } $debug .=$l->g(5011) . "
"; if (isset($field_compar)){ foreach($field_compar as $key=>$value) $debug .= $key . " => " .$value . "
"; } $debug .=$l->g(5012) . "
"; if (isset($field_value)){ foreach($field_value as $key=>$value) $debug .= $key . " => " .$value . "
"; } $debug .=$l->g(5013) . "
"; if (isset($field_value_complement)){ foreach($field_value_complement as $key=>$value) $debug .= $key . " => " .$value . "
"; } $debug .=$l->g(5014) . "
"; if (isset($field_and_or)){ foreach($field_and_or as $key=>$value){ if ($value != '') $debug .= $key . " => " .$value . "
"; } } if (isset($debug) and $debug != '') msg_info($debug); } $i=0; //tableau des requêtes à executer //qui est contruit au fur et a mesure $sql_search=array(); while ($table[$i]){ //initialisation de la variable des requêtes temporaires $sql_temp=""; if ($field_compar[$i] == "" and substr($field_value[$i],0,4) != "ALL_") $field_compar[$i] = "exact"; //traitement du champ de comparaison switch ($field_compar[$i]) { case "exact": $field_compar[$i]=" = "; $field_value[$i]="'".$field_value[$i]."'"; break; case "ressemble": $field_compar[$i]=" like "; break; case "small": $field_compar[$i]=" <= "; break; case "tall": $field_compar[$i]=" >= "; break; case "diff": $field_compar[$i]=" like "; $field_compar_origine[$i]="diff"; //la gestion de diff est particulière //et nécessite plus de code (voir plus loin dans le code) break; case "diff_exact": $field_compar[$i]=" = "; $field_compar_origine[$i]="diff"; break; case "list": $field_compar[$i]= " IN "; $field_value[$i]=" (".$field_value[$i].")"; break; case "notlist": $field_compar[$i]= " NOT IN "; $field_value[$i]=" (".$field_value[$i].")"; break; default: $field_compar[$i]=" ".$field_compar[$i]." "; } //Prise en compte des jockers sur le champ de saisie uniquement sur les champs de comparaison 'like' if ($field_compar[$i] == " like " and $table[$i] != "DEVICES" and $field[$i] != 'DOWNLOAD') $field_value[$i]=jockers_trait($field_value[$i]); //traitement d'un champ quand c'est une date $new_value=compair_with_date($field[$i],$field_value[$i]); $field[$i]=$new_value['field']; $field_value[$i]=$new_value['field_value']; //gestion de tous les linux et de tous les windows if (substr($field_value[$i],0,4) == "ALL_" and $field[$i] == "OSNAME"){ if ($field_value[$i] == "ALL_LINUX"){ $sql_temp="select distinct osname from hardware where osname like '%Linux%'"; } elseif($field_value[$i] == "ALL_WIN") $sql_temp="select distinct osname from hardware where osname like '%win%'"; $result_temp = mysqli_query($_SESSION['OCS']["readServer"], $sql_temp); while( $val_temp = mysqli_fetch_array($result_temp) ) { $list[]=addslashes($val_temp['osname']); } if (!isset($list)){ $ERROR=$l->g(955); }else{ $field_compar[$i]=" IN "; $field_value[$i]=" ('".implode("','",$list)."')"; $field_modif="field_value"; } unset($list); } //traitement du cas particulier des recherches sur la table DEVICES //le champs de de comparaison ne se fait pas sur $field_value[$i] //le champs $field_compar doit donc se reporter sur le champs complémentaire if ($table[$i] == "DEVICES"){ $original_field=$field[$i]; $original_field_value_complement=$field_value_complement[$i]; $field_value_complement[$i]=$field_value[$i]; $field[$i]="NAME"; $field_value[$i] = "'".$original_field."'"; //traitement pour le télédéploiement if ($field_value[$i] == "'DOWNLOAD'"){ //on utilise pas le champ ivalue unset($ivalue); //requete pour trouver tous les ID //dans ce cas, le champ de recherche doit etre à null if ($original_field_value_complement == $l->g(482)) $tvalue = " AND TVALUE IS NULL "; //gestion de TOUT SAUF SUCCESS elseif ($original_field_value_complement == "***".$l->g(548)."***") $tvalue=" AND TVALUE not like 'SUC%' "; //gestion de Toutes les erreurs elseif ($original_field_value_complement == "***".$l->g(956)."***") $tvalue=" AND (TVALUE like 'ERR%' or TVALUE like 'EXIT_CODE%')"; //gestion de TOUS LES SUCCESS elseif ($original_field_value_complement == "***".$l->g(957)."***") $tvalue=" AND TVALUE like 'SUC%' "; elseif ($original_field_value_complement == "***".$l->g(509)."***") $tvalue=""; else $tvalue = " AND TVALUE = '".$original_field_value_complement."'"; //echo $field_value_complement[$i]; //recherche des id activés de ce paquet $sql_temp = "select id from download_enable d_e left join download_available d_a on d_a.fileid=d_e.fileid where 1=1 "; IF ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES" ) $sql_temp .= " and d_a.comment not like '%[VISIBLE=0]%'"; if ($field_value_complement[$i] != "'NULL'" and $field_value_complement[$i] != "NULL") $sql_temp.=" and d_e.fileid=".$field_value_complement[$i]; $result_temp = mysql2_query_secure( $sql_temp, $_SESSION['OCS']["readServer"] ); while( $val_temp = mysqli_fetch_array($result_temp) ) { $list[]=addslashes($val_temp['id']); } //echo $sql_temp; if (!isset($list)){ $ERROR=$l->g(958); }else{ $field_value_complement[$i]=" IN ('".implode("','",$list)."')"; $field_modif="field_value_complement"; } unset($list); }//gestion de la configuration des fréquences elseif ($field_value[$i] == "'FREQUENCY'" or $field_value[$i] == "'IPDISCOVER'"){ //on n'utilise pas le champs tvalue unset($tvalue); if ( !strstr($field_value_complement[$i], 'DEFAULT')){ if ($field_value_complement[$i] != "'PERSO'") //gestion des cas normaux $field_value_complement[$i]=" = ".$field_value_complement[$i]; else //gestion des valeurs de fréquences personnalisées $field_value_complement[$i]=" NOT IN ('0','-1')"; }elseif (strstr($field_value_complement[$i], 'DEFAULT')){ $type_default=explode ( 'DEFAULT', $field_value_complement[$i]); //si on demande la valeur DEFAULT de frequency, //on se retrouve a rechercher les ID des machines //dans la table hardware qui ne sont pas dans DEVICES avec //comme name='FREQUENCY' $sql_frequency="select hardware_id from devices where name=".$field_value[$i]; if( isset($type_default[1]) and $type_default[1] != "'") $sql_frequency.=" and IVALUE = ".$type_default[1]{0}; $result_frequency = mysqli_query($_SESSION['OCS']["readServer"], $sql_frequency ); $list_frequency=""; while( $val_frequency = mysqli_fetch_array($result_frequency) ) { $list_frequency .= $val_frequency['hardware_id'].','; } if ($list_frequency == "") $list_frequency="'' "; //on vide le champ de comparaison //pour ne pas entrer dans la boucle de traitement $field_compar[$i]=" NOT IN "; //création de la fin de requête de recherche $field_value[$i] =" (".substr($list_frequency,0,-1).")"; $field_modif="field_value"; //la requete doit se faire sur la table hardware et sur le champ ID $table[$i]="HARDWARE"; $field[$i]="ID"; $field_value_complement[$i]=""; } } } if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1 and $table[$i] == "SOFTWARES" and ($field[$i] == 'NAME' or $field[$i] == "VERSION")){ if ($field[$i] == 'NAME'){ $table_explode="type_softwares_name"; }else{ $table_explode="type_softwares_version"; } $sql_temp="select name, id from %s where name %s '%s'"; //A REVOIR POUR ENLEVER LES ' DEVANT LE CHAMP DE RECHERCHE $arg_temp=array($table_explode,$field_compar[$i],str_replace("'","",$field_value[$i])); $result_temp = mysql2_query_secure( $sql_temp, $_SESSION['OCS']["readServer"], $arg_temp); while( $val_temp = mysqli_fetch_array($result_temp) ) { $list[]=$val_temp['id']; if ($limit_result_cacheg(959); break; } } if (!isset($list)){ $ERROR=$l->g(960); }else{ $field[$i]=$field[$i]."_ID"; $field_compar[$i]=" IN "; $field_value[$i]=" (".implode(",",$list).")"; $field_modif="field_value"; $sql_temp=generate_secure_sql($sql_temp,$arg_temp); unset($list); } }elseif(isset($table_cache)){ //si on est sur une table de cache if ($table_cache[$table[$i]]){ //on remet à zero le tableau de logiciels unset($list); //champ sur lequel s'effectue la recherche $field_temp=$field_cache[$table_cache[$table[$i]]]; if ($field_temp == $field[$i]){ $sql_temp="select ".$field_temp." as name "; if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1) $sql_temp.= ",id "; $sql_temp.= " from ".strtolower($table_cache[$table[$i]])." where ".$field_temp.$field_compar[$i].$field_value[$i]; $result_temp = mysqli_query($_SESSION['OCS']["readServer"], $sql_temp); $count_result=0; while( $val_temp = mysqli_fetch_array($result_temp) ) { if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $list[]=$val_temp['id']; }else $list[]=addslashes($val_temp['name']); if ($limit_result_cache>$count_result) $count_result++; else{ $ERROR=$l->g(959); break; } } if (!isset($list)){ $ERROR=$l->g(960); }else{ $field_compar[$i]=" IN "; $field_value[$i]=" ('".implode("','",$list)."')"; $field_modif="field_value"; unset($list); } } } } //gestion du champ complémentaire en fonction de la table //si le champs complémentaire existe if (isset($field_value_complement[$i]) and $field_value_complement[$i] != ""){ switch ($table[$i]) { case "HARDWARE": //on est dans un cas de recherche entre 2 valeurs $field[$i]=$field[$i]; $field_value_complement[$i]="AND ".$field[$i]." > '".$field_value_complement[$i]."'"; $field_compar[$i]=" < "; break; case "DRIVES": //cas des partitions linux if (substr($field_value_complement[$i],0,1) == '/') $field_value_complement[$i]=" AND VOLUMN = '".$field_value_complement[$i]."' "; else $field_value_complement[$i]=" AND LETTER = '".$field_value_complement[$i]."' "; break; case "REGISTRY": $field_value_complement[$i]=" AND NAME = '".$field_value_complement[$i]."' "; break; case "DEVICES": $field_value_complement[$i]=" AND IVALUE ".$field_value_complement[$i].$tvalue; break; default: $ERROR= $l->g(5015).$table[$i]; } } if ($_SESSION['OCS']['DEBUG'] == 'ON'){ msg_success($l->g(5016).$table[$i]."
".$l->g(5017).$field[$i]."
".$l->g(5018).$field_compar[$i]."
".$l->g(5019).$field_value[$i]."
".$l->g(5020).$field_value_complement[$i]."
".$l->g(5021).$field_and_or[$i]); } //si une erreur a été rencontrée //le traitement est arrêté (gain de temps) if (isset($ERROR)){ msg_error($ERROR); break; } //si on est dans le cas d'une recherche sur "différent", //on va créer les requêtes dans le tableau $sql_seach['DIFF'] if ($field_compar_origine[$i] == "diff") $operation="DIFF"; else //autremant dans les autres cas, on va créer le tableau de requête dans $sql_seach['NORMAL'] $operation="NORMAL"; //recherche du dernier index de la derniere requete sur la table if (isset($sql_seach[$operation][$table[$i]])){ foreach ($sql_seach[$operation][$table[$i]] as $index=>$poub) $k=$index; }else $k=""; if ($field_and_or[$i] == "AND") $no_fusion=true; //gestion du champ AND OR dans les requetes if ($field_and_or[$i] == "" and $operation == "DIFF") $field_and_or[$i]="OR"; if ($field_and_or[$i] == "" and $operation == "NORMAL") $field_and_or[$i]="AND"; if ($field_and_or[$i] == "AND") $field_and_or[$i]=" ) AND ( "; else $field_and_or[$i]=" OR "; //gestion de la non fusion des requêtes pour les tables définies //si on n'est pas dans le cas de "AND/OR" (deux fois le même champ) if (in_array ($table[$i], $tab_no_fusion) and ($field_and_or[$i] == "" or $no_fusion or !isset($sql_seach[$operation][$table[$i]]))){ unset($no_fusion); $traitement=generate_sql($table[$i]); $sql_seach[$operation][$table[$i]][$i]=$traitement['sql_temp']." ( ".$field[$i].$field_compar[$i].$field_value[$i].$field_value_complement[$i]; //si une requête intermédiaire a été jouée //il faut donc la prendre en compte pour la création des groupes $trait_cache=traitement_cache($sql_temp,$field_modif,$field_value[$i],$field_value_complement[$i]); $sql_cache[$operation][$table[$i]][$i]=$traitement['sql_cache']." ( ".$field[$i].$field_compar[$i].$trait_cache['field_value'].$trait_cache['field_value_complement']; }//si on est dans le cas "AND/OR", on concat les requêtes elseif(in_array ($table[$i], $tab_no_fusion) and $field_and_or[$i] != "" and isset($sql_seach[$operation][$table[$i]])){ $sql_seach[$operation][$table[$i]][$k].= $field_and_or[$i].$field[$i].$field_compar[$i].$field_value[$i].$field_value_complement[$i]; $trait_cache=traitement_cache($sql_temp,$field_modif,$field_value[$i],$field_value_complement[$i]); $sql_cache[$operation][$table[$i]][$k].= $field_and_or[$i].$field[$i].$field_compar[$i].$trait_cache['field_value'].$trait_cache['field_value_complement']; }//si on est dans un cas normal, on fusionne toutes les requêtes else{ //si la requête existe déjà if (isset($sql_seach[$operation][$table[$i]])){ //si le champ "AND/OR" est vide, on doit concat des champs différents de la même table // if ($field_and_or[$i] == "") // $field_and_or[$i]="AND"; $sql_seach[$operation][$table[$i]][$k].= $field_and_or[$i].$field[$i].$field_compar[$i].$field_value[$i].$field_value_complement[$i]; $trait_cache=traitement_cache($sql_temp,$field_modif,$field_value[$i],$field_value_complement[$i]); $sql_cache[$operation][$table[$i]][$k].= $field_and_or[$i].$field[$i].$field_compar[$i].$trait_cache['field_value'].$trait_cache['field_value_complement']; }//si la requête n'existe pas else{ //on la crée $traitement=generate_sql($table[$i]); $sql_seach[$operation][$table[$i]][$i]=$traitement['sql_temp']." ( ".$field[$i].$field_compar[$i].$field_value[$i].$field_value_complement[$i]; $trait_cache=traitement_cache($sql_temp,$field_modif,$field_value[$i],$field_value_complement[$i]); $sql_cache[$operation][$table[$i]][$i]=$traitement['sql_cache']." ( ".$field[$i].$field_compar[$i].$trait_cache['field_value'].$trait_cache['field_value_complement']; } } //stockage de la table sur laquelle on requete //pour afficher les champs correspondant $list_tables_request[$table[$i]]=$table[$i]; //si une erreur a été rencontrée //le traitement est arrêté (gain de temps) // if (isset($ERROR)){ // echo "ATTENTION: ERREUR ".$ERROR; // break; // } $i++; } $list_id=""; //traitement sur les requetes //echo "

"; // print_r_V2($sql_seach); // echo "

"; //si un tableau de requête existe if (isset($sql_seach)){ //on commence par traiter le cas normal if (isset($sql_seach['NORMAL'])){ $execute_sql['NORMAL']=class_weight($sql_seach['NORMAL']); $cache_sql['NORMAL']=class_weight($sql_cache['NORMAL']); } if (isset($sql_seach['DIFF'])){ $execute_sql['DIFF']=class_weight($sql_seach['DIFF']); $cache_sql['DIFF']=class_weight($sql_cache['DIFF']); } } //execution des requêtes //si l'utilisateur a des droits limités //restriction des id if ($_SESSION['OCS']['mesmachines'] != "" and isset($_SESSION['OCS']['mesmachines'])){ $list_id_restraint=substr(substr(computer_list_by_tag(),1),0,-1); } if ($_SESSION['OCS']['DEBUG'] == 'ON') $debug = ''; if (isset($execute_sql['NORMAL'])){ $result=execute_sql_returnID($list_id_restraint,$execute_sql['NORMAL'],'',$table_tabname); if ($_SESSION['OCS']['DEBUG'] == 'ON'){ $debug .= $l->g(5022) . "
" . $result['DEBUG']; } $list_id_norm=$result[0]; if ($list_id_norm == "") $no_result="YES"; $tab_options=$result[1]; } if (isset($execute_sql['DIFF']) and $no_result != "YES"){ $result=execute_sql_returnID('',$execute_sql['DIFF'],'NO_CUMUL',$table_tabname); if ($_SESSION['OCS']['DEBUG'] == 'ON'){ $debug .= $l->g(5023) . "
" . $result['DEBUG']; } if ($result[0] != '') $list_id_diff=$result[0]; else $list_id_diff[]="'NO_DATA'"; } if ($debug != '') msg_warning($debug); //pour le traitement des champs if ($list_id_diff != ""){ $sql="select distinct ID from hardware where ID NOT IN (".implode(',',$list_id_diff).")"; if ($list_id_norm != ""){ $sql.=" AND ID IN (".implode(',',$list_id_norm).")"; }elseif ($list_id_restraint != ""){ $sql.=" AND ID IN (".$list_id_restraint.")"; } $result = mysqli_query($_SESSION['OCS']["readServer"],$sql) or mysqli_error($_SESSION['OCS']["readServer"]); while($item = mysqli_fetch_object($result)) $list_id[]=$item->ID; }else $list_id=$list_id_norm; $_SESSION['OCS']['ID_REQ']=id_without_idgroups($list_id); $_SESSION['OCS']['list_tables_request'][$table_tabname]=$list_tables_request; //passage en SESSION des requêtes pour les groupes dynamiques sql_group_cache($cache_sql); // /* if (isset($where)) $_SESSION['OCS']['WHERE_REQ']=$where; else unset($_SESSION['OCS']['WHERE_REQ']);*/ } //Utilisation du cache pour éviter de rejouer la recherche if (($protectedPost['Valid-search'] and $protectedPost['Valid'] == '')){ // print_r($_SESSION['OCS']['list_tables_request']); //recupération de la liste des ID $list_id=$_SESSION['OCS']['ID_REQ']; //récupération des tables touchées par les requetes $list_tables_request=$_SESSION['OCS']['list_tables_request'][$table_tabname]; } //echo $list_id; /********************************************AFFICHAGE DES RESULTATS********************************************/ if ($list_id != "") { $list_fields= array($l->g(652).': id'=>'h.ID', $l->g(652).': '.$l->g(46)=>'h.LASTDATE', $l->g(652).": ".$l->g(820)=>'h.LASTCOME', 'NAME'=>'h.NAME', //$l->g(23)=>'h.name', $l->g(652).": ".$l->g(24)=>'h.USERID', $l->g(652).": ".$l->g(25)=>'h.OSNAME', $l->g(652).": ".$l->g(357)=>'h.USERAGENT', $l->g(82).": ".$l->g(33)=>'h.WORKGROUP', $l->g(652).": ".$l->g(26)=>'h.MEMORY', $l->g(652).": ".$l->g(569)=>'h.PROCESSORS', $l->g(652).": ".$l->g(350) => "h.processort", $l->g(652).": ".$l->g(351) => "h.processorn", $l->g(652).": ".$l->g(353) => "h.quality", $l->g(652).": ".$l->g(34)=>'h.IPADDR', $l->g(652).": ".$l->g(53)=>'h.DESCRIPTION', $l->g(652).": ".$l->g(354)=>'h.FIDELITY', $l->g(652).": ".$l->g(351)=>'h.PROCESSORN', $l->g(652).": ".$l->g(350)=>'h.PROCESSORT', $l->g(652).": ".$l->g(50)=>'h.SWAP', $l->g(652).": ".$l->g(111)=>'h.WINPRODKEY', $l->g(652).": ".$l->g(553)=>'h.WINPRODID', $l->g(652).": ".$l->g(355) => "h.wincompany", $l->g(652).": ".$l->g(356) => "h.winowner", $l->g(652).": ".$l->g(557) => "h.userdomain", $l->g(25).": ".$l->g(286) => "h.OSCOMMENTS", $l->g(25).": ".$l->g(277) => "h.OSVERSION", $l->g(652).": ".$l->g(34) => "h.ipaddr", $l->g(652).": ".$l->g(1247)=>'h.ARCH'); $list_fields=array_merge ($list_fields_account_info,$list_fields); if(is_array($tab_options)) $tab_options = array_merge($tab_options,$protectedPost); else $tab_options = $protectedPost; //BEGIN SHOW ACCOUNTINFO require_once('require/function_admininfo.php'); $option_comment['comment_be'] = $l->g(1210)." "; $tab_options['REPLACE_VALUE'] = replace_tag_value('',$option_comment); if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $tab_options['REPLACE_VALUE'][$l->g(847)]= found_soft_type("type_softwares_name"); $tab_options['REPLACE_VALUE'][$l->g(848)]= found_soft_type("type_softwares_version"); } //END SHOW ACCOUNTINFO $queryDetails = 'SELECT h.id '; $querycount = 'SELECT count(h.id) '; //changement de nom lors de la requete $tab_options['AS']['h.NAME']="name_of_machine"; $query_add_table=""; foreach ($list_tables_request as $table_name_4_field){ if ($lbl_fields_calcul[$table_name_4_field]){ $list_fields=array_merge ($list_fields,$lbl_fields_calcul[$table_name_4_field]); /* if ($table_name_4_field == "SOFTWARES" and isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $query_add_table.=" left join ".strtolower($table_name_4_field)." on h.id=".strtolower($table_name_4_field).".hardware_id "; }else*/ $query_add_table.=" left join ".strtolower($table_name_4_field)." on h.id=".strtolower($table_name_4_field).".hardware_id "; } } // $queryDetails=substr($queryDetails,0,-2); $queryDetails .= " from hardware h left join accountinfo a on h.id=a.hardware_id "; $queryDetails .= $query_add_table; $queryDetails .= " where "; $queryDetails .= " h.deviceid <>'_SYSTEMGROUP_' AND h.deviceid <> '_DOWNLOADGROUP_' "; $queryDetails .= " and h.id in (".implode(', ',$list_id).") group by h.ID "; //if (isset($protectedPost['tri_TAB_MULTICRITERE']) and $protectedPost['tri_TAB_MULTICRITERE'] != '') // $queryDetails .= " order by ".$protectedPost['tri_'.$table_tabname]." ".$protectedPost['sens_'.$table_tabname]; // $limit=nb_page(); //$queryDetails .= " limit ".$protectedPost['page']*$protectedPost['pcparpage'].", 5"; //echo "page=>".$protectedPost['page']."pcparpage=>".$protectedPost['pcparpage']; //echo $queryDetails; $querycount .= " from hardware h left join accountinfo a on h.id=a.hardware_id "; $querycount .= $query_add_table; $querycount .= " where "; $querycount .= " h.deviceid <>'_SYSTEMGROUP_' AND h.deviceid <> '_DOWNLOADGROUP_' "; $querycount .= " and h.id in (".implode(', ',$list_id).") group by h.ID "; /*$resultlistid = mysql2_query_secure($queryDetails, $_SESSION['OCS']["readServer"]); while($item = mysqli_fetch_object($resultlistid)){ $list_id_test[]=$item->id; }*/ $queryDetails="SELECT "; foreach ($list_fields as $key=>$value){ $queryDetails .= $value; if ($tab_options['AS'][$value]) $queryDetails .=" as ".$tab_options['AS'][$value]; $queryDetails .=", "; } $queryDetails=substr($queryDetails,0,-2); $queryDetails .= " from hardware h left join accountinfo a on h.id=a.hardware_id "; $queryDetails .= $query_add_table; $queryDetails .= " where h.id in "; $queryDetails=mysql2_prepare($queryDetails,array(),$list_id,true); $queryDetails['SQL'].= " group by h.ID "; $tab_options['ARG_SQL']=$queryDetails['ARG']; $tab_options['SQL_COUNT']=$querycount; if ($_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES") $list_fields['SUP']='h.ID'; $list_fields['CHECK']='h.ID'; $list_col_cant_del=array('SUP'=>'SUP','NAME'=>'NAME','CHECK'=>'CHECK'); $default_fields=array($delfault_tag=>$delfault_tag, $l->g(652).': '.$l->g(46)=>$l->g(652).': '.$l->g(46), $l->g(652).": ".$l->g(820)=>$l->g(652).": ".$l->g(820), $l->g(23)=>$l->g(23), $l->g(652).": ".$l->g(24)=>$l->g(652).": ".$l->g(24), $l->g(652).": ".$l->g(25)=>$l->g(652).": ".$l->g(25), $l->g(652).": ".$l->g(357)=>$l->g(652).": ".$l->g(357), 'SUP'=>'SUP','CHECK'=>'CHECK'); //print_r($list_fields); //on modifie le type de champs en numéric de certain champs //pour que le tri se fasse correctement //$tab_options['TRI']['SIGNED']['a.TAG']="a.TAG"; //choix des fonctionnalitées pour les utilisateurs $list_fonct["image/groups_search.png"]=$l->g(583); if ($_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "YES"){ $list_fonct["image/delete.png"]=$l->g(122); $list_pag["image/delete.png"]=$pages_refs["ms_custom_sup"]; $tab_options['LBL_POPUP']['SUP']='name_of_machine'; } $list_fonct["image/cadena_ferme.png"]=$l->g(1019); $list_fonct["image/mass_affect.png"]=$l->g(430); if ($_SESSION['OCS']['profile']->getConfigValue('CONFIG') == "YES"){ $list_fonct["image/config_search.png"]=$l->g(107); $list_pag["image/config_search.png"]=$pages_refs['ms_custom_param']; } if ($_SESSION['OCS']['profile']->getConfigValue('TELEDIFF') == "YES"){ $list_fonct["image/tele_search.png"]=$l->g(428); $list_pag["image/tele_search.png"]=$pages_refs["ms_custom_pack"]; } $list_pag["image/groups_search.png"]=$pages_refs["ms_custom_groups"]; $list_pag["image/cadena_ferme.png"]=$pages_refs["ms_custom_lock"]; $list_pag["image/mass_affect.png"]=$pages_refs["ms_custom_tag"]; //activation des LOGS $tab_options['LOGS']='SEARCH_RESULT'; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_tabname; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); add_trait_select($list_fonct,$list_id,$form_name,$list_pag); echo ""; }elseif($protectedPost['Valid-search'] != '') $no_result="NO RESULT"; if ($no_result == "NO RESULT" and !isset($ERROR)){ //choix des fonctionnalitées pour les utilisateurs $list_fonct["image/groups_search.png"]=$l->g(583); $list_pag["image/groups_search.png"]=$pages_refs["ms_custom_groups"]; add_trait_select($list_fonct,$list_id,$form_name,$list_pag); msg_warning($l->g(42)); } if ($_SESSION['OCS']["mesmachines"] != '') $list_id_computer=computer_list_by_tag(); //pour tous les tableaux: //TABLE-NOMCHAMP =>lbl du champ //option: TABLE-NOMCHAMP-LBL => commentaire à ajouter après le champ de saisi //composotion du tableau // option: TABLE-NOMCHAMP-SELECT =>array des valeurs du champ select ou requete sql (affichage du select) // si option absente le select affiche array('exact'=> 'EXACTEMENT','ressemble'=>'RESSEMBLE','diff'=>'DIFFERENT') //a l'affichage on se retrouve avec le lbl du champ,un select et un champ de saisi $sort_list=array("NETWORKS-IPADDRESS" =>$l->g(82).": ".$l->g(34), "NETWORKS-MACADDR"=>$l->g(82).": ".$l->g(95), "SOFTWARES-NAME"=>$l->g(20).": ".$l->g(49), "SOFTWARES-VERSION"=>$l->g(20).": ".$l->g(277), "SOFTWARES-BITSWIDTH"=>$l->g(20).": ".$l->g(1247), "SOFTWARES-PUBLISHER"=>$l->g(20).": ".$l->g(69), "SOFTWARES-COMMENTS"=>$l->g(20).": ".$l->g(51), "HARDWARE-DESCRIPTION"=>$l->g(25).": ".$l->g(53), "HARDWARE-USERDOMAIN"=>$l->g(82).": ".$l->g(557), "BIOS-BVERSION"=>$l->g(273).": ".$l->g(209), "HARDWARE-USERID"=>$l->g(243).": ".$l->g(49), "HARDWARE-OSCOMMENTS"=>$l->g(25).": ".$l->g(51), "HARDWARE-OSVERSION"=>$l->g(25).": ".$l->g(277), "NETWORKS-IPGATEWAY"=>$l->g(82).": ".$l->g(207), "NETWORKS-IPSUBNET"=>$l->g(82).": ".$l->g(331), "NETWORKS-IPDHCP"=>$l->g(82).": ".$l->g(281), "BIOS-SSN"=>$l->g(273).": ".$l->g(36), "BIOS-SMODEL"=>$l->g(273).": ".$l->g(65), "HARDWARE-NAME"=>$l->g(729).": ".$l->g(49), "HARDWARE-PROCESSORT"=>$l->g(54)." (old): ".$l->g(66), "BIOS-SMANUFACTURER"=>$l->g(729).": ".$l->g(64), "MONITORS-SERIAL"=>$l->g(554), "MONITORS-DESCRIPTION"=>$l->g(556), "MONITORS-MANUFACTURER"=>$l->g(555), "DRIVES-VOLUMN"=>$l->g(92).": ".$l->g(964), "BIOS-BMANUFACTURER"=>$l->g(273).": ".$l->g(284), "BIOS-BVERSION"=>$l->g(273).": ".$l->g(277), "BIOS-ASSETTAG"=>$l->g(273).": ".$l->g(216), "HARDWARE-LASTDATE"=>"OCS: ".$l->g(46), "HARDWARE-LASTCOME"=>"OCS: ".$l->g(820), "HARDWARE-WORKGROUP"=>$l->g(82).": ".$l->g(33), "STORAGES-NAME"=>$l->g(63).": ".$l->g(49), "STORAGES-SERIALNUMBER"=>$l->g(63).": ".$l->g(36), "STORAGES-DISKSIZE"=>$l->g(63).": ".$l->g(67), "PRINTERS-NAME"=>$l->g(79).": ".$l->g(49), "PRINTERS-DRIVER"=>$l->g(79).": ".$l->g(278), "PRINTERS-PORT"=>$l->g(79).": ".$l->g(279), "PRINTERS-DESCRIPTION"=>$l->g(79).": ".$l->g(53), "PRINTERS-SERVERNAME"=>$l->g(79).": ".$l->g(1323), "PRINTERS-SHARENAME"=>$l->g(79).": ".$l->g(1324), "PRINTERS-RESOLUTION"=>$l->g(79).": ".$l->g(1325), "PRINTERS-COMMENT"=>$l->g(79).": ".$l->g(51), "HARDWARE-ARCH"=>$l->g(25).": ".$l->g(1247), "CPUS-MANUFACTURER"=>$l->g(54).": ".$l->g(64), "CPUS-TYPE"=>$l->g(54).": ".$l->g(66), "CPUS-SERIALNUMBER"=>$l->g(54).": ".$l->g(36), "CPUS-SPEED"=>$l->g(54).": ".$l->g(429), "CPUS-CORES"=>$l->g(54).": ".$l->g(1317), "CPUS-L2CACHESIZE"=>$l->g(54).": ".$l->g(1318), "CPUS-LOGICAL_CPUS"=>$l->g(54).": ".$l->g(1314), "CPUS-VOLTAGE"=>$l->g(54).": ".$l->g(1319), "CPUS-CURRENT_SPEED"=>$l->g(54).": ".$l->g(1315), "CPUS-SOCKET"=>$l->g(54).": ".$l->g(1316) ); $optSelectField=array( "NETWORKS-IPADDRESS"=>$sort_list["NETWORKS-IPADDRESS"], "NETWORKS-MACADDR"=>$sort_list["NETWORKS-MACADDR"],//$l->g(82).": ".$l->g(95), "SOFTWARES-NAME"=>$sort_list["SOFTWARES-NAME"],//$l->g(20).": ".$l->g(49), "SOFTWARES-VERSION"=>$sort_list["SOFTWARES-VERSION"],//$l->g(20).": ".$l->g(277), "SOFTWARES-BITSWIDTH"=> $sort_list["SOFTWARES-BITSWIDTH"], "SOFTWARES-PUBLISHER"=> $sort_list["SOFTWARES-PUBLISHER"], "SOFTWARES-COMMENTS"=>$sort_list["SOFTWARES-COMMENTS"], "HARDWARE-DESCRIPTION"=>$sort_list["HARDWARE-DESCRIPTION"],//$l->g(25).": ".$l->g(53), "HARDWARE-USERDOMAIN"=>$sort_list["HARDWARE-USERDOMAIN"],//$l->g(82).": ".$l->g(557), "BIOS-BVERSION"=>$sort_list["BIOS-BVERSION"],//$l->g(273).": ".$l->g(209), "HARDWARE-USERID"=>$sort_list["HARDWARE-USERID"],//$l->g(243).": ".$l->g(49), "HARDWARE-OSCOMMENTS"=>$sort_list["HARDWARE-OSCOMMENTS"],//$l->g(25).": ".$l->g(51), "HARDWARE-OSVERSION"=>$sort_list["HARDWARE-OSVERSION"], "NETWORKS-IPGATEWAY"=>$sort_list["NETWORKS-IPGATEWAY"],//$l->g(82).": ".$l->g(207), "NETWORKS-IPSUBNET"=>$sort_list["NETWORKS-IPSUBNET"],//$l->g(82).": ".$l->g(331), "NETWORKS-IPDHCP"=>$sort_list["NETWORKS-IPDHCP"],//$l->g(82).": ".$l->g(281), "BIOS-SSN"=>$sort_list["BIOS-SSN"],//$l->g(273).": ".$l->g(36), "BIOS-SMODEL"=>$sort_list["BIOS-SMODEL"],//$l->g(273).": ".$l->g(65), "HARDWARE-NAME"=>$sort_list["HARDWARE-NAME"],//$l->g(729).": ".$l->g(49), "HARDWARE-PROCESSORT"=>$sort_list["HARDWARE-PROCESSORT"],//$l->g(54).": ".$l->g(66), "BIOS-SMANUFACTURER"=>$sort_list["BIOS-SMANUFACTURER"],//$l->g(729).": ".$l->g(64), "MONITORS-SERIAL"=>$sort_list["MONITORS-SERIAL"],//$l->g(554), "MONITORS-DESCRIPTION"=>$sort_list["MONITORS-DESCRIPTION"],//$l->g(556), "MONITORS-MANUFACTURER"=>$sort_list["MONITORS-MANUFACTURER"],//$l->g(555), "DRIVES-VOLUMN"=>$sort_list["DRIVES-VOLUMN"],//$l->g(92).": ".$l->g(964), "BIOS-BMANUFACTURER"=>$sort_list["BIOS-BMANUFACTURER"],//$l->g(273).": ".$l->g(284), "BIOS-BVERSION"=>$sort_list["BIOS-BVERSION"],//$l->g(273).": ".$l->g(277), "BIOS-ASSETTAG"=>$sort_list["BIOS-ASSETTAG"],//$l->g(273).": ".$l->g(277), "PRINTERS-NAME"=>$sort_list["PRINTERS-NAME"], "PRINTERS-DRIVER"=>$sort_list["PRINTERS-DRIVER"], "PRINTERS-PORT"=>$sort_list["PRINTERS-PORT"], "PRINTERS-DESCRIPTION"=>$sort_list['PRINTERS-DESCRIPTION'], "PRINTERS-SERVERNAME"=>$sort_list["PRINTERS-SERVERNAME"], "PRINTERS-SHARENAME"=>$sort_list["PRINTERS-SHARENAME"], "PRINTERS-RESOLUTION"=>$sort_list["PRINTERS-RESOLUTION"], "PRINTERS-COMMENT"=>$sort_list["PRINTERS-COMMENT"], "HARDWARE-ARCH"=>$l->g(25).": ".$l->g(1247), "HARDWARE-LASTDATE"=>$sort_list["HARDWARE-LASTDATE"],//"OCS: ".$l->g(46), "HARDWARE-LASTDATE-LBL"=>"calendar", "HARDWARE-LASTDATE-SELECT"=>array("small"=>$l->g(346),"tall"=>$l->g(347)), "HARDWARE-LASTCOME"=>$sort_list["HARDWARE-LASTCOME"],//"OCS: ".$l->g(820), "HARDWARE-LASTCOME-LBL"=>"calendar", "HARDWARE-LASTCOME-SELECT"=>array("small"=>$l->g(346),"tall"=>$l->g(347)), "HARDWARE-WORKGROUP"=>$sort_list["HARDWARE-WORKGROUP"], "STORAGES-NAME"=>$sort_list["STORAGES-NAME"], "STORAGES-SERIALNUMBER"=>$sort_list["STORAGES-SERIALNUMBER"], "STORAGES-DISKSIZE" =>$sort_list["STORAGES-DISKSIZE"], "STORAGES-DISKSIZE-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), "STORAGES-DISKSIZE-LBL"=>"MB", "HARDWARE-ARCH"=>$sort_list["HARDWARE-ARCH"], "CPUS-MANUFACTURER"=>$sort_list["CPUS-MANUFACTURER"], "CPUS-SERIALNUMBER"=>$sort_list["CPUS-SERIALNUMBER"], "CPUS-SOCKET"=>$sort_list["CPUS-SOCKET"], "CPUS-TYPE"=>$sort_list["CPUS-TYPE"], "CPUS-SPEED"=>$sort_list["CPUS-SPEED"], "CPUS-SPEED-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), "CPUS-SPEED-LBL"=>"MHz", "CPUS-CORES"=>$sort_list["CPUS-CORES"], "CPUS-CORES-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), "CPUS-L2CACHESIZE"=>$sort_list["CPUS-L2CACHESIZE"], "CPUS-L2CACHESIZE-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), "CPUS-LOGICAL_CPUS"=>$sort_list["CPUS-LOGICAL_CPUS"], "CPUS-LOGICAL_CPUS-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), "CPUS-CURRENT_SPEED"=>$sort_list["CPUS-CURRENT_SPEED"], "CPUS-CURRENT_SPEED-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), "CPUS-CURRENT_SPEED-LBL"=>"MHz", "CPUS-VOLTAGE"=>$sort_list["CPUS-VOLTAGE"], "CPUS-VOLTAGE-SELECT"=>array("exact"=>$l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202)), ); //ajout des champs de accountinfo $optSelectField = array_merge($optSelectField_account,$optSelectField); //composotion du tableau // TABLE-NOMCHAMP-SQL1 => requete avec les champs ID (option) et NAME. Peut également être un tableau de données //à l'affichage on se retrouve avec le lbl du champ et un select $sort_list_Select=array("HARDWARE-OSNAME"=>$l->g(729).": ".$l->g(25), "VIDEOS-RESOLUTION"=>$l->g(62)); if ($_SESSION['OCS']['usecache'] == '1') $table_hardware='hardware_osname_cache'; else $table_hardware='hardware'; $optSelect=array("HARDWARE-OSNAME"=>$sort_list_Select["HARDWARE-OSNAME"],//$l->g(729).": ".$l->g(25), "HARDWARE-OSNAME-SQL1"=>"select 'ALL_LINUX' as ID, '".$l->g(1202)."' as NAME union select 'ALL_WIN', '".$l->g(1203)."' union select OSNAME,OSNAME from ".$table_hardware." where osname != '' ", "VIDEOS-RESOLUTION"=>$sort_list_Select["VIDEOS-RESOLUTION"],//$l->g(965).": ".$l->g(62), "VIDEOS-RESOLUTION-SQL1"=>"select DISTINCT RESOLUTION as 'ID', RESOLUTION as 'NAME' from videos ".(isset($list_id_computer)? " where hardware_id in ".$list_id_computer : '')." order by 1"); //composotion du tableau //option : TABLE-NOMCHAMP-SELECT =>array des valeurs du champ select ou requete sql (1er select) // TABLE-NOMCHAMP-SQL1 => requete avec les champs ID (option) et NAME. Peut également être un tableau de données (2eme select) //à l'affichage on se retrouve avec le lbl du champ, 2 select et un champ de saisi $sort_list_2SelectField=array("REGISTRY-REGVALUE"=>$l->g(211).": ".$l->g(212), "DRIVES-FREE"=>$l->g(92).": ".$l->g(45)); $opt2SelectField=array("REGISTRY-REGVALUE"=>$sort_list_2SelectField["REGISTRY-REGVALUE"],//$l->g(211).": ".$l->g(212), "REGISTRY-REGVALUE-SQL1"=>"select NAME from registry_name_cache order by 1", "REGISTRY-REGVALUE-LBL"=>"calendar", "REGISTRY-REGVALUE-SELECT"=>array('exact'=> $l->g(410),'ressemble'=>$l->g(129), 'diff'=>$l->g(130), "small"=>$l->g(346),"tall"=>$l->g(347)), "DRIVES-FREE"=>$sort_list_2SelectField["DRIVES-FREE"],//$l->g(92).": ".$l->g(45), "DRIVES-FREE-SQL1"=>"select distinct LETTER from drives where letter != '' ".(isset($list_id_computer)? " and hardware_id in ".$list_id_computer : '')." union select distinct volumn from drives where letter = '' and volumn != '' ".(isset($list_id_computer)? " and hardware_id in ".$list_id_computer : '')." order by 1", "DRIVES-FREE-LBL"=>"MB", "DRIVES-FREE-SELECT"=>array('exact'=> $l->g(410),"small"=>$l->g(201),"tall"=>$l->g(202))); //composotion du tableau //option : TABLE-NOMCHAMP-SELECT =>array des valeurs du champ select ou requete sql (1er select) // TABLE-NOMCHAMP-SQL1 => requete avec les champs ID (option) et NAME. Peut également être un tableau de données (2eme select) //à l'affichage on se retrouve avec le lbl du champ et 2 select $sort_list_2Select=array("HARDWARE-USERAGENT"=>"OCS: ".$l->g(966), "DEVICES-IPDISCOVER"=>$l->g(107).": ".$l->g(312), "DEVICES-FREQUENCY"=>$l->g(107).": ".$l->g(429), "GROUPS_CACHE-GROUP_ID"=>$l->g(583).": ".$l->g(49), "DOWNLOAD_HISTORY-PKG_ID"=>$l->g(512).": ".$l->g(969), "STORAGES-TYPE"=>$l->g(63).": ".$l->g(66), "STORAGES-DESCRIPTION"=>$l->g(63).": ".$l->g(53), "STORAGES-MODEL"=>$l->g(63).": ".$l->g(65), "BIOS-TYPE"=>$l->g(273).": ".$l->g(66), "CPUS-CPUARCH"=>$l->g(54).": ".$l->g(1247), "CPUS-DATA_WIDTH"=>$l->g(54).": ".$l->g(1312), "CPUS-CURRENT_ADDRESS_WIDTH"=>$l->g(54).": ".$l->g(1313), ); $sql_history_download = "select FILEID as ID,NAME from download_available d_a"; if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES" ) $sql_history_download .= " where d_a.comment not like '%[VISIBLE=0]%'"; $sql_history_download .= " order by 2"; $opt2Select=array("HARDWARE-USERAGENT"=>$sort_list_2Select["HARDWARE-USERAGENT"],//"OCS: ".$l->g(966), "HARDWARE-USERAGENT-SQL1"=>"select distinct USERAGENT as 'NAME' from hardware where USERAGENT != '' ".(isset($list_id_computer)? " and id in ".$list_id_computer : '')." order by 1", "HARDWARE-USERAGENT-SELECT"=>array('exact'=>$l->g(410) ,'diff'=>$l->g(130) ), "DEVICES-IPDISCOVER"=>$sort_list_2Select["DEVICES-IPDISCOVER"],//$l->g(107).": ".$l->g(312), "DEVICES-IPDISCOVER-SQL1"=>array("1"=>$l->g(502),"2"=>$l->g(503),"0"=>$l->g(506),"DEFAULT1"=>$l->g(504),"DEFAULT0"=>$l->g(505)), "DEVICES-IPDISCOVER-SELECT"=>array('exact'=>$l->g(410) ,'diff'=>$l->g(130) ), "DEVICES-FREQUENCY"=>$sort_list_2Select["DEVICES-FREQUENCY"],//$l->g(107).": ".$l->g(429), "DEVICES-FREQUENCY-SQL1"=>array("0"=>$l->g(485),"DEFAULT"=>$l->g(488),"-1"=>$l->g(486),"PERSO"=>$l->g(487)), "DEVICES-FREQUENCY-SELECT"=>array('exact'=>$l->g(410) ,'diff'=>$l->g(130) ), "GROUPS_CACHE-GROUP_ID"=>$sort_list_2Select["GROUPS_CACHE-GROUP_ID"],//$l->g(583).": ".$l->g(49), "GROUPS_CACHE-GROUP_ID-SQL1"=>"select ID,NAME from hardware where deviceid = '_SYSTEMGROUP_' order by 2", "GROUPS_CACHE-GROUP_ID-SELECT"=>array('exact'=>$l->g(967) ,'diff_exact'=>$l->g(968) ), "DOWNLOAD_HISTORY-PKG_ID"=>$sort_list_2Select["DOWNLOAD_HISTORY-PKG_ID"],//$l->g(512).": ".$l->g(969), "DOWNLOAD_HISTORY-PKG_ID-SQL1"=>$sql_history_download, "DOWNLOAD_HISTORY-PKG_ID-SELECT"=>array('exact'=>$l->g(507) ,'diff'=>$l->g(508) ), "STORAGES-TYPE"=>$sort_list_2Select["STORAGES-TYPE"],//$l->g(512).": ".$l->g(969), "STORAGES-TYPE-SQL1"=>"select distinct type as ID,type as NAME from storages order by 2", "STORAGES-TYPE-SELECT"=>array('exact'=>$l->g(507) ,'diff'=>$l->g(508) ), "STORAGES-DESCRIPTION"=>$sort_list_2Select["STORAGES-DESCRIPTION"],//$l->g(512).": ".$l->g(969), "STORAGES-DESCRIPTION-SQL1"=>"select distinct description as ID,description as NAME from storages order by 2", "STORAGES-DESCRIPTION-SELECT"=>array('exact'=>$l->g(507) ,'diff'=>$l->g(508) ), "STORAGES-MODEL"=>$sort_list_2Select["STORAGES-MODEL"],//$l->g(512).": ".$l->g(969), "STORAGES-MODEL-SQL1"=>"select distinct MODEL as ID,MODEL as NAME from storages order by 2", "STORAGES-MODEL-SELECT"=>array('exact'=>$l->g(507) ,'diff'=>$l->g(508) ), "BIOS-TYPE"=>$sort_list_2Select["BIOS-TYPE"],//$l->g(273).": ".$l->g(66), "BIOS-TYPE-SQL1"=>"select distinct TYPE as ID,TYPE as NAME from bios order by 2", "BIOS-TYPE-SELECT"=>array('exact'=>$l->g(507) ,'diff'=>$l->g(508) ), "CPUS-CPUARCH"=>$sort_list_2Select["CPUS-CPUARCH"],//$l->g(107).": ".$l->g(312), "CPUS-CPUARCH-SQL1"=>array("32"=>"32bits","64"=>"64bits","128"=>"128bits"), "CPUS-CPUARCH-SELECT"=>array('exact'=>$l->g(410) ,'diff'=>$l->g(130) ), "CPUS-DATA_WIDTH"=>$sort_list_2Select["CPUS-DATA_WIDTH"],//$l->g(107).": ".$l->g(312), "CPUS-DATA_WIDTH-SQL1"=>array("32"=>"32bits","64"=>"64bits","128"=>"128bits"), "CPUS-DATA_WIDTH-SELECT"=>array('exact'=>$l->g(410) ,'diff'=>$l->g(130) ), "CPUS-CURRENT_ADDRESS_WIDTH"=>$sort_list_2Select["CPUS-CURRENT_ADDRESS_WIDTH"],//$l->g(107).": ".$l->g(312), "CPUS-CURRENT_ADDRESS_WIDTH-SQL1"=>array("32"=>"32bits","64"=>"64bits"), "CPUS-CURRENT_ADDRESS_WIDTH-SELECT"=>array('exact'=>$l->g(410) ,'diff'=>$l->g(130) ), ); //ajout des champs de accountinfo $opt2Select = array_merge($opt2Select_account,$opt2Select); //à l'affichage on se retrouve avec le lbl du champ, un select et deux champs de saisi //option : TABLE-NOMCHAMP-SELECT =>array des valeurs du champ select ( select) //ATTENTION: le deuxième champ de saisi est invisible. Pour le rendre visible, faire passer //un javascript dans le lbl_default avec genre: onclick='document.getElementById(\"between-field_name\").style.display=\"block\";' //la valeur "field_name" est ensuite transformé par le vrai nom de champ $lbl_default= array('exact'=> $l->g(410),'ressemble'=>$l->g(129) ,'diff'=>$l->g(130) ,'small'=>$l->g(201),'tall'=>$l->g(202),'between'=>$l->g(203), 'javascript'=>array('exact'=> "onclick='document.getElementById(\"FieldInput2-field_name\").style.display=\"none\";'", 'ressemble'=>"onclick='document.getElementById(\"FieldInput2-field_name\").style.display=\"none\";'", 'diff'=>"onclick='document.getElementById(\"FieldInput2-field_name\").style.display=\"none\";'", 'small'=>"onclick='document.getElementById(\"FieldInput2-field_name\").style.display=\"none\";'", 'tall'=>"onclick='document.getElementById(\"FieldInput2-field_name\").style.display=\"none\";'", 'between'=>"onclick='document.getElementById(\"FieldInput2-field_name\").style.display=\"inline\";'")); $sort_list_Select2Field=array("HARDWARE-MEMORY"=>$l->g(25).": ".$l->g(26), "HARDWARE-PROCESSORS"=>$l->g(54)." (old): ".$l->g(377)); $optSelect2Field=array("HARDWARE-MEMORY"=>$sort_list_Select2Field["HARDWARE-MEMORY"],//$l->g(25).": ".$l->g(26), "HARDWARE-MEMORY-LBL"=>"MB", "HARDWARE-MEMORY-SELECT"=>$lbl_default, "HARDWARE-PROCESSORS"=>$sort_list_Select2Field["HARDWARE-PROCESSORS"],//$l->g(54).": ".$l->g(377), "HARDWARE-PROCESSORS-LBL"=>"MHz", "HARDWARE-PROCESSORS-SELECT"=>$lbl_default); //composotion du tableau //option : TABLE-NOMCHAMP-SELECT =>array des valeurs du champ select ou requete sql (1er select) // TABLE-NOMCHAMP-SQL1 => requete avec les champs ID (option) et NAME. Peut également être un tableau de données (2eme select) // TABLE-NOMCHAMP-SQL2 => requete avec les champs ID (option) et NAME. Peut également être un tableau de données (3eme select) //à l'affichage on se retrouve avec le lbl du champ et 3 select $sort_list_3Select=array("DEVICES-DOWNLOAD"=>$l->g(512).": ".$l->g(970)); $sql_download="select 'NULL' as 'ID', '***".$l->g(509)."***' as NAME union select FILEID as ID,NAME from download_available d_a "; IF ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES" ) $sql_download .= " where d_a.comment not like '%[VISIBLE=0]%'"; $sql_download .= " order by 2"; $opt3Select=array("DEVICES-DOWNLOAD"=>$sort_list_3Select["DEVICES-DOWNLOAD"],//$l->g(512).": ".$l->g(970), "DEVICES-DOWNLOAD-SQL1"=>$sql_download, "DEVICES-DOWNLOAD-SQL2"=>"select '***".$l->g(509)."***' as 'NAME' union select '***".$l->g(548)."***' union select '***".$l->g(956)."***' union select '***".$l->g(957)."***' union select '".$l->g(482)."' union select distinct TVALUE from devices where name='DOWNLOAD' and tvalue!='' order by 1", "DEVICES-DOWNLOAD-SELECT"=>array('exact'=>$l->g(507),'diff'=>$l->g(508)) ); $optArray = array_merge( $optSelectField, $opt2SelectField, $opt2Select, $optSelect, $optSelect2Field, $opt3Select); $sort_list = array_merge($sort_accountinfo, $sort_list, $sort_list_3Select, $sort_list_Select2Field, $sort_list_2Select, $sort_list_2SelectField, $sort_list_Select); $countHl++; $optArray_trait[$l->g(32)]="... ".$l->g(32)." ..."; foreach( $sort_list as $key=>$value) { $optArray_trait[$key]=ucfirst($value); $countHl++; } asort($optArray_trait); $protectedPost['multiSearch']=$l->g(32); $aff_field_search= $l->g(31).": ".show_modif($optArray_trait,'multiSearch',2,$form_name,array('DEFAULT'=>'NO')); $aff_field_search.="".$l->g(41).""; echo "
"; echo "
".$aff_field_search."
"; if (isset($_SESSION['OCS']['multiSearch']) and $_SESSION['OCS']['multiSearch'] != null){ $c=0; foreach ($_SESSION['OCS']['multiSearch'] as $k=>$v){ if (!isset($alreadyExist[$v])){ $alreadyExist[$v]='YES'; $ajout=''; }else $ajout=$v; $color= $c%2==0?"#F2F2F2":"#FFFFFF"; show_ligne($v,$color,$k,$ajout,$form_name); $c++; } echo "
"; echo ""; } echo ""; echo ""; echo "
"; echo close_form(); echo $l->g(358); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails['SQL'],$tab_options); } ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_plugins/000077500000000000000000000000001303466605000272445ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_plugins/functions_check.php000077500000000000000000000123241303466605000331270ustar00rootroot00000000000000open(PLUGINS_DL_DIR.$archiveName); $arrayplugin = explode(".", $archiveName); $plugindir = $arrayplugin[0]; if(!file_exists(MAIN_SECTIONS_DIR."ms_".$plugindir)){ $archive->extractTo(MAIN_SECTIONS_DIR."ms_".$plugindir); $archive->close(); return true; } else { return false; } } else{ echo "Une erreur est survenu lors de l'installation du plugin."; } } /** * This function check if the plugin is already in the DATABASE and installed. * If not an entry is created in the table "plugins" with the plugins infos. */ function check($plugarray){ $conn = new PDO('mysql:host='.SERVER_WRITE.';dbname='.DB_NAME.';charset=utf8', COMPTE_BASE, PSWD_BASE); foreach ($plugarray as $key => $value){ $query = $conn->query("SELECT EXISTS( SELECT * FROM `plugins` WHERE name = '".$value."' ) AS name_exists"); $anwser = $query->fetch(); // If the plugin isn't in the database ... add it if($anwser[0] == false){ if(file_exists(MAIN_SECTIONS_DIR."ms_".$value."/install.php")){ require MAIN_SECTIONS_DIR."ms_".$value."/install.php"; if( !function_exists ("plugin_version_".$value) or !function_exists ("plugin_init_".$value) or !function_exists ("plugin_delete_".$value)){ rrmdir(MAIN_SECTIONS_DIR."ms_".$value); return false; } // Retrieve infos from the plugin_version_plugname functions and add it to the database $fonc = "plugin_version_".$value; $infoplugin = $fonc(); $conn->query("INSERT INTO `".DB_NAME."`.`plugins` (`id`, `name`, `version`, `licence`, `author`, `verminocs`, `activated`, `reg_date`) VALUES (NULL, '".$infoplugin['name']."', '".$infoplugin['version']."', '".$infoplugin['license']."', '".$infoplugin['author']."', '".$infoplugin['verMinOcs']."', '1', CURRENT_TIMESTAMP);"); // Initialize the plugins requirement (New menus, Set permissions etc etc) $init = "plugin_init_".$value; $infoplugin = $init(); return true; } else{ rrmdir(MAIN_SECTIONS_DIR."ms_".$value); return false; } } } } /** * Scan the DL plugins dir. * If the plugin isn't installed in the ocsreports, this function call the "install" function */ function scan_downloaded_plugins(){ if(!file_exists(PLUGINS_DL_DIR)){ mkdir(PLUGINS_DL_DIR,'0777',true); } // Scan plugins download directory $directory = PLUGINS_DL_DIR; $scanned_directory = array_diff(scandir($directory), array('..', '.', 'README')); // if (!empty($scanned_directory)){ // foreach ($scanned_directory as $key => $value){ // install($value); // } // } return $scanned_directory; } /** * This function check and return all plugins installed in the Ocs Reports... * * @return ArrayObject */ function scan_for_plugins(){ $scanned_plugins = array_diff(scandir(MAIN_SECTIONS_DIR), array('img', 'ms_all_soft', 'ms_debug', 'ms_groups' ,'ms_multi_search' ,'ms_scripts', 'ms_stats', 'ms_about', 'ms_computer', 'ms_dict', 'ms_help', 'ms_plugins', 'ms_search_soft', 'ms_teledeploy', 'ms_admininfo', 'ms_config', 'ms_doubles', 'ms_ipdiscover', 'ms_regconfig', 'ms_server_infos', 'ms_upload_file', 'ms_all_computers', 'ms_console', 'ms_export', 'ms_logs', 'ms_repart_tag', 'ms_snmp', 'ms_users' , '.', '..')); // Debug purposes //var_dump($scanned_plugins); $plugins_name = array(); foreach ($scanned_plugins as $key => $value){ $exp = explode("_", $value); $plugins_name[] = $exp[1]; } return $plugins_name; } /** * This function check if a cd_pluginame dir exist. * In that case the cd_pluginame dir is moved into computer_detail directory */ function mv_computer_detail($name){ if(file_exists($old = MAIN_SECTIONS_DIR."ms_".$name."/cd_".$name)){ $new = PLUGINS_DIR."/computer_detail/cd_".$name; rename($old, $new); } } /** * This function create a plugin archive for the server side part of a plugin which contain the map.pm * This part will be downloaded and installed by the communication server. */ function mv_server_side($name){ $dir = MAIN_SECTIONS_DIR."ms_".$name."/APACHE/" ; if(file_exists($dir)){ $archive = new ZipArchive(); $archive->open(PLUGINS_SRV_SIDE.$name.".zip" , ZipArchive::CREATE); $scanned_directory = array_diff(scandir($dir), array('..', '.', 'README')); //var_dump($scanned_directory); foreach ($scanned_directory as $key=>$value){ //var_dump($value); $archive->addFile($dir.$value,$value); } $archive->close(); rrmdir($dir); return true; } else{ return false; } } ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_plugins/functions_delete.php000077500000000000000000000042651303466605000333210ustar00rootroot00000000000000query("SELECT * FROM `plugins` WHERE id = '".$pluginid."'"); $anwser = $query->fetch(); if (!class_exists('plugins')) { require 'plugins.class.php'; } if (!function_exists('exec_plugin_soap_client')) { require 'functions_webservices.php'; } if (file_exists(MAIN_SECTIONS_DIR."ms_".$anwser['name'])){ if ($anwser['name'] != "" and $anwser['name'] != null){ require (MAIN_SECTIONS_DIR."ms_".$anwser['name']."/install.php"); $fonc = "plugin_delete_".$anwser['name']; $fonc(); } rrmdir(MAIN_SECTIONS_DIR."ms_".$anwser['name']); } if (file_exists(PLUGINS_DIR."computer_detail/cd_".$anwser['name'])){ rrmdir(PLUGINS_DIR."computer_detail/cd_".$anwser['name']); } if(file_exists(PLUGINS_SRV_SIDE.$anwser['name'].".zip")){ unlink(PLUGINS_SRV_SIDE.$anwser['name'].".zip"); exec_plugin_soap_client($anwser['name'], 0); } $conn->query("DELETE FROM `".DB_NAME."`.`plugins` WHERE `plugins`.`id` = ".$pluginid." "); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_plugins/functions_webservices.php000077500000000000000000000042451303466605000343760ustar00rootroot00000000000000 delete (0) and install (1) */ function exec_plugin_soap_client($name, $action){ global $l; $champs=array('OCS_SERVER_ADDRESS'=>'OCS_SERVER_ADDRESS'); $values=look_config_default_values($champs); $address = $values['tvalue']['OCS_SERVER_ADDRESS']; if(class_exists('SoapClient')) { plugin_soap_client($name, $action); }else{ msg_error($l->g(6006)); } } function plugin_soap_client($name, $action){ $champs=array('OCS_SERVER_ADDRESS'=>'OCS_SERVER_ADDRESS'); $values=look_config_default_values($champs); $address = $values['tvalue']['OCS_SERVER_ADDRESS']; if($action == 1){ $method = "InstallPlugins"; }else{ $method = "DeletePlugins"; } $client = new SoapClient(null, array( 'location' => "http://$address/plugins", 'uri' => "http://$address/Apache/Ocsinventory/Plugins/Modules", )); $request = " <$method xmlns='http://$address/Apache/Ocsinventory/Plugins/Modules'>$name "; $test = $client->__doRequest($request, "http://$address/plugins", "http://$address/Apache/Ocsinventory/Plugins/Modules#$method", "1.1"); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_plugins/ms_pluginsmanager.php000077500000000000000000000100571303466605000334760ustar00rootroot00000000000000g(7008)); echo "
"; echo open_form("PluginInstall"); $availablePlugins = scan_downloaded_plugins(); if (!empty($availablePlugins)){ echo ""; echo ""; } else{ msg_warning($l->g(7014)); } echo close_form(); echo "
"; if (isset($protectedPost['plugin'])){ $pluginArchive = $protectedPost['plugin']; $bool = install($pluginArchive); if($bool){ $pluginame = explode(".", $pluginArchive); $plugintab = array("name" => $pluginame[0]); $isok = check($plugintab); mv_computer_detail($pluginame[0]); $result = mv_server_side($pluginame[0]); if($result){ exec_plugin_soap_client($pluginame[0], 1); } if ($isok){ $msg = $l->g(6003)." ".$pluginame[0]." ".$l->g(7013) ; msg_success($msg); }else{ $msg = $l->g(2001)." ".$pluginame[0]." ".$l->g(7011)."
".$l->g(7012); msg_error($msg); } }else{ msg_error($l->g(7010)); } } // Plugins Tab printEnTete($l->g(7009)); $form_name="show_all_plugins"; $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; echo open_form($form_name); $list_fields=array('ID'=>'id', $l->g(7002)=>'name', $l->g(7003)=>'version', $l->g(7004)=>'licence', $l->g(7005)=>'author', 'Required OCS ver.'=>'verminocs', $l->g(7006) =>'reg_date' ); $tab_options['FILTRE']=array_flip($list_fields); $tab_options['FILTRE']['NAME']=$l->g(49); asort($tab_options['FILTRE']); $list_fields['SUP']='ID'; $list_fields['CHECK']='ID'; $list_col_cant_del=array('SUP'=>'SUP','CHECK'=>'CHECK'); $default_fields= array($l->g(7002)=>$l->g(7002),$l->g(7003)=>$l->g(7003),$l->g(7004)=>$l->g(7005),$l->g(7006),$l->g(7006)); $sql=prepare_sql_tab($list_fields,$list_col_cant_del); $tab_options['ARG_SQL']=$sql['ARG']; $queryDetails = $sql['SQL'].",ID from plugins"; $tab_options['LBL_POPUP']['SUP']=$l->g(7007)." "; $tab_options['LBL']['SUP']=$l->g(122); $tab_options['LIEN_LBL']['NAME']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_pluginsmanager'].'&head=1&id='; $tab_options['LIEN_CHAMP']['NAME']='ID'; $tab_options['LBL']['NAME']=$l->g(49); ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); $img['image/delete.png']=$l->g(162); del_selection($form_name); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_plugins/plugins.class.php000077500000000000000000000224711303466605000325530ustar00rootroot00000000000000menus; } private function getRights(){ return $this->rights; } private function setMenus($table){ $this->menus = $this->menu + $table; } private function setRights($table){ $this->rights = $this->rights + $table; } /** * This function add a computer detail entry into the plugins.xml * * @param string $name : Name of the plugin * @param string $category : Category in cd details * @param string $available (optional) : NULL per defaut (Don't use it if u don't know what this is supposed to do.) */ public function add_cd_entry($name, $category, $available=NULL){ $xmlfile = CD_CONFIG_DIR."plugins.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $label = rand(50000, 60000); $menu = $xml->addChild("plugin"); $menu->addAttribute("id","cd_".$name.""); $menu->addChild("label","g(".$label.")"); $menu->addChild("system","1"); $menu->addChild("category",$category); if ($available != null) { $menu->addChild("available",$available); } $xml->asXML($xmlfile); } } /** * This function will remove the computer detail node with the id => cd_$name * * @param string $name : Name of the plugin */ public function del_cd_entry($name){ $xmlfile = CD_CONFIG_DIR."plugins.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); foreach ($xml as $value){ if($value['id'] == "cd_".$name){ //var_dump($value['id']); $dom=dom_import_simplexml($value); $dom->parentNode->removeChild($dom); } } //var_dump($xml->asXML()); $xml->asXML($xmlfile); } } /** * This function create a menu or a submenu in OCS inventory. * As default, only super administrator profile can see the created menu. * * @param string $name : The name of the menu you want to crate * @param integer $label : You need to give a label to your menu, it's like a reference for OCS. * @param String $plugindirectory : Your plugin directory * @param string $menu (Optional) : If you want to create a submenu not a menu */ public function add_menu($name, $label, $plugindirectory, $displayname ,$menu = ""){ // add menu entry if ($menu == ""){ $xmlfile = CONFIG_DIR."main_menu.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $menu = $xml->addChild("menu-elem"); $menu->addAttribute("id","ms_".$name.""); $menu->addChild("label","g(".$label.")"); $menu->addChild("url","ms_".$name.""); $menu->addChild("submenu"," "); $xml->asXML($xmlfile); } } else{ $xmlfile = CONFIG_DIR."main_menu.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $mainmenu = $xml->xpath("/menu/menu-elem[attribute::id='".$menu."']/submenu"); $submenu = $mainmenu['0']->addChild("menu-elem"); $submenu->addAttribute("id","ms_".$name.""); $submenu->addChild("label","g(".$label.")"); $submenu->addChild("url","ms_".$name.""); $xml->asXML($xmlfile); } } // Add url entry for menu $xmlfile = CONFIG_DIR."urls.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $urls = $xml->addChild("url"); $urls->addAttribute("key","ms_".$name.""); $urls->addChild("value",$name); $urls->addChild("directory","ms_".$plugindirectory.""); $xml->asXML($xmlfile); } // add permissions for menu $xmlfile = CONFIG_DIR."profiles/sadmin.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $xml->pages->addChild("page","ms_".$name.""); $xml->asXML($xmlfile); } // Add label entry $file = fopen(PLUGINS_DIR."language/english/english.txt", "a+"); fwrite($file, $label." ".$displayname."\n"); fclose($file); } /** * This function delete a menu or a submenu in OCS inventory. * As default, only super administrator profile can see the created menu. * * @param string $name : The name of the menu you want to delete * @param integer $label : You need to give the label of the deleted menu. * @param string $menu (Optional) : If you want to delete a submenu not a menu */ public function del_menu($name, $label, $displayname, $menu = ""){ // Delete menu and all his sub menu if ($menu == ""){ $xmlfile = CONFIG_DIR."main_menu.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $mainmenu = $xml->xpath("/menu"); foreach ($mainmenu as $listmenu){ foreach ($listmenu as $info){ if ($info['id'] == "ms_".$name){ $dom=dom_import_simplexml($info); $dom->parentNode->removeChild($dom); } } } //var_dump($xml->asXML()); $xml->asXML($xmlfile); } } else{ $xmlfile = CONFIG_DIR."main_menu.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $mainmenu = $xml->xpath("/menu/menu-elem[attribute::id='".$menu."']/submenu"); foreach ($mainmenu as $submenu){ foreach ($submenu as $info){ if ($info['id'] == "ms_".$name){ $dom=dom_import_simplexml($info); $dom->parentNode->removeChild($dom); } } } //var_dump($xml->asXML()); $xml->asXML($xmlfile); } } // Remove Url node $xmlfile = CONFIG_DIR."urls.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); foreach ($xml as $value){ if( $value['key'] == "ms_".$name ){ $dom=dom_import_simplexml($value); $dom->parentNode->removeChild($dom); } } //var_dump($xml->asXML()); $xml->asXML($xmlfile); } // Remove permissions $xmlfile = CONFIG_DIR."profiles/sadmin.xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $mypage = $xml->pages->page; foreach ($mypage as $pages){ if($pages == "ms_".$name){ $dom=dom_import_simplexml($pages); $dom->parentNode->removeChild($dom); } } //var_dump($xml->asXML()); $xml->asXML($xmlfile); } // Remove Label entry $reading = fopen(PLUGINS_DIR.'language/english/english.txt', 'a+'); $writing = fopen(PLUGINS_DIR.'language/english/english.tmp', 'w'); $replaced = false; while (!feof($reading)) { $line = fgets($reading); if (stristr($line, $label." ".$displayname)) { $line = ""; $replaced = true; } fputs($writing, $line); } fclose($reading); fclose($writing); // might as well not overwrite the file if we didn't replace anything if ($replaced) { rename(PLUGINS_DIR.'language/english/english.tmp', PLUGINS_DIR.'language/english/english.txt'); } else { unlink(PLUGINS_DIR.'language/english/english.tmp'); } } /** * This function is used to add permission to see a page for a fixed profile * (admin / ladmin / etc etc...) * @param string $profilename : The name of the profile * @param string $page : Name of the page u want to be seed by the profile */ public function add_rights($profilename, $page){ if ($profilename == "sadmin"){ exit; } $xmlfile = CONFIG_DIR."profiles/".$profilename.".xml"; if (file_exists($xmlfile)){ $xml = simplexml_load_file($xmlfile); $xml->pages->addChild("page","ms_".$page.""); $xml->asXML($xmlfile); } } /** * This function is used for remove permission on one plugin's page for a fixed profile * (admin / ladmin / etc etc...) * @param string $profilename : The name of the profile * @param string $page : Name of the page u want to be seed by the profile */ public function del_rights($profilename, $page){ if ($profilename == "sadmin"){ exit; } $xmlfile = CONFIG_DIR."profiles/".$profilename.".xml"; $xml = simplexml_load_file($xmlfile); $mypage = $xml->pages->page; foreach ($mypage as $pages){ if($pages == $page){ $dom=dom_import_simplexml($pages); $dom->parentNode->removeChild($dom); } } $xml->asXML($xmlfile); } /** * This function try to execute your query and throw an error message if this is a problems in the query. * * @param string $query : Your database query here ! * @return mixed : Result returned by the query */ public function sql_query($query){ try { $dbh = new PDO('mysql:host='.SERVER_WRITE.';dbname='.DB_NAME.'', COMPTE_BASE, PSWD_BASE); $req = $dbh->query($query); $anwser = $req ->fetch(); $dbh = null; return $anwser; } catch (PDOException $e) { print "Error !: " . $e->getMessage() . "
"; die(); } } } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_regconfig/000077500000000000000000000000001303466605000275265ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_regconfig/ms_regconfig.php000077500000000000000000000121131303466605000327020ustar00rootroot00000000000000g(1059); $tab['ADD']=$l->g(1060); $form_name="registry"; $table_name="registry"; echo open_form($form_name); if (isset($protectedPost['MODIF']) and $protectedPost['MODIF'] != ''){ $protectedPost['tab'] = 'ADD'; $sql="select NAME,REGTREE,REGKEY,REGVALUE,ID from regconfig where id = '%s'"; $arg=$protectedPost['MODIF']; //$sql="select NAME,ID,MASK from subnet where netid='".$netid."'"; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); $protectedPost['NAME']=$row->NAME; $protectedPost['REGTREE']=$row->REGTREE; $protectedPost['REGKEY']=$row->REGKEY; $protectedPost['REGVALUE']=$row->REGVALUE; $tab_hidden['id']=$row->ID; } $tab_options=$protectedPost; show_tabs($tab,$form_name,"tab",4); echo '
'; if ($ajax){ if (isset($protectedPost['REGKEY'])){ $protectedPost['tab']="VIEW"; } } if ($protectedPost['tab'] == 'VIEW'){ // delete register key if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != '') { // delete one row delkey($protectedPost['SUP_PROF']); $tab_options['CACHE'] = 'RESET'; } else if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != '') { // delete multiple selected rows $ids = explode(',', $protectedPost['del_check']); foreach ($ids as $id) { delkey($id); } $tab_options['CACHE'] = 'RESET'; } $list_fields = array ( 'ID' => "id", $l->g(49) => "name", 'REGTREE' => "REGTREE", 'REGKEY' => "REGKEY", 'REGVALUE' => "REGVALUE", 'SUP' => "id", 'MODIF' => "id", 'CHECK'=>'id'); $list_col_cant_del=array('SUP'=>'SUP','MODIF' => 'MODIF',$l->g(49)=> $l->g(49),'CHECK'=>'CHECK'); $default_fields= array($l->g(49) => "name", 'REGTREE' => "REGTREE", 'REGKEY' => "REGKEY", 'REGVALUE' => "REGVALUE", 'SUP' => "id", 'MODIF' => "id", 'CHECK'=>"id"); $sql=prepare_sql_tab($list_fields,array('SUP','MODIF','CHECK')); $tab_options['ARG_SQL']=$sql['ARG']; $sql['SQL'] .= " from regconfig "; $tab_options['FILTRE']['name']=$l->g(49); $tab_options['FILTRE']['REGKEY']='REGKEY'; $tab_options['FILTRE']['REGVALUE']='REGVALUE'; $tab_options['REPLACE_VALUE']['REGTREE']=$list_registry_key; $tab_options['LBL_POPUP']['SUP']='name'; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); $img['image/delete.png']=$l->g(162); del_selection($form_name); }elseif ($protectedPost['tab'] == 'ADD'){ if (isset($protectedPost['Valid_modif'])){ $form_values=array("NAME"=>$protectedPost["NAME"], "REGTREE"=>$protectedPost["REGTREE"], "REGKEY"=>$protectedPost["REGKEY"], "REGVALUE"=>$protectedPost["REGVALUE"]); if (isset($protectedPost['id']) and $protectedPost['id'] != '') $udpate=$protectedPost['id']; else $udpate=FALSE; $result=add_update_key($form_values,$udpate); if ($result){ unset($_SESSION['OCS']['DATA_CACHE'][$table_name]); unset($_SESSION['OCS']['NUM_ROW'][$table_name]); } } $tab_typ_champ[0]['DEFAULT_VALUE']=$protectedPost['NAME']; $tab_typ_champ[0]['INPUT_NAME']="NAME"; $tab_typ_champ[0]['CONFIG']['SIZE']=60; $tab_typ_champ[0]['CONFIG']['MAXLENGTH']=255; $tab_typ_champ[0]['INPUT_TYPE']=0; $tab_name[0]=$l->g(252).": "; $tab_typ_champ[1]['DEFAULT_VALUE']=$list_registry_key; $tab_typ_champ[1]['INPUT_NAME']="REGTREE"; $tab_typ_champ[1]['INPUT_TYPE']=2; $tab_name[1]=$l->g(253).":"; $tab_typ_champ[2]['DEFAULT_VALUE']=$protectedPost['REGKEY']; $tab_typ_champ[2]['INPUT_NAME']="REGKEY"; $tab_typ_champ[2]['CONFIG']['SIZE']=60; $tab_typ_champ[2]['CONFIG']['MAXLENGTH']=255; $tab_name[2]=$l->g(254).": "; $tab_typ_champ[3]['DEFAULT_VALUE']=$protectedPost['REGVALUE']; $tab_typ_champ[3]['INPUT_NAME']="REGVALUE"; $tab_typ_champ[3]['CONFIG']['SIZE']=60; $tab_typ_champ[3]['CONFIG']['MAXLENGTH']=255; $tab_typ_champ[3]['INPUT_TYPE']=0; $tab_name[3]=$l->g(255).": "; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'show_frame' => false )); } echo "
"; echo close_form(); if ($ajax){ ob_end_clean(); if(is_array($sql)){ tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); }else{ tab_req($list_fields,$default_fields,$list_col_cant_del,$sql,$tab_options); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_regconfig/require/000077500000000000000000000000001303466605000312025ustar00rootroot00000000000000function_regconfig.php000077500000000000000000000051441303466605000355130ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_regconfig/require $value){ if (trim($value) == ""){ msg_error($l->g(988)); return FALSE; } } if ($update){ $req = "UPDATE regconfig SET ". "NAME='%s',". "REGTREE='%s',". "REGKEY='%s',". "REGVALUE='%s' ". "where ID='%s'"; $arg_req=array($form_values["NAME"],$form_values["REGTREE"], $form_values["REGKEY"],$form_values["REGVALUE"], $update); }else{ $sql_verif="select ID from regconfig where REGTREE='%s' and REGKEY='%s' and REGVALUE='%s'"; $arg_verif=array($form_values["REGTREE"],$form_values["REGKEY"],$form_values["REGVALUE"]); $res=mysql2_query_secure($sql_verif, $_SESSION['OCS']["readServer"],$arg_verif); $row=mysqli_fetch_object($res); if (!is_numeric($row->ID)){ $req = "INSERT INTO regconfig (NAME,REGTREE,REGKEY,REGVALUE) VALUES('%s','%s','%s','%s')"; $arg_req=array($form_values["NAME"],$form_values["REGTREE"], $form_values["REGKEY"],$form_values["REGVALUE"]); }else{ msg_error($l->g(987)); return FALSE; } } if (isset($req)){ mysql2_query_secure($req,$_SESSION['OCS']["writeServer"],$arg_req); if ($update) msg_success($l->g(1185)); else msg_success($l->g(1184)); return TRUE; } } /* * function to delete a registry key * $id=> id of registry key */ function delkey($id){ //find the registry key $sql="select name from regconfig where id =%s"; $arg=$id; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); $name=$row->name; //delete key $sql_reg="delete from regconfig where id =%s "; mysql2_query_secure($sql_reg,$_SESSION['OCS']["writeServer"],$arg); //delete cache $sql_reg="delete from registry_name_cache where name ='%s' "; mysql2_query_secure($sql_reg,$_SESSION['OCS']["writeServer"],$name); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_repart_tag/000077500000000000000000000000001303466605000277135ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_repart_tag/ms_repart_tag.php000077500000000000000000000047531303466605000332670ustar00rootroot00000000000000g(340)." ".show_modif($list_fields_flip,'TAG_CHOISE',2,$form_name,array('DEFAULT' => "NO")); if (isset($protectedPost['TAG_CHOISE'])){ $tag=$protectedPost['TAG_CHOISE']; } if (array($accountinfo_value['TAB_OPTIONS'])){ $tab_options['replace_query_arg']['ID']=$tag; } unset($list_fields); $list_fields['ID']='ID'; $tab_options['LBL']['ID']=$list_fields_flip[$tag]; $list_fields['Nbr_mach']='c'; $tab_options['LIEN_LBL']['Nbr_mach']="index.php?".PAG_INDEX."=".$pages_refs['ms_all_computers']."&filtre=".$tag."&value="; $tab_options['LIEN_CHAMP']['Nbr_mach']="ID"; $tab_options['LBL']['Nbr_mach']=$l->g(1120); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $queryDetails = "SELECT count(hardware_id) c, %s as ID from accountinfo a where %s !='' "; $tab_options['ARG_SQL']=array($tag,$tag); if (isset($_SESSION['OCS']["mesmachines"]) and $_SESSION['OCS']["mesmachines"] != '') $queryDetails .= " AND ".$_SESSION['OCS']["mesmachines"]; $tab_options['ARG_SQL'][]=$tag; $queryDetails .= "group by ID"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_scripts/000077500000000000000000000000001303466605000272525ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_scripts/ms_update_new_tag.php000077500000000000000000000125341303466605000334600ustar00rootroot00000000000000Field != 'HARDWARE_ID' and $value->Field != 'TAG') $list_field[$value->Field]=$value->Field; $type_field[$value->Field]=$value->Type; } $fields_table=array('ID','NAME_ACCOUNTINFO','TYPE,NAME','ID_TAB','COMMENT','SHOW_ORDER','ACCOUNT_TYPE'); $sql=prepare_sql_tab($fields_table); $sql['SQL'] .="from accountinfo_config where ACCOUNT_TYPE='COMPUTERS'"; $res=mysql2_query_secure($sql['SQL'],$_SESSION['OCS']["readServer"],$sql['ARG']); while ($value = mysqli_fetch_object($res)){ if (!isset($max_order) or $value->SHOW_ORDER > $max_order) $max_order=$value->SHOW_ORDER; if ($value->NAME_ACCOUNTINFO != 'TAG'){ //this column does'nt exist in accountinfo_config if (!$list_field['fields_'.$value->ID]){ //add this column in accountinfo_config $sql_column_account="ALTER TABLE accountinfo ADD COLUMN %s VARCHAR(255) default NULL"; $arg="fields_".$value->ID; if (isset($protectedPost['EXE']) and $protectedPost['EXE']!= ''){ mysql2_query_secure($sql_column_account,$_SESSION['OCS']["writeServer"],$arg); addLog( 'SCRIPT_ADD_COLUMN_ACCOUNTINFO',$arg); }else{ $add_colum_accountinfo[]=$arg; } } $name_accountinfo["fields_".$value->ID] = "fields_".$value->ID; } } //for each column we are going to verify that this field exist in accountinfo_config if (is_array($list_field)){ foreach ($list_field as $name){ //if this name does'nt exist in accuontinfo_config if (!isset($name_accountinfo[$name])) { //echo $name_accountinfo[$name]."=>".$name."
"; unset($fields_table,$values); $fields_table=array('TYPE','NAME','ID_TAB','COMMENT','SHOW_ORDER','ACCOUNT_TYPE'); $max_order++; if ($type_field[$name] == "varchar(10)" or $type_field[$name] == "date"){ $type=6; $type_field[$name] = "varchar(10)"; }elseif ($type_field[$name] == "blob") $type=5; elseif ($type_field[$name] == "varchar(255)") $type=0; else $type=0; $sql="insert into accountinfo_config "; $arg=''; $sql=mysql2_prepare($sql,$arg,$fields_table,true); $values=array($type,$name,1,$name. " (" . $l->g(2101) . ")",$max_order,'COMPUTERS'); $sql=mysql2_prepare($sql['SQL']." VALUES ",$sql['ARG'],$values); if (isset($protectedPost['EXE']) and $protectedPost['EXE']!= '') mysql2_query_secure($sql['SQL'],$_SESSION['OCS']["writeServer"],$sql['ARG']); else $add_lign_accountinfo_config[]=$sql['ARG']; $sql_alter="ALTER TABLE accountinfo CHANGE %s %s %s"; $arg=array($name,"fields_".mysqli_insert_id($_SESSION['OCS']["writeServer"]),$type_field[$name]); if (isset($protectedPost['EXE']) and $protectedPost['EXE']!= ''){ mysql2_query_secure($sql_alter,$_SESSION['OCS']["writeServer"],$arg); addLog( 'SCRIPT_ADD_DATA_ACCOUNTINFO_CONFIG',$name); }else $rename_col_accountinfo[]=$arg; } } } $add_colum_accountinfo=array('1','2'); if (isset($add_colum_accountinfo) or isset($add_lign_accountinfo_config) or isset($rename_col_accountinfo)){ $form_name = "console"; echo open_form($form_name); echo "

This script is going to help you to update your old admin info
"; echo "to the new version 2.0

"; echo ""; echo close_form(); echo '
'; echo "

Summary of actions to be undertaken

"; if (isset($add_colum_accountinfo)){ echo "

add column in accountinfo table
(orphans found in accountinfo_config table (Inconsistency))

"; foreach($add_colum_accountinfo as $key=>$values){ echo $values."
"; } } if (isset($add_lign_accountinfo_config)){ echo "

add lignes in accountinfo_config table
(orphans found in accountinfo table (=> 2.0))

"; foreach($add_lign_accountinfo_config as $key=>$values){ $i=0; echo "

"; while (isset($values[$i])){ echo $values[$i]; echo " "; if ($i == 5) echo "
"; $i++; } echo "

"; } } if (isset($rename_col_accountinfo)){ echo "

Renaming of old columns in accountinfo table
(=> 2.0)

"; foreach($rename_col_accountinfo as $key=>$values){ echo $values[0]."
"; } } echo "
"; }else echo "" . $l->g(2105) . ""; /*ALTER TABLE accountinfo CHANGE fields_86 lettre_commande varchar(255); ALTER TABLE accountinfo CHANGE fields_87 date_commande varchar(10); ALTER TABLE accountinfo CHANGE fields_88 fichier_commande blob; ALTER TABLE accountinfo CHANGE fields_89 fichier_commande_bis blob;*/ ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/000077500000000000000000000000001303466605000300635ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/info.txt000077500000000000000000000002611303466605000315610ustar00rootroot00000000000000AUTHOR: Jof300 PACKAGE: airoine LICENCE: GPL This OCS plugin was created to simplify research on existing software on the computer equipment. You can print the list of resultsocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/js/000077500000000000000000000000001303466605000304775ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/js/autocomplete-3-2.js000077500000000000000000000366071303466605000340540ustar00rootroot00000000000000//SOURCE:http://dcabasson.developpez.com/articles/javascript/ajax/ajax-autocompletion-pas-a-pas/ // retourne un objet xmlHttpRequest. // méthode compatible entre tous les navigateurs (IE/Firefox/Opera) function getXMLHTTP(){ var xhr=null; if(window.XMLHttpRequest) // Firefox et autres xhr = new XMLHttpRequest(); else if(window.ActiveXObject){ // Internet Explorer try { xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xhr = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e1) { xhr = null; } } } else { // XMLHttpRequest non supporté par le navigateur alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); } return xhr; } var _documentForm=null; // le formulaire contenant notre champ texte var _inputField=null; // le champ texte lui-meme var _submitButton=null; // le bouton submit de notre formulaire function initAutoComplete(form,field,submit,add){ _adresseRecherche = add; //l'adresse à interroger pour trouver les suggestions _documentForm=form; _inputField=field; _submitButton=submit; _inputField.autocomplete="off"; creeAutocompletionDiv(); _currentInputFieldValue=_inputField.value; _oldInputFieldValue=_currentInputFieldValue; cacheResults("",new Array()) document.onkeydown=onKeyDownHandler; _inputField.onkeyup=onKeyUpHandler; _inputField.onblur=onBlurHandler; window.onresize=onResizeHandler; // Premier déclenchement de la fonction dans 200 millisecondes setTimeout("mainLoop()",200) } var _oldInputFieldValue=""; // valeur précédente du champ texte var _currentInputFieldValue=""; // valeur actuelle du champ texte var _resultCache=new Object(); // mécanisme de cache des requetes // tourne en permanence pour suggérer suite à un changement du champ texte function mainLoop(){ if(_oldInputFieldValue!=_currentInputFieldValue){ var valeur=escapeURI(_currentInputFieldValue); var suggestions=_resultCache[_currentInputFieldValue]; if(suggestions){ // la réponse était encore dans le cache metsEnPlace(valeur,suggestions) }else{ callSuggestions(valeur) // appel distant } _inputField.focus() } _oldInputFieldValue=_currentInputFieldValue; setTimeout("mainLoop()",200); // la fonction se redéclenchera dans 200 ms return true } // echappe les caractères spéciaux function escapeURI(La){ if(encodeURIComponent) { return encodeURIComponent(La); } if(escape) { return escape(La) } } var _xmlHttp = null; //l'objet xmlHttpRequest utilisé pour contacter le serveur function callSuggestions(valeur){ if(_xmlHttp&&_xmlHttp.readyState!=0){ _xmlHttp.abort() } _xmlHttp=getXMLHTTP(); if(_xmlHttp){ //appel à l'url distante _xmlHttp.open("GET",_adresseRecherche+"&debut="+valeur,true); _xmlHttp.onreadystatechange=function() { if(_xmlHttp.readyState==4&&_xmlHttp.responseXML) { var liste = traiteXmlSuggestions(_xmlHttp.responseXML) cacheResults(valeur,liste) metsEnPlace(valeur,liste) } }; // envoi de la requete _xmlHttp.send(null) } } // Mécanisme de caching des réponses function cacheResults(debut,suggestions){ _resultCache[debut]=suggestions } // Transformation XML en tableau function traiteXmlSuggestions(xmlDoc) { var options = xmlDoc.getElementsByTagName('option'); var optionsListe = new Array(); for (var i=0; i < options.length; ++i) { optionsListe.push(options[i].firstChild.data); } return optionsListe; } //insère une règle avec son nom function insereCSS(nom,regle){ if (document.styleSheets) { var I=document.styleSheets[0]; if(I.addRule){ // méthode IE I.addRule(nom,regle) }else if(I.insertRule){ // méthode DOM I.insertRule(nom+" { "+regle+" }",I.cssRules.length) } } } function initStyle(){ var AutoCompleteDivListeStyle="font-size: 13px; font-family: arial,sans-serif; word-wrap:break-word; "; var AutoCompleteDivStyle="display: block; padding-left: 3; padding-right: 3; height: 16px; overflow: hidden; background-color: white;"; var AutoCompleteDivActStyle="background-color: #3366cc; color: white ! important; "; insereCSS(".AutoCompleteDivListeStyle",AutoCompleteDivListeStyle); insereCSS(".AutoCompleteDiv",AutoCompleteDivStyle); insereCSS(".AutoCompleteDivAct",AutoCompleteDivActStyle); } function setStylePourElement(c,name){ c.className=name; } // calcule le décalage à gauche function calculateOffsetLeft(r){ return calculateOffset(r,"offsetLeft") } // calcule le décalage vertical function calculateOffsetTop(r){ return calculateOffset(r,"offsetTop") } function calculateOffset(r,attr){ var kb=0; while(r){ kb+=r[attr]; r=r.offsetParent } return kb } // calcule la largeur du champ function calculateWidth(){ return _inputField.offsetWidth-2*1 } function setCompleteDivSize(){ if(_completeDiv){ _completeDiv.style.left=calculateOffsetLeft(_inputField)+"px"; _completeDiv.style.top=calculateOffsetTop(_inputField)+_inputField.offsetHeight-1+"px"; _completeDiv.style.width=calculateWidth()+"px" } } function creeAutocompletionDiv() { initStyle(); _completeDiv=document.createElement("DIV"); _completeDiv.id="completeDiv"; var borderLeftRight=1; var borderTopBottom=1; _completeDiv.style.borderRight="black "+borderLeftRight+"px solid"; _completeDiv.style.borderLeft="black "+borderLeftRight+"px solid"; _completeDiv.style.borderTop="black "+borderTopBottom+"px solid"; _completeDiv.style.borderBottom="black "+borderTopBottom+"px solid"; _completeDiv.style.zIndex="1"; _completeDiv.style.paddingRight="0"; _completeDiv.style.paddingLeft="0"; _completeDiv.style.paddingTop="0"; _completeDiv.style.paddingBottom="0"; setCompleteDivSize(); _completeDiv.style.visibility="hidden"; _completeDiv.style.position="absolute"; _completeDiv.style.backgroundColor="white"; document.body.appendChild(_completeDiv); setStylePourElement(_completeDiv,"AutoCompleteDivListeStyle"); } function metsEnPlace(valeur, liste){ while(_completeDiv.childNodes.length>0) { _completeDiv.removeChild(_completeDiv.childNodes[0]); } // mise en place des suggestions for(var f=0; f0) { _completeDiv.height=16*_completeDivRows+4; } else { hideCompleteDiv(); } } var _lastKeyCode=null; // Handler pour le keydown du document var onKeyDownHandler=function(event){ // accès évênement compatible IE/Firefox if(!event&&window.event) { event=window.event; } // on enregistre la touche ayant déclenché l'evenement if(event) { _lastKeyCode=event.keyCode; } } var _eventKeycode = null; // Handler pour le keyup de lu champ texte var onKeyUpHandler=function(event){ // accès evenement compatible IE/Firefox if(!event&&window.event) { event=window.event; } _eventKeycode=event.keyCode; // Dans les cas touches touche haute(38) ou touche basse (40) if(_eventKeycode==40||_eventKeycode==38) { // on autorise le blur du champ (traitement dans onblur) blurThenGetFocus(); } // taille de la selection var N=rangeSize(_inputField); // taille du texte avant la selection (selection = suggestion d'autocomplétion) var v=beforeRangeSize(_inputField); // contenu du champ texte var V=_inputField.value; if(_eventKeycode!=0){ if(N>0&&v!=-1) { // on récupère uniquement le champ texte tapé par l'utilisateur V=V.substring(0,v); } // 13 = touche entrée if(_eventKeycode==13||_eventKeycode==3){ var d=_inputField; // on mets en place l'ensemble du champ texte en repoussant la sélection if(_inputField.createTextRange){ var t=_inputField.createTextRange(); t.moveStart("character",_inputField.value.length); _inputField.select() } else if (d.setSelectionRange){ _inputField.setSelectionRange(_inputField.value.length,_inputField.value.length) } } else { // si on a pas pu agrandir le champ non selectionné on le mets en place violemment. if(_inputField.value!=V) { _inputField.value=V } } } // si la touche n'est ni haut, ni bas, on stocke la valeur utilisateur du champ if(_eventKeycode!=40&&_eventKeycode!=38) { // le champ courant n'est pas changé si key Up ou key Down _currentInputFieldValue=V; } if(handleCursorUpDownEnter(_eventKeycode)&&_eventKeycode!=0) { // si on a pressé une touche autre que haut/bas/enter PressAction(); } } // Change la suggestion selectionnée // cette méthode traite les touches haut, bas et enter function handleCursorUpDownEnter(eventCode){ if(eventCode==40){ highlightNewValue(_highlightedSuggestionIndex+1); return false }else if(eventCode==38){ highlightNewValue(_highlightedSuggestionIndex-1); return false }else if(eventCode==13||eventCode==3){ return true } return true } var _completeDivRows = 0; var _completeDivDivList = null; var _highlightedSuggestionIndex = -1; var _highlightedSuggestionDiv = null; // gére une touche pressée autre que haut/bas/enter function PressAction(){ _highlightedSuggestionIndex=-1; var suggestionList=_completeDiv.getElementsByTagName("div"); var suggestionLongueur=suggestionList.length; // on stocke les valeurs précédentes // nombre de possibilités de complétion _completeDivRows=suggestionLongueur; // possibilité de complétion _completeDivDivList=suggestionList; // si le champ est vide, on cache les propositions de complétion if(_currentInputFieldValue==""||suggestionLongueur==0){ hideCompleteDiv() }else{ showCompleteDiv() } var trouve=false; // si on a du texte sur lequel travailler if(_currentInputFieldValue.length>0){ var indice; // T vaut true si on a dans la liste de suggestions un mot commencant comme l'entrée utilisateur for(indice=0; indice=_completeDivRows){ C=_completeDivRows-1 } if(_highlightedSuggestionIndex!=-1&&C!=_highlightedSuggestionIndex){ setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDiv"); _highlightedSuggestionIndex=-1 } if(C<0){ _highlightedSuggestionIndex=-1; _inputField.focus(); return } _highlightedSuggestionIndex=C; _highlightedSuggestionDiv=_completeDivDivList.item(C); setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDivAct"); _inputField.value=getSuggestion(_highlightedSuggestionDiv); } // Handler de resize de la fenetre var onResizeHandler=function(event){ // recalcule la taille des suggestions setCompleteDivSize(); } // Handler de blur sur le champ texte var onBlurHandler=function(event){ if(!_cursorUpDownPressed){ // si le blur n'est pas causé par la touche haut/bas hideCompleteDiv(); // Si la dernière touche pressée est tab, on passe au bouton de validation if(_lastKeyCode==9){ //_submitButton.focus(); _lastKeyCode=-1 } } _cursorUpDownPressed=false }; // déclenchée quand on clique sur une div contenant une possibilité var divOnMouseDown=function(){ _inputField.value=getSuggestion(this); //_documentForm.submit() }; // déclenchée quand on passe sur une div de possibilité. La div précédente est passée en style normal var divOnMouseOver=function(){ if(_highlightedSuggestionDiv) { setStylePourElement(_highlightedSuggestionDiv,"AutoCompleteDiv"); } setStylePourElement(this,"AutoCompleteDivAct") }; // déclenchée quand la souris quitte une div de possibilité. La div repasse a l'état normal var divOnMouseOut = function(){ setStylePourElement(this,"AutoCompleteDiv"); }; ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/js/print.js000077500000000000000000000012031303466605000321700ustar00rootroot00000000000000function imprime_zone(titre, obj) { // Définie la zone à imprimer var zi = document.getElementById(obj).innerHTML; // Ouvre une nouvelle fenetre var f = window.open("", "ZoneImpr", "height=800, width=800, toolbar=0, menubar=0, scrollbars=1, resizable=1, status=0, location=0, left=10, top=10"); // Définit le Style de la page f.document.body.style.color = '#000000'; f.document.body.style.backgroundColor = '#FFFFFF'; f.document.body.style.padding = "10px"; // Ajoute les Données f.document.title = titre; f.document.body.innerHTML += "" + zi + ""; // Imprime et ferme la fenetre f.window.print(); f.window.close(); return true; } ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/ms_options.php000077500000000000000000000026631303466605000330000ustar00rootroot00000000000000"); //connecOCS(); $sql ="SELECT DISTINCT softwares.NAME FROM softwares_name_cache softwares WHERE softwares.NAME NOT LIKE '%Correctif%' AND softwares.NAME NOT LIKE '%Mise a jour%' ORDER BY softwares.NAME"; $query= mysqli_query($_SESSION['OCS']["readServer"],$sql); while($row=mysqli_fetch_array($query,MYSQL_ASSOC)) // or die ('erreur dans le fetch_array' .mysql_error())) { $liste[]=$row; } if (isset($_GET['debut'])) { $debut = utf8_decode($_GET['debut']); } else { $debut = ""; } $debut = strtolower($debut); // met la premiere lettre en majuscule $MAX_RETURN=10; $i= 0; foreach($liste as $element) { if($i<$MAX_RETURN && strtolower(substr($element['NAME'], 0, strlen($debut)))==$debut) { echo(utf8_encode("")); $i++; } } echo "\n".''; die(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/ms_search_soft.php000077500000000000000000000077231303466605000336070ustar00rootroot00000000000000 \n"; echo ""."\n"; echo "Check Logiciel's Version"."\n"; echo ''."\n"; echo "\n".''; echo "\n".''; echo "\n".''; echo "\n".''; */ $xml_file="index.php?".PAG_INDEX."=".$pages_refs['ms_options']."&no_header=1"; echo "\n".''; echo "\n".''.$l->g(20).": "; remplirListe("logiciel_select"); echo "\n".'

'; echo "\n".''; echo "\n".'
'; // voir fonction.php if ((isset($protectedPost['logiciel_select']) and $protectedPost['logiciel_select'] != '') or (isset($protectedPost['logiciel_text']) and $protectedPost['logiciel_text'] != '')) //logiciel du select name='logiciel' { if (isset($protectedPost['logiciel_select']) and $protectedPost['logiciel_select'] != '') $logiciel=$protectedPost['logiciel_select']; else $logiciel=$protectedPost['logiciel_text']; $table_name=$form_name; $tab_options['table_name']=$table_name; $list_fields=array('NAME' => 'h.NAME', 'ip' => 'h.IPADDR', 'domaine' => 'h.WORKGROUP', 'snom' => 'a.NAME', 'sversion'=> 'a.VERSION', 'sfold' => 'a.FOLDER'); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $tab_options['AS']['a.NAME']='SNAME'; //$queryDetails = "SELECT * FROM monitors WHERE (hardware_id=$systemid)"; $queryDetails= "SELECT h.ID,"; foreach ($list_fields as $lbl=>$value){ if ($value == 'a.NAME') $queryDetails .= $value." as ".$tab_options['AS']['a.NAME'].","; else $queryDetails .= $value.","; } $queryDetails = substr($queryDetails,0,-1); $queryDetails.= " FROM hardware h ,softwares a WHERE a.HARDWARE_ID =h.ID and a.NAME='".$logiciel."' group by name"; $tab_options['LBL']['NAME']=$l->g(478); $tab_options['LBL']['ip']=$l->g(176); $tab_options['LBL']['domaine']=$l->g(680); $tab_options['LBL']['snom']=$l->g(847); $tab_options['LBL']['sversion']=$l->g(848); $tab_options['LBL']['sfold']=$l->g(849); ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //creerTableau($logiciel); } echo "\n".'
'; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/require/000077500000000000000000000000001303466605000315375ustar00rootroot00000000000000fonction.inc.php000077500000000000000000000063051303466605000345670ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_search_soft/require'; //remplit la liste deroulante while($row=mysqli_fetch_array($query)) { $name[$row['NAME']]=$row['NAME']; } echo show_modif($name,$input_name,2); } function creerTableau($var) //$var est le $_post de mon script.php { //connecOCS(); echo "
Vous avez choisi :
".$var."
"; $sql_version= "SELECT hardware.NAME AS 'hnom',hardware.IPADDR AS 'ip',hardware.WORKGROUP AS 'domaine', softwares.NAME AS 'snom', softwares.VERSION AS 'sversion',softwares.FOLDER as 'sfold' FROM hardware INNER JOIN softwares ON softwares.HARDWARE_ID =hardware.ID WHERE softwares.NAME='$var' ORDER BY softwares.VERSION"; $query_version=mysqli_query($_SESSION['OCS']["readServer"],$sql_version); //echo ""; //car pb de css avec l impression $html_data .="\n"; $html_data .=" "; while($row=mysqli_fetch_array($query_version,MYSQL_ASSOC)) { if($row['sfold']=="") {$row['sfold']=" ";} if($row['sversion']=="") {$row['sversion']=" ";} $html_data .="\n"; } $html_data .="
Nom du PC Nom du logiciel Version du logiciel RepertoireAdresse IPDomaine
".$row['hnom']." ".$row['snom']." ".$row['sversion']."".$row['sfold']."".$row['ip']."".$row['domaine']."
"; echo $html_data; } function csv($var) { //connecOCS(); $sql_version= "SELECT hardware.NAME AS 'hnom',softwares.NAME AS 'snom',softwares.VERSION AS 'sversion', softwares.FOLDER as 'sfold', hardware.IPADDR AS 'ip',hardware.WORKGROUP AS 'domaine' FROM hardware INNER JOIN softwares ON softwares.HARDWARE_ID =hardware.ID WHERE softwares.NAME='$var' ORDER BY softwares.VERSION"; $query_version=mysqli_query($_SESSION['OCS']["readServer"],$sql_version); print "nom du PC;"."Nom du logiciel;"."Version du logiciel;"."Repertoire;"."Adresse IP;"."Domaine;"."\n\n\n"; while($row = mysqli_fetch_row($query_version)) { print '"' . stripslashes(implode('";"',$row)) . "\"\n"; } exit; } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_server_infos/000077500000000000000000000000001303466605000302675ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_server_infos/ms_server_infos.php000077500000000000000000000061451303466605000342140ustar00rootroot00000000000000

g(1360)?>

g(25)?>

g(274)?> :
' . $l->g($os == "Linux" ? 1372 : 277). ' :
' . php_uname("r"); $meminfo = @file_get_contents('/proc/meminfo'); if ($meminfo && preg_match("/MemTotal: *([0-9]*)/", $meminfo, $res)) { $res = sprintf("%.2f Gio", intval($res[1]) / 1024 / 1024); echo '
' . $l->g(1379). ' :
' . $res; } if ($meminfo && preg_match("/MemAvailable: *([0-9]*)/", $meminfo, $res)) { $res = sprintf("%.2f Gio", intval($res[1]) / 1024 / 1024); echo '
' . $l->g(1378). ' :
' . $res; } $cpuinfo = @file_get_contents('/proc/cpuinfo'); if ($cpuinfo && preg_match("/model name(.*): (.*)\n/", $cpuinfo, $res)) { echo '
' . $l->g(1368). ' :
' . $res[2]; } // TODO: other distro $distro = false; foreach(array('/etc/debian_version', '/etc/redhat-release', '/etc/SuSE-release', '/etc/os-release') as $fic) { if (file_exists($fic)) { $distro = file_get_contents($fic); } } if ($distro) { echo '
' . $l->g(1373). ' :
' . $distro; } ?>

g(20)?>

g(1369)?> :
g(1370)?> :
g(1371)?> :
stype . ' version '. $info->vers; ?>

g(1367)?>

IP :
ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_snmp/000077500000000000000000000000001303466605000265405ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_snmp/ms_snmp.php000077500000000000000000000050631303466605000307340ustar00rootroot00000000000000'TAG', 'NAME_SNMP'=>'NAME', $l->g(352)=>'UPTIME', $l->g(95)=>'MACADDR', $l->g(34)=>'IPADDR', $l->g(1227)=>'CONTACT', $l->g(295) =>'LOCATION', $l->g(33) =>'DOMAIN', $l->g(66)=>'TYPE', $l->g(1228)=>'SNMPDEVICEID' ); $tab_options['FILTRE']=array_flip($list_fields); $tab_options['FILTRE']['NAME']=$l->g(49); asort($tab_options['FILTRE']); $list_fields['SUP']='ID'; $list_fields['CHECK']='ID'; $list_col_cant_del=array('SUP'=>'SUP','CHECK'=>'CHECK'); $default_fields= array('TAG'=>'TAG','NAME_SNMP'=>'NAME_SNMP',$l->g(34)=>$l->g(34),$l->g(95)=>$l->g(95)); $sql=prepare_sql_tab($list_fields,$list_col_cant_del); $tab_options['ARG_SQL']=$sql['ARG']; $queryDetails = $sql['SQL'].",ID from snmp s left join snmp_accountinfo s_a on s.id=s_a.snmp_id "; $tab_options['LBL_POPUP']['SUP']='NAME'; $tab_options['LBL']['SUP']=$l->g(122); $tab_options['LIEN_LBL']['NAME_SNMP']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_snmp_detail'].'&head=1&id='; $tab_options['LIEN_CHAMP']['NAME_SNMP']='ID'; $tab_options['LBL']['NAME_SNMP']=$l->g(49); ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); $img['image/delete.png']=$l->g(162); del_selection($form_name); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_snmp/ms_snmp_detail.php000077500000000000000000000145341303466605000322610ustar00rootroot00000000000000ID; // SNMP SUMMARY $lbl_affich=array('NAME'=>$l->g(49),'UPTIME'=>$l->g(352),'MACADDR'=>$l->g(95),'IPADDR'=>$l->g(34), 'CONTACT'=>$l->g(1227),'LOCATION'=>$l->g(295),'DOMAIN'=>$l->g(33),'TYPE'=>$l->g(66), 'SNMPDEVICEID'=>$l->g(1297),'SERIALNUMBER'=>$l->g(36),'COUNTER'=>$l->g(55), 'DESCRIPTION'=>$l->g(53),'LASTDATE'=>$l->g(46) ); $info['snmp']=$item['data']['snmp']; $first_tab=bandeau($info,$lbl_affich); unset($item['data']['snmp']); $second_tab=bandeau($item['data'],$lbl_affich,$item['lbl'],'mvt_bordure'); if ($first_tab) echo $first_tab; if ($second_tab) echo $second_tab; //get plugins when exist $Directory=PLUGINS_DIR."snmp_detail/"; $ms_cfg_file= $Directory."snmp_config.txt"; if (!isset($_SESSION['OCS']['DETAIL_SNMP'])){ if (file_exists($ms_cfg_file)) { $search=array('ORDER'=>'MULTI2','LBL'=>'MULTI','ISAVAIL'=>'MULTI'); $plugins_data=read_configuration($ms_cfg_file,$search); $_SESSION['OCS']['DETAIL_SNMP']['LIST_PLUGINS']=$plugins_data['ORDER']; $_SESSION['OCS']['DETAIL_SNMP']['LIST_LBL']=$plugins_data['LBL']; $_SESSION['OCS']['DETAIL_SNMP']['LIST_AVAIL']=$plugins_data['ISAVAIL']; } } $list_plugins=$_SESSION['OCS']['DETAIL_SNMP']['LIST_PLUGINS']; $list_lbl=$_SESSION['OCS']['DETAIL_SNMP']['LIST_LBL']; $list_avail=$_SESSION['OCS']['DETAIL_SNMP']['LIST_AVAIL']; foreach ($list_avail as $key=>$value){ $sql="select count(*) c from %s where SNMP_ID=%s"; $arg=array($value,$systemid); $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $valavail = mysqli_fetch_array($result); if ($valavail['c'] == 0) unset($list_lbl[$key]); } foreach ($list_lbl as $key=>$value){ if (substr($value,0,2) == 'g('){ unset($list_lbl[$key]); $list_lbl[$key]=$l->g(substr(substr($value,2),0,-1)); } } //par défaut, on affiche les données admininfo /*if (!isset($protectedGet['option'])){ $protectedGet['option']="cd_admininfo"; }*/ echo "
"; echo open_form($form_name); onglet($list_lbl,$form_name,"onglet_sd",10); $msq_tab_error='N/A'; echo '
'; if (isset($list_lbl[$protectedPost['onglet_sd']])){ if (file_exists($Directory."/".$protectedPost['onglet_sd']."/".$protectedPost['onglet_sd'].".php")){ // $protectedPost['computersectionrequest']=$protectedPost['onglet_sd']; include ($Directory."/".$protectedPost['onglet_sd']."/".$protectedPost['onglet_sd'].".php"); } } echo "
"; echo close_form(); if ($ajax){ ob_end_clean(); } /*$i=0; echo "

"; $nb_col=array(10,13,13); $j=0; $index_tab=0; //intitialisation du tableau de plugins $show_all=array(); while ($list_plugins[$i]){ unset($valavail); //vérification de l'existance des données if (isset($list_avail[$list_plugins[$i]])){ $sql_avail="select count(*) from ".$list_avail[$list_plugins[$i]]." where SNMP_ID=".$systemid; $resavail = mysqli_query( $sql_avail, $_SESSION['OCS']["readServer"]) or die(mysqli_error($_SESSION['OCS']["readServer"])); $valavail = mysqli_fetch_array($resavail); } if ($j == $nb_col[$index_tab]){ echo "
"; $index_tab++; $j=0; } //echo substr(substr($list_lbl[$list_plugins[$i]],2),0,-1); echo ""; $j++; $i++; } echo "
"; if (!isset($valavail[0]) or $valavail[0] != 0){ //liste de toutes les infos de la machine $show_all[]=$list_plugins[$i]; $href = ""; $fhref = ""; }else{ $href = ""; $fhref = ""; } echo $href."g(substr(substr($list_lbl[$list_plugins[$i]],2),0,-1)); else echo $list_lbl[$i]; echo "\" src='plugins/computer_detail/img/"; $list_plugins[$i]; if (isset($valavail[0]) and $valavail[0] == 0){ if (file_exists($Directory."/img/".$list_plugins[$i]."_d.png")) echo $list_plugins[$i]."_d.png"; else echo "cd_default_d.png"; } elseif ($protectedGet['option'] == $list_plugins[$i]){ if (file_exists($Directory."/img/".$list_plugins[$i]."_a.png")) echo $list_plugins[$i]."_a.png"; else echo "cd_default_a.png"; } else{ if (file_exists($Directory."/img/".$list_plugins[$i].".png")) echo $list_plugins[$i].".png"; else echo "cd_default.png"; } echo "'/>".$fhref."


";*/ /*if ($protectedGet['tout'] == 1){ $list_plugins_4_all=0; while (isset($show_all[$list_plugins_4_all])){ include ($Directory."/".$show_all[$list_plugins_4_all]."/".$show_all[$list_plugins_4_all].".php"); $list_plugins_4_all++; } }else{ if (file_exists($Directory."/".$protectedGet['option']."/".$protectedGet['option'].".php")) include ($Directory."/".$protectedGet['option']."/".$protectedGet['option'].".php"); } */ /*echo "
"; //if(!isset($protectedGet["tout"])) echo""; echo "
"; echo "
";*/ ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_snmp/require/000077500000000000000000000000001303466605000302145ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_snmp/require/function_snmp.php000077500000000000000000000135731303466605000336230ustar00rootroot00000000000000g(1215)=>'SNMP_BLADES',$l->g(1216)=>'SNMP_FIREWALLS',$l->g(1217)=>'SNMP_LOADBALANCERS', $l->g(79)=>'SNMP_PRINTERS',$l->g(1218)=>'SNMP_SWITCHINFOS',$l->g(729)=>'SNMP_COMPUTERS'); $snmp_tables=array('SNMP_ACCOUNTINFO','SNMP_CARDS','SNMP_CARTRIDGES','SNMP_CPUS','SNMP_DRIVES', 'SNMP_FANS','SNMP_INPUTS','SNMP_LOCALPRINTERS','SNMP_MEMORIES', 'SNMP_MODEMS','SNMP_NETWORKS','SNMP_PORTS','SNMP_POWERSUPPLIES','SNMP_SOFTWARES', 'SNMP_SOUNDS','SNMP_STORAGES','SNMP_SWITCHS','SNMP_TRAYS','SNMP_VIDEOS','SNMP_VIRTUALMACHINES'); $all_snmp_table=array_merge($snmp_tables_type,$snmp_tables); //is ID exist? function info_snmp($snmp_id){ global $l,$snmp_tables_type; if ($snmp_id == "" or !is_numeric($snmp_id)){ return $l->g(837); } //$arg=array(); $sql="select * from snmp where id=%s"; $arg=$snmp_id; $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $array['data']['snmp'] = mysqli_fetch_object($result); if ( $array['data']['snmp']->ID == ""){ return $l->g(837); }else{ foreach($snmp_tables_type as $lbl=>$table){ $sql="select * from %s where snmp_id=%s"; $arg=array(strtolower($table),$snmp_id); $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $array['data'][$table] = mysqli_fetch_object($result); if ($array['data'][$table] != '') $array['lbl']=$lbl; } return $array; } /*foreach($snmp_tables_type as $id=>$table){ $table_alias[]=$var.'.*'; $sql.= " left join %s %s on sn.id=%s.snmp_id "; array_push($arg,strtolower($table)); array_push($arg,$var); array_push($arg,$var); $var++; } $sql= "select ".implode(',',$table_alias).$sql." where sn.id = %s"; array_push($arg,$snmp_id);*/ } function subnet_name($systemid){ if (!is_numeric($systemid)) return false; $reqSub = "select NAME,NETID from subnet left join networks on networks.ipsubnet = subnet.netid where networks.status='Up' and hardware_id=".$systemid; $resSub = mysqli_query($_SESSION['OCS']["readServer"],$reqSub) or die(mysqli_error($_SESSION['OCS']["readServer"])); while($valSub = mysqli_fetch_object( $resSub )){ $returnVal[]=$valSub->NAME." (".$valSub->NETID.")"; } return $returnVal; } function print_item_header($text) { echo ""; echo ""; echo ""; echo ""; echo "
".mb_strtoupper($text)."
"; } function bandeau($data,$lbl_affich,$title='',$class='mlt_bordure'){ $nb_col=2; $data_exist=false; $show_table = "
"; if ($title != '') $show_table .= "".$title."

"; $show_table .= " "; $i=0; foreach ($data as $table=>$values){ if (is_object($values)){ foreach ($values as $field=>$field_value){ $data_exist=true; if (trim($field_value) != '' and $field != 'ID' and $field != 'SNMP_ID'){ if ($i == $nb_col){ $show_table .= ""; $i=0; } $show_table.= ""; $i++; } } } } $show_table.= "
 "; if (isset($lbl_affich[$field])) $show_table.= $lbl_affich[$field]; else $show_table.= $field; $show_table.= ": ".$field_value."

"; if ($data_exist) return $show_table; return false; } function deleteDid_snmp($id){ global $all_snmp_table; if (is_array($id)) $id_snmp=explode(',',$id); else $id_snmp=$id; //p($all_snmp_table); foreach ($all_snmp_table as $key=>$values){ $sql='delete from %s where snmp_id in '; $arg=array(strtolower($values)); $del_sql=mysql2_prepare($sql,$arg,$id_snmp,$nocot=true); mysql2_query_secure($del_sql['SQL'],$_SESSION['OCS']["writeServer"],$del_sql['ARG'],true); } $sql='delete from snmp where id in '; $del_sql=mysql2_prepare($sql,array(),$id_snmp,$nocot=true); mysql2_query_secure($del_sql['SQL'],$_SESSION['OCS']["writeServer"],$del_sql['ARG'],true); } /* * *Find all accountinfo for * snmp data * */ function admininfo_snmp($id = ""){ global $l; if (!is_numeric($id) and $id != "") return $l->g(400); $arg_account_data=array(); $sql_account_data="SELECT * FROM snmp_accountinfo "; if (is_numeric($id)){ $sql_account_data.= " WHERE snmp_id=%s"; $arg_account_data=array($id); }else $sql_account_data.= " LIMIT 1 "; $res_account_data=mysql2_query_secure($sql_account_data,$_SESSION['OCS']["readServer"],$arg_account_data); $val_account_data = mysqli_fetch_array( $res_account_data ); return $val_account_data; } function updateinfo_snmp($id,$values,$list=''){ global $l; if (!is_numeric($id) and $list == '') return $l->g(400); $arg_account_data=array(); $sql_account_data="UPDATE snmp_accountinfo SET "; foreach ($values as $field=>$val){ $sql_account_data .= " %s='%s', "; array_push($arg_account_data,$field); array_push($arg_account_data,$val); } $sql_account_data = substr($sql_account_data,0,-2); if (is_numeric($id) and $list == '') $sql_account_data.=" WHERE snmp_id=%s"; if ($list != '') $sql_account_data.=" WHERE snmp_id in (%s)"; array_push($arg_account_data,$id); mysql2_query_secure($sql_account_data,$_SESSION['OCS']["readServer"],$arg_account_data); return $l->g(1121); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_stats/000077500000000000000000000000001303466605000267215ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_stats/ms_stats.php000077500000000000000000000022131303466605000312700ustar00rootroot00000000000000g(1251)); echo open_form($form_name); $plugin=false; $stats=''; foreach ($_SESSION['OCS']['url_service']->getUrls() as $name=>$url){ if (substr($name,0,9) == 'ms_stats_' and $url['directory'] == 'ms_stats'){ $plugin=true; require_once($name.".php"); } } if ($plugin){ //Create the chart - Column 3D Chart with data from strXML variable using dataXML method show_tabs($data_on,$form_name,"onglet",4); echo '
'; echo $stats; echo "
"; }else msg_warning($l->g(1262)); echo close_form(); ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_stats/ms_stats_connexion.php000077500000000000000000000056141303466605000333600ustar00rootroot00000000000000g(1255); $data_on['BAD CONNEXION']=$l->g(1256); if (!isset($protectedPost['onglet'])) $protectedPost['onglet']='CONNEXION'; if ($protectedPost['onglet'] == 'CONNEXION' or $protectedPost['onglet'] == 'BAD CONNEXION') { $ms_cfg_file=$_SESSION['OCS']['LOG_DIR']."log.csv"; if (!is_readable($ms_cfg_file)){ return "NO_FILES"; } $fd = fopen ($ms_cfg_file, "r"); $max=0; $array_profil[7]=$l->g(1259); $array_profil[30]=$l->g(1260); $array_profil['ALL']=$l->g(215); if (!isset($protectedPost['REST'])) $protectedPost['REST']=7; $stats.= $l->g(1251). ": " .show_modif($array_profil,"REST",2,$form_name)."
"; if (isset($protectedPost['REST']) and $protectedPost['REST'] != 'ALL') $lastWeek = time() - ($protectedPost['REST'] * 24 * 60 * 60); //msg_error(time()."=>".$lastWeek); //echo date('d/m/Y', $lastWeek) ; while( !feof($fd) ) { $line = trim( fgets( $fd, 256 ) ); $trait=explode (';',$line); if ($trait[3]==$protectedPost['onglet']){ $h=explode(' ',$trait[1]); $time=explode('/',$h[0]); //echo mktime(0, 0, 0, $time[1], $time[0], $time[2])." => ".$lastWeek."
" ; if (mktime(0, 0, 0, $time[1], $time[0], $time[2])>= $lastWeek){ $find_connexion[$h[0]]=$find_connexion[$h[0]]+1; if ($find_connexion[$h[0]]>$max) $max=$find_connexion[$h[0]]; } } } fclose( $fd ); if (isset($find_connexion)){ $stats.= '
'; $stats.= ''; }else msg_warning($l->g(766)); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_stats/ms_stats_top.php000077500000000000000000000103511303466605000321540ustar00rootroot00000000000000g(800); if ($protectedPost['onglet'] == 'TOP'){ require_once('require/function_stats.php'); $stats=""; if (!isset($protectedPost['CHOICE_OP']) or $protectedPost['CHOICE_OP'] == "") $protectedPost['CHOICE_OP']='TOP_SOFT'; $array_option=array('NB_OS'=>$l->g(783),'TOP_SOFT'=>'top soft','NB_AGENTS'=>$l->g(784)); $stats.= $l->g(1251). ": " .show_modif($array_option,"CHOICE_OP",2,$form_name)."
"; if ($protectedPost['CHOICE_OP'] == 'TOP_SOFT'){ if (!isset($protectedPost['CHOICE_TOP']) or $protectedPost['CHOICE_TOP'] == "") $protectedPost['CHOICE_TOP']=10; // open file $tag=array(''=>'LIKE',''=>'=',''=>'NOT LIKE',''=>'!='); // read line if (is_readable($file_restriction_soft)){ $fp = fopen($file_restriction_soft, "r"); while ( $ln = fgets($fp, 1024)) { $ln=preg_replace('(\r\n|\n|\r|\t|)','',$ln); //foreach ($tag as $poub=>$key){ if (array_key_exists($ln,$tag)){ $index=$tag[$ln]; }elseif(substr($ln,0,2) == '5,10=>10,20=>20); $stats.= $l->g(55). ": " .show_modif($array_top,"CHOICE_TOP",2,$form_name)."
"; $sql="select count(id) c,name from softwares "; if (isset($data)){ $sql .= " where ("; $first=0; $j=0; foreach ($data as $k=>$v){ $i=0; while ($v[$i]){ $jonct=''; if(($k == 'LIKE' or $k == '=') and $first != 0 ){ $jonct=' OR '; $j++; }elseif($first != 0){ if ($j!=0) $jonct=') AND ('; else $jonct=' AND '; $j=0; } $sql .= $jonct." name ".$k." '%s'"; $arg[]=$v[$i]; $i++; $first++; } } $sql.= " ) "; } $sql.= " group by name order by count(id) DESC limit %s"; $arg[]=$protectedPost['CHOICE_TOP']; $height_legend=12*$protectedPost['CHOICE_TOP']; }elseif($protectedPost['CHOICE_OP'] == 'NB_OS'){ $sql="select count(osname) c,osname as name from hardware where osname != '' group by osname order by count(osname) DESC "; $height_legend=300; }elseif($protectedPost['CHOICE_OP'] == 'NB_AGENTS'){ $sql="select count(useragent) c,useragent as name from hardware where useragent != '' group by useragent order by count(useragent) DESC "; $height_legend=300; } $res =mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $i=0; while ($row=mysqli_fetch_object($res)){ $count_value[$i]=$row->c; $name_value[$i]=addslashes($row->name)."
(".$l->g(381).":".$row->c.")"; $legend[$i]=addslashes($row->name); if (isset($arr_FCColors[$i])) $color[$i]=$arr_FCColors[$i]; else $color[$i]=$arr_FCColors[$i-10]; $color[$i]="plotProps: {fill: \"".$color[$i]."\"}"; $i++; } if (isset($count_value)){ $stats.= '
'; $stats.= ''; $stats.= "
"; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_stats/ms_stats_top_soft.txt000077500000000000000000000001731303466605000332400ustar00rootroot00000000000000 OCS% Microsoft% Security Update% Update KB% ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/000077500000000000000000000000001303466605000277315ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/js/000077500000000000000000000000001303466605000303455ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/js/package-form.js000077500000000000000000000061111303466605000332410ustar00rootroot00000000000000(function($) { function addFieldError($field, errorMessage) { if (!$field.hasClass('field-has-errors')) { $field.addClass('field-has-errors'); $field.prepend($('
    ', {'class': 'field-error-list'})); } $field.find('.field-error-list').append($('
      ').text(errorMessage)); } function removeFieldErrors($field) { $field.removeClass('field-has-errors').find('.field-error-list').remove(); } $(document).ready(function() { var $form = $('form#create_pack'); if ($form.length) { // Handle input changes $form.find('input[name=OS]').change(function() { $form.find('.form-frame-user-messages').toggle(this.id == 'OS_WINDOWS'); }); $form.find('input[name=ACTION]').change(function() { $form.find('label[for=ACTION_INPUT]').html($form.find('.action-input-'+$(this).val()).html()); }); $form.find('#DEPLOY_SPEED').change(function() { if ($(this).val() == 'CUSTOM') { $form.find('#PRIORITY, #NB_FRAGS').prop('disabled', false); } else { $form.find('#PRIORITY, #NB_FRAGS').prop('disabled', true); } }); $form.find('#NOTIFY_USER').change(function() { $form.find('.notify-fields').toggle(this.checked); }); $form.find('#NEED_DONE_ACTION').change(function() { $form.find('.done-action-fields').toggle(this.checked); }); $form.find('#REDISTRIB_USE').change(function() { $form.find('.redistrib-fields').toggle(this.checked); }); // Handle file upload $form.find('#FILE').fileupload({ url: 'ajax.php'+window.location.search, dataType: 'json', done: function (e, data) { var fileData = data.result; $form.find('.package-progress-bar').hide().find('.progress-bar').css('width', '0%'); $form.find('input[type=submit]').attr('disabled', false); if (fileData.status == 'success') { // Display file info $form.find('.file-type span').text(fileData.type); $form.find('.file-size span').text(fileData.size); $form.find('.file-info').show(); } else { // Display error message addFieldError($form.find('.field-FILE'), fileData.message); $form.find('.file-field').show(); } }, fail: function (e, data) { addFieldError($form.find('.field-FILE'), 'An error has occurred during file upload'); $form.find('.file-field').show(); $form.find('.package-progress-bar').hide().find('.progress-bar').css('width', '0%'); $form.find('input[type=submit]').attr('disabled', false); }, progressall: function (e, data) { var progress = parseInt(data.loaded / data.total * 100, 10); $form.find('.package-progress-bar .progress-bar').css('width', progress+'%'); } }).change(function() { $form.find('.file-field').hide(); $form.find('.package-progress-bar').show(); $form.find('input[type=submit]').attr('disabled', true); removeFieldErrors($form.find('.field-FILE')); }); } }); }) (jQuery);ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/lib/000077500000000000000000000000001303466605000304775ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/lib/package_forms.php000077500000000000000000000051721303466605000340210ustar00rootroot00000000000000g(1391); } } // Check dropdown lists if (isset($data['OS']) and !in_array($data['OS'], array('WINDOWS', 'LINUX', 'MAC'))) { $errors['OS'] []= $l->g(1392); } if (isset($data['ACTION']) and !in_array($data['ACTION'], array('STORE', 'EXECUTE', 'LAUNCH'))) { $errors['ACTION'] []= $l->g(1392); } if (isset($data['DEPLOY_SPEED']) and !in_array($data['DEPLOY_SPEED'], array('LOW', 'MIDDLE', 'HIGH', 'CUSTOM'))) { $errors['DEPLOY_SPEED'] []= $l->g(1392); } // Check file upload if ($data['ACTION'] != 'EXECUTE' and (!isset($files['FILE']) or empty(trim($files['FILE']['name'])))) { $errors['FILE'] []= $l->g(1391); } // Check mandatory fields depending on others if ($data['DEPLOY_SPEED'] == 'CUSTOM') { $mandatory_fields = array('PRIORITY', 'NB_FRAGS'); foreach ($mandatory_fields as $field) { if (!isset($data[$field]) or empty(trim($data[$field]))) { $errors[$field] []= 'This field is mandatory'; } } } if ($data['OS'] == 'WINDOWS') { if ($data['NOTIFY_USER'] == 'on') { $mandatory_fields = array('NOTIFY_TEXT', 'NOTIFY_COUNTDOWN'); foreach ($mandatory_fields as $field) { if (!isset($data[$field]) or empty(trim($data[$field]))) { $errors[$field] []= $l->g(1391); } } } if ($data['NEED_DONE_ACTION'] == 'on') { if (!isset($data['NEED_DONE_ACTION_TEXT']) or empty(trim($data['NEED_DONE_ACTION_TEXT']))) { $errors['NEED_DONE_ACTION_TEXT'] []= $l->g(1391); } } } if ($data['REDISTRIB_USE'] == 'on') { if (!isset($data['DOWNLOAD_SERVER_DOCROOT']) or empty(trim($data['DOWNLOAD_SERVER_DOCROOT']))) { $errors['DOWNLOAD_SERVER_DOCROOT'] []= $l->g(1391); } } // Check unique fields if ($data['NAME'] and package_name_exists(trim($data['NAME']))) { $errors['NAME'] []= $l->g(1393); } return $errors; } ?>package_functions.php000077500000000000000000000036721303466605000346270ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/lib 0; } function get_package_info($timestamp) { $query = "SELECT FILEID, NAME, PRIORITY, FRAGMENTS, SIZE, OSNAME, COMMENT FROM download_available WHERE FILEID = %s"; $res = mysql2_query_secure($query, $_SESSION['OCS']['readServer'], $timestamp); return mysqli_fetch_assoc($res); } function get_redistrib_package_info($timestamp) { $query = "SELECT FILEID, NAME, PRIORITY, FRAGMENTS, SIZE, OSNAME, COMMENT FROM download_available" ." WHERE NAME LIKE '%%_redistrib' AND COMMENT LIKE '%%[PACK REDISTRIBUTION %s]%%'"; $res = mysql2_query_secure($query, $_SESSION['OCS']['readServer'], $timestamp); if (mysqli_num_rows($res)) { return mysqli_fetch_assoc($res); } else { return false; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_custom_pack.php000077500000000000000000000211761303466605000334630ustar00rootroot00000000000000g(601)); //activation options if ($protectedPost['MODIF'] != '' and isset($protectedPost['DWL_OPT']) and $protectedPost['DWL_OPT'] == "YES"){ $tab_hidden['SELECT']=$protectedPost['MODIF']; $tab_hidden['onglet']=$protectedPost['onglet']; $tab_hidden['rule_choise']=$protectedPost['rule_choise']; $action=array('REBOOT'=>$l->g(1311),'SHUTDOWN'=>$l->g(1310)); $min=array('00'=> '00','15'=>'15','30'=> '30','45'=>'45'); $hour=array('00'=>'00', '01'=>'01', '02'=>'02', '03'=>'03', '04'=>'04', '05'=>'05', '06'=>'06', '07'=>'07', '08'=>'08', '09'=>'09', '10'=>'10', '11'=>'11', '12'=>'12'); $i=0; while ($i<=1){ if ($i == 0) $am_pm=''; else $am_pm='pm'; foreach ($hour as $k=>$v){ foreach ($min as $km){ if ($am_pm=='' or ($am_pm == 'pm' and $k != '00' and $k != '12') ) $hour_min[$k.":".$km.$am_pm]=$am_pm." ".$k.":".$km; } } $i++; } // p($hour_min); $config['COMMENT_AFTER'][0]=datePick("INSTALL_DATE"); $config['JAVASCRIPT'][0]="READONLY ".dateOnClick("INSTALL_DATE"); $config['SELECT_DEFAULT'][0]=''; $config['SIZE'][0]='8'; $tab_name=array($l->g(1295),$l->g(1294),$l->g(443)); $name_field=array("INSTALL_DATE","INSTALL_HEURE","DOWNLOAD_POSTCMD"); $type_field=array(0,2,2); $value_field=array($protectedPost['INSTALL_DATE'],$hour_min,$action); if ($protectedGet['origine'] != 'group'){ array_push($tab_name,$l->g(1293)); array_push($name_field,"TELE_FORCE"); array_push($type_field,5); array_push($value_field,array('')); } $tab_typ_champ=show_field($name_field,$type_field,$value_field,$config); // p($tab_typ_champ); $tab_typ_champ[2]['CONFIG']['DEFAULT']='YES'; //$configinput['DEFAULT'] == "YES" tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $l->g(1309) )); }else{ if (isset($protectedPost['MODIF'])){ $protectedPost['SELECT']=$protectedPost['MODIF']; $protectedPost['Valid_modif']=true; } if ($protectedPost['SELECT'] != '' and isset($protectedPost['Valid_modif'])){ if (isset($protectedPost['TELE_FORCE_0'])) active_option('DOWNLOAD_FORCE',$list_id,$protectedPost['SELECT'],'1'); if (isset($protectedPost['INSTALL_DATE']) and $protectedPost['INSTALL_DATE'] != ''){ $date=explode('/',$protectedPost['INSTALL_DATE']); if ($l->g(269) == "%m/%d/%Y") $install_date=$date[2]."/".$date[0]."/".$date[1]." ".$protectedPost['INSTALL_HEURE']; else $install_date=$date[2]."/".$date[1]."/".$date[0]." ".$protectedPost['INSTALL_HEURE']; active_option('DOWNLOAD_SCHEDULE',$list_id,$protectedPost['SELECT'],$install_date); } if (isset($protectedPost['DOWNLOAD_POSTCMD']) and $protectedPost['DOWNLOAD_POSTCMD'] != ''){ active_option('DOWNLOAD_POSTCMD',$list_id,$protectedPost['SELECT'],$protectedPost['DOWNLOAD_POSTCMD']); } if ($protectedGet['origine'] == "group"){ $form_to_reload='config_group'; }elseif ($protectedGet['origine'] == "mach"){ $form_to_reload='config_mach'; } if ($protectedPost['onglet'] == 'MACH') $nb_affect=active_option('DOWNLOAD',$list_id,$protectedPost['SELECT']); if ($protectedPost['onglet'] == 'SERV_GROUP') $nb_affect=active_serv($list_id,$protectedPost['SELECT'],$protectedPost['rule_choise']); msg_success($nb_affect." ".$l->g(604)); if (isset($form_to_reload)){ //add this $var => not delete this package on computer detail $_SESSION['OCS']["justAdded"]=true; echo ""; } } if ($protectedPost['sens_'.$table_name] == "") $protectedPost['sens_'.$table_name]='DESC'; if ($protectedPost['onglet'] == "") $protectedPost['onglet'] = 'MACH'; $def_onglets['MACH']=$l->g(980); $def_onglets['SERV_GROUP']=$l->g(981); //show tab if ($list_id){ show_tabs($def_onglets,$form_name,'onglet',7); echo '
      '; //echo "
      "; if ($protectedPost['onglet'] == 'SERV_GROUP'){ $sql_rules="select distinct rule,rule_name from download_affect_rules order by 1"; $res_rules = mysqli_query($_SESSION['OCS']["readServer"] ,$sql_rules) or die(mysqli_error($_SESSION['OCS']["readServer"])); $nb_rule=0; while( $val_rules = mysqli_fetch_array($res_rules)) { $first=$val_rules['rule']; $list_rules[$val_rules['rule']]=$val_rules['rule_name']; $nb_rule++; } if ($nb_rule>1){ $select_choise=$l->g(668).show_modif($list_rules,'rule_choise',2,$form_name); echo $select_choise; }elseif($nb_rule == 1){ $protectedPost['rule_choise']=$first; echo ""; }elseif ($nb_rule == 0){ msg_error($l->g(982)); } } if ($protectedPost['onglet'] == 'MACH'){ echo $l->g(1292).show_modif(array('NO'=>$l->g(454),'YES'=>$l->g(455)),'DWL_OPT',2,$form_name); } if(($protectedPost['onglet'] == 'MACH' and $protectedPost['DWL_OPT'] != '') or ($protectedPost['onglet'] == 'SERV_GROUP' and $protectedPost['rule_choise'] != '')){ //recherche de toutes les règles pour les serveurs de redistribution $list_fields= array('FILE_ID'=>'e.FILEID', 'INFO_LOC'=>'e.INFO_LOC', 'CERT_FILE'=>'e.CERT_FILE', 'CERT_PATH'=>'e.CERT_PATH', // 'PACK_LOC'=>'de.PACK_LOC', $l->g(1037)=>'a.NAME', $l->g(1039)=>'a.PRIORITY', $l->g(51)=>'a.COMMENT', $l->g(274)=>'a.OSNAME', $l->g(953)." (KB)"=>'a.SIZE' ); if (!isset($nb_rule) or $nb_rule>0) { if ($protectedPost['onglet'] != 'SERV_GROUP'){ $list_fields['PACK_LOC']='e.PACK_LOC'; $list_fields['ACTIVE_ID']='e.ID'; $list_fields['MODIF']='e.ID'; }else{ $list_fields['ACTIVE_ID']='e.FILEID'; $list_fields['MODIF']='e.FILEID'; } } $default_fields= array($l->g(1037)=>$l->g(1037),$l->g(1039)=>$l->g(1039),$l->g(274)=>$l->g(274),$l->g(953)." (KB)"=>$l->g(953)." (KB)",'SELECT'=>'SELECT'); $list_col_cant_del=array($l->g(1037)=>$l->g(1037),'MODIF'=>'MODIF'); if ($protectedPost['onglet'] != 'SERV_GROUP'){ $default_fields['PACK_LOC']='PACK_LOC'; $list_col_cant_del['PACK_LOC']='PACK_LOC'; } //$querypack = 'SELECT '; if ($protectedPost['onglet'] == 'SERV_GROUP') $distinct=true; else $distinct=false; $sql=prepare_sql_tab($list_fields,array('SELECT'),$distinct); $sql['SQL'] .= " from download_available a, download_enable e "; if ($protectedPost['onglet'] == 'MACH') $sql['SQL'] .= "where a.FILEID=e.FILEID and e.SERVER_ID is null "; else $sql['SQL'] .= ", hardware h where a.FILEID=e.FILEID and h.id=e.group_id and e.SERVER_ID is not null "; if (isset($fileid_show) and $fileid_show != array()){ $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$fileid_show,true); } if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES"){ $sql['SQL'].=" and a.comment not like '%s'"; array_push($sql['ARG'],'%[VISIBLE=0]%'); } error_reporting(0); $tab_options['QUESTION']['SELECT']=$l->g(699); $tab_options['FILTRE']=array('e.FILEID'=>'Timestamp','a.NAME'=>$l->g(49)); $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['MODIF']['IMG']="image/prec16.png"; $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); } //echo "
      "; } } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_rules_redistrib.php000077500000000000000000000111241303466605000343440ustar00rootroot00000000000000g(673)); echo "
      "; //only for Super Admin //DEL RULE if ($protectedPost['SUP_PROF'] != ""){ delete_rule($protectedPost['SUP_PROF']); $tab_options['CACHE']='RESET'; } //ADD new rule if ($protectedPost['ADD_RULE']){ add_rule($protectedPost['RULE_NAME'],$protectedPost); $tab_options['CACHE']='RESET'; } //modif rule if ($protectedPost['MODIF_RULE']){ $name_exist=verify_name($protectedPost['RULE_NAME'],"and rule != ".$protectedPost['OLD_MODIF']); if ($name_exist == 'NAME_NOT_EXIST'){ delete_rule($protectedPost['OLD_MODIF']); add_rule($protectedPost['RULE_NAME'],$protectedPost,$protectedPost['OLD_MODIF']); echo msg_success($l->g(711)); $tab_options['CACHE']='RESET'; } else{ msg_error($l->g(670)); } } //form name $form_name = "rules"; //show all rules echo open_form($form_name); $list_fields= array('ID_RULE'=>'RULE', 'RULE_NAME'=>'RULE_NAME', 'SUP'=>'RULE', 'MODIF'=>'RULE', ); $table_name="DOWNLOAD_AFFECT_RULES"; $default_fields= array('ID_RULE'=>'ID_RULE','RULE_NAME'=>'RULE_NAME','SUP'=>'SUP','MODIF'=>'MODIF'); $list_col_cant_del=array('ID_RULE'=>'ID_RULE','SUP'=>'SUP','MODIF'=>'MODIF'); $sql=prepare_sql_tab($list_fields,array('SUP')); $sql['SQL'] .= " from download_affect_rules "; $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $result_exist= ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo "
      "; //Modif a rule => get this values if ($protectedPost['MODIF'] != "" and $protectedPost['OLD_MODIF'] != $protectedPost['MODIF']){ $sql="select priority,cfield,op,compto,rule_name from download_affect_rules where rule='%s' order by priority"; $arg=$protectedPost['MODIF']; $res = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg); $i=1; while ($val = mysqli_fetch_array( $res )){ $protectedPost['PRIORITE_'.$i]=$val['priority']; $protectedPost['CFIELD_'.$i]=$val['cfield']; $protectedPost['OP_'.$i]=$val['op']; $protectedPost['COMPTO_'.$i]=$val['compto']; $protectedPost['RULE_NAME']=$val['rule_name']; $i++; } $protectedPost['NUM_RULES']=$i-2; } //new rule if ($protectedPost['NEW_RULE'] or $protectedPost['NUM_RULES'] or $protectedPost['MODIF'] != ""){ if ($protectedPost['MODIF'] != "") $modif=$protectedPost['MODIF']; else $modif=$protectedPost['OLD_MODIF']; $numero=$protectedPost['NUM_RULES']+1; $tab_nom=$l->g(674)." ".show_modif($protectedPost['RULE_NAME'],"RULE_NAME","0"); $tab=""; $i=1; while($i<$numero+1){ if ($i==1) $entete='YES'; else $entete='NO'; $tab.=fields_conditions_rules($i,$entete); $i++; } echo $tab_nom; echo $tab; echo "
      "; echo "".$l->g(682)." ".$l->g(113)."

      "; if ($protectedPost['MODIF'] != "" or $protectedPost['OLD_MODIF'] != "") echo ""; else echo ""; echo ""; echo ""; echo ""; }else{ echo ""; } echo close_form(); }else{ msg_info($l->g(1182)); } if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_server_redistrib.php000077500000000000000000000143741303466605000345320ustar00rootroot00000000000000g(689)." ".$l->g(687); $ok=verification($verif); if (isset($ok)){ mysqli_query($_SESSION['OCS']["writeServer"],"delete from download_enable where SERVER_ID=".$_POST["supp"]); mysqli_query($_SESSION['OCS']["writeServer"], "delete from download_servers where hardware_id=".$_POST["supp"]); } } elseif ($_POST["supp"] == "ALL"){ $verif[0]['sql']="select fileid from download_enable,devices where download_enable.id=devices.ivalue and GROUP_ID=".$systemid; $verif[0]['condition']='EXIST'; $verif[0]['MSG_ERROR']=$l->g(688)." ".$l->g(690); $ok=verification($verif); if (isset($ok)){ mysqli_query($_SESSION['OCS']["writeServer"],"delete from download_enable where GROUP_ID=".$systemid) ; $sql="delete from download_servers where GROUP_ID = ".$systemid; mysqli_query($_SESSION['OCS']["writeServer"],$sql); } } } //Modif server's machine if (isset($_POST['Valid_modif']) and isset($_POST['modif']) and $_POST['modif'] != ""){ $default_values=look_config_default_values(array('DOWNLOAD_SERVER_URI','DOWNLOAD_SERVER_DOCROOT')); if (trim($_POST['URL']) == "") $_POST['URL']=$default_values['tvalue']['DOWNLOAD_SERVER_URI']; if (trim($_POST['REP_STORE']) == "") $_POST['REP_STORE']=$default_values['tvalue']['DOWNLOAD_SERVER_DOCROOT']; if ($_POST['modif'] != "ALL") { $sql= "update download_servers set URL='".$_POST['URL']."' ,ADD_REP='".$_POST['REP_STORE']."' where hardware_id=".$_POST['modif']; mysqli_query($_SESSION['OCS']["writeServer"],$sql); $sql= "update download_enable set pack_loc='".$_POST['URL']."' where SERVER_ID=".$_POST['modif']; mysqli_query($_SESSION['OCS']["writeServer"],$sql); }else { $sql="update download_servers set URL='".$_POST['URL']."' ,ADD_REP='".$_POST['REP_STORE']."' where GROUP_ID=".$systemid; mysqli_query($_SESSION['OCS']["writeServer"],$sql); $sql= "update download_enable set pack_loc='".$_POST['URL']."' where GROUP_ID=".$systemid; mysqli_query($_SESSION['OCS']["writeServer"],$sql); } } //view of all group's machin if (isset($systemid)) { if ($_POST['tri2'] == "") $_POST['tri2']=1; if (!(isset($_POST["pcparpage"])) and isset($_GET['res_pag'])) $_POST["pcparpage"]=$_GET['res_pag']; if (!(isset($_POST["page"])) and isset($_GET['page'])) $_POST["page"]=$_GET['page']; $form_name='nb_4_pag'; echo open_form($form_name); $limit=nb_page($form_name); $sql="select download_servers.HARDWARE_ID ID, hardware.NAME, hardware.IPADDR, hardware.DESCRIPTION, download_servers.URL, download_servers.ADD_REP from hardware right join download_servers on hardware.id=download_servers.hardware_id where download_servers.GROUP_ID=".$systemid." order by ".$_POST['tri2']." ".$_POST['sens']; $reqCount="select count(*) nb from (".$sql.") toto"; $resCount = mysqli_query($_SESSION['OCS']["readServer"],$reqCount); $valCount = mysqli_fetch_array($resCount); $sql.=" limit ".$limit["BEGIN"].",".$limit["END"]; $result = mysqli_query($_SESSION['OCS']["readServer"],$sql); $i=0; if ($_POST['sens'] == "ASC") $sens="DESC"; else $sens="ASC"; while($colname = mysqli_fetch_field($result)){ $col=$colname->name; $deb=""; $fin=""; $entete[$i++]=$deb.$col.$fin; } $entete[$i++]="SUP
      "; $entete[$i]="MODIF "; $i=0; //" du groupe ".$data[$_GET['viewmach']]['ID']. while($item = mysqli_fetch_object($result)){ $data2[$i]['ID']=$item ->ID; $data2[$i]['NAME']=$item ->NAME; $data2[$i]['IP_ADDR']=$item ->IPADDR; $data2[$i]['DESCRIPTION']=$item ->DESCRIPTION; $data2[$i]['URL']="http://".$item ->URL; $data2[$i]['REP_STORE']=$item ->ADD_REP; $data2[$i]['SUP']=""; if ($data2[$i]['IP_ADDR'] != "" ) $data2[$i]['MODIF']=""; else $data2[$i]['MODIF']=""; $i++; } $total=" (".$valCount['nb']." ".$l->g(652).")"; tab_entete_fixe($entete,$data2,$l->g(645).$total,"95","300"); show_page($valCount['nb'],$form_name); echo ""; echo ""; echo ""; echo ""; echo ""; echo close_form(); //detail of group's machin if ($_POST['modif']!="" and !isset($_POST['Valid_modif']) and !isset($_POST['Reset_modif'])) { $tab_name[1]=$l->g(646).": "; $tab_name[2]=$l->g(648).": "; $tab_typ_champ[1]['DEFAULT_VALUE']=substr($data2[$_POST['modif']]['URL'],7); $tab_typ_champ[1]['COMMENT_BEFORE']="http://"; $tab_typ_champ[1]['COMMENT_AFTER']="".$l->g(691).""; $tab_typ_champ[1]['INPUT_NAME']="URL"; $tab_typ_champ[1]['INPUT_TYPE']=0; $tab_typ_champ[2]['DEFAULT_VALUE']=$data2[$_POST['modif']]['REP_STORE']; $tab_typ_champ[2]['INPUT_NAME']="REP_STORE"; $tab_typ_champ[2]['INPUT_TYPE']=0; $tab_hidden["modif"]=$data2[$_POST['modif']]['ID']; $tab_hidden["pcparpage"]=$_POST['pcparpage']; $tab_hidden["page"]=$_POST['page']; $tab_hidden["old_pcparpage"]=$_POST['old_pcparpage']; if ($_POST['modif'] == "ALL"){ $tab_hidden["modif"]="ALL"; $title= $l->g(692); } else $title= $l->g(693)." ".$data2[$_POST['modif']]['NAME']; $comment=$l->g(694); tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $title, 'comment' => $comment )); } } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_speed_stat.php000077500000000000000000000077511303466605000333110ustar00rootroot00000000000000c; if ($total_mach<=0){ msg_error($l->g(837)); require_once(FOOTER_HTML); die(); } $sql="select d.hardware_id as id,d.comments as date_valid from devices d,download_enable d_e,download_available d_a where d.name='DOWNLOAD' and tvalue='%s' and comments is not null and d_e.id=d.ivalue and d_a.fileid=d_e.fileid and d_e.fileid='%s'"; $arg=array(urldecode($protectedGet['ta']),$protectedGet['stat']); $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $nb_4_hour=array(); //$total_mach=0; while($item = mysqli_fetch_object($result)){ //echo $item->date_valid."
      "; unset($data_temp,$day,$year,$hour_temp,$hour); $data_temp=explode(' ',$item->date_valid); if ($data_temp[2] != '') $day=$data_temp[2]; else $day=$data_temp[3]; $mouth=$data_temp[1]; if (isset($data_temp[5])) $year=$data_temp[5]; else $year=$data_temp[4]; // print_r($data_temp); // echo "=>".$year."
      "; $hour_temp=explode(':',$data_temp[3]); $hour=$hour_temp[0]; if ($hour<12) $hour=12; else $hour=00; $timestamp=mktime ($hour,0,0,$year_mouth[$mouth],$day,$year); if (isset($nb_4_hour[$timestamp])) $nb_4_hour[$timestamp]++; else $nb_4_hour[$timestamp]=1; //$total_mach++; } ksort($nb_4_hour); $i=0; foreach ($nb_4_hour as $key=>$value){ $ancienne+=$value; $data[$i]=round((($ancienne*100) / $total_mach),2); $legende[$i]=date ( "d/m/Y H:00" ,$key)."
      ".$data[$i]."%"; $i++; } if (isset($data) and count($data) != 1){ echo '
      '; echo '
      '; echo ''; echo "

      "; }else msg_warning($l->g(989)); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_activate.php000077500000000000000000000254111303466605000337600ustar00rootroot00000000000000g(465)); if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_ACTIVATE') == 'NO') $cant_active=false; else $cant_active=true; if ($_SESSION['OCS']['profile']->getRestriction('GUI') == 'YES'){ $restrict_computers=computer_list_by_tag('','ARRAY'); if ($restrict_computers == "ERROR"){ msg_error($l->g(893)); require_once(FOOTER_HTML); die(); } } $tab_options=$protectedPost; //only for profils who can activate packet if (!$cant_active){ if($protectedPost["SUP_PROF"] != "") { del_pack($protectedPost["SUP_PROF"]); $tab_options['CACHE']='RESET'; } //delete more than one packet if ($protectedPost['del_check'] != ''){ foreach (explode(",", $protectedPost['del_check']) as $key){ del_pack($key); $tab_options['CACHE']='RESET'; } } } if (!$protectedPost['SHOW_SELECT']){ $protectedPost['SHOW_SELECT']='download'; $tab_options['SHOW_SELECT']='download'; } echo "
      ".show_modif(array('download'=>$l->g(990),'server'=>$l->g(991)),'SHOW_SELECT',2,$form_name)."

      "; //only for profils who can activate packet if (!$cant_active){ //where packets are created? if ($protectedPost['SHOW_SELECT'] == 'download'){ $config_document_root="DOWNLOAD_PACK_DIR"; }else $config_document_root="DOWNLOAD_REP_CREAT"; $info_document_root=look_config_default_values($config_document_root); $document_root = $info_document_root["tvalue"][$config_document_root]; //if no directory in base, take $_SERVER["DOCUMENT_ROOT"] if (!isset($document_root)){ $document_root = VARLIB_DIR.'/download'; if ($protectedPost['SHOW_SELECT'] == "server") $document_root .="server/"; }else{ //can we have the zip? $document_root .= "/download"; } if (is_readable($document_root) && is_dir($document_root)){ $dir = @opendir($document_root); while($f = readdir($dir)){ if (is_numeric ($f)) $tab_options['SHOW_ONLY']['ZIP'][$f]=$f; } if (!$tab_options['SHOW_ONLY']['ZIP']) $tab_options['SHOW_ONLY']['ZIP']='NULL'; }else $tab_options['SHOW_ONLY']['ZIP']='NULL'; }else $tab_options['SHOW_ONLY']['ZIP']='NULL'; //only for profils who can activate packet if (!$cant_active){ //javascript for manual activate echo ""; } //$list_fields= array('Timestamp'=>'FILEID', $list_fields= array($l->g(475)=>'FILEID', $l->g(593)=>'from_unixtime(FILEID)', 'SHOWACTIVE'=>'NAME', $l->g(440)=>'PRIORITY', $l->g(464)=>'FRAGMENTS', $l->g(462)." KB"=>'round(SIZE/1024,2)', $l->g(25)=>'OSNAME', $l->g(53)=>'COMMENT'); $tab_options['REPLACE_COLUMN_KEY'][$l->g(593)]='CREADATE'; $tab_options['REPLACE_COLUMN_KEY'][$l->g(462)." KB"]='WEIGHT'; if ($show_stats){ $list_fields['NO_NOTIF']='NO_NOTIF'; $list_fields['NOTI']='NOTI'; $list_fields['SUCC']='SUCC'; $list_fields['ERR_']='ERR_'; //can't sort on this cols $tab_options['NO_TRI']['NOTI']=1; $tab_options['NO_TRI']['NO_NOTIF']=1; $tab_options['NO_TRI']['SUCC']=1; $tab_options['NO_TRI']['ERR_']=1; } //only for profils who can activate packet if (!$cant_active){ $list_fields['ZIP']='FILEID'; $list_fields['ACTIVE']='FILEID'; $list_fields['SUP']='FILEID'; $list_fields['CHECK']='FILEID'; $tab_options['LBL_POPUP']['SUP']='NAME'; } $list_fields['STAT']='FILEID'; $table_name="LIST_PACK"; $default_fields= array('Timestamp'=>'Timestamp', $l->g(593)=>$l->g(593), 'SHOWACTIVE'=>'SHOWACTIVE', 'CHECK'=>'CHECK','NOTI'=>'NOTI','SUCC'=>'SUCC', 'ERR_'=>'ERR_','SUP'=>'SUP','ACTIVE'=>'ACTIVE','STAT'=>'STAT','ZIP'=>'ZIP'); /*if ($show_stats){ $default_fields['NOTI']='NOTI'; $default_fields['SUCC']='SUCC'; $default_fields['ERR_']='ERR_'; }*/ $list_col_cant_del=array('SHOWACTIVE'=>'SHOWACTIVE','SUP'=>'SUP','ACTIVE'=>'ACTIVE','STAT'=>'STAT','ZIP'=>'ZIP','CHECK'=>'CHECK'); $querypack=prepare_sql_tab($list_fields,array('SELECT','ZIP','STAT','ACTIVE','SUP','CHECK','NO_NOTIF','NOTI','SUCC','ERR_')); $querypack['SQL'] .= " from download_available "; if ($protectedPost['SHOW_SELECT'] == 'download') $querypack['SQL'] .= " where (comment not like '%s' or comment is null or comment = '')"; else $querypack['SQL'] .= " where comment like '%s'"; array_push($querypack['ARG'],"[PACK REDISTRIBUTION%"); $arg_count=array("[PACK REDISTRIBUTION%"); if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'YES') == "YES" ){ $querypack['SQL'] .= " and comment not like '%s'"; array_push($querypack['ARG'],"%[VISIBLE=0]%"); array_push($arg_count,"%[VISIBLE=0]%"); } $tab_options['ARG_SQL']=$querypack['ARG']; $tab_options['ARG_SQL_COUNT']=$arg_count; //echo $querypack; $tab_options['LBL']=array('ZIP'=>"Archives", 'STAT'=>$l->g(574), 'ACTIVE'=>$l->g(431), 'SHOWACTIVE'=>$l->g(49), 'NO_NOTIF'=>$l->g(432), 'NOTI'=>$l->g(1000), 'SUCC'=>$l->g(572), 'ERR_'=>$l->g(344)); $tab_options['REQUEST']['STAT']='select distinct fileid AS FIRST from devices d,download_enable de where d.IVALUE=de.ID '; if ($restrict_computers){ $tab_options['REQUEST']['STAT'].= 'and d.hardware_id in '; $temp=mysql2_prepare($tab_options['REQUEST']['STAT'],array(),$restrict_computers); $tab_options['ARG']['STAT']=$temp['ARG']; $tab_options['REQUEST']['STAT']=$temp['SQL']; unset($temp); } $tab_options['FIELD']['STAT']='FILEID'; $tab_options['REQUEST']['SHOWACTIVE']='select distinct fileid AS FIRST from download_enable'; $tab_options['FIELD']['SHOWACTIVE']='FILEID'; //on force le tri desc pour l'ordre des paquets if (!$protectedPost['sens_'.$table_name]) $protectedPost['sens_'.$table_name]='DESC'; if ($show_stats){ $sql_data_fixe="select count(*) as %s,de.FILEID from devices d,download_enable de where d.IVALUE=de.ID and d.name='DOWNLOAD' and d.tvalue %s '%s' "; $sql_data_fixe_bis="select count(*) as %s,de.FILEID from devices d,download_enable de where d.IVALUE=de.ID and d.name='DOWNLOAD' and d.tvalue %s "; $sql_data_fixe_ter="select count(*) as %s,de.FILEID from devices d,download_enable de where d.IVALUE=de.ID and d.name='DOWNLOAD' and (d.tvalue %s '%s' or d.tvalue %s '%s') "; $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name]['ERR_']=array('ERR_','LIKE','ERR_%','LIKE','EXIT_CODE%'); $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name]['SUCC']=array('SUCC','LIKE','SUCCESS%'); $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name]['NOTI']=array('NOTI','LIKE','NOTI%'); $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name]['NO_NOTIF']=array('NO_NOTIF','IS NULL'); if ($restrict_computers){ $sql_data_fixe.=" and d.hardware_id in "; $sql_data_fixe_bis.=" and d.hardware_id in "; $sql_data_fixe_ter.=" and d.hardware_id in "; $temp=mysql2_prepare($sql_data_fixe,array(),$restrict_computers); $temp_bis=mysql2_prepare($sql_data_fixe_bis,array(),$restrict_computers); $temp_ter=mysql2_prepare($sql_data_fixe_ter,array(),$restrict_computers); } foreach($_SESSION['OCS']['ARG_DATA_FIXE'][$table_name] as $key=>$value){ if ($restrict_computers){ if ($key != 'NO_NOTIF' and $key != 'ERR_'){ $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key] = array_merge($_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key], $temp['ARG']); $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][$key] = $temp['SQL']." group by FILEID"; }elseif ($key == 'NO_NOTIF'){ $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key] = array_merge($_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key], $temp_bis['ARG']); $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][$key] = $temp_bis['SQL']." group by FILEID"; }elseif($key == 'ERR_'){ $_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key] = array_merge($_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key], $temp_ter['ARG']); $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][$key] = $temp_ter['SQL']." group by FILEID"; } }else{ if ($key != 'NO_NOTIF' and $key != 'ERR_') $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][$key]=$sql_data_fixe." group by FILEID"; elseif ($key == 'NO_NOTIF') $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][$key]=$sql_data_fixe_bis." group by FILEID"; elseif($key == 'ERR_') $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][$key]=$sql_data_fixe_ter." group by FILEID"; } } } $tab_options['COLOR']['ERR_']='RED'; $tab_options['COLOR']['SUCC']='GREEN'; $tab_options['COLOR']['NOTI']='GREY'; $tab_options['COLOR']['NO_NOTIF']='BLACK'; $tab_options['FILTRE']=array('FILEID'=>'Timestamp','NAME'=>$l->g(49)); $tab_options['TYPE']['ZIP']=$protectedPost['SHOW_SELECT']; $tab_options['FIELD_REPLACE_VALUE_ALL_TIME']='FILEID'; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $result_exist= ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //only for profils who can activate packet if (!$cant_active){ del_selection($form_name); if ($protectedPost['SHOW_SELECT'] == 'download'){ $config_input=array('MAXLENGTH'=>10,'SIZE'=>15); $activ_manuel=show_modif($protectedPost['manualActive'],'manualActive',0,'',$config_input); echo "".$l->g(476)."   ".$l->g(475).": ".$activ_manuel.""; echo ""; } } echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$querypack['SQL'],$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_actives.php000077500000000000000000000071671303466605000336260ustar00rootroot00000000000000getRestriction('TELEDIFF_ACTIVATE') == 'NO') $cant_active=false; else $cant_active=true; if (!$cant_active){ if ($protectedPost['DEL_ALL'] != ''){ $sql_listIDdel="select distinct ID from download_enable where FILEID=%s"; $arg_listIDdel=$protectedPost['DEL_ALL']; $res_listIDdel = mysql2_query_secure( $sql_listIDdel, $_SESSION['OCS']["readServer"], $arg_listIDdel); while( $val_listIDdel = mysqli_fetch_array( $res_listIDdel ) ) { $listIDdel[]=$val_listIDdel['ID']; } if ($listIDdel != ''){ foreach ($listIDdel as $k=>$v){ desactive_packet('',$v); } } mysql2_query_secure("DELETE FROM download_enable WHERE FILEID=%s", $_SESSION['OCS']["writeServer"],$protectedPost['DEL_ALL']); echo ""; } if ($protectedPost['SUP_PROF'] != ''){ desactive_packet('',$protectedPost['SUP_PROF']); mysql2_query_secure("DELETE FROM download_enable WHERE ID=%s", $_SESSION['OCS']["writeServer"],$protectedPost['SUP_PROF']); } } $sql_details="select distinct priority,fragments,size from download_available where fileid=%s"; $res_details = mysql2_query_secure( $sql_details, $_SESSION['OCS']["readServer"],$protectedGet['timestamp'] ); $val_details = mysqli_fetch_array( $res_details ) ; $tps="
      ".$l->g(992)." : ".tps_estimated($val_details).""; PrintEnTete( $l->g(481).$tps); echo "
      "; $form_name="tele_actives"; //ouverture du formulaire echo open_form($form_name); $list_fields= array($l->g(460)=>'e.ID', 'Timestamp'=>'e.FILEID', $l->g(470)=>'e.INFO_LOC', $l->g(471)=>'e.PACK_LOC', $l->g(49)=>'a.NAME', $l->g(440)=>'a.PRIORITY', $l->g(480)=>'a.FRAGMENTS', $l->g(462)=>'a.SIZE', $l->g(25)=>'a.OSNAME'); if (!$cant_active){ $list_fields['SUP']='e.ID'; } $table_name="LIST_ACTIVES"; $default_fields= $list_fields; $list_col_cant_del=array($l->g(460)=>$l->g(460),'SUP'=>'SUP'); $querypack = 'SELECT distinct '; foreach ($list_fields as $key=>$value){ if( $key != 'SUP') $querypack .= $value.','; } $querypack=substr($querypack,0,-1); $querypack .= " from download_enable e RIGHT JOIN download_available a ON a.fileid = e.fileid where e.FILEID=".$protectedGet['timestamp']; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $result_exist=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($result_exist != "" and !$cant_active) echo "g(900)."\");'>"; echo ""; echo close_form(); echo "
      ".$l->g(552)."
      "; if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$querypack,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_compress.php000077500000000000000000000034371303466605000340170ustar00rootroot00000000000000open($tmpfile, ZipArchive::CREATE); while($f = readdir($dir)) if(is_file($rep.$f)) $zipfile -> addFile( $rep.$f,$f ); $zipfile->close(); closedir($dir); readfile($tmpfile); unlink($tmpfile); exit(); exit(); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_modify.php000077500000000000000000000000721303466605000334430ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_package.php000077500000000000000000000550341303466605000335570ustar00rootroot00000000000000$value){ $temp_post[$key]=$value; } $protectedPost=$temp_post; if( isset( $protectedPost["VALID_END"] ) ) { //configure description of this package $description_details=$protectedPost['DESCRIPTION']; if (isset($protectedPost['TYPE_PACK']) and $protectedPost['TYPE_PACK'] != '') $description_details .= " [Type=".$protectedPost['TYPE_PACK']."]"; if (isset($protectedPost['VISIBLE']) and $protectedPost['VISIBLE'] != '') $description_details .= " [VISIBLE=".$protectedPost['VISIBLE']."]"; $sql_details=array('document_root'=>$protectedPost['document_root'], 'timestamp'=>$protectedPost['timestamp'], 'nbfrags'=>$protectedPost["nbfrags"], 'name'=>$protectedPost['NAME'], 'os'=>$protectedPost['OS'], 'description'=>$description_details, 'size'=>$protectedPost['SIZE'], 'id_wk'=>$protectedPost['LIST_DDE_CREAT']); $info_details=array('PRI'=>$protectedPost['PRIORITY'], 'ACT'=>$protectedPost['ACTION'], 'DIGEST'=>$protectedPost['digest'], 'PROTO'=>$protectedPost['PROTOCOLE'], 'DIGEST_ALGO'=>$protectedPost["digest_algo"], 'DIGEST_ENCODE'=>$protectedPost["digest_encod"], 'PATH'=>$protectedPost['ACTION_INPUT'], 'NAME'=>$protectedPost['ACTION_INPUT'], 'COMMAND'=>$protectedPost['ACTION_INPUT'], 'NOTIFY_USER'=>$protectedPost['NOTIFY_USER'], 'NOTIFY_TEXT'=>$protectedPost['NOTIFY_TEXT'], 'NOTIFY_COUNTDOWN'=>$protectedPost['NOTIFY_COUNTDOWN'], 'NOTIFY_CAN_ABORT'=>$protectedPost['NOTIFY_CAN_ABORT'], 'NOTIFY_CAN_DELAY'=>$protectedPost['NOTIFY_CAN_DELAY'], 'NEED_DONE_ACTION'=>$protectedPost['NEED_DONE_ACTION'], 'NEED_DONE_ACTION_TEXT'=>$protectedPost['NEED_DONE_ACTION_TEXT'], 'GARDEFOU'=>"rien"); create_pack($sql_details,$info_details); if ($protectedPost['REDISTRIB_USE'] == 1){ $timestamp_redistrib= time(); $server_dir=$protectedPost['download_rep_creat']; //create zip file for redistribution servers $zipfile = new ZipArchive(); $rep = $protectedPost['document_root'].$sql_details['timestamp']."/"; if (!file_exists($server_dir)){ mkdir($server_dir); } if (!file_exists($server_dir.$timestamp_redistrib)){ mkdir($server_dir.$timestamp_redistrib); } $zipfile->open($server_dir.$timestamp_redistrib."/".$timestamp_redistrib."_redistrib.zip", ZipArchive::CREATE); $zipfile->addEmptyDir($sql_details['timestamp']); $dir = opendir($rep); while($f = readdir($dir)){ if(is_file($rep.$f)){ $zipfile -> addFile($rep.$f,$sql_details['timestamp']."/".basename($rep.$f)); } } $zipfile -> close(); closedir($dir); flush(); //crypt the file $digest=crypt_file($server_dir.$timestamp_redistrib."/".$timestamp_redistrib."_redistrib.zip",$protectedPost["digest_algo"],$protectedPost["digest_encod"]); //change name of this file to "tmp" for use function of create a package rename($server_dir.$timestamp_redistrib."/".$timestamp_redistrib."_redistrib.zip", $server_dir.$timestamp_redistrib."/tmp"); //create temp file $fSize = filesize( $server_dir.$timestamp_redistrib."/tmp"); $sql_details=array('document_root'=>$server_dir, 'timestamp'=>$timestamp_redistrib, 'nbfrags'=>$protectedPost['nbfrags_redistrib'], 'name'=>$protectedPost['NAME'].'_redistrib', 'os'=>$protectedPost['OS'], 'description'=>'[PACK REDISTRIBUTION '.$protectedPost['timestamp'].']', 'size'=>$fSize, 'id_wk'=>$protectedPost['LIST_DDE_CREAT']); $info_details=array('PRI'=>$protectedPost['REDISTRIB_PRIORITY'], 'ACT'=>'STORE', 'DIGEST'=>$digest, 'PROTO'=>$protectedPost['PROTOCOLE'], 'DIGEST_ALGO'=>$protectedPost["digest_algo"], 'DIGEST_ENCODE'=>$protectedPost["digest_encod"], 'PATH'=>$protectedPost['DOWNLOAD_SERVER_DOCROOT'], 'NAME'=>'', 'COMMAND'=>'', 'NOTIFY_USER'=>'0', 'NOTIFY_TEXT'=>'', 'NOTIFY_COUNTDOWN'=>'', 'NOTIFY_CAN_ABORT'=>'0', 'NOTIFY_CAN_DELAY'=>'0', 'NEED_DONE_ACTION'=>'0', 'NEED_DONE_ACTION_TEXT'=>'', 'GARDEFOU'=>"rien"); create_pack($sql_details,$info_details); } unset($protectedPost,$_SESSION['OCS']['DATA_CACHE']); } $lign_begin=""; $td_colspan2=":"; $lign_end=""; $form_name="create_pack"; echo open_form($form_name,'',"enctype='multipart/form-data'"); if (isset($protectedPost['valid'])){ looking4config(); //file exist if (file_exists($_FILES["teledeploy_file"]["tmp_name"]) && is_readable($_FILES["teledeploy_file"]["tmp_name"]) && filesize($_FILES["teledeploy_file"]["tmp_name"]) > 0){ //is it a zip file or TAR.GZ file? $name_file_extention=explode('.',$_FILES["teledeploy_file"]["name"]); $extention=array_pop($name_file_extention); if (strtoupper($extention) != "ZIP" and strtoupper($extention) != "GZ"){ $error=$l->g(1231); //ok }elseif(strtoupper($extention) == "GZ" and strtoupper(array_pop($name_file_extention)) != "TAR"){ $error=$l->g(1232); } } //file not exist else{ if ($protectedPost['ACTION'] != 'EXECUTE') $error=$l->g(436)." ".$_FILES["teledeploy_file"]["tmp_name"]; } //the package name is exist in database? $verifN = "SELECT fileid FROM download_available WHERE name='%s'"; $argverifN=$protectedPost["NAME"]; $resN = mysql2_query_secure( $verifN, $_SESSION['OCS']["readServer"], $argverifN); if( mysqli_num_rows( $resN ) != 0 ) $error=$l->g(551); if ($error){ msg_error($error); unset($protectedPost['valid']); } else{ //some fields are empty? echo ""; //get the file if (!($_FILES["teledeploy_file"]["size"]== 0 and $protectedPost['ACTION'] == 'EXECUTE')){ $size = filesize($_FILES["teledeploy_file"]["tmp_name"]); //crypt the file $digest=crypt_file($_FILES["teledeploy_file"]["tmp_name"],$protectedPost["digest_algo"],$protectedPost["digest_encod"]); //create temp file creat_temp_file($protectedPost['document_root'].$protectedPost['timestamp'],$_FILES["teledeploy_file"]["tmp_name"]); } $digName = $protectedPost["digest_algo"]. " / ".$protectedPost["digest_encod"]; $title_creat="".$l->g(435)." "."[".$protectedPost['NAME']."]"; $name_file=$lign_begin.$l->g(446).$td_colspan2.$_FILES["teledeploy_file"]["name"].$lign_end; $ident=$lign_begin.$l->g(460).$td_colspan2.$protectedPost['timestamp'].$lign_end; $view_digest=$lign_begin.$l->g(461)." ".$digName.$td_colspan2.$digest.$lign_end; $total_ko=$lign_begin.$l->g(462).$td_colspan2.round($size/1024)." ".$l->g(516).$lign_end; //create the field of the frag's size $taille_frag=$lign_begin.$l->g(463).$td_colspan2; $taille_frag.= input_pack_taille("tailleFrag","nbfrags",round($size),'8',round($size/1024)); $taille_frag.=$l->g(516).$lign_end; $tps=$lign_begin.$l->g(1002).$td_colspan2; $tps.= time_deploy(); $tps.=$lign_end; //create the field of the frag number $nb_frag=$lign_begin.$l->g(464).$td_colspan2; $nb_frag.= input_pack_taille("nbfrags","tailleFrag",round($size),'5','1'); $nb_frag.=$lign_end; echo ""; echo $title_creat.$name_file.$ident.$view_digest.$total_ko.$taille_frag.$nb_frag.$tps; $java_script="verif2();"; if($protectedPost['REDISTRIB_USE'] == 1){ $title_creat_redistrib=""; $taille_frag_redistrib=$lign_begin.$l->g(463).$td_colspan2; $taille_frag_redistrib.= input_pack_taille("tailleFrag_redistrib","nbfrags_redistrib",round($size),'8',round($size/1024)); $taille_frag_redistrib.=$l->g(516).$lign_end; $nb_frag_redistrib=$lign_begin.$l->g(464).$td_colspan2; $nb_frag_redistrib.= input_pack_taille("nbfrags_redistrib","tailleFrag_redistrib",round($size),'5','1'); $nb_frag_redistrib.=$lign_end; echo $title_creat_redistrib.$taille_frag_redistrib.$nb_frag_redistrib; $java_script="verif_redistributor();"; } echo "
      ".$l->g(1003)."
      "; echo "
      "; echo ""; echo ""; echo ""; } } //check default values $default_value=array('OS'=>'WINDOWS', 'PROTOCOLE'=>'HTTP', 'PRIORITY'=>'5', 'ACTION'=>'STORE', 'REDISTRIB_PRIORITY'=>'5'); if (!$protectedPost){ //get timestamp $protectedPost['timestamp'] = time(); foreach ($default_value as $key=>$value) $protectedPost[$key]=$value; $val_document_root=look_config_default_values(array('DOWNLOAD_PACK_DIR')); if (isset($val_document_root["tvalue"]['DOWNLOAD_PACK_DIR'])) $document_root = $val_document_root["tvalue"]['DOWNLOAD_PACK_DIR']."/download/"; else{ //if no directory in base, take $_SERVER["DOCUMENT_ROOT"] $document_root = VARLIB_DIR.'/download/'; } $rep_exist=file_exists($document_root); //create directory if it's not exist if (!$rep_exist){ $creat=@mkdir($document_root); if (!$creat){ msg_error($document_root."
      ".$l->g(1004).".
      ".$l->g(1005)); return; } } //apache user can be write in this directory? $rep_ok=is_writable ($document_root); if (!$rep_ok){ msg_error($l->g(1007)." ".$document_root." ".$l->g(1004).".
      ".$l->g(1005)); return; } $protectedPost['document_root']=$document_root; } echo " "; echo ""; echo "
      "; printEnTete($l->g(434)); echo "
      "; $config_input=array('MAXLENGTH'=>255,'SIZE'=>50); $title_creat="".$l->g(438).""; $title_user="".$l->g(447).""; $title_redistrib="".$l->g(628).""; $list_os['WINDOWS']="WINDOWS"; $list_os['LINUX']="UNIX/LINUX"; $list_os['MAC']="MACOS"; $list_proto['HTTP']="HTTP"; $i=0; while ($i<10){ $list_prio["$i"]="$i"; $i++; } $list_action['STORE']=$l->g(457); $list_action['EXECUTE']=$l->g(456); $list_action['LAUNCH']=$l->g(458); $yes_no['0']=$l->g(454); $yes_no['1']=$l->g(455); $sous_tab_beg="
      "; $sous_tab_end="
      "; $nom= $lign_begin.$l->g(49).$td_colspan2.show_modif($protectedPost['NAME'],'NAME',$NAME_TYPE,'',$config_input).$lign_end; $descr=$lign_begin.$l->g(53).$td_colspan2.show_modif($protectedPost['DESCRIPTION'],'DESCRIPTION',$DESCRIPTION_TYPE).$lign_end; if (!isset($protectedPost['VISIBLE'])) $protectedPost['VISIBLE']=1; $visible=$lign_begin.$l->g(52).$td_colspan2.show_modif($yes_no,'VISIBLE',2,"",$configinput['DEFAULT'] = "NO").$lign_end; $os=$lign_begin.$l->g(25).$td_colspan2.champ_select_block($list_os,'OS',array('OS'=>'WINDOWS')).$lign_end; $proto=$lign_begin.$l->g(439).$td_colspan2.show_modif($list_proto,'PROTOCOLE',2,'').$lign_end; $prio=$lign_begin.$l->g(440).$td_colspan2.show_modif($list_prio,'PRIORITY',2,'').$lign_end; $file=$lign_begin.$l->g(549).$td_colspan2."".$lign_end; $action=$lign_begin.$l->g(443).":".champ_select_block($list_action,'ACTION',array('EXECUTE_div','STORE_div','LAUNCH_div'))."
      ".$l->g(445).":
      ".show_modif($protectedPost['ACTION_INPUT'],'ACTION_INPUT',0,'',$configinput=array('MAXLENGTH'=>1000,'SIZE'=>30)).$lign_end; $notify_user="".$l->g(448).":".champ_select_block($yes_no,'NOTIFY_USER',array('NOTIFY_USER'=>1)).$lign_end; $redistrib="".$l->g(1008).":".champ_select_block($yes_no,'REDISTRIB_USE',array('REDISTRIB_USE'=>1)).$lign_end; echo ""; echo $title_creat.$nom.$descr; if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'NO') == "NO" ) echo $visible; echo $os.$proto.$prio.$file.$action; //redistrib if ($_SESSION['OCS']["use_redistribution"] == 1){ echo $title_redistrib.$redistrib; $sql="select NAME,TVALUE from config where NAME ='DOWNLOAD_REP_CREAT' union select NAME,TVALUE from config where NAME ='DOWNLOAD_SERVER_DOCROOT'"; $resdefaultvalues = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"]); while($item = mysqli_fetch_object($resdefaultvalues)) $default[$item ->NAME]=$item ->TVALUE; if (!$default['DOWNLOAD_REP_CREAT']) $default['DOWNLOAD_REP_CREAT'] = $_SERVER["DOCUMENT_ROOT"]."/download/server/"; /* if (!$protectedPost['REDISTRIB_REP']) $protectedPost['REDISTRIB_REP']=$default['DOWNLOAD_REP_CREAT'];*/ if (!$protectedPost['REDISTRIB_PRIORITY']) $protectedPost['REDISTRIB_PRIORITY']=$default['DOWNLOAD_PRIORITY']; if (!$protectedPost['DOWNLOAD_SERVER_DOCROOT']) $protectedPost['DOWNLOAD_SERVER_DOCROOT']=$default['DOWNLOAD_SERVER_DOCROOT']; $redistrib_rep=$lign_begin.$l->g(829).$td_colspan2.$default['DOWNLOAD_REP_CREAT'].$lign_end; $config_input=array('MAXLENGTH'=>255,'SIZE'=>25); $redistrib_rep_distant=$lign_begin.$l->g(1009).$td_colspan2.show_modif($protectedPost['DOWNLOAD_SERVER_DOCROOT'],'DOWNLOAD_SERVER_DOCROOT','0','',$config_input).$lign_end; //$redistrib_rep_distant=$lign_begin.$l->g(1009).$td_colspan2.$default['DOWNLOAD_SERVER_DOCROOT'].$lign_end; $redistrib_prio=$lign_begin.$l->g(440).$td_colspan2.show_modif($list_prio,'REDISTRIB_PRIORITY',2,'').$lign_end; echo ""; echo ""; echo "
      "; echo $sous_tab_beg; echo $redistrib_rep.$redistrib_rep_distant.$redistrib_prio; echo $sous_tab_end; echo "
      "; } //affichage de cette partie que si on est dans un systeme windows echo "
      "; echo "
      "; echo ""; echo $title_user.$notify_user; $notify_txt=$lign_begin.$l->g(449).$td_colspan2.show_modif($_POST['NOTIFY_TEXT'],'NOTIFY_TEXT',1).$lign_end; $notify_count_down=$lign_begin.$l->g(450).$td_colspan2.show_modif($protectedPost['NOTIFY_COUNTDOWN'],'NOTIFY_COUNTDOWN',0,'',array('MAXLENGTH'=>4,'SIZE'=>4,'JAVASCRIPT'=>$chiffres)).$l->g(511).$lign_end; $notify_can_abord=$lign_begin.$l->g(451).$td_colspan2.show_modif($yes_no,'NOTIFY_CAN_ABORT',2).$lign_end; $notify_can_delay=$lign_begin.$l->g(452).$td_colspan2.show_modif($yes_no,'NOTIFY_CAN_DELAY',2).$lign_end; echo ""; $need_done_action=""; echo "
      "; echo $sous_tab_beg; echo $notify_txt.$notify_count_down.$notify_can_abord.$notify_can_delay; echo $sous_tab_end; echo "
      ".$l->g(453).":".champ_select_block($yes_no,'NEED_DONE_ACTION',array('NEED_DONE_ACTION'=>1)).$lign_end; echo $need_done_action; $need_done_action_txt=$lign_begin.$l->g(449).$td_colspan2.show_modif($_POST['NEED_DONE_ACTION_TEXT'],'NEED_DONE_ACTION_TEXT',1).$lign_end; echo "
      "; echo $sous_tab_beg; echo $need_done_action_txt; echo $sous_tab_end; echo "
      "; echo "
      "; echo " "; // "; echo close_form(); echo "
      "; ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_package_new.php000077500000000000000000000130271303466605000344240ustar00rootroot00000000000000 null, 'DESCRIPTION' => null, 'OS' => 'WINDOWS', 'ACTION' => 'STORE', 'ACTION_INPUT' => null, 'DEPLOY_SPEED' => 'MIDDLE', 'PRIORITY' => 5, 'NB_FRAGS' => null, 'NOTIFY_USER' => null, 'NOTIFY_TEXT' => null, 'NOTIFY_COUNTDOWN' => null, 'NOTIFY_CAN_CANCEL' => null, 'NOTIFY_CAN_DELAY' => null, 'NEED_DONE_ACTION' => null, 'NEED_DONE_ACTION_TEXT' => null, 'REDISTRIB_USE' => null, 'REDISTRIB_PRIORITY' => 5, 'REDISTRIB_NB_FRAGS' => null, 'DOWNLOAD_SERVER_DOCROOT' => get_redistrib_distant_download_root(), ), $_POST); $form_data['TIMESTAMP'] = $timestamp; $errors = array(); if (isset($_POST['create_package'])) { require_once 'lib/package_forms.php'; // Perform validation $errors = validate_package_form($form_data, $_FILES); if (!$errors) { require_once('require/function_telediff.php'); // Create package $sql_details = array( 'document_root' => get_download_root(), 'timestamp' => $timestamp, 'nbfrags' => $form_data['NB_FRAGS'], 'name' => $form_data['NAME'], 'os' => $form_data['OS'], 'description' => $form_data['DESCRIPTION'], 'size' => 0,//$form_data['SIZE'], 'id_wk' => 0//$form_data['LIST_DDE_CREAT'] ); $info_details = array( 'PRI' => $form_data['PRIORITY'], 'ACT' => $form_data['ACTION'], 'DIGEST' => 'TODO',//$form_data['digest'], 'PROTO' => 'HTTP',//$protectedPost['PROTOCOLE'], 'DIGEST_ALGO' => 'MD5',//["digest_algo"], 'DIGEST_ENCODE' => 'HEXA',//$protectedPost["digest_encod"], 'PATH' => $form_data['ACTION_INPUT'], 'NAME' => $form_data['ACTION_INPUT'], 'COMMAND' => $form_data['ACTION_INPUT'], 'NOTIFY_USER' => $form_data['NOTIFY_USER'], 'NOTIFY_TEXT' => $form_data['NOTIFY_TEXT'], 'NOTIFY_COUNTDOWN' => $form_data['NOTIFY_COUNTDOWN'], 'NOTIFY_CAN_ABORT' => $form_data['NOTIFY_CAN_ABORT'], 'NOTIFY_CAN_DELAY' => $form_data['NOTIFY_CAN_DELAY'], 'NEED_DONE_ACTION' => $form_data['NEED_DONE_ACTION'], 'NEED_DONE_ACTION_TEXT' => $form_data['NEED_DONE_ACTION_TEXT'], 'GARDEFOU' => 'rien' ); create_pack($sql_details, $info_details); } } if ($errors or !isset($_POST['create_package'])) { require_once 'views/package_form_view.php'; show_package_form($form_data, $errors); } } } // If the package has been created, show the details of the package if (package_exists($timestamp)) { $form_data = array(); $errors = array(); require_once 'views/activate_form_view.php'; show_activate_form($timestamp, $form_data, $errors); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_popup_active.php000077500000000000000000000130251303466605000346540ustar00rootroot00000000000000"; if (!$httpsOk) $error .= $l->g(466)." https://".$protectedPost["HTTPS_SERV"]."/".$protectedGet["active"]."/
      "; else fclose( $httpsOk ); if ($protectedPost['choix_activ'] == "MAN"){ $reqFrags = "SELECT fragments FROM download_available WHERE fileid='".$protectedGet["active"]."'"; $resFrags = mysqli_query($_SESSION['OCS']["readServer"], $reqFrags); $valFrags = mysqli_fetch_array( $resFrags ); $fragAvail = ($valFrags["fragments"] > 0) ; if( $fragAvail ){ $fragOk = @fopen("http://".$protectedPost["FILE_SERV"]."/".$protectedGet["active"]."/".$protectedGet["active"]."-1", "r"); } else $fragOk = true; }else $fragOk = true; if (!$fragOk){ $error .= $l->g(467)." http://".$protectedPost['FILE_SERV']."/".$protectedGet["active"]."/
      "; } elseif( $fragAvail ) fclose( $fragOk ); if (! $fragOk or ! $httpsOk){ $error .= "
      ".$l->g(468)."

      "; $error .= "   "; } if ($error != '') msg_warning($error); } if ($error == "" and isset($protectedPost['Valid_modif']) or isset($protectedPost['YES'])){ if ($protectedPost['choix_activ'] == "MAN"){ activ_pack($protectedGet["active"],$protectedPost["HTTPS_SERV"],$protectedPost['FILE_SERV']); } if ($protectedPost['choix_activ'] == "AUTO"){ activ_pack_server($protectedGet["active"],$protectedPost["HTTPS_SERV"],$protectedPost['FILE_SERV_REDISTRIB']); } echo ""; } if ($_SESSION['OCS']["use_redistribution"] == 1){ $list_choise['MAN']=$l->g(650); $list_choise['AUTO']=$l->g(649); $choix_activ=$l->g(514).' : '.show_modif($list_choise,'choix_activ',2,$form_name)."
      "; echo $choix_activ; }else{ $protectedPost['choix_activ']= "MAN"; echo ""; } echo "
      "; if (isset($protectedPost['choix_activ']) and $protectedPost['choix_activ'] != ''){ if ($protectedPost['choix_activ'] == "MAN"){ $tab_name=array($l->g(471),$l->g(470)); $name_field=array("FILE_SERV","HTTPS_SERV"); $type_field=array(0,0); $value_field=array($protectedPost['FILE_SERV'],$protectedPost['HTTPS_SERV']); }else{ if (count($groupListServers) == 0) msg_error($l->g(660)); else{ $tab_name=array($l->g(651),$l->g(470)); $name_field=array("FILE_SERV_REDISTRIB","HTTPS_SERV"); $type_field=array(2,0); $value_field=array($groupListServers,$protectedPost['HTTPS_SERV']); } } if (isset($name_field)){ $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=30; if ($tab_typ_champ[$id]['INPUT_TYPE'] == 0){ $tab_typ_champ[$id]['COMMENT_AFTER']='/'.$protectedGet["active"]; if ($id == 0) $tab_typ_champ[$id]['COMMENT_BEFORE']='http://'; else $tab_typ_champ[$id]['COMMENT_BEFORE']='https://'; } } tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $l->g(465).' => '.$info_id['NAME']." (".$protectedGet["active"].")" )); } } //var_dump($tab_typ_champ); //fermeture du formulaire. echo close_form(); }else msg_error($info_id['ERROR']); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/ms_tele_stats.php000077500000000000000000000156001303466605000333150ustar00rootroot00000000000000getConfigValue('TELEDIFF')=="YES" and isset($protectedPost["ACTION"]) and $protectedPost["ACTION"] != ''){ if( $protectedPost["ACTION"] == "VAL_SUCC") { $result_line_delete=find_device_line('SUCCESS%',$protectedGet["stat"]); } if( $protectedPost["ACTION"] == "DEL_ALL") { $result_line_delete=find_device_line('NOTNULL',$protectedGet["stat"]); } if($protectedPost["ACTION"] == "DEL_NOT") { $result_line_delete=find_device_line('NULL',$protectedGet["stat"]); } if (isset($result_line_delete) and is_array($result_line_delete)){ require('require/function_telediff.php'); desactive_packet($result_line_delete['HARDWARE_ID'],$result_line_delete['IVALUE'][0]); } } $form_name="show_stats"; $table_name=$form_name; echo open_form($form_name); $sql="SELECT name FROM download_available WHERE fileid='%s'"; $arg=$protectedGet["stat"]; $res =mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); printEnTete( $l->g(498)." ".$row -> name." (".$l->g(296).": ".$protectedGet["stat"]." )"); //count max values for stats $sql_count="SELECT COUNT(id) as nb FROM devices d, download_enable e WHERE e.fileid='%s' AND e.id=d.ivalue AND name='DOWNLOAD' AND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_')"; $arg=$protectedGet["stat"]; $rescount =mysql2_query_secure($sql_count, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($rescount); $total=$row->nb; if ($total<=0){ msg_error($l->g(837)); require_once(FOOTER_HTML); die(); } $sqlStats="SELECT COUNT(id) as nb, tvalue as txt FROM devices d, download_enable e WHERE e.fileid='%s' AND e.id=d.ivalue AND name='DOWNLOAD' AND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_') and tvalue not like '%s' and tvalue not like '%s' and tvalue is not null group by tvalue union SELECT COUNT(id) as nb, '%s' FROM devices d, download_enable e WHERE e.fileid='%s' AND e.id=d.ivalue AND name='DOWNLOAD' AND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_') and (tvalue like '%s' or tvalue like '%s') union SELECT COUNT(id) as nb, '%s' FROM devices d, download_enable e WHERE e.fileid='%s' AND e.id=d.ivalue AND name='DOWNLOAD' AND hardware_id NOT IN (SELECT id FROM hardware WHERE deviceid='_SYSTEMGROUP_' or deviceid='_DOWNLOADGROUP_') and tvalue is null"; $arg=array($arg,'EXIT_CODE%','ERR%',$l->g(573),$arg,'EXIT_CODE%','ERR%',$l->g(482),$arg); $resStats =mysql2_query_secure($sqlStats." ORDER BY nb DESC", $_SESSION['OCS']["readServer"],$arg); $i=0; while ($row=mysqli_fetch_object($resStats)){ $txt_status=strtoupper ($row->txt); $name_value[$i] = $txt_status; $pourc=round(($row->nb*100)/$total,2); $legend[$i]=$name_value[$i]." (".$pourc."%)"; if ($name_value[$i] == strtoupper($l->g(573))) $link[$i]="***".$l->g(956)."***"; else $link[$i]=$name_value[$i]; $lbl[$i]=$name_value[$i]."
      (".$pourc."%)"; $count_value[$i]=$row->nb; if (isset($arr_FCColors[$i])) $color[$i]=$arr_FCColors[$i]; else $color[$i]=$arr_FCColors[$i-10]; $color[$i]="plotProps: {fill: \"".$color[$i]."\"}"; $i++; } echo '
      '; echo '
      '; echo ''; echo "

      "; if($_SESSION['OCS']['profile']->getConfigValue('TELEDIFF')=="YES"){ echo ""; echo ""; echo ""; echo ""; echo "
      ".$l->g(483)."".$l->g(571)."".$l->g(575)."


      "; echo ""; } echo ""; $j=0; while( $j<$i ) { $nb+=$count_value[$j]; echo ""; if (isset($arr_FCColors[$j])) echo ""; $j++; } echo ""; echo "
       ".$l->g(81)."".$l->g(55)."
      "; else echo ""; echo " ".$name_value[$j]." ".$count_value[$j].""; if (substr_count($link[$j], 'SUC')) echo " "; echo "
       ".$l->g(87)."".$nb."


      "; echo close_form(); ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/old/000077500000000000000000000000001303466605000305075ustar00rootroot00000000000000ms_tele_compress.php.old000077500000000000000000000033671303466605000352750ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/old addFile(implode("",file($rep.$f)),basename($rep.$f)); closedir($dir); print $zipfile -> file(); exit(); } ?> ms_tele_package.php.old000077500000000000000000000570631303466605000350370ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/old$value){ $temp_post[$key]=$value; } $protectedPost=$temp_post; if( isset( $protectedPost["VALID_END"] ) ) { //configure description of this package $description_details=$protectedPost['DESCRIPTION']; if (isset($protectedPost['TYPE_PACK']) and $protectedPost['TYPE_PACK'] != '') $description_details .= " [Type=".$protectedPost['TYPE_PACK']."]"; if (isset($protectedPost['VISIBLE']) and $protectedPost['VISIBLE'] != '') $description_details .= " [VISIBLE=".$protectedPost['VISIBLE']."]"; $sql_details=array('document_root'=>$protectedPost['document_root'], 'timestamp'=>$protectedPost['timestamp'], 'nbfrags'=>$protectedPost["nbfrags"], 'name'=>$protectedPost['NAME'], 'os'=>$protectedPost['OS'], 'description'=>$description_details, 'size'=>$protectedPost['SIZE'], 'id_wk'=>$protectedPost['LIST_DDE_CREAT']); $info_details=array('PRI'=>$protectedPost['PRIORITY'], 'ACT'=>$protectedPost['ACTION'], 'DIGEST'=>$protectedPost['digest'], 'PROTO'=>$protectedPost['PROTOCOLE'], 'DIGEST_ALGO'=>$protectedPost["digest_algo"], 'DIGEST_ENCODE'=>$protectedPost["digest_encod"], 'PATH'=>$protectedPost['ACTION_INPUT'], 'NAME'=>$protectedPost['ACTION_INPUT'], 'COMMAND'=>$protectedPost['ACTION_INPUT'], 'NOTIFY_USER'=>$protectedPost['NOTIFY_USER'], 'NOTIFY_TEXT'=>$protectedPost['NOTIFY_TEXT'], 'NOTIFY_COUNTDOWN'=>$protectedPost['NOTIFY_COUNTDOWN'], 'NOTIFY_CAN_ABORT'=>$protectedPost['NOTIFY_CAN_ABORT'], 'NOTIFY_CAN_DELAY'=>$protectedPost['NOTIFY_CAN_DELAY'], 'NEED_DONE_ACTION'=>$protectedPost['NEED_DONE_ACTION'], 'NEED_DONE_ACTION_TEXT'=>$protectedPost['NEED_DONE_ACTION_TEXT'], 'GARDEFOU'=>"rien"); create_pack($sql_details,$info_details); if ($protectedPost['REDISTRIB_USE'] == 1){ $timestamp_redistrib= time(); $server_dir=$protectedPost['download_rep_creat']; $rep=$server_dir.$timestamp_redistrib; //create zip file for redistribution servers require_once("libraries/zip.lib.php"); $zipfile = new zipfile(); if (!file_exists($server_dir)){ mkdir($server_dir); } if (!file_exists($server_dir.$timestamp_redistrib)) mkdir($rep); $dir = opendir($rep); while($f = readdir($dir)){ if(is_file($rep.$f)) $zipfile -> addFile(implode("",file($rep.$f)),$sql_details['timestamp']."/".basename($rep.$f)); } closedir($dir); flush(); $handinfo = fopen( $server_dir.$timestamp_redistrib."/".$timestamp_redistrib."_redistrib.zip", "w+" ); fwrite( $handinfo, $zipfile -> file() ); fclose( $handinfo ); //crypt the file $digest=crypt_file($server_dir.$timestamp_redistrib."/".$timestamp_redistrib."_redistrib.zip",$protectedPost["digest_algo"],$protectedPost["digest_encod"]); //change name of this file to "tmp" for use function of create a package rename($server_dir.$timestamp_redistrib."/".$timestamp_redistrib."_redistrib.zip", $server_dir.$timestamp_redistrib."/tmp"); //create temp file $fSize = filesize( $server_dir.$timestamp_redistrib."/tmp"); $sql_details=array('document_root'=>$server_dir, 'timestamp'=>$timestamp_redistrib, 'nbfrags'=>$protectedPost['nbfrags_redistrib'], 'name'=>$protectedPost['NAME'].'_redistrib', 'os'=>$protectedPost['OS'], 'description'=>'[PACK REDISTRIBUTION '.$protectedPost['timestamp'].']', 'size'=>$fSize, 'id_wk'=>$protectedPost['LIST_DDE_CREAT']); $info_details=array('PRI'=>$protectedPost['REDISTRIB_PRIORITY'], 'ACT'=>'STORE', 'DIGEST'=>$digest, 'PROTO'=>$protectedPost['PROTOCOLE'], 'DIGEST_ALGO'=>$protectedPost["digest_algo"], 'DIGEST_ENCODE'=>$protectedPost["digest_encod"], 'PATH'=>$protectedPost['DOWNLOAD_SERVER_DOCROOT'], 'NAME'=>'', 'COMMAND'=>'', 'NOTIFY_USER'=>'0', 'NOTIFY_TEXT'=>'', 'NOTIFY_COUNTDOWN'=>'', 'NOTIFY_CAN_ABORT'=>'0', 'NOTIFY_CAN_DELAY'=>'0', 'NEED_DONE_ACTION'=>'0', 'NEED_DONE_ACTION_TEXT'=>'', 'GARDEFOU'=>"rien"); create_pack($sql_details,$info_details); } unset($protectedPost,$_SESSION['OCS']['DATA_CACHE']); } $lign_begin=""; $td_colspan2=":"; $lign_end=""; $form_name="create_pack"; echo open_form($form_name,'',"enctype='multipart/form-data'"); if (isset($protectedPost['valid'])){ looking4config(); //file exist if (file_exists($_FILES["teledeploy_file"]["tmp_name"]) && is_readable($_FILES["teledeploy_file"]["tmp_name"]) && filesize($_FILES["teledeploy_file"]["tmp_name"]) > 0){ //is it a zip file or TAR.GZ file? $name_file_extention=explode('.',$_FILES["teledeploy_file"]["name"]); $extention=array_pop($name_file_extention); if (strtoupper($extention) != "ZIP" and strtoupper($extention) != "GZ"){ $error=$l->g(1231); //ok }elseif(strtoupper($extention) == "GZ" and strtoupper(array_pop($name_file_extention)) != "TAR"){ $error=$l->g(1232); } } //file not exist else{ if ($protectedPost['ACTION'] != 'EXECUTE') $error=$l->g(436)." ".$_FILES["teledeploy_file"]["tmp_name"]; } //the package name is exist in database? $verifN = "SELECT fileid FROM download_available WHERE name='%s'"; $argverifN=$protectedPost["NAME"]; $resN = mysql2_query_secure( $verifN, $_SESSION['OCS']["readServer"], $argverifN); if( mysqli_num_rows( $resN ) != 0 ) $error=$l->g(551); if ($error){ msg_error($error); unset($protectedPost['valid']); } else{ //some fields are empty? echo ""; //get the file if (!($_FILES["teledeploy_file"]["size"]== 0 and $protectedPost['ACTION'] == 'EXECUTE')){ $size = $_FILES["teledeploy_file"]["size"]; //crypt the file $digest=crypt_file($_FILES["teledeploy_file"]["tmp_name"],$protectedPost["digest_algo"],$protectedPost["digest_encod"]); //create temp file creat_temp_file($protectedPost['document_root'].$protectedPost['timestamp'],$_FILES["teledeploy_file"]["tmp_name"]); } $digName = $protectedPost["digest_algo"]. " / ".$protectedPost["digest_encod"]; $title_creat="".$l->g(435)." "."[".$protectedPost['NAME']."]"; $name_file=$lign_begin.$l->g(446).$td_colspan2.$_FILES["teledeploy_file"]["name"].$lign_end; $ident=$lign_begin.$l->g(460).$td_colspan2.$protectedPost['timestamp'].$lign_end; $view_digest=$lign_begin.$l->g(461)." ".$digName.$td_colspan2.$digest.$lign_end; $total_ko=$lign_begin.$l->g(462).$td_colspan2.round($size/1024)." ".$l->g(516).$lign_end; //create the field of the frag's size $taille_frag=$lign_begin.$l->g(463).$td_colspan2; $taille_frag.= input_pack_taille("tailleFrag","nbfrags",round($size),'8',round($size/1024)); $taille_frag.=$l->g(516).$lign_end; $tps=$lign_begin.$l->g(1002).$td_colspan2; $tps.= time_deploy(); $tps.=$lign_end; //create the field of the frag number $nb_frag=$lign_begin.$l->g(464).$td_colspan2; $nb_frag.= input_pack_taille("nbfrags","tailleFrag",round($size),'5','1'); $nb_frag.=$lign_end; echo ""; echo $title_creat.$name_file.$ident.$view_digest.$total_ko.$taille_frag.$nb_frag.$tps; $java_script="verif2();"; if($protectedPost['REDISTRIB_USE'] == 1){ $title_creat_redistrib=""; $taille_frag_redistrib=$lign_begin.$l->g(463).$td_colspan2; $taille_frag_redistrib.= input_pack_taille("tailleFrag_redistrib","nbfrags_redistrib",round($size),'8',round($size/1024)); $taille_frag_redistrib.=$l->g(516).$lign_end; $nb_frag_redistrib=$lign_begin.$l->g(464).$td_colspan2; $nb_frag_redistrib.= input_pack_taille("nbfrags_redistrib","tailleFrag_redistrib",round($size),'5','1'); $nb_frag_redistrib.=$lign_end; echo $title_creat_redistrib.$taille_frag_redistrib.$nb_frag_redistrib; $java_script="verif_redistributor();"; } echo "
      ".$l->g(1003)."
      "; echo "
      "; echo ""; echo ""; echo ""; } } //check default values $default_value=array('OS'=>'WINDOWS', 'PROTOCOLE'=>'HTTP', 'PRIORITY'=>'5', 'ACTION'=>'STORE', 'REDISTRIB_PRIORITY'=>'5'); if (!$protectedPost){ //get timestamp $protectedPost['timestamp'] = time(); foreach ($default_value as $key=>$value) $protectedPost[$key]=$value; $val_document_root=look_config_default_values(array('DOWNLOAD_PACK_DIR')); if (isset($val_document_root["tvalue"]['DOWNLOAD_PACK_DIR'])) $document_root = $val_document_root["tvalue"]['DOWNLOAD_PACK_DIR']."/download/"; else{ //if no directory in base, take $_SERVER["DOCUMENT_ROOT"] $document_root = VARLIB_DIR.'/download/'; } $rep_exist=file_exists($document_root); //create directory if it's not exist if (!$rep_exist){ $creat=@mkdir($document_root); if (!$creat){ msg_error($document_root."
      ".$l->g(1004).".
      ".$l->g(1005)); return; } } //apache user can be write in this directory? $rep_ok=is_writable ($document_root); if (!$rep_ok){ msg_error($l->g(1007)." ".$document_root." ".$l->g(1004).".
      ".$l->g(1005)); return; } $protectedPost['document_root']=$document_root; } echo " "; echo ""; echo "
      "; printEnTete($l->g(434)); echo "
      "; $activate=option_conf_activate('TELEDIFF_WK'); //If workflow for teledeploy is activated //We show only the package we can create if ($activate){ msg_info($l->g(1105)."
      ".$l->g(1106)."
      ".$l->g(1107)); //get all request with the status "Create a Package" $conf_creat_Wk=look_config_default_values(array('IT_SET_NIV_CREAT')); $info_dde_statut_creat=info_dde(find_dde_by_status($conf_creat_Wk['tvalue']['IT_SET_NIV_CREAT'])); if ($info_dde_statut_creat != ''){ $array_id_fields=find_id_field(array('NAME_TELEDEPLOY','PRIORITY','NOTIF_USER','REPORT_USER','INFO_PACK')); //build the search $id_name="fields_".$array_id_fields['NAME_TELEDEPLOY']->id; $id_description="fields_".$array_id_fields['INFO_PACK']->id; $id_priority="fields_".$array_id_fields['PRIORITY']->id; $id_notify_user="fields_".$array_id_fields['NOTIF_USER']->id; foreach ($info_dde_statut_creat as $id=>$tab_value){ $list_dde_creat[$tab_value->ID]=$tab_value->$id_name; } echo "
      " . $l->g(1183) . ":".show_modif($list_dde_creat,'LIST_DDE_CREAT',2,$form_name); if (!$protectedPost['LIST_DDE_CREAT'] or $protectedPost['LIST_DDE_CREAT'] == ""){ echo close_form(); require_once(FOOTER_HTML); die(); }else{ $protectedPost['NAME']=$info_dde_statut_creat[$protectedPost['LIST_DDE_CREAT']]->$id_name; $protectedPost['DESCRIPTION']=$info_dde_statut_creat[$protectedPost['LIST_DDE_CREAT']]->$id_description; $NAME_TYPE=3; $DESCRIPTION_TYPE=3; } }else{ echo close_form(); require_once(FOOTER_HTML); die(); } }else{ $NAME_TYPE=0; $DESCRIPTION_TYPE=1; } $config_input=array('MAXLENGTH'=>255,'SIZE'=>50); $title_creat="".$l->g(438).""; $title_user="".$l->g(447).""; $title_redistrib="".$l->g(628).""; $list_os['WINDOWS']="WINDOWS"; $list_os['LINUX']="UNIX/LINUX"; $list_os['MAC']="MACOS"; $list_proto['HTTP']="HTTP"; $i=0; while ($i<10){ $list_prio["$i"]="$i"; $i++; } $list_action['STORE']=$l->g(457); $list_action['EXECUTE']=$l->g(456); $list_action['LAUNCH']=$l->g(458); $yes_no['0']=$l->g(454); $yes_no['1']=$l->g(455); $sous_tab_beg="
      "; $sous_tab_end="
      "; $nom= $lign_begin.$l->g(49).$td_colspan2.show_modif($protectedPost['NAME'],'NAME',$NAME_TYPE,'',$config_input).$lign_end; $descr=$lign_begin.$l->g(53).$td_colspan2.show_modif($protectedPost['DESCRIPTION'],'DESCRIPTION',$DESCRIPTION_TYPE).$lign_end; if (!isset($protectedPost['VISIBLE'])) $protectedPost['VISIBLE']=1; $visible=$lign_begin.$l->g(52).$td_colspan2.show_modif($yes_no,'VISIBLE',2,"",$configinput['DEFAULT'] = "NO").$lign_end; $os=$lign_begin.$l->g(25).$td_colspan2.champ_select_block($list_os,'OS',array('OS'=>'WINDOWS')).$lign_end; $proto=$lign_begin.$l->g(439).$td_colspan2.show_modif($list_proto,'PROTOCOLE',2,'').$lign_end; $prio=$lign_begin.$l->g(440).$td_colspan2.show_modif($list_prio,'PRIORITY',2,'').$lign_end; $file=$lign_begin.$l->g(549).$td_colspan2."".$lign_end; $action=$lign_begin.$l->g(443).":".champ_select_block($list_action,'ACTION',array('EXECUTE_div','STORE_div','LAUNCH_div'))."
      ".$l->g(445).":
      ".show_modif($protectedPost['ACTION_INPUT'],'ACTION_INPUT',0,'',$configinput=array('MAXLENGTH'=>1000,'SIZE'=>30)).$lign_end; $notify_user="".$l->g(448).":".champ_select_block($yes_no,'NOTIFY_USER',array('NOTIFY_USER'=>1)).$lign_end; $redistrib="".$l->g(1008).":".champ_select_block($yes_no,'REDISTRIB_USE',array('REDISTRIB_USE'=>1)).$lign_end; echo ""; echo $title_creat.$nom.$descr; if ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'NO') == "NO" ) echo $visible; echo $os.$proto.$prio.$file.$action; //redistrib if ($_SESSION['OCS']["use_redistribution"] == 1){ echo $title_redistrib.$redistrib; $sql="select NAME,TVALUE from config where NAME ='DOWNLOAD_REP_CREAT' union select NAME,TVALUE from config where NAME ='DOWNLOAD_SERVER_DOCROOT'"; $resdefaultvalues = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"]); while($item = mysqli_fetch_object($resdefaultvalues)) $default[$item ->NAME]=$item ->TVALUE; if (!$default['DOWNLOAD_REP_CREAT']) $default['DOWNLOAD_REP_CREAT'] = $_SERVER["DOCUMENT_ROOT"]."/download/server/"; /* if (!$protectedPost['REDISTRIB_REP']) $protectedPost['REDISTRIB_REP']=$default['DOWNLOAD_REP_CREAT'];*/ if (!$protectedPost['REDISTRIB_PRIORITY']) $protectedPost['REDISTRIB_PRIORITY']=$default['DOWNLOAD_PRIORITY']; if (!$protectedPost['DOWNLOAD_SERVER_DOCROOT']) $protectedPost['DOWNLOAD_SERVER_DOCROOT']=$default['DOWNLOAD_SERVER_DOCROOT']; $redistrib_rep=$lign_begin.$l->g(829).$td_colspan2.$default['DOWNLOAD_REP_CREAT'].$lign_end; $config_input=array('MAXLENGTH'=>255,'SIZE'=>25); $redistrib_rep_distant=$lign_begin.$l->g(1009).$td_colspan2.show_modif($protectedPost['DOWNLOAD_SERVER_DOCROOT'],'DOWNLOAD_SERVER_DOCROOT','0','',$config_input).$lign_end; //$redistrib_rep_distant=$lign_begin.$l->g(1009).$td_colspan2.$default['DOWNLOAD_SERVER_DOCROOT'].$lign_end; $redistrib_prio=$lign_begin.$l->g(440).$td_colspan2.show_modif($list_prio,'REDISTRIB_PRIORITY',2,'').$lign_end; echo ""; echo ""; echo "
      "; echo $sous_tab_beg; echo $redistrib_rep.$redistrib_rep_distant.$redistrib_prio; echo $sous_tab_end; echo "
      "; } //affichage de cette partie que si on est dans un systeme windows echo "
      "; echo "
      "; echo ""; echo $title_user.$notify_user; $notify_txt=$lign_begin.$l->g(449).$td_colspan2.show_modif($_POST['NOTIFY_TEXT'],'NOTIFY_TEXT',1).$lign_end; $notify_count_down=$lign_begin.$l->g(450).$td_colspan2.show_modif($protectedPost['NOTIFY_COUNTDOWN'],'NOTIFY_COUNTDOWN',0,'',array('MAXLENGTH'=>4,'SIZE'=>4,'JAVASCRIPT'=>$chiffres)).$l->g(511).$lign_end; $notify_can_abord=$lign_begin.$l->g(451).$td_colspan2.show_modif($yes_no,'NOTIFY_CAN_ABORT',2).$lign_end; $notify_can_delay=$lign_begin.$l->g(452).$td_colspan2.show_modif($yes_no,'NOTIFY_CAN_DELAY',2).$lign_end; echo ""; $need_done_action=""; echo "
      "; echo $sous_tab_beg; echo $notify_txt.$notify_count_down.$notify_can_abord.$notify_can_delay; echo $sous_tab_end; echo "
      ".$l->g(453).":".champ_select_block($yes_no,'NEED_DONE_ACTION',array('NEED_DONE_ACTION'=>1)).$lign_end; echo $need_done_action; $need_done_action_txt=$lign_begin.$l->g(449).$td_colspan2.show_modif($_POST['NEED_DONE_ACTION_TEXT'],'NEED_DONE_ACTION_TEXT',1).$lign_end; echo "
      "; echo $sous_tab_beg; echo $need_done_action_txt; echo $sous_tab_end; echo "
      "; echo "
      "; echo " "; // "; echo close_form(); echo "
      "; ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/views/000077500000000000000000000000001303466605000310665ustar00rootroot00000000000000activate_form_view.php000077500000000000000000000023441303466605000354030ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/viewsPackage '.$package['NAME'].' ('.$package['FILEID'].')'; echo 'Download'; if ($redistrib_pack) { echo ' - Download redistribution package'; } echo ' - View info file'; echo open_form('activate_pack'); echo '
      '; show_form_field($data, $errors, 'select', 'METHOD', 'Activation method', array( 'type' => 'radio', 'options' => array( '' ) )); echo '
      '; echo close_form(); } ?>package_form_view.php000077500000000000000000000165171303466605000352050ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_teledeploy/views'.$l->g(435).''; echo open_form('create_pack', '', 'enctype="multipart/form-data"'); // Hidden fields show_form_input('TIMESTAMP', array( 'type' => 'hidden', 'value' => $data['TIMESTAMP'] )); echo '
      '; // Left column echo '
      '; show_file_upload_frame($data['TIMESTAMP'], $data, $errors); show_basic_info_frame($data, $errors); echo '
      '; // Right column echo '
      '; show_deploy_speed_frame($data, $errors); show_redistrib_frame($data, $errors); show_user_messages_frame($data, $errors); echo '
      '; echo '
      '; // TODO labels echo '
      '; show_form_submit('create_package', 'Create package'); echo '
      '; echo close_form(); } function show_file_upload_frame($timestamp, $data, $errors) { global $l; $package_tmp_file = get_download_root().$timestamp.'/tmp/package'; echo '
      '; echo '

      Package archive

      '; if (file_exists($package_tmp_file)) { echo ''; } function show_basic_info_frame($data, $errors) { global $l; echo '
      '; echo '

      Basic info

      '; show_form_field($data, $errors, 'input', 'NAME', $l->g(49)); show_form_field($data, $errors, 'textarea', 'DESCRIPTION', $l->g(53)); show_form_field($data, $errors, 'select', 'OS', $l->g(25), array( 'type' => 'radio', 'options' => array( 'WINDOWS' => 'Windows', 'LINUX' => 'UNIX / Linux', 'MAC' => 'Mac OS' ) )); show_form_field($data, $errors, 'select', 'ACTION', $l->g(443), array( 'type' => 'radio', 'options' => array( 'STORE' => $l->g(457), 'EXECUTE' => $l->g(456), 'LAUNCH' => $l->g(458) ), )); switch ($data['ACTION']) { case 'EXECUTE': $action_input_label = $l->g(444); break; case 'STORE': $action_input_label = $l->g(445); break; case 'LAUNCH': $action_input_label = $l->g(446); break; default: $action_input_label = ''; break; } show_form_field($data, $errors, 'input', 'ACTION_INPUT', $action_input_label); echo ''; echo ''; echo ''; echo '
      '; } function show_deploy_speed_frame($data, $errors) { global $l; echo '
      '; echo '

      Deployment speed

      '; show_form_field($data, $errors, 'select', 'DEPLOY_SPEED', 'Speed', array(// TODO translations 'options' => array( 'LOW' => 'Slow', 'MIDDLE' => 'Average', 'HIGH' => 'Fast', 'CUSTOM' => 'Custom' ) )); if ($data['DEPLOY_SPEED'] != 'CUSTOM') { $deploy_attrs = array( 'disabled' => 'disabled' ); } else { $deploy_attrs = array(); } show_form_field($data, $errors, 'select', 'PRIORITY', $l->g(440), array( 'attrs' => $deploy_attrs, 'options' => range(0, 10) )); show_form_field($data, $errors, 'input', 'NB_FRAGS', $l->g(464), array( 'attrs' => $deploy_attrs )); echo '
      '; } function show_redistrib_frame($data, $errors) { global $l; echo '
      '; echo '

      '; show_form_input('REDISTRIB_USE', array( 'type' => 'checkbox', 'value' => $data['REDISTRIB_USE'] )); show_form_label('REDISTRIB_USE', 'Redistribution'); // TODO translation echo '

      '; if ($data['REDISTRIB_USE'] != 'on') { echo ''; } function show_user_messages_frame($data, $errors) { global $l; if ($data['OS'] != 'WINDOWS') { $messages_style = ' style="display: none"'; } else { $messages_style = ''; } echo '
      '; echo '

      '; show_form_input('NOTIFY_USER', array( 'type' => 'checkbox', 'value' => $data['NOTIFY_USER'] )); show_form_label('NOTIFY_USER', $l->g(448)); echo '

      '; if ($data['NOTIFY_USER'] != 'on') { echo ''; echo '
      '; echo '

      '; show_form_input('NEED_DONE_ACTION', array( 'type' => 'checkbox', 'value' => $data['NEED_DONE_ACTION'] )); show_form_label('NEED_DONE_ACTION', 'Post-execution text'); // TODO translation echo '

      '; if ($data['NEED_DONE_ACTION'] != 'on') { echo ''; } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_upload_file/000077500000000000000000000000001303466605000300465ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_upload_file/ms_local.php000077500000000000000000000156421303466605000323630ustar00rootroot00000000000000g(288); $data_on['MANUEL']=$l->g(1258); echo open_form($form_name); //$protectedPost['onglet']='FILE'; show_tabs($data_on,$form_name,"onglet",4); echo "
      "; if ($protectedPost['onglet'] == 'FILE'){ echo ""; // $form_name1="SEND_FILE"; $data_config=look_config_default_values(array('LOCAL_URI_SERVER'),'', array('TVALUE'=>array('LOCAL_URI_SERVER'=>'http://localhost:80/ocsinventory'))); $server = $data_config['tvalue']['LOCAL_URI_SERVER']; $array_port=explode(':',$server); $port_trait=array_pop($array_port); $array_port=explode('/',$port_trait); $port=$array_port[0]; if(is_uploaded_file($_FILES['file_upload']['tmp_name'])) { $fd = fopen($_FILES['file_upload']['tmp_name'], "r"); if ($_FILES['file_upload']['size'] != 0){ $contents = fread($fd, filesize ($_FILES['file_upload']['tmp_name'])); fclose($fd); $result = post_ocs_file_to_server($contents, $server, $port); if (isset($result["errno"])) { $errno = $result["errno"]; $errstr = $result["errstr"]; msg_error($l->g(344). " ". $errno . " / " . $errstr); }else { if( ! strstr ( $result[0], "200") ) msg_error($l->g(344). " " . $result[0]); else { msg_success($l->g(287)." OK"); } } }else msg_error($l->g(1244)); } printEntete("".$l->g(560).": ".$server); echo close_form(); echo "
      "; echo open_form($form_name1,'',"enctype='multipart/form-data' onsubmit=\"return verif_file_format('file_upload');\""); echo '
      '; echo ''; echo ''; echo '
      '; echo '
      '; echo ""; echo '
      '; echo close_form(); }else{ require_once('require/function_computers.php'); require_once('require/function_admininfo.php'); //list fields for form $form_fields_typeinput=array('COMPUTER_NAME_GENERIC'=>$l->g(35), 'SERIAL_GENERIC'=>$l->g(36), 'ADDR_MAC_GENERIC'=>$l->g(95)); if (isset($protectedPost['Valid_modif'])){ $error=''; if (!is_numeric($protectedPost['NB_COMPUTERS'])) $error.=$l->g(28).','; foreach ($form_fields_typeinput as $key=>$value){ if (trim($protectedPost[$key]) == '') $error.=$value.','; } if ($error == ""){ $check_trait=array(); foreach ($protectedPost as $key=>$value){ if ($value != ''){ if (substr($key,0,7) == 'fields_' or $key == 'TAG'){ $temp_field=explode('_',$key); //checkbox cas if (isset($temp_field[2])){ $check_trait[$temp_field[0].'_'.$temp_field[1]].=$temp_field[2]."&&&"; }else{ $fields[]=$key; $values_fields[]=$value; } } } } //cas of checkbox if ($check_trait != array()){ foreach ($check_trait as $key=>$value){ $fields[]=$key; $values_fields[]=$value; } } /*if ($protectedPost['NB_COMPUTERS'] === 1) $protectedPost['NB_COMPUTERS']='';*/ $i=0; while ($i < $protectedPost['NB_COMPUTERS']){ $id_computer=insert_manual_computer($protectedPost,$protectedPost['NB_COMPUTERS']); if (!is_array($fields)){ $fields[]='TAG'; $values_fields[]=''; } insertinfo_computer($id_computer,$fields,$values_fields); $i++; } msg_success($l->g(881)); }else msg_error($l->g(684)."
      ".$error); } $i=0; $info_form['FIELDS']['name_field'][$i]='NB_COMPUTERS'; $info_form['FIELDS']['type_field'][$i]=0; $info_form['FIELDS']['value_field'][$i]=($protectedPost['NB_COMPUTERS'] != '' ? $protectedPost['NB_COMPUTERS']:'1'); $info_form['FIELDS']['tab_name'][$i]=$l->g(28); $config[$i]['CONFIG']['SIZE']=4 ; $config[$i]['CONFIG']['MAXLENGTH']=4 ; $other_data['COMMENT_AFTER'][$i]=''; $config[$i]['CONFIG']['JAVASCRIPT']=$chiffres; foreach ($form_fields_typeinput as $key=>$value){ $i++; $info_form['FIELDS']['name_field'][$i]=$key; $info_form['FIELDS']['type_field'][$i]=0; if ($key == 'ADDR_MAC_GENERIC') $info_form['FIELDS']['value_field'][$i]=(isset($protectedPost[$key])? $protectedPost[$key]:RandomMAC()) ; else $info_form['FIELDS']['value_field'][$i]=(isset($protectedPost[$key])? $protectedPost[$key]:rand()) ; $info_form['FIELDS']['tab_name'][$i]=$value."*"; $config[$i]['CONFIG']['SIZE']=30; $other_data['COMMENT_AFTER'][$i]='_M'; } $accountinfo_form=show_accountinfo('','COMPUTERS','5'); //merge data $info_form['FIELDS']['name_field']=array_merge ($info_form['FIELDS']['name_field'],$accountinfo_form['FIELDS']['name_field']); $info_form['FIELDS']['type_field']=array_merge ($info_form['FIELDS']['type_field'],$accountinfo_form['FIELDS']['type_field']); $info_form['FIELDS']['value_field']=array_merge ($info_form['FIELDS']['value_field'],$accountinfo_form['FIELDS']['value_field']); $info_form['FIELDS']['tab_name']=array_merge ($info_form['FIELDS']['tab_name'],$accountinfo_form['FIELDS']['tab_name']); $config=array_merge ($config,$accountinfo_form['CONFIG']); $other_data['COMMENT_AFTER']=array_merge ($other_data['COMMENT_AFTER'],$accountinfo_form['COMMENT_AFTER']); $tab_typ_champ=show_field($info_form['FIELDS']['name_field'],$info_form['FIELDS']['type_field'],$info_form['FIELDS']['value_field']); foreach ($config as $key=>$value){ $tab_typ_champ[$key]['CONFIG']=$value['CONFIG']; $tab_typ_champ[$key]['COMMENT_AFTER']=$other_data['COMMENT_AFTER'][$key]; } if (isset($tab_typ_champ)){ tab_modif_values($info_form['FIELDS']['tab_name'],$tab_typ_champ,$tab_hidden, array( 'show_frame' => false )); } echo "
      "; echo close_form(); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_upload_file/ms_upload_file.php000077500000000000000000000135031303466605000335460ustar00rootroot00000000000000 function getext(filename){ var parts = filename.split('.'); return(parts.pop()); } function namefile(filename){ var parts = new Array(); var parts2 = new Array(); parts = filename.split('.'); parts2= parts[0].split('\\\'); var part2return=parts2.pop(); return(part2return); } function verif_file_format(champ){ var ExtList=new Array('exe'); filename = document.getElementById(champ).value.toLowerCase(); fileExt = getext(filename); for (i=0; ig(1243))."'); return (false); } return (true); } } alert('".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$l->g(168))."'); return (false); } "; $umf = "upload_max_filesize"; $valTumf = ini_get( $umf ); $valBumf = return_bytes( $valTumf ); $form_name="upload_client"; /*if( $valBumf>$valBpms ) $MaxAvail = trim($valTpms,"m"); else $MaxAvail = trim($valTumf,"m"); echo "
      " . $l->g(2040) . " " . $MaxAvail . $l->g(1240) . "
      " . $l->g(2041) . "
      "; */ $table_name=$form_name; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; if (isset($_FILES['file_upload']['name'])){ if ($_FILES['file_upload']['size'] != 0){ $fname=$_FILES['file_upload']['name']; $platform="windows"; $filename = $_FILES['file_upload']['tmp_name']; $fd = fopen($filename, "r"); $contents = fread($fd, filesize ($filename)); fclose($fd); $binary = $contents; $sql="DELETE FROM deploy where name='%s'"; $arg=$fname; mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); $sql="INSERT INTO deploy values ('%s','%s')"; $arg=array($fname,$binary); $result=mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); if (!$result) msg_error($l->g(2003).mysqli_errno($_SESSION['OCS']["writeServer"])."
      ".mysqli_error($_SESSION['OCS']["writeServer"])); else{ msg_success($l->g(137)." ".$_FILES['file_upload']['name']." ".$l->g(234)); $tab_options['CACHE']='RESET'; } }else{ msg_error($l->g(920)); } } if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != ''){ $sql="DELETE FROM deploy where name='%s'"; $arg=$protectedPost['SUP_PROF']; mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); } if (!isset($protectedPost['ADD_FILE'])){ echo open_form($form_name); $list_fields=array($l->g(283)=>'function', $l->g(49) => 'name', 'SUP'=>'name' ); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql= "select '%s' as function,%s from deploy where name != 'label'"; $tab_options['ARG_SQL']=array($l->g(370),'name'); $tab_options['LIEN_LBL'][$l->g(49)]='index.php?'.PAG_INDEX.'='.$pages_refs['ms_view_file'].'&prov=agent&no_header=1&value='; $tab_options['LIEN_CHAMP'][$l->g(49)]='name'; $tab_options['LIEN_TYPE'][$l->g(49)]='POPUP'; $tab_options['POPUP_SIZE'][$l->g(49)]="width=900,height=600"; printEntete($l->g(1245)); echo "
      "; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //echo show_modif($name,'ADD_FILE',8,"",$configinput=array('DDE'=>100)); echo ""; echo close_form(); } if (isset($protectedPost['ADD_FILE']) and $protectedPost['ADD_FILE'] != ''){ $css="mvt_bordure"; $form_name1="SEND_FILE"; //search max_allowed_packet value on mysql conf $sql="SHOW VARIABLES LIKE 'max_allowed_packet'"; $result=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"]); $value=mysqli_fetch_array($result); //pass oct to Mo $upload_max_filesize=$value['Value']/1048576; msg_info($l->g(2022).' '.$valBumf.$l->g(1240)."
      ".$l->g(2106)." ".$upload_max_filesize.$l->g(1240)); //echo "post_max_size=".$valTpms.$l->g(1240).'//upload_max_filesize='.$valTumf.$l->g(1240); echo open_form($form_name1,'',"enctype='multipart/form-data' onsubmit=\"return verif_file_format('file_upload');\""); echo '
      '; echo $l->g(1048).": "; echo "

        "; //echo ""; echo "
      "; echo close_form(); echo "
      "; } if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql,$tab_options); } ?> ms_upload_file_popup.php000077500000000000000000000105521303466605000347130ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_upload_fileField; if (isset($field) and $field != ''){ echo ""; if ($protectedPost['GO']){ $filename = $_FILES['file_upload']['tmp_name']; $fd = fopen($filename, "r"); $contents = fread($fd, filesize ($filename)); fclose($fd); //$binary = addslashes($contents); $sql_insert="insert into temp_files (TABLE_NAME,FIELDS_NAME,FILE,AUTHOR,FILE_NAME,FILE_TYPE,FILE_SIZE,ID_DDE) values ('%s','%s','%s','%s','%s','%s','%s','%s')"; $var_insert=array($table,$field,$contents, $_SESSION['OCS']['loggeduser'], $_FILES['file_upload']['name'], $_FILES['file_upload']['type'], $_FILES['file_upload']['size'], $protectedGet["dde"]); mysql2_query_secure($sql_insert,$_SESSION['OCS']["writeServer"],$var_insert); $tab_options['CACHE']='RESET'; } if (isset($protectedPost['SUP_PROF']) and is_numeric($protectedPost['SUP_PROF'])){ $sql_delete="delete from temp_files where id ='%s'"; $var_delete=array($protectedPost['SUP_PROF']); mysql2_query_secure($sql_delete,$_SESSION['OCS']["writeServer"],$var_delete); $tab_options['CACHE']='RESET'; } //ouverture du formulaire echo open_form($form_name,'',"enctype='multipart/form-data'"); echo $l->g(1048).": "; echo "

        "; echo close_form(); echo "
      "; //print_item_header($l->g(92)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $form_name2="affich_files"; $table_name=$form_name2; echo open_form($form_name2); $list_fields=array('id'=>'id','Fichier'=>'file_name','Type'=>'file_type','Poids'=>'file_size','SUP'=>'id'); $list_col_cant_del=array('Fichier'=>'Fichier','SUP'=>'SUP'); $default_fields= $list_fields; $queryDetails = "SELECT "; foreach ($list_fields as $key=>$value){ if ($key != 'SUP'){ $queryDetails .= $value.","; } } $queryDetails=substr($queryDetails,0,-1); $queryDetails .= " FROM temp_files where fields_name = '".$field."' and (id_dde is null or id_dde='".$protectedGet["dde"]."')"; $tab_options['LIEN_LBL']['Fichier']='index.php?'.PAG_INDEX.'='.$pages_refs['ms_view_file'].'&prov=dde_wk&no_header=1&value='; $tab_options['LIEN_CHAMP']['Fichier']='id'; $tab_options['LIEN_TYPE']['Fichier']='POPUP'; $tab_options['POPUP_SIZE']['Fichier']="width=900,height=600"; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); }else msg_error($l->g(1049)); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_upload_file/ms_view_file.php000077500000000000000000000046551303466605000332440ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/000077500000000000000000000000001303466605000267245ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/js/000077500000000000000000000000001303466605000273405ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/js/profile-create-form.js000077500000000000000000000034511303466605000335460ustar00rootroot00000000000000(function($) { var counter = 0, forms = {}; function addFieldError($field, errorMessage) { if (!$field.hasClass('field-has-errors')) { $field.addClass('field-has-errors'); $field.prepend($('
        ', {'class': 'field-error-list'})); } $field.find('.field-error-list').append($('
          ').text(errorMessage)); } function removeFieldErrors($field) { $field.removeClass('field-has-errors').find('.field-error-list').remove(); } function submitForm($form) { $form.find('input[type=submit]').prop('disabled', true); $form.find('.field').each(function() { removeFieldErrors($(this)); }); $form.find('.error').remove(); $.ajax({ url: 'ajax.php?function=admin_add_profile', type: 'POST', data: $form.serializeArray(), }).done(function(data) { if (data.status == 'error') { $form.find('input[type=submit]').prop('disabled', false); if (data.errors) { for (key in data.errors) { $.each(data.errors[key], function(i, err) { addFieldError($form.find('.field-'+key), err); }); } } $('
          ') .text(data.message) .prependTo($form); } else { $('
          ') .text(data.message) .prependTo($form); window.location.href = 'index.php?function=admin_profile_details&profile_id='+data.profile_id; } }).fail(function() { $form.find('input[type=submit]').prop('disabled', false); $('
          ') .text('An error occurred while submitting the form. Please check your internet connection.') .prependTo($form); }); } $(document).ready(function() { var $form = $('form#create-profile'); if ($form.length) { $form.submit(function(e) { e.preventDefault(); e.stopPropagation(); submitForm($form); }); } }); }) (jQuery);ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/js/profile-edit-form.js000077500000000000000000000034521303466605000332310ustar00rootroot00000000000000(function($) { var counter = 0, forms = {}; function addFieldError($field, errorMessage) { if (!$field.hasClass('field-has-errors')) { $field.addClass('field-has-errors'); $field.prepend($('
            ', {'class': 'field-error-list'})); } $field.find('.field-error-list').append($('
              ').text(errorMessage)); } function removeFieldErrors($field) { $field.removeClass('field-has-errors').find('.field-error-list').remove(); } function submitForm($form) { $form.find('input[type=submit]').prop('disabled', true); $form.find('.field').each(function() { removeFieldErrors($(this)); }); $form.find('.error').remove(); $.ajax({ url: 'ajax.php?function=admin_profile_details&profile_id='+$form.find('#name').val(), type: 'POST', data: $form.serializeArray(), }).done(function(data) { if (data.status == 'error') { $form.find('input[type=submit]').prop('disabled', false); if (data.errors) { for (key in data.errors) { $.each(data.errors[key], function(i, err) { addFieldError($form.find('.field-'+key), err); }); } } $('
              ') .text(data.message) .prependTo($form); } else { $('
              ') .text(data.message) .prependTo($form); window.location.href = 'index.php?function=admin_profiles'; } }).fail(function() { $form.find('input[type=submit]').prop('disabled', false); $('
              ') .text('An error occurred while submitting the form. Please check your internet connection.') .prependTo($form); }); } $(document).ready(function() { var $form = $('form#edit-profile'); if ($form.length) { $form.submit(function(e) { e.preventDefault(); e.stopPropagation(); submitForm($form); }); } }); }) (jQuery);ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/lib/000077500000000000000000000000001303466605000274725ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/lib/profile_functions.php000077500000000000000000000055011303466605000337370ustar00rootroot00000000000000g(1391); } } // Check dropdown lists if ($data['duplicate_profile'] and !isset($profiles[$data['duplicate_profile']])) { $errors['duplicate_profile'] []= $l->g(1392); } // Check profile name regex if ($data['name'] and !preg_match('/^[0-9A-Za-z]+$/', $data['name'])) { $errors['name'] []= $l->g(1394); } // Check profile name doesn't exist if ($data['name'] and isset($profiles[$data['name']])) { $errors['name'] []= $l->g(1395); } return $errors; } function validate_profile_edit_form($profile_id, $data) { $errors = array(); $yes_no = array('YES', 'NO'); $urls = $_SESSION['OCS']['url_service']; foreach ($data['config'] as $key => $val) { if (!in_array($val, $yes_no)) { $errors['config_'.$key.'_'] []= $l->g(1392); } } foreach ($data['blacklist'] as $key => $val) { if (!in_array($val, $yes_no)) { $errors['blacklist_'.$key.'_'] []= $l->g(1392); } } foreach ($data['pages'] as $key => $val) { if (!$urls->getUrl($key)) { $errors['blacklist_'.$key.'_'] []= $l->g(1392); } } return $errors; } function create_profile($data) { $profiles = get_profiles(); $newProfile = clone($profiles[$data['duplicate_profile']]); $newProfile->setName($data['name']); $newProfile->setLabel($data['label']); $serializer = new XMLProfileSerializer(); $xml = $serializer->serialize($newProfile); if (file_put_contents(DOCUMENT_REAL_ROOT.'/config/profiles/'.$newProfile->getName().'.xml', $xml)) { return $newProfile->getName(); } else { return false; } } function update_profile($profile_id, $data) { $yes_no = array('YES', 'NO'); $urls = $_SESSION['OCS']['url_service']; $profiles = get_profiles(); $profile = $profiles[$profile_id]; $updatedProfile = new Profile($profile_id, $data['new_label'] ?: $profile->getLabel()); foreach ($data['restrictions'] as $key => $val) { $updatedProfile->setRestriction($key, $val); } foreach ($data['config'] as $key => $val) { $updatedProfile->setConfig($key, $val); } foreach ($data['blacklist'] as $key => $val) { if ($val == 'YES') { $updatedProfile->addToBlacklist($key); } } foreach ($data['pages'] as $key => $val) { if ($urls->getUrl($key) and $val == 'on') { $updatedProfile->addPage($key); } } $serializer = new XMLProfileSerializer(); $xml = $serializer->serialize($updatedProfile); if (file_put_contents(DOCUMENT_REAL_ROOT.'/config/profiles/'.$profile->getName().'.xml', $xml)) { return $profile->getName(); } else { return false; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_add_profile.php000077500000000000000000000030241303466605000324060ustar00rootroot00000000000000'; if (!is_writable(DOCUMENT_REAL_ROOT.'/config/profiles')) { msg_error($l->g(2116)); } else { show_profile_create_form(); } echo '
              '; } else { require_once 'lib/profile_functions.php'; if (!is_writable(DOCUMENT_REAL_ROOT.'/config/profiles')) { $response = array( 'status' => 'error', 'message' => $l->g(2116) ); } else if ($errors = validate_profile_create_form($_POST)) { $response = array( 'status' => 'error', 'message' => $l->g(1404), 'errors' => $errors ); } else if ($profile_id = create_profile($_POST)) { $response = array( 'status' => 'success', 'message' => $l->g(1405), 'profile_id' => $profile_id ); } else { $response = array( 'status' => 'error', 'message' => $l->g(1406) ); } header('Content-type: application/json'); echo json_encode($response); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_add_user.php000077500000000000000000000016341303466605000317310ustar00rootroot00000000000000'; } require_once 'require/function_users.php'; if (isset($protectedPost['Valid_modif'])) { $msg = add_user($_POST, get_profile_labels()); if ($msg != $l->g(373)) { msg_error($msg); } else { msg_success($l->g(1186)); } } admin_user(); if (!AJAX) { echo '
              '; } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_admin_user_group.php000077500000000000000000000102241303466605000335000ustar00rootroot00000000000000g(1059); $data_on[2]=$l->g(1060); echo open_form($form_name); onglet($data_on,$form_name,"onglet",2); echo '
              '; if ($protectedPost['onglet'] == 1){ $tab_options['CACHE']='RESET'; if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != ''){ $list = $protectedPost['del_check']; $sql_delete="DELETE FROM config WHERE name like 'USER_GROUP_%' and ivalue in (".$list.")"; mysqli_query($_SESSION['OCS']["writeServer"],$sql_delete) or die(mysqli_error($_SESSION['OCS']["writeServer"])); } if(isset($protectedPost['SUP_PROF'])) { mysqli_query($_SESSION['OCS']["writeServer"] ,"DELETE FROM config WHERE name='USER_GROUP_".$protectedPost['SUP_PROF']."'"); } $queryDetails ="select IVALUE,TVALUE from config where name like 'USER_GROUP_%'"; if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; if (!(isset($protectedPost["pcparpage"]))) $protectedPost["pcparpage"]=5; $list_fields['GRP']='TVALUE'; $list_fields['SUP']='IVALUE'; $list_fields['CHECK']='IVALUE'; $list_col_cant_del=$list_fields; $default_fields=$list_col_cant_del; $are_result=ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //traitement par lot if ($are_result){ del_selection($form_name); } }elseif ($protectedPost['onglet'] == 2){ if( $protectedPost['Valid_modif'] != "" ) { //vérification que le nom du champ n'existe pas pour les nouveaux champs if (trim($protectedPost['newfield']) != ''){ $sql_verif="SELECT count(*) c FROM config WHERE TVALUE = '".$protectedPost['newfield']."' and NAME like 'USER_GROUP%'"; //echo $sql_verif; $res_verif = mysqli_query($_SESSION['OCS']["readServer"], $sql_verif); //echo $val_verif = mysqli_fetch_array( $res_verif ); $val_verif = mysqli_fetch_array( $res_verif ); if ($val_verif['c'] > 0) //Ce nom de groupe est déjà utilisé $ERROR=$l->g(621); }else //Le nom du groupe ne peut pas être vide $ERROR=$l->g(638); if (!isset($ERROR)){ $sql_new_value="SELECT max(ivalue) max FROM config WHERE NAME like 'USER_GROUP%'"; $res_new_value = mysqli_query($_SESSION['OCS']["readServer"], $sql_new_value); $val_new_value = mysqli_fetch_array( $res_new_value ); if ($val_new_value['max'] == "") $val_new_value['max']=0; $val_new_value['max']++; mysqli_query($_SESSION['OCS']["writeServer"],"INSERT INTO config (NAME,TVALUE,IVALUE) VALUES('USER_GROUP_".$val_new_value['max']."','".$protectedPost['newfield']."','".$val_new_value['max']."')") or mysqli_error($_SESSION['OCS']["writeServer"]); //si on ajoute un champ, il faut créer la colonne dans la table downloadwk_pack msg_success($l->g(1069)); }else msg_error($ERROR); } //NAME FIELD $name_field=array("newfield"); $tab_name[0]=$l->g(577); $type_field= array(0); $value_field=array($protectedPost['newfield']); $tab_typ_champ=show_field($name_field,$type_field,$value_field); $tab_typ_champ[0]['CONFIG']['SIZE']=20; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'form_name' => 'NO_FORM' )); } echo "
              "; echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_config_account.php000077500000000000000000000020051303466605000331150ustar00rootroot00000000000000g(374)) { msg_error($msg); } else { msg_success($l->g(1186)); } } $form_name="pass"; echo open_form($form_name); admin_user($_SESSION['OCS']["loggeduser"], true); echo close_form();ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_custom_perim.php000077500000000000000000000102471303466605000326510ustar00rootroot00000000000000$value){ $info_value_tag= accountinfo_tab($value['id']); if (is_array($info_value_tag)){ $tab_options['REPLACE_VALUE'][$value['comment']]=$info_value_tag; } } } //END SHOW ACCOUNTINFO printEnTete($l->g(616)." ".$protectedGet["id"] ); if( $protectedPost['newtag'] != "" ) { if (isset($protectedPost['use_generic_0'])){ if (is_array($info_value_tag)){ $arg=str_replace(array("*","?"), "", $protectedPost["newtag"]); $array_result=find_value_in_field(1,$arg); }else{ $arg=str_replace(array("*","?"), array("%","_"), $protectedPost["newtag"]); $sql="select distinct TAG from accountinfo where TAG like '%s'"; $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); while ($val_account_data = mysqli_fetch_array( $res )) $array_result[]=$val_account_data['TAG']; } }else $array_result[]=$protectedPost["newtag"]; $tab_options['CACHE']='RESET'; $sql="insert into tags (tag,login) values ('%s','%s')"; $i=0; while (isset($array_result[$i])){ $arg=array($array_result[$i],$protectedGet["id"]); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); $i++; } unset($protectedPost['newtag']); } //suppression d'une liste de tag if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != ''){ $sql="DELETE FROM tags WHERE tag in "; $arg_sql=array(); $sql=mysql2_prepare($sql,$arg_sql,$protectedPost['del_check']); $sql['SQL'].=" AND login='%s'"; array_push($sql['ARG'],$protectedGet["id"]); mysql2_query_secure($sql['SQL'],$_SESSION['OCS']["writeServer"],$sql['ARG']); $tab_options['CACHE']='RESET'; } if(isset($protectedPost['SUP_PROF'])) { $sql="DELETE FROM tags WHERE tag='%s' AND login='%s'"; $arg=array($protectedPost['SUP_PROF'],$protectedGet["id"]); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); } echo "
              "; echo open_form($form_name); $list_fields=array('TAG'=>'tag', ); $tab_options['FILTRE']=array_flip($list_fields); $tab_options['FILTRE']['NAME']=$l->g(49); asort($tab_options['FILTRE']); $list_fields['SUP']='tag'; $list_fields['CHECK']='tag'; $list_col_cant_del=array('SUP'=>'SUP','CHECK'=>'CHECK'); $default_fields= array('TAG'=>'tag'); $sql=prepare_sql_tab($list_fields,$list_col_cant_del); $sql['SQL'] = "SELECT tag FROM tags where login='%s'"; $sql['ARG'] = array($protectedGet["id"]); $tab_options['ARG_SQL']=$sql['ARG']; $queryDetails = $sql['SQL']; $tab_options['LBL']['SUP']=$l->g(122); ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); $img['image/delete.png']=$l->g(162); del_selection($form_name); if (is_array($info_value_tag) and !isset($protectedPost['use_generic_0'])){ $type=2; }else{ $type=0; $info_value_tag=$protectedPost['newtag']; } $select_choise=show_modif($info_value_tag,'newtag',$type); echo "
              "; echo $l->g(617)." ".$_SESSION['OCS']['TAG_LBL']['TAG'].": ".$select_choise; echo "
              "; //echo show_modif(array($l->g(358)),'use_generic',5,$form_name); echo $l->g(358); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_profile_details.php000077500000000000000000000032171303466605000333070ustar00rootroot00000000000000'; if (!is_writable(DOCUMENT_REAL_ROOT.'/config/profiles')) { msg_error($l->g(2116)); } else { show_profile_edit_form($_GET['profile_id']); } echo '
              '; } else { require_once 'lib/profile_functions.php'; if (!is_writable(DOCUMENT_REAL_ROOT.'/config/profiles/'.$_GET['profile_id'].'.xml')) { $response = array( 'status' => 'error', 'message' => $l->g(1407).' (config/profiles/'.$_GET['profile_id'].'.xml)' ); } else if ($errors = validate_profile_edit_form($_GET['profile_id'], $_POST)) { $response = array( 'status' => 'error', 'message' => $l->g(1404), 'errors' => $errors ); } else if (update_profile($_GET['profile_id'], $_POST)) { $response = array( 'status' => 'success', 'message' => $l->g(1408), 'profile_id' => $_GET['profile_id'] ); } else { $response = array( 'status' => 'error', 'message' => $l->g(1409) ); } header('Content-type: application/json'); echo json_encode($response); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_profiles.php000077500000000000000000000047571303466605000317770ustar00rootroot00000000000000addColumn(new CheckboxColumn('name')); $table->addColumn(new LinkColumn('name', $l->g(1402), $detail_url, array('required' => true, 'idProperty' => 'name'))); $table->addColumn(new LinkColumn('label_translated', $l->g(1411), $detail_url, array('required' => true, 'idProperty' => 'name'))); $table->addColumn(new ActionsColumn(array( $detail_url => 'glyphicon glyphicon-edit', $delete_url => 'glyphicon glyphicon-remove', ), 'name')); if (AJAX) { $ajax = true; parse_str($protectedPost['ocs']['0'], $params); $protectedPost += $params; $data = array(); foreach ($profiles as $profile) { $profileData = array(); foreach ($table->getColumns() as $name => $col) { $profileData[$name] = $col->format($profile); } $data []= $profileData; } // JSON OUTPUT $response = array( 'customized' => false, 'draw' => $_POST['draw'], 'data' => $data, 'recordsFiltered' => count($profiles), 'recordsTotal' => count($profiles) ); echo json_encode($response); } else { $ajax = false; require_once('views/users_views.php'); require_once('require/function_search.php'); require_once('require/tables/TableRenderer.php'); // HTML OUTPUT show_users_left_menu('ms_profiles'); echo '
              '; echo '
              '; echo '

              '.$l->g(1401).'

              '; $table_renderer = new TableRenderer(); $table_renderer->show($table, $profiles); echo '
              '; echo '
              '; } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_user_details.php000077500000000000000000000016511303466605000326250ustar00rootroot00000000000000'; } require_once 'require/function_users.php'; if (isset($protectedPost['Valid_modif'])) { $msg = add_user($_POST, get_profile_labels()); if ($msg != $l->g(374)) { msg_error($msg); } else { msg_success($l->g(1186)); } } admin_user($_GET['user_id']); if (!AJAX) { echo '
          '; } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/ms_users.php000077500000000000000000000073571303466605000313140ustar00rootroot00000000000000'; echo '
          '; echo '

          '.$l->g(1400).'

          '; } require_once('require/function_search.php'); require_once('require/function_users.php'); // Définition des onglets $profiles = get_profile_labels(); $data_on = $profiles; $data_on[4]=$l->g(244); if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_PROFIL') == 'YES') $data_on[5]=$l->g(1146); $form_name = "admins"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; echo open_form($form_name); $table_name="TAB_ACCESSLVL".$protectedPost['onglet']; if ($protectedPost['onglet']==""){ $protectedPost['onglet'] = current($data_on); } //suppression d'une liste de users if (isset($protectedPost['del_check']) and $protectedPost['del_check'] != ''){ delete_list_user($protectedPost['del_check']); $tab_options['CACHE']='RESET'; } //suppression d'un user if (isset($protectedPost['SUP_PROF']) and $protectedPost['SUP_PROF'] != ''){ delete_list_user($protectedPost['SUP_PROF']); $tab_options['CACHE']='RESET'; } echo ""; //affichage $list_fields= array('ID'=>'ID', $l->g(1366)=>'FIRSTNAME', $l->g(996)=>'LASTNAME', $l->g(66)=>'NEW_ACCESSLVL', $l->g(51)=>'COMMENTS', $l->g(1117)=>'EMAIL', $l->g(607)=>'USER_GROUP', 'SUP'=>'ID', 'MOD_TAGS'=>'ID', 'CHECK'=>'ID'); $list_col_cant_del=array('ID'=>'ID','SUP'=>'SUP','CHECK'=>'CHECK','MOD_TAGS'=>'MOD_TAGS' ); $default_fields= array('ID'=>'ID', $l->g(1366)=>'FIRSTNAME', $l->g(996)=>'LASTNAME', $l->g(66)=>'NEW_ACCESSLVL', $l->g(51)=>'COMMENTS', $l->g(607)=>'USER_GROUP', 'SUP'=>'ID', 'MOD_TAGS'=>'ID', 'CHECK'=>'ID'); $queryDetails = 'SELECT '; foreach ($list_fields as $key=>$value){ if($key != 'SUP' and $key != 'CHECK' and $key != 'MOD_TAGS') $queryDetails .= $value.','; } $queryDetails=substr($queryDetails,0,-1); $queryDetails .= " FROM operators"; // Tab options $tab_options['FILTRE']=array('LASTNAME'=>'LASTNAME','ID'=>'ID','NEW_ACCESSLVL'=>'NEW_ACCESSLVL'); $tab_options['LIEN_LBL'][$l->g(1366)]='index.php?'.PAG_INDEX.'='.$pages_refs['ms_user_details'].'&user_id='; $tab_options['LIEN_CHAMP'][$l->g(1366)]="ID"; // Tags edit $tab_options['LBL']['MOD_TAGS']='Tags'; $tab_options['NO_TRI']['MOD_TAGS']=1; $sql_user_groups="select IVALUE,TVALUE from config where name like 'USER_GROUP_%' "; $res_user_groups = mysqli_query($_SESSION['OCS']["readServer"], $sql_user_groups ); while ($val_user_groups = mysqli_fetch_array( $res_user_groups )) $user_groups[$val_user_groups['IVALUE']]=$val_user_groups['TVALUE']; $tab_options['REPLACE_VALUE'][$l->g(607)]=$user_groups; $tab_options['LBL']['SUP']=$l->g(122); $tab_options['LBL']['CHECK']=$l->g(1119); $tab_options['table_name']=$table_name; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); //traitement par lot $img['image/delete.png']=$l->g(162); del_selection($form_name); echo close_form(); if (AJAX) { ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options); } else { echo '
          '; echo '
          '; } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/views/000077500000000000000000000000001303466605000300615ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/views/profile_create_form.php000077500000000000000000000015371303466605000346110ustar00rootroot00000000000000

          g(1399) ?>

          'big-label'); echo open_form('create-profile', '#'); show_form_field(array(), array(), 'input', 'name', $l->g(1396), $field_options); show_form_field(array(), array(), 'input', 'label', $l->g(1397), $field_options); show_form_field(array(), array(), 'select', 'duplicate_profile', $l->g(1398), array_merge($field_options, array( 'options' => get_profile_labels() ))); ?>
          ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/views/profile_edit_form.php000077500000000000000000000105251303466605000342700ustar00rootroot00000000000000 $l->g(455), 'NO' => $l->g(454) ); $profiles = get_profiles(); $profile = $profiles[$profile_id]; echo open_form('edit-profile', '#'); ?>

          g(1412) ?> (getLabelTranslated() ?>)

          'hidden', 'value' => $profile->getName())) ?> g(1413)) ?>

          Restrictions




          Blacklist

          Configuration

          Pages

          'big-label small-input', 'options' => $options, 'value' => $data[$name] ); show_form_field($data, array(), 'select', $key.'['.$name.']', $label, $field_options); } function show_restrictions_frame($profile, $yes_no) { global $l; $restrictions = $profile->getRestrictions(); show_select_field($restrictions, 'restrictions', 'GUI', $l->g(1154), $yes_no); show_select_field($restrictions, 'restrictions', 'TELEDIFF_ACTIVATE', $l->g(1158), $yes_no); show_select_field($restrictions, 'restrictions', 'TELEDIFF_VISIBLE', $l->g(1301), $yes_no); show_select_field($restrictions, 'restrictions', 'EXPORT_XML', $l->g(1305), $yes_no); show_select_field($restrictions, 'restrictions', 'WOL', $l->g(1281), $yes_no); } function show_config_frame($profile, $yes_no) { global $l; $config = $profile->getConfig(); $field_options = array('field_class' => 'big-label'); show_select_field($config, 'config', 'IPDISCOVER', $l->g(1172), $yes_no); show_select_field($config, 'config', 'TELEDIFF', $l->g(1162), $yes_no); show_select_field($config, 'config', 'CONFIG', $l->g(1163), $yes_no); show_select_field($config, 'config', 'GROUPS', $l->g(1164), $yes_no); show_select_field($config, 'config', 'CONSOLE', $l->g(1165), $yes_no); show_select_field($config, 'config', 'ALERTE_MSG', $l->g(1166), $yes_no); show_select_field($config, 'config', 'ACCOUNTINFO', $l->g(1167), $yes_no); show_select_field($config, 'config', 'CHANGE_ACCOUNTINFO', $l->g(1168), $yes_no); show_select_field($config, 'config', 'CHANGE_USER_GROUP', $l->g(1169), $yes_no); show_select_field($config, 'config', 'MANAGE_PROFIL', $l->g(1170), $yes_no); show_select_field($config, 'config', 'MANAGE_USER_GROUP', $l->g(1171), $yes_no); show_select_field($config, 'config', 'MANAGE_SMTP_COMMUNITIES', $l->g(1205), $yes_no); show_select_field($config, 'config', 'DELETE_COMPUTERS', $l->g(1272), $yes_no); } function show_blacklist_frame($profile, $yes_no) { global $l; $macadd = $profile->hasInBlacklist('MACADD') ? 'YES' : 'NO'; $serial = $profile->hasInBlacklist('SERIAL') ? 'YES' : 'NO'; $ipdiscover = $profile->hasInBlacklist('IPDISCOVER') ? 'YES' : 'NO'; $blacklist = array( 'MACADD' => $macadd, 'SERIAL' => $serial, 'IPDISCOVER' => $ipdiscover ); $field_options = array('field_class' => 'big-label'); show_select_field($blacklist, 'blacklist', 'MACADD', $l->g(1159), $yes_no); show_select_field($blacklist, 'blacklist', 'SERIAL', $l->g(1160), $yes_no); show_select_field($blacklist, 'blacklist', 'IPDISCOVER', $l->g(1161), $yes_no); } function show_pages_frame($profile, $yes_no) { global $l; $urls = $_SESSION['OCS']['url_service']->getUrls(); asort($urls); foreach ($urls as $key => $url) { if ($profile->hasPage($key)) { show_form_field(array(), array(), 'input', 'pages['.$key.']', $url['value'], array('type' => 'checkbox', 'field_class' => 'checkbox-field', 'value' => 'on')); } else { show_form_field(array(), array(), 'input', 'pages['.$key.']', $url['value'], array('type' => 'checkbox', 'field_class' => 'checkbox-field')); } } } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/main_sections/ms_users/views/users_views.php000077500000000000000000000014461303466605000331600ustar00rootroot00000000000000 new MenuElem($l->g(1400), "?".PAG_INDEX."=".$urls->getUrl('ms_users')), 'profiles' => new MenuElem($l->g(1401), "?".PAG_INDEX."=".$urls->getUrl('ms_profiles')), 'add_user' => new MenuElem($l->g(1403), "?".PAG_INDEX."=".$urls->getUrl('ms_add_user')), 'add_profile' => new MenuElem($l->g(1399), "?".PAG_INDEX."=".$urls->getUrl('ms_add_profile')), )); $menu_renderer = new MenuRenderer(); if ($activeMenu) { $menu_renderer->setActiveLink("?".PAG_INDEX."=".$urls->getUrl($activeMenu)); } echo '
          '; echo ''; echo '
          '; } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/options_config/000077500000000000000000000000001303466605000252515ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/options_config/del_old_computors.php000077500000000000000000000033601303466605000315040ustar00rootroot00000000000000".$value['TVALUE']; if ($value['TVALUE']<$timestamp_now or $value['TVALUE'] == null){ $timestamp_limit=mktime(0,date("i"),0,date("m"),date("d")-$value['IVALUE'],date("Y")); $sql="update config set TVALUE='".mktime(0,date("i")+$time_to_delete,0,date("m"),date("d"),date("Y"))."' where NAME='INVENTORY_VALIDITY'"; mysqli_query($_SESSION['OCS']["writeServer"],$sql); $sql="select id,lastdate,name from hardware where UNIX_TIMESTAMP(lastdate) < ".$timestamp_limit." limit ".$max_computer_delete; $res = mysqli_query($_SESSION['OCS']["readServer"], $sql) or die(mysqli_error($_SESSION['OCS']["readServer"])); while( $val = mysqli_fetch_array($res) ){ addLog("DELETE ".$val['name'], $l->g(820)." => ".$val['lastdate']." DATE < ".date("d/m/y H:i:s",$timestamp_limit)); } } //dans 10 minutes } ?> ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/000077500000000000000000000000001303466605000245305ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_admininfo/000077500000000000000000000000001303466605000271625ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_admininfo/sd_admininfo.php000077500000000000000000000165221303466605000323360ustar00rootroot00000000000000getConfigValue('ACCOUNTINFO') == 'YES' and isset($_SESSION['OCS']['ADMIN']['ACCOUNTINFO'])) $admin_accountinfo=true; $list_tab=find_all_account_tab('TAB_ACCOUNTSNMP','SNMP',1); if ($list_tab != ''){ if ($protectedPost['Valid_modif'] != ""){ foreach ($protectedPost as $field=>$value){ $temp_field=explode('_',$field); if (array_key_exists( $temp_field[0] . '_' . $temp_field[1],$info_account_id) or $temp_field[0] == 'TAG'){ //cas of checkbox if (isset($temp_field[2])){ $data_fields_account[$temp_field[0] . "_" . $temp_field[1]].=$temp_field[2] . "&&&"; } else $data_fields_account[$field]=$value; } } updateinfo_snmp($systemid,$data_fields_account); //search all admininfo for this computer $info_account_id=admininfo_snmp($systemid); } unset($action_updown); //UP/DOWN if ((isset($protectedPost['UP']) and $protectedPost['UP'] != '')) $action_updown='UP'; if (isset($protectedPost['DOWN']) and $protectedPost['DOWN'] != '') $action_updown='DOWN'; if (isset($action_updown)){ $new_order=find_new_order($action_updown,$protectedPost[$action_updown],'SNMP',$protectedPost['onglet']); if ($new_order){ // $array_info_account=find_info_accountinfo($new_order['NEW']); update_accountinfo_config($new_order['OLD'],array('SHOW_ORDER'=>$new_order['NEW_VALUE'])); update_accountinfo_config($new_order['NEW'],array('SHOW_ORDER'=>$new_order['OLD_VALUE'])); } } //print_r($info_account_id); if (!isset($protectedPost['onglet']) or $protectedPost['onglet'] =='' or !is_numeric($protectedPost['onglet'])) $protectedPost['onglet'] = $list_tab['FIRST']; unset($list_tab['FIRST']); echo "
          "; echo open_form($form_name); onglet($list_tab,$form_name,"onglet",6); echo '
          '; if ($_SESSION['OCS']['profile']->getConfigValue('ACCOUNTINFO') == 'YES'){ $show_admin_button = ""; if (isset($_SESSION['OCS']['ADMIN']['ACCOUNTINFO'])) $show_admin_button .= ""; else $show_admin_button .= ""; } else $show_admin_button=''; $sql_admin_info="select ID,TYPE,NAME,COMMENT,NAME_ACCOUNTINFO,SHOW_ORDER from accountinfo_config where ID_TAB = %s and account_type='SNMP' order by SHOW_ORDER ASC"; $arg_admin_info=array($protectedPost['onglet']); $res_admin_info=mysql2_query_secure($sql_admin_info,$_SESSION['OCS']["readServer"],$arg_admin_info); $num_row=mysqli_num_rows($res_admin_info); $name_field=array(); $tab_name=array(); $type_field=array(); $value_field=array(); $config['COMMENT_AFTER']=array(); $config['SELECT_DEFAULT']=array(); $config['JAVASCRIPT']=array(); $config['SIZE']=array(); $config['DDE']=array(); $nb_row=1; while ($val_admin_info = mysqli_fetch_array( $res_admin_info )){ array_push($config['DDE'],$systemid); //if name_accountinfo is not null //column name in accountinfo table is name_accountinfo //functionality for compatibility with older version of OCS //we can't change the name TAG in accountinfo table if ($val_admin_info['NAME_ACCOUNTINFO'] != '') $name_accountinfo=trim($val_admin_info['NAME_ACCOUNTINFO']); else $name_accountinfo='fields_' . $val_admin_info['ID']; $up_png=""; if ($nb_row!=1) $up_png.=updown($val_admin_info['ID'],'UP'); if ($nb_row!=$num_row) $up_png.=updown($val_admin_info['ID'],'DOWN'); if ($val_admin_info['TYPE'] == 2 or $val_admin_info['TYPE'] == 4 or $val_admin_info['TYPE'] == 7){ array_push($config['JAVASCRIPT'],''); array_push($config['SIZE'],''); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png . ""); else array_push($config['COMMENT_AFTER'],''); array_push($config['SELECT_DEFAULT'],'YES'); $field_select_values=find_value_field("ACCOUNT_SNMP_VALUE_".$val_admin_info['NAME']); array_push($value_field,$field_select_values); //cas of checkbox if ($val_admin_info['TYPE'] == 4){ $temp_val=explode('&&&',$info_account_id[$name_accountinfo]); $i=0; while (isset($temp_val[$i])){ $protectedPost[$name_accountinfo . '_' . $temp_val[$i]]='on'; $i++; } }else $protectedPost[$name_accountinfo]=$info_account_id[$name_accountinfo]; }elseif ($val_admin_info['TYPE'] == 6){ array_push($value_field,$info_account_id[$name_accountinfo]); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png . datePick($name_accountinfo)); else array_push($config['COMMENT_AFTER'],datePick($name_accountinfo)); array_push($config['JAVASCRIPT'],"READONLY ".dateOnClick($name_accountinfo)); array_push($config['SELECT_DEFAULT'],''); array_push($config['SIZE'],'8'); }elseif ($val_admin_info['TYPE'] == 5){ array_push($value_field,"accountinfo"); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png); else array_push($config['COMMENT_AFTER'],""); array_push($config['SELECT_DEFAULT'],''); array_push($config['JAVASCRIPT'],''); array_push($config['SIZE'],''); }else{ array_push($value_field,$info_account_id[$name_accountinfo]); if ($admin_accountinfo) array_push($config['COMMENT_AFTER'],$up_png); else array_push($config['COMMENT_AFTER'],""); array_push($config['SELECT_DEFAULT'],''); array_push($config['JAVASCRIPT'],''); array_push($config['SIZE'],''); } array_push($name_field,$name_accountinfo); array_push($tab_name,$val_admin_info['COMMENT']); if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_ACCOUNTINFO') == "YES") array_push($type_field,$convert_type[$val_admin_info['TYPE']]); else array_push($type_field,3); $nb_row++; } $tab_typ_champ=show_field($name_field,$type_field,$value_field,$config); if ($_SESSION['OCS']['profile']->getConfigValue('ACCOUNTINFO') == 'YES') $tab_hidden=array('ADMIN'=>'','UP'=>'','DOWN'=>''); //echo ""; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'form_name' => 'NO_FORM', 'top_action' => $show_admin_button )); echo "
          "; echo close_form(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_cards/000077500000000000000000000000001303466605000263125ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_cards/sd_cards.php000077500000000000000000000034701303466605000306140ustar00rootroot00000000000000g(1219)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_cards"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(64)=>'MANUFACTURER', $l->g(66) => 'TYPE', $l->g(36)=>'SERIALNUMBER', $l->g(1235)=>'REFERENCE', $l->g(53)=>'DESCRIPTION', $l->g(277)=>'REVISION', $l->g(1229)=>'FIRMWARE', $l->g(20)=>'SOFTWARE'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_cards'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; $entete = ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_cartridges/000077500000000000000000000000001303466605000273455ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_cartridges/sd_cartridges.php000077500000000000000000000045451303466605000327060ustar00rootroot00000000000000g(1220)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_cartridges"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(66) => 'TYPE', $l->g(1104)=>'LEVEL', $l->g(1225)=>'MAXCAPACITY', $l->g(1226)=>'COLOR', $l->g(53)=>'DESCRIPTION'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); $list_fields["PERCENT_BAR"] = 'CAPACITY'; $tab_options["replace_query_arg"]['CAPACITY']="round(100-(LEVEL*100/MAXCAPACITY))"; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." , round(100-(LEVEL*100/MAXCAPACITY)) AS CAPACITY FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_cartridges'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['LBL']['PERCENT_BAR']=$l->g(1125); $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$l->g(1104)]=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$l->g(1104)]=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$l->g(1225)]=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$l->g(1225)]=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['DOWN']['PERCENT_BAR']=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE']['PERCENT_BAR']=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['UP']['PERCENT_BAR']=100; $tab_options['REPLACE_WITH_LIMIT']['UPVALUE']['PERCENT_BAR']=$msq_tab_error; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_cpus/000077500000000000000000000000001303466605000261705ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_cpus/sd_cpus.php000077500000000000000000000031401303466605000303420ustar00rootroot00000000000000g(54)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_cpus"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(64)=>'MANUFACTURER', $l->g(66) => 'TYPE', $l->g(429)=>'SPEED'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_cpus'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_drives/000077500000000000000000000000001303466605000265125ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_drives/sd_drives.php000077500000000000000000000047031303466605000312140ustar00rootroot00000000000000g(1221)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_drives"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(85)=>'LETTER', $l->g(66) => 'TYPE', $l->g(86)=>'FILESYSTEM', $l->g(87)=>'TOTAL', $l->g(45)=>'FREE', $l->g(137)=>'NUMFILES', $l->g(1230)=>'VOLUMN'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); $list_fields["PERCENT_BAR"] = 'CAPACITY'; $tab_options["replace_query_arg"]['CAPACITY']=" round(100-(FREE*100/TOTAL)) "; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." , round(100-(FREE*100/TOTAL)) AS CAPACITY FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_drives'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['LBL']['PERCENT_BAR']=$l->g(1125); $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$l->g(1104)]=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$l->g(1104)]=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$l->g(1225)]=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$l->g(1225)]=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['DOWN']['PERCENT_BAR']=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE']['PERCENT_BAR']=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['UP']['PERCENT_BAR']=100; $tab_options['REPLACE_WITH_LIMIT']['UPVALUE']['PERCENT_BAR']=$msq_tab_error; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_fans/000077500000000000000000000000001303466605000261455ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_fans/sd_fans.php000077500000000000000000000032441303466605000303010ustar00rootroot00000000000000g(1222)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_fans"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(64)=>'MANUFACTURER', $l->g(66) => 'TYPE', $l->g(36)=>'SERIALNUMBER', $l->g(53)=>'DESCRIPTION', $l->g(277)=>'REVISION'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_fans'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_inputs/000077500000000000000000000000001303466605000265405ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_inputs/sd_inputs.php000077500000000000000000000031071303466605000312650ustar00rootroot00000000000000g(91)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_inputs"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(53)=>'DESCRIPTION', $l->g(66) => 'TYPE'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_inputs'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_localprinters/000077500000000000000000000000001303466605000300775ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_localprinters/sd_localprinters.php000077500000000000000000000030701303466605000341620ustar00rootroot00000000000000g(79)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_localprinters"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(49) => 'NAME'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_localprinters'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_memories/000077500000000000000000000000001303466605000270365ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_memories/sd_memories.php000077500000000000000000000030541303466605000320620ustar00rootroot00000000000000g(26)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_memories"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(83)=>'CAPACITY'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_memories'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_modems/000077500000000000000000000000001303466605000265025ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_modems/sd_modems.php000077500000000000000000000030451303466605000311720ustar00rootroot00000000000000g(270)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_modems"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(49) => 'NAME'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_modems'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_networks/000077500000000000000000000000001303466605000270725ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_networks/sd_networks.php000077500000000000000000000056221303466605000321550ustar00rootroot00000000000000g(82)); $table_name="sd_networks"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(53)=>'DESCRIPTION', $l->g(95)=>'MACADDR', 'DEVICEMACADDR'=>'DEVICEMACADDR', $l->g(271)=>'SLOT', $l->g(1046)=>'STATUS', $l->g(268)=>'SPEED', $l->g(66) => 'TYPE', 'DEVICEADDRESS'=>'DEVICEADDRESS', 'DEVICENAME'=>'DEVICENAME', $l->g(280)=>'TYPEMIB', $l->g(34)=>'IPADDR', $l->g(208)=>'IPMASK', $l->g(207)=>'IPGATEWAY', $l->g(316)=>'IPSUBNET', $l->g(281)=>'IPDHCP', $l->g(278)=>'DRIVER', 'VIRTUALDEV'=>'VIRTUALDEV', 'DEVICEPORT'=>'DEVICEPORT' ); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=array($l->g(53)=>$l->g(53)); $default_fields= array($l->g(53)=>$l->g(53),$l->g(34)=>$l->g(34),$l->g(95)=>$l->g(95),$l->g(1046)=>$l->g(1046),$l->g(280)=>$l->g(280)); $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_networks'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; //link if macadd match with computer /*$tab_options['LIEN_LBL'][$l->g(95)][]="index.php?".PAG_INDEX."=".$pages_refs['ms_computer']."&head=1&systemid="; $tab_options['LIEN_CHAMP'][$l->g(95)][]='ID'; $tab_options['NO_LIEN_CHAMP']['SQL'][$l->g(95)][]="select ID from networks where macaddr='%s'"; $tab_options['NO_LIEN_CHAMP']['ARG'][$l->g(95)][]='MACADDR'; // $tab_options['NO_LIEN_CHAMP']['SQL'][$key] //link if macadd match with snmp device $tab_options['LIEN_LBL'][$l->g(95)][]="index.php?".PAG_INDEX."=".$pages_refs['ms_snmp_detail']."&head=1&id="; $tab_options['LIEN_CHAMP'][$l->g(95)][]='ID'; $tab_options['NO_LIEN_CHAMP']['SQL'][$l->g(95)][]="select ID from snmp where macaddr='%s'"; $tab_options['NO_LIEN_CHAMP']['ARG'][$l->g(95)][]='MACADDR';*/ ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_ports/000077500000000000000000000000001303466605000263655ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_ports/sd_ports.php000077500000000000000000000030741303466605000307420ustar00rootroot00000000000000g(272)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_ports"; $tab_options=$protectedPost; $tab_options['table_name']=$table_name; $tab_options['form_name']=$form_name; $list_fields=array($l->g(49)=>'NAME', $l->g(66) => 'TYPE'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_ports'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_powersupplies/000077500000000000000000000000001303466605000301375ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_powersupplies/sd_powersupplies.php000077500000000000000000000033741303466605000342710ustar00rootroot00000000000000g(1223)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_powersupplies"; $tab_options=$protectedPost; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(64)=>'MANUFACTURER', 'REFERENCE'=>'REFERENCE', $l->g(66) => 'TYPE', $l->g(36)=>'SERIALNUMBER', $l->g(53)=>'DESCRIPTION', $l->g(277)=>'REVISION'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_powersupplies'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_softwares/000077500000000000000000000000001303466605000272335ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_softwares/sd_softwares.php000077500000000000000000000032161303466605000324540ustar00rootroot00000000000000g(20)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_softwares"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(49)=>'NAME', $l->g(1238) => 'INSTALLDATE', $l->g(51)=>'COMMENTS', $l->g(277)=>'VERSION'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_softwares'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_sounds/000077500000000000000000000000001303466605000265315ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_sounds/sd_sounds.php000077500000000000000000000030411303466605000312440ustar00rootroot00000000000000g(96)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_sounds"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(49)=>'NAME'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_sounds'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_storages/000077500000000000000000000000001303466605000270455ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_storages/sd_storages.php000077500000000000000000000034621303466605000321030ustar00rootroot00000000000000 'SNMP_ID', 'MANUFACTURER'=> 'MANUFACTURER', 'NAME' => 'NAME' , 'MODEL' => 'MODEL' , 'DESCRIPTION' => 'DESCRIPTION' , 'TYPE' => 'TYPE' , 'DISKSIZE' => 'DISKSIZE' , 'SERIALNUMBER' => 'SERIALNUMBER', 'FIRMWARE' => 'FIRMWARE' ); //$list_fields['SUP']= 'ID'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql=prepare_sql_tab($list_fields); $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_storages'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); echo close_form(); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_switch/000077500000000000000000000000001303466605000265175ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_switch/sd_switch.php000077500000000000000000000037021303466605000312240ustar00rootroot00000000000000g(1218)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_switch"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; /*MANUFACTURER REFERENCE TYPE SOFTVERSION FIRMVERSION SERIALNUMBER REVISION DESCRIPTION */ $list_fields=array($l->g(64)=>'MANUFACTURER', $l->g(1235)=>'REFERENCE', $l->g(66)=>'TYPE', $l->g(1236)=>'SOFTVERSION', $l->g(1237)=>'FIRMVERSION', $l->g(36)=>'SERIALNUMBER', $l->g(18)=>'REVISION', $l->g(53)=>'DESCRIPTION' ); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=array($l->g(64)=>$l->g(64),$l->g(53)=>$l->g(53)); $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_switchs'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_trays/000077500000000000000000000000001303466605000263605ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_trays/sd_trays.php000077500000000000000000000045001303466605000307230ustar00rootroot00000000000000g(1224)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_trays"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(49) => 'NAME', $l->g(53)=>'DESCRIPTION', $l->g(1104)=>'LEVEL', $l->g(1225)=>'MAXCAPACITY'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); $list_fields["PERCENT_BAR"] = 'CAPACITY'; $tab_options["replace_query_arg"]['CAPACITY']=" round(100-(LEVEL*100/MAXCAPACITY)) "; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." , round(100-(LEVEL*100/MAXCAPACITY)) AS CAPACITY FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_trays'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; $tab_options['LBL']['PERCENT_BAR']=$l->g(1125); $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$l->g(1104)]=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$l->g(1104)]=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$l->g(1225)]=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$l->g(1225)]=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['DOWN']['PERCENT_BAR']=0; $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE']['PERCENT_BAR']=$msq_tab_error; $tab_options['REPLACE_WITH_LIMIT']['UP']['PERCENT_BAR']=100; $tab_options['REPLACE_WITH_LIMIT']['UPVALUE']['PERCENT_BAR']=$msq_tab_error; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_videos/000077500000000000000000000000001303466605000265075ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_videos/sd_videos.php000077500000000000000000000026611303466605000312070ustar00rootroot00000000000000g(61)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="sd_videos"; $list_fields=array($l->g(49)=>'NAME'); //$list_fields['SUP']= 'ID'; $sql=prepare_sql_tab($list_fields); //$list_fields["PERCENT_BAR"] = 'CAPACITY'; $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_videos'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_virtualmachines/000077500000000000000000000000001303466605000304145ustar00rootroot00000000000000sd_virtualmachines.php000077500000000000000000000034031303466605000347350ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/sd_virtualmachinesg(1266)); if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = 'NOSHOW'; $table_name="snmp_virtualmachines"; $tab_options=$protectedPost; $tab_options['form_name']=$form_name; $tab_options['table_name']=$table_name; $list_fields=array($l->g(137)=>'CONFIG_FILE', $l->g(54) => 'CPU', $l->g(23)=>'NAME', $l->g(26)=>'MEMORY', $l->g(25)=>'OS', $l->g(6005)=>'POWER', $l->g(1268)=>'UUID'); $sql=prepare_sql_tab($list_fields); $list_col_cant_del=$list_fields; $default_fields= $list_fields; $sql['SQL'] = $sql['SQL']." FROM %s WHERE (snmp_id=%s)"; $sql['ARG'][]='snmp_virtualmachines'; $sql['ARG'][]=$systemid; $tab_options['ARG_SQL']=$sql['ARG']; ajaxtab_entete_fixe($list_fields,$default_fields,$tab_options,$list_col_cant_del); if ($ajax){ ob_end_clean(); tab_req($list_fields,$default_fields,$list_col_cant_del,$sql['SQL'],$tab_options); ob_start(); } ?>ocsinventory-server-2.2+dfsg/ocsreports/plugins/snmp_detail/snmp_config.txt000077500000000000000000000022111303466605000275720ustar00rootroot00000000000000 sd_admininfo sd_switch sd_cards sd_cartridges sd_drives sd_fans sd_networks sd_powersupplies sd_storages sd_trays sd_cpus sd_inputs sd_localprinters sd_memories sd_modems sd_ports sd_softwares sd_sounds sd_videos sd_virtualmachines sd_admininfo:g(56) sd_switch:g(1218) sd_cards:g(1219) sd_cartridges:g(1220) sd_drives:g(1221) sd_fans:g(1222) sd_networks:g(82) sd_powersupplies:g(1223) sd_storages:g(63) sd_trays:g(1224) sd_cpus:g(54) sd_inputs:g(91) sd_localprinters:g(79) sd_memories:g(26) sd_modems:g(270) sd_ports:g(272) sd_softwares:g(20) sd_sounds:g(96) sd_videos:g(61) sd_virtualmachines:g(1266) sd_admininfo:snmp_accountinfo sd_cards:snmp_cards sd_cartridges:snmp_cartridges sd_drives:snmp_drives sd_fans:snmp_fans sd_networks:snmp_networks sd_powersupplies:snmp_powersupplies sd_storages:snmp_storages sd_trays:snmp_trays sd_switch:snmp_switchs sd_cpus:snmp_cpus sd_inputs:snmp_inputs sd_localprinters:snmp_localprinters sd_memories:snmp_memories sd_modems:snmp_modems sd_ports:snmp_ports sd_softwares:snmp_softwares sd_sounds:snmp_sounds sd_videos:snmp_videos sd_virtualmachines:snmp_virtualmachines ocsinventory-server-2.2+dfsg/ocsreports/require/000077500000000000000000000000001303466605000222245ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/aide_developpement.php000077500000000000000000000020221303466605000265650ustar00rootroot00000000000000"; if (is_array($array)){ foreach($array as $key=>$val) { print "".$key.""; if (is_array($array[$key])) { print_r_V2($array[$key]); print ""; } else print $val.""; } print ""; }else print_r($array); } function p($array){ print_r_V2($array); } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/config/000077500000000000000000000000001303466605000234715ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/config/Profile.php000077500000000000000000000051431303466605000256100ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class Profile { private $name; private $label; private $restrictions; private $config; private $blacklist; private $pages; public function __construct($name, $label) { $this->name = $name; $this->label = $label; $this->restrictions = array(); $this->config = array(); $this->blacklist = array(); $this->pages = array(); } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function getLabel() { return $this->label; } public function getLabelTranslated() { global $l; if (preg_match('/^g\(\d+\)$/', $this->label)) { return $l->g(substr(substr($this->label, 2), 0, -1)); } else { return $this->label; } } public function setLabel($label) { $this->label = $label; } public function getRestrictions() { return $this->restrictions; } public function getRestriction($key, $default = null) { return isset($this->restrictions[$key]) ? $this->restrictions[$key] : $default; } public function setRestriction($key, $restriction) { $this->restrictions[$key] = $restriction; } public function removeRestriction($key) { unset($this->restrictions[$key]); } public function getConfig() { return $this->config; } public function getConfigValue($key, $default = null) { return isset($this->config[$key]) ? $this->config[$key] : $default; } public function setConfig($key, $val) { $this->config[$key] = $val; } public function removeConfig($key) { unset($this->config[$key]); } public function getBlacklist() { return $this->blacklist; } public function hasInBlacklist($value) { return array_search($value, $this->blacklist) !== false; } public function addToBlacklist($value) { if (!$this->hasInBlacklist($value)) $this->blacklist []= $value; } public function removeFromBlacklist($value) { $index = array_search($value, $this->blacklist); if ($index !== false) { array_splice($this->blacklist, $index, 1); } } public function getPages() { return $this->pages; } public function hasPage($name) { return array_search($name, $this->pages) !== false; } public function addPage($name) { if (!$this->hasPage($name)) $this->pages []= $name; } public function removePage($name) { $index = array_search($name, $this->pages); if ($index !== false) { array_splice($this->pages, $index, 1); } } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/TxtJsSerializer.php000077500000000000000000000011751303466605000273170ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class TxtJsSerializer { public function serialize($js) { throw new Exception('Cannot serialize OCS 2.2 js config to old (pre 2.2) txt files'); } public function unserialize($config) { if (!is_array($config)) { return false; } $js = array(); foreach ($config['JAVASCRIPT'] as $file => $path) { $js []= $path.$file; } return $js; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/TxtProfileSerializer.php000077500000000000000000000021331303466605000303360ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class TxtProfileSerializer { public function serialize($profile) { throw new Exception('Cannot serialize OCS 2.2 profile config to old (pre 2.2) txt files'); } public function unserialize($name, $profile_data) { if (!is_array($profile_data)) { return false; } $label = $profile_data['INFO']['NAME']; $profile = new Profile($name, $label); foreach ($profile_data['RESTRICTION'] as $key => $restriction) { $profile->setRestriction($key, $restriction); } foreach ($profile_data['CONFIGURATION'] as $key => $val) { $profile->setConfig($key, $val); } foreach ($profile_data['ADMIN_BLACKLIST'] as $key => $val) { if ($val == 'YES') { $profile->addToBlacklist($key); } } foreach ($profile_data['PAGE_PROFIL'] as $page) { $profile->addPage($page); } return $profile; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/TxtUrlsSerializer.php000077500000000000000000000012351303466605000276650ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class TxtUrlsSerializer { public function serialize(Urls $urls) { throw new Exception('Cannot serialize OCS 2.2 urls to old (pre 2.2) txt files'); } public function unserialize($config) { if (!is_array($config)) { return false; } $urls = new Urls(); foreach ($config['URL'] as $key => $val) { $urls->addUrl($key, $val, $config['DIRECTORY'][$key]); } return $urls; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/Urls.php000077500000000000000000000020401303466605000251260ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class Urls { private $urls; private $urlNames; public function __construct() { $this->urls = array(); $this->urlNames = array(); } public function getUrl($key) { return isset($this->urls[$key]) ? $this->urls[$key]['value'] : null; } public function getDirectory($key) { return isset($this->urls[$key]) ? $this->urls[$key]['directory'] : null; } public function getUrlName($value) { return isset($this->urlNames[$value]) ? $this->urlNames[$value] : null; } public function addUrl($key, $value, $directory) { $this->urls[$key] = array( 'value' => $value, 'directory' => $directory ); // For reverse lookup $this->urlNames[$value] = $key; } public function getUrls() { return $this->urls; } public function getUrlNames() { return $this->urlNames; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/XMLJsSerializer.php000077500000000000000000000016021303466605000271730ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class XMLJsSerializer { public function serialize($js) { $doc_xml = new DOMDocument('1.0', 'UTF-8'); $js_xml = $doc_xml->createElement('javascripts'); $doc_xml->appendChild($js_xml); foreach ($js as $file) { $js_elem_xml = $doc_xml->createElement('file', $file); $js_xml->appendChild($js_elem_xml); } $doc_xml->preserveWhiteSpace = false; $doc_xml->formatOutput = true; return $doc_xml->saveXML(); } public function unserialize($xml) { $js_xml = simplexml_load_string($xml); $js = array(); foreach ($js_xml->{'file'} as $file) { $js []= (string) $file; } return $js; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/XMLProfileSerializer.php000077500000000000000000000052371303466605000302270ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class XMLProfileSerializer { public function serialize(Profile $profile) { $doc_xml = new DOMDocument('1.0', 'UTF-8'); $profile_xml = $doc_xml->createElement('profile'); $profile_xml->setAttribute('label', $profile->getLabel()); $doc_xml->appendChild($profile_xml); $restrictions_xml = $doc_xml->createElement('restrictions'); $profile_xml->appendChild($restrictions_xml); foreach ($profile->getRestrictions() as $key => $restriction) { $restriction_xml = $doc_xml->createElement('restriction', $restriction); $restriction_xml->setAttribute('key', $key); $restrictions_xml->appendChild($restriction_xml); } $config_xml = $doc_xml->createElement('config'); $profile_xml->appendChild($config_xml); foreach ($profile->getConfig() as $key => $value) { $config_elem_xml = $doc_xml->createElement('config-elem', $value); $config_elem_xml->setAttribute('key', $key); $config_xml->appendChild($config_elem_xml); } $blacklist_xml = $doc_xml->createElement('blacklist'); $profile_xml->appendChild($blacklist_xml); foreach ($profile->getBlacklist() as $blacklist_elem) { $blacklist_elem_xml = $doc_xml->createElement('blacklist-elem', $blacklist_elem); $blacklist_xml->appendChild($blacklist_elem_xml); } $pages_xml = $doc_xml->createElement('pages'); $profile_xml->appendChild($pages_xml); foreach ($profile->getPages() as $key => $page) { $page_xml = $doc_xml->createElement('page', $page); $pages_xml->appendChild($page_xml); } $doc_xml->preserveWhiteSpace = false; $doc_xml->formatOutput = true; return $doc_xml->saveXML(); } public function unserialize($name, $xml) { $profile_xml = simplexml_load_string($xml); $label = (string) $profile_xml['label']; $profile = new Profile($name, $label); foreach ($profile_xml->restrictions->restriction as $restriction_xml) { $key = (string) $restriction_xml['key']; $val = (string) $restriction_xml; $profile->setRestriction($key, $val); } foreach ($profile_xml->config->{'config-elem'} as $config_xml) { $key = (string) $config_xml['key']; $val = (string) $config_xml; $profile->setConfig($key, $val); } foreach ($profile_xml->blacklist->{'blacklist-elem'} as $blacklist_xml) { $profile->addToBlacklist((string) $blacklist_xml); } foreach ($profile_xml->pages->page as $page_xml) { $profile->addPage((string) $page_xml); } return $profile; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/XMLUrlsSerializer.php000077500000000000000000000026151303466605000275510ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class XMLUrlsSerializer { public function serialize(Urls $urls) { $doc_xml = new DOMDocument('1.0', 'UTF-8'); $urls_xml = $doc_xml->createElement('urls'); $doc_xml->appendChild($urls_xml); foreach ($urls->getUrls() as $key => $url) { $url_elem_xml = $doc_xml->createElement('url'); $url_value_xml = $doc_xml->createElement('value', $url['value']); $url_directory_xml = $doc_xml->createElement('directory', $url['directory']); $url_elem_xml->setAttribute('key', $key); $url_elem_xml->appendChild($url_value_xml); $url_elem_xml->appendChild($url_directory_xml); $urls_xml->appendChild($url_elem_xml); } $doc_xml->preserveWhiteSpace = false; $doc_xml->formatOutput = true; return $doc_xml->saveXML(); } public function unserialize($xml) { $urls_xml = simplexml_load_string($xml); $urls = new Urls($urls); foreach ($urls_xml->{'url'} as $url_elem_xml) { $url_key = (string) $url_elem_xml['key']; $url_val = (string) $url_elem_xml->value; $url_directory = (string) $url_elem_xml->directory; $urls->addUrl($url_key, $url_val, $url_directory); } return $urls; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/config/include.php000077500000000000000000000037671303466605000256450ustar00rootroot00000000000000g(2029)); exit; } require_once('require/function_files.php'); $config = read_config_file(); migrate_urls_2_2($config); migrate_js_2_2($config); migrate_profiles_2_2(); migrate_menus_2_2($config); } function migrate_urls_2_2($config) { $txt_serializer = new TxtUrlsSerializer(); $xml_serializer = new XMLUrlsSerializer(); $filename = DOCUMENT_REAL_ROOT.'/config/urls.xml'; $urls = $txt_serializer->unserialize($config); $xml = $xml_serializer->serialize($urls); file_put_contents($filename, $xml); } function migrate_js_2_2($config) { $txt_serializer = new TxtJsSerializer(); $xml_serializer = new XMLJsSerializer(); $filename = DOCUMENT_REAL_ROOT.'/config/js.xml'; $js = $txt_serializer->unserialize($config); $xml = $xml_serializer->serialize($js); file_put_contents($filename, $xml); } function migrate_profiles_2_2() { if (!file_exists(DOCUMENT_REAL_ROOT.'/config/profiles')) { mkdir(DOCUMENT_REAL_ROOT.'/config/profiles'); } if (!is_writable(DOCUMENT_REAL_ROOT.'/config/profiles')) { msg_error($l->g(2116)); exit; } $txt_serializer = new TxtProfileSerializer(); $xml_serializer = new XMLProfileSerializer(); foreach(scandir($_SESSION['OCS']['CONF_PROFILS_DIR']) as $file) { if (preg_match('/^(.+)_config\.txt$/', $file, $matches) and $matches[1] != '4all') { $profile_name = $matches[1]; $profile_data = read_profil_file($profile_name); $profile = $txt_serializer->unserialize($profile_name, $profile_data); $xml = $xml_serializer->serialize($profile); file_put_contents(DOCUMENT_REAL_ROOT.'/config/profiles/'.$profile_name.'.xml', $xml); } } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/fichierConf.class.php000077500000000000000000000055141303466605000262700ustar00rootroot00000000000000plug_language[$tok1] = $tok2; } fclose($file); echo MAIN_SECTIONS_DIR.$key.'/language/'.$language.".txt
          "; } /*if ($file) { while (!feof($file)) { $val = fgets($file, 1024); $tok1 = rtrim(strtok($val," ")); $tok2 = rtrim(strtok("")); $this->plug_language[$tok1] = $tok2; } fclose($file); } */ } //echo $_SESSION['OCS']['main_sections_dir'].$key.'/language/'.$language.".txt"; //p($rep_list); } $language_file=PLUGINS_DIR."language/".$language."/".$language.".txt"; if (file_exists ( $language_file) ){ $file=fopen($language_file,"r"); if ($file) { while (!feof($file)) { $val = fgets($file, 1024); $tok1 = rtrim(strtok($val," ")); $tok2 = rtrim(strtok("")); $this->tableauMots[$tok1] = $tok2; } fclose($file); } } } function g($i) { global $tab_dont_see; //If word doesn't exist for language, return default english word if ($this->tableauMots[$i] == NULL) { $defword = new language('english'); $word= $defword->tableauMots[$i]; }else $word=$this->tableauMots[$i]; //language mode if ($_SESSION['OCS']['MODE_LANGUAGE']=="ON"){ if (!in_array($i, $tab_dont_see)) $_SESSION['OCS']['EDIT_LANGUAGE'][$i]=$word; $word.="{".$i."}"; } return stripslashes($word); } function g_plug($i){ if ($this->plug_language[$i] == NULL) { $defword = new language('english','plugin'); $word= $defword->plug_language[$i]; }else $word=$this->plug_language[$i]; return stripslashes($word); } } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/footer.php000077500000000000000000000102751303466605000242430ustar00rootroot00000000000000 function report_id(){ document.getElementById('ID_WORD').value=document.getElementById('WORD').value; } function report_lbl(){ document.getElementById('WORD').value=''; document.getElementById('WORD').value=document.getElementById('ID_WORD').value; } "; $form_language="ADMIN_LANGUAGE"; echo "
          "; $action['MODIF']=$l->g(115); $action['DEL']=$l->g(122); $action['ADD']=$l->g(116); $tab_typ_champ[0]['DEFAULT_VALUE']=$action; $tab_typ_champ[0]['INPUT_NAME']="ACTION"; $tab_typ_champ[0]['INPUT_TYPE']=2; $tab_typ_champ[0]['RELOAD']=$form_language; //$tab_typ_champ[0]['CONFIG']['JAVASCRIPT']="onclick='report_id();'"; $tab_name[0]=$l->g(443).":"; if (isset($protectedPost['ACTION']) and $protectedPost['ACTION'] != ''){ if ($protectedPost['ACTION'] != 'ADD'){ $tab_typ_champ[1]['DEFAULT_VALUE']=$_SESSION['OCS']['EDIT_LANGUAGE']; $tab_typ_champ[1]['INPUT_NAME']="WORD"; $tab_typ_champ[1]['INPUT_TYPE']=2; $tab_typ_champ[1]['CONFIG']['JAVASCRIPT']="onclick='report_id();'"; $tab_name[1]=$l->g(1131).":"; $function_javascript="report_lbl();"; }else $function_javascript=""; $tab_typ_champ[2]['DEFAULT_VALUE']=$protectedPost['ID_WORD']; $tab_typ_champ[2]['INPUT_NAME']="ID_WORD"; $tab_typ_champ[2]['INPUT_TYPE']=0; $tab_typ_champ[2]['CONFIG']['SIZE']=5; $tab_typ_champ[2]['CONFIG']['MAXLENGTH']=20; $tab_typ_champ[2]['CONFIG']['JAVASCRIPT']="onclick='".$function_javascript."' onKeyPress='return scanTouche(event,/[0-9]/)' onkeydown='".$function_javascript."' onkeyup='".$function_javascript."' onblur='".$function_javascript."'"; $tab_name[2]=$l->g(1132).":"; if($protectedPost['ACTION'] != 'DEL'){ $tab_typ_champ[3]['DEFAULT_VALUE']=$protectedPost['UPDATE']; $tab_typ_champ[3]['INPUT_NAME']="UPDATE"; $tab_typ_champ[3]['INPUT_TYPE']=0; $tab_typ_champ[3]['CONFIG']['SIZE']=60; $tab_typ_champ[3]['CONFIG']['MAXLENGTH']=255; $tab_name[3]=$l->g(1133).":"; } $show_buttons=true; }else $show_buttons=false; tab_modif_values($tab_name,$tab_typ_champ,'',$l->g(1130),$comment="","EDITION",$show_buttons,$form_language);*/ } if (!AJAX) { if ($_SESSION['OCS']['DEBUG'] == 'ON'){ if (isset($_SESSION['OCS']['SQL_DEBUG'])){ msg_info("".$l->g(5001)."

          ".implode('

          ',$_SESSION['OCS']['SQL_DEBUG'])); } echo "
          "; echo "
          VAR POST
          "; if (isset($protectedPost)) print_r_V2($protectedPost); echo "
          "; echo "
          VAR SESSION
          "; foreach ($_SESSION['OCS'] as $key=>$value){ if ($key != "fichLang" and $key != "LANGUAGE_FILE" and $key != "mac" and $key != "writeServer" and $key != "readServer"){ $tab_session[$key]=$value; } } if (isset($tab_session)) print_r_V2($tab_session); } // echo"
          "; // echo"
           "; $fin = microtime(true); if($_SESSION['OCS']["DEBUG"]=="ON") { echo "CACHE: ON":"red'>OFF")."   ".round($fin-$debut, 3) ." secondes   "; echo ""; } // if (isset($span_wait)) // echo ""; // echo"
          "; echo open_form('ACTION_CLIC'); echo ""; echo ""; echo close_form(); echo ''; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_admininfo.php000077500000000000000000000411171303466605000266150ustar00rootroot00000000000000g(802)),'CHECKBOX', 'BLOB (FILE)','DATE','RADIOBUTTON','QRCODE'); $sql_type_accountinfo=array('VARCHAR(255)','LONGTEXT','VARCHAR(255)', 'VARCHAR(255)','VARCHAR(255)','BLOB','DATE', 'VARCHAR(255)','VARCHAR(255)'); $convert_type=array('0','1','2','3','5','8','0','11','12'); $array_qr_values=array('URL'=>$l->g(646), 'NAME'=>$l->g(35), 'UID'=>$l->g(1268), 'IPADDR'=>$l->g(34)); $array_qr_action=array('URL'=>array('TYPE'=>'url','VALUE'=>OCSREPORT_URL."/index.php?".PAG_INDEX."=".$pages_refs['ms_computer']."&head=1&systemid=".$_GET['systemid']), 'NAME'=>array('TYPE'=>'bdd','VALUE'=>"hardware.name"), 'UID'=>array('TYPE'=>'bdd','VALUE'=>"hardware.uuid"), 'IPADDR'=>array('TYPE'=>'bdd','VALUE'=>"hardware.ipaddr")); function accountinfo_tab($id){ global $type_accountinfo; $info_tag=find_info_accountinfo($id); if ($info_tag[$id]['type'] == 2 or $info_tag[$id]['type'] == 4 or $info_tag[$id]['type'] == 7){ $info=find_value_field('ACCOUNT_VALUE_'.$info_tag[$id]['name']); return $info; }elseif ( $info_tag[$id]['type'] == 5) return false; return true; //if () } function max_order($table,$field){ $sql="SELECT max(%s) as max_id FROM %s"; $arg=array($field,$table); $result=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); $val = mysqli_fetch_array( $result ); return $val['max_id']+1; } /* * When you add a new accountinfo * you need to add few fields on * some tables * * */ function add_accountinfo($newfield,$newtype,$newlbl,$tab,$type='COMPUTERS',$default_value){ global $l,$sql_type_accountinfo; if ($type == 'COMPUTERS') $table="accountinfo"; elseif ($type == 'SNMP') $table="snmp_accountinfo"; else{ //msg_error($type); return array('ERROR'=>$type); } //can not contain special characters if(preg_match('/[^0-9A-Za-z]/',$newfield)) return array('ERROR'=> $l->g(1178).' : ' . $l->g(1070) . " " . $l->g(1179) . "
          "); $ERROR=dde_exist($newfield,'',$type); $id_order=max_order('accountinfo_config','SHOW_ORDER'); if ($ERROR == ''){ $sql_insert_config="INSERT INTO accountinfo_config (TYPE,NAME,ID_TAB,COMMENT,SHOW_ORDER,ACCOUNT_TYPE,DEFAULT_VALUE) values(%s,'%s',%s,'%s',%s,'%s','%s')"; $arg_insert_config=array($newtype, $newfield, $tab, $newlbl,$id_order,$type,$default_value); mysql2_query_secure($sql_insert_config,$_SESSION['OCS']["writeServer"],$arg_insert_config); $sql_add_column="ALTER TABLE ".$table." ADD COLUMN fields_%s %s default NULL"; $arg_add_column=array(mysqli_insert_id($_SESSION['OCS']["writeServer"]),$sql_type_accountinfo[$newtype]); mysql2_query_secure($sql_add_column,$_SESSION['OCS']["writeServer"],$arg_add_column); unset($newfield,$newlbl,$_SESSION['OCS']['TAG_LBL']); //msg_success($l->g(1069)); return array('SUCCESS'=>$l->g(1069)); }else return array('ERROR'=>$ERROR); //msg_error($ERROR); } /* * Del an accountinfo * * */ function del_accountinfo($id){ global $l; //SNMP or COMPUTERS? $sql_found_account_type="SELECT account_type FROM accountinfo_config WHERE id = '%s'"; $arg_found_account_type=$id; $result= mysql2_query_secure($sql_found_account_type,$_SESSION['OCS']["readServer"],$arg_found_account_type); $val = mysqli_fetch_array( $result ); if ($val['account_type'] == "SNMP") $table="snmp_accountinfo"; elseif ($val['account_type'] == "COMPUTERS") $table="accountinfo"; else return FALSE; //DELETE INTO CONFIG TABLE $sql_delete_config="DELETE FROM accountinfo_config WHERE ID = '%s'"; $arg_delete_config=$id; mysql2_query_secure($sql_delete_config,$_SESSION['OCS']["writeServer"],$arg_delete_config); //ALTER TABLE ACCOUNTINFO $sql_DEL_column="ALTER TABLE ".$table." DROP COLUMN fields_%s"; $arg_DEL_column=$id; mysql2_query_secure($sql_DEL_column,$_SESSION['OCS']["writeServer"],$arg_DEL_column); unset($_SESSION['OCS']['TAG_LBL']); } /* * * Find all categories of accountinfo * if $onlyactiv exist, return only categories with data inside * */ function find_all_account_tab($tab_value,$onlyactiv='',$first=''){ $sql_tab_account="select IVALUE,TVALUE from config "; if ($onlyactiv != ''){ $sql_tab_account .= ", accountinfo_config"; } $sql_tab_account .= " where config.name like '%s'"; if ($onlyactiv != ''){ $sql_tab_account .= " and accountinfo_config.id_tab=config.ivalue and accountinfo_config.account_type='".$onlyactiv."'"; } $arg_tab_account=$tab_value.'%'; $result_tab_account=mysql2_query_secure($sql_tab_account,$_SESSION['OCS']["readServer"],$arg_tab_account); while ($val_tab_account = mysqli_fetch_array( $result_tab_account )){ if (!isset($array_tab_account['FIRST']) and $first != '') $array_tab_account['FIRST']=$val_tab_account['IVALUE']; $array_tab_account[$val_tab_account['IVALUE']]=$val_tab_account['TVALUE']; } return $array_tab_account; } function find_value_field($name){ $array_tab_account=array(); $data= look_config_default_values($name.'\_%',true); if (isset($data['name'])){ foreach ($data['name'] as $field=>$value) { $array_tab_account[$data['ivalue'][$field]]=$data['tvalue'][$field]; } } return $array_tab_account; } /* * Find detail of an accountinfo. * You can have $id = accountinfo_id * or $id=array(accountinfo_id1,accountinfo_id2,accountinfo_id2...) * */ function find_info_accountinfo($id = '',$type='',$exclu_type=''){ $list_field=array('id','type','name','id_tab','comment','show_order','account_type','default_value'); if ($type != ''){ $where=" where account_type='".$type."' "; $and=" and account_type='".$type."' "; }else{ $where=""; $and=""; } if ($exclu_type != ''){ if ($where != ''){ $where.=" and type not in (".$exclu_type.") "; $and.=" and type not in (".$exclu_type.")"; } } if (is_array($id)){ $sql_info_account="select " . implode(',',$list_field) . " from accountinfo_config where id in (%s) ".$and." order by show_order DESC"; $arg_info_account=array(implode(',',$id)); }elseif ($id != ''){ $sql_info_account="select " . implode(',',$list_field) . " from accountinfo_config where id=%s ".$and." order by show_order DESC"; $arg_info_account=array($id); }else{ $sql_info_account="select " . implode(',',$list_field) . " from accountinfo_config ".$where." order by show_order DESC"; $arg_info_account=array(); } $result_info_account=mysql2_query_secure($sql_info_account,$_SESSION['OCS']["readServer"],$arg_info_account); while ($val_info_account = mysqli_fetch_array( $result_info_account )){ $array_info_account[$val_info_account['id']]=$val_info_account; } return $array_info_account; } function witch_field_more($account_type = ''){ $list_field=array('ID','TYPE','NAME','COMMENT'); $list_fields=array(); $list_name=array(); $list_type=array(); $sql_accountinfo="select " . implode(',',$list_field) . " from accountinfo_config "; if ($account_type != '') $sql_accountinfo.= " where account_type = '".$account_type."' "; $result_accountinfo = mysql2_query_secure($sql_accountinfo,$_SESSION['OCS']["readServer"]); while($item = mysqli_fetch_object($result_accountinfo)){ $list_fields[$item->ID]=$item->COMMENT; $list_name[$item->ID]=$item->NAME; $list_type[$item->ID]=$item->TYPE; } return array('LIST_FIELDS'=>$list_fields,'LIST_NAME'=>$list_name,'LIST_TYPE'=>$list_type); } function update_accountinfo_config($id,$array_new_values){ //Update global $sql_type_accountinfo; $sql_update_config="UPDATE accountinfo_config SET "; $arg_update_config=array(); foreach ($array_new_values as $field=>$value){ if ($field == "TYPE"){ $new_type_field=$sql_type_accountinfo[$value]; } $sql_update_config.="%s='%s', "; array_push($arg_update_config,$field); array_push($arg_update_config,$value); } $sql_update_config = substr($sql_update_config,0,-2); if (is_numeric($id)){ $sql_update_config.=" WHERE ID = '%s'"; array_push($arg_update_config,$id); }else{ $temp_id=explode(',',$id); $sql_update_config.=" WHERE ID IN ("; foreach ($temp_id as $key=>$value){ $sql_update_config.=$value . "%s,"; array_push($arg_update_config,$value); } $sql_update_config = substr($sql_update_config,0,-1) . ")"; } mysql2_query_secure($sql_update_config,$_SESSION['OCS']["writeServer"],$arg_update_config); unset($_SESSION['OCS']['TAG_LBL']); return $new_type_field; } function find_new_order($updown,$id,$type,$onglet){ $tab_order=array(); if (!is_numeric($id) or !is_numeric($onglet)) return false; $sql="select ID,SHOW_ORDER from accountinfo_config where account_type='%s' and id_tab=%s order by show_order"; $arg=array($type,$onglet); $result = mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); while($item = mysqli_fetch_object($result)){ $array_id[]=$item->ID; $array_order[]=$item->SHOW_ORDER; } foreach($array_id as $key=>$value){ if ($array_id[$key] == $id){ if ($updown == 'UP'){ $tab_order['NEW']=$array_id[$key-1]; $tab_order['NEW_VALUE']=$array_order[$key-1]; }else{ $tab_order['NEW']=$array_id[$key+1]; $tab_order['NEW_VALUE']=$array_order[$key+1]; } $tab_order['OLD']=$value; $tab_order['OLD_VALUE']=$array_order[$key]; } } return $tab_order; } /* * update an accountinfo * * */ function update_accountinfo($id,$array_new_values,$type){ global $l,$sql_type_accountinfo; //print_r($array_new_values); $error=dde_exist($array_new_values['NAME'],$id,$type); if ($error == ''){ //Update $new_type_field=update_accountinfo_config($id,$array_new_values); //update column type in accountinfo table $sql_update_column="ALTER TABLE accountinfo change fields_%s fields_%s %s"; $arg_update_column=array($id,$id,$new_type_field); mysql2_query_secure($sql_update_column,$_SESSION['OCS']["writeServer"],$arg_update_column); return array('SUCCESS'=>$l->g(711)); }else{ return array('ERROR'=>$error); } } /* * * Function : is this name of accountinfo exist? * if you put a value to $id, you add a condition * and restraint your search to all other id * */ function dde_exist($name,$id='',$type){ global $l; if (trim($name) != ''){ $sql_verif="SELECT count(*) c FROM accountinfo_config WHERE NAME = '%s' and ACCOUNT_TYPE='%s'"; $arg_verif=array($name,$type); if ($id != '' and is_numeric($id)){ $sql_verif.=" AND ID != %s"; array_push($arg_verif,$id); } $res_verif=mysql2_query_secure($sql_verif,$_SESSION['OCS']["readServer"],$arg_verif); $val_verif = mysqli_fetch_array( $res_verif ); //this name is already exist if ($val_verif['c'] > 0) return $l->g(1067); }else //name can't be null return $l->g(1068); return; } /* * *Find all accountinfo for * a computer * */ function admininfo_computer($id = ""){ global $l; if (!is_numeric($id) and $id != "") return $l->g(623); $arg_account_data=array(); $sql_account_data="SELECT * FROM accountinfo "; if (is_numeric($id)){ $sql_account_data.= " WHERE hardware_id=%s"; $arg_account_data=array($id); }else $sql_account_data.= " LIMIT 1 "; $res_account_data=mysql2_query_secure($sql_account_data,$_SESSION['OCS']["readServer"],$arg_account_data); $val_account_data = mysqli_fetch_array( $res_account_data ); if (is_array($val_account_data)) return $val_account_data; else return $l->g(1093); } function updateinfo_computer($id,$values,$list=''){ global $l; if (!is_numeric($id) and $list == '') return $l->g(623); $arg_account_data=array(); $sql_account_data="UPDATE accountinfo SET "; foreach ($values as $field=>$val){ $sql_account_data .= " %s='%s', "; array_push($arg_account_data,$field); array_push($arg_account_data,$val); } $sql_account_data = substr($sql_account_data,0,-2); if (is_numeric($id) and $list == '') $sql_account_data.=" WHERE hardware_id=%s"; if ($list != '') $sql_account_data.=" WHERE hardware_id in (%s)"; array_push($arg_account_data,$id); mysql2_query_secure($sql_account_data,$_SESSION['OCS']["readServer"],$arg_account_data); return $l->g(1121); } function updown($field,$type){ global $form_name; if ($type == 'UP'){ return ""; }elseif ($type == 'DOWN'){ return ""; } } function show_accountinfo($id='',$type='',$exclu_type =''){ global $convert_type,$protectedPost; $data=find_info_accountinfo($id,$type,$exclu_type); $i=0; foreach($data as $k=>$v){ foreach ($v as $key=>$value){ switch ($key){ case "id": if ($v['name'] != 'TAG') $name_field[$i]='fields_'.$value; else{ $name_field[$i]=$v['name']; $value_field[$i]=$protectedPost[$v['name']]; } break; case "type": $type_field[$i]=$convert_type[$value]; switch ($value){ case '6': $comment_behing[$i]=datePick('fields_'.$v['id']); $config[$i]['CONFIG']['JAVASCRIPT']="READONLY ".dateOnClick('fields_'.$v['id']); $config[$i]['CONFIG']['SIZE']=7; break; case '4': case '2': case '7': $value_field[$i]=find_value_field("ACCOUNT_VALUE_".$v['name']); $comment_behing[$i]=''; $config[$i]['CONFIG']['DEFAULT']='YES'; break; case '1': $config[$i]['CONFIG']['COLS']=40; $config[$i]['CONFIG']['ROWS']=5; break; default: $comment_behing[$i]=''; $config[$i]['CONFIG']['SIZE']=20; break; } break; case "comment": $tab_name[$i]=$value; break; } } if (!isset($value_field[$i])) $value_field[$i]=$protectedPost['fields_'.$v['id']]; $i++; } return array('FIELDS'=>array('name_field'=>$name_field, 'tab_name'=>$tab_name, 'type_field'=> $type_field, 'value_field'=>$value_field), 'CONFIG'=>$config, 'COMMENT_AFTER'=>$comment_behing); } function insertinfo_computer($id,$fields,$values){ array_push($fields,'hardware_id'); array_push($values,$id); $sql="insert into accountinfo "; $arg_sql=array(); $sql=mysql2_prepare($sql,$arg_sql,$fields,$nocot=true); $sql['SQL'].=" values "; $sql=mysql2_prepare($sql['SQL'],$sql['ARG'],$values); mysql2_query_secure($sql['SQL'],$_SESSION['OCS']["writeServer"],$sql['ARG']); } function replace_tag_value($type='',$option=array()){ $info_tag=find_info_accountinfo('',$type); if (is_array($info_tag)){ foreach ($info_tag as $key=>$value){ $info_value_tag= accountinfo_tab($value['id']); if (is_array($info_value_tag)){ $comment = ''; if (isset($option['comment_be'])) $comment .= $option['comment_be']; $comment .= $value['comment']; if (isset($option['comment_aft'])) $comment .= $option['comment_aft']; $tab_options[$comment] = $info_value_tag; } } } return $tab_options; } function find_value_in_field($tag,$value_2_find,$type='COMPUTERS'){ $p=find_info_accountinfo($tag,$type); $values=look_config_default_values('ACCOUNT_VALUE_'.$p[$tag]['name']."_%",true); if (is_array($values['tvalue'])){ foreach ($values['tvalue'] as $key=>$value){ if (stristr($value, $value_2_find)){ $decoup=explode('_',$key); $fr = array_pop($decoup); $list_tag_id[]=$fr; } } return $list_tag_id; }else return false; } function interprete_accountinfo($list_fields,$tab_options){ global $l; $info_tag=find_info_accountinfo('','COMPUTERS'); if (is_array($info_tag)){ foreach ($info_tag as $key=>$value){ $value['comment']=$l->g(1210)." ".$value['comment']; $info_value_tag= accountinfo_tab($value['id']); if (is_array($info_value_tag)){ $tab_options['REPLACE_VALUE'][$value['comment']]=$info_value_tag; } if ($value['name'] != 'TAG' and $info_value_tag) $list_fields[$value['comment']]='a.fields_'.$value['id']; elseif ($value['name'] == 'TAG'){ $list_fields[$value['comment']]='a.TAG'; $default_value[$value['comment']]=$value['comment']; } } } return array('TAB_OPTIONS'=>$tab_options,'LIST_FIELDS'=>$list_fields,'DEFAULT_VALUE'=>$default_value); } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/function_commun.php000077500000000000000000000316111303466605000261450ustar00rootroot00000000000000 replace with your data if config data is null or empty //default_values => array(array())// ex: array('LOCAL_SERVER'=>array('TVALUE'=>'http:\\localhost')) function look_config_default_values($field_name,$like='',$default_values=''){ if ($like == ''){ $sql="select NAME,IVALUE,TVALUE,COMMENTS from config where NAME in "; $arg_sql=array(); $arg=mysql2_prepare($sql,$arg_sql,$field_name); }else{ $arg['SQL']="select NAME,IVALUE,TVALUE,COMMENTS from config where NAME like '%s'"; $arg['ARG']=$field_name; } $resdefaultvalues=mysql2_query_secure($arg['SQL'],$_SESSION['OCS']["readServer"],$arg['ARG']); while($item = mysqli_fetch_object($resdefaultvalues)){ $result['name'][$item ->NAME]=$item ->NAME; $result['ivalue'][$item ->NAME]=$item ->IVALUE; $result['tvalue'][$item ->NAME]=$item ->TVALUE; $result['comments'][$item ->NAME]=$item ->COMMENTS; } if (is_array($default_values)){ foreach ($default_values as $key=>$value){ $key=strtolower($key); if (is_array($value)){ foreach ($value as $name=>$val){ if (!isset($result[$key][$name]) or $result[$key][$name] == '') $result[$key][$name] = $val; } } } } return $result; } /******************************************************SQL FUNCTION****************************************************/ function generate_secure_sql($sql,$arg=''){ if (is_array($arg)){ foreach ($arg as $key=>$value){ $arg_array_escape_string[]=mysqli_real_escape_string($_SESSION['OCS']["readServer"],$value); } $arg_escape_string=$arg_array_escape_string; }elseif ($arg != ''){ $arg_escape_string=mysqli_real_escape_string($_SESSION['OCS']["readServer"],$arg); } if (isset($arg_escape_string)){ if (is_array($arg_escape_string)){ $sql = vsprintf($sql,$arg_escape_string); }else $sql = sprintf($sql,$arg_escape_string); } return $sql; } function mysql2_query_secure($sql,$link,$arg='',$log=false){ global $l,$lbl_log; $query = generate_secure_sql($sql,$arg); if ($log){ addLog( $log, $query,$lbl_log); } if ($_SESSION['OCS']['DEBUG'] == 'ON'){ $_SESSION['OCS']['SQL_DEBUG'][]=html_entity_decode($query,ENT_QUOTES); } if(DEMO){ $rest = mb_strtoupper(substr($query, 0, 6)); if ($rest == 'UPDATE' or $rest == 'INSERT' or $rest == 'DELETE'){ if(DEMO_MSG != 'show'){ msg_info($l->g(2103)); define('DEMO_MSG','show'); } return false; } } $result=mysqli_query( $link,$query ); if ($_SESSION['OCS']['DEBUG'] == 'ON' and !$result) msg_error(mysqli_error($link)); return $result; } /* * use this function before mysql2_query_secure * $sql= requeste * $arg_sql = arguments for mysql2_query_secure * $arg_tab = arguments to implode * */ function mysql2_prepare($sql,$arg_sql,$arg_tab='',$nocot=false){ if ($arg_sql == '') $arg_sql = array(); if (!is_array($arg_tab)){ $arg_tab=explode(',',$arg_tab); } $sql.=" ( "; foreach ($arg_tab as $key=>$value){ if (!$nocot) $sql.=" '%s', "; else $sql.=" %s, "; array_push($arg_sql,$value); } $sql = substr($sql,0,-2) . " ) "; return array('SQL'=>$sql,'ARG'=>$arg_sql); } function prepare_sql_tab($list_fields,$explu=array(),$distinct=false){ $begin_arg = array(); $begin_sql = "SELECT "; if ($distinct) $begin_sql .= " distinct "; foreach ($list_fields as $key=>$value){ if (!in_array($key,$explu)){ $begin_sql .= '%s, '; array_push($begin_arg,$value); } } return array('SQL'=>substr($begin_sql,0,-2)." ",'ARG'=>$begin_arg); } function dbconnect($server,$compte_base,$pswd_base,$db = DB_NAME) { error_reporting(E_ALL & ~E_NOTICE); mysqli_report(MYSQLI_REPORT_STRICT); //$link is ok? try{ $link = mysqli_connect($server,$compte_base,$pswd_base); } catch (Exception $e){ if(mysqli_connect_errno()) { return "ERROR: MySql connection problem ".$e->getCode()."
          ".$e->getMessage(); } } //database is ok? if( ! mysqli_select_db($link,$db)) { return "NO_DATABASE"; } //force UTF-8 mysqli_query($link,"SET NAMES 'utf8'"); //sql_mode => not strict mysqli_query($link,"SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'"); return $link; } /***********************************END SQL FUNCTION******************************************/ function addLog( $type, $value="",$lbl_sql='') { //global $logHandler; if ($_SESSION['OCS']['LOG_GUI'] == 1){ if (is_writable(LOG_FILE)){ $logHandler = fopen( LOG_FILE, "a"); $dte = getDate(); $date = sprintf("%02d/%02d/%04d %02d:%02d:%02d", $dte["mday"], $dte["mon"], $dte["year"], $dte["hours"], $dte["minutes"], $dte["seconds"]); if ($lbl_sql != ''){ $value=$lbl_sql.' => '.$value; } $towite=$_SESSION['OCS']["loggeduser"].";".$date.";".DB_NAME.";".$type.";".$value.";".$_SERVER['REMOTE_ADDR'].";\n"; fwrite($logHandler,$towite); fclose($logHandler); } } } function dateTimeFromMysql($v) { global $l; if( $l->g(269) == "%m/%d/%Y" ) $ret = sprintf("%02d/%02d/%04d %02d:%02d:%02d", $v[5].$v[6], $v[8].$v[9], $v, $v[11].$v[12],$v[14].$v[15],$v[17].$v[18]); else $ret = sprintf("%02d/%02d/%04d %02d:%02d:%02d", $v[8].$v[9], $v[5].$v[6], $v, $v[11].$v[12],$v[14].$v[15],$v[17].$v[18]); return $ret; } function dateToMysql($date_cible) { global $l; if(!isset($date_cible)) return ""; $dateAr = explode("/", $date_cible); if( $l->g(269) == "%m/%d/%Y" ) { $jour = $dateAr[1]; $mois = $dateAr[0]; } else { $jour = $dateAr[0]; $mois = $dateAr[1]; } $annee = $dateAr[2]; return sprintf("%04d-%02d-%02d", $annee, $mois, $jour); } function reloadform_closeme($form='',$close=false){ echo ""; } function read_profil_file($name,$writable=''){ global $l; //Select config file depending on user profile $ms_cfg_file= $_SESSION['OCS']['CONF_PROFILS_DIR'].$name."_config.txt"; $search=array('INFO'=>'MULTI','PAGE_PROFIL'=>'MULTI','RESTRICTION'=>'MULTI','ADMIN_BLACKLIST'=>'MULTI','CONFIGURATION'=>'MULTI'); if (!is_writable($_SESSION['OCS']['OLD_CONF_DIR']) and $writable!='') { msg_error($l->g(297).":
          ".$_SESSION['OCS']['OLD_CONF_DIR']."
          ".$l->g(1148)); } return read_files($search,$ms_cfg_file,$writable); } function read_config_file($writable=''){ //Select config file depending on user profile $ms_cfg_file= $_SESSION['OCS']['CONF_PROFILS_DIR']."4all_config.txt"; $search=array('ORDER_FIRST_TABLE'=>'MULTI2', 'ORDER_SECOND_TABLE'=>'MULTI2', 'ORDER'=>'MULTI2', 'LBL'=>'MULTI', 'MENU'=>'MULTI', 'MENU_TITLE'=>'MULTI', 'MENU_NAME'=>'MULTI', 'URL'=>'MULTI', 'DIRECTORY'=>'MULTI', 'JAVASCRIPT'=>'MULTI'); return read_files($search,$ms_cfg_file,$writable); } function read_files($search,$ms_cfg_file,$writable=''){ global $l; if (!is_writable($ms_cfg_file) and $writable != '') { msg_error($ms_cfg_file." ".$l->g(1006).". ".$l->g(1147)); return FALSE; } if (file_exists($ms_cfg_file)) { $profil_data=read_configuration($ms_cfg_file,$search); return $profil_data; }else return FALSE; } function replace_language($info){ global $l; if (substr($info,0,2) == 'g(') return $l->g(substr(substr($info,2),0,-1)); else return $info; } function msg($txt,$css,$closeid=false){ global $protectedPost; if (isset($protectedPost['close_alert']) and $protectedPost['close_alert'] != '') $_SESSION['OCS']['CLOSE_ALERT'][$protectedPost['close_alert']]=1; if (!$_SESSION['OCS']['CLOSE_ALERT'][$closeid]){ echo "
          "; if ($closeid != false){ echo ""; echo open_form('close_msg'); echo ""; echo close_form(); } if ($css == 'error') addLog('MSG_'.$css, $txt); } } function msg_info($txt,$close=false){ msg($txt,'info',$close); } function msg_success($txt,$close=false){ msg($txt,'success',$close); } function msg_warning($txt,$close=false){ msg($txt,'warning',$close); } function msg_error($txt,$close=false){ msg($txt,'danger',$close); return true; } /* * * Encode your data on UTF-8 * $data can be an array or a string * */ function data_encode_utf8($data){ return $data; /*if (is_array($data)){ $data_utf8=array(); foreach ($data as $key=>$value){ if (mb_detect_encoding($value) != "UTF-8" ) $data_utf8[$key]=utf8_encode($value); else $data_utf8[$key]=$value; } return $data_utf8; } // echo $data."=>"; //echo mb_detect_encoding("")."
          "; if (mb_detect_encoding($data) != "UTF-8" ){ return utf8_encode($data); }else return $data;*/ } function html_header($no_java=false){ header("Pragma: no-cache"); header("Expires: -1"); header("Cache-control: must-revalidate, post-check=0, pre-check=0"); header("Cache-control: private", false); header("Content-type: text/html; charset=utf-8"); echo " OCS Inventory "; if (!$no_java){ incPicker(); //js for graph echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; //js for Datatables echo ""; echo ""; echo ""; if (isset($_SESSION['OCS']['JAVASCRIPT'])){ foreach ($_SESSION['OCS']['JAVASCRIPT'] as $file){ echo ""; } } } echo ""; echo ""; } function strip_tags_array($value='') { if(is_object($value)){ $value = get_class($value); $value = strip_tags($value,"


          "); $value = "Objet de la classe ".$value; return $value; } $value = is_array($value) ? array_map('strip_tags_array', $value) : strip_tags($value,"


          "); return $value; } function open_form($form_name,$action='',$more=''){ if (!isset($_SESSION['OCS']['CSRFNUMBER']) or !is_numeric($_SESSION['OCS']['CSRFNUMBER']) or $_SESSION['OCS']['CSRFNUMBER'] >= CSRF) $_SESSION['OCS']['CSRFNUMBER'] = 0; $form="
          "; $csrf_value = sha1(microtime()); $_SESSION['OCS']['CSRF'][$_SESSION['OCS']['CSRFNUMBER']] = $csrf_value; $form.=""; $_SESSION['OCS']['CSRFNUMBER']++; return $form; } function close_form(){ return "
          "; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_computers.php000077500000000000000000000324011303466605000266660ustar00rootroot00000000000000g(376)); } function computer_list_by_tag($tag="",$format='LIST'){ $arg_sql=array(); if ($tag == ""){ $sql_mycomputers['SQL']="select hardware_id from accountinfo a where ".$_SESSION['OCS']["mesmachines"]; }elseif (is_array($tag)){ $sql_mycomputers="select hardware_id from accountinfo a where a.tag in "; $sql_mycomputers=mysql2_prepare($sql_mycomputers,$arg_sql,$tag); }else{ $sql_mycomputers="select hardware_id from accountinfo a where a.tag in "; $sql_mycomputers=mysql2_prepare($sql_mycomputers,$arg_sql,$tag); } $res_mycomputers = mysql2_query_secure($sql_mycomputers['SQL'], $_SESSION['OCS']["readServer"],$sql_mycomputers['ARG']); $mycomputers="("; while ($item_mycomputers = mysqli_fetch_object($res_mycomputers)){ $mycomputers.= $item_mycomputers->hardware_id.","; $array_mycomputers[]=$item_mycomputers->hardware_id; } $mycomputers=substr($mycomputers,0,-1).")"; if ($mycomputers == "()" or !isset($array_mycomputers)) $mycomputers = "ERROR"; if ($format == 'LIST'){ return $mycomputers; }else{ return $array_mycomputers; } } /** * Deleting function * @param id Hardware identifier to be deleted * @param checkLock Tells wether or not the locking system must be used (default true) * @param traceDel Tells wether or not the deleted entities must be inserted in deleted_equiv for tracking purpose (default true) */ function deleteDid($id, $checkLock = true, $traceDel = true, $silent=false ) { global $l; if ($_SESSION['OCS']['profile']->getConfigValue('DELETE_COMPUTERS') == "NO"){ msg_error($l->g(1273)); return false; } //If lock is not user OR it is used and available if( ! $checkLock || lock($id) ) { $sql="SELECT deviceid,name,IPADDR,OSNAME FROM hardware WHERE id='%s'"; $resId = mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$id); $valId = mysqli_fetch_array($resId); $idHard = $id; $did = $valId["deviceid"]; if( $did ) { //Deleting a network device if( strpos ( $did, "NETWORK_DEVICE-" ) === false ) { $sql="SELECT macaddr FROM networks WHERE hardware_id='%s'"; $resNetm = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$idHard); while( $valNetm = mysqli_fetch_array($resNetm)) { $sql="DELETE FROM netmap WHERE mac='%s'"; mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$valNetm["macaddr"]); } } //deleting a regular computer if( $did != "_SYSTEMGROUP_" and $did != '_DOWNLOADGROUP_') { $tables=$_SESSION['OCS']['SQL_TABLE_HARDWARE_ID']; } elseif($did == "_SYSTEMGROUP_" or $did == '_DOWNLOADGROUP_'){//Deleting a group $tables=Array("devices"); //del messages on this group $sql_group_msg="DELETE FROM config WHERE name like '%s' and ivalue='%s'"; mysql2_query_secure($sql_group_msg, $_SESSION['OCS']["writeServer"],array('GUI_REPORT_MSG%',$idHard)); $sql_group="DELETE FROM groups WHERE hardware_id='%s'"; mysql2_query_secure($sql_group, $_SESSION['OCS']["writeServer"],$idHard); $sql_group_cache="DELETE FROM groups_cache WHERE group_id='%s'"; $resDelete = mysql2_query_secure($sql_group_cache, $_SESSION['OCS']["writeServer"],$idHard); $affectedComputers = mysqli_affected_rows( $_SESSION['OCS']["writeServer"] ); //Deleting redistribution group $sql_group_cache="DELETE FROM download_servers WHERE group_id='%s'"; $resDelete = mysql2_query_secure($sql_group_cache, $_SESSION['OCS']["writeServer"],$idHard); $affectedComputers = mysqli_affected_rows( $_SESSION['OCS']["writeServer"] ); } if( !$silent ) msg_success($valId["name"]." ".$l->g(220)); if (isset($tables) and is_array($tables)){ foreach ($tables as $table) { $sql="DELETE FROM %s WHERE hardware_id='%s'"; $arg=array($table,$idHard); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } } $sql="delete from download_enable where SERVER_ID='%s'"; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$idHard); $sql="DELETE FROM hardware WHERE id='%s'"; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$idHard); //Deleted computers tracking if($traceDel && mysqli_num_rows(mysql2_query_secure("SELECT IVALUE FROM config WHERE IVALUE>0 AND NAME='TRACE_DELETED'", $_SESSION['OCS']["readServer"]))){ $sql="insert into deleted_equiv(DELETED,EQUIVALENT) values('%s',%s)"; $arg=array($did,'NULL'); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } } //Using lock ? Unlock if( $checkLock ) unlock($id); return $valId["name"]; } else errlock(); } function fusionne($afus) { global $l; $i=0; $maxStamp = 0; $minStamp = mktime(0,0,0,date("m"),date("d") + 1,date("Y")); //demain foreach($afus as $a) { $d = $a["lastcome"]; $a["stamp"] = mktime($d[11].$d[12],$d[14].$d[15],$d[17].$d[18],$d[5].$d[6],$d[8].$d[9],$d[0].$d[1].$d[2].$d[3]); //echo "stamp:".$a["stamp"]."== mktime($d[11]$d[12],$d[14]$d[15],$d[17]$d[18],$d[5]$d[6],$d[8]$d[9],$d[0]$d[1]$d[2]$d[3]);
          "; if($maxStamp<$a["stamp"]) { $maxStamp = $a["stamp"]; $maxInd = $i; } if($minStamp>$a["stamp"]) { $minStamp = $a["stamp"]; $minInd = $i; } $i++; } if($afus[$minInd]["deviceid"]!="") { $okLock = true; foreach($afus as $a) { if( ! $okLock = ($okLock && lock($a["id"])) ) break; else $locked[] = $a["id"]; } if( $okLock ) { //TRACE_DELETED if(mysqli_num_rows(mysql2_query_secure("SELECT * FROM config WHERE IVALUE>0 AND NAME='TRACE_DELETED'", $_SESSION['OCS']["readServer"]))){ foreach($afus as $a) { if($afus[$maxInd]["deviceid"]==$a["deviceid"]){continue;} $sql="insert into deleted_equiv(DELETED,EQUIVALENT) values('%s','%s')"; $arg=array($a["deviceid"],$afus[$maxInd]["deviceid"]); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg) ; } } //KEEP OLD QUALITY,FIDELITY AND CHECKSUM $sql="SELECT CHECKSUM,QUALITY,FIDELITY FROM hardware WHERE ID='%s'"; $persistent_req = mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$afus[$minInd]["id"]); $reqDelAccount = "DELETE FROM accountinfo WHERE hardware_id='%s'"; mysql2_query_secure($reqDelAccount, $_SESSION['OCS']["writeServer"],$afus[$maxInd]["id"]) ; msg_success($l->g(190)." ".$afus[$maxInd]["deviceid"]." ".$l->g(191)); $keep = array( "accountinfo", "devices", "groups_cache" ); foreach( $keep as $tableToBeKept ) { $reqRecupAccount = "UPDATE %s SET hardware_id='%s' WHERE hardware_id='%s'"; $argRecupAccount=array($tableToBeKept,$afus[$maxInd]["id"],$afus[$minInd]["id"]); mysql2_query_secure($reqRecupAccount, $_SESSION['OCS']["writeServer"],$argRecupAccount) ; } msg_success($l->g(190)." ".$afus[$minInd]["deviceid"]." ".$l->g(206)." ".$afus[$maxInd]["deviceid"]); $i=0; foreach($afus as $a) { if($i != $maxInd) { deleteDid($a["id"], false, false,false); $lesDel .= $a["deviceid"]."/"; } $i++; } //RESTORE PERSISTENT VALUES $persistent_values = mysqli_fetch_row($persistent_req); $sql="UPDATE hardware SET QUALITY=%s,FIDELITY=%s,CHECKSUM=CHECKSUM|%s WHERE id='%s'"; $arg=array($persistent_values[1],$persistent_values[2],$persistent_values[0],$afus[$maxInd]["id"]); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg) ; } else errlock(); foreach($locked as $a) { unlock($a); } } $lesDel .= " => ".$afus[$maxInd]["deviceid"]; AddLog("FUSION", $lesDel); } function form_add_computer(){ global $l; $name_field=array("NAME","OSNAME"); $name_field[]="LASTNAME"; $name_field[]="EMAIL"; $name_field[]="COMMENTS"; //$name_field[]="USER_GROUP"; $tab_name[]=$l->g(49).": "; $tab_name[]=$l->g(996).": "; $tab_name[]="Email: "; $tab_name[]=$l->g(51).": "; //$tab_name[]="Groupe de l'utilisateur: "; $type_field[]= 0; $type_field[]= 0; $type_field[]= 0; $type_field[]= 0; //$type_field[]= 2; if ($id_user != '' or $_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'NO'){ $tab_hidden['MODIF']=$id_user; $sql="select ID,NEW_ACCESSLVL,USER_GROUP,FIRSTNAME,LASTNAME,EMAIL,COMMENTS from operators where id= '%s'"; $arg=$id_user; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES'){ $protectedPost['ACCESSLVL']=$row->NEW_ACCESSLVL; $protectedPost['USER_GROUP']=$row->USER_GROUP; $value_field=array($row->ID,$list_profil,$list_groups); } $value_field[]=$row->FIRSTNAME; $value_field[]=$row->LASTNAME; $value_field[]=$row->EMAIL; $value_field[]=$row->COMMENTS; }else{ if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES'){ $value_field=array($protectedPost['ID'],$list_profil,$list_groups); } $value_field[]=$protectedPost['FIRSTNAME']; $value_field[]=$protectedPost['LASTNAME']; $value_field[]=$protectedPost['EMAIL']; $value_field[]=$protectedPost['COMMENTS']; } if ($_SESSION['OCS']['cnx_origine'] == "LOCAL"){ $name_field[]="PASSWORD"; $type_field[]=0; $tab_name[]=$l->g(217).":"; $value_field[]=$protectedPost['PASSWORD']; } $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=40; } if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_USER_GROUP') == 'YES'){ $tab_typ_champ[2]["CONFIG"]['DEFAULT']="YES"; // $tab_typ_champ[1]['COMMENT_AFTER']=""; $tab_typ_champ[2]['COMMENT_AFTER']=""; } if (isset($tab_typ_champ)){ tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden); } } function insert_manual_computer($values,$nb=1,$generic=false){ global $i; if ($nb == 1) $name=$values['COMPUTER_NAME_GENERIC']; else $name=$values['COMPUTER_NAME_GENERIC'].$i; /*if ($generic){ if ($values['COMPUTER_NAME_GENERIC'] == "") $values['COMPUTER_NAME_GENERIC']='MANUEL_ENTRY'; if ($values['SERIAL_GENERIC'] == "") $values['SERIAL_GENERIC']='MANUEL_ENTRY'; if ($values['ADDR_MAC_GENERIC'] == "") $values['ADDR_MAC_GENERIC']='MANUEL_ENTRY'; }*/ $sql="insert into hardware (deviceid,name) values ('%s','%s')"; $arg=array('MANUEL',$name.'_M'); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); $id_computer=mysqli_insert_id($_SESSION['OCS']["writeServer"]); $sql="insert into bios (hardware_id,ssn) values ('%s','%s')"; $arg=array($id_computer,$values['SERIAL_GENERIC'].'_M'); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); $sql="insert into networks (hardware_id,macaddr) values ('%s','%s')"; $arg=array($id_computer,$values['ADDR_MAC_GENERIC'].'_M'); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); return $id_computer; } /* * function to verify if user can access * on computer */ function is_mine_computer($id){ if (isset($_SESSION['OCS']['TAGS']) and is_array($_SESSION['OCS']['TAGS'])){ $sql="select hardware_id from accountinfo where hardware_id = %s and tag in "; $arg=array($id); $sql=mysql2_prepare($sql,$arg,$_SESSION['OCS']['TAGS']); $result = mysql2_query_secure( $sql['SQL'], $_SESSION['OCS']["readServer"],$sql['ARG']); $item = mysqli_fetch_object($result); if (isset($item->hardware_id)) return true; else return false; } return true; } function RandomMAC() { $word = "A,B,C,D,E,F,0,1,2,3,4,5,6,7,8,9"; $mac=''; $array=explode(",",$word); while ($j<8){ $i=0; while ($i<2){ shuffle($array); $mac.=$array[0]; $i++; } $mac.=":"; $j++; } return substr($mac, 0, -1); } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_config_generale.php000077500000000000000000001234301303466605000277570ustar00rootroot00000000000000 (".$l->g(759)." 1)"; $sup10="
          (".$l->g(759)." 10)"; /* * * function for add ligne in tab * $name= varchar : name of ligne * $lbl= varchar : wording of the ligne * $type= varchar : type of the ligne. in (radio,checkbox,input,text,select) * $data= array : data of type ex: 'BEGIN'=> text behing the field, * 'VALUE'=> value of the field * 'END'=> text after the field * 'SIZE'=> field size * 'MAXLENGTH'=> field MAXLENGTH * 'JAVASCRIPT'=> if you want a javascript on the field * 'CHECK' => only for checkbox for ckeck the good boxes * $data_hidden = data of hidden ex: 'HIDDEN'=> name of field when you clic on, a hidden field appear * 'HIDDEN_VALUE'=> value of the hidden field * 'END'=> what you see after the field * 'JAVASCRIPT'=> if you want a javascript on the hidden field */ function ligne($name,$lbl,$type,$data,$data_hidden='',$readonly=''){ global $l,$protectedPost; echo "".$name; echo "
          ".$lbl.""; //si on est dans un type bouton ou boite à cocher if ($type=='radio' or $type=='checkbox'){ if ($data_hidden != ''){ //javascript for hidden or show an html DIV echo ""; } //si le champ hidden est celui qui doit être affiché en entrée, il faut afficher le champ //echo "
          hidden ==".$data_hidden['HIDDEN']." value ==".$data['VALUE']; if (isset($data_hidden['HIDDEN']) && $data_hidden['HIDDEN']==$data['VALUE']) $display="block"; else $display="none"; //var for name of chekbox $i=1; //pour toutes les valeurs foreach ($data as $key=>$value){ //sauf la valeur à afficher if ($key !== 'VALUE' and $key !== 'CHECK' and $key !== 'JAVASCRIPT'){ echo "".$value; if ($data_hidden != '' and $data_hidden['HIDDEN'] == $key){ if (isset($data_hidden['MAXLENGTH'])) $maxlength = $data_hidden['MAXLENGTH']; elseif(isset($data_hidden['SIZE'])) $maxlength = $data_hidden['SIZE']; else $maxlength = "2"; echo "
          ".$data_hidden['BEGIN']."".$data_hidden['END']."
          "; } echo "
          "; if (isset($data['JAVASCRIPT'])) echo ""; // $protectedPost['Valid'] == $l->g(103) } } }elseif($type=='input'){ if ($readonly != '') $ajout_readonly=" disabled=\"disabled\" style='color:black; background-color:#e1e1e2;'"; echo $data['BEGIN']."".$data['END']; }elseif($type=='text'){ echo $data[0]; }elseif ($type == 'list'){ echo ""; if (isset($data['END'])) echo ""; if (is_array($data['VALUE'])){ foreach ($data['VALUE'] as $index=>$value){ echo ""; } } echo "
          ".$data['END']."
          " . $value . "
          "; }elseif($type=='select'){ echo ""; //array('VALUE'=>$values['tvalue']['OCS_FILES_FORMAT'],'SELECT_VALUE'=>array('OCS'=>'OCS','XML'=>'XML')) }elseif($type=='long_text'){ echo "".$data['END']; }else{ echo $data['LINKS']; } echo ""; } function debut_tab(){ echo ""; } //function function verif_champ(){ global $protectedPost,$l; $supp1=array("DOWNLOAD_CYCLE_LATENCY","DOWNLOAD_FRAG_LATENCY","DOWNLOAD_PERIOD_LATENCY", "DOWNLOAD_PERIOD_LENGTH","DOWNLOAD_TIMEOUT","PROLOG_FREQ","IPDISCOVER_MAX_ALIVE", "GROUPS_CACHE_REVALIDATE","GROUPS_CACHE_OFFSET","LOCK_REUSE_TIME","INVENTORY_CACHE_REVALIDATE", "IPDISCOVER_BETTER_THRESHOLD","GROUPS_CACHE_OFFSET","GROUPS_CACHE_REVALIDATE","INVENTORY_FILTER_FLOOD_IP_CACHE_TIME", "SESSION_VALIDITY_TIME","IPDISCOVER_LATENCY"); $supp10=array("IPDISCOVER_LATENCY"); $file_exist=array('CONF_PROFILS_DIR'=>array('FIELD_READ'=>'CONF_PROFILS_DIR_edit','END'=>"/conf/",'FILE'=>"4all_config.txt",'TYPE'=>'r'), 'DOWNLOAD_PACK_DIR'=>array('FIELD_READ'=>'DOWNLOAD_PACK_DIR_edit','END'=>"/download/",'FILE'=>"",'TYPE'=>'r'), 'IPDISCOVER_IPD_DIR'=>array('FIELD_READ'=>'IPDISCOVER_IPD_DIR_edit','END'=>"/ipd/",'FILE'=>"",'TYPE'=>'r'), 'LOG_DIR'=>array('FIELD_READ'=>'LOG_DIR_edit','END'=>"/logs/",'FILE'=>"",'TYPE'=>'r'), 'LOG_SCRIPT'=>array('FIELD_READ'=>'LOG_SCRIPT_edit','END'=>"/scripts/",'FILE'=>"",'TYPE'=>'r'), 'OLD_CONF_DIR'=>array('FIELD_READ'=>'OLD_CONF_DIR_edit','END'=>"/old_conf/",'FILE'=>"",'TYPE'=>'r'), 'DOWNLOAD_REP_CREAT'=>array('FIELD_READ'=>'DOWNLOAD_REP_CREAT_edit','END'=>"",'FILE'=>"",'TYPE'=>'r')); foreach ($file_exist as $key=>$value){ if ($protectedPost[$key] == 'CUSTOM'){ //Try to find a file if ($value['FILE'] != ''){ if ($protectedPost[$value['FIELD_READ']]!='' and !@fopen($protectedPost[$value['FIELD_READ']].$value['END'].$value['FILE'],$value['TYPE'])) //if( isset($values['tvalue']['CONF_PROFILS_DIR']) and (!$fconf_profils=@fopen($values['tvalue']['CONF_PROFILS_DIR']."//conf/4all_config.txt","r"))) $tab_error[$key]=array('FILE_NOT_EXIST'=>$protectedPost[$value['FIELD_READ']].$value['END'].$value['FILE']); //Try to find a directory }elseif (!is_dir($protectedPost[$value['FIELD_READ']].$value['END'])) { if ($protectedPost[$value['FIELD_READ']]!='') $tab_error[$key]=array('FILE_NOT_EXIST'=>$protectedPost[$value['FIELD_READ']].$value['END']); } } } $i=0; while ($supp1[$i]){ if ($protectedPost[$supp1[$i]] < 1 and isset($protectedPost[$supp1[$i]])) $tab_error[$supp1[$i]]='1'; $i++; } $i=0; while ($supp10[$i]){ if ($protectedPost[$supp10[$i]] < 10 and isset($protectedPost[$supp10[$i]])) $tab_error[$supp10[$i]]='10'; $i++; } return $tab_error; } function fin_tab($form_name,$disable=''){ global $l; if ($disable != '') $gris="disabled=disabled"; else $gris="OnClick='garde_valeur(\"RELOAD\",\"RELOAD_CONF\");'"; echo ""; echo "
          "; } function option_conf_activate($value){ $conf_Wk=look_config_default_values(array($value)); if ($conf_Wk['ivalue'][$value] == 1) $activate=1; else $activate=0; return $activate; } /* * * * function for update, or delete or insert a value in config table * $name => value of field 'NAME' (name of config option) * $value => value of this config option * $default_value => last value of this field * $field => 'ivalue' or 'tvalue' * * */ function insert_update($name,$value,$default_value,$field){ global $l; // echo $field."=>".$value."=>".$default_value."
          "; if ($default_value != $value){ $arg=array($field,$value,$name); if ($default_value != '') $sql="update config set %s = '%s' where NAME ='%s'"; else $sql="insert into config (%s, NAME) value ('%s','%s')"; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg,$l->g(821)); } } function delete($name){ global $l; $sql="delete from config where name='%s'"; $arg=array($name); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); } function update_config($name,$field,$value,$msg=true){ global $l; $sql="update config set %s='%s' where name='%s'"; $arg=array($field,$value,$name); mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); if ($msg) msg_success($l->g(1200)); } function update_default_value($POST){ global $l; $i=0; //tableau des champs ou il faut juste mettre à jour le tvalue $array_simple_tvalue=array('DOWNLOAD_SERVER_URI','DOWNLOAD_SERVER_DOCROOT', 'OCS_FILES_FORMAT','OCS_FILES_PATH', 'CONEX_LDAP_SERVEUR','CONEX_LDAP_PORT','CONEX_DN_BASE_LDAP', 'CONEX_LOGIN_FIELD','CONEX_LDAP_PROTOCOL_VERSION','CONEX_ROOT_DN', 'CONEX_ROOT_PW','CONEX_LDAP_CHECK_FIELD1_NAME', 'CONEX_LDAP_CHECK_FIELD1_VALUE', 'CONEX_LDAP_CHECK_DEFAULT_ROLE', 'CONEX_LDAP_CHECK_FIELD1_ROLE', 'CONEX_LDAP_CHECK_FIELD2_NAME', 'CONEX_LDAP_CHECK_FIELD2_VALUE', 'CONEX_LDAP_CHECK_FIELD2_ROLE', 'IT_SET_NAME_TEST','IT_SET_NAME_LIMIT','IT_SET_TAG_NAME', 'IT_SET_NIV_CREAT','IT_SET_NIV_TEST','IT_SET_NIV_REST','IT_SET_NIV_TOTAL','EXPORT_SEP','WOL_PORT','OCS_SERVER_ADDRESS'); //tableau des champs ou il faut juste mettre à jour le ivalue $array_simple_ivalue=array('INVENTORY_DIFF','INVENTORY_TRANSACTION','INVENTORY_WRITE_DIFF', 'INVENTORY_SESSION_ONLY','INVENTORY_CACHE_REVALIDATE','LOGLEVEL', 'PROLOG_FREQ','LOCK_REUSE_TIME','TRACE_DELETED','SESSION_VALIDITY_TIME', 'IPDISCOVER_BETTER_THRESHOLD','IPDISCOVER_LATENCY','IPDISCOVER_MAX_ALIVE', 'IPDISCOVER_NO_POSTPONE','IPDISCOVER_USE_GROUPS','ENABLE_GROUPS','GROUPS_CACHE_OFFSET','GROUPS_CACHE_REVALIDATE', 'REGISTRY','GENERATE_OCS_FILES','OCS_FILES_OVERWRITE','PROLOG_FILTER_ON','INVENTORY_FILTER_ENABLED', 'INVENTORY_FILTER_FLOOD_IP','INVENTORY_FILTER_FLOOD_IP_CACHE_TIME','INVENTORY_FILTER_ON', 'LOG_GUI','DOWNLOAD','DOWNLOAD_CYCLE_LATENCY','DOWNLOAD_FRAG_LATENCY','DOWNLOAD_GROUPS_TRACE_EVENTS', 'DOWNLOAD_PERIOD_LATENCY','DOWNLOAD_TIMEOUT','DOWNLOAD_PERIOD_LENGTH','DEPLOY','AUTO_DUPLICATE_LVL', 'IT_SET_PERIM','IT_SET_MAIL','IT_SET_MAIL_ADMIN','SNMP','DOWNLOAD_REDISTRIB','SNMP_INVENTORY_DIFF','TAB_CACHE', 'INVENTORY_CACHE_ENABLED','USE_NEW_SOFT_TABLES'); //tableau des champs ou il faut interpréter la valeur retourner et mettre à jour ivalue $array_interprete_tvalue=array('DOWNLOAD_REP_CREAT'=>'DOWNLOAD_REP_CREAT_edit','DOWNLOAD_PACK_DIR'=>'DOWNLOAD_PACK_DIR_edit', 'IPDISCOVER_IPD_DIR'=>'IPDISCOVER_IPD_DIR_edit','LOG_DIR'=>'LOG_DIR_edit', 'LOG_SCRIPT'=>'LOG_SCRIPT_edit','DOWNLOAD_URI_FRAG'=>'DOWNLOAD_URI_FRAG_edit', 'DOWNLOAD_URI_INFO'=>'DOWNLOAD_URI_INFO_edit', 'LOG_SCRIPT'=>'LOG_SCRIPT_edit','CONF_PROFILS_DIR'=>'CONF_PROFILS_DIR_edit', 'OLD_CONF_DIR'=>'OLD_CONF_DIR_edit','LOCAL_URI_SERVER'=>'LOCAL_URI_SERVER_edit','WOL_BIOS_PASSWD'=>'WOL_BIOS_PASSWD_edit'); //tableau des champs ou il faut interpréter la valeur retourner et mettre à jour tvalue $array_interprete_ivalue=array('FREQUENCY'=>'FREQUENCY_edit','IPDISCOVER'=>'IPDISCOVER_edit','INVENTORY_VALIDITY'=>'INVENTORY_VALIDITY_edit'); //recherche des valeurs par défaut $sql_exist=" select NAME,ivalue,tvalue from config "; $result_exist = mysql2_query_secure($sql_exist, $_SESSION['OCS']["readServer"]); while($value_exist=mysqli_fetch_array($result_exist)) { if ($value_exist["ivalue"] != null) $optexist[$value_exist["NAME"] ] = $value_exist["ivalue"]; elseif($value_exist["tvalue"] != null) $optexist[$value_exist["NAME"] ] = $value_exist["tvalue"]; elseif ($value_exist["tvalue"] == null and $value_exist["ivalue"] == null) $optexist[$value_exist["NAME"] ] = 'null'; } //pour obliger à prendre en compte //le AUTO_DUPLICATE_LVL quand il est vide //on doit l'initialiser tout le temps if ($POST['onglet'] == $l->g(499)){ insert_update('AUTO_DUPLICATE_LVL',0,$optexist['AUTO_DUPLICATE_LVL'],'ivalue'); $optexist['AUTO_DUPLICATE_LVL']='0'; } //check all post foreach ($POST as $key=>$value){ if (!isset($optexist[$key])) $optexist[$key]=''; if ($key == "INVENTORY_CACHE_ENABLED" and $value == '1' and $optexist['INVENTORY_CACHE_ENABLED'] != $value){ $sql="update engine_persistent set ivalue=1 where name='INVENTORY_CACHE_CLEAN_DATE'"; $arg=''; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg,$l->g(821)); } $name_field_modif=''; $value_field_modif=''; //check AUTO_DUPLICATE_LVL. Particular field if(strstr($key, 'AUTO_DUPLICATE_LVL_')){ $AUTO_DUPLICATE['AUTO_DUPLICATE_LVL_1']=$POST['AUTO_DUPLICATE_LVL_1']; $AUTO_DUPLICATE['AUTO_DUPLICATE_LVL_2']=$POST['AUTO_DUPLICATE_LVL_2']; $AUTO_DUPLICATE['AUTO_DUPLICATE_LVL_3']=$POST['AUTO_DUPLICATE_LVL_3']; $AUTO_DUPLICATE['AUTO_DUPLICATE_LVL_4']=$POST['AUTO_DUPLICATE_LVL_4']; $AUTO_DUPLICATE['AUTO_DUPLICATE_LVL_5']=$POST['AUTO_DUPLICATE_LVL_5']; $AUTO_DUPLICATE['AUTO_DUPLICATE_LVL_6']=$POST['AUTO_DUPLICATE_LVL_6']; $value=auto_duplicate_lvl_poids($AUTO_DUPLICATE,2); $key='AUTO_DUPLICATE_LVL'; } if (in_array($key,$array_simple_tvalue)){ //update tvalue simple insert_update($key,$value,$optexist[$key],'tvalue'); }elseif(in_array($key,$array_simple_ivalue)){ //update ivalue simple insert_update($key,$value,$optexist[$key],'ivalue'); }elseif(isset($array_interprete_tvalue[$key])){ $name_field_modif="tvalue"; $value_field_modif=$array_interprete_tvalue[$key]; }elseif(isset($key,$array_interprete_ivalue[$key])){ $name_field_modif="ivalue"; $value_field_modif=$array_interprete_ivalue[$key]; } if ($name_field_modif != ''){ if ($value == "DEFAULT"){ delete($key); }elseif($value == "CUSTOM" or $value == "ON"){ insert_update($key,$POST[$value_field_modif],$optexist[$key],$name_field_modif); }elseif($value == "ALWAYS" or $value == 'OFF'){ insert_update($key,'0',$optexist[$key],$name_field_modif); }elseif($value == "NEVER"){ insert_update($key,'-1',$optexist[$key],$name_field_modif); } } } } function auto_duplicate_lvl_poids($value,$entree_sortie){ //définition du poids des auto_duplicate_lvl $poids['HOSTNAME']=1; $poids['SERIAL']=2; $poids['MACADDRESS']=4; $poids['MODEL']=8; $poids['UUID']=16; $poids['ASSETTAG']=32; //si on veut les cases cochées par rapport à un chiffre if ($entree_sortie == 1){ //gestion des poids pour connaitre les cases cochées. //ex: si AUTO_DUPLICATE_LVL == 7 on a les cases HOSTNAME (de poids 1), SERIAL (de poids 2) et MACADDRESS (de poids 4) //cochées (1+2+4=7) foreach ($poids as $k=>$v){ if ($value & $v) $check[$k]=$k; } }//si on veut le chiffre par rapport a la case cochée else{ $check=0; foreach ($poids as $k=>$v){ if (in_array ($k, $value)) $check+=$v; } } return $check; } function trait_post($name){ global $protectedPost,$values; if (isset($values['tvalue'][$name])) $select='CUSTOM'; else $select='DEFAULT'; if (isset($protectedPost[$name."_edit"]) and $protectedPost[$name."_edit"] != '' and $protectedPost[$name] == 'CUSTOM'){ $values['tvalue'][$name]=$protectedPost[$name."_edit"]; $select='CUSTOM'; } return $select; } function pageGUI($form_name){ global $l,$numeric,$sup1,$values; //what ligne we need? $champs=array('LOCAL_URI_SERVER'=>'LOCAL_URI_SERVER', 'DOWNLOAD_PACK_DIR'=>'DOWNLOAD_PACK_DIR', 'IPDISCOVER_IPD_DIR'=>'IPDISCOVER_IPD_DIR', 'LOG_GUI'=>'LOG_GUI', 'LOG_DIR'=>'LOG_DIR', 'EXPORT_SEP'=>'EXPORT_SEP', 'TAB_CACHE'=>'TAB_CACHE', 'LOG_SCRIPT'=>'LOG_SCRIPT', 'CONF_PROFILS_DIR'=>'CONF_PROFILS_DIR', 'OLD_CONF_DIR'=>'OLD_CONF_DIR', ); $values=look_config_default_values($champs); $select_local_uri=trait_post('LOCAL_URI_SERVER'); $select_pack=trait_post('DOWNLOAD_PACK_DIR'); $select_ipd=trait_post('IPDISCOVER_IPD_DIR'); $select_log=trait_post('LOG_DIR'); $select_scripts=trait_post('LOG_SCRIPT'); $select_profils=trait_post('CONF_PROFILS_DIR'); $select_old_profils=trait_post('OLD_CONF_DIR'); debut_tab(); ligne('LOCAL_URI_SERVER',$l->g(565),'radio',array('DEFAULT'=>$l->g(823)." (http://localhost:80/ocsinventory)",'CUSTOM'=>$l->g(822),'VALUE'=>$select_local_uri), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['LOCAL_URI_SERVER'],'SIZE'=>"30%",'MAXLENGTH'=>254 )); $def = VARLIB_DIR.'/download'; ligne('DOWNLOAD_PACK_DIR',$l->g(775),'radio',array('DEFAULT'=>$l->g(823)." ($def)",'CUSTOM'=>$l->g(822),'VALUE'=>$select_pack), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['DOWNLOAD_PACK_DIR'],'SIZE'=>"30%",'MAXLENGTH'=>254,'END'=>"/download" )); $def = VARLIB_DIR.'/ipd'; ligne('IPDISCOVER_IPD_DIR',$l->g(776),'radio',array('DEFAULT'=>$l->g(823)." (".$def.")",'CUSTOM'=>$l->g(822),'VALUE'=>$select_ipd), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['IPDISCOVER_IPD_DIR'],'SIZE'=>"30%",'MAXLENGTH'=>254,'END'=>"/ipd")); ligne('LOG_GUI',$l->g(824),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['LOG_GUI'])); $def = VARLOG_DIR.'/logs'; ligne('LOG_DIR',$l->g(825),'radio',array('DEFAULT'=>$l->g(823)." (".$def.")",'CUSTOM'=>$l->g(822),'VALUE'=>$select_log), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['LOG_DIR'],'SIZE'=>"30%",'MAXLENGTH'=>254,'END'=>"/logs")); $def = VARLOG_DIR.'/scripts'; ligne('LOG_SCRIPT',$l->g(1254),'radio',array('DEFAULT'=>$l->g(823)." (".$def.")",'CUSTOM'=>$l->g(822),'VALUE'=>$select_scripts), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['LOG_SCRIPT'],'SIZE'=>"30%",'MAXLENGTH'=>254,'END'=>"/scripts")); $def = ETC_DIR.'/'.MAIN_SECTIONS_DIR.'conf/'; ligne('CONF_PROFILS_DIR',$l->g(1252),'radio',array('DEFAULT'=>$l->g(823)." (".$def.")",'CUSTOM'=>$l->g(822),'VALUE'=>$select_profils), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['CONF_PROFILS_DIR'],'SIZE'=>"30%",'MAXLENGTH'=>254,'END'=>"/conf")); $def = ETC_DIR.'/'.MAIN_SECTIONS_DIR.'old_conf/'; ligne('OLD_CONF_DIR',$l->g(1253),'radio',array('DEFAULT'=>$l->g(823)." (".$def.")",'CUSTOM'=>$l->g(822),'VALUE'=>$select_old_profils), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['OLD_CONF_DIR'],'SIZE'=>"30%",'MAXLENGTH'=>254,'END'=>"/old_conf")); ligne('EXPORT_SEP',$l->g(1213),'input',array('VALUE'=>$values['tvalue']['EXPORT_SEP'],'SIZE'=>"30%",'MAXLENGTH'=>4)); ligne('TAB_CACHE',$l->g(1249),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['TAB_CACHE'])); fin_tab($form_name); } function pageteledeploy($form_name){ global $l,$numeric,$sup1; //open array; //what ligne we need? $champs=array('DOWNLOAD'=>'DOWNLOAD', 'DOWNLOAD_CYCLE_LATENCY'=>'DOWNLOAD_CYCLE_LATENCY', 'DOWNLOAD_FRAG_LATENCY'=>'DOWNLOAD_FRAG_LATENCY', 'DOWNLOAD_GROUPS_TRACE_EVENTS'=>'DOWNLOAD_GROUPS_TRACE_EVENTS', 'DOWNLOAD_PERIOD_LATENCY'=>'DOWNLOAD_PERIOD_LATENCY', 'DOWNLOAD_TIMEOUT'=>'DOWNLOAD_TIMEOUT', 'DOWNLOAD_PERIOD_LENGTH'=>'DOWNLOAD_PERIOD_LENGTH', 'DEPLOY'=>'DEPLOY', 'DOWNLOAD_URI_INFO' =>'DOWNLOAD_URI_INFO', 'DOWNLOAD_URI_FRAG'=>'DOWNLOAD_URI_FRAG'); $values=look_config_default_values($champs); if (isset($values['tvalue']['DOWNLOAD_URI_INFO'])) $select_info='CUSTOM'; else $select_info='DEFAULT'; if (isset($values['tvalue']['DOWNLOAD_URI_FRAG'])) $select_frag='CUSTOM'; else $select_frag='DEFAULT'; debut_tab(); //create diff lign for general config ligne('DOWNLOAD',$l->g(417),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['DOWNLOAD'])); ligne('DOWNLOAD_CYCLE_LATENCY',$l->g(720),'input',array('VALUE'=>$values['ivalue']['DOWNLOAD_CYCLE_LATENCY'],'END'=>$l->g(511).$sup1,'SIZE'=>2,'MAXLENGTH'=>4,'JAVASCRIPT'=>$numeric)); ligne('DOWNLOAD_FRAG_LATENCY',$l->g(721),'input',array('VALUE'=>$values['ivalue']['DOWNLOAD_FRAG_LATENCY'],'END'=>$l->g(511).$sup1,'SIZE'=>2,'MAXLENGTH'=>4,'JAVASCRIPT'=>$numeric)); ligne('DOWNLOAD_GROUPS_TRACE_EVENTS',$l->g(758),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['DOWNLOAD_GROUPS_TRACE_EVENTS'])); ligne('DOWNLOAD_PERIOD_LATENCY',$l->g(722),'input',array('VALUE'=>$values['ivalue']['DOWNLOAD_PERIOD_LATENCY'],'END'=>$l->g(511).$sup1,'SIZE'=>2,'MAXLENGTH'=>4,'JAVASCRIPT'=>$numeric)); ligne('DOWNLOAD_TIMEOUT',$l->g(424),'input',array('VALUE'=>$values['ivalue']['DOWNLOAD_TIMEOUT'],'END'=>$l->g(496).$sup1,'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('DOWNLOAD_PERIOD_LENGTH',$l->g(723),'input',array('VALUE'=>$values['ivalue']['DOWNLOAD_PERIOD_LENGTH'],'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('DEPLOY',$l->g(414),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['DEPLOY'])); ligne('DOWNLOAD_URI_FRAG',$l->g(826),'radio',array('DEFAULT'=>$l->g(823)." (HTTP://localhost/download)",'CUSTOM'=>$l->g(822),'VALUE'=>$select_frag), array('BEGIN'=>"http://",'HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['DOWNLOAD_URI_FRAG'],'SIZE'=>70,'MAXLENGTH'=>254)); ligne('DOWNLOAD_URI_INFO',$l->g(827),'radio',array('DEFAULT'=>$l->g(823)." (HTTPS://localhost/download)",'CUSTOM'=>$l->g(822),'VALUE'=>$select_info), array('BEGIN'=>"https://",'HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['DOWNLOAD_URI_INFO'],'SIZE'=>70,'MAXLENGTH'=>254)); fin_tab($form_name); } function pagegroups($form_name){ global $l,$numeric,$sup1; //open array; //what ligne we need? $champs=array('ENABLE_GROUPS'=>'ENABLE_GROUPS', 'GROUPS_CACHE_OFFSET'=>'GROUPS_CACHE_OFFSET', 'GROUPS_CACHE_REVALIDATE'=>'GROUPS_CACHE_REVALIDATE'); $values=look_config_default_values($champs); debut_tab(); //create diff lign for general config //create diff lign for general config ligne('ENABLE_GROUPS',$l->g(736),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['ENABLE_GROUPS'])); ligne('GROUPS_CACHE_OFFSET',$l->g(737),'input',array('END'=>$l->g(511).$sup1,'VALUE'=>$values['ivalue']['GROUPS_CACHE_OFFSET'],'SIZE'=>5,'MAXLENGTH'=>6,'JAVASCRIPT'=>$numeric)); ligne('GROUPS_CACHE_REVALIDATE',$l->g(738),'input',array('END'=>$l->g(511).$sup1,'VALUE'=>$values['ivalue']['GROUPS_CACHE_REVALIDATE'],'SIZE'=>5,'MAXLENGTH'=>6,'JAVASCRIPT'=>$numeric)); fin_tab($form_name); } function pageserveur($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('LOGLEVEL'=>'LOGLEVEL', 'PROLOG_FREQ'=>'PROLOG_FREQ', 'AUTO_DUPLICATE_LVL'=>'AUTO_DUPLICATE_LVL', 'SECURITY_LEVEL'=>'SECURITY_LEVEL', 'LOCK_REUSE_TIME'=>'LOCK_REUSE_TIME', 'TRACE_DELETED'=>'TRACE_DELETED', 'SESSION_VALIDITY_TIME'=>'SESSION_VALIDITY_TIME'); $values=look_config_default_values($champs); if (isset($champs['AUTO_DUPLICATE_LVL'])) //on utilise la fonction pour connaître les cases cochées correspondantes au chiffre en base de AUTO_DUPLICATE_LVL $check=auto_duplicate_lvl_poids($values['ivalue']['AUTO_DUPLICATE_LVL'],1); debut_tab(); ligne('LOGLEVEL',$l->g(416),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['LOGLEVEL'])); ligne('PROLOG_FREQ',$l->g(564),'input',array('END'=>$l->g(730).$sup1,'VALUE'=>$values['ivalue']['PROLOG_FREQ'],'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('AUTO_DUPLICATE_LVL',$l->g(427),'checkbox',array( 'HOSTNAME'=>'hostname', 'SERIAL'=>'Serial', 'MACADDRESS'=>'macaddress', 'MODEL'=>'model', 'UUID'=>'uuid', 'ASSETTAG'=>'AssetTag', 'CHECK'=>$check, )); ligne('SECURITY_LEVEL',$l->g(739),'input',array('VALUE'=>$values['ivalue']['SECURITY_LEVEL'],'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric),'',"readonly"); ligne('LOCK_REUSE_TIME',$l->g(740),'input',array('END'=>$l->g(511).$sup1,'VALUE'=>$values['ivalue']['LOCK_REUSE_TIME'],'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('TRACE_DELETED',$l->g(415),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['TRACE_DELETED'])); ligne('SESSION_VALIDITY_TIME',$l->g(777),'input',array('END'=>$l->g(511).$sup1,'VALUE'=>$values['ivalue']['SESSION_VALIDITY_TIME'],'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); fin_tab($form_name); } function pageinventory($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('FREQUENCY'=>'FREQUENCY', 'INVENTORY_DIFF'=>'INVENTORY_DIFF', 'INVENTORY_TRANSACTION'=>'INVENTORY_TRANSACTION', 'INVENTORY_WRITE_DIFF'=>'INVENTORY_WRITE_DIFF', 'INVENTORY_SESSION_ONLY'=>'INVENTORY_SESSION_ONLY', 'INVENTORY_CACHE_REVALIDATE'=>'INVENTORY_CACHE_REVALIDATE', 'INVENTORY_VALIDITY'=>'INVENTORY_VALIDITY', 'INVENTORY_CACHE_ENABLED' => 'INVENTORY_CACHE_ENABLED'); $values=look_config_default_values($champs); if (isset($champs['INVENTORY_VALIDITY'])){ $validity=$values['ivalue']['INVENTORY_VALIDITY']; //gestion des différentes valeurs de l'ipdiscover if ($values['ivalue']['INVENTORY_VALIDITY'] != 0) $values['ivalue']['INVENTORY_VALIDITY']='ON'; else $values['ivalue']['INVENTORY_VALIDITY']='OFF'; } if ($values['ivalue']['FREQUENCY'] == 0 and isset($values['ivalue']['FREQUENCY'])) $optvalueselected = 'ALWAYS'; elseif($values['ivalue']['FREQUENCY'] == -1) $optvalueselected = 'NEVER'; else $optvalueselected ='CUSTOM'; debut_tab(); ligne('FREQUENCY',$l->g(494),'radio',array('ALWAYS'=>$l->g(485),'NEVER'=>$l->g(486),'CUSTOM'=>$l->g(487),'VALUE'=>$optvalueselected),array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['ivalue']['FREQUENCY'],'END'=>$l->g(496),'JAVASCRIPT'=>$numeric)); ligne('INVENTORY_DIFF',$l->g(741),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_DIFF'])); ligne('INVENTORY_TRANSACTION',$l->g(742),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_TRANSACTION'])); ligne('INVENTORY_WRITE_DIFF',$l->g(743),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_WRITE_DIFF'])); ligne('INVENTORY_SESSION_ONLY',$l->g(744),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_SESSION_ONLY'])); ligne('INVENTORY_CACHE_REVALIDATE',$l->g(745),'input',array('END'=>$l->g(496).$sup1,'VALUE'=>$values['ivalue']['INVENTORY_CACHE_REVALIDATE'],'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('INVENTORY_CACHE_ENABLED',$l->g(1265),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_CACHE_ENABLED'])); ligne('INVENTORY_VALIDITY',$l->g(828),'radio',array('ON'=>'ON','OFF'=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_VALIDITY']),array('HIDDEN'=>'ON','HIDDEN_VALUE'=>$validity,'END'=>$l->g(496),'JAVASCRIPT'=>$numeric,'SIZE'=>3),"readonly"); fin_tab($form_name); } function pageregistry($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('REGISTRY'=>'REGISTRY'); $values=look_config_default_values($champs); debut_tab(); ligne('REGISTRY',$l->g(412),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['REGISTRY'])); fin_tab($form_name); } function pageipdiscover($form_name){ global $l,$numeric,$sup1,$sup10; //what ligne we need? $champs=array('IPDISCOVER'=>'IPDISCOVER', 'IPDISCOVER_BETTER_THRESHOLD'=>'IPDISCOVER_BETTER_THRESHOLD', 'IPDISCOVER_LATENCY'=>'IPDISCOVER_LATENCY', 'IPDISCOVER_MAX_ALIVE'=>'IPDISCOVER_MAX_ALIVE', 'IPDISCOVER_NO_POSTPONE'=>'IPDISCOVER_NO_POSTPONE', 'IPDISCOVER_USE_GROUPS'=>'IPDISCOVER_USE_GROUPS'); $values=look_config_default_values($champs); if (isset($champs['IPDISCOVER'])){ $ipdiscover=$values['ivalue']['IPDISCOVER']; //gestion des différentes valeurs de l'ipdiscover if ($values['ivalue']['IPDISCOVER'] != 0) $values['ivalue']['IPDISCOVER']='ON'; else $values['ivalue']['IPDISCOVER']='OFF'; } debut_tab(); ligne('IPDISCOVER',$l->g(425),'radio',array('ON'=>'ON','OFF'=>'OFF','VALUE'=>$values['ivalue']['IPDISCOVER']),array('HIDDEN'=>'ON','HIDDEN_VALUE'=>$ipdiscover,'END'=>$l->g(729),'JAVASCRIPT'=>$numeric)); ligne('IPDISCOVER_BETTER_THRESHOLD',$l->g(746),'input',array('VALUE'=>$values['ivalue']['IPDISCOVER_BETTER_THRESHOLD'],'END'=>$l->g(496).$sup1,'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('IPDISCOVER_LATENCY',$l->g(567),'input',array('VALUE'=>$values['ivalue']['IPDISCOVER_LATENCY'],'END'=>$l->g(732).$sup10,'SIZE'=>2,'MAXLENGTH'=>4,'JAVASCRIPT'=>$numeric)); ligne('IPDISCOVER_MAX_ALIVE',$l->g(419),'input',array('VALUE'=>$values['ivalue']['IPDISCOVER_MAX_ALIVE'],'END'=>$l->g(496).$sup1,'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('IPDISCOVER_NO_POSTPONE',$l->g(747),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['IPDISCOVER_NO_POSTPONE'])); ligne('IPDISCOVER_USE_GROUPS',$l->g(748),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['IPDISCOVER_USE_GROUPS'])); fin_tab($form_name); } function pageredistrib($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('DOWNLOAD_SERVER_URI'=>'DOWNLOAD_SERVER_URI', 'DOWNLOAD_SERVER_DOCROOT'=>'DOWNLOAD_SERVER_DOCROOT', 'DOWNLOAD_REP_CREAT' =>'DOWNLOAD_REP_CREAT', 'DOWNLOAD_REDISTRIB' => 'DOWNLOAD_REDISTRIB'); $values=look_config_default_values($champs); $i=0; while ($i<10){ $priority[$i]=$i; $i++; } if (isset($values['tvalue']['DOWNLOAD_REP_CREAT'])) $select_rep_creat='CUSTOM'; else $select_rep_creat='DEFAULT'; if (isset($values['ivalue']['DOWNLOAD_REDISTRIB'])) $radio_redistrib=$values['ivalue']['DOWNLOAD_REDISTRIB']; else $radio_redistrib='ON'; debut_tab(); ligne('DOWNLOAD_REDISTRIB',$l->g(1181),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$radio_redistrib)); ligne('DOWNLOAD_SERVER_URI',$l->g(726),'input',array('BEGIN'=>'HTTP://','VALUE'=>$values['tvalue']['DOWNLOAD_SERVER_URI'],'SIZE'=>"30%",'MAXLENGTH'=>254)); ligne('DOWNLOAD_SERVER_DOCROOT',$l->g(727),'input',array('VALUE'=>$values['tvalue']['DOWNLOAD_SERVER_DOCROOT'],'SIZE'=>"30%",'MAXLENGTH'=>254)); ligne('DOWNLOAD_REP_CREAT',$l->g(829),'radio',array('DEFAULT'=>$l->g(823)." (".DOCUMENT_ROOT."download/server)",'CUSTOM'=>$l->g(822),'VALUE'=>$select_rep_creat), array('HIDDEN'=>'CUSTOM','HIDDEN_VALUE'=>$values['tvalue']['DOWNLOAD_REP_CREAT'],'SIZE'=>"30%",'MAXLENGTH'=>254)); fin_tab($form_name); } function pagefilesInventory($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('GENERATE_OCS_FILES'=>'GENERATE_OCS_FILES', 'OCS_FILES_FORMAT'=>'OCS_FILES_FORMAT', 'OCS_FILES_OVERWRITE'=>'OCS_FILES_OVERWRITE', 'OCS_FILES_PATH'=>'OCS_FILES_PATH'); $values=look_config_default_values($champs); debut_tab(); ligne('GENERATE_OCS_FILES',$l->g(749),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['GENERATE_OCS_FILES'])); ligne('OCS_FILES_FORMAT',$l->g(750),'select',array('VALUE'=>$values['tvalue']['OCS_FILES_FORMAT'],'SELECT_VALUE'=>array('OCS'=>'OCS','XML'=>'XML'))); ligne('OCS_FILES_OVERWRITE',$l->g(751),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['OCS_FILES_OVERWRITE'])); ligne('OCS_FILES_PATH',$l->g(752),'input',array('VALUE'=>$values['tvalue']['OCS_FILES_PATH'],'SIZE'=>"30%",'MAXLENGTH'=>254)); fin_tab($form_name); } function pagefilter($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('PROLOG_FILTER_ON'=>'PROLOG_FILTER_ON', 'INVENTORY_FILTER_ENABLED'=>'INVENTORY_FILTER_ENABLED', 'INVENTORY_FILTER_FLOOD_IP'=>'INVENTORY_FILTER_FLOOD_IP', 'INVENTORY_FILTER_FLOOD_IP_CACHE_TIME'=>'INVENTORY_FILTER_FLOOD_IP_CACHE_TIME', 'INVENTORY_FILTER_ON'=>'INVENTORY_FILTER_ON'); $values=look_config_default_values($champs); debut_tab(); ligne('PROLOG_FILTER_ON',$l->g(753),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['PROLOG_FILTER_ON'])); ligne('INVENTORY_FILTER_ENABLED',$l->g(754),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_FILTER_ENABLED'])); ligne('INVENTORY_FILTER_FLOOD_IP',$l->g(755),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_FILTER_FLOOD_IP'])); ligne('INVENTORY_FILTER_FLOOD_IP_CACHE_TIME',$l->g(756),'input',array('VALUE'=>$values['ivalue']['INVENTORY_FILTER_FLOOD_IP_CACHE_TIME'],'END'=>$l->g(511).$sup1,'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric)); ligne('INVENTORY_FILTER_ON',$l->g(757),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['INVENTORY_FILTER_ON'])); fin_tab($form_name); } function pagewebservice($form_name){ global $l,$numeric,$sup1; //what ligne we need? $champs=array('WEB_SERVICE_ENABLED'=>'WEB_SERVICE_ENABLED', 'WEB_SERVICE_RESULTS_LIMIT'=>'WEB_SERVICE_RESULTS_LIMIT', 'WEB_SERVICE_PRIV_MODS_CONF'=>'WEB_SERVICE_PRIV_MODS_CONF'); $values=look_config_default_values($champs); debut_tab(); echo "".$l->g(764).""; ligne('WEB_SERVICE_ENABLED',$l->g(761),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['WEB_SERVICE_ENABLED']),'',"readonly"); ligne('WEB_SERVICE_RESULTS_LIMIT',$l->g(762),'input',array('VALUE'=>$values['ivalue']['WEB_SERVICE_RESULTS_LIMIT'],'END'=>$l->g(511).$sup1,'SIZE'=>1,'MAXLENGTH'=>3,'JAVASCRIPT'=>$numeric),'',"readonly"); ligne('WEB_SERVICE_PRIV_MODS_CONF',$l->g(763),'input',array('VALUE'=>$values['tvalue']['WEB_SERVICE_PRIV_MODS_CONF'],'SIZE'=>"30%",'MAXLENGTH'=>254),'',"readonly"); fin_tab($form_name,"disabled"); } function pageConnexion($form_name){ global $l,$numeric,$sup1; require_once('require/function_users.php'); //what ligne we need? $champs=array( 'CONEX_LDAP_SERVEUR'=>'CONEX_LDAP_SERVEUR', 'CONEX_LDAP_PORT'=>'CONEX_LDAP_PORT', 'CONEX_DN_BASE_LDAP'=>'CONEX_DN_BASE_LDAP', 'CONEX_LOGIN_FIELD'=>'CONEX_LOGIN_FIELD', 'CONEX_LDAP_PROTOCOL_VERSION'=>'CONEX_LDAP_PROTOCOL_VERSION', 'CONEX_ROOT_DN'=>'CONEX_ROOT_DN', 'CONEX_ROOT_PW'=>'CONEX_ROOT_PW', 'CONEX_LDAP_CHECK_FIELD1_NAME'=>'CONEX_LDAP_CHECK_FIELD1_NAME', 'CONEX_LDAP_CHECK_FIELD1_VALUE'=>'CONEX_LDAP_CHECK_FIELD1_VALUE', 'CONEX_LDAP_CHECK_FIELD1_ROLE'=>'CONEX_LDAP_CHECK_FIELD1_ROLE', 'CONEX_LDAP_CHECK_FIELD2_NAME'=>'CONEX_LDAP_CHECK_FIELD2_NAME', 'CONEX_LDAP_CHECK_FIELD2_VALUE'=>'CONEX_LDAP_CHECK_FIELD2_VALUE', 'CONEX_LDAP_CHECK_FIELD2_ROLE'=>'CONEX_LDAP_CHECK_FIELD2_ROLE', 'CONEX_LDAP_CHECK_DEFAULT_ROLE'=>'CONEX_LDAP_CHECK_DEFAULT_ROLE'); $values=look_config_default_values($champs); $role1=get_profile_labels(); $default_role['']=''; $default_role=array_merge($default_role,$role1); debut_tab(); ligne('CONEX_LDAP_SERVEUR',$l->g(830),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_SERVEUR'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_ROOT_DN',$l->g(1016).'
          '.$l->g(1018),'input',array('VALUE'=>$values['tvalue']['CONEX_ROOT_DN'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_ROOT_PW',$l->g(1017).'
          '.$l->g(1018),'input',array('VALUE'=>$values['tvalue']['CONEX_ROOT_PW'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LDAP_PORT',$l->g(831),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_PORT'],'SIZE'=>"30%",'MAXLENGTH'=>20)); ligne('CONEX_DN_BASE_LDAP',$l->g(832),'input',array('VALUE'=>$values['tvalue']['CONEX_DN_BASE_LDAP'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LOGIN_FIELD',$l->g(833),'input',array('VALUE'=>$values['tvalue']['CONEX_LOGIN_FIELD'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LDAP_PROTOCOL_VERSION',$l->g(834),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_PROTOCOL_VERSION'],'SIZE'=>"30%",'MAXLENGTH'=>5)); ligne('CONEX_LDAP_CHECK_FIELD1_NAME',$l->g(1111),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_FIELD1_NAME'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LDAP_CHECK_FIELD1_VALUE',$l->g(1112),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_FIELD1_VALUE'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LDAP_CHECK_FIELD1_ROLE',$l->g(1113),'select',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_FIELD1_ROLE'],'SELECT_VALUE'=>$role1)); ligne('CONEX_LDAP_CHECK_FIELD2_NAME',$l->g(1114),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_FIELD2_NAME'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LDAP_CHECK_FIELD2_VALUE',$l->g(1115),'input',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_FIELD2_VALUE'],'SIZE'=>"30%",'MAXLENGTH'=>200)); ligne('CONEX_LDAP_CHECK_FIELD2_ROLE',$l->g(1116),'select',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_FIELD2_ROLE'],'SELECT_VALUE'=>$role1)); ligne('CONEX_LDAP_CHECK_DEFAULT_ROLE',$l->g(1277),'select',array('VALUE'=>$values['tvalue']['CONEX_LDAP_CHECK_DEFAULT_ROLE'],'SELECT_VALUE'=>$default_role)); fin_tab($form_name); } function pagesnmp($form_name){ global $l,$numeric,$sup1,$pages_refs; //what ligne we need? /* $champs=array('SNMP_COMMUN%'=>'SNMP_COMMUN_%'); $list=array(); $values=look_config_default_values($champs,'YES');*/ // $list=$values['tvalue']; $champs=array('SNMP'=>'SNMP','SNMP_INVENTORY_DIFF'=>'SNMP_INVENTORY_DIFF'); $values=look_config_default_values($champs); if (isset($values['tvalue']['SNMP_DIR'])) $select_rep_creat='CUSTOM'; else $select_rep_creat='DEFAULT'; debut_tab(); ligne('SNMP',$l->g(1137),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['SNMP'])); ligne('SNMP_INVENTORY_DIFF',$l->g(1214),'radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['SNMP_INVENTORY_DIFF'])); // ligne('SNMP_COMMUN',$l->g(1199),'list',array('VALUE'=>$list,'END'=>"")); fin_tab($form_name); } function pagesplugin($form_name){ global $l; $champs=array('OCS_SERVER_ADDRESS'=>'OCS_SERVER_ADDRESS'); $values=look_config_default_values($champs); debut_tab(); ligne('OCS_SERVER_ADDRESS','Give your ocs server ip address','input',array('VALUE'=>$values['tvalue']['OCS_SERVER_ADDRESS'],'SIZE'=>"30%",'MAXLENGTH'=>200)); fin_tab($form_name); } function pageswol($form_name){ global $l; $numeric_semicolon="onKeyPress='return scanTouche(event,/[0-9 ,]/)' onkeydown='convertToUpper(this)' onkeyup='convertToUpper(this)' onblur='convertToUpper(this)' onclick='convertToUpper(this)'"; $champs=array('WOL_PORT'=>'WOL_PORT','WOL_BIOS_PASSWD'=>'WOL_BIOS_PASSWD'); $values=look_config_default_values($champs); if (isset($values['tvalue']['WOL_BIOS_PASSWD']) and $values['tvalue']['WOL_BIOS_PASSWD'] != '' and $values['tvalue']['WOL_BIOS_PASSWD'] != '0') $wol_passwd='ON'; else $wol_passwd='OFF'; debut_tab(); ligne('WOL_PORT',$l->g(272)." (".$l->g(1320).")",'input',array('VALUE'=>$values['tvalue']['WOL_PORT'],'SIZE'=>"30%",'MAXLENGTH'=>"30%",'JAVASCRIPT'=>$numeric_semicolon)); ligne('WOL_BIOS_PASSWD','Bios password','radio',array('ON'=>'ON','OFF'=>'OFF','VALUE'=>$wol_passwd),array('HIDDEN'=>'ON','HIDDEN_VALUE'=>$values['tvalue']['WOL_BIOS_PASSWD'],'SIZE'=>40,'MAXLENGTH'=>254),"readonly"); fin_tab($form_name); } function pagesdev($form_name){ global $l,$numeric,$sup1,$pages_refs; $champs=array('USE_NEW_SOFT_TABLES'=>'USE_NEW_SOFT_TABLES'); $values=look_config_default_values($champs); debut_tab(); ligne('USE_NEW_SOFT_TABLES','Utilisation tables de soft OCS v2.1','radio',array(1=>'ON',0=>'OFF','VALUE'=>$values['ivalue']['USE_NEW_SOFT_TABLES'])); fin_tab($form_name); } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_console.php000077500000000000000000000534461303466605000263230ustar00rootroot00000000000000id; } $myids=mysql2_prepare('',array(),$my_id); } if (isset($_SESSION['OCS']['ADMIN_CONSOLE'])){ $edit=0; }else $edit=3; $no_restrict=array("OCS_REPORT_NB_ALL_COMPUTOR"); $multi_search=array("OCS_REPORT_NB_NOTIFIED"=>array("FIELD"=>'',"COMP"=>'',"VALUE"=>''), "OCS_REPORT_NB_ERR"=>array("FIELD"=>'',"COMP"=>'',"VALUE"=>''), "OCS_REPORT_NB_CONTACT"=>array("FIELD"=>'HARDWARE-LASTCOME',"COMP"=>'tall',"VALUE"=>date($l->g(1242))), "OCS_REPORT_NB_INV"=>array("FIELD"=>'HARDWARE-LASTDATE',"COMP"=>'tall',"VALUE"=>date($l->g(1242))), "OCS_REPORT_NB_4_MOMENT"=>array("FIELD"=>'HARDWARE-LASTCOME',"COMP"=>'small',"VALUE"=>date($l->g(1242),mktime(0, 0, 0, date("m") , date("d")-$data_limit['GUI_REPORT_AGIN_MACH'], date("Y")))), "OCS_REPORT_NB_HARD_DISK_H"=>array("FIELD"=>'',"COMP"=>'',"VALUE"=>''), "OCS_REPORT_OSNAME"=>array("FIELD"=>'HARDWARE-OSNAME',"COMP"=>'',"VALUE"=>''), "OCS_REPORT_USERAGENT"=>array("FIELD"=>'HARDWARE-USERAGENT',"COMP"=>'exact',"VALUE"=>''), "OCS_REPORT_PROCESSORT"=>array("FIELD"=>'HARDWARE-PROCESSORT',"COMP"=>'exact',"VALUE"=>''), "OCS_REPORT_RESOLUTION"=>array("FIELD"=>'VIDEOS-RESOLUTION',"COMP"=>'',"VALUE"=>''), "OCS_REPORT_WORKGROUP"=>array("FIELD"=>'HARDWARE-WORKGROUP',"COMP"=>'exact',"VALUE"=>''), "OCS_REPORT_TAG"=>array("FIELD"=>'ACCOUNTINFO-TAG',"COMP"=>'exact',"VALUE"=>''), "OCS_REPORT_IPSUBNET"=>array("FIELD"=>'NETWORKS-IPSUBNET',"COMP"=>'exact',"VALUE"=>''), "OCS_REPORT_NB_LIMIT_FREQ_H"=>array("FIELD"=>'HARDWARE-PROCESSORS',"COMP"=>'tall',"VALUE"=>$data_limit['GUI_REPORT_PROC_MAX']), "OCS_REPORT_NB_LIMIT_FREQ_M"=>array("FIELD"=>'HARDWARE-PROCESSORS',"COMP"=>'small',"VALUE"=>$data_limit['GUI_REPORT_PROC_MINI']), "OCS_REPORT_NB_LIMIT_FREQ_B"=>array("FIELD"=>'HARDWARE-PROCESSORS,HARDWARE-PROCESSORS',"COMP"=>'tall,small',"VALUE"=>$data_limit['GUI_REPORT_PROC_MINI'].','.$data_limit['GUI_REPORT_PROC_MAX']), "OCS_REPORT_NB_LIMIT_MEM_H"=>array("FIELD"=>'HARDWARE-MEMORY',"COMP"=>'tall',"VALUE"=>$data_limit['GUI_REPORT_RAM_MAX']), "OCS_REPORT_NB_LIMIT_MEM_M"=>array("FIELD"=>'HARDWARE-MEMORY',"COMP"=>'small',"VALUE"=>$data_limit['GUI_REPORT_RAM_MINI']), "OCS_REPORT_NB_LIMIT_MEM_B"=>array("FIELD"=>'HARDWARE-MEMORY,HARDWARE-MEMORY',"COMP"=>'tall,small',"VALUE"=>$data_limit['GUI_REPORT_RAM_MINI'].','.$data_limit['GUI_REPORT_RAM_MAX']), "OCS_REPORT_NB_NOTIFIED"=>array("FIELD"=>'DEVICES-DOWNLOAD',"COMP"=>'exact',"VALUE"=>'NULL','VALUE2'=>$l->g(482),'TYPE_FIELD'=>"SelFieldValue"), "OCS_REPORT_NB_ERR"=>array("FIELD"=>'DEVICES-DOWNLOAD',"COMP"=>'exact',"VALUE"=>'NULL','VALUE2'=>"***".$l->g(956)."***",'TYPE_FIELD'=>"SelFieldValue"), /* "OCS_REPORT_NB_HARD_DISK_H"=>array("FIELD"=>'HARDWARE-MEMORY',"COMP"=>'tall',"VALUE"=>$data_limit['GUI_REPORT_RAM_MAX']), "OCS_REPORT_NB_HARD_DISK_M"=>array("FIELD"=>'HARDWARE-MEMORY',"COMP"=>'small',"VALUE"=>$data_limit['GUI_REPORT_RAM_MINI']), "OCS_REPORT_NB_HARD_DISK_B"=>array("FIELD"=>'HARDWARE-MEMORY,HARDWARE-MEMORY',"COMP"=>'tall,small',"VALUE"=>$data_limit['GUI_REPORT_RAM_MINI'].','.$data_limit['GUI_REPORT_RAM_MAX']), */ ); $table=array("OCS_REPORT_WORKGROUP"=>"hardware", "OCS_REPORT_TAG"=>"accountinfo", "OCS_REPORT_IPSUBNET"=>"networks", "OCS_REPORT_NB_NOTIFIED"=>"devices", "OCS_REPORT_NB_ERR"=>"devices", "OCS_REPORT_OSNAME"=>"hardware", "OCS_REPORT_USERAGENT"=>"hardware", "OCS_REPORT_PROCESSORT"=>"hardware", "OCS_REPORT_RESOLUTION"=>"videos", "OCS_REPORT_NB_LIMIT_FREQ_H"=>"hardware", "OCS_REPORT_NB_LIMIT_FREQ_M"=>"hardware", "OCS_REPORT_NB_LIMIT_FREQ_B"=>"hardware", "OCS_REPORT_NB_LIMIT_MEM_H"=>"hardware", "OCS_REPORT_NB_LIMIT_MEM_M"=>"hardware", "OCS_REPORT_NB_LIMIT_MEM_B"=>"hardware", "OCS_REPORT_NB_ALL_COMPUTOR"=>"hardware", "OCS_REPORT_NB_COMPUTOR"=>"hardware", "OCS_REPORT_NB_CONTACT"=>"hardware", "OCS_REPORT_NB_INV"=>"hardware", "OCS_REPORT_NB_4_MOMENT"=>"hardware", "OCS_REPORT_NB_SNMP"=>"snmp", "OCS_REPORT_NB_HARD_DISK_H"=>"drives", "OCS_REPORT_NB_HARD_DISK_M"=>"drives", "OCS_REPORT_NB_HARD_DISK_B"=>"drives" ,"OCS_REPORT_NB_IPDISCOVER"=>"nk" ,"OCS_REPORT_NB_LAST_INV"=>"hardware" ); $table_field=array("OCS_REPORT_WORKGROUP"=>array($l->g(33)=>"workgroup"), "OCS_REPORT_TAG"=>array($_SESSION['OCS']['TAG_LBL']['TAG']=>"tag"), "OCS_REPORT_IPSUBNET"=>array($l->g(316)=>"ipsubnet"), "OCS_REPORT_NB_NOTIFIED"=>"devices", "OCS_REPORT_NB_ERR"=>"devices", "OCS_REPORT_OSNAME"=>array($l->g(25)=>"osname"), "OCS_REPORT_USERAGENT"=>array($l->g(218)=>"useragent"), "OCS_REPORT_PROCESSORT"=>array($l->g(350)=>"processort"), "OCS_REPORT_RESOLUTION"=>array($l->g(62)=>"resolution"), "OCS_REPORT_NB_LIMIT_FREQ_H"=>"hardware", "OCS_REPORT_NB_LIMIT_FREQ_M"=>"hardware", "OCS_REPORT_NB_LIMIT_FREQ_B"=>"hardware", "OCS_REPORT_NB_LIMIT_MEM_H"=>"hardware", "OCS_REPORT_NB_LIMIT_MEM_M"=>"hardware", "OCS_REPORT_NB_LIMIT_MEM_B"=>"hardware", "OCS_REPORT_NB_ALL_COMPUTOR"=>"hardware", "OCS_REPORT_NB_COMPUTOR"=>"hardware", "OCS_REPORT_NB_CONTACT"=>"hardware", "OCS_REPORT_NB_INV"=>"hardware", "OCS_REPORT_NB_4_MOMENT"=>"hardware", "OCS_REPORT_NB_SNMP"=>"snmp", "OCS_REPORT_NB_HARD_DISK_H"=>"drives", "OCS_REPORT_NB_HARD_DISK_M"=>"drives", "OCS_REPORT_NB_HARD_DISK_B"=>"drives" ,"OCS_REPORT_NB_IPDISCOVER"=>"networks" ,"OCS_REPORT_NB_LAST_INV"=>array("NAME"=>"NAME","ID"=>"ID",$l->g(25)=>"osname",$l->g(218)=>"useragent"), ); $link=array("OCS_REPORT_WORKGROUP"=>array("RELOAD"=>'OCS_REPORT_WORKGROUP'), "OCS_REPORT_TAG"=>array("RELOAD"=>'OCS_REPORT_TAG'), "OCS_REPORT_IPSUBNET"=>array("RELOAD"=>'OCS_REPORT_IPSUBNET'), "OCS_REPORT_NB_NOTIFIED"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_ERR"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_OSNAME"=>array("RELOAD"=>'OCS_REPORT_OSNAME'), "OCS_REPORT_USERAGENT"=>array("RELOAD"=>'OCS_REPORT_USERAGENT'), "OCS_REPORT_PROCESSORT"=>array("RELOAD"=>'OCS_REPORT_PROCESSORT'), "OCS_REPORT_RESOLUTION"=>array("RELOAD"=>'OCS_REPORT_RESOLUTION'), "OCS_REPORT_NB_LIMIT_FREQ_H"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_LIMIT_FREQ_M"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_LIMIT_FREQ_B"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_LIMIT_MEM_H"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_LIMIT_MEM_M"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_LIMIT_MEM_B"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_ALL_COMPUTOR"=>'', "OCS_REPORT_NB_COMPUTOR"=>array("PAGE"=>'ms_all_computers'), "OCS_REPORT_NB_CONTACT"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_INV"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_4_MOMENT"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_SNMP"=>array("PAGE"=>'ms_snmp'), /* "OCS_REPORT_NB_HARD_DISK_H"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_HARD_DISK_M"=>array("PAGE"=>'ms_multi_search'), "OCS_REPORT_NB_HARD_DISK_B"=>array("PAGE"=>'ms_multi_search'),*/ "OCS_REPORT_NB_IPDISCOVER"=>array("PAGE"=>'ms_ipdiscover'), "OCS_REPORT_NB_LAST_INV"=>array("RELOAD"=>'OCS_REPORT_NB_LAST_INV') ); //all fields repart on categories $repart=array("OCS_REPORT_WORKGROUP"=>"ELSE", "OCS_REPORT_TAG"=>"ELSE", "OCS_REPORT_IPSUBNET"=>"ELSE", "OCS_REPORT_NB_NOTIFIED"=>"ELSE", "OCS_REPORT_NB_ERR"=>"ELSE", "OCS_REPORT_OSNAME"=>"SOFT", "OCS_REPORT_USERAGENT"=>"SOFT", "OCS_REPORT_PROCESSORT"=>"HARD", "OCS_REPORT_RESOLUTION"=>"HARD", "OCS_REPORT_NB_LIMIT_FREQ_H"=>"HARD", "OCS_REPORT_NB_LIMIT_FREQ_M"=>"HARD", "OCS_REPORT_NB_LIMIT_FREQ_B"=>"HARD", "OCS_REPORT_NB_LIMIT_MEM_H"=>"HARD", "OCS_REPORT_NB_LIMIT_MEM_M"=>"HARD", "OCS_REPORT_NB_LIMIT_MEM_B"=>"HARD", "OCS_REPORT_NB_ALL_COMPUTOR"=>"ACTIVITY", "OCS_REPORT_NB_COMPUTOR"=>"ACTIVITY", "OCS_REPORT_NB_CONTACT"=>"ACTIVITY", "OCS_REPORT_NB_INV"=>"ACTIVITY", "OCS_REPORT_NB_4_MOMENT"=>"ACTIVITY", "OCS_REPORT_NB_SNMP"=>"ACTIVITY", "OCS_REPORT_NB_HARD_DISK_H"=>"HARD", "OCS_REPORT_NB_HARD_DISK_M"=>"HARD", "OCS_REPORT_NB_HARD_DISK_B"=>"HARD" ,"OCS_REPORT_NB_IPDISCOVER"=>"ACTIVITY" ,"OCS_REPORT_NB_LAST_INV"=>"ACTIVITY" ); //all lbl fields $lbl_field=array("OCS_REPORT_WORKGROUP"=>$l->g(778), "OCS_REPORT_TAG"=>$l->g(779), "OCS_REPORT_IPSUBNET"=>$l->g(780), "OCS_REPORT_NB_NOTIFIED"=>$l->g(781), "OCS_REPORT_NB_ERR"=>$l->g(782), "OCS_REPORT_OSNAME"=>$l->g(783), "OCS_REPORT_USERAGENT"=>$l->g(784), "OCS_REPORT_PROCESSORT"=>$l->g(785), "OCS_REPORT_RESOLUTION"=>$l->g(786), "OCS_REPORT_NB_LIMIT_FREQ_H"=>$l->g(787)." ".show_modif($data_limit['GUI_REPORT_PROC_MAX'],"GUI_REPORT_PROC_MAX",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_PROC_MAX")))." ".$l->g(1239), "OCS_REPORT_NB_LIMIT_FREQ_M"=>$l->g(788)." ".show_modif($data_limit['GUI_REPORT_PROC_MINI'],"GUI_REPORT_PROC_MINI",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_PROC_MINI")))." ".$l->g(1239), "OCS_REPORT_NB_LIMIT_FREQ_B"=>$l->g(789)." ".$data_limit['GUI_REPORT_PROC_MINI']." ".$l->g(1239)." ".$l->g(582)." ".$data_limit['GUI_REPORT_PROC_MAX']." ".$l->g(1239), "OCS_REPORT_NB_LIMIT_MEM_H"=>$l->g(790)." ".show_modif($data_limit['GUI_REPORT_RAM_MAX'],"GUI_REPORT_RAM_MAX",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_RAM_MAX")))." ".$l->g(1240), "OCS_REPORT_NB_LIMIT_MEM_M"=>$l->g(791)." ".show_modif($data_limit['GUI_REPORT_RAM_MINI'],"GUI_REPORT_RAM_MINI",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_RAM_MINI")))." ".$l->g(1240), "OCS_REPORT_NB_LIMIT_MEM_B"=>$l->g(792)." ".$data_limit['GUI_REPORT_RAM_MINI']." ".$l->g(1240)." ".$l->g(582)." ".$data_limit['GUI_REPORT_RAM_MAX']." ".$l->g(1240), "OCS_REPORT_NB_ALL_COMPUTOR"=>$l->g(793), "OCS_REPORT_NB_COMPUTOR"=>$l->g(794), "OCS_REPORT_NB_CONTACT"=>$l->g(795), "OCS_REPORT_NB_INV"=>$l->g(796), "OCS_REPORT_NB_4_MOMENT"=>$l->g(797)." ".show_modif($data_limit['GUI_REPORT_AGIN_MACH'],"GUI_REPORT_AGIN_MACH",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_AGIN_MACH")))." ".$l->g(496), "OCS_REPORT_NB_HARD_DISK_H"=>$l->g(813)." ".show_modif($data_limit['GUI_REPORT_DD_MAX'],"GUI_REPORT_DD_MAX",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_DD_MAX")))." ".$l->g(1240), "OCS_REPORT_NB_HARD_DISK_M"=>$l->g(814)." ".show_modif($data_limit['GUI_REPORT_DD_MINI'],"GUI_REPORT_DD_MINI",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_DD_MINI")))." ".$l->g(1240), "OCS_REPORT_NB_HARD_DISK_B"=>$l->g(815)." ".$data_limit['GUI_REPORT_DD_MINI']." ".$l->g(1240)." ".$l->g(582)." ".$data_limit['GUI_REPORT_DD_MAX']." ".$l->g(1240), "OCS_REPORT_NB_IPDISCOVER"=>$l->g(913), "OCS_REPORT_NB_LAST_INV"=>$l->g(914)." ".show_modif($data_limit['GUI_REPORT_LAST_DIFF'],"GUI_REPORT_LAST_DIFF",$edit,'',array('JAVASCRIPT'=>valid_modif("GUI_REPORT_LAST_DIFF")))." ".$l->g(496), "OCS_REPORT_NB_SNMP"=>$l->g(1241) ); $sql_field=array("OCS_REPORT_WORKGROUP"=>array('ARG'=>array('count(distinct workgroup) c',$table["OCS_REPORT_WORKGROUP"],'')), "OCS_REPORT_TAG"=>array('ARG'=>array('count(distinct tag) c',$table["OCS_REPORT_TAG"],'')), "OCS_REPORT_IPSUBNET"=>array('ARG'=>array('count(distinct ipsubnet) c',$table["OCS_REPORT_IPSUBNET"],'')), "OCS_REPORT_NB_NOTIFIED"=>array('SQL'=>"select %s from %s where NAME='%s' and TVALUE is null", 'ARG'=>array('count(distinct hardware_id) c',$table["OCS_REPORT_NB_NOTIFIED"],'DOWNLOAD')), "OCS_REPORT_NB_ERR"=>array('SQL'=>"select %s from %s where NAME='%s' and TVALUE like '%s'", 'ARG'=>array('count(distinct hardware_id) c',$table["OCS_REPORT_NB_ERR"],"DOWNLOAD","ERR_%")), "OCS_REPORT_OSNAME"=>array('ARG'=>array('count(distinct osname) c',$table["OCS_REPORT_OSNAME"],'')), "OCS_REPORT_USERAGENT"=>array('ARG'=>array('count(distinct useragent) c',$table["OCS_REPORT_USERAGENT"],'')), "OCS_REPORT_PROCESSORT"=>array('ARG'=>array('count(distinct processort) c',$table["OCS_REPORT_PROCESSORT"],'')), "OCS_REPORT_RESOLUTION"=>array('ARG'=>array('count(distinct resolution) c',$table["OCS_REPORT_RESOLUTION"],'')), "OCS_REPORT_NB_LIMIT_FREQ_H"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LIMIT_FREQ_H"],"where processors >= ".$data_limit['GUI_REPORT_PROC_MAX'])), "OCS_REPORT_NB_LIMIT_FREQ_M"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LIMIT_FREQ_M"],"where processors <= ".$data_limit['GUI_REPORT_PROC_MINI'])), "OCS_REPORT_NB_LIMIT_FREQ_B"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LIMIT_FREQ_B"],"where processors <= ".$data_limit['GUI_REPORT_PROC_MAX']." and processors >= ".$data_limit['GUI_REPORT_PROC_MINI'])), "OCS_REPORT_NB_LIMIT_MEM_H"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LIMIT_MEM_H"],"where memory >= ".$data_limit['GUI_REPORT_RAM_MAX'])), "OCS_REPORT_NB_LIMIT_MEM_M"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LIMIT_MEM_M"],"where memory <= ".$data_limit['GUI_REPORT_RAM_MINI'])), "OCS_REPORT_NB_LIMIT_MEM_B"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LIMIT_MEM_B"],"where memory <= ".$data_limit['GUI_REPORT_RAM_MAX']." and memory >= ".$data_limit['GUI_REPORT_RAM_MINI'])), "OCS_REPORT_NB_ALL_COMPUTOR"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_ALL_COMPUTOR"],'')), "OCS_REPORT_NB_COMPUTOR"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_COMPUTOR"],'')), "OCS_REPORT_NB_CONTACT"=>array('SQL'=>"select %s from %s where lastcome >= date_format(sysdate(),'%s')", 'ARG'=>array('count(id) c',$table["OCS_REPORT_NB_CONTACT"],"%Y-%m-%d 00:00:00")), "OCS_REPORT_NB_INV"=>array('SQL'=>"select %s from %s where lastdate > date_format(sysdate(),'%s')", 'ARG'=>array('count(id) c',$table["OCS_REPORT_NB_INV"],"%Y-%m-%d 00:00:00")), "OCS_REPORT_NB_4_MOMENT"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_4_MOMENT"],"where unix_timestamp(lastcome) < unix_timestamp(sysdate())-(".$data_limit['GUI_REPORT_AGIN_MACH']."*86400)")), "OCS_REPORT_NB_HARD_DISK_H"=>array('SQL'=>"select %s from %s where type='%s' and free>%s", 'ARG'=>array('count(distinct(hardware_id)) c',$table["OCS_REPORT_NB_HARD_DISK_H"],"Hard Drive",$data_limit['GUI_REPORT_DD_MAX'])), "OCS_REPORT_NB_HARD_DISK_M"=>array('SQL'=>"select %s from %s where type='%s' and free<%s", 'ARG'=>array('count(distinct(hardware_id)) c',$table["OCS_REPORT_NB_HARD_DISK_M"],"Hard Drive",$data_limit['GUI_REPORT_DD_MINI'])), "OCS_REPORT_NB_HARD_DISK_B"=>array('SQL'=>"select %s from %s where type='%s' and free<%s and free>=%s", 'ARG'=>array('count(distinct(hardware_id)) c',$table["OCS_REPORT_NB_HARD_DISK_B"],"Hard Drive",$data_limit['GUI_REPORT_DD_MAX'],$data_limit['GUI_REPORT_DD_MINI'])), "OCS_REPORT_NB_IPDISCOVER"=>array('SQL'=>"select %s c from netmap ", 'ARG'=>array(count_noinv_network_devices())), "OCS_REPORT_NB_LAST_INV"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_LAST_INV"]," where floor((unix_timestamp(lastcome) - unix_timestamp(lastdate) )/86400) >= ".$data_limit['GUI_REPORT_LAST_DIFF']." ")), "OCS_REPORT_NB_SNMP"=>array('ARG'=>array('count(id) c',$table["OCS_REPORT_NB_SNMP"],'')) ); function define_tab($data_on=array()){ global $l; $data_on['ACTIVITY']=mb_strtoupper($l->g(798), 'UTF-8'); $data_on['SOFT']=mb_strtoupper($l->g(20), 'UTF-8'); $data_on['HARD']=mb_strtoupper($l->g(799), 'UTF-8'); $data_on['ELSE']=mb_strtoupper($l->g(800), 'UTF-8'); if( $_SESSION['OCS']['profile']->getConfigValue('CONSOLE')=="YES") { //$data_on['ADMIN']['CONFIG']=mb_strtoupper($l->g(107)); $data_on['ADMIN']['MSG']=mb_strtoupper($l->g(915), 'UTF-8'); if (!isset($default)) $default = 'MSG'; } return array('DATA'=>$data_on,'DEFAULT'=>$default); } function show_active_tab($data_on){ global $repart; //witch fields not show $no_show=look_config_default_values('OCS_REPORT_%',1); if (is_array($no_show)){ foreach ($no_show['name'] as $key=>$value){ if (!isset($_SESSION['OCS']['ADMIN_CONSOLE'])){ unset($repart[$key]); } } } foreach ($repart as $key=>$value){ $data[$value]=$value; } foreach ($data_on['DATA'] as $key=>$value){ if (!isset($data[$key])){ if (!isset($_SESSION['OCS']['ADMIN_CONSOLE'])) unset($data_on['DATA'][$key]); } if (is_array($value)){ foreach ($value as $key1=>$value1) $data_on['DATA'][$key1]=$value1; unset($data_on['DATA'][$key]); } } return $data_on; } function list_field($tab){ global $repart,$lbl_field; foreach ($repart as $key=>$value){ if ($value == $tab) $result[$key]=$lbl_field[$key]; } return $result; } function show_console_field($fields,$form_name){ global $sql_field,$myids,$no_restrict,$table,$link,$pages_refs,$multi_search; $no_groups_sql=" deviceid != '_SYSTEMGROUP_' and deviceid != '_DOWNLOADGROUP_' "; $no_show=look_config_default_values('OCS_REPORT_%',1); echo ""; else $icon=""; }else $icon=""; $arg_result=$sql_field[$key]['ARG']; if (isset($sql_field[$key]['SQL'])) $sql_result=$sql_field[$key]['SQL']; else $sql_result="select %s from %s %s"; if($table[$key] == 'hardware'){ if (isset($arg_result[2]) and $arg_result[2] != '') $sql_result.=" and ".$no_groups_sql; else $sql_result.=" where ".$no_groups_sql; } if ($myids){ if (!in_array($key,$no_restrict)){ if ((isset($arg_result[2]) and $arg_result[2] != '') or $table[$key] == 'hardware' or (isset($sql_field[$key]['SQL']) and $sql_field[$key]['SQL']!= '')) $sql_result.=" and "; else $sql_result.=" where "; if ($table[$key] != 'hardware' and $table[$key] != 'snmp' and $table[$key] !='nk'){ $sql_result.=$table[$key].".hardware_id in ".$myids['SQL']; }elseif ($table[$key] == 'hardware'){ $sql_result.=" id in ".$myids['SQL']; }elseif ($table[$key] == 'snmp'){ }elseif($table[$key] == 'nk'){ $sql_result=substr($sql_result,0,-4); } if (is_array($sql_field[$key]['ARG'])){ $arg_result=array_merge($arg_result,$myids['ARG']); }else{ $arg_result=$myids['ARG']; } } } if (!isset($_SESSION['OCS']['COUNT_CONSOLE'][$key])){ $res=mysql2_query_secure($sql_result,$_SESSION['OCS']["readServer"],$arg_result); if ($res){ $count = mysqli_fetch_object($res); $_SESSION['OCS']['COUNT_CONSOLE'][$key]=$count->c; } } if (isset($_SESSION['OCS']['COUNT_CONSOLE'][$key]) and is_numeric($_SESSION['OCS']['COUNT_CONSOLE'][$key])){ $id_count=$_SESSION['OCS']['COUNT_CONSOLE'][$key]; if (is_array($link[$key]) and $id_count != 0){ if (isset($link[$key]['PAGE'])){ $link_me_begin="'&fields=HARDWARE-LASTCOME&comp=tall&values='.date($l->g(1242)) $link_me_begin.="&fields=".$multi_search[$key]['FIELD']."&comp=".$multi_search[$key]['COMP']."&values=".$multi_search[$key]['VALUE']."&values2=".$multi_search[$key]['VALUE2']."&type_field=".$multi_search[$key]['TYPE_FIELD']; } $link_me_begin.="'>"; $link_me_end=""; }elseif (isset($link[$key]['RELOAD'])){ $link_me_begin=""; $link_me_end=""; } }else{ $link_me_begin=""; $link_me_end=""; } echo $value."".$icon."".$icon."
          "; foreach ($fields as $key=>$value){ if (isset($_SESSION['OCS']['ADMIN_CONSOLE'])){ if (isset($no_show['name'][$key])) $icon=" ".$link_me_begin.$id_count.$link_me_end."
          "; }elseif ($_SESSION['OCS']['DEBUG'] == 'ON') echo "ERROR=>".$value." 
          "; } echo "
          "; } function find_limit_values(){ $arg=look_config_default_values('GUI_REPORT_%',1); return $arg['ivalue']; } function valid_modif($name) { global $form_name; return "onKeyPress=\"return scanTouche(event,/[0-9]/)\" onkeydown='convertToUpper(this)' onkeyup='convertToUpper(this)' onblur='pag(\"".$name."\",\"UPDATE_VALUE\",\"".$form_name."\");' onclick='convertToUpper(this)'"; } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/function_cookies.php000077500000000000000000000031201303466605000262750ustar00rootroot00000000000000$value){ //si la variable de SESSION n'existe foreach ($value as $index=>$field_name){ $_SESSION['OCS']['col_tab'][$key][$field_name]=$field_name; } } } }*/ function cookies_reset($cookies_del){ if (isset($_COOKIE[$cookies_del])) setcookie( $cookies_del, FALSE, time() - 3600 ); // deleting corresponding cookie } function cookies_add($name,$value){ cookies_reset($name); setcookie( $name, $value, time() + 3600 * 24 * 365 ); } /* function upload_cookies($table_name){ unset($_SESSION['OCS']['col_tab'][$table_name]); if (!isset($_SESSION['OCS']['col_tab'][$table_name]) and isset($_COOKIE[$table_name])){ $col_tab=explode("///", $_COOKIE[$table_name]); foreach ($col_tab as $key=>$value){ $_SESSION['OCS']['col_tab'][$table_name][$key]=$value; } } } */ ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_dico.php000077500000000000000000000066001303466605000255650ustar00rootroot00000000000000ID; } return $list; } function del_soft($onglet,$list_soft){ if ($_SESSION['OCS']['usecache']) $table="softwares_name_cache"; else $table="softwares"; $sql_soft_name="select distinct NAME from ".$table." where ID in (".implode(",",$list_soft).")"; $result_soft_name = mysqli_query($_SESSION['OCS']["readServer"],$sql_soft_name); while($item_soft_name = mysqli_fetch_object($result_soft_name)){ $list_soft_name[]=str_replace('"','\"',$item_soft_name->NAME); } if($onglet == "CAT" or $onglet == "UNCHANGED") $sql_delete="delete from dico_soft where extracted in (\"".implode("\",\"",$list_soft_name)."\")"; if($onglet == "IGNORED") $sql_delete="delete from dico_ignored where extracted in (\"".implode("\",\"",$list_soft_name)."\")"; // echo $sql_delete."
          "; mysqli_query($_SESSION['OCS']["writeServer"],$sql_delete); } function trans($onglet,$list_soft,$affect_type,$new_cat,$exist_cat){ global $l; if ($_SESSION['OCS']['usecache']) $table="softwares_name_cache"; else $table="softwares"; //verif is this cat exist if ($new_cat != ''){ $sql_verif="select extracted from dico_soft where formatted ='".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$new_cat)."'"; $result_search_soft = mysqli_query($_SESSION['OCS']["readServer"], $sql_verif); $item_search_soft = mysqli_fetch_object($result_search_soft); if (isset($item_search_soft->extracted) or $new_cat == "IGNORED" or $new_cat == "UNCHANGED"){ $already_exist=TRUE; } } if ($onglet == "NEW"){ $table="softwares"; $ok=TRUE; }else{ if (!isset($already_exist)) { del_soft($onglet,$list_soft); } $ok = TRUE; } if ($ok == TRUE){ if ($affect_type== "EXIST_CAT"){ if ($exist_cat == "IGNORED"){ $sql="insert dico_ignored (extracted) select distinct NAME from ".$table." where ID in (".implode(",",$list_soft).")"; }elseif($exist_cat == "UNCHANGED"){ $sql="insert dico_soft (extracted,formatted) select distinct NAME,NAME from ".$table." where ID in (".implode(",",$list_soft).")"; }else $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$exist_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; }else{ if (!isset($already_exist)){ $sql="insert dico_soft (extracted,formatted) select distinct NAME,'".mysqli_real_escape_string($_SESSION['OCS']["readServer"],$new_cat)."' from ".$table." where ID in (".implode(",",$list_soft).")"; }else echo ""; } if ($sql!=''){ // echo $sql; mysqli_query($_SESSION['OCS']["writeServer"],$sql); } } } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_files.php000077500000000000000000000140111303466605000257440ustar00rootroot00000000000000'MULTI','RESTRICTION'=>'SINGLE','ADMIN_BLACKLIST'=>'SINGLE') * SINGLE => You have only one value to read * MULTI => You have few values to read */ function read_configuration($ms_cfg_file,$search,$id_field=''){ if (!is_readable($ms_cfg_file)){ return "NO_FILES"; } $fd = fopen ($ms_cfg_file, "r"); $capture=''; while( !feof($fd) ) { $line = trim( fgets( $fd, 256 ) ); if (substr($line,0,2) == "$option){ // echo $value_2_search."
          "; if ($capture == 'OK_'.$value_2_search){ if (strstr($line, ':')){ $tab_lbl=explode(":", $line); $find[$value_2_search][$tab_lbl[0]]=$tab_lbl[1]; }elseif ($option == 'SINGLE'){ $find[$value_2_search]=$line; }elseif ($option == 'MULTI'){ $find[$value_2_search][$line]=$line; }elseif($option == 'MULTI2'){ //Fix your id with a field file (the first field only) if ($id_field != '' and $value_2_search == $id_field) $id=$line; if (isset($id)) $find[$value_2_search][$id]=$line; else $find[$value_2_search][]=$line; } } } } if ($line{0} == "<"){ //Getting tag type for the next launch of the loop $capture = 'OK_'.substr(substr($line,1),0,-1); } } fclose( $fd ); return $find; } function update_config_file($ms_cfg_file,$new_value,$sauv='YES'){ if ($sauv == 'YES') getcopy_config_file($ms_cfg_file); $ms_cfg_file=$_SESSION['OCS']['CONF_PROFILS_DIR'].$ms_cfg_file."_config.txt"; //$file=fopen($file_name,"w+"); $new_ms_cfg_file=''; foreach ($new_value as $name_bal=>$val){ $new_ms_cfg_file.="<".$name_bal.">\n"; //fwrite($file,$key." ".$value."/r/n"); foreach ($val as $name_value=>$value){ if (isset($value) and $value != '') $new_ms_cfg_file.=$name_value.':'.$value."\n"; else $new_ms_cfg_file.=$name_value."\n"; //fwrite($file,$key." ".$value."/r/n"); } $new_ms_cfg_file.="\n\n"; } $file=fopen($ms_cfg_file,"w+"); fwrite($file,$new_ms_cfg_file); fclose( $file ); } function getcopy_config_file($ms_cfg_file,$record='YES',$sauv=FALSE){ if ($record != 'YES') return FALSE; if (!$sauv) $newfile=$_SESSION['OCS']['OLD_CONF_DIR'].$ms_cfg_file.'_config_old_'.time(); else $newfile=$_SESSION['OCS']['CONF_PROFILS_DIR'].$sauv.'_config.txt'; $ms_cfg_file=$_SESSION['OCS']['CONF_PROFILS_DIR'].$ms_cfg_file."_config.txt"; @copy($ms_cfg_file, $newfile); return TRUE; } function delete_config_file($ms_cfg_file){ $array_files=explode(',',$ms_cfg_file); $i=0; while (isset($array_files[$i])){ getcopy_config_file($array_files[$i]); $ms_file=$_SESSION['OCS']['CONF_PROFILS_DIR'].$array_files[$i]."_config.txt"; unlink($ms_file); $i++; } } function create_profil($new_profil,$lbl_profil,$ref_profil){ $new_value=read_profil_file($ref_profil); $new_value['INFO']['NAME']=$lbl_profil; update_config_file($new_profil,$new_value,'NO'); //getcopy_config_file($protectedPost['ref_profil'],'YES',$protectedPost['new_profil']); } function parse_xml_file($file,$tag,$separe){ $tab_data=array(); // open file if (!is_readable($file)){ return "NO_FILES"; } $fp = fopen($file, "r"); $i=0; // read line while ( $ln = fgets($fp, 1024)) { $ln=preg_replace('(\r\n|\n|\r|\t| )','',$ln); // echo htmlentities ($ln)."=>".strlen($ln); foreach ($tag as $poub=>$key){ // echo htmlentities (substr($ln,0,strlen($key)+2))." //".$key."
          "; if (substr($ln,0,strlen($key)+2) == '<'.$key.'>'){ $search=array("<".$key.">",""); $replace=array('',''); $tab_data[$i][$key]=str_replace($search,$replace,$ln); } } //msg_info($key); //echo htmlentities (substr($ln,0,strlen($key)+2))."=>".$separe."
          "; if ($ln == ""){ $i++; } } fclose($fp); return ($tab_data); } function post_ocs_file_to_server($datastream, $url, $port) { $url = preg_replace("@^http://@i", "", $url); $host = substr($url, 0, strpos($url, "/")); $uri = strstr($url, "/"); $reqbody = $datastream; $contentlength = strlen($reqbody); $reqheader = "POST $uri HTTP/1.1\r\n". "Host: $host\n". "User-Agent: OCS_local_".GUI_VER."\r\n". "Content-type: application/x-compress\r\n". "Content-Length: $contentlength\r\n\r\n". "$reqbody\r\n"; $socket = @fsockopen($host, $port, $errno, $errstr); if (!$socket) { $result["errno"] = $errno; $result["errstr"] = $errstr; return $result; } fputs($socket, $reqheader); while (!feof($socket)) { $result[] = fgets($socket, 4096); } fclose($socket); return $result; } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/function_graphic.php000077500000000000000000000015401303466605000262620ustar00rootroot00000000000000\n"; function percent_bar($status) { if (!is_numeric($status)) { return $status; } if (($status<0) or ($status>100)) { return $status; } return "
           
          ".$status."%
          "; } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/function_groups.php000077500000000000000000000162431303466605000261720ustar00rootroot00000000000000getConfigValue('GROUPS') == "YES")) $reqGetId.= " and workgroup = 'GROUP_4_ALL'"; }else{ $reqGetId = "SELECT id,name FROM hardware,groups WHERE groups.hardware_id=hardware.id and deviceid = '_SYSTEMGROUP_' and ((request is not null and trim(request) != '') or (xmldef is not null and trim(xmldef) != ''))"; } } $resGetId = mysql2_query_secure( $reqGetId, $_SESSION['OCS']["readServer"]); while( $valGetId = mysqli_fetch_array( $resGetId ) ){ $list_group[$valGetId['id']]=$valGetId['name']; } return $list_group; } //fonction pour sortir les machines d'un groupe function remove_of_group($id_group,$list_id){ $sql_delcache="DELETE FROM groups_cache WHERE group_id='%s' and hardware_id in "; $arg_delcache[]=$id_group; $delcache=mysql2_prepare($sql_delcache,$arg_delcache,$list_id); mysql2_query_secure( $delcache['SQL'], $_SESSION['OCS']["writeServer"], $delcache['ARG']); $cached = mysqli_affected_rows($_SESSION['OCS']["writeServer"]); return $cached; } //fonction de remplacement d'un groupe function replace_group($id_group,$list_id,$req,$group_type){ //static group? if ($group_type == 'STATIC'){ $static=1; $req=""; }else $static=0; //delete cache $sql_delcache="DELETE FROM groups_cache WHERE group_id='%s'"; $arg_delcache=$id_group; mysql2_query_secure( $sql_delcache, $_SESSION['OCS']["writeServer"],$arg_delcache); //update group $sql_updGroup="UPDATE groups set request='', xmldef='%s' where hardware_id=%s"; $arg_updGroup=array(generate_xml($req),$id_group); mysql2_query_secure( $sql_updGroup, $_SESSION['OCS']["writeServer"],$arg_updGroup); $nb_computer=add_computers_cache($list_id,$id_group,$static); return $nb_computer; } //create group function function creat_group ($name,$descr,$list_id,$req,$group_type) { global $l; if (trim($name) == "") return array('RESULT'=>'ERROR', 'LBL'=> $l->g(638)); if (trim($descr) == "") return array('RESULT'=>'ERROR', 'LBL'=> $l->g(1234)); //static group? if ($group_type == 'STATIC'){ $static=1; $req=""; }else $static=0; //does $name group already exists $reqGetId = "SELECT id FROM hardware WHERE name='%s' and deviceid = '_SYSTEMGROUP_'"; $argGetId=$name; $resGetId = mysql2_query_secure( $reqGetId, $_SESSION['OCS']["readServer"],$argGetId); if( $valGetId = mysqli_fetch_array( $resGetId ) ) return array('RESULT'=>'ERROR', 'LBL'=> $l->g(621)); //insert new group $sql_insert="INSERT INTO hardware(deviceid,name,description,lastdate) VALUES( '_SYSTEMGROUP_' , '%s', '%s', NOW())"; $arg_insert=array($name,$descr); mysql2_query_secure( $sql_insert, $_SESSION['OCS']["writeServer"],$arg_insert); //Getting hardware id $insertId = mysqli_insert_id( $_SESSION['OCS']["writeServer"] ); $xml=generate_xml($req); //Creating group $sql_group="INSERT INTO groups(hardware_id, xmldef, create_time) VALUES ( %s, '%s', UNIX_TIMESTAMP() )"; $arg_group=array($insertId,$xml); mysql2_query_secure( $sql_group, $_SESSION['OCS']["writeServer"],$arg_group); addLog("CREATE GROUPE",$name); //Generating cache if ($list_id != '') { $nb_computer=add_computers_cache($list_id,$insertId,$static); return array('RESULT'=>'OK', 'LBL'=> $nb_computer); } return array('RESULT'=>'OK', 'LBL'=> $l->g(607)." ". $l->g(608)); } //function to add computer in groups_cache function add_computers_cache($list_id,$groupid,$static){ require_once('function_computers.php'); //Generating cache if( lock($groupid) ) { $reqCache = "INSERT IGNORE INTO groups_cache(hardware_id, group_id, static) SELECT id, %s, %s from hardware where id in " ; $argCache=array($groupid,$static); $cache=mysql2_prepare($reqCache,$argCache,$list_id); mysql2_query_secure( $cache['SQL'], $_SESSION['OCS']["writeServer"], $cache['ARG']); $cached = mysqli_affected_rows($_SESSION['OCS']["writeServer"]); unlock($groupid); return $cached; } } //generation du xml en fonction des requetes function generate_xml($req){ //si il exite une requete if (isset($req[0])){ //création du début du xml $xml=""; //echo "xml=".$xml; $i=0; //concaténation des différentes requetes while (isset($req[$i])){ $xml.="".clean($req[$i]).""; $i++; } $xml.=""; }else //si aucune requete n'exite, on renvoie un xml vide $xml=""; return $xml; } function clean( $txt ) { $cherche = array( "&" , "<" , ">" , "\"" , "'"); $replace = array( "&","<",">", """, "'"); return str_replace($cherche, $replace, $txt); } function delete_group($id_supp){ global $l; if ($id_supp == "") return array('RESULT'=>'ERROR', 'LBL'=> "ID IS NULL"); if (!is_numeric($id_supp)) return array('RESULT'=>'ERROR', 'LBL'=> "ID IS NOT NUMERIC"); $sql_verif_group="select id from hardware where id=%s and DEVICEID='_SYSTEMGROUP_' or DEVICEID='_DOWNLOADGROUP_'"; $arg_verif_group=$id_supp; $res_verif_group = mysql2_query_secure( $sql_verif_group, $_SESSION['OCS']["readServer"],$arg_verif_group); if( $val_verif_group = mysqli_fetch_array( $res_verif_group ) ){ deleteDid($arg_verif_group); addLog("DELETE GROUPE",$id_supp); return array('RESULT'=>'OK', 'LBL'=> ''); }else return array('RESULT'=>'ERROR', 'LBL'=> $l->g(623)); } function group_4_all($id_group){ if ($id_group == "") return array('RESULT'=>'ERROR', 'LBL'=> "ID IS NULL"); if (!is_numeric($id_group)) return array('RESULT'=>'ERROR', 'LBL'=> "ID IS NOT NUMERIC"); $sql_verif="select WORKGROUP from hardware where id=%s"; $arg_verif=$id_group; $res = mysql2_query_secure($sql_verif, $_SESSION['OCS']["readServer"],$arg_verif); $item = mysqli_fetch_object($res); if ($item->WORKGROUP != "GROUP_4_ALL"){ $sql_update="update hardware set workgroup= 'GROUP_4_ALL' where id=%s"; $return_result['LBL']="Groupe visible pour tous"; }else{ $sql_update="update hardware set workgroup= '' where id=%s"; $return_result['LBL']="Groupe invisible"; } mysql2_query_secure($sql_update, $_SESSION['OCS']["writeServer"],$arg_verif); $return_result['RESULT']="OK"; addLog("ACTION VISIBILITY OF GROUPE",$id_group); return $return_result; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_index.php000077500000000000000000000124331303466605000257570ustar00rootroot00000000000000g(2), $pages_refs['ms_all_computers']); // $icons_list['ms_repart_tag']=create_icon($l->g(178), $pages_refs['ms_repart_tag']); // $icons_list['ms_groups']=create_icon($l->g(583), $pages_refs['ms_groups']); // $icons_list['ms_all_soft']=create_icon($l->g(765), $pages_refs['ms_all_soft']); // $icons_list['ms_multi_search']=create_icon($l->g(9), $pages_refs['ms_multi_search']); // $icons_list['ms_dict']=create_icon($l->g(380), $pages_refs['ms_dict']); // $icons_list['ms_upload_file']=create_icon($l->g(17) , $pages_refs['ms_upload_file']); // $icons_list['ms_regconfig']=create_icon($l->g(211), $pages_refs['ms_regconfig']); // $icons_list['ms_logs']=create_icon($l->g(928), $pages_refs['ms_logs']); // $icons_list['ms_admininfo']=create_icon($l->g(225), $pages_refs['ms_admininfo']); // $icons_list['ms_ipdiscover']=create_icon($l->g(174), $pages_refs['ms_ipdiscover']); // $icons_list['ms_doubles']=create_icon($l->g(175), $pages_refs['ms_doubles']); // $icons_list['ms_label']=create_icon($l->g(263), $pages_refs['ms_label']); // $icons_list['ms_users']=create_icon($l->g(243), $pages_refs['ms_users']); // $icons_list['ms_local']=create_icon($l->g(287), $pages_refs['ms_local']); // $icons_list['ms_help']=create_icon($l->g(570), $pages_refs['ms_help']); //} // Deprecated, could probably be dropped function getmicrotime() { return microtime(true); } //function create_icon( $label, $biere ) { // // global $pages_refs,$protectedGet; // $llink = "?".PAG_INDEX."=$biere"; // // switch($biere) { // // case $pages_refs['ms_codes']: $img = "codes"; break; // case $pages_refs['ms_ipdiscover']: $img = "securite"; break; // case $pages_refs['ms_config']: $img = "configuration"; break; // case $pages_refs['ms_regconfig']: $img = "regconfig"; break; // case $pages_refs['ms_doubles']: $img = "doublons"; break; // case $pages_refs['ms_upload_file']: $img = "agent"; break; // case $pages_refs['ms_admininfo']: $img = "administration"; break; // case $pages_refs['ms_label']: $img = "label"; break; // case $pages_refs['ms_local']: $img = "local"; break; // case $pages_refs['ms_dict']: $img = "dictionnaire"; break; // case $pages_refs['ms_help']: $img = "aide";$llink = "http://wiki.ocsinventory-ng.org"; break; // case $pages_refs['ms_all_soft']: $img = "ttlogiciels"; break; // case $pages_refs['ms_groups']: $img = "groups"; break; // case $pages_refs['ms_logs']: $img = "log"; break; // case $pages_refs['ms_multi_search']: $img = "recherche"; break; // case $pages_refs['ms_stats']: $img = "statistiques"; break; // case $pages_refs['ms_all_computers']: $img = "ttmachines"; break; // case $pages_refs['ms_repart_tag']: $img = "repartition"; break; // case $pages_refs['ms_users']: $img = "utilisateurs"; break; // } // if($protectedGet[PAG_INDEX] == $biere && $biere != "" ) { // $img .= "_a"; // } // //echo $img."
          "; // //si on clic sur l'icone, on charge le formulaire // //pour obliger le cache des tableaux a se vider // return ""; //} //function menu_list($name_menu,$packAct,$nam_img,$title,$data_list) //{ // global $protectedGet; // echo " //
          //
          // // toto
          //
          //
            //
          • ".$title."
          • "; // foreach ($data_list as $key=>$values){ // echo "
          • ".$values."
          • "; // } // echo "
          //
          //
          // "; // //} ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_ipdiscover.php000077500000000000000000000204021303466605000270120ustar00rootroot00000000000000g(305).":"; $tab_name=array($l->g(304).": ",$lbl_id . ":",$l->g(34).": ",$l->g(208).": "); if ($title == $l->g(931)) $type_field=array(0,2,3,0); else $type_field=array(0,2,0,0); $value_field=array($default_value['RSX_NAME'],$default_value['ID_NAME'],$default_value['ADD_IP'],$default_value['ADD_SX_RSX']); $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=30; } $tab_typ_champ[1]['COMMENT_AFTER']=""; $tab_typ_champ[1]["CONFIG"]['DEFAULT']="NO"; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $title, 'show_frame' => false )); } function verif_base_methode($base){ global $l; if (isset($_SESSION['OCS']['ipdiscover_methode']) and $_SESSION['OCS']['ipdiscover_methode'] != $base){ return $l->g(929)."
          ".$l->g(930); }else return false; } function add_subnet($add_ip,$sub_name,$id_name,$add_sub){ global $l; if (trim($add_ip) == '') return $l->g(932); if (trim($sub_name) == '') return $l->g(933); if (trim($id_name) == '' or $id_name == '0') return $l->g(934); if (trim($add_sub) == '') return $l->g(935); $row_verif=find_info_subnet($add_ip); if (isset($row_verif->NETID)){ $sql="update subnet set name='%s', id='%s', MASK='%s' where netid = '%s'"; $arg=array($sub_name,$id_name,$add_sub,$add_ip); }else{ $sql="insert into subnet (netid,name,id,mask) VALUES ('%s','%s', '%s','%s')"; $arg=array($add_ip,$sub_name,$id_name,$add_sub); } mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); return false; } function add_type($name,$update=''){ global $l; if (trim($name) == ''){ return $l->g(936); }else{ $row=find_info_type($name,'',$update); if (isset($row->ID)) return $l->g(937); } if ($update != ''){ $sql="update devicetype set NAME = '%s' where ID = '%s' "; $arg=array($name,$update); }else{ $sql="insert into devicetype (NAME) VALUES ('%s')"; $arg=$name; } mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); return false; } function delete_type($id_type){ $sql="delete from devicetype where id='%s'"; $arg=$id_type; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } function delete_subnet($netid){ $sql="delete from subnet where netid='%s'"; $arg=$netid; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } /** * Loads the whole mac file in memory */ function loadMac() { if(is_readable(MAC_FILE)) { $file=fopen(MAC_FILE,"r"); while (!feof($file)) { $line = fgets($file, 4096); if( preg_match("/^\s+((?:[a-fA-F0-9]{2}-){2}[a-fA-F0-9]{2})\s+\(.+\)\s+(.+)\s*$/", $line, $result ) ) { $_SESSION['OCS']["mac"][mb_strtoupper(str_replace("-",":",$result[1]))] = $result[2]; } } fclose($file); } } function form_add_community($title='',$default_value,$form){ global $l,$pages_refs,$protectedPost; $name_field=array("NAME","VERSION"); $tab_name=array($l->g(49).": ",$l->g(1199).": "); $type_field=array(0,2); $value_field=array($default_value['NAME'],$default_value['VERSION']); if ($protectedPost['VERSION'] == '3'){ array_push($name_field,"USERNAME","AUTHKEY","AUTHPASSWD"); array_push($tab_name,"USERNAME : ","AUTHKEY : ","AUTHPASSWD :"); array_push($type_field,0,0); array_push($value_field,$default_value['USERNAME'],$default_value['AUTHKEY'],$default_value['AUTHPASSWD']); } $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=30; } $tab_typ_champ[1]['RELOAD']=$form; if (is_numeric($protectedPost['MODIF'])){ $tab_hidden['MODIF']=$protectedPost['MODIF']; } $tab_hidden['ADD_COMM']=$protectedPost['ADD_COMM']; $tab_hidden['ID']=$protectedPost['ID']; tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden,array( 'title' => $title, 'show_frame' => false )); } function add_community($ID,$NAME,$VERSION,$USERNAME,$AUTHKEY,$AUTHPASSWD){ global $l; if ($VERSION == -1) $VERSION = '2c'; //this name of community still exist? $sql="select name from snmp_communities where name='%s' and version='%s' "; $arg=array($NAME,$VERSION); if (isset($ID) and is_numeric($ID)){ $sql.=" and id != %s"; array_push($arg,$ID); } $res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); //Exist if (isset($row->name)) return array('ERROR'=>$NAME." ".$l->g(363)); if (isset($ID) and is_numeric($ID)){ del_community($ID); $SUCCESS=$l->g(1209); }else $SUCCESS=$l->g(1208); $sql="insert into snmp_communities (ID,VERSION,NAME,USERNAME,AUTHKEY,AUTHPASSWD) VALUES ('%s','%s','%s','%s','%s','%s')"; $arg=array($ID,$VERSION,$NAME,$USERNAME,$AUTHKEY,$AUTHPASSWD); mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); return array('SUCCESS'=>$SUCCESS); } function del_community($id_community){ $sql="delete from snmp_communities where id='%s'"; $arg=$id_community; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); } function find_community_info($id){ $sql="select * from snmp_communities where id=%s"; $arg=$id; $res = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); return $row; } function runCommand($command="",$fname) { global $l; $command = "perl ipdiscover-util.pl $command -xml -h=".SERVER_READ." -u=".COMPTE_BASE." -p=".PSWD_BASE." -d=".DB_NAME." -path=".$fname; exec($command); } function find_all_subnet($dpt_choise=''){ if ($dpt_choise != '') return array_keys($_SESSION['OCS']["ipdiscover"][$dpt_choise]); else{ if (isset($_SESSION['OCS']["ipdiscover"])){ foreach ($_SESSION['OCS']["ipdiscover"] as $key=>$subnet){ foreach ($subnet as $sub=>$poub) $array_sub[]=$sub; } return $array_sub; }else return false; } } function count_noinv_network_devices($dpt_choise=''){ $array_sub=find_all_subnet($dpt_choise); $arg_count=array(); $sql_count="SELECT COUNT(DISTINCT mac) as c FROM netmap n LEFT OUTER JOIN networks ns ON ns.macaddr = mac WHERE mac NOT IN (SELECT DISTINCT(macaddr) FROM network_devices) and ( ns.macaddr IS NULL OR ns.IPSUBNET <> n.netid) and netid in "; $detail_query=mysql2_prepare($sql_count,$arg_count,$array_sub); if (!isset($_SESSION['OCS']['COUNT_CONSOLE']['OCS_REPORT_NB_IPDISCOVER']) and $dpt_choise == ''){ $res_count = mysql2_query_secure($detail_query['SQL'], $_SESSION['OCS']["readServer"],$detail_query['ARG']); $val_count = mysqli_fetch_array( $res_count ); return $val_count['c']; }else return $_SESSION['OCS']['COUNT_CONSOLE']['OCS_REPORT_NB_IPDISCOVER']; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_machine.php000077500000000000000000000202021303466605000262450ustar00rootroot00000000000000 ID; //echo $GET['systemid']; if ($GET['systemid'] == "") return $l->g(837); } //you can see computer's detail by md5(deviceid) if (isset($GET['crypt'])){ $querydeviceid = "SELECT ID FROM hardware WHERE md5(deviceid)='%s'"; $argdevicedid=($GET['crypt']); $resultdeviceid = mysql2_query_secure($querydeviceid, $_SESSION['OCS']["readServer"],$argdevicedid); $item = mysqli_fetch_object($resultdeviceid); $GET['systemid']=$item -> ID; //echo $GET['systemid']; if ($GET['systemid'] == "") return $l->g(837); } //si le systemid de la machine existe if (isset($GET['systemid']) and !isset($systemid)) $systemid = $GET['systemid']; //problème sur l'id //echo $systemid; if ($systemid == "" or !is_numeric($systemid)) return $l->g(837); //recherche des infos de la machine $querydeviceid = "SELECT * FROM hardware h left join accountinfo a on a.hardware_id=h.id WHERE h.id=".$systemid." "; if ($_SESSION['OCS']['profile']->getRestriction('GUI') == "YES" and isset($_SESSION['OCS']['mesmachines']) and $_SESSION['OCS']['mesmachines'] != '' and !isset($GET['crypt'])) $querydeviceid .= " and (".$_SESSION['OCS']['mesmachines']." or a.tag is null or a.tag='')"; $resultdeviceid = mysqli_query($_SESSION['OCS']["readServer"],$querydeviceid) or mysqli_error($_SESSION['OCS']["readServer"]); $item = mysqli_fetch_object($resultdeviceid); if ( $item -> ID == ""){ return $l->g(837); } return $item; } function subnet_name($systemid){ if (!is_numeric($systemid)) return false; $reqSub = "select NAME,NETID from subnet left join networks on networks.ipsubnet = subnet.netid where networks.status='Up' and hardware_id=".$systemid; $resSub = mysqli_query($_SESSION['OCS']["readServer"],$reqSub) or die(mysqli_error($_SESSION['OCS']["readServer"])); while($valSub = mysqli_fetch_object( $resSub )){ $returnVal[]=$valSub->NAME." (".$valSub->NETID.")"; } return $returnVal; } function print_item_header($text) { echo '

          '.mb_strtoupper($text, "UTF-8").'

          '; } function bandeau($data,$lbl,$link=array()){ global $protectedGet,$pages_refs; if (!is_array($link)) $link=array(); $data=data_encode_utf8($data); $nb_col=2; echo ""; echo "
          "; echo " "; $i=0; foreach ($data as $name=>$value){ if (trim($value) != ''){ if ($i == $nb_col){ echo ""; $i=0; } if (!array_key_exists($name,$link)){ //$value=htmlentities($value,ENT_COMPAT,'UTF-8'); $value=strip_tags_array($value); } if ($name == "IPADDR") { $value = preg_replace('/([x0-9])\//', '$1 / ',$value); } echo ""; $i++; } } echo "
           ".$lbl[$name].": ".$value."
          "; } function show_packages($systemid,$page="ms_computer"){ global $l,$pages_refs,$ii,$td3,$td2,$td4; $query="SELECT a.name, d.tvalue,d.ivalue,d.comments,e.fileid, e.pack_loc,h.name as name_server,h.id,a.comment FROM devices d left join download_enable e on e.id=d.ivalue LEFT JOIN download_available a ON e.fileid=a.fileid LEFT JOIN hardware h on h.id=e.server_id WHERE d.name='DOWNLOAD' and a.name != '' and pack_loc != '' AND d.hardware_id=%s union SELECT '%s', d.tvalue,d.ivalue,d.comments,e.fileid, '%s',h.name,h.id,a.comment FROM devices d left join download_enable e on e.id=d.ivalue LEFT JOIN download_available a ON e.fileid=a.fileid LEFT JOIN hardware h on h.id=e.server_id WHERE d.name='DOWNLOAD' and a.name is null and pack_loc is null AND d.hardware_id=%s"; $arg_query=array($systemid,$l->g(1129),$l->g(1129),$systemid); $resDeploy = mysql2_query_secure($query, $_SESSION['OCS']["readServer"],$arg_query); if( mysqli_num_rows( $resDeploy )>0 ) { while( $valDeploy = mysqli_fetch_array( $resDeploy ) ) { $ii++; $td3 = $ii%2==0?$td2:$td4; if ((strpos($valDeploy["comment"], "[VISIBLE=1]") or strpos($valDeploy["comment"], "[VISIBLE=]") or (!$_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE') and strpos($valDeploy["comment"], "[VISIBLE=0]")) or !strpos($valDeploy["comment"], "[VISIBLE")) or ($_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE', 'NO') == "NO" and preg_match("[VISIBLE=0]", $valDeploy["comment"]))){ //echo $valDeploy["comment"]; // echo $_SESSION['OCS']['profile']->getRestriction('TELEDIFF_VISIBLE'); echo ""; echo ""; echo $td3.$l->g(498)." ".$valDeploy["name"].""; if (isset($valDeploy["fileid"])) echo "(".$valDeploy["fileid"].")"; if ($valDeploy["name_server"]!="") echo " (".$l->g(499)." redistrib: ".$valDeploy["name_server"].""; else echo " (".$l->g(499).": ".$valDeploy["pack_loc"]." "; echo ")"; if ($page == "ms_computer"){ echo $td3.$l->g(81).": ".($valDeploy["tvalue"]!=""?$valDeploy["tvalue"]:$l->g(482)); echo ($valDeploy["comments"]!=""?" (".$valDeploy["comments"].")":""); echo ""; if( $_SESSION['OCS']['profile']->getConfigValue('TELEDIFF')=="YES" ) { echo "$td3 ".$l->g(122).""; }elseif (strstr($valDeploy["tvalue"], 'ERR_') or strstr($valDeploy["tvalue"], 'EXIT_CODE')){ echo $td3."".$l->g(113).""; if ($valDeploy["name"] != $l->g(1129)) echo $td3."".$l->g(1246).""; }elseif (strstr($valDeploy["tvalue"], 'NOTIFIED')){ if (isset($valDeploy["comments"]) and strtotime ($valDeploy["comments"])"; } } }else{ if( $_SESSION['OCS']['profile']->getConfigValue('TELEDIFF') == "YES" ) echo "$td3 ".$l->g(122).""; show_stat($valDeploy["fileid"]); echo ""; //print_r($valDeploy); } echo ""; } } } } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_modify.php000077500000000000000000000000111303466605000261240ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/function_opt_param.php000077500000000000000000000060211303466605000266260ustar00rootroot00000000000000 ".(isset($optPerso[$lbl])?"":" ").""; echo $td3.$lblPerso.""; if( isset( $optPerso[$lbl] )) { if( isset($optPerso[$lbl]["IVALUE"]) ) echo $td3.$optPerso[$lbl]["IVALUE"]." ".$end.""; } else { if($end !=''){ echo $td3.$l->g(488)." (".$default_value." ".$end.")"; } else { echo $td3.$l->g(488)." (".$default_value.")"; } } echo ""; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_rules.php000077500000000000000000000123751303466605000260070ustar00rootroot00000000000000 id) return 'NAME_EXIST'; else return 'NAME_NOT_EXIST'; } function verify_rule($rule_or_condition,$ID){ $sql="select id from download_affect_rules where %s='%s'"; $arg=array($rule_or_condition,$ID); $result_id = mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); $id_exist = mysqli_fetch_object($result_id); if ($id_exist->id) return 'RULE_EXIST'; else return 'RULE_NOT_EXIST'; } function delete_rule($ID_RULE){ global $l; $id_exist=verify_rule('rule',$ID_RULE); if ($id_exist == "RULE_EXIST"){ $sql_del_rule="delete from download_affect_rules where rule='%s'"; $arg=$ID_RULE; mysql2_query_secure($sql_del_rule, $_SESSION['OCS']["writeServer"],$arg); }else echo msg_error($l->g(672)); } function delete_condition_rule($ID){ global $l; $id_exist=verify_rule('id',$ID); if ($id_exist == "RULE_EXIST"){ $sql_del_rule="delete from download_affect_rules where id='%s'"; $arg=$ID; mysql2_query_secure($sql_del_rule, $_SESSION['OCS']["writeServer"],$arg); }else echo msg_error($l->g(672)); } /* * Function for add new rule for redistribution server * * $RULE_NAME= Name of the rule * $RULE_VALUES = array with condition values * => ex: $RULE_VALUES['PRIORITE_1'],$RULE_VALUES['CFIELD_1'], * $RULE_VALUES['OP_1'],$RULE_VALUES['COMPTO_1'],$RULE_VALUES['COMPTO_TEXT_1'], * $RULE_VALUES['PRIORITE_2'],$RULE_VALUES['CFIELD_2'], * $RULE_VALUES['OP_2'],$RULE_VALUES['COMPTO_2'],$RULE_VALUES['COMPTO_TEXT_2'] * $ID_RULE= Id of the rule. It can't exist before * */ function add_rule($RULE_NAME,$RULE_VALUES,$ID_RULE=''){ global $l,$protectedPost; $rule_exist=verify_name($RULE_NAME); if ($rule_exist == 'NAME_NOT_EXIST'){ //verify this id is new $sql="select id from download_affect_rules where id='%s'"; $arg=$ID_RULE; $result_id = mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); $id_exist = mysqli_fetch_object($result_id); //generate id if (!is_numeric($ID_RULE) or $ID_RULE == '' or isset($id_exist->id)){ $sql_new_id="select max(RULE) as ID_RULE from download_affect_rules"; $result_new_id = mysql2_query_secure($sql_new_id, $_SESSION['OCS']["readServer"]); $new_id = mysqli_fetch_object($result_new_id); $ID_RULE=$new_id -> ID_RULE; $ID_RULE++; } //insert new rule $i=1; while ($RULE_VALUES['PRIORITE_'.$i]){ if ($RULE_VALUES['CFIELD_'.$i] != "") { $sql_insert_rule="insert into download_affect_rules (RULE,RULE_NAME,PRIORITY,CFIELD,OP,COMPTO,SERV_VALUE) value (%s,'%s',%s,'%s','%s','%s','%s')"; $arg=array($ID_RULE,$protectedPost['RULE_NAME'], $RULE_VALUES['PRIORITE_'.$i],$RULE_VALUES['CFIELD_'.$i], $RULE_VALUES['OP_'.$i],$RULE_VALUES['COMPTO_'.$i],$RULE_VALUES['COMPTO_TEXT_'.$i]); mysql2_query_secure($sql_insert_rule, $_SESSION['OCS']["writeServer"],$arg); } $i++; } } else{ echo msg_error($l->g(670)); } } /* * HTML fields for condition of rule * */ function fields_conditions_rules($num,$entete='NO'){ global $l,$protectedPost; if ($entete != 'NO') $tab.="".$l->g(675)."".$l->g(676)."".$l->g(677)."".$l->g(678).""; $CFIELD=array('NAME'=>$l->g(679),'IPADDRESS'=>'@IP','IPSUBNET'=>'IPSUBNET','WORKGROUP'=>$l->g(680),'USERID'=>$l->g(681)); $OP=array('EGAL'=>"=",'DIFF'=>"<>",'LIKE'=>'LIKE'); if (!isset($protectedPost["PRIORITE_".$num])) $protectedPost["PRIORITE_".$num]=$num; $tab.="".show_modif($protectedPost["PRIORITE_".$num],"PRIORITE_".$num,'0').""; $tab.="".show_modif($CFIELD,"CFIELD_".$num,'2').""; $tab.="".show_modif($OP,"OP_".$num,'2').""; $tab.="".show_modif($CFIELD,"COMPTO_".$num,'2').""; return $tab; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_search.php000077500000000000000000000542471303466605000261260ustar00rootroot000000000000001, "DRIVES"=>5, "GROUPS_CACHE"=>2, "SOFTWARES"=>10, "ACCOUNTINFO"=>1, "BIOS"=>3, "MONITORS"=>1, "NETWORKS"=>3, "REGISTRY"=>5, "DOWNLOAD_HISTORY"=>6, "DEVICES"=>3, "VIDEOS"=>2, "PRINTERS"=>4, "CPUS"=>1); asort($weight_table); //utilisation des tables de cache pour: if ($_SESSION['OCS']["usecache"] == true){ //liste des tables $table_cache=array('SOFTWARES'=>'SOFTWARES_NAME_CACHE'); //liste des champs correspondants ou la recherche doit se faire $field_cache=array('SOFTWARES_NAME_CACHE'=>'NAME'); } //liste des tables qui ne doivent pas faire des fusions de requête //cas pour les tables multivaluées $tab_no_fusion=array("DEVICES","REGISTRY","DRIVES","SOFTWARES","DOWNLOAD_HISTORY","PRINTERS","CPUS","GROUPS_CACHE"); //define caption of fields $lbl_fields_calcul['PRINTERS']=array($l->g(79).": ".$l->g(49)=>'printers.name', $l->g(79).": ".$l->g(278)=>'printers.driver', $l->g(79).": ".$l->g(279)=>'printers.port', $l->g(79).": ".$l->g(53)=>'printers.description', $l->g(79).": ".$l->g(1323) =>'printers.servername', $l->g(79).": ".$l->g(1324) =>'printers.sharename', $l->g(79).": ".$l->g(1325) =>'printers.resolution', $l->g(79).": ".$l->g(51) =>'printers.comment', $l->g(79).": ".$l->g(1326) =>'printers.shared', $l->g(79).": ".$l->g(1327) =>'printers.network'); $lbl_fields_calcul['DRIVES']=array($l->g(838)=>'drives.LETTER', $l->g(839)=>'drives.TYPE', $l->g(840)=>'drives.FILESYSTEM', $l->g(841)=>'drives.TOTAL', $l->g(842)=>'drives.FREE', $l->g(843)=>'drives.VOLUMN'); $lbl_fields_calcul['GROUPS_CACHE']=array( $l->g(844) => 'groups_cache.GROUP_ID', $l->g(845) => 'groups_cache.STATIC'); if (isset($_SESSION['OCS']['USE_NEW_SOFT_TABLES']) and $_SESSION['OCS']['USE_NEW_SOFT_TABLES'] == 1){ $lbl_fields_calcul['SOFTWARES']=array( $l->g(846) => 'softwares.PUBLISHER', $l->g(847) => 'softwares.NAME_ID', $l->g(848) => 'softwares.VERSION_ID', $l->g(849) => 'softwares.FOLDER', $l->g(850) => 'softwares.COMMENTS'); }else{ $lbl_fields_calcul['SOFTWARES']=array( $l->g(846) => 'softwares.PUBLISHER', $l->g(847) => 'softwares.NAME', $l->g(848) => 'softwares.VERSION', $l->g(849) => 'softwares.FOLDER', $l->g(850) => 'softwares.COMMENTS'); } $lbl_fields_calcul['BIOS']=array($l->g(851)=>'bios.SMANUFACTURER', $l->g(852)=>'bios.SMODEL', $l->g(853)=>'bios.SSN', $l->g(854)=>'bios.TYPE', $l->g(855)=>'bios.BMANUFACTURER', $l->g(856)=>'bios.BVERSION', $l->g(857)=>'bios.BDATE' ); $lbl_fields_calcul['MONITORS']=array( $l->g(858)=> 'monitors.MANUFACTURER', $l->g(859)=> 'monitors.CAPTION', $l->g(860) => 'monitors.DESCRIPTION', $l->g(861) => 'monitors.TYPE', $l->g(862) => 'monitors.SERIAL'); $lbl_fields_calcul['NETWORKS']=array($l->g(863) => 'networks.DESCRIPTION', $l->g(864) => 'networks.TYPE', $l->g(865) => 'networks.TYPEMIB', $l->g(866) => 'networks.SPEED' , $l->g(867) => 'networks.MACADDR', $l->g(868) => 'networks.STATUS', $l->g(869) => 'networks.IPADDRESS', $l->g(870) => 'networks.IPMASK', $l->g(871) => 'networks.IPSUBNET', $l->g(872) => 'networks.IPGATEWAY', $l->g(873) => 'networks.IPDHCP'); $lbl_fields_calcul['REGISTRY']=array($l->g(874) => 'registry.NAME', $l->g(875) => 'registry.REGVALUE'); $lbl_fields_calcul['CPUS']=array($l->g(64) => 'cpus.MANUFACTURER', $l->g(66) => 'cpus.TYPE', $l->g(36) => 'cpus.SERIALNUMBER', $l->g(429) => 'cpus.SPEED', $l->g(1317) => 'cpus.CORES', $l->g(1318) => 'cpus.L2CACHESIZE', $l->g(1247) => 'cpus.CPUARCH', $l->g(1312) => 'cpus.DATA_WIDTH', $l->g(1313) => 'cpus.CURRENT_ADDRESS_WIDTH', $l->g(1314) => 'cpus.LOGICAL_CPUS', $l->g(1319) => 'cpus.VOLTAGE', $l->g(1315) => 'cpus.CURRENT_SPEED', $l->g(1316) => 'cpus.SOCKET'); //fonction qui exécute les requetes de la recherche //et qui retourne les ID des machines qui match. function execute_sql_returnID($list_id,$execute_sql,$no_cumul='',$table_name){ global $l; $debug=''; //on parcourt le tableau de requetes foreach ($execute_sql as $weight => $id){ $i=0; //on prends toutes les requetes qui ont le même poids while ($id[$i]){ //on cherche a savoir si on est sur la table hardware //dans ce cas, la concat des id doit se faire avec le champ ID if (substr_count($id[$i],"from hardware")){ $name_field_id=" ID "; $fin_sql=" and deviceid<>'_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_' "; } else{ $name_field_id=" HARDWARE_ID "; $fin_sql=""; if ($no_cumul == "") $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][]=$id[$i]; else $_SESSION['OCS']['SQL_DATA_FIXE'][$table_name][]=str_replace("like", "not like", $id[$i]); } //si une liste d'id de machine existe, //on va concat la requête avec les ID des machines if ($list_id != "" and $no_cumul == ''){ if (is_array($list_id)) $list=implode(',',$list_id); else $list=$list_id; $id[$i].= " AND ".$name_field_id." IN (".$list.")"; unset($list_id); } $id[$i].=$fin_sql; $result = mysqli_query($_SESSION['OCS']["readServer"],$id[$i]) or mysqli_error($_SESSION['OCS']["readServer"]); if ($result){ while($item = mysqli_fetch_object($result)){ $list_id[$item->HARDWARE_ID]=$item->HARDWARE_ID; foreach ($item as $field=>$value){ if ($field != "HARDWARE_ID" and $field != "ID") $tab_options['VALUE'][$field][$item->HARDWARE_ID]=$value; } } } if ($_SESSION['OCS']['DEBUG'] == 'ON') $debug .= "

          ".$l->g(5001)."
          ".$id[$i]."
          ".$l->g(5002).$weight; //si aucun id trouvé => end if ($list_id == '') return array('',$tab_options,'DEBUG'=>$debug); $i++; } } return array($list_id,$tab_options,'DEBUG'=>$debug); } //fonction pour ordonner les requetes en fonction //du poids de la table function class_weight($list_sql){ global $weight_table; foreach ($list_sql as $table_name=>$id){ $poids=$weight_table[$table_name]; foreach($id as $i=>$sql) $execute_sql[$poids][]=$sql.'))'; //ajout de la dernière parenthèse pour fermer la requête } // if ($sens == 'ASC') ksort($execute_sql); // else // ksort($execute_sql); return $execute_sql; } //fonction qui permet de prendre en compte les requêtes intermédiaires pour //la création des groupes dynamiques function traitement_cache($sql_temp,$field_modif,$field_value,$field_value_complement){ if ($sql_temp != ""){ if ($field_modif == "field_value") $field_value= " (".$sql_temp.") "; else{ $value_complement_temp=explode('(',$field_value_complement); $value_complement_temp2=explode(')',$value_complement_temp[1]); if (substr(trim($value_complement_temp[0]),-2) != 'IN') $in='IN'; else $in=''; $field_value_complement=$value_complement_temp[0]." ".$in." (".$sql_temp.") ".$value_complement_temp2[1]; //p($value_complement_temp); //$field_value_complement= " IN (".$sql_temp.") "; } } $toto= array('field_value'=>$field_value,'field_value_complement'=>$field_value_complement); return $toto; } //fonction qui permet de passer en SESSION //les requetes pour la création des groupes dynamiques function sql_group_cache($cache_sql){ unset($_SESSION['OCS']['SEARCH_SQL_GROUP']); //requête de recherche "normale" (ressemble, exactement) if ($cache_sql['NORMAL']){ foreach ($cache_sql['NORMAL'] as $poids=>$list){ $i=0; while ($list[$i]){ $fin_sql=""; if (substr_count($list[$i],"from hardware")) $fin_sql=" and deviceid<>'_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_' "; else $fin_sql=""; $_SESSION['OCS']['SEARCH_SQL_GROUP'][]=$list[$i].$fin_sql; $i++; } } } //requête de recherche "différent", "n'appartient pas" if ($cache_sql['DIFF']){ foreach ($cache_sql['DIFF'] as $poids=>$list){ $i=0; while ($list[$i]){ $fin_sql=""; if (substr_count($list[$i],"from hardware")) $fin_sql=" and deviceid<>'_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_' "; else $fin_sql=""; $_SESSION['OCS']['SEARCH_SQL_GROUP'][]="select distinct id as HARDWARE_ID from hardware where id not in (".$list[$i].")".$fin_sql; $i++; } } } //print_r($_SESSION['OCS']['SEARCH_SQL_GROUP']); } //fonction pour prendre en compte les jockers dans la saisie (* et ?) function jockers_trait($field_value){ $field_value_modif=$field_value; //prise en compte du caractère * pour les champs $count_ast=substr_count($field_value,"*"); //si au moins un * a été trouvé if ($count_ast>0) $field_value_modif = str_replace("*", "%", $field_value); //prise en compte du caractère ? pour les champs $count_intero=substr_count($field_value_modif,"?"); //si au moins un ? a été trouvé if ($count_intero>0) $field_value_modif = str_replace("?", "_", $field_value_modif); //on retourne la valeur traitée //echo "
          ".$field_value_modif."
          ".$field_value."
          "; if ($field_value_modif == $field_value) return "'%".$field_value."%'"; else return "'".$field_value_modif."'"; } //function for search on date function compair_with_date($field,$field_value){ global $l; //modification d'un champ texte en date dans certains cas if ($field == "LASTDATE" or $field == "LASTCOME" or $field == "REGVALUE"){ $tab_date = explode('/', $field_value); $ref_date = explode('/', $l->g(1242)); $day=array_search('d',$ref_date); $months=array_search('m',$ref_date); $year=array_search('y',$ref_date); //on applique le traitement que si la date est valide if (@checkdate ($tab_date[$months],$tab_date[$day],$tab_date[$year])){ $field= " unix_timestamp(".$field.") "; $tab_date = explode('/', $field_value); $field_value= mktime (0,0,0,$tab_date[$months],$tab_date[$day],$tab_date[$year]); } } return array('field'=>$field,'field_value'=>$field_value); } //fonction qui permet de créer le début des requêtes à exécuter function generate_sql($table_name) { global $weight_table,$lbl_fields_calcul; if ($table_name == "HARDWARE"){ $VALUE_id="ID"; $entre=" as HARDWARE_ID"; // $sql_id_fin=" and deviceid<>'_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_' "; } else{ $VALUE_id="HARDWARE_ID"; // $field_to_add=witch_field_more($weight_table); $complement_id=","; if (isset($lbl_fields_calcul[$table_name])){ foreach ($lbl_fields_calcul[$table_name] as $key=>$value){ $complement_id .= $value." as '".$key."',"; } } $complement_id= substr($complement_id,0,-1); // $complement_id=",".implode(',',$lbl_fields_calcul[$table_name]); // $sql_id_fin=""; //$entre=""; } $sql_temp="select distinct ".$VALUE_id.$entre.$complement_id." from ".strtolower($table_name)." where ("; $sql_cache="select distinct ".$VALUE_id.$entre." from ".strtolower($table_name)." where ("; return array('sql_temp'=>$sql_temp,'sql_cache'=>$sql_cache); } //fonction qui permet d'afficher la ligne de recherche en fonction //du type du champ function show_ligne($value,$color,$id_field,$ajout,$form_name){ global $optSelectField, $opt2SelectField, $opt2Select, $optSelect2Field, $opt3Select, $optSelect, $optArray,$l,$protectedPost; $nameField=$value."-".$id_field; if ($ajout != ''){ $and_or=show_modif(array('AND'=>'AND','OR'=>'OR'),"SelAndOr-".$nameField,2,'',array('DEFAULT'=>'NO')); } //si le champ comporte une valeur du champ select par défaut if (array_key_exists($value.'-SELECT',$optArray)) //on prend les valeurs du champ $champ_select=$optArray[$value.'-SELECT']; else //si on garde les valeurs par défaut $champ_select=array('exact'=> $l->g(410),'ressemble'=>$l->g(129) ,'diff'=>$l->g(130) ); //on génére le premier champ select $select=""; //on affiche le début de ligne echo "
          "; if ($ajout != '') echo $and_or; echo " ".$optArray[$value].' '; //TITRE,CHAMP (EGAL,LIKE,NOTLIKE),valeur if( array_key_exists($value,$optSelectField)){ echo $select."   "; if ($optSelectField[$value."-LBL"] == "calendar") echo calendars("InputValue-".$nameField,$l->g(1270)); echo "
          "; //echo $value."-LBL".$id_field; } //TITRE,CHAMPSELECT,(pour $optSelect) //et les champs suivants en plus pour $opt2SelectField: CHAMP (EGAL,LIKE,NOTLIKE) et valeur if( array_key_exists($value,$opt2SelectField) or array_key_exists($value,$optSelect)){ if (array_key_exists($value,$opt2SelectField)){ $data=$opt2SelectField; //nom en Value3 car le traitement doit se faire sur la valeur de ce champ (cas particulier) $name_select='SelFieldValue3'; } else{ $data=$optSelect; $name_select='SelFieldValue'; } $select2=""; echo $select2; if (array_key_exists($value,$opt2SelectField)){ if ($opt2SelectField[$value."-LBL"] == "calendar") $opt2SelectField[$value."-LBL"]= calendars("InputValue-".$nameField,$l->g(1270)); echo $select."   ".$opt2SelectField[$value."-LBL"]; } echo "
      "; } //TITRE,CHAMP (EGAL,LIKE,NOTLIKE),CHAMPSELECT if( array_key_exists($value,$opt2Select)){ $selectValue=""; echo $select.$selectValue."  
      "; } //TITRE,CHAMPSELECT,valeur1,valeur2 if( array_key_exists($value,$optSelect2Field)){ //gestion de la vision du deuxieme champ de saisi //on fonction du POST if ($protectedPost['SelComp-'.$nameField] == "between") $display="inline"; else $display="none"; echo $select."  
       -- 
      ".$optSelect2Field[$value."-LBL"]."
      "; } if( array_key_exists($value,$opt3Select)){ $selectValue1=""; $selectValue2=""; echo $select." ".$l->g(667).":".$selectValue1." ".$l->g(546).":".$selectValue2."
      "; } } //fonction qui permet d'utiliser un calendrier dans un champ function calendars($NameInputField,$DateFormat) { return "\"Pick"; } function add_trait_select($img,$list_id,$form_name,$list_pag,$comp = false) { global $l; $_SESSION['OCS']['ID_REQ']=id_without_idgroups($list_id); echo ""; ?>
      $value){ echo ''; } ?>
      g(584); $choise_req_selection['SEL']=$l->g(585); } else{ $choise_req_selection['SEL']=$l->g(585); } $select_choise=show_modif($choise_req_selection,'CHOISE',2,$form_name); echo "
      ".$lbl_choise." ".$select_choise."

      "; } if ($protectedPost['CHOISE'] == 'REQ' or $protectedGet['idchecked'] == ''){ msg_info($l->g(901)); if ($protectedGet['idchecked'] == ''){ echo ""; $protectedPost['CHOISE'] = 'REQ'; } $list_id=$_SESSION['OCS']['ID_REQ']; } if ($protectedPost['CHOISE'] == 'SEL'){ msg_info($l->g(902)); $list_id=$protectedGet['idchecked']; } //gestion tableau if (is_array($list_id)) $list_id=implode(",", $list_id); }else $list_id=$protectedGet['idchecked']; if ($list_id != "") return $list_id; else{ return false; } } function found_soft_type($type,$id ="",$name=""){ $sql="select id, name from %s "; $arg=array($type); if($id != ""){ $sql.= " where id=%s"; array_push($id,$arg); }elseif($name != ""){ $sql.= " where name='%s'"; array_push($name,$arg); } $result=mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg); while($item = mysqli_fetch_object($result)){ $res[$item->id]=$item->name; } return $res; } function id_without_idgroups($list_id){ $sql="select id from hardware where deviceid <> '_SYSTEMGROUP_' AND deviceid <> '_DOWNLOADGROUP_' AND id in "; $arg=array(); $sql=mysql2_prepare($sql,$arg,$list_id); $result=mysql2_query_secure( $sql['SQL'], $_SESSION['OCS']["readServer"],$sql['ARG']); while($item = mysqli_fetch_object($result)){ $res[$item->id]=$item->id; } return $res; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_server.php000077500000000000000000000301411303466605000261520ustar00rootroot00000000000000g(512), $l->g(876).$packid." => ".$list_id ); } function found_id_pack_serv($packid){ $sql_id_pack="select ID from download_enable where fileid=%s and ( group_id != '' and group_id is not null)"; $arg=$packid; $result = mysql2_query_secure( $sql_id_pack, $_SESSION['OCS']["readServer"], $arg ); while($id_pack = mysqli_fetch_array( $result )){ $id_paquets[]=$id_pack['ID']; } return $id_paquets; } //fonction qui permet de savoir //le nombre de serveur déjà dans un groupe //et dans lesquels ils se trouvent function exist_server($list_id){ global $l; $sql="SELECT count(hardware_id) c,group_id,name FROM download_servers,hardware where hardware.id=download_servers.group_id and hardware_id in "; $arg=mysql2_prepare($sql,array(),$list_id); $res= mysql2_query_secure( $arg['SQL'] . " group by group_id ", $_SESSION['OCS']["readServer"],$arg['ARG']); $msg= ""; while( $val = mysqli_fetch_array( $res ) ){ $msg.= $val['c'] . " " . $l->g(1135) . " " . $val['name'] . "
      "; } if ($msg != ""){ msg_error($l->g(877) . "
      " . $msg . " " . $l->g(878)); } } // fonction qui permet de supprimer des serveurs // d'un groupe de redistribution function remove_list_serv($id_group,$list_id){ if (is_array($list_id)) $list_id=implode(",", $list_id); $sql_del="DELETE FROM download_servers WHERE group_id='%s' and hardware_id in "; $arg_del=array($id_group); $arg=mysql2_prepare($sql_del,$arg_del,$list_id); mysql2_query_secure( $arg['SQL'], $_SESSION['OCS']["writeServer"] ,$arg['ARG']); $cached = mysqli_affected_rows($_SESSION['OCS']["writeServer"]); return $cached; } function replace_var_generic($hardware_id,$url_group_server,$id_group=false) { $count_add_ip=substr_count($url_group_server, '$IP$'); $count_name=substr_count($url_group_server, '$NAME$'); if ($count_add_ip>0 or $count_name>0){ $sql="select IPADDR,NAME,ID from hardware where ID"; if ($hardware_id != 'ALL'){ $sql .= " = %s"; $arg = $hardware_id; } else{ $sql .= " in (select hardware_id from groups_cache where group_id = %s)"; $arg = $id_group; } $resdefaultvalues = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg); while ($item = mysqli_fetch_object($resdefaultvalues)) { $url_temp=str_replace('$IP$', $item -> IPADDR, $url_group_server); $url[$item -> ID]=str_replace('$NAME$', $item -> NAME, $url_temp); } } elseif($hardware_id != 'ALL') $url[$hardware_id]=$url_group_server; else{ $sql = "select ID from hardware where ID"; $sql .= " in (select hardware_id from groups_cache where group_id = %s)"; $arg=$id_group; $resdefaultvalues = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg); while ($item = mysqli_fetch_object($resdefaultvalues)) { $url[$item -> ID]=$url_group_server; } } return $url; } //function for add machine in server's group function add_mach($id_group,$list_mach) { $default_values=look_config_default_values(array('DOWNLOAD_SERVER_URI','DOWNLOAD_SERVER_DOCROOT')); if (is_array($list_mach)){ foreach ($list_mach as $key=>$value){ $reqCache = "INSERT IGNORE INTO download_servers(hardware_id, url, add_rep,GROUP_ID) VALUES (%s,'%s','%s',%s)"; $argcache=array($value,$default_values['tvalue']['DOWNLOAD_SERVER_URI'],$default_values['tvalue']['DOWNLOAD_SERVER_DOCROOT'],$id_group); $cachedRes = mysql2_query_secure( $reqCache , $_SESSION['OCS']["writeServer"] , $argcache); } }else{ $reqCache = "INSERT IGNORE INTO download_servers(hardware_id, url, add_rep,GROUP_ID) select id,'%s','%s',%s from hardware where id in "; $argCache=array($default_values['tvalue']['DOWNLOAD_SERVER_URI'],$default_values['tvalue']['DOWNLOAD_SERVER_DOCROOT'],$id_group); $arg=mysql2_prepare($reqCache,$argCache,$list_mach); $cachedRes = mysql2_query_secure( $arg['SQL'], $_SESSION['OCS']["writeServer"],$arg['ARG'] ); } return mysqli_affected_rows($_SESSION['OCS']["writeServer"]); } //function for admin server function admin_serveur($action,$name_server,$descr,$mach) { global $l; if ($action == "") return $l->g(663); //intern problem if (trim($name_server) == "") return $l->g(638); //name of server is empty if ($mach == "") return $l->g(665); //no mach selected. group not creat if (is_numeric($name_server)) $idGroupServer=$name_server; else{ //verification group not have the same name $reqGetId = "SELECT id FROM hardware WHERE name='%s'"; $arg=$name_server; $resGetId = mysql2_query_secure( $reqGetId, $_SESSION['OCS']["readServer"],$arg); if( $valGetId = mysqli_fetch_array( $resGetId ) ) $idGroupServer = $valGetId['id']; } //if we are in creat new server if ($action == 'new_serv'){ //if the name not exist in the base if (!isset($idGroupServer)){ $deviceid='_DOWNLOADGROUP_'; $sql="INSERT INTO hardware(deviceid,name,description,lastdate) VALUES( '%s' , '%s', '%s', NOW() )"; $arg=array($deviceid,$name_server,$descr); mysql2_query_secure( $sql, $_SESSION['OCS']["writeServer"],$arg); //Getting hardware id $insertId = mysqli_insert_id( $_SESSION['OCS']["writeServer"] ); exist_server($mach); $nb_mach=add_mach($insertId,$mach); msg_success($l->g(880) . "
      " . $nb_mach . " " . $l->g(881)); return ''; }else return $l->g(621); //this name already exists }//if the machines add to the group or the group is replace elseif ($action == 'add_serv' or $action == 'replace_serv'){ if ($action == 'replace_serv'){ $sql="DELETE FROM download_servers WHERE GROUP_ID=%s"; $arg=$idGroupServer; mysql2_query_secure( $sql, $_SESSION['OCS']["writeServer"],$arg ); } exist_server($mach); $nb_mach=add_mach($idGroupServer,$mach); msg_success($l->g(879) . "
      " . $nb_mach . " " . $l->g(881)); return ''; }elseif($action == 'del_serv'){ $nb_mach=remove_list_serv($idGroupServer,$mach); msg_success($nb_mach . " " . $l->g(882)); return ''; } } //function for insert machine with rules //$rule_detail=array($cfield[$key],$op[$key],$compto[$key]); function insert_with_rules($list_id,$rule_detail,$fileid){ if (is_array($list_id)) $list_id_hardware=implode(',',$list_id); else $list_id_hardware=$list_id; if ($list_id_hardware == "") return ; //for servers //recherche de tous les hardware_id des servers et des id de download_enable correspondant $sql_infoServ="select server_id,id from download_enable where group_id != '' and fileid=%s"; $arg_infoServ=$fileid; //echo $sql_infoServ; $res_infoServ = mysql2_query_secure( $sql_infoServ, $_SESSION['OCS']["readServer"],$arg_infoServ); //création de la liste des id_hardware des servers et d'un tableau de l'id de download_enable en fonction de l'hardware_id while( $val_infoServ = mysqli_fetch_array($res_infoServ)) { $list_serverId[$val_infoServ['server_id']] = $val_infoServ['server_id']; $tab_Server[$val_infoServ['server_id']]=$val_infoServ['id']; } if ($rule_detail['compto'] == "NAME" or $rule_detail['compto'] =="WORKGROUP" or $rule_detail['compto'] =="USERID"){ $tablecompto="hardware"; $id_server="ID"; } if ($rule_detail['compto'] == "IPSUBNET" or $rule_detail['compto'] == "IPADDRESS"){ $tablecompto="networks"; $id_server="HARDWARE_ID"; } $sql_servValues = "select a.%s,a.%s,d.id as id_download_enable from %s a,download_enable d where a.%s in "; $arg_servValues = array($rule_detail['compto'],$id_server,$tablecompto,$id_server); $arg=mysql2_prepare($sql_servValues,$arg_servValues,$list_serverId); $arg['SQL'] .= " and d.server_id=a.%s and fileid='%s'"; array_push($arg['ARG'],$id_server); array_push($arg['ARG'],$fileid); $res_servValues = mysql2_query_secure( $arg['SQL'], $_SESSION['OCS']["readServer"], $arg['ARG']); //echo $sql_servValues."

      "; while( $val_servValues = mysqli_fetch_array($res_servValues)) { $tab_serValues[$val_servValues[$rule_detail['compto']]]=$val_servValues[$id_server]; $correspond_servers[$val_servValues[$id_server]]=$val_servValues['id_download_enable']; } //for machines if ($rule_detail['cfield'] == "NAME" or $rule_detail['cfield'] =="WORKGROUP" or $rule_detail['cfield'] =="USERID"){ $tablefield="hardware"; $id_mach="ID"; } if ($rule_detail['cfield'] == "IPSUBNET" or $rule_detail['cfield'] == "IPADDRESS"){ $tablefield="networks"; $id_mach="HARDWARE_ID"; } $sql_machValue="select %s,%s from %s where %s in "; $arg_machValue=array($rule_detail['cfield'],$id_mach,$tablefield,$id_mach); $arg=mysql2_prepare($sql_machValue,$arg_machValue,$list_id_hardware); $res_machValue = mysql2_query_secure( $arg['SQL'], $_SESSION['OCS']["readServer"],$arg['ARG']); //print_r($tab_serValues); while( $val_machValue = mysqli_fetch_array($res_machValue)) { if ($rule_detail['op'] == "EGAL"){ //echo "
      ".$val_machValue[$rule_detail['cfield']]."
      "; //cas of egal if (isset($tab_serValues[$val_machValue[$rule_detail['cfield']]])){ $tab_final[$val_machValue[$id_mach]]=$correspond_servers[$tab_serValues[$val_machValue[$rule_detail['cfield']]]]; $verif_idMach[$val_machValue[$id_mach]]=$val_machValue[$id_mach]; } else{ $not_match[$val_machValue[$id_mach]]=$val_machValue[$id_mach]; //$nb_notMatch++; } } elseif ($rule_detail['op'] == "DIFF"){ if (!isset($tab_serValues[$val_machValue[$rule_detail['cfield']]])){ $tab_final[$val_machValue[$id_mach]]=$correspond_servers[$tab_serValues[$val_machValue[$rule_detail['cfield']]]]; $verif_idMach[$val_machValue[$id_mach]]=$val_machValue[$id_mach]; } else{ $not_match[$val_machValue[$id_mach]]=$val_machValue[$id_mach]; //$nb_notMatch++; } } } if (isset($verif_idMach)){ $sql_verif="select d.hardware_id as hardware_id from devices d,download_enable d_e where d.ivalue=d_e.id and fileid=%s AND d.HARDWARE_ID in "; $arg_verif=array($fileid); $arg=mysql2_prepare($sql_verif,$arg_verif,$verif_idMach); $arg['SQL'].=" and d.name='DOWNLOAD'"; $res_verif = mysql2_query_secure( $arg['SQL'], $_SESSION['OCS']["readServer"],$arg['ARG']); //recupération des machines en doublon while( $val_verif = mysqli_fetch_array($res_verif)) { //création du tableau de doublon $exist[$val_verif['hardware_id']]=$val_verif['hardware_id']; //suppression des doublons //unset($tab_final[$val_verif['hardware_id']]); //$nb_exist++; } //suppression des doublons pour remettre le statut a attente de notification if ($exist != '') desactive_mach_serv(implode(',',$exist),$fileid); //insertion en base $nb_insert=0; foreach ($tab_final as $key=>$value){ $query="INSERT INTO devices(HARDWARE_ID, NAME, IVALUE) VALUES('%s', '%s','%s')"; $arg=array($key,'DOWNLOAD',$value); mysql2_query_secure( $query, $_SESSION['OCS']["writeServer"],$arg ); $insert[$key]=$value; $nb_insert++; } } $not_found=array(); if (is_array($not_match)) { foreach($not_match as $key=>$value){ $not_found[]=$value; } } $already_exist=array(); if (is_array($exist)){ foreach($exist as $key=>$value){ if (!isset($insert[$key])) $already_exist[]=$value; } } //retour des erreurs $don['not_match']=$not_found; $don['nb_not_match']=count($not_found); $don['exist']=$already_exist; $don['nb_exist']=count($already_exist); $don['nb_insert']=$nb_insert; //print_r($don); return $don; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_stats.php000077500000000000000000000036161303466605000260110ustar00rootroot00000000000000hardware_id; $result['IVALUE'][]=$row->ivalue; } return $result; } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/function_table_html.php000077500000000000000000002541701303466605000267710ustar00rootroot00000000000000$ent"; } /** * Includes the javascript datetime picker */ function incPicker() { global $l; echo " "; } function dateOnClick($input, $checkOnClick=false) { global $l; $dateForm = $l->g(269) == "%m/%d/%Y" ? "MMDDYYYY" : "DDMMYYYY" ; if( $checkOnClick ) $cOn = ",'$checkOnClick'"; $ret = "OnClick=\"javascript:NewCal('$input','$dateForm',false,24{$cOn});\""; return $ret; } function datePick($input, $checkOnClick=false) { global $l; $dateForm = $l->g(269) == "%m/%d/%Y" ? "MMDDYYYY" : "DDMMYYYY" ; if( $checkOnClick ) $cOn = ",'$checkOnClick'"; $ret = ""; $ret .= "\"Pick"; return $ret; } /* * * This function check an mail addresse * */ function VerifyMailadd($addresse) { $Syntaxe='#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#'; if(preg_match($Syntaxe,$addresse)) return true; else return false; } function send_mail($mail_to,$subjet,$body){ global $l; // few personnes $to=""; if (is_array($mail_to)){ $to = implode(',',$mail_to); }else $to = $mail_to; // message $message = ' ' . $subjet . ' ' . $body . ' '; // Pour envoyer un mail HTML, l'en-tête Content-type doit être défini $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // En-têtes additionnels $headers .= 'To: '. implode(',',$mail_to) . "\r\n"; $headers .= 'From: Ocsinventory ' . "\r\n"; // $headers .= 'Cc: anniversaire_archive@example.com' . "\r\n"; // $headers .= 'Bcc: anniversaire_verif@example.com' . "\r\n"; // Envoi $test_mail=@mail($to, $subject, $message, $headers); if (!$test_mail){ echo ""; } } function replace_entity_xml($txt){ $cherche = array("&","<",">","\"","'"); $replace = array( "&","<",">", """, "'"); return str_replace($cherche, $replace, $txt); } function printEnTete_tab($ent) { echo "
      ".$ent."
      "; } //function for escape_string before use database function escape_string($array){ if (is_array($array)){ foreach ($array as $key=>$value){ $trait_array[$key]=mysqli_real_escape_string($_SESSION['OCS']["readServer"],$value); } return ($trait_array); }else return array(); } function xml_escape_string($array){ foreach ($array as $key=>$value){ $trait_array[$key]=utf8_encode($value); $trait_array[$key]=htmlspecialchars($value,ENT_QUOTES); } return ($trait_array); } function xml_encode( $txt ) { $cherche = array("&","<",">","\"","'","é","è","ô","Î","î","à","ç","ê","â"); $replace = array( "&","<",">", """, "'","é","è","ô","Î","î","à","ç","ê","â"); return str_replace($cherche, $replace, $txt); } function xml_decode( $txt ) { $cherche = array( "â","ê","ç","à","<",">", """, "'","é","è","ô","Î","î","&"); $replace = array( "â","ê","ç","à","<",">","\"","'","é","è","ô","Î","î", "&" ); return str_replace($cherche, $replace, $txt); } //fonction qui permet d'afficher un tableau dynamique de données /* * Columns : Each available column of the table * $columns = array { * 'NAME'=>'h.name', ... * 'Column name' => Database value, * } * Default_fields : Default columns displayed * $default_fields= array{ * 'NAME'=>'NAME', ... * 'Column name' => 'Column name', * } * Option : All the options for the specific table * $option= array{ * 'form_name'=> "show_all",.... * 'Option' => value, * * } * List_col_cant_del : All the columns that will always be displayed * $list_col_cant_del= array { * 'NAME'=>'NAME', ... * 'Column name' => 'Column name', * } */ function ajaxtab_entete_fixe($columns,$default_fields,$option=array(),$list_col_cant_del) { global $protectedGet,$protectedPost,$l,$pages_refs; //Translated name of the column $lbl_column=array("ACTIONS"=>$l->g(1381), "CHECK"=>""); if (!isset($tab_options['NO_NAME']['NAME'])) $lbl_column["NAME"]=$l->g(23); if(!empty($option['LBL'])){ $lbl_column= array_merge($lbl_column,$option['LBL']); } $columns_special = array("CHECK", "SUP", "NBRE", "NULL", "MODIF", "SELECT", "ZIP", "OTHER", "STAT", "ACTIVE", "MAC", ); //If the column selected are different from the default columns if(!empty($_COOKIE[$option['table_name']."_col"])){ $visible_col = unserialize($_COOKIE[$option['table_name']."_col"]); } $input = $columns; //Don't allow to hide columns that should not be hidden foreach($list_col_cant_del as $key=>$col_cant_del){ unset($input[$col_cant_del]); unset($input[$key]); } $list_col_can_del = $input; $columns_unique = array_unique($columns); if(isset($columns['CHECK'])){ $column_temp = $columns['CHECK']; unset($columns['CHECK']); $columns_temp['CHECK'] = $column_temp; $columns = $columns_temp + $columns; } $actions = array( "MODIF", "SUP", "ZIP", "STAT", "ACTIVE", ); $action_visible = false; $temp = $columns; foreach($actions as $action){ if(isset($columns[$action])){ $action_visible=true; $columns['ACTIONS']="h.ID"; break; } } //Set the ajax requested address if (isset($_SERVER['QUERY_STRING'])){ if(isset($option['computersectionrequest'])){ parse_str($_SERVER['QUERY_STRING'],$addressoption); unset($addressoption['all']); unset($addressoption['cat']); $addressoption['option']=$option['computersectionrequest']; $address = "ajax.php?".http_build_query($addressoption); }else{ $address = isset($_SERVER['QUERY_STRING'])? "ajax.php?".$_SERVER['QUERY_STRING']: ""; } } $opt = false; ?>
      "; echo "
      ".$l->g(90)." (".$l->g(183).")
      "; } ?>
      ".$l->g(1380).""; ?> "; echo ""; //titre du tableau foreach($columns as $k=>$v) { if(array_key_exists($k,$lbl_column)){ echo ""; } else{ echo ""; } } echo ""; echo "
      ".$lbl_column[$k]."".$k."
      "; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; if ($_SESSION['OCS']['DEBUG'] == 'ON'){ ?>
      "; global $protectedGet,$l; if ($protectedGet['sens'] == "ASC"){ $sens="DESC"; } else { $sens="ASC"; } if(isset($data)) { ?> "; //titre du tableau $i=1; foreach($entete_colonne as $k=>$v) { if (in_array($v,$lien)) echo ""; else echo ""; $i++; } echo " "; // $i=0; $j=0; //lignes du tableau // while (isset($data[$i])) //{ foreach ($data as $k2=>$v2){ ($j % 2 == 0 ? $color = "#f2f2f2" : $color = "#ffffff"); echo ""; foreach ($v2 as $k=>$v) { if (isset($option['B'][$i])){ $begin=""; $end=""; }else{ $begin=""; $end=""; } if ($v == "") $v=" "; echo ""; } $j++; echo ""; //$i++; } echo "
      ".$v."".$v."
      ".$begin.$v.$end."
      "; } else{ msg_warning($l->g(766)); return FALSE; } return TRUE; } //variable pour la fonction champsform $num_lig=0; /* fonction liée à show_modif * qui permet de créer une ligne dans le tableau de modification/ajout * $title = titre à l'affichage du champ * $value_default = - pour un champ text ou input, la valeur par défaut du champ. * - pour un champ select, liste des valeurs du champ * $input_name = nom du champ que l'on va récupérer en $protectedPost * $input_type = 0 : * 1 : "; }elseif ($input_type ==0) return ""; elseif($input_type ==2){ $champs=""; return $champs; }elseif($input_type == 3){ $hid=""; // echo $name."
      "; return $name.$hid; }elseif ($input_type == 4) return ""; elseif ($input_type == 5 and isset($name) and is_array($name)){ foreach ($name as $key=>$value){ $champs.= ""; } return $champs; }elseif($input_type == 6){ if (isset($configinput['NB_FIELD'])) $i=$configinput['NB_FIELD']; else $i=6; $j=0; echo $name; while ($j<$i){ $champs.=""; $j++; } return $champs; }elseif($input_type == 7) return ""; elseif ($input_type == 8){ return ""; }elseif ($input_type == 9){ $aff=""; if (is_array($name)){ foreach ($name as $key=>$value){ $aff.="". $value."
      "; } } return $aff; }elseif ($input_type == 10){ //le format de de $name doit etre sous la forme d'une requete sql avec éventuellement //des arguments. Dans ce cas, les arguments sont séparés de la requête par $$$$ //et les arguments entre eux par des virgules //echo $name; $sql=explode('$$$$',$name); if (isset($sql[1])){ $arg_sql=explode(',',$sql[1]); $i=0; while ($arg_sql[$i]){ $arg[$i]=$protectedPost[$arg_sql[$i]]; $i++; } } if (isset($arg_sql)) $result = mysql2_query_secure($sql[0], $_SESSION['OCS']["readServer"],$arg); else $result = mysql2_query_secure($sql[0], $_SESSION['OCS']["readServer"]); if (isset($result) and $result != ''){ $i=0; while($colname = mysqli_fetch_field($result)) $entete2[$i++]=$colname->name; $i=0; while ($item = mysqli_fetch_object($result)){ $j=0; while ($entete2[$j]){ $data2[$i][$entete2[$j]]=$item ->$entete2[$j]; $j++; } $i++; } } return tab_entete_fixe($entete2,$data2,"",60,300); }elseif($input_type == 11 and isset($name) and is_array($name)){ foreach ($name as $key=>$value){ $champs.= ""; } return $champs; }elseif($input_type == 12){ //IMG type $champs=""; }elseif($input_type == 13){ return ""; } } function tab_modif_values($field_labels, $fields, $hidden_fields, $options = array()) { global $l; $options = array_merge(array( 'title' => null, 'comment' => null, 'button_name' => 'modif', 'show_button' => true, 'form_name' => 'CHANGE', 'top_action' => null, 'show_frame' => true ), $options); if ($options['form_name'] != 'NO_FORM') { echo open_form($options['form_name']); } if ($options['show_frame']) { echo '
      '; } if ($options['top_action']) { echo "
      ".$options['top_action']."
      "; } if ($options['title']) { echo '

      '.$options['title'].'

      '; } if (is_array($field_labels)) { foreach ($field_labels as $key => $label) { $field = $fields[$key]; echo '
      '; echo ''; if ($field['COMMENT_BEFORE']) { echo ''.$field['COMMENT_BEFORE'].''; } echo show_modif($field['DEFAULT_VALUE'], $field['INPUT_NAME'], $field['INPUT_TYPE'], $field['RELOAD'], $field['CONFIG']); if ($field['COMMENT_AFTER']) { echo ''.$field['COMMENT_AFTER'].''; } echo '
      '; } } else { echo $field_labels; } if ($options['comment']) { echo '
      '.$options['comment'].'
      '; } if ($options['show_button'] === 'BUTTON') { echo '
      '; echo ''; echo '
      '; } else if ($options['show_button']) { echo '
      '; echo ''; echo ''; echo '
      '; } if ($options['show_frame']) { echo "
      "; } if ($hidden_fields) { foreach ($hidden_fields as $key => $value) { echo ""; } } if ($options['form_name'] != 'NO_FORM') { echo close_form(); } } function show_field($name_field,$type_field,$value_field,$config=array()){ global $protectedPost; foreach($name_field as $key=>$value){ $tab_typ_champ[$key]['DEFAULT_VALUE']=$value_field[$key]; $tab_typ_champ[$key]['INPUT_NAME']=$name_field[$key]; $tab_typ_champ[$key]['INPUT_TYPE']=$type_field[$key]; if (!isset($config['ROWS'][$key]) or $config['ROWS'][$key] == '') $tab_typ_champ[$key]['CONFIG']['ROWS']=7; else $tab_typ_champ[$key]['CONFIG']['ROWS']=$config['ROWS'][$key]; if (!isset($config['COLS'][$key]) or $config['COLS'][$key] == '') $tab_typ_champ[$key]['CONFIG']['COLS']=40; else $tab_typ_champ[$key]['CONFIG']['COLS']=$config['COLS'][$key]; if (!isset($config['SIZE'][$key]) or $config['SIZE'][$key] == '') $tab_typ_champ[$key]['CONFIG']['SIZE']=50; else $tab_typ_champ[$key]['CONFIG']['SIZE']=$config['SIZE'][$key]; if (!isset($config['MAXLENGTH'][$key]) or $config['MAXLENGTH'][$key] == '') $tab_typ_champ[$key]['CONFIG']['MAXLENGTH']=255; else $tab_typ_champ[$key]['CONFIG']['MAXLENGTH']=$config['MAXLENGTH'][$key]; if (isset($config['COMMENT_AFTER'][$key])) { $tab_typ_champ[$key]['COMMENT_AFTER']= $config['COMMENT_AFTER'][$key]; } if (isset($config['DDE'][$key])) { $tab_typ_champ[$key]['CONFIG']['DDE']=$config['DDE'][$key]; } if (isset($config['SELECT_DEFAULT'][$key])) { $tab_typ_champ[$key]['CONFIG']['DEFAULT']=$config['SELECT_DEFAULT'][$key]; } if (isset($config['JAVASCRIPT'][$key])) { $tab_typ_champ[$key]['CONFIG']['JAVASCRIPT']=$config['JAVASCRIPT'][$key]; } } // $i=0; // while ($name_field[$i]){ // $tab_typ_champ[$i]['DEFAULT_VALUE']=$value_field[$i]; // $tab_typ_champ[$i]['INPUT_NAME']=$name_field[$i]; // $tab_typ_champ[$i]['INPUT_TYPE']=$type_field[$i]; // $tab_typ_champ[$i]['CONFIG']['ROWS']=7; // $tab_typ_champ[$i]['CONFIG']['COLS']=40; // $tab_typ_champ[$i]['CONFIG']['SIZE']=50; // $tab_typ_champ[$i]['CONFIG']['MAXLENGTH']=255; // $i++; // } return $tab_typ_champ; } function filtre($tab_field,$form_name,$query,$arg='',$arg_count=''){ global $protectedPost,$l; // if ($protectedPost['RAZ_FILTRE'] == "RAZ") // unset($protectedPost['FILTRE_VALUE'],$protectedPost['FILTRE']); if ($protectedPost['FILTRE_VALUE'] and $protectedPost['FILTRE']){ $temp_query=explode("GROUP BY",$query); if ($temp_query[0] == $query) $temp_query=explode("group by",$query); if (substr_count(mb_strtoupper ($temp_query[0]), "WHERE")>0){ $t_query=explode("WHERE",$temp_query[0]); if ($t_query[0] == $temp_query[0]) $t_query=explode("where",$temp_query[0]); $temp_query[0]= $t_query[0]." WHERE (".$t_query[1].") and "; }else $temp_query[0].= " where "; if (substr($protectedPost['FILTRE'],0,2) == 'a.'){ require_once('require/function_admininfo.php'); $id_tag=explode('_',substr($protectedPost['FILTRE'],2)); if (!isset($id_tag[1])) $tag=1; else $tag=$id_tag[1]; $list_tag_id= find_value_in_field($tag,$protectedPost['FILTRE_VALUE']); } if ($list_tag_id){ $query_end= " in (".implode(',',$list_tag_id).")"; }else{ if ($arg == '') $query_end = " like '%".$protectedPost['FILTRE_VALUE']."%' "; else{ $query_end = " like '%s' "; array_push($arg,'%' . $protectedPost['FILTRE_VALUE'] . '%'); if (is_array($arg_count)) array_push($arg_count,'%' . $protectedPost['FILTRE_VALUE'] . '%'); else $arg_count[] = '%' . $protectedPost['FILTRE_VALUE'] . '%'; } } $query= $temp_query[0].$protectedPost['FILTRE'].$query_end; if (isset($temp_query[1])) $query.="GROUP BY ".$temp_query[1]; } $view=show_modif($tab_field,'FILTRE',2); $view.=show_modif($protectedPost['FILTRE_VALUE'],'FILTRE_VALUE',0); echo $l->g(883).": ".$view.""; echo ""; return array('SQL'=>$query,'ARG'=>$arg,'ARG_COUNT'=>$arg_count); } function tab_list_error($data,$title) { global $l; echo "
      "; echo ""; echo ""; $i=0; $j=0; while ($data[$i]) { if ($j == 10) { echo ""; $j=0; } echo "
      ".$title."
      ".$data[$i].""; $i++; $j++; } echo "
      "; } function nb_page($form_name = '',$taille_cadre='80',$bgcolor='#C7D9F5',$bordercolor='#9894B5',$table_name=''){ global $protectedPost,$l; //catch nb result by page if (isset($_SESSION['OCS']['nb_tab'][$table_name])) $protectedPost["pcparpage"]=$_SESSION['OCS']['nb_tab'][$table_name]; elseif(isset($_COOKIE[$table_name.'_nbpage'])) $protectedPost["pcparpage"]=$_COOKIE[$table_name.'_nbpage']; if ($protectedPost['old_pcparpage'] != $protectedPost['pcparpage']) $protectedPost['page']=0; if (!(isset($protectedPost["pcparpage"])) or $protectedPost["pcparpage"] == ""){ $protectedPost["pcparpage"]=PC4PAGE; } $html_show = ""; //gestion d"une phrase d'alerte quand on utilise le filtre if (isset($protectedPost['FILTRE_VALUE']) and $protectedPost['FILTRE_VALUE'] != '' and $protectedPost['RAZ_FILTRE'] != 'RAZ') $html_show .= msg_warning($l->g(884)); $html_show .= "
      "; if (!isset($protectedPost['SHOW'])) $protectedPost['SHOW'] = "SHOW"; if ($protectedPost['SHOW'] == 'SHOW') $html_show .= ""; elseif ($protectedPost['SHOW'] != 'NEVER_SHOW') $html_show .= ""; $html_show .= "
      "; $html_show .= "
      "; $machNmb = array(5=>5,10=>10,15=>15,20=>20,50=>50,100=>100,200=>200,1000000=>$l->g(215)); $pcParPageHtml= $l->g(340).": ".show_modif($machNmb,'pcparpage',2,$form_name,array('DEFAULT'=>'NO')); $pcParPageHtml .= "
      "; $html_show .= $pcParPageHtml; if (isset($protectedPost["pcparpage"])){ $deb_limit=$protectedPost['page']*$protectedPost["pcparpage"]; $fin_limit=$deb_limit+$protectedPost["pcparpage"]-1; } $html_show .= ""; if ($form_name != '') echo $html_show; return (array("BEGIN"=>$deb_limit,"END"=>$fin_limit)); } function show_page($valCount,$form_name){ global $protectedPost; if (isset($protectedPost["pcparpage"]) and $protectedPost["pcparpage"] != 0) $nbpage= ceil($valCount/$protectedPost["pcparpage"]); if ($nbpage >1){ $up=$protectedPost['page']+1; $down=$protectedPost['page']-1; echo ""; echo "
      "; if ($protectedPost['page'] > 0) echo " "; //if ($nbpage<10){ $i=0; $deja=""; while ($i<$nbpage){ $point=""; if ($protectedPost['page'] == $i){ if ($i<$nbpage-10 and $i>10 and $deja==""){ $point=" ... "; $deja="ok"; } if($i<$nbpage-10 and $i>10){ $point2=" ... "; } echo $point."".$i." ".$point2; } elseif($i>$nbpage-10 or $i<10) echo "".$i." "; elseif ($i<$nbpage-10 and $i>10 and $deja==""){ echo " ... "; $deja="ok"; } $i++; } if ($protectedPost['page']< $nbpage-1) echo " "; } echo "
      "; echo ""; echo ""; } function onglet($def_onglets,$form_name,$post_name,$ligne) { global $protectedPost; /* $protectedPost['onglet_soft']=stripslashes($protectedPost['onglet_soft']); $protectedPost['old_onglet_soft']=stripslashes($protectedPost['old_onglet_soft']);*/ if ($protectedPost["old_".$post_name] != $protectedPost[$post_name]){ $protectedPost['page']=0; } if (!isset($protectedPost[$post_name]) and is_array($def_onglets)){ foreach ($def_onglets as $key=>$value){ $protectedPost[$post_name]=$key; break; } } /*This fnction use code of Douglas Bowman (Sliding Doors of CSS) http://www.alistapart.com/articles/slidingdoors/ THANKS!!!! $def_onglets is array like : $def_onglets[$l->g(499)]=$l->g(499); //Serveur $def_onglets[$l->g(728)]=$l->g(728); //Inventaire $def_onglets[$l->g(312)]=$l->g(312); //IP Discover $def_onglets[$l->g(512)]=$l->g(512); //Télédéploiement $def_onglets[$l->g(628)]=$l->g(628); //Serveur de redistribution behing this function put this lign: echo open_form($form_name); At the end of your page, close this form $post_name is the name of var will be post $ligne is if u want have onglet on more ligne*/ if ($def_onglets != ""){ echo "\n"; echo "
      "; echo ""; echo ""; } } function show_tabs($def_onglets,$form_name,$post_name,$ligne) { global $protectedPost; /* $protectedPost['onglet_soft']=stripslashes($protectedPost['onglet_soft']); $protectedPost['old_onglet_soft']=stripslashes($protectedPost['old_onglet_soft']);*/ if ($protectedPost["old_".$post_name] != $protectedPost[$post_name]){ $protectedPost['page']=0; } if (!isset($protectedPost[$post_name]) and is_array($def_onglets)){ foreach ($def_onglets as $key=>$value){ $protectedPost[$post_name]=$key; break; } } /*This fnction use code of Douglas Bowman (Sliding Doors of CSS) http://www.alistapart.com/articles/slidingdoors/ THANKS!!!! $def_onglets is array like : $def_onglets[$l->g(499)]=$l->g(499); //Serveur $def_onglets[$l->g(728)]=$l->g(728); //Inventaire $def_onglets[$l->g(312)]=$l->g(312); //IP Discover $def_onglets[$l->g(512)]=$l->g(512); //Télédéploiement $def_onglets[$l->g(628)]=$l->g(628); //Serveur de redistribution behing this function put this lign: echo open_form($form_name); At the end of your page, close this form $post_name is the name of var will be post $ligne is if u want have onglet on more ligne*/ if ($def_onglets != ""){ echo "\n"; echo "
      "; echo ""; echo ""; } } function gestion_col($entete,$data,$list_col_cant_del,$form_name,$tab_name,$list_fields,$default_fields,$id_form='form'){ global $protectedPost,$l; //search in cookies columns values if (isset($_COOKIE[$tab_name]) and $_COOKIE[$tab_name] != '' and !isset($_SESSION['OCS']['col_tab'][$tab_name])){ $col_tab=explode("///", $_COOKIE[$tab_name]); foreach ($col_tab as $key=>$value){ $_SESSION['OCS']['col_tab'][$tab_name][$value]=$value; } } if (isset($protectedPost['SUP_COL']) and $protectedPost['SUP_COL'] != ""){ unset($_SESSION['OCS']['col_tab'][$tab_name][$protectedPost['SUP_COL']]); } if ($protectedPost['restCol'.$tab_name]){ $_SESSION['OCS']['col_tab'][$tab_name][$protectedPost['restCol'.$tab_name]]=$protectedPost['restCol'.$tab_name]; } if ($protectedPost['RAZ'] != ""){ unset($_SESSION['OCS']['col_tab'][$tab_name]); $_SESSION['OCS']['col_tab'][$tab_name]=$default_fields; } if (!isset($_SESSION['OCS']['col_tab'][$tab_name])){ $_SESSION['OCS']['col_tab'][$tab_name]=$default_fields; } //add all fields we must have if (is_array($list_col_cant_del)){ if (!is_array($_SESSION['OCS']['col_tab'][$tab_name])) $_SESSION['OCS']['col_tab'][$tab_name]=array(); foreach ($list_col_cant_del as $key=>$value){ if (!in_array($key,$_SESSION['OCS']['col_tab'][$tab_name])){ $_SESSION['OCS']['col_tab'][$tab_name][$key]=$key; } } } if (is_array($entete)){ if (!is_array($_SESSION['OCS']['col_tab'][$tab_name])) $_SESSION['OCS']['col_tab'][$tab_name]=array(); foreach ($entete as $k=>$v){ if (in_array($k,$_SESSION['OCS']['col_tab'][$tab_name])){ $data_with_filter['entete'][$k]=$v; if (!isset($list_col_cant_del[$k])) $data_with_filter['entete'][$k].=""; } else $list_rest[$k]=$v; } } if (is_array($data)){ if (!is_array($_SESSION['OCS']['col_tab'][$tab_name])) $_SESSION['OCS']['col_tab'][$tab_name]=array(); foreach ($data as $k=>$v){ foreach ($v as $k2=>$v2){ if (in_array($k2,$_SESSION['OCS']['col_tab'][$tab_name])){ $data_with_filter['data'][$k][$k2]=$v2; } } } } if (is_array ($list_rest)){ //$list_rest=lbl_column($list_rest); $select_restCol= $l->g(349).": ".show_modif($list_rest,'restCol'.$tab_name,2,$form_name); $select_restCol .= ""; // echo $select_restCol; }else echo ""; echo ""; echo ""; echo ""; return( $data_with_filter); } function lbl_column($list_fields){ //p($list_rest); require_once('maps.php'); $return_fields=array(); $return_default=array(); foreach($list_fields as $poub=>$table){ if (isset($lbl_column[$table])){ foreach($lbl_column[$table] as $field=>$lbl){ //echo $field; if (isset($alias_table[$table])){ $return_fields[$lbl]=$alias_table[$table].'.'.$field; if (isset($default_column[$table])){ foreach($default_column[$table] as $poub2=>$default_field) $return_default[$lbl_column[$table][$default_field]]=$lbl_column[$table][$default_field]; }else{ msg_error($table.' DEFAULT VALUES NOT DEFINE IN MAPS.PHP'); return false; } }else{ msg_error($table.' ALIAS NOT DEFINE IN MAPS.PHP'); return false; } } }else{ msg_error($table.' NOT DEFINE IN MAPS.PHP'); return false; } } ksort($return_fields); return array('FIELDS'=>$return_fields,'DEFAULT_FIELDS'=>$return_default); } //fonction qui permet de ne selectionner que certaines lignes du tableau /* * Columns : Each available column of the table * $queryDetails = string 'SELECT QUERY' * Tab_options : All the options for the specific table * $tab_options= array{ * 'form_name'=> "show_all",.... * 'Option' => value, * } */ function ajaxfiltre($queryDetails,$tab_options){ // Research field of the table if ($tab_options["search"] && $tab_options["search"]['value']!=""){ $search = mysqli_real_escape_string($_SESSION['OCS']["readServer"],$tab_options["search"]['value']); $search = str_replace('%','%%',$search); $sqlword['WHERE']= preg_split("/where/i", $queryDetails); $sqlword['GROUPBY']= preg_split("/group by/i", $queryDetails); $sqlword['HAVING']= preg_split("/having/i", $queryDetails); $sqlword['ORDERBY']= preg_split("/order by/i", $queryDetails); foreach ($sqlword as $word=>$filter){ if (!empty($filter['1'])){ foreach ($filter as $key => $row){ if ($key == 1){ $rang =0; foreach($tab_options['visible_col'] as $index=>$column){ $searchable = ($tab_options['columns'][$column]['searchable'] == "true") ? true : false; $name = $tab_options['columns'][$column]['name']; if (!empty($tab_options["replace_query_arg"][$name])){ $name= $tab_options["replace_query_arg"][$name]; } if(is_array($tab_options['HAVING'])&&isset($tab_options['HAVING'][$name])){ $searchable =false; } if (!empty($tab_options['NO_SEARCH'][$tab_options['columns'][$column]['name']])){ $searchable = false; } if ($searchable){ if ($rang == 0){ $filtertxt = " WHERE (( ".$name." LIKE '%%".$search."%%' ) "; } else{ $filtertxt .= " OR ( ".$name." LIKE '%%".$search."%%' ) "; } $rang++; } } if ($word == "WHERE"){ $queryDetails .= $filtertxt.") AND ".$row; } else{ $queryDetails .= $filtertxt.") ".$row; } } else { if($key>1){ $queryDetails.=" ".$word." ".$row; }else{ $queryDetails = $row; } } } return $queryDetails; } } //REQUET SELECT FROM $queryDetails .= " WHERE "; $index =0; foreach($tab_options['visible_col'] as $column){ $searchable = ($tab_options['columns'][$column]['searchable'] == "true") ? true : false; if(is_array($tab_options['HAVING'])&&isset($tab_options['HAVING'][$column])){ $searchable =false; } if ($searchable){ $name = $tab_options['columns'][$column]['name']; if (!empty($tab_options["replace_query_arg"][$name])){ $name= $tab_options["replace_query_arg"][$name]; } if ($index == 0){ $filter = "(( ".$name." LIKE '%%".$search."%%' ) "; } else{ $filter .= " OR ( ".$name." LIKE '%%".$search."%%' ) "; } $index++; } } $queryDetails .= $filter.") "; } return $queryDetails; } /* * NOT USED YET * * SUPPOSED TO ADD HAVING CLAUSE WHEN FILTERING TABLES RESULTS */ // function ajaxfiltrehaving($queryDetails,$tab_options){ // if ($tab_options["search"] && $tab_options["search"]['value']!="" && is_numeric($tab_options["search"]['value']) ){ // if ( !empty($tab_options['HAVING'])){ // $search = mysqli_real_escape_string($_SESSION['OCS']["readServer"],$tab_options["search"]['value']); // $sqlword['HAVING']= preg_split("/having/i", $queryDetails); // $sqlword['ORDERBY']= preg_split("/order by/i", $queryDetails); // foreach ($sqlword as $word=>$filter){ // if (!empty($filter['1'])){ // foreach ($filter as $key => $row){ // if ($key == 1){ // foreach($tab_options['visible'] as $index=>$column){ // $name = $tab_options['columns'][$column]['name']; // if (!empty($tab_options["replace_query_arg"][$name])){ // $name= $tab_options["replace_query_arg"][$name]; // } // $searchable = ($tab_options['columns'][$column]['searchable'] == "true") ? true : false; // if(is_array($tab_options['HAVING'])&&isset($tab_options['HAVING'][$name])){ // $searchable =true; // }else{ // $searchable=false; // } // if (!empty($tab_options['NO_SEARCH'][$tab_options['columns'][$column]['name']])){ // $searchable = false; // } // if ($searchable){ // $name = $tab_options['HAVING'][$name]['name']; // if ($rang == 0){ // $filtertxt = " HAVING (( ".$name." == '".$search."' ) "; // } // else{ // $filtertxt .= " OR ( ".$name." == '".$search."' ) "; // } // $rang++; // } // } // if ($word == "HAVING"){ // $queryDetails .= $filtertxt.") AND ".$row; // } // else{ // $queryDetails .= $filtertxt.") ".$row; // } // } // else { // if($key>1){ // $queryDetails.=" ".$word." ".$row; // }else{ // $queryDetails = $row; // } // } // } // return $queryDetails; // } // } // $queryDetails .= " HAVING "; // $index =0; // foreach($tab_options['visible'] as $column){ // $name = $tab_options['columns'][$column]['name']; // if (!empty($tab_options["replace_query_arg"][$name])){ // $name= $tab_options["replace_query_arg"][$name]; // } // $searchable = ($tab_options['columns'][$column]['searchable'] == "true") ? true : false; // if(is_array($tab_options['HAVING'])&&isset($tab_options['HAVING'][$name])){ // $searchable =true; // }else{ // $searchable=false; // } // if (!empty($tab_options['NO_SEARCH'][$tab_options['columns'][$column]['name']])){ // $searchable = false; // } // if ($searchable){ // $name = $tab_options['HAVING'][$name]['name']; // if ($index == 0){ // $filtertxt = " HAVING (( ".$name." == '".$search."' ) "; // } // else{ // $filtertxt .= " OR ( ".$name." == '".$search."' ) "; // } // $index++; // } // } // $queryDetails .= $filter.") "; // } // } // return $queryDetails; // } //fonction qui retourne un string contenant le bloc généré ORDER BY de la requete /* * Tab_options : All the options for the specific table * &$tab_options= array{ * 'form_name'=> "show_all",.... * 'Option' => value, * } */ function ajaxsort(&$tab_options){ if ($tab_options['columns'][$tab_options['order']['0']['column']]['orderable'] == "true"){ $name = $tab_options['columns'][$tab_options['order']['0']['column']]['name']; if (!empty($tab_options["replace_query_arg"][$name])){ $name= $tab_options["replace_query_arg"][$name]; } $tri = $name; $sens = $tab_options['order']['0']['dir']; } else if ($tab_options['columns']) { foreach($tab_options['columns'] as $column){ if ($column['orderable']=="true"){ $tri = $column['name']; $sens = "asc"; break; } } } $sort =""; if (!empty($tri) && !empty($sens)){ $tab_iplike=array('H.IPADDR','IPADDRESS','IP','IPADDR'); if (in_array(mb_strtoupper($tri),$tab_iplike)){ $sort= " order by INET_ATON(".$tri.") ".$sens; }elseif ($tab_options['TRI']['SIGNED'][$tri]){ $sort= " order by cast(".$$tri." as signed) ".$sens; } elseif($tab_options['TRI']['DATE'][$tri]){ if(isset($tab_options['ARG_SQL'])){ $sort =" order by STR_TO_DATE(%s,'%s') %s"; $tab_options['ARG_SQL'][]=$tri; $tab_options['ARG_SQL'][]=$tab_options['TRI']['DATE'][$tri]; $tab_options['ARG_SQL'][]=$sens; }else{ $sort= " order by STR_TO_DATE(".$tri.",'".$tab_options['TRI']['DATE'][$tri]."') ".$sens; } }else{ $sort= " order by ".$tri." ".$sens; } } return $sort; } //fonction qui retourne un string contenant le bloc généré LIMIT de la requete /* * Tab_options : All the options for the specific table * $tab_options= array{ * 'form_name'=> "show_all",.... * 'Option' => value, * } */ function ajaxlimit($tab_options){ if (isset($tab_options['start'])){ $limit = " limit ".$tab_options['start']." , "; }else{ $limit = " limit 0 , "; } if (isset($tab_options['length'])){ $limit .= $tab_options['length']." "; }else{ $limit .= "10 "; } return $limit; } //fonction qui met en forme les resultats /* * ResultDetails : Query return * $resultDetails = mysqli_result * $list_fields : Each available column of the table * $list_fields = array { * 'NAME'=>'h.name', ... * 'Column name' => Database value, * } * Tab_options : All the options for the specific table * $tab_options= array{ * 'form_name'=> "show_all",.... * 'Option' => value, * } */ function ajaxgestionresults($resultDetails,$list_fields,$tab_options){ global $protectedPost,$l,$pages_refs; $form_name=$tab_options['form_name']; $_SESSION['OCS']['list_fields'][$tab_options['table_name']]=$list_fields; $_SESSION['OCS']['col_tab'][$tab_options['table_name']]= array_flip($list_fields); if($resultDetails){ if (isset($tab_options['JAVA']['CHECK'])){ $javascript="OnClick='confirme(\"".htmlspecialchars($row_temp[$tab_options['JAVA']['CHECK']['NAME']], ENT_QUOTES)."\",".$value_of_field.",\"".$form_name."\",\"CONFIRM_CHECK\",\"".htmlspecialchars($tab_options['JAVA']['CHECK']['QUESTION'], ENT_QUOTES)." \")'"; }else{ $javascript=""; } while($row = mysqli_fetch_assoc($resultDetails)) { if (isset($tab_options['AS'])){ foreach($tab_options['AS'] as $k=>$v){ if($v!="SNAME"){ $n = explode('.',$k); $n = end($n); $row[$n]= $row[$v]; } } } $row_temp = $row; foreach($row as $rowKey=>$rowValue){ $row[$rowKey]=htmlentities($rowValue); } foreach($list_fields as $key=>$column){ $name = explode('.',$column); $column = end($name); $value_of_field = $row[$column]; switch($key){ case "CHECK": if ($value_of_field!= ' '){ $row[$key] = ""; } break; case "SUP": if ( $value_of_field!= ' '){ if (isset($tab_options['LBL_POPUP'][$key])){ if (isset($row[$tab_options['LBL_POPUP'][$key]])) $lbl_msg=$l->g(640)." ".$row_temp[$tab_options['LBL_POPUP'][$key]]; else $lbl_msg=$tab_options['LBL_POPUP'][$key]; }else $lbl_msg=$l->g(640)." ".$value_of_field; $row[$key]=""; } break; case "NAME": if ( !isset($tab_options['NO_NAME']['NAME'])){ $link_computer="index.php?".PAG_INDEX."=".$pages_refs['ms_computer']."&head=1"; if ($row['ID']) $link_computer.="&systemid=".$row['ID']; if ($row['MD5_DEVICEID']) $link_computer.= "&crypt=".$row['MD5_DEVICEID']; $row[$column]="".$value_of_field.""; } break; case "GROUP_NAME": $row['NAME']="".$value_of_field.""; break; case "NULL": $row[$key]=" "; break; case "MODIF": if (!isset($tab_options['MODIF']['IMG'])) $image="image/modif_tab.png"; else $image=$tab_options['MODIF']['IMG']; $row[$key]=""; break; case "SELECT": $row[$key]=""; $lien = 'KO'; break; case "OTHER": $row[$key]=""; break; case "ZIP": $row[$key]=""; break; case "STAT": $row[$key]=""; break; case "ACTIVE": $row[$key]=""; break; case "SHOWACTIVE": if(!empty($tab_options['SHOW_ONLY'][$key][$row['FILEID']])){ $row[$column]="".$value_of_field.""; } break; case "MAC": if (isset($_SESSION['OCS']["mac"][mb_strtoupper(substr($value_of_field,0,8))])) $constr=$_SESSION['OCS']["mac"][mb_strtoupper(substr($value_of_field,0,8))]; else $constr="".$l->g(885).""; $row[$key]=$value_of_field." (".$constr.")"; break; case "MOD_TAGS": if ($value_of_field!= ' '){ $row[$key]="
      "; } break; default : if (substr($key,0,11) == "PERCENT_BAR"){ //require_once("function_graphic.php"); //echo percent_bar($value_of_field); $row[$column]="
      ".percent_bar($value_of_field)."
      "; } if (!empty($tab_options['REPLACE_VALUE'][$key])){ $row[$column]=$tab_options['REPLACE_VALUE'][$key][$value_of_field]; } if(!empty($tab_options['VALUE'][$key])){ if(!empty($tab_options['LIEN_CHAMP'][$key])){ $value_of_field=$tab_options['VALUE'][$key][$row[$tab_options['LIEN_CHAMP'][$key]]]; }else{ $row[$column] = $tab_options['VALUE'][$key][$row['ID']]; } } if(!empty($tab_options['REPLACE_VALUE_ALL_TIME'][$key][$row[$tab_options['FIELD_REPLACE_VALUE_ALL_TIME']]])){ $row[$column]=$tab_options['REPLACE_VALUE_ALL_TIME'][$key][$row[$tab_options['FIELD_REPLACE_VALUE_ALL_TIME']]]; } if (!empty($tab_options['LIEN_LBL'][$key])){ $row[$column]= "".$value_of_field.""; } if (!empty($tab_options['REPLACE_COLUMN_KEY'][$key])){ $row[$tab_options['REPLACE_COLUMN_KEY'][$key]]=$row[$column]; unset($row[$column]); } } if(!empty($tab_options['COLOR'][$key])){ $row[$column]= "".$row[$column].""; } if(!empty($tab_options['SHOW_ONLY'][$key])){ if(empty($tab_options['SHOW_ONLY'][$key][$value_of_field])&& empty($tab_options['EXIST'][$key]) ||(reset($tab_options['SHOW_ONLY'][$key]) == $row[$tab_options['EXIST'][$key]])){ $row[$key]=""; } } } $actions = array( "MODIF", "SUP", "ZIP", "STAT", "ACTIVE", ); foreach($actions as $action){ $row['ACTIONS'].= " ".$row[$action]; } $rows[] = $row; } }else{ $rows = 0; } return $rows; } //fonction qui ggere le retour de la requete Ajax /* * $list_fields : Each available column of the table * $list_fields = array { * 'NAME'=>'h.name', ... * 'Column name' => Database value, * } * Default_fields : Default columns displayed * $default_fields= array{ * 'NAME'=>'NAME', ... * 'Column name' => 'Column name', * } * List_col_cant_del : All the columns that will always be displayed * $list_col_cant_del= array { * 'NAME'=>'NAME', ... * 'Column name' => 'Column name', * } * $queryDetails = string 'SELECT QUERY' * Tab_options : All the options for the specific table * $tab_options= array{ * 'form_name'=> "show_all",.... * 'Option' => value, * } */ function tab_req($list_fields,$default_fields,$list_col_cant_del,$queryDetails,$tab_options) { global $protectedPost,$l,$pages_refs; if($queryDetails === false){ $res = array("draw"=> $tab_options['draw'],"recordsTotal"=> 0, "recordsFiltered"=> 0 , "data"=>0 ); echo json_encode($res); die; } $columns_special = array("CHECK", "SUP", "GROUP_NAME", "NULL", "MODIF", "MOD_TAGS", "SELECT", "ZIP", "OTHER", "STAT", "ACTIVE", "MAC", "MD5_DEVICEID", ); $actions = array( "MODIF", "SUP", "ZIP", "STAT", "ACTIVE", ); foreach($actions as $action){ if(isset($list_fields[$action])){ $list_fields['ACTIONS']="h.ID"; break; } } $visible = 0; foreach($list_fields as $key=>$column){ if (((in_array($key,$default_fields))||(in_array($key,$list_col_cant_del))|| in_array($key, $columns_special)||array_key_exists($key,$default_fields) || $key=="ACTIONS") && !in_array($key,$actions)){ $visible++; } } $data = serialize($tab_options['visible_col']); $customized=false; if (count($tab_options['visible_col'])!=$visible){ $customized=true; setcookie($tab_options['table_name']."_col",$data,time()+31536000); } else{ if (isset($_COOKIE[$tab_options['table_name']."_col"])){ if($data != $_COOKIE[$tab_options['table_name']."_col"]){ setcookie($tab_options['table_name']."_col",$data,time()+31536000); } else{ setcookie($tab_options['table_name']."_col", FALSE, time() - 3600 ); } } } if (isset($tab_options['REQUEST'])){ foreach ($tab_options['REQUEST'] as $field_name => $value){ $resultDetails = mysql2_query_secure($value, $_SESSION['OCS']["readServer"],$tab_options['ARG'][$field_name]); while($item = mysqli_fetch_object($resultDetails)){ if ($item -> FIRST != "") $tab_options['SHOW_ONLY'][$field_name][$item -> FIRST]=$item -> FIRST; } } } $table_name = $tab_options['table_name']; //search static values if (isset($_SESSION['OCS']['SQL_DATA_FIXE'][$table_name])){ foreach ($_SESSION['OCS']['SQL_DATA_FIXE'][$table_name] as $key=>$sql){ if (!isset($_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key])) $arg=array(); else $arg=$_SESSION['OCS']['ARG_DATA_FIXE'][$table_name][$key]; if ($table_name == "TAB_MULTICRITERE"){ $sql.=" and hardware_id in (".implode(',',$_SESSION['OCS']['ID_REQ']).") group by hardware_id "; //ajout du group by pour régler le problème des résultats multiples sur une requete //on affiche juste le premier critère qui match $result = mysqli_query($_SESSION['OCS']["readServer"],$sql); }else{ //add sort on column if need it if ($protectedPost['tri_fixe']!='' and strstr($sql,$protectedPost['tri_fixe'])){ $sql.=" order by '%s' %s"; array_push($protectedPost['tri_fixe'],$arg); array_push($protectedPost['sens_'.$table_name],$arg); } $sql.= $limit; $result = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); } while($item = mysqli_fetch_object($result)){ if ($item->HARDWARE_ID != "") $champs_index=$item->HARDWARE_ID; elseif($item->FILEID != "") $champs_index=$item->FILEID; //echo $champs_index."
      "; if (isset($tablename_fixe_value)){ if (strstr($sql,$tablename_fixe_value[0])) $list_id_tri_fixe[]=$champs_index; } foreach ($item as $field=>$value){ if ($field != "HARDWARE_ID" and $field != "FILEID" and $field != "ID"){ $tab_options['NO_SEARCH'][$field]=$field; // echo "
      champs => ".$field." valeur => ".$value; $tab_options['REPLACE_VALUE_ALL_TIME'][$field][$champs_index]=$value; } } } } } $link=$_SESSION['OCS']["readServer"]; $sqlfunctions[]='count'; $sqlfunctions[]='sum'; $sqlfunctions[]='min'; $sqlfunctions[]='max'; foreach($sqlfunctions as $sqlfunction){ preg_match("/$sqlfunction\(.+\) \w*/i", $queryDetails, $matches); foreach ($matches as $match){ $req = preg_split("/\)/", $match); $request=$req['0'].") "; $column = trim($req['1']); $tab_options['HAVING'][$column]['name']=$request ; } } $queryDetails = ajaxfiltre($queryDetails,$tab_options); // NOT USED YET //$queryDetails = ajaxfiltrehaving($queryDetails,$tab_options); $queryDetails .= ajaxsort($tab_options); $_SESSION['OCS']['csv']['SQLNOLIMIT'][$tab_options['table_name']]=$queryDetails; $queryDetails .= ajaxlimit($tab_options); $_SESSION['OCS']['csv']['SQL'][$tab_options['table_name']]=$queryDetails; $_SESSION['OCS']['csv']['REPLACE_VALUE'][$tab_options['table_name']]=$tab_options['REPLACE_VALUE']; if (isset($tab_options['ARG_SQL'])) $_SESSION['OCS']['csv']['ARG'][$tab_options['table_name']]=$tab_options['ARG_SQL']; $queryDetails=substr_replace(ltrim($queryDetails),"SELECT SQL_CALC_FOUND_ROWS ", 0 , 6); if (isset($tab_options['ARG_SQL'])) $resultDetails = mysql2_query_secure($queryDetails, $link,$tab_options['ARG_SQL']); else $resultDetails = mysql2_query_secure($queryDetails, $link); $rows = ajaxgestionresults($resultDetails,$list_fields,$tab_options); if (is_null($rows)){ $rows=0; } if(is_array($_SESSION['OCS']['SQL_DEBUG']) && ($_SESSION['OCS']['DEBUG'] == 'ON')){ $debug = end($_SESSION['OCS']['SQL_DEBUG']); } // Data set length after filtering $resFilterLength = mysql2_query_secure("SELECT FOUND_ROWS()",$link); $recordsFiltered = mysqli_fetch_row($resFilterLength); $recordsFiltered=intval($recordsFiltered[0]); if($rows === 0){ $recordsFiltered = 0; } if($tab_options["search"] && $tab_options["search"]['value']==""){ $_SESSION['OCS'][$tab_options['table_name']]['nb_resultat']=$recordsFiltered; } if (isset($_SESSION['OCS'][$tab_options['table_name']]['nb_resultat'])){ $recordsTotal = $_SESSION['OCS'][$tab_options['table_name']]['nb_resultat']; }else{ $recordsTotal=$recordsFiltered; } if(is_array($_SESSION['OCS']['SQL_DEBUG']) && ($_SESSION['OCS']['DEBUG'] == 'ON')){ $res = array("draw"=> $tab_options['draw'],"recordsTotal"=> $recordsTotal, "recordsFiltered"=> $recordsFiltered, "data"=>$rows, "customized"=>$customized, "debug"=>$debug); }else{ $res = array("draw"=> $tab_options['draw'],"recordsTotal"=> $recordsTotal, "recordsFiltered"=> $recordsFiltered, "data"=>$rows, "customized"=>$customized); } echo json_encode($res); } //fonction qui permet de gérer les données à afficher dans le tableau function gestion_donnees($sql_data,$list_fields,$tab_options,$form_name,$default_fields,$list_col_cant_del,$queryDetails,$table_name){ global $l,$protectedPost,$pages_refs; //p($tab_options['REPLACE_VALUE_ALL_TIME']); $_SESSION['OCS']['list_fields'][$table_name]=$list_fields; //requete de condition d'affichage //attention: la requete doit etre du style: //select champ1 AS FIRST from table where... if (isset($tab_options['REQUEST'])){ foreach ($tab_options['REQUEST'] as $field_name => $value){ $tab_condition[$field_name]=array(); $resultDetails = mysql2_query_secure($value, $_SESSION['OCS']["readServer"],$tab_options['ARG'][$field_name]); while($item = mysqli_fetch_object($resultDetails)){ $tab_condition[$field_name][$item -> FIRST]=$item -> FIRST; } } } if (isset($sql_data)){ foreach ($sql_data as $i=>$donnees){ foreach($list_fields as $key=>$value){ $htmlentities=true; $truelabel=$key; // p($tab_options); //gestion des as de colonne if (isset($tab_options['AS'][$value])) $value=$tab_options['AS'][$value]; //echo $value."
      "; $num_col=$key; if ($default_fields[$key]) $correct_list_fields[$num_col]=$num_col; if ($list_col_cant_del[$key]) $correct_list_col_cant_del[$num_col]=$num_col; $alias=explode('.',$value); if (isset($alias[1])){ $no_alias_value=$alias[1]; }else $no_alias_value=$value; //echo $no_alias_value; //si aucune valeur, on affiche un espace if ($donnees[$no_alias_value] == ""){ $value_of_field = " "; $htmlentities=false; }else //sinon, on affiche la valeur { $value_of_field=$donnees[$no_alias_value]; } //utf8 or not? $value_of_field=data_encode_utf8($value_of_field); $col[$i]=$key; if ($protectedPost['sens_'.$table_name] == "ASC") $sens="DESC"; else $sens="ASC"; $affich='OK'; //on n'affiche pas de lien sur les colonnes non présentes dans la requete if (isset($tab_options['NO_TRI'][$key])) $lien='KO'; else $lien='OK'; if (isset($tab_options['REPLACE_VALUE_ALL_TIME'][$key])){ if (isset($tab_options['FIELD_REPLACE_VALUE_ALL_TIME'])) $value_of_field=$tab_options['REPLACE_VALUE_ALL_TIME'][$key][$donnees[$tab_options['FIELD_REPLACE_VALUE_ALL_TIME']]]; else $value_of_field=$tab_options['REPLACE_VALUE_ALL_TIME'][$key][$donnees['ID']]; } if (isset($tab_options['REPLACE_VALUE'][$key])){ //if multi value, $temp_val[1] isset $temp_val=explode('&&&',$value_of_field); $multi_value=0; $temp_value_of_field=""; while (isset($temp_val[$multi_value])){ $temp_value_of_field.=$tab_options['REPLACE_VALUE'][$key][$temp_val[$multi_value]]."
      "; $multi_value++; } $temp_value_of_field=substr($temp_value_of_field,0,-4); $value_of_field=$temp_value_of_field; } if (isset($tab_options['REPLACE_WITH_CONDITION'][$key][$value_of_field])){ if (!is_array($tab_options['REPLACE_WITH_CONDITION'][$key][$value_of_field])) $value_of_field= $tab_options['REPLACE_WITH_CONDITION'][$key][$value_of_field]; else{ foreach ($tab_options['REPLACE_WITH_CONDITION'][$key][$value_of_field] as $condition=>$condition_value){ if ($donnees[$condition] == '' or is_null($donnees[$condition])) { $value_of_field=$condition_value; } } } } if (isset($tab_options['REPLACE_WITH_LIMIT']['UP'][$key])){ if ($value_of_field > $tab_options['REPLACE_WITH_LIMIT']['UP'][$key]) $value_of_field= $tab_options['REPLACE_WITH_LIMIT']['UPVALUE'][$key]; } if (isset($tab_options['REPLACE_WITH_LIMIT']['DOWN'][$key])){ if ($value_of_field < $tab_options['REPLACE_WITH_LIMIT']['DOWN'][$key]) $value_of_field = $tab_options['REPLACE_WITH_LIMIT']['DOWNVALUE'][$key]; } unset($key2); if (isset($tab_condition[$key])){ if ((!$tab_condition[$key][$donnees[$tab_options['FIELD'][$key]]] and !$tab_options['EXIST'][$key]) or ($tab_condition[$key][$donnees[$tab_options['FIELD'][$key]]] and $tab_options['EXIST'][$key])){ if ($key == "STAT" or $key == "SUP" or $key == "CHECK"){ $key2 = "NULL"; }else{ $data[$i][$num_col]=$value_of_field; $affich="KO"; } } } //if (!isset($entete[$num_col])){ if (!isset($tab_options['LBL'][$key])){ $entete[$num_col]=$key; }else $entete[$num_col]=$tab_options['LBL'][$key]; //} if (isset($tab_options['NO_LIEN_CHAMP']['SQL'][$key])){ $exit=false; foreach ($tab_options['NO_LIEN_CHAMP']['SQL'][$key] as $id=>$sql_rest){ $sql=$sql_rest; if (isset($tab_options['NO_LIEN_CHAMP']['ARG'][$id][$key])) $arg=$donnees[$tab_options['NO_LIEN_CHAMP']['ARG'][$id][$key]]; else $arg=""; $result_lien = mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); if ($item = mysqli_fetch_object($result_lien)){ $data[$i][$num_col]="".$value_of_field.""; // $exit=true; break; }else echo 'toto'; } } //si un lien doit être mis sur le champ //l'option $tab_options['NO_LIEN_CHAMP'] empêche de mettre un lien sur certaines //valeurs du champs //exemple, si vous ne voulez pas mettre un lien si le champ est 0, //$tab_options['NO_LIEN_CHAMP'][$key] = array(0); if (isset($tab_options['LIEN_LBL'][$key]) and !is_array($tab_options['LIEN_LBL'][$key]) and (!isset($tab_options['NO_LIEN_CHAMP'][$key]) or !in_array($value_of_field,$tab_options['NO_LIEN_CHAMP'][$key]))){ $affich="KO"; if (!isset($tab_options['LIEN_TYPE'][$key])){ $data[$i][$num_col]="".$value_of_field.""; }else{ if (!isset($tab_options['POPUP_SIZE'][$key])) $size="width=550,height=350"; else $size=$tab_options['POPUP_SIZE'][$key]; $data[$i][$num_col]="".$value_of_field.""; } } if (isset($tab_options['JAVA']['CHECK'])){ $javascript="OnClick='confirme(\"".htmlspecialchars($donnees[$tab_options['JAVA']['CHECK']['NAME']], ENT_QUOTES)."\",".$value_of_field.",\"".$form_name."\",\"CONFIRM_CHECK\",\"".htmlspecialchars($tab_options['JAVA']['CHECK']['QUESTION'], ENT_QUOTES)." \")'"; }else $javascript=""; //si on a demander un affichage que sur certaine ID if (is_array($tab_options) and !$tab_options['SHOW_ONLY'][$key][$value_of_field] and $tab_options['SHOW_ONLY'][$key]){ $key = "NULL"; } if (isset($tab_options['COLOR'][$key])){ $value_of_field="".$value_of_field.""; $htmlentities=false; } if ($affich == 'OK'){ $lbl_column=array("SUP"=>$l->g(122), "MODIF"=>$l->g(115), "CHECK"=>$l->g(1119) . ""); if (!isset($tab_options['NO_NAME']['NAME'])) $lbl_column["NAME"]=$l->g(23); //modify lbl of column if (!isset($entete[$num_col]) or ($entete[$num_col] == $key and !isset($tab_options['LBL'][$key]))){ if (array_key_exists($key,$lbl_column)) $entete[$num_col]=$lbl_column[$key]; else $entete[$num_col]=$truelabel; } if ($key == "NULL" or isset($key2)){ $data[$i][$num_col]=" "; $lien = 'KO'; }elseif ($key == "GROUP_NAME"){ $data[$i][$num_col]="".$value_of_field.""; }elseif ($key == "SUP" and $value_of_field!= ' '){ if (isset($tab_options['LBL_POPUP'][$key])){ if (isset($donnees[$tab_options['LBL_POPUP'][$key]])) $lbl_msg=$l->g(640)." ".$donnees[$tab_options['LBL_POPUP'][$key]]; else $lbl_msg=$tab_options['LBL_POPUP'][$key]; }else $lbl_msg=$l->g(640)." ".$value_of_field; $data[$i][$num_col]=""; $lien = 'KO'; }elseif ($key == "MODIF"){ if (!isset($tab_options['MODIF']['IMG'])) $image="image/modif_tab.png"; else $image=$tab_options['MODIF']['IMG']; $data[$i][$num_col]=""; $lien = 'KO'; }elseif ($key == "SELECT"){ $data[$i][$num_col]=""; $lien = 'KO'; }elseif ($key == "OTHER"){ $data[$i][$num_col]=""; $lien = 'KO'; }elseif ($key == "ZIP"){ $data[$i][$num_col]=""; $lien = 'KO'; } elseif ($key == "STAT"){ $data[$i][$num_col]=""; $lien = 'KO'; }elseif ($key == "ACTIVE"){ $data[$i][$num_col]=""; $lien = 'KO'; }elseif ($key == "SHOWACTIVE"){ $data[$i][$num_col]="".$value_of_field.""; } elseif ($key == "CHECK" and $value_of_field!= ' '){ $data[$i][$num_col]=""; $lien = 'KO'; } elseif ($key == "NAME" and !isset($tab_options['NO_NAME']['NAME'])){ $link_computer="index.php?".PAG_INDEX."=".$pages_refs['ms_computer']."&head=1"; if ($donnees['ID']) $link_computer.="&systemid=".$donnees['ID']; if ($donnees['MD5_DEVICEID']) $link_computer.= "&crypt=".$donnees['MD5_DEVICEID']; $data[$i][$num_col]="".$value_of_field.""; }elseif ($key == "MAC"){ //echo substr($value_of_field,0,8); //echo $_SESSION['OCS']["mac"][substr($value_of_field,0,8)]; if (isset($_SESSION['OCS']["mac"][mb_strtoupper(substr($value_of_field,0,8))])) $constr=$_SESSION['OCS']["mac"][mb_strtoupper(substr($value_of_field,0,8))]; else $constr="".$l->g(885).""; //echo "=>".$constr."
      "; $data[$i][$num_col]=$value_of_field." (".$constr.")"; }elseif (substr($key,0,11) == "PERCENT_BAR"){ require_once("function_graphic.php"); $data[$i][$num_col]="
      ".percent_bar($value_of_field)."
      "; //$lien = 'KO'; } else{ if (isset($tab_options['OTHER'][$key][$value_of_field])){ $end=""; }elseif (isset($tab_options['OTHER_BIS'][$key][$value_of_field])){ $end=""; }elseif (isset($tab_options['OTHER_TER'][$key][$value_of_field])){ $end=""; }else{ $end=""; } if ($htmlentities) //$value_of_field=htmlentities($value_of_field,ENT_COMPAT,'UTF-8'); $value_of_field=strip_tags_array($value_of_field); $data[$i][$num_col]=$value_of_field.$end; } } if ($lien == 'OK'){ $deb=""; $fin=""; $entete[$num_col]=$deb.$entete[$num_col].$fin; if ($protectedPost['tri_'.$table_name] == $value){ if ($protectedPost['sens_'.$table_name] == 'ASC') $img=""; else $img=""; $entete[$num_col]=$img.$entete[$num_col]; } } } } if ($tab_options['UP']){ $i=0; while($data[$i]){ foreach ($tab_options['UP'] as $key=>$value){ if ($data[$i][$key] == $value){ $value_temp=$data[$i]; unset($data[$i]); } } $i++; } array_unshift ($data, $value_temp); } // echo $protectedPost['tri_'.$table_name]; // echo "

      "; //p($tab_options['REPLACE_VALUE']); if(isset($tab_options['REPLACE_VALUE'][$protectedPost['tri_'.$table_name]])){ //p($data); //echo "


      "; if ($protectedPost['sens_repart_tag'] == 'ASC') asort($data); else arsort($data); // p($data); } return array('ENTETE'=>$entete,'DATA'=>$data,'correct_list_fields'=>$correct_list_fields,'correct_list_col_cant_del'=>$correct_list_col_cant_del); }else return false; } function del_selection($form_name){ global $l; echo ""; echo ""; echo ""; //} echo "
      "; //foreach ($img as $key=>$value){ echo "
      "; echo ""; } function js_tooltip(){ echo ""; echo "
      "; } /*js_bulle_info(); $bulle=bulle_info(""); echo "testst";*/ function tooltip($txt){ return " onmouseover=\"show_me('".addslashes($txt)."');\" onmouseout='hidden_me();'"; } function iframe($link){ global $l; echo "
      "; echo "

      ".$l->g(1374)."

      "; echo "
      "; echo "
      "; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_telediff.php000077500000000000000000000501141303466605000264300ustar00rootroot00000000000000 function active(id, sens) { var mstyle = document.getElementById(id).style.display = (sens!=0?\"block\" :\"none\"); }"; function javascript_pack(){ global $protectedPost; echo ""; } function looking4config(){ if (!isset($_SESSION['OCS']['CONFIG_DOWNLOAD'])){ $values=look_config_default_values(array('DOWNLOAD_CYCLE_LATENCY','DOWNLOAD_PERIOD_LENGTH', 'DOWNLOAD_FRAG_LATENCY','DOWNLOAD_PERIOD_LATENCY')); $_SESSION['OCS']['CONFIG_DOWNLOAD']=$values['ivalue']; } } function champ_select_block($name,$input_name,$input_cache) { global $protectedPost; $champs=""; return $champs; } function time_deploy(){ $champ=" "; return $champ; } function input_pack_taille($name,$other_field,$size,$input_size,$input_value){ javascript_pack(); $champ.= " 1024 ) { $champ.= " onKeyPress='maj(\"".$name."\",\"".$other_field."\",\"".$size."\");' onkeydown='maj(\"".$name."\",\"".$other_field."\",\"".$size."\");' onkeyup='maj(\"".$name."\",\"".$other_field."\",\"".$size."\");' value='".$input_value."' onblur='maj(\"".$name."\",\"".$other_field."\",\"".$size."\");' onclick='maj(\"".$name."\",\"".$other_field."\",\"".$size."\");'> "; }else $champ.= " value=1 readonly style='color:black; background-color:#e1e1e2;'> "; return $champ; } function desactive_option($name,$list_id,$packid){ global $l; $sql_desactive="delete from devices where name='%s' and ivalue=%s"; $arg_desactive=array($name,$packid); if ($list_id != ''){ $sql_desactive.=" and hardware_id in "; $sql=mysql2_prepare($sql_desactive,$arg_desactive,$list_id); $res_desactive=mysql2_query_secure($sql['SQL'],$_SESSION['OCS']["writeServer"],$sql['ARG'],$l->g(512)); }else $res_desactive=mysql2_query_secure($sql_desactive,$_SESSION['OCS']["writeServer"],$arg_desactive,$l->g(512)); return( mysqli_affected_rows ( $_SESSION['OCS']["writeServer"] ) ); } function active_option($name,$list_id,$packid,$tvalue=''){ global $l; desactive_option($name,$list_id,$packid); $sql_active="insert into devices (HARDWARE_ID, NAME, IVALUE,TVALUE) select ID,'%s','%s',"; if ($tvalue == ''){ $sql_active.="null from hardware where id in "; $arg_active=array($name,$packid); }else{ $sql_active.="'%s' from hardware where id in "; $arg_active=array($name,$packid,$tvalue); } //$lbl_log=$l->g(601)." ".$id_pack." => ".$list_id; $sql=mysql2_prepare($sql_active,$arg_active,$list_id); $res_active=mysql2_query_secure($sql['SQL'],$_SESSION['OCS']["writeServer"],$sql['ARG'],$l->g(512)); return( mysqli_affected_rows ( $_SESSION['OCS']["writeServer"] ) ); } function desactive_download_option($list_id,$packid){ desactive_option('DOWNLOAD_FORCE',$list_id,$packid); desactive_option('DOWNLOAD_SCHEDULE',$list_id,$packid); desactive_option('DOWNLOAD_POSTCMD',$list_id,$packid); } function desactive_packet($list_id,$packid){ desactive_download_option($list_id,$packid); $nb_line=desactive_option('DOWNLOAD',$list_id,$packid); return $nb_line; } function found_id_pack($packid){ $sql_id_pack="select ID from download_enable where fileid=%s and ( group_id = '' or group_id is null)"; $arg_id_pack=$packid; $result = mysql2_query_secure($sql_id_pack,$_SESSION['OCS']["readServer"],$arg_id_pack); $id_pack = mysqli_fetch_array( $result ); return $id_pack['ID']; } function active_serv($list_id,$packid,$id_rule){ global $l; require_once('function_server.php'); //get all condition of this rule $sql="select PRIORITY,CFIELD,OP,COMPTO,SERV_VALUE from download_affect_rules where rule=%s order by PRIORITY"; $arg=$id_rule; $res_rules = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$arg ); while( $val_rules = mysqli_fetch_array($res_rules)) { $cfield[$val_rules['PRIORITY']]=$val_rules['CFIELD']; $op[$val_rules['PRIORITY']]=$val_rules['OP']; $compto[$val_rules['PRIORITY']]=$val_rules['COMPTO']; } $nb_insert=0; foreach ($cfield as $key=>$value) { $rule_detail=array('cfield'=>$cfield[$key],'op'=>$op[$key],'compto'=>$compto[$key]); $result=insert_with_rules($list_id,$rule_detail,$packid); $nb_insert+=$result['nb_insert']; $m=0; while ($result['exist'][$m]){ $exist[]=$result['exist'][$m]; $m++; } $nb_exist += $result['nb_exist']; if ($result['not_match'] == "") break; else{ unset($list_id); $list_id=$result['not_match']; } } if (isset($result['not_match'])) { tab_list_error($result['not_match'],$result['nb_not_match']." ".$l->g(658)." ".$l->g(887)."
      "); } if (isset($exist)) { tab_list_error($exist,$nb_exist." ".$l->g(659)." ".$l->g(482)); } return $nb_insert; } function loadInfo( $serv, $tstamp ) { $fname = $serv."/".$tstamp."/info"; $info =@file_get_contents( $fname ); if( ! $info ) return false; @preg_match_all( "/((?:\d|\w)+)=\"((?:\d|\w)+)\"/", $info, $resul ); if( ! $resul ) return false; $noms = array_flip( $resul[1] ); foreach( $noms as $nom=>$int ) { $noms[ $nom ] = $resul[2][$int]; } return( $noms ); } function activ_pack($fileid,$https_server,$file_serv){ global $l; //checking if corresponding available exists $reqVerif = "SELECT * FROM download_available WHERE fileid=%s"; $argVerif = $fileid; if( ! mysqli_num_rows( mysql2_query_secure( $reqVerif, $_SESSION['OCS']["readServer"],$argVerif) )) { $infoTab = loadInfo( $https_server, $file_serv ); if ($infoTab == ''){ $infoTab= array("PRI"=>'10',"FRAGS"=>'0'); } $req1 = "INSERT INTO download_available(FILEID, NAME, PRIORITY, FRAGMENTS, OSNAME ) VALUES ( '%s', 'Manual_%s',%s,%s, 'N/A' )"; $arg1=array($fileid,$fileid,$infoTab["PRI"],$infoTab["FRAGS"]); mysql2_query_secure( $req1, $_SESSION['OCS']["writeServer"],$arg1); } $req = "INSERT INTO download_enable(FILEID, INFO_LOC, PACK_LOC, CERT_FILE, CERT_PATH ) VALUES ( '%s', '%s', '%s', 'INSTALL_PATH/cacert.pem','INSTALL_PATH')"; $arg=array($fileid,$https_server,$file_serv); $lbl_log= $l->g(514)." ".$fileid; mysql2_query_secure( $req, $_SESSION['OCS']["writeServer"],$arg,$l->g(512)); } function activ_pack_server($fileid,$https_server,$id_server_group){ global $protectedPost; //search all computers have this package $sqlDoub="select SERVER_ID,INFO_LOC from download_enable where FILEID= %s"; $argDoub = $fileid; $resDoub = mysql2_query_secure( $sqlDoub, $_SESSION['OCS']["readServer"], $argDoub ); //exclu them while ($valDoub = mysqli_fetch_array( $resDoub )){ if ($valDoub['SERVER_ID'] != "") $listDoub[]=$valDoub['SERVER_ID']; //Update https server location if different from mysql database if ($valDoub['INFO_LOC'] != $https_server) { $sql_update_https= "UPDATE download_enable SET download_enable.INFO_LOC='%s' WHERE SERVER_ID=%s"; $arg_update_https=array($https_server,$valDoub['SERVER_ID']); mysql2_query_secure( $sql_update_https, $_SESSION['OCS']["readServer"], $arg_update_https ); } } //If this list is not null, we create the end of sql request if (isset($listDoub)){ $listDoub = " AND HARDWARE_ID not in (".implode(',',$listDoub).")"; } //on insert l'activation du paquet pour les serveurs du groupe $sql="insert into download_enable (FILEID,INFO_LOC,PACK_LOC,CERT_PATH,CERT_FILE,SERVER_ID,GROUP_ID) select %s,'%s',url,'INSTALL_PATH','INSTALL_PATH/cacert.pem', HARDWARE_ID, GROUP_ID from download_servers where GROUP_ID=%s".$listDoub; $arg=array($fileid,$https_server,$id_server_group); mysql2_query_secure( $sql, $_SESSION['OCS']["writeServer"],$arg); $query="UPDATE download_available set COMMENT = '%s' WHERE FILEID = %s"; $arg_query=array($protectedPost['id_server_add'],$fileid); mysql2_query_secure( $query, $_SESSION['OCS']["writeServer"], $arg_query ); } function del_pack($fileid){ global $l; //find all activate package $reqEnable = "SELECT id FROM download_enable WHERE FILEID='%s'"; $argEnable = $fileid; $resEnable = mysql2_query_secure($reqEnable, $_SESSION['OCS']["readServer"],$argEnable); while($valEnable = mysqli_fetch_array( $resEnable ) ) { $list_id[]=$valEnable["id"]; } //delete packet in DEVICES table if ($list_id != ""){ foreach ($list_id as $k=>$v){ desactive_packet('',$v); } } //delete activation of this pack $reqDelEnable = "DELETE FROM download_enable WHERE FILEID='%s'"; $argDelEnable = $fileid; mysql2_query_secure($reqDelEnable, $_SESSION['OCS']["writeServer"],$argDelEnable); //delete info of this pack $reqDelAvailable = "DELETE FROM download_available WHERE FILEID='%s'"; $argDelAvailable = $fileid; mysql2_query_secure($reqDelAvailable, $_SESSION['OCS']["writeServer"],$argDelAvailable); //what is the directory of this package? $info=look_config_default_values('DOWNLOAD_PACK_DIR'); $document_root=$info['tvalue']['DOWNLOAD_PACK_DIR']; //if no directory in base, take $_SERVER["DOCUMENT_ROOT"] if (!isset($document_root)) $document_root = VARLIB_DIR; if (@opendir($document_root."/download/".$fileid)){ //delete all files from this package if( ! @recursive_remove_directory( $document_root."/download/".$fileid )) { msg_error($l->g(472)." ".$document_root."/download/".$fileid); } } // delete redistribution package $dl_rep_redist = look_config_default_values('DOWNLOAD_REP_CREAT'); $document_root = $dl_rep_redist['tvalue']['DOWNLOAD_REP_CREAT']; if (!$document_root) { $document_root = VARLIB_DIR.'/download/server'; } $redist_package = realpath($document_root."/".$fileid); if ($redist_package and @opendir($redist_package)) { //delete all files from this package if(!@recursive_remove_directory($redist_package)) { msg_error($l->g(472)." ".$redist_package); } } addLog($l->g(512), $l->g(888)." ".$fileid ); } function recursive_remove_directory($directory, $empty=FALSE) { if(substr($directory,-1) == '/') $directory = substr($directory,0,-1); if(!file_exists($directory) || !is_dir($directory)) return FALSE; elseif(is_readable($directory)) { $handle = opendir($directory); while (FALSE !== ($item = readdir($handle))) { if($item != '.' && $item != '..') { $path = $directory.'/'.$item; if(is_dir($path)) recursive_remove_directory($path); else unlink($path); } } closedir($handle); if($empty == FALSE) { if(!rmdir($directory)) return FALSE; } } return TRUE; } function create_pack($sql_details,$info_details){ global $l; if(DEMO){ msg_info($l->g(2103)); return; } $info_details=xml_escape_string($info_details); //get temp file $fname = $sql_details['document_root'].$sql_details['timestamp']."/tmp"; //cut this package if( $size = @filesize( $fname )) { $handle = fopen ( $fname, "rb"); $read = 0; for( $i=1; $i<$sql_details['nbfrags']; $i++ ) { $contents = fread ($handle, $size / $sql_details['nbfrags'] ); $read += strlen( $contents ); $handfrag = fopen( $sql_details['document_root'].$sql_details['timestamp']."/".$sql_details['timestamp']."-".$i, "w+b" ); fwrite( $handfrag, $contents ); fclose( $handfrag ); } $contents = fread ($handle, $size - $read); $read += strlen( $contents ); $handfrag = fopen( $sql_details['document_root'].$sql_details['timestamp']."/".$sql_details['timestamp']."-".$i, "w+b" ); fwrite( $handfrag, $contents ); fclose( $handfrag ); fclose ($handle); unlink( $sql_details['document_root'].$sql_details['timestamp']."/tmp" ); }else{ if (!file_exists( $sql_details['document_root'].$sql_details['timestamp'])) mkdir( $sql_details['document_root'].$sql_details['timestamp']); } //if $info_details['DIGEST'] is null => no file to deploy, only execute commande in info file // so nb_frag=0 if (!isset($info_details['DIGEST']) or $info_details['DIGEST'] == "") $sql_details['nbfrags']=0; //create info $info = "\n"; $info .= "\n"; $handinfo = fopen( $sql_details['document_root'].$sql_details['timestamp']."/info", "w+" ); fwrite( $handinfo, utf8_decode($info)); fclose( $handinfo ); //delete all package with the same id mysql2_query_secure( "DELETE FROM download_available WHERE FILEID='%s'", $_SESSION['OCS']["writeServer"],$sql_details['timestamp']); //insert new package $req = "INSERT INTO download_available(FILEID, NAME, PRIORITY, FRAGMENTS, SIZE, OSNAME, COMMENT,ID_WK) VALUES ( '%s', '%s','%s', '%s','%s', '%s', '%s','%s' )"; $arg = array($sql_details['timestamp'],$sql_details['name'],$info_details['PRI'],$sql_details['nbfrags'], $sql_details['size'],$sql_details['os'],$sql_details['description'],$sql_details['id_wk']); mysql2_query_secure( $req, $_SESSION['OCS']["writeServer"], $arg); addLog($l->g(512), $l->g(617)." ".$sql_details['timestamp'] ); //info message msg_success($l->g(437)." ".$sql_details['document_root'].$sql_details['timestamp']); //delete cache for activation unset($_SESSION['OCS']['DATA_CACHE']['LIST_PACK']); unset($_SESSION['OCS']['NUM_ROW']['LIST_PACK']); } function crypt_file($dir_FILES,$digest_algo,$digest_encod){ //crypt this file if( $digest_algo == "SHA1" ) $digest = sha1_file($dir_FILES,true); else $digest = md5_file($dir_FILES); if( $digest_encod == "Base64" ) $digest = base64_encode( $digest ); return $digest; } function creat_temp_file($directory,$dir_FILES){ global $l; if(DEMO){ return; } if (!file_exists ($directory."/tmp")){ if (! @mkdir( $directory) or !copy( $dir_FILES, $directory."/tmp" ) ) msg_error("ERROR: can't create or write in ".$directory." folder, please refresh when fixed.
      (or try disabling php safe mode)"); } } //$val_details['priority'],$val_details['fragments'],$val_details['size'] function tps_estimated($val_details) { global $l; if ($val_details == "") return; /*********************************DETAIL SUR LE TEMPS APPROXIMATIF DE TELEDEPLOIEMENT*****************************************/ looking4config(); if ($val_details['priority'] == 0) $val_details['priority']=1; //durée complète d'un cycle en seconde $tps_cycle=$_SESSION['OCS']['CONFIG_DOWNLOAD']['DOWNLOAD_CYCLE_LATENCY']*$_SESSION['OCS']['CONFIG_DOWNLOAD']['DOWNLOAD_PERIOD_LENGTH']; //nbre de téléchargement de fragment par cycle $nb_frag_by_cycle=floor($_SESSION['OCS']['CONFIG_DOWNLOAD']['DOWNLOAD_PERIOD_LENGTH']/$val_details['priority']); //nombre de cycles necessaires pour le téléchargement complet $nb_cycle_for_download=$val_details['fragments']/$nb_frag_by_cycle; //temps dans le cycle $tps_cycle_for_download=$nb_cycle_for_download*$tps_cycle; //temps entre chaque fragment pour tous les cycles $tps_frag_latency=($nb_frag_by_cycle*$_SESSION['OCS']['CONFIG_DOWNLOAD']['DOWNLOAD_FRAG_LATENCY'])*$nb_cycle_for_download; //temps entre chaque période $tps_period_latency=$_SESSION['OCS']['CONFIG_DOWNLOAD']['DOWNLOAD_PERIOD_LATENCY']*$nb_cycle_for_download; //ajout de la vitesse de téléchargement $download_speed=25000; $tps_download_speed=$val_details['size']/$download_speed; //temps total de téléchargement: $tps_total=$tps_cycle_for_download +$tps_frag_latency +$tps_period_latency +$tps_download_speed ; $heure= floor($tps_total/3600); $tps_total-=$heure*3600; $minutes=floor($tps_total/60); $tps_total-=$minutes*60; $tps= $heure."h ".$minutes."min "; if ($heure == 0 and $minutes == 0) $tps.=floor($tps_total)." ".$l->g(511); return $tps; } function found_info_pack($id){ global $l; if (!is_numeric($id)) return array('ERROR'=>$l->g(1129)); $sql="select NAME,PRIORITY,FRAGMENTS,SIZE,OSNAME,COMMENT from download_available where fileid=%s"; $res = mysql2_query_secure( $sql, $_SESSION['OCS']["readServer"],$id); $val = mysqli_fetch_array( $res ); return $val; } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_users.php000077500000000000000000000330361303466605000260130ustar00rootroot00000000000000unserialize($parts['filename'], file_get_contents($path)); } } return $profiles; } function get_profile_labels() { $labels = array(); foreach (get_profiles() as $name => $profile) { $labels[$name] = $profile->getLabelTranslated(); } return $labels; } //Function to delete one or an array of user function delete_list_user($list_to_delete){ $table=array('tags'=>'login','operators'=>'id'); foreach ($table as $table_name=>$field){ $arg_sql=array($table_name,$field); $sql_delete="delete from %s where %s in "; $sql_delete=mysql2_prepare($sql_delete,$arg_sql,$list_to_delete); mysql2_query_secure($sql_delete['SQL'], $_SESSION['OCS']["writeServer"],$sql_delete['ARG']); } } function add_user($data_user,$list_profil=''){ global $l; if (isset($data_user['PASSWORD'])){ $password = $data_user['PASSWORD']; } $data_user=strip_tags_array($data_user); // Name ok ? if (trim($data_user['FIRSTNAME']) == ""){ $ERROR = $l->g(1391).' : '.$l->g(1366); } // Password ok ? if (trim($data_user['PASSWORD']) == "" and trim($data_user['MODIF']) == "" ){ $ERROR = $l->g(1391).' : '.$l->g(217); } // Login ok ? if (trim($data_user['ID']) == ""){ $ERROR = $l->g(997); } if (is_array($list_profil)){ if (!array_key_exists($data_user['ACCESSLVL'], $list_profil)) $ERROR=$l->g(998); } if (!isset($ERROR)){ $sql="select id from operators where id= '%s'"; $arg=$data_user['ID']; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); if (isset($row->id)){ if ($data_user['MODIF'] != $row->id){ return $l->g(999); }else{ $sql_update="update operators set firstname = '%s', lastname='%s', new_accesslvl='%s', email='%s', comments='%s', user_group='%s'"; $arg_update=array($data_user['FIRSTNAME'], $data_user['LASTNAME'], $data_user['ACCESSLVL'], $data_user['EMAIL'], $data_user['COMMENTS'], $data_user['USER_GROUP']); if (isset($data_user['PASSWORD']) and $data_user['PASSWORD'] != ''){ $sql_update.=",passwd ='%s' , password_version ='%s' "; $arg_update[]=password_hash($password, constant($_SESSION['OCS']['PASSWORD_ENCRYPTION'])); $arg_update[]=$_SESSION['OCS']['PASSWORD_VERSION']; } $sql_update.=" where ID='%s'"; $arg_update[]=$row->id; mysql2_query_secure($sql_update, $_SESSION['OCS']["writeServer"],$arg_update); return $l->g(374); } }else{ $sql=" insert into operators (id,firstname,lastname,new_accesslvl,email,comments,user_group"; if (isset($password)){ $sql.=",passwd"; $sql.=",password_version"; } $sql.=") value ('%s','%s','%s','%s','%s','%s','%s'"; $arg=array($data_user['ID'],$data_user['FIRSTNAME'], $data_user['LASTNAME'], $data_user['ACCESSLVL'], $data_user['EMAIL'], $data_user['COMMENTS'], $data_user['USER_GROUP']); if (isset($password)){ $sql.=",'%s','%s'"; $arg[]=password_hash($password, constant($_SESSION['OCS']['PASSWORD_ENCRYPTION']) ); $arg[]=$_SESSION['OCS']['PASSWORD_VERSION']; } $sql.=")"; mysql2_query_secure($sql, $_SESSION['OCS']["writeServer"],$arg); return $l->g(373); } }else return $ERROR; } function admin_user($id_user = null, $is_my_account = false) { global $protectedPost,$l,$pages_refs; $tab_hidden = array(); $list_groups = array(); if ($id_user) { $update=3; } else { $update=0; } if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES') { //search all profil type $list_profil=get_profile_labels(); $list_groups_result=look_config_default_values("USER_GROUP_%",'LIKE'); if (is_array($list_groups_result['name'])){ foreach ($list_groups_result['name'] as $key=>$value){ $list_groups[$list_groups_result['ivalue'][$key]]=$list_groups_result['tvalue'][$key]; } } $name_field=array("ID","ACCESSLVL","USER_GROUP"); $tab_name=array($l->g(995)." :", $l->g(66)." :", $l->g(607)." :"); $type_field= array($update,2,2); } $name_field[]="FIRSTNAME"; $name_field[]="LASTNAME"; $name_field[]="EMAIL"; $name_field[]="COMMENTS"; //$name_field[]="USER_GROUP"; $tab_name[]=$l->g(1366)." :"; $tab_name[]=$l->g(996)." :"; $tab_name[]=$l->g(1117)." :"; $tab_name[]=$l->g(51)." :"; //$tab_name[]="Groupe de l'utilisateur: "; $type_field[]= 0; $type_field[]= 0; $type_field[]= 0; $type_field[]= 0; //$type_field[]= 2; $tab_hidden['MODIF']=$id_user; $sql="select ID,NEW_ACCESSLVL,USER_GROUP,FIRSTNAME,LASTNAME,EMAIL,COMMENTS from operators where id= '%s'"; $arg=$id_user; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); if ($_SESSION['OCS']['profile']->getConfigValue('CHANGE_USER_GROUP') == 'YES'){ $protectedPost['ACCESSLVL']=$row->NEW_ACCESSLVL; $protectedPost['USER_GROUP']=$row->USER_GROUP; $value_field=array($row->ID,$list_profil,$list_groups); } $value_field[]=$row->FIRSTNAME; $value_field[]=$row->LASTNAME; $value_field[]=$row->EMAIL; $value_field[]=$row->COMMENTS; if ($_SESSION['OCS']['cnx_origine'] == "LOCAL"){ $name_field[]="PASSWORD"; $type_field[]=0; $tab_name[]=$l->g(217)." :"; $value_field[]=$protectedPost['PASSWORD']; } $tab_typ_champ=show_field($name_field,$type_field,$value_field); foreach ($tab_typ_champ as $id=>$values){ $tab_typ_champ[$id]['CONFIG']['SIZE']=40; } if ($_SESSION['OCS']['profile']->getConfigValue('MANAGE_USER_GROUP') == 'YES'){ $tab_typ_champ[2]["CONFIG"]['DEFAULT']="YES"; // $tab_typ_champ[1]['COMMENT_AFTER']=""; $tab_typ_champ[2]['COMMENT_AFTER']=""; } if (isset($tab_typ_champ)) { tab_modif_values($tab_name, $tab_typ_champ, $tab_hidden, array( 'title' => ($id_user ? ($is_my_account ? $l->g(1365) : $l->g(1385)) : $l->g(1386)), 'form_name' => 'my_account' )); } } function admin_profil($form){ global $protectedPost,$l,$pages_refs; $yes_no=array('YES'=>$l->g(455),'NO'=>$l->g(454)); $info_field=array('NAME'=>array('INFO'=>array('LBL'=>$l->g(1153) . ": ",'VALUE'=>'')), 'GUI'=> array('RESTRICTION'=>array('LBL'=>$l->g(1154) . ": ",'VALUE'=>$yes_no)), 'TELEDIFF_ACTIVATE'=>array('RESTRICTION'=>array('LBL'=>$l->g(1158) . ": ",'VALUE'=>$yes_no)), 'TELEDIFF_VISIBLE'=>array('RESTRICTION'=>array('LBL'=>$l->g(1301) . ": ",'VALUE'=>$yes_no)), 'EXPORT_XML'=>array('RESTRICTION'=>array('LBL'=>$l->g(1305),'VALUE'=>$yes_no)), 'WOL'=> array('RESTRICTION'=>array('LBL'=>$l->g(1281) . ": ",'VALUE'=>$yes_no)), 'MACADD'=>array('ADMIN_BLACKLIST'=>array('LBL'=>$l->g(1159) . ": ",'VALUE'=>$yes_no)), 'SERIAL'=>array('ADMIN_BLACKLIST'=>array('LBL'=>$l->g(1160) . ": ",'VALUE'=>$yes_no)), 'IPDISCOVER'=>array('ADMIN_BLACKLIST'=>array('LBL'=>$l->g(1161) . ": ",'VALUE'=>$yes_no), 'CONFIGURATION'=>array('LBL'=>$l->g(1172) . ": ",'VALUE'=>$yes_no)), 'TELEDIFF'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1162) . ": ",'VALUE'=>$yes_no)), 'CONFIG'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1163) . ": ",'VALUE'=>$yes_no)), 'GROUPS'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1164) . ": ",'VALUE'=>$yes_no)), 'CONSOLE'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1165) . ": ",'VALUE'=>$yes_no)), 'ALERTE_MSG'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1166) . ": ",'VALUE'=>$yes_no)), 'ACCOUNTINFO'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1167) . ": ",'VALUE'=>$yes_no)), 'CHANGE_ACCOUNTINFO'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1168) . ": ",'VALUE'=>$yes_no)), 'CHANGE_USER_GROUP'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1169) . ": ",'VALUE'=>$yes_no)), 'MANAGE_PROFIL'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1170) . ": ",'VALUE'=>$yes_no)), 'MANAGE_USER_GROUP'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1171) . ": ",'VALUE'=>$yes_no)), 'MANAGE_SMTP_COMMUNITIES'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1205) . ": ",'VALUE'=>$yes_no)), 'DELETE_COMPUTERS'=>array('CONFIGURATION'=>array('LBL'=>$l->g(1272) . ": ",'VALUE'=>$yes_no))); $lbl_cat=array('INFO'=>$l->g(1173), 'PAGE_PROFIL'=>$l->g(1174), 'RESTRICTION'=>$l->g(1175), 'ADMIN_BLACKLIST'=>$l->g(1176), 'CONFIGURATION'=>$l->g(1177)); if ($protectedPost['Valid_modif_profil']){ //read profil file $forprofil=read_profil_file($protectedPost['PROFILS']); //read all profil value $forall=read_config_file(); //build new tab with new values foreach($info_field as $if_name=>$if_value){ foreach ($if_value as $if_cat=>$if_val){ if(isset($protectedPost[$if_name]) and $protectedPost['cat'] == $if_cat){ $new_value[$if_cat][$if_name]=$protectedPost[$if_name]; }else $new_value[$if_cat][$if_name]=$forprofil[$if_cat][$if_name]; } } foreach ($forall['URL'] as $name=>$value){ if (isset($protectedPost[$name]) and $protectedPost['cat'] == "PAGE_PROFIL") $new_value["PAGE_PROFIL"][$name]=''; } if (!isset($new_value['PAGE_PROFIL'])) $new_value['PAGE_PROFIL']=$forprofil['PAGE_PROFIL']; update_config_file($protectedPost['PROFILS'],$new_value); msg_success($l->g(1274)); } $array_profil=get_profile_labels(); echo $l->g(1196). ": " .show_modif($array_profil,"PROFILS",2,$form); echo ""; if (isset($protectedPost['PROFILS']) and $protectedPost['PROFILS'] != ''){ $forall=read_config_file(); $forprofil=read_profil_file($protectedPost['PROFILS'],'WRITE') ; if (is_array($forprofil) and is_array($forall)){ foreach ($forprofil as $key=>$value){ if (isset($lbl_cat[$key])) $data_on[$key]=$lbl_cat[$key]; } onglet($data_on,$form,"cat",10); if (isset($forprofil[$protectedPost['cat']]) and $protectedPost['cat'] != 'PAGE_PROFIL'){ $name_field=array(); $type_field=array(); $tab_name=array(); $value_field=array(); foreach($info_field as $if_name=>$if_value){ foreach ($if_value as $if_cat=>$if_val){ if ($protectedPost['cat'] == $if_cat){ if(isset($forprofil[$if_cat][$if_name])) $protectedPost[$if_name]=$forprofil[$if_cat][$if_name]; array_push($name_field,$if_name); array_push($tab_name,$if_val['LBL']); if(is_array($if_val['VALUE'])){ array_push($type_field,2); if (!isset($protectedPost[$if_name])) array_push($if_val['VALUE'],''); array_push($value_field,$if_val['VALUE']); }else{ array_push($type_field,0); array_push($value_field,replace_language($forprofil[$if_cat][$if_name])); } } } } $tab_typ_champ=show_field($name_field,$type_field,$value_field); tab_modif_values($tab_name,$tab_typ_champ,$tab_hidden, array( 'button_name' => 'modif_profil' )); }elseif ($protectedPost['cat'] == 'PAGE_PROFIL'){ $champs="
      "; $i=0; ksort($forall['URL']); foreach ($forall['URL'] as $key=>$value){ $champs.= ""; $i++; if ($i == 4){ $champs.= "
      "; $i=0; } } $champs.="
      "; tab_modif_values($champs,array(),array(), array( 'button_name' => 'modif_profil' )); } } } } function updatePassword($id_user,$password){ $sql="select id from operators where id= '%s'"; $arg=$id_user; $res=mysql2_query_secure($sql, $_SESSION['OCS']["readServer"],$arg); $row=mysqli_fetch_object($res); if (isset($row->id)){ if (isset($password) and $password != ''){ $sql_update="update operators set passwd ='%s', PASSWORD_VERSION ='%s' "; $newhash = password_hash($password,constant($_SESSION['OCS']['PASSWORD_ENCRYPTION'])); // if constant don't exist, or encryption not good if(!empty($newhash)){ $arg_update[]=$newhash; $arg_update[]=$_SESSION['OCS']['PASSWORD_VERSION']; $sql_update.=" where ID='%s'"; $arg_update[]=$row->id; $res = mysql2_query_secure($sql_update, $_SESSION['OCS']["writeServer"],$arg_update); } } } } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/function_wol.php000077500000000000000000000037311303466605000254520ustar00rootroot00000000000000wol_send=$l->g(1321); else $wol_port=explode(',', $wol_info['tvalue']['WOL_PORT']); foreach ($wol_port as $k=>$v){ if (is_numeric($v)){ $s = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP ); if( !$s ){ @socket_close($s); $this->wol_send=$l->g(1322); } else{ $s_opt = socket_set_option($s,SOL_SOCKET,SO_BROADCAST,true); socket_sendto($s,$this->pacquet($mac),strlen($this->pacquet($mac)),0,"255.255.255.255",$v); socket_close($s); $this->wol_send=$l->g(1282); } } } // $this->wol_send='toto'; //return $wol_send; } private function pacquet($Mac){ $packet = ""; $macAddr = ''; $addrByte=explode(':', $Mac); foreach ($addrByte as $v) $macAddr .= chr(hexdec($v)); for($i = 0; $i < 6; $i++) $packet .= chr(0xFF); for ($j = 0; $j < 16; $j++) $packet .= $macAddr; //use bios password? $wol_info=look_config_default_values('WOL_BIOS_PASSWD'); if (isset($wol_info['name']['WOL_BIOS_PASSWD'])) $packet .=$wol_info['tvalue']['WOL_BIOS_PASSWD']; return $packet; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/header.php000077500000000000000000000405211303466605000241720ustar00rootroot00000000000000client(CAS_VERSION_2_0,$cas_host,$cas_port,$cas_uri); $cas->logout(); } //end contrib unset($_SESSION['OCS']); unset($_GET); } /***************************************************** First installation checking *********************************************************/ if( (!is_readable(CONF_MYSQL)) || (!function_exists('session_start')) || (!function_exists('mysqli_connect')) ) { require('install.php'); die(); } else{ require_once(CONF_MYSQL); } if (!defined("SERVER_READ") || !defined("DB_NAME") || !defined("SERVER_WRITE") || !defined("COMPTE_BASE") || !defined("PSWD_BASE")){ $fromdbconfig_out = true; require('install.php'); die(); } //connect to databases $link_write=dbconnect(SERVER_WRITE,COMPTE_BASE,PSWD_BASE); $link_read=dbconnect(SERVER_READ,COMPTE_BASE,PSWD_BASE); //p($link_write); if (is_object($link_write) and is_object($link_read)) { $_SESSION['OCS']["writeServer"] = $link_write; $_SESSION['OCS']["readServer"] = $link_read; }else{ if ($link_write == "NO_DATABASE" or $link_read == "NO_DATABASE"){ require('install.php'); die(); } $msg=''; if (!is_object($link_write)) $msg.=$link_write."
      "; if (!is_object($link_read)) $msg.=$link_read; html_header(true); msg_error($msg); require_once(FOOTER_HTML); die(); } /***********************************************************LOGS ADMIN*************************************************************************/ if (!isset($_SESSION['OCS']['LOG_GUI'])){ $values=look_config_default_values(array('LOG_GUI','LOG_DIR','LOG_SCRIPT')); $_SESSION['OCS']['LOG_DIR'] = $values['tvalue']['LOG_DIR']; if ($_SESSION['OCS']['LOG_DIR']) { $_SESSION['OCS']['LOG_DIR'] .='/logs/'; } else { $_SESSION['OCS']['OLD_CONF_DIR'] = VARLOG_DIR.'/logs/'; } $_SESSION['OCS']['LOG_GUI'] = $values['ivalue']['LOG_GUI']; if ($_SESSION['OCS']['LOG_SCRIPT']) { $_SESSION['OCS']['LOG_SCRIPT'] .="/scripts/"; } else { $_SESSION['OCS']['OLD_CONF_DIR'] = VARLOG_DIR.'/scripts/'; } } /****************END LOGS***************/ /***********************************************************CONF DIRECTORY*************************************************************************/ if (!isset($_SESSION['OCS']['CONF_PROFILS_DIR'])){ $values=look_config_default_values(array('CONF_PROFILS_DIR','OLD_CONF_DIR')); $_SESSION['OCS']['OLD_CONF_DIR'] = $values['tvalue']['OLD_CONF_DIR']; if ($_SESSION['OCS']['OLD_CONF_DIR']) { $_SESSION['OCS']['OLD_CONF_DIR'] .='/old_conf/'; } else { $_SESSION['OCS']['CONF_PROFILS_DIR'] = ETC_DIR.'/'.MAIN_SECTIONS_DIR.'old_conf/'; } $_SESSION['OCS']['CONF_PROFILS_DIR'] = $values['tvalue']['CONF_PROFILS_DIR']; if ($_SESSION['OCS']['CONF_PROFILS_DIR']) { $_SESSION['OCS']['CONF_PROFILS_DIR'] .='/conf/'; } else { $_SESSION['OCS']['CONF_PROFILS_DIR'] = ETC_DIR.'/'.MAIN_SECTIONS_DIR.'conf/'; } } /****************END LOGS***************/ /******************************************Checking sql update*********************************************/ if (!isset($_SESSION['OCS']['SQL_BASE_VERS'])){ $values=look_config_default_values('GUI_VERSION'); $_SESSION['OCS']['SQL_BASE_VERS']=$values['tvalue']['GUI_VERSION']; } if (GUI_VER != $_SESSION['OCS']['SQL_BASE_VERS']){ $fromAuto = true; if ($_SESSION['OCS']['SQL_BASE_VERS'] < 7006){ unset($_SESSION['OCS']['SQL_BASE_VERS']); require('install.php'); }else require('update.php'); die(); } if (!defined("SERVER_READ")){ $fromdbconfig_out = true; require('install.php'); die(); } //SECURITY $protectedPost=strip_tags_array($_POST); $protectedGet=strip_tags_array($_GET); @set_time_limit(0); //Don't take care of error identify //For the fuser, $no_error = 'YES' if (!isset($no_error)) $no_error='NO'; /****************************************************SQL TABLE & FIELDS***********************************************/ if (!isset($_SESSION['OCS']['SQL_TABLE'])){ $sql="show tables from %s"; $arg=DB_NAME; $res=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); while($item = mysqli_fetch_row($res)){ $sql="SHOW COLUMNS FROM %s"; $arg=$item[0]; $res_column=mysql2_query_secure($sql,$_SESSION['OCS']["readServer"],$arg); // echo "".generate_secure_sql($sql,$arg)."
      "; while ($item_column = mysqli_fetch_row($res_column)){ if ($item_column[0] == "HARDWARE_ID" and !isset($_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'][$item[0]])) $_SESSION['OCS']['SQL_TABLE_HARDWARE_ID'][$item[0]]=$item[0]; $_SESSION['OCS']['SQL_TABLE'][$item[0]][$item_column[0]]=$item_column[0]; } } } /*****************************************************GESTION DU NOM DES PAGES****************************************/ //Config for all user if (!isset($_SESSION['OCS']['url_service'])){ if (!file_exists(DOCUMENT_REAL_ROOT.'/config/urls.xml')) { migrate_config_2_2(); } $url_serializer = new XMLUrlsSerializer(); $urls = $url_serializer->unserialize(file_get_contents('config/urls.xml')); $_SESSION['OCS']['url_service'] = $urls; // Backwards compatibility $pages_refs = array(); foreach ($urls->getUrls() as $key => $url) { $pages_refs[$key] = $url['value']; } $_SESSION['OCS']['URL'] = $pages_refs; } else { $urls = $_SESSION['OCS']['url_service']; $pages_refs = $_SESSION['OCS']['URL']; } /*****************************************************GESTION DES FICHIERS JS****************************************/ if (!isset($_SESSION['OCS']['JAVASCRIPT'])) { $js_serializer = new XMLJsSerializer(); $_SESSION['OCS']['JAVASCRIPT'] = $js_serializer->unserialize(file_get_contents('config/js.xml')); } /**********************************************************GESTION DES COLONNES DES TABLEAUX PAR COOKIES***********************************/ require_once('require/function_cookies.php'); //Delete all cookies if GUI_VER change if (!isset($_COOKIE["VERS"]) or $_COOKIE["VERS"] != GUI_VER){ if( isset( $_COOKIE) ) { foreach( $_COOKIE as $key=>$val ) { cookies_reset($key); } unset( $_COOKIE ); } cookies_add("VERS", GUI_VER); } //del column if (isset($protectedPost['SUP_COL']) and $protectedPost['SUP_COL'] != "" and isset($_SESSION['OCS']['col_tab'][$protectedPost['TABLE_NAME']])){ unset($_SESSION['OCS']['col_tab'][$protectedPost['TABLE_NAME']][$protectedPost['SUP_COL']]); cookies_add($protectedPost['TABLE_NAME'],implode('///',$_SESSION['OCS']['col_tab'][$protectedPost['TABLE_NAME']])); } //default values if (isset($protectedPost['RAZ']) and $protectedPost['RAZ'] != ""){ cookies_reset($protectedPost['TABLE_NAME']); } //add column if (isset($protectedPost['TABLE_NAME']) and isset($protectedPost['restCol'.$protectedPost['TABLE_NAME']]) and $protectedPost['restCol'.$protectedPost['TABLE_NAME']] != ''){ $_SESSION['OCS']['col_tab'][$tab_name][$protectedPost['restCol'.$tab_name]]=$protectedPost['restCol'.$tab_name]; if (is_array($_SESSION['OCS']['col_tab'][$protectedPost['TABLE_NAME']])){ cookies_add($protectedPost['TABLE_NAME'],implode('///',$_SESSION['OCS']['col_tab'][$protectedPost['TABLE_NAME']])); } } /********************************************************GESTION DE LA LANGUE PAR COOKIES**********************************************/ /*****************************************************Gestion des fichiers de langues TEST*************************************/ if (isset($protectedPost['Valid_EDITION'])){ if ($protectedPost['ID_WORD'] != ''){ if ($protectedPost['ACTION'] == "DEL"){ unset($_SESSION['OCS']['LANGUAGE_FILE']->tableauMots[$protectedPost['ID_WORD']]); }else{ $_SESSION['OCS']['LANGUAGE_FILE']->tableauMots[$protectedPost['ID_WORD']]=$protectedPost['UPDATE']; } /*$file_name=$_SESSION['OCS']['plugins_dir']."language/".$language."/".$_SESSION['OCS']['LANGUAGE'].".txt"; $file=fopen($file_name."_old","x+"); foreach ($_SESSION['OCS']['LANGUAGE_FILE'] as $key=>$value){ fwrite($file,$key." ".$value."/r/n"); } fclose($file);*/ /* $sql="update languages set json_value = '%s' where name= '%s'"; $arg=array(json_encode($_SESSION['OCS']['LANGUAGE_FILE']->tableauMots),$_SESSION['OCS']['LANGUAGE']); mysql2_query_secure( $sql, $_SESSION['OCS']["writeServer"],$arg);*/ } } unset($_SESSION['OCS']['EDIT_LANGUAGE']); if (isset($protectedPost['LANG']) and $protectedPost['LANG']!= ''){ unset($_SESSION['OCS']['LANGUAGE']); cookies_add('LANG',$protectedPost['LANG']); $_SESSION['OCS']['LANGUAGE']=$protectedPost['LANG']; $_SESSION['OCS']["LANGUAGE_FILE"]=new language($_SESSION['OCS']['LANGUAGE']); } //unset($_SESSION['OCS']['LANGUAGE']); //si la langue par défaut n'existe pas, on récupèrer le cookie if (!isset($_SESSION['OCS']['LANGUAGE']) or !isset($_SESSION['OCS']["LANGUAGE_FILE"])){ if (isset($_COOKIE['LANG'])) $_SESSION['OCS']['LANGUAGE']=$_COOKIE['LANG']; if (!isset($_COOKIE['LANG'])) $_SESSION['OCS']['LANGUAGE']=DEFAULT_LANGUAGE; $_SESSION['OCS']["LANGUAGE_FILE"]=new language($_SESSION['OCS']['LANGUAGE']); } $l = $_SESSION['OCS']["LANGUAGE_FILE"]; /*********************************************************gestion de l'authentification****************************************************/ if (!isset($_SESSION['OCS']["loggeduser"])){ if (!AJAX && !((array_key_exists('HTTP_X_REQUESTED_WITH', $_SERVER) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'))){ if(version_compare(PHP_VERSION, '5.3.7') >= 0){ if(version_compare(PHP_VERSION, '5.5') < 0){ include_once(PASSWORD_COMPAT); } $values=look_config_default_values('PASSWORD_VERSION'); $_SESSION['OCS']['PASSWORD_VERSION'] = $values['ivalue']['PASSWORD_VERSION']; $_SESSION['OCS']['PASSWORD_ENCRYPTION'] = $values['tvalue']['PASSWORD_VERSION']; }else{ $_SESSION['OCS']['PASSWORD_VERSION'] = false; $_SESSION['OCS']['PASSWORD_ENCRYPTION'] = false; } require_once(BACKEND.'AUTH/auth.php'); }else{ header($_SERVER["SERVER_PROTOCOL"]." 401 ". utf8_decode($l->g(1359))); die; } } /**********************************************************gestion des droits sur les TAG****************************************************/ if (!isset($_SESSION['OCS']["lvluser"])) require_once(BACKEND.'identity/identity.php'); /**********************************************************gestion des droits sur l'ipdiscover****************************************************/ if (!isset($_SESSION['OCS']["ipdiscover"])){ require_once(BACKEND.'ipdiscover/ipdiscover.php'); } /*********************************************************gestion de la suppression automatique des machines trop vieilles*************************/ //require_once('plugins/options_config/del_old_computers.php'); /********************GESTION GUI CONF******************/ if (!isset($_SESSION['OCS']["usecache"]) or !isset($_SESSION['OCS']["tabcache"])){ $conf_gui=array('usecache'=>'INVENTORY_CACHE_ENABLED', 'tabcache'=>'TAB_CACHE', 'USE_NEW_SOFT_TABLES'=>'USE_NEW_SOFT_TABLES'); $default_value_conf=array('INVENTORY_CACHE_ENABLED'=>1,'TAB_CACHE'=>0,'USE_NEW_SOFT_TABLES' =>0); $values=look_config_default_values($conf_gui); foreach ($conf_gui as $k=>$v){ if (isset($values['ivalue'][$v])) $_SESSION['OCS'][$k]=$values['ivalue'][$v]; else $_SESSION['OCS'][$k]=$default_value_conf[$v]; } } /********************END GESTION CACHE******************/ /********************MANAGE DOWNLOAD REDISTRIBUTION******************/ if (!isset($_SESSION['OCS']["use_redistribution"])){ $values=look_config_default_values(array('DOWNLOAD_REDISTRIB')); $_SESSION['OCS']['use_redistribution']=$values['ivalue']['DOWNLOAD_REDISTRIB']; if (!isset($_SESSION['OCS']["use_redistribution"])) $_SESSION['OCS']["use_redistribution"]=1; } /********************END DOWNLOAD REDISTRIBUTION******************/ /*********************************************GESTION OF LBL_TAG*************************************/ if (!isset($_SESSION['OCS']['TAG_LBL'])){ require_once('require/function_admininfo.php'); $all_tag_lbl=witch_field_more('COMPUTERS'); foreach ($all_tag_lbl['LIST_NAME'] as $key=>$value){ $_SESSION['OCS']['TAG_LBL'][$value]=$all_tag_lbl['LIST_FIELDS'][$key]; $_SESSION['OCS']['TAG_ID'][$key]=$value; } } /*******************************************GESTION OF PLUGINS (MAIN SECTIONS)****************************/ if (!isset($_SESSION['OCS']['profile'])) { $profile_config = 'config/profiles/'.$_SESSION['OCS']["lvluser"].'.xml'; $profile_serializer = new XMLProfileSerializer(); $profile = $profile_serializer->unserialize($_SESSION['OCS']["lvluser"], file_get_contents($profile_config)); $_SESSION['OCS']['profile'] = $profile; } else { $profile = $_SESSION['OCS']['profile']; } if (!AJAX and (!isset($header_html) or $header_html != 'NO') and !isset($protectedGet['no_header'])){ require_once (HEADER_HTML); } $url_name = $urls->getUrlName($protectedGet[PAG_INDEX]); //VERIF ACCESS TO THIS PAGE if (isset($protectedGet[PAG_INDEX]) and !$profile->hasPage($url_name) and (!$_SESSION['OCS']['TRUE_PAGES'] or !array_search($url_name, $_SESSION['OCS']['TRUE_PAGES'])) //force access to profils witch have CONFIGURATION TELEDIFF == 'YES' for ms_admin_ipdiscover page and !($profile->getConfigValue('TELEDIFF') == 'YES' and $url_name == 'ms_admin_ipdiscover')){ msg_error("ACCESS DENIED"); require_once(FOOTER_HTML); die(); } if((!isset($_SESSION['OCS']["loggeduser"]) or !isset($_SESSION['OCS']["lvluser"]) or $_SESSION['OCS']["lvluser"] == "") and !isset($_SESSION['OCS']['TRUE_USER']) and $no_error != 'YES') { msg_error($LIST_ERROR); require_once(FOOTER_HTML); die(); } if ($url_name) { //CSRF security if($_SERVER['REQUEST_METHOD'] == 'POST') { $csrf=true; if (isset($_SESSION['OCS']['CSRF'])){ foreach ($_SESSION['OCS']['CSRF'] as $k=>$v){ if ($v == $protectedPost['CSRF_'.$k]) $csrf=false; } } //Here we parse the form if($csrf){ msg_error("CSRF ATTACK!!!"); require_once(FOOTER_HTML); die(); } //Do the rest of the processing here } if ($urls->getDirectory($url_name)) { $rep = $urls->getDirectory($url_name); } require (MAIN_SECTIONS_DIR.$rep."/".$url_name.".php"); } else { $default_first_page = MAIN_SECTIONS_DIR."ms_console/ms_console.php"; if (isset($protectedGet['first'])) { require (MAIN_SECTIONS_DIR."ms_console/ms_console.php"); } else if ($profile->hasPage('ms_console')) { require ($default_first_page); } else { echo ""; } } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/html_header.php000077500000000000000000000153351303466605000252230ustar00rootroot00000000000000'; //on affiche l'entete de la page if (!isset($protectedGet["popup"])) { //si unlock de l'interface if (isset($protectedPost['LOCK']) and $protectedPost['LOCK'] == 'RESET'){ if (isset($_SESSION['OCS']["TRUE_mesmachines"]) and $_SESSION['OCS']["TRUE_mesmachines"] != array()) $_SESSION['OCS']["mesmachines"]=$_SESSION['OCS']["TRUE_mesmachines"]; else unset($_SESSION['OCS']["mesmachines"]); unset($_SESSION['OCS']["TRUE_mesmachines"]); } } echo ''; if ($_SESSION['OCS']['profile']) { echo ''; echo open_form('log_out','index.php'); echo ""; echo ""; echo close_form(); } } echo ''; if (isset($_SESSION['OCS']["loggeduser"]) && $_SESSION['OCS']['profile']->getConfigValue('ALERTE_MSG')=='YES' ){ /************************************************** ALERT MESSAGES ********************************************************/ $msg_header_error=array(); $msg_header_error_sol=array(); //install.php already exist ? if(is_readable("install.php")){ $msg_header_error[]= $l->g(2020); $msg_header_error_sol[] = $l->g(2023); } //defaut user already exist on databases? try{ $link_read=mysqli_connect(SERVER_READ,DFT_DB_CMPT,DFT_DB_PSWD); $link_write=mysqli_connect(SERVER_WRITE,DFT_DB_CMPT,DFT_DB_PSWD); mysqli_select_db($link_read,DB_NAME); mysqli_select_db($link_write,DB_NAME); $msg_header_error[]= $l->g(2024).' '.DB_NAME; $msg_header_error_sol[] = $l->g(2025); } catch (Exception $e){} ; //admin user already exist on data base with defaut password? $reqOp="SELECT id,user_group FROM operators WHERE id='%s' and passwd ='%s'"; $arg_reqOp=array(DFT_GUI_CMPT,md5(DFT_GUI_PSWD)); $resOp=mysql2_query_secure($reqOp,$_SESSION['OCS']["readServer"],$arg_reqOp); $rowOp=mysqli_fetch_object($resOp); if (isset($rowOp->id)){ $msg_header_error[]= $l->g(2026); $msg_header_error_sol[] = $l->g(2027); } /***************************************************** WARNING MESSAGES *****************************************************/ $msg_header_warning=array(); //Demo mode activate? if (DEMO) { $msg_header_warning[]= $l->g(2104)." ".GUI_VER_SHOW."
      "; } if ($_SESSION['OCS']['LOG_GUI'] == 1){ //check if the GUI logs directory is writable $rep_ok=is_writable($_SESSION['OCS']['LOG_DIR']); if (!$rep_ok){ $msg_header_warning[]=$l->g(2021); } } if(version_compare(phpversion(), '5.3.7', '<')){ $msg_header_warning[]=$l->g(2113)." ".phpversion()." ) "; } //Error are detected if ($msg_header_error != array()){ js_tooltip(); $msg_tooltip=''; foreach ($msg_header_error as $poub=>$values){ if (isset($msg_header_error_sol[$poub])){ $tooltip=tooltip($msg_header_error_sol[$poub]); $msg_tooltip .= "
      ".$values."
      "; } } msg_error("".$l->g(1263)."
      ".$msg_tooltip,"top_msg_alert"); } //warning are detected if ($msg_header_warning != array()) msg_warning(implode('
      ',$msg_header_warning),"top_msg_warning"); } if (isset($_SESSION['OCS']['TRUE_USER'])) { msg_info($_SESSION['OCS']['TRUE_USER']." ".$l->g(889)." ".$_SESSION['OCS']["loggeduser"]); } if (isset($_SESSION['OCS']["TRUE_mesmachines"])) { msg_info($l->g(890)); } echo ""; if (!isset($_SESSION['OCS']["loggeduser"])){ echo ""; require_once('plugins/language/language.php'); echo ""; } echo ""; echo "
      "; if ($_SESSION['OCS']["mesmachines"] == "NOTAG" and !(array_search('ms_debug', $_SESSION['OCS']['TRUE_PAGES']['ms_debug']) and $protectedGet[PAG_INDEX] == $pages_refs['ms_debug']) ){ if (isset($LIST_ERROR)) $msg_error=$LIST_ERROR; else $msg_error=$l->g(893); msg_error($msg_error); require_once(FOOTER_HTML); die(); } ?> ocsinventory-server-2.2+dfsg/ocsreports/require/maps.php000077500000000000000000000164411303466605000237060ustar00rootroot00000000000000'h', 'BIOS'=>'b', 'CONTROLLERS' => 'con', 'DRIVES'=> 'dr', 'INPUT' => 'in', 'MEMORIES' => 'mem', 'MODEMS' => 'mod', 'MONITORS' => 'mon', 'ACCOUNTINFO' => 'a'); /********************************* DEFINE ALL LBL FOR ALL FIELDS **************************/ //search all fields for accountinfo require_once('require/function_admininfo.php'); $accountinfo_data=witch_field_more('COMPUTERS'); $lbl_column['ACCOUNTINFO']['HARDWARE_ID'] = $l->g(949); foreach($accountinfo_data['LIST_FIELDS'] as $id=>$id_lbl){ if ($id != '1') $lbl_column['ACCOUNTINFO']['fields_'.$id]=$l->g(1210)." ".$id_lbl; else $lbl_column['ACCOUNTINFO']['TAG']=$l->g(1210)." ".$id_lbl; } $default_column['ACCOUNTINFO']=array('TAG'); //hardware $lbl_column['HARDWARE'] = array('ID' => $l->g(949), 'DEVICEID' => 'DEVICEID', 'NAME' => $l->g(729).": ".$l->g(23), 'WORKGROUP' => $l->g(33), 'USERDOMAIN' => $l->g(82).": ".$l->g(557), 'OSNAME' => $l->g(25).": ".$l->g(25), 'OSVERSION' => $l->g(25).": ".$l->g(275), 'OSCOMMENTS' => $l->g(25).": ".$l->g(286), 'PROCESSORT' => $l->g(54).": ".$l->g(350), 'PROCESSORS' => $l->g(54).": ".$l->g(569), 'PROCESSORN' => $l->g(54).": ".$l->g(351), 'MEMORY' => $l->g(568), 'SWAP' => $l->g(50), 'IPADDR' => $l->g(82).": ".$l->g(34), 'DNS' => $l->g(82).": DNS", 'DEFAULTGATEWAY' => 'DEFAULTGATEWAY', 'ETIME' => 'ETIME', 'LASTDATE' => "OCS: ".$l->g(46), 'LASTCOME' => "OCS: ".$l->g(352), 'QUALITY' => "OCS: ".$l->g(353), 'FIDELITY' => "OCS: ".$l->g(354), 'USERID' => $l->g(243).": ".$l->g(24) , 'TYPE' => $l->g(66), 'DESCRIPTION' => $l->g(25).": ".$l->g(53), 'WINCOMPANY' => $l->g(355), 'WINOWNER' => $l->g(356), 'WINPRODID' => $l->g(111), 'WINPRODKEY' => $l->g(553), 'USERAGENT' => "OCS: ".$l->g(357), 'CHECKSUM' => 'CHECKSUM', 'SSTATE' => 'SSTATE', 'IPSRC' => 'IPSRC', 'UUID' => 'UUID'); $default_column['HARDWARE']=array('NAME','WORKGROUP','OSNAME','USERID','MEMORY','LASTDATE','LASTCOME'); //bios $lbl_column['BIOS'] = array('HARDWARE_ID' => $l->g(949), 'SMANUFACTURER' =>$l->g(273).": ".$l->g(64), 'SMODEL' => $l->g(273).": ".$l->g(284), 'SSN' => $l->g(273).": ".$l->g(36), 'TYPE' => $l->g(273).": ".$l->g(66), 'BMANUFACTURER' =>$l->g(273).": ".$l->g(284), 'BVERSION' => $l->g(273).": ".$l->g(209), 'BDATE' => $l->g(273).": ".$l->g(210) , 'ASSETTAG' => $l->g(273).": ".$l->g(216)); $default_column['BIOS'] = array('SMANUFACTURER','SSN','BMANUFACTURER'); //controllers $lbl_column['CONTROLLERS'] = array('HARDWARE_ID' => $l->g(949), 'MANUFACTURER' => $l->g(64), 'NAME' => $l->g(49), 'CAPTION' => 'Caption', 'DESCRIPTION' => $l->g(53), 'VERSION' => $l->g(277), 'TYPE' => $l->g(66)); $default_column['CONTROLLERS'] = array('MANUFACTURER','NAME','DESCRIPTION'); //drives $lbl_column['DRIVES'] = array('LETTER' => $l->g(85), 'TYPE' => $l->g(66), 'FILESYSTEM' => $l->g(86), 'TOTAL' => $l->g(87)." (MB)", 'FREE' => $l->g(88)." (MB)", 'NUMFILES' => 'NUMFILES', 'VOLUMN' => $l->g(70), 'CREATEDATE'=> 'CREATEDATE'); $default_column['DRIVES'] = array('LETTER','TOTAL','FREE','VOLUMN'); //inputs $lbl_column['INPUTS'] = array('HARDWARE_ID' => $l->g(949), 'TYPE' => $l->g(66), 'MANUFACTURER' => $l->g(64), 'CAPTION' => $l->g(80), 'DESCRIPTION' => $l->g(53), 'INTERFACE' => $l->g(84), 'POINTTYPE' => 'POINTTYPE'); $lbl_column['MEMORIES'] = array('HARDWARE_ID' => $l->g(949), 'CAPTION' => $l->g(80), 'DESCRIPTION' => $l->g(53), 'CAPACITY' => $l->g(83)." (MB)", 'PURPOSE' => $l->g(283), 'TYPE' => $l->g(66), 'SPEED' => $l->g(268), 'NUMSLOTS' => $l->g(94), 'SERIALNUMBER' => $l->g(36)); $lbl_column['MODEMS'] = array('HARDWARE_ID' => $l->g(949), 'NAME' => $l->g(49), 'MODEL' => $l->g(65), 'DESCRIPTION' => $l->g(53), 'TYPE' => $l->g(66)); $lbl_column['MONITORS'] = array('HARDWARE_ID' => $l->g(949), 'MANUFACTURER' => $l->g(64), 'CAPTION' => $l->g(80), 'DESCRIPTION' => $l->g(360), 'TYPE' => $l->g(66), 'SERIAL' => $l->g(36)); $lbl_column['NETWORKS']= array('HARDWARE_ID' => $l->g(949), 'DESCRIPTION' => $l->g(53), 'TYPE' => $l->g(66), 'TYPEMIB' => 'TYPEMIB', 'SPEED' => $l->g(268), 'MACADDR' => $l->g(95), 'STATUS' => $l->g(81), 'IPADDRESS' => $l->g(34), 'IPMASK' => $l->g(208), 'IPGATEWAY' => $l->g(207), 'IPSUBNET' => $l->g(331), 'IPDHCP' => $l->g(281), 'VIRTUALDEV' => 'VIRTUALDEV'); $lbl_column['PORTS'] = array('HARDWARE_ID' => $l->g(949), 'TYPE' => $l->g(66), 'NAME' => $l->g(49), 'CAPTION' => $l->g(84), 'DESCRIPTION' => $l->g(53)); $lbl_column['PRINTERS'] = array('HARDWARE_ID' => $l->g(949), 'NAME' => $l->g(49), 'DRIVER' => $l->g(278), 'PORT' => $l->g(279), 'DESCRIPTION' => $l->g(53)); $lbl_column['REGISTRY'] = array('HARDWARE_ID' => $l->g(949), 'NAME' => $l->g(212), 'REGVALUE' => $l->g(213)); $lbl_column['SLOTS'] = array('HARDWARE_ID' => $l->g(949), 'NAME' => $l->g(49), 'DESCRIPTION' => $l->g(53), 'DESIGNATION' => $l->g(70), 'PURPOSE' => 'PURPOSE', 'STATUS' => $l->g(81), 'PSHARE' => 'PSHARE'); $lbl_column['SOUNDS'] = array('HARDWARE_ID' => $l->g(949), 'MANUFACTURER' => $l->g(64), 'NAME' => $l->g(49), 'DESCRIPTION' => $l->g(53)); $lbl_column['STORAGES'] = array('HARDWARE_ID' => $l->g(949), 'MANUFACTURER' => $l->g(64), 'NAME' => $l->g(49), 'MODEL' => $l->g(65), 'DESCRIPTION' => $l->g(53), 'TYPE' => $l->g(66), 'DISKSIZE' => $l->g(67)." (MB)", 'SERIALNUMBER' => $l->g(36), 'FIRMWARE' => 'FIRMWARE'); $lbl_column['VIDEOS'] = array('HARDWARE_ID' => $l->g(949), 'NAME' => $l->g(49), 'CHIPSET' => $l->g(276), 'MEMORY' => $l->g(26)." (MB)", 'RESOLUTION' => $l->g(62)); $lbl_column['VIRTUALMACHINES'] = array('HARDWARE_ID' => $l->g(949), 'NAME' => $l->g(49), 'STATUS' => $l->g(81), 'SUBSYSTEM' => 'SUBSYSTEM', 'VMTYPE' => 'VMTYPE', 'UUID' => 'UUID', 'VCPU' => 'VCPU', 'MEMORY' => 'MEMORY'); $lbl_column['SNMP_CARDS'] = array( 'SNMP_ID' => 'SNMP_ID', 'DESCRIPTION' => $l->g(53), 'REFERENCE' => $l->g(1235), 'FIRMWARE' => $l->g(1229), 'SOFTWARE' => $l->g(20), 'REVISION' => $l->g(277), 'SERIALNUMBER' => $l->g(36), 'MANUFACTURER' => $l->g(64), 'TYPE' => $l->g(66)); ?>ocsinventory-server-2.2+dfsg/ocsreports/require/menu/000077500000000000000000000000001303466605000231705ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/menu/ComputerMenuRenderer.php000077500000000000000000000016271303466605000300240ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class ComputerMenuRenderer extends MenuRenderer { private $computer_id; private $urls; public function __construct($computer_id, $urls) { parent::__construct(); $this->computer_id = $computer_id; $this->urls = $urls; } protected function getUrl(MenuElem $menu_elem) { return "?".PAG_INDEX."=".$this->urls->getUrl('ms_computer')."&head=1&systemid=".$this->computer_id."&".$menu_elem->getUrl(); } protected function getLabel(MenuElem $menu_elem) { $label = $this->translateLabel($menu_elem->getLabel()); if ($menu_elem->hasChildren() and $level == 0) { $label .= ' '; } return $label; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/menu/MainMenuRenderer.php000077500000000000000000000013241303466605000271040ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class MainMenuRenderer extends MenuRenderer { private $profile; private $urls; public function __construct($profile, $urls) { parent::__construct(); $this->profile = $profile; $this->urls = $urls; } protected function canSeeElem(MenuElem $menu_elem) { return $menu_elem->hasChildren() or $this->profile->hasPage($menu_elem->getUrl()); } protected function getUrl(MenuElem $menu_elem) { return "?".PAG_INDEX."=".$this->urls->getUrl($menu_elem->getUrl()); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/menu/Menu.php000077500000000000000000000106631303466605000246160ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://factorfx.com * */ /** * Menu class * * The class generate the menu * * @category Cat * @package MyPackage * @author Cédric * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://factorfx.com * */ class Menu { private $_children; private $_priority; /** * Constructor * * @param array $_children An array of MenuElem * @param number $_priority The priority of this element to sort */ public function __construct(array $_children = array(), $_priority = 0) { $this->_children = $_children; $this->_priority = $_priority; } /** * Sort the Menu * * @return number */ public function sortMenu() { foreach ($this->getChildren() as $index => $menu) { if ($menu->hasChildren()) { $menu->sortMenu(); } } uasort( $this->_children, function($a, $b) { if ($a->getPriority() == $b->getPriority()) { return 0; } return ($a->getPriority() < $b->getPriority()) ? -1 : 1; } ); } /** * Get the MenuElem children * * @return Ambigous */ public function getChildren() { return $this->_children; } /** * Set the MenuElem children * * @param MenuElem $_children Children for this MenuElem * * @return MenuElem */ public function setChildren(array $_children) { $this->_children = $_children; return $this; } /** * Get the MenuElem by an index * * @param string $index The index of the MenuElem * * @return array An array of the childrens */ public function getElem($index) { return $this->_children[$index]; } /** * Check if this MenuElem has childrens * * @return boolean */ public function hasChildren() { return ! empty($this->_children); } /** * Get the priority of this MenuElem * * @return number Priority */ public function getPriority() { return $this->_priority; } /** * Set the priority of this MenuElem * * @param number $_priority The priority of this MenuElem * * @return MenuElem */ public function setPriority($_priority) { $this->_priority = $_priority; return $this; } /** * Find MenuElem by its index * * @param string $elem_index The index we searching for * * @return The MenuElem if function find it */ public function findElemByIndex($elem_index) { foreach ($this->getChildren() as $index => $menu) { if ($index == $elem_index) { return $menu; } else { $res = $menu->findElemByIndex($elem_index); if ($res) { return $res; } } } } /** * Delete a MenuElem * * @param string $elem_index The index of MenuElem to delete * * @return Menu */ public function delElem($elem_index) { unset($this->_children[$elem_index]); return $this; } /** * Replace the MenuElem by this pass in parameter if it exists * * @param string $elem_index The index of MenuElem to replace * @param MenuElem $menuElem The new MenuElem * * @return Menu */ public function replaceElem($elem_index, MenuElem $menuElem) { if (isset($this->_children[$elem_index])) { $this->_children[$elem_index] = $menuElem; } return $this; } /** * Add a MenuElem * * @param string $index Index name for the MenuElem we want to add * @param MenuElem $menuElem MenuEleme to add * * @return MenuElem Return the current MenuElem */ public function addElem($index, MenuElem $menuElem) { $this->_children[$index] = $menuElem; return $this; } } ocsinventory-server-2.2+dfsg/ocsreports/require/menu/MenuElem.php000077500000000000000000000035171303466605000254210ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://factorfx.com * */ /** * MenuElem class * * The class generate one menu element * * @category Cat * @package MyPackage * @author Cédric * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://factorfx.com * */ class MenuElem extends Menu { private $_label; private $_url; /** * The constructor * * @param string $label Label * @param string $url Url * @param array $_children Children * @param number $_priority The priority of the MenuElem */ public function __construct($label, $url , array $_children = array(), $_priority = 0) { $this->_label = $label; $this->_url = $url; parent::__construct($_children, $_priority); } /** * Get the MenuElem label * * @return string $this->label */ public function getLabel() { return $this->_label; } /** * Set the MenuElem label * * @param string $_label MenuElem label * * @return MenuElem */ public function setLabel($_label) { $this->_label = $_label; return $this; } /** * Get MenuElem url * * @return string $this->_url */ public function getUrl() { return $this->_url; } /** * Set MenuElem url * * @param string $_url MenuElem url * * @return MenuElem */ public function setUrl($_url) { $this->_url = $_url; return $this; } }ocsinventory-server-2.2+dfsg/ocsreports/require/menu/MenuRenderer.php000077500000000000000000000114301303466605000262760ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://factorfx.com * */ class MenuRenderer { private $active_link; private $parent_elem_clickable; public function __construct() { $this->active_link = null; $this->parent_elem_clickable = false; } public function render(Menu $menu) { $html = ''; return $html; } /** * Render a MenuElem with html tag * * @param MenuElem $menu_elem The MenuElem to convert * @param integer $level The level * * @return string The html tag code */ public function renderElem(MenuElem $menu_elem, $level = 0) { // Hook to check if the elem must be displayed or not if (!$this->canSeeElem($menu_elem)) { return ''; } if ($this->isParentElemClickable() or !$menu_elem->hasChildren()) { $href = $this->getUrl($menu_elem); } else { $href = "#"; } $label = $this->getLabel($menu_elem); $attrs = $this->buildAttrs($menu_elem); $html = "
    • "; $html .= "$label $caret"; if ($menu_elem->hasChildren()) { $children_html = ''; foreach ($menu_elem->getChildren() as $child_elem) { $children_html .= $this->renderElem($child_elem, $level + 1); } // Hide menu elem if none of its children could be displayed if (empty($children_html)) { return ''; } $html .= ''; } $html .= '
    • '; return $html; } public function getActiveLink() { return $this->active_link; } public function setActiveLink($active_link) { $this->active_link = $active_link; } public function isParentElemClickable() { return $this->parent_elem_clickable; } public function setParentElemClickable($parent_elem_clickable) { $this->parent_elem_clickable = $parent_elem_clickable; } protected function canSeeElem(MenuElem $menu_elem) { return true; } protected function getUrl(MenuElem $menu_elem) { return $menu_elem->getUrl(); } protected function getLabel(MenuElem $menu_elem) { $label = $this->translateLabel($menu_elem->getLabel()); if ($menu_elem->hasChildren() and $level == 0) { $label .= ' '; } return $label; } protected function buildAttrs(MenuElem $menu_elem) { $attr_li = $attr_a = array(); if ($menu_elem->hasChildren()) { if ($level > 0) { $attr_li['class'][] = 'dropdown-submenu'; if (!$this->isParentElemClickable()) { $attr_a['class'][] = 'dropdown-toggle'; } else { $attr_a['class'][] = 'dropdown-submenu-toggle'; } } else { $attr_li['class'][] = 'dropdown'; } $attr_a['data-toggle'][] = 'dropdown'; } if ($this->getActiveLink() and $this->getActiveLink() == $menu_elem->getUrl()) { $attr_li['class'][] = 'active'; } else if ($menu_elem->getLabel() == 'divider' && $menu_elem->getUrl() == 'divider') { $attr_li['class'] = 'divider'; } $attr_string_li = $this->attrToString($attr_li); $attr_string_a = $this->attrToString($attr_a); return array( 'li' => $attr_string_li, 'a' => $attr_string_a ); } /** * Convert array tag attributes to string * * @param array $attr Array of attribute * * @return string Conversion of attribute array to string */ protected function attrToString(array $attr) { $html = ''; foreach ($attr as $name => $value) { if (is_array($value)) { $val = implode(' ', $value); } else { $val = $value; } $html .= "$name='" . $val . "' "; } return $html; } protected function translateLabel($label) { global $l; if (substr($label,0,2) == 'g(') $label= ucfirst($l->g(substr(substr($label,2),0,-1))); return strip_tags_array($label); } } ocsinventory-server-2.2+dfsg/ocsreports/require/menu/TxtMenuSerializer.php000077500000000000000000000031551303466605000273460ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class TxtMenuSerializer { public function serialize(Menu $menu) { throw new Exception('Cannot serialize OCS 2.2 menus to old (pre 2.2) txt files'); } public function unserialize($config) { if (!is_array($config)) { return false; } if (isset($config['ORDER'])) { $order = $config['ORDER']; } else { $order = array_merge($config['ORDER_FIRST_TABLE'], $config['ORDER_SECOND_TABLE']); } // Build menu $menu = new Menu(); foreach ($order as $config_elem) { $url = $config_elem; if (isset($config['MENU_NAME'][$config_elem])) { $lbl_index = $config['MENU_TITLE'][$config_elem]; if (is_null($lbl_index)) { $lbl = $config_elem; } else { $lbl = $lbl_index; } $menu->addElem($config_elem, new MenuElem($lbl, $url)); // Element has children foreach ($config['MENU'] as $page_name => $menu_name) { if ($menu_name == $config_elem) { $url = $page_name; $lbl = $config['LBL'][$page_name]; $menu->getElem($config_elem)->addElem($page_name, new MenuElem($lbl, $url)); } } } else { // No children $lbl_index = $config['LBL'][$config_elem]; if (is_null($lbl_index)) { $lbl = $config_elem; } else { $lbl = $lbl_index; } $menu->addElem($config_elem, new MenuElem($lbl, $url)); } } return $menu; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/menu/XMLMenuSerializer.php000077500000000000000000000044411303466605000272260ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class XMLMenuSerializer { public function serialize(Menu $menu) { $doc_xml = new DOMDocument('1.0', 'UTF-8'); $menu_xml = $doc_xml->createElement('menu'); $doc_xml->appendChild($menu_xml); foreach ($menu->getChildren() as $id => $menu_elem) { $this->serializeElem($doc_xml, $menu_xml, $id, $menu_elem); } $doc_xml->preserveWhiteSpace = false; $doc_xml->formatOutput = true; return $doc_xml->saveXML(); } private function serializeElem(DOMDocument $doc_xml, DOMElement $parent_xml, $id, MenuElem $menu_elem) { $menu_elem_xml = $doc_xml->createElement('menu-elem'); $menu_elem_xml->setAttribute('id', $id); $label_xml = $doc_xml->createElement('label', $menu_elem->getLabel()); $url_xml = $doc_xml->createElement('url', $menu_elem->getUrl()); $menu_elem_xml->appendChild($label_xml); $menu_elem_xml->appendChild($url_xml); $menu_children = $menu_elem->getChildren(); if ($menu_children) { $submenu_xml = $doc_xml->createElement('submenu'); $menu_elem_xml->appendChild($submenu_xml); foreach ($menu_children as $child_id => $child_elem) { $this->serializeElem($doc_xml, $submenu_xml, $child_id, $child_elem); } } $parent_xml->appendChild($menu_elem_xml); } public function unserialize($xml) { $menu_xml = simplexml_load_string($xml); $menu = new Menu(); foreach ($menu_xml->{'menu-elem'} as $menu_elem_xml) { $menu_elem_id = (string) $menu_elem_xml['id']; $menu_elem = $this->unserializeElem($menu_elem_xml); $menu->addElem($menu_elem_id, $menu_elem); } return $menu; } private function unserializeElem($menu_elem_xml) { $label = (string) $menu_elem_xml->label; $url = (string) $menu_elem_xml->url; $submenu_xml = $menu_elem_xml->submenu->{'menu-elem'}; $menu_elem = new MenuElem($label, $url); if ($submenu_xml) { foreach ($submenu_xml as $sub_elem_xml) { $sub_id = (string) $sub_elem_xml['id']; $sub_elem = $this->unserializeElem($sub_elem_xml); $menu_elem->addElem($sub_id, $sub_elem); } } return $menu_elem; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/menu/include.php000077500000000000000000000017251303466605000253340ustar00rootroot00000000000000unserialize($config); $xml = $xml_serializer->serialize($menu); file_put_contents($filename, $xml); } function show_menu() { if (!file_exists(DOCUMENT_REAL_ROOT.'/config/main_menu.xml')) { migrate_config_2_2(); } // Build menu $profile = $_SESSION['OCS']['profile']; $urls = $_SESSION['OCS']['url_service']; $menu_serializer = new XMLMenuSerializer(); $menu = $menu_serializer->unserialize(file_get_contents('config/main_menu.xml')); $renderer = new MainMenuRenderer($profile, $urls); echo $renderer->render($menu); } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/plugin/000077500000000000000000000000001303466605000235225ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/plugin/ComputerPlugin.php000077500000000000000000000026151303466605000272170ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class ComputerPlugin { private $id; private $system; private $label; private $category; private $available; private $hideFrame; public function __construct($id, $system, $label) { $this->id = $id; $this->system = $system; $this->label = $label; $this->category = 'other'; $this->available = null; $this->hideFrame = false; } public function getId() { return $this->id; } public function setId($id) { $this->id = $id; } public function isSystem() { return $this->system; } public function setSystem($system) { $this->system = $system; } public function getLabel() { return $this->label; } public function setLabel($label) { $this->label = $label; } public function getCategory() { return $this->category; } public function setCategory($category) { $this->category = $category; } public function getAvailable() { return $this->available; } public function setAvailable($available) { $this->available = $available; } public function getHideFrame() { return $this->hideFrame; } public function setHideFrame($hideFrame) { $this->hideFrame = $hideFrame; return $this; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/plugin/XMLPluginsSerializer.php000077500000000000000000000017401303466605000302740ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class XMLPluginsSerializer { public function unserialize($xml) { $plugins_xml = simplexml_load_string($xml); $plugins = array(); foreach ($plugins_xml->plugin as $plugin_xml) { $id = (string) $plugin_xml['id']; $label = (string) $plugin_xml->label; $system = (bool) $plugin_xml->system; $cat = (string) $plugin_xml->category; $available = (string) $plugin_xml->available; $hide_frame = (string) $plugin_xml->hide_frame; $plugin = new ComputerPlugin($id, $system, $label); if ($cat) $plugin->setCategory($cat); if ($available) $plugin->setAvailable($available); if ($hide_frame) $plugin->setHideFrame($hide_frame); $plugins[$id] = $plugin; } return $plugins; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/plugin/include.php000077500000000000000000000001261303466605000256600ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/table/000077500000000000000000000000001303466605000233135ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/table/Column.php000077500000000000000000000027731303466605000252750ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ abstract class Column { private $label; private $key; private $visible; private $deletable; private $sortable; public function __construct($key,$label,$visible,$deletable,$sortable) { $this->key = $key; $this->label = $label; $this->visible = $visible; $this->deletable = $deletable; $this->sortable = $sortable; } /* * Return the column display content */ public function getLabel(){ return $this->label; } /* * Set the column display content */ public function setLabel($label){ $this->label = $label; } /* * @params ( false || true ) * Set the display options of the column : * visibility : displayed or not * deletable : appears in Hide/Show list * sortable : up and down arrows on the right * */ public function setVisible($visible){ $this->visible = $visible; } public function setDeletable($deletable){ $this->deletable = $deletable; } public function setSortable ($sortable){ $this->sortable = $sortable; } /* * Return the display options of the column */ public function isVisible(){ return $this->visible; } public function isDeletable(){ return $this->deletable ; } public function isSortable (){ return $this->sortable ; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/table/Columns.php000077500000000000000000000052321303466605000254510ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class Columns { private $allcolumns; private $columnscantdel; private $columnscandel; private $columnsvisible; private $columnsspecial; private $defaultcolumns; public function __construct() { $this->allcolumns = array(); $this->columnscantdel = array(); $this->columnscandel = array(); $this->columnsvisible = array(); $this->columnsspecial = array( "CHECK","SUP", "GROUP_NAME", "NULL","MODIF", "SELECT","ZIP", "OTHER","STAT", "ACTIVE","MAC", "MD5_DEVICEID", ); } /* * Return an array containing all implemented columns of the Table */ public function getColumnsSimple() { return $this->allcolumns; } /* * Return an array containing all implemented columns of the Table * sorted by properties * */ public function getColumns() { $columnsreturn = array(); foreach($this->getColumnsVisible() as $visible){ $columnsreturn['visible'][$visible]=$this->allcolumns [$visible]; } foreach($this->getColumnsCantDel() as $cantdel){ $columnsreturn['cantdel'][$cantdel]=$this->allcolumns [$cantdel]; } foreach($this->getColumnsSpecial() as $special){ $columnsreturn['special'][$special]=$this->allcolumns [$special]; } } /* * Get the displayed column with the key corresponding to $key * */ public function getColumn($key){ if(array_key_exists($key, $this->allcolumns)){ return $this->allcolumns[$key]; }else{ return false; } } /* * Add a column, returning it afterwards */ public function addColumn($key,$label,$visible,$deletable,$sortable){ $column = $this->getColumn($key); if (!$column){ $this->allcolumns[$key]=new Column($key,$label,$visible,$deletable,$sortable); if ($visible){ $this->columnsvisible[]=$key; } if ($cantdel){ $this->columnscantdel[]=$key; } return $this->allcolumns[$key]; }else{ return $column; } } /* * Set visibility false for the column */ public function hideColumn($key) { if ($column){ if(in_array($key, $this->columnsvisible)){ unset($this->columnsvisible[$key]); } $column->setVisible(false); }else{ return false; } } /* * Set visibility true for the column */ public function showColumn($key) { $column = $this->getColumn($key); if ($column){ if(!in_array($key, $this->columnsvisible)){ $this->columnsvisible[]=$key; } $column->setVisible(true); }else{ return false; } } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/table/Table.php000077500000000000000000000210131303466605000250530ustar00rootroot00000000000000 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License, version 2 * @link http://www.ocsinventory-ng.org/ * */ class Table { private $columns; private $params; public function __construct() { include("Columns.php"); $this->columns = new Columns(); } public function getColumns(){ $allcolumns = $this->getColumns(); $columnsreturn; } /* * Called by ajax_tab_entetefixe */ public function createTable($tablename,$formid){ $this->generateJavascript($tablename,$formid); } /* * Generate javascript code for the table */ private function generateJavascript($tablename,$formid){ global $protectedGet,$protectedPost,$l,$pages_refs; $tableid = "table#$tablename"; print_r($protectedGet); print_r($protectedPost) ?> params = $params; } public function getParams(){ return $this->params; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/000077500000000000000000000000001303466605000234765ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/tables/ActionsColumn.php000077500000000000000000000021241303466605000267670ustar00rootroot00000000000000g(1381), array( 'required' => true, 'sortable' => false, 'searchable' => false, 'formatter' => function($record, $col) use ($actions, $idProperty) { // If record is an object, try to call $record->getId(), then $record->id if (is_object($record)) { $func = $this->camelize('get_'.$idProperty); if (is_callable(array($record, $func))) { $id = call_user_func(array($record, $func)); } else { $id = $record->$idProperty; } } else { // Else record is an array, simply access the wanted property $id = $record[$idProperty]; } $id = htmlspecialchars($id); $actionHtml = ''; foreach ($actions as $url => $class) { $actionHtml .= '' .'' .''; } return $actionHtml; } )); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/CheckboxColumn.php000077500000000000000000000017141303466605000271210ustar00rootroot00000000000000', array( 'required' => true, 'sortable' => false, 'searchable' => false, 'formatter' => function($record, $col) use ($idProperty) { // If record is an object, try to call $record->getId(), then $record->id if (is_object($record)) { $func = $this->camelize('get_'.$idProperty); if (is_callable(array($record, $func))) { $id = call_user_func(array($record, $func)); } else { $id = $record->$idProperty; } } else { // Else record is an array, simply access the wanted property $id = $record[$idProperty]; } $id = htmlspecialchars($id); return ''; } )); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/Column.php000077500000000000000000000046021303466605000254510ustar00rootroot00000000000000 false, 'sortable' => true, 'searchable' => true, 'formatter' => null ), $options); $this->name = $name; $this->label = $label; $this->required = $options['required']; $this->sortable = $options['sortable']; $this->searchable = $options['searchable']; $this->formatter = $options['formatter']; } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; return $this; } public function getLabel() { return $this->label; } public function setLabel($label) { $this->label = $label; return $this; } public function isRequired() { return $this->required; } public function setRequired($required) { $this->required = $required; return $this; } public function isSortable() { return $this->sortable; } public function setSortable($sortable) { $this->sortable = $sortable; return $this; } public function isSearchable() { return $this->searchable; } public function setSearchable($searchable) { $this->searchable = $searchable; return $this; } public function getFormatter() { return $this->formatter; } public function setFormatter($formatter) { $this->formatter = $formatter; return $this; } public function format($record) { if (is_callable($this->formatter)) { return call_user_func($this->formatter, $record, $this); } else { // If record is an object, try to call $record->getXxx(), then $record->xxx if (is_object($record)) { $func = $this->camelize('get_'.$this->name); if (is_callable(array($record, $func))) { $value = call_user_func(array($record, $func)); } else { $value = $record->{$this->name}; } } else { // Else record is an array, simply access the wanted property $value = $record[$this->name]; } $value = htmlspecialchars($value); if ($this->formatter and is_string($this->formatter)) { return sprintf($this->formatter, $value); } else { return $value; } } } protected function camelize($str) { return preg_replace_callback('/(^|_)([a-z])/', function($match) { return strtoupper($match[2]); }, $str); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/LinkColumn.php000077500000000000000000000026141303466605000262700ustar00rootroot00000000000000url = $url; $this->idProperty = $options['idProperty'] ?: 'id'; parent::__construct($name, $label, $options); } public function formatLink($record) { // If record is an object, try to call $record->getId(), then $record->id if (is_object($record)) { $func = $this->camelize('get_'.$this->idProperty); if (is_callable(array($record, $func))) { $id = call_user_func(array($record, $func)); } else { $id = $record->{$this->idProperty}; } } else { // Else record is an array, simply access the wanted property $id = $record[$this->idProperty]; } // If record is an object, try to call $record->getXxx(), then $record->xxx if (is_object($record)) { $func = $this->camelize('get_'.$this->getName()); if (is_callable(array($record, $func))) { $value = call_user_func(array($record, $func)); } else { $value = $record->{$col->getName()}; } } else { // Else record is an array, simply access the wanted property $value = $record[$col->getName()]; } $id = htmlspecialchars($id); $value = htmlspecialchars($value); return ''.$value.''; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/Table.php000077500000000000000000000010551303466605000252420ustar00rootroot00000000000000name = $name; $this->columns = array(); } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function addColumn(Column $col) { $this->columns[$col->getName()] = $col; return $this; } public function getColumns() { return $this->columns; } public function getColumn($name) { return $this->columns[$name]; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/TableRenderer.php000077500000000000000000000047121303466605000267340ustar00rootroot00000000000000 array( 'offset' => 0, 'limit' => -1 ), 'visible' => array() ), $options); $this->includeJS(); $this->callJS($table, $options); } private function includeJS() { global $l; if (!self::$jsIncluded) { $lang = array( "sEmptyTable" => $l->g(1334), "sInfo" => $l->g(1335), "sInfoEmpty" => $l->g(1336), "sInfoFiltered" => $l->g(1337), "sInfoPostFix" => "", "sInfoThousands" => $l->g(1350), "decimal" => $l->g(1351), "sLengthMenu" => $l->g(1338), "sLoadingRecords" => $l->g(1339), "sProcessing" => $l->g(1340), "sSearch" => $l->g(1341), "sZeroRecords" => $l->g(1342), "oPaginate" => array( "sFirst" => $l->g(1343), "sLast" => $l->g(1344), "sNext" => $l->g(1345), "sPrevious" => $l->g(1346), ), "oAria" => array( "sSortAscending" => ": ".$l->g(1347), "sSortDescending" => ": ".$l->g(1348), ) ); echo ''; self::$jsIncluded = true; } } private function callJS($table, $options) { global $protectedPost; $tableName = json_encode(htmlspecialchars($table->getName())); $csrfNumber = json_encode(htmlspecialchars($_SESSION['OCS']['CSRFNUMBER'])); $url = isset($_SERVER['QUERY_STRING']) ? "ajax.php?".$_SERVER['QUERY_STRING'] : ""; $url = json_encode($url.'&no_header=true&no_footer=true'); $postData = json_encode($protectedPost); $columns = json_encode($this->showColumns($table, $options)); require 'require/tables/table.html.php'; } private function showColumns($table, $options) { $columns = array(); foreach ($table->getColumns() as $name => $col) { $columns []= $this->showColumn($name, $col, $options); } return $columns; } public function showColumn($name, $col, $options) { $visible = $col->isRequired() || in_array($name, $options['visible']); $sortable = $col->isSortable(); $searchable = $col->isSearchable(); return array( 'data' => $name, 'class' => 'column-'.$name, 'name' => $name, 'defaultContent' => ' ', 'orderable' => $sortable, 'searchable' => $searchable, 'visible' => $visible ); } } ?>ocsinventory-server-2.2+dfsg/ocsreports/require/tables/table.html.php000077500000000000000000000024731303466605000262520ustar00rootroot00000000000000
      getColumns() as $name => $col) { echo ""; } ?>
      ".$col->getLabel()."
      ocsinventory-server-2.2+dfsg/ocsreports/require/tables/tables.js000077500000000000000000000105731303466605000253170ustar00rootroot00000000000000var tables = { handleError: function(xhr, error, thrown) { if (xhr.status == 401) { window.location.reload(); } }, handleData: function($table, csrfNumber, csrfToken, postData, data) { var $checkAll = $('#'+$table.attr('id')+'_wrapper .check-all'), visible = []; if ($table.width() < $(window).width()) { $(".dataTables_scrollHeadInner, .dataTables_scrollHeadInner > table").add($table).width('100%'); } data['CSRF_'+csrfNumber] = csrfToken; $checkAll.prop('checked', false).trigger('change'); $.each(data.columns, function(i, col) { if ($table.DataTable().column('.'+col.data).visible()) { visible.push(i); } }); return $.extend(data, postData, { visible_col: visible, ocs: [$table.serialize()] }); }, handleDataSrc: function(tableName, json) { $(".reset-"+tableName).toggle(json.customized); if (json.debug) { $("

      "+json.debug+"


      ").hide().prependTo('#'+tableName+'_debug div').fadeIn(1000); $(".datatable_request").show(); } return json.data; }, addMarkup: function(tableName) { $("", {id: tableName+"_settings_toggle", 'class': 'glyphicon glyphicon-chevron-down table_settings_toggle'}).hide().appendTo("#"+tableName+"_filter label"); $("#"+tableName+"_settings").hide(); $("."+tableName+"_top_settings").contents().appendTo("#"+tableName+"_settings"); $("#"+tableName+"_settings").addClass('table_settings'); }, checkAll: function($table, checked) { if (typeof(checked) === 'undefined') checked = true; $table.find('.check-row').prop('checked', checked); }, showTable: function(tableName, csrfNumber, url, postData, columns) { $(document).ready(function() { var $table = $('#'+tableName), csrfToken = $('#CSRF_'+csrfNumber).val(), dom = '<<"row"lf <"dataTables_processing" r>><"#'+tableName+'_settings" >t<"row" <"col-md-2" i><"col-md-10" p>>>'; $table.dataTable({ processing: true, serverSide: true, dom: dom, ajax: { url: url, type: "POST", error: tables.handleError, data: function(data) { return tables.handleData($table, csrfNumber, csrfToken, postData, data); }, dataSrc: function(json) { return tables.handleDataSrc(tableName, json); } }, columns: columns, language: tables.language, // tables.language is set dynamically in php, see TableRenderer.php scrollX: true }); tables.addMarkup(tableName); // Handle show/hide column $("body").on("click", "#select_col"+tableName, function() { var col = "."+$(this).val(); $table.DataTable().column(col).visible(!($table.DataTable().column(col).visible())); $table.DataTable().ajax.reload(); }); $("body").on("click", "#"+tableName+"_settings_toggle", function(){ $(this).toggleClass("glyphicon-chevron-up").toggleClass("glyphicon-chevron-down"); $("#"+tableName+"_settings").fadeToggle(); }); $('#'+tableName+'_wrapper .check-all').change(function() { tables.checkAll($table, this.checked); }); }); } }; /* var statusErrorMap = { '400' : g(1352))) ?>, '401' : g(1353))) ?>, '403' : g(1354))) ?>, '404' : g(1355))) ?>, '414' : g(1356))) ?>, '500' : g(1357))) ?>, '503' : g(1358))) ?> }; $(document).ready(function() { $("#"+tableName+"_settings_toggle").show(); $table.on( 'draw.dt', function () { var start = $table.DataTable().page.info().start +1 ; var end = $table.DataTable().page.info().end; var total = $table.DataTable().page.info().recordsDisplay; //Show one line only if results fit in one page if (total == 0){ $('#'+tableName+'_csv_download').hide(); $("#"+tableName+"_settings_toggle").hide(); } else{ if (end != total || start != 1){ $('#'+tableName+'_csv_page').show(); $('#infopage_'+tableName).text(start+"-"+end); } else{ $('#'+tableName+'_csv_page').hide(); } $('#infototal_'+tableName).text(total); $('#'+tableName+'_csv_download').show(); $("#"+tableName+"_settings_toggle").show(); } }); });*/ocsinventory-server-2.2+dfsg/ocsreports/require/views/000077500000000000000000000000001303466605000233615ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/require/views/forms.php000077500000000000000000000112501303466605000252220ustar00rootroot00000000000000'; echo '
        '; foreach ($errors[$id] as $err) { echo '
      • '.htmlspecialchars($err).'
      • '; } echo '
      '; } else { echo '
      '; } if (isset($data[$name]) and $data[$name]) { $options['value'] = $data[$name]; } if ($label) { show_form_label($name, $label.' :'); } switch ($type) { case 'input': show_form_input($name, $options); break; case 'textarea': show_form_textarea($name, $options); break; case 'select': show_form_select($name, $options); break; } echo '
      '; } function show_form_label($name, $label, $options = array()) { $options = array_merge(array( 'attrs' => array() ), $options); $attrs = array_merge(array( 'for' => str_replace(array('[', ']'), '_', $name) ), $options['attrs']); echo ''; } function show_form_input($name, $options = array()) { $options = array_merge(array( 'value' => null, 'type' => 'text', 'attrs' => array() ), $options); $attrs = array_merge(array( 'type' => $options['type'], 'name' => $name, 'id' => str_replace(array('[', ']'), '_', $name) ), $options['attrs']); if ($options['type'] == 'checkbox' and $options['value'] == 'on') { $attrs['checked'] = 'checked'; } else if ($options['value']) { $attrs['value'] = $options['value']; } echo ''; } function show_form_textarea($name, $options = array()) { $options = array_merge(array( 'value' => null, 'attrs' => array() ), $options); $attrs = array_merge(array( 'name' => $name, 'id' => str_replace(array('[', ']'), '_', $name) ), $options['attrs']); echo ''; } function show_form_select($name, $options = array()) { $options = array_merge(array( 'type' => 'select', 'value' => null, 'options' => array(), 'attrs' => array(), 'newline' => false ), $options); $attrs = array_merge(array( 'name' => $name, 'id' => str_replace(array('[', ']'), '_', $name) ), $options['attrs']); if ($options['type'] == 'select') { echo ''; } else if ($options['type'] == 'radio') { echo '
      '; } } function show_form_submit($name, $label) { echo ''; } function attrs_to_html($attrs) { $html_attrs = array(); foreach ($attrs as $key => $val) { if (is_array($val)) { $html_attrs []= htmlspecialchars($key).'="'.htmlspecialchars(implode(' ', $val)).'"'; } else { $html_attrs []= htmlspecialchars($key).'="'.htmlspecialchars($val).'"'; } } return implode(' ', $html_attrs); } ?>ocsinventory-server-2.2+dfsg/ocsreports/tools/000077500000000000000000000000001303466605000217105ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/tools/recompose_paquet.php000077500000000000000000000050431303466605000260010ustar00rootroot00000000000000".$f."
      "; }else{ if ($f == "info"){ //récupération du fichier info $filename = $rep.'/'.$f; $handle = fopen ($filename, "r"); $info = fread ($handle, filesize ($filename)); fclose ($handle); //surpression des balises $info=substr($info, 1); $info=substr($info,0, -1); //récupration par catégories du fichier $info_traite=explode(" ",$info); //récupération du nom du fichier $name=$info_traite[10]; if (substr($name,0,4) != 'NAME'){ "PROBLEME AVEC LE NOM DU FICHIER
      "; $valid='KO'; } if (substr($info_traite[6],0,5) != 'FRAGS'){ "PROBLEME AVEC LE NOMBRE DE FRAGMENT
      "; $valid='KO'; } $name=substr($name,6); $name=substr($name,0, -1); $name=str_replace(".", "_", $name).".zip"; //récupération du nombre de fragments $nb_frag=$info_traite[6]; $nb_frag=substr($nb_frag,7); $nb_frag=substr($nb_frag,0,-1); } } } closedir($dir); if ($protectedGet['id_pack'] != '' and $valid == 'OK'){ $temp=""; $i=1; $filename = $rep.'/'.$protectedGet['id_pack']; $handfich_final = fopen( $rep.'/'.$name, "a+b" ); while ($i <= $nb_frag){ echo "Lecture du fichier ".$filename."-".$i." en cours...
      "; $handlefrag = fopen ($filename."-".$i, "r+b"); $temp = fread ($handlefrag, filesize ($filename."-".$i)); fclose ($handlefrag); fwrite( $handfich_final, $temp ); flush(); $i++; } fclose( $handfich_final ); echo "
      FICHIER CREE"; } }else echo "PAGE INDISPONIBLE"; ?> ocsinventory-server-2.2+dfsg/ocsreports/update.php000077500000000000000000000074331303466605000225550ustar00rootroot00000000000000"; $msg_info[]=$l->g(2057); if (GUI_VER < $_SESSION['OCS']['SQL_BASE_VERS']){ msg_info(implode("
      ",$msg_info)); msg_error($l->g(2107)."
      ".$l->g(2108)."
      ".$l->g(2109).":".$version_database."=>".$l->g(2110).":".GUI_VER); echo ""; require_once('require/footer.php'); die(); } $msg_info[]=$l->g(2109).":".$version_database."=>".$l->g(2110).":".GUI_VER; msg_info(implode("
      ",$msg_info)); echo "
      "; if (isset($_POST['update'])){ while ($version_database < GUI_VER){ $version_database++; if (in_array($version_database.".sql", $list_fichier['name'])){ if ( $_SESSION['OCS']['DEBUG'] == 'ON') msg_success("Mise à jour effectuée: ".$version_database.".sql"); exec_fichier_sql($rep_maj.'/'.$version_database.".sql"); $sql="update config set tvalue='%s' where name='GUI_VERSION'"; $arg=$version_database; $res_column=mysql2_query_secure($sql,$_SESSION['OCS']["writeServer"],$arg); $_SESSION['OCS']['SQL_BASE_VERS']=$version_database; } else{ msg_error($l->g(2114)." ".$version_database); die(); } } msg_success($l->g(1121)); echo "


      ".$l->g(2051).""; //Logout after update(s) //Contrib of FranciX (http://forums.ocsinventory-ng.org/viewtopic.php?pid=41923#p41923) if($_SESSION['OCS']['cnx_origine'] == "CAS"){ require_once(PHPCAS); require_once(BACKEND.'require/cas.config.php'); $cas=new phpCas(); $cas->client(CAS_VERSION_2_0,$cas_host,$cas_port,$cas_uri); $cas->logout(); } //end contrib unset($_SESSION['OCS']); unset($_GET); } echo ""; if (isset($_GET['debug'])) unset($_SESSION['OCS']['DEBUG']); require_once('require/footer.php'); /* * function to execute sql file * */ function exec_fichier_sql($fichier){ $db_file=$fichier; $dbf_handle = @fopen($db_file, "r"); if (!$dbf_handle){ msg_error($l->g(2112)." : ".$fichier); return true; }else{ if (filesize($db_file) > 0){ $sql_query = fread($dbf_handle, filesize($db_file)); fclose($dbf_handle); $data_sql=explode(";", $sql_query); foreach ($data_sql as $k=>$v){ if (trim($v) != "") mysql2_query_secure($v,$_SESSION['OCS']["writeServer"]); } return false; } return true; } } ?>ocsinventory-server-2.2+dfsg/ocsreports/upload/000077500000000000000000000000001303466605000220345ustar00rootroot00000000000000ocsinventory-server-2.2+dfsg/ocsreports/upload/README000077500000000000000000000001461303466605000227200ustar00rootroot00000000000000DO NOT TOUCH THIS DIRECROTY This dir is used but the plugin engine to create server side package .... ocsinventory-server-2.2+dfsg/ocsreports/var.php000077500000000000000000000062471303466605000220650ustar00rootroot00000000000000 DO NOT USE IT) define("DEMO_LOGIN",'demo'); // Define demo login for connexion define("DEMO_PASSWD",'demo'); // Define demo password for connexion define("DFT_DB_CMPT",'ocs'); // Define default login to connect to database define("DFT_DB_PSWD",'ocs'); // Define default password to connect to database define("DFT_GUI_CMPT",'admin'); // Define default login to connect to GUI define("DFT_GUI_PSWD",'admin'); // Define default password to connect to GUI define('BACKEND',__DIR__ . '/backend/'); // Define backend Directory define('PHPCAS', __DIR__ . '/libraries/phpcas/CAS.php'); // Path to CAS (change to use system provided library) define('TC_LIB_BARCODE', __DIR__ . '/libraries/tclib/Barcode/autoload.php'); // Path to tc-lib-barcode library, change to use system library define('PASSWORD_COMPAT', __DIR__ . '/libraries/password_compat/password.php'); // Path to tc-lib-barcode library, change to use system library define('PLUGINS_DL_DIR', __DIR__ . '/download/'); define('PLUGINS_SRV_SIDE', __DIR__ . '/upload/'); define('CONFIG_DIR',__DIR__ . '/config/'); define('CD_CONFIG_DIR', CONFIG_DIR."computer/" ); define('PLUGINS_DIR',__DIR__ . '/plugins/'); // Define plugins Directory define('PLUGINS_GUI_DIR','/tmp/'); define('HEADER_HTML',__DIR__ . '/require/html_header.php'); // Define html_header file define('FOOTER_HTML',__DIR__ . '/require/footer.php'); // Define footer file define('MAIN_SECTIONS_DIR',PLUGINS_DIR."main_sections/"); // define('DEV_OPTION',false); // Define DEV Options DO NOT USE define('PC4PAGE',20); // Define result by page MUST in (5,10,15,20,50,100,200,1000000); define('CSRF',1000); // max number of csrf session define('ETC_DIR', DOCUMENT_REAL_ROOT); // Configuration dir define('VARLIB_DIR', DOCUMENT_ROOT); // Data default dir define('VARLOG_DIR', DOCUMENT_ROOT); // Log defaut dir define('CONF_MYSQL', ETC_DIR.'/dbconfig.inc.php'); // Define dbconf file ?> ocsinventory-server-2.2+dfsg/setup.sh000077500000000000000000002164461303466605000200610ustar00rootroot00000000000000#!/bin/sh ################################################################################ # # OCS Inventory NG Management Server Setup # # Copyleft 2006 Didier LIROULET # Web: http://www.ocsinventory-ng.org # # This code is open source and may be copied and modified as long as the source # code is always made freely available. # Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # # Which host run database server DB_SERVER_HOST="localhost" # On which port run database server DB_SERVER_PORT="3306" # Database server credentials DB_SERVER_USER="ocs" DB_SERVER_PWD="ocs" # Where is Apache daemon binary (if empty, will try to find it) APACHE_BIN="" # Where is Apache configuration file (if empty, will try to find it) APACHE_CONFIG_FILE="" # Where is Apache includes configuration directory (if emty, will try to find it) APACHE_CONFIG_DIRECTORY="" # Which user is running Apache web server (if empty, will try to find it) APACHE_USER="" # Which group is running Apache web server (if empty, will try to find it) APACHE_GROUP="" # Where is Apache document root directory (if empty, will try to find it) APACHE_ROOT_DOCUMENT="" # Which version of mod_perl is apache using, 1 for <= 1.999_21 and 2 for >= 1.999_22 (if empty, user will be asked for) APACHE_MOD_PERL_VERSION="" # Where are located OCS Communication server log files OCS_COM_SRV_LOG="/var/log/ocsinventory-server" # Where are located OCS Communication server plugins configuration files OCS_COM_SRV_PLUGINS_CONFIG_DIR="/etc/ocsinventory-server/plugins" # Where are located OCS Communication server plugins perl files OCS_COM_SRV_PLUGINS_PERL_DIR="/etc/ocsinventory-server/perl" # Where is located perl interpreter PERL_BIN=`which perl 2>/dev/null` # Where is located make utility MAKE=`which make 2>/dev/null` # Where is located logrotate configuration directory LOGROTATE_CONF_DIR="/etc/logrotate.d" # Where is located newsyslog.conf NEWSYSLOG_CONF_FILE="/etc/newsyslog.conf" # Where to store setup logs SETUP_LOG=`pwd`/ocs_server_setup.log # Communication Server Apache configuration file COM_SERVER_APACHE_CONF_FILE="ocsinventory-server.conf" # Communication Server logrotate configuration file COM_SERVER_LOGROTATE_CONF_FILE="ocsinventory-server" # Administration Console Apache configuration file ADM_SERVER_APACHE_CONF_FILE="ocsinventory-reports.conf" # Administration console read only files directory ADM_SERVER_STATIC_DIR="/usr/share/ocsinventory-reports" ADM_SERVER_STATIC_REPORTS_DIR="ocsreports" ADM_SERVER_REPORTS_ALIAS="/ocsreports" # Administration console read/write files dir ADM_SERVER_VAR_DIR="/var/lib/ocsinventory-reports" # Administration default packages directory and Apache alias ADM_SERVER_VAR_PACKAGES_DIR="download" ADM_SERVER_PACKAGES_ALIAS="/download" # Administration default snmp directory and Apache alias ADM_SERVER_VAR_SNMP_DIR="snmp" ADM_SERVER_SNMP_ALIAS="/snmp" # Administration console log files dir ADM_SERVER_VAR_LOGS_DIR="logs" # Administration console scripts log files dir ADM_SERVER_VAR_SCRIPTS_LOGS_DIR="scripts" # Administration console default ipdsicover-util.pl cache dir ADM_SERVER_VAR_IPD_DIR="ipd" # OS or linux distribution from automatic detection UNIX_DISTRIBUTION="" ###################### DO NOT MODIFY BELOW ####################### # Check for Apache web server binaries echo echo "+----------------------------------------------------------+" echo "| |" echo "| Welcome to OCS Inventory NG Management server setup ! |" echo "| |" echo "+----------------------------------------------------------+" echo # Check for OS or linux distribution echo "Trying to determine whitch OS or Linux distribution you use" if [ -f /etc/redhat-release ] then UNIX_DISTRIBUTION="redhat" elif [ -f /etc/debian_version ] then UNIX_DISTRIBUTION="debian" elif [ -f /etc/SuSE-release ] then UNIX_DISTRIBUTION="suse" fi # Check for Apache web server binaries echo "+----------------------------------------------------------+" echo "| Checking for Apache web server binaries ! |" echo "+----------------------------------------------------------+" echo echo "CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and" echo "previous, please remove any Apache configuration for Communication Server!" echo echo -n "Do you wish to continue ([y]/n)?" read ligne if [ -z "$ligne" ] || [ "$ligne" = "y" ] || [ "$ligne" = "Y" ] then echo "Assuming Communication server 1.0 RC2 or previous is not installed" echo "on this computer." echo else echo "Installation aborted !" echo exit 1 fi echo > $SETUP_LOG OCS_LOCAL_DATE=`date +%Y-%m-%d-%H-%M-%S` echo "Starting OCS Inventory NG Management server setup on $OCS_LOCAL_DATE" >> $SETUP_LOG echo -n "from folder " >> $SETUP_LOG pwd >> $SETUP_LOG echo -n "Starting OCS Inventory NG Management server setup from folder " pwd echo "Storing log in file $SETUP_LOG" >> $SETUP_LOG echo "Storing log in file $SETUP_LOG" echo >> $SETUP_LOG echo "============================================================" >> $SETUP_LOG echo "Checking OCS Inventory NG Management Server requirements..." >> $SETUP_LOG echo "============================================================" >> $SETUP_LOG echo echo "+----------------------------------------------------------+" echo "| Checking for database server properties... |" echo "+----------------------------------------------------------+" echo # Check mysql client distribution version echo "Checking for database server properties" >> $SETUP_LOG DB_CLIENT_MAJOR_VERSION=`eval mysql -V | cut -d' ' -f6 | cut -d'.' -f1` >> $SETUP_LOG 2>&1 DB_CLIENT_MINOR_VERSION=`eval mysql -V | cut -d' ' -f6 | cut -d'.' -f2` >> $SETUP_LOG 2>&1 echo "Your MySQL client seems to be part of MySQL version $DB_CLIENT_MAJOR_VERSION.$DB_CLIENT_MINOR_VERSION." echo "MySQL client distribution version $DB_CLIENT_MAJOR_VERSION.$DB_CLIENT_MINOR_VERSION." >> $SETUP_LOG # Ensure mysql distribution is 4.1 or higher if [ $DB_CLIENT_MAJOR_VERSION -gt 4 ] then res=1 else if [ $DB_CLIENT_MAJOR_VERSION -eq 4 ] then if [ $DB_CLIENT_MINOR_VERSION -eq 1 ] then res=1 else res=0 fi else res=0 fi fi if [ $res -eq 0 ] then # Not 4.1 or higher, ask user to contnue ? echo "Your computer does not seem to be compliant with MySQL 4.1 or higher." echo -n "Do you wish to continue (y/[n])?" read ligne if [ "$ligne" = "y" ] then echo "Ensure your database server is running MySQL 4.1 or higher !" echo "Ensure also this computer is able to connect to your MySQL server !" else echo "Installation aborted !" exit 1 fi else echo "Your computer seems to be running MySQL 4.1 or higher, good ;-)" echo "Computer seems to be running MySQL 4.1 or higher" >> $SETUP_LOG fi echo # Ask user for database server host res=0 while [ $res -eq 0 ] do echo -n "Which host is running database server [$DB_SERVER_HOST] ?" read ligne if [ -z "$ligne" ] then res=1 else DB_SERVER_HOST="$ligne" res=1 fi done echo "OK, database server is running on host $DB_SERVER_HOST ;-)" echo "Database server is running on host $DB_SERVER_HOST" >> $SETUP_LOG echo # Ask user for database server port res=0 while [ $res -eq 0 ] do echo -n "On which port is running database server [$DB_SERVER_PORT] ?" read ligne if [ -z "$ligne" ] then res=1 else DB_SERVER_PORT="$ligne" res=1 fi done echo "OK, database server is running on port $DB_SERVER_PORT ;-)" echo "Database server is running on port $DB_SERVER_PORT" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for Apache web server daemon... |" echo "+----------------------------------------------------------+" echo echo "Checking for Apache web server daemon" >> $SETUP_LOG # Try to find Apache daemon if [ -z "$APACHE_BIN" ] then APACHE_BIN_FOUND=`which httpd 2>/dev/null` if [ -z "$APACHE_BIN_FOUND" ] then APACHE_BIN_FOUND=`which apache 2>/dev/null` if [ -z "$APACHE_BIN_FOUND" ] then APACHE_BIN_FOUND=`which apache2 2>/dev/null` if [ -z "$APACHE_BIN_FOUND" ] then APACHE_BIN_FOUND=`which httpd2 2>/dev/null` fi fi fi fi echo "Found Apache daemon $APACHE_BIN_FOUND" >> $SETUP_LOG # Ask user's confirmation res=0 while [ $res -eq 0 ] do echo -n "Where is Apache daemon binary [$APACHE_BIN_FOUND] ?" read ligne if [ -z "$ligne" ] then APACHE_BIN=$APACHE_BIN_FOUND else APACHE_BIN="$ligne" fi # Ensure file exists and is executable if [ -x $APACHE_BIN ] then res=1 else echo "*** ERROR: $APACHE_BIN is not executable !" res=0 fi # Ensure file is not a directory if [ -d $APACHE_BIN ] then echo "*** ERROR: $APACHE_BIN is a directory !" res=0 fi done echo "OK, using Apache daemon $APACHE_BIN ;-)" echo "Using Apache daemon $APACHE_BIN" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for Apache main configuration file... |" echo "+----------------------------------------------------------+" echo # Try to find Apache main configuration file echo "Checking for Apache main configuration file" >> $SETUP_LOG if [ -z "$APACHE_CONFIG_FILE" ] then APACHE_ROOT=`eval $APACHE_BIN -V | grep "HTTPD_ROOT" | cut -d'=' -f2 | tr -d '"'` echo "Found Apache HTTPD_ROOT $APACHE_ROOT" >> $SETUP_LOG APACHE_CONFIG=`eval $APACHE_BIN -V | grep "SERVER_CONFIG_FILE" | cut -d'=' -f2 | tr -d '"'` echo "Found Apache SERVER_CONFIG_FILE $APACHE_CONFIG" >> $SETUP_LOG if [ -e $APACHE_CONFIG ] then APACHE_CONFIG_FILE_FOUND="$APACHE_CONFIG" else APACHE_CONFIG_FILE_FOUND="$APACHE_ROOT/$APACHE_CONFIG" fi fi echo "Found Apache main configuration file $APACHE_CONFIG_FILE_FOUND" >> $SETUP_LOG # Ask user's confirmation res=0 while [ $res -eq 0 ] do echo -n "Where is Apache main configuration file [$APACHE_CONFIG_FILE_FOUND] ?" read ligne if [ -z "$ligne" ] then APACHE_CONFIG_FILE=$APACHE_CONFIG_FILE_FOUND else APACHE_CONFIG_FILE="$ligne" fi # Ensure file is not a directory if [ -d $APACHE_CONFIG_FILE ] then echo "*** ERROR: $APACHE_CONFIG_FILE is a directory !" res=0 fi # Ensure file exists and is readable if [ -r $APACHE_CONFIG_FILE ] then res=1 else echo "*** ERROR: $APACHE_CONFIG_FILE is not readable !" res=0 fi done echo "OK, using Apache main configuration file $APACHE_CONFIG_FILE ;-)" echo "Using Apache main configuration file $APACHE_CONFIG_FILE" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for Apache user account... |" echo "+----------------------------------------------------------+" echo # Try to find Apache main configuration file echo "Checking for Apache user account" >> $SETUP_LOG if [ -z "$APACHE_USER" ] then case $UNIX_DISTRIBUTION in "debian") if [ -f /etc/apache2/envvars ]; then . /etc/apache2/envvars fi APACHE_USER_FOUND=$APACHE_RUN_USER ;; "suse") if [ -f /etc/apache2/uid.conf ] then APACHE_USER_FOUND=`cat /etc/apache2/uid.conf | grep "User" | tail -1 | cut -d' ' -f2` fi ;; "redhat") APACHE_USER_FOUND=`cat $APACHE_CONFIG_FILE | grep "User " | tail -1 | cut -d' ' -f2` ;; esac fi echo "Found Apache user account $APACHE_USER_FOUND" >> $SETUP_LOG # Ask user's confirmation res=0 while [ $res -eq 0 ] do echo -n "Which user account is running Apache web server [$APACHE_USER_FOUND] ?" read ligne if [ -z "$ligne" ] then APACHE_USER=$APACHE_USER_FOUND else APACHE_USER="$ligne" fi # Ensure group exist in /etc/passwd if [ `cat /etc/passwd | grep $APACHE_USER | wc -l` -eq 0 ] then echo "*** ERROR: account $APACHE_USER not found in system table /etc/passwd !" else res=1 fi done echo "OK, Apache is running under user account $APACHE_USER ;-)" echo "Using Apache user account $APACHE_USER" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for Apache group... |" echo "+----------------------------------------------------------+" echo # Try to find Apache main configuration file echo "Checking for Apache group" >> $SETUP_LOG if [ -z "$APACHE_GROUP" ] then case $UNIX_DISTRIBUTION in "debian") if [ -f /etc/apache2/envvars ]; then . /etc/apache2/envvars fi APACHE_GROUP_FOUND=$APACHE_RUN_USER ;; "suse") if [ -f /etc/apache2/uid.conf ] then APACHE_GROUP_FOUND=`cat /etc/apache2/uid.conf | grep "Group" | tail -1 | cut -d' ' -f2` fi ;; "redhat") APACHE_GROUP_FOUND=`cat $APACHE_CONFIG_FILE | grep "Group " | tail -1 | cut -d' ' -f2` ;; esac if [ -z "$APACHE_GROUP_FOUND" ] then # No group found, assume group name is the same as account echo "No Apache user group found, assuming group name is the same as user account" >> $SETUP_LOG APACHE_GROUP_FOUND=$APACHE_USER fi fi echo "Found Apache user group $APACHE_GROUP_FOUND" >> $SETUP_LOG # Ask user's confirmation res=0 while [ $res -eq 0 ] do echo -n "Which user group is running Apache web server [$APACHE_GROUP_FOUND] ?" read ligne if [ -z "$ligne" ] then APACHE_GROUP=$APACHE_GROUP_FOUND else APACHE_GROUP="$ligne" fi # Ensure group exist in /etc/group if [ `cat /etc/group | grep $APACHE_GROUP | wc -l` -eq 0 ] then echo "*** ERROR: group $APACHE_GROUP not found in system table /etc/group !" else res=1 fi done echo "OK, Apache is running under users group $APACHE_GROUP ;-)" echo "Using Apache user group $APACHE_GROUP" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for Apache Include configuration directory... |" echo "+----------------------------------------------------------+" echo # Try to find Apache includes configuration directory echo "Checking for Apache Include configuration directory" >> $SETUP_LOG if [ -z "$APACHE_CONFIG_DIRECTORY" ] then case $UNIX_DISTRIBUTION in "redhat") # Works on RH/Fedora/CentOS CONFIG_DIRECTORY_FOUND=`eval cat $APACHE_CONFIG_FILE | grep Include | grep conf.d |head -1 | cut -d' ' -f2 | cut -d'*' -f1` if [ -n "$CONFIG_DIRECTORY_FOUND" ] then APACHE_CONFIG_DIRECTORY_FOUND="$APACHE_ROOT/$CONFIG_DIRECTORY_FOUND" echo "Redhat compliant Apache Include configuration directory $CONFIG_DIRECTORY_FOUND" >> $SETUP_LOG fi ;; "debian") # Works on Debian/Ubuntu CONFIG_DIRECTORY_FOUND=`eval cat $APACHE_CONFIG_FILE | grep Include | grep conf.d |head -1 | cut -d' ' -f2 | cut -d'[' -f1` if [ -n "$CONFIG_DIRECTORY_FOUND" ] then APACHE_CONFIG_DIRECTORY_FOUND="$APACHE_ROOT/$CONFIG_DIRECTORY_FOUND" echo "Debian compliant Apache Include configuration directory $CONFIG_DIRECTORY_FOUND" >> $SETUP_LOG fi ;; "suse") # Works on SuSE/OpenSuSE CONFIG_DIRECTORY_FOUND=`eval cat $APACHE_CONFIG_FILE | grep conf.d | tail -1 | cut -d' ' -f4 | cut -d'/' -f1` if [ -n "$CONFIG_DIRECTORY_FOUND" ] then APACHE_CONFIG_DIRECTORY_FOUND="`dirname $APACHE_CONFIG_FILE`/$CONFIG_DIRECTORY_FOUND" echo "SuSE compliant Apache Include configuration directory $CONFIG_DIRECTORY_FOUND" >> $SETUP_LOG fi ;; *) # No compliant include configuration APACHE_CONFIG_DIRECTORY_FOUND="" echo "No compliant Apache Include configuration directory found" >> $SETUP_LOG ;; esac fi echo "Found Apache Include configuration directory $APACHE_CONFIG_DIRECTORY_FOUND" >> $SETUP_LOG # Ask user's confirmation echo "Setup found Apache Include configuration directory in" echo "$APACHE_CONFIG_DIRECTORY_FOUND." echo "Setup will put OCS Inventory NG Apache configuration in this directory." res=0 while [ $res -eq 0 ] do echo -n "Where is Apache Include configuration directory [$APACHE_CONFIG_DIRECTORY_FOUND] ?" read ligne if [ -z "$ligne" ] then APACHE_CONFIG_DIRECTORY=$APACHE_CONFIG_DIRECTORY_FOUND else APACHE_CONFIG_DIRECTORY="$ligne" fi # Ensure file is a directory if [ -d $APACHE_CONFIG_DIRECTORY ] then res=1 else echo "*** ERROR: $APACHE_CONFIG_DIRECTORY is not a directory !" res=0 fi # Ensure directory exists and is writable if [ -w $APACHE_CONFIG_DIRECTORY ] then res=1 else echo "*** ERROR: $APACHE_CONFIG_DIRECTORY is not writable !" res=0 fi done echo "OK, Apache Include configuration directory $APACHE_CONFIG_DIRECTORY found ;-)" echo "Using Apache Include configuration directory $APACHE_CONFIG_DIRECTORY" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for PERL Interpreter... |" echo "+----------------------------------------------------------+" echo echo "Checking for PERL Interpreter" >> $SETUP_LOG if [ -z "$PERL_BIN" ] then echo "PERL Interpreter not found !" echo "PERL Interpreter not found" >> $SETUP_LOG echo "OCS Inventory NG is not able to work without PERL Interpreter." echo "Setup manually PERL first." echo "Installation aborted !" echo "installation aborted" >> $SETUP_LOG exit 1 else echo "Found PERL Intrepreter at <$PERL_BIN> ;-)" echo "Found PERL Intrepreter at <$PERL_BIN>" >> $SETUP_LOG fi # Ask user's confirmation res=0 while [ $res -eq 0 ] do echo -n "Where is PERL Intrepreter binary [$PERL_BIN] ?" read ligne if [ -n "$ligne" ] then PERL_BIN="$ligne" fi # Ensure file exists and is executable if [ -x $PERL_BIN ] then res=1 else echo "*** ERROR: $PERL_BIN is not executable !" res=0 fi # Ensure file is not a directory if [ -d $PERL_BIN ] then echo "*** ERROR: $PERL_BIN is a directory !" res=0 fi done echo "OK, using PERL Intrepreter $PERL_BIN ;-)" echo "Using PERL Intrepreter $PERL_BIN" >> $SETUP_LOG echo echo echo -n "Do you wish to setup Communication server on this computer ([y]/n)?" read ligne if [ -z "$ligne" ] || [ "$ligne" = "y" ] || [ "$ligne" = "Y" ] then # Setting up Communication server echo >> $SETUP_LOG echo "============================================================" >> $SETUP_LOG echo "Installing Communication server" >> $SETUP_LOG echo "============================================================" >> $SETUP_LOG echo echo echo "+----------------------------------------------------------+" echo "| Checking for Make utility... |" echo "+----------------------------------------------------------+" echo echo "Checking for Make utility" >> $SETUP_LOG if [ -z "$MAKE" ] then echo "Make utility not found !" echo "Make utility not found" >> $SETUP_LOG echo "Setup is not able to build OCS Inventory NG Perl module." echo "Unable to build OCS Inventory NG Perl module !" >> $SETUP_LOG exit 1 else echo "OK, Make utility found at <$MAKE> ;-)" echo "Make utility found at <$MAKE>" >> $SETUP_LOG fi echo echo "+----------------------------------------------------------+" echo "| Checking for Apache mod_perl version... |" echo "+----------------------------------------------------------+" echo echo "Checking for Apache mod_perl version 1.99_22 or higher" echo "Checking for Apache mod_perl version 1.99_22 or higher" >> $SETUP_LOG $PERL_BIN -mmod_perl2 -e 'print "mod_perl 1.99_22 or higher is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then # mod_perl 2 not found ! echo "Checking for Apache mod_perl version 1.99_21 or previous" echo "Checking for Apache mod_perl version 1.99_21 or previous" >> $SETUP_LOG $PERL_BIN -mmod_perl -e 'print "mod_perl 1.99_21 or previous is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then # mod_perl 1 not found => Ask user res=0 while [ $res -eq 0 ] do echo "Setup is unable to determine your Apache mod_perl version." echo "Apache must have module mod_perl enabled. As configuration differs from" echo "mod_perl 1.99_21 or previous AND mod_perl 1.99_22 or higher, Setup must" echo "know which release Apache is using." echo "You can find which release you are using by running the following command" echo " - On RPM enabled OS, rpm -q mod_perl" echo " - On DPKG enabled OS, dpkg -l libapache*-mod-perl*" echo "Enter 1 for mod_perl 1.99_21 or previous." echo "Enter 2 for mod_perl 1.99_22 and higher." echo -n "Which version of Apache mod_perl the computer is running ([1]/2) ?" read ligne if [ -z "$ligne" ] then APACHE_MOD_PERL_VERSION=1 else APACHE_MOD_PERL_VERSION=$ligne fi res=1 done else echo "Found that mod_perl version 1.99_21 or previous is available." APACHE_MOD_PERL_VERSION=1 fi else echo "Found that mod_perl version 1.99_22 or higher is available." APACHE_MOD_PERL_VERSION=2 fi if [ $APACHE_MOD_PERL_VERSION -eq 1 ] then echo "OK, Apache is using mod_perl version 1.99_21 or previous ;-)" echo "Using mod_perl version 1.99_21 or previous" >> $SETUP_LOG else echo "OK, Apache is using mod_perl version 1.99_22 or higher ;-)" echo "Using mod_perl version 1.99_22 or higher" >> $SETUP_LOG fi echo echo "+----------------------------------------------------------+" echo "| Checking for Communication server log directory... |" echo "+----------------------------------------------------------+" echo echo "Checking for Communication server log directory" >> $SETUP_LOG # Ask user res=0 while [ $res -eq 0 ] do echo "Communication server can create detailed logs. This logs can be enabled" echo "by setting integer value of LOGLEVEL to 1 in Administration console" echo "menu Configuration." echo -n "Where to put Communication server log directory [$OCS_COM_SRV_LOG] ?" read ligne if [ -n "$ligne" ] then OCS_COM_SRV_LOG=$ligne fi res=1 done echo "OK, Communication server will put logs into directory $OCS_COM_SRV_LOG ;-)" echo "Using $OCS_COM_SRV_LOG as Communication server log directory" >> $SETUP_LOG echo echo "+----------------------------------------------------------------------------+" echo "| Checking for Communication server plugins configuration directory... |" echo "+----------------------------------------------------------------------------+" echo echo "Checking for Communication server plugins configuration directory" >> $SETUP_LOG # Ask user res=0 while [ $res -eq 0 ] do echo "Communication server need a directory for plugins configuration files. " echo -n "Where to put Communication server plugins configuration files [$OCS_COM_SRV_PLUGINS_CONFIG_DIR] ?" read ligne if [ -n "$ligne" ] then OCS_COM_SRV_PLUGINS_CONFIG_DIR=$ligne fi res=1 done echo "OK, Communication server will put plugins configuration files into directory $OCS_COM_SRV_PLUGINS_CONFIG_DIR ;-)" echo "Using $OCS_COM_SRV_PLUGINS_CONFIG_DIR as Communication server plugins configuration directory" >> $SETUP_LOG echo echo "+-------------------------------------------------------------------+" echo "| Checking for Communication server plugins perl directory... |" echo "+-------------------------------------------------------------------+" echo echo "Checking for Communication server perl directory" >> $SETUP_LOG # Ask user res=0 while [ $res -eq 0 ] do echo "Communication server need a directory for plugins Perl modules files." echo -n "Where to put Communication server plugins Perl modules files [$OCS_COM_SRV_PLUGINS_PERL_DIR] ?" read ligne if [ -n "$ligne" ] then OCS_COM_SRV_PLUGINS_PERL_DIR=$ligne fi res=1 done echo "OK, Communication server will put plugins Perl modules files into directory $OCS_COM_SRV_PLUGINS_PERL_DIR ;-)" echo "Using $OCS_COM_SRV_PLUGINS_PERL_DIR as Communication server plugins perl directory" >> $SETUP_LOG echo # jump to communication server directory echo "Entering Apache sub directory" >> $SETUP_LOG # Check for required Perl Modules (if missing, please install before) # - DBI 1.40 or higher # - Apache::DBI 0.93 or higher # - DBD::mysql 2.9004 or higher # - Compress::Zlib 1.33 or higher # - XML::Simple 2.12 or higher # - Net::IP 1.21 or higher # echo echo "+----------------------------------------------------------+" echo "| Checking for required Perl Modules... |" echo "+----------------------------------------------------------+" echo REQUIRED_PERL_MODULE_MISSING=0 DBI=0 APACHE_DBI=0 DBD_MYSQL=0 COMPRESS_ZLIB=0 XML_SIMPLE=0 NET_IP=0 SOAP_LITE=0 echo "Checking for DBI PERL module..." echo "Checking for DBI PERL module" >> $SETUP_LOG $PERL_BIN -mDBI -e 'print "PERL module DBI is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module DBI is not installed !" REQUIRED_PERL_MODULE_MISSING=1 DBI=1 else echo "Found that PERL module DBI is available." fi echo "Checking for Apache::DBI PERL module..." echo "Checking for Apache::DBI PERL module" >> $SETUP_LOG $PERL_BIN -mApache::DBI -e 'print "PERL module Apache::DBI is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module Apache::DBI is not installed !" REQUIRED_PERL_MODULE_MISSING=1 APACHE_DBI=1 else echo "Found that PERL module Apache::DBI is available." fi echo "Checking for DBD::mysql PERL module..." echo "Checking for DBD::mysql PERL module" >> $SETUP_LOG $PERL_BIN -mDBD::mysql -e 'print "PERL module DBD::mysql is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module DBD::mysql is not installed !" REQUIRED_PERL_MODULE_MISSING=1 DBD_MYSQL=1 else echo "Found that PERL module DBD::mysql is available." fi echo "Checking for Compress::Zlib PERL module..." echo "Checking for Compress::Zlib PERL module" >> $SETUP_LOG $PERL_BIN -mCompress::Zlib -e 'print "PERL module Compress::Zlib is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module Compress::Zlib is not installed !" REQUIRED_PERL_MODULE_MISSING=1 COMPRESS_ZLIB=1 else echo "Found that PERL module Compress::Zlib is available." fi echo "Checking for XML::Simple PERL module..." echo "Checking for XML::Simple PERL module" >> $SETUP_LOG $PERL_BIN -mXML::Simple -e 'print "PERL module XML::Simple is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module XML::Simple is not installed !" REQUIRED_PERL_MODULE_MISSING=1 XML_SIMPLE=1 else echo "Found that PERL module XML::Simple is available." fi echo "Checking for Net::IP PERL module..." echo "Checking for Net::IP PERL module" >> $SETUP_LOG $PERL_BIN -mNet::IP -e 'print "PERL module Net::IP is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module Net::IP is not installed !" REQUIRED_PERL_MODULE_MISSING=1 NET_IP=1 else echo "Found that PERL module Net::IP is available." fi # Check for SOAP::Lite echo "Checking for SOAP::Lite Perl module..." echo "Checking for SOAP::Lite Perl module" >> $SETUP_LOG $PERL_BIN -mSOAP::Lite -e 'print "PERL module SOAP::Lite is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module SOAP::Lite is not installed !" REQUIRED_PERL_MODULE_MISSING=1 SOAP_LITE=1 else echo "Found that PERL module SOAP::Lite is available." fi # Check for Zip::Archive echo "Checking for Archive::Zip Perl module..." echo "Checking for Archive::Zip Perl module" >> $SETUP_LOG $PERL_BIN -mArchive::Zip -e 'print "PERL module Archive::Zip is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module Archive::Zip is not installed !" REQUIRED_PERL_MODULE_MISSING=1 Archive_Zip=1 else echo "Found that PERL module Archive::Zip is available." fi if [ $REQUIRED_PERL_MODULE_MISSING -ne 0 ] then echo "*** ERROR: There is one or more required PERL modules missing on your computer !" echo "Please, install missing PERL modules first." echo " " echo "OCS setup.sh can install perl module from packages for you" echo "The script will use the native package from your operating system like apt or rpm" echo -n "Do you wish to continue (y/[n])?" read ligne if [ "$ligne" = "y" ] || [ "$ligne" = "Y" ] then case $UNIX_DISTRIBUTION in "redhat") echo "RedHat based automatic installation" if [ $DBI -eq 1 ] then PACKAGE="$PACKAGE perl-DBI" fi if [ $APACHE_DBI -eq 1 ] then PACKAGE="$PACKAGE perl-Apache-DBI" fi if [ $DBD_MYSQL -eq 1 ] then PACKAGE="$PACKAGE perl-DBD-MySQL" fi if [ $COMPRESS_ZLIB -eq 1 ] then PACKAGE="$PACKAGE perl-Compress-Zlib" fi if [ $XML_SIMPLE -eq 1 ] then PACKAGE="$PACKAGE perl-XML-Simple" fi if [ $NET_IP -eq 1 ] then PACKAGE="$PACKAGE perl-Net-IP" fi yum update yum install $PACKAGE if [ $? != 0 ] then echo "Installation aborted !" echo "Installation script encounter problems to install packages !" echo "One or more required PERL modules missing !" >> $SETUP_LOG echo "Installation aborted" >> $SETUP_LOG exit 1 fi echo "All packages have been installed on this computer" ;; "debian") if [ -f /usr/bin/apt-get ] then echo "Debian based automatic installation" if [ $DBI -eq 1 ] then PACKAGE="$PACKAGE libdbi-perl" fi if [ $APACHE_DBI -eq 1 ] then PACKAGE="$PACKAGE libapache-dbi-perl" fi if [ $DBD_MYSQL -eq 1 ] then PACKAGE="$PACKAGE libdbd-mysql-perl" fi if [ $COMPRESS_ZLIB -eq 1 ] then PACKAGE="$PACKAGE libcompress-zlib-perl" fi if [ $XML_SIMPLE -eq 1 ] then PACKAGE="$PACKAGE libxml-simple-perl" fi if [ $NET_IP -eq 1 ] then PACKAGE="$PACKAGE libnet-ip-perl" fi apt-get update apt-get install $PACKAGE if [ $? -ne 0 ] then echo "Installation aborted !" echo "Installation script encounter problems to install packages !" echo "One or more required PERL modules missing !" >> $SETUP_LOG echo "Installation aborted" >> $SETUP_LOG exit 1 fi echo "All packages have been installed on this computer" else echo "Installation aborted !" echo "Installation script cannot run apt-get utility !" echo "One or more required PERL modules missing !" >> $SETUP_LOG echo "Installation aborted" >> $SETUP_LOG exit 1 fi ;; *) echo "Installation aborted !" echo "Installation script cannot find missing packages for your distribution" echo "One or more required PERL modules missing !" >> $SETUP_LOG echo "Installation aborted" >> $SETUP_LOG exit 1 ;; esac else echo "Installation aborted !" echo "Please, install missing PERL modules first." echo "One or more required PERL modules missing !" >> $SETUP_LOG echo "Installation aborted" >> $SETUP_LOG exit 1 fi fi # Check for optional Perl Modules # - SOAP::Lite 0.65, not required, used only in web service # - XML::Entities 0.02, not required, used only in web service # echo echo "+----------------------------------------------------------+" echo "| Checking for optional Perl Modules... |" echo "+----------------------------------------------------------+" echo echo "Checking for Apache2::SOAP PERL module..." echo "Checking for Apache2::SOAP PERL module" >> $SETUP_LOG $PERL_BIN -mApache2::SOAP -e 'print "PERL module Apache2::SOAP is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** Warning: PERL module Apache2::SOAP is not installed !" echo "This module is only required by OCS Inventory NG SOAP Web Service." echo -n "Do you wish to continue ([y]/n] ?" read ligne if [ -z "$ligne" ] || [ "$ligne" = "y" ] then echo "User choose to continue setup without PERL module SOAP::Apache2" >> $SETUP_LOG else echo echo "Installation aborted !" echo "User choose to abort installation !" >> $SETUP_LOG exit 1 fi else echo "Found that PERL module SOAP::Apache2 is available." fi echo "Checking for XML::Entities PERL module..." echo "Checking for XML::Entities PERL module" >> $SETUP_LOG $PERL_BIN -mXML::Entities -e 'print "PERL module XML::Entities is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** Warning: PERL module XML::Entities is not installed !" echo "This module is only required by OCS Inventory NG SOAP Web Service." echo -n "Do you wish to continue ([y]/n] ?" read ligne if [ -z "$ligne" ] || [ "$ligne" = "y" ] then echo "User choose to continue setup without PERL module XML::Entities" >> $SETUP_LOG else echo echo "Installation aborted !" echo "User choose to abort installation !" >> $SETUP_LOG exit 1 fi else echo "Found that PERL module XML::Entities is available." fi echo echo echo "+----------------------------------------------------------+" echo "| OK, looks good ;-) |" echo "| |" echo "| Configuring Communication server Perl modules... |" echo "+----------------------------------------------------------+" echo echo "Configuring Communication server (perl Makefile.PL)" >> $SETUP_LOG cd "Apache" $PERL_BIN Makefile.PL if [ $? -ne 0 ] then echo -n "Warning: Prerequisites too old ! Do you wish to continue (y/[n])?" read ligne if [ "$ligne" = "y" ] then echo "Maybe Communication server will encounter problems. Continuing anyway." echo "Warning: Prerequisites too old ! Continuing anyway" >> $SETUP_LOG else echo "Installation aborted !" exit 1 fi fi echo echo "+----------------------------------------------------------+" echo "| OK, looks good ;-) |" echo "| |" echo "| Preparing Communication server Perl modules... |" echo "+----------------------------------------------------------+" echo echo "Preparing Communication server Perl modules (make)" >> $SETUP_LOG $MAKE >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Prepare failed, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo echo "+----------------------------------------------------------+" echo "| OK, prepare finshed ;-) |" echo "| |" echo "| Installing Communication server Perl modules... |" echo "+----------------------------------------------------------+" echo echo "Installing Communication server Perl modules (make install)" >> $SETUP_LOG $MAKE install >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Install of Perl modules failed, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi cd ".." echo echo "+----------------------------------------------------------+" echo "| OK, Communication server Perl modules install finished;-)|" echo "| |" echo "| Creating Communication server log directory... |" echo "+----------------------------------------------------------+" echo echo "Creating Communication server log directory $OCS_COM_SRV_LOG." echo "Creating Communication server log directory $OCS_COM_SRV_LOG" >> $SETUP_LOG mkdir -p $OCS_COM_SRV_LOG >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to create log directory, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo echo "Fixing Communication server log directory files permissions." echo "Fixing Communication server log directory permissions" >> $SETUP_LOG chown -R $APACHE_USER:$APACHE_GROUP $OCS_COM_SRV_LOG >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set log directory permissions, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi chmod -R gu+rwx $OCS_COM_SRV_LOG >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set log directory permissions, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi chmod -R o-w $OCS_COM_SRV_LOG >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set log directory permissions, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Log rotation, BSD style if [ -f $NEWSYSLOG_CONF_FILE ] then echo "*** WARNING Please configure log rotation for files in $OCS_COM_SRV_LOG" fi # Log rotation, Linux flavor if [ -d $LOGROTATE_CONF_DIR ] then echo "Configuring logrotate for Communication server." echo "Configuring logrotate (ed logrotate.ocsinventory-NG)" >> $SETUP_LOG cp etc/logrotate.d/$COM_SERVER_LOGROTATE_CONF_FILE logrotate.$COM_SERVER_LOGROTATE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_LOG_DIRECTORY#$OCS_COM_SRV_LOG#g" logrotate.$COM_SERVER_LOGROTATE_CONF_FILE.local echo "******** Begin updated logrotate.$COM_SERVER_LOGROTATE_CONF_FILE.local ***********" >> $SETUP_LOG cat logrotate.$COM_SERVER_LOGROTATE_CONF_FILE.local >> $SETUP_LOG echo "******** End updated logrotate.COM_SERVER_LOGROTATE_CONF_FILE.local ***********" >> $SETUP_LOG echo "Removing old communication server logrotate file $LOGROTATE_CONF_DIR/ocsinventory-NG" echo "Removing old communication server logrotate file $LOGROTATE_CONF_DIR/ocsinventory-NG" >> $SETUP_LOG rm -f "$LOGROTATE_CONF_DIR/ocsinventory-NG" echo "Writing communication server logrotate to file $LOGROTATE_CONF_DIR/$COM_SERVER_LOGROTATE_CONF_FILE" echo "Writing communication server logrotate to file $LOGROTATE_CONF_DIR/$COM_SERVER_LOGROTATE_CONF_FILE" >> $SETUP_LOG cp -f logrotate.$COM_SERVER_LOGROTATE_CONF_FILE.local $LOGROTATE_CONF_DIR/$COM_SERVER_LOGROTATE_CONF_FILE >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to configure log rotation, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi fi echo echo echo "+-----------------------------------------------------------------------------+" echo "| OK, Communication server log directory created ;-) |" echo "| |" echo "| Creating Communication server plugins configuration directory... |" echo "+-----------------------------------------------------------------------------+" echo echo "Creating Communication server plugins configuration directory $OCS_COM_SRV_PLUGINS_CONFIG_DIR." echo "Creating Communication server plugins configuration directory $OCS_COM_SRV_PLUGINS_CONFIG_DIR" >> $SETUP_LOG mkdir -p $OCS_COM_SRV_PLUGINS_CONFIG_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to create plugins confguration directory, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo echo echo "+-----------------------------------------------------------------------------+" echo "| OK, Communication server plugins configuration directory created ;-) |" echo "| |" echo "| Creating Communication server plugins Perl directory... |" echo "+-----------------------------------------------------------------------------+" echo echo "Creating Communication server plugins Perl directory $OCS_COM_SRV_PLUGINS_PERL_DIR." echo "Creating Communication server plugins Perl directory $OCS_COM_SRV_PLUGINS_PERL_DIR" >> $SETUP_LOG mkdir -p "$OCS_COM_SRV_PLUGINS_PERL_DIR/Apache/Ocsinventory/Plugins" >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to create plugins Perl directory, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo echo echo "+-------------------------------------------------------------------+" echo "| OK, Communication server plugins Perl directory created ;-) |" echo "| |" echo "| Now configuring Apache web server... |" echo "+-------------------------------------------------------------------+" echo echo "To ensure Apache loads mod_perl before OCS Inventory NG Communication Server," echo "Setup can name Communication Server Apache configuration file" echo "'z-$COM_SERVER_APACHE_CONF_FILE' instead of '$COM_SERVER_APACHE_CONF_FILE'." echo "Do you allow Setup renaming Communication Server Apache configuration file" echo -n "to 'z-$COM_SERVER_APACHE_CONF_FILE' ([y]/n) ?" read ligne if [ -z $ligne ] || [ "$ligne" = "y" ] || [ "$ligne" = "Y" ] then echo "OK, using 'z-$COM_SERVER_APACHE_CONF_FILE' as Communication Server Apache configuration file" echo "OK, using 'z-$COM_SERVER_APACHE_CONF_FILE' as Communication Server Apache configuration file" >> $SETUP_LOG FORCE_LOAD_AFTER_PERL_CONF=1 else echo "OK, using '$COM_SERVER_APACHE_CONF_FILE' as Communication Server Apache configuration file" echo "OK, using '$COM_SERVER_APACHE_CONF_FILE' as Communication Server Apache configuration file" >> $SETUP_LOG FORCE_LOAD_AFTER_PERL_CONF=0 fi echo "Configuring Apache web server (file $COM_SERVER_APACHE_CONF_FILE)" >> $SETUP_LOG cp etc/ocsinventory/$COM_SERVER_APACHE_CONF_FILE $COM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#DATABASE_SERVER#$DB_SERVER_HOST#g" $COM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#DATABASE_PORT#$DB_SERVER_PORT#g" $COM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#VERSION_MP#$APACHE_MOD_PERL_VERSION#g" $COM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_LOG_DIRECTORY#$OCS_COM_SRV_LOG#g" $COM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_PLUGINS_CONFIG_DIRECTORY#$OCS_COM_SRV_PLUGINS_CONFIG_DIR#g" $COM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_PLUGINS_PERL_DIRECTORY#$OCS_COM_SRV_PLUGINS_PERL_DIR#g" $COM_SERVER_APACHE_CONF_FILE.local echo "******** Begin updated $COM_SERVER_APACHE_CONF_FILE.local ***********" >> $SETUP_LOG cat $COM_SERVER_APACHE_CONF_FILE.local >> $SETUP_LOG echo "******** End updated $COM_SERVER_APACHE_CONF_FILE.local ***********" >> $SETUP_LOG echo "Removing old communication server configuration to file $APACHE_CONFIG_DIRECTORY/ocsinventory.conf" echo "Removing old communication server configuration to file $APACHE_CONFIG_DIRECTORY/ocsinventory.conf" >> $SETUP_LOG rm -f "$APACHE_CONFIG_DIRECTORY/ocsinventory.conf" if [ $FORCE_LOAD_AFTER_PERL_CONF -eq 1 ] then rm -f "$APACHE_CONFIG_DIRECTORY/$COM_SERVER_APACHE_CONF_FILE" echo "Writing communication server configuration to file $APACHE_CONFIG_DIRECTORY/z-$COM_SERVER_APACHE_CONF_FILE" echo "Writing communication server configuration to file $APACHE_CONFIG_DIRECTORY/z-$COM_SERVER_APACHE_CONF_FILE" >> $SETUP_LOG cp -f $COM_SERVER_APACHE_CONF_FILE.local $APACHE_CONFIG_DIRECTORY/z-$COM_SERVER_APACHE_CONF_FILE >> $SETUP_LOG 2>&1 res=$? COM_SERVER_APACHE_CONF_FILE="z-$COM_SERVER_APACHE_CONF_FILE" else echo "Writing communication server configuration to file $APACHE_CONFIG_DIRECTORY/$COM_SERVER_APACHE_CONF_FILE" echo "Writing communication server configuration to file $APACHE_CONFIG_DIRECTORY/$COM_SERVER_APACHE_CONF_FILE" >> $SETUP_LOG cp -f $COM_SERVER_APACHE_CONF_FILE.local $APACHE_CONFIG_DIRECTORY/$COM_SERVER_APACHE_CONF_FILE >> $SETUP_LOG 2>&1 res=$? fi if [ $res -ne 0 ] then echo "*** ERROR: Unable to write $APACHE_CONFIG_DIRECTORY/$COM_SERVER_APACHE_CONF_FILE, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo echo "+----------------------------------------------------------+" echo "| OK, Communication server setup sucessfuly finished ;-) |" echo "| |" echo "| Please, review $APACHE_CONFIG_DIRECTORY/$COM_SERVER_APACHE_CONF_FILE" echo "| to ensure all is good. Then restart Apache daemon. |" echo "+----------------------------------------------------------+" echo echo "Leaving Apache directory" >> $SETUP_LOG echo "Communication server installation successful" >> $SETUP_LOG fi echo echo "Do you wish to setup Administration Server (Web Administration Console)" echo -n "on this computer ([y]/n)?" read ligne if [ -z "$ligne" ] || [ "$ligne" = "y" ] || [ "$ligne" = "Y" ] then # Install Administration server echo >> $SETUP_LOG echo "============================================================" >> $SETUP_LOG echo "Installing Administration server" >> $SETUP_LOG echo "============================================================" >> $SETUP_LOG echo echo "+----------------------------------------------------------+" echo "| Checking for Administration Server directories... |" echo "+----------------------------------------------------------+" echo echo "CAUTION: Setup now install files in accordance with Filesystem Hierarchy" echo "Standard. So, no file is installed under Apache root document directory" echo "(Refer to Apache configuration files to locate it)." echo "If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU" echo "MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache" echo "root document directory." echo "If you choose to move directory, YOU MUST MOVE 'download' directory to" echo "Administration Server writable/cache directory (by default" echo "$ADM_SERVER_VAR_DIR), especially if you use deployment feature." echo echo -n "Do you wish to continue ([y]/n)?" read ligne if [ -z "$ligne" ] || [ "$ligne" = "y" ] || [ "$ligne" = "Y" ] then echo "Assuming directories 'ocsreports' and 'download' removed from" echo "Apache root document directory." echo else echo "Installation aborted !" echo exit 1 fi echo "Checking for Administration Server directories..." >> $SETUP_LOG echo "Where to copy Administration Server static files for PHP Web Console" echo -n "[$ADM_SERVER_STATIC_DIR] ?" read ligne if test -z $ligne then ADM_SERVER_STATIC_DIR=$ADM_SERVER_STATIC_DIR else ADM_SERVER_STATIC_DIR="$ligne" fi echo "OK, using directory $ADM_SERVER_STATIC_DIR to install static files ;-)" echo "Using directory $ADM_SERVER_STATIC_DIR for static files" >> $SETUP_LOG echo echo "Where to create writable/cache directories for deployment packages," echo -n "administration console logs, IPDiscover and SNMP [$ADM_SERVER_VAR_DIR] ?" read ligne if test -z $ligne then ADM_SERVER_VAR_DIR=$ADM_SERVER_VAR_DIR else ADM_SERVER_VAR_DIR="$ligne" fi echo "OK, writable/cache directory is $ADM_SERVER_VAR_DIR ;-)" echo "Using $ADM_SERVER_VAR_DIR as writable/cache directory" >> $SETUP_LOG echo # Check for required Perl Modules (if missing, please install before) # - DBI 1.40 or higher # - DBD::mysql 2.9004 or higher # - XML::Simple 2.12 or higher # - Net::IP 1.21 or higher # echo echo "+----------------------------------------------------------+" echo "| Checking for required Perl Modules... |" echo "+----------------------------------------------------------+" echo REQUIRED_PERL_MODULE_MISSING=0 echo "Checking for DBI PERL module..." echo "Checking for DBI PERL module" >> $SETUP_LOG $PERL_BIN -mDBI -e 'print "PERL module DBI is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module DBI is not installed !" REQUIRED_PERL_MODULE_MISSING=1 else echo "Found that PERL module DBI is available." fi echo "Checking for DBD::mysql PERL module..." echo "Checking for DBD::mysql PERL module" >> $SETUP_LOG $PERL_BIN -mDBD::mysql -e 'print "PERL module DBD::mysql is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module DBD::mysql is not installed !" REQUIRED_PERL_MODULE_MISSING=1 else echo "Found that PERL module DBD::mysql is available." fi echo "Checking for XML::Simple PERL module..." echo "Checking for XML::Simple PERL module" >> $SETUP_LOG $PERL_BIN -mXML::Simple -e 'print "PERL module XML::Simple is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module XML::Simple is not installed !" REQUIRED_PERL_MODULE_MISSING=1 else echo "Found that PERL module XML::Simple is available." fi echo "Checking for Net::IP PERL module..." echo "Checking for Net::IP PERL module" >> $SETUP_LOG $PERL_BIN -mNet::IP -e 'print "PERL module Net::IP is available\n"' >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: PERL module Net::IP is not installed !" REQUIRED_PERL_MODULE_MISSING=1 else echo "Found that PERL module Net::IP is available." fi if [ $REQUIRED_PERL_MODULE_MISSING -ne 0 ] then echo "*** ERROR: There is one or more required PERL modules missing on your computer !" echo "Please, install missing PERL modules first." echo "Installation aborted !" echo "One or more required PERL modules missing !" >> $SETUP_LOG echo "Installation aborted" >> $SETUP_LOG exit 1 fi echo echo "+----------------------------------------------------------+" echo "| Installing files for Administration server... |" echo "+----------------------------------------------------------+" echo echo "Creating PHP directory $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR." echo "Creating PHP directory $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR" >> $SETUP_LOG mkdir -p $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR >> $SETUP_LOG 2>&1 if [ $? != 0 ] then echo "*** ERROR: Unable to create ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Copying PHP files to $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR." echo "Copying PHP files to $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR" >> $SETUP_LOG cp -Rf ocsreports/* $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/ >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to copy files in $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on directory $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR." echo "Fixing permissions on directory $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR" >> $SETUP_LOG # Set PHP pages directory owned by root, group Apache chown -R root:$APACHE_GROUP $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR >> $SETUP_LOG 2>&1 # Set "download/" "upload/" "plugins/main_section" "plugins/computer_detail" "plugins/language" "config/" own to apache chown -R $APACHE_USER:$APACHE_GROUPE $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/config >> $SETUP_LOG 2>&1 chown -R $APACHE_USER:$APACHE_GROUPE $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/plugins/computer_detail >> $SETUP_LOG 2>&1 chown -R $APACHE_USER:$APACHE_GROUPE $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/plugins/main_sections >> $SETUP_LOG 2>&1 chown -R $APACHE_USER:$APACHE_GROUPE $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/plugins/language >> $SETUP_LOG 2>&1 chown -R $APACHE_USER:$APACHE_GROUPE $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/download >> $SETUP_LOG 2>&1 chown -R $APACHE_USER:$APACHE_GROUPE $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/upload >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set PHP pages writable by root only chmod -R go-w $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set database configuration file dbconfig.inc.php writable by Apache echo "Creating database configuration file $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php." echo "Creating database configuration file $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php" >> $SETUP_LOG rm -f $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo "> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo -n '$_SESSION["SERVEUR_SQL"]="' >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo -n "$DB_SERVER_HOST" >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo '";' >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo -n '$_SESSION["COMPTE_BASE"]="' >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo -n "$DB_SERVER_USER" >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo '";' >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo -n '$_SESSION["PSWD_BASE"]="' >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo -n "$DB_SERVER_PWD" >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo '";' >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php echo "?>" >> $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php chown root:$APACHE_GROUP $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php chmod g+w $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/dbconfig.inc.php, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Creating IPDiscover directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR." echo "Creating IPDiscover directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR" >> $SETUP_LOG mkdir -p $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR >> $SETUP_LOG 2>&1 if [ $? != 0 ] then echo "*** ERROR: Unable to create $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR." echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR" >> $SETUP_LOG # Set IPD area owned by root, group Apache chown -R root:$APACHE_GROUP $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set IPD area writable by root only chmod -R go-w $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set IPD area writable by Apache group chmod g+w $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi #Create packages directory echo "Creating packages directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR." echo "Creating packages directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR" >> $SETUP_LOG mkdir -p $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR >> $SETUP_LOG 2>&1 if [ $? != 0 ] then echo "*** ERROR: Unable to create ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR." echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR" >> $SETUP_LOG # Set package area owned by root, group Apache chown -R root:$APACHE_GROUP $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set package area writable by root and Apache group only chmod -R g+w,o-w $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Create snmp custom mibs directory echo "Creating snmp mibs directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR." echo "Creating snmp mibs directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR" >> $SETUP_LOG mkdir -p $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR >> $SETUP_LOG 2>&1 if [ $? != 0 ] then echo "*** ERROR: Unable to create ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR." echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR" >> $SETUP_LOG # Set snmp area owned by root, group Apache chown -R root:$APACHE_GROUP $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set snmp area writable by root and Apache group only chmod -R g+w,o-w $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Create logs directory echo "Creating Administration server log files directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR." echo "Creating Administration server log files directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR" >> $SETUP_LOG mkdir -p $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR >> $SETUP_LOG 2>&1 if [ $? != 0 ] then echo "*** ERROR: Unable to create ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR." echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR" >> $SETUP_LOG # Set log files area owned by root, group Apache chown -R root:$APACHE_GROUP $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set log files area writable by root and Apache group only chmod -R g+w,o-w $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_LOGS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Creating Administration server scripts log files directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR." echo "Creating Administration server scripts log files directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR" >> $SETUP_LOG mkdir -p $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR >> $SETUP_LOG 2>&1 if [ $? != 0 ] then echo "*** ERROR: Unable to create ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR." echo "Fixing permissions on directory $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR" >> $SETUP_LOG # Set scripts log files area owned by root, group Apache chown -R root:$APACHE_GROUP $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi # Set scripts log files area writable by root and Apache group only chmod -R g+w,o-w $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SCRIPTS_LOGS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Configuring IPDISCOVER-UTIL Perl script." echo "Configuring IPDISCOVER-UTIL Perl script (ed ipdiscover-util.pl)" >> $SETUP_LOG cp binutils/ipdiscover-util.pl ipdiscover-util.pl.local >> $SETUP_LOG 2>&1 $PERL_BIN -pi -e "s#localhost#$DB_SERVER_HOST#g" ipdiscover-util.pl.local $PERL_BIN -pi -e "s#3306#$DB_SERVER_PORT#g" ipdiscover-util.pl.local # echo "******** Begin updated ipdiscover-util.pl.local script ***********" >> $SETUP_LOG # cat ipdiscover-util.pl.local >> $SETUP_LOG # echo "******** End updated ipdiscover-util.pl.local script ***********" >> $SETUP_LOG echo "Installing IPDISCOVER-UTIL Perl script." echo "Installing IPDISCOVER-UTIL Perl script" >> $SETUP_LOG cp ipdiscover-util.pl.local $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/ipdiscover-util.pl >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to copy files in $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Fixing permissions on IPDISCOVER-UTIL Perl script." echo "Fixing permissions on IPDISCOVER-UTIL Perl script" >> $SETUP_LOG chown root:$APACHE_GROUP $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/ipdiscover-util.pl >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi chmod gou+x $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR/ipdiscover-util.pl >> $SETUP_LOG 2>&1 if [ $? -ne 0 ] then echo "*** ERROR: Unable to set permissions on $ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo "Configuring Apache web server (file $ADM_SERVER_APACHE_CONF_FILE)" >> $SETUP_LOG cp etc/ocsinventory/$ADM_SERVER_APACHE_CONF_FILE $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#OCSREPORTS_ALIAS#$ADM_SERVER_REPORTS_ALIAS#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_OCSREPORTS_DIR#$ADM_SERVER_STATIC_DIR/$ADM_SERVER_STATIC_REPORTS_DIR#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#IPD_ALIAS#$ADM_SERVER_IPD_ALIAS#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_IPD_DIR#$ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_IPD_DIR#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PACKAGES_ALIAS#$ADM_SERVER_PACKAGES_ALIAS#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_PACKAGES_DIR#$ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_PACKAGES_DIR#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#SNMP_ALIAS#$ADM_SERVER_SNMP_ALIAS#g" $ADM_SERVER_APACHE_CONF_FILE.local $PERL_BIN -pi -e "s#PATH_TO_SNMP_DIR#$ADM_SERVER_VAR_DIR/$ADM_SERVER_VAR_SNMP_DIR#g" $ADM_SERVER_APACHE_CONF_FILE.local echo "******** Begin updated $ADM_SERVER_APACHE_CONF_FILE.local ***********" >> $SETUP_LOG cat $ADM_SERVER_APACHE_CONF_FILE.local >> $SETUP_LOG echo "******** End updated $ADM_SERVER_APACHE_CONF_FILE.local ***********" >> $SETUP_LOG echo "Writing Administration server configuration to file $APACHE_CONFIG_DIRECTORY/$ADM_SERVER_APACHE_CONF_FILE" echo "Writing communication server configuration to file $APACHE_CONFIG_DIRECTORY/$ADM_SERVER_APACHE_CONF_FILE" >> $SETUP_LOG cp -f $ADM_SERVER_APACHE_CONF_FILE.local $APACHE_CONFIG_DIRECTORY/$ADM_SERVER_APACHE_CONF_FILE >> $SETUP_LOG 2>&1 #Fix permissions on server side for plugin engine (perl / plugins) dir usualy in etc/ocsinventory-server.. # Where are located OCS Communication server plugins configuration files chown -R $APACHE_USER:$APACHE_GROUPE $OCS_COM_SRV_PLUGINS_CONFIG_DIR # Where are located OCS Communication server plugins perl files chown -R $APACHE_USER:$APACHE_GROUPE $OCS_COM_SRV_PLUGINS_PERL_DIR if [ $? -ne 0 ] then echo "*** ERROR: Unable to write $APACHE_CONFIG_DIRECTORY/$ADM_SERVER_APACHE_CONF_FILE, please look at error in $SETUP_LOG and fix !" echo echo "Installation aborted !" exit 1 fi echo echo "+----------------------------------------------------------+" echo "| OK, Administration server installation finished ;-) |" echo "| |" echo "| Please, review $APACHE_CONFIG_DIRECTORY/$ADM_SERVER_APACHE_CONF_FILE" echo "| to ensure all is good and restart Apache daemon. |" echo "| |" echo "| Then, point your browser to http://server/$ADM_SERVER_REPORTS_ALIAS" echo "| to configure database server and create/update schema. |" echo "+----------------------------------------------------------+" echo echo "Administration server installation successful" >> $SETUP_LOG fi echo echo "Setup has created a log file $SETUP_LOG. Please, save this file." echo "If you encounter error while running OCS Inventory NG Management server," echo "we can ask you to show us his content !" echo echo "DON'T FORGET TO RESTART APACHE DAEMON !" echo echo "Enjoy OCS Inventory NG ;-)" echo exit 0