Index du Forum » » SFORM

Auteur

Dans quel cas Sform.php écrit il dans la table sform ?
Pomme
7540       
 

  Posté : 17-09-2004 14:48

mais je comprend pas à quoi ça sert...



  /**************************************************************** **********************/
  function sform_insert_mysql($response) {
     $content=$this->write_sform_data($response);
     $sql = "INSERT INTO sform (id_form, id_key, key_value, passwd, content) ";
     $sql .= "VALUES ('".$this->form_title."', '".$this->form_key."', '".$this->form_key_value."', '".$this->form_password_access."', '$content')";
     if (!$result = mysql_query($sql)) {
        return ("Error Sform : Insert DB");
     }
  }

  /**************************************************************** **********************/
  function sform_delete_mysql() {
     $sql = "DELETE FROM sform WHERE id_form='".$this->form_title."' and id_key='".$this->form_key."' and key_value='".$this->form_key_value."'";
     if (!$result = mysql_query($sql)) {
        return ("Error Sform : Delete DB");
     }
  }

  /**************************************************************** **********************/
  function sform_modify_mysql($response) {
     $content=$this->write_sform_data($response);
     $sql = "UPDATE sform SET passwd='".$this->form_password_access."', content='$content' WHERE (id_form='".$this->form_title."' and id_key='".$this->form_key."' and key_value='".$this->form_key_value."')";
     if (!$result = mysql_query($sql)) {
        return ("Error Sform : Update DB");
     }
  }

  /**************************************************************** **********************/
  function sform_read_mysql_XML($clef) {
    if ($clef!="") {
        $clef=urldecode($clef);
        $result=mysql_query("select content from sform where id_form='".$this->form_title."' and id_key='".$this->form_key."' and key_value='$clef' and passwd='".$this->form_password_access."' ORDER BY key_value ASC");
        $tmp = mysql_fetch_array($result);

        $analyseur_xml = xml_parser_create();

        xml_parser_set_option($analys eur_xml,XML_OPTION_CASE_FOLDING,0);
        xml_parse_into_struct($analys eur_xml,$tmp[content],$value,$tag);

        $this->sform_XML_tag($valu e);

        xml_parser_free($analyseur_xm l);
        return(true);
    }   else return(false);
  }



y'a que ça qui s'en sert... c'est pour stocker du xml ds la base mais j'vois pas ce qu'on en fait...



Cet article provient de NPDS

http://www.npds.org/viewtopic.php?topic=13503&forum=19