loadmain.php
资源名称:minierp.rar [点击查看]
上传用户:yantgcom
上传日期:2013-07-19
资源大小:478k
文件大小:1k
源码类别:
MySQL数据库
开发平台:
PHP
- <?php
- function load_app_main_menu()
- {
- $mfile="themes/aqua/main_menu.xml";
- $sfile="themes/aqua/main_menu.xsl";
- $teobj=transdoc($mfile,$sfile);
- return $teobj;
- }
- function load_app_toplink()
- {
- $mfile="themes/aqua/toplink.xml";
- $sfile="themes/aqua/toplink.xsl";
- $teobj=transdoc($mfile,$sfile);
- return $teobj;
- }
- function load_app_logo()
- {
- echo '<div align="top"><a href="http://www.mzsoft.cn"><img src="themes/images/mini.gif" alt="minierp" border="0"></a> <img src="themes/images/jxc.gif" alt="minierp" border="0"></div>';
- }
- function load_app_sub_menu()
- {
- $mfile="themes/aqua/sub_menu.xml";
- $sfile="themes/aqua/sub_menu.xsl";
- $teobj=transdoc($mfile,$sfile);
- return $teobj;
- }
- function load_app_main_foot()
- {
- $mfile="themes/aqua/sub_menu.xml";
- $sfile="themes/aqua/sub_menu.xsl";
- $teobj=transdoc($mfile,$sfile);
- return $teobj;
- }
- function transdoc($mfile,$sfile)
- {
- $xmlfile=$mfile;
- $xslfile=$sfile;
- $xmldoc =new DomDocument();
- $xsldoc =new DomDocument();
- $xmldoc->async = false;
- $xsldoc->async = false;
- $xmldoc->load($xmlfile);
- $tmpnodes=$xmldoc->documentElement;
- //alert(tmpnodes);
- if (tmpnodes==null)
- {
- return null;
- };
- $xsldoc->load($xslfile);
- $proc = new XSLTProcessor;
- $proc->importStyleSheet($xsldoc);
- return $proc->transformToXML($xmldoc);
- }
- ?>