Commit 739dbd4a authored by moyooo's avatar moyooo

0.71 to trunk

parent f52496c1
......@@ -10,4 +10,4 @@ Old-developer : *
*
*
***************************************************************************
***************************************************************************
***************************************************************************
\ No newline at end of file
......@@ -49,7 +49,7 @@ if (isset($LINK_ID_TABLE[$_POST["type"]])&&$_POST["type"]>0){
$rand=mt_rand();
if (!isset($_POST['searchText']))$_POST['searchText']="";
$where=" WHERE deleted='N' ";
$where="WHERE deleted='N' ";
$where.=" AND is_template='0' ";
if (isset($_POST["entity_restrict"])&&$_POST["entity_restrict"]>=0){
......
......@@ -51,28 +51,48 @@ checkCentralAccess();
$where=" WHERE (glpi_docs.rubrique = '".$_POST['rubdoc']."' AND glpi_docs.deleted='0' ) ";
if (isset($_POST["entity_restrict"])&&$_POST["entity_restrict"]>=0){
$where.= " AND glpi_docs.FK_entities='".$_POST["entity_restrict"]."'";
if (isset($_POST["entity_restrict"]) && strlen($_POST["entity_restrict"])){
$where.=getEntitiesRestrictRequest("AND","glpi_docs",'',$_POST["entity_restrict"],true);
} else {
$where.=getEntitiesRestrictRequest("AND","glpi_docs");
$where.=getEntitiesRestrictRequest("AND","glpi_docs",'','',true);
}
if (isset($_POST['used'])) {
$where .=" AND ID NOT IN (0";
if (is_array($_POST['used'])) {
$used=$_POST['used'];
} else {
$used=unserialize(stripslashes($_POST['used']));
}
foreach($used as $val)
$where .= ",$val";
$where .= ") ";
}
$query = "SELECT * FROM glpi_docs $where";
//echo $query;
$query = "SELECT * FROM glpi_docs $where ORDER BY FK_entities, name";
//error_log($query);
$result = $DB->query($query);
echo "<select name=\"".$_POST['myname']."\">";
echo "<option value=\"0\">-----</option>";
if ($DB->numrows($result)) {
$prev=-1;
while ($data=$DB->fetch_array($result)) {
if ($data["FK_entities"]!=$prev) {
if ($prev>=0) {
echo "</optgroup>";
}
$prev=$data["FK_entities"];
echo "<optgroup label=\"". getDropdownName("glpi_entities", $prev) ."\">";
}
$output = $data["name"];
echo "<option value=\"".$data["ID"]."\" title=\"$output\">".substr($output,0,$CFG_GLPI["dropdown_limit"])."</option>";
}
if ($prev>=0) {
echo "</optgroup>";
}
}
echo "</select>";
......
......@@ -48,15 +48,15 @@ if ($_POST['sID']>0){
// Make a select box
$where="";
if (!$_POST["only_globalfree"]) {
$where=" glpi_inst_software.cID IS NULL OR glpi_inst_software.cID = 0 OR ";
if (!$_POST["only_globalfree"]){
$where=" glpi_inst_software.cID IS NULL OR glpi_inst_software.cID = 0 OR ";
}
$query = "SELECT DISTINCT glpi_licenses.* from glpi_licenses ";
$query.= " LEFT JOIN glpi_inst_software on (glpi_licenses.ID=glpi_inst_software.license)";
$query.= " WHERE glpi_licenses.sID='".$_POST['sID']."' AND ($where glpi_licenses.serial='free' OR glpi_licenses.serial='global' ) ";
$query.= " GROUP BY version, serial, expire, oem, oem_computer, buy ORDER BY version, serial ASC";
$result = $DB->query($query);
$number=$DB->numrows($result);
echo "<select name=\"".$_POST['myname']."\" size='1'>";
......
......@@ -61,6 +61,10 @@ if (isset($_POST["action"])&&isset($_POST["type"])&&!empty($_POST["type"])){
echo "<input type='hidden' name='action' value='".$_POST["action"]."'>";
echo "<input type='hidden' name='device_type' value='".$_POST["type"]."'>";
switch($_POST["action"]){
case "activate_rule":
echo dropdownYesNo("activate_rule");
echo "&nbsp;<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"".$LANG["buttons"][2]."\" >";
break;
case "move_rule":
echo "<select name='move_type'>";
echo "<option value='after' selected>".$LANG["buttons"][47]."</option>";
......@@ -73,6 +77,7 @@ if (isset($_POST["action"])&&isset($_POST["type"])&&!empty($_POST["type"])){
showAddFollowupForm(-1,true);
break;
case "compute_software_category":
case "replay_dictionnary":
case "force_ocsng_update":
case "delete":
case "purge":
......@@ -96,7 +101,7 @@ if (isset($_POST["action"])&&isset($_POST["type"])&&!empty($_POST["type"])){
break;
case "install":
dropdownSoftwareToInstall("lID",0,$_SESSION["glpiactive_entity"],1);
echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"".$LANG["buttons"][4]."\" >";
echo "<input type=\"submit\" name=\"massiveaction\" class=\"submit\" value=\"".$LANG["buttons"][4]."\" >";
break;
case "connect":
dropdownConnect(COMPUTER_TYPE,$_POST["type"],"connect_item");
......
......@@ -51,36 +51,46 @@ checkLoginUser();
// Make a select box with preselected values
if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
$where="";
if (strlen($_POST['searchText'])>0&&$_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]){
$where=" WHERE (glpi_dropdown_netpoint.name ".makeTextSearch($_POST['searchText'])." OR glpi_dropdown_locations.completename ".makeTextSearch($_POST['searchText']).")";
} else {
$where=" WHERE 1 ";
}
if (isset($_POST["location"])&&$_POST["location"]>0){
if (empty($where)) $where=" WHERE ";
else $where.=" AND ";
$where.=" glpi_dropdown_netpoint.location='".$_POST["location"]."' ";
}
$NBMAX=$CFG_GLPI["dropdown_max"];
$LIMIT="LIMIT 0,$NBMAX";
if ($_POST['searchText']==$CFG_GLPI["ajax_wildcard"]) $LIMIT="";
if (isset($_POST["entity_restrict"])&&$_POST["entity_restrict"]>=0){
if (!empty($where)) $where.= " AND glpi_dropdown_netpoint.FK_entities='".$_POST["entity_restrict"]."'";
else $where.=" WHERE glpi_dropdown_netpoint.FK_entities='".$_POST["entity_restrict"]."'";
$where.= " AND glpi_dropdown_netpoint.FK_entities='".$_POST["entity_restrict"]."'";
} else {
$link="";
if (!empty($where)) $link= " AND ";
else $link=" WHERE ";
$where.=getEntitiesRestrictRequest($link,"glpi_dropdown_locations");
$where.=getEntitiesRestrictRequest(" AND ","glpi_dropdown_locations");
}
$query = "SELECT glpi_dropdown_netpoint.comments as comments, glpi_dropdown_netpoint.ID as ID, glpi_dropdown_netpoint.name as netpname, glpi_dropdown_locations.completename as loc from glpi_dropdown_netpoint";
$query .= " LEFT JOIN glpi_dropdown_locations ON (glpi_dropdown_netpoint.location = glpi_dropdown_locations.ID)";
$query.=$where;
$query .= " ORDER BY glpi_dropdown_locations.completename, glpi_dropdown_netpoint.name $LIMIT";
if (isset($_POST["devtype"])&&$_POST["devtype"]>0){
$query .= " LEFT JOIN glpi_networking_ports ON (glpi_dropdown_netpoint.ID = glpi_networking_ports.netpoint";
if ($_POST["devtype"]==NETWORKING_TYPE){
$query .= " AND glpi_networking_ports.device_type =" . NETWORKING_TYPE .")";
}
else {
$query .= " AND glpi_networking_ports.device_type !=" . NETWORKING_TYPE .")";
if (isset($_POST["location"]) && $_POST["location"]>=0){
$where.=" AND glpi_dropdown_netpoint.location='".$_POST["location"]."' ";
}
}
$where.=" AND glpi_networking_ports.netpoint IS NULL ";
} else if (isset($_POST["location"]) && $_POST["location"]>=0){
$where.=" AND glpi_dropdown_netpoint.location='".$_POST["location"]."' ";
}
$query .= $where . " ORDER BY glpi_dropdown_locations.completename, glpi_dropdown_netpoint.name $LIMIT";
//logInFile("debug","SQL:".$query."\n\n");
$result = $DB->query($query);
echo "<select id='dropdown_".$_POST["myname"].$_POST["rand"]."' name=\"".$_POST['myname']."\" size='1'>";
......
......@@ -49,15 +49,15 @@ checkRight("software","w");
$rand=mt_rand();
$where="";
$leftjoin="";
// only global and free
if ($_POST['only_globalfree']){
$leftjoin="LEFT JOIN glpi_licenses ON (glpi_licenses.sID = glpi_software.ID )";
$where="AND (glpi_licenses.serial='global' OR glpi_licenses.serial='free') ";
}
$where="";
$leftjoin="";
// only global and free
if ($_POST['only_globalfree']){
$leftjoin="LEFT JOIN glpi_licenses ON (glpi_licenses.sID = glpi_software.ID )";
$where="AND (glpi_licenses.serial='global' OR glpi_licenses.serial='free') ";
}
if (strlen($_POST['searchText'])>0&&$_POST['searchText']!=$CFG_GLPI["ajax_wildcard"])
$where.=" AND name ".makeTextSearch($_POST['searchText'])." ";
......@@ -69,17 +69,17 @@ $result = $DB->query($query);
echo "<select name='sID' id='item_type$rand'>\n";
echo "<option value='0'>-----</option>\n";
if ($DB->numrows($result))
while ($data=$DB->fetch_array($result)) {
$sID = $data["ID"];
$output=$data["name"];
echo "<option value='$sID' title=\"$output\">".substr($output,0,$CFG_GLPI["dropdown_limit"])."</option>";
}
while ($data=$DB->fetch_array($result)) {
$sID = $data["ID"];
$output=$data["name"];
echo "<option value='$sID' title=\"$output\">".substr($output,0,$CFG_GLPI["dropdown_limit"])."</option>";
}
echo "</select>\n";
$params=array('sID'=>'__VALUE__',
'myname'=>$_POST["myname"],
'only_globalfree'=>$_POST["only_globalfree"]
'only_globalfree'=>$_POST["only_globalfree"],
);
ajaxUpdateItemOnSelectEvent("item_type$rand","show_".$_POST["myname"].$rand,$CFG_GLPI["root_doc"]."/ajax/dropdownInstallLicense.php",$params,false);
......
......@@ -34,7 +34,6 @@
// ----------------------------------------------------------------------
// Direct access to file
if(ereg("dropdownValue.php",$_SERVER['PHP_SELF'])){
define('GLPI_ROOT','..');
// Include plugin if it is a plugin table
......@@ -56,21 +55,16 @@ checkLoginUser();
if (isset($_POST["entity_restrict"])&&!is_numeric($_POST["entity_restrict"])&&!is_array($_POST["entity_restrict"])){
$_POST["entity_restrict"]=unserialize($_POST["entity_restrict"]);
}
// Make a select box with preselected values
if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
$first=true;
$where="WHERE ";
$where="WHERE 1 ";
if (in_array($_POST['table'],$CFG_GLPI["deleted_tables"])){
if (!$first) $where.=" AND ";
else $first=false;
$where.=" deleted='N' ";
$where.=" AND deleted='N' ";
}
if (in_array($_POST['table'],$CFG_GLPI["template_tables"])){
if (!$first) $where.=" AND ";
else $first=false;
$where.=" is_template='0' ";
$where.=" AND is_template='0' ";
}
......@@ -80,9 +74,7 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
if (in_array($_POST['table'],$CFG_GLPI["dropdowntree_tables"])){
if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"]){
if (!$first) $where.=" AND ";
else $first=false;
$where.=" completename ".makeTextSearch($_POST['searchText']);
$where.=" AND completename ".makeTextSearch($_POST['searchText']);
}
......@@ -98,22 +90,17 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
}
if (!$first) $where.=" AND ";
else $first=false;
if (isset($_POST["entity_restrict"])&&$_POST["entity_restrict"]>=0){
$where.=getEntitiesRestrictRequest("",$_POST['table'],$field,$_POST["entity_restrict"]);
$where.=getEntitiesRestrictRequest(" AND ",$_POST['table'],$field,$_POST["entity_restrict"]);
} else {
$where.=getEntitiesRestrictRequest("",$_POST['table'],$field);
$where.=getEntitiesRestrictRequest(" AND ",$_POST['table'],$field);
}
}
if ($where=="WHERE ") $where="";
$query = "SELECT * FROM ".$_POST['table']." $where ORDER BY $add_order completename $LIMIT";
//error_log("SQL1:".$query);
$result = $DB->query($query);
echo "<select id='dropdown_".$_POST["myname"].$_POST["rand"]."' name=\"".$_POST['myname']."\" size='1'>";
......@@ -126,19 +113,17 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
echo "<option class='tree' value=\"0\">--".$LANG["knowbase"][12]."--</option>";
break;
case "glpi_entities" :
// If entity=0 allowed
if (isset($_POST["entity_restrict"])&&
(($_POST["entity_restrict"]<0 && in_array(0,$_SESSION['glpiactiveentities']))
|| (is_array($_POST["entity_restrict"]) && in_array(0,$_POST["entity_restrict"]))))
{
// If entity=0 allowed
if (isset($_POST["entity_restrict"])&&
(($_POST["entity_restrict"]<0 && in_array(0,$_SESSION['glpiactiveentities']))
|| (is_array($_POST["entity_restrict"]) && in_array(0,$_POST["entity_restrict"]))))
{
echo "<option class='tree' value=\"0\">--".$LANG["entity"][2]."--</option>";
}
// Entity=0 already add above
if ($_POST['value']==0){
$display_selected=false;
}
}
// Entity=0 already add above
if ($_POST['value']==0){
$display_selected=false;
}
break;
default :
echo "<option class='tree' value=\"0\">-----</option>";
......@@ -189,17 +174,28 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
}
echo "</select>";
} else {
if (!$first) $where.=" AND ";
else $first=false;
$where .=" ID <> '".$_POST['value']."' ";
} else { // Not dropdowntree_tables
$where .=" AND ID NOT IN (".$_POST['value'];
if (isset($_POST['used'])) {
if (is_array($_POST['used'])) {
$used=$_POST['used'];
} else {
$used=unserialize(stripslashes($_POST['used']));
}
foreach($used as $val)
$where .= ", $val";
}
$where .= ") ";
$multi=false;
if (in_array($_POST['table'],$CFG_GLPI["specif_entities_tables"])){
$multi=in_array($_POST['table'],$CFG_GLPI["recursive_type"]);
if (isset($_POST["entity_restrict"])&&$_POST["entity_restrict"]>=0){
$where.=getEntitiesRestrictRequest("AND",$_POST['table'],"FK_entities",$_POST["entity_restrict"]);
$where.=getEntitiesRestrictRequest("AND",$_POST['table'],"FK_entities",$_POST["entity_restrict"],$multi);
} else {
$where.=getEntitiesRestrictRequest("AND",$_POST['table']);
$where.=getEntitiesRestrictRequest("AND",$_POST['table'],'','',in_array($_POST['table'],$CFG_GLPI["recursive_type"]));
if (count($_SESSION['glpiactiveentities'])>1) $multi=true;
}
}
......@@ -209,16 +205,20 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
if ($_POST['searchText']!=$CFG_GLPI["ajax_wildcard"])
$where.=" AND $field ".makeTextSearch($_POST['searchText']);
switch ($_POST['table']){
case "glpi_contacts":
$query = "SELECT CONCAT(name,' ',firstname) as $field, ".$_POST['table'].".comments, ".$_POST['table'].".ID FROM ".$_POST['table']." $where ORDER BY $field $LIMIT";
$query = "SELECT FK_entities, CONCAT(name,' ',firstname) as $field, ".$_POST['table'].".comments, ".$_POST['table'].".ID FROM ".$_POST['table']." $where";
break;
default :
$query = "SELECT * FROM ".$_POST['table']." $where ORDER BY $field $LIMIT";
$query = "SELECT * FROM ".$_POST['table']." $where";
break;
}
// echo $query;
if ($multi) {
$query.=" ORDER BY FK_entities, $field $LIMIT";
} else {
$query.=" ORDER BY $field $LIMIT";
}
//error_log("SQL2:".$query);
$result = $DB->query($query);
echo "<select id='dropdown_".$_POST["myname"].$_POST["rand"]."' name=\"".$_POST['myname']."\" size='1'>";
......@@ -234,6 +234,7 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
}
if ($DB->numrows($result)) {
$prev=-1;
while ($data =$DB->fetch_array($result)) {
$output = $data[$field];
if (isset($_POST['withserial'])&&isset($data["serial"])) $output.=" - ".$data["serial"];
......@@ -243,8 +244,18 @@ if (!isset($_POST["limit"])) $_POST["limit"]=$CFG_GLPI["dropdown_limit"];
if (isset($data["comments"])) $addcomment=" - ".$data["comments"];
if (empty($output)) $output="($ID)";
if ($multi && $data["FK_entities"]!=$prev) {
if ($prev>=0) {
echo "</optgroup>";
}
$prev=$data["FK_entities"];
echo "<optgroup label=\"". getDropdownName("glpi_entities", $prev) ."\">";
}
echo "<option value=\"$ID\" title=\"$output$addcomment\">".utf8_substr($output,0,$_POST["limit"])."</option>";
}
if ($multi) {
echo "</optgroup>";
}
}
echo "</select>";
}
......
......@@ -61,41 +61,18 @@ if (!defined('GLPI_ROOT')){
$_POST["field"]=key($RULES_ACTIONS[$_POST["rule_type"]]);
}
dropdownRulesActions("action_type");
$rand=dropdownRulesActions($_POST["rule_type"],"action_type",$_POST["field"]);
echo "&nbsp;&nbsp;";
$display=false;
if (isset($RULES_ACTIONS[$_POST["rule_type"]][$_POST["field"]]['type'])){
switch($RULES_ACTIONS[$_POST["rule_type"]][$_POST["field"]]['type']){
case "dropdown":
dropdownValue($RULES_ACTIONS[$_POST["rule_type"]][$_POST["field"]]['table'],"value");
$display=true;
break;
case "dropdown_assign":
dropdownUsers("value",0,"own_ticket");
$display=true;
break;
case "dropdown_users":
dropdownAllUsers("value");
$display=true;
break;
case "dropdown_priority":
dropdownPriority("value");
$display=true;
break;
case "yesno":
dropdownYesNo("value");
$display=true;
break;
}
}
if (!$display){
autocompletionTextField("value", "glpi_rules_actions", "value", "", 30);
}
echo "<span id='action_type_span'>\n";
echo "</span>\n";
$params=array('action_type'=>'__VALUE__',
'field'=>$_POST["field"],
'rule_type'=>$_POST["rule_type"],
);
ajaxUpdateItemOnSelectEvent("dropdown_action_type$rand","action_type_span",$CFG_GLPI["root_doc"]."/ajax/ruleactionvalue.php",$params,false);
ajaxUpdateItem("action_type_span",$CFG_GLPI["root_doc"]."/ajax/ruleactionvalue.php",$params,false,"dropdown_action_type$rand");
}
......
<?php
/*
* @version $Id$
-------------------------------------------------------------------------
GLPI - Gestionnaire Libre de Parc Informatique
Copyright (C) 2003-2007 by the INDEPNET Development Team.
http://indepnet.net/ http://glpi-project.org
-------------------------------------------------------------------------
LICENSE
This file is part of GLPI.
GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLPI; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file: Julien Dombre
// Purpose of file:
// ----------------------------------------------------------------------
// Direct access to file
if(ereg("ruleactionvalue.php",$_SERVER['PHP_SELF'])){
define('GLPI_ROOT','..');
$AJAX_INCLUDE=1;
include (GLPI_ROOT."/inc/includes.php");
header("Content-Type: text/html; charset=UTF-8");
header_nocache();
};
if (!defined('GLPI_ROOT')){
die("Can not acces directly to this file");
}
include_once (GLPI_ROOT."/inc/rulesengine.function.php");
checkLoginUser();
$display=false;
switch ($_POST["action_type"])
{
default:
if (isset($RULES_ACTIONS[$_POST["rule_type"]][$_POST["field"]]['type'])){
switch($RULES_ACTIONS[$_POST["rule_type"]][$_POST["field"]]['type']){
case "dropdown":
dropdownValue($RULES_ACTIONS[$_POST["rule_type"]][$_POST["field"]]['table'],"value");
$display=true;
break;
case "dropdown_assign":
dropdownUsers("value",0,"own_ticket");
$display=true;
break;
case "dropdown_users":
dropdownAllUsers("value");
$display=true;
break;
case "dropdown_priority":
dropdownPriority("value");
$display=true;
break;
case "yesno":
dropdownYesNo("value");
$display=true;
break;
}
}
if (!$display){
autocompletionTextField("value", "glpi_rules_actions", "value", "", 30);
}
break;
case "ignore":
dropdownYesNo("value");
break;
}
?>
......@@ -58,9 +58,9 @@
echo "&nbsp;&nbsp;<input type='submit' name='move' value='".$LANG["buttons"][14]."' class='submit'>";
break;
case "delete_similar_license":
echo "&nbsp;&nbsp;<input type='submit' name='delete_similar_license' value='".$LANG["buttons"][6]."' class='submit'>";
echo "&nbsp;&nbsp;<input type='submit' name='delete_similar_license' value='".$LANG["buttons"][6]."' class='submit'>";
break;
case "delete_license":
case "delete_license":
echo "&nbsp;&nbsp;<input type='submit' name='delete_license' value='".$LANG["buttons"][6]."' class='submit'>";
break;
case "move_to_software":
......
......@@ -37,6 +37,7 @@
die("Sorry. You can't access directly to this file");
}
include_once (GLPI_ROOT."/config/based_config.php");
include_once (GLPI_ROOT."/inc/dbreplicate.function.php");
include (GLPI_ROOT."/config/define.php");
setGlpiSessionPath();
......@@ -61,7 +62,9 @@
include_once (GLPI_ROOT."/lib/cache_lite/Lite/Output.php");
include_once (GLPI_ROOT."/lib/cache_lite/Lite/File.php");
$DB = new DB;
//Database connection
establishDBConnection((isset($USEDBREPLICATE)?$USEDBREPLICATE:0),
(isset($DBCONNECTION_REQUIRED)?$DBCONNECTION_REQUIRED:0));
// *************************** Statics config options **********************
......
<?php
// Current version of GLPI
define("GLPI_VERSION","0.7");
define("GLPI_VERSION","0.71");
// dicts
// dictionnaires
......@@ -88,7 +88,8 @@
define("MAILGATE_TYPE",35);
define("RULE_TYPE",36);
define("TRANSFER_TYPE",37);
define("DB_REPLICATE_TYPE",11);//
// GLPI MODE
define("NORMAL_MODE",0);
define("TRANSLATION_MODE",1);
......@@ -150,6 +151,7 @@
define("USER_MAILING_TYPE",1);
define("PROFILE_MAILING_TYPE",2);
define("GROUP_MAILING_TYPE",3);
define("DB_NOTIFICATION_MAILING_TYPE",3);
// MAILING USERS TYPE
define("ADMIN_MAILING",1);
......@@ -257,7 +259,18 @@
RULE_TYPE => "???",
TRANSFER_TYPE => "front/transfer.form.php",
);
$SEARCH_PAGES=array(
COMPUTER_TYPE=> "front/computer.php",
NETWORKING_TYPE => "front/networking.php",
PRINTER_TYPE => "front/printer.php",
MONITOR_TYPE => "front/monitor.php",
SOFTWARE_TYPE => "front/software.php",
PERIPHERAL_TYPE => "front/peripheral.php",
CONTACT_TYPE => "front/contact.php",
ENTERPRISE_TYPE => "front/enterprise.php",
CONTRACT_TYPE => "front/contract.php",
DOCUMENT_TYPE => "front/document.php",
);
define("AUTH_CAS",0);
define("AUTH_DB_GLPI",1);
define("AUTH_MAIL",2);
......@@ -278,10 +291,33 @@
define("AND_MATCHING","AND");
define("OR_MATCHING","OR");
define("RULE_NOT_IN_CACHE",-1);
define("RULE_OCS_AFFECT_COMPUTER",0);
define("RULE_AFFECT_RIGHTS",1);
define("RULE_TRACKING_AUTO_ACTION",2);
define("RULE_SOFTWARE_CATEGORY",3);
define("RULE_DICTIONNARY_SOFTWARE",4);
define("RULE_DICTIONNARY_MANUFACTURER",5);
define("RULE_DICTIONNARY_MODEL_COMPUTER",6);
define("RULE_DICTIONNARY_TYPE_COMPUTER",7);
define("RULE_DICTIONNARY_MODEL_MONITOR",8);
define("RULE_DICTIONNARY_TYPE_MONITOR",9);
define("RULE_DICTIONNARY_MODEL_PRINTER",10);
define("RULE_DICTIONNARY_TYPE_PRINTER",11);
define("RULE_DICTIONNARY_MODEL_PHONE",12);
define("RULE_DICTIONNARY_TYPE_PHONE",13);
define("RULE_DICTIONNARY_MODEL_PERIPHERAL",14);
define("RULE_DICTIONNARY_TYPE_PERIPHERAL",15);
define("RULE_DICTIONNARY_MODEL_NETWORKING",16);
define("RULE_DICTIONNARY_TYPE_NETWORKING",17);
define("RULE_DICTIONNARY_OS",18);
define("RULE_DICTIONNARY_OS_SP",19);