[ Index ]
 

Code source de SPIP Agora 1.4

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/Agora1-4/ecrire/ -> do_contact.php (source)

   1  <?php
   2  require_once (dirname(__FILE__)."/include/bd/inc_contact_factory.php");
   3  require_once (dirname(__FILE__)."/include/bd/inc_config_metier.php");
   4  if (file_exists(dirname(__FILE__)."/mes_options.php")) {
   5          require_once (dirname(__FILE__)."/mes_options.php");
   6  } else {
   7      $GLOBALS['table_prefix'] = 'spip';
   8  }
   9  require_once (dirname(__FILE__)."/include/bd/inc_metier_factory.php");
  10  $dbMetier = &recuperer_instance_metier();
  11  $db = &$dbMetier->_getDB();
  12  
  13  $id_rubrique = $_POST["id_rubrique"];
  14  $id_contact = $_POST["id_contact"];
  15  $id_action = $_POST["id_action"];
  16  
  17  $contactMetier = & recuperer_instance_contact();
  18  
  19  if ( $id_action == 0 ) {
  20      $deleteOK = $contactMetier->deleteRelationByRubriqueIdAndContactIds($id_rubrique, join(',', $id_contact));
  21      if (PEAR :: isError($deleteOK)) {
  22          die($deleteOK->getMessage());
  23      }
  24          header ("Location: naviguer.php?coll=$id_rubrique&contact");
  25  }
  26  if ( $id_action == 1 ) {
  27      $createOK = $contactMetier->createRelation($id_rubrique, $id_contact);
  28      if (PEAR :: isError($createOK)) {
  29          die($createOK->getMessage());
  30      }
  31      header ("Location: naviguer.php?coll=$id_rubrique&contact");
  32  }
  33  ?>


Généré le : Sat Feb 24 14:40:03 2007 par Balluche grâce à PHPXref 0.7