From: x2000coic Date: Thu, 11 Nov 2004 12:11:24 +0000 (+0000) Subject: separate server code from common code X-Git-Tag: xorg/old~990 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=cbac89b4ba6bc2a1e49d453798c416c9adeb4c12;p=platal.git separate server code from common code --- diff --git a/include/webservices/manageurs.inc.php b/include/webservices/manageurs.inc.php index 536ebc9..7805727 100644 --- a/include/webservices/manageurs.inc.php +++ b/include/webservices/manageurs.inc.php @@ -18,7 +18,7 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: manageurs.inc.php,v 1.1 2004-11-11 11:46:11 x2000coic Exp $ + $Id: manageurs.inc.php,v 1.2 2004-11-11 12:11:24 x2000coic Exp $ ***************************************************************************/ $error_mat = "You didn't provide me with a valid matricule number..."; @@ -72,31 +72,4 @@ function manageurs_decrypt_array($array){ return $result; } - -function get_annuaire_infos($method, $params) { - if (!empty($params[0])) { - $res = mysql_query("SELECT nom AS nom, epouse AS nom_patro, prenom AS prenom, promo AS prenom, deces=0 AS decede, mobile AS cell FROM auth_user_md5 WHERE matricule = '".addslashes($params[0])."'"); - if ($array = mysql_fetch_array($res)) { - // then it's perfectly fine ! we just have to use a good cypher... - - if(manageurs_encrypt_init($params[0]) == 1){ - $args = array("faultCode" => 1, "faultString" => $error_key); - $reply = xmlrpc_encode_request(NULL,$args); - } - else{ - $reply = manageurs_encrypt_array($array); - - manageurs_encrypt_close(); - } - } else { - $args = array("faultCode" => 1, "faultString" => $error_mat); - $reply = xmlrpc_encode_request(NULL,$args); - } - } else { - $args = array("faultCode" => 1, "faultString" => $error_mat); - $reply = xmlrpc_encode_request(NULL,$args); - } - return $reply; -} - ?> diff --git a/include/webservices/manageurs.server.inc.php b/include/webservices/manageurs.server.inc.php new file mode 100644 index 0000000..1da2058 --- /dev/null +++ b/include/webservices/manageurs.server.inc.php @@ -0,0 +1,31 @@ + 1, "faultString" => $error_key); + $reply = xmlrpc_encode_request(NULL,$args); + } + else{ + $reply = manageurs_encrypt_array($array); + + manageurs_encrypt_close(); + } + } else { + $args = array("faultCode" => 1, "faultString" => $error_mat); + $reply = xmlrpc_encode_request(NULL,$args); + } + } else { + $args = array("faultCode" => 1, "faultString" => $error_mat); + $reply = xmlrpc_encode_request(NULL,$args); + } + return $reply; +} + +?>