".$LANG['planning'][9]." : | "; + echo ""; + User::dropdown(array('name' => "plan[users_id]", + 'value' => $_POST["users_id"], + 'right' => "own_ticket", + 'entity' => $_POST["entity"])); + echo " |
".$LANG['state'][0]." : | "; +echo ""; +Planning::dropdownState("plan[state]",$state); +echo " |
".$LANG['search'][8]." : | "; + +$rand_begin=showDateTimeFormItem("plan[begin]",$begin,-1,false,true,'','',$CFG_GLPI["planning_begin"],$CFG_GLPI["planning_end"]); +echo " |
".$LANG['financial'][8]." : | ";
+
+
+$values=array(0=>$LANG['search'][12],
+ 15*MINUTE_TIMESTAMP => '0'.$LANG['gmt'][2].'15',
+ 30*MINUTE_TIMESTAMP => '0'.$LANG['gmt'][2].'30',
+ 45*MINUTE_TIMESTAMP => '0'.$LANG['gmt'][2].'45',
+ 60*MINUTE_TIMESTAMP => '1'.$LANG['gmt'][2].'00',
+ 90*MINUTE_TIMESTAMP => '1'.$LANG['gmt'][2].'30',
+ 120*MINUTE_TIMESTAMP => '2'.$LANG['gmt'][2].'00',
+ 150*MINUTE_TIMESTAMP => '2'.$LANG['gmt'][2].'30',
+ 180*MINUTE_TIMESTAMP => '3'.$LANG['gmt'][2].'00',
+ 210*MINUTE_TIMESTAMP => '3'.$LANG['gmt'][2].'30',
+ 4*HOUR_TIMESTAMP => '4'.$LANG['gmt'][2].'00',
+ 5*HOUR_TIMESTAMP => '5'.$LANG['gmt'][2].'00',
+ 6*HOUR_TIMESTAMP => '6'.$LANG['gmt'][2].'00',
+ 7*HOUR_TIMESTAMP => '7'.$LANG['gmt'][2].'00',
+ 8*HOUR_TIMESTAMP => '8'.$LANG['gmt'][2].'00');
+
+
+$default_delay=0;
+
+$begin_timestamp=strtotime($begin);
+$end_timestamp=strtotime($end);
+// Floor with MINUTE_TIMESTAMP for rounded purpose
+$computed_delay=floor(($end_timestamp-$begin_timestamp)/15/MINUTE_TIMESTAMP)*15*MINUTE_TIMESTAMP;
+$default_delay=0;
+
+if (isset($values[$computed_delay])) {
+ $default_delay=$computed_delay;
+}
+$rand=Dropdown::showFromArray("plan[_duration]",$values,array('value'=>$default_delay));
+
+
+//showDateTimeFormItem("plan[end]",$end,-1,false,true,'','',$global_begin,$global_end);
+echo " "; + +$params=array('duration' => '__VALUE__', + 'end'=>$end, + 'global_begin'=>$CFG_GLPI["planning_begin"], + 'global_end'=>$CFG_GLPI["planning_end"]); +ajaxUpdateItemOnSelectEvent("dropdown_plan[_duration]$rand", + "date_end$rand",$CFG_GLPI["root_doc"]."/ajax/planningend.php",$params,false); + + +if($default_delay==0){ + $params['duration']=0; + ajaxUpdateItem("date_end$rand",$CFG_GLPI["root_doc"]."/ajax/planningend.php",$params); +} + + + + +echo " |
Error : GLPI seems to not be installed properly.
"; + echo "config_db.php file is missing.
"; + echo "Please restart the install process.
"; + echo ""; + echo ""; + } else { + echo "Error : GLPI seems to not be installed properly.\n"; + echo "config_db.php file is missing.\n"; + echo "Please restart the install process.\n"; + } + nullFooter(); + + die(); +} else { + require_once (GLPI_CONFIG_DIR . "/config_db.php"); + include_once (GLPI_CACHE_LITE_DIR."/Lite/Output.php"); + include_once (GLPI_CACHE_LITE_DIR."/Lite/File.php"); + + //Database connection + DBConnection::establishDBConnection((isset($USEDBREPLICATE) ? $USEDBREPLICATE : 0), + (isset($DBCONNECTION_REQUIRED) ? $DBCONNECTION_REQUIRED : 0)); + + + // *************************** Statics config options ********************** + // ********************options d'installation statiques********************* + // ************************************************************************* + + //Options from DB, do not touch this part. + + // Default Use mode + if (!isset($_SESSION['glpi_use_mode'])) { + $_SESSION['glpi_use_mode']=NORMAL_MODE; + } + + $config_object=new Config(); + $config_ok=false; + + if (!isset($_GET['donotcheckversion']) && // use normal config table on restore process + (isset($TRY_OLD_CONFIG_FIRST) // index case + || (isset($_SESSION['TRY_OLD_CONFIG_FIRST']) && $_SESSION['TRY_OLD_CONFIG_FIRST']))) { // backup case + + if (isset($_SESSION['TRY_OLD_CONFIG_FIRST'])) { + unset($_SESSION['TRY_OLD_CONFIG_FIRST']); + } + // First try old config table : for update proces management from < 0.80 to >= 0.80 + $config_object->forceTable('glpi_config'); + if ($config_object->getFromDB(1)) { + $config_ok=true; + } else { + $config_object->forceTable('glpi_configs'); + if ($config_object->getFromDB(1)) { + $config_ok=true; + } + } + } else { // Normal load process : use normal config table. If problem try old one + if($config_object->getFromDB(1)) { + $config_ok=true; + } else { + // Manage glpi_config table before 0.80 + $config_object->forceTable('glpi_config'); + if ($config_object->getFromDB(1)) { + $config_ok=true; + } + } + } + + if ($config_ok) { + $CFG_GLPI=array_merge($CFG_GLPI,$config_object->fields); + $CFG_GLPI['priority_matrix'] = importArrayFromDB($config_object->fields['priority_matrix'],true); + + Config::detectRootDoc(); + + // Path for icon of document type + $CFG_GLPI["typedoc_icon_dir"] = $CFG_GLPI["root_doc"]."/pics/icones"; + } else { + echo "Error accessing config table"; + exit(); + } + + // If debug mode activated : display some informations + if ($_SESSION['glpi_use_mode']==DEBUG_MODE) { + // display_errors only need for for E_ERROR, E_PARSE, ... which cannot be catched + ini_set('display_errors','On'); + // Recommended development settings + error_reporting(E_ALL | E_STRICT); + set_error_handler('userErrorHandlerDebug'); + } else { + // Recommended production settings + ini_set('display_errors','Off'); + error_reporting(E_ALL); + set_error_handler('userErrorHandlerNormal'); + } + + if (isset($_SESSION["glpiroot"]) && $CFG_GLPI["root_doc"]!=$_SESSION["glpiroot"]) { + glpi_header($_SESSION["glpiroot"]); + } + + // Override cfg_features by session value + foreach ($CFG_GLPI['user_pref_field'] as $field) { + if (!isset($_SESSION["glpi$field"]) && isset($CFG_GLPI[$field])) { + $_SESSION["glpi$field"]=$CFG_GLPI[$field]; + } + } + + if ((!isset($CFG_GLPI["version"]) || trim($CFG_GLPI["version"])!=GLPI_VERSION) + && !isset($_GET["donotcheckversion"])) { + + loadLanguage(); + if (isCommandLine()) { + echo $LANG['update'][88] . "\n"; + } else { + nullHeader("UPDATE NEEDED",$CFG_GLPI["root_doc"]); + echo "".$LANG['update'][88]."
"; + echo ""; + echo ""; + } else if (trim($CFG_GLPI["version"])>GLPI_VERSION) { + echo "".$LANG['update'][89]."
"; + } + } else { + echo ""; + } + echo ""; + echo " | |||
"; + echo "".$LANG['setup'][300].""; + echo " |
". + "". + " | ". + $LANG['backup'][0]." | ". + "". + $LANG['backup'][1]." |
+ | + | + | + | ||
---|---|---|---|---|---|
$file | ". + "" . $taille_fic . " kB | ". + "" . convDateTime(date("Y-m-d H:i",$date)) . " | ". + "".$LANG['buttons'][6]." | ". + "".$LANG['buttons'][21]." | ". + "".$LANG['backup'][13]."". + " |
$file | ". + "" . $taille_fic . " kB | ". + "" . convDateTime(date("Y-m-d H:i",$date)) . " | ". + "".$LANG['buttons'][6]." | ". + "- | ". + "".$LANG['backup'][13]."". + " |
" . $LANG['rulesengine'][77] . " | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ";
+
+echo "
| ";
+
+echo "
| ";
+
+echo "
|
".$LANG['help'][22]."
"; +echo " "; + +if (isset($_POST["send"])) { + echo "".$LANG['reports'][19]." | "; + echo "".$LANG['help'][24]." | "; + echo "".$LANG['common'][1]." | "; + echo "".$LANG['common'][2]." | "; + echo "".$LANG['common'][19]." / ". + $LANG['common'][20]." | "; + echo "
$Contact | "; + echo "$label | "; + echo "$Computer | "; + echo "$Comp_num | "; + echo ""; + if ($s1 != "") { + echo $s1; + } + if ($s1!="" && $s2!="") { + echo " / "; + } + if ($s2 != "") { + echo $s2; + } + echo " |
"; + echo " | ".$LANG['help'][31]." | "; + echo "$Computer | "; + echo "$Comp_num | "; + echo "
".$LANG['ldap'][23]." |
---|
". + $LANG['ldap'][24]." |
".$LANG['ldap'][0]." |
---|
". + $LANG['ldap'][1]." |
". + $LANG['ldap'][2]." |
" . $LANG['Menu'][39] . " | |
---|---|
" . $LANG['setup'][165] . " |
" . $LANG['ocsng'][0] . " " . $name . " |
---|
" . $LANG['ocsng'][1] . + " |
" . $LANG['ocsng'][2] . + " |
" . $LANG['ocsng'][4] . + " |
" . $LANG['ocsng'][3] . + " |