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
supprimer_catg3.php
Package: Generateur_v13.rar [view]
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 3k
Category:
WEB Mail
Development Platform:
PHP
- //script supprimer_catg3
- <?
- include "page_haut.inc";
- require ("xml_domit_parser.php");
- require ("xml_domit_utilities.php");
- require ("xml_domit_nodemaps.php");
- $catg=& new DOMIT_Document();
- $success=$catg->loadXML("./modules/administration/categories.xml");
- $nomcatg = count($catg->documentElement->childNodes);
- for ($i = 0; $i < $nomcatg; $i++) {
- $currentcatg =& $catg->documentElement->childNodes[$i];
- $catid=$currentcatg->childNodes[0]->firstChild->nodeValue;
- $n=$i;
- if($catid==$id){
- $catgnom=$currentcatg->childNodes[1]->firstChild->nodeValue;
- $lastcatg =& $catg->documentElement;
- $lastcatg->removeChild($catg->documentElement->childNodes[$n]);
- $succes=& $catg->saveXML("./modules/administration/categories.xml");
- $i--;
- }
- }
- $fichier = "./modules/administration/categories.xml";
- $id_fichier = fopen($fichier, "rb");
- $contenu = fread($id_fichier, filesize ($fichier));
- @fclose($fichier);
- @unlink ("./modules/administration/categories.xml");
- $f=fopen("./modules/administration/categories.xml","w");
- fputs($f,"<?xml version='1.0' encoding='ISO-8859-1' ?>r");
- fputs($f,$contenu);
- $scatg=& new DOMIT_Document();
- $success1=$scatg->loadXML("./modules/administration/souscategories.xml");
- $nomscatg = count($scatg->documentElement->childNodes);
- for ($j = 0; $j < $nomscatg; $j++) {
- $currentscatg =& $scatg->documentElement->childNodes[$j];
- $cx=$currentscatg->childNodes[3]->firstChild->nodeValue ;
- $x=$j;
- if($cx==$id){
- $scatid=$currentscatg->childNodes[0]->firstChild->nodeValue ;
- $lastscatg =& $scatg->documentElement;
- $lastscatg->removeChild($scatg->documentElement->childNodes[$x]);
- $succes=& $scatg->saveXML("./modules/administration/souscategories.xml");
- $j--;
- }
- }
- $fichier = "./modules/administration/souscategories.xml";
- $id_fichier = fopen($fichier, "rb");
- $contenu = fread($id_fichier, filesize ($fichier));
- @fclose($fichier);
- @unlink ("./modules/administration/souscategories.xml");
- $f=fopen("./modules/administration/souscategories.xml","w");
- fputs($f,"<?xml version='1.0' encoding='ISO-8859-1' ?>r");
- fputs($f,$contenu);
- $prd=& new DOMIT_Document();
- $success=$prd->loadXML("./modules/administration/produits.xml");
- $cmp = count($prd->documentElement->childNodes);
- for ($i = 0; $i < $cmp; $i++) {
- $currentprd =& $prd->documentElement->childNodes[$i];
- $caid=$currentprd->childNodes[9]->firstChild->nodeValue;
- $v=$i;
- if($caid==$id){
- $catg=$currentprd->childNodes[0]->firstChild->nodeValue;
- $lastprd =& $prd->documentElement;
- $lastprd->removeChild($prd->documentElement->childNodes[$v]);
- $succes=& $prd->saveXML("./modules/administration/produits.xml");
- $i--;
- }
- }
- $fichier = "./modules/administration/produits.xml";
- $id_fichier = fopen($fichier, "rb");
- $contenu = fread($id_fichier, filesize ($fichier));
- @fclose($fichier);
- @unlink ("./modules/administration/produits.xml.xml");
- $f=fopen("./modules/administration/produits.xml","w");
- fputs($f,"<?xml version='1.0' encoding='ISO-8859-1' ?>r");
- fputs($f,$contenu);
- ?>