<?php
	require_once('../common/scripts/connect.inc.php');
	require_once('../common/scripts/template.inc.php');
	
	
 // $idMimi = $_POST['idMimi'];
  $idEquip = $_POST['idEquip'];
  $equip=pg_query($dbconn,"select obj_equip from equipements where equip_id =$idEquip"); 
  $equip = pg_fetch_array($equip);
  
  $mimi=pg_query($dbconn,"select char_id from equipements where equip_id =$idEquip"); 
  $mimi= pg_fetch_array($mimi);
  
 if ($equip[0]=='f') 
 
 $equipe=pg_query($dbconn,"UPDATE equipements SET obj_equip = 'TRUE' WHERE equip_id = $idEquip");

 
  else  
  $desequipe=pg_query($dbconn,"UPDATE equipements SET obj_equip = 'FALSE' WHERE equip_id = $idEquip"); 
   


?>
