Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
valide.php
Package: Generateur_v13.rar [view]
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 7k
Category:
WEB Mail
Development Platform:
PHP
- //script valide
- <?
- session_start();
- include("page_haut.inc");
- include "configuration.php";
- require ("xml_domit_parser.php");
- require ("xml_domit_utilities.php");
- require ("xml_domit_nodemaps.php");
- $expire="$carteexpire"."/"."$mois"."/"."$annee";
- $split = explode(",",$list);
- foreach ($split as $item) {
- $check = explode("+",$item);
- $cl=& new DOMIT_Document();
- $suces=$cl->loadXML("./modules/client/admin/modules/administration/clients.xml");
- $comp=count($cl->documentElement->childNodes);
- for($j=0;$j<$comp;$j++){
- $curtcl =& $cl->documentElement->childNodes[$j];
- $clientid=$curtcl->childNodes[0]->firstChild->nodeValue;
- if($clientid==$clid){
- $clientnom=$curtcl->childNodes[1]->firstChild->nodeValue;
- $clientvl=$curtcl->childNodes[3]->firstChild->nodeValue;
- $clientpa=$curtcl->childNodes[4]->firstChild->nodeValue;
- $clientadr=$curtcl->childNodes[5]->firstChild->nodeValue;
- $clienttel=$curtcl->childNodes[6]->firstChild->nodeValue;
- $clientmail=$curtcl->childNodes[7]->firstChild->nodeValue;
- }
- }
- $prd=& new DOMIT_Document();
- $success=$prd->loadXML("./modules/client/admin/modules/administration/produits.xml");
- $cmp = count($prd->documentElement->childNodes);
- for ($i = 0; $i < $cmp; $i++) {
- $currentprd =& $prd->documentElement->childNodes[$i];
- $prdid=$currentprd->childNodes[0]->firstChild->nodeValue;
- if($prdid==$check[0]){
- $prdnom=$currentprd->childNodes[1]->firstChild->nodeValue;
- $prdphoto=$currentprd->childNodes[8]->firstChild->nodeValue;
- $prdprix=$currentprd->childNodes[2]->firstChild->nodeValue;
- $prdfrais=$currentprd->childNodes[6]->firstChild->nodeValue;
- $price = $prdprix * $check[1];
- $price = sprintf("%0.3f", $price);
- if (!IsSet($total)) {
- $total = 0;
- }
- $total = $total + $price;
- $total = sprintf("%0.3f", $total);
- if (!IsSet($order)) {
- $order = "$check[1] x $prdnom";
- $quantite = $check[1];
- } else {
- $order = "$order,; $check[1] x $prdnom";
- $quantite = ($order + $check[1]);
- }
- }
- }
- $price = $total;
- }
- $date = date("j-m-y");
- $time=strftime("%H:%M:%S",time());
- $cmd=& new DOMIT_Document();
- $success=$cmd->loadXML("./modules/client/admin/modules/administration/commande.xml");
- $num = count($cmd->documentElement->childNodes);
- if($num==0)
- {
- $nb=0;
- }
- else{ $currentcmd =& $cmd->documentElement->childNodes[$num-1];
- $cmdid=$currentcmd->childNodes[0]->firstChild->nodeValue;
- $nb=$cmdid+1;
- }
- $newnode=$cmd->createElement("commande");
- $cmd->documentElement->appendChild($newnode);
- $newchild=& $cmd->documentElement->lastChild;
- $newchild->appendChild($cmd->createElement("id"));
- $newchild->appendChild($cmd->createElement("articles"));
- $newchild->appendChild($cmd->createElement("qte"));
- $newchild->appendChild($cmd->createElement("prix"));
- $newchild->appendChild($cmd->createElement("nom"));
- $newchild->appendChild($cmd->createElement("adresse"));
- $newchild->appendChild($cmd->createElement("ville"));
- $newchild->appendChild($cmd->createElement("pays"));
- $newchild->appendChild($cmd->createElement("tel"));
- $newchild->appendChild($cmd->createElement("email"));
- $newchild->appendChild($cmd->createElement("typecarte"));
- $newchild->appendChild($cmd->createElement("titulaire"));
- $newchild->appendChild($cmd->createElement("carteexpire"));
- $newchild->appendChild($cmd->createElement("cartenumero"));
- $newchild->appendChild($cmd->createElement("comments"));
- $newchild->appendChild($cmd->createElement("active"));
- $newchild->appendChild($cmd->createElement("cmde"));
- $newchild->appendChild($cmd->createElement("hid"));
- $newtextnod=& $cmd->createTextNode($nb);
- $newtextnodee=& $cmd->createTextNode($order);
- $newtextnode=& $cmd->createTextNode($quantite);
- $newtextnode1=& $cmd->createTextNode($price);
- $newtextnode2=& $cmd->createTextNode($clientnom);
- $newtextnode3=& $cmd->createTextNode($clientadr);
- $newtextnode5=& $cmd->createTextNode($clientvl);
- $newtextnode6=& $cmd->createTextNode($clientpa);
- $newtextnode7=& $cmd->createTextNode($clienttel);
- $newtextnode9=& $cmd->createTextNode($clientmail);
- $newtextnode10=& $cmd->createTextNode($typecarte);
- $newtextnode11=& $cmd->createTextNode($titulaire);
- $newtextnode12=& $cmd->createTextNode($expire);
- $newtextnode13=& $cmd->createTextNode($cartenumero);
- $newtextnode14=& $cmd->createTextNode($comments);
- $newtextnode15=& $cmd->createTextNode($active);
- $newtextnode16=& $cmd->createTextNode($date);
- $newtextnode17=& $cmd->createTextNode($hid);
- $new=& $cmd->documentElement->lastChild;
- $idnew=& $new->firstChild;
- $articlesnew=& $idnew->nextSibling;
- $qtenew=& $articlesnew->nextSibling;
- $prixnew=& $qtenew->nextSibling;
- $nomnew=& $prixnew->nextSibling;
- $adressenew=& $nomnew->nextSibling;
- $villenew=& $adressenew->nextSibling;
- $paysnew=& $villenew->nextSibling;
- $telnew=& $paysnew->nextSibling;
- $emailnew=& $telnew->nextSibling;
- $typecartenew=& $emailnew->nextSibling;
- $titulairenew=& $typecartenew->nextSibling;
- $carteexpirenew=& $titulairenew->nextSibling;
- $cartenumeronew=& $carteexpirenew->nextSibling;
- $commentsnew=& $cartenumeronew->nextSibling;
- $activenew=& $commentsnew->nextSibling;
- $cmdenew=& $activenew->nextSibling;
- $hidnew=& $cmdenew->nextSibling;
- $idnew->appendChild($newtextnod);
- $articlesnew->appendChild($newtextnodee);
- $qtenew->appendChild($newtextnode);
- $prixnew->appendChild($newtextnode1);
- $nomnew->appendChild($newtextnode2);
- $adressenew->appendChild($newtextnode3);
- $villenew->appendChild($newtextnode5);
- $paysnew->appendChild($newtextnode6);
- $telnew->appendChild($newtextnode7);
- $emailnew->appendChild($newtextnode9);
- $typecartenew->appendChild($newtextnode10);
- $titulairenew->appendChild($newtextnode11);
- $carteexpirenew->appendChild($newtextnode12);
- $cartenumeronew->appendChild($newtextnode13);
- $commentsnew->appendChild($newtextnode14);
- $activenew->appendChild($newtextnode15);
- $cmdenew->appendChild($newtextnode16);
- $hidnew->appendChild($newtextnode17);
- $succes=& $cmd->saveXML("./modules/client/admin/modules/administration/commande.xml");
- $fichier = "./modules/client/admin/modules/administration/commande.xml";
- $id_fichier = fopen($fichier, "rb");
- $contenu = fread($id_fichier, filesize ($fichier));
- @fclose($fichier);
- @unlink ("./modules/client/admin/modules/administration/commande.xml");
- $f=fopen("./modules/client/admin/modules/administration/commande.xml","w");
- fputs($f,"<?xml version='1.0' encoding='ISO-8859-1' ?>r");
- fputs($f,$contenu);
- ?>
- <script>
- document.location='?m=client&a=clients&nom=<? echo $clientnom ?>&id=<? echo $nb; ?>';
- </script>