code
stringlengths
1
2.01M
repo_name
stringlengths
3
62
path
stringlengths
1
267
language
stringclasses
231 values
license
stringclasses
13 values
size
int64
1
2.01M
<tagLib name="html"/> <include file="./Index/Tpl/Home/default/public/header.htm" /> <script type="text/javascript"> //搜索客栈列表 function innSearch() { keyword = $(".searchkz #keyword").val(); city = $(".searchkz #city").val(); type = $(".searchkz #type").val(); url = "__ACTION__"; if(city!="") url += "-c-" + city; if(keyword!="") url += "-k-" + keyword; if(type!="") url += "-s-" + type; window.location.href = url; } /* (function($){ $(function(){ $("#city").tooltip({ events: {input:"keydown,blur"}, position:"bottom center" }); $("#city").keyup(function(){ if($(this).val()=="") this.getTip().hide(); }); $("#city").change(function() { if($(this).val() == "") //$(this). else $(this).tooltip({position:"bottom center"}); }); }); })(jQuery); */ </script> <!--顶部信息 end--> <!--top end--> <!--主体内容 start--> <div class="kz_list_content"> <div class="content"> <!--kzlist_left start--> <div class="kzlist_left"> <!--搜索客栈 start--> <div class="searchkz"> <div class="kzlist_left_title"> <ul class="white">搜索客栈</ul> </div> <div class="skz_nr"> <div class="mn"> <ul> <select id='city'> <volist name='innAreaProvince' id='province'> <optgroup label="<{$province.name}>"> <volist name='innCity[$province["id"]]' id='city'> <option value='<{$city.id}>'><{$city.name}></option> </volist> </optgroup> </volist> </select> </ul> <!-- <ul class="mn_xl tooltip"> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> </ul> --> </div> <!--<div class="mn"> <ul><input type="text" value="市的下级区县" /> </ul> <ul class="mn_xl"> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> </ul> </div>--> <div class="mn"> <div class="gjz"> <ul><input type="text" value="输入关键字" id='keyword' /></ul> </div> <div class="yf" style="float:right; margin:0;"> <html:select options="innTypeList" first="--按类型--" id='type' /> <!-- <ul><input type="text" value="按类型" id='type' /> </ul> <ul class="mn_xl"> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> </ul> --> </div> </div> <!--<div class="mn"> <div class="year"> <ul><input type="text" value="入住时间" /> </ul> <ul class="mn_xl"> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> </ul> </div> <div class="yf"> <ul><input type="text" value="按价格" /> </ul> <ul class="mn_xl"> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> <li><a href="">中国</a></li> </ul> </div> </div>--> <div class="kzlist_ss"> <ul><button onclick='innSearch()'>&nbsp;</button></ul> </div> </div> </div> <!--搜索客栈 start--> <div class="clear"></div> <!--今日入住 start--> <div class="jrrz"> <li> <span class="green bold">今日入住:</span> <span class="yellow bold ari"><{$innStat.checkin}></span> </li> <li> <span class="green bold">客栈共计:</span> <span class="yellow bold ari"><{$innStat.inncount}></span> </li> <li> <span class="green bold">在线人数:</span> <span class="yellow bold ari"><{$innStat.vister}></span> </li> <li> <span class="green bold">话题:</span> <span class="yellow bold ari"><{$innStat.subject}></span> </li> <li> <span class="green bold">累计已有:</span> <span class="yellow bold ari"><{$innStat.order}></span> <span class="green bold">人预订</span> </li> </div> <!--今日入住 end--> <div class="clear"></div> <!--英文 start--> <div class="yw"> <li><img src="__PUBLIC__/images/yw.jpg" /></li> </div> <!--英文 end--> <div class="clear"></div> <!--保障服务 start--> <present name='topBlogList'> <div class="k4"> <ul class="jdxx_title"><{$cityName}>游记攻略</ul> <ul class="ll_before"> <volist name='topBlogList' id='vo'> <li class="yjgl_nr"> <p> <span><a target="_blank" href="__UCHOME__/space.php?do=blog&id=<{$vo.blogid}>"><img width="110" height="60" src="__UCHOME__/attachment/<{$vo.pic}>" /></a></span> </p> <p class="yjgl_nr_right"> <span><a class="red bold" target="_blank" href="__UCHOME__/space.php?do=blog&id=<{$vo.blogid}>"><{$vo.subject}></a></span> <span class="yj_ly"> <a><img width="16" height="16" src="__UCENTER__/avatar.php?uid=<{$vo.uid}>&size=small"/></a> <a class="gray font12" target="_blank" href="__UCHOME__/space.php?uid=<{$vo.uid}>"><{$vo.username}>&nbsp;撰写</a> </span> <span class="font12"> <a class="black" target="_blank" href="__UCHOME__/space.php?do=blog&id=<{$vo.blogid}>"><{$vo.subject}></a> </span> </p> </li> </volist> <volist name='otherBlogList' id='vo'> <li class="zxyj"> <span> <a><img width="16" height="16" src="__UCENTER__/avatar.php?uid=<{$vo.uid}>&size=small"/></a> <a class="gray font12" target="_blank" href="__UCHOME__/space.php?do=blog&id=<{$vo.blogid}>"><{$vo.subject}></a> </span> </li> </volist> </ul> </div> </present> <!--保障服务 end--> <div class="clear"></div> <!--本月热门客栈 start--> <present name='picBlogList'> <div class="k4"> <ul class="jdxx_title"><{$cityName}>周边景区图集</ul> <ul class="ll_before"> <li class="jqtj"> <volist name='picBlogList' id='vo'> <span> <a href="__UCHOME__/space.php?do=blog&id=<{$vo.blogid}>" target="_blank"><img src="__UCHOME__/attachment/<{$vo.pic}>" /></a> <a href="__UCHOME__/space.php?do=blog&id=<{$vo.blogid}>" target="_blank"><{$vo.subject}></a> </span> </volist> </li> </ul> </div> </present> <!--本月热门客栈 end--> <div class="clear"></div> <!--本月热门城市 start--> <present name='hoteltour'> <div class="k4"> <ul class="jdxx_title"><{$cityName}>旅游</ul> <ul class="tj_kz"><{$hoteltour}></ul> </div> </present> <!--本月热门城市 end--> <div class="clear"></div> <!--推荐客栈 end--> </div> <!--kzlist_left end--> <!--kzlist_right start--> <div class="kzlist_right"> <!--推荐 start--> <div class="kz_list_tj"> <ul class="kztj_title"> <li>推荐</li> </ul> <ul class="kzlist_tj_nr"> <li><a href=""><img src="__PUBLIC__/images/jrtj.jpg" width="66" height="66" /></a></li> <li class="kz_tj_jd"> <volist name='recommendInnList' id='vo'> <p> <span><a href="__URL__/view-id-<{$vo.id}>" target="_blank"><{$vo.name}></a></span> <span class="yellow">¥<{$vo.minprice}></span> <span class="blue">好评 <{$vo.score}>%</span> <span><img src="__PUBLIC__/images/kzlist_hp.jpg" /></span> </p> </volist> </li> </ul> </div> <!--推荐 end--> <div class="clear"></div> <!--按条件筛选 start--> <div class="sx"> <ul class="sx_title">按条件筛选</ul> <ul class="sx_nr"> <li> <span class="bold">按客栈类型:</span> <span class="sx_nr_right"> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,1,0)}>' <empty name="baseParam[0]">class="sx_nr_hover"</empty>>不限</a> <volist name='innType' id='vo'> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,1,$vo["id"])}>' <eq name="baseParam[0]" value="$vo['id']">class="sx_nr_hover"</eq>><{$vo.name}></a> </volist> </span> </li> <li> <span class="bold">按等级划分:</span> <span class="sx_nr_right"> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,2,0)}>' <empty name="baseParam[1]">class="sx_nr_hover"</empty>>不限</a> <volist name='innClass' id='vo'> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,2,$vo["id"])}>' <eq name="baseParam[1]" value="$vo['id']">class="sx_nr_hover"</eq>><{$vo.name}></a> </volist> </span> </li> <li> <span class="bold">按主题分类:</span> <span class="sx_nr_right"> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,3,0)}>' <empty name="baseParam[2]">class="sx_nr_hover"</empty>>不限</a> <volist name='innSubject' id='vo'> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,3,$vo["id"])}>' <eq name="baseParam[2]" value="$vo['id']">class="sx_nr_hover"</eq>><{$vo.name}></a> </volist> </span> </li> <li> <span class="bold">按推荐方式:</span> <span class="sx_nr_right"> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,4,0)}>' <empty name="baseParam[3]">class="sx_nr_hover"</empty>>不限</a> <volist name='innRecommend' id='vo'> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,4,$vo["id"])}>' <eq name="baseParam[3]" value="$vo['id']">class="sx_nr_hover"</eq>><{$vo.name}></a> </volist> </span> </li> <li> <span class="bold">按预订方式:</span> <span class="sx_nr_right"> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,5,0)}>' <empty name="baseParam[4]">class="sx_nr_hover"</empty>>不限</a> <volist name='innBookType' id='vo'> <a href='<{$baseUrl}><{:makeparam("-s-",$baseParam,5,$vo["id"])}>' <eq name="baseParam[4]" value="$vo['id']">class="sx_nr_hover"</eq>><{$vo.name}></a> </volist> </span> </li> </ul> </div> <!--按条件筛选 end--> <div class="clear"></div> <!--客栈搜索列表 start--> <div class="kzlb"> <volist name='innList' id='vo'> <div class="kzlb_nr"> <ul class="kzlb_js"> <li class="kzlb_tp"><img src="<{$vo.pic1}>" /></li> <li class="kzlb_jj"> <p class="font18"><{$vo.name}></p> <p class="kzlb_jj_nr"><{$vo.shortintro}></p> <p class="kz_ly"> <span class="kz_bfb"><{$vo.score}>%</span> <span><a href="__URL__/view-id-<{$vo.id}>#score" target="_blank">查看点评</a></span><!-- <span>|</span> <span><a href="__URL__/view-id-<{$vo.id}>" target="_blank">我要评论</a></span> --> </p> </li> </ul> <ul class="kz_price"> <li class="yellow">¥<{$vo.minprice}>/晚起</li> <li class="kz_qkk"><a href="__URL__/view-id-<{$vo.id}>" target="_blank">去看看</a></li> </ul> </div> <div class="clear"></div> </volist> </div> <!--客栈搜索列表 end--> <!--客栈列表翻页 start--> <div class="kz_fy"><{$pageBar}></div> <!--客栈列表翻页 end--> </div> <!--kzlist_right end--> </div> </div> <{:W('foot')}>
10npsite
trunk/Index/Tpl/Inn/default/hotel/hotellist.htm
HTML
asf20
17,248
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=7" /> <title><{$rs.hotel3}></title> <link href="__PUBLIC__/css/index.css" type="text/css" rel="stylesheet" /> <!--[if IE 6]> <script src="iepng.js" type="text/javascript"></script> <script type="text/javascript"> EvPNG.fix('img,div,ul,li,a'); </script> <![endif]--> <style type="text/css"> .scrollable { position:relative; overflow:hidden; width: 446px; height:66px; } .scrollable .items { width:20000em; position:absolute; } .items div { float:left; } .bd_red{border:1px solid #F00;} </style> </head> <body> <!--top start--> <!--顶部信息 start--> <include file="./Index/Tpl/Home/default/public/header.htm" /> <!--顶部信息 end--> <!--top end--> <!--主体内容 start--> <div class="content"> <!--当前位置 start--> <div class="wz"> <ul> <li>您现在的位置:</li> <li> <span><a href="/" target="_blank">首页</a></span> <span>></span> <span><a href="/" target="_blank">客栈</a></span> <span>></span> <span><{$rs.hotel3}></span> </li> </ul> </div> <!--当前位置 end--> <!--商品详情 start--> <div class="spxq"> <!--详情left start--> <div class="sp_left"> <!--商品相册 start--> <div class="kz_xc"> <div class="dt"><img width="478" height="305" src="<{$rs.hotel15}>" id="maxhoelpic" /></div> <div class="xt"> <a class="prev browse left" style="float:left"></a> <div class="scrollable" id="scrollable" style="float:left"> <div class="items"> <if condition="$rs.hotel15 neq ''"><div style="margin-right:3px;"><img class="bd_red" id="xcpic<{$rs.hotel15}>" src="<{$rs.hotel15}>" width="100" height="64" /></div></if> <if condition="$rs.hotel16 neq ''"><div style="margin-right:3px;"><img id="xcpic<{$rs.hotel16}>" src="<{$rs.hotel16}>" width="100" height="64" /></div></if> <if condition="$rs.hotel17 neq ''"><div style="margin-right:3px;"><img id="xcpic<{$rs.hotel17}>" src="<{$rs.hotel17}>" width="100" height="64" /></div></if> <if condition="$rs.hotel18 neq ''"><div style="margin-right:3px;"><img id="xcpic<{$rs.hotel18}>" src="<{$rs.hotel18}>" width="100" height="64" /></div></if> <if condition="$rs.hotel19 neq ''"><div style="margin-right:3px;"><img id="xcpic<{$rs.hotel19}>" src="<{$rs.hotel19}>" width="100" height="64" /></div></if> </div> </div> <a style="float:left" class="next browse right"></a> </div> </div> <!--商品相册 end--> <div class="clear"></div> <!--预订须知 start--> <div class="ydxz"> <ul class="xz_title"> <li>预订须知</li> </ul> <ul class="xz_nr"> <li><{$rs.hotel9}></li> </ul> </div> <!--预订须知 end--> <div class="clear"></div> <!--优惠政策 start--> <div class="ydxz"> <ul class="xz_title"> <li>优惠政策</li> </ul> <ul class="xz_nr"> <li><{$rs.hotel8}></li> </ul> </div> <!--优惠政策 end--> <div class="clear"></div> <!--掌柜 start--> <div class="zg"> <ul class="zgxx"> <li class="yh_tx"><a href="<{$Think.const.SYS_UCHOMEURL}>/space.php?uid=<{$rs.hotel7}>" target="_blank"><img border="0" src="<php>echo UC_API.'/avatar.php?uid=".$rs["hotel7"]."&size=small&type='</php>" /></a></li> <li class="yh_xx"> <p class="zy"> <span><a href="<{$Think.const.SYS_UCHOMEURL}>/space.php?uid=<{$rs.hotel7}>" target="_blank" class="zs"><php> $arr= uc_get_user($rs["hotel7"],1); echo $arr[1]; </php></a></span> <span>的主页</span> </p> <p class="add_gz"> <span><a href="<{$Think.SYS_UCHOMEURL}>/cp.php?ac=friend&op=add&uid=<{$rs.hotel7}>" class="gz">加关注</a></span> <span><a href="<{$Think.SYS_UCHOMEURL}>/cp.php?ac=pm&uid=<{$rs.hotel7}>" class="xx">消息</a></span> <span><a href="<{$Think.SYS_UCHOMEURL}>/cp.php?ac=poke&op=send&uid=<{$rs.hotel7}>" class="zh">打招呼</a></span> </p> </li> <li class="sq_zg"><a href=""><img src="__PUBLIC__/images/zg.jpg" /></a></li> </ul> <ul class="zgdt"> <li> <span class="green">正在逛店</span> <span class="yellow"><php>echo rand(10,50)</php></span> </li> <li> <span class="green">话题</span> <span class="yellow">9</span> </li> <li> <span class="green">已有</span> <span class="yellow">10</span> <span class="green">预订</span> </li> <li> <span class="green">关注本客栈</span> <span class="yellow">5</span> </li> </ul> </div> <!--掌柜 end--> </div> <!--详情left end--> <!--详情right start--> <div class="sp_right"> <!--酒店信息 start--> <div class="nx"><img src='__PUBLIC__<volist name="dengjipic" id="djpicpath"><{$djpicpath}></volist>' /></div> <div class="fj_title"> <ul> <if condition="$clsrs.classsys7 neq ''"><img src="__PUBLIC__<{$clsrs.classsys7}>" /></if> </ul> <ul><li class="fd_name"><{$rs.hotel3}></li></ul> <ul class="xq"> <li><strong>开业时间:</strong><{$rs.hotel28}></li> <li class="address"><strong>地&nbsp;&nbsp;&nbsp;&nbsp;址:</strong><{$rs.hotel29}></li> <li><strong>设&nbsp;&nbsp;&nbsp;&nbsp;施:</strong><volist name="jichushes" id="jcsshi"><{$jcsshi}> &nbsp;</volist></li> <li><strong>房间数量:</strong><{$rs.hotel30}>套</li> <li><strong>交通信息:</strong><{$rs.hotel31}></li> </ul> <ul class="rq"> <li> <span class="rq_name">人气:</span> <span class="rq_sz" id="countnum"><{$rs.hotel26}></span> </li> <li id="dingrenqi" class="d"><a></a></li> </ul> </div> <!--酒店信息 end--> <div class="clear"></div> <!--酒店评分 start--> <div class="jdpf"> <div class="pf_title"> <li class="pf_bt"> <span class="font18">总评分</span> <span class="font36"><{$totalpf}>%</span> <span class="font18">共<{$everypl.tnum}>条评论</span> </li> <li class="ly_pl"> <span><a href="" target="_blank">浏览评论</a></span> </li> </div> <div class="jdpf_nr"> <ul> <li class="pf_name">特色</li> <li class="pf_fs"> <span style="width:<{$everypl.spinglun9|formatonevale=###}>%;"></span></li> <li class="bf_sm"><{$everypl.spinglun9|formatonevale=###,"t"}>%</li> </ul> <ul> <li class="pf_name">位置</li> <li class="pf_fs"><span style="width:<{$everypl.spinglun10|formatonevale=###}>%;"></span></li> <li class="bf_sm"><{$everypl.spinglun10|formatonevale=###,"t"}>%</li> </ul> <ul> <li class="pf_name">趣味</li> <li class="pf_fs"><span style="width:<{$everypl.spinglun11|formatonevale=###}>%;"></span></li> <li class="bf_sm"><{$everypl.spinglun11|formatonevale=###,"t"}>%</li> </ul> <ul> <li class="pf_name">清洁</li> <li class="pf_fs"><span style="width:<{$everypl.spinglun12|formatonevale=###}>%;"></span></li> <li class="bf_sm"><{$everypl.spinglun12|formatonevale=###,"t"}>%</li> </ul> <ul> <li class="pf_name">员工</li> <li class="pf_fs"><span style="width:<{$everypl.spinglun13|formatonevale=###}>%;"></span></li> <li class="bf_sm"><{$everypl.spinglun13|formatonevale=###,"t"}>%</li> </ul> <ul> <li class="pf_name">安全</li> <li class="pf_fs"><span style="width:<{$everypl.spinglun14|formatonevale=###}>%;"></span></li> <li class="bf_sm"><{$everypl.spinglun14|formatonevale=###,"t"}>%</li> </ul> </div> </div> <!--酒店评分 end--> </div> <!--详情right end--> </div> <!--商品详情 end--> <div class="clear"></div> <!--价格 start--> <div class="fj_price"> <ul> <li class="fj_price_title">房型及价格</li> </ul> <volist name="fangxinrs" id="fxlist"> <ul class="fx_nr"> <li><img src="__PUBLIC__/images/fx.jpg" /></li> <li class="js"> <p class="font14 bold dark_green"><{$fxlist.hotelroom1}></p> <p class="font14 dark_gray"><{$fxlist.hotelroom9|my_substr=###,0,100,""}></p> <p> <span class="font14 dark_gray bold">特价:¥</span> <span class="yellow font24"><{$fxlist.hotelroom7}></span> <span class="font14 dark_gray bold">元/间</span> </p> </li> <li class="ljyd"> <img src="__PUBLIC__/images/ljyd.png" style="cursor:pointer;" onclick="gotoroder(<{$fxlist.hotelroom0}>);" /> </li> </ul> </volist> </div> <!--价格 end--> <div class="clear"></div> <!--酒店信息内容 start--> <div class="jdxx"> <!--酒店信息内容left start--> <div class="jdxx_left"> <!--客栈设施及特色 start--> <div class="k1"> <li class="jdxx_title">客栈设施及特色</li> <li class="jdxx_nr"> <volist name="jichushes" id="jcsshi"> <span><img src="__PUBLIC__/images/list_style.jpg" /></span> <span class="yellow"><{$jcsshi}></span> </volist> </li> </div> <!--客栈设施及特色 end--> <div class="clear"></div> <!--客栈交通及介绍 start--> <div class="k2"> <li class="jdxx_title">客栈介绍及交通信息</li> <li class="jdxx_nr"> <{$rs.hotel11}> </li> <li class="jdxx_nr"> <{$rs.hotel12}> </li> </div> <!--客栈交通及介绍 end--> <div class="clear"></div> <div class="k2"> <li class="jdxx_title">客栈图片</li> <li class="jdxx_nr"> <volist name="picrs" id="pvo"> <img width="400" src="<{$pvo.pic4}>"><br><{$pvo.pic1}><br><br> </volist> </li> </div> <!--游客点评 start--> <div class="k2"> <ul> <li class="jdxx_title"> <p><a name='score'></a> <span>游客点评</span> </p> <p class="k2_title"> <span class="dark_gray">总评分:</span> <span class="font30"><{$totalpf}>%</span> <span><a href="" target="_blank" class="dark_gray">如何计算评分?</a></span> </p> </li> </ul> <{$pinglunlist}> </div> <!--游客点评 end--> <div class="clear"></div> <!--旅客留言 start--> <div class="k2"> <ul class="jdxx_title">游客留言</ul> <{$messl}> </div> <!--旅客留言 end--> <div class="clear"></div> <!--发表留言 start--> <div class="k2"> <ul class="fb_ly"> <li class="fb_title">发表</li> <li class="text"> <textarea id="addcontent" name="addcontent"></textarea> </li> </ul> <ul class="fb_ly"> <li class="input"><input type="button" value="" id="fasongc" name="fasongc" /></li> </ul> </div> <!--发表留言 end--> </div> <!--酒店信息内容left end--> <!--酒店信息内容right start--> <div class="jdxx_right"> <!--地图 start--> <div class="k3"> <ul class="jdxx_title">所在位置</ul> <ul><iframe name="googlemap" frameborder="0" id="googlemap" scrolling="no" width="378" height="278" src="/common/showgooglemap-zbz-34.196450627437024,109.00205624682621-hname-dfdfd-widthpx-378-heightpx-278"></iframe></ul> </div> <!--地图 end--> <div class="clear"></div> <!--本店特色 start--> <div class="k4"> <ul class="jdxx_title">本店特色</ul> <ul> <li class="ts_nr"> <span> <{$rs.hotel27|formatteshestr=###}> </span> <span class="bf"> <i class="font14"><a class="all">全部</a></i> <i class="font14"><a class="little">精简</a></i> </span> <span class="ts_add">添加特色:</span> <span class="ts_button"> <input type="text" id= "teshecontent" name= "teshecontent"/> <button type="button" id="addteshec" name="addteshec">添加</button> </span> </li> </ul> </div> <!--本店特色 end--> <div class="clear"></div> <!--浏览过的客栈 start--> <div class="k4"> <ul class="jdxx_title">我浏览过的客栈</ul> <ul class="ll_before"> <li id="browerhotellist"> </li> </ul> </div> <!--浏览过的客栈 end--> <div class="clear"></div> <!--周边相关客栈 start--> <div class="k4"> <ul class="jdxx_title">周边相关客栈</ul> <ul class="ll_before"> <volist name="zhoubianhotel" id="zbvo"> <li> <span><a href="/hotel-view-id-<{$zbvo.hotel0}>" target="_blank"><{$zbvo.hotel1}></a></span> </li> </volist> </ul> </div> <!--周边相关客栈 end--> <div class="clear"></div> <!--周边旅游攻略 start--> <div class="k4"> <ul class="jdxx_title">周边旅游攻略</ul> <ul class="ll_before"> <li> <{:W('BlogSideList')}></li> </ul> </div> <!--周边旅游攻略 end--> <div class="clear"></div> <!--猜你喜欢的客栈 start--> <div class="k4"> <ul class="jdxx_title">猜你喜欢的客栈</ul> <ul class="lytj"> <volist name="cnxhh" id="vo"> <li> <span><a href="/hotel/view-id-<{$vo.hotel0}>" target="_blank"><img width="60" height="60" src="<{$vo.hotel15}>" /></a></span> <span><a href="/hotel/view-id-<{$vo.hotel0}>" target="_blank"><{$vo.hotel1}></a></span> </li> </volist> </ul> </div> <!--猜你喜欢的客栈 end--> </div> <!--酒店信息内容right end--> </div> <!--酒店信息内容 end--> </div> <!--主体内容 end--> <!--底部部分 start--> <{:W('foot',array('linkid'=>1282))}> <!--底部部分 end--> <script language="javascript"> $(document).ready(function(){ //添加特色值操作 $("#addteshec").bind("click",function(){ teshecontent=$("#teshecontent").val(); if(teshecontent.match(/[\s,,.。'\"]+/) || teshecontent==""){ alert("请只输入文字"); $("#teshecontent").focus(); return false; } $.ajax({ url: "/hotel/addteshe-hid-<{$rs.hotel0}>-teshecontent-"+$("#teshecontent").val(), cache: false, success: function(html){ if(html=="dook"){ alert("添加成功"); $("#addteshec").unbind(); }else{ alert("添加失败"); } } }); }); //添加人气值操作 $("#dingrenqi").bind("click",function(){ $.ajax({ url: "/hotel/addrenqi-hid-<{$rs.hotel0}>", cache: false, success: function(html){ if(html=="dook"){ rq_sz=$("#countnum").html(); if(parseInt(rq_sz)){ $("#countnum").html(String(parseInt(rq_sz)+1)); }else{ $("#countnum").html("1"); } } } }); $("#dingrenqi").unbind(); }); //获取浏览后的值 $.ajax({ url: "/hotel/getbrowerhotebycookie", cache: false, success: function(html){ $("#browerhotellist").html(html); } }); //添加浏览后的值 $.ajax({ url: "/hotel/addbrowerhoteltocookie-hid-<{$rs.hotel0}>-hname-<{$rs.hotel1|formaturl=###}>", cache: false, success: function(html){ } }); //选中小图把显示的切换到大图 $("img[id^='xcpic']").bind("click",function(){ id=$(this).attr("id"); picpath=id.replace("xcpic",""); $("#maxhoelpic").attr( "src", picpath); $("img[id^='xcpic']").each(function(){ $(this).removeClass(); }); $(this).addClass("bd_red"); }); //添加发送功能按钮功能 $("#fasongc").bind("click",function(){ userid="<{$Think.const.__USERID__}>"; if(userid=="__USERID__"){ if(isgotologin()){ window.open('<{$Think.const.SYS_UCHOMEURL}>/do.php?ac=b0466004e24c639be7d0b44bbdf0ad29'); return false; }else{ return false; } } //添加浏览后的值 c=$("#addcontent").val(); c=c.replace("-",""); $.ajax({ url: "/messagesys/addmessage-hid-<{$rs.hotel0}>-c-"+c, cache: false, success: function(html){ if(html=="dook"){ $("#addcontent").val(""); alert("添加成功,工作人员正在审核."); } } }); }); }); //进入预定页面 function gotoroder(rid){ uid="<{$Think.const.__USERID__}>"; if(uid=="__USERID__"){ if(confirm("你没有登陆,是否去登陆?")){ window.location.href="<{$SYS_config.siteurl}>/user/do.php?ac=<{$Think.const.__LOGIN_ACTION__}>"; }else{ return false; } }else{ window.location.href="/order/view1-hid-<{$Think.get.id}>-rid-"+rid; } } function isgotologin(){ if(confirm("你没有登陆,是否要去登陆?")){ return true; }else return false; } $(function() { $(".scrollable").scrollable(); }); </script> </body> </html>
10npsite
trunk/Index/Tpl/Inn/default/hotel/view.htm
HTML
asf20
23,787
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>在线支付 <{$Think.SYS_SITENAME}></title> <link href="__PUBLIC__/css/kzzf.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquerytools/1.2.5/jquery.tools.min.js"></script> <script type="text/javascript" src="__PUBLIC__/jsLibrary/jquery/jquery.cookie.js"></script> <!--[if IE 6]> <script src="iepng.js" type="text/javascript"></script> <script type="text/javascript"> EvPNG.fix('img,div,ul,li,a,span'); </script> <![endif]--> <body> <!--top start--> <include file="./Index/Tpl/Home/default/public/header.htm" /> <!--top end--> <!--content start--> <div class="content_lc"> <div class="w1000"> <!--流程头部 start--> <div class="lc"> <ul><img src="__PUBLIC__/images/kz_lc_title.jpg" /></ul> <ul class="lc_lb"> <li class="lb_bt">支付方式</li> <li class="lc_tb"> <span class="num1_gray"></span> <span class="num2"></span> <span class="num3_gray"></span> </li> </ul> </div> <!--流程头部end--> <!--购物车列表 start--> <div class="gwc_lb"> <!--客栈购物车流程1 start--> <div class="kz_gwc_two"> <li>尊敬的<{$Think.const.__USERNAME__}>,您好,你的订单信息如下:</li> <li> <span>订单号为</span> <span class="bold yellow font14"><{$orderInfo.orderNum}></span> <span>(<{$orderInfo.innName}>的<{$orderInfo.room_name}>),总金额为:</span> <span class="bold yellow font14"><{$orderInfo.totalAmount}></span><span>元</span> <br /> <switch name="fortype" > <case value="a"> <span>本次即将支付订金</span> <span class="bold yellow font14"><{$orderInfo.depositAmount}></span> <span>元,请于</span> <span class="bold yellow font14"><{$orderInfo.depositDate|date="Y-m-d H:i",###}></span> <span>之前完成支付。</span> </case> <case value="b"> <span>本次即将支付余款</span> <span class="bold yellow font14"><{$orderInfo.balanceAmount}></span> <span>元,请于</span> <span class="bold yellow font14"><{$orderInfo.balanceDate|date="Y-m-d H:i",###}></span> <span>之前完成支付。</span> </case> </switch> </li> </div> <!--客栈购物车流程1 end--> <div class="clear"></div> <!--购物车价格 start--> <div class="zj"> <li class="sum"> <span class="dark_green bold"> </span> </li> </div> <!--购物车价格 end--> <!--选择支付方式 start--> <div class="chose_zffs" id="zhifufangshid"> <div class="chose_title">请选择支付方式:</div> <!--选择start--> <div class="chose_bg"> <div class="chosefn_xx"> <ul class="kzzf_fn"> <li id="chtitle_alipay" class="kzzf_fn_hover"><a>支付宝</a></li> <li id="chtitle_zhuangzhangrmb"><a>转帐支付</a></li> <li id="chtitle_CardOnlineRmb"><a>中国信用卡</a></li> </ul> </div> <div class="kzzf_xx"> <div class="Content1" id="co_alipay"> <div class="kzzf_xx"> <{$paytypehtm.alipay}> </div> </div> <div class="Content1" style="display:none" id="co_zhuangzhangrmb"> <div class="wsyh"> <{$paytypehtm.zhuangzhangrmb}> </div> </div> <div class="Content1" style="display:none" id="co_CardOnlineRmb"> <div class="wsyh"> <{$paytypehtm.CardOnlineRmb}> </div> </div> </div> </div> <!--选择end--> </div> <!--选择支付方式 end--> </div> <!--购物车列表 end--> </div> </div> <!--content end--> <!--底部部分 start--> <div class="bottom"> <div class="footer"> <!--友情链接 start--> <!--友情链接 end--> <!--版权信息 start--> <div class="bqxx"> <li>Copyright&nbsp;&copy;&nbsp;1997-2012&nbsp;梦之旅&nbsp;版权所有</li> <li style="float:right;">国际旅行社经营许可证注册号:L-SC-CJ00014&nbsp;&nbsp;蜀ICP备08007806号&nbsp;&nbsp;京公网安备1101055404号</li> </div> <!--版权信息 end--> </div> </div> <!--底部部分 end--> <script language="javascript"> $(document).ready(function(){ //绑定切换事件 $("li[id^='chtitle_']").bind("click",function(){ $("li[id^='chtitle_']").attr("class",""); $(this).attr("class","kzzf_fn_hover"); //显示内容 id=$(this).attr("id"); id=id.replace("chtitle_",""); $("div[id^='co_']").hide(); $("#co_"+id).show("slow"); }); }); </script> </body> </html>
10npsite
trunk/Index/Tpl/Inn/default/pay/Payment.htm
HTML
asf20
6,961
ssdsdsdsadggg测试
10npsite
trunk/Index/Tpl/Inn/default/common/checkdateyoux.htm
HTML
asf20
19
<div class="k4"> <ul class="jdxx_title">推荐客栈</ul> <ul class="tj_kz"> <volist name="rs" id="rsjn" mod="3"> <eq name="mod" value="0"> <li></eq> <span> <a href="/hotel/view-id-<{$rsjn.hotel0}>" target="_blank"><img height="80" width="70" src="<{$rsjn.hotel15}>" /></a> <a href="/hotel/view-id-<{$rsjn.hotel0}>" target="_blank"><{$rsjn.hotel1}></a> </span> <eq name="mod" value="3"> </li></eq> </volist> </ul> </div>
10npsite
trunk/Index/Tpl/Inn/default/common/gettuijianhotel.htm
HTML
asf20
770
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>梦之旅google地图</title> </head> <body onload="initialize()"> <div id="map_canvas" style="width : <{$widthpx}>px; height : <{$heightpx}>px;"></div> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var map; var marker; var infowindow; var geocoder; var markersArray = []; function initialize() { geocoder = new google.maps.Geocoder(); var myLatlng = new google.maps.LatLng(<{$zbz}>); var myOptions = { zoom: 13, center: myLatlng, navigationControl: true, streetViewControl: true, panControl: true, //方向盘 scaleControl: true, //比例尺 mapTypeControl: false, //可以选的地图类型,下面是配置 streetViewControl:false,//街头小人 zoomControl: true, //放大按钮,下面是配置 mapTypeId: google.maps.MapTypeId.ROADMAP, } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); placeMarker(myLatlng);//标标出来 } function placeMarker(location) { clearOverlays(infowindow); var clickedLocation = new google.maps.LatLng(location); marker = new google.maps.Marker({ position: location, ico:"http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_red.png", title:"<{$hname}>", map: map }); markersArray.push(marker); //map.setCenter(location); var point = location.lat() + "," + location.lng(); } function clearOverlays(infowindow) { if (markersArray) { for (i in markersArray) { markersArray[i].setMap(null); } markersArray.length = 0; } if (infowindow){ infowindow.close(); } } function setlocation(location, title) { map.setCenter(location); marker = new google.maps.Marker({ map: map, position: location, title: title }); } </script> </body> </html>
10npsite
trunk/Index/Tpl/Inn/default/common/showgooglemap.htm
HTML
asf20
2,746
<!--商家后台左边 start--> <div class="ht_left"> <div><img src="__PUBLIC__/images/ht_top.jpg" /></div> <div class="ht_left_nr"> <li class="ht_left_title"><img src="__PUBLIC__/images/kt_left_title.jpg" /></li> <li><a href="">后台首页</a></li> <li><a href="<{:U('inn/list/index')}>">客栈管理</a></li> <li><a href="<{:U('inn/book/index')}>">订单管理</a></li> <li><a href="">留言管理</a></li> <li><a href="">评论管理</a></li> </div> <div><img src="__PUBLIC__/images/ht_bottom.jpg" /></div> </div> <!--商家后台左边 end-->
10npsite
trunk/Index/Tpl/Inn/default/common/innleft.htm
HTML
asf20
624
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="copyright" content=""> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>发表评论</title> <style type="text/css"> body{ font-size:12px;} .xiahuaxian { border-bottom-width: 1px;border-bottom-style: dashed;border-bottom-color:#0099CC; } .hengxian { border-left-width: 1px;border-left-style: dashed;border-left-color:#000; } </style> </head> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <body> <table align="center" cellpadding="3" cellspacing="3" bgcolor="#D0EBFA" style="border:1px solid #75C1EB;"> <form name="frm" method="post" action="/pinglun/addsave"> <tr> <td> <table width="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td colspan="2" height="24" bgcolor="#D0EBFA" align="center"><b>发表评论</b></td> </tr> <tr> <td colspan="2" height="15">&nbsp;</td> </tr> <tr> <td colspan="2" class="xiahuaxian">按以下规则,成功点评后将获得此订单相应的积分(与订单总额及订单类型有关),积分可直接抵用现金,很划算哦!</td> </tr> <tr> <td height="27" width="70"class="xiahuaxian">&nbsp;&nbsp;订单号</td> <td class="xiahuaxian"><input type="text" name="pinglun1" id="pinglun1" readonly="true" value="<{$rs.orderform3}>" style="border:0px;"/></td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;产品名称</td> <td class="xiahuaxian"><{$rs.tour1}><input type="hidden" name="pinglun2" value="<{$rs.tour0}>"/></td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;姓名</td> <td class="xiahuaxian"><input type="text" name="pinglun4" value=""/> <input name="pinglun7" type="radio" value="1212" checked="checked" /> 显示 <input type="radio" name="pinglun7" value="1213" /> 不显示(*不显示为匿名发表)</td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;来自</td> <td class="xiahuaxian"><input type="text" name="pinglun15" /> (请按国家、地区、城市顺序填写)</td> </tr> <tr> <td height="40" colspan="2" class="xiahuaxian">请您针对梦之旅的服务进行点评(包括预订、售后等)<br><span style="color:#F00">&nbsp;&nbsp;注:50字及以上字数才能获得积分</span>,已输入 <span style="color:#F00"><label id="ysr">0</label></span> 字</td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;内容</td> <td class="xiahuaxian"><textarea name="pinglun5" id="pinglun5" cols="50" rows="4" onchange="cot()"></textarea></td> </tr> <tr> <td height="40" colspan="2" class="xiahuaxian">请您针对当地接待旅行社的服务进行点评(包括导游、司机、交通、食宿等)</td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;</td> <td class="xiahuaxian"><textarea name="pinglun6" id="pinglun6" cols="50" rows="4" ></textarea></td> </tr> <tr> <td height="25" colspan="2" class="xiahuaxian">&nbsp;&nbsp;<strong>请你评分</strong></td> </tr> <tr> <td height="25" colspan="2" class="xiahuaxian" align="center"><table width="400" border="0" cellspacing="0" cellpadding="0"> <tr align="center"> <td height="25">预定</td> <td class="hengxian">客服</td> <td class="hengxian">导游</td> <td class="hengxian">住宿</td> <td class="hengxian">交通</td> <td class="hengxian">用餐</td> <td class="hengxian">总计</td> </tr> <tr align="center"> <td height="25"><select name="pinglun9" id="pinglun9" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun10" id="pinglun10" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun11" id="pinglun11" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun12" id="pinglun12" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun13" id="pinglun13" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun14" id="pinglun14" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><label id="bili" style="font-weight:bold">100%</label></td> </tr> </table></td> </tr> <tr> <td>&nbsp;&nbsp;验证码:</td> <td> <input name="yzm" id="yzm" type="text" style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid" size="8" /> <img src="/inc/checkcode.php" /> </td> </tr> <tr> <td colspan="2" align="center" height="50"> <input type="hidden" name="pinglun3" value="579" /> <input type="image" src="http://pw.dreams-travel.com/Hotel_evaluation/img_/fabiao-button.gif" id="mysubmit" /> </td> </tr> </table> </td></tr> </form> </table> </body> </html> <script type="text/javascript"> function cot(){ var ysr=document.getElementById("ysr"); var tt=document.getElementById("content"); var ttv=tt.value; var ttvl=ttv.length; ysr.innerHTML=ttvl; } //验证表单 $(document).ready(function(){ $("#mysubmit").bind("click",function(){ yzm=$("#yzm").val(); if(!yzm.match(/^[\w]{4}$/)){ alert("请输入正确的验证码"); $("#yzm").focus(); return false; } pinglun4=$("#pinglun4").val(); if(!pinglun4.match(/^[\S]+$/)){ alert("用户名称不能为空"); $("#pinglun4").focus(); return false; } pinglun5=$("#pinglun5").val(); if(!pinglun5.match(/[\S]{2,}/)){ alert("对梦之旅的点评不能为空"); $("#pinglun5").focus(); return false; } pinglun6=$("#pinglun6").val(); if(!pinglun6.match(/[\S]{2,}/)){ alert("对当地地接社的点评不能为空"); $("#pinglun6").focus(); return false; } return true; }); }); </script>
10npsite
trunk/Index/Tpl/Inn/default/pinglun/add.htm
HTML
asf20
6,925
<volist name="rs" id="vo"> <ul class="jdxx_nr"> <li class="yk"> <p> <span><img width="30" src="<php>echo UC_API.'/avatar.php?uid=".$vo["pinglun16"]."&size=small&type='</php>" /></span> <span class="yhm"><a href="<{$Think.const.SYS_UCHOMEURL}>/space.php?uid=<{$vo.pinglun16}>" target="_blank"><php> $arr= uc_get_user($vo["pinglun16"],1); echo $arr[1]; </php></a></span> </p> </li> <li class="yhdp_nr"> <p> <span class="yh_dp"><img src="__PUBLIC__/images/dp_myd.jpg" /></span> <span class="yellow font18"><php>echo formatpingluntotal($vo["pinglun9"].",".$vo["pinglun10"].",".$vo["pinglun11"].",".$vo["pinglun12"].",".$vo["pinglun13"].",".$vo["pinglun14"])</php>%</span> <span class="dp_time"><{$vo.pinglun8|date="Y-m-d H:i:s",###}></span> </p> <p class="dp_content"> <{$vo.pinglun6}> </p> </li> </ul> </volist>
10npsite
trunk/Index/Tpl/Inn/default/pinglun/getpinglunlist.htm
HTML
asf20
1,365
<include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-apply-agreement.css" type="text/css" rel="stylesheet" /> <script src="http://cdn.jquerytools.org/1.2.7/form/jquery.tools.min.js"></script> <script type="text/javascript"> (function($){ $(function(){ $("#myform").validator({ messageClass:"yellow", position:"bottom left" }); $("#myform input").focus(function(){ $(this).addClass('input_hover'); }).blur(function(){ $(this).removeClass('input_hover'); }); }); window.selectfile = function(field) { $("input[name='"+field+"']").click(); } window.fileselected = function(field) { path = $("input[name='"+field+"']").val(); $("#"+field).val(path); } })(jQuery); </script> <div class="content"> <!--商家后台左边 start--> <div class="ht_left"> <div><img src="__PUBLIC__/images/ht_top.jpg" /></div> <div class="ht_left_nr"> <li class="ht_left_title"><img src="__PUBLIC__/images/kt_left_title.jpg" /></li> <li><a href="sj_ht.htm">后台首页</a></li> <li><a href="kzgl.htm">客栈管理</a></li> <li><a href="ddgl.htm">订单管理</a></li> <li><a href="lygl.htm">留言管理</a></li> <li><a href="plgl.htm">评论管理</a></li> </div> <div><img src="__PUBLIC__/images/ht_bottom.jpg" /></div> </div> <!--商家后台左边 end--> <!--商家后台右边 start--> <div class="sjht_right"> <!--具体信息 start--> <div class="sjht_xx"> <!--具体信息左边 start--> <div class="sjht_xx_left"> <form id="myform" method='post' enctype='multipart/form-data' action='<{:U("submit")}>'> <ul> <li class="jt_title">基本资料</li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">店主姓名</span> <span><input type="text" name="truename" required="required" data-message="请填写店主姓名!" /></span> <span class="yellow">真实姓名</span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系方式</span> <span><input type="text" name="phone" required="required" data-message="请填写联系方式!" /></span> <span class="yellow">请输入电话号码</span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">身份证号</span> <span><input type="text" name="idcard_number" required="required" data-message="请填写身份证号码!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">身份证扫描件</span> <span><input type="text" id="idcard_pic" required="required" readonly data-message="请上传身份证扫描件!" /></span> <span><a href="javascript:;" onclick='selectfile("idcard_pic")'>浏览…</a></span> <input type="file" name="idcard_pic" onchange='fileselected("idcard_pic")' style="height:0;width:0;" /> </p> </li> </ul> <ul> <li class="jt_title">公司资料</li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">公司名称</span> <span><input type="text" name="orgname" required="required" data-message="请填写公司姓名!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">办公电话</span> <span><input type="text" name="officephone" required="required" data-message="请填写办公室电话!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">营业执照</span> <span><input type="text" name="biz_number" required="required" data-message="请填写营业执照!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">证件扫描上传</span> <span><input type="text" id="biz_pic" required="required" readonly data-message="请上传营业执照扫描件!" /></span> <span><a href="javascript:;" onclick='selectfile("biz_pic")'>浏览…</a></span> <input type="file" name="biz_pic" onchange='fileselected("biz_pic")' style="height:0;width:0;" /> </p> </li> </ul> <ul class="kt_next_two"> <li> <span>*放心上传您的资料,本资料严格保密,不会用于其它用途!</span> </li> <li><input type="image" src="__PUBLIC__/images/kt_next.jpg" /></li> </ul> </form> </div> <!--具体信息左边 end--> <!--具体信息右边 start--> <div class="ktkz_right"> <li><img src="__PUBLIC__/images/one_hover.jpg" /></li> <li><img src="__PUBLIC__/images/two_hover.jpg" /></li> <li><img src="__PUBLIC__/images/three_zc.jpg" /></li> <li><img src="__PUBLIC__/images/four_zc.jpg" /></li> </div> <!--具体信息右边 end--> </div> <!--具体信息 end--> </div> <!--商家后台右边 end--> </div> <include file="./Index/Tpl/Home/default/public/footer.htm" />
10npsite
trunk/Index/Tpl/Inn/default/apply/form.htm
HTML
asf20
6,675
<tagLib name="html"/> <include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-apply-form.css" type="text/css" rel="stylesheet" /> <script src="http://cdn.jquerytools.org/1.2.7/form/jquery.tools.min.js"></script> <script type="text/javascript"> (function($){ $(function(){ //表单验证 $("#myform").validator({ messageClass:"yellow", position:"bottom left" }); //表单效果 $("#myform input").focus(function(){ $(this).addClass('input_hover'); }).blur(function(){ $(this).removeClass('input_hover'); }); }); })(jQuery); </script> <!--主体内容 start--> <div class="content"> <div class="zsjm_nr"> <div class="zsjm_title"> <ul class="zsjm_bq"> <li class="zsjm_bt"><span class="zsjm_num">1</span><span><a href="javascript:;">客栈信息</a></span></li> <li class="zsjm_bt_hover"><span class="zsjm_num">2</span><span><a href="javascript:;">联系信息</a></span></li> <li style="float:right;"><img src="__PUBLIC__/images/zsjm.jpg" /></li> </ul> </div> <div class="sjht_fd bg_gray1"> <form id="myform" method='post' action='__KZURL__/apply/submit'> <fieldset><legend>单位信息</legend> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">单位名称</span> <span><input type="text" name='orgname' required="required" data-message="单位名称必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">单位电话</span> <span><input type="text" name='officephone' required="required" data-message="单位电话必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">单位传真</span> <span><input type="text" name='fax' /></span> </p> </li> </ul> </fieldset> <fieldset><legend>负责人信息</legend> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">负责人姓名</span> <span><input type="text" name='truename' required="required" data-message="负责人姓名必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">负责人电话</span> <span><input type="text" name='mobile' required="required" data-message="负责人电话必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">负责人邮箱</span> <span><input type="email" name='email' required="required" data-message="请输入正确的邮箱地址!" /></span> </p> </li> </ul> </fieldset> <fieldset><legend>联系人1信息</legend> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系人1姓名</span> <span><input type="text" name='truename1' /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系人1电话</span> <span><input type="text" name='mobile1' /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系人1邮箱</span> <span><input type="email" name='email1' /></span> </p> </li> </ul> </fieldset> <fieldset><legend>联系人2信息</legend> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系人2姓名</span> <span><input type="text" name='truename2' /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系人2电话</span> <span><input type="text" name='mobile2' /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">联系人2邮箱</span> <span><input type="email" name='email2' /></span> </p> </li> </ul> </fieldset> <fieldset><legend>其他</legend> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">收取订单短信手机</span> <span><input type="text" name='ordermobile' required="required" data-message="收取订单短信手机必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">收取订单邮箱</span> <span><input type="email" name='orderemail' required="required" data-message="请输入正确的邮箱地址!" /></span> </p> </li> </ul> </fieldset> <ul class="kt_next_two"> <li> <span>*放心上传您的资料,本资料严格保密,不会用于其它用途!</span> </li> <li> <input type="hidden" name='id' value="<{$innid}>" /> <input class="jx" type="submit" name='contactSubmit' value="保存" /> </li> </ul> </form> </div> </div> </div> <!--主体内容 end--> <include file="./Index/Tpl/Home/default/public/footer.htm" />
10npsite
trunk/Index/Tpl/Inn/default/apply/contact.htm
HTML
asf20
6,862
<include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-apply-agreement.css" type="text/css" rel="stylesheet" /> <div class="content"> <!--商家后台右边 start--> <div class="sjht_right"> <!--具体信息 start--> <div class="sjht_xx"> <!--具体信息左边 start--> <div class="sjht_xx_left"> <ul> <li class="jt_title">服务条款(在线合同)</li> <li class="sjht_jtxx"> <p>这里输入服务条款</p> </li> </ul> <ul class="kt_next"> <li> <span><input type="checkbox" checked="checked" />同意</span> </li> <li><a href='__KZURL__/apply/details'><img src="__PUBLIC__/images/kt_next.jpg" /></a></li> </ul> </div> <!--具体信息左边 end--> <!--具体信息右边 start--> <div class="ktkz_right"> <li><img src="__PUBLIC__/images/one_hover.jpg" /></li> <li><img src="__PUBLIC__/images/two_zc.jpg" /></li> <li><img src="__PUBLIC__/images/three_zc.jpg" /></li> <li><img src="__PUBLIC__/images/four_zc.jpg" /></li> </div> <!--具体信息右边 end--> </div> <!--具体信息 end--> </div> <!--商家后台右边 end--> </div> <include file="./Index/Tpl/Home/default/public/footer.htm" />
10npsite
trunk/Index/Tpl/Inn/default/apply/agreement.htm
HTML
asf20
1,616
<include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-apply-agreement.css" type="text/css" rel="stylesheet" /> <div class="content"> <!--商家后台左边 start--> <div class="ht_left"> <div><img src="__PUBLIC__/images/ht_top.jpg" /></div> <div class="ht_left_nr"> <li class="ht_left_title"><img src="__PUBLIC__/images/kt_left_title.jpg" /></li> <li><a href="sj_ht.htm">后台首页</a></li> <li><a href="kzgl.htm">客栈管理</a></li> <li><a href="ddgl.htm">订单管理</a></li> <li><a href="lygl.htm">留言管理</a></li> <li><a href="plgl.htm">评论管理</a></li> </div> <div><img src="__PUBLIC__/images/ht_bottom.jpg" /></div> </div> <!--商家后台左边 end--> <!--商家后台右边 start--> <div class="sjht_right"> <!--具体信息 start--> <div class="sjht_xx"> <!--具体信息左边 start--> <div class="sjht_xx_left"> <ul> <li class="jt_title">您的申请已提交</li> <li class="sjht_jtxx"> <p>请等待梦之旅管理人员审核!</p> </li> </ul> <ul class="kt_next"> <li><a href='__ROOT__/'>确定</a></li> </ul> </div> <!--具体信息左边 end--> <!--具体信息右边 start--> <div class="ktkz_right"> <li><img src="__PUBLIC__/images/one_hover.jpg" /></li> <li><img src="__PUBLIC__/images/two_zc.jpg" /></li> <li><img src="__PUBLIC__/images/three_zc.jpg" /></li> <li><img src="__PUBLIC__/images/four_zc.jpg" /></li> </div> <!--具体信息右边 end--> </div> <!--具体信息 end--> </div> <!--商家后台右边 end--> </div> <include file="./Index/Tpl/Home/default/public/footer.htm" />
10npsite
trunk/Index/Tpl/Inn/default/apply/submit.htm
HTML
asf20
2,105
<tagLib name="html"/> <include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-apply-form.css" type="text/css" rel="stylesheet" /> <script src="http://cdn.jquerytools.org/1.2.7/form/jquery.tools.min.js"></script> <script type="text/javascript"> (function($){ $(function(){ //表单验证 $("#myform").validator({ messageClass:"yellow", position:"center right", offset:[0,10] }); //表单效果 $("#myform input").focus(function(){ $(this).addClass('input_hover'); }).blur(function(){ $(this).removeClass('input_hover'); }); }); window.getChildType = function(typeId) { obj = $("#myform select[name='type']"); obj.nextAll().remove(); $.get('__KZURL__/apply/getChildType', {typeId: typeId}, function(data){ htmlStr = ''; $.each(data, function(i, n){ htmlStr += '<option value="'+i+'">'+n+'</option>'; }); if(htmlStr!='') { htmlStr = '<select name="trueType">'+htmlStr+'</select>'; obj.after(htmlStr); } },'json'); } })(jQuery); </script> <!--主体内容 start--> <div class="content"> <div class="zsjm_nr"> <div class="zsjm_title"> <ul class="zsjm_bq"> <li class="zsjm_bt_hover"><span class="zsjm_num">1</span><span><a href="javascript:;">客栈信息</a></span></li> <li class="zsjm_bt"><span class="zsjm_num">2</span><span><a href="javascript:;">联系信息</a></span></li> <li style="float:right;"><img src="__PUBLIC__/images/zsjm.jpg" /></li> </ul> </div> <div class="sjht_fd bg_gray1"> <form id="myform" method='post' action='__KZURL__/apply/submit' onsubmit='return confirm("请确保您填写的资料真实准确,是否确认提交?")'> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">客栈名称</span> <span><input type="text" name='name' required="required" data-message="客栈名称必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">客栈英文名称</span> <span><input type="text" name='name_en' required="required" data-message="客栈英文名称必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">客栈类型</span> <span class="dx"> <html:select name='type' options='InnTypeList' change='getChildType(this.value)' /> </span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">客栈级别</span> <span class="dx"> <html:select name='class' options='InnClassList' /> </span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">开业时间</span> <span><input type="text" name='openTime' required="required" data-message="开业时间必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">房间数量</span> <span><input type="text" name='roomCount' required="required" data-message="房间数量必须填写!" /></span> </p> </li> <li class="kzss_new"> <p> <span class="zc_xx_title">客栈设施</span> <span class="kzss"> <html:checkbox name='facility' checkboxes='InnFacilityList' /> </span> </p> </li> <!-- <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">[客栈位置]</span> <span><input type="text" /></span> </p> </li> --> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">客栈地址</span> <span><input type="text" name='address' required="required" data-message="客栈地址必须填写!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">地理位置介绍</span> <span class="bjk"><textarea name='location' required="required" data-message="地理位置介绍必须填写!"></textarea></span> </p> </li> <!-- <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">[客栈地图]</span> <span><input type="text" /></span> <span><a href="">本地上传…</a></span> </p> </li> --> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">客栈简介</span> <span class="bjk"><textarea name='shortintro' required="required" data-message="客栈简介必须填写!"></textarea></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">客栈详细介绍</span> <span class="bjk"><textarea name='introduction' required="required" data-message="客栈详细介绍必须填写!"></textarea></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">客栈英文介绍</span> <span class="bjk"><textarea name='introduction_en' required="required" data-message="客栈英文介绍必须填写!"></textarea></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">客栈特色</span> <span class="bjk"><textarea name='features' required="required" data-message="客栈特色必须填写!"></textarea></span> </p> </li> <li class="kzss_new"> <p> <span class="zc_xx_title">客栈主题</span> <span class="kzss"><html:checkbox name='subject' checkboxes='InnSubjectList' /></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">预订须知</span> <span class="bjk"><textarea name='bookingPolicy' required="required" data-message="预订须知必须填写!"></textarea></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">取消及更改规则</span> <span class="bjk"><textarea name='rules' required="required" data-message="取消及更改规则必须填写!"></textarea></span> </p> </li> <li class="sjht_jtxx"> <p class="kzjs"> <span class="zc_xx_title">优惠政策</span> <span class="bjk"><textarea name='preferential' required="required" data-message="优惠政策必须填写!"></textarea></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">合作方式</span> <span class="dx"> <html:select name='cooperation' options='InnCooperationList' /> </span> </p> </li> </ul> <ul class="kt_next_two"> <li> <span>*放心上传您的资料,本资料严格保密,不会用于其它用途!</span> </li> <li> <input class="jx" type="submit" name='detailsSubmit' value="保存客栈详情" /> </li> </ul> </form> </div> </div> </div> <!--主体内容 end--> <include file="./Index/Tpl/Home/default/public/footer.htm" />
10npsite
trunk/Index/Tpl/Inn/default/apply/details.htm
HTML
asf20
9,557
<include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-apply-index.css" type="text/css" rel="stylesheet" /> <div class="content ptsq"> <div class="ptsq_nr"> <!--普通用户申请左边 start--> <div class="sq_left"> <li><img src="__PUBLIC__/images/sq_left.png" /></li> </div> <!--普通用户申请左边 end--> <!--普通用户申请右边 start--> <div class="sq_right"> <div class="sq_right_title"> <li><img src="__PUBLIC__/images/add_us.jpg" /></li> </div> <div class="sq_right_nr"> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> <li>梦之旅旅游集团成立于1997年,最早实现在线即时预订,即时确定的原创团队…</li> </div> <div class="sq_zg"><a href='__KZURL__/apply/agreement'><img src="__PUBLIC__/images/sqzg.jpg" /></a></div> </div> <!--普通用户申请右边 end--> </div> </div> <include file="./Index/Tpl/Home/default/public/footer.htm" />
10npsite
trunk/Index/Tpl/Inn/default/apply/index.htm
HTML
asf20
1,978
<div class="k4"> <ul class="jdxx_title">推荐客栈</ul> <ul class="tj_kz"> <volist name="rs" id="rsjn" mod="3"> <eq name="mod" value="0"> <li></eq> <span> <a href="/hotel/view-id-<{$rsjn.hotel0}>" target="_blank"><img height="80" width="70" src="<{$rsjn.hotel15}>" /></a> <a href="/hotel/view-id-<{$rsjn.hotel0}>" target="_blank"><{$rsjn.hotel1}></a> </span> <eq name="mod" value="3"> </li></eq> </volist> </ul> </div>
10npsite
trunk/Index/Tpl/Inn/default/public/gettuijianhotel.htm
HTML
asf20
770
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>梦之旅google地图</title> </head> <body onload="initialize()"> <div id="map_canvas" style="width : <{$widthpx}>px; height : <{$heightpx}>px;"></div> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> var map; var marker; var infowindow; var geocoder; var markersArray = []; function initialize() { geocoder = new google.maps.Geocoder(); var myLatlng = new google.maps.LatLng(<{$zbz}>); var myOptions = { zoom: 13, center: myLatlng, navigationControl: true, streetViewControl: true, panControl: true, //方向盘 scaleControl: true, //比例尺 mapTypeControl: false, //可以选的地图类型,下面是配置 streetViewControl:false,//街头小人 zoomControl: true, //放大按钮,下面是配置 mapTypeId: google.maps.MapTypeId.ROADMAP, } map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); placeMarker(myLatlng);//标标出来 } function placeMarker(location) { clearOverlays(infowindow); var clickedLocation = new google.maps.LatLng(location); marker = new google.maps.Marker({ position: location, ico:"http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_red.png", title:"<{$hname}>", map: map }); markersArray.push(marker); //map.setCenter(location); var point = location.lat() + "," + location.lng(); } function clearOverlays(infowindow) { if (markersArray) { for (i in markersArray) { markersArray[i].setMap(null); } markersArray.length = 0; } if (infowindow){ infowindow.close(); } } function setlocation(location, title) { map.setCenter(location); marker = new google.maps.Marker({ map: map, position: location, title: title }); } </script> </body> </html>
10npsite
trunk/Index/Tpl/Inn/default/public/showgooglemap.htm
HTML
asf20
2,746
<!--商家后台左边 start--> <div class="ht_left"> <div><img src="__PUBLIC__/images/ht_top.jpg" /></div> <div class="ht_left_nr"> <li class="ht_left_title"><img src="__PUBLIC__/images/kt_left_title.jpg" /></li> <li><a href="">后台首页</a></li> <li><a href="__KZURL__/list/index">客栈管理</a></li> <li><a href="__KZURL__/book/index">订单管理</a></li> <li><a href="__KZURL__/message/index">留言管理</a></li> <li><a href="__KZURL__/reviews/index">点评管理</a></li> </div> <div><img src="__PUBLIC__/images/ht_bottom.jpg" /></div> </div> <!--商家后台左边 end-->
10npsite
trunk/Index/Tpl/Inn/default/public/innleft.htm
HTML
asf20
662
<tagLib name="html"/> <include file="./Index/Tpl/Home/default/public/header.htm" /> <link href="__PUBLIC__/css/inn-adm-base.css" type="text/css" rel="stylesheet" /> <style type="text/css"> .sjht_xx{ padding-top:0px; margin:0; font-size:12px; color:#000; line-height:15px; } .sjht_fd table{ border-top:2px solid #35AFC1; border-left:1px solid #e0e0e0; text-align:center; } .sjht_fd table td{ border-right:1px solid #e0e0e0; border-bottom:1px solid #e0e0e0; padding:5px; } .sjht_fd table .title{ height:33px; background:url(__PUBLIC__/images/tr_bg.png); } .sjht_fd table .title td{ padding:0px; } .sjht_fd a{ color:#0069CA; } </style> <script src="http://cdn.jquerytools.org/1.2.7/form/jquery.tools.min.js"></script> <script type="text/javascript"> (function($){ $(function(){ $("#myform").validator({ messageClass:"yellow", position:"bottom left" }); $("#myform input").focus(function(){ $(this).addClass('input_hover'); }).blur(function(){ $(this).removeClass('input_hover'); }); }); })(jQuery); </script> <link rel="stylesheet" type="text/css" href="__PUBLIC__/jsLibrary/uploadify/uploadify.css" /> <script src="__PUBLIC__/jsLibrary/uploadify/jquery.uploadify-3.1.min.js"></script> <script type='text/javascript'> function del(id) { if(confirm('确定要删除此图片?')) { $.post('__KZURL__/room/delimages', { "id": <{$room["id"]}>, "imgid":id, "innid":"<{$inn.id}>" }, function(data){ if(data!=1) alert(data); else $('#innimages'+id).remove(); }, "text"); } } $(function() { $("#images_upload").uploadify({ swf : '__PUBLIC__/jsLibrary/uploadify/uploadify.swf', uploader : '__KZURL__/room/upimages', height : 30, width : 120, buttonText: '选择图片', fileTypeExts: '*.gif;*.jpg;*.jpeg;*.png', fileSizeLimit: '1024KB', formData: { "id":"<{$room.id}>", "innid":"<{$inn.id}>" }, onUploadSuccess: function (file, data, response) { if (data.indexOf('错误提示:') > -1) { alert(data); } else { data = eval('(' + data + ')'); domStr = "<span id='innimages"+data.picid+"'>"; domStr += " <em class='del'>"; domStr += " <a href='javascript:;'>"; domStr += " <img src='__PUBLIC__/images/sc.png' onclick='del("+data.picid+")' />"; domStr += " </a>"; domStr += " </em>"; domStr += " <em>"; domStr += " <img src='"+data.picpath+"' width='100' />"; domStr += " </em>"; domStr += "</span>"; $("li.tpj").append(domStr); } }, onUploadError: function (file, errorCode, errorMsg, errorString) { alert('文件:' + file.name + ' 上传失败: ' + errorString); } }); }); </script> <div class="content"> <include file="public:innleft" /> <!--商家后台右边 start--> <div class="sjht_right"><div class="sjht_xx"><div class="sjht_fd"> <ul> <li class="jt_title"> <a href='__KZURL__/room/index-innId-<{$inn.id}>'>[房型管理]</a> <a href='__KZURL__/price/index-innId-<{$inn.id}>'>[价格管理]</a> </li> </ul> <div style='float:left;width:49%'> <h2 style='line-height:40px;'><{$inn.name}></h2> <ul> <volist name='roomList' id='vo'> <li><a href="__KZURL__/room/index-innId-<{$inn.id}>-roomid-<{$vo.id}>"><{$vo.name}></a></li> </volist> <input class="jx" type="button" onclick='window.location.href="__KZURL__/room/index-innid-<{$inn.id}>"' value="添加房型" /> </ul> </div> <div style='float:left;width:49%'> <h2 style='line-height:40px;'><empty name='room'>添加房型<else/>修改房型</empty></h2> <form id="myform" method='post' action='__KZURL__/room/do_room'> <ul> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">房型名称</span> <span><input type="text" name='name' value='<{$room.name}>' required="required" data-message="请填写房型名称!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">所属酒店</span> <span class="dx"><{$inn.name}></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">房型类别</span> <span><html:select name='type' options='roomTypeList' selected="room['type']" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">预定类型</span> <span><html:select name='orderType' options='roomOrderTypeList' selected="room['orderType']" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">床位数</span> <span><input type="text" name='bed' value='<{$room.bed}>' required="required" data-message="请填写床位数!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">每晚可预定房间数</span> <span><input type="text" name='num' value='<{$room.num}>' required="required" data-message="请填写可预定房间数!" /></span> </p> </li> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">房型简介</span> <span><html:editor id="des" name="des"><{$room.des}></html:editor></span> </p> </li> <empty name='room'> <li class="sjht_jtxx">添加房型成功后可以继续设置房型照片</li> <else/> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">房型图片</span> <span><input type="file" name='images_upload' id='images_upload' /></span> </p> </li> <li class="tpj"> <volist name='InnRoomImagesList' id='vo'> <span id='innimages<{$vo.id}>'> <em class="del"><a href='javascript:;'><img src="__PUBLIC__/images/sc.png" onclick='del(<{$vo.id}>)' /></a></em> <em><img src="<{$vo.path}>" width="100" /></em> </span> </volist> </li> </empty> <li class="sjht_jtxx"> <p class="zc_xx"> <span class="zc_xx_title">排序</span> <span><input type="text" name='display_order' value='<{$room.display_order}>' /></span> </p> </li> </ul> <ul class="kt_next_two"> <li> <input type="hidden" value='<{$inn.id}>' name='innId'> <empty name='room'> <input class="jx" type="submit" name='add' value="添加房型" /> <else/> <input type="hidden" value='<{$room.id}>' name='id'> <input class="jx" type="button" onclick='if(confirm("将删除此房型的所有数据,确定删除吗?"))window.location.href="__KZURL__/room/do_delete-innid-<{$inn.id}>-roomid-<{$room.id}>"' value="删除此房型" /> <input class="jx" type="submit" name='modify' value="保存房型修改" /> </empty> </li> </ul> </form> </div> </div></div></div> <!-- <table width="49%" style='float:left;' cellspacing="0" cellpadding="0"> <caption><h2 style='line-height:40px;'><{$inn.name}></h2></caption> <tr class="title"> <td>房型名称</td> <td width=''>房型类别</td> <td width=''>房间数量</td> <td width=''>排序</td> <td width=''>操作</td> </tr> <volist name='roomList' id='vo'> <tr> <td><a href="__KZURL__/room/modify-id-<{$vo.id}>"><{$vo.name}></a></td> <td>&nbsp;<{$vo.typeName}>&nbsp;</td> <td><{$vo.num}></td> <td><{$vo.display_order}></td> <td> <a href="__KZURL__/room/do_delete-id-<{$vo.id}>" onclick='return confirm("将删除此房型所有信息,且无法恢复,请确认是否需要删除?")'>删除房型信息</a> <a href="__KZURL__/room/modify-id-<{$vo.id}>">修改房型信息</a> <a href="__KZURL__/DateSet/dayprice-innid-<{$inn.id}>-roomid-<{$vo.id}>">管理房型价格</a> </td> </tr> </volist> <tr> <td colspan='5' align='right'> <input class="jx" type="button" onclick='window.location.href="__KZURL__/room/add-id-<{$inn.id}>"' value="添加房型信息" /> </td> </tr> </table> <table width="49%" style='float:left;' cellspacing="0" cellpadding="0"> <tr> <td colspan='5' align='right'> <input class="jx" type="button" onclick='window.location.href="__KZURL__/room/add-id-<{$inn.id}>"' value="添加房型信息" /> <input class="jx" type="button" onclick='window.location.href="__KZURL__/DateSet/index-innid-<{$inn.id}>"' value="批量设置价格" /> </td> </tr> </table> --> </div> <include file='./Index/Tpl/Home/default/public/footer.htm' />
10npsite
trunk/Index/Tpl/Inn/default/room/index.htm
HTML
asf20
10,928
<volist name="rs" id="vo"> <ul class="jdxx_nr"> <li class="yk"> <p> <span><img src="<php>echo UC_API.'/avatar.php?uid=".$vo["messagesys9"]."&size=small&type='</php>" /></span> <span class="yhm"><a href="<{$Think.const.SYS_UCHOMEURL}>/space.php?uid=<{$vo.messagesys9}>" target="_blank"><php> $arr= uc_get_user($vo["messagesys9"],1); echo $arr[1]; </php></a></span> </p> </li> <li class="yhdp_nr"> <p> <span class="red font12"></span> <span class="gray font12"><{$vo.messagesys8|date="Y-m-d H:i:s",###}></span> <span class="dp_time"><a href="#">引用</a><a href="#">回复</a></span> </p> <p class="dp_content"> <{$vo.messagesys5}> </p> </li> </ul> </volist>
10npsite
trunk/Index/Tpl/Inn/default/messagesys/getmlistofhotel.htm
HTML
asf20
1,224
<style type="text/css"> #tb1{ border-collapse:collapse;} #tb1 td{ border:1px solid #CCC;padding-left:5px;} </style> <div style="width:755px!important;_width:775px; margin:0 auto;border:1px solid #ccc;"> <FORM name="formchinabank" action="/Lib/Order/chinabank/ChinaBankPay.php" method="post" onSubmit="return checkform()"> <input type="hidden" value="<{$arr.orderno}>" name="orderid" /> <input type="hidden" value="<{$arr.amount}>" name="money" /> <input type="hidden" value="<{$arr.item_name}>" name="item_name" id="item_name" /> <input type="hidden" value="<{$arr.item_number}>" name="item_number" id="item_number" /> <input type="hidden" value="<{$arr.custom}>" name="custom" id="custom" /> <input type="hidden" value="<{$arr.productid}>" name="custom" id="productid" /> <br /> <div style="width:500px; margin:0 auto;"> <table width="500" id="tb1" align="center" cellpadding="0" cellspacing="0" > <tr> <TD height=25 colspan="2" bgcolor="#C8F282" align=left>支持的信用卡类型如下:VISA。</TD> </TR> <tr > <TD width="88" height=25 >信用卡卡号</TD> <TD width="410"><input name="cardid" type="text" id="cardid" value="" maxlength="16" > 请输入16位卡号</TD> </TR> <tr > <TD height=24 >有效期时间</span></TD> <TD> <select name="month" id="month"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> 月(2位) <select name="year" id="year"> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> <option value="2014">2014</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option> <option value="2020">2020</option> <option value="2021">2021</option> </select> 年(2位)&nbsp;&nbsp;&nbsp;(如:01月09年)</TD> </TR> <tr > <TD height=25 >cvv2</TD> <TD><input name="cvv" type="text" id="cvv" value="" maxlength="3"> 信用卡背面持卡人签名处后三位数字</TD> </TR> <tr> <TD height=25 >持卡人姓名</TD> <TD><input name="name" type="text" id="name" value="姓名">&nbsp;&nbsp;请输入<STRONG>英文</STRONG>或<STRONG>拼音</STRONG>姓名</TD> </TR> <tr> <TD height=25 >证件号</TD> <TD><input name="idcard" type="text" id="idcard" value=""> 请输入身份证号或护照号</TD> </TR> <tr> <td height="25">&nbsp;加 密</td> <td>&nbsp;已采纳XHE加密算法加密以上信息。</td> </tr> </table> <table width="450" border="0" align="center" cellpadding="1" cellspacing="1"> <tr><td height="28"> <table width="97%"> <tr> <td height="63" colspan="2" align="center"><input type="image" src="/images/ljzf.jpg" value="立即支付" /></td> </tr> </table> <br> </td> </tr> </table> </div> </form> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/2011.2.28chinabank.htm
HTML
asf20
3,659
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>支付返回结果页面</title> <style type="text/css"> *{margin:0 auto;padding:0;} img{border:0;} ul,li{marign:0;padding:0;} body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } tr .STY{ border-top: solid #D0D0D0; border-top-width: thin; } #main{width:600px;border:15px #6c6c6c solid;} #main .nei{width:568px;border:6px #b2b2b2 solid;padding-left:10px;padding-right:10px;} .nei h5{font-size:12px;border-bottom:1px #999999 dashed; text-align:left;font-weight:400;height:18px;margin-bottom:20px;} /*============================box'style=============================*/ .nei .logo{margin-top:10px;} .nei .box{width:470px;} .nei .box img{width:100px;height:58px;text-align:left;display:block;float:left;} .nei .box .bj{background:url(<{*PICPATH}>/images/zfbg1.gif) no-repeat top left;width:365px;height:95px;margin-left:0px;float:left;text-align:left;} .nei .box .bj2{width:365px;height:98px;float:left;text-align:left;background:url(<{*PICPATH}>/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj2 h4{background:url(<{*PICPATH}>/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj2 h3{width:352px;height:85px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} /*========================================bj3'style======================================*/ .nei .box .bj3{width:365px;height:160px;float:left;text-align:left;background:url(<{*PICPATH}>/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj3 h4{background:url(<{*PICPATH}>/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj3 h3{width:352px;height:145px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} a:link,a:visited{color:#6633FF;text-decoration:none;} a:hover{color:#FF3366;text-decoration:underline;} </style> </head> <body> <div id="main" style="margin-left:100px;" align="left"> <div class="nei" align="center"> <img src="<{*PICPATH}>/images/logo.jpg"> <div align="center"><strong>您的出团通知书</strong></div> <div align="left"> <p><strong><{$orderinfors.username}></strong>先生/小姐,您好!<br /> 欢迎预订美国梦之旅, 您的支付已成功,下面是您的预订及支付信息,请您仔细阅读,若有疑问,随时咨询梦之旅客服人员! <br /> 我们将会在出发前二天以上发送出团通知书,请随时查询您的电子邮件,同时您也可进入您的订单,从订单中获取您的出团通知书.<br /> <strong>什么是出团通知书?<br /> </strong>出团通知书是我们的旅行团出发前发给客人的发团信息,主要内容包括客人出行所需要的预订信息,联系信息,紧急联系电话,集合地点等相关重要信息,也是最后的通知书,有时还包括一些注意事项,天气预报,安全须知等内容,客人务必仔细阅读并保存.<br /> <br> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="<{*PICPATH}>/images/tu2.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" cellpadding="5" width="100%"> <tbody> <tr> <td width="21%" align="right"><strong>订单号:</strong></td> <td width="79%"><{$arr.orderno}></td> </tr> <tr> <td align="right"><strong>姓&nbsp; 名:</strong></td> <td><{$orderinfors.username}></td> </tr> </tbody> </table></td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="<{*PICPATH}>/images/tu1.jpg" width="128" height="59" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347">产品:<a href="<{$hostname}><{$toursinfors.htmlurl}>.htm" target="_blank"><{$toursinfors.title}></a><br /> <hr /> 预定人:<{$orderinfors.username}><br /> 出团日期:<{$orderinfors.leavetime|date="Y-m-d",###}>,<br /> 联系电话:<{$orderinfors.usertel}><br /> 电子邮箱:<{$orderinfors.nuseremail}><br /> <{$orderinfors.ordercontent|formatOrderInfo}> <br><strong>客人资料:</strong><{$orderinfors.guestinto|formatOrderGuests}> <br> <strong>接送地点:</strong><{$orderinfors.jiesonganpai}> <br><strong>客人留言:</strong><br> <{$orderinfors.feetbook}> <br /></td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> <p align="left"><br /> <br /> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100">集合及机场接送信息:</td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347"> <if condition="$orderinfors.jiejisongjishengqin eq ''"> 无 <else /> <{$orderinfors.jiejisongjishengqin}> </if> </td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="<{*PICPATH}>/images/tu4.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" width="100%"> <tbody> <tr> <td width="30%" align="right"><strong>应付总金额:</strong></td> <td width="70%">$<{$orderinfors.amountmoney}></td> </tr> <tr> <td align="right"><strong>支付方式:</strong></td> <td><{$payinfors.paytype}></td> </tr> <tr> <td align="right"><strong>支付币种:</strong></td> <td><{$payinfors.earnbizhong}></td> </tr> <tr> <td align="right"><strong>已支付 金额:</strong></td> <td><{$payinfors.earnestmoney}></td> </tr> </tbody> </table> <p><br /> <if condition="$arr.djorwk eq 'dj'"> <if condition="$orderinfors.balance gt 0"> <strong>关于余款支付:</strong><br /> 支付金额:$<{$orderinfors.balance}><br> 支付期限:请在<{$orderinfors.balancepaytime|date="Y-m-d",###}>之前支付 </if> </if> </p></td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5>&nbsp;</h5> <div align="left"> <p><br /> 您也可以进入您的订单中获取与本面相同的支付确认书,<a target="_blank" href="<{$hostname}>/user/__APP__tourorder_searchone">请进入您的订单>>></a><br> *关于取消及更改预订,请参考相关 退款保障!<br> <strong>联系方式:</strong> <br> <{$toursinfors.contactus|ui_ubb}> </p> </div> <div align="center"></div> <p align="left"><br /> <a href="<{$hostname}>" target="_blank"><span lang="EN-US" xml:lang="EN-US">美国梦之旅官方网站</span></a> &nbsp;&nbsp; <a href="/__APP__tourorder_yudingxuzhicontent" target="_blank"><strong>Cancell and Refund Policy</strong></a></p> </div> </div> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/paytype/chuTianTongzhiShuMoBan.htm
HTML
asf20
11,208
<FORM name=paypalment action="/__APP__tourorder_updatenpayorder" method=post> <div style="font-size:13;border:1px solid #CCC; width:755px!important;_width:775px" align="left"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td><div style="margin-top:10px; margin-right:10px; margin-bottom:5px; margin-left:5px;"> <p>如果您仍然有疑问,您可选择暂不支付定金,并将您的问题填写在下面表格中,我们的客服人员 将尽快与您联系,之后,您可再次进入您的订单进行支付,用这种方式您仍然可以获得优惠!!  <br /> <textarea name="contentt" cols="50" rows="8" id="contentt"></textarea> <br /> <br /> </p> </div> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input type="hidden" name="charset" value="utf-8" /> <input type="submit" name="mysubmit" value="确定"> </td> </tr> </table> </div> </FORM>
10npsite
trunk/Index/Tpl/Home/default/paytype/npaydj.htm
HTML
asf20
1,009
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>美国梦之旅无定单支付页面</title> </head> <link href="/css/layout.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script language="javascript" > $(document).ready(function(){ $("span[id^='showpaytype_']").hide(); $("#zffs").bind("change",function(){ $("span[id^='showpaytype_']").hide(); zffs=$("#zffs").val(); if(zffs=="贝宝") $("#showpaytype_bb").show(); if(zffs=="转帐") $("#showpaytype_zz").show(); if(zffs=="在线支付") $("#showpaytype_zx").show(); if(zffs=="前台付现") $("#showpaytype_xj").show(); if(zffs=="支付宝") $("#showpaytype_alipay").show(); if(zffs=="不支付定金") $("#showpaytype_bd").show(); if(zffs=="中国信用卡在线") $("#showpaytype_xyzx").show(); if(zffs=="国际信用卡在线") $("#showpaytype_chinabank").show(); }); $("#paytype").bind("change",function(){ $("select[id^='zffs']").empty(); $("span[id^='showpaytype_']").hide(); if($("#paytype").val()=="RMB") { $("select[id^='zffs']").append("<option value='转帐'>转帐</option>"); $("select[id^='zffs']").append("<option value='支付宝'>支付宝支付</option>"); $("select[id^='zffs']").append("<option value='在线支付'>在线支付</option>"); $("select[id^='zffs']").append("<option value='中国信用卡在线'>中国信用卡在线</option>"); } else { $("select[id^='zffs']").append("<option value='转帐'>转帐</option>"); $("select[id^='zffs']").append("<option value='贝宝'>贝宝支付</option>"); $("select[id^='zffs']").append("<option value='国际信用卡在线'>国际信用卡在线支付</option>"); } }); //初始化选项 $("#paytype").trigger("change"); //验证填定的表单信息 $("#mySubmit").bind("click",function(){ uname=$("#uname").val(); if(uname=="") { alert("客人姓名不能为空"); $("#uname").focus(); return false; } utel=$("#utel").val(); if(utel=="") { alert("电话不能为空"); $("#utel").focus(); return false; } email=$("#email").val(); if(!email.match(/^[\w\-\_\.]{1,}@[\w\-\_\.]{1,}[\a-zA-Z]{1,}$/)) { alert("请填写正确的电子邮件"); $("#email").focus(); return false; } if($("#Paymentmatter").val()=="") { alert("请填写支付事由"); $("#Paymentmatter").focus(); return false; } if($("#lianxiry").val()=="") { alert("请填写梦之旅联系人员"); $("#lianxiry").focus(); return false; } jine=$("#jine").val(); if(!jine.match(/^[0-9\.]+/)) { alert("请输入正确的金额"); $("#jine").val(""); $("#jine").focus(); return false; } if($("#zffs").val()=="") { alert("请选择支付类型"); $("#zffs").focus(); return false; } }); }); </script> <body> <div id="indextop"> <include file="./html/public/top.htm" /> </div> <div id="content" align="left"> <div id="dfdf" style="margin:20px 80px;"> <div style="padding:3px; font-size:14px;"><img src="<{*PICPATH}>/images/shop.gif" style="vertical-align:bottom;"><strong>梦之旅无订单快速支付系统</strong><br /></div> <div style="border:1px solid #ccc; border-bottom:none; background:#ececec; padding:6px; line-height:20px;"> 这是梦之旅的无订单支付系统,不需要您预先下订单,如果您已与我们的客服人员谈好购买<br /> 事宜后,直接在此支付即可。<br /> 支付步骤及方法:<br /> 1、在下列表格中填写相关内容,并选择支付类型。<br /> 2、提交后进行第三方支付平台,在第三方支付平台按提示进行相关操作。<br /> 3、支付成功后,会有相关提示。<br /> 4、通知梦之旅相关人员,待我方确认后进行一步操作。<br /> </div> <div><img src="<{*PICPATH}>/images/bottomsanjiao.gif"></div> <br> <form action="/__APP__tourorder_addnpayorder" method="post" name="FrontPage_Form1" id="FrontPage_Form1" > <div style="border:8px solid #d0e9ed;padding:6px; line-height:20px;"> <table border="0" cellspacing="0" cellpadding="2" width="750" align="center"> <tbody> <tr> <td><strong>直接支付(无订单) <br /> <br /> </strong> <table border="0" cellspacing="0" cellpadding="0" width="96%" align="right"> <tbody> <tr> <td width="18%" height="28" align="center"><div class="kfsyou" ><strong >客人姓名</strong> </div></td> <td width="82%" height="28"><input name="uname" id="uname"/> *</td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">客人电话 </div></td> <td height="28"><input name="utel" id="utel" /> *</td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">电子邮件 </div></td> <td height="11"><input name="email" id="email" /> * </td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">梦之旅联系人员 </div></td> <td height="11"><input name="lianxiry" id="lianxiry" /> * </td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">支付事由 </div></td> <td height="11"><input name="Paymentmatter" id="Paymentmatter" /> * </td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">支付金额(元)<strong> </strong></div></td> <td height="11"><input name="jine" id="jine" /> *</td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">货币类型:</div></td> <td height="12"><label for="paytype"></label> <select name="paytype" id="paytype"> <option value="RMB">人民币</option> <option value="USD">美元</option> </select></td> </tr> <tr> <td height="28" align="center"><div class="kfsyou">支付类型 </div></td> <td height="12"><select size="1" name="zffs" id="zffs"> <option value="">请选择</option> </select> <span id="showpaytype_xyzx"><a href="/__APP__about_cardonline" target="_blank">中国信用卡在线支付</a></span> <span id="showpaytype_zx"><a href="/__APP__about_ipsdo" target="_blank">在线支付</a></span> <span id="showpaytype_zz"><a href="/__APP__about_zhuanzhang" target="_blank">转帐支付</a></span> <span id="showpaytype_xj"><a href="/about/bank_cash.htm" target="_blank">前台现付</a></span> <span id="showpaytype_bb"><a href="/__APP__about_paypal" target="_blank">贝宝支付</a></span> <span id="showpaytype_bd"><a href="/__APP__about_cardonline" target="_blank">不支付定金</a></span> <span id="showpaytype_alipay"><a href="/__APP__about_bankalipay" target="_blank">支付宝支付</a></span> <span id="showpaytype_chinabank"><a href="/__APP__about_chinabank" target="_blank">国际信用卡在线支付</a></span> </td> </tr> <tr> <td height="33" align="right"><div align="left">备注:您有任何需要请在这里录入,包括你预定的内容、日期、希望的服务标准,酒店住宿、航班、游船、保险、接待等。<strong> </strong></div></td> <td valign="top"><p> <textarea id="beizhu" rows="6" cols="60" name="beizhu"></textarea> </p></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <table width="780"> <tr> <td height="33"style="border-bottom:1px dashed #CCC" colspan="2" align="right">请记住此订单号和你输入的姓名,以便查询和二次支付 </td> <tr> <td align="right"> <input value=" 开始支付 " type="image" src="<{*PICPATH}>/images/ksfk98.gif"name="mySubmit" id="mySubmit" style="vertical-align:middle" /> </td> </tr> </table> </form> <br /> </div> </div> <div id="indexfoot"> <include file="./html/public/foot.htm" /> </div> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/paytype/npay.htm
HTML
asf20
9,723
<style type="text/css"> <!-- TD {FONT-SIZE: 9pt} SELECT {FONT-SIZE: 9pt} OPTION {COLOR: #5040aa; FONT-SIZE: 9pt} INPUT {FONT-SIZE: 9pt} --> body{ margin:0; padding:0;} #form1{ margin:0; padding:0;} #tb1{ border-collapse:collapse;} #tb1 td{ border:1px solid #CCC;} .b-ju{padding-left:5px;} .input-j{ width:160px; height:20px; line-height:20px;} </style> <div style="width:755px!important;_width:775px; border:1px solid #ccc; margin:0;"> <form id="formipsrmb" action="<{$SYS_config.siteurl}>/Index/Lib/Order/CardOnlineIpsRmb/redirect.php" method="post" target="_blank"> <br /> <div style="text-align:left; width:740px;border-bottom:1px dashed #CCC; line-height:22px; padding:4px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择中国信用卡在线支付,中国信用卡是指中国境内各银行发行的信用卡或贷记卡,包括visa,Master卡等</strong>.<br /> 中国信用卡在线(人民币)<br /> 1、按要求填写下表的相关内容,提交后进入第三方支付平台(我们不收集您的帐号信息),填写信息后提交 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> 4、并不是所有的信用卡都能在此支付,目前仅支持招商、建行、中信、工行、广发、光大、华厦、上海银行等。<br /></div> <div style=" width:423px; margin:6px auto;"> <table id="tb1" width="423" cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF" bordercolorlight="#333333" align="center"> <tr> <td height="30" bgcolor="#c1e0f5" colspan="2" align="center"> <font color="#000"><b>梦之旅信用卡在线支付中心</b></font> </td> </tr> <tr > <td width="123" class="b-ju" height="28">持卡人姓名</td> <td width="286" class="b-ju" > <input type="text" name="pName" class="input-j" size="16" value="" /> </td> </tr> <tr> <td height="28" class="b-ju" >持卡人证件类型</td> <td class="b-ju" > <select name="pIDType" class="input-j"> <option value="1" selected="selected">身份证</option> <option value="2">护照</option> <option value="3">军官证</option> <option value="4">回乡证</option> <option value="5">台胞证</option> <option value="6">港澳通行证</option> <option value="7">国际海员证</option> <option value="8">外国人永久居住证</option> <option value="9">其他</option> </select> </td> </tr> <tr> <td height="28" class="b-ju" >选择卡类型</td> <td class="b-ju" ><select name="pGateWayType" id="pGateWayType" class="input-j"> <option value="1">中国信用卡</option> <option value="2">国际信用卡</option> </select></td> </tr> <tr> <td height="28" class="b-ju" >持卡人证件号码</td> <td class="b-ju" > <input type="text" class="input-j" name="pIDNum" size="24" value="" /> <br /> 请输入您办理信用卡时所填写的证件号 </td> </tr> <tr> <td height="27" class="b-ju" >持卡人电话</td> <td class="b-ju" > <input type="text" class="input-j" name="pTel" size="16" value="" /> <br /> 如果您填写中国的手机,支付后将会获得短信通知支付结果。 </td> </tr> <tr> <td style="border:0"colspan="2" height="35" align="center"><br /><input type="image" id="cardonlinermbsubmit" src="__PUBLIC__/images/ljzf.jpg" value="立即支付" /></td> </tr> </table></div> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input type="hidden" name="pOrderEncodeType" value="1" id="pOrderEncodeType"> <input type="hidden" name="pCurrency" ID="pCurrency" size="16" value="RMB" /> <input type="hidden" name="pMerCode" id="pMerCode" size="18" value="014740" /><!--商户号--> <input type="hidden" name="pLang" id="pLang" size="18" value="GB" /><!--商户号--> <input type="hidden" name="pBillEXP" id="pBillEXP" size="16" value="2" /> <input type="hidden" name="pRetEncodeType" id="pRetEncodeType" size="16" value="12" /> </form> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/CardOnlineRmb.htm
HTML
asf20
4,944
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language=javascript> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> <title>支付返回结果页面</title> </head> <body> <if condition="$isprint eq 'yes'"> <div style="margin-top:10px; margin-bottom:10px;" align="center"><input name="printdo2" id="printdo2" onclick="doPrint()" type="button" value="打 印" /></div> </if> <!--startprint--> <style type="text/css"> *{margin:0 auto;padding:0;} img{border:0;} ul,li{marign:0;padding:0;} body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } tr .STY{ border-top: solid #D0D0D0; border-top-width: thin; } #main{width:600px;border:15px #6c6c6c solid;} #main .nei{width:568px;border:6px #b2b2b2 solid;padding-left:10px;padding-right:10px;} .nei h5{font-size:12px;border-bottom:1px #999999 dashed; text-align:left;font-weight:400;height:18px;margin-bottom:20px;} /*============================box'style=============================*/ .nei .logo{margin-top:10px;} .nei .box{width:470px;} .nei .box img{width:100px;height:58px;text-align:left;display:block;float:left;} .nei .box .bj{background:url(<{*PICPATH}>/images/zfbg1.gif) no-repeat top left;width:365px;height:95px;margin-left:0px;float:left;text-align:left;} .nei .box .bj2{width:365px;height:98px;float:left;text-align:left;background:url(<{*PICPATH}>/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj2 h4{background:url(<{*PICPATH}>/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj2 h3{width:352px;height:85px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} /*========================================bj3'style======================================*/ .nei .box .bj3{width:365px;height:160px;float:left;text-align:left;background:url(<{*PICPATH}>/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj3 h4{background:url(<{*PICPATH}>/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj3 h3{width:352px;height:145px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} a:link,a:visited{color:#6633FF;text-decoration:none;} a:hover{color:#FF3366;text-decoration:underline;} </style> <div id="main" align="center"> <div class="nei" align="center"> <img src="<{*PICPATH}>/images/logo.jpg"> <div align="center"><strong>您的支付确认书<br>E-ticket & Invoice</strong></div> <div style="line-height:40px; height:40px;"></div> <div align="left"> <p><strong><{$orderinfors.username}></strong>先生/小姐,您好!<br /> 欢迎预订美国梦之旅, 您的支付已成功,下面是您的预订及支付信息,请您仔细阅读,若有疑问,随时咨询梦之旅客服人员! <br /> 我们将会在出发前二天以上发送出团通知书,请随时查询您的电子邮件,同时您也可进入您的订单,从订单中获取您的出团通知书.<br /> <strong>什么是出团通知书?<br /> </strong>出团通知书是我们的旅行团出发前发给客人的发团信息,主要内容包括客人出行所需要的预订信息,联系信息,紧急联系电话,集合地点等相关重要信息,也是最后的通知书,有时还包括一些注意事项,天气预报,安全须知等内容,客人务必仔细阅读并保存.<br /> <br> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="<{*PICPATH}>/images/tu2.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" cellpadding="5" width="100%"> <tbody> <tr> <td width="21%" align="right"><strong>订单号:</strong></td> <td width="79%"><{$arr.orderno}></td> </tr> <tr> <td align="right"><strong>姓&nbsp; 名:</strong></td> <td><{$orderinfors.username}></td> </tr> </tbody> </table></td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="<{*PICPATH}>/images/tu1.jpg" width="128" height="59" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347">产品:<a href="<{$hostname}>/<{$toursinfors.htmlurl}>.htm" target="_blank"><{$toursinfors.title}></a><br /> <hr /> 预定人:<{$orderinfors.username}><br /> 出团日期:<{$orderinfors.leavetime|date="Y-m-d",###}>,<br /> 联系电话:<{$orderinfors.usertel}><br /> 电子邮箱:<{$orderinfors.nuseremail}><br /> <{$orderinfors.ordercontent|formatOrderInfo}> <br><strong>客人资料:</strong><{$orderinfors.guestinto|formatOrderGuests}> <br> <strong>接送地点:</strong><{$orderinfors.jiesonganpai}> <br><strong>客人留言:</strong><br> <{$orderinfors.feetbook}> <br /></td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> <p align="left"><br /> <br /> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100">集合及机场接送信息:</td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347"> <if condition="$orderinfors.jiejisongjishengqin eq ''"> 无 <else /> <{$orderinfors.jiejisongjishengqin}> </if> </td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="<{*PICPATH}>/images/tu4.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="<{*PICPATH}>/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" width="100%"> <tbody> <tr> <td width="50%" align="right"><strong>应付总金额:</strong></td> <td width="50%">$ <php> echo $orderinfors["amountmoney"]+$orderinfors["je3"]+$orderinfors["je4"];</php> </td> </tr> <tr> <td align="right"><strong>第一次支付金额(定金):</strong></td> <td> <if condition="$payinfors.earnbizhong eq 'RMB'">¥<else />$</if> <{$payinfors.earnestmoney}></td> </tr> <tr> <td align="right"><strong>支付方式:</strong></td> <td><{$payinfors.paytype}></td> </tr> <!-- 如果已经支付了余款则显示出来--> <if condition="($payinfors.balanceisconfim eq 1) and ($payinfors.balance gt 0)"> <tr> <td align="right"></td> <td>&nbsp;</td> </tr> <tr> <td align="right">第二次支付金额</td> <td>&nbsp;<if condition="$payinfors.balancebizhong eq 'RMB'">¥<else />$</if><{$payinfors.balance}></td> </tr> <tr> <td align="right">支付时间</td> <td>&nbsp;<{$payinfors.paytimebalance|date="Y-m-d",###}></td> </tr> <tr> <td align="right">支付方式</td> <td>&nbsp;<{$payinfors.balancepaytye}></td> </tr> </if> <!-- 如果已经支付了第三次金额则显示出来--> <if condition="($payinfors.je3isconfim eq 1) and ($payinfors.je3 gt 0)"> <tr> <td align="right"></td> <td>&nbsp;</td> </tr> <tr> <td align="right">第三次支付金额</td> <td>&nbsp;<if condition="$payinfors.je3bizhong eq 'RMB'">¥<else />$</if><{$payinfors.je3}></td> </tr> <tr> <td align="right">支付时间</td> <td>&nbsp;<{$payinfors.je3paytime|date="Y-m-d",###}></td> </tr> <tr> <td align="right">支付方式</td> <td>&nbsp;<{$payinfors.je3paytype}></td> </tr> </if> <!-- 如果已经支付了第四次金额则显示出来--> <if condition="($payinfors.je4isconfim eq 1) and ($payinfors.je4 gt 0)"> <tr> <td align="right"></td> <td>&nbsp;</td> </tr> <tr> <td align="right">第四次支付金额</td> <td>&nbsp;<if condition="$payinfors.je4bizhong eq 'RMB'">¥<else />$</if><{$payinfors.je4}></td> </tr> <tr> <td align="right">支付时间</td> <td>&nbsp;<{$payinfors.je4paytime|date="Y-m-d",###}></td> </tr> <tr> <td align="right">支付方式</td> <td>&nbsp;<{$payinfors.je4paytype}></td> </tr> </if> </tbody> </table> <div style="margin-left:100px"> <p><br /> <if condition="($arr.djorwk eq 'dj') and ($bance gt 0)"> <strong>关于第二次支付:</strong><br /> 支付金额:$<{$bance}><br> 支付期限:请在<{$orderinfors.balancepaytime|date="Y-m-d",###}>之前支付 </if> <if condition="$arr.djorwk eq 'je2'"> <strong>您刚进行的是第二次支付:</strong><br /> 支付金额:<if condition="$payinfors.balancebizhong eq 'RMB'">¥<else />$</if><{$payinfors.balance}><br> 支付方式:<{$payinfors.balancepaytye}> </if> <if condition="$arr.djorwk eq 'je3'"> <strong>您刚进行的是第三次支付:</strong><br /> 支付金额:<if condition="$payinfors.je3bizhong eq 'RMB'">¥<else />$</if><{$payinfors.je3}><br> 支付方式:<{$payinfors.je3paytype}> </if> <if condition="$arr.djorwk eq 'je4'"> <strong>您刚进行的是第四次支付:</strong><br /> 支付金额:<if condition="$payinfors.je4bizhong eq 'RMB'">¥<else />$</if><{$payinfors.je4}><br> 支付方式:<{$payinfors.je4paytype}> </if> </p> </div> </td> <td background="<{*PICPATH}>/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="<{*PICPATH}>/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5>&nbsp;</h5> <div align="left"> <p><br /> 您也可以进入您的订单中获取与本面相同的支付确认书,<a target="_blank" href="<{$hostname}>/user/__APP__tourorder_searchone">请进入您的订单>>></a><br> *关于取消及更改预订,请参考相关 退款保障!<br> <strong>联系方式:</strong> <br> <{$toursinfors.contactus|ui_ubb}> </p> </div> <div align="center"></div> <p align="left"><br /> <a href="<{$hostname}>" target="_blank"><span lang="EN-US" xml:lang="EN-US">美国梦之旅官方网站</span></a></p> </div> </div> <!--endprint--> <if condition="$isprint eq 'yes'"> <div style="margin-top:20px;" align="center"><input name="printdo" id="printdo" onclick="doPrint()" type="button" value="打 印" /></div> </if> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/paytype/showpaysucctocustomer.htm
HTML
asf20
16,367
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="/css/layout.css" type="text/css" rel="stylesheet" /> <link href="/css/guke.css" type="text/css" rel="stylesheet" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>订单支付成功,美国梦之旅</title> <style type="text/css"> .dingdan{border-collapse:collapse; background:#FFF; margin:6px auto; width="80%"} .dingdan td{border:1px solid #CCC; } .title{ width:800px; margin:0px auto;} .title h3{ background:url(/images/title23564.gif) no-repeat; text-align:left; margin:0; padding:7px; padding-left:20px; font-size:13px;} </style> <script src="__PUBLIC__/jsLibrary/jquery/jquery.js"></script> <script language="javascript"> //自动填充顾客资料 function addvalue(chenren,children,childrenm) { $(document).ready(function(){ $("input[name*='gk_']").val("XingMin"); }); } $(document).ready(function(){ $("li[id^='payto_']").bind("click",function(){ $("li[id^='payto_']").attr("class",""); thisids=$(this).attr("id"); $("#"+thisids).attr("class","cli"); $("div[id^='showpay_']").hide(); thisidss=thisids.replace(/^[a-z]+_/,""); $("#showpay_"+thisidss).fadeIn("slow"); }); $("li[id^='paytousd_']").bind("click",function(){ $("li[id^='paytousd_']").attr("class",""); thisids=$(this).attr("id"); $("#"+thisids).attr("class","cli"); $("div[id^='showpayusd_']").hide(); thisidss=thisids.replace(/^[a-z]+_/,""); $("#showpayusd_"+thisidss).fadeIn("slow"); }); $("#showrmbdiv").bind("click",function(){ $("#showusdpayment").hide(); $("#showrmbpayment").fadeIn("slow"); $("#showrmbdiv").attr("class","cli"); $("#showusddiv").attr("class","cli2"); }); $("#showusddiv").bind("click",function(){ $("#showusdpayment").fadeIn("slow"); $("#showrmbpayment").hide(); $("#showrmbdiv").attr("class","cli2"); $("#showusddiv").attr("class","cli"); }); //发送邮件 $.ajax({ url: "/__APP__SendMail_sendMailInfo_email_<{$showhtmlArr.nuseremail}>_orderno_<{$orderno}>",//目标页地址,暂不支持跨域获取 beforeSend: function(){ // Handle the beforeSend event $("#results").html("正在加载...");//发送之前显示信息 }, cache: false,//是否开启客户端缓存 success: function(html){ $("#results").html(html);//请求成功后把标签的内容替换为已获取的内容 } }); }); </script> </head> <body> <div id="wrapper" align="center"> <include file="./html/public/top.htm" /> <div id="main" style=" margin:0 auto; width:950px; overflow:hidden;background:#FFF"> <div id="tep">您的位于置:<a style="font-weight:bold" href="/">首页</a> > 订单 > 支付成功 </div> <div style="background-color:#FFF; font-size:15px; padding:6px 6px 6px 0; width:800px; " align="left"><strong>您的支付已成功</strong> </div> <script src="__PUBLIC__/jsLibrary/cdate_py_z.js"></script> <div style="line-height:20px; width:800px; overflow:hidden; height:auto;"> <div style="border:4px solid #bfe0f7;text-align:left; background:url(/images/accept.jpg) no-repeat; overflow:hidden; padding:10px 0; height:80px; padding-left:70px;"> <span> <font color="#FF0000">恭喜您!</font>您的订单号<strong style="color:#F00;"><{$arr.orderno}></strong>已经支付成功 <br>再次感谢您的预定! <br> </div> <bR> </div> <div class="title"> <h3>旅客信息</h3> <div style="border:1px solid #CCC; width:798px;"> <table width="798" cellpadding="0" cellspacing="0"> <tr bgcolor="#f7f4eb" style=" color:#968a76"> <td width="13%" align="center" height="28"><strong>订单号</strong></td> <td>2456852</td> </tr> <td height="30" align="center"style="border-right:1px solid #f3f3f3;"><strong>姓名</strong></td> <td style="border-right:1px solid #f3f3f3;">张飞</td> </table> </div> </div> <!--预订信息--> <br> <div class="title"> <h3>预订信息</h3> <div style="border:1px solid #CCC; width:798px;"> <table width="798" cellpadding="0" cellspacing="0"> <tr style=" color:#968a76"> <td width="13%" style="padding:5px;">房间信息: 第1间房入住1个成人,入住个婴儿,入住0个儿童<br> 房间数:1 <br> 参团次数:<br> 我是第1次参团,可以获取$2元优惠<br> 客人资料:<br> 第1位成人信息:<br> 客人姓名英文:dgdg 性别:男 护照:gdg 手机:dgdg<br> 第1位小孩信息:<br> 客人姓名英文: 客人性别: 护照: 手机:<br> 接送地点:我暂时不选择,出团前三天再通知<br> 客人留言: </td> </tr> </table> </div> </div> <br> <!--集合及返回信息--> <div class="title"> <h3>集合及返回信息</h3> <div style="border:1px solid #CCC; width:798px;"> <table width="798" cellpadding="0" cellspacing="0"> <tr bgcolor="#f7f4eb" style=" color:#968a76"> <td width="13%" style="padding:5px;">成都市一环路南四段<br> 联系人电话: 00000000 </td> </tr> </table> </div> </div> <!--支付信息--> <br> <div class="title"> <h3>支付信息</h3> <div style="border:1px solid #CCC; width:798px;"> <form action="" method="post" name="formdj"> <table width="798" cellpadding="0" cellspacing="0"> <tr bgcolor="#f7f4eb" style=" color:#968a76" align="center"> <td width="19%" height="28">应付总额</td><td width="16%">已付订金</td> <td width="18%">余款</td> <td width="47%">支付说明</td> </tr> <tr align="center"> <td height="30" style="border-right:1px solid #f3f3f3;">850</td> <td style="border-right:1px solid #f3f3f3;">100</td> <td style="border-right:1px solid #f3f3f3;">750</td> <td>暂无</td> </tr> </table> </form> </div> </div><br> <!--联系方式---> <div style="width:800px; padding:5px; margin:0 auto; border:3px solid #f2b77d; text-align:left"> 梦之旅美国公司联系方式: <br> 公司名称:America Dreams Travel Inc. <br> 电话:1-626-213-1817<br>     86-010-64050776<br>    86-028-86080201<br> <br> <a href="#">美国梦之旅首页</a> </div> <div id="tabcontent"> <div id="showpayusd_cardonline" style="display:none; padding:4px;"> <{$cardonlinepay}> </div> </div> <br> </div> </div> </div> <include file="./Tpl/default/public/foot.htm" /> </div> </body> <input type="hidden" name="bizhong" value="<{$bizhong}>">
10npsite
trunk/Index/Tpl/Home/default/paytype/showpaysucctocustomer___1111.htm
HTML
asf20
6,483
<div style="font-size:13;border:1px solid #CCC; width:755px!important;_width:775px" align="left"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td><div style="margin-top:15px; line-height:22px; margin-right:10px; margin-bottom:5px; margin-left:5px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择美元网银在线支付。</strong><br /> 选择网银在线支付,需要您有银行卡,包括信用卡,借记卡(如银联卡)等,并开通了网上银行的功能<br /> 1、点击支付按纽,进入第三方支付平台(我们不收集您的帐号信息),按要求填写相关内容,提交。<br /> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> <br /> </p> </div> </td> </tr> <tr> <td align="center"> <FORM name=ipspay action="/Lib/Order/IPSRMBphp/demo/redirect.php" method=post target="_blank"> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input name="mysubmit" type="image" src="<{*PICPATH}>/images/ljzf.jpg" value="我要支付"/> </FORM> </td> </tr> </table> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/ipsusd.htm
HTML
asf20
1,448
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <link href="/css/layout.css" type="text/css" rel="stylesheet" /> <link href="/css/guke.css" type="text/css" rel="stylesheet" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>订单支付成功,美国梦之旅</title> <style type="text/css"> .dingdan{border-collapse:collapse; background:#FFF; margin:6px auto; width="80%"} .dingdan td{border:1px solid #CCC; } .title{ width:800px; margin:0px auto;} .title h3{ background:url(/images/title23564.gif) no-repeat; text-align:left; margin:0; padding:7px; padding-left:20px; font-size:13px;} </style> <script src="__PUBLIC__/jsLibrary/jquery/jquery.js"></script> <script language="javascript"> //自动填充顾客资料 function addvalue(chenren,children,childrenm) { $(document).ready(function(){ $("input[name*='gk_']").val("XingMin"); }); } $(document).ready(function(){ $("li[id^='payto_']").bind("click",function(){ $("li[id^='payto_']").attr("class",""); thisids=$(this).attr("id"); $("#"+thisids).attr("class","cli"); $("div[id^='showpay_']").hide(); thisidss=thisids.replace(/^[a-z]+_/,""); $("#showpay_"+thisidss).fadeIn("slow"); }); $("li[id^='paytousd_']").bind("click",function(){ $("li[id^='paytousd_']").attr("class",""); thisids=$(this).attr("id"); $("#"+thisids).attr("class","cli"); $("div[id^='showpayusd_']").hide(); thisidss=thisids.replace(/^[a-z]+_/,""); $("#showpayusd_"+thisidss).fadeIn("slow"); }); $("#showrmbdiv").bind("click",function(){ $("#showusdpayment").hide(); $("#showrmbpayment").fadeIn("slow"); $("#showrmbdiv").attr("class","cli"); $("#showusddiv").attr("class","cli2"); }); $("#showusddiv").bind("click",function(){ $("#showusdpayment").fadeIn("slow"); $("#showrmbpayment").hide(); $("#showrmbdiv").attr("class","cli2"); $("#showusddiv").attr("class","cli"); }); //发送邮件 $.ajax({ url: "/__APP__SendMail_sendMailInfo_email_<{$showhtmlArr.nuseremail}>_orderno_<{$orderno}>",//目标页地址,暂不支持跨域获取 beforeSend: function(){ // Handle the beforeSend event $("#results").html("正在加载...");//发送之前显示信息 }, cache: false,//是否开启客户端缓存 success: function(html){ $("#results").html(html);//请求成功后把标签的内容替换为已获取的内容 } }); }); </script> </head> <body> <div id="wrapper" align="center"> <include file="./html/public/top.htm" /> <div id="main" style=" margin:0 auto; width:950px; overflow:hidden;background:#FFF"> <div id="tep">您的位于置:<a style="font-weight:bold" href="/">首页</a> > 订单 > 支付成功 </div> <div style="background-color:#FFF; font-size:15px; padding:6px 6px 6px 0; width:800px; " align="left"><strong>您的支付已成功</strong> </div> <script src="__PUBLIC__/jsLibrary/cdate_py_z.js"></script> <div style="line-height:20px; width:800px; overflow:hidden; height:auto;"> <div style="border:4px solid #bfe0f7;text-align:left; background:url(/images/accept.jpg) no-repeat; overflow:hidden; padding:10px 0; height:80px; padding-left:70px;"> <span> <font color="#FF0000">恭喜您!</font>您的订单号<strong style="color:#F00;"><{$arr.orderno}></strong>已经支付成功 <br>再次感谢您的预定! <br> </div> <bR> </div> <div class="title"> <h3>旅客信息</h3> <div style="border:1px solid #CCC; width:798px;"> <table width="798" cellpadding="0" cellspacing="0"> <tr bgcolor="#f7f4eb" style=" color:#968a76"> <td width="13%" align="center" height="28"><strong>订单号</strong></td> <td>2456852</td> </tr> <td height="30" align="center"style="border-right:1px solid #f3f3f3;"><strong>姓名</strong></td> <td style="border-right:1px solid #f3f3f3;">张飞</td> </table> </div> </div> <!--预订信息--> <br> <div class="title"> <h3>预订信息</h3> <div style="border:1px solid #CCC; width:798px;"> <table width="798" cellpadding="0" cellspacing="0"> <tr style=" color:#968a76"> <td width="13%" style="padding:5px;">房间信息: 第1间房入住1个成人,入住个婴儿,入住0个儿童<br> 房间数:1 <br> 参团次数:<br> 我是第1次参团,可以获取$2元优惠<br> 客人资料:<br> 第1位成人信息:<br> 客人姓名英文:dgdg 性别:男 护照:gdg 手机:dgdg<br> 第1位小孩信息:<br> 客人姓名英文: 客人性别: 护照: 手机:<br> 接送地点:我暂时不选择,出团前三天再通知<br> 客人留言: </td> </tr> </table> </div> </div> <br> <!--集合及返回信息--> <div class="title"> <h3>集合及返回信息</h3> <div style="border:1px solid #CCC; width:798px;"> <table width="798" cellpadding="0" cellspacing="0"> <tr bgcolor="#f7f4eb" style=" color:#968a76"> <td width="13%" style="padding:5px;">成都市一环路南四段<br> 联系人电话: 00000000 </td> </tr> </table> </div> </div> <!--支付信息--> <br> <div class="title"> <h3>支付信息</h3> <div style="border:1px solid #CCC; width:798px;"> <form action="" method="post" name="formdj"> <table width="798" cellpadding="0" cellspacing="0"> <tr bgcolor="#f7f4eb" style=" color:#968a76" align="center"> <td width="19%" height="28">应付总额</td><td width="16%">已付订金</td> <td width="18%">余款</td> <td width="47%">支付说明</td> </tr> <tr align="center"> <td height="30" style="border-right:1px solid #f3f3f3;">850</td> <td style="border-right:1px solid #f3f3f3;">100</td> <td style="border-right:1px solid #f3f3f3;">750</td> <td>暂无</td> </tr> </table> </form> </div> </div><br> <!--联系方式---> <div style="width:800px; padding:5px; margin:0 auto; border:3px solid #f2b77d; text-align:left"> 梦之旅美国公司联系方式: <br> 公司名称:America Dreams Travel Inc. <br> 电话:1-626-213-1817<br>     86-010-64050776<br>    86-028-86080201<br> <br> <a href="#">美国梦之旅首页</a> </div> <div id="tabcontent"> <div id="showpayusd_cardonline" style="display:none; padding:4px;"> <{$cardonlinepay}> </div> </div> <br> </div> </div> </div> <include file="./Tpl/default/public/foot.htm" /> </div> </body> <input type="hidden" name="bizhong" value="<{$bizhong}>">
10npsite
trunk/Index/Tpl/Home/default/paytype/备份showpaysucctocustomer.htm
HTML
asf20
6,483
<style type="text/css"> #tb1{ border-collapse:collapse;} #tb1 td{ border:1px solid #CCC;padding-left:5px;} .b-ju {padding-left:5px;} </style> <div style="width:755px!important;_width:775px; margin:0 auto;border:1px solid #ccc;"> <FORM name="formchinabank" action="/Lib/Order/chinabank/ChinaBankPay.php" method="post" onSubmit="return checkform()"> <input type="hidden" value="<{$arr.invoice}>" name="orderid" /> <input type="hidden" value="<{$arr.amount}>" name="money" /> <input type="hidden" value="<{$arr.item_name}>" name="item_name" id="item_name" /> <input type="hidden" value="<{$arr.item_number}>" name="item_number" id="item_number" /> <input type="hidden" value="<{$arr.custom}>" name="custom" id="custom" /> <input type="hidden" value="<{$arr.productid}>" name="custom" id="productid" /> <br /> <div style="text-align:left; width:740px;border-bottom:1px dashed #CCC; line-height:22px; padding:4px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择美元国际信用卡在线支付。</strong><br /> 国际信用卡(自动转换成人民币):<br /> 1、按要求填写下表的相关内容,提交后进入第三方支付平台(我们不收集您的帐号信息),填写信息后提交。<br /> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> 4、并不是所有的信用卡都能在此支付,目前仅支持VISA信用卡。<br /></div> <div style="width:500px; margin:6px auto; "> <table width="500" id="tb1" align="center" cellpadding="0" cellspacing="0" > <tr> <TD height=25 colspan="2" bgcolor="#C8F282" align=left>支持的信用卡类型如下:VISA。</TD> </TR> <tr > <TD width="88" height=25 >信用卡卡号</TD> <TD width="410"><input name="cardid" type="text" id="cardid" value="" maxlength="16" > 请输入16位卡号</TD> </TR> <tr > <TD height=24 >有效期时间</span></TD> <TD> <select name="month" id="month"> <option value="01">1</option> <option value="02">2</option> <option value="03">3</option> <option value="04">4</option> <option value="05">5</option> <option value="06">6</option> <option value="07">7</option> <option value="08">8</option> <option value="09">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> 月 <select name="year" id="year"> <option value="11">2011</option> <option value="12">2012</option> <option value="13">2013</option> <option value="14">2014</option> <option value="15">2015</option> <option value="16">2016</option> <option value="17">2017</option> <option value="18">2018</option> <option value="19">2019</option> <option value="20">2020</option> <option value="21">2021</option> </select> 年&nbsp;&nbsp;&nbsp;(如:1月2012年)</TD> </TR> <tr > <TD height=25 >cvv2</TD> <TD><input name="cvv" type="text" id="cvv" value="" maxlength="3"> 信用卡背面持卡人签名处后三位数字</TD> </TR> <tr> <TD height=25 >持卡人姓名</TD> <TD><input name="name" type="text" id="name" value="姓名">&nbsp;&nbsp;请输入<STRONG>英文</STRONG>或<STRONG>拼音</STRONG>姓名</TD> </TR> <tr> <TD height=25 >证件号</TD> <TD><input name="idcard" type="text" id="idcard" value=""> <span class="b-ju"> 请输入您办理信用卡时所填写的证件号</span></TD> </TR> <tr> <td height="25">&nbsp;加 密</td> <td>&nbsp;已采纳XHE加密算法加密以上信息。</td> </tr> </table> <table width="450" border="0" align="center" cellpadding="1" cellspacing="1"> <tr><td height="28"> <table width="97%" align="center"> <tr> <td height="63" align="center"><input name="image" type="image" value="立即支付" src="<{*PICPATH}>/images/ljzf.jpg" /></td> <td height="63" align="center"><span id="changpaytypetoips" style="cursor:hand;"><img src="/images/dierguoji.jpg" /></span></td> </tr> </table> <br> </td> </tr> </table> </div> </form> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/cardonlinepay.htm
HTML
asf20
4,693
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>贝宝支付结果通知页面</title> </head> <body> 感谢你的付款,我们将在随后发送一封电子邮件到你邮箱里,请确认! </body> </html>
10npsite
trunk/Index/Tpl/Home/default/paytype/paypalReturnUrl.htm
HTML
asf20
424
<?php header("Content-type:text/html; charset=utf-8"); //商户订单号 $pBillNo = date('YmdHis') . mt_rand(100000,999999); //商户交易日期 $pDate = date('Ymd'); //商户返回地址 $url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://'; $url .= str_ireplace('localhost', '127.0.0.1', $_SERVER['HTTP_HOST']) . $_SERVER['SCRIPT_NAME']; $url = str_ireplace('orderpay', 'OrderReturn', $url); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-Type" content="text/html; charset=utf-8" /> <title>标准商户订单支付接口(新接口)</title> <style type="text/css"> <!-- TD {FONT-SIZE: 9pt} SELECT {FONT-SIZE: 9pt} OPTION {COLOR: #5040aa; FONT-SIZE: 9pt} INPUT {FONT-SIZE: 9pt} --> body{ margin:0; padding:0;} #form1{ margin:0; padding:0;} #tb1{ border-collapse:collapse;} #tb1 td{ border:1px solid #CCC;} .b-ju{padding-left:5px;} .input-j{ width:160px; height:20px; line-height:20px;} </style> <script language="javascript"> function show(zhilian) { var obj = document.getElementById("tb1"); if(zhilian == "1") { for(i=14; i<20; i++) { obj.rows[i].style.display = "block"; } obj.rows[20].style.display = "none"; obj.rows[21].style.display = "none"; } else { for(i=14; i<20; i++) { obj.rows[i].style.display = "none"; } obj.rows[20].style.display = "block"; obj.rows[21].style.display = "block"; } } </script> </head> <body> <div style="width:755px!important;_width:775px; border:1px solid #ccc; margin:0;"> <form id="form1" action="/Lib/Order/CardOnlineIpsRmb/redirect.php" method="post" > <br /><br /> <div style=" width:423px; margin:0 auto;"> <table id="tb1" width="423" cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF" bordercolorlight="#333333" align="center"> <tr> <td height="30" bgcolor="#c1e0f5" colspan="2" align="center"> <font color="#000"><b>梦之旅信用卡在线支付中心</b></font> </td> </tr> <tr > <td width="123" class="b-ju" height="28">持卡人姓名</td> <td width="286" class="b-ju" > <input type="text" name="pName" class="input-j" size="16" value="" /> </td> </tr> <tr> <td height="28" class="b-ju" >持卡人证件类型</td> <td class="b-ju" > <select name="pIDType" class="input-j"> <option value="1" selected="selected">身份证</option> <option value="2">护照</option> <option value="3">军官证</option> <option value="4">回乡证</option> <option value="5">台胞证</option> <option value="6">港澳通行证</option> <option value="7">国际海员证</option> <option value="8">外国人永久居住证</option> <option value="9">其他</option> </select> </td> </tr> <tr> <td height="28" class="b-ju" >持卡人证件号码</td> <td class="b-ju" > <input type="text" class="input-j" name="pIDNum" size="24" value="" /> </td> </tr> <tr> <td height="27" class="b-ju" >持卡人电话</td> <td class="b-ju" > <input type="text" class="input-j" name="pTel" size="16" value="" /> </td> </tr> <tr> <td style="border:0"colspan="2" height="35" align="center"><br /><input type="image" src="/images/ljzf.jpg" value="立即支付" /></td> </tr> </table></div> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" ><br> </volist> <input type="hidden" name="pOrderEncodeType" value="1" id="pOrderEncodeType"> <input type="hidden" name= "pGateWayType" value="1" id="pGateWayType"> <input type="hidden" name="pCurrency" size="16" value="RMB" /> <input type="hidden" name="pMerCode" id="pMerCode" size="18" value="014740" /><!--商户号--> <input type="hidden" name="pLang" id="pLang" size="18" value="GB" /><!--商户号--> <input type="hidden" name="pBillEXP" id="pBillEXP" size="16" value="2" /> <input type="hidden" name="pRetEncodeType" id="pRetEncodeType" size="16" value="12" /> </form> <script language="javascript"> show(""); </script> </div> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/paytype/2011.2.28CardOnlineRmb.htm
HTML
asf20
4,879
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } a { font-size: 12px; } </style> </head> <body> <div style="text-align:left; width:740px;border-bottom:1px dashed #CCC; line-height:22px; padding:4px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择国际信用卡在线支付,国际信用卡指的是中国境外银行发行的信用卡(Creidit Card)或贷记卡(Debit Card)),包括Visa,Master卡等</strong><br /> 国际信用卡在线(人民币):<br /> 1、按要求填写下表的相关内容,然后提交。<br> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> 4、并不是所有的信用卡都能在此支付,目前仅支持Visa, MasterCard等。<br /> 5、提示:人民币5000元以下的金额用此方式支付,人民币5000元以上的请用提供授权书, <a href="http://www.dreams-travel.com/pay/order/bank_xyk.asp?lang=cn" target="_blank" >点击查看详情</a> </div> <table width="535" border="0" cellspacing="0" cellpadding="0"> <form action="/<{*Q}>tourorder_addcardsougong" method="post" name="cardppayforms" id="cardppayforms" onSubmit="return checkform()"><tr> <td height="28"><div align="right"><strong>商户订单号:</strong></div></td> <td><label for="textfield"></label> <input type="text" name="orderid" id="orderid" value="<{$arr.pBillNo}>" readonly="readonly"></td> </tr> <tr> <td height="31"><div align="right"><strong>支付选择::</strong></div></td> <td height="31"><input type="radio" name="cardtype" id="cardtype" value="mastercard" checked>MasterCard&nbsp;&nbsp; <input type="radio" name="cardtype" id="cardtype" value="visa">VISA </td> </tr> <tr> <td height="31"><div align="right"><strong>请输入你的卡号:</strong></div></td> <td height="31"><input type="text" name="cardnumber" id="cardnumber" value=""></td> </tr> <tr> <td height="29" align="right"><strong>有效期:</strong></td> <td height="29"><label for="select"></label> <select name="monthday" id="monthday"> <{$monthday}> </select> <select name="yearnum" id="yearnum"> <{$y}> </select> 信用卡正面有效期 月份/年份 </td> </tr> <tr> <td height="29"><div align="right"><strong>发卡行:</strong></div></td> <td height="29"><input type="text" name="cardjg" id="cardjg" value=""> 请输入您的发卡银行名称</td> </tr> <tr> <td height="30"><div align="right"><strong>发行卡国家:</strong></div></td> <td height="30"><input type="text" name="cardcounty" id="cardcounty" value=""> 请输入您的卡片发行的国家</td> </tr> <tr> <td height="30"><div align="right"><strong>CVV2(CVC):</strong></div></td> <td height="30"><input type="text" name="cvv2" id="cvv2" value=""> 信用卡背面签名条数据的末三四位</td> </tr> <tr> <td height="30"><div align="right"><strong>金额(RMB):</strong></div></td> <td height="30"><input type="text" <if condition="$arr.pAmount gt 0"> readonly="readonly" </if> name="rmbnumber" id="rmbnumber" value="<{$arr.pAmount}>"> 本次支付的金额数,单位人民币元</td> </tr> <tr> <td height="29"><div align="right"><strong>持卡人真实姓名:</strong></div></td> <td height="29"><input type="text" name="yourname" id="yourname" value=""> 信用卡上的姓名</td> </tr> <tr> <td height="29"><div align="right"><strong>证件号码:</strong></div></td> <td height="29"><input type="text" name="idcord" id="idcord" value=""> 您的护照号码</td> </tr> <tr> <td height="66"><div align="right"><strong>备注:</strong></div></td> <td height="66"> <textarea name="contentstr" id="contentstr" cols="45" rows="5"></textarea></td> </tr> <tr> <td width="105" height="40">&nbsp;</td> <td width="430" height="40"><input type="submit" name="mysbuttom" id="mysbuttom" value="确认提交"> &nbsp;&nbsp;</td> </tr> <input type="hidden" value="<{$arr.username}>" name="username" id="username"> </form> </table> </body> </html> <script src="__PUBLIC__/jsLibrary/Jslibary.js"></script> <script language="javascript"> function checkform(){ //验证订单号 if(!checkfromOption("订单号不正确,请从正确的来源进入支付","orderid",/^[D\d\n]{4,9}/)) return false; //验证卡号 //if(!checkfromOption("请输入正确的卡号","cardnumber",/^[\w]{10,30}$/)) return false; //if(!checkfromOption("请输入正确的正确的发卡行","cardjg",/^[\s\S]{4,}$/)) return false; //if(!checkfromOption("请输入正确的正确的发卡国家","cardcounty",/^[\s\S]{2,}$/)) return false; //if(!checkfromOption("请输入正确的vcc2码或cvvc","cvv2",/^[\d]{3,4}$/)) return false; //if(!checkfromOption("请输入正确的金额,单位人民币元","rmbnumber",/^[^\.]+[\d\.]{1,}$/)) return false; //if(!checkfromOption("请输入持卡人真实姓名","yourname",/^[\s\S]{3,}$/)) return false; //if(!checkfromOption("请输入正确的证件号码","idcord",/^[\w]{3,30}$/)) return false; return true; } </script>
10npsite
trunk/Index/Tpl/Home/default/paytype/Cardguojiyuangong.htm
HTML
asf20
6,056
<div style="font-size:13;border:1px solid #CCC; width:755px!important;_width:775px;" align="left"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td><div style="margin-top:10px;line-height:20px; margin-right:10px; margin-bottom:5px; margin-left:5px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择美元贝宝支付。</strong><br /> 1、点击支付按纽,进入贝宝支付页面,如果是会员,直接登录后就可支付,如果不是会员,直接注册成为会员后立即可以支付。<br /> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> <br /> </p> </div> <FORM name=paypalment action="/Lib/Order/Paypalphp/redirect.php" method=post target="_blank"> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input type="hidden" value="USD" id="currency_code" name="currency_code"> <INPUT type="hidden" value="<{$hostname}>/Lib/Order/Paypalphp/IPNListner.php" name="notify_url" id="notify_url"> <input type="hidden" name="return" value="<{$hostname}>/Lib/Order/Paypalphp/ReturnUrl.php"> <input type="hidden" name="bn" value="PP-WPS_PHP"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="cw@dreams-travel.com"> <input type="hidden" name="charset" value="utf-8" /> &nbsp;&nbsp;&nbsp;<input type="submit" name="mysubmit" value="我要用贝宝支付"> </FORM> </td> </tr> </table> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/paypalusd.htm
HTML
asf20
1,807
<style type="text/css"> #tb1{ border-collapse:collapse;} #tb1 td{ border:1px solid #CCC;padding-left:5px;} .b-ju {padding-left:5px;} </style> <div style="width:755px!important;_width:775px; margin:0 auto;border:1px solid #ccc;"> <FORM name="formchinabank" action="/Lib/Order/chinabank/ChinaBankPay.php" method="post" onSubmit="return checkform()"> <input type="hidden" value="<{$arr.invoice}>" name="orderid" /> <input type="hidden" value="<{$arr.amount}>" name="money" /> <input type="hidden" value="<{$arr.item_name}>" name="item_name" id="item_name" /> <input type="hidden" value="<{$arr.item_number}>" name="item_number" id="item_number" /> <input type="hidden" value="<{$arr.custom}>" name="custom" id="custom" /> <input type="hidden" value="<{$arr.productid}>" name="custom" id="productid" /> <br /> <div style="text-align:left; width:740px;border-bottom:1px dashed #CCC; line-height:22px; padding:4px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择人民币国际信用卡在线支付。</strong><br /> 国际信用卡(自动转换成人民币):<br /> 1、按要求填写下表的相关内容,提交后进入第三方支付平台(我们不收集您的帐号信息),填写信息后提交。<br /> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> 4、并不是所有的信用卡都能在此支付,目前仅支持VISA. 信用卡。<br /></div> <div style="width:500px; margin:6px auto; "> <table width="500" id="tb1" align="center" cellpadding="0" cellspacing="0" > <tr> <TD height=25 colspan="2" bgcolor="#C8F282" align=left>支持的信用卡类型如下:VISA。</TD> </TR> <tr > <TD width="88" height=25 >信用卡卡号</TD> <TD width="410"><input name="cardid" type="text" id="cardid" value="" maxlength="16" > 请输入16位卡号</TD> </TR> <tr > <TD height=24 >有效期时间</span></TD> <TD> <select name="month" id="month"> <option value="01">1</option> <option value="02">2</option> <option value="03">3</option> <option value="04">4</option> <option value="05">5</option> <option value="06">6</option> <option value="07">7</option> <option value="08">8</option> <option value="09">9</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select> 月 <select name="year" id="year"> <option value="11">2011</option> <option value="12">2012</option> <option value="13">2013</option> <option value="14">2014</option> <option value="15">2015</option> <option value="16">2016</option> <option value="17">2017</option> <option value="18">2018</option> <option value="19">2019</option> <option value="20">2020</option> <option value="21">2021</option> </select> 年&nbsp;&nbsp;&nbsp;(如:1月2012年)</TD> </TR> <tr > <TD height=25 >cvv2</TD> <TD><input name="cvv" type="text" id="cvv" value="" maxlength="3"> 信用卡背面持卡人签名处后三位数字</TD> </TR> <tr> <TD height=25 >持卡人姓名</TD> <TD><input name="name" type="text" id="name" value="姓名">&nbsp;&nbsp;请输入<STRONG>英文</STRONG>或<STRONG>拼音</STRONG>姓名</TD> </TR> <tr> <TD height=25 >证件号</TD> <TD><input name="idcard" type="text" id="idcard" value=""> <span class="b-ju">请输入您办理信用卡时所填写的证件号</span></TD> </TR> <tr> <td height="25">&nbsp;加 密</td> <td>&nbsp;已采纳XHE加密算法加密以上信息。</td> </tr> </table> <table width="97%" align="center"> <tr> <td height="63" align="center"><input name="image" type="image" value="立即支付" src="<{*PICPATH}>/images/ljzf.jpg" /></td> <td height="63" align="center"><span id="changpaytypetoips" style="cursor:hand;"><img src="/images/dierguoji.jpg" /></span></td> </tr> </table> </div> </form> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/chinabank.htm
HTML
asf20
4,510
<div style="font-size:13;border:1px solid #CCC; width:755px!important;_width:775px" align="left"> <table width="100%" cellspacing="0" cellpadding="0"> <tr> <td><div style="margin-top:15px; line-height:22px; margin-right:10px; margin-bottom:5px; margin-left:5px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择人民币网银在线支付。</strong><br /> 选择网银在线支付,需要您有银行卡,包括信用卡,借记卡(如银联卡)等,并开通了网上银行的功能<br /> 1、点击支付按纽,进入第三方支付平台(我们不收集您的帐号信息),按要求填写相关内容,提交。<br /> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> <br /> </p> </div> </td> </tr> <tr> <td align="center"> <FORM name=ipspay action="/Lib/Order/IPSRMBphp/demo/redirect.php" method=post target="_blank"> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input name="mysubmit" type="image" src="<{*PICPATH}>/images/ljzf.jpg" value="我要支付"/> </FORM> </td> </tr> </table> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/ipsrmb.htm
HTML
asf20
1,451
<div style="font-size:13;border:1px solid #CCC; width:755px!important;_width:775px; margin-left:10px; margin-top:10px" align="left" > <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div style="margin-top:10px; line-height:20px;margin-right:10px; margin-bottom:5px; margin-left:5px;"><strong style=" color:#F60; font-size:13px;">您好!您已选择人民币支付宝支付。</strong><br />需要您有支付宝帐户,帐户中有足够余额或已开通网上银行。<a href="http://home.alipay.com/individual/tutorial.htm" target="_blank">什么是支付宝?</a><bR /> 1、点击支付按纽,进入支付宝页面,按要求填写相关内容,提交。<bR /> 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<bR /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。 <br /> </p> </div> <FORM name=alipayment action=<{$SYS_config.siteurl}>/Index/Lib/Order/alipay_php_utf8/alipayto.php method=post target="_blank"> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input type="hidden" value="directPay" id="pay_bank" name="pay_bank"> <div align="center"><INPUT type=image src="__PUBLIC__/images/alipay_1.gif" value=确认订单 name=nextstep ></div> </FORM> </td> </tr> </table> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/alipay.htm
HTML
asf20
1,589
<style type="text/css"> body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .talbzhuangzhang{border:1px solid #CCC; line-height:20px; padding:4px;} </style> <div align="left" class="talbzhuangzhang" > <br /> <strong style=" color:#F60; font-size:13px;">您好!您已选择美元转帐支付。</strong><br /> <strong>转帐:</strong><br /> 1、选择下面列出的帐号并准确记录下来;<br /> 2、前往相关银行转帐或直接在网上转帐、或在ATM机上转帐,一般可以立即到帐,但需要您通知我们,我们才能查到帐;<br /> (请注意根据提示选择汇款路径及SWIFT代码)<br /> <strong>转帐通知:</strong><br /> 1、转帐完成后请务必通知我们,点击订单通知(此订单通知可到梦之旅支付系统中的转帐页面去找),填写转帐信息(订单号一定要填写正确),提交即可,也可 在首页利用订单查询的方式进入您的订单,点击"转帐通知"按纽,填写相关信息后通知我们;<br /> 2、我方收到您的转帐通知后,会根据您填写的相关信息进行查证,然后在订单上确认您的转帐信息,您可再进入订单查询处理结果。<br /> <br /> </p> <div align="center" style="border-top:1px solid #F90"> <table id="table1" border="0" cellspacing="1" cellpadding="1" width="766"> <tbody> <tr> <td><div align="left"> <table id="table2" border="0" cellspacing="2" cellpadding="2" width="666" bgcolor="#ffffff" align="left"> <tbody> <tr valign="left"> <td height="25"><table id="table3" border="0" cellspacing="0" cellpadding="0" width="96%" align="center"> <tbody> <tr> <td height="25" style="line-height:20px;" align="left"><strong>美元帐号:(梦之旅美国公司帐号)</strong><br /> 如果您需要汇美元帐号<span lang="EN-US" xml:lang="EN-US">,</span>请选择梦之旅美国公司的美元帐号如下<span lang="EN-US" xml:lang="EN-US">:<br /> </span>银行<span lang="EN-US" xml:lang="EN-US">:HSBC BANK USA(</span>美国汇丰银行<span lang="EN-US" xml:lang="EN-US">)<br /> </span>帐号<span lang="EN-US" xml:lang="EN-US">:070586403<br /> </span>公司名称<span lang="EN-US" xml:lang="EN-US">:America Dreams Travel Inc.<br /> </span>美国国内汇款路径<span lang="EN-US" xml:lang="EN-US">:021001088<br /> </span>美国国外汇款路径<span lang="EN-US" xml:lang="EN-US">(swift):mrmbus33<br /> </span>银行地址<span lang="EN-US" xml:lang="EN-US">:11 east broadway New York,NY,10038<br /> </span>银行电话<span lang="EN-US" xml:lang="EN-US">:212 271 1380</span><br /> 注:在中国国内汇款,最好选择建行或招行汇款,速度快,手费费低,招行还可在网上直接转帐 </td> </tr> <tr> <td bgcolor="#ffcccc" align="left"><table id="table6" border="0" cellspacing="0" cellpadding="0" width="96%" align="center"> <tbody> </tbody> </table></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div></td> </tr> </tbody> </table> </div> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/zhuangzhang.htm
HTML
asf20
3,715
<style type="text/css"> body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .talbzhuangzhang{border:1px solid #CCC; line-height:20px; padding:4px; width:800px;} </style> <div align="left" class="talbzhuangzhang" > <strong style=" color:#F60; font-size:13px;"><br />您好!您已选择人民币转帐支付。</strong><br /> 转帐:<br /> 1、选择下面列出的帐号(个人卡号或公司帐号)并准确记录下来;<br /> 2、前往相关银行转帐或直接在网上转帐、或在ATM机上转帐,但需要您通知我们,我们才能查到帐;<br /> 转帐通知:<br /> 1、转帐完成后请务必通知我们,点击订单通知(此订单通知可到梦之旅支付系统中的转帐页面去找),填写转帐信息(订单号一定要填写正确),提交即可,也可 在首页利用订单查询的方式进入您的订单,点击"转帐通知"按纽,填写相关信息后通知我们;<br /> 2、我方收到您的转帐通知后,会根据您填写的相关信息进行查证,然后在订单上确认您的转帐信息,您可再进入订单查询处理结果。<br /> <br /> </p> <div align="center" style=" width:765px;border-top:1px dashed #ccc; padding-top:4px;"> <table id="table3" border="0" cellspacing="0" cellpadding="0" width="96%" align="center"> <tbody> <tr> <td height="25" style="line-height:20px;" align="left"><table cellspacing="0" cellpadding="0"> <tr> <td width="325" height="35" style="color:#f57e31;border-right:1px dashed #CCC " align="left"><strong>梦之旅成都总部公司帐户<br /> </strong> </td> <td width="407" align="left" style="color:#f57e31; padding-left:12px;" ><strong>神州国旅北京分社账号如下:</strong></td> </tr> <tr> <td valign="top" align="left" style="border-right:1px dashed #CCC"><p><br /> 公司全称:成都市神州国际旅行社有限公司<br /> 汇款帐号:281082686510001<br /> 开户行:招商银行成都分行小天支行<br /> </p> <p><br /> <br /> 公司全称:成都市神州国际旅行社有限公司<br /> 汇款帐号:083983120100304006864<br /> 开户行:中国光大银行成都武侯支行<br /> </p> <p><br /> <br /> 公司全称:成都市神州国际旅行社有限公司<br /> 汇款帐号:4402264219006805453<br /> 开户行:工商银行成都春熙支行高升桥分理处<br /> <br /> <br /> <font color="#FF6600">(以上帐号只接受国内各地人民币RMB汇款)</font> </p></td> <td valign="top" align="left"><p style="padding-left:12px;"> <br /><strong>对公账户</strong>:<br /> 户名:成都市神州国际旅行社有限公司北京分社<br /> 账号:0200001109020171623<br /> 开户银行:工商银行北京安定门支行<br /> <br /> <strong>对私账户</strong>:<br /> 工商银行<br> 户名:石月林 <br> 账号:621226 020000 1725460 <br> 开户行:工商银行北京交道口支行 <br /> </p></td> </tr> <Tr> <tD style="color:#FF6600; font-size:13px;" height="27" colspan="2"><strong>梦之旅成都总部对私账号</strong></tD> </Tr> <tr> <td valign="top" style="border-right:1px dashed #CCC;">招商银行"一卡通"<br /> 卡号:6225 8802 8833 4189<br /> 开户行:招商成都分行小天支行 收款人:陈 伟<br /> 交通银行"太平洋卡"<br /> 卡号:622260 0530 0050 18837<br /> 开户行:交行四川省分行成都华西支行 收款人:陈 伟<br /> 中国银行"长城电子借记卡"<br /> 卡号:6013 8231 0007 4972 886<br /> 开户行:中行成都武侯支行营业部 收款人:陈 伟<br /> <br /> 注:以上卡根据不同城市,汇款方式有两种:<bR /> 1, 直接填写存款单,写入以上卡号、收款人、金额即可。<bR /> 2,如果不能用以上方式的城市,请用个人电子汇款方式<br />填写电汇凭证。(填写内容请咨询银行业务人员)<bR /> </td> <td style="padding-left:12px;"><p><strong>建设银行&ldquo;龙卡&rdquo;</strong><br /> 卡号:6227 0038 1114 0402 298 <br /> 开户行:建行成都市高新支行    收款人:陈 伟</p> <p><strong>农业银行&ldquo;金穗通宝卡&rdquo;</strong><br /> 卡号:622848 0461 1194 05912<br /> 开户行:中国农业银行成都市芳草街分理处    收款人:陈 伟</p> <p><strong>中国工商银行</strong><br /> 卡号:622202 4402 0170 48418 <br /> 开户行:工行成都市浆洗街支行    收款人:陈 伟</p><br /> <p>注:以上卡用个人电子汇款方式,填写电汇凭证(填写内容请咨询银行业务人员)</p></td> </tr> </table> <br /></td> </tr> <tr> <td bgcolor="#ffcccc" align="left"><table id="table6" border="0" cellspacing="0" cellpadding="0" width="96%" align="center"> <tbody> </tbody> </table></td> </tr> </tbody> </table> </div> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/zhuangzhangrmb.htm
HTML
asf20
6,936
<style type="text/css"> <!-- TD {FONT-SIZE: 9pt} SELECT {FONT-SIZE: 9pt} OPTION {COLOR: #5040aa; FONT-SIZE: 9pt} INPUT {FONT-SIZE: 9pt} --> body{ margin:0; padding:0;} #form1{ margin:0; padding:0;} #tb1{ border-collapse:collapse;} #tb1 td{ border:1px solid #CCC;} .b-ju{padding-left:5px;} .input-j{ width:160px; height:20px; line-height:20px;} </style> <div style="width:755px!important;_width:775px; border:1px solid #ccc; margin:0;"> <form id="formusdips" action="/Lib/Order/CardOnlineIpsRmb/redirect.php" method="post" target="_blank" > <br /> <div style="text-align:left; width:740px;border-bottom:1px dashed #CCC; line-height:22px; padding:4px;"> <strong style=" color:#F60; font-size:13px;">您好!您已选择国际信用卡在线支付,国际信用卡指的是中国境外银行发行的信用卡(Creidit Card)或贷记卡(Debit Card)),包括Visa,Master卡等</strong><br /> 国际信用卡在线(人民币):<br /> 1、按要求填写下表的相关内容,提交后进入第三方支付平台(我们不收集您的帐号信息),填写信息后提交。 2、支付后成功后,您会收到相应的支付成功确认邮件,也可进入您的订单查询您的支付记录。<br /> 3、出团通知书也会在您出发前通过邮件发送给您,您也可以进入您的订单中获取出团通知书,在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息。<br /> 4、并不是所有的信用卡都能在此支付,目前仅支持Visa, MasterCard等。<br /></div> <div style=" width:423px; margin:6px auto;"> <table id="tb1" width="423" cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF" bordercolorlight="#333333" align="center"> <tr> <td height="30" bgcolor="#c1e0f5" colspan="2" align="center"> <font color="#000"><b>梦之旅信用卡在线支付中心</b></font> </td> </tr> <tr> <td width="123" class="b-ju" height="28">持卡人姓名</td> <td width="286" class="b-ju" > <input type="text" name="pName" class="input-j" size="16" value="" /> </td> </tr> <tr> <td height="28" class="b-ju" >持卡人证件类型</td> <td class="b-ju" > <select name="pIDType" class="input-j"> <option value="1" >身份证</option> <option value="2" selected="selected">护照</option> <option value="3">军官证</option> <option value="4">回乡证</option> <option value="5">台胞证</option> <option value="6">港澳通行证</option> <option value="7">国际海员证</option> <option value="8">外国人永久居住证</option> <option value="9">其他</option> </select> </td> </tr> <tr> <td height="28" class="b-ju" >选择卡类型</td> <td class="b-ju" ><select name="pGateWayType" id="pGateWayType" class="input-j"> <option value="1">中国信用卡</option> <option value="2" selected="selected">国际信用卡</option> </select></td> </tr> <tr> <td height="28" class="b-ju" >持卡人证件号码</td> <td class="b-ju" > <input type="text" class="input-j" name="pIDNum" size="24" value="" /> <br /> 请输入您办理信用卡时所填写的证件号 </td> </tr> <tr> <td height="27" class="b-ju" >持卡人电话</td> <td class="b-ju" > <input type="text" class="input-j" name="pTel" size="16" value="" /> </td> </tr> <tr> <td style="border:0"colspan="2" height="35" align="center"><br /><input type="image" id="cardonlinermbsubmit" src="<{*PICPATH}>/images/ljzf.jpg" value="立即支付" /></td> </tr> </table></div> <volist name="arr" id="vo"> <input type="hidden" value="<{$vo}>" id="<{$key}>" name="<{$key}>" > </volist> <input type="hidden" name="pOrderEncodeType" value="1" id="pOrderEncodeType"> <input type="hidden" name="pCurrency" ID="pCurrency" size="16" value="RMB" /> <input type="hidden" name="pMerCode" id="pMerCode" size="18" value="014740" /><!--商户号--> <input type="hidden" name="pLang" id="pLang" size="18" value="GB" /><!--商户号--> <input type="hidden" name="pBillEXP" id="pBillEXP" size="16" value="2" /> <input type="hidden" name="pRetEncodeType" id="pRetEncodeType" size="16" value="12" /> </form> </div>
10npsite
trunk/Index/Tpl/Home/default/paytype/CardOnlineusd.htm
HTML
asf20
4,823
<div class="warp"> <div class="news"> <ul> <li class="on" id="tb_11" onclick="HoverLi(1,1,6);"><span>最火热</span></li> <li class="" id="tb_12" onclick="HoverLi(1,2,6);"><span>搜线路</span></li> <li class="" id="tb_13" onclick="HoverLi(1,3,6);"><span>搜酒店</span></li> <li class="" id="tb_14" onclick="HoverLi(1,4,6);"><span>搜攻略</span></li> <li class="" id="tb_15" onclick="HoverLi(1,5,6);"><span>搜小组</span></li> <li class="" id="tb_16" onclick="HoverLi(1,6,6);"><span>找人</span></li> </ul> </div> <div class="dis" id="tbc_11"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_12"> <div class="main"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <form action="/tour/searchtour" name="toursearch" id="toursearch" method="post"> <tr> <td height="36" align="left">产品类别: <Article:article sql='select * from ".DQ."classsys where classsys3=569 order by classsys4 desc limit 0,3'> <span style="margin-left:10px;" id="searchzhouqi_<{$article.classsys0}>" class="tabchickedunselect"><{$article.classsys1}></span> </Article:article> </td> </tr> <tr> <td height="36" align="left">行程天数:<span style="margin-left:10px;" id="seartuanshu_1" class="tabchickedselect">一天</span> <span style="margin-left:10px;" id="seartuanshu_2" class="tabchickedunselect">&nbsp;二天 </span> <span style="margin-left:10px;" id="seartuanshu_3">三天</span><br><br> <span style="margin-left:10px;" id="seartuanshu_4">四天</span> <span style="margin-left:10px;" id="seartuanshu_5">五天</span> <span style="margin-left:10px;" id="seartuanshu_d5">六天及以上</span></td> </tr> <tr> <td align="left">关建字:<input name="keyword" id="keyword" type="text" size="12"> </td> </tr> <tr> <td align="left"><input name="mysubmit" id="mysubmit" type="submit" value="搜索"> </td> </tr> <input type="hidden" id="tourtype" name="tourtype" value=""> <input type="hidden" id="tianshu" name="tianshu" value=""> </form> </table> </div> </div> <div class="undis" id="tbc_13"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_14"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_15"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_16"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> </div> <script language="javascript"> $(document).ready(function(){ //获取选择的行程天数 $("span[id^='seartuanshu_']").bind("click", function(){ id=$(this).attr("id"); id=id.replace("seartuanshu_",""); $("#tianshu").val(id); $("span[id^='seartuanshu_']").attr("class","tabchickedunselect"); $(this).attr("class","tabchickedselect"); }); //获取选择周期 $("span[id^='searchzhouqi_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("searchzhouqi_","") $("#tourtype").val(id); $("span[id^='searchzhouqi_']").attr("class","tabchickedunselect"); $(this).attr("class","tabchickedselect"); }); }); </script>
10npsite
trunk/Index/Tpl/Home/default/base/search.htm
HTML
asf20
16,806
<div class="help"> <volist name="rs" id="vo"> <ul> <li class="help_title"><{$vo.title}></li> <volist name="vo['c']" id="vo2"> <li><a href="" target="_blank"><{$vo2.info1}></a></li> </volist> </ul> </volist> </div>
10npsite
trunk/Index/Tpl/Home/default/info/getpagefootlist.htm
HTML
asf20
360
你的订单成功了,订单号为<{$Think.get.orderid}>.
10npsite
trunk/Index/Tpl/Home/default/sendmail/ReceiveOrder.htm
HTML
asf20
59
<taglib name='article,Html'/> <table align="center" style="font-size:14px; line-height:25px;" width="700px"><tr><td> 尊敬的<{$rs.orderform3}>:<br> &nbsp;&nbsp;&nbsp;&nbsp; <if condition="$paytype eq 'je1'"> 您于 <else /> </if> 梦之旅已收到您的支付,特此确认。 <br /> 您的订单详情如下: <div align="center" style="color:#2F54B5"></div> <table width="95%" align="center" cellpadding="3" cellspacing="0" style="font-size:14px; line-height:25px;border:1px solid #0099FF;"> <tr style="font-weight:bold;"> <td style="border-bottom-width: 1px;border-bottom-style: dotted;border-bottom-color: #0099FF;">订单号</td> <td style="border-bottom-width: 1px;border-bottom-style: dotted;border-bottom-color: #0099FF;">订单时间</td> <td style="border-bottom-width: 1px;border-bottom-style: dotted;border-bottom-color: #0099FF;">支付方式</td> <td style="border-bottom-width: 1px;border-bottom-style: dotted;border-bottom-color: #0099FF;">支付时间</td> </tr> <volist name="$ordernoarr" id="vo"> <Article:article sql='select * from ".DQ."orderform as a left join ".DQ."pay as b on a.orderform3=b.pay1 where a.orderform=\"".$vo."\" and b.pay6=1'> <option value="<{$article.price0}>">{$article.price8}>人</option> <tr> <td><{$myorderinfo.orderform3}></td> <td><{$myorderinfo.orderform6|date="Y-m-d H:i:s",###}></td> <td> <if condition="$paytype eq 'je1'"> <{$article.pay5}>:定金<{$article.pay3|date="Y-m-d H:i",###}>元 <else /> <{$article.pay9}>:余款<{$article.pay7|date="Y-m-d H:i",###}>元 </if> </td> <td> <if condition="$paytype eq 'je1'"> <{$article.pay4}> <else /> <{$article.pay8}> </if> </td> </tr> </Article:article> </volist> </table> <p>&nbsp;&nbsp; <br /> 梦之旅</p> <p><include file="./Tpl/default/Public/adsmailtobuttom.htm" /> 此邮件是系统自动发送,请勿直接回复!</p></td></tr></table>
10npsite
trunk/Index/Tpl/Home/default/sendmail/paysuss.htm
HTML
asf20
2,207
<html> <head> <title>预定及支付成功邮件</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> .zf1 { font-size: 12px; line-height: 24px; font-weight: normal; color: #666; text-decoration: none; } .zf2 { font-size: 12px; line-height: 24px; font-weight: normal; color: #900; text-decoration: none; } .zf3 { font-size: 12px; line-height: 24px; font-weight: normal; color: #000; text-decoration: none; } .tbline { font-size: 12px; line-height: 24px; font-weight: normal; color: #000; text-decoration: none; border: 1px solid #999; } a:link { font-size: 12px; line-height: 24px; color: #666; text-decoration: none; } a:visited { font-size: 12px; line-height: 24px; color: #666; text-decoration: none; } a:hover { font-size: 12px; line-height: 24px; color: #000; text-decoration: underline; } a:active { font-size: 12px; line-height: 24px; color: #666; text-decoration: none; } </style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- ImageReady Slices (邮件.psd) --> <table width="600" height="456" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="13"><img src="__PUBLIC__/images/mail_01.jpg" width="600" height="116" alt=""></td> </tr> <tr> <td height="13" background="__PUBLIC__/images/mail_02.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><img src="__PUBLIC__/images/mail_03_03.jpg" width="358" height="36"></td> </tr> <tr> <td align="center" class="zf1"><table width="70%" border="0" cellspacing="5" cellpadding="0"> <tr> <td class="zf2">尊敬的<{$rs.orderform5}>先生/小姐,您好!</td> </tr> <tr> <td class="zf1">欢迎并感谢你的预订,您的预定已成功,特此确认!您可打印刷此页作为您的<br> 预定凭据,如果您要修改或取消您的预订,请登录到您的会员系统进行操作!</td> </tr> <tr> <td class="zf2"><strong>下面是具体的预订信息,请仔细查看:</strong></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="483" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="__PUBLIC__/images/mail_top_07.jpg" width="483" height="33" alt=""></td> </tr> <tr> <td align="center" background="__PUBLIC__/images/mail_top_09.jpg"><table width="70%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="23%" class="zf2"><strong class="zf3">订单号:</strong></td> <td width="77%" class="zf1"><{$rs.orderform3}></td> </tr> <tr> <td class="zf2"><strong class="zf3">联系人:</strong></td> <td class="zf1"><{$rs.orderform5}></td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/mail_top_11.jpg" width="483" height="2" alt=""></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="483" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="__PUBLIC__/images/mail_top_13.jpg" width="483" height="33" alt=""></td> </tr> <tr> <td align="center" background="__PUBLIC__/images/mail_top_09.jpg"><table width="90%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="23%" class="zf2"><strong class="zf3">产品信息:</strong></td> <td width="77%" class="zf1"><{$rs.orderform4}></td> </tr> <tr> <td class="zf2"><strong class="zf3">房间类型:</strong></td> <td class="zf1"><{$rs.hotelroom1}></td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">入住人数</strong></td> <td class="zf1"><{$rs.orderform8}>人</td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">入住时间:</strong></td> <td class="zf1"><{$rs.orderform9|date="Y-m-d",###}></td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">离店时间:</strong></td> <td class="zf1"><{$rs.orderform30|date="Y-m-d",###}></td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">预定内容:</strong></td> <td class="zf1"><{$rs.orderform10}></td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/mail_top_11.jpg" width="483" height="2" alt=""></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="483" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="__PUBLIC__/images/mail_top_17.jpg" width="483" height="33" alt=""></td> </tr> <tr> <td align="center" background="__PUBLIC__/images/mail_top_09.jpg"><table width="90%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="23%" class="zf2"><strong class="zf3">总金额:</strong></td> <td width="77%" class="zf1"><{$rs.orderform16}>元</td> </tr> <tr> <td class="zf2"><strong class="zf3">定金:</strong></td> <td class="zf1"> 请于<{$rs.orderform18|date="Y-m-d H:i",###}>前支付<{$rs.orderform17}>元 </td> </tr> <if condition="$rs.orderform19 gt 0"> <tr> <td class="zf2"><strong class="zf3">余额:</strong></td> <td class="zf1"> 请于<{$rs.orderform20|date="Y-m-d H:i",###}>前支付<{$rs.orderform19}>元 </td> </tr> </if> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/mail_top_11.jpg" width="483" height="2" alt=""></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> </table></td> </tr> <tr> <td height="13" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="__PUBLIC__/images/imageBig_01.jpg" width="600" height="38"></td> </tr> <tr> <td><img src="__PUBLIC__/images/imageBig_02.jpg" width="600" height="55"></td> </tr> <tr> <td height="144" background="__PUBLIC__/images/imageBig_03.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>&nbsp;</td> <td width="30%" rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="119" align="center"><a href="http://www.dreams-travel.com/"><img src="http://pw.dreams-travel.com/wenjun/image/wj053.jpg" width="178" height="118" windth="100"></td> </tr> <tr> <td height="24" align="center" style="font-size:12px;">成都梦之旅文君楼宾馆</td> </tr> </table></td> <td>&nbsp;</td> <td width="30%" rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="119" align="center"><img src="http://pw.dreams-travel.com/images/20100803/20100803194321413.jpg" width="177" height="119" windth="100"></td> </tr> <tr> <td height="24" align="center" style="font-size:12px;">北京梦之旅国际青年旅馆</td> </tr> </table></td> <td>&nbsp;</td> </tr> <tr> <td width="8%">&nbsp;</td> <td width="22%">&nbsp;</td> <td width="10%">&nbsp;</td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/imageBig_04.jpg" width="600" height="25"></td> </tr> </table></td> </tr> <tr> <td height="1"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="__PUBLIC__/images/bocc_01.jpg" width="600" height="22"></td> </tr> <tr> <td height="1" align="center" background="__PUBLIC__/images/bocc_02.jpg">&nbsp;</td> </tr> <tr> <td><img src="__PUBLIC__/images/bocc_03.jpg" width="600" height="29"></td> </tr> </table></td> </tr> </table> <!-- End ImageReady Slices --> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/sendmail/createinnorderhtml.htm
HTML
asf20
9,237
<html> <head> <title>预定及支付成功邮件</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <style type="text/css"> .zf1 { font-size: 12px; line-height: 24px; font-weight: normal; color: #666; text-decoration: none; } .zf2 { font-size: 12px; line-height: 24px; font-weight: normal; color: #900; text-decoration: none; } .zf3 { font-size: 12px; line-height: 24px; font-weight: normal; color: #000; text-decoration: none; } .tbline { font-size: 12px; line-height: 24px; font-weight: normal; color: #000; text-decoration: none; border: 1px solid #999; } a:link { font-size: 12px; line-height: 24px; color: #666; text-decoration: none; } a:visited { font-size: 12px; line-height: 24px; color: #666; text-decoration: none; } a:hover { font-size: 12px; line-height: 24px; color: #000; text-decoration: underline; } a:active { font-size: 12px; line-height: 24px; color: #666; text-decoration: none; } </style> </head> <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <!-- ImageReady Slices (邮件.psd) --> <table width="600" height="456" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="13"><img src="__PUBLIC__/images/mail_01.jpg" width="600" height="116" alt=""></td> </tr> <tr> <td height="13" background="__PUBLIC__/images/mail_02.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center"><img src="__PUBLIC__/images/mail_03_03.jpg" width="358" height="36"></td> </tr> <tr> <td align="center" class="zf1"><table width="70%" border="0" cellspacing="5" cellpadding="0"> <tr> <td class="zf2">尊敬的<{$rs.orderform5}>先生/小姐,您好!</td> </tr> <tr> <td class="zf1">欢迎并感谢你的预订,您的支付已成功,特此确认!您可打印刷此页作为您的<br> 支付凭据,如果您要修改或取消您的预订,请登录到您的会员系统进行操作!</td> </tr> <tr> <td class="zf2"><strong>下面是具体的预订及支付信息,请仔细查看:</strong></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="483" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="__PUBLIC__/images/mail_top_07.jpg" width="483" height="33" alt=""></td> </tr> <tr> <td align="center" background="__PUBLIC__/images/mail_top_09.jpg"><table width="70%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="23%" class="zf2"><strong class="zf3">订单号:</strong></td> <td width="77%" class="zf1"><{$rs.orderform3}></td> </tr> <tr> <td class="zf2"><strong class="zf3">联系人:</strong></td> <td class="zf1"><{$rs.orderform5}></td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/mail_top_11.jpg" width="483" height="2" alt=""></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="483" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="__PUBLIC__/images/mail_top_13.jpg" width="483" height="33" alt=""></td> </tr> <tr> <td align="center" background="__PUBLIC__/images/mail_top_09.jpg"><table width="90%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="23%" class="zf2"><strong class="zf3">产品信息:</strong></td> <td width="77%" class="zf1"><{$rs.orderform4}></td> </tr> <tr> <td class="zf2"><strong class="zf3">房间类型:</strong></td> <td class="zf1"><{$rs.hotelroom1}></td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">入住人数</strong></td> <td class="zf1"><{$rs.orderform8}>人</td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">入住时间:</strong></td> <td class="zf1"><{$rs.orderform9|date="Y-m-d",###}></td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">离店时间:</strong></td> <td class="zf1"><{$rs.orderform30|date="Y-m-d",###}></td> </tr> <tr> <td class="zf2" valign="top"><strong class="zf3">预定内容:</strong></td> <td class="zf1"><{$rs.orderform10}></td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/mail_top_11.jpg" width="483" height="2" alt=""></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> <tr> <td><table width="483" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><img src="__PUBLIC__/images/mail_top_17.jpg" width="483" height="33" alt=""></td> </tr> <tr> <td align="center" background="__PUBLIC__/images/mail_top_09.jpg"><table width="90%" border="0" cellspacing="5" cellpadding="0"> <tr> <td width="23%" class="zf2"><strong class="zf3">总金额:</strong></td> <td width="77%" class="zf1"><{$rs.orderform16}>元</td> </tr> <tr> <td class="zf2"><strong class="zf3">定金:</strong></td> <td class="zf1"><if condition="$rs.pay3 gt 0"> 于<{$rs.pay4|date="Y-m-d H:i",###}>时支付<{$rs.pay3}>元 <else /> 暂无支付 </if> </td> </tr> <tr> <td class="zf2"><strong class="zf3">余额:</strong></td> <td class="zf1"><if condition="$rs.pay7 gt 0"> 于<{$rs.pay8|date="Y-m-d H:i",###}>时支付<{$rs.pay7}>元 <else /> 暂无支付 </if></td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/mail_top_11.jpg" width="483" height="2" alt=""></td> </tr> </table></td> </tr> <tr> <td>&nbsp;</td> </tr> </table></td> </tr> <tr> <td height="13" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="__PUBLIC__/images/imageBig_01.jpg" width="600" height="38"></td> </tr> <tr> <td><img src="__PUBLIC__/images/imageBig_02.jpg" width="600" height="55"></td> </tr> <tr> <td height="144" background="__PUBLIC__/images/imageBig_03.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td>&nbsp;</td> <td width="30%" rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="119" align="center"><a href="http://www.dreams-travel.com/"><img src="http://pw.dreams-travel.com/wenjun/image/wj053.jpg" width="178" height="118" windth="100"></td> </tr> <tr> <td height="24" align="center" style="font-size:12px;">成都梦之旅文君楼宾馆</td> </tr> </table></td> <td>&nbsp;</td> <td width="30%" rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="119" align="center"><img src="http://pw.dreams-travel.com/images/20100803/20100803194321413.jpg" width="177" height="119" windth="100"></td> </tr> <tr> <td height="24" align="center" style="font-size:12px;">北京梦之旅国际青年旅馆</td> </tr> </table></td> <td>&nbsp;</td> </tr> <tr> <td width="8%">&nbsp;</td> <td width="22%">&nbsp;</td> <td width="10%">&nbsp;</td> </tr> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/imageBig_04.jpg" width="600" height="25"></td> </tr> </table></td> </tr> <tr> <td height="314"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="__PUBLIC__/images/bocc_01.jpg" width="600" height="22"></td> </tr> <tr> <td height="263" align="center" background="__PUBLIC__/images/bocc_02.jpg"><table width="85%" border="0" cellspacing="0" cellpadding="0"> <volist name="otherrs" id="vo"> <eq name="mod" value="0"> <tr> </eq> <td width="50%"><table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td class="tbline" align="center"><a target="_blank" href="__KZURL__/hotel/view-id-<{$vo.hotel0}>"><img border="0" src="__PUBLIC__<{$vo.hotel15}>" width="126" height="100"></a></td> </tr> <tr> <td align="center"><a target="_blank" href="__KZURL__/hotel/view-id-<{$vo.hotel0}>"><{$vo.hotel1}></a></td> </tr> </table></td> <eq name="mod" value="1"> </tr> </eq> </volist> </table></td> </tr> <tr> <td><img src="__PUBLIC__/images/bocc_03.jpg" width="600" height="29"></td> </tr> </table></td> </tr> </table> <!-- End ImageReady Slices --> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/sendmail/paysusshotel.htm
HTML
asf20
10,109
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/orderform/savechutuanzzs.htm
HTML
asf20
316
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>订单生成时邮件</title> </head> <body> <div style="width:700px; margin-left:100px;"> 尊敬的<strong><{$info.username}></strong>:<br />      很高兴通知您,梦之旅已收到您的预订信息,请仔细核对您的意向预订信息: <br /> <br /> <volist name="orderlist" id="vo"> <table cellspacing="0" cellpadding="3" width="95%" align="center"> <tbody> <tr> <td colspan="5" align="center">产品名称(<a target="_blank" href="<{$SYS_config.siteurl}>/"><{$vo.proname}></a>)</td> </tr> <tr> <td width="18%">订单号</td> <td width="18%">总金额</td> <td width="18%">订金金额</td> <td width="17%">订金支付期限</td> <td width="19%">出发时间</td> <td width="28%">订单时间</td> </tr> <tr> <td><{$vo.order}></td> <td><{$vo.totalmoney}></td> <td><{$vo.dingjingnum}></td> <td><{$vo.djzfqx|date="Y-m-d",###}></td> <td><{$vo.chufatime}></td> <td><{$vo.createtime|date="Y-m-d",###}></td> </tr> </tbody> </table> </volist> <p>  <!--日--> <br /> <br /> 为了确保您的出行,请进入您的订单完成您的支付,也可等待客服人员确认您的预订后与您联系。<br />  <br /> <strong>重要提示</strong><br /> 1.在您支付成功之后,系统会立即发出支付及预订确认书,同时您也会通过E-Mail收到支付及预订确认书邮件,您还可进入您的订单查看支付及预订确认书,三重确认保障您支付无忧;<br /> 2.出团通知书也会在您出发前通过邮件发送给您(也可以进入您的订单中获取出团通知书),在出团通知书中我们会提供您出团的所有详细信息,包括当地旅行团供应商的信息. <br /> 如果您是会员,您可登录<a title="" href="/user/" target="_blank">会员系统</a>查询您的订单;如果您不是会员,您可进入<a title="http://www.dreams-travel.com/pay/order/find_order.asp CTRL + 单击以下链接" href="/" target="_blank">订单查询系统</a>使用订单号和您的姓名进入订单,同时欢迎您成为梦之旅会员,注册即可获得积分奖励享受产品优惠价格,参加旅游及入住梦之旅集团连锁酒店,积分可直接抵扣现金。 <br /> <br /> 梦之旅·神州国旅<br /> 此邮件为自动发送,请勿回复!<br /> </p> </div> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/mail/createorder.htm
HTML
asf20
2,731
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>fff</title> </head> <body> <volist name="rs" id="vo"> <div><{$vo.tour1}></div> </volist> <br> <{$show}> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/tour/showlist.htm
HTML
asf20
389
<include file="Public:header" /> <div class="clear"></div> <div class="content"> <div class="content_main"> <!--内容左边 start--> <div class="main_left"> <div class="tj"> <div class="tj_title"><img src="__PUBLIC__/images/tj_title.jpg" /></div> <div class="tj_nr"> <div class="fn"> <ul class="fn_title">攻略分类</ul> <ul class="pink"> <li> <script language="javascript" type="text/javascript" src="http://demo.mzl5.com/user/js.php?id=1"></script> </li> </ul> </div> <div class="fn"> <ul class="fn_title">地域风情</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">热门城市周边</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">国内旅游</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">出境旅游</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">旅游服务</ul> <ul class="pink"> <li> <a href="" target="_blank">酒店</a> <a href="" target="_blank">门票</a> </li> <li> <a href="" target="_blank">签证</a> <a href="" target="_blank">攻略</a> </li> <li> <a href="" target="_blank">游记</a> <a href="" target="_blank">旅游纪念册</a> </li> </ul> </div> </div> </div> <div class="why"> <!--品牌保障 start--> <div class="b1"> <ul class="b1_title"><img src="__PUBLIC__/images/pp.jpg" /></ul> <ul>20年专业旅游提供商</ul> <ul>累计服务千万人次</ul> </div> <!--品牌保障 end--> <div class="clear"></div> <!--服务保障 start--> <div class="b1"> <ul class="b1_title"><img src="__PUBLIC__/images/fw.jpg" /></ul> <ul> <li class="f">低价保障</li> <li class="ml20">发团保障</li> </ul> <ul> <li class="f">退团保障</li> <li class="ml20">安全支付</li> </ul> <ul> <li class="f">售后保障</li> <li class="ml20">即时预订</li> </ul> </div> <!--服务保障 end--> <div class="clear"></div> <!--团队荣誉 start--> <div class="b1"> <ul class="b1_title"><img src="__PUBLIC__/images/ry.jpg" /></ul> <ul>旅游门户领先者</ul> <ul>四川十大电子商务网站</ul> <ul>四川旅游十强社</ul> </div> <!--团队荣誉 end--> </div> </div> <!--内容左边 end--> <!--内容中间 start--> <div class="main_center"> <!--浏览方式选择 start--> <div class="llfs"> <div class="llfs_title">按条件浏览</div> <div class="fs"> <ul> <li class="bold">旅行方式:</li> <li class="xz_hover"><a href="">全部</a></li> <li><a href="">拼团游</a></li> <li><a href="">包团游</a></li> <li><a href="">散客自由行</a></li> <li><a href="">跟团游</a></li> </ul> <ul> <li class="bold">目的地:</li> <li><a href="">全部</a></li> <li><a href="">峨眉山</a></li> <li class="xz_hover"><a href="">乐山</a></li> <li><a href="">黄龙</a></li> </ul> <ul> <li class="bold">行程天数:</li> <li><a href="">全部</a></li> <li class="xz_hover"><a href="">1天</a></li> <li><a href="">2天</a></li> <li><a href="">3-4天</a></li> <li><a href="">5-7天</a></li> <li><a href="">8-10天</a></li> <li><a href="">10天以上</a></li> </ul> </div> </div> <!--浏览方式选择 end--> <div class="clear"></div> <!--今日推荐 start--> <div class="jrtj"> <ul class="jrtj_title"> <li class="font14 bold">今日推荐</li> <li class="f1">今日推荐是由梦之旅资深旅行家为您推荐的!</li> </ul> <ul> <li class="jrtj_tp"><a href="" target="_blank"><img src="__PUBLIC__/images/jrtj.jpg" /></a></li> <li class="jrtj_xl"> <p><a href="" target="_blank" class="green bold font14"><中国死海自由行2天游>死活门票</a></p> <p class="yellow font14 mt10 bold">起价:253元/人起</p> <p class="mt15 font14">内容简介</p> </li> <li class="jrtj_qkk"><a href="" target="_blank">去看看</a></li> </ul> </div> <!--今日推荐 end--> <!--就近度假线路 start--> <div class="tagContent_main"> <div class="Content1"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <volist name="tours" id="vo"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li class="xl_img"> <a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img width="79" height="46" src="<{$vo.tour6}>" alt="<{$vo.tour1}>" /></a> </li> <li class="w357"> <p> <span class="xl_sm"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank" class="green"><{$vo.tour1}></a></span> <span class="red">¥<{$vo.tour8}>元</span> </p> <p class="font12"> <span><a href="" target="_blank"><{$vo.pinglunnum}>条评论</a></span><span>|</span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=blog" target="_blank">去看游记</a></span><span>|</span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=blog" target="_blank">去读攻略</a></span><span>|</span> <span><a><{$vo.tour51}>人想去</a></span> </p> </li> <li class="hy"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank">去看看</a></li> </ul> </volist> </div> </div> </div> <!--就近度假线路 start--> <div class="clear"></div> <!--就近度假翻页 start--> <div class="jj_fy"> <ul> <li class="fy_left"> <a href="">1</a> <a href="">2</a> <a href="">3</a> <a href="">4</a> <a href="">5</a> <a href="">6</a> </li> <li class="fy_right"> <a href="">第一页</a> <a href="">上一页</a> <a href="">下一页</a> <a href="">最末页</a> </li> </ul> </div> <!--就近度假翻页 end--> </div> <!--内容中间 end--> <!--内容右边 start--> <div class="right"> <!--广告位 start--> <div class="ggw"> <a href="" target="_blank"><img src="__PUBLIC__/images/gg_tp.jpg" /></a> </div> <!--广告位 end--> <div class="clear"></div> <!--点评 start--> <div class="dp"> <ul class="right_title"> <li class="left_title"><span>最新点评</span></li> <li class="jf"><a href="" target="_blank">什么是满意度?</a></li> </ul> <ul class="myd"> <li class="green">当前综合满意度:</li> <li class="yellow">99%</li> </ul> <ul class="dp_nr"> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> </ul> </div> <!--点评 end--> <div class="clear"></div> <!--积分排行 start--> <div class="jfph"> <ul class="right_title"> <li class="left_title"><span>积分榜排行</span></li> <li class="jf"><a href="" target="_blank">如何赚取积分?</a></li> </ul> <ul class="jfph_nr"> <script language="javascript" type="text/javascript" src="__UCHOME__/js.php?id=3"></script> </ul> </div> <!--积分排行 end--> <div class="clear"></div> <!--梦想团 start--> <div class="mxt"> <ul class="right_title"> <li class="left_title"><span>梦想团</span></li> <li class="jf"><a href="" target="_blank">什么是梦想团?</a></li> </ul> <ul class="fl_nr"> <li class="jrmx"> <span class="yellow">今日梦想团:</span> <span class="green">北京北海一日游</span> </li> <li class="mxt_nr"> <p> <span><a href="" target="_blank"><img src="__PUBLIC__/images/right_tp2.jpg" alt="梦想团" /></a></span> </p> <p class="mxt_nr_right"> <span>原价:500元</span> <span>现价:150元</span> <span>折扣:2折</span> <span><a href="" target="_blank"><img src="__PUBLIC__/images/ljt.jpg" alt="立即团" /></a></span> </p> </li> </ul> </div> <!--梦想团 end--> <div class="clear"></div> <!--达人攻略 start--> <div class="drxl"> <ul class="right_title"> <li class="left_title">达人攻略</li> <li class="jf"><a href="" target="_blank">达人成长轨迹…</a></li> </ul> <ul class="fl_nr"> <li> <span><img src="__PUBLIC__/images/ms.jpg" /></span> <span><a href="" target="_blank">名册大川达人必去线路</a></span> </li> <li> <span><img src="__PUBLIC__/images/oz.jpg" /></span> <span><a href="" target="_blank">欧洲旅行达人必去线路</a></span> </li> </ul> </div> <!--达人攻略 end--> <div class="clear"></div> <!--达人排行榜 start--> <div class="phb"> <ul class="right_title"> <li class="left_title">达人排行榜</li> <li class="jf"><a href="" target="_blank">如何成为旅游达人?</a></li> </ul> <ul class="fl_nr"> <script src="__UCHOME__/js.php?id=2"></script> </ul> </div> <!--达人排行榜 end--> <div class="clear"></div> <!--游记攻略 start--> <{:W('BlogSideList')}> <!--游记攻略 end--> <div class="clear"></div> <!--留言问问 start--> <div class="lyww"> <ul class="right_title"> <li class="left_title">留言问问</li> <li class="jf"><a href="" target="_blank">我要提问</a></li> </ul> <ul class="ly_nr"> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">峨眉山的一天怎么耍?</a></span> <span class="answer answer1"><a href="" target="_blank">已解决</a></span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">峨眉山的一天怎么耍?</a></span> <span class="answer answer1"><a href="" target="_blank">已解决</a></span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">峨眉山的一天怎么耍?</a></span> <span class="answer answer1"><a href="" target="_blank">已解决</a></span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">峨眉山的一天爬山经历麻麻记录</a></span> <span class="answer answer2"><a href="" target="_blank">待回答</a></span> </li> </ul> </div> <!--留言问问 end--> </div> <!--内容右边 end--> </div> </div> <include file="Public:footer" />
10npsite
trunk/Index/Tpl/Home/default/tour/search.htm
HTML
asf20
19,915
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>线路搜索<{$keyword}>列表 <{$Think.SYS_SITENAME}></title> <link href="__PUBLIC__/css/ssjg_end_sp.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/ssjg.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/sp_left.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <script src="__PUBLIC__/jsLibrary/site/js/lb.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/qh.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/tcc.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/others.js" type="text/javascript" language="javascript"></script> <script type="text/javascript"> function g(o){return document.getElementById(o);} function HoverLi(m,n,counter) { for(var i=1;i<=counter;i++) { g('tb_'+m+i).className='';g('tbc_'+m+i).className='undis'; } g('tbc_'+m+n).className='dis';g('tb_'+m+n).className='on'; } </script> </head> <body> <center> <!--top start--> <{$tophtml}> <include file="public:topchufaindex" /> <!--top end--> <!--content start--> <div id="w1000"> <div class="gg"> <li><a href="" target="_blank"><img src="__PUBLIC__/images/gg_zby.jpg" /></a></li> </div> <!--sp_content start--> <div class="content"> <!--left start--> <{$cladhtm}> <!--left end--> <!--right start--> <div class="right"> <!--当前位置 start--> <div class="dq_wz"> <li> <span>导航:</span> <span><a href="/" target="_blank">首页</a></span> <span>线路搜索列表</span> </li> </div> <!--当前位置 end--> <!--详细介绍 start--> <div class="right_bottom"> <!--right_bottom_left start--> <div class="right_bootom_left"> <ul class="ssjg_bt" style="border:none;"> <li> <span class="gray">您搜索关键字</span> <span class="yellow">"<{$keyword}>"</span> <span class="gray">结果:</span> </li> </ul> <volist name="rs" id="vo"> <ul> <li> <a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img width="120" height="90" src="__PUBLIC__<{$vo.tour6}>" alt="<{$vo.tour1}>" /></a> </li> <li class="w450"> <p> <span class="green"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><{$vo.tour1}></a></span> <span class="red">¥<{$vo.bprice8}></span> </p> <p class="font12"> <span><a href="" target="_blank"><{$vo.pingluncount}>条评论</a></span><span>|</span> <span><a href="" target="_blank">查看<{$vo.tour39}>次</a></span><span>|</span> <span><a href="" target="_blank"><{$vo.tour55}>热度</a></span> </p> </li> <li class="hy"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img src="__PUBLIC__/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> </volist> <div><{$fanyehtml}></div> </div> <!--right_bottom_left end--> <!--right_bottom_right start--> <div class="right_bottom_right"> <div> <ul class="ssjg_bt"> <li> <span class="gray">你可能感兴趣……</span> </li> </ul> <ul> <li><a href="" target="_blank"><img src="images/nr_tp.jpg" /></a></li> <li class="w154"> <span>这个地方很好耍这个地方很好耍……</span> </li> </ul> <ul> <li><a href="" target="_blank"><img src="images/nr_tp.jpg" /></a></li> <li class="w154"> <span>这个地方很好耍这个地方很好耍……</span> </li> </ul> <ul> <li><a href="" target="_blank"><img src="images/nr_tp.jpg" /></a></li> <li class="w154"> <span>这个地方很好耍这个地方很好耍……</span> </li> </ul> </div> <div class="right-bottom_right_tp"> <li> <a href="" target="_blank"><img src="images/fj_1.jpg" /></a> </li> <li> <a href="" target="_blank"><img src="images/fj_1.jpg" /></a> </li> </div> </div> <!--right_bottom_right end--> </div> <!--详细介绍 end--> </div> <!--right end--> </div> <!--sp_content end--> </div> <!--content end--> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/tour/searchtour.htm
HTML
asf20
6,615
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><{$pagec.pagetitle}> <{$Think.SYS_SITENAME}></title> <link href="__PUBLIC__/css/ssjg_end_sp.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/ssjg.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/sp_left.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <script src="__PUBLIC__/jsLibrary/site/js/lb.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/qh.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/tcc.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/others.js" type="text/javascript" language="javascript"></script> <script type="text/javascript"> function g(o){return document.getElementById(o);} function HoverLi(m,n,counter) { for(var i=1;i<=counter;i++) { g('tb_'+m+i).className='';g('tbc_'+m+i).className='undis'; } g('tbc_'+m+n).className='dis';g('tb_'+m+n).className='on'; } </script> </head> <body> <center> <!--top start--> <{$tophtml}> <include file="public:topchufaindex" /> <!--top end--> <!--content start--> <div id="w1000"> <div class="gg"> <li><a href="" target="_blank"><img src="__PUBLIC__/images/gg_zby.jpg" /></a></li> </div> <!--sp_content start--> <div class="content"> <!--left start--> <{$cladhtm}> <!--left end--> <!--right start--> <div class="right"> <!--当前位置 start--> <div class="dq_wz"> <li> <span>导航:</span> <span><a href="/" target="_blank">首页</a></span> <span>线路列表</span> </li> </div> <!--当前位置 end--> <!--详细介绍 start--> <div class="right_bottom"> <!--right_bottom_left start--> <div class="right_bootom_left"> <ul class="ssjg_bt" style="border:none;"> <li> <span class="gray"><{$pagec.contenttitle}></span> </li> </ul> <volist name="rs" id="vo"> <ul> <li> <a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img width="120" height="90" src="__PUBLIC__<{$vo.tour6}>" alt="<{$vo.tour1}>" /></a> </li> <li class="w450"> <p> <span class="green"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><{$vo.tour1}></a></span> <span class="red">¥<{$vo.bprice8}></span> </p> <p class="font12"> <span><a href="" target="_blank"><{$vo.pingluncount}>条评论</a></span><span>|</span> <span><a href="" target="_blank">查看<{$vo.tour39}>次</a></span><span>|</span> <span><a href="" target="_blank"><{$vo.tour55}>热度</a></span> </p> </li> <li class="hy"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img src="__PUBLIC__/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> </volist> <div><{$fanyehtml}></div> </div> <!--right_bottom_left end--> <!--right_bottom_right start--> <div class="right_bottom_right"> <div> <ul class="ssjg_bt"> <li> <span class="gray">您可能感兴趣……</span> </li> </ul> <ul> <li><a href="" target="_blank"><img src="images/nr_tp.jpg" /></a></li> <li class="w154"> <span>这个地方很好耍这个地方很好耍……</span> </li> </ul> <ul> <li><a href="" target="_blank"><img src="images/nr_tp.jpg" /></a></li> <li class="w154"> <span>这个地方很好耍这个地方很好耍……</span> </li> </ul> <ul> <li><a href="" target="_blank"><img src="images/nr_tp.jpg" /></a></li> <li class="w154"> <span>这个地方很好耍这个地方很好耍……</span> </li> </ul> </div> <div class="right-bottom_right_tp"> <li> <a href="" target="_blank"><img src="images/fj_1.jpg" /></a> </li> <li> <a href="" target="_blank"><img src="images/fj_1.jpg" /></a> </li> </div> </div> <!--right_bottom_right end--> </div> <!--详细介绍 end--> </div> <!--right end--> </div> <!--sp_content end--> </div> <!--content end--> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/tour/tourlist.htm
HTML
asf20
6,493
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><{$rs.tour2}> <{$Think.SYS_SITENAME}></title> <meta name="keywords" content="<{$rs.tour3}>"> <meta name="description" content="<{$rs.tour3}>" /> <link href="/css/end_sp.css" type="text/css" rel="stylesheet" /> <link href="/css/spxq.css" type="text/css" rel="stylesheet" /> <link href="/css/sp_left.css" type="text/css" rel="stylesheet" /> <link href="/css/top.css" type="text/css" rel="stylesheet" /> <script src="__PUBLIC__/jsLibrary/site/js/lb.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/qh.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/tcc.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/others.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/site/js/data.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/jquery/jquery.js" type="text/javascript"></script> <script type="text/javascript"> function g(o){return document.getElementById(o);} function HoverLi(m,n,counter) { for(var i=1;i<=counter;i++) { g('tb_'+m+i).className='';g('tbc_'+m+i).className='undis'; } g('tbc_'+m+n).className='dis';g('tb_'+m+n).className='on'; } window.onload=function(){ var isie6 = window.XMLHttpRequest?false:true; var nav=document.getElementById('tags'); var navFixed=document.getElementById('tagsFixed'); window.onscroll=function(){ var scrollTop=document.documentElement.scrollTop||document.body.scrollTop; var scrollHeight=document.documentElement.scrollHeight||document.body.scrollHeight; if(scrollTop>nav.offsetTop){ navFixed.style.display='block'; } if(navigator.userAgent.indexOf("MSIE 6.0")>0) { //6.0 无自动下滚 navFixed.style.display='none'; } else if(scrollTop<nav.offsetTop){ navFixed.style.display='none'; } } new DatePicker('_DatePicker_demo', { inputId: 'date-input', className: 'date-picker-wp', seprator: '-' }); new DatePicker('_demo2', {inputId: 'demo2', className: 'date-picker-wp'}); }; </script> </head> <body> <{$tophtml}> <!--content start--> <div id="w1000"> <div class="gg"> <li><em><a href="" target="_blank"><img src="/images/gg_zby.jpg" /></a></em></li> </div> <em> <!--sp_content start--> </em> <div class="content"> <em> <!--left start--> </em> <{$cladhtm}> <em> <!--left end--> <!--right start--> </em> <div class="right"> <em> <!--当前位置 start--> </em> <div class="dq_wz"> <li> <em><span>导航:</span> <span><a href="/" target="_blank">首页</a></span> <span><a href="/" target="_blank">国内游</a></span> <span><{$rs.tour1}></span> </em></li> </div> <em> <!--当前位置 end--> <!--焦点图 start--> </em> <div class="jdt"> <ul> <li><em><img src="/images/jdt.jpg" width="804px" /></em></li> <li class="bq"> <ul> <p><em><span class="bq_green">这个价位是值得去耍的</span></em></p> <p> <em><span class="bq_lightgreen margin5">不错!</span> <span class="bq_drakred">DTI:5</span> <span class="bq_red margin5">当前好评率99%</span> </em></p> <p> <em><span class="bq_yellow">好耍的很</span> <span class="bq_blue margin5">很喜欢</span> </em></p> <p> <em><span class="yx margin5"><a href=""><img src="/images/yx.jpg" /></a></span> </em></p> </ul> </li> <li class="jdt_sm"> <p class="lx"> <em><span class="green">【端午怎么耍】</span> <span><a href="" target="_blank">成都——九寨沟、黄龙汽车"纯玩"四日游</a></span> </em></p> <p class="cph"> <em><span>产品货号:4473</span> </em></p> </li> </ul> </div> <em> <!--焦点图 end--> <!--商品价格 start--> </em> <div class="spjg"> <em> <!--商品价格left start--> </em> <div class="jg_left"> <div class="jg_border"> <em> <!--商品价格top start--> </em> <div class="top_price"> <div class="jg"> <li> <em><span class="font14">¥</span> <span class="bold font20">740元/</span> <span>人起</span> </em></li> </div> <div class="tj"> <li class="qj_nr" onmousemove="showcs('qj_sm');" onmouseout="closecs('qj_sm');"> <em><span class="before">原价:890元</span> <span class="qj">什么是起价?</span> </em> <p id="qj_sm"> <em><img src="/images/sm_bg_j.jpg" /> <span>这里录入内容说明档</span> </em></p> </li> </div> <em> <!--特价标签 start--> </em> <div class="tj_bz"> <li><em>特价</em></li> </div> <em> <!--特价标签 end--> </em></div> <em> <!--商品价格top end--> <!--服务项目 start--> </em> <div class="fw"> <li onmousemove="showcs('aqbz');" onmouseout="closecs('aqbz');"> <em><span class="fw_nr">安全保障</span> </em> <p id="aqbz"> <em><img src="/images/sm_bg_j.jpg" /> 这里是内容! </em></p> </li> <li onmousemove="showcs('dd');" onmouseout="closecs('dd');"> <em><span class="fw_nr">即时确认订单</span> </em> <p id="dd"> <em><img src="/images/sm_bg_j.jpg" /> 这里是内容! </em></p> </li> <li onmousemove="showcs('fk');" onmouseout="closecs('fk');"> <em><span class="fw_nr">支持在线付款</span> </em> <p id="fk"> <em><img src="/images/sm_bg_j.jpg" /> 这里是内容! </em></p> </li> <li onmousemove="showcs('sh');" onmouseout="closecs('sh');"> <em><span class="fw_nr" style="padding:0;">售后保障</span> </em> <p id="sh"> <em><img src="/images/sm_bg_j.jpg" /> 这里是内容! </em></p> </li> </div> <em> <!--服务项目 end--> <!--input start--> </em> <div class="data"> <li><em> <input type="text" value="请选择时间" id="date-input" /> </em></li> <li><em> <input type="text" value="成人" id="chengren" onclick="showcs('rsxl')" /> <input type="text" value="儿童" onclick="showcs('etrs')" id="et" /> </em></li> <li class="rsxl" id="rsxl"> <em><span onclick="changers('chengren','1','rsxl')" id="1">1人</span> <span onclick="changers('chengren','2','rsxl')" id="2">2人</span> <span onclick="changers('chengren','3','rsxl')" id="3">3人</span> </em></li> <li class="etrs" id="etrs"> <em><span onclick="changers('et','1','etrs')" id="1">1人</span> <span onclick="changers('et','2','etrs')" id="2">2人</span> <span onclick="changers('et','3','etrs')" id="3">3人</span> </em></li> </div> <em> <!--input end--> <!--优惠信息 start--> </em> <div class="yh"> <li> <em><span class="jian_bg">减</span> <span>预订本单可立减50元。</span> </em></li> <li> <em><span class="dk_bg">抵</span> <span>可以积分抵扣10元。</span> </em></li> <li> <em><span class="jian_bg">减</span> <span>预订本单可立减50元。</span> </em></li> </div> <em> <!--优惠信息 end--> <!--购物车 start--> </em> <div class="add_gwc"> <li> <em><span><a href="" class="add">加入购物车</a></span> <span><a href="" class="yd">立即直接预订</a></span> </em></li> </div> <em> <!--购物车 end--> </em></div> </div> <em> <!--商品价格left end--> </em></div> <em> <!--商品价格 end--> <!--商品价格right start--> </em> <div class="jg_right"> <em> <!--相关动作 start--> </em> <ul class="right_top"> <li> <em><span class="bold">去评论</span> <span>(</span> <span class="yellow">10</span> <span>)</span> </em></li> <li> <em><span class="bold">看游记</span> <span>(</span> <span class="yellow">10</span> <span>)</span> </em></li> <li> <em><span class="bold">读攻略</span> <span>(</span> <span class="yellow">10</span> <span>)</span> </em></li> <li style="margin:0px;"> <em><span class="bold">+想去</span> <span>(</span> <span class="yellow">10</span> <span>)</span> </em></li> </ul> <em> <!--相关动作 end--> <!--关键字 start--> </em> <ul class="gjz"> <li class="font18 bold gray"><em>本单特别关键字</em></li> <li> <em><span class="zs bold font16 wy margin5">纯玩团</span> <span class="yellow font12 wy margin5">节省</span> <span class="gray font20 wy">好耍</span> </em></li> </ul> <em> <!--关键字 end--> <!--重要提示 start--> </em> <ul class="zyts"> <li> <em><span class="gray bold">重点提示:</span> <span class="gray">建议提前4天以上预订</span> </em></li> </ul> <em> <!--重要提示 end--> <!--人气 start--> </em> <ul class="zyts"> <li> <em><span class="gray bold">人气:</span> <span class="red1 bold font14">150000</span> <span class="ding">顶</span> </em></li> </ul> <em> <!--人气 end--> <!--小编 start--> </em> <ul class="zyts"> <li> <em><span class="gray bold">小编:</span> <span><img src="/images/xb_tx.jpg" /></span> <span class="gray">媚儿飞仙</span> <span class="ts_right"> <a href="">加为好友</a> <a href="">发短信</a> <a href="">纠错</a> </span> </em></li> </ul> <em> <!--小编 end--> <!--分享 start--> </em> <ul class="zyts"> <li> <em><span class="gray bold">分享到:</span> <span><img src="/images/qq_kj.jpg" /></span> <span><img src="/images/sina_wb.jpg" /></span> <span><img src="/images/rrw.jpg" /></span> <span><img src="/images/kxw.jpg" /></span> <span><img src="/images/bd.jpg" /></span> <span><img src="/images/sh.jpg" /></span> <span><img src="/images/db.jpg" /></span> <span><img src="/images/xy.jpg" /></span> <span><img src="/images/xy.jpg" /></span> <span><img src="/images/xy.jpg" /></span> <span><img src="/images/xy.jpg" /></span> <span><img src="/images/xy.jpg" /></span> <span class="ts_right"> <a href="" style="margin:0;">更多</a> </span> </em></li> </ul> <em> <!--分享 end--> </em></div> <em> <!--商品价格right end--> <!--详细介绍 start--> </em> <div class="right_bottom"> <em> <!--right_bottom_left start--> </em> <div class="right_bootom_left"> <div class="middle"> <div id="con"> <div id="tags"> <ul> <li class="selectTag"><em><a onclick="selectTag('tagContent0',this)"><span>全程玩法</span></a> </em></li> <li><em><a onclick="selectTag('tagContent1',this)"><span>相关游记</span></a> </em></li> <li><em><a onclick="selectTag('tagContent2',this)"><span>回访点评</span></a> </em></li> <li><em><a onclick="selectTag('tagContent3',this)"><span>相关线路</span></a> </em></li> </ul> <div class="tags" id="tagsFixed"> <div id="tags"> <ul> <li class="selectTag"><em><a onclick="selectTag('tagContent0',this)" href="#tags"><span>全程玩法</span></a> </em></li> <li><em><a onclick="selectTag('tagContent1',this)" href="#tags"><span>相关游记</span></a> </em></li> <li><em><a onclick="selectTag('tagContent2',this)" href="#tags"><span>回访点评</span></a> </em></li> <li><em><a onclick="selectTag('tagContent3',this)" href="#tags"><span>相关线路</span></a> </em></li> <li style="margin:0;padding:0;"><em><a href="" style="margin:0; padding:0;"><img src="/images/add_gw.png" /></a></em></li> </ul> </div> </div> </div> <div id="tagContent"> <div id="tagContent0" class="tagContent selectTag"> <div class="fn"> <div class="ss"> <ul id="rmtj"> <li style="margin-left:5px;" class="onclick"><em><a onclick="selectTag0('rmtj0',this)"><span>准备</span></a></em></li> <li><em><a onclick="selectTag0('rmtj1',this)"><span>第一天</span></a></em></li> <li><em><a onclick="selectTag0('rmtj2',this)"><span>第二天</span></a></em></li> <li><em><a onclick="selectTag0('rmtj3',this)"><span>第三天</span></a></em></li> </ul> </div> </div> <div id="rmtj0" class="rmtj"> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第一天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第一天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul class="dp"> <li class="dp_title"><em>他们都去过并作了点评……</em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> </ul> </div> <div id="rmtj1" class="rmtj"> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第二天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第一天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul class="dp"> <li class="dp_title"><em>他们都去过并作了点评……</em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> </ul> </div> <div id="rmtj2" class="rmtj"> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第三天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第一天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul class="dp"> <li class="dp_title"><em>他们都去过并作了点评……</em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> </ul> </div> <div id="rmtj3" class="rmtj"> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第四天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul> <li class="red"><em>本产品与其他旅行社联合发团。</em></li> <li> <p> <em><span class="red bold font14"><img src="/images/span_before.jpg" />第一天</span> <span class="red rmtj_nr font14">天津</span> <span><img src="/images/bus.jpg" /></span> <span class="red font14">十渡(正常情况下车程约4小时)</span> </em></p> </li> <li class="lx"> <em><span class="font14">05:30</span> </em> <p> <em><span>河西区天津日报大厦(围堤道与大沽路交口红绿灯)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:00</span> </em> <p> <em><span>南开区鼓楼旅游超市(浦发银行)。</span> </em></p> </li> <li class="lx"> <em><span class="font14">06:15</span> </em> <p> <em><span>北辰区东方之珠门前。认"鑫益通假期"橘黄色导游旗集合,(<a class="red1">请谅解</a>)。乘车赴北京房山。</span> </em></p> </li> <li class="lx"> <em><span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> <span><img src="/images/lx_img1.jpg" /></span> </em></li> </ul> <ul class="dp"> <li class="dp_title"><em>他们都去过并作了点评……</em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> <li style="margin-top:0;"> <em><a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_3.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_1.jpg" /></a> <a href="" target="_blank"><img src="/images/phb_tp_2.jpg" /></a> </em></li> </ul> </div> </div> <div id="tagContent1" class="tagContent"> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> </div> <div id="tagContent2" class="tagContent"> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> </div> <div id="tagContent3" class="tagContent"> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> <ul> <li> <em><a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </em></li> <li class="w450"> <p> <em><span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </em></p> <p class="font12"> <em><span><a href="" target="_blank">55条评论</a>|</span> <span><a href="" target="_blank">88条游记</a>|</span> <span><a href="" target="_blank">3本攻略</a>|</span> <span><a href="" target="_blank">599人想去</a></span> </em></p> </li> <li class="hy"><em><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></em></li> </ul> </div> </div> </div> </div> </div> <em> <!--right_bottom_left end--> <!--right_bottom_right start--> </em> <div class="right_bottom_right"> <div class="up_zs"> <li> <em><span class="up_zs_title">DTI:</span> <span class="margin5"><img src="/images/three.png" /></span> <span class="up_jt"><img src="/images/up.png" /></span> </em></li> <li class="up_zs_sm"> <em><span>性价比指数系本单综合评分结果,仅供参考。</span> </em></li> <li class="xjb" onmousemove="showcs('xjb');" onmouseout="closecs('xjb');"> <em><span>什么是性价比指数?</span> </em> <p id="xjb"> <em><img src="/images/sm_bg_j.jpg" /> <span>这里录入内容说明档</span> </em></p> </li> </div> <div class="xz"> <li class="xz_title"><em>攻略下载</em></li> <ul> <li><em><a href="" target="_blank"><img src="/images/xz.jpg" /></a></em></li> <li><em><a href="" target="_blank" class="xz_gl">立即下载攻略</a></em></li> </ul> </div> </div> <em> <!--right_bottom_right end--> </em></div> <em> <!--详细介绍 end--> </em></div> <em> <!--right end--> </em></div> <em> <!--sp_content end--> </em></div> <!--content end--> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/tour/nview.htm
HTML
asf20
82,963
<include file="Public:header" /> <div class="clear"></div> <div class="content"> <div class="content_main"> <!--内容左边 start--> <div class="main_left"> <div class="tj"> <div class="tj_title"><img src="__PUBLIC__/images/tj_title.jpg" /></div> <div class="tj_nr"> <div class="fn"> <ul class="fn_title">攻略分类</ul> <ul class="pink"> <li> <script language="javascript" type="text/javascript" src="/user/js.php?id=1"></script> </li> </ul> </div> <div class="fn"> <ul class="fn_title">地域风情</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">热门城市周边</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">国内旅游</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">出境旅游</ul> <ul class="pink"> <li> <a href="" target="_blank">一日游</a> <a href="" target="_blank">二日游</a> <a href="" target="_blank">三日游</a> <a href="" target="_blank">四日游</a> <a href="" target="_blank">五日游</a> <a href="" target="_blank">七日游</a> </li> </ul> </div> <div class="fn"> <ul class="fn_title">旅游服务</ul> <ul class="pink"> <li> <a href="" target="_blank">酒店</a> <a href="" target="_blank">门票</a> </li> <li> <a href="" target="_blank">签证</a> <a href="" target="_blank">攻略</a> </li> <li> <a href="" target="_blank">游记</a> <a href="" target="_blank">旅游纪念册</a> </li> </ul> </div> </div> </div> <div class="why"> <!--品牌保障 start--> <div class="b1"> <ul class="b1_title"><img src="__PUBLIC__/images/pp.jpg" /></ul> <ul>20年专业旅游提供商</ul> <ul>累计服务千万人次</ul> </div> <!--品牌保障 end--> <div class="clear"></div> <!--服务保障 start--> <div class="b1"> <ul class="b1_title"><img src="__PUBLIC__/images/fw.jpg" /></ul> <ul> <li class="f">低价保障</li> <li class="ml20">发团保障</li> </ul> <ul> <li class="f">退团保障</li> <li class="ml20">安全支付</li> </ul> <ul> <li class="f">售后保障</li> <li class="ml20">即时预订</li> </ul> </div> <!--服务保障 end--> <div class="clear"></div> <!--团队荣誉 start--> <div class="b1"> <ul class="b1_title"><img src="__PUBLIC__/images/ry.jpg" /></ul> <ul>旅游门户领先者</ul> <ul>四川十大电子商务网站</ul> <ul>四川旅游十强社</ul> </div> <!--团队荣誉 end--> </div> </div> <!--内容左边 end--> <!--内容中间 start--> <div class="main_center"> <!--浏览方式选择 start--> <div class="llfs"> <div class="llfs_title">按条件浏览</div> <div class="fs"> <ul> <li class="bold">旅行方式:</li> <li class="xz_hover"><a href="">全部</a></li> <li><a href="">拼团游</a></li> <li><a href="">包团游</a></li> <li><a href="">散客自由行</a></li> <li><a href="">跟团游</a></li> </ul> <ul> <li class="bold">目的地:</li> <li><a href="">全部</a></li> <li><a href="">峨眉山</a></li> <li class="xz_hover"><a href="">乐山</a></li> <li><a href="">黄龙</a></li> </ul> <ul> <li class="bold">行程天数:</li> <li><a href="">全部</a></li> <li class="xz_hover"><a href="">1天</a></li> <li><a href="">2天</a></li> <li><a href="">3-4天</a></li> <li><a href="">5-7天</a></li> <li><a href="">8-10天</a></li> <li><a href="">10天以上</a></li> </ul> </div> </div> <!--浏览方式选择 end--> <div class="clear"></div> <!--今日推荐 start--> <div class="jrtj"> <ul class="jrtj_title"> <li class="font14 bold">今日推荐</li> <li class="f1">今日推荐是由梦之旅资深旅行家为您推荐的!</li> </ul> <ul> <li class="jrtj_tp"><a href="" target="_blank"><img src="__PUBLIC__/images/jrtj.jpg" /></a></li> <li class="jrtj_xl"> <p><a href="" target="_blank" class="green bold font14"><中国死海自由行2天游>死活门票</a></p> <p class="yellow font14 mt10 bold">起价:253元/人起</p> <p class="mt15 font14">内容简介</p> </li> <li class="jrtj_qkk"><a href="" target="_blank">去看看</a></li> </ul> </div> <!--今日推荐 end--> <!--就近度假线路 start--> <div class="con"> <ul class="tags"> <li class="selectTag"><a>当季最热</a></li> <li><a>附近转转</a></li> <li><a>国内走走</a></li> <li><a>出境看看</a></li> <li><a>客栈</a></li> <li><a>门票</a></li> </ul> </div> <div class="tagContent_main"> <div class="Content1"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> </div> </div> <div class="Content2"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> </div> </div> <div class="Content3"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> </div> </div> <div class="Content4"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> </div> </div> <div class="Content5"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> </div> </div> <div class="Content6"> <div class="fn_next"> <li class="bold"><a>本类热门:</a></li> <li class="rm_gjc"><a>九寨沟</a><a>峨眉山</a><a>乐山</a></li> </div> <div class="tagContent"> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> <ul onmouseover="this.className='bg_gray'" onmouseout="this.className=''"> <li> <a href="" target="_blank"><img src="__PUBLIC__/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank">去看看</a></li> </ul> </div> </div> </div> <!--就近度假线路 start--> <div class="clear"></div> <!--就近度假翻页 start--> <div class="jj_fy"> <ul> <li class="fy_left"> <a href="">1</a> <a href="">2</a> <a href="">3</a> <a href="">4</a> <a href="">5</a> <a href="">6</a> </li> <li class="fy_right"> <a href="">第一页</a> <a href="">上一页</a> <a href="">下一页</a> <a href="">最末页</a> </li> </ul> </div> <!--就近度假翻页 end--> </div> <!--内容中间 end--> <!--内容右边 start--> <div class="right"> <!--广告位 start--> <div class="ggw"> <a href="" target="_blank"><img src="__PUBLIC__/images/gg_tp.jpg" /></a> </div> <!--广告位 end--> <div class="clear"></div> <!--点评 start--> <div class="dp"> <ul class="right_title"> <li class="left_title"><span>最新点评</span></li> <li class="jf"><a href="" target="_blank">什么是满意度?</a></li> </ul> <ul class="myd"> <li class="green">当前综合满意度:</li> <li class="yellow">99%</li> </ul> <ul class="dp_nr"> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">费用便宜,住宿一般…</a></span> <span class="pf"><img src="__PUBLIC__/images/jg.jpg" />97%</span> </li> </ul> </div> <!--点评 end--> <div class="clear"></div> <!--积分排行 start--> <div class="jfph"> <ul class="right_title"> <li class="left_title"><span>积分榜排行</span></li> <li class="jf"><a href="" target="_blank">如何赚取积分?</a></li> </ul> <ul class="jfph_nr"> <script language="javascript" type="text/javascript" src="__UCHOME__/js.php?id=3"></script> </ul> </div> <!--积分排行 end--> <div class="clear"></div> <!--梦想团 start--> <div class="mxt"> <ul class="right_title"> <li class="left_title"><span>梦想团</span></li> <li class="jf"><a href="" target="_blank">什么是梦想团?</a></li> </ul> <ul class="fl_nr"> <li class="jrmx"> <span class="yellow">今日梦想团:</span> <span class="green">北京北海一日游</span> </li> <li class="mxt_nr"> <p> <span><a href="" target="_blank"><img src="__PUBLIC__/images/right_tp2.jpg" alt="梦想团" /></a></span> </p> <p class="mxt_nr_right"> <span>原价:500元</span> <span>现价:150元</span> <span>折扣:2折</span> <span><a href="" target="_blank"><img src="__PUBLIC__/images/ljt.jpg" alt="立即团" /></a></span> </p> </li> </ul> </div> <!--梦想团 end--> <div class="clear"></div> <!--达人攻略 start--> <div class="drxl"> <ul class="right_title"> <li class="left_title">达人攻略</li> <li class="jf"><a href="" target="_blank">达人成长轨迹…</a></li> </ul> <ul class="fl_nr"> <li> <span><img src="__PUBLIC__/images/ms.jpg" /></span> <span><a href="" target="_blank">名册大川达人必去线路</a></span> </li> <li> <span><img src="__PUBLIC__/images/oz.jpg" /></span> <span><a href="" target="_blank">欧洲旅行达人必去线路</a></span> </li> </ul> </div> <!--达人攻略 end--> <div class="clear"></div> <!--达人排行榜 start--> <div class="phb"> <ul class="right_title"> <li class="left_title">达人排行榜</li> <li class="jf"><a href="" target="_blank">如何成为旅游达人?</a></li> </ul> <ul class="fl_nr"> <script src="__UCHOME__/js.php?id=2"></script> </ul> </div> <!--达人排行榜 end--> <div class="clear"></div> <!--游记攻略 start--> <{:W('BlogSideList')}> <!--游记攻略 end--> <div class="clear"></div> <!--留言问问 start--> <div class="lyww"> <ul class="right_title"> <li class="left_title">留言问问</li> <li class="jf"><a href="" target="_blank">我要提问</a></li> </ul> <ul class="ly_nr"> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">峨眉山的一天怎么耍?</a></span> <span class="answer answer1"><a href="" target="_blank">已解决</a></span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">峨眉山的一天怎么耍?</a></span> <span class="answer answer1"><a href="" target="_blank">已解决</a></span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">admin</a></span> <span><a href="" target="_blank">峨眉山的一天怎么耍?</a></span> <span class="answer answer1"><a href="" target="_blank">已解决</a></span> </li> <li> <span><img src="__PUBLIC__/images/tx1.jpg" alt="头像" /></span> <span><a href="" target="_blank">峨眉山的一天爬山经历麻麻记录</a></span> <span class="answer answer2"><a href="" target="_blank">待回答</a></span> </li> </ul> </div> <!--留言问问 end--> </div> <!--内容右边 end--> </div> </div> <include file="Public:footer" />
10npsite
trunk/Index/Tpl/Home/default/tour/view.htm
HTML
asf20
141,833
<style type="text/css"> body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> <{$content}>
10npsite
trunk/Index/Tpl/Home/default/onepage/show.htm
HTML
asf20
178
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><{$rs.onepage1}></title> <meta name="keywords" content="<{$rs.onepage2}>"> <meta name="description" content="<{$rs.onepage2}>" /> <style type="text/css"> body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } </style> </head> <body> <{$rs.onepage4}> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/onepage/showdti.htm
HTML
asf20
610
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language=javascript> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> <title>支付返回结果页面</title> </head> <body> <if condition="$isprint eq 'yes'"> <div style="margin-top:10px; margin-bottom:10px;" align="center"><input name="printdo2" id="printdo2" onclick="doPrint()" type="button" value="打 印" /></div> </if> <!--startprint--> <style type="text/css"> *{margin:0 auto;padding:0;} img{border:0;} ul,li{marign:0;padding:0;} body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } tr .STY{ border-top: solid #D0D0D0; border-top-width: thin; } #main{width:600px;border:15px #6c6c6c solid;} #main .nei{width:568px;border:6px #b2b2b2 solid;padding-left:10px;padding-right:10px;} .nei h5{font-size:12px;border-bottom:1px #999999 dashed; text-align:left;font-weight:400;height:18px;margin-bottom:20px;} /*============================box'style=============================*/ .nei .logo{margin-top:10px;} .nei .box{width:470px;} .nei .box img{width:100px;height:58px;text-align:left;display:block;float:left;} .nei .box .bj{background:url(__PUBLIC__/images/zfbg1.gif) no-repeat top left;width:365px;height:95px;margin-left:0px;float:left;text-align:left;} .nei .box .bj2{width:365px;height:98px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj2 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj2 h3{width:352px;height:85px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} /*========================================bj3'style======================================*/ .nei .box .bj3{width:365px;height:160px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj3 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj3 h3{width:352px;height:145px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} a:link,a:visited{color:#6633FF;text-decoration:none;} a:hover{color:#FF3366;text-decoration:underline;} </style> <div id="main" align="center"> <div class="nei" align="center"> <img src="__PUBLIC__/images/logo.gif"> <div align="center"><strong>您的支付确认书<br> </strong></div> <div style="line-height:40px; height:40px;"></div> <div align="left"> <p><strong><{$rs.orderform5}></strong>先生/小姐,您好!<br /> 欢迎预订梦之旅, 您的支付已成功,下面是您的预订及支付信息,请您仔细阅读,若有疑问,随时咨询梦之旅客服人员! <br /> 我们将会在出发前二天以上发送出团通知书,请随时查询您的电子邮件,同时您也可进入您的订单,从订单中获取您的出团通知书.<br /> <strong>什么是出团通知书?<br /> </strong>出团通知书是我们的旅行团出发前发给客人的发团信息,主要内容包括客人出行所需要的预订信息,联系信息,紧急联系电话,集合地点等相关重要信息,也是最后的通知书,有时还包括一些注意事项,天气预报,安全须知等内容,客人务必仔细阅读并保存.<br /> <br> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu2.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" cellpadding="5" width="100%"> <tbody> <tr> <td width="21%" align="right"><strong>订单号:</strong></td> <td width="79%"><{$rs.orderform3}></td> </tr> <tr> <td align="right"><strong>姓&nbsp; 名:</strong></td> <td><{$rs.orderform5}></td> </tr> </tbody> </table></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu1.jpg" width="128" height="59" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347">产品<br /> <hr /><{$tourrs.tour1|htmlspecialchars=###}> <br /></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> <p align="left"><br /> <br /> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100">集合及机场接送信息:</td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"> <if condition="$orderinfors.jiejisongjishengqin eq ''"> 无 <else /> </if> </td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu4.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" width="100%"> <tbody> <tr> <td width="50%" align="right"><strong>应付总金额:</strong></td> <td width="50%"><{$rs.orderform16}></td> </tr> <tr> <td align="right"><strong>定金支付金额:</strong></td> <td> ¥ <{$rs.pay3}>元 <if condition="$rs.pay6 neq 1">(未成功)</if> </td> </tr> <tr> <td align="right"><strong>支付方式:</strong></td> <td><{$rs.pay5}></td> </tr> <!-- 当定金支付成功并且余款大于0时显示--> <if condition="($rs.pay6 eq 1) and ($rs.pay7 gt 0)"> <tr> <td align="right">支付时间:</td> <td>&nbsp;<{$rs.pay4|date="Y-m-d",###}></td> </tr> <tr> <td align="right"></td> <td>&nbsp;</td> </tr> <tr> <td align="right">余款次支付金额</td> <td>&nbsp;¥ <{$rs.pay7}>元 <if condition="$rs.pay10 neq 1">(未成功)</if></td> </tr> <tr> <td align="right">支付时间</td> <td>&nbsp;<{$rs.pay8|date="Y-m-d",###}></td> </tr> <tr> <td align="right">支付方式</td> <td>&nbsp;<{$rs.pay9}></td> </tr> </if> <!-- 如果已经支付了第三次金额则显示出来--> <if condition="($payinfors.je3isconfim eq 1) and ($payinfors.je3 gt 0)"> </if> <!-- 如果已经支付了第四次金额则显示出来--> <if condition="($payinfors.je4isconfim eq 1) and ($payinfors.je4 gt 0)"> </if> </tbody> </table></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5>&nbsp;</h5> <div align="left"> <p><br /> 您也可以进入您的订单中获取与本面相同的支付确认书,<br> *关于取消及更改预订,请参考相关 退款保障!<br> <strong>联系方式:</strong> <br> <{$toursinfors.contactus}> </p> </div> <div align="center"></div> <p align="left"><br /> <a href="<{$hostname}>" target="_blank"><span lang="EN-US" xml:lang="EN-US">梦之旅官方网站</span></a></p> </div> </div> <!--endprint--> <if condition="$isprint eq 'yes'"> <div style="margin-top:20px;" align="center"><input name="printdo" id="printdo" onclick="doPrint()" type="button" value="打 印" /></div> </if> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/affirm/hotelzhifu.htm
HTML
asf20
12,260
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script language=javascript> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="__PUBLIC__/jsLibrary/jquery/jquery.js"></script> <title>出团通知书</title> </head><body> <if condition="($sendflag eq 'yes') or ($isprint eq 'yes')"> <div align="center"><input name="printdo" type="button" onclick="doPrint()" value="打印" /></div> </if> <!--startprint--> <style type="text/css"> body,td,th { font-size: 12px; } </style> <style type="text/css"> *{margin:0 auto;padding:0;} img{border:0;} ul,li{marign:0;padding:0;} body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } tr .STY{ border-top: solid #D0D0D0; border-top-width: thin; } #main{width:600px;border:15px #6c6c6c solid;} #main .nei{width:568px;border:6px #b2b2b2 solid;padding-left:10px;padding-right:10px;} .nei h5{font-size:12px;border-bottom:1px #999999 dashed; text-align:left;font-weight:400;height:18px;margin-bottom:20px;} /*============================box'style=============================*/ .nei .logo{margin-top:10px;} .nei .box{width:470px;} .nei .box img{width:100px;height:58px;text-align:left;display:block;float:left;} .nei .box .bj{background:url(__PUBLIC__/images/zfbg1.gif) no-repeat top left;width:365px;height:95px;margin-left:0px;float:left;text-align:left;} .nei .box .bj2{width:365px;height:98px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj2 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj2 h3{width:352px;height:85px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} /*========================================bj3'style======================================*/ .nei .box .bj3{width:365px;height:160px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj3 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj3 h3{width:352px;height:145px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} a:link,a:visited{color:#6633FF;text-decoration:none;} a:hover{color:#FF3366;text-decoration:underline;} </style> <div id="main" style=" width:600px; margin:0 auto;" align="left"> <form action="/orderform<{$Think.const.FGF}>savechutuanzzs" method="post" name="form12" id="form12"> <div class="nei" align="center"><Br /> <img src="__PUBLIC__/images/logo.gif"> <div align="center"><strong style="font-size:14px;">您的出团通知书<br> </strong> </div> <div style="line-height:40px; height:40px;"></div> <div align="left"> <p style="line-height:18px;border-bottom:1px #999999 dashed;"><strong><{$rs.orderform5}></strong>先生/小姐,您好!<br /> 欢迎预订梦之旅,下面是您此次出团的详细信息,请您仔细阅读,并打印保存好,若有与此信息相冲突的地方,请以此为准.<br /> (如果您不能打印,您也可在电脑屏幕上用手机照像的方法保存此页面,如果还是不行,请你抄写此页面重要部份,如团号,客人姓名,旅游团名称等,以便上团时出示给相关人员看) <br> </p> </div> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><Br /><h3>旅客信息</h3></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="5" cellpadding="5" width="100%"> <tbody> <tr> <td width="15%" align="right"><strong>订单号:</strong></td> <td width="85%"><{$rs.orderform3}></td> </tr> <tr> <td align="right"><strong>姓&nbsp; 名:</strong></td> <td><{$rs.orderform5}></td> </tr> </tbody> </table></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"></td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><Br /><h3>本团团号</h3></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347" height="40">&nbsp;&nbsp; <{$ac.chutuhao|ui_isinput="chutuhao","input1",$showedit,###,"33"}> </td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"></td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><Br /><h3>预订信息</h3></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347" style="padding-left:3px;">产品:<a target="_blank"><{$tourrs.tour1|htmlspecialchars=###}></a><br /> <hr /> <br /></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"></td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="103" align="center"><h3>关于集合地点及接送机信息</h3> </td> <td width="369"> <table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347" height="40">&nbsp; <{$ac.jiejisongji|ui_isinput="jiejisongji","input1",$showedit,###,"35","textarea"}> <br><br> 如果您的航班有变化,或原没有通知过我们航班,您可提前一天按下面列出的供应商联系电话通知接机人员,以免错过接机)<bR /></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"></td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </div> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><Br /><h3>支付信息</h3></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="5" width="100%"> <tbody> <tr> <td width="37%" align="right"><strong>应付总金额:</strong></td> <td width="63%">¥<{$rs.orderform16}></td> </tr> <tr> <td align="right"><strong>已支付金额(定金):</strong></td> <td> ¥<if condition="($rs.pay6 eq 1)"><{$rs.pay3}><else />0</if>元 </td> </tr> <tr> <td align="right"><strong>支付方式(定金):</strong></td> <td><{$rs.pay5}></td> </tr> <tr> <td align="right"><strong>支付时间(定金):</strong></td> <td><{$rs.pay4|date="Y-m-d h:m:s",###}></td> </tr> <tr> <td align="right">&nbsp;</td> <td>&nbsp;</td> </tr> <if condition="($rs.pay6 eq 1) and ($rs.pay7 gt 0)"> <tr> <td align="right"><strong>支付方式(余款):</strong></td> <td><{$rs.pay9}> </td> </tr> <tr> <td align="right"><strong>支付时间(余款):</strong></td> <td><{$rs.pay8|date="Y-m-d h:m:s",###}> </td> </tr> <tr> <td align="right"><strong>已支付金额(余款):</strong></td> <td>¥<if condition="($rs.pay10 eq 1)"><{$rs.pay7}><else />0</if>元 </td> </tr> </if> </tbody> </table> <p><br /> <if condition="$rs.balance eq 0"> <strong>关于余款支付事项说明:</strong><br /> <{$ac.yukuanzhifu|ui_isinput="yukuanzhifu","input1",$showedit,###,"35","textarea"}> </if> </p></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"></td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100" align="center"><Br /><h3>当地旅游供应商信息</h3></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347">&nbsp; <assign name="var" value="供应商名称: 联系信息: 机场接送联系人: 紧急联系电话:" /> <if condition="$ac.dangdilvyousang neq ''"><assign name="var" value="$ac.dangdilvyousang"/></if> <{$var|ui_isinput="dangdilvyousang","input1",$showedit,###,"35","textarea"}> <br> (出发当天,以及出团过程中遇到任何疑问或问题,请直接联系旅行地接/产品服务公司) </td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"></td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <div align="left" style="line-height:18px; border-top:1px dashed #CCC; padding-top:3px; font-size:13px;">*关于取消及更改预订,请参考相关退款保障!<br> 特别条款:<br>   由于电子商务及网上预订、网上支付的特殊性,梦之旅采用目前国内领先的、绿色的、环保的电子版旅游合同、电子版确认书及电子版出团通知书(所谓电子版,此处是指通过订单方式生成,或者通过邮件方式传输)的方式操作您的预订事宜,如果您对此有异议,您可要求我们为您传真、邮寄、或面对面签定相关合同,但一旦您接受电子版方式,您不得对梦之旅使用通过网上生成订单或电子邮件操作工作而生成的旅游合同,出团通知书等电子版确认产生异议。<br>   如果梦之旅提供的电子版旅游合同、出团通知书以及其它电子版的文件已经通过生成订单的方式或电子邮件传送出去(提供电脑系统记录数据和时间证明),您就不得对已获取的服务是电子版而提出异议。<br> </div> <div align="left"> <p><hr /> <strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;梦之旅联系信息:</strong> <br> <div style="margin-left:80px;"> <{$ac.contactinfo|ui_isinput="contactinfo","input1",$showedit,###,"45","textarea"}> </div><Br /> <div align="center"> <input type="hidden" name="orderid" id="orderid" value="<{$rs.orderform3}>"> <input type="hidden" name="tomail" id="tomail" value="<{$rs.orderform26}>"> <input type="hidden" name="id" id="id" value="<{$rs.orderform0}>"> <if condition="$showedit eq 'yes'"><input name="mysubmit" id="mysubmit" type="submit" value="提 交" /></if> <if condition="$sendflag eq 'yes'"> <input name="oktosend" id="oktosend" type="button" value="我已仔细阅读并确认发送" /> </if> </div> </p> <div id="mpf0_readMsgBodyContainer" style="border-top:1px dashed #CCC;"onclick="return Control.invoke('MessagePartBody','_onBodyClick',event);"> <div id="mpf0_MsgContainer"> <div> <div><br /> <p align="left"><strong>有用信息链接</strong><br /> <br /> <a href="http://usa.dreams-travel.com" target="_blank">美国梦之旅官方网站</a> <br /> <a href="http://www.dreams-travel.com" target="_blank">中国梦之旅官方网站</a><br /> <a href="http://www.dreams-travel.com/wenjun" target="_blank">梦之旅连锁酒店&gt;&gt;&gt;</a><br /> <br /> </p> </div> </div> </div> </div> </div> <div align="center"></div> <p align="left"><br /> </p> </div> </form> </div> <script language="javascript"> $(document).ready(function(){ <if condition="$sendflag eq 'yes'"> $("#oktosend").bind("click",function(){ $("#form12").attr("action","/sendmail<{$Think.const.FGF}>chutuantzs<{$Think.const.FGF}>orderid<{$Think.const.FGF}><{$rs.orderform3}><{$Think.const.FGF}>id<{$Think.const.FGF}><{$rs.orderform0}><{$Think.const.FGF}>tomail<{$Think.const.FGF}><{$rs.orderform26|ui_replacexiahuax=###}>"); $("#form12").submit(); }); </if> <if condition="$showedit eq 'yes'">//修改时的表单验证 $("#mysubmit").bind("click",function(){ if($("#chutuhao").val()=="") { alert("请输入团号"); $("#chutuhao").focus(); return false; } if($("#jiejisongji").val()=="") { alert("请输入接机送机内容"); $("#jiejisongji").focus(); return false; } if($("#yukuanzhifu").val()=="") { alert("请填入余款支付内容"); $("#yukuanzhifu").focus(); return false; } if($("#contactinfo").val()=="") { alert("请填写梦之旅联系方式"); $("#contactinfo").focus(); return false; } }); </if> }); </script><!--endprint--> <if condition="($sendflag eq 'yes') or ($isprint eq 'yes')"> <div align="center"><input name="printdo2" type="button" onclick="doPrint()" value="打印" /></div> </if> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/affirm/chutuantongzhi.htm
HTML
asf20
18,267
<taglib name='Html'/> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="__PUBLIC__/jsLibrary/jquery/jquery.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>出境旅游合同</title> <style type="text/css"> body,td,th { font-size: 12px; } </style> </head> <body> <table border="0" cellspacing="0" bordercolor="#0" cellpadding="0" width="744" bgcolor="#ffffff" align="center"> <if condition="($showedit eq 'yes') or ($sendflag eq 'yes')"> <form action="/orderform<{$Think.const.FGF}>savechujinghetong" method="post" name="chujinghetong" id="chujinghetong" > </if> <input type="hidden" name="y_queding" /> <input type="hidden" name="j_queding" /> <tbody> <tr> <td valign="top"><p align="center"><br /> <span style="font-size:19px;"><strong>出境旅游合同</strong></span></p> <p> 在我们双方签定合同前,请让我们双方一起确定,以下合同内容是我们双方意思的真实表达,我们双方保证,不能以此合同为在线签定为由,而拒绝承认此合同的真实性,同时双方保证,将严格遵守此合同的相关条款,并承担由于违反以下条款而引起的相关责任。<br /> 合同签定程序及步骤: <br /> 一、双方通过各种方式达成一定程度的旅游意向。 <br /> 二、甲方签证办理完毕(如甲方自备签证或不需办理签证,则去掉这一步骤)。 <br /> 三、甲方支付定金或全部团款,乙方收到甲方所付团款后,电子合同初稿形成。 <br /> 四、乙方在线填写合同内容,甲方通过&ldquo;订单查询&rdquo;进入,通过&ldquo;出境电子合查询及签定&rdquo;栏,查看合同。 <br /> 五、甲方、乙方均可反复在线修改,直到满意为止。(此过程中双方可通过合同上方的&ldquo;在线合同洽谈&rdquo;或合同最下方的&ldquo;在线客服&ldquo;系统进行交谈,当然也可通过电话等方式进行沟通)。 <br /> 六、双方无异议后,甲方、乙方勾选合同最下方的确认按纽,在线合同自然完成(有乙方代表的名字、公章及甲方代表的名字)。此时合同内容双方均无法再修改,如因特殊原因需取消或修改合同内容,须双方取得一致,重新下订单,另外签定合同,原合同作废。 <br /> 七、在线合同完成后,会有一封邮件发到双方的邮箱内,所签定的合同内容会以附件的形式存在于双方的电子邮件中,甲方收到邮件后,须在邮箱中按&rdquo;回复&rdquo;按纽将邮件无任何修改的发回给乙方,最后的合同才算完成。 <br /> 注:1、如甲方无邮件,则无第六步骤,合同将于第五步完成,稍有遗憾。 <br /> 2、甲方可随时通过&ldquo;订单查询方式&rdquo;、电子邮件等进入查看合同,或打印保存合同内容。<br /> <br /> <br /> 甲乙双方就甲方自愿参加由乙方组织的本次旅游的有关事项经平等协商,自愿签订合同如下:   </p> <br /> 合同编号: <if condition="$ac['hetongbianhao'] eq ''"> <html:text showdom="$showedit" id="hetongbianhao" mrva="CJHT" /> <else /> <html:text showdom="$showedit" id="hetongbianhao" value="$ac['hetongbianhao']" mrva="CJHT" /> </if> <br /> 甲方: <html:text showdom="$showedit" value="$ac['jiafangName']" id="jiafangName" width="57" /> (旅游者或单位)<br /> 住所或单位地址: <html:text showdom="$showedit" value="$ac['Youraddress']" id="Youraddress" width="53" /> <br /> 电子邮件: <html:text showdom="$showedit" value="$ac['Email_send']" id="Email_send" width="33" /> 电话: <html:text showdom="$showedit" value="$ac['Yourtel']" id="Yourtel" width="33" /> <br /> <br /> 乙方: <if condition="$ac['YifangName'] eq ''"> <html:text showdom="$showedit" id="YifangName" mrva="成都市神州国际旅行社及北京分社" width="53" /> <else /> <html:text showdom="$showedit" id="YifangName" value="$ac['YifangName']" width="53" /> </if> (组团旅行社)<br /> 地址: <if condition="$ac['YicompanyAddress'] eq ''"> <html:text showdom="$showedit" id="YicompanyAddress" mrva="成都市一环路南四段9号 北京交道口南大街15号" width="53" /> <else /> <html:text showdom="$showedit" id="YicompanyAddress" value="$ac['YicompanyAddress']" width="53" /> </if> <br /> 经营范围: <if condition="$ac['jinyunhuanwei'] eq ''"> <html:text showdom="$showedit" id="jinyunhuanwei" mrva="国内旅游、出境旅游、入境旅游" width="53" /> <else /> <html:text showdom="$showedit" id="jinyunhuanwei" value="$ac['jinyunhuanwei']" width="53" /> </if> <br /> 经营许可证编号: <if condition="$ac['jinyunXuKeZheng'] eq ''"> <html:text showdom="$showedit" id="jinyunXuKeZheng" mrva="L-SC-CJ00014" width="53" /> <else /> <html:text showdom="$showedit" id="jinyunXuKeZheng" value="$ac['jinyunXuKeZheng']" width="53" /> </if> <br /> 电话: <html:text showdom="$showedit" id="Yitel" mrva="旅游服务监督、投诉电话:028-96927" width="53" /> <p>一、内容与标准<br /> 第1条 主要约定事项 </p> <table border="1" cellspacing="0" cellpadding="0" width="725" align="center"> <tbody> <tr> <td height="30" width="69"><div align="center">旅游团团号</div></td> <td colspan="2"> <html:text showdom="$showedit" id="tuanno" value="$ac['tuanno']" width="53" /> 订单号:<{$rs.orderform3}> </td> </tr> <tr> <td height="30" width="69"><div align="center">旅游线路</div></td> <td colspan="2"> 线路名称:<{$rs.orderform4}> &nbsp;<br> 旅游国家及地区<html:text showdom="$showedit" id="CountryAndArea" value="$ac['CountryAndArea']" width="28" /> </td> </tr> <tr> <td height="30" width="69"><div align="center">出发及散团时间地点</div></td> <td colspan="2"> <if condition="$ac['chufaTimeSTuan'] eq ''"> <html:textarea showdom="$showedit" id="chufaTimeSTuan" width="73" height="8" mrva=" 年 月 日 时 分在 集合出发(或上门接车); 年 月 日 时 分在 散团,共计 天 夜。(包括在途时间,不足24小时按1天计算)" /> <else /> <html:textarea showdom="$showedit" id="chufaTimeSTuan" width="73" height="8" value="$ac['chufaTimeSTuan']" /> </if> </td> </tr> <tr> <td height="15" width="69" align="middle">交通及标准</td> <td colspan="2"> <if condition="$ac['JiaoTongJiBiaoZhun'] eq ''"> <html:textarea showdom="$showedit" id="JiaoTongJiBiaoZhun" width="73" height="8" mrva="飞机:头等舱/商务舱/经济舱 火车:普通车/空调车/动车组/:(其中软卧/硬卧/软座/硬座) 轮船:普通客船/星级游船 人/间(其中是否带卫生间)或直接填写游轮名称 汽车:空调大巴/空调卧铺/普通客车,或直接填写车辆名称及型号,座位数等 (不包括景区观光车)标准,或详见行程中关于交通工具的描述。" /> <else /> <html:textarea showdom="$showedit" id="JiaoTongJiBiaoZhun" width="73" height="8" value="$ac['JiaoTongJiBiaoZhun']" /> </if> </td> </tr> <tr> <td height="15" width="69" align="middle">行程</td> <td colspan="2"> <html:textarea showdom="$showedit" id="zylsd" width="73" height="8" value="$ac['zylsd']" /> </td> </tr> <tr> <td height="30" width="69" align="middle">用餐次数及标准</td> <td colspan="2"> <if condition="$ac['ycsbz'] eq ''"> <html:textarea showdom="$showedit" id="ycsbz" width="73" height="8" mrva="早餐 次,标准 式;早餐 次,标准 式;早餐 次,标准 式;(可填西式、中式、美式等) 午餐 次,标准 式;午餐 次,标准 式;午餐 次,标准 式;(可填西式、中式、风味餐或特殊餐) 晚餐 次,标准 式;晚餐 次,标准 式;晚餐 次,标准 式; 团队餐,一般 人 桌, 菜 汤;途中乘坐交通工具时提供了膳食服务的,乙方不再安排。 以上餐费已含在费用中。" /> <else /> <html:textarea showdom="$showedit" id="ycsbz" width="73" height="8" value="$ac['ycsbz']" /> </if> </td> </tr> <tr> <td height="30" width="69"><div align="center">住宿标准:</div></td> <td colspan="2"> <if condition="$ac['zxbz'] eq ''"> <html:textarea showdom="$showedit" id="zxbz" width="73" height="8" mrva="第一天: 第二天: 第三天: 第四天: 第五天: 第六天: 其它: 关于住宿特殊说明: 或详细标准见最终确认行程中关于住宿的描述" /> <else /> <html:textarea showdom="$showedit" id="zxbz" width="73" height="8" value="$ac['zxbz']" /> </if> </td> </tr> </tbody> <tbody> <tr> <td height="30" width="69" align="middle">购物安排: </td> <td colspan="2"> <if condition="$ac['gwanpai'] eq ''"> <html:textarea showdom="$showedit" id="gwanpai" width="73" height="8" mrva="请填写各购物点及时间,如行程中有,可填写见行程中关于购物的描述" /> <else /> <html:textarea showdom="$showedit" id="gwanpai" width="73" height="8" value="$ac['gwanpai']" /> </if> </td> </tr> <tr> <td height="30" align="middle">自费项目:</td> <td colspan="2"> <if condition="$ac['ZhiFeiXiangMu'] eq ''"> <html:textarea showdom="$showedit" id="ZhiFeiXiangMu" width="73" height="8" mrva="请填写自费项目及价格等,如行程中有,可填写见行程中关于自费项目的描述。" /> <else /> <html:textarea showdom="$showedit" id="ZhiFeiXiangMu" width="73" height="8" value="$ac['ZhiFeiXiangMu']" /> </if> </td> </tr> <tr> <td height="30" width="69" align="middle">导游及费用</td> <td colspan="2"> <if condition="$ac['daoyoufeiy'] eq ''"> <html:textarea showdom="$showedit" id="daoyoufeiy" width="73" height="8" mrva="行程中第 天至 天有领队,费用已含; 行程中第 天至 天当地导游费用含,小费 元/天另计, 含或不含 (设计为选择型 含或不含)在费用中; 行程中第 天至 天无领队,若需领队,另按 元/天付费。 行程中第 天至 天无当地导游,若需导游,导游费 元/天另计,小费 元/天另计。" /> <else /> <html:textarea showdom="$showedit" id="daoyoufeiy" width="73" height="8" value="$ac['daoyoufeiy']" /> </if> </td> </tr> <tr> <td height="30" width="69" align="middle"><strong>旅游费用以人民币为收费货币</strong></td> <td colspan="2"> <if condition="$ac['fyzfbf'] eq ''"> <html:textarea showdom="$showedit" id="fyzfbf" width="73" height="8" mrva="甲方应交纳旅游费用总额 元,付款期限: 前; 费用构成:成人 元/人,共 人;儿童 元/人,共 人(儿童费用只含: )" /> <else /> <html:textarea showdom="$showedit" id="fyzfbf" width="73" height="8" value="$ac['fyzfbf']" /> </if> <br /> 旅游费用包含以下项目:<br /> <if condition="$ac['LvYouFeiYongBaoHanXuan'] eq '1'"> <html:checkbox id="LvYouFeiYongBaoHanXuan" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="LvYouFeiYongBaoHanXuan" showdom="$showedit" mrva="1" /> </if> 代办证件的手续费、签证/签注费;(甲方持有有效旅游证件的则不含证件签证办理费用)<br /> <if condition="$ac['jiaotongfeiyong'] eq '1'"> <html:checkbox id="jiaotongfeiyong" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="jiaotongfeiyong" showdom="$showedit" mrva="1" /> </if> 交通费用:行程中所列交通客票费(飞机包含机场建议费和燃油附加费)<br /> <if condition="$ac['chanyingzhushu'] eq '1'"> <html:checkbox id="chanyingzhushu" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="chanyingzhushu" showdom="$showedit" mrva="1" /> </if> 餐饮住宿费用:行程中应由乙方安排餐饮、住宿费用;<br /> <if condition="$ac['youleifeiy'] eq '1'"> <html:checkbox id="youleifeiy" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="youleifeiy" showdom="$showedit" mrva="1" /> </if> 游览费:行程中应乙方安排的游览费用,旅游景区景点第一道门票。<br /> <if condition="$ac['jiedaifeiyong'] eq '1'"> <html:checkbox id="jiedaifeiyong" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="jiedaifeiyong" showdom="$showedit" mrva="1" /> </if> 接待交通费:行程执行开始从旅游集中地至旅游结束时地面接待的交通费用。<br /> <if condition="$ac['lvyoufuwufei'] eq '1'"> <html:checkbox id="lvyoufuwufei" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="lvyoufuwufei" showdom="$showedit" mrva="1" /> </if> 旅游服务费:乙方提供各项旅游服务收取的费用。<br /> <if condition="$ac['qitafeiyong'] eq '1'"> <html:checkbox id="qitafeiyong" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="qitafeiyong" showdom="$showedit" mrva="1" /> </if> 甲、乙双方约定的其他费用:</td> </tr> <tr> <td height="30" width="69" align="middle"><strong>支付办法(均为人民币)</strong></td> <td colspan="2"> <html:textarea showdom="$showedit" id="zfbf" width="73" height="8" mrva="定金 元于 年 月 日前支付,若未按时支付定金,则乙方不保留相关旅游确认; 余款 元于 年 月 日前支付,若未按时支付余款,则乙方有权取消甲方的预订,定金不退还,由此造成的一切损失由甲方承担" /> <br /> 费用交纳方式: <if condition="$ac['JiaoNaFangSi_xj'] eq '1'"> <html:checkbox id="JiaoNaFangSi_xj" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="JiaoNaFangSi_xj" showdom="$showedit" mrva="1" /> </if> 现金 <if condition="$ac['JiaoNaFangSi_zt'] eq '1'"> <html:checkbox id="JiaoNaFangSi_zt" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="JiaoNaFangSi_zt" showdom="$showedit" mrva="1" /> </if> 转帐 <if condition="$ac['JiaoNaFangSi_xyk'] eq '1'"> <html:checkbox id="JiaoNaFangSi_xyk" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="JiaoNaFangSi_xyk" showdom="$showedit" mrva="1" /> </if>信用卡 <if condition="$ac['JiaoNaFangSi_qita'] eq '1'"> <html:checkbox id="JiaoNaFangSi_qita" showdom="$showedit" checked="checked" mrva="1" /> <else /> <html:checkbox id="JiaoNaFangSi_qita" showdom="$showedit" mrva="1" /> </if>其它支付方式</td> </tr> <tr> <td height="30" colspan="3"><div align="left">因我国出境旅游为团队形式出游,如因人数不足无法单独成团或乙方因特殊原因不能发团时,乙方可有权取消发团,并退还所付金额,合同自动终止。若因人数不足无法成团或乙方因特殊原因不能发团时,将转 <html:text showdom="$showedit" id="bunenfatian" value="$ac['bunenfatian']" width="22" /> 旅行社出团,但请甲方放心,在此旅游活动过程中,发生任何质量问题而引起的投诉均由本公司承担相应责任,本公司绝不推诿。<br /> 转并团旅行社信息: <if condition="$ac['ZhuanBinTuanTravel'] eq ''"> <html:text showdom="$showedit" id="ZhuanBinTuanTravel" width="72" mrva="可填写见出团通知书" /> <else /> <html:text showdom="$showedit" id="ZhuanBinTuanTravel" width="72" value="$ac['ZhuanBinTuanTravel']" /> </if> <br /> 地接旅行社信息: <if condition="$ac['DiJieTravel'] eq ''"> <html:text showdom="$showedit" id="DiJieTravel" width="72" mrva="可填写见出团通知书" /> <else /> <html:text showdom="$showedit" id="DiJieTravel" width="72" value="$ac['DiJieTravel']" /> </if> <br /> </div></td> </tr> <tr> <td height="30" width="69" align="middle"><strong>备  注</strong></td> <td colspan="2"> <html:textarea showdom="$showedit" id="beizhu" value="$ac['beizhu']" width="72" height="8" /> </td> </tr> </tbody> </table> <p>第2条 关于自由活动安排</p> <p>双方可约定自由活动时间的安排,详见行程表,若无其它约定,原则上甲方进入宾馆入住或休息之后和时间均为自由活动时间,所有自由时间内甲方应该遵守当地各服务设施的使用及安全说明,并自行承担相关安全责任.</p> <p>第3条 关于旅游保险。</p> <p>1、关于旅游意外险:旅游意外保险是由游客自选购买的一种旅游意外保险,是指游客在旅游途中由于发生意外而受伤及亡故后,可从购买的旅游意外保险中得到一定的赔偿,具体赔偿金额请参照相关保险公司的规定;<br /> 参保时间为自参加旅行社旅游团开始(指进入旅行社指定的交通工具)至旅行社旅游团结束(指离开旅行社指定的交通工具),如中途离团,保险也自动取消;<br /> 乙方可就在甲方要求为甲方代买旅游意外保险,如发生相关事故,请与保险公司直接协商相关赔偿事宜,乙方可从中配合并协助甲乙方处理,按保险公司规定,76周岁以上不承保,18周岁以下的保额按成人一半的保额赔保险公司联系人及电话: <html:text showdom="$showedit" id="BaoXianGSLianXiRen" value="$ac['BaoXianGSLianXiRen']" width="72" height="8" /> <br /> 3、 关于旅行社责任险:旅行社责任险是对因旅行社责任引起的游客人身伤亡、财产遭受的损失及由此发生的相关费用的赔偿,对于游客,在实际发生意外时,&ldquo;责任险&rdquo;保障的主要是旅行社对游客出游期间依法应承担的各种民事赔偿责任,而这种责任由法院或相关仲裁机构裁决。这意味着意外发生后,旅行社是不包揽一切的,它只承担自己的责任。由于游客自身原因或其他方原因出险由游客自行负责,旅行社只提供道义上的协助。为了获得更为全面的保障,我们强烈建议游客出游时根据个人意愿和需要自行投保个人险种。 </p> <p>第4条 旅游费用说明</p> <p>1.旅游费用中列明的交通费(包括并不仅限于飞机,火车,汽车,轮船等)如遇政府调整票价,该费用的退、补依照《合同法》第六十三条办理;餐饮住宿费:如甲方要求提高标准,经乙方同意安排的,甲方应补交所需差额。<br /> 1)、 <html:text showdom="$showedit" id="LvYouFeiYongShuoMing1" value="$ac['LvYouFeiYongShuoMing1']" width="110" /> <br /> 2)、 <html:text showdom="$showedit" id="LvYouFeiYongShuoMing2" value="$ac['LvYouFeiYongShuoMing2']" width="110" /> <br /> 2.乙方所收费用中如没有其它说明,将不包括以下项目: <br /> 1)非合同约定行程中发生的费用;航空保险,旅游中发生的甲方个人费用,如交通工具上的个人餐饮费、个人伤病医疗费、超重行李托运费,旅游住宿期间的洗衣、电话、电报、饮料及酒类费、私人交通费、自由活动费用、行李保管费、寻回个人遗失物品的费用与报酬,以及旅程中因个人行为造成的赔偿费用等。<br /> 2)双方约定的由甲方自行选择的由其另行付费的其他项目费用。<br /> 3)其他未明确说明已含的费用。<br /> 4) <html:text showdom="$showedit" id="QiTaFeiYong" value="$ac['QiTaFeiYong']" width="110" /> </p> <p><br /> 二、双方权利义务<br /> 第1条 甲方的权利与义务: <br /> 1、甲方所提供的证件及相关资料必须真实有效,并对所填写相关资料表的内容承担责任。向乙方提交的因私护照或者通行证有效期应当在半年以上,自办签证/签注者还应当确保所持签证/签注在出游期间有效。其中护照及签证(港澳通行证或签注)为甲方个人证件,如因个人证件问题造成甲方无法正常出入境的,由甲方本人承担全部责任,乙方不承担任何责任及赔偿。由于甲方提供的签证材料不真实等主观原因造成拒签,产生的费用一并由甲方当事人承担。若签证是乙方为甲方办理,签证中含有乙方的资金和信誉担保,甲方必须保证将如期前往目的地旅游,或者乙方有权注销该签证,或者由甲方支付等额担保金。<br /> 2、甲方应确保自身身体条件适合参加外出旅游团旅游。如您为孕妇或有心脏病、高血压、呼吸系统疾病等病史,请在征得医院专业医生同意后预定参加旅游产品。<br /> 3、甲方应妥善保管随身携带的行李物品,未委托乙方代管而损坏或丢失的,责任自负。<br /> 4、甲方在旅游活动中应遵守团队纪律,妥善监护随行小孩,配合导游完成本次旅游行程。<br /> 5、甲方应遵守我国和旅游目的地国家(地区)的法律法规和有关规定,携带的行李物品及货币应当符合我国和行程国家或地区的有关规定,不携带违禁物品出入境,不在境外滞留不归。自觉维护国家和民族的尊严与形象,自觉规范旅游行为,尊重目的地的宗教信仰、民族习惯和风土人情,不涉足色情场所,不参与赌博,不得在旅游过程中从事违法活动。<br /> 6、有权要求乙方如实提供《旅游行程表》和《行程须知》,有权要求乙方为旅游团队委派持有《领队证》的领队,以便协调处理相关事宜<br /> 7、在自由活动期间,甲方应当选择自己能够控制风险的活动项目,在自己能够控制风险的范围内活动。<br /> 8、行程中发生纠纷,甲方应与乙方平等协商解决,采取适当防止损失扩大,不得以服务质量等问题为由,拒绝登机(车,船)等行为扩大损失。<br /> 第2条 乙方权利和义务:<br /> 1、乙方应当提醒甲方注意免除或限制其责任的条款,按照甲方的要求,对有关条款予以说明。<br /> 2、乙方代理甲方办理旅游所需的手续,应妥善保管甲方提交的各项证件,如有遗失或毁损,应立即主动补办,承担补办手续费,并赔偿因此给甲方造成的直接损失。<br /> 3、按合同约定无领队或全陪的旅游团队,乙方应告知甲方旅游目的地的具体接洽办法,乙方可在此合同中或旅游行程或出团前发放的出团通知书中告之甲方,紧急情况下,可用短信,电子邮件,电话等方式告之甲方。<br /> 4、非因乙方原因,导致甲方在旅游其间入住酒店和搭乘飞机、轮船、火车、长途汽车、地铁、索道、缆车等公共交通工具时受到人身伤害或财产损失的,乙方应协助甲方向上列经营者索赔。<br /> 5、乙方应当按照旅游行程表安排甲方购物,不得强制甲方购物,不得与商品经营者串通欺诈甲方购物;对于纯观光无购物团,若无甲方的主动要求,则不能安排到旅游购物店购物。<br /> 6、乙方有权拒绝甲方提出的超出合同约定的要求。<br /> 7、在旅游行程中,当发生危及旅游者人身、财产安全,或者非乙方责任造成的意外情形,乙方不得不调整或者变更旅游合同约定的行程安排时,可以调整或变更行程安排,但是应当在事前向甲方作出说明;确因客观情况无法在事前说明的,应当在事后作出说明。导致本次团队游行程变更或取消的,产生的损失费用乙方不承担任何责任,但乙方负责退还甲方未发生的费用。 <br /> 8、在行程中,遇到不可抗力或意外事件无法继续履行合同的,旅行社相关人员在征得多数团员同意后可以对相应内容予以更改,变更后增加或减少的费用,双方按实结算。 <br /> 9、乙方应当提醒甲方出游时携带 <html:text showdom="$showedit" value="$ac['xdwpchuy']" id="xdwpchuy" /> 等证件。</p> <p>三、甲方违约责任(以下条款双方另有约定的除外)<br /> 第1条 (甲方退团)甲方可以在旅游活动开始前书面(包括传真,邮件,书信等 确认对方能收到的方式)通知乙方取消预定,但应按如下标准支付违约金。并赔偿由此而引起的其它直接经济损失,如机票损失、船票损失、酒店损失、门票损失、车费损失、导游费以及可预期的本公司将产生的利润损失等。<br /> <br /> 1) 旅游活动开始前,由于游客自己的原因取消预定,则所交定金不予退还。<br /> 2)在约定旅游开始前第7日(不含第7日)以前通知到的,则扣除定金不予退还,并另支付全部旅游费用的10%.<br /> 3)在约定旅游开始前第7日至第4日以前通知到的,则扣除定金不予退还,并另支付全部旅游费用的20%。<br /> 4)在约定旅游开始前第3日至第2日以前通知到的,则扣除定金不予退还,并另支付全部旅游费用的30%。<br /> 5)在约定旅游开始前1日通知到的,则扣除定金不予退还,并另支付全部旅游费用的50%。<br /> 6)在约定旅游开始日或开始后通知到或未通知到的,支付全部旅游费用的100%。<br />     以上所说定金一般按总团款的30%计算。<br /> 双方特别约定: <html:text showdom="$showedit" id="SuangYueDing" value="$ac['SuangYueDing']" width="50" /> <br />     第2条 (延误出行)甲方未准时到达约定地点集合出发也未能中途加入旅游团的,视为甲方解除合同.乙方可以按照本合同第5条第5项的约定处理。<br /> <br /> 第3条 (中途退团)甲方在旅程中未经乙方同意自行离团不归的,视为单方解除合同,不得要求乙方退还旅游费用。</p> <p>    第4条 (节假日)若甲方所预订的产品在目的地停留的日期部分或全部处在春节、国庆节、五一劳动节、元旦或其它国家性或者地方性重大节日期间(其他节日的具体时段以国家节前颁布的休假日期为准,以下类同),鉴于在春节、国庆节、五一劳动节、元旦或其它部国家性或者地方性重大节日的特殊状况,如甲方取消或推迟或更改此类已生效订单,需向乙方支付全部旅游费用总额的100%的违约金。</p> <p>四、乙方违约责任(以下条款双方另有约定的除外)<br /> 第1条 (乙方取消)除本合同第七条约定的情形外,如因乙方原因,致使甲方的旅游活动不能成行而取消的,乙方应当立即通知(包括传真,邮件,书信等 确认对方能收到的方式)甲方,并按如下标准支付违约金:<br /> 1、若甲方已交定金,则乙方双倍返还定金。<br /> 若甲方已支付全部团款,则:<br /> 1、在旅游开始前第7日(不含第7日)以前通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的10%。<br /> 2、在旅游开始前第7日至第4日通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的20%。<br /> 3、在旅游开始前第3日至第2日以前通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的30%。<br /> 4、在旅游开始前1口通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的50%。<br /> 5、在旅游开始日及以后通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的100%。<br /> 双方特别约定: <html:text showdom="$showedit" id="SuangYueDingYiZ" value="$ac['SuangYueDingYiZ']" width="50" /> </p> <p>第2条 (旅游行程延误)因乙方原因(因飞机、火车、轮船晚点造成旅游行程延误除外)造成约定出发时间被延误2小时以上,甲方要求解除合同终止旅游的,乙方应退还未完成的旅程费用并支付旅游费用5%的违约金。双方愿意继续履行合同的,乙方应承担甲方因延误旅游行程支出的食宿和其他必要费用,并:支付旅游费用5%的违约金。 </p> <p>第3条 (弃团)若有证据表明乙方在旅程中弃置甲方的,应当承担弃置期间甲方支出的食宿和其他必要费用,退还未完成的行程费用并支付旅游费用20%的违约金。</p> <p>第4条 (擅自转、并团)乙方未经甲方书面同意,将甲方转给其他旅行社出团的,按总团款的20%向甲方支付违约金。</p> <p>    第5条 (压缩游览时间)因乙方原因造成甲方在某一景点约定游览时间被压缩一小时以上,乙方 应按减少游览时间占该景点约定游览时间的比例,退还甲方该景点相应比例的游览费用(含该景点门票费、实际交纳的观光车和缆车索道费).</p> <p>五、其他约定<br /> 第1条 (合同转让)经乙方同意,甲方可以将其在本旅游合同上的权利义务转让给具有参加本次旅游条件的第三人,但应当在约定的出发日前 <html:text showdom="$showedit" id="cfrq" value="$ac['cfrq']" width="6" /> 日通知乙方。</p> <p>第2条 (合同变更)经甲、乙双方协商一致,可以书面形式变更本合同旅游内容。由此增加的旅游费用应由提出变更的一方承担,由此减少的旅游费用,乙方应退还甲方。如给对方造成损失的,由提出变更的一方承担损失。</p> <p>第3条 (合同附件)经双方协商一致,乙方提供的旅游行程表,出团通知书,宝全提示,自费项目表等经甲方签字后成为合同的附件,将与本合同一样发生法律效力,紧急情况下,或远距离情况下,双方无法通过书面签字的方式确认协议时,甲乙双方可通过电子版合同,短信,电子邮件,传真,聊天记录、电话录音等确认相关事项,双方应本着诚信原则,予以确认。</p> <p>第4条 (不可抗力)甲、乙双方因不可抗力不能履行合同的,部分或者全部免除责任,但法律另有规定的除外。</p> <p>如因不可抗力造成旅游费用增加,由双方各自承担自己的损失,不再向对方索取赔偿。</p> <p>第5条 (扩大损失)甲、乙一方违约后,对方应当采取适当措施防止损失扩大,没有采取适当措施致使损失扩大的,不得就扩大的损失要求赔偿。</p> <p>第6条 (委托招株)乙方委托其他旅行社代为招徕时,不得以未直接收取甲方费用为由免责。</p> <p>第7条 (合同效力)本合同—·式二份,双方各执一份,具有同等效力。</p> <p>第8条 (合同生效)本合同从签订之日起生效,至本次旅行结束甲方离开乙方安排的交通工具时为止。</p> <p>    <strong>六、争议解决</strong><br /> 本合同在履行中发生争议,双方应尽量协商解决,协商不成,双方均可向有管辖权的旅游执法机构进行调解,也可向相关仲裁机构及法院仲裁及起诉。<br /> <strong><br /> </strong>七、 补充条款及未尽事宜<U><br /> </U>本须知未尽的其他事项,双方可另立条款进行约束,但须征得另一方同意,同时合同双方需承担对等的义务。 <br /> <U>1、</U>部份产品并非梦之旅独立成团,而是与其它旅行社共同发团,敬请谅解。<br /> 2</span>、请携带儿童及婴儿参团的游客注意,请自行确定所带儿童及婴儿是否适合参团,并在旅途中自行负责照顾,否则发生任何问题,均需自行负责,同时,团队行程所列费用中,2岁(含)-12岁(不含)儿童只含餐费,车位费,导游费、儿童机票、船票、火车票等儿童交通费;不含任何景点门票、住宿费用等其它景区内相关费用,产生超高及其他费用请家长自理。由于<span lang="EN-US" xml:lang="EN-US">12</span>岁<span lang="EN-US" xml:lang="EN-US">(</span>不含<span lang="EN-US" xml:lang="EN-US">)</span>以下儿童费用为不占床之报价,若儿童需占床,请补单房差,敬请谅解。<span lang="EN-US" xml:lang="EN-US">0-2(</span>不含<span lang="EN-US" xml:lang="EN-US">)</span>岁儿童不含任何费用,若产生费用处理<span lang="EN-US" xml:lang="EN-US"><br /> 3</span>、团队行程中所游览的景点已享受团队优惠,故出示各种证件的人群均不退费。<br /> 76岁以上老人意外的保险责任,18周岁以下的人员赔偿标准按成年人一半的标准进行赔偿,比如,成年人最高赔偿10万元,则18岁以下,则最高赔偿5万元。<span lang="EN-US" xml:lang="EN-US"><br /> </span><br /> <strong> <html:text showdom="$showedit" id="other1" value="$ac['other1']" width="65" /> </strong><br /> 第2条<strong> <html:text showdom="$showedit" id="other2" value="$ac['other2']" width="55" /> </strong><br /> <br /> 第3条<strong> <html:text showdom="$showedit" id="other3" value="$ac['other3']" width="55" /> </strong><br /> <br /> 第4条<strong> <html:text showdom="$showedit" id="other4" value="$ac['other4']" width="55" /> </strong><br /> <br /> 第5条 <strong> <html:text showdom="$showedit" id="other5" value="$ac['other5']" width="65" /> </strong></p> <div><br /> <strong>八、甲方所有人员名单及证件号码</strong><br /> <html:textarea showdom="$showedit" id="jiafangAllPersren" value="$ac['jiafangAllPersren']" width="90" /> </div> <table border="0" cellspacing="0" cellpadding="0" width="98%"> <tbody> <tr> <td valign="top" width="49%"><table border="0" cellspacing="4" width="90%" align="center" <if condition="$rs.orderform33 eq '1'"> style='background-image:url(<{$Think.const.PICPATH}>/images/gongzhang.gif); ' </if> > <tbody> <tr> <td width="28%">甲方(代表):</td> <td width="72%"><html:text showdom="$showedit" value="$ac['jiafangdaibiao']" id="jiafangdaibiao" /></td> </tr> <tr> <td>身份证号码:</td> <td><html:text showdom="$showedit" value="$ac['jiafangshengfengzheng']" id="jiafangshengfengzheng" /></td> </tr> <tr> <td>电话(传真):</td> <td><html:text showdom="$showedit" value="$ac['jiafangtelfax']" id="jiafangtelfax" /></td> </tr> <tr> <td>电子邮箱:</td> <td><html:text showdom="$showedit" value="$ac['jiafengemail']" id="jiafengemail" /></td> </tr> <tr> <td height="105">&nbsp;</td> <td>&nbsp;</td> </tr> </tbody> </table></td> <td valign="top" width="51%"><table border="0" cellspacing="4" width="90%" align="center"> <tbody> <tr> <td width="42%">乙方(盖章):</td> <td width="58%"> 成都市神州国际旅行社有限公司</td> </tr> <tr> <td>委托签约人:</td> <td><html:text showdom="$showedit" id="y_name" value="$ac['y_name']" /></td> </tr> <tr> <td>电话(传真):</td> <td><html:text showdom="$showedit" id="y_tel" value="$ac['y_tel']" /></td> </tr> <tr> <td>电子邮箱:</td> <td><html:text showdom="$showedit" id="y_email" value="$ac['y_email']" /></td> </tr> <tr> <td>签约地点:</td> <td><html:text showdom="$showedit" id="y_addr" value="$ac['y_addr']" /></td> </tr> <tr> <td>签约日期(如:2012-10-1)</td> <td> <html:text showdom="$showedit" id="y_date" value="$ac['y_date']" /> </td> </tr> <tr> <td>是否同意即刻签约</td> <td valign="top"> <if condition="$rs.orderform33 eq '1'"> <html:checkbox showdom="$showedit" id="orderform33" checked="checked" mrva="1" />签约后不能再修改 <else /> <html:checkbox showdom="$showedit" id="orderform33" mrva="1" />签约后不能再修改 </if> </td> </tr> <tr> <td colspan="2"><table border="0" cellspacing="0" bordercolor="#0" cellpadding="0" width="100%" bgcolor="#666666"> <tbody> <tr bordercolor="#0" bgcolor="#ffffff"> <td width="48%" align="right"><div align="center"> <if condition="($rs.orderform33 neq '1') or ($Login.1 eq 'admin')"> <input value="提 交" type="submit" name="Submit2" id="Submit2" /> </if> </div></td> <td width="52%" align="middle"><if condition="($sendflag eq 'yes') and ($rs.orderform33 eq 1)"><input name="mysubmit3" id="mysubmit3" type="button" value="阅读并确认发送" /> <input id="tomail" name="tomail" type="hidden" value="<{$ac.Email_send}>"> </if> <html:hidden showdom="yes" id="id" value="$rs['orderform0']" /> <html:hidden showdom="yes" id="orderid" value="$rs['orderform3']" /> </td> </tr> </tbody> </table></td> </tr> </tbody> </table></td> </tr> </tbody> </table></td> </tr> <tr> <td align="middle"> 签约后不能修改合同条款,如确需修改,请另下订单。<br /></td> </tr> </tbody> </form> </table> <script language="javascript"> $(document).ready(function(){ <if condition="($sendflag eq 'yes') and ($rs.orderform33 eq '1')"> $("#mysubmit3").bind("click",function(){ $("#chujinghetong").attr("action","/sendmail<{$Think.const.FGF}>chujinghetong"); $("#chujinghetong").submit(); }); </if> $("#Submit2").bind("click",function(){ jiafengemail=$("#jiafengemail").val(); if(!jiafengemail.match(/^[\w\-\_\.]+@[\w\-\_\.]+\.[\w]+$/)) { alert("甲方电子邮件不正确\w"); $("#jiafengemail").focus(); return false; } y_email=$("#y_email").val(); if(!y_email.match(/^[\w\-\_\.]+@[\w\-\_\.]+\.[\w]+$/)) { alert("乙方电子邮件不正确"); $("#y_email").focus(); return false; } y_email=$("#tuanno").val(); if(y_email.match(/^[\s]+$/)) { alert("团号不能为空"); $("#tuanno").focus(); return false; } }); }); </script> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/affirm/chujinghetong.htm
HTML
asf20
45,939
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <script language=javascript> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="__PUBLIC__/jsLibrary/jquery/jquery.js"></script> <title>国内旅游合同</title> <style type="text/css"> body,td,th { font-size: 12px; } .input1 { font-size: 9pt; text-decoration: none; border-bottom-width: 1px; border-top-style: none; border-right-style: none; border-bottom-style: solid; border-left-style: none; } </style> </head><body> <form action="/orderform<{$Think.const.FGF}>saveguoleihetong" method="post" name="hetongc" id="hetongc"> <div id="main" style=" width:900px; margin:0 auto;" align="left"> <p align="center"><strong>电子版旅游合同</strong></p> <p align="left">&nbsp;</p> <p align="left">在我们双方签定合同前,请让我们双方一起确定,以下合同内容是我们双方意思的真实表达,我们双方保证,不能以此合同为在线签定为由,而拒绝承认此合同的真实性,同时双方保证,将严格遵守此合同的相关条款,并承担由于违反以下条款而引起的相关责任。<br /> 合同签定程序及步骤: <br /> 一、甲方下订单,乙方确认订单。 <br /> 二、甲方支付定金,乙方收到定金后,电子合同初稿形成。 <br /> 三、乙方在线填写合同内容,甲方通过&ldquo;订单查询&rdquo;进入查看合同。 <br /> <br /> 四、甲方、乙方均可反复在线修改,直到满意为止。(此过程中双方可通过合同上方的&ldquo;在线合同洽谈&rdquo;或合同最下方的&ldquo;在线客服&ldquo;系统进行交谈,当然也可通过电话等方式进行沟通)。 <br /> <br /> 五、双方无异议后,甲方、乙方勾选合同最下方的确认按纽,在线合同自然完成(有乙方代表的名字、公章及甲方代表的名字)。此时合同内容双方均无法再修改,如因特殊原因需取消或修改合同内容,须双方取得一致,重新下订单,另外签定合同,原合同作废。 <br /> <br /> 六、在线合同完成后,会有一封邮件发到双方的邮箱内,所签定的合同内容会以附件的形式存在于双方的电子邮件中,甲方收到邮件后,须在邮箱中按&rdquo;回复&rdquo;按纽将邮件无任何修改的发回给乙方,最后的合同才算完成。 <br /> 注:1、如甲方无邮件,则无第六步骤,合同将于第五步完成,稍有遗憾。 <br /> 2、甲方可随时通过&ldquo;订单查询方式&rdquo;、电子邮件等进入查看合同,或打印保存合同内容。<br /> <br /> <br /> 甲乙双方就甲方参加由乙方组织的本次旅游的有关事项经平等协商,自愿签订合同如下:       <br /> <strong><br /> 甲方: </strong><span id="content_yourname"> <assign name="var" value="$rs.orderform5" /> <if condition="$ac.jiafangname neq ''"><assign name="var" value="$ac.jiafangname"/></if> <{$var|ui_isinput="jiafangname","input1",$showedit,###}><br> </span>住所或单位地址: <{$ac.Youraddress|ui_isinput="Youraddress","input1",$showedit,###,"53"}> <br />     电子邮件: <{$ac.jiaemail|ui_isinput="jiaemail","input1",$showedit,###,"33"}> 电话:<assign name="var" value="" /> <if condition="$ac.Yourtel neq ''"><assign name="var" value="$ac.Yourtel"/></if> <{$var|ui_isinput="Yourtel","input1",$showedit,###,"33"}> <br /> <br /> <br /> <br /> <strong>乙方: <assign name="var" value="成都神州国际旅行社有限公司(注册商标:梦之旅)" /> <if condition="$ac.YiafangName neq ''"><assign name="var" value="$ac.YiafangName"/></if> <{$var|ui_isinput="YiafangName","input1",$showedit,###,"66"}></strong><br /> 国际旅行社业务许可证编号: <assign name="var" value="CJ00014" /> <if condition="$ac.jinyunXuKeZheng neq ''"><assign name="var" value="$ac.jinyunXuKeZheng"/></if> <{$var|ui_isinput="jinyunXuKeZheng","input1",$showedit,###}><br /> 经营范围:<assign name="var" value="出境旅游、国内旅游、入境旅游、酒店、机票预订、签证办理代理" /> <if condition="$ac.jinyunhuanwei neq ''"><assign name="var" value="$ac.jinyunhuanwei"/></if> <{$var|ui_isinput="jinyunhuanwei","input1",$showedit,###,"74"}></strong><br /> 电话:<assign name="var" value="成都市旅游局质量监督电话:028-96927" /> <if condition="$ac.Yitel neq ''"><assign name="var" value="$ac.Yitel"/></if> <{$var|ui_isinput="Yitel","input1",$showedit,###,"74"}><br /> <br /> <br /> <strong><br /></strong></p> <p>一、内容与标准<br /> 第1条 主要约定事项 </p> <table border="1" cellspacing="0" cellpadding="0" width="900" align="center"> <tbody> <tr> <td height="30" width="169"><div align="center">旅游团团号</div></td> <td colspan="2"> <{$ac.tuanno|ui_isinput="tuanno","input1",$showedit,###,"54"}> 散客拼团或包团 <input value="<{$rs.orderform3}>" type="hidden" name="orderid" id="orderid" /> <input value="<{$rs.orderform0}>" type="hidden" name="id" id="id" /></td> </tr> <tr> <td height="30" width="69"><div align="center">旅游线路</div></td> <td colspan="2">  <assign name="var" value="$trs.tour1" /> <if condition="$ac.protname neq ''"><assign name="var" value="$ac.protname"/></if> <{$var|ui_isinput="protname","input1",$showedit,###,"88"}>(订单号:<{$rs.orderform3}>) </td> </tr> <tr> <td height="30" width="69"><div align="center">出发及散团时间地点</div></td> <td colspan="2"> <assign name="var" value=" 年 月 日 时 分在 集合出发(或上门接车); 年 月 日 时 分在 散团,共计 天 夜。(包括在途时间,不足24小时按1天计算)" /> <if condition="$ac.cfsd neq ''"><assign name="var" value="$ac.cfsd"/></if> <{$var|ui_isinput="cfsd","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="15" width="69" align="middle">交通及标准</td> <td colspan="2"> <assign name="var" value="飞机:头等舱/商务舱/经济舱 火车:普通车/空调车/动车组/:(其中软臣/硬卧/软座/硬座) 轮船:普通客船/星级游船 人/间(其中是否带卫生间)或直接填写游轮名称 汽车:空调大巴/空调卧铺/普通客车,或直接填写车辆名称及型号,座位数等" /> <if condition="$ac.JiaoTongJiBiaoZhun neq ''"><assign name="var" value="$ac.JiaoTongJiBiaoZhun"/></if> <{$var|ui_isinput="JiaoTongJiBiaoZhun","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="15" width="69" align="middle">行程</td> <td colspan="2"> <assign name="var" value="" /> <if condition="$ac.zylsd neq ''"><assign name="var" value="$ac.zylsd"/></if> <{$var|ui_isinput="zylsd","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" width="69" align="middle">用餐次数及标准</td> <td colspan="2"> <assign name="var" value="早餐 次,标准: ; 午餐 次,标准: ; 晚餐 次,标准: ; 风味餐或特殊餐: 团队餐,一般十人一桌,八菜一汤,如人数不够十人,菜品及数量会相应减少。" /> <if condition="$ac.ycsbz neq ''"><assign name="var" value="$ac.ycsbz"/></if> <{$var|ui_isinput="ycsbz","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" width="69"><div align="center">住宿标准:</div></td> <td colspan="2"> <assign name="var" value="第一天: 第二天: 第三天: 第四天: 关于住宿特殊说明: 或详细标准见最终确认行程中关于住宿的描述" /> <if condition="$ac.zxbz neq ''"><assign name="var" value="$ac.zxbz"/></if> <{$var|ui_isinput="zxbz","",$showedit,###,"88","textarea"}> </td> </tr> </tbody> <tbody> <tr> <td height="30" width="69" align="middle">购物安排:</td> <td colspan="2"> <assign name="var" value="请填写各购物点及时间,如行程中有,可填写见行程" /> <if condition="$ac.gwanpai neq ''"><assign name="var" value="$ac.gwanpai"/></if> <{$var|ui_isinput="gwanpai","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" align="middle">自费项目:</td> <td colspan="2"> <assign name="var" value="请填写自费项目及价格等,如行程中有,可填写见行程" /> <if condition="$ac.ZhiFeiXiangMu neq ''"><assign name="var" value="$ac.ZhiFeiXiangMu"/></if> <{$var|ui_isinput="ZhiFeiXiangMu","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" width="69" align="middle">导游及费用</td> <td colspan="2"> <assign name="var" value="1、行程中第 天至行程中第 天有导游安排,费用已含。 2、行程中第 天至行程中第 天无导游安排,若需要,需另行付费 元 特别说明:自由活动期间,由游客自行活动,无导游跟随,游客需自行对自己的安全负责" /> <if condition="$ac.daoyoufeiy neq ''"><assign name="var" value="$ac.daoyoufeiy"/></if> <{$var|ui_isinput="daoyoufeiy","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" width="69" align="middle"><strong>旅游费用<br /> (均为人民币)</strong></td> <td colspan="2"> <assign name="var" value="旅游费用:成人 元/人,小孩 元/人;(共 成人, 小孩) 接机费: 元/车次; 其它费用1: , 其它费用2:: 总计: 元(人民币)&lt;br&gt; &lt;br&gt; 备注:小孩费用只含:" /> <if condition="$ac.fyzfbf neq ''"><assign name="var" value="$ac.fyzfbf"/></if> <{$var|ui_isinput="fyzfbf","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" width="69" align="middle"><strong>支付办法(均为人民币)</strong></td> <td colspan="2"> <assign name="var" value="定金 元于 年 月 日前支付,若未按时支付定金,则乙方不保留相关旅游确认; 余款 元于 年 月 日前支付,若未按时支付余款,则乙方有权取消甲方的预订,定金不退还,由此造成的一切损失由甲方承担" /> <if condition="$ac.zhifubanf neq ''"><assign name="var" value="$ac.zhifubanf"/></if> <{$var|ui_isinput="zhifubanf","",$showedit,###,"88","textarea"}> </td> </tr> <tr> <td height="30" colspan="3"><div align="left">如因人数不足无法单独成团或本公司因特殊原因不能发团时,将转 <{$ac.qtyy|ui_isinput="qtyy","input1",$showedit,###,"33"}> 旅行社出团,但请游客放心,在此旅游活动过程中,发生任何质量问题而引起的投诉均由本公司承担相应责任,本公司绝不推诿。<br /> 转并团旅行社信息: <assign name="var" value="可填写见出团通知书" /> <if condition="$ac.ZhuanBinTuanTravel neq ''"><assign name="var" value="$ac.ZhuanBinTuanTravel"/></if> <{$var|ui_isinput="ZhuanBinTuanTravel","input1",$showedit,###,"70"}> <br /> 地接旅行社信息: <assign name="var" value="可填写见出团通知书" /> <if condition="$ac.DiJieTravel neq ''"><assign name="var" value="$ac.DiJieTravel"/></if> <{$var|ui_isinput="DiJieTravel","input1",$showedit,###,"70"}> <br /> 备注:以上信息乙方也可在出团前以出团通知书、电子邮件、短信、电话等方式通知甲方。 </div></td> </tr> <tr> <td height="30" width="69" align="middle"><strong>备  注</strong></td> <td colspan="2"> <assign name="var" value="已含费用: 未含费用:" /> <if condition="$ac.beizhu neq ''"><assign name="var" value="$ac.beizhu"/></if> <{$var|ui_isinput="beizhu","input1",$showedit,###,"70","textarea"}> </td> </tr> </tbody> </table> <p>第2条 关于自由活动安排</p> <p>双方可约定自由活动时间的安排,详见行程表,若无其它约定,原则上甲方进入宾馆入住或休息之后和时间均为自由活动时间,所有自由时间内甲方应该遵守当地各服务设施的使用及安全说明,并自行承担相关安全责任.</p> <p>第3条 关于旅游保险。</p> <p>1、关于旅游意外险:旅游意外保险是由游客自选购买的一种旅游意外保险,是指游客在旅游途中由于发生意外而受伤及亡故后,可从购买的旅游意外保险中得到一定的赔偿,具体赔偿金额请参照相关保险公司的规定;<br /> 参保时间为自参加旅行社旅游团开始(指进入旅行社指定的交通工具)至旅行社旅游团结束(指离开旅行社指定的交通工具),如中途离团,保险也自动取消;<br /> 乙方可应甲方要求购买旅游意外保险,如发生相关事故,请与保险公司直接协商相关赔偿事宜,乙方可从中配合并协助甲乙方处理,按保险公司规定,<span lang="EN-US" xml:lang="EN-US">76</span>周岁以上不承保,<span lang="EN-US" xml:lang="EN-US">18</span>周岁以下的保额按成人一半的保额赔偿,保险公司联系人及电话: <{$ac.BaoXianGSLianXiRen|ui_isinput="BaoXianGSLianXiRen","input1",$showedit,###,"22"}> <br /> 2、 关于旅行社责任险:旅行社责任险是对因旅行社责任引起的游客人身伤亡、财产遭受的损失及由此发生的相关费用的赔偿,对于游客,在实际发生意外时,&ldquo;责任险&rdquo;保障的主要是旅行社对游客出游期间依法应承担的各种民事赔偿责任,而这种责任由法院或相关仲裁机构裁决。这意味着意外发生后,旅行社是不包揽一切的,它只承担自己的责任。由于游客自身原因或其他方原因出险由游客自行负责,旅行社只提供道义上的协助。为了获得更为全面的保障,我们强烈建议游客出游时根据个人意愿和需要自行投保个人险种。 </p> <p>第4条 旅游费用说明</p> <p>1.旅游费用中列明的交通费(包括并不仅限于飞机,火车,汽车,轮船等)如遇政府调整票价,该费用的退、补依照《合同法》第六十三条办理;<br /> 1)、 <{$ac.LvYouFeiYongShuoMing1|ui_isinput="LvYouFeiYongShuoMing1","input1",$showedit,###,"110"}> <br /> 2)、 <{$ac.LvYouFeiYongShuoMing2|ui_isinput="LvYouFeiYongShuoMing2","input1",$showedit,###,"110"}> <br /> 2.乙方所收费用中如没有其它说明,将不包括以下项目: <br /> 1)旅游中发生的甲方个人费用,如交通工具上的个人餐饮费、个人伤病医疗费、超重行李托运费,旅游住宿期间的洗衣、电话、电报、饮料及酒类费、私人交通费、自由活动费用、行李保管费、寻回个人遗失物品的费用与报酬,以及旅程中因个人行为造成的赔偿费用等。<br /> 2)双方约定的由甲方自行选择的由其另行付费的其他项目费用。<br /> 3)其他未明确说明已含的费用。<br /> 4) <{$ac.QiTaFeiYong|ui_isinput="QiTaFeiYong","input1",$showedit,###,"110"}> </p> <p><br /> 二、双方义务<br /> 第1条 (甲方义务)甲方应当履行下列义务: <br /> 1、甲方所提供的证件及相关资料必须真实有效。<br /> 2、甲方应确保自身身体条件适合参加旅游团旅游。<br /> 3、甲方应妥善保管随身携带的行李物品,未委托乙方代管而损坏或丢失的,责任自负。<br /> 4、甲方在旅游活动中应遵守团队纪律,妥善监护随行小孩,配合导游完成本次旅游行程。<br /> 5、甲方应尊重目的地的宗教信仰、民族习惯和风土人情。<br /> 6、在自由活动期间,甲方应当选择自己能够控制风险的活动项目,在自己能够控制风险的范围内活动。<br /> 7、行程中发生纠纷,甲方应与乙方平等协商解决,采取适当防止损失扩大,不得以服务质量等问题为由,拒绝登机(车,船)等行为扩大损失。<br /> 第2条 (乙方义务)乙方应当履行下列义务:<br /> 1、乙方应当提醒甲方注意免除或限制其责任的条款,按照甲方的要求,对有关条款予以说明。<br /> 2、乙方代理甲方办理旅游所需的手续,应妥善保管甲方提交的各项证件,如有遗失或毁损,应立即主动补办,承担补办手续费,并赔偿因此给甲方造成的直接损失。<br /> 3、按合同约定无领队或全陪的旅游团队,乙方应告知甲方旅游目的地的具体接洽办法,乙方可在此合同中或旅游行程或出团前发放的出团通知书中告之甲方,紧急情况下,可用短信,电子邮件,电话等方式告之甲方。<br /> 4、非因乙方原因,导致甲方在旅游其间搭乘飞机、轮船、火车、长途汽车、地铁、索道、缆车等公共交通工具时受到人身伤害或财产损失的,乙方应协助甲方向上列经营者索赔。<br /> 5、乙方应当按照旅游行程表安排甲方购物,不得强制甲方购物,不得与商品经营者串通欺诈甲方购物;对于纯观光无购物团,若无甲方的主动要求,则不能安排到旅游购物店购物。<br /> 6、乙方有权拒绝甲方提出的超出合同约定的要求。<br /> 7、在行程中,遇到不可抗力或意外事件无法继续履行合同的,旅行社相关人员在征得多数团员同意后可以对相应内容予以更改,变更后增加或减少的费用,双方按实结算。 <br /> 8、乙方应当提醒甲方出游时携带 <{$ac.xdwp|ui_isinput="xdwp","input1",$showedit,###,"110"}> 等证件。</p> <p>三、甲方违约责任(以下条款双方另有约定的除外)<br /> 第1条 (甲方退团)甲方可以在旅游活动开始前书面(包括传真,邮件,书信等 确认乙方能收到的方式)通知乙方取消预定,甲方应承但由此造成的直接损失,并应按如下标准支付违约金。<br /> 1)在约定旅游开始前第5日(不含第5日)以前通知到的,则扣除定金不予退还,并另支付全部旅游费用的10%.<br /> 2)在约定旅游开始前第5日至第4日以前通知到的,则扣除定金不予退还,并另支付全部旅游费用的20%。<br /> 3)在约定旅游开始前第3日至第2日以前通知到的,则扣除定金不予退还,并另支付全部旅游费用的30%。<br /> 4)在约定旅游开始前1日通知到的,则扣除定金不予退还,并另支付全部旅游费用的50%。<br /> 5)在约定旅游开始日或开始后通知到或未通知到的,支付全部旅游费用的100%。<br /> <span lang="EN-US" xml:lang="EN-US">       以上所说定金一般按总团款的30%计算。<br /> </span>但甲方支付的总费用不应超过团费的总额<span lang="EN-US" xml:lang="EN-US"><br /> 双方特别约定: <{$ac.SuangYueDing|ui_isinput="SuangYueDing","input1",$showedit,###,"110"}> <br /> </span>    第2条 (延误出行)甲方未准时到达约定地点集合出发也未能中途加入旅游团的,视为甲方解除合同.乙方可以按照本合同第5条第5项的约定处理。<br /> <br /> 第3条 (中途退团)甲方在旅程中未经乙方同意自行离团不归的,视为单方解除合同,不得要求乙方退还旅游费用。<br /> 第4条 (节假日<span lang="EN-US" xml:lang="EN-US">)</span><span lang="EN-US" xml:lang="EN-US"> </span>若甲方所预订的产品在目的地停留的日期部分或全部处在春节、国庆节、五一劳动节、元旦或其它国家性或者地方性重大节日期间(其他节日的具体时段以国家节前颁布的休假日期为准,以下类同),鉴于在春节、国庆节、五一劳动节、元旦或其它部国家性或者地方性重大节日的特殊状况,如甲方取消或推迟或更改此类已生效订单,需向乙方支付全部旅游费用总额的<span lang="EN-US" xml:lang="EN-US">100</span>%的违约金。</p> <p>四、乙方违约责任(以下条款双方另有约定的除外)<br /> 第1条 (乙方取消)除本合同第七条约定的情形外,如因乙方原因,致使甲方的旅游活动不能成行而取消的,乙方应当立即通知(包括传真,邮件,书信,录音电话,在线聊天等)甲方,并按如下标准支付违约金:<br /> 1、在旅游开始前第5日(不含第5日)以前通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的10%。<br /> 2、在旅游开始前第5日至第4日通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的20%。<br /> 3、在旅游开始前第3日至第2日以前通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的30%。<br /> 4、在旅游开始前1口通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的50%。<br /> 5、在旅游开始日及以后通知到的,须退还甲方已交旅游费用并支付甲方全部旅游费用的100%。<br /> 双方特别约定: <{$ac.SuangYueDingYiZ|ui_isinput="SuangYueDingYiZ","input1",$showedit,###,"110"}> </p> <p>第2条 (旅游行程延误)因乙方原因(因飞机、火车、轮船晚点造成旅游行程延误除外)造成约定出发时间被延误2小时以上,甲方要求解除合同终止旅游的,乙方应退还未完成的旅程费用并支付旅游费用5%的违约金。双方愿意继续履行合同的,乙方应承担甲方因延误旅游行程支出的食宿和其他必要费用,并:支付旅游费用5%的违约金。 </p> <p>第3条 (弃团)若有证据表明乙方在旅程中弃置甲方的,应当承担弃置期间甲方支出的食宿和其他必要费用,退还未完成的行程费用并支付旅游费用30%的违约金。</p> <p>第4条 (擅自转、并团)乙方未经甲方书面同意,将甲方转给其他旅行社出团的,按总团款的20%向甲方支付违约金。</p> <p>    第5条 (压缩游览时间)因乙方原因造成甲方在某一景点约定游览时间被压缩一小时以上,乙方 应按减少游览时间占该景点约定游览时间的比例,退还甲方该景点相应比例的游览费用(含该景点门票费、实际交纳的观光车和缆车索道费).</p> <p>五、其他约定<br /> 第1条 (合同转让)经乙方同意,甲方可以将其在本旅游合同上的权利义务转让给具有参加本次旅游条件的第三人,但应当在约定的出发日前 <{$ac.cfrq|ui_isinput="cfrq","input1",$showedit,###,"110"}> 日通知乙方,若因此而增加费用或造成相关损失,应有甲方支付后才能转让。</p> <p>第2条 (合同变更)经甲、乙双方协商一致,可以书面形式变更本合同旅游内容。由此增加的旅游费用应由提出变更的一方承担,由此减少的旅游费用,乙方应退还甲方。如给对方造成损失的,由提出变更的一方承担损失。</p> <p>第3条 (合同附件)经双方协商一致,乙方提供的旅游行程表,出团通知书,宝全提示,自费项目表等经甲方签字后成为合同的附件,将与本合同一样发生法律效力,紧急情况下,或远距离情况下,双方无法通过书面签字的方式确认协议时,甲乙双方可通过电子版合同,短信,电子邮件,传真,聊天记录、电话录音等确认相关事项,双方应本着诚信原则,予以确认。</p> <p>第4条 (不可抗力)甲、乙双方因不可抗力不能履行合同的,部分或者全部免除责任,但法律另有规定的除外。</p> <p>如因不可抗力造成旅游费用增加,由双方各自承担自己的损失,不再向对方索取赔偿。</p> <p>第5条 (扩大损失)甲、乙一方违约后,对方应当采取适当措施防止损失扩大,没有采取适当措施致使损失扩大的,不得就扩大的损失要求赔偿。</p> <p>第6条 (委托招株)乙方委托其他旅行社代为招徕时,不得以未直接收取甲方费用为由免责。</p> <p>第7条 (合同效力)本合同—·式二份,双方各执一份,具有同等效力。</p> <p>第8条 (合同生效)本合同从签订之日起生效,至本次旅行结束甲方离开乙方安排的交通工具时为止。</p> <p>    <strong>六、争议解决</strong><br /> 本合同在履行中发生争议,双方应尽量协商解决,协商不成,双方均可向有管辖权的旅游执法机构进行调解,也可向相关仲裁机构及法院仲裁及起诉。<br /> <strong><br /> </strong>七、未尽事宜 及补充条款<U><br /> </U></span>本须知未尽的其他事项,双方可另立条款进行约束,但须征得另一方同意,同时合同双方需承担对等的义务。  <br /> </span><U>1、</U>部份旅游产品并非梦之旅独立成团,而是与其它旅行社共同发团,敬请谅解。<br /> 2</span>、请携带儿童及婴儿参团的游客注意,请自行确定所带儿童及婴儿是否适合参团,并在旅途中自行负责照顾,否则发生任何问题,均需自行负责,同时,团队行程所列费用中,2岁(含)-12岁(不含)儿童只含餐费,车位费,导游费、儿童机票、船票、火车票等儿童交通费;不含任何景点门票、住宿费用等其它景区内相关费用,产生超高及其他费用请家长自理。由于<span lang="EN-US" xml:lang="EN-US">12</span>岁<span lang="EN-US" xml:lang="EN-US">(</span>不含<span lang="EN-US" xml:lang="EN-US">)</span>以下儿童费用为不占床之报价,若儿童需占床,请补单房差,敬请谅解。<span lang="EN-US" xml:lang="EN-US">0-2(</span>不含<span lang="EN-US" xml:lang="EN-US">)</span>岁儿童不含任何费用,若产生费用处理<span lang="EN-US" xml:lang="EN-US"><br /> 3</span>、团队行程中所游览的景点已享受团队优惠,故出示各种证件的人群均不退费。<br /> 4</span>、按保险公司规定,76周岁以上不承保,若有76岁以上老人参团,请自行购买保险,乙方不承担任何有关76岁以上老人意外的保险责任,18周岁以下的人员赔偿标准按成年人一半的标准进行赔偿,比如,成年人最高赔偿10万元,则<span lang="EN-US" xml:lang="EN-US">18</span>岁以下,则最高赔偿<span lang="EN-US" xml:lang="EN-US">5</span>万元。<span lang="EN-US" xml:lang="EN-US"><br /> </span>第1条<strong> <{$ac.other1|ui_isinput="other1","input1",$showedit,###,"65"}> </strong><br /> <br /> </span>第2条<strong> <{$ac.other2|ui_isinput="other2","input1",$showedit,###,"65"}> </strong><br /> <br /> 第3条<strong> <{$ac.other3|ui_isinput="other3","input1",$showedit,###,"65"}> </strong><br /> <br /> 第4条<strong> <{$ac.other4|ui_isinput="other4","input1",$showedit,###,"65"}> </strong><br /> <br /> </span>第5条 <strong> <{$ac.other5|ui_isinput="other5","input1",$showedit,###,"65"}> </strong></p> <div><br /> <strong>八、甲方所有人员名单及证件号码</strong><br /> <assign name="var" value="" /> <{$ac.jiafangAllPersren|ui_isinput="jiafangAllPersren","",$showedit,###,"90","textarea"}> </div> <div><br /> <table width="350" border="0" cellspacing="0" cellpadding="0" <if condition="$rs.orderform33 eq 1"> style="background-image:url(<{$Think.const.PICPATH}>/images/gongzhang.gif);" </if> > <tr> <td> 甲方人员代表: <{$ac.jiafangrenydb|ui_isinput="jiafangrenydb","input1",$showedit,###,"50"}><br /> 乙方人员代表: <{$ac.yifangrenydb|ui_isinput="yifangrenydb","input1",$showedit,###,"50"}><br /> 成都联系方式:本行程提供24小时即时在线预订,一分钟完成全部预订,轻松出行!<br> 梦之旅服务热线:400-0051-706 <br> 日期: <{$ac.qanyuedate|ui_isinput="qanyuedate","input1",$showedit,###,"50"}><br></td> </tr> <tr><td height="100"></td></tr> </table> </div> <if condition="$showedit eq 'yes'"> <div>是否签约:<{$rs.orderform33|ui_checkbox_shenghe="orderform33",###,"1"}> (勾上表示同意签约,并生成html文件,以后就查看的是生成后的文件了) <div> </if> <br> <if condition="($showedit eq 'yes') and (($rs.orderform33 eq 1) or ($Login.1 eq 'admin'))"><input name="mysubmit" id="mysubmit" type="submit" value="提 交 修 改" /></if> <if condition="($sendflag eq 'yes') and ($rs.orderform33 eq 1)"><input name="mysubmit2" id="mysubmit2" type="button" value="阅读并确认发送" /> <input id="tomail" name="tomail" type="hidden" value="<{$ac.jiaemail}>"> </if> </div> </div> </form> <script src="__PUBLIC__/jsLibrary/Jslibary.js"></script> <script language="javascript"> $(document).ready(function(){ <if condition="$sendflag eq 'yes'"> $("#mysubmit2").bind("click",function(){ $("#hetongc").attr("action","/sendmail<{$Think.const.FGF}>guoleihetong"); $("#hetongc").submit(); }); </if> //验证表单 <if condition="$showedit eq 'yes'"> $("#mysubmit").bind("click",function(){ if(nzeletype("jiafangname","甲方名称不能不空","string")==false) return false; if(nzeletype("jiaemail","请填写正确的甲方电子邮件","email")==false) return false; if(nzeletype("tuanno","旅游团团号不能不空","string")==false) return false; return true; }); </if> }) </script> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/affirm/guoleihetong.htm
HTML
asf20
31,281
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language=javascript> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> <title>支付返回结果页面</title> </head> <body> <if condition="$isprint eq 'yes'"> <div style="margin-top:10px; margin-bottom:10px;" align="center"><input name="printdo2" id="printdo2" onclick="doPrint()" type="button" value="打 印" /></div> </if> <!--startprint--> <style type="text/css"> *{margin:0 auto;padding:0;} img{border:0;} ul,li{marign:0;padding:0;} body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } tr .STY{ border-top: solid #D0D0D0; border-top-width: thin; } #main{width:600px;border:15px #6c6c6c solid;} #main .nei{width:568px;border:6px #b2b2b2 solid;padding-left:10px;padding-right:10px;} .nei h5{font-size:12px;border-bottom:1px #999999 dashed; text-align:left;font-weight:400;height:18px;margin-bottom:20px;} /*============================box'style=============================*/ .nei .logo{margin-top:10px;} .nei .box{width:470px;} .nei .box img{width:100px;height:58px;text-align:left;display:block;float:left;} .nei .box .bj{background:url(__PUBLIC__/images/zfbg1.gif) no-repeat top left;width:365px;height:95px;margin-left:0px;float:left;text-align:left;} .nei .box .bj2{width:365px;height:98px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj2 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj2 h3{width:352px;height:85px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} /*========================================bj3'style======================================*/ .nei .box .bj3{width:365px;height:160px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj3 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj3 h3{width:352px;height:145px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} a:link,a:visited{color:#6633FF;text-decoration:none;} a:hover{color:#FF3366;text-decoration:underline;} </style> <div id="main" align="center"> <div class="nei" align="center"> <img src="__PUBLIC__/images/logo.gif"> <div align="center"><strong>您的支付确认书<br> </strong></div> <div style="line-height:40px; height:40px;"></div> <div align="left"> <p><strong><{$rs.orderform5}></strong>先生/小姐,您好!<br /> 欢迎预订梦之旅, 您的支付已成功,下面是您的预订及支付信息,请您仔细阅读,若有疑问,随时咨询梦之旅客服人员! <br /> 我们将会在出发前二天以上发送出团通知书,请随时查询您的电子邮件,同时您也可进入您的订单,从订单中获取您的出团通知书.<br /> <strong>什么是出团通知书?<br /> </strong>出团通知书是我们的旅行团出发前发给客人的发团信息,主要内容包括客人出行所需要的预订信息,联系信息,紧急联系电话,集合地点等相关重要信息,也是最后的通知书,有时还包括一些注意事项,天气预报,安全须知等内容,客人务必仔细阅读并保存.<br /> <br> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu2.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" cellpadding="5" width="100%"> <tbody> <tr> <td width="21%" align="right"><strong>订单号:</strong></td> <td width="79%"><{$rs.orderform3}></td> </tr> <tr> <td align="right"><strong>姓&nbsp; 名:</strong></td> <td><{$rs.orderform5}></td> </tr> </tbody> </table></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu1.jpg" width="128" height="59" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347">产品<br /> <hr /><{$tourrs.tour1|htmlspecialchars=###}> <br /></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> <p align="left"><br /> <br /> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100">集合及机场接送信息:</td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"> <if condition="$orderinfors.jiejisongjishengqin eq ''"> 无 <else /> </if> </td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu4.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" width="100%"> <tbody> <tr> <td width="50%" align="right"><strong>应付总金额:</strong></td> <td width="50%"><{$rs.orderform16}></td> </tr> <tr> <td align="right"><strong>定金支付金额:</strong></td> <td> ¥ <{$rs.pay3}>元 <if condition="$rs.pay6 neq 1">(未成功)</if> </td> </tr> <tr> <td align="right"><strong>支付方式:</strong></td> <td><{$rs.pay5}></td> </tr> <!-- 当定金支付成功并且余款大于0时显示--> <if condition="($rs.pay6 eq 1) and ($rs.pay7 gt 0)"> <tr> <td align="right">支付时间:</td> <td>&nbsp;<{$rs.pay4|date="Y-m-d",###}></td> </tr> <tr> <td align="right"></td> <td>&nbsp;</td> </tr> <tr> <td align="right">余款次支付金额</td> <td>&nbsp;¥ <{$rs.pay7}>元 <if condition="$rs.pay10 neq 1">(未成功)</if></td> </tr> <tr> <td align="right">支付时间</td> <td>&nbsp;<{$rs.pay8|date="Y-m-d",###}></td> </tr> <tr> <td align="right">支付方式</td> <td>&nbsp;<{$rs.pay9}></td> </tr> </if> <!-- 如果已经支付了第三次金额则显示出来--> <if condition="($payinfors.je3isconfim eq 1) and ($payinfors.je3 gt 0)"> </if> <!-- 如果已经支付了第四次金额则显示出来--> <if condition="($payinfors.je4isconfim eq 1) and ($payinfors.je4 gt 0)"> </if> </tbody> </table></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5>&nbsp;</h5> <div align="left"> <p><br /> 您也可以进入您的订单中获取与本面相同的支付确认书,<br> *关于取消及更改预订,请参考相关 退款保障!<br> <strong>联系方式:</strong> <br> <{$toursinfors.contactus}> </p> </div> <div align="center"></div> <p align="left"><br /> <a href="<{$hostname}>" target="_blank"><span lang="EN-US" xml:lang="EN-US">梦之旅官方网站</span></a></p> </div> </div> <!--endprint--> <if condition="$isprint eq 'yes'"> <div style="margin-top:20px;" align="center"><input name="printdo" id="printdo" onclick="doPrint()" type="button" value="打 印" /></div> </if> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/affirm/zhifu.htm
HTML
asf20
12,260
<include file="Public:header" /> <link href="__PUBLIC__/new/css/new.css" rel="stylesheet" type="text/css" /> <!--banner start--> <div class="banner"> <!--banner_left start--> <div class="banner_left"> <div class="left_xx"> <li style="height:auto;"><img src="__PUBLIC__/new/images/left_title.jpg" /></li> <li><a href="" target="_blank">附 近 转 转</a></li> <li><a href="" target="_blank">国 内 走 走</a></li> <li class="left_hover"><a href="" target="_blank">出 境 看 看</a></li> <li><a href="" target="_blank">自 助 旅 游</a></li> <li><a href="" target="_blank">包 团 旅 游</a></li> <li><a href="" target="_blank">客&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;栈</a></li> </div> <div><img src="__PUBLIC__/new/images/left_bottom.jpg" /></div> </div> <!--banner_left end--> <!--banner_right start--> <div class="banner_right"> <div class="tp"> <li><a href="" target="_blank"><img src="__PUBLIC__/new/images/banner.jpg" /></a></li> </div> </div> <!--banner_right end--> </div> <!--banner end--> <div class="clear"></div> <!--main start--> <div class="main"> <!--main_left start--> <div class="main_left"> <div class="rmtj"> <li>热门推荐</li> </div> <div class="fn_tj"> <!--攻略分类 start--> <ul> <li class="fn_title">攻略分类</li> <li class="ys1"> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/qz.jpg" /></a> <a href="" target="_blank">签 证</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/fq.jpg" /></a> <a href="" target="_blank">风 情</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/pb.jpg" /></a> <a href="" target="_blank">攀 冰</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/ss.jpg" /></a> <a href="" target="_blank">少 数 民 族</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/pb.jpg" /></a> <a href="" target="_blank">泡 吧</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/gef.jpg" /></a> <a href="" target="_blank">高 尔 夫</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/jq.jpg" /></a> <a href="" target="_blank">节 庆</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/hs.jpg" /></a> <a href="" target="_blank">火 山</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/gn.jpg" /></a> <a href="" target="_blank">观 鸟</a> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/sm.jpg" /></a> <a href="" target="_blank">沙 漠</a> </span> </li> </ul> <!--攻略分类 end--> <!--国内目的地推荐 start--> <ul> <li class="fn_title">国内目的地推荐</li> <li class="ys2"> <span class="one"> <a href="" target="_blank"><img src="__PUBLIC__/new/images/gn_mdd.jpg" /></a> <em class="jg">¥<i>960</i>元</em> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/left_tp.jpg" /></a> <a href="" target="_blank" class="gn_title">喀纳斯双飞12日</a> <em> <a href="" target="_blank">攻略</a> <a href="" target="_blank">地图</a> <a href="" target="_blank">参加</a> </em> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/left_tp2.jpg" /></a> <a href="" target="_blank" class="gn_title">海南岛六日游</a> <em> <a href="" target="_blank">攻略</a> <a href="" target="_blank">地图</a> <a href="" target="_blank">参加</a> </em> </span> <span> <a href="" target="_blank"><img src="__PUBLIC__/new/images/left_tp3.jpg" /></a> <a href="" target="_blank" class="gn_title">北海涠洲岛四日游</a> <em> <a href="" target="_blank">攻略</a> <a href="" target="_blank">地图</a> <a href="" target="_blank">参加</a> </em> </span> </li> </ul> <!--国内目的地推荐 end--> <div class="clear"></div> <!--出境目的地推荐 start--> <ul> <li class="fn_title">出境目的地推荐</li> <li class="ys3"> <span class="cj_top"> <a href="" target="_blank" class="bg_blue">亚洲</a> <a href="" target="_blank" class="bg_green">欧洲</a> <a href="" target="_blank" class="bg_zs">北美</a> <a href="" target="_blank" class="bg_zh">南美</a> <a href="" target="_blank" class="bg_hz">非洲</a> </span> <span> <a href="" target="_blank">新加坡</a> <a href="" target="_blank">尼泊尔</a> <a href="" target="_blank">印度</a> <a href="" target="_blank">日本</a> <a href="" target="_blank">韩国</a> <a href="" target="_blank">泰国</a> </span> </li> </ul> <!--出境目的地推荐 end--> <!--热门攻略目的地 start--> <ul> <li class="fn_title">热门攻略目的地</li> <li class="ys4"> <volist name="blog_dest_list" id="vo"> <a href="__UCHOME__/space.php?do=blog&view=all&dest=<{$vo.id}>" target="_blank"><{$vo.name}></a> </volist> </li> </ul> <!--热门攻略目的地 end--> </div> </div> <!--main_left end--> <!--main_right start--> <div class="main_right"> <div class="tagcontent"> <!--tag start--> <div class="tag"> <li class="tag_hover"><a href="">客&nbsp;&nbsp;&nbsp;&nbsp;栈</a></li> <li><a href="">当季最热</a></li> <li><a href="">附近转转</a></li> <li><a href="">国内走走</a></li> <li><a href="">出境看看</a></li> </div> <!--tag end--> <!--content start--> <div class="content"> <!--客栈内容 start--> <div class="con1"> <volist name="innList" id="vo"> <ul> <li class="right_tp"> <a href="" target="_blank"><img src="<{$vo.pic1}>" width='222' height='166' onerror="this.onerror=null;this.src='__PUBLIC__/new/kz/images/kz_rm.jpg'" /></a> </li> <li class="right_nr"> <p> <span><a href="__KZURL__/hotel/view-id-<{$vo.id}>" target="_blank" class="mc_title"><{$vo.name}></a></span> <span class="dp"><a href="__KZURL__/hotel/view-id-<{$vo.id}>#score" target="_blank">点评</a></span> </p> <p> <span> <em class="hp">好评度:</em> <em class="hp_x"><em style='width:<{$vo["reviews_score"] * 13 / 20}>px;' title='综合评分:<{$vo["reviews_score"]}>%'></em></em> </span> <span class="pl"> <em class="hp">评论:</em> <em class="pl_ts"><{$vo.reviews_count}>条</em> </span> </p> <p> <span class="js"> <{$vo.shortintro}> </span> <span class="qkk"> <em class="cz">超值价</em> <em class="cz_j"> <i class="font36"><{$vo.min_price|intval}></i> <i>¥</i> </em> <em> <a href="__KZURL__/hotel/view-id-<{$vo.id}>" target="_blank" class="kk">去看看</a> </em> </span> </p> </li> </ul> </volist> </div> <!--客栈内容 end--> <!--当季最热内容 start--> <div class="con2 next"><{$indextour.hot}></div> <!--当季最热内容 end--> <!--附近转转内容 start--> <div class="con3 next"><{$indextour.zhoubian}></div> <!--附近转转内容 end--> <!--国内走走内容 start--> <div class="con4 next"><{$indextour.guonei}></div> <!--国内走走内容 end--> <!--出境看看内容 start--> <div class="con5 next"><{$indextour.chujing}></div> <!--出境看看内容 end--> </div> <!--content end--> </div> </div> <!--main_right end--> </div> <!--main end--> <div class="clear"></div> <script type="text/javascript"> (function($){ $(function(){ $("div.tag").tabs("div.content > div", {tabs: 'li',current:'tag_hover'}); }) })(jQuery) </script> <include file="Public:footer" />
10npsite
trunk/Index/Tpl/Home/default/index/index.htm
HTML
asf20
7,945
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> </head> <body> <volist name="rs" id="n"> <div><{$n.news0}></div> </volist> <div> <{$show}> </div> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/news/getlist.htm
HTML
asf20
408
<div class="left_nav"> <div class="left_nav_title"> <li><img src="/images/left_nav_title.jpg" /></li> </div> <div class="left_nav_content"> <ul> <li class="left_nav_bt">按行程日期</li> <li class="left_nav_nr"> <p> <span><a href="/tour/tourlist-tianshu-1">一日游</a></span> <span class="left_jl"><a href="/tour/tourlist-tianshu-2">二日游</a></span> </p> <p> <span><a href="/tour/tourlist-tianshu-3">三日游</a></span> <span class="left_jl"><a href="/tour/tourlist-tianshu-4">四日游</a></span> </p> <p> <span><a href="/tour/tourlist-tianshu-5">五日游</a></span> <span class="left_jl"><a href="/tour/tourlist-tianshu-d5">六日以上</a></span> </p> </li> </ul> <volist name="rs" id="vo"> <ul> <li class="left_nav_bt"><{$vo.classsys1}></li> <li class="left_nav_nr"> <volist name="vo['lei']" id="vo2" mod="2"> <eq name="mod" value="0"><p></eq> <span <eq name="mod" value="1"> class="left_jl"</eq> ><a href="/tour/tourlist-tslb-<{$vo.classsys0}>-lbid-<{$vo2.classsys0}>"><{$vo2.classsys1}></a></span> <eq name="mod" value="1"></p></eq> </volist> </li> </ul> </volist> <ul> <li class="left_nav_bt">国内旅游</li> <li class="left_nav_nr"> <volist name="rsguolei" id="vo"> <eq name="mod" value="0"><p></eq> <span <eq name="mod" value="1"> class="left_jl"</eq> ><a href="/tour/tourlist-mdd-<{$vo.classsys0}>"><{$vo.classsys1}></a></span> <eq name="mod" value="1"></p></eq> </volist> </li> </ul> <ul> <li class="left_nav_bt">出境旅游</li> <li class="left_nav_nr"> <volist name="rsabroad" id="vo"> <eq name="mod" value="0"><p></eq> <span <eq name="mod" value="1"> class="left_jl"</eq> ><a href="/tour/tourlist-mdd-<{$vo.classsys0}>"><{$vo.classsys1}></a></span> <eq name="mod" value="1"></p></eq> </volist> </li> </ul> <ul> <li class="left_nav_bt">旅游服务</li> <li class="left_nav_nr_noborder"> <p> <span>酒店</span> <span class="left_jl"><a href="http://mp.dreams-travel.com">门票</a></span> </p> <p> <span>签证</span> <span class="left_jl">攻略</span> </p> <p> <span>游记</span> <span class="left_jl">旅游纪念册</span> </p> </li> </ul> </div> <div class="left_tp"> <li><a href="" target="_blank"><img src="/images/left_tp_1.jpg" alt="旅游" /></a></li> <li><a href="" target="_blank"><img src="/images/left_tp_2.jpg" alt="旅游" /></a></li> </div> </div> <!--left_nav end-->
10npsite
trunk/Index/Tpl/Home/default/classsys/getteshe.htm
HTML
asf20
4,630
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>国内游,国内旅游 <{$Think.SYS_SITENAME}></title> <meta name="keywords" content="旅游,旅游网,周边游,国内旅游,特价旅游,出境旅游,特价酒店,旅游度假,四川,成都,重庆"> <meta name="description" content="梦之旅(mzl5.com)是中国最简单,最快捷,最方便,性价比最高,旅游资讯最全的经济型旅游网!提供'一站式服务'自助游,周边旅游,国内旅游,出境旅游及酒店预定,实现你的旅游梦想,来自北京,上海,广州,杭州,西藏的游客" /> <link href="__PUBLIC__/css/ds_sy.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/right.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/left.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <script type="text/javascript"> function g(o){return document.getElementById(o);} function HoverLi(m,n,counter) { for(var i=1;i<=counter;i++) { g('tb_'+m+i).className='';g('tbc_'+m+i).className='undis'; } g('tbc_'+m+n).className='dis';g('tb_'+m+n).className='on'; } </script> </head> <body> <!--top start--> <center> <{$tophtml}> <include file="public:topchufaindex" /> <!--top end--> </center> <div id="w1000"> <div class="center"> <div class="warp"> <div class="news"> <ul> <li class="on" id="tb_11" onclick="HoverLi(1,1,6);"><span>最火热</span></li> <li class="" id="tb_12" onclick="HoverLi(1,2,6);"><span>搜线路</span></li> <li class="" id="tb_13" onclick="HoverLi(1,3,6);"><span>搜酒店</span></li> <li class="" id="tb_14" onclick="HoverLi(1,4,6);"><span>搜攻略</span></li> <li class="" id="tb_15" onclick="HoverLi(1,5,6);"><span>搜小组</span></li> <li class="" id="tb_16" onclick="HoverLi(1,6,6);"><span>找人</span></li> </ul> </div> <div class="dis" id="tbc_11"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_12"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_13"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_14"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_15"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> <div class="undis" id="tbc_16"> <div class="main"> <li class="gray"> <span class="main_bt">当季</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span><a href="" target="_blank">黄龙 </a></span> <span class="right_jj"> ></span> </li> <li class="yellow"> <span class="main_bt">国内</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">出境</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">活动</span> <span><a href="" target="_blank">九寨沟</a></span> <span><a href="" target="_blank">峨眉山</a></span> <span><a href="" target="_blank">乐山</a></span> <span class="right_jj"> ></span> </li> <li class="gray"> <span class="main_bt">社区</span> <span><a href="" target="_blank">最想入住的酒店</a></span> <span><a href="" target="_blank">最想旅游地</a></span> <span>></span> </li> <li class="gray"> <span class="main_bt">酒店</span> <span><a href="" target="_blank">青年旅馆</a></span> <span><a href="" target="_blank">客栈重庆</a></span> <span><a href="" target="_blank">成都</a></span> <span class="right_jj"> ></span> </li> </div> </div> </div> <!--left xx--> <div class="banner"> <div id="adpic" class="pic_442x130"> <a href="" target="_blank"><img src="/images/banner.jpg" alt="旅行" /></a> <a href="" target="_blank"><img src="http://pw.dreams-travel.com/newIndex/images/picTab/youhuiAD.gif" width="506" height="240" alt="旅行" /></a> <a href="" target="_blank"><img src="/images/banner.jpg" alt="旅行" /></a> <a href="" target="_blank"><img src="http://pw.dreams-travel.com/newIndex/images/picTab/youhuiAD.gif" width="506" height="240" alt="旅行" /></a> <a href="" target="_blank"><img src="/images/banner.jpg" alt="旅行"/></a> </div> <ul id="adpicBtn" class="pic_numlist"></ul> </div> <!--banner end--> <div class="tp_right"> <li><a href="" target="_blank"><img src="/images/right_tp.jpg" alt="酬宾之旅" /></a></li> <li style="margin-top:7px;"><a href="" target="_blank"><img src="/images/tp_right_2.jpg" alt="国外热旅" /></a></li> </div> </div> <!--tp_right end--> <!--center end--> <div class="sk"> <ul> <li class="sq"> <p><img src="/images/sq.jpg" alt="省钱" height="104" /></p> <p class="zw"> <span>不开设门市,省去高房租,真正让利于消费者</span> <span class="top_jg">累计约为旅行者节省:</span> <span class="yellow">3500,00,00</span><span class="top_jg">万元</span> </p> </li> <li class="kp"> <p><img src="/images/kp.jpg" alt="靠谱" height="104" /></p> <p class="zw"> <span>精选旅行线路,靠谱的全程服务。</span> <span>众多旅行者的亲身历程写下旅行攻略可供参阅</span> <span class="top_jg">今日新增</span> <span class="top_jg yellow">18</span><span class="top_jg">条旅行线路</span> </p> </li> <li class="bfb"> <p><img src="/images/bfb.jpg" alt="百分百" height="104" /></p> <p class="zw"> <span>100%的真实点评,全部来源于旅行者的亲身体会。</span> <span>100%完全公开点评。</span> <span class="top_jg">当前好评率:</span> <span class="top_jg yellow">99%</span> </p> </li> <li class="tm"> <p><img src="/images/tm.jpg" alt="他们" height="104" /></p> <p class="zw"> <span>100%的真实点评,全部来源于旅行者的亲身体会。</span> <span>100%完全公开点评。</span> <span class="top_jg">当前好评率:</span> <span class="top_jg yellow">99%</span> </p> </li> </ul> </div> <!--sk end--> <div class="content"> <{$cladhtm}><!--栏目导航--> <div class="middle"> <div id="con"> <ul id="tags"> <li class="selectTag" id="tourlist_hot" ><a style="cursor:pointer;"><span>当季热门推荐</span></a> </li> <li id="tourlist_most"><a style="cursor:pointer;"><span>最多人想去</span></a> </li> <li id="tourlist_paixang"><a style="cursor:pointer;"><span>本周排行榜</span></a> </li> <li><a style="cursor:pointer;"><span>圆梦之旅专辑</span></a> </li> </ul> <div class="fn"> <!-----------------------------------小标题--> <div class="ss" id="httourlist_hot"> <ul> <li><a id="htourlist_hot_zhoubian" class="onclick" style="margin-left:5px;"><span>城市周边</span></a></li> <li><a id="htourlist_hot_guolei"><span>国内旅游</span></a></li> <li><a id="htourlist_hot_chujing"><span>出境旅游</span></a></li> </ul> </div> <div class="ss" id="mttourlist_most" style="display:none"> <ul> <li><a id="mtourlist_most_zhoubian" class="onclick" style="margin-left:5px;"><span>城市周边</span></a></li> <li><a id="mtourlist_most_guolei"><span>国内旅游</span></a></li> <li><a id="mtourlist_most_chujing"><span>出境旅游</span></a></li> </ul> </div> <div class="ss" id="pttourlist_paixang" style="display:none"> <ul> <li ><a id="ptourlist_paixang_zhoubian" class="onclick" style="margin-left:5px;"><span>城市周边</span></a></li> <li ><a id="ptourlist_paixang_guolei"><span>国内旅游</span></a></li> <li ><a id="ptourlist_paixang_chujing"><span>出境旅游</span></a></li> </ul> </div> </div> <div id="tagContent"> <div class="tagContent selectTag" id="contenttourlist_hot"> <div id="c_htourlist_hot_zhoubian_c" class="tagContent0 selectTag0"> <volist name="hottour_zhoubian" id="vo"> <ul><li> <a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img width="79" height="46" src="<{$vo.tour6}>" alt="<{$vo.tour1}>" /></a> </li> <li class="w357"> <p> <span class="green"> <a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><{$vo.tour1}></a></span> <span class="red">¥起价<{$vo.tour8}>元</span> </p> <p class="font12"> <span><a href="" target="_blank"><{$vo.pinglunnum}>条评论</a></span><span>|</span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=blog" target="_blank">去看游记</a></span><span>|</span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=blog" target="_blank">去读攻略</a></span><span>|</span> <span><a><{$vo.tour51}>人想去</a></span> </p> </li> <li class="hy"><a href="/tour/view-id-<{$vo.tour0}>" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> </volist> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> <div id="c_htourlist_hot_guolei_c" class="tagContent0 selectTag0" style="display:none"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线热门国内</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> <div id="c_htourlist_hot_chujing_c" class="tagContent0 selectTag0" style="display:none"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线热门出境</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> </div> <div class="tagContent" id="contenttourlist_most" style="display:none"> <div id="c_mtourlist_most_zhoubian_c" class="tagContent0 selectTag0"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线人气周边</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> <div id="c_mtourlist_most_guolei_c" class="tagContent0 selectTag0" style="display:none"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线人气国内</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> <div id="c_mtourlist_most_chujing_c" class="tagContent0 selectTag0" style="display:none"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线人气出境</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> </div> <div class="tagContent" id="contenttourlist_paixang" style="display:none"> <div id="c_ptourlist_paixang_zhoubian_c" class="tagContent0 selectTag0"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线周边排行</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> <div id="c_ptourlist_paixang_guolei_c" class="tagContent0 selectTag0" style="display:none"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线排行国内</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> <div id="c_ptourlist_paixang_chujing_c" class="tagContent0 selectTag0" style="display:none"> <ul> <li> <a href="" target="_blank"><img src="/images/nr_tp.jpg" alt="川藏滇藏线" /></a> </li> <li class="w357"> <p> <span class="green">[端午行]川藏滇藏线排行出境</span> <span class="red">¥起价500元</span> </p> <p class="font12"> <span><a href="" target="_blank">55条评论</a></span><span>|</span> <span><a href="" target="_blank">88条游记</a></span><span>|</span> <span><a href="" target="_blank">3本攻略</a></span><span>|</span> <span><a href="" target="_blank">599人想去</a></span> </p> </li> <li class="hy"><a href="" target="_blank"><img src="/images/nr_qkk.jpg" alt="去看看" /></a></li> </ul> <ul class="center_bottom"> <li> <span><a onclick="showid('smallLay');">更多城市周边游精品线路</a></span> <span><img src="/images/center_sj.jpg" /></span> </li> </ul> </div> </div> </div> </div> </div> <!--middle end--> <div class="right"> <div class="fl"> <ul class="right_title"> <li class="left_title">本周旅游福利</li> <li class="jf"><a href="" target="_blank">如何赚取积分?</a></li> </ul> <ul class="fl_nr"> <li><a href="" target="_blank"><img src="__PUBLIC__/images/right_tp1.jpg" alt="日本樱花" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/right_tp_2.jpg" alt="日本樱花" /></a></li> </ul> </div> <div class="mxt"> <ul class="right_title"> <li class="left_title"><span>梦想团</span></li> <li class="jf"><a href="" target="_blank">什么是梦想团?</a></li> </ul> <ul class="fl_nr"> <li class="jrmx"> <span class="yellow bold">今日梦想团:</span> <span class="green bold">北京北海一日游</span> </li> <li class="mxt_nr"> <p> <span><a href="" target="_blank"><img src="__PUBLIC__/images/mxt_tp.jpg" alt="梦想团" height="90" width="151" /></a></span> </p> <p class="mxt_nr_right"> <span>原价:500元</span> <span>现价:150元</span> <span>折扣:2折</span> <span><a href="" target="_blank"><img src="__PUBLIC__/images/mxt_button.jpg" alt="立即团" /></a></span> </p> </li> </ul> </div> <div class="drxl"> <ul class="right_title"> <li class="left_title">达人线路</li> <li class="jf"><a href="" target="_blank">达人成长轨迹…</a></li> </ul> <ul class="fl_nr"> <li> <span><img src="__PUBLIC__/images/drxl_tp_1.jpg" /></span> <span><a href="" target="_blank">名册大川达人必去线路</a></span> </li> <li> <span><img src="__PUBLIC__/images/drxl_tp_2.jpg" /></span> <span><a href="" target="_blank">欧洲旅行达人必去线路</a></span> </li> </ul> </div> <div class="phb"> <ul class="right_title"> <li class="left_title">达人排行榜</li> <li class="jf"><a href="" target="_blank">如何成为旅游达人?</a></li> </ul> <ul class="fl_nr"> <li> <script src="__UCHOME__/js.php?id=2"></script> </li> </ul> </div> <div class="yjgl"> <ul class="right_title"> <li class="left_title">游记攻略</li> <li class="jf"><a href="__UCHOME__/cp.php?ac=blog" target="_blank">写游记</a></li> </ul> <ul class="fl_nr"> <volist name="youji" id="vo"> <if condition="$i eq 1"> <li class="yjgl_nr"> <p> <span><a href="__UCHOME__/space.php?uid=<{$vo.uid}>&do=blog&id=<{$vo.blogid}>" target="_blank"> <img height="70" width="110" src="<{$vo.message|getstrtopic}>" alt="<{$vo.subject}>"></a></span> </p> <p class="yjgl_nr_right"> <span><a href="__UCHOME__/space.php?uid=<{$vo.uid}>&do=blog&id=<{$vo.blogid}>" target="_blank" class="red bold"><{$vo.subject}></a></span> <span class="yj_ly"> <{$vo.uid|getUsertouxiang=###,"small",20,20,'$vo.username'}> <a href="" target="_blank" class="gray font12"><{$vo.username}>&nbsp;撰写</a> </span> <span> <a href="__UCHOME__/space.php?uid=<{$vo.uid}>&do=blog&id=<{$vo.blogid}>" target="_blank" class="black"><{$vo.message|getDelHtml|my_substr=###,0,10}> </a> </span> </p> </li> <else /> <li class="yj_lb"> <span> <{$vo.uid|getUsertouxiang=###,"small",20,20,'$vo.username'}></span> <span><a href="__UCHOME__/space.php?uid=<{$vo.uid}>&do=blog&id=<{$vo.blogid}>" target="_blank"><{$vo.subject}></a></span> </li> </if> </volist> </ul> </div> </div> <!--right end--> </div> <!--nr end--> <!--center--> </div> <script language="javascript"> flag=0; thisurl=""; //读取cookie,获取uid uchome_uid=getCookie("uchome_uid"); //初始化显示计划线路条数 $("#fchastaus").html($("#chooseedlist_0_mchufa").html()); $(document).ready(function(){ //给顶部出发地列表绑定一个click $("a[id^='addchufalist_']").bind("click",function(){ //检查是否登陆,若没有就不能添加 uchome_auth=getCookie("uchome_auth"); if(!uchome_auth) { alert("请先登陆,再添加您的出发地"); return false; } //检查点击的这个选项在已经选了的里面有没有,若没有弹出选项,若有就退出 flag=0; thisurl=$(this).attr("url"); chtm=$(this).html(); aa=$("span[id$='_mchufa']").each(function(){ thtm=$(this).html(); chtm=chtm.replace(/\>[\s\S][^\<]+/); if(thtm==chtm) { alert("你已经选择了:"+thtm); flag=1; return false; } }); if(flag==1) return false; //如果上面的选项数目没有达到上限,就直接添加进去 if($("span[id$='_mchufa']").length<4) { //<li id="chooseedlist_1" class="nav_bg">从<span id="chooseedlist_1_mchufa">上海</span>出发+</li> nn=$("li[id^=chooseedlist]").length; nn=nn+1; chufaid=thisurl.match(/[\d]+$/); $("#dz").append("<li id=\"chooseedlist_"+nn+"\" class=\"nav_bg\"><a href=\""+thisurl+"\" id=\"chooseedlist_"+nn+"_mchufa_url\">从<span id=\"chooseedlist_"+nn+"_mchufa\">"+chtm+"</span>出发</a> <a id='delchufa_"+nn+"' turl='/public/delcoochechufa-uid-"+uchome_uid+"-chufaid-"+chufaid+"'>-</a></li>"); $("#fchastaus").html(chtm); $.ajax({ url: "/public/addcoochechufa-uid-"+uchome_uid+"-chufaid-"+chufaid, cache: false, success: function(html){} }); $.ajax({ url: "/public/countuserchooes-chufaid-"+chufaid, cache: false, success: function(html){ $("#fchastaus_num").html(html); } }); alert("添加出发地成功"); return false; } $("#tx").show(); $("#tx").height(150); $("#tx").css({"margintop":"100px"}); //获取当前点击选择的项 cv=$(this).html(); $("#clickchufava").html(cv); //填写充tx里要替换的选项 $("#clickedoptionchufa").empty();//每次先清空 $("#clickedoptionchufa").append("<option>请选择下面的城市</option>"); $("span[id$='_mchufa']").each(function(){ html=$(this).html(); $("#clickedoptionchufa").append("<option>"+html+"</option>"); }); }); //给替换的选项做一个变化动作 $("#clickedoptionchufa").bind("change",function(){ uc=$(this).val(); nn=0; $("span[id$='_mchufa']").each(function(){ tv=$(this).html(); if(tv==uc) { //换url id=$(this).attr("id"); id=id.replace("_mchufa","_mchufa_url"); //获取替换前的id oldchufaid=$("#"+id).attr("href"); oldchufaid=oldchufaid.match(/[\d]+$/); $(this).html($("#clickchufava").html());//选择后显示的字符串 $("#"+id).attr("href",thisurl); //获取出发地的id, chufaid=thisurl.match(/[\d]+$/); //更新减去的出发地的turl地址值 delid=id.replace(/[^\d]+/,""); $("#delchufa_"+delid).attr("turl","/public/delcoochechufa-uid-"+uchome_uid+"-chufaid-"+chufaid+""); $.ajax({ url: "/public/updatecoochechufa-uid-"+uchome_uid+"-chufaid-"+chufaid+"-oldchufaid-"+oldchufaid, cache: false, success: function(html){} }); $.ajax({ url: "/public/countuserchooes-chufaid-"+chufaid, cache: false, success: function(html){ $("#fchastaus_num").html(html); } }); $("#fchastaus").html(uc); nn=nn+1; $("#tx").hide(); } }); }); //给减去出发地绑定一个click事件 $("a[id^='delchufa_']").live("click",function(){ tourl=$(this).attr("turl"); id=$(this).attr("id"); $.ajax({ url: tourl, cache: false, success: function(html){ //删除这一栏 id=id.replace("delchufa_",""); $("#chooseedlist_"+id).remove(); } }); }); //关闭层 $("#close").bind("click",function(){ $("#tx").hide(); }); //给线路列表页面绑定事件处理功能 $("li[id^='tourlist']").bind("click",function(){ $("li[id^='tourlist']").removeClass(); $(this).addClass("selectTag"); id=$(this).attr("id"); $("div[id*='tourlist']").hide(); $("div[id$='"+id+"']").show(); $("div[id^='contenttourlist_']").hide(); $("#content"+id).show(); //每次切换默认显示周边小类 $("a[id*='"+id+"']").removeClass(); $("a[id$='"+id+"_zhoubian']").addClass("onclick");; //默认显示第一个线路列表 $("div[id$='"+id+"_zhoubian_c']").show(); }); $("a[id^='htourlist']").bind("click",function(){ $("a[id^='htourlist']").removeClass(); $(this).addClass("onclick"); //显示相关的线路列表 htourlist_hot_zhoubian c_htourlist_hot_zhoubian_c id=$(this).attr("id"); $("div[id^='c_']").hide(); $("div[id^='c_"+id+"']").show(); }); $("a[id^='mtourlist']").bind("click",function(){ $("a[id^='mtourlist']").removeClass(); $(this).addClass("onclick"); id=$(this).attr("id"); $("div[id^='c_']").hide(); $("div[id^='c_"+id+"']").show(); }); $("a[id^='ptourlist']").bind("click",function(){ $("a[id^='ptourlist']").removeClass(); $(this).addClass("onclick"); id=$(this).attr("id"); $("div[id^='c_']").hide(); $("div[id^='c_"+id+"']").show(); }); }); </script> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/domestic/index.htm
HTML
asf20
53,545
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>我的购物车列表 <{$Think.SYS_SITENAME}></title> <link href="__PUBLIC__/css/zflc.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <script src="__PUBLIC__/jsLibrary/cdate_py_z_q.js"></script> <script src="__PUBLIC__/jsLibrary/site/others.js" type="text/javascript" language="javascript"></script> <script src="__PUBLIC__/jsLibrary/clearbox/clearbox.js" type="text/javascript"></script> </head> <body> <center> <{$tophtml}> </center> <!--top end--> <!--content start--> <div class="content"> <div id="w1000"> <!--流程头部 start--> <div class="lc"> <ul><img src="__PUBLIC__/images/zf_gwc.jpg" /></ul> <ul class="lc_lb"> <li class="lb_bt">购物车列表</li> <li class="lc_tb"> <span class="num1"></span> <span class="num2_gray"></span> <span class="num3_gray"></span> <span class="num4_gray"></span> </li> </ul> </div> <!--流程头部end--> <!--操作提示 start--> <li> <div align="left" style="margin-top:10px;"> <table width="900" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="534" height="26"><strong>商品列表</strong>:</td> <td width="104" height="26"><strong>编辑</strong></td> <td width="62" height="26"><strong>移除</strong></td> </tr> <volist name="cart" id="vo"> <tr> <td height="26" colspan="3"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="18%" height="50" valign="top"><img height="105" width="160" src="__PUBLIC__<{$vo.propic}>" alt="<{$vo.proname}>"></td> <td width="58%" valign="top"><h2><a target="_blank" href="/tour/view-id-<{$vo.key|preg_replace="/[a-z]+/","",###}>"><span id="proname_tour<{$vo.proid}>"><{$vo.proname}></span></a></h2> <div id="showhtmlpro_tour<{$vo.proid}>"> <div style="height:25px; margin-top:10px;">成人数:<{$vo.chengren}> , 儿童数:<{$vo.et}></div> <div style="height:25px;">出发时间段:<{$vo.chufashijiand}></div> <if condition="$vo.chufatime neq ''"> <div style="height:25px;">出发日期:<{$vo.chufatime}></div></if> <if condition="$vo.chufatime neq ''"> <div style="height:25px;">房间数:<{$vo.roomnum}></div></if> <if condition="$vo.chufatime neq ''"> <div style="height:25px;">是否愿意拼房: <if condition="$vo.agreedanfangcha eq 1">是<else />否</if></div></if> <if condition="$vo.jihedidianl neq ''"> <div style="height:25px;">您选择的集合地点:<{$vo.jihedidianl}></div></if> <if condition="$vo.bixuanxiang neq ''"> <div style="height:25px;">您购买的必选项目:<{$vo.bixuanxiang|preg_replace=foramtzhengc("/##^[##d##.]+$/"),"",###}></div></if> <if condition="$vo.jiejifuwux neq ''"> <div style="height:25px;">您购买的接机服务项目:<{$vo.jiejifuwux|preg_replace=foramtzhengc("/##^[##d##.]+$/"),"",###}></div></if> <if condition="$vo.zixuanxiangmu neq ''"> <div style="height:25px;">您购买的自选项目: <php> foreach($vo['zixuanxiangmu'] as $k=>$v){ echo preg_replace(foramtzhengc("/##^[##d##.]+$/"),"",$v)." "; } </php> </div></if> <if condition="$vo.biaoxian neq ''"> <div style="height:25px;">您购买的保险项目: <php> foreach($vo['biaoxian'] as $k=>$v){ echo preg_replace(foramtzhengc("/##^[##d##.]+$/"),"",$v)." "; } </php> </div></if> </div> <!-- style="display:none"--> <div style="display:none" id="edithtmlpro_tour<{$vo.proid}>"> <form action="" name="formcart_tour<{$vo.proid}>" id="formcart_tour<{$vo.proid}>"> <div style="height:25px; margin-top:10px;">成人数: <select name="chengren_tour<{$vo.proid}>" id="chengren_tour<{$vo.proid}>"> <for start="1" end="$vo.maxchengrennum" comparison="ELT" name="ki"> <option value="<{$ki}>" <if condition="$ki eq $vo['chengren']">selected="selected"</if> ><{$ki}></option> </for> </select> , 儿童数: <select id="et_tour<{$vo.proid}>" name="et_tour<{$vo.proid}>"> <for start="0" end="20" comparison="ELT" name="ki"> <option value="<{$ki}>" <if condition="$ki eq $vo['et']">selected="selected"</if> ><{$ki}></option> </for> </select> </div> <div style="height:25px;">出发时间段: <select name="cooisepriceid_tour<{$vo.proid}>" id="cooisepriceid_tour<{$vo.proid}>"> <option value="">请选择时间段</option> <Article:article sql='select * from ".DQ."price as a left join ".DQ."classsys as b on a.price5=b.classsys0 where a.price7=".$vo["proid"]."'> <php> $temp="sjd=".date("Y-m-d",$article["price15"])."->".date("Y-m-d",$article["price16"])."&tqts=".$article["price13"]; if($article["price5"]==1216) $temp.="&indate=".$article["price6"]; if($article["price5"]==1215) $temp.="&zhouqi=".str_replace("周","",getTurnDtoXnum($article["price6"])); $syscookie["cart"]["tour".$vo["proid"]]["cfssdform"][$article["price0"]]=$temp; </php> <option <php> if($article["price0"] ==$vo["cooisepriceid"]){ echo "selected='selected'"; $chufacho=$syscookie["cart"]["tour".$vo["proid"]]["cfssdform"][$article["price0"]]; $etprice= $article["price10"]; $chengrenprice=$article["price8"]; $danfangcha=$article["price17"]; } </php> value="<{$article.price0}>"><{$article.price15|date="Y-m-d",###}>至<{$article.price16|date="Y-m-d",###}> <{$article.price1}> 成人¥<{$article.price8}>/人,儿童¥<{$article.price10}>/人,单房差¥<{$article.price17}></option> </Article:article> </select> <php>setmycookies("syscookie",serialize($syscookie));</php> </div> <br> <div style="width:100%">请选择出发时间:<input type="text" name="chufatime_tour<{$vo.proid}>" id="chufatime_tour<{$vo.proid}>" onClick="javascript:cdate_show('chufatime_tour<{$vo.proid}>','<{$chufacho}>');" readonly="readonly" value="<{$vo.chufatime}>"></div> <div>房间数: <span id="selectfangjianshu_tour<{$vo.proid}>"><select name="roomnum_tour<{$vo.proid}>" id="roomnum_tour<{$vo.proid}>"> <php> $startnum=$vo['chengren'] % 2; $startnum=($startnum==1)?($vo['chengren']+1)/2:$vo['chengren']/2; for($i=$startnum;$i<=$vo['chengren'];$i++){ $temp2=""; if($vo['roomnum']==$i) $temp2="selected"; echo "<option value='".$i."' ".$temp2.">".$i."</option>"; } </php> </select> 请注意:儿童不可以单独占房 </span> <span id="danfangchasuoming_tour<{$vo.proid}>"> 由于您是单人数报名,您的住宿有可能产生单房差,但您可选择愿意拼房(打勾,不用付单房差);您也可选择不愿意拼房(不打勾,需要付单房差) <br> 请选择<input <php> if($syscookie["cart"][$vo["proid"]]["agreedanfangcha"]=="1" or !$syscookie["cart"][$vo["proid"]]["agreedanfangcha"]) echo "checked='checked'"; </php> name="agreedanfangcha_tour<{$vo.proid}>" id="agreedanfangcha_tour<{$vo.proid}>" type="checkbox" value="1" /><a href="/onepage/show-mid-583-did-6" rel="clearbox[width=400,height=200]">什么是单房差</a> </span> </div> <br> <div style="width:100%; height:100%"> <Article:article sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=560 order by info4 desc'> <if condition="$key eq 0"> <strong>必选项目</strong>(行程里的必选项目):<br /></if> <div style="height:25px;"><input name="bixuanxiang_tour<{$vo.proid}>" <if condition="$vo['bixuanxiang'] eq $article['info1'].'^'. $article['info8']"> checked </if> id="bixuanxiang_tour<{$vo.proid}>" type="radio" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}> 单价: <{$article.info8}>元</div> </Article:article> </div> <div style="width:100%; height:100%"> <Article:article sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=559 order by info4 desc'> <if condition="$key eq 0"> <strong>自选项目</strong>(行程里的自选项目,你可以选择多个或不选):<br /></if> <div style="height:25px;"><input name="zixuanxiangmu_tour<{$vo.proid}>[]" <php> foreach($vo['zixuanxiangmu'] as $zxv){ if(strstr($zxv,$article['info1']."^".$article['info7'])) echo "checked='checked'"; } </php> id="zixuanxiangmu_tour<{$vo.proid}>[]" type="checkbox" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}>(<{$article.info8}>元)</div> </Article:article> </div> <div style="width:100%;height:100%"> <Article:article sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=558 order by info4 desc'> <if condition="$key eq 0"><strong>接机项目</strong>(我们提供非常舒适的接机服务,专业的司机,非常地热情):<br /></if> <div style="height:25px;"><input name="jiejifuwux_tour<{$vo.proid}>" <if condition="$vo['jiejifuwux'] eq $article['info1'].'^'. $article['info8']"> checked </if> id="jiejifuwux_tour<{$vo.proid}>" type="radio" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}>(<{$article.info9}>) 单价: <{$article.info8}>元</div> </Article:article> </div> <div style="width:100%;height:100%"> <Article:article sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=557 order by info4 desc'> <if condition="$key eq 0"><strong>保险项目</strong>(请根据你的具体情况来购买保险):<br /></if> <div style="height:25px;"><input name="biaoxian_tour<{$vo.proid}>[]" id="biaoxian_tour<{$vo.proid}>[]" <php> foreach($vo['biaoxian'] as $zxv){ if(strstr($zxv,$article['info1']."^".$article['info8'])) echo "checked='checked'"; } </php> type="checkbox" value="<{$article.info1}>^<{$article.info8}>" /> <{$article.info1}>,<{$article.info8}>元/人 (每人购买一份)</div> </Article:article> </div> <div style="width:100%;height:100%"> <Article:article sql='select * from ".DQ."info where info2=".$vo["proid"]." and info3=550 order by info4 desc'> <if condition="$key eq 0"><strong>集合地点</strong>(为了你的方便出行,我们特设了几个集合地点,你可以根据你的位置选择一个你方便的地点):<br /></if> <div style="height:25px;"><input name="jihedidianl_tour<{$vo.proid}>" <if condition="$vo['jihedidianl'] eq $article['info1'].','.$article['info7']"> checked </if> id="jihedidianl_tour<{$vo.proid}>" type="radio" value="<{$article.info1}>,<{$article.info7}>" /> <{$article.info1}>,<{$article.info7}></div> </Article:article> </div> <div> <br> <input type="submit" name="btnsave_tour<{$vo.proid}>" id="btnsave_tour<{$vo.proid}>" value="保存"> <input type="button" name="btnsaveqx_tour<{$vo.proid}>" id="btnsaveqx_tour<{$vo.proid}>" value="取消"> </div> <div> 价格:¥<span id="xprice_tour<{$vo.proid}>">0</span> <span id="suominprice_tour<{$vo.proid}>"></span> </div> <input type="hidden" name="protypeflag" id="protypeflag" value="tour<{$vo.proid}>"> <input type="hidden" name="chufashijiand_tour<{$vo.proid}>" id="chufashijiand_tour<{$vo.proid}>" value="<{$vo.chufashijiand}>"> <input type="hidden" name="maxchengrennum_tour<{$vo.proid}>" id="maxchengrennum_tour<{$vo.proid}>" value="<{$vo.maxchengrennum}>"> <input type="hidden" name="chengrenprice_tour<{$vo.proid}>" id="chengrenprice_tour<{$vo.proid}>" value="<{$chengrenprice}>"> <input type="hidden" name="etprice_tour<{$vo.proid}>" id="etprice_tour<{$vo.proid}>" value="<{$etprice}>"> <input type="hidden" name="danfangcha_tour<{$vo.proid}>" id="danfangcha_tour<{$vo.proid}>" value="<{$danfangcha}>"> <input type="hidden" name="proprice_tour<{$vo.proid}>" id="proprice_tour<{$vo.proid}>" value="0"> <input type="hidden" name="priceshuoming_tour<{$vo.proid}>" id="priceshuoming_tour<{$vo.proid}>" value="<{$vo.priceshuoming}>"> </form> </div> </td> <td width="24%" valign="top"><div><input type="button" name="editpro_tour<{$vo.proid}>" id="editpro_tour<{$vo.proid}>" value="编辑"> <input type="button" name="delacrtpro_tour<{$vo.proid}>" id="delacrtpro_tour<{$vo.proid}>" value="移除"></div></td> </tr> </table> </td> </tr> <tr><td height="30" colspan="3"><hr size="1" width="97%" align="center"></td></tr> </volist> </table> <div id="ddd" style="height:30px;">总价:¥<span id="totalprice">0</span>元</div> <img src="__PUBLIC__/images/next.gif" id="gotonext" style="cursor:pointer"> </div> </li> <div class="czts"> </div> <!--操作提示end--> </div> </div> <script language="javascript"> $(document).ready(function(){ $("input[id^='editpro']").bind("click",function(){ id=$(this).attr("id"); }); $("select[id^='cooisepriceid_']").bind("change",function(){ id=$(this).attr("id"); id=id.replace("cooisepriceid_",""); temp=$(this).val(); $.ajax({ url: "/base/ajaxgetcookie-c1-cart-c2-"+id+"-c3-cfssdform-c4-"+temp, cache: false, success: function(html){ $("#chufatime_"+id).attr("onclick","javascript:cdate_show('chufatime_"+id+"','"+html+"');"); } }); $("#chufashijiand_"+id).val($(this).find("option:selected").text()); $("#chufatime_"+id).val("");//每次重新选择日期的时候把出发时候值清空 cdate_hide(); }); //绑定购物车的编辑显示编辑选项功能 $("input[id^='editpro_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("editpro_",""); $("#showhtmlpro_"+id).hide(); $("#edithtmlpro_"+id).show("slow"); $("#formcart_tour").attr("action","/pay/editcart"); }); //为每个编辑时取消编辑绑定事件 $("input[id^='btnsaveqx_']").bind("click", function(){ id=$(this).attr("id"); id=id.replace("btnsaveqx_",""); $("#showhtmlpro_"+id).fadeIn("slow"); $("#edithtmlpro_"+id).hide(); }); //从购物车里删除一个商品的功能 $("input[id^='delacrtpro_']").bind("click", function(){ id=$(this).attr("id"); id=id.replace("delacrtpro_",""); if (confirm("真的要删除吗?")){ $("#formcart_"+id).attr("action","/pay/delcart"); $("#formcart_"+id).submit(); } }); //绑定修改单个商品的功能 $("input[id^='btnsave_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("btnsave_",""); //验证填写的值 t1=$("#chengren_"+id).val(); t2=$("#maxchengrennum_"+id).val(); if( parseInt(t1)>parseInt(t2) ){ alert("成人数最大不能超过"+t1+"个数"+t2); $("#maxchengrennum_"+id).focus(); return false; } chufatime=$("#chufatime_"+id).val(); if(!chufatime.match(/^[\d]{4}\-[\d]{2}\-[\d]{2}/)){ alert("出发时间不正确"); $("#chufatime_"+id).focus(); return false; } $("#formcart_"+id).attr("action","/pay/editcart"); $("#formcart_"+id).submit(); }); //当选择不同的成人数时,显示相应的可选的房间类型 $("select[id^='chengren_']").bind("change",function(){ id=$(this).attr("id"); id=id.replace("chengren_",""); chengren=parseInt($(this).val()); flag=chengren % 2; if(flag==1){ startnum=(chengren+1)/2; }else{ startnum=(chengren)/2; } $("#roomnum_"+id).empty(); for(i=startnum;i<=chengren;i++){ $("#roomnum_"+id).append("<option value='"+i+"'>"+i+"</option>"); } v=$(this).val(); if($("#agreedanfangcha_"+id).attr("checked")=="checked") { if(parseInt(v) % 2 ==1){ $("#selectfangjianshu_"+id).hide(); $("#danfangchasuoming_"+id).show(); } } if(parseInt(v) % 2 ==0){ $("#selectfangjianshu_"+id).show(); $("#danfangchasuoming_"+id).hide(); } //把儿童数设为0,让客人重新选择 $("#et_"+id).val(0); getxprice(id); }); //绑定是否同意单房价 $("input[id^='agreedanfangcha_']").bind("click",function(){ v=$(this).val(); id=$(this).attr("id"); id=id.replace("agreedanfangcha_",""); if($(this).attr("checked")!="checked"){ $("#selectfangjianshu_"+id).show(); $("#danfangchasuoming_"+id).hide(); } }); //当选择了不同的房间数时,更新价格 $("select[id^='roomnum_']").bind("change",function(){ id=$(this).attr("id"); id=id.replace("roomnum_",""); getxprice(id); }); //==================================组长定儿童人数选择,并更新价格 $("select[id^='et_']").bind("change",function(){ id=$(this).attr("id"); id=id.replace("et_",""); vet=$(this).val(); vcr=$("#chengren_"+id).val(); if(parseInt(vcr)*2<parseInt(vet)){ alert("你的团队最多带"+parseInt(vcr)*2); $(this).val(parseInt(vcr)*2); } getxprice(id); }); //============================================为下一步检查数据和合法性 $("#gotonext").bind("click",function(){ //检查成人数是否为空 window.cflag=true; $("select[id^='chengren_']").each(function(){ v=$(this).val(); if(v==""){ id=$(this).attr("id"); id=id.replace("chengren_",""); alert("【"+$("#proname_"+id).html()+"】的人数不能为空"); window.cflag=false; $("#editpro_"+id).click(); return false; } }); //检查是否选择了出发时间段 $("select[id^='cooisepriceid_']").each(function(){ v=$(this).val(); if(v==""){ id=$(this).attr("id"); id=id.replace("cooisepriceid_",""); alert("【"+$("#proname_"+id).html()+"】的出发时间段不能为空"); window.cflag=false; $("#editpro_"+id).click(); return false; } }); //检查是否选择了出发时间 $("input[id^='chufatime_']").each(function(){ v=$(this).val(); if(v==""){ id=$(this).attr("id"); id=id.replace("chufatime_",""); alert("【"+$("#proname_"+id).html()+"】的具体出发时间没有选择"); window.cflag=false; $("#editpro_"+id).click(); return false; } }); if(window.cflag==false){ return false; } else{ window.location.href="/pay/paytwo"; } }); //=================绑定一些点击事件 //必选项目 if($("input[id^='bixuanxiang_']").length>0){ $("input:radio[id^='bixuanxiang_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("bixuanxiang_",""); getxprice(id); }) } //自选项目 if($("input[id^='zixuanxiangmu_']").length>0){ $("input[id^='zixuanxiangmu_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("zixuanxiangmu_",""); id=id.replace("[]",""); getxprice(id); }) } //接机项目 if($("input[id^='jiejifuwux_']").length>0){ $("input[id^='jiejifuwux_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("jiejifuwux_",""); getxprice(id); }) } //保险项目 biaoxian if($("input[id^='biaoxian_']").length>0){ $("input[id^='biaoxian_']").bind("click",function(){ id=$(this).attr("id"); id=id.replace("biaoxian_",""); id=id.replace("[]",""); getxprice(id); }) } //初始化兑换积分信息 //=====================初始化页面 $("input[id^='editpro_']").each(function(){ id=$(this).attr("id"); id=id.replace("editpro_",""); getxprice(id); }); }); //计算每个商品的价格 function getxprice(id) { if(id!=""){ chengren=$("#chengren_"+id).val();//成人数 et=$("#et_"+id).val();//儿童数 roomnum=$("#roomnum_"+id).val();//房间数 chengrenprice=$("#chengrenprice_"+id).val();//成人价 erprice=$("#etprice_"+id).val();//儿童价 agreedanfangcha=$("#agreedanfangcha_"+id).attr("checked");//是否同意了单房差 danfangcha=$("#danfangcha_"+id).val();//单房差价 suominprice="成人"+chengren+"* "+chengrenprice+"元/人 + 儿童"+et+" * "+erprice+"元/人"; price=parseInt(chengren)*parseInt(chengrenprice)+parseInt(et)*parseInt(erprice); //当同意了拼房时,把单房差价加上去 if(agreedanfangcha!="checked"){ temp=(parseInt(roomnum)*2 -chengren) price=price+temp*parseInt(danfangcha); suominprice+="单房差"+temp+"个 * "+danfangcha+"元"; } //===========================计算附属项目价格 //计算必选项目价格 if($("#bixuanxiang_"+id).length>0){ $("input[id^='bixuanxiang_"+id+"']:checked").each(function(){ bixuanxiang=$(this).val(); bixuanxiang_price=bixuanxiang.match(/[\d\.]+$/); price=price+parseInt(bixuanxiang_price); suominprice+=" + "+bixuanxiang.replace("^"+bixuanxiang_price,"")+":"+bixuanxiang_price+"元"; }); } //计算自选项目价格 if($("input[id^='zixuanxiangmu_"+id+"']").length>0){ $("input[id^='zixuanxiangmu_"+id+"']:checked").each(function(){ temp=$(this).val(); temp_price=temp.match(/[\d\.]+$/); price=price+parseInt(temp_price);//更新总价 suominprice+=" + "+temp.replace("^"+temp_price,"")+":"+temp_price+"元";//更新价格提示 }); } //计算保险项目价格 if($("input[id^='biaoxian_"+id+"']").length>0){ $("input[id^='biaoxian_"+id+"']:checked").each(function(){ temp=$(this).val(); temp_price=temp.match(/[\d\.]+$/); T=(parseInt(chengren)+parseInt(et))*parseInt(temp_price) price=price+T;//更新总价 suominprice+=" + "+temp.replace("^"+temp_price,"")+"("+chengren+"+"+et+"):"+T+"元";//更新价格提示 }); } //接机服务项目价格 if($("#jiejifuwux_"+id).length>0){ $("input[id^='jiejifuwux_"+id+"']:checked").each(function(){ jiejifuwux=$(this).val(); jiejifuwux_price=jiejifuwux.match(/[\d\.]+$/); price=price+parseInt(jiejifuwux_price); suominprice+=" + "+jiejifuwux.replace("^"+jiejifuwux_price,"")+":"+jiejifuwux_price+"元"; }); } //更新价格的显示 $("#xprice_"+id).html(price) $("#proprice_"+id).val(price); $("#suominprice_"+id).html("价格详细:"+suominprice); $("#priceshuoming_"+id).val($("#suominprice_"+id).html()); } ////更新显示总价 $("#totalprice").html("0"); $("input[id^='proprice_']").each(function(){ vt=$("#totalprice").html(); v=$(this).val(); $("#totalprice").html(parseInt(vt)+parseInt(v)); }); } </script> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/pay/cart.htm
HTML
asf20
25,428
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>线路预定第一步 <{$Think.SYS_SITENAME}></title> <link href="__PUBLIC__/css/zflc.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <script src="__PUBLIC__/jsLibrary/cdate_py_z_q.js"></script> <script src="__PUBLIC__/js/others.js" type="text/javascript" language="javascript"></script> </head> <body> <center> <{$tophtml}> </center> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/pay/order.htm
HTML
asf20
746
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>生成订单 预定流程 <{$Think.SYS_SITENAME}></title> <meta name="keywords" content="旅游,旅游网,周边游,国内旅游,特价旅游,出境旅游,特价酒店,旅游度假,四川,成都,重庆"> <meta name="description" content="梦之旅(mzl5.com)是中国最简单,最快捷,最方便,性价比最高,旅游资讯最全的经济型旅游网!提供'一站式服务'自助游,周边旅游,国内旅游,出境旅游及酒店预定,实现你的旅游梦想,来自北京,上海,广州,杭州,西藏的游客" /> <link href="__PUBLIC__/css/ds_sy.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/right.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/left.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/otherall.css" type="text/css" rel="stylesheet" /> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquerytools/1.2.5/jquery.tools.min.js"></script> </head> <body> <center> <{$tophtml}> <include file="public:topchufaindex" /> <!--top end--> </center> <br> <div id="w1000" align="left"> <h1>订单生成</h1></strong><hr size="1" width="100%"><br> <volist name="showinfo" id="orderlist"> <div> <div style="height:35px">尊敬的<{$orderlist.usernamelx}>,您好,你的订单信息如下:</div> <div style="height:35px">订单号为<span style="color:#F00"><strong><{$orderlist.order}></strong></span>(<{$orderlist.proname}>),金额为:<{$orderlist.totalmoney}>元,出发时间:<{$orderlist.chufatime}>,需要在<{$orderlist.djzfqx|date="Y-m-d",###}>日前交纳定金¥<{$orderlist.dingjingnum}>元</div> </div> <br> </volist> </div> <div style="line-height:30px;" align="left"><strong>我要支付</strong></div> <div id="paytypehtml"><span id="paytype_alipay">支付宝支付</span> <span id="paytype_card">信用卡支付</span> <span id="paytype_zhuanzhang">转帐支付</span></div> <div id="payhtml"> <!-- 支付宝支付内容--> <span id="payhtml_alipay"><{$alipay_pay}></span> <!-- 信用卡支付内容--> <span id="payhtml_card" style="display:none;"><{$cardonlinepayrmb}></span> <!-- 转帐页面内容--> <span id="payhtml_zhuanzhang" style="display:none;"><include file="paytype:zhuangzhangrmb" /></span> </div> <script language="javascript"> $(document).ready(function(){ $("#paytypehtml").tabs("#payhtml > span"); }); </script> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/pay/paythree.htm
HTML
asf20
2,997
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <title>填写客人信息 预定流程 <{$Think.SYS_SITENAME}></title> <meta name="keywords" content="旅游,旅游网,周边游,国内旅游,特价旅游,出境旅游,特价酒店,旅游度假,四川,成都,重庆"> <meta name="description" content="梦之旅(mzl5.com)是中国最简单,最快捷,最方便,性价比最高,旅游资讯最全的经济型旅游网!提供'一站式服务'自助游,周边旅游,国内旅游,出境旅游及酒店预定,实现你的旅游梦想,来自北京,上海,广州,杭州,西藏的游客" /> <link href="__PUBLIC__/css/ds_sy.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/right.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/left.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/top.css" type="text/css" rel="stylesheet" /> <link href="__PUBLIC__/css/otherall.css" type="text/css" rel="stylesheet" /> </head> <body> <center> <{$tophtml}> <include file="public:topchufaindex" /> <!--top end--> </center> <br> <div id="w1000" align="left"> <div> <strong><h1>行程确认</h1></strong><hr size="1" width="100%"><br> <form action="/pay/paythree" method="post" name="formpaytwo" id="formpaytwo"> <volist name="syscookie['cart']" id="vo"> <div>预订产品信息</div> <div><a target="_blank" href="<{$vo.prourl}>"><strong><{$vo.proname}></strong></a></div> <br> <div>游客信息</div> <div > <for start="1" end="$vo['chengren'] + $vo['et']"> <div style="height:35px;"> 第<{$i}>位姓名:<input name="gukename_<{$key}>_<{$i}>" id="gukename_<{$key}>_<{$i}>" type="text" /> 联系方式:<input name="tel_<{$key}>_<{$i}>" id="tel_<{$key}>_<{$i}>" type="text" /> 性别:<select name="sex_<{$key}>_<{$i}>"> <option value="男">男</option> <option value="女">女</option> </select> </div> </for> </div> <hr size="1" width="100%"> <br> </volist> <div> 您的姓名:<input name="usernamelx" id="usernamelx" type="text" value="<{$Think.const.__USERNAME__}>" /> &nbsp;电子邮件:<input name="useremail" id="useremail" type="text" value="" /> </div> <div> <input name="mysubmit" id="mysubmit" type="button" value="结 帐" /> &nbsp; &nbsp; &nbsp;<input name="backgocart" id="backgocart" type="button" value="返回购物车" /> </div> </form> </div> </div> <script language="javascript"> $(document).ready(function(){ //提示用户是否登陆 logionflag="<{$Think.cookie.uchome_auth}>"; if(logionflag==""){ if(confirm("你是否要登陆?")){ $("#userlogin").click(); } } //返回购物车界面 $("#backgocart").bind("click",function(){ $("#formpaytwo").attr("action","/pay/cart"); $("#formpaytwo").submit(); }); //检查表单 $("#mysubmit").bind("click",function(){ window.cflag=true; $("input[id^='gukename_']").each(function(){ v=$(this).val(); if(v==""){ if(window.cflag==true){ alert("联系人姓名不能为空"); $(this).focus(); window.cflag=false; return false; } } }); $("input[id^='tel_']").each(function(){ v=$(this).val(); if(v==""){ if(window.cflag==true){ alert("联系方式不能为空"); $(this).focus(); window.cflag=false; return false; } } }); var usernamelx=$("#usernamelx").val(); if(usernamelx==""){ alert("用户名不能为空"); $("#usernamelx").focus(); return false; } useremail=$("#useremail").val(); if(!useremail.match(/^[\w\-\_\.]+@[\w\_\-]+\.[\w\-\_\.]+$/)){ alert("请输入正确的电子邮件"); $("#useremail").focus(); return false; } if(window.cflag==false){ return false; }else{ $("#formpaytwo").attr("action","/pay/paythree"); $("#formpaytwo").submit(); } }); }); </script> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/pay/paytwo.htm
HTML
asf20
4,637
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script language=javascript> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> <title>支付返回结果页面</title> </head> <body> <if condition="$isprint eq 'yes'"> <div style="margin-top:10px; margin-bottom:10px;" align="center"><input name="printdo2" id="printdo2" onclick="doPrint()" type="button" value="打 印" /></div> </if> <!--startprint--> <style type="text/css"> *{margin:0 auto;padding:0;} img{border:0;} ul,li{marign:0;padding:0;} body,td,th { font-size: 12px; } body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } tr .STY{ border-top: solid #D0D0D0; border-top-width: thin; } #main{width:600px;border:15px #6c6c6c solid;} #main .nei{width:568px;border:6px #b2b2b2 solid;padding-left:10px;padding-right:10px;} .nei h5{font-size:12px;border-bottom:1px #999999 dashed; text-align:left;font-weight:400;height:18px;margin-bottom:20px;} /*============================box'style=============================*/ .nei .logo{margin-top:10px;} .nei .box{width:470px;} .nei .box img{width:100px;height:58px;text-align:left;display:block;float:left;} .nei .box .bj{background:url(__PUBLIC__/images/zfbg1.gif) no-repeat top left;width:365px;height:95px;margin-left:0px;float:left;text-align:left;} .nei .box .bj2{width:365px;height:98px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj2 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj2 h3{width:352px;height:85px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} /*========================================bj3'style======================================*/ .nei .box .bj3{width:365px;height:160px;float:left;text-align:left;background:url(__PUBLIC__/images/zfbg1_06-10.gif) left bottom no-repeat;position:relative;} .nei .box .bj3 h4{background:url(__PUBLIC__/images/zfbg1_01.gif) top left no-repeat;width:100%;height:8px;margin:0;padding:0;} .nei .box .bj3 h3{width:352px;height:145px;border-left:#7ba0c2 2px solid;border-right:2px #7ba0c2 solid;float:left;position:absolute;top:8px;left:1px;} a:link,a:visited{color:#6633FF;text-decoration:none;} a:hover{color:#FF3366;text-decoration:underline;} </style> <div id="main" align="center"> <div class="nei" align="center"> <div align="center"><strong>您的支付确认书<br> </strong></div> <div style="line-height:40px; height:40px;"></div> <div align="left"> <p><strong><{$orderinfors.username}></strong>先生/小姐,您好!<br /> 欢迎预订梦之旅旅游产品, 您的支付已成功,下面是您的预订及支付信息,请您仔细阅读,若有疑问,随时咨询梦之旅客服人员! <br /> 我们将会在出发前二天以上发送出团通知书,请随时查询您的电子邮件,同时您也可进入您的订单,从订单中获取您的出团通知书.<br /> <strong>什么是出团通知书?<br /> </strong>出团通知书是我们的旅行团出发前发给客人的发团信息,主要内容包括客人出行所需要的预订信息,联系信息,紧急联系电话,集合地点等相关重要信息,也是最后的通知书,有时还包括一些注意事项,天气预报,安全须知等内容,客人务必仔细阅读并保存.<br /> <br> </p> </div> <h5> </h5> <div align="left"> <table border="0"> <tbody> <tr> <td valign="top" width="100"><img src="__PUBLIC__/images/tu2.jpg" /></td> <td width="361"><table border="0" cellspacing="0" cellpadding="0" width="361"> <tbody> <tr> <td height="12" colspan="3"><img src="__PUBLIC__/images/zfbg1_t.gif" /></td> </tr> <tr> <td background="__PUBLIC__/images/zfbg1_l.gif" width="7"></td> <td width="347"><table border="0" cellspacing="10" cellpadding="5" width="100%"> <tbody> <tr> <td width="21%" align="right"><strong>订单号:</strong></td> <td width="79%"><{$arr.orderno}></td> </tr> <tr> <td align="right"><strong>姓&nbsp; 名:</strong></td> <td><{$orderinfors.username}></td> </tr> </tbody> </table></td> <td background="__PUBLIC__/images/zfbg1_r.gif" width="7"> </td> </tr> <tr> <td height="10" colspan="3"><img src="__PUBLIC__/images/zfbg1_b.gif" /></td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <h5> </h5> <div align="left"> </div> <p> <br> *关于取消及更改预订,请参考相关 退款保障!<br> <strong>联系方式:</strong> <br> </p> </div> <div align="center"><br /> <a href="#" target="_blank"><span>梦之旅官方网站</span></a></div> </div> </div> <!--endprint--> <if condition="$isprint eq 'yes'"> <div style="margin-top:20px;" align="center"><input name="printdo" id="printdo" onclick="doPrint()" type="button" value="打 印" /></div> </if> </body> </html>
10npsite
trunk/Index/Tpl/Home/default/pay/showpaysuss.htm
HTML
asf20
6,082
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="copyright" content=""> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>发表评论</title> <style type="text/css"> body{ font-size:12px;} .xiahuaxian { border-bottom-width: 1px;border-bottom-style: dashed;border-bottom-color:#0099CC; } .hengxian { border-left-width: 1px;border-left-style: dashed;border-left-color:#000; } </style> </head> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <body> <table align="center" cellpadding="3" cellspacing="3" bgcolor="#D0EBFA" style="border:1px solid #75C1EB;"> <form name="frm" method="post" action="/pinglun/addsave"> <tr> <td> <table width="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td colspan="2" height="24" bgcolor="#D0EBFA" align="center"><b>发表评论</b></td> </tr> <tr> <td colspan="2" height="15">&nbsp;</td> </tr> <tr> <td colspan="2" class="xiahuaxian">按以下规则,成功点评后将获得此订单相应的积分(与订单总额及订单类型有关),积分可直接抵用现金,很划算哦!</td> </tr> <tr> <td height="27" width="70"class="xiahuaxian">&nbsp;&nbsp;订单号</td> <td class="xiahuaxian"><input type="text" name="pinglun1" id="pinglun1" readonly="true" value="<{$rs.orderform3}>" style="border:0px;"/></td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;产品名称</td> <td class="xiahuaxian"><{$rs.tour1}><input type="hidden" name="pinglun2" value="<{$rs.tour0}>"/></td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;姓名</td> <td class="xiahuaxian"><input type="text" name="pinglun4" value=""/> <input name="pinglun7" type="radio" value="1212" checked="checked" /> 显示 <input type="radio" name="pinglun7" value="1213" /> 不显示(*不显示为匿名发表)</td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;来自</td> <td class="xiahuaxian"><input type="text" name="pinglun15" /> (请按国家、地区、城市顺序填写)</td> </tr> <tr> <td height="40" colspan="2" class="xiahuaxian">请您针对梦之旅的服务进行点评(包括预订、售后等)<br><span style="color:#F00">&nbsp;&nbsp;注:50字及以上字数才能获得积分</span>,已输入 <span style="color:#F00"><label id="ysr">0</label></span> 字</td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;内容</td> <td class="xiahuaxian"><textarea name="pinglun5" id="pinglun5" cols="50" rows="4" onchange="cot()"></textarea></td> </tr> <tr> <td height="40" colspan="2" class="xiahuaxian">请您针对当地接待旅行社的服务进行点评(包括导游、司机、交通、食宿等)</td> </tr> <tr> <td height="25" class="xiahuaxian">&nbsp;&nbsp;</td> <td class="xiahuaxian"><textarea name="pinglun6" id="pinglun6" cols="50" rows="4" ></textarea></td> </tr> <tr> <td height="25" colspan="2" class="xiahuaxian">&nbsp;&nbsp;<strong>请你评分</strong></td> </tr> <tr> <td height="25" colspan="2" class="xiahuaxian" align="center"><table width="400" border="0" cellspacing="0" cellpadding="0"> <tr align="center"> <td height="25">预定</td> <td class="hengxian">客服</td> <td class="hengxian">导游</td> <td class="hengxian">住宿</td> <td class="hengxian">交通</td> <td class="hengxian">用餐</td> <td class="hengxian">总计</td> </tr> <tr align="center"> <td height="25"><select name="pinglun9" id="pinglun9" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun10" id="pinglun10" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun11" id="pinglun11" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun12" id="pinglun12" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun13" id="pinglun13" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><select name="pinglun14" id="pinglun14" onchange="javascript:baifenbi()"> <script>for(i=5;i>-1;i--){document.write("<option value="+i+">"+i+"</option>");}</script> </select> </td> <td class="hengxian"><label id="bili" style="font-weight:bold">100%</label></td> </tr> </table></td> </tr> <tr> <td>&nbsp;&nbsp;验证码:</td> <td> <input name="yzm" id="yzm" type="text" style="BORDER-RIGHT: #666666 1px solid; BORDER-TOP: #666666 1px solid; BORDER-LEFT: #666666 1px solid; BORDER-BOTTOM: #666666 1px solid" size="8" /> <img src="/inc/checkcode.php" /> </td> </tr> <tr> <td colspan="2" align="center" height="50"> <input type="hidden" name="pinglun3" value="579" /> <input type="image" src="http://pw.dreams-travel.com/Hotel_evaluation/img_/fabiao-button.gif" id="mysubmit" /> </td> </tr> </table> </td></tr> </form> </table> </body> </html> <script type="text/javascript"> function cot(){ var ysr=document.getElementById("ysr"); var tt=document.getElementById("content"); var ttv=tt.value; var ttvl=ttv.length; ysr.innerHTML=ttvl; } //验证表单 $(document).ready(function(){ $("#mysubmit").bind("click",function(){ yzm=$("#yzm").val(); if(!yzm.match(/^[\w]{4}$/)){ alert("请输入正确的验证码"); $("#yzm").focus(); return false; } pinglun4=$("#pinglun4").val(); if(!pinglun4.match(/^[\S]+$/)){ alert("用户名称不能为空"); $("#pinglun4").focus(); return false; } pinglun5=$("#pinglun5").val(); if(!pinglun5.match(/[\S]{2,}/)){ alert("对梦之旅的点评不能为空"); $("#pinglun5").focus(); return false; } pinglun6=$("#pinglun6").val(); if(!pinglun6.match(/[\S]{2,}/)){ alert("对当地地接社的点评不能为空"); $("#pinglun6").focus(); return false; } return true; }); }); </script>
10npsite
trunk/Index/Tpl/Home/default/pinglun/addhtm.htm
HTML
asf20
6,925
<div class="f_nav"> <div class="cs"> <ul> <li class="yj_1" id="ccoseshowdz"> <volist name="choosechufa" id="vo" key="k" offset="0" length='1'> <span id="chooseedlist_0"><a href='/classsys/chufadi-cid-<{$vo.classsys0}>' id="chooseedlist_0_mchufa_url"><span class="bold">出发城市:</span><span id="chooseedlist_0_mchufa"><{$vo.classsys1}></span></a></span> </volist> <ul id="dz"> <volist name="choosechufa" id="vo" key="k" offset="1" length='4'> <li id="chooseedlist_<{$k}>" class="nav_bg"><a href='/classsys/chufadi-cid-<{$vo.classsys0}>' id="chooseedlist_<{$k}>_mchufa_url">从<span id="chooseedlist_<{$k}>_mchufa"><{$vo.classsys1}></span>出发</a> <a id="delchufa_<{$k}>" turl="/public/delcoochechufa-uid-<{$Think.const.__USERID__}>-chufaid-<{$vo.classsys0}>">-</a></li> </volist> </ul> </li> <li class="cf"> <span><img src="__PUBLIC__/images/sj_swzx.jpg" /></span> <span class="cf_bg"><span id="fchastaus_num"><{$choosechufafnum.cnum}></span>人计划从<span id="fchastaus"></span>出发</span> </li> <li class="my_cs"> <span><a >添加我的出发城市</a></span> </li> <li class="gwc"> <span class="gwc_s"><a href="/pay/cart">购物车(<a class="q_blue" id="cartnum">0</a>)</a></span> </li> <li class="rx"> <span class="bold">国内热线:&nbsp;40000-51706</span> <span class="bold">出境热线:&nbsp;400096-1006</span> </li> <li class="sj"> </li> </ul> </div> </div> <div class="nav_f"> <li> <volist name="chufalist" id="vo"> <a id="addchufalist_<{$vo.classsys1}>" url="/classsys/list-cid-<{$vo.classsys0}>"><{$vo.classsys1}></a> </volist> </li> </div> <div id="tx" class="chen_white_content"> <div id="gb"> <li>替换出发城市</li> <li id="close">X</li> </div> <div class="tx_nr"> <li> <span>你选择了:</span> <span class="yellow" id="clickchufava"></span> </li> <li> <span>请选择你要替换的城市</span> <span> <select id="clickedoptionchufa"></select> </span> </li> <li class="wxts"> *温馨提示:出发城市最多预设4条 </li> </div> </div> <script type="text/javascript"> $(document).ready(function(){ //给显示已经选择的出发地绑定一个事件 $("#ccoseshowdz").bind("mouseover", function(){ $("#dz").show(); }); $("#ccoseshowdz").bind("mouseout", function(){ $("#dz").hide(); }); //获取购物车里的商品数 $.ajax({ url: "/base/getcartnum", cache: false, success: function(html){ $("#cartnum").html(html); } }); }); </script>
10npsite
trunk/Index/Tpl/Home/default/public/topchufaindex.htm
HTML
asf20
3,595
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><present name="detailTitle"><{$detailTitle}>-</present><present name="moduleTitle"><{$moduleTitle}>-</present><{$site.globalTitle}></title> <meta name="keywords" content="<{$seo_keyword|default=$site['keyword']}>" /> <meta name="description" content="<{$seo_description|default=$site['description']}>" /> <link href="__PUBLIC__/new/css/public.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquerytools/1.2.5/jquery.tools.min.js"></script> <script type="text/javascript"> (function($){ $(function(){ //搜索类型选择 $(".search .chose .chose_xl a").click(function(){ $("#searchShow").html( $(this).html() );//显示文字 $("#searchShow").attr( 'value', $(this).attr('value') );//保存类型代码 }); }); })(jQuery); //搜索按钮点击 function TopSearch(){ var key_word = $("#top_search_keyword").val();//关键词 if(key_word == '请输入关键字') { alert('请输入关键字'); return false; } var search_type = $("#searchShow").attr('value');//搜索类型 var search_form = $("#top_search_form"); search_form.attr('accept-charset',"utf-8"); document.charset = "utf-8"; switch(search_type) { case 'tour': search_form.attr('accept-charset',"gb2312"); document.charset = "gb2312"; search_form.attr('action', '__MAINSITE__/newds/search/search.asp'); break; case 'inn': search_form.attr('action', '__KZURL__/hotel/hotellist-k-' + key_word); break; case 'user': search_form.attr('action', '__UCHOME__/cp.php?ac=friend&op=search&searchmode=1&searchkey=' + key_word); break; case 'blog': search_form.attr('action', '__UCHOME__/space.php?do=blog&searchmode=1&searchkey=' + key_word); break; } return true; }; </script> <!--[if IE 6]> <script src="iepng.js" type="text/javascript"></script> <script type="text/javascript"> EvPNG.fix('img,div,ul,li,a,span'); </script> <![endif]--> </head> <body> <!--头部 start--> <div class="top"> <div class="head"> <notdefined name='__USERID__'> <ul class="head_left"> <li>欢迎来到梦之旅</li> <li class="red1"><a href="__UCHOME__/do.php?ac=__LOGIN_ACTION__" target="_blank">请登录</a></li> <li class="gray zc"><a href="__UCHOME__/do.php?ac=__REGISTER_ACTION__" target="_blank">用户注册</a></li> </ul> <else/> <ul class="head_left"> <li>欢迎来到梦之旅</li> <li class="red1"><a href="__UCHOME__/space.php?uid=<{$Think.const.__USERID__}>" target="_blank"><{$Think.const.__USERNAME__}></a></li> <li class="gray"><a href='__UCHOME__/user/cp.php?ac=common&op=logout' target='_blank'>退出</a></li> </ul> </notdefined> <ul class="head_right"> <li class="red1 gw"><a href="" target="_blank">购物车<em class="dark">0</em>件</a></li> <li class="gray">|</li> <li class="gray sc"><a href="" target="_blank">收藏夹</a></li> <li class="gray">|</li> <li class="gray hy"><a href="__UCHOME__/space.php?do=home" target="_blank">会员中心</a></li> <li class="gray">|</li> <li class="gray bz"><a href="" target="_blank">帮助中心</a></li> </ul> </div> <div class="clear"></div> <div class="menu"> <div class="logo"><a href="__SITEURL__" target="_blank"></a></div> <!--nav start--> <div class="nav"> <li> <a href="__SITEURL__" target="_blank">首页</a> </li> <li> <img src="__PUBLIC__/new/images/jgx.jpg" /> </li> <li onMouseOver="this.className='qly_hover'" onMouseOut="this.className=''"> <span><a href="javascript:;" class="qly" >我要去旅游</a></span> <span class="qly_xl"> <a href="http://www.dreams-travel.com/citytour/" target="_blank">附近转转</a> <a href="http://www.dreams-travel.com/jpxl/" target="_blank">国内走走</a> <a href="http://www.dreams-travel.com/abroad/" target="_blank">出国看看</a></span> </li> <li><img src="__PUBLIC__/new/images/jgx.jpg" /></li> <li class="lm"><a href="__KZURL__" target="_blank">客栈联盟</a></li> <li><img src="__PUBLIC__/new/images/jgx.jpg" /></li> <li onMouseOver="this.className='sq_hover'" onMouseOut="this.className=''"> <span><a href="javascript:;" class="sq">社区</a></span> <span class="sq_xl"> <a href="__UCHOME__/space.php?do=blog" target="_blank">游记攻略</a> <a href="__UCHOME__/space.php?do=album" target="_blank">旅游相册</a> <a href="__UCHOME__/space.php?do=event" target="_blank">驴友活动</a> <a href="__UCHOME__/space.php?do=mtag" target="_blank">小组</a> <a href="__UCHOME__/space.php?do=doing" target="_blank">吼吼</a> </span> </li> </div> <!--nav end--> <div class="search"> <form id='top_search_form' onsubmit="return TopSearch();" method="post" target="_blank" action=""> <ul class="chose"> <li onMouseOver="this.className='chose_hover'" onMouseOut="this.className=''"> <p><span><a href="javascript:;" id="searchShow" value='tour'>线 路</a></span></p> <p> <span class="chose_xl"> <a href="javascript:;" value='tour'>线 路</a> <a href="javascript:;" value='inn'>客 栈</a> <a href="javascript:;" value='user'>找 人</a> <a href="javascript:;" value='blog'>攻 略</a> </span> </p> </li> </ul> <ul class="search_ss"> <input type="text" id="top_search_keyword" name="cids" onFocus="this.className='hover_ss';if(this.value=='请输入关键字')this.value='';" onBlur="this.className='';if(this.value=='')this.value='请输入关键字';" value="请输入关键字" /> </ul> <ul class="ss_button"> <input type="submit" value="搜 索" /> </ul> <ul class="gjz"> <li> <span class="zs">热门搜索:</span> <volist name='hotkeyword' id='row'> <a href="#<{:urlencode($row['info1'])}>" target="_blank"><{$row.info1}></a> </volist> </li> </ul> </form> </div> </div> </div> <!--头部 end--> <div class="clear"></div>
10npsite
trunk/Index/Tpl/Home/default/public/header.htm
HTML
asf20
6,470
<div class="bottom"> <div class="footer"> <!--常见帮助 start--> <{$helplist}> <!--常见帮助 end--> <!--友情链接 start--> <div class="friend"> <ul> <li class="blue bold">合作伙伴:</li> <li class="sj"> <a href="" target="_blank">新浪旅游</a> <a href="" target="_blank">搜狐旅游</a> <a href="" target="_blank">网易旅游</a> <a href="" target="_blank">央视旅游</a> <a href="" target="_blank">雅虎旅游</a> <a href="" target="_blank">凤凰卫视</a> <a href="" target="_blank">旅游光明</a> <a href="" target="_blank">日报旅游中</a> <a href="" target="_blank">国日报旅游</a> <a href="" target="_blank">中华网旅游环球</a> <a href="" target="_blank">网旅游中</a> <a href="" target="_blank">央广播电台</a> </li> </ul> <ul> <li class="blue bold">友情链接:</li> <li class="sj"> <a href="" target="_blank">中国新闻网</a> <a href="" target="_blank">百度</a> <a href="" target="_blank">奇艺</a> <a href="" target="_blank">同程网</a> <a href="" target="_blank">游多多</a> <a href="" target="_blank">自助游</a> <a href="" target="_blank">劲旅网易</a> <a href="" target="_blank">观网酷讯</a> <a href="" target="_blank">去哪儿</a> <a href="" target="_blank">poco旅游</a> <a href="" target="_blank">绿野户</a> <a href="" target="_blank">外网火车网</a> <a href="" target="_blank">住哪网</a> <a href="" target="_blank">峨眉山</a> <a href="" target="_blank">格林豪泰</a> <a href="" target="_blank">特价酒店西</a> <a href="" target="_blank">藏旅游西</a> <a href="" target="_blank">藏旅游邮</a> <a href="" target="_blank">编网北京</a> <a href="" target="_blank">旅行社</a> </li> </ul> <ul> <li><a href="" target="_blank"><img src="__PUBLIC__/images/yl.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/cft.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/kq.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/zfb.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/hk.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/xh.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/xy.jpg" /></a></li> <li><a href="" target="_blank"><img src="__PUBLIC__/images/kx.jpg" /></a></li> </ul> <ul class="ks"> <li><a href="" target="_blank">关于梦之旅</a></li> <li><a href="" target="_blank">联系梦之旅</a></li> <li><a href="" target="_blank">诚邀合作</a></li> <li><a href="" target="_blank">广告招标</a></li> <li><a href="" target="_blank">网站地图</a></li> <li><a href="" target="_blank">快速支付</a></li> <li><a href="" target="_blank">支付安全</a></li> <li><a href="" target="_blank">法律声明</a></li> <li style="border:none;"><a href="" target="_blank">新手指南</a></li> </ul> </div> <!--友情链接 end--> <!--版权信息 start--> <div class="bqxx"> <li>Copyright&nbsp;&copy;&nbsp;1997-2012&nbsp;梦之旅&nbsp;版权所有</li> <li style="float:right;">国际旅行社经营许可证注册号:L-SC-CJ00014&nbsp;&nbsp;蜀ICP备08007806号&nbsp;&nbsp;京公网安备1101055404号</li> </div> <!--版权信息 end--> </div> </div>
10npsite
trunk/Index/Tpl/Home/default/public/pagehelpfoot.htm
HTML
asf20
4,979
<taglib name='article,Html'/> <script src="__PUBLIC__/jsLibrary/Jslibary.js"></script> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquerytools/1.2.5/jquery.tools.min.js"></script> <link href="/css/otherall.css" type="text/css" rel="stylesheet" /> <div class="top_s"> <div class="top"> <div id="scrollDiv"> <li> <volist name="userlist" id="vo"> <p>欢迎<a href="/user/?<{$vo.uid}>"><strong><{$vo.username}></strong></a>入驻本网</p> </volist> <volist name="bloglist" id="vo"> <p><a href="/user/space.php?uid=<{$vo.uid}>&do=blog&id=<{$vo.blogid}>"><{$vo.username}>刚刚发表了:<{$vo.subject}></a></p> </volist> </li> </div> <li class="top_right"> <span><a href="#" >说说</a></span> <span><a href="#" >景点</a></span> <span><a href="#" >攻略</a></span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=blog" >游记</a></span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=mtag" >小组</a></span> <span><a href="/user/space.php?uid=0&do=share&view=all&type=event" >活动</a></span> </li> </div> </div> <div class="Logo_top"> <div class="logo_1"><a href="http://www.dreams-travel.com/" ><img src="__PUBLIC__/images/logo.gif" alt="梦之旅" border="0" /></a></div> <div id="backgroundHolder"> <ul class="nav"> <li class="nav1 drop"><a class="main" href="/" >首页</a></li> <li class="nav2 drop"><a class="main down" href="#url" >我要去旅游</a> <ul> <li><a href="#url" class="nav_bg">周边旅游</a></li> <li><a href="/domestic" class="nav_bg">国内旅游</a></li> <li><a href="/abroad" class="nav_bg2">出境旅游</a></li> </ul> </li> <li class="nav3 drop"><a class="main down" href="#url" >旅游服务</a> <ul> <li><a href="#url" class="nav_bg">说说</a></li> <li><a href="#url" class="nav_bg2">说说</a></li> </ul> </li> <li class="nav5 drop" ><a class="main" href="#url">梦想团</a></li> <li class="nav4 drop"><a class="main down" href="#url" >应用</a> <ul> <li><a href="#url" class="nav_bg">旅途吼吼</a></li> <li><a href="#url" class="nav_bg">游记攻略</a></li> <li><a href="#url" class="nav_bg">景色景彩</a></li> <li><a href="#url" class="nav_bg">旅途问问</a></li> <li><a href="#url" class="nav_bg2">+添加应用</a></li> </ul> </li> </ul> </div> <div class="logo_3" id="userinfo"> <php> if($_COOKIE["uchome_auth"].""=="") { </php> <ul> <li class="yh"> <span id="userlogin">我要登陆</span> </li> </ul> <php> } else {</php> <ul> <li class='yh'> <span><a href='__UCHOME__/?<{$Think.const.__USERID__}>' target='_blank'><img width="30" height="30" src='<{$Think.cookie.uchome_usertouxiang}>' onerror="this.onerror=null;this.src='http://demo.mzl5.com/ducenter/images/noavatar_small.gif'" alt='用户头像' /></a>&nbsp;<a href='__UCHOME__/?<{$Think.const.__USERID__}>' target='_blank' id='ausername'><{$Think.const.__USERNAME__}></a></span> <span><a href='__UCHOME__/?<{$Think.const.__USERID__}>' target='_blank'><img src='/images/jb.jpg' alt='金币' /></a>&nbsp;<a href='__UCHOME__/?<{$Think.const.__USERID__}>' target='_blank' id='ajifen'><{$Think.cookie.uchome_credit}></a></span> </li> <li class='lj'> <span><a href='__UCHOME__' target='_blank'>订单</a></span> <span><a href='__UCHOME__/cp.php?ac=invite' target='_blank'>邀请</a></span> <span><a href='__UCHOME__/cp.php?ac=task' target='_blank'>任务</a></span> <span><a href='__UCHOME__/cp.php?ac=magic' target='_blank'>道具</a></span> <span><a href='__UCHOME__/cp.php' target='_blank'>设置</a></span> <span><a href='__UCHOME__/cp.php?ac=common&op=logout&uhash=<{$Think.cookie.uchome_uhash}>' target='_blank'>退出</a></span> </li> </ul> <php> }</php> </div> </div> <div id="chendiv_fade" class="chen_black_overlay" style="display:none; height:100%"> </div> <div id="chendiv_userlogin" class="chen_white_content" style="display:none;"> <div style="text-align: right; cursor: default; height: 40px;"> <span style="font-size: 16px;cursor:hand;" onclick="chen_CloseDiv('chendiv_userlogin','chendiv_fade')">关闭</span> <div> 用户名:<input name="username" and id="username" type="text" /> 密码:<input name="password" and id="password" type="text" /> <input name="btnuserlogin" id="btnuserlogin" type="button" value="登 陆" /> </div> </div> </div> <script type="text/javascript"> $(document).ready(function(){ $("#userlogin").bind("click",function(){ chen_ShowDiv("chendiv_userlogin","chendiv_fade"); }); $("#btnuserlogin").bind("click",function(){ username=$("#username").val(); password=$("#password").val(); if(!username.match(/[\S]+/)) { alert("请输入正确的用户名"); $("#username").focus(); return false; } if(!password.match(/[\S]+/)) { alert("密码不能为空"); $("#password").focus(); return false; } //使用ajax去登陆社区 /?m=public&a=ajaxuserlogin $.ajax({ url: "/index.php?m=public&a=ajaxuserlogin&username="+username+"&password="+password, cache: false, success: function(html){ var getuser=html; if(html.length<10) { alert("登陆失败,请重新填写用户名和密码"); return false; } userurl="__UCHOME__"; //获取用户名 username=getkuohaostr(html,/\"username\"\:\"([\s\S]*?)\"/); uid=getkuohaostr(html,/\"uid\"\:\"([\s\S]*?)\"/); credit=getkuohaostr(html,/\"credit\"\:\"([\s\S]*?)\"/);//积分 usertouxiang=getkuohaostr(html,/\"usertouxiang\"\:\"(http?[\s\S][^\"]+[gif|jpg|png])/); usertouxiangb=getkuohaostr(html,/\"usertouxiangb\"\:\"(http?[\s\S][^\"]+[gif|jpg|png])/); uhash=getkuohaostr(html,/\"uhash\"\:\"([\s\S]*?)\"/); loginedhtml="<ul>" loginedhtml+=" <li class='yh'>" loginedhtml+="" loginedhtml+=" <span><a href='"+userurl+"/?"+uid+"' target='_blank'><img src='"+usertouxiang+"' onerror=\"this.onerror=null;this.src='"+usertouxiangb+"'\" width=30 height=30 alt='用户头像' /></a>&nbsp;<a href='' target='_blank' id='ausername'>"+username+"</a></span>" loginedhtml+=" <span><a href='"+userurl+"/?"+uid+"' target='_blank'><img src='/images/jb.jpg' alt='金币' /></a>&nbsp;<a href='"+userurl+"' target='_blank' id='ajifen'>"+credit+"</a></span>" loginedhtml+=" </li>" loginedhtml+=" <li class='lj'>" loginedhtml+=" <span><a href='"+userurl+"' target='_blank'>订单</a></span>" loginedhtml+=" <span><a href='"+userurl+"/cp.php?ac=invite' target='_blank'>邀请</a></span>" loginedhtml+=" <span><a href='"+userurl+"/cp.php?ac=task' target='_blank'>任务</a></span>" loginedhtml+=" <span><a href='"+userurl+"/cp.php?ac=magic' target='_blank'>道具</a></span>" loginedhtml+=" <span><a href='"+userurl+"/cp.php' target='_blank'>设置</a></span>" loginedhtml+=" <span><a href='"+userurl+"/cp.php?ac=common&op=logout&uhash="+uhash+"' target='_blank'>退出</a></span>" loginedhtml+=" </li>" loginedhtml+=" </ul>"; //登陆成功时,刷新出发地菜单 tourl="/public/showuserchufadi-uid-"+uid; $.ajax({ url: tourl, cache: false, success: function(html){ ml=getkuohaostr(html,/\<item key=0\>([\s\S]+)?<\/item\>/) menufrist=html.match(/\<item key=0\>[\s\S]+?<\/item>/); othermenu=html.replace(menufrist,""); $("#chooseedlist_0").empty(); $("#chooseedlist_0").append(ml); $("#dz").empty(); $("#dz").append(othermenu); } }); alert("登陆成功"); //执行生成cookie var getuser=getuser.match(/^[\s\S]+(?!returnrecord\=)/); $("#userinfo").html(loginedhtml+"<div style='display:none'>"+getuser+"</div>"); chen_CloseDiv('chendiv_userlogin','chendiv_fade'); } }); }); setInterval("AutoScroll('#scrollDiv')",2700); }); function AutoScroll(obj){ $(obj).find("li:first").animate({ marginTop:"-25px"},500,function(){ $(this).css({marginTop:"0px"}).find("p:first").appendTo(this); }); } </script>
10npsite
trunk/Index/Tpl/Home/default/public/top.htm
HTML
asf20
10,036
<!--bottom start--> <div class="bottom"> <div class="footer"> <div class="hzhb"> <ul> <li class="hz_title">合作伙伴:</li> <li class="hz_nr"> <a href="" target="_blank">新浪旅游</a> <a href="" target="_blank">搜狐旅游</a> <a href="" target="_blank">网易旅游</a> <a href="" target="_blank">央视旅游</a> <a href="" target="_blank">雅虎旅游</a> <a href="" target="_blank">凤凰卫视</a> <a href="" target="_blank">旅游光明</a> <a href="" target="_blank">日报旅游中</a> <a href="" target="_blank">国日报旅游</a> <a href="" target="_blank">中华网旅游环球</a> <a href="" target="_blank">网旅游中</a> <a href="" target="_blank">央广播电台</a> <a href="" target="_blank">国日报旅游</a> </li> </ul> <ul> <li class="hz_title">友情链接:</li> <li class="hz_nr"> <a href="" target="_blank">中国新闻网</a> <a href="" target="_blank">百度</a> <a href="" target="_blank">奇艺</a> <a href="" target="_blank">同程网</a> <a href="" target="_blank">游多多</a> <a href="" target="_blank">自助游</a> <a href="" target="_blank">劲旅网易</a> <a href="" target="_blank">观网酷讯</a> <a href="" target="_blank">去哪儿</a> <a href="" target="_blank">poco旅游</a> <a href="" target="_blank">绿野户</a> <a href="" target="_blank">外网火车网</a> <a href="" target="_blank">住哪网</a> <a href="" target="_blank">峨眉山</a> <a href="" target="_blank">格林豪泰</a> </li> </ul> </div> <div class="about"> <a href="" target="_blank">关于梦之旅</a> <span>|</span> <a href="" target="_blank">联系梦之旅</a> <span>|</span> <a href="" target="_blank">诚邀合作</a> <span>|</span> <a href="" target="_blank">广告招标</a> <span>|</span> <a href="" target="_blank">网站地图</a> <span>|</span> <a href="" target="_blank">快速支付</a> <span>|</span> <a href="" target="_blank">支付安全</a> <span>|</span> <a href="" target="_blank">法律声明</a> <span>|</span> <a href="" target="_blank">新手指南</a> </div> <div class="bqxx"> <li> Copyright &copy; 1997-2012 梦之旅(mzl5.com) 版权所有 </li> <li style="float:right;"> 国际旅行社经营许可证注册号: L-SC-CJ00014 &nbsp;&nbsp; 蜀ICP备08007806号&nbsp;&nbsp;京公网安备1101055404号 </li> </div> </div> </div> <!--bottom end--> </body></html>
10npsite
trunk/Index/Tpl/Home/default/public/footer.htm
HTML
asf20
2,435
<!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="x-ua-compatible" content="ie=7" /> <title><present name="detailTitle"><{$detailTitle}>-</present><present name="moduleTitle"><{$moduleTitle}>-</present><{$site.globalTitle}></title> <meta name="keywords" content="<{$seo_keyword|default=$site['keyword']}>" /> <meta name="description" content="<{$seo_description|default=$site['description']}>" /> <link href="__PUBLIC__/css/index.css" type="text/css" rel="stylesheet" /> <!--[if IE 6]> <script src="__PUBLIC__/jsLibrary/iepng.js" type="text/javascript"></script> <script type="text/javascript"> EvPNG.fix('img,div,ul,li,a'); </script> <![endif]--> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.7.2/jquery.min.js"></script> <script type="text/javascript" src="http://lib.sinaapp.com/js/jquerytools/1.2.5/jquery.tools.min.js"></script> <script type="text/javascript" src="__PUBLIC__/jsLibrary/jquery/jquery.cookie.js"></script> <script type="text/javascript"> (function($){ $(function(){ //动态信息 $("#scrollDiv").scrollable({vertical: true, circular:true}); setInterval(function(){$("#scrollDiv").data("scrollable").next();}, 3000); //下拉菜单 $(".m_menu").tooltip({position:"bottom center"}); //出发地下拉菜单 $(".from_dest_change").tooltip({position:'bottom right',offset:[0 ,- $(".from_dest_change").width()-2]}); $(".from_dest_change_box").hover( function(){$(".from_dest_change").addClass('hover')}, function(){$(".from_dest_change").removeClass('hover')} ); //搜索类型 $("#searchType a").click(function(){ $("#searchShow").text($(this).text()); }); }); //改变出发地 window.from_dest_change = function(from_dest){ $.cookie('from_dest', from_dest); window.location.reload(); } })(jQuery); </script> </head> <body> <div class="header"> <div class="head"> <div class="head_left" id="scrollDiv" style="position:relative;overflow:hidden;height:30px;"> <div class="items" style="position:absolute;height:20000em;"> <{:W('LastScrollData')}> </div> </div> <div class="head_right"> <li> <a href="<{$SYS_config.siteurl}>/user" target="_blank">社区</a> </li> <li> <a href="<{$SYS_config.siteurl}>/user/space.php?do=blog" target="_blank">游记攻略</a> </li> <li> <a href="<{$SYS_config.siteurl}>/user/space.php?do=album" target="_blank">旅行相册</a> </li> <li> <a href="<{$SYS_config.siteurl}>/user/space.php?do=event" target="_blank">驴友活动</a> </li> <li> <a href="<{$SYS_config.siteurl}>/user/space.php?do=mtag" target="_blank">小组</a> </li> <li> <a href="<{$SYS_config.siteurl}>/user/space.php?do=doing" target="_blank">吼吼</a> </li> <li> <span class="more"><a target="_blank" class="more m_menu">更多</a></span> <span class="more_xl tooltip" style="display:none"> <a href="<{$SYS_config.siteurl}>/user/space.php?do=poll" target="_blank">投票</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=share" target="_blank">精彩分享</a> </span> </li> </div> </div> </div> <!--顶部信息 end--> <!--菜单栏 start--> <div class="menu"> <div class="logo"> <ul> <a href="<{$SYS_config.siteurl}>/" target="_blank"><img src="__PUBLIC__/images/logo.jpg" /></a> </ul> <ul class="city"> <li><{$now_from_dest.name}>出发</li> <li class="from_dest_change_box"> <a class="from_dest_change">[切换城市]</a> <ul class="from_dest tooltip"> <volist name="chufalist" id="row"> <li><a href="javascript:from_dest_change(<{$row.classsys0}>);"><{$row.classsys1}></a></li> </volist> </ul> </li> </ul> </div> <div class="nav"> <li><a href="" target="_blank" class="index">首页</a></li> <li> <span><a target="_blank" class="m_menu">我要去旅游</a></span> <span class="xl tooltip" style="display:none;"> <a href="" target="_blank">附近转转</a> <a href="<{$SYS_config.siteurl}>/domestic" target="_blank">国内走走</a> <a href="<{$SYS_config.siteurl}>/abroad" target="_blank">出国看看</a> </span> </li> <li> <span><a href="__KZURL__" target="_blank" class="index">客栈</a></span> </li> <li> <span><a target="_blank" class="m_menu">社区</a></span> <span class="xl tooltip" style="display:none;"> <a href="<{$SYS_config.siteurl}>/user/space.php?do=blog" target="_blank">游记攻略</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=album" target="_blank">旅游相册</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=event" target="_blank">驴友活动</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=mtag" target="_blank">小组</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=doing" target="_blank">吼吼</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=poll" target="_blank">投票</a> <a href="<{$SYS_config.siteurl}>/user/space.php?do=share" target="_blank">精彩分享</a> </span> </li> </div> <div class="yd"> <div class="yh"> <notdefined name='__USERID__'> <div class="login_box"> <ul class="login_menu"> <li><img style="width:12px;height:12px" src="<{$SYS_config.siteurl}>/user/Public/images/login.jpg" alt="注册" />&nbsp;<a href="<{$SYS_config.siteurl}>/user/do.php?ac=__REGISTER_ACTION__">注册</a></li> <li><img style="width:12px;height:12px" src="<{$SYS_config.siteurl}>/user/Public/images/tx.jpg" alt="登录" />&nbsp;<a href="<{$SYS_config.siteurl}>/user/do.php?ac=__LOGIN_ACTION__">登录</a></li> <!--li><a href="" target="_blank"><img style="width:20px;height:21px" src="<{$SYS_config.siteurl}>/user/Public/images/sina_top.jpg" alt="新浪" /></a></li> <li><a href="" target="_blank"><img style="width:16px;height:21px" src="user/Public/images/qq_top.jpg" alt="QQ" /></a></li--> </ul> </div> <else/> <ul class="user_info"> <p> <li class="user_tx"> <span><a href='<{$SYS_config.siteurl}>/space.php?uid=<{$Think.const.__USERID__}>' target='_blank'><img width="30" height="30" src='<{$Think.const.UC_API}>/avatar.php?uid=<{$Think.const.__USERID__}>&size=small' onerror="this.onerror=null;this.src='__UCENTER__/images/noavatar_small.gif'" alt='用户头像' /></a>&nbsp;<a href='<{$SYS_config.siteurl}>/user/space.php?uid=<{$Think.const.__USERID__}>' target='_blank' class="gray"><{$Think.const.__USERNAME__}></a></span> <span><img style="width:10px;height:9px" src='__PUBLIC__/images/jb.jpg' alt='金币' style="margin-top:10px;" />&nbsp;<{:uc_user_getcredit(1, __USERID__, 'credit')}></span> </li> </p> <p> <li> <span><a href='__UCHOME__/cp.php?ac=mybook' target='_blank'>订单</a></span> <span><a href='__UCHOME__/cp.php?ac=invite' target='_blank'>邀请</a></span> <span><a href='__UCHOME__/cp.php?ac=task' target='_blank'>任务</a></span> <span><a href='__UCHOME__/cp.php?ac=magic' target='_blank'>道具</a></span> <span><a href='__UCHOME__/cp.php' target='_blank'>设置</a></span> <span><a href='__UCHOME__/user/cp.php?ac=common&op=logout' target='_blank'>退出</a></span> </li> </p> </ul> </notdefined> </div> <!--div class="tel"> <li class="tel_title">预订热线</li> <li class="telphone"> <span class="yellow">40000</span> <span class="q_blue">-</span> <span class="yellow">51706</span> </li> </div--> </div> </div> <!--菜单栏 end--> <!--搜索 start--> <div class="search"> <div class="search_content"> <ul> <li class="bq"> <span> <input type="text" value="黄龙" onBlur="if(this.value==''){this.value='黄龙'}" onFocus="if(this.value=='黄龙'){this.value=''}"/> </span> <span class="search_chose"><a id="searchShow" class="m_menu">线路</a></span> <span class="chose_xl tooltip" id="searchType" style="display:none;"> <a href="javascript:;">线路</a> <a href="javascript:;">找人</a> <a href="javascript:;">攻略</a> <a href="javascript:;">客栈</a> </span> <span class="button"> <input type="button" /> </span> </li> <li class="rm"> <span>热门搜索:</span> <span> <volist name='hotkeyword' id='row'> <a href="#<{:urlencode($row['info1'])}>" target="_blank"><{$row.info1}></a> </volist> </span> </li> <!--li class="gwc"> <span><a href="/pay/cart" target="_blank" class="black">购物车</a></span> <span>(</span><span class="blue1">2</span><span>)</span> </li--> </ul> </div> </div> <!--热门线路 start--> <div class="content"> <!--div class="rmxl"> <span>主推产品:</span> <span> <volist name='topproduct' id='row'> <a href="<{$row.topproduct3}>" target="_blank"><{$row.topproduct1}></a> </volist> </span> </div--> <div class="clear"></div> </div>
10npsite
trunk/Index/Tpl/Home/default/public/old_header.htm
HTML
asf20
9,175
<?php global $SystemConest; global $SYS_config; return array( /*************************************************************************** * 数据库配置 **************************************************************************/ 'DB_TYPE' => "mysql", // 数据库类型 'DB_HOST' => $SystemConest[9], // 服务器地址 'DB_NAME' => $SystemConest[10], // 数据库名 'DB_USER' => $SystemConest[11], // 用户名 'DB_PWD' => $SystemConest[12], // 密码 'DB_PORT' => $SystemConest[13], // 端口 'DB_PREFIX' => $SystemConest[7], // 数据库表前缀 /*************************************************************************** * 缓存配置 **************************************************************************/ 'HTML_CACHE_ON' => true, // 是否开启静态缓存 'HTML_CACHE_TIME' => 21600, // 静态缓存有效期 单位秒 'HTML_READ_TYPE' => 0, // 缓存方式 'HTML_FILE_SUFFIX' => '.htm', // 默认静态文件后缀 'DATA_CACHE_TIME' => 20, // sql查询的数据缓存时间,单位秒 /*************************************************************************** * URL配置 **************************************************************************/ 'URL_MODEL' => 2, 'URL_PATHINFO_DEPR' => FGF, // PATHINFO模式下,模块与操作之间的分隔符 'URL_PATHINFO_DEPR_CAN' => '-', // PATHINFO模式下,各参数之间的分割符号 'URL_CASE_INSENSITIVE' => false, // 关闭URL大小写区分 'URL_ROUTER_ON' => false, // 是否开启URL路由 /*************************************************************************** * 分组配置 **************************************************************************/ 'APP_GROUP_LIST' => 'Home,Inn', 'APP_SUB_DOMAIN_DEPLOY' => 1, 'APP_SUB_DOMAIN_RULES' => array( 'kezhan'=>array('Inn/'), // kezhan域名指向Inn分组 ), /*************************************************************************** * 模版配置 **************************************************************************/ 'TMPL_CACHE_ON' => false, // 是否开启模板编译缓存,设为false则每次都会重新编译 'TMPL_TEMPLATE_SUFFIX' => '.htm', // 默认模板文件后缀 'TMPL_L_DELIM' => '<{', // 模板引擎普通标签开始标 'TMPL_R_DELIM' => '}>', // 模板引擎普通标签结束标记 'TMPL_ACTION_ERROR' => "./Index/Tpl/message.html", 'TMPL_ACTION_SUCCESS' => "./Index/Tpl/message.html", /*************************************************************************** * 其他配置 **************************************************************************/ 'APP_AUTOLOAD_PATH' => '@.TagLib', // 自动加载自定义的标签库 'SHOW_PAGE_TRACE' => $SYS_config["tiaoshi"],// 显示页面Trace信息 'DEFAULT_THEME' => $SystemConest[6], // 默认模板主题名称 ); ?>
10npsite
trunk/Index/Conf/config.php
PHP
asf20
3,267
<?php global $SYS_config; return array( 'SHOW_PAGE_TRACE' => $SYS_config["tiaoshi"], // 显示页面Trace信息 'URL_ROUTER_ON' => true, // 是否开启URL路由 'TMPL_CACHE_ON' => false, // 是否开启模板编译缓存,设为false则每次都会重新编译 'DEFAULT_THEME' => 'default', // 默认模板主题名称 'HTML_CACHE_ON' => false, // 是否开启静态缓存 'APP_AUTOLOAD_PATH' => '', //自动加载自定义的标签库 ); ?>
10npsite
trunk/Index/Conf/Inn/config.php
PHP
asf20
558
<?php ?>
10npsite
trunk/Index/Conf/tags.php
PHP
asf20
9
<?php /** * 出发地识别 */ class FromDestParseBehavior extends Behavior { // 行为参数定义 protected $options = array( 'AutoParseFromDest' => true,//默认开启自动识别出发地 ); public function run(&$params) { if(!C("AutoParseFromDest")) return; $now_from_dest = array(); //尝试解析COOKIE中设置的当前出发地 $cookie_dest = cookie('from_dest'); if(!empty($cookie_dest)) { $now_from_dest = M("classsys") ->field('classsys0 as id,classsys1 as name') ->where("classsys3=542 and classsys0={$cookie_dest}") ->order("classsys4 desc") ->find(); trace('通过cookie取得出发地',dump($now_from_dest,false)); } //TODO 尝试获取用户常用出发地列表设置 else { /* $uid = $_COOKIE["uchome_uid"]; $uchome_auth = $_COOKIE["uchome_auth"]; $choosechufa = $cmr->table(UHDQ."userchuafadi U") ->join(DQ."classsys F on U.chuafaid = F.classsys0") ->where("U.uid=".$uid) ->select(); if( strlen($uchome_auth)>5 && !empty($choosechufa)) $now_from_dest = $choosechufa[0]; */ } //以上都没有获取到出发地信息,则通过IP识别 if(empty($now_from_dest)) { //$ip_add = get_client_ip(); //$ip_add = "220.248.3.202";//debug上海 //$ip_add = "222.28.239.52";//debug北京 $ip_add = "124.226.251.207";//debug广西 $trace_info['客户端IP地址'] = $ip_add;//debug $ip_exp = explode('.', $ip_add); $ip_code = 0; for($i=0; $i<count($ip_exp); $i++) $ip_code += $ip_exp[$i] * pow( 256, 3-$i ); $Addr = M("ipaddress")->field("Province,City")->where("$ip_code between IP1 and IP2")->find(); //trace("sql",M("ipaddress")->getLastSQL());//debug $trace_info['解析IP地址位置'] = dump($Addr,false);//debug //查找IP归属出发地 $dest_id = M("info")->field("info2")->where("info3 like '%{$Addr['Province']}%'")->find(); $dest_id = $dest_id["info2"]; //如果没有匹配项则查找默认出发地 if(empty($dest_id)) { $dest_id = M("info")->field("info2")->where("info8=1212")->find(); $dest_id = $dest_id["info2"]; $trace_info['尝试解析默认出发地'] = $dest_id;//debug } else { $trace_info['匹配到指定出发地'] = $dest_id;//debug } if($dest_id) { $dest_info = M("classsys")->field('classsys0,classsys1')->where("classsys0=$dest_id")->find(); $now_from_dest["id"] = $dest_info['classsys0']; $now_from_dest["name"] = $dest_info['classsys1']; $trace_info['出发地解析成功'] = dump($now_from_dest,false);//debug } else { $trace_info['没有设置默认出发地'] = "出发地解析彻底失败!";//debug } trace($trace_info); } //定义全站常量:当前出发地 define('__FromDestID__', $now_from_dest['id']); define('__FromDestName__', $now_from_dest['name']); } }
10npsite
trunk/Index/Lib/Behavior/FromDestParseBehavior.class.php
PHP
asf20
3,606
<?php /** * 登录信息检测 */ class LoginCheckBehavior extends Behavior { // 行为参数定义 protected $options = array( 'AutoLoginCheck' => true,//默认开启自动识别登录信息 ); public function run(&$params) { if(!C("AutoLoginCheck")) return; //登录信息解码 $authcode = cookie("xdream_auth"); if(empty($authcode)) return; $authString = uc_authcode($authcode, 'DECODE', UC_KEY); if(empty($authString)) return; $authArray = unserialize(base64_decode($authString)); if(empty($authArray)) return; //登录信息完整性检测 if(empty($authArray["uid"])) return; if(empty($authArray["username"])) return; if(empty($authArray["password"])) return; if(empty($authArray["time"])) return; //定义全站常量为当前登陆用户信息 define('__USERID__', $authArray["uid"]); define('__USERNAME__', $authArray["username"]); define('__PASSWORD__', $authArray["password"]); define('__LOGINTIME__', $authArray["time"]); } }
10npsite
trunk/Index/Lib/Behavior/LoginCheckBehavior.class.php
PHP
asf20
1,145
<?php /* $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ NuSOAP - Web Services Toolkit for PHP Copyright (c) 2002 NuSphere Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA If you have any questions or comments, please email: Dietrich Ayala dietrich@ganx4.com http://dietrich.ganx4.com/nusoap NuSphere Corporation http://www.nusphere.com */ /* load classes // necessary classes require_once('class.soapclient.php'); require_once('class.soap_val.php'); require_once('class.soap_parser.php'); require_once('class.soap_fault.php'); // transport classes require_once('class.soap_transport_http.php'); // optional add-on classes require_once('class.xmlschema.php'); require_once('class.wsdl.php'); // server class require_once('class.soap_server.php');*/ // class variable emulation // cf. http://www.webkreator.com/php/techniques/php-static-class-variables.html $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = 9; /** * * nusoap_base * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class nusoap_base { /** * Identification for HTTP headers. * * @var string * @access private */ var $title = 'NuSOAP'; /** * Version for HTTP headers. * * @var string * @access private */ var $version = '0.7.2'; /** * CVS revision for HTTP headers. * * @var string * @access private */ var $revision = '$Revision: 1.94 $'; /** * Current error string (manipulated by getError/setError) * * @var string * @access private */ var $error_str = ''; /** * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) * * @var string * @access private */ var $debug_str = ''; /** * toggles automatic encoding of special characters as entities * (should always be true, I think) * * @var boolean * @access private */ var $charencoding = true; /** * the debug level for this instance * * @var integer * @access private */ var $debugLevel; /** * set schema version * * @var string * @access public */ var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; /** * charset encoding for outgoing messages * * @var string * @access public */ var $soap_defencoding = 'ISO-8859-1'; //var $soap_defencoding = 'UTF-8'; /** * namespaces in an array of prefix => uri * * this is "seeded" by a set of constants, but it may be altered by code * * @var array * @access public */ var $namespaces = array( 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', 'xsd' => 'http://www.w3.org/2001/XMLSchema', 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/' ); /** * namespaces used in the current context, e.g. during serialization * * @var array * @access private */ var $usedNamespaces = array(); /** * XML Schema types in an array of uri => (array of xml type => php type) * is this legacy yet? * no, this is used by the xmlschema class to verify type => namespace mappings. * @var array * @access public */ var $typemap = array( 'http://www.w3.org/2001/XMLSchema' => array( 'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double', 'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'', 'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string', // abstract "any" types 'anyType'=>'string','anySimpleType'=>'string', // derived datatypes 'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'', 'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer', 'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer', 'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''), 'http://www.w3.org/2000/10/XMLSchema' => array( 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', 'float'=>'double','dateTime'=>'string', 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), 'http://www.w3.org/1999/XMLSchema' => array( 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', 'float'=>'double','dateTime'=>'string', 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), 'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'), 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'), 'http://xml.apache.org/xml-soap' => array('Map') ); /** * XML entities to convert * * @var array * @access public * @deprecated * @see expandEntities */ var $xmlEntities = array('quot' => '"','amp' => '&', 'lt' => '<','gt' => '>','apos' => "'"); /** * constructor * * @access public */ function nusoap_base() { $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel; } /** * gets the global debug level, which applies to future instances * * @return integer Debug level 0-9, where 0 turns off * @access public */ function getGlobalDebugLevel() { return $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel; } /** * sets the global debug level, which applies to future instances * * @param int $level Debug level 0-9, where 0 turns off * @access public */ function setGlobalDebugLevel($level) { $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = $level; } /** * gets the debug level for this instance * * @return int Debug level 0-9, where 0 turns off * @access public */ function getDebugLevel() { return $this->debugLevel; } /** * sets the debug level for this instance * * @param int $level Debug level 0-9, where 0 turns off * @access public */ function setDebugLevel($level) { $this->debugLevel = $level; } /** * adds debug data to the instance debug string with formatting * * @param string $string debug data * @access private */ function debug($string){ if ($this->debugLevel > 0) { $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n"); } } /** * adds debug data to the instance debug string without formatting * * @param string $string debug data * @access public */ function appendDebug($string){ if ($this->debugLevel > 0) { // it would be nice to use a memory stream here to use // memory more efficiently $this->debug_str .= $string; } } /** * clears the current debug data for this instance * * @access public */ function clearDebug() { // it would be nice to use a memory stream here to use // memory more efficiently $this->debug_str = ''; } /** * gets the current debug data for this instance * * @return debug data * @access public */ function &getDebug() { // it would be nice to use a memory stream here to use // memory more efficiently return $this->debug_str; } /** * gets the current debug data for this instance as an XML comment * this may change the contents of the debug data * * @return debug data as an XML comment * @access public */ function &getDebugAsXMLComment() { // it would be nice to use a memory stream here to use // memory more efficiently while (strpos($this->debug_str, '--')) { $this->debug_str = str_replace('--', '- -', $this->debug_str); } return "<!--\n" . $this->debug_str . "\n-->"; } /** * expands entities, e.g. changes '<' to '&lt;'. * * @param string $val The string in which to expand entities. * @access private */ function expandEntities($val) { if ($this->charencoding) { $val = str_replace('&', '&amp;', $val); $val = str_replace("'", '&apos;', $val); $val = str_replace('"', '&quot;', $val); $val = str_replace('<', '&lt;', $val); $val = str_replace('>', '&gt;', $val); } return $val; } /** * returns error string if present * * @return mixed error string or false * @access public */ function getError(){ if($this->error_str != ''){ return $this->error_str; } return false; } /** * sets error string * * @return boolean $string error string * @access private */ function setError($str){ $this->error_str = $str; } /** * detect if array is a simple array or a struct (associative array) * * @param mixed $val The PHP array * @return string (arraySimple|arrayStruct) * @access private */ function isArraySimpleOrStruct($val) { $keyList = array_keys($val); foreach ($keyList as $keyListValue) { if (!is_int($keyListValue)) { return 'arrayStruct'; } } return 'arraySimple'; } /** * serializes PHP values in accordance w/ section 5. Type information is * not serialized if $use == 'literal'. * * @param mixed $val The value to serialize * @param string $name The name (local part) of the XML element * @param string $type The XML schema type (local part) for the element * @param string $name_ns The namespace for the name of the XML element * @param string $type_ns The namespace for the type of the element * @param array $attributes The attributes to serialize as name=>value pairs * @param string $use The WSDL "use" (encoded|literal) * @return string The serialized element, possibly with child elements * @access public */ function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded'){ $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use"); $this->appendDebug('value=' . $this->varDump($val)); $this->appendDebug('attributes=' . $this->varDump($attributes)); if(is_object($val) && get_class($val) == 'soapval'){ return $val->serialize($use); } // force valid name if necessary if (is_numeric($name)) { $name = '__numeric_' . $name; } elseif (! $name) { $name = 'noname'; } // if name has ns, add ns prefix to name $xmlns = ''; if($name_ns){ $prefix = 'nu'.rand(1000,9999); $name = $prefix.':'.$name; $xmlns .= " xmlns:$prefix=\"$name_ns\""; } // if type is prefixed, create type prefix if($type_ns != '' && $type_ns == $this->namespaces['xsd']){ // need to fix this. shouldn't default to xsd if no ns specified // w/o checking against typemap $type_prefix = 'xsd'; } elseif($type_ns){ $type_prefix = 'ns'.rand(1000,9999); $xmlns .= " xmlns:$type_prefix=\"$type_ns\""; } // serialize attributes if present $atts = ''; if($attributes){ foreach($attributes as $k => $v){ $atts .= " $k=\"".$this->expandEntities($v).'"'; } } // serialize null value if (is_null($val)) { if ($use == 'literal') { // TODO: depends on minOccurs return "<$name$xmlns $atts/>"; } else { if (isset($type) && isset($type_prefix)) { $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = ''; } return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; } } // serialize if an xsd built-in primitive type if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){ if (is_bool($val)) { if ($type == 'boolean') { $val = $val ? 'true' : 'false'; } elseif (! $val) { $val = 0; } } else if (is_string($val)) { $val = $this->expandEntities($val); } if ($use == 'literal') { return "<$name$xmlns $atts>$val</$name>"; } else { return "<$name$xmlns $atts xsi:type=\"xsd:$type\">$val</$name>"; } } // detect type and serialize $xml = ''; switch(true) { case (is_bool($val) || $type == 'boolean'): if ($type == 'boolean') { $val = $val ? 'true' : 'false'; } elseif (! $val) { $val = 0; } if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val</$name>"; } break; case (is_int($val) || is_long($val) || $type == 'int'): if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val</$name>"; } break; case (is_float($val)|| is_double($val) || $type == 'float'): if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val</$name>"; } break; case (is_string($val) || $type == 'string'): $val = $this->expandEntities($val); if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val</$name>"; } break; case is_object($val): if (! $name) { $name = get_class($val); $this->debug("In serialize_val, used class name $name as element name"); } else { $this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val)); } foreach(get_object_vars($val) as $k => $v){ $pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use); } $xml .= '<'.$name.'>'.$pXml.'</'.$name.'>'; break; break; case (is_array($val) || $type): // detect if struct or array $valueType = $this->isArraySimpleOrStruct($val); if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){ $i = 0; if(is_array($val) && count($val)> 0){ foreach($val as $v){ if(is_object($v) && get_class($v) == 'soapval'){ $tt_ns = $v->type_ns; $tt = $v->type; } elseif (is_array($v)) { $tt = $this->isArraySimpleOrStruct($v); } else { $tt = gettype($v); } $array_types[$tt] = 1; // TODO: for literal, the name should be $name $xml .= $this->serialize_val($v,'item',false,false,false,false,$use); ++$i; } if(count($array_types) > 1){ $array_typename = 'xsd:anyType'; } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) { if ($tt == 'integer') { $tt = 'int'; } $array_typename = 'xsd:'.$tt; } elseif(isset($tt) && $tt == 'arraySimple'){ $array_typename = 'SOAP-ENC:Array'; } elseif(isset($tt) && $tt == 'arrayStruct'){ $array_typename = 'unnamed_struct_use_soapval'; } else { // if type is prefixed, create type prefix if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){ $array_typename = 'xsd:' . $tt; } elseif ($tt_ns) { $tt_prefix = 'ns' . rand(1000, 9999); $array_typename = "$tt_prefix:$tt"; $xmlns .= " xmlns:$tt_prefix=\"$tt_ns\""; } else { $array_typename = $tt; } } $array_type = $i; if ($use == 'literal') { $type_str = ''; } else if (isset($type) && isset($type_prefix)) { $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\""; } // empty array } else { if ($use == 'literal') { $type_str = ''; } else if (isset($type) && isset($type_prefix)) { $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\""; } } // TODO: for array in literal, there is no wrapper here $xml = "<$name$xmlns$type_str$atts>".$xml."</$name>"; } else { // got a struct if(isset($type) && isset($type_prefix)){ $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = ''; } if ($use == 'literal') { $xml .= "<$name$xmlns $atts>"; } else { $xml .= "<$name$xmlns$type_str$atts>"; } foreach($val as $k => $v){ // Apache Map if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') { $xml .= '<item>'; $xml .= $this->serialize_val($k,'key',false,false,false,false,$use); $xml .= $this->serialize_val($v,'value',false,false,false,false,$use); $xml .= '</item>'; } else { $xml .= $this->serialize_val($v,$k,false,false,false,false,$use); } } $xml .= "</$name>"; } break; default: $xml .= 'not detected, got '.gettype($val).' for '.$val; break; } return $xml; } /** * serializes a message * * @param string $body the XML of the SOAP body * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers * @param array $namespaces optional the namespaces used in generating the body and headers * @param string $style optional (rpc|document) * @param string $use optional (encoded|literal) * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) * @return string the message * @access public */ function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){ // TODO: add an option to automatically run utf8_encode on $body and $headers // if $this->soap_defencoding is UTF-8. Not doing this automatically allows // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1 $this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle"); $this->debug("headers:"); $this->appendDebug($this->varDump($headers)); $this->debug("namespaces:"); $this->appendDebug($this->varDump($namespaces)); // serialize namespaces $ns_string = ''; foreach(array_merge($this->namespaces,$namespaces) as $k => $v){ $ns_string .= " xmlns:$k=\"$v\""; } if($encodingStyle) { $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string"; } // serialize headers if($headers){ if (is_array($headers)) { $xml = ''; foreach ($headers as $header) { $xml .= $this->serialize_val($header, false, false, false, false, false, $use); } $headers = $xml; $this->debug("In serializeEnvelope, serialzied array of headers to $headers"); } $headers = "<SOAP-ENV:Header>".$headers."</SOAP-ENV:Header>"; } // serialize envelope return '<?xml version="1.0" encoding="'.$this->soap_defencoding .'"?'.">". '<SOAP-ENV:Envelope'.$ns_string.">". $headers. "<SOAP-ENV:Body>". $body. "</SOAP-ENV:Body>". "</SOAP-ENV:Envelope>"; } /** * formats a string to be inserted into an HTML stream * * @param string $str The string to format * @return string The formatted string * @access public * @deprecated */ function formatDump($str){ $str = htmlspecialchars($str); return nl2br($str); } /** * contracts (changes namespace to prefix) a qualified name * * @param string $qname qname * @return string contracted qname * @access private */ function contractQname($qname){ // get element namespace //$this->xdebug("Contract $qname"); if (strrpos($qname, ':')) { // get unqualified name $name = substr($qname, strrpos($qname, ':') + 1); // get ns $ns = substr($qname, 0, strrpos($qname, ':')); $p = $this->getPrefixFromNamespace($ns); if ($p) { return $p . ':' . $name; } return $qname; } else { return $qname; } } /** * expands (changes prefix to namespace) a qualified name * * @param string $string qname * @return string expanded qname * @access private */ function expandQname($qname){ // get element prefix if(strpos($qname,':') && !ereg('^http://',$qname)){ // get unqualified name $name = substr(strstr($qname,':'),1); // get ns prefix $prefix = substr($qname,0,strpos($qname,':')); if(isset($this->namespaces[$prefix])){ return $this->namespaces[$prefix].':'.$name; } else { return $qname; } } else { return $qname; } } /** * returns the local part of a prefixed string * returns the original string, if not prefixed * * @param string $str The prefixed string * @return string The local part * @access public */ function getLocalPart($str){ if($sstr = strrchr($str,':')){ // get unqualified name return substr( $sstr, 1 ); } else { return $str; } } /** * returns the prefix part of a prefixed string * returns false, if not prefixed * * @param string $str The prefixed string * @return mixed The prefix or false if there is no prefix * @access public */ function getPrefix($str){ if($pos = strrpos($str,':')){ // get prefix return substr($str,0,$pos); } return false; } /** * pass it a prefix, it returns a namespace * * @param string $prefix The prefix * @return mixed The namespace, false if no namespace has the specified prefix * @access public */ function getNamespaceFromPrefix($prefix){ if (isset($this->namespaces[$prefix])) { return $this->namespaces[$prefix]; } //$this->setError("No namespace registered for prefix '$prefix'"); return false; } /** * returns the prefix for a given namespace (or prefix) * or false if no prefixes registered for the given namespace * * @param string $ns The namespace * @return mixed The prefix, false if the namespace has no prefixes * @access public */ function getPrefixFromNamespace($ns) { foreach ($this->namespaces as $p => $n) { if ($ns == $n || $ns == $p) { $this->usedNamespaces[$p] = $n; return $p; } } return false; } /** * returns the time in ODBC canonical form with microseconds * * @return string The time in ODBC canonical form with microseconds * @access public */ function getmicrotime() { if (function_exists('gettimeofday')) { $tod = gettimeofday(); $sec = $tod['sec']; $usec = $tod['usec']; } else { $sec = time(); $usec = 0; } return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec); } /** * Returns a string with the output of var_dump * * @param mixed $data The variable to var_dump * @return string The output of var_dump * @access public */ function varDump($data) { ob_start(); var_dump($data); $ret_val = ob_get_contents(); ob_end_clean(); return $ret_val; } } // XML Schema Datatype Helper Functions //xsd:dateTime helpers /** * convert unix timestamp to ISO 8601 compliant date string * * @param string $timestamp Unix time stamp * @access public */ function timestamp_to_iso8601($timestamp,$utc=true){ $datestr = date('Y-m-d\TH:i:sO',$timestamp); if($utc){ $eregStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD 'T'. // separator T '([0-9]{2}):'. // hours hh: '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's if(ereg($eregStr,$datestr,$regs)){ return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); } return false; } else { return $datestr; } } /** * convert ISO 8601 compliant date string to unix timestamp * * @param string $datestr ISO 8601 compliant date string * @access public */ function iso8601_to_timestamp($datestr){ $eregStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD 'T'. // separator T '([0-9]{2}):'. // hours hh: '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's if(ereg($eregStr,$datestr,$regs)){ // not utc if($regs[8] != 'Z'){ $op = substr($regs[8],0,1); $h = substr($regs[8],1,2); $m = substr($regs[8],strlen($regs[8])-2,2); if($op == '-'){ $regs[4] = $regs[4] + $h; $regs[5] = $regs[5] + $m; } elseif($op == '+'){ $regs[4] = $regs[4] - $h; $regs[5] = $regs[5] - $m; } } return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z"); } else { return false; } } /** * sleeps some number of microseconds * * @param string $usec the number of microseconds to sleep * @access public * @deprecated */ function usleepWindows($usec) { $start = gettimeofday(); do { $stop = gettimeofday(); $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + $stop['usec'] - $start['usec']; } while ($timePassed < $usec); } ?><?php /** * Contains information for a SOAP fault. * Mainly used for returning faults from deployed functions * in a server instance. * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soap_fault extends nusoap_base { /** * The fault code (client|server) * @var string * @access private */ var $faultcode; /** * The fault actor * @var string * @access private */ var $faultactor; /** * The fault string, a description of the fault * @var string * @access private */ var $faultstring; /** * The fault detail, typically a string or array of string * @var mixed * @access private */ var $faultdetail; /** * constructor * * @param string $faultcode (client | server) * @param string $faultactor only used when msg routed between multiple actors * @param string $faultstring human readable error message * @param mixed $faultdetail detail, typically a string or array of string */ function soap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){ parent::nusoap_base(); $this->faultcode = $faultcode; $this->faultactor = $faultactor; $this->faultstring = $faultstring; $this->faultdetail = $faultdetail; } /** * serialize a fault * * @return string The serialization of the fault instance. * @access public */ function serialize(){ $ns_string = ''; foreach($this->namespaces as $k => $v){ $ns_string .= "\n xmlns:$k=\"$v\""; } $return_msg = '<?xml version="1.0" encoding="'.$this->soap_defencoding.'"?>'. '<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"'.$ns_string.">\n". '<SOAP-ENV:Body>'. '<SOAP-ENV:Fault>'. $this->serialize_val($this->faultcode, 'faultcode'). $this->serialize_val($this->faultactor, 'faultactor'). $this->serialize_val($this->faultstring, 'faultstring'). $this->serialize_val($this->faultdetail, 'detail'). '</SOAP-ENV:Fault>'. '</SOAP-ENV:Body>'. '</SOAP-ENV:Envelope>'; return $return_msg; } } ?><?php /** * parses an XML Schema, allows access to it's data, other utility methods * no validation... yet. * very experimental and limited. As is discussed on XML-DEV, I'm one of the people * that just doesn't have time to read the spec(s) thoroughly, and just have a couple of trusty * tutorials I refer to :) * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class XMLSchema extends nusoap_base { // files var $schema = ''; var $xml = ''; // namespaces var $enclosingNamespaces; // schema info var $schemaInfo = array(); var $schemaTargetNamespace = ''; // types, elements, attributes defined by the schema var $attributes = array(); var $complexTypes = array(); var $complexTypeStack = array(); var $currentComplexType = null; var $elements = array(); var $elementStack = array(); var $currentElement = null; var $simpleTypes = array(); var $simpleTypeStack = array(); var $currentSimpleType = null; // imports var $imports = array(); // parser vars var $parser; var $position = 0; var $depth = 0; var $depth_array = array(); var $message = array(); var $defaultNamespace = array(); /** * constructor * * @param string $schema schema document URI * @param string $xml xml document URI * @param string $namespaces namespaces defined in enclosing XML * @access public */ function XMLSchema($schema='',$xml='',$namespaces=array()){ parent::nusoap_base(); $this->debug('xmlschema class instantiated, inside constructor'); // files $this->schema = $schema; $this->xml = $xml; // namespaces $this->enclosingNamespaces = $namespaces; $this->namespaces = array_merge($this->namespaces, $namespaces); // parse schema file if($schema != ''){ $this->debug('initial schema file: '.$schema); $this->parseFile($schema, 'schema'); } // parse xml file if($xml != ''){ $this->debug('initial xml file: '.$xml); $this->parseFile($xml, 'xml'); } } /** * parse an XML file * * @param string $xml, path/URL to XML file * @param string $type, (schema | xml) * @return boolean * @access public */ function parseFile($xml,$type){ // parse xml file if($xml != ""){ $xmlStr = @join("",@file($xml)); if($xmlStr == ""){ $msg = 'Error reading XML from '.$xml; $this->setError($msg); $this->debug($msg); return false; } else { $this->debug("parsing $xml"); $this->parseString($xmlStr,$type); $this->debug("done parsing $xml"); return true; } } return false; } /** * parse an XML string * * @param string $xml path or URL * @param string $type, (schema|xml) * @access private */ function parseString($xml,$type){ // parse xml string if($xml != ""){ // Create an XML parser. $this->parser = xml_parser_create(); // Set the options for parsing the XML data. xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // Set the object for the parser. xml_set_object($this->parser, $this); // Set the element handlers for the parser. if($type == "schema"){ xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement'); xml_set_character_data_handler($this->parser,'schemaCharacterData'); } elseif($type == "xml"){ xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement'); xml_set_character_data_handler($this->parser,'xmlCharacterData'); } // Parse the XML file. if(!xml_parse($this->parser,$xml,true)){ // Display an error message. $errstr = sprintf('XML error parsing XML schema on line %d: %s', xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser)) ); $this->debug($errstr); $this->debug("XML payload:\n" . $xml); $this->setError($errstr); } xml_parser_free($this->parser); } else{ $this->debug('no xml passed to parseString()!!'); $this->setError('no xml passed to parseString()!!'); } } /** * start-element handler * * @param string $parser XML parser object * @param string $name element name * @param string $attrs associative array of attributes * @access private */ function schemaStartElement($parser, $name, $attrs) { // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; $this->message[$pos] = array('cdata' => ''); if ($depth > 0) { $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; } else { $this->defaultNamespace[$pos] = false; } // get element prefix if($prefix = $this->getPrefix($name)){ // get unqualified name $name = $this->getLocalPart($name); } else { $prefix = ''; } // loop thru attributes, expanding, and registering namespace declarations if(count($attrs) > 0){ foreach($attrs as $k => $v){ // if ns declarations, add to class level array of valid namespaces if(ereg("^xmlns",$k)){ //$this->xdebug("$k: $v"); //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); if($ns_prefix = substr(strrchr($k,':'),1)){ //$this->xdebug("Add namespace[$ns_prefix] = $v"); $this->namespaces[$ns_prefix] = $v; } else { $this->defaultNamespace[$pos] = $v; if (! $this->getPrefixFromNamespace($v)) { $this->namespaces['ns'.(count($this->namespaces)+1)] = $v; } } if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){ $this->XMLSchemaVersion = $v; $this->namespaces['xsi'] = $v.'-instance'; } } } foreach($attrs as $k => $v){ // expand each attribute $k = strpos($k,':') ? $this->expandQname($k) : $k; $v = strpos($v,':') ? $this->expandQname($v) : $v; $eAttrs[$k] = $v; } $attrs = $eAttrs; } else { $attrs = array(); } // find status, register data switch($name){ case 'all': // (optional) compositor content for a complexType case 'choice': case 'group': case 'sequence': //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement"); $this->complexTypes[$this->currentComplexType]['compositor'] = $name; //if($name == 'all' || $name == 'sequence'){ // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; //} break; case 'attribute': // complexType attribute //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']); $this->xdebug("parsing attribute:"); $this->appendDebug($this->varDump($attrs)); if (!isset($attrs['form'])) { $attrs['form'] = $this->schemaInfo['attributeFormDefault']; } if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; if (!strpos($v, ':')) { // no namespace in arrayType attribute value... if ($this->defaultNamespace[$pos]) { // ...so use the default $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; } } } if(isset($attrs['name'])){ $this->attributes[$attrs['name']] = $attrs; $aname = $attrs['name']; } elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){ if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; } else { $aname = ''; } } elseif(isset($attrs['ref'])){ $aname = $attrs['ref']; $this->attributes[$attrs['ref']] = $attrs; } if($this->currentComplexType){ // This should *always* be $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; } // arrayType attribute if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){ $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; $prefix = $this->getPrefix($aname); if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){ $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; } else { $v = ''; } if(strpos($v,'[,]')){ $this->complexTypes[$this->currentComplexType]['multidimensional'] = true; } $v = substr($v,0,strpos($v,'[')); // clip the [] if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){ $v = $this->XMLSchemaVersion.':'.$v; } $this->complexTypes[$this->currentComplexType]['arrayType'] = $v; } break; case 'complexContent': // (optional) content for a complexType break; case 'complexType': array_push($this->complexTypeStack, $this->currentComplexType); if(isset($attrs['name'])){ $this->xdebug('processing named complexType '.$attrs['name']); //$this->currentElement = false; $this->currentComplexType = $attrs['name']; $this->complexTypes[$this->currentComplexType] = $attrs; $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; // This is for constructs like // <complexType name="ListOfString" base="soap:Array"> // <sequence> // <element name="string" type="xsd:string" // minOccurs="0" maxOccurs="unbounded" /> // </sequence> // </complexType> if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; } }else{ $this->xdebug('processing unnamed complexType for element '.$this->currentElement); $this->currentComplexType = $this->currentElement . '_ContainedType'; //$this->currentElement = false; $this->complexTypes[$this->currentComplexType] = $attrs; $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; // This is for constructs like // <complexType name="ListOfString" base="soap:Array"> // <sequence> // <element name="string" type="xsd:string" // minOccurs="0" maxOccurs="unbounded" /> // </sequence> // </complexType> if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; } } break; case 'element': array_push($this->elementStack, $this->currentElement); // elements defined as part of a complex type should // not really be added to $this->elements, but for some // reason, they are if (!isset($attrs['form'])) { $attrs['form'] = $this->schemaInfo['elementFormDefault']; } if(isset($attrs['type'])){ $this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']); if (! $this->getPrefix($attrs['type'])) { if ($this->defaultNamespace[$pos]) { $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type']; $this->xdebug('used default namespace to make type ' . $attrs['type']); } } // This is for constructs like // <complexType name="ListOfString" base="soap:Array"> // <sequence> // <element name="string" type="xsd:string" // minOccurs="0" maxOccurs="unbounded" /> // </sequence> // </complexType> if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') { $this->xdebug('arrayType for unusual array is ' . $attrs['type']); $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type']; } $this->currentElement = $attrs['name']; $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; $ename = $attrs['name']; } elseif(isset($attrs['ref'])){ $this->xdebug("processing element as ref to ".$attrs['ref']); $this->currentElement = "ref to ".$attrs['ref']; $ename = $this->getLocalPart($attrs['ref']); } else { $this->xdebug("processing untyped element ".$attrs['name']); $this->currentElement = $attrs['name']; $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['name'] . '_ContainedType'; $this->elements[ $attrs['name'] ]['type'] = $attrs['type']; $ename = $attrs['name']; } if(isset($ename) && $this->currentComplexType){ $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs; } break; case 'enumeration': // restriction value list member $this->xdebug('enumeration ' . $attrs['value']); if ($this->currentSimpleType) { $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value']; } elseif ($this->currentComplexType) { $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value']; } break; case 'extension': // simpleContent or complexContent type extension $this->xdebug('extension ' . $attrs['base']); if ($this->currentComplexType) { $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base']; } break; case 'import': if (isset($attrs['schemaLocation'])) { //$this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']); $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); } else { //$this->xdebug('import namespace ' . $attrs['namespace']); $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true); if (! $this->getPrefixFromNamespace($attrs['namespace'])) { $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; } } break; case 'list': // simpleType value list break; case 'restriction': // simpleType, simpleContent or complexContent value restriction $this->xdebug('restriction ' . $attrs['base']); if($this->currentSimpleType){ $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base']; } elseif($this->currentComplexType){ $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base']; if(strstr($attrs['base'],':') == ':Array'){ $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } } break; case 'schema': $this->schemaInfo = $attrs; $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix); if (isset($attrs['targetNamespace'])) { $this->schemaTargetNamespace = $attrs['targetNamespace']; } if (!isset($attrs['elementFormDefault'])) { $this->schemaInfo['elementFormDefault'] = 'unqualified'; } if (!isset($attrs['attributeFormDefault'])) { $this->schemaInfo['attributeFormDefault'] = 'unqualified'; } break; case 'simpleContent': // (optional) content for a complexType break; case 'simpleType': array_push($this->simpleTypeStack, $this->currentSimpleType); if(isset($attrs['name'])){ $this->xdebug("processing simpleType for name " . $attrs['name']); $this->currentSimpleType = $attrs['name']; $this->simpleTypes[ $attrs['name'] ] = $attrs; $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType'; $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar'; } else { $this->xdebug('processing unnamed simpleType for element '.$this->currentElement); $this->currentSimpleType = $this->currentElement . '_ContainedType'; //$this->currentElement = false; $this->simpleTypes[$this->currentSimpleType] = $attrs; $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar'; } break; case 'union': // simpleType type list break; default: //$this->xdebug("do not have anything to do for element $name"); } } /** * end-element handler * * @param string $parser XML parser object * @param string $name element name * @access private */ function schemaEndElement($parser, $name) { // bring depth down a notch $this->depth--; // position of current element is equal to the last value left in depth_array for my depth if(isset($this->depth_array[$this->depth])){ $pos = $this->depth_array[$this->depth]; } // get element prefix if ($prefix = $this->getPrefix($name)){ // get unqualified name $name = $this->getLocalPart($name); } else { $prefix = ''; } // move on... if($name == 'complexType'){ $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)')); $this->currentComplexType = array_pop($this->complexTypeStack); //$this->currentElement = false; } if($name == 'element'){ $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)')); $this->currentElement = array_pop($this->elementStack); } if($name == 'simpleType'){ $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)')); $this->currentSimpleType = array_pop($this->simpleTypeStack); } } /** * element content handler * * @param string $parser XML parser object * @param string $data element content * @access private */ function schemaCharacterData($parser, $data){ $pos = $this->depth_array[$this->depth - 1]; $this->message[$pos]['cdata'] .= $data; } /** * serialize the schema * * @access public */ function serializeSchema(){ $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion); $xml = ''; // imports if (sizeof($this->imports) > 0) { foreach($this->imports as $ns => $list) { foreach ($list as $ii) { if ($ii['location'] != '') { $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; } else { $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; } } } } // complex types foreach($this->complexTypes as $typeName => $attrs){ $contentStr = ''; // serialize child elements if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){ foreach($attrs['elements'] as $element => $eParts){ if(isset($eParts['ref'])){ $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n"; } else { $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\""; foreach ($eParts as $aName => $aValue) { // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable if ($aName != 'name' && $aName != 'type') { $contentStr .= " $aName=\"$aValue\""; } } $contentStr .= "/>\n"; } } // compositor wraps elements if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) { $contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." </$schemaPrefix:$attrs[compositor]>\n"; } } // attributes if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){ foreach($attrs['attrs'] as $attr => $aParts){ $contentStr .= " <$schemaPrefix:attribute"; foreach ($aParts as $a => $v) { if ($a == 'ref' || $a == 'type') { $contentStr .= " $a=\"".$this->contractQName($v).'"'; } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') { $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl']; $contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"'; } else { $contentStr .= " $a=\"$v\""; } } $contentStr .= "/>\n"; } } // if restriction if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){ $contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." </$schemaPrefix:restriction>\n"; // complex or simple content if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){ $contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." </$schemaPrefix:complexContent>\n"; } } // finalize complex type if($contentStr != ''){ $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." </$schemaPrefix:complexType>\n"; } else { $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n"; } $xml .= $contentStr; } // simple types if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){ foreach($this->simpleTypes as $typeName => $eParts){ $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\"/>\n"; if (isset($eParts['enumeration'])) { foreach ($eParts['enumeration'] as $e) { $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n"; } } $xml .= " </$schemaPrefix:simpleType>"; } } // elements if(isset($this->elements) && count($this->elements) > 0){ foreach($this->elements as $element => $eParts){ $xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n"; } } // attributes if(isset($this->attributes) && count($this->attributes) > 0){ foreach($this->attributes as $attr => $aParts){ $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>"; } } // finish 'er up $el = "<$schemaPrefix:schema targetNamespace=\"$this->schemaTargetNamespace\"\n"; foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) { $el .= " xmlns:$nsp=\"$ns\"\n"; } $xml = $el . ">\n".$xml."</$schemaPrefix:schema>\n"; return $xml; } /** * adds debug data to the clas level debug string * * @param string $string debug data * @access private */ function xdebug($string){ $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); } /** * get the PHP type of a user defined type in the schema * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays * returns false if no type exists, or not w/ the given namespace * else returns a string that is either a native php type, or 'struct' * * @param string $type, name of defined type * @param string $ns, namespace of type * @return mixed * @access public * @deprecated */ function getPHPType($type,$ns){ if(isset($this->typemap[$ns][$type])){ //print "found type '$type' and ns $ns in typemap<br>"; return $this->typemap[$ns][$type]; } elseif(isset($this->complexTypes[$type])){ //print "getting type '$type' and ns $ns from complexTypes array<br>"; return $this->complexTypes[$type]['phpType']; } return false; } /** * returns an associative array of information about a given type * returns false if no type exists by the given name * * For a complexType typeDef = array( * 'restrictionBase' => '', * 'phpType' => '', * 'compositor' => '(sequence|all)', * 'elements' => array(), // refs to elements array * 'attrs' => array() // refs to attributes array * ... and so on (see addComplexType) * ) * * For simpleType or element, the array has different keys. * * @param string * @return mixed * @access public * @see addComplexType * @see addSimpleType * @see addElement */ function getTypeDef($type){ //$this->debug("in getTypeDef for type $type"); if(isset($this->complexTypes[$type])){ $this->xdebug("in getTypeDef, found complexType $type"); return $this->complexTypes[$type]; } elseif(isset($this->simpleTypes[$type])){ $this->xdebug("in getTypeDef, found simpleType $type"); if (!isset($this->simpleTypes[$type]['phpType'])) { // get info for type to tack onto the simple type // TODO: can this ever really apply (i.e. what is a simpleType really?) $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1); $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':')); $etype = $this->getTypeDef($uqType); if ($etype) { $this->xdebug("in getTypeDef, found type for simpleType $type:"); $this->xdebug($this->varDump($etype)); if (isset($etype['phpType'])) { $this->simpleTypes[$type]['phpType'] = $etype['phpType']; } if (isset($etype['elements'])) { $this->simpleTypes[$type]['elements'] = $etype['elements']; } } } return $this->simpleTypes[$type]; } elseif(isset($this->elements[$type])){ $this->xdebug("in getTypeDef, found element $type"); if (!isset($this->elements[$type]['phpType'])) { // get info for type to tack onto the element $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1); $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':')); $etype = $this->getTypeDef($uqType); if ($etype) { $this->xdebug("in getTypeDef, found type for element $type:"); $this->xdebug($this->varDump($etype)); if (isset($etype['phpType'])) { $this->elements[$type]['phpType'] = $etype['phpType']; } if (isset($etype['elements'])) { $this->elements[$type]['elements'] = $etype['elements']; } } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') { $this->xdebug("in getTypeDef, element $type is an XSD type"); $this->elements[$type]['phpType'] = 'scalar'; } } return $this->elements[$type]; } elseif(isset($this->attributes[$type])){ $this->xdebug("in getTypeDef, found attribute $type"); return $this->attributes[$type]; } elseif (ereg('_ContainedType$', $type)) { $this->xdebug("in getTypeDef, have an untyped element $type"); $typeDef['typeClass'] = 'simpleType'; $typeDef['phpType'] = 'scalar'; $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string'; return $typeDef; } $this->xdebug("in getTypeDef, did not find $type"); return false; } /** * returns a sample serialization of a given type, or false if no type by the given name * * @param string $type, name of type * @return mixed * @access public * @deprecated */ function serializeTypeDef($type){ //print "in sTD() for type $type<br>"; if($typeDef = $this->getTypeDef($type)){ $str .= '<'.$type; if(is_array($typeDef['attrs'])){ foreach($attrs as $attName => $data){ $str .= " $attName=\"{type = ".$data['type']."}\""; } } $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; if(count($typeDef['elements']) > 0){ $str .= ">"; foreach($typeDef['elements'] as $element => $eData){ $str .= $this->serializeTypeDef($element); } $str .= "</$type>"; } elseif($typeDef['typeClass'] == 'element') { $str .= "></$type>"; } else { $str .= "/>"; } return $str; } return false; } /** * returns HTML form elements that allow a user * to enter values for creating an instance of the given type. * * @param string $name, name for type instance * @param string $type, name of type * @return string * @access public * @deprecated */ function typeToForm($name,$type){ // get typedef if($typeDef = $this->getTypeDef($type)){ // if struct if($typeDef['phpType'] == 'struct'){ $buffer .= '<table>'; foreach($typeDef['elements'] as $child => $childDef){ $buffer .= " <tr><td align='right'>$childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):</td> <td><input type='text' name='parameters[".$name."][$childDef[name]]'></td></tr>"; } $buffer .= '</table>'; // if array } elseif($typeDef['phpType'] == 'array'){ $buffer .= '<table>'; for($i=0;$i < 3; $i++){ $buffer .= " <tr><td align='right'>array item (type: $typeDef[arrayType]):</td> <td><input type='text' name='parameters[".$name."][]'></td></tr>"; } $buffer .= '</table>'; // if scalar } else { $buffer .= "<input type='text' name='parameters[$name]'>"; } } else { $buffer .= "<input type='text' name='parameters[$name]'>"; } return $buffer; } /** * adds a complex type to the schema * * example: array * * addType( * 'ArrayOfstring', * 'complexType', * 'array', * '', * 'SOAP-ENC:Array', * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), * 'xsd:string' * ); * * example: PHP associative array ( SOAP Struct ) * * addType( * 'SOAPStruct', * 'complexType', * 'struct', * 'all', * array('myVar'=> array('name'=>'myVar','type'=>'string') * ); * * @param name * @param typeClass (complexType|simpleType|attribute) * @param phpType: currently supported are array and struct (php assoc array) * @param compositor (all|sequence|choice) * @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param elements = array ( name = array(name=>'',type=>'') ) * @param attrs = array( * array( * 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", * "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" * ) * ) * @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string) * @access public * @see getTypeDef */ function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){ $this->complexTypes[$name] = array( 'name' => $name, 'typeClass' => $typeClass, 'phpType' => $phpType, 'compositor'=> $compositor, 'restrictionBase' => $restrictionBase, 'elements' => $elements, 'attrs' => $attrs, 'arrayType' => $arrayType ); $this->xdebug("addComplexType $name:"); $this->appendDebug($this->varDump($this->complexTypes[$name])); } /** * adds a simple type to the schema * * @param string $name * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param string $typeClass (should always be simpleType) * @param string $phpType (should always be scalar) * @param array $enumeration array of values * @access public * @see xmlschema * @see getTypeDef */ function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { $this->simpleTypes[$name] = array( 'name' => $name, 'typeClass' => $typeClass, 'phpType' => $phpType, 'type' => $restrictionBase, 'enumeration' => $enumeration ); $this->xdebug("addSimpleType $name:"); $this->appendDebug($this->varDump($this->simpleTypes[$name])); } /** * adds an element to the schema * * @param array $attrs attributes that must include name and type * @see xmlschema * @access public */ function addElement($attrs) { if (! $this->getPrefix($attrs['type'])) { $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type']; } $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; $this->xdebug("addElement " . $attrs['name']); $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); } } ?><?php /** * For creating serializable abstractions of native PHP types. This class * allows element name/namespace, XSD type, and XML attributes to be * associated with a value. This is extremely useful when WSDL is not * used, but is also useful when WSDL is used with polymorphic types, including * xsd:anyType and user-defined types. * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soapval extends nusoap_base { /** * The XML element name * * @var string * @access private */ var $name; /** * The XML type name (string or false) * * @var mixed * @access private */ var $type; /** * The PHP value * * @var mixed * @access private */ var $value; /** * The XML element namespace (string or false) * * @var mixed * @access private */ var $element_ns; /** * The XML type namespace (string or false) * * @var mixed * @access private */ var $type_ns; /** * The XML element attributes (array or false) * * @var mixed * @access private */ var $attributes; /** * constructor * * @param string $name optional name * @param mixed $type optional type name * @param mixed $value optional value * @param mixed $element_ns optional namespace of value * @param mixed $type_ns optional namespace of type * @param mixed $attributes associative array of attributes to add to element serialization * @access public */ function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) { parent::nusoap_base(); $this->name = $name; $this->type = $type; $this->value = $value; $this->element_ns = $element_ns; $this->type_ns = $type_ns; $this->attributes = $attributes; } /** * return serialized value * * @param string $use The WSDL use value (encoded|literal) * @return string XML data * @access public */ function serialize($use='encoded') { return $this->serialize_val($this->value,$this->name,$this->type,$this->element_ns,$this->type_ns,$this->attributes,$use); } /** * decodes a soapval object into a PHP native type * * @return mixed * @access public */ function decode(){ return $this->value; } } ?><?php /** * transport class for sending/receiving data via HTTP and HTTPS * NOTE: PHP must be compiled with the CURL extension for HTTPS support * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soap_transport_http extends nusoap_base { var $url = ''; var $uri = ''; var $digest_uri = ''; var $scheme = ''; var $host = ''; var $port = ''; var $path = ''; var $request_method = 'POST'; var $protocol_version = '1.0'; var $encoding = ''; var $outgoing_headers = array(); var $incoming_headers = array(); var $incoming_cookies = array(); var $outgoing_payload = ''; var $incoming_payload = ''; var $useSOAPAction = true; var $persistentConnection = false; var $ch = false; // cURL handle var $username = ''; var $password = ''; var $authtype = ''; var $digestRequest = array(); var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional) // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' // passphrase: SSL key password/passphrase // verifypeer: default is 1 // verifyhost: default is 1 /** * constructor */ function soap_transport_http($url){ parent::nusoap_base(); $this->setURL($url); ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')'; $this->debug('set User-Agent: ' . $this->outgoing_headers['User-Agent']); } function setURL($url) { $this->url = $url; $u = parse_url($url); foreach($u as $k => $v){ $this->debug("$k = $v"); $this->$k = $v; } // add any GET params to path if(isset($u['query']) && $u['query'] != ''){ $this->path .= '?' . $u['query']; } // set default port if(!isset($u['port'])){ if($u['scheme'] == 'https'){ $this->port = 443; } else { $this->port = 80; } } $this->uri = $this->path; $this->digest_uri = $this->uri; // build headers if (!isset($u['port'])) { $this->outgoing_headers['Host'] = $this->host; } else { $this->outgoing_headers['Host'] = $this->host.':'.$this->port; } $this->debug('set Host: ' . $this->outgoing_headers['Host']); if (isset($u['user']) && $u['user'] != '') { $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : ''); } } function connect($connection_timeout=0,$response_timeout=50){ // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like // "regular" socket. // TODO: disabled for now because OpenSSL must be *compiled* in (not just // loaded), and until PHP5 stream_get_wrappers is not available. // if ($this->scheme == 'https') { // if (version_compare(phpversion(), '4.3.0') >= 0) { // if (extension_loaded('openssl')) { // $this->scheme = 'ssl'; // $this->debug('Using SSL over OpenSSL'); // } // } // } $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port"); if ($this->scheme == 'http' || $this->scheme == 'ssl') { // use persistent connection if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){ if (!feof($this->fp)) { $this->debug('Re-use persistent connection'); return true; } fclose($this->fp); $this->debug('Closed persistent connection at EOF'); } // munge host if using OpenSSL if ($this->scheme == 'ssl') { $host = 'ssl://' . $this->host; } else { $host = $this->host; } $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout); // open socket if($connection_timeout > 0){ $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); } else { $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); } // test pointer if(!$this->fp) { $msg = 'Couldn\'t open socket connection to server ' . $this->url; if ($this->errno) { $msg .= ', Error ('.$this->errno.'): '.$this->error_str; } else { $msg .= ' prior to connect(). This is often a problem looking up the host name.'; } $this->debug($msg); $this->setError($msg); return false; } // set response timeout $this->debug('set response timeout to ' . $response_timeout); socket_set_timeout( $this->fp, $response_timeout); $this->debug('socket connected'); return true; } else if ($this->scheme == 'https') { if (!extension_loaded('curl')) { $this->setError('CURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS'); return false; } $this->debug('connect using https'); // init CURL $this->ch = curl_init(); // set url $hostURL = ($this->port != '') ? "https://$this->host:$this->port" : "https://$this->host"; // add path $hostURL .= $this->path; curl_setopt($this->ch, CURLOPT_URL, $hostURL); // follow location headers (re-directs) curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1); // ask for headers in the response output curl_setopt($this->ch, CURLOPT_HEADER, 1); // ask for the response output as the return value curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1); // encode // We manage this ourselves through headers and encoding // if(function_exists('gzuncompress')){ // curl_setopt($this->ch, CURLOPT_ENCODING, 'deflate'); // } // persistent connection if ($this->persistentConnection) { // The way we send data, we cannot use persistent connections, since // there will be some "junk" at the end of our request. //curl_setopt($this->ch, CURL_HTTP_VERSION_1_1, true); $this->persistentConnection = false; $this->outgoing_headers['Connection'] = 'close'; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); } // set timeout if ($connection_timeout != 0) { curl_setopt($this->ch, CURLOPT_TIMEOUT, $connection_timeout); } // TODO: cURL has added a connection timeout separate from the response timeout //if ($connection_timeout != 0) { // curl_setopt($this->ch, CURLOPT_CONNECTIONTIMEOUT, $connection_timeout); //} //if ($response_timeout != 0) { // curl_setopt($this->ch, CURLOPT_TIMEOUT, $response_timeout); //} // recent versions of cURL turn on peer/host checking by default, // while PHP binaries are not compiled with a default location for the // CA cert bundle, so disable peer/host checking. //curl_setopt($this->ch, CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0); // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) if ($this->authtype == 'certificate') { if (isset($this->certRequest['cainfofile'])) { curl_setopt($this->ch, CURLOPT_CAINFO, $this->certRequest['cainfofile']); } if (isset($this->certRequest['verifypeer'])) { curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']); } else { curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 1); } if (isset($this->certRequest['verifyhost'])) { curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']); } else { curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 1); } if (isset($this->certRequest['sslcertfile'])) { curl_setopt($this->ch, CURLOPT_SSLCERT, $this->certRequest['sslcertfile']); } if (isset($this->certRequest['sslkeyfile'])) { curl_setopt($this->ch, CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']); } if (isset($this->certRequest['passphrase'])) { curl_setopt($this->ch, CURLOPT_SSLKEYPASSWD , $this->certRequest['passphrase']); } } $this->debug('cURL connection set up'); return true; } else { $this->setError('Unknown scheme ' . $this->scheme); $this->debug('Unknown scheme ' . $this->scheme); return false; } } /** * send the SOAP message via HTTP * * @param string $data message data * @param integer $timeout set connection timeout in seconds * @param integer $response_timeout set response timeout in seconds * @param array $cookies cookies to send * @return string data * @access public */ function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { $this->debug('entered send() with data of length: '.strlen($data)); $this->tryagain = true; $tries = 0; while ($this->tryagain) { $this->tryagain = false; if ($tries++ < 2) { // make connnection if (!$this->connect($timeout, $response_timeout)){ return false; } // send request if (!$this->sendRequest($data, $cookies)){ return false; } // get response $respdata = $this->getResponse(); } else { $this->setError('Too many tries to get an OK response'); } } $this->debug('end of send()'); return $respdata; } /** * send the SOAP message via HTTPS 1.0 using CURL * * @param string $msg message data * @param integer $timeout set connection timeout in seconds * @param integer $response_timeout set response timeout in seconds * @param array $cookies cookies to send * @return string data * @access public */ function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { return $this->send($data, $timeout, $response_timeout, $cookies); } /** * if authenticating, set user credentials here * * @param string $username * @param string $password * @param string $authtype (basic, digest, certificate) * @param array $digestRequest (keys must be nonce, nc, realm, qop) * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) * @access public */ function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) { $this->debug("Set credentials for authtype $authtype"); // cf. RFC 2617 if ($authtype == 'basic') { $this->outgoing_headers['Authorization'] = 'Basic '.base64_encode(str_replace(':','',$username).':'.$password); } elseif ($authtype == 'digest') { if (isset($digestRequest['nonce'])) { $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) // A1 = unq(username-value) ":" unq(realm-value) ":" passwd $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; // H(A1) = MD5(A1) $HA1 = md5($A1); // A2 = Method ":" digest-uri-value $A2 = 'POST:' . $this->digest_uri; // H(A2) $HA2 = md5($A2); // KD(secret, data) = H(concat(secret, ":", data)) // if qop == auth: // request-digest = <"> < KD ( H(A1), unq(nonce-value) // ":" nc-value // ":" unq(cnonce-value) // ":" unq(qop-value) // ":" H(A2) // ) <"> // if qop is missing, // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> $unhashedDigest = ''; $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; $cnonce = $nonce; if ($digestRequest['qop'] != '') { $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2; } else { $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; } $hashedDigest = md5($unhashedDigest); $this->outgoing_headers['Authorization'] = 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"'; } } elseif ($authtype == 'certificate') { $this->certRequest = $certRequest; } $this->username = $username; $this->password = $password; $this->authtype = $authtype; $this->digestRequest = $digestRequest; if (isset($this->outgoing_headers['Authorization'])) { $this->debug('set Authorization: ' . substr($this->outgoing_headers['Authorization'], 0, 12) . '...'); } else { $this->debug('Authorization header not set'); } } /** * set the soapaction value * * @param string $soapaction * @access public */ function setSOAPAction($soapaction) { $this->outgoing_headers['SOAPAction'] = '"' . $soapaction . '"'; $this->debug('set SOAPAction: ' . $this->outgoing_headers['SOAPAction']); } /** * use http encoding * * @param string $enc encoding style. supported values: gzip, deflate, or both * @access public */ function setEncoding($enc='gzip, deflate') { if (function_exists('gzdeflate')) { $this->protocol_version = '1.1'; $this->outgoing_headers['Accept-Encoding'] = $enc; $this->debug('set Accept-Encoding: ' . $this->outgoing_headers['Accept-Encoding']); if (!isset($this->outgoing_headers['Connection'])) { $this->outgoing_headers['Connection'] = 'close'; $this->persistentConnection = false; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); } set_magic_quotes_runtime(0); // deprecated $this->encoding = $enc; } } /** * set proxy info here * * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @access public */ function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { $this->uri = $this->url; $this->host = $proxyhost; $this->port = $proxyport; if ($proxyusername != '' && $proxypassword != '') { $this->outgoing_headers['Proxy-Authorization'] = ' Basic '.base64_encode($proxyusername.':'.$proxypassword); $this->debug('set Proxy-Authorization: ' . $this->outgoing_headers['Proxy-Authorization']); } } /** * decode a string that is encoded w/ "chunked' transfer encoding * as defined in RFC2068 19.4.6 * * @param string $buffer * @param string $lb * @returns string * @access public * @deprecated */ function decodeChunked($buffer, $lb){ // length := 0 $length = 0; $new = ''; // read chunk-size, chunk-extension (if any) and CRLF // get the position of the linebreak $chunkend = strpos($buffer, $lb); if ($chunkend == FALSE) { $this->debug('no linebreak found in decodeChunked'); return $new; } $temp = substr($buffer,0,$chunkend); $chunk_size = hexdec( trim($temp) ); $chunkstart = $chunkend + strlen($lb); // while (chunk-size > 0) { while ($chunk_size > 0) { $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); // Just in case we got a broken connection if ($chunkend == FALSE) { $chunk = substr($buffer,$chunkstart); // append chunk-data to entity-body $new .= $chunk; $length += strlen($chunk); break; } // read chunk-data and CRLF $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); // append chunk-data to entity-body $new .= $chunk; // length := length + chunk-size $length += strlen($chunk); // read chunk-size and CRLF $chunkstart = $chunkend + strlen($lb); $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); if ($chunkend == FALSE) { break; //Just in case we got a broken connection } $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); $chunk_size = hexdec( trim($temp) ); $chunkstart = $chunkend; } return $new; } /* * Writes payload, including HTTP headers, to $this->outgoing_payload. */ function buildPayload($data, $cookie_str = '') { // add content-length header $this->outgoing_headers['Content-Length'] = strlen($data); $this->debug('set Content-Length: ' . $this->outgoing_headers['Content-Length']); // start building outgoing payload: $req = "$this->request_method $this->uri HTTP/$this->protocol_version"; $this->debug("HTTP request: $req"); $this->outgoing_payload = "$req\r\n"; // loop thru headers, serializing foreach($this->outgoing_headers as $k => $v){ $hdr = $k.': '.$v; $this->debug("HTTP header: $hdr"); $this->outgoing_payload .= "$hdr\r\n"; } // add any cookies if ($cookie_str != '') { $hdr = 'Cookie: '.$cookie_str; $this->debug("HTTP header: $hdr"); $this->outgoing_payload .= "$hdr\r\n"; } // header/body separator $this->outgoing_payload .= "\r\n"; // add data $this->outgoing_payload .= $data; } function sendRequest($data, $cookies = NULL) { // build cookie string $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https'))); // build payload $this->buildPayload($data, $cookie_str); if ($this->scheme == 'http' || $this->scheme == 'ssl') { // send payload if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) { $this->setError('couldn\'t write message data to socket'); $this->debug('couldn\'t write message data to socket'); return false; } $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload)); return true; } else if ($this->scheme == 'https') { // set payload // TODO: cURL does say this should only be the verb, and in fact it // turns out that the URI and HTTP version are appended to this, which // some servers refuse to work with //curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $this->outgoing_payload); foreach($this->outgoing_headers as $k => $v){ $curl_headers[] = "$k: $v"; } if ($cookie_str != '') { $curl_headers[] = 'Cookie: ' . $cookie_str; } curl_setopt($this->ch, CURLOPT_HTTPHEADER, $curl_headers); if ($this->request_method == "POST") { curl_setopt($this->ch, CURLOPT_POST, 1); curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data); } else { } $this->debug('set cURL payload'); return true; } } function getResponse(){ $this->incoming_payload = ''; if ($this->scheme == 'http' || $this->scheme == 'ssl') { // loop until headers have been retrieved $data = ''; while (!isset($lb)){ // We might EOF during header read. if(feof($this->fp)) { $this->incoming_payload = $data; $this->debug('found no headers before EOF after length ' . strlen($data)); $this->debug("received before EOF:\n" . $data); $this->setError('server failed to send headers'); return false; } $tmp = fgets($this->fp, 256); $tmplen = strlen($tmp); $this->debug("read line of $tmplen bytes: " . trim($tmp)); if ($tmplen == 0) { $this->incoming_payload = $data; $this->debug('socket read of headers timed out after length ' . strlen($data)); $this->debug("read before timeout: " . $data); $this->setError('socket read of headers timed out'); return false; } $data .= $tmp; $pos = strpos($data,"\r\n\r\n"); if($pos > 1){ $lb = "\r\n"; } else { $pos = strpos($data,"\n\n"); if($pos > 1){ $lb = "\n"; } } // remove 100 header if(isset($lb) && ereg('^HTTP/1.1 100',$data)){ unset($lb); $data = ''; }// } // store header data $this->incoming_payload .= $data; $this->debug('found end of headers after length ' . strlen($data)); // process headers $header_data = trim(substr($data,0,$pos)); $header_array = explode($lb,$header_data); $this->incoming_headers = array(); $this->incoming_cookies = array(); foreach($header_array as $header_line){ $arr = explode(':',$header_line, 2); if(count($arr) > 1){ $header_name = strtolower(trim($arr[0])); $this->incoming_headers[$header_name] = trim($arr[1]); if ($header_name == 'set-cookie') { // TODO: allow multiple cookies from parseCookie $cookie = $this->parseCookie(trim($arr[1])); if ($cookie) { $this->incoming_cookies[] = $cookie; $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); } else { $this->debug('did not find cookie in ' . trim($arr[1])); } } } else if (isset($header_name)) { // append continuation line to previous header $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; } } // loop until msg has been received if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { $content_length = 2147483647; // ignore any content-length header $chunked = true; $this->debug("want to read chunked content"); } elseif (isset($this->incoming_headers['content-length'])) { $content_length = $this->incoming_headers['content-length']; $chunked = false; $this->debug("want to read content of length $content_length"); } else { $content_length = 2147483647; $chunked = false; $this->debug("want to read content to EOF"); } $data = ''; do { if ($chunked) { $tmp = fgets($this->fp, 256); $tmplen = strlen($tmp); $this->debug("read chunk line of $tmplen bytes"); if ($tmplen == 0) { $this->incoming_payload = $data; $this->debug('socket read of chunk length timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of chunk length timed out'); return false; } $content_length = hexdec(trim($tmp)); $this->debug("chunk length $content_length"); } $strlen = 0; while (($strlen < $content_length) && (!feof($this->fp))) { $readlen = min(8192, $content_length - $strlen); $tmp = fread($this->fp, $readlen); $tmplen = strlen($tmp); $this->debug("read buffer of $tmplen bytes"); if (($tmplen == 0) && (!feof($this->fp))) { $this->incoming_payload = $data; $this->debug('socket read of body timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of body timed out'); return false; } $strlen += $tmplen; $data .= $tmp; } if ($chunked && ($content_length > 0)) { $tmp = fgets($this->fp, 256); $tmplen = strlen($tmp); $this->debug("read chunk terminator of $tmplen bytes"); if ($tmplen == 0) { $this->incoming_payload = $data; $this->debug('socket read of chunk terminator timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of chunk terminator timed out'); return false; } } } while ($chunked && ($content_length > 0) && (!feof($this->fp))); if (feof($this->fp)) { $this->debug('read to EOF'); } $this->debug('read body of length ' . strlen($data)); $this->incoming_payload .= $data; $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); // close filepointer if( (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || (! $this->persistentConnection) || feof($this->fp)){ fclose($this->fp); $this->fp = false; $this->debug('closed socket'); } // connection was closed unexpectedly if($this->incoming_payload == ''){ $this->setError('no response from server'); return false; } // decode transfer-encoding // if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ // if(!$data = $this->decodeChunked($data, $lb)){ // $this->setError('Decoding of chunked data failed'); // return false; // } //print "<pre>\nde-chunked:\n---------------\n$data\n\n---------------\n</pre>"; // set decoded payload // $this->incoming_payload = $header_data.$lb.$lb.$data; // } } else if ($this->scheme == 'https') { // send and receive $this->debug('send and receive with cURL'); $this->incoming_payload = curl_exec($this->ch); $data = $this->incoming_payload; $cErr = curl_error($this->ch); if ($cErr != '') { $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'<br>'; // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE foreach(curl_getinfo($this->ch) as $k => $v){ $err .= "$k: $v<br>"; } $this->debug($err); $this->setError($err); curl_close($this->ch); return false; } else { //echo '<pre>'; //var_dump(curl_getinfo($this->ch)); //echo '</pre>'; } // close curl $this->debug('No cURL error, closing cURL'); curl_close($this->ch); // remove 100 header(s) while (ereg('^HTTP/1.1 100',$data)) { if ($pos = strpos($data,"\r\n\r\n")) { $data = ltrim(substr($data,$pos)); } elseif($pos = strpos($data,"\n\n") ) { $data = ltrim(substr($data,$pos)); } } // separate content from HTTP headers if ($pos = strpos($data,"\r\n\r\n")) { $lb = "\r\n"; } elseif( $pos = strpos($data,"\n\n")) { $lb = "\n"; } else { $this->debug('no proper separation of headers and document'); $this->setError('no proper separation of headers and document'); return false; } $header_data = trim(substr($data,0,$pos)); $header_array = explode($lb,$header_data); $data = ltrim(substr($data,$pos)); $this->debug('found proper separation of headers and document'); $this->debug('cleaned data, stringlen: '.strlen($data)); // clean headers foreach ($header_array as $header_line) { $arr = explode(':',$header_line,2); if(count($arr) > 1){ $header_name = strtolower(trim($arr[0])); $this->incoming_headers[$header_name] = trim($arr[1]); if ($header_name == 'set-cookie') { // TODO: allow multiple cookies from parseCookie $cookie = $this->parseCookie(trim($arr[1])); if ($cookie) { $this->incoming_cookies[] = $cookie; $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); } else { $this->debug('did not find cookie in ' . trim($arr[1])); } } } else if (isset($header_name)) { // append continuation line to previous header $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; } } } $arr = explode(' ', $header_array[0], 3); $http_version = $arr[0]; $http_status = intval($arr[1]); $http_reason = count($arr) > 2 ? $arr[2] : ''; // see if we need to resend the request with http digest authentication if (isset($this->incoming_headers['location']) && $http_status == 301) { $this->debug("Got 301 $http_reason with Location: " . $this->incoming_headers['location']); $this->setURL($this->incoming_headers['location']); $this->tryagain = true; return false; } // see if we need to resend the request with http digest authentication if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) { $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']); if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) { $this->debug('Server wants digest authentication'); // remove "Digest " from our elements $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); // parse elements into array $digestElements = explode(',', $digestString); foreach ($digestElements as $val) { $tempElement = explode('=', trim($val), 2); $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]); } // should have (at least) qop, realm, nonce if (isset($digestRequest['nonce'])) { $this->setCredentials($this->username, $this->password, 'digest', $digestRequest); $this->tryagain = true; return false; } } $this->debug('HTTP authentication failed'); $this->setError('HTTP authentication failed'); return false; } if ( ($http_status >= 300 && $http_status <= 307) || ($http_status >= 400 && $http_status <= 417) || ($http_status >= 501 && $http_status <= 505) ) { $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclient->response has contents of the response)"); return false; } // decode content-encoding if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){ if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){ // if decoding works, use it. else assume data wasn't gzencoded if(function_exists('gzinflate')){ //$timer->setMarker('starting decoding of gzip/deflated content'); // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress) // this means there are no Zlib headers, although there should be $this->debug('The gzinflate function exists'); $datalen = strlen($data); if ($this->incoming_headers['content-encoding'] == 'deflate') { if ($degzdata = @gzinflate($data)) { $data = $degzdata; $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes'); if (strlen($data) < $datalen) { // test for the case that the payload has been compressed twice $this->debug('The inflated payload is smaller than the gzipped one; try again'); if ($degzdata = @gzinflate($data)) { $data = $degzdata; $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes'); } } } else { $this->debug('Error using gzinflate to inflate the payload'); $this->setError('Error using gzinflate to inflate the payload'); } } elseif ($this->incoming_headers['content-encoding'] == 'gzip') { if ($degzdata = @gzinflate(substr($data, 10))) { // do our best $data = $degzdata; $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes'); if (strlen($data) < $datalen) { // test for the case that the payload has been compressed twice $this->debug('The un-gzipped payload is smaller than the gzipped one; try again'); if ($degzdata = @gzinflate(substr($data, 10))) { $data = $degzdata; $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes'); } } } else { $this->debug('Error using gzinflate to un-gzip the payload'); $this->setError('Error using gzinflate to un-gzip the payload'); } } //$timer->setMarker('finished decoding of gzip/deflated content'); //print "<xmp>\nde-inflated:\n---------------\n$data\n-------------\n</xmp>"; // set decoded payload $this->incoming_payload = $header_data.$lb.$lb.$data; } else { $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); } } else { $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); } } else { $this->debug('No Content-Encoding header'); } if(strlen($data) == 0){ $this->debug('no data after headers!'); $this->setError('no data present after HTTP headers'); return false; } return $data; } function setContentType($type, $charset = false) { $this->outgoing_headers['Content-Type'] = $type . ($charset ? '; charset=' . $charset : ''); $this->debug('set Content-Type: ' . $this->outgoing_headers['Content-Type']); } function usePersistentConnection(){ if (isset($this->outgoing_headers['Accept-Encoding'])) { return false; } $this->protocol_version = '1.1'; $this->persistentConnection = true; $this->outgoing_headers['Connection'] = 'Keep-Alive'; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); return true; } /** * parse an incoming Cookie into it's parts * * @param string $cookie_str content of cookie * @return array with data of that cookie * @access private */ /* * TODO: allow a Set-Cookie string to be parsed into multiple cookies */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; $data = split(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; $start = strpos($cookie_str, $cookie_param); if ($start > 0) { $domain = substr($cookie_str, $start + strlen($cookie_param)); $domain = substr($domain, 0, strpos($domain, ';')); } else { $domain = ''; } $cookie_param = 'expires='; $start = strpos($cookie_str, $cookie_param); if ($start > 0) { $expires = substr($cookie_str, $start + strlen($cookie_param)); $expires = substr($expires, 0, strpos($expires, ';')); } else { $expires = ''; } $cookie_param = 'path='; $start = strpos($cookie_str, $cookie_param); if ( $start > 0 ) { $path = substr($cookie_str, $start + strlen($cookie_param)); $path = substr($path, 0, strpos($path, ';')); } else { $path = '/'; } $cookie_param = ';secure;'; if (strpos($cookie_str, $cookie_param) !== FALSE) { $secure = true; } else { $secure = false; } $sep_pos = strpos($value_str, '='); if ($sep_pos) { $name = substr($value_str, 0, $sep_pos); $value = substr($value_str, $sep_pos + 1); $cookie= array( 'name' => $name, 'value' => $value, 'domain' => $domain, 'path' => $path, 'expires' => $expires, 'secure' => $secure ); return $cookie; } return false; } /** * sort out cookies for the current request * * @param array $cookies array with all cookies * @param boolean $secure is the send-content secure or not? * @return string for Cookie-HTTP-Header * @access private */ function getCookiesForRequest($cookies, $secure=false) { $cookie_str = ''; if ((! is_null($cookies)) && (is_array($cookies))) { foreach ($cookies as $cookie) { if (! is_array($cookie)) { continue; } $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']); if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { if (strtotime($cookie['expires']) <= time()) { $this->debug('cookie has expired'); continue; } } if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) { $domain = preg_quote($cookie['domain']); if (! preg_match("'.*$domain$'i", $this->host)) { $this->debug('cookie has different domain'); continue; } } if ((isset($cookie['path'])) && (! empty($cookie['path']))) { $path = preg_quote($cookie['path']); if (! preg_match("'^$path.*'i", $this->path)) { $this->debug('cookie is for a different path'); continue; } } if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) { $this->debug('cookie is secure, transport is not'); continue; } $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; '; $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']); } } return $cookie_str; } } ?><?php /** * * soap_server allows the user to create a SOAP server * that is capable of receiving messages and returning responses * * NOTE: WSDL functionality is experimental * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soap_server extends nusoap_base { /** * HTTP headers of request * @var array * @access private */ var $headers = array(); /** * HTTP request * @var string * @access private */ var $request = ''; /** * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) * @var string * @access public */ var $requestHeaders = ''; /** * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) * @var string * @access public */ var $document = ''; /** * SOAP payload for request (text) * @var string * @access public */ var $requestSOAP = ''; /** * requested method namespace URI * @var string * @access private */ var $methodURI = ''; /** * name of method requested * @var string * @access private */ var $methodname = ''; /** * method parameters from request * @var array * @access private */ var $methodparams = array(); /** * SOAP Action from request * @var string * @access private */ var $SOAPAction = ''; /** * character set encoding of incoming (request) messages * @var string * @access public */ var $xml_encoding = ''; /** * toggles whether the parser decodes element content w/ utf8_decode() * @var boolean * @access public */ var $decode_utf8 = true; /** * HTTP headers of response * @var array * @access public */ var $outgoing_headers = array(); /** * HTTP response * @var string * @access private */ var $response = ''; /** * SOAP headers for response (text) * @var string * @access public */ var $responseHeaders = ''; /** * SOAP payload for response (text) * @var string * @access private */ var $responseSOAP = ''; /** * method return value to place in response * @var mixed * @access private */ var $methodreturn = false; /** * whether $methodreturn is a string of literal XML * @var boolean * @access public */ var $methodreturnisliteralxml = false; /** * SOAP fault for response (or false) * @var mixed * @access private */ var $fault = false; /** * text indication of result (for debugging) * @var string * @access private */ var $result = 'successful'; /** * assoc array of operations => opData; operations are added by the register() * method or by parsing an external WSDL definition * @var array * @access private */ var $operations = array(); /** * wsdl instance (if one) * @var mixed * @access private */ var $wsdl = false; /** * URL for WSDL (if one) * @var mixed * @access private */ var $externalWSDLURL = false; /** * whether to append debug to response as XML comment * @var boolean * @access public */ var $debug_flag = false; /** * constructor * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to. * * @param mixed $wsdl file path or URL (string), or wsdl instance (object) * @access public */ function soap_server($wsdl=false){ parent::nusoap_base(); // turn on debugging? global $debug; global $HTTP_SERVER_VARS; if (isset($_SERVER)) { $this->debug("_SERVER is defined:"); $this->appendDebug($this->varDump($_SERVER)); } elseif (isset($HTTP_SERVER_VARS)) { $this->debug("HTTP_SERVER_VARS is defined:"); $this->appendDebug($this->varDump($HTTP_SERVER_VARS)); } else { $this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined."); } if (isset($debug)) { $this->debug("In soap_server, set debug_flag=$debug based on global flag"); $this->debug_flag = $debug; } elseif (isset($_SERVER['QUERY_STRING'])) { $qs = explode('&', $_SERVER['QUERY_STRING']); foreach ($qs as $v) { if (substr($v, 0, 6) == 'debug=') { $this->debug("In soap_server, set debug_flag=" . substr($v, 6) . " based on query string #1"); $this->debug_flag = substr($v, 6); } } } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']); foreach ($qs as $v) { if (substr($v, 0, 6) == 'debug=') { $this->debug("In soap_server, set debug_flag=" . substr($v, 6) . " based on query string #2"); $this->debug_flag = substr($v, 6); } } } // wsdl if($wsdl){ $this->debug("In soap_server, WSDL is specified"); if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) { $this->wsdl = $wsdl; $this->externalWSDLURL = $this->wsdl->wsdl; $this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL); } else { $this->debug('Create wsdl from ' . $wsdl); $this->wsdl = new wsdl($wsdl); $this->externalWSDLURL = $wsdl; } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); if($err = $this->wsdl->getError()){ die('WSDL ERROR: '.$err); } } } /** * processes request and returns response * * @param string $data usually is the value of $HTTP_RAW_POST_DATA * @access public */ function service($data){ global $HTTP_SERVER_VARS; if (isset($_SERVER['QUERY_STRING'])) { $qs = $_SERVER['QUERY_STRING']; } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $qs = $HTTP_SERVER_VARS['QUERY_STRING']; } else { $qs = ''; } $this->debug("In service, query string=$qs"); if (ereg('wsdl', $qs) ){ $this->debug("In service, this is a request for WSDL"); if($this->externalWSDLURL){ if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL header('Location: '.$this->externalWSDLURL); } else { // assume file header("Content-Type: text/xml\r\n"); $fp = fopen($this->externalWSDLURL, 'r'); fpassthru($fp); } } elseif ($this->wsdl) { header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); print $this->wsdl->serialize($this->debug_flag); if ($this->debug_flag) { $this->debug('wsdl:'); $this->appendDebug($this->varDump($this->wsdl)); print $this->getDebugAsXMLComment(); } } else { header("Content-Type: text/html; charset=ISO-8859-1\r\n"); print "This service does not provide WSDL"; } } elseif ($data == '' && $this->wsdl) { $this->debug("In service, there is no data, so return Web description"); print $this->wsdl->webDescription(); } else { $this->debug("In service, invoke the request"); $this->parse_request($data); if (! $this->fault) { $this->invoke_method(); } if (! $this->fault) { $this->serialize_return(); } $this->send_response(); } } /** * parses HTTP request headers. * * The following fields are set by this function (when successful) * * headers * request * xml_encoding * SOAPAction * * @access private */ function parse_http_headers() { global $HTTP_SERVER_VARS; $this->request = ''; $this->SOAPAction = ''; if(function_exists('getallheaders')){ $this->debug("In parse_http_headers, use getallheaders"); $headers = getallheaders(); foreach($headers as $k=>$v){ $k = strtolower($k); $this->headers[$k] = $v; $this->request .= "$k: $v\r\n"; $this->debug("$k: $v"); } // get SOAPAction header if(isset($this->headers['soapaction'])){ $this->SOAPAction = str_replace('"','',$this->headers['soapaction']); } // get the character encoding of the incoming request if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } } elseif(isset($_SERVER) && is_array($_SERVER)){ $this->debug("In parse_http_headers, use _SERVER"); foreach ($_SERVER as $k => $v) { if (substr($k, 0, 5) == 'HTTP_') { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); } else { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); } if ($k == 'soapaction') { // get SOAPAction header $k = 'SOAPAction'; $v = str_replace('"', '', $v); $v = str_replace('\\', '', $v); $this->SOAPAction = $v; } else if ($k == 'content-type') { // get the character encoding of the incoming request if (strpos($v, '=')) { $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } } $this->headers[$k] = $v; $this->request .= "$k: $v\r\n"; $this->debug("$k: $v"); } } elseif (is_array($HTTP_SERVER_VARS)) { $this->debug("In parse_http_headers, use HTTP_SERVER_VARS"); foreach ($HTTP_SERVER_VARS as $k => $v) { if (substr($k, 0, 5) == 'HTTP_') { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); } else { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); } if ($k == 'soapaction') { // get SOAPAction header $k = 'SOAPAction'; $v = str_replace('"', '', $v); $v = str_replace('\\', '', $v); $this->SOAPAction = $v; } else if ($k == 'content-type') { // get the character encoding of the incoming request if (strpos($v, '=')) { $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } } $this->headers[$k] = $v; $this->request .= "$k: $v\r\n"; $this->debug("$k: $v"); } } else { $this->debug("In parse_http_headers, HTTP headers not accessible"); $this->setError("HTTP headers not accessible"); } } /** * parses a request * * The following fields are set by this function (when successful) * * headers * request * xml_encoding * SOAPAction * request * requestSOAP * methodURI * methodname * methodparams * requestHeaders * document * * This sets the fault field on error * * @param string $data XML string * @access private */ function parse_request($data='') { $this->debug('entering parse_request()'); $this->parse_http_headers(); $this->debug('got character encoding: '.$this->xml_encoding); // uncompress if necessary if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') { $this->debug('got content encoding: ' . $this->headers['content-encoding']); if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') { // if decoding works, use it. else assume data wasn't gzencoded if (function_exists('gzuncompress')) { if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) { $data = $degzdata; } elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) { $data = $degzdata; } else { $this->fault('Client', 'Errors occurred when trying to decode the data'); return; } } else { $this->fault('Client', 'This Server does not support compressed data'); return; } } } $this->request .= "\r\n".$data; $data = $this->parseRequest($this->headers, $data); $this->requestSOAP = $data; $this->debug('leaving parse_request'); } /** * invokes a PHP function for the requested SOAP method * * The following fields are set by this function (when successful) * * methodreturn * * Note that the PHP function that is called may also set the following * fields to affect the response sent to the client * * responseHeaders * outgoing_headers * * This sets the fault field on error * * @access private */ function invoke_method() { $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction); if ($this->wsdl) { if ($this->opData = $this->wsdl->getOperationData($this->methodname)) { $this->debug('in invoke_method, found WSDL operation=' . $this->methodname); $this->appendDebug('opData=' . $this->varDump($this->opData)); } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) { // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']); $this->appendDebug('opData=' . $this->varDump($this->opData)); $this->methodname = $this->opData['name']; } else { $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname); $this->fault('Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service"); return; } } else { $this->debug('in invoke_method, no WSDL to validate method'); } // if a . is present in $this->methodname, we see if there is a class in scope, // which could be referred to. We will also distinguish between two deliminators, // to allow methods to be called a the class or an instance $class = ''; $method = ''; if (strpos($this->methodname, '..') > 0) { $delim = '..'; } else if (strpos($this->methodname, '.') > 0) { $delim = '.'; } else { $delim = ''; } if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1 && class_exists(substr($this->methodname, 0, strpos($this->methodname, $delim)))) { // get the class and method name $class = substr($this->methodname, 0, strpos($this->methodname, $delim)); $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim)); $this->debug("in invoke_method, class=$class method=$method delim=$delim"); } // does method exist? if ($class == '') { if (!function_exists($this->methodname)) { $this->debug("in invoke_method, function '$this->methodname' not found!"); $this->result = 'fault: method not found'; $this->fault('Client',"method '$this->methodname' not defined in service"); return; } } else { $method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method; if (!in_array($method_to_compare, get_class_methods($class))) { $this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!"); $this->result = 'fault: method not found'; $this->fault('Client',"method '$this->methodname' not defined in service"); return; } } // evaluate message, getting back parameters // verify that request parameters match the method's signature if(! $this->verify_method($this->methodname,$this->methodparams)){ // debug $this->debug('ERROR: request not verified against method signature'); $this->result = 'fault: request failed validation against method signature'; // return fault $this->fault('Client',"Operation '$this->methodname' not defined in service."); return; } // if there are parameters to pass $this->debug('in invoke_method, params:'); $this->appendDebug($this->varDump($this->methodparams)); $this->debug("in invoke_method, calling '$this->methodname'"); if (!function_exists('call_user_func_array')) { if ($class == '') { $this->debug('in invoke_method, calling function using eval()'); $funcCall = "\$this->methodreturn = $this->methodname("; } else { if ($delim == '..') { $this->debug('in invoke_method, calling class method using eval()'); $funcCall = "\$this->methodreturn = ".$class."::".$method."("; } else { $this->debug('in invoke_method, calling instance method using eval()'); // generate unique instance name $instname = "\$inst_".time(); $funcCall = $instname." = new ".$class."(); "; $funcCall .= "\$this->methodreturn = ".$instname."->".$method."("; } } if ($this->methodparams) { foreach ($this->methodparams as $param) { if (is_array($param)) { $this->fault('Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available'); return; } $funcCall .= "\"$param\","; } $funcCall = substr($funcCall, 0, -1); } $funcCall .= ');'; $this->debug('in invoke_method, function call: '.$funcCall); @eval($funcCall); } else { if ($class == '') { $this->debug('in invoke_method, calling function using call_user_func_array()'); $call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array() } elseif ($delim == '..') { $this->debug('in invoke_method, calling class method using call_user_func_array()'); $call_arg = array ($class, $method); } else { $this->debug('in invoke_method, calling instance method using call_user_func_array()'); $instance = new $class (); $call_arg = array(&$instance, $method); } $this->methodreturn = call_user_func_array($call_arg, $this->methodparams); } $this->debug('in invoke_method, methodreturn:'); $this->appendDebug($this->varDump($this->methodreturn)); $this->debug("in invoke_method, called method $this->methodname, received $this->methodreturn of type ".gettype($this->methodreturn)); } /** * serializes the return value from a PHP function into a full SOAP Envelope * * The following fields are set by this function (when successful) * * responseSOAP * * This sets the fault field on error * * @access private */ function serialize_return() { $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); // if fault if (isset($this->methodreturn) && (get_class($this->methodreturn) == 'soap_fault')) { $this->debug('got a fault object from method'); $this->fault = $this->methodreturn; return; } elseif ($this->methodreturnisliteralxml) { $return_val = $this->methodreturn; // returned value(s) } else { $this->debug('got a(n) '.gettype($this->methodreturn).' from method'); $this->debug('serializing return value'); if($this->wsdl){ // weak attempt at supporting multiple output params if(sizeof($this->opData['output']['parts']) > 1){ $opParams = $this->methodreturn; } else { // TODO: is this really necessary? $opParams = array($this->methodreturn); } $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); if($errstr = $this->wsdl->getError()){ $this->debug('got wsdl error: '.$errstr); $this->fault('Server', 'unable to serialize result'); return; } } else { if (isset($this->methodreturn)) { $return_val = $this->serialize_val($this->methodreturn, 'return'); } else { $return_val = ''; $this->debug('in absence of WSDL, assume void return for backward compatibility'); } } } $this->debug('return value:'); $this->appendDebug($this->varDump($return_val)); $this->debug('serializing response'); if ($this->wsdl) { $this->debug('have WSDL for serialization: style is ' . $this->opData['style']); if ($this->opData['style'] == 'rpc') { $this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']); if ($this->opData['output']['use'] == 'literal') { $payload = '<'.$this->methodname.'Response xmlns="'.$this->methodURI.'">'.$return_val.'</'.$this->methodname."Response>"; } else { $payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>"; } } else { $this->debug('style is not rpc for serialization: assume document'); $payload = $return_val; } } else { $this->debug('do not have WSDL for serialization: assume rpc/encoded'); $payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>"; } $this->result = 'successful'; if($this->wsdl){ //if($this->debug_flag){ $this->appendDebug($this->wsdl->getDebug()); // } if (isset($opData['output']['encodingStyle'])) { $encodingStyle = $opData['output']['encodingStyle']; } else { $encodingStyle = ''; } // Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces. $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$encodingStyle); } else { $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders); } $this->debug("Leaving serialize_return"); } /** * sends an HTTP response * * The following fields are set by this function (when successful) * * outgoing_headers * response * * @access private */ function send_response() { $this->debug('Enter send_response'); if ($this->fault) { $payload = $this->fault->serialize(); $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error"; $this->outgoing_headers[] = "Status: 500 Internal Server Error"; } else { $payload = $this->responseSOAP; // Some combinations of PHP+Web server allow the Status // to come through as a header. Since OK is the default // just do nothing. // $this->outgoing_headers[] = "HTTP/1.0 200 OK"; // $this->outgoing_headers[] = "Status: 200 OK"; } // add debug data if in debug mode if(isset($this->debug_flag) && $this->debug_flag){ $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; $payload = $this->getHTTPBody($payload); $type = $this->getHTTPContentType(); $charset = $this->getHTTPContentTypeCharset(); $this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : ''); //begin code to compress payload - by John // NOTE: there is no way to know whether the Web server will also compress // this data. if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { if (strstr($this->headers['accept-encoding'], 'gzip')) { if (function_exists('gzencode')) { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content being gzipped -->"; } $this->outgoing_headers[] = "Content-Encoding: gzip"; $payload = gzencode($payload); } else { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content will not be gzipped: no gzencode -->"; } } } elseif (strstr($this->headers['accept-encoding'], 'deflate')) { // Note: MSIE requires gzdeflate output (no Zlib header and checksum), // instead of gzcompress output, // which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5) if (function_exists('gzdeflate')) { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content being deflated -->"; } $this->outgoing_headers[] = "Content-Encoding: deflate"; $payload = gzdeflate($payload); } else { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content will not be deflated: no gzcompress -->"; } } } } //end code $this->outgoing_headers[] = "Content-Length: ".strlen($payload); reset($this->outgoing_headers); foreach($this->outgoing_headers as $hdr){ header($hdr, false); } print $payload; $this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload; } /** * takes the value that was created by parsing the request * and compares to the method's signature, if available. * * @param string $operation The operation to be invoked * @param array $request The array of parameter values * @return boolean Whether the operation was found * @access private */ function verify_method($operation,$request){ if(isset($this->wsdl) && is_object($this->wsdl)){ if($this->wsdl->getOperationData($operation)){ return true; } } elseif(isset($this->operations[$operation])){ return true; } return false; } /** * processes SOAP message received from client * * @param array $headers The HTTP headers * @param string $data unprocessed request data from client * @return mixed value of the message, decoded into a PHP type * @access private */ function parseRequest($headers, $data) { $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' and type ' . $headers['content-type']); if (!strstr($headers['content-type'], 'text/xml')) { $this->setError('Request not of type text/xml'); return false; } if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating soap_parser'); // parse response, get soap parser obj $parser = new soap_parser($data,$this->xml_encoding,'',$this->decode_utf8); // parser debug $this->debug("parser debug: \n".$parser->getDebug()); // if fault occurred during message parsing if($err = $parser->getError()){ $this->result = 'fault: error in msg parsing: '.$err; $this->fault('Client',"error in msg parsing:\n".$err); // else successfully parsed request into soapval object } else { // get/set methodname $this->methodURI = $parser->root_struct_namespace; $this->methodname = $parser->root_struct_name; $this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI); $this->debug('calling parser->get_response()'); $this->methodparams = $parser->get_response(); // get SOAP headers $this->requestHeaders = $parser->getHeaders(); // add document for doclit support $this->document = $parser->document; } } /** * gets the HTTP body for the current response. * * @param string $soapmsg The SOAP payload * @return string The HTTP body, which includes the SOAP payload * @access private */ function getHTTPBody($soapmsg) { return $soapmsg; } /** * gets the HTTP content type for the current response. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type for the current response. * @access private */ function getHTTPContentType() { return 'text/xml'; } /** * gets the HTTP content type charset for the current response. * returns false for non-text content types. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type charset for the current response. * @access private */ function getHTTPContentTypeCharset() { return $this->soap_defencoding; } /** * add a method to the dispatch map (this has been replaced by the register method) * * @param string $methodname * @param string $in array of input values * @param string $out array of output values * @access public * @deprecated */ function add_to_map($methodname,$in,$out){ $this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out); } /** * register a service function with the server * * @param string $name the name of the PHP function, class.method or class..method * @param array $in assoc array of input values: key = param name, value = param type * @param array $out assoc array of output values: key = param name, value = param type * @param mixed $namespace the element namespace for the method or false * @param mixed $soapaction the soapaction for the method or false * @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically * @param mixed $use optional (encoded|literal) or false * @param string $documentation optional Description to include in WSDL * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) * @access public */ function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){ global $HTTP_SERVER_VARS; if($this->externalWSDLURL){ die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.'); } if (! $name) { die('You must specify a name when you register an operation'); } if (!is_array($in)) { die('You must provide an array for operation inputs'); } if (!is_array($out)) { die('You must provide an array for operation outputs'); } if(false == $namespace) { } if(false == $soapaction) { if (isset($_SERVER)) { $SERVER_NAME = $_SERVER['SERVER_NAME']; $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; } elseif (isset($HTTP_SERVER_VARS)) { $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; } else { $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); } $soapaction = "http://$SERVER_NAME$SCRIPT_NAME/$name"; } if(false == $style) { $style = "rpc"; } if(false == $use) { $use = "encoded"; } if ($use == 'encoded' && $encodingStyle = '') { $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; } $this->operations[$name] = array( 'name' => $name, 'in' => $in, 'out' => $out, 'namespace' => $namespace, 'soapaction' => $soapaction, 'style' => $style); if($this->wsdl){ $this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle); } return true; } /** * Specify a fault to be returned to the client. * This also acts as a flag to the server that a fault has occured. * * @param string $faultcode * @param string $faultstring * @param string $faultactor * @param string $faultdetail * @access public */ function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){ if ($faultdetail == '' && $this->debug_flag) { $faultdetail = $this->getDebug(); } $this->fault = new soap_fault($faultcode,$faultactor,$faultstring,$faultdetail); $this->fault->soap_defencoding = $this->soap_defencoding; } /** * Sets up wsdl object. * Acts as a flag to enable internal WSDL generation * * @param string $serviceName, name of the service * @param mixed $namespace optional 'tns' service namespace or false * @param mixed $endpoint optional URL of service endpoint or false * @param string $style optional (rpc|document) WSDL style (also specified by operation) * @param string $transport optional SOAP transport * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false */ function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false) { global $HTTP_SERVER_VARS; if (isset($_SERVER)) { $SERVER_NAME = $_SERVER['SERVER_NAME']; $SERVER_PORT = $_SERVER['SERVER_PORT']; $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; $HTTPS = $_SERVER['HTTPS']; } elseif (isset($HTTP_SERVER_VARS)) { $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; $HTTPS = $HTTP_SERVER_VARS['HTTPS']; } else { $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); } if ($SERVER_PORT == 80) { $SERVER_PORT = ''; } else { $SERVER_PORT = ':' . $SERVER_PORT; } if(false == $namespace) { $namespace = "http://$SERVER_NAME/soap/$serviceName"; } if(false == $endpoint) { if ($HTTPS == '1' || $HTTPS == 'on') { $SCHEME = 'https'; } else { $SCHEME = 'http'; } $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; } if(false == $schemaTargetNamespace) { $schemaTargetNamespace = $namespace; } $this->wsdl = new wsdl; $this->wsdl->serviceName = $serviceName; $this->wsdl->endpoint = $endpoint; $this->wsdl->namespaces['tns'] = $namespace; $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; $this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/'; if ($schemaTargetNamespace != $namespace) { $this->wsdl->namespaces['types'] = $schemaTargetNamespace; } $this->wsdl->schemas[$schemaTargetNamespace][0] = new xmlschema('', '', $this->wsdl->namespaces); $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace; $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true); $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true); $this->wsdl->bindings[$serviceName.'Binding'] = array( 'name'=>$serviceName.'Binding', 'style'=>$style, 'transport'=>$transport, 'portType'=>$serviceName.'PortType'); $this->wsdl->ports[$serviceName.'Port'] = array( 'binding'=>$serviceName.'Binding', 'location'=>$endpoint, 'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/'); } } ?><?php /** * parses a WSDL file, allows access to it's data, other utility methods * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class wsdl extends nusoap_base { // URL or filename of the root of this WSDL var $wsdl; // define internal arrays of bindings, ports, operations, messages, etc. var $schemas = array(); var $currentSchema; var $message = array(); var $complexTypes = array(); var $messages = array(); var $currentMessage; var $currentOperation; var $portTypes = array(); var $currentPortType; var $bindings = array(); var $currentBinding; var $ports = array(); var $currentPort; var $opData = array(); var $status = ''; var $documentation = false; var $endpoint = ''; // array of wsdl docs to import var $import = array(); // parser vars var $parser; var $position = 0; var $depth = 0; var $depth_array = array(); // for getting wsdl var $proxyhost = ''; var $proxyport = ''; var $proxyusername = ''; var $proxypassword = ''; var $timeout = 0; var $response_timeout = 30; /** * constructor * * @param string $wsdl WSDL document URL * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @param integer $timeout set the connection timeout * @param integer $response_timeout set the response timeout * @access public */ function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30){ parent::nusoap_base(); $this->wsdl = $wsdl; $this->proxyhost = $proxyhost; $this->proxyport = $proxyport; $this->proxyusername = $proxyusername; $this->proxypassword = $proxypassword; $this->timeout = $timeout; $this->response_timeout = $response_timeout; // parse wsdl file if ($wsdl != "") { $this->debug('initial wsdl URL: ' . $wsdl); $this->parseWSDL($wsdl); } // imports // TODO: handle imports more properly, grabbing them in-line and nesting them $imported_urls = array(); $imported = 1; while ($imported > 0) { $imported = 0; // Schema imports foreach ($this->schemas as $ns => $list) { foreach ($list as $xs) { $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! foreach ($xs->imports as $ns2 => $list2) { for ($ii = 0; $ii < count($list2); $ii++) { if (! $list2[$ii]['loaded']) { $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true; $url = $list2[$ii]['location']; if ($url != '') { $urlparts = parse_url($url); if (!isset($urlparts['host'])) { $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') . substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; } if (! in_array($url, $imported_urls)) { $this->parseWSDL($url); $imported++; $imported_urls[] = $url; } } else { $this->debug("Unexpected scenario: empty URL for unloaded import"); } } } } } } // WSDL imports $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! foreach ($this->import as $ns => $list) { for ($ii = 0; $ii < count($list); $ii++) { if (! $list[$ii]['loaded']) { $this->import[$ns][$ii]['loaded'] = true; $url = $list[$ii]['location']; if ($url != '') { $urlparts = parse_url($url); if (!isset($urlparts['host'])) { $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') . substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; } if (! in_array($url, $imported_urls)) { $this->parseWSDL($url); $imported++; $imported_urls[] = $url; } } else { $this->debug("Unexpected scenario: empty URL for unloaded import"); } } } } } // add new data to operation data foreach($this->bindings as $binding => $bindingData) { if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { foreach($bindingData['operations'] as $operation => $data) { $this->debug('post-parse data gathering for ' . $operation); $this->bindings[$binding]['operations'][$operation]['input'] = isset($this->bindings[$binding]['operations'][$operation]['input']) ? array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : $this->portTypes[ $bindingData['portType'] ][$operation]['input']; $this->bindings[$binding]['operations'][$operation]['output'] = isset($this->bindings[$binding]['operations'][$operation]['output']) ? array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : $this->portTypes[ $bindingData['portType'] ][$operation]['output']; if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; } if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; } if (isset($bindingData['style'])) { $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; } $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; } } } } /** * parses the wsdl document * * @param string $wsdl path or URL * @access private */ function parseWSDL($wsdl = '') { if ($wsdl == '') { $this->debug('no wsdl passed to parseWSDL()!!'); $this->setError('no wsdl passed to parseWSDL()!!'); return false; } // parse $wsdl for url format $wsdl_props = parse_url($wsdl); if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { $this->debug('getting WSDL http(s) URL ' . $wsdl); // get wsdl $tr = new soap_transport_http($wsdl); $tr->request_method = 'GET'; $tr->useSOAPAction = false; if($this->proxyhost && $this->proxyport){ $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); } $tr->setEncoding('gzip, deflate'); $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout); //$this->debug("WSDL request\n" . $tr->outgoing_payload); //$this->debug("WSDL response\n" . $tr->incoming_payload); $this->appendDebug($tr->getDebug()); // catch errors if($err = $tr->getError() ){ $errstr = 'HTTP ERROR: '.$err; $this->debug($errstr); $this->setError($errstr); unset($tr); return false; } unset($tr); $this->debug("got WSDL URL"); } else { // $wsdl is not http(s), so treat it as a file URL or plain file path if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; } else { $path = $wsdl; } $this->debug('getting WSDL file ' . $path); if ($fp = @fopen($path, 'r')) { $wsdl_string = ''; while ($data = fread($fp, 32768)) { $wsdl_string .= $data; } fclose($fp); } else { $errstr = "Bad path to WSDL file $path"; $this->debug($errstr); $this->setError($errstr); return false; } } $this->debug('Parse WSDL'); // end new code added // Create an XML parser. $this->parser = xml_parser_create(); // Set the options for parsing the XML data. // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // Set the object for the parser. xml_set_object($this->parser, $this); // Set the element handlers for the parser. xml_set_element_handler($this->parser, 'start_element', 'end_element'); xml_set_character_data_handler($this->parser, 'character_data'); // Parse the XML file. if (!xml_parse($this->parser, $wsdl_string, true)) { // Display an error message. $errstr = sprintf( 'XML error parsing WSDL from %s on line %d: %s', $wsdl, xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser)) ); $this->debug($errstr); $this->debug("XML payload:\n" . $wsdl_string); $this->setError($errstr); return false; } // free the parser xml_parser_free($this->parser); $this->debug('Parsing WSDL done'); // catch wsdl parse errors if($this->getError()){ return false; } return true; } /** * start-element handler * * @param string $parser XML parser object * @param string $name element name * @param string $attrs associative array of attributes * @access private */ function start_element($parser, $name, $attrs) { if ($this->status == 'schema') { $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); } elseif (ereg('schema$', $name)) { $this->debug('Parsing WSDL schema'); // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); $this->status = 'schema'; $this->currentSchema = new xmlschema('', '', $this->namespaces); $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); } else { // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; $this->message[$pos] = array('cdata' => ''); // process attributes if (count($attrs) > 0) { // register namespace declarations foreach($attrs as $k => $v) { if (ereg("^xmlns", $k)) { if ($ns_prefix = substr(strrchr($k, ':'), 1)) { $this->namespaces[$ns_prefix] = $v; } else { $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; } if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { $this->XMLSchemaVersion = $v; $this->namespaces['xsi'] = $v . '-instance'; } } } // expand each attribute prefix to its namespace foreach($attrs as $k => $v) { $k = strpos($k, ':') ? $this->expandQname($k) : $k; if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { $v = strpos($v, ':') ? $this->expandQname($v) : $v; } $eAttrs[$k] = $v; } $attrs = $eAttrs; } else { $attrs = array(); } // get element prefix, namespace and name if (ereg(':', $name)) { // get ns prefix $prefix = substr($name, 0, strpos($name, ':')); // get ns $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; // get unqualified name $name = substr(strstr($name, ':'), 1); } // process attributes, expanding any prefixes to namespaces // find status, register data switch ($this->status) { case 'message': if ($name == 'part') { if (isset($attrs['type'])) { $this->debug("msg " . $this->currentMessage . ": found part $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; } if (isset($attrs['element'])) { $this->debug("msg " . $this->currentMessage . ": found part $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element']; } } break; case 'portType': switch ($name) { case 'operation': $this->currentPortOperation = $attrs['name']; $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); if (isset($attrs['parameterOrder'])) { $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; } break; case 'documentation': $this->documentation = true; break; // merge input/output data default: $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; break; } break; case 'binding': switch ($name) { case 'binding': // get ns prefix if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['prefix'] = $prefix; } $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); break; case 'header': $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; break; case 'operation': if (isset($attrs['soapAction'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; } if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; } if (isset($attrs['name'])) { $this->currentOperation = $attrs['name']; $this->debug("current binding operation: $this->currentOperation"); $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; } break; case 'input': $this->opStatus = 'input'; break; case 'output': $this->opStatus = 'output'; break; case 'body': if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); } else { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; } break; } break; case 'service': switch ($name) { case 'port': $this->currentPort = $attrs['name']; $this->debug('current port: ' . $this->currentPort); $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); break; case 'address': $this->ports[$this->currentPort]['location'] = $attrs['location']; $this->ports[$this->currentPort]['bindingType'] = $namespace; $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; break; } break; } // set status switch ($name) { case 'import': if (isset($attrs['location'])) { $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); } else { $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); if (! $this->getPrefixFromNamespace($attrs['namespace'])) { $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; } $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); } break; //wait for schema //case 'types': // $this->status = 'schema'; // break; case 'message': $this->status = 'message'; $this->messages[$attrs['name']] = array(); $this->currentMessage = $attrs['name']; break; case 'portType': $this->status = 'portType'; $this->portTypes[$attrs['name']] = array(); $this->currentPortType = $attrs['name']; break; case "binding": if (isset($attrs['name'])) { // get binding name if (strpos($attrs['name'], ':')) { $this->currentBinding = $this->getLocalPart($attrs['name']); } else { $this->currentBinding = $attrs['name']; } $this->status = 'binding'; $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); } break; case 'service': $this->serviceName = $attrs['name']; $this->status = 'service'; $this->debug('current service: ' . $this->serviceName); break; case 'definitions': foreach ($attrs as $name => $value) { $this->wsdl_info[$name] = $value; } break; } } } /** * end-element handler * * @param string $parser XML parser object * @param string $name element name * @access private */ function end_element($parser, $name){ // unset schema status if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) { $this->status = ""; $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; $this->debug('Parsing WSDL schema done'); } if ($this->status == 'schema') { $this->currentSchema->schemaEndElement($parser, $name); } else { // bring depth down a notch $this->depth--; } // end documentation if ($this->documentation) { //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; $this->documentation = false; } } /** * element content handler * * @param string $parser XML parser object * @param string $data element content * @access private */ function character_data($parser, $data) { $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; if (isset($this->message[$pos]['cdata'])) { $this->message[$pos]['cdata'] .= $data; } if ($this->documentation) { $this->documentation .= $data; } } function getBindingData($binding) { if (is_array($this->bindings[$binding])) { return $this->bindings[$binding]; } } /** * returns an assoc array of operation names => operation data * * @param string $bindingType eg: soap, smtp, dime (only soap is currently supported) * @return array * @access public */ function getOperations($bindingType = 'soap') { $ops = array(); if ($bindingType == 'soap') { $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; } // loop thru ports foreach($this->ports as $port => $portData) { // binding type of port matches parameter if ($portData['bindingType'] == $bindingType) { //$this->debug("getOperations for port $port"); //$this->debug("port data: " . $this->varDump($portData)); //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ])); // merge bindings if (isset($this->bindings[ $portData['binding'] ]['operations'])) { $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']); } } } return $ops; } /** * returns an associative array of data necessary for calling an operation * * @param string $operation , name of operation * @param string $bindingType , type of binding eg: soap * @return array * @access public */ function getOperationData($operation, $bindingType = 'soap') { if ($bindingType == 'soap') { $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; } // loop thru ports foreach($this->ports as $port => $portData) { // binding type of port matches parameter if ($portData['bindingType'] == $bindingType) { // get binding //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) { // note that we could/should also check the namespace here if ($operation == $bOperation) { $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; return $opData; } } } } } /** * returns an associative array of data necessary for calling an operation * * @param string $soapAction soapAction for operation * @param string $bindingType type of binding eg: soap * @return array * @access public */ function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { if ($bindingType == 'soap') { $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; } // loop thru ports foreach($this->ports as $port => $portData) { // binding type of port matches parameter if ($portData['bindingType'] == $bindingType) { // loop through operations for the binding foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { if ($opData['soapAction'] == $soapAction) { return $opData; } } } } } /** * returns an array of information about a given type * returns false if no type exists by the given name * * typeDef = array( * 'elements' => array(), // refs to elements array * 'restrictionBase' => '', * 'phpType' => '', * 'order' => '(sequence|all)', * 'attrs' => array() // refs to attributes array * ) * * @param $type string the type * @param $ns string namespace (not prefix) of the type * @return mixed * @access public * @see xmlschema */ function getTypeDef($type, $ns) { $this->debug("in getTypeDef: type=$type, ns=$ns"); if ((! $ns) && isset($this->namespaces['tns'])) { $ns = $this->namespaces['tns']; $this->debug("in getTypeDef: type namespace forced to $ns"); } if (isset($this->schemas[$ns])) { $this->debug("in getTypeDef: have schema for namespace $ns"); for ($i = 0; $i < count($this->schemas[$ns]); $i++) { $xs = &$this->schemas[$ns][$i]; $t = $xs->getTypeDef($type); $this->appendDebug($xs->getDebug()); $xs->clearDebug(); if ($t) { if (!isset($t['phpType'])) { // get info for type to tack onto the element $uqType = substr($t['type'], strrpos($t['type'], ':') + 1); $ns = substr($t['type'], 0, strrpos($t['type'], ':')); $etype = $this->getTypeDef($uqType, $ns); if ($etype) { $this->debug("found type for [element] $type:"); $this->debug($this->varDump($etype)); if (isset($etype['phpType'])) { $t['phpType'] = $etype['phpType']; } if (isset($etype['elements'])) { $t['elements'] = $etype['elements']; } if (isset($etype['attrs'])) { $t['attrs'] = $etype['attrs']; } } } return $t; } } } else { $this->debug("in getTypeDef: do not have schema for namespace $ns"); } return false; } /** * prints html description of services * * @access private */ function webDescription(){ global $HTTP_SERVER_VARS; if (isset($_SERVER)) { $PHP_SELF = $_SERVER['PHP_SELF']; } elseif (isset($HTTP_SERVER_VARS)) { $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; } else { $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); } $b = ' <html><head><title>NuSOAP: '.$this->serviceName.'</title> <style type="text/css"> body { font-family: arial; color: #000000; background-color: #ffffff; margin: 0px 0px 0px 0px; } p { font-family: arial; color: #000000; margin-top: 0px; margin-bottom: 12px; } pre { background-color: silver; padding: 5px; font-family: Courier New; font-size: x-small; color: #000000;} ul { margin-top: 10px; margin-left: 20px; } li { list-style-type: none; margin-top: 10px; color: #000000; } .content{ margin-left: 0px; padding-bottom: 2em; } .nav { padding-top: 10px; padding-bottom: 10px; padding-left: 15px; font-size: .70em; margin-top: 10px; margin-left: 0px; color: #000000; background-color: #ccccff; width: 20%; margin-left: 20px; margin-top: 20px; } .title { font-family: arial; font-size: 26px; color: #ffffff; background-color: #999999; width: 105%; margin-left: 0px; padding-top: 10px; padding-bottom: 10px; padding-left: 15px;} .hidden { position: absolute; visibility: hidden; z-index: 200; left: 250px; top: 100px; font-family: arial; overflow: hidden; width: 600; padding: 20px; font-size: 10px; background-color: #999999; layer-background-color:#FFFFFF; } a,a:active { color: charcoal; font-weight: bold; } a:visited { color: #666666; font-weight: bold; } a:hover { color: cc3300; font-weight: bold; } </style> <script language="JavaScript" type="text/javascript"> <!-- // POP-UP CAPTIONS... function lib_bwcheck(){ //Browsercheck (needed) this.ver=navigator.appVersion this.agent=navigator.userAgent this.dom=document.getElementById?1:0 this.opera5=this.agent.indexOf("Opera 5")>-1 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0; this.ie4=(document.all && !this.dom && !this.opera5)?1:0; this.ie=this.ie4||this.ie5||this.ie6 this.mac=this.agent.indexOf("Mac")>-1 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5) return this } var bw = new lib_bwcheck() //Makes crossbrowser object. function makeObj(obj){ this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0; if(!this.evnt) return false this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0; this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0; this.writeIt=b_writeIt; return this } // A unit of measure that will be added when setting the position of a layer. //var px = bw.ns4||window.opera?"":"px"; function b_writeIt(text){ if (bw.ns4){this.wref.write(text);this.wref.close()} else this.wref.innerHTML = text } //Shows the messages var oDesc; function popup(divid){ if(oDesc = new makeObj(divid)){ oDesc.css.visibility = "visible" } } function popout(){ // Hides message if(oDesc) oDesc.css.visibility = "hidden" } //--> </script> </head> <body> <div class=content> <br><br> <div class=title>'.$this->serviceName.'</div> <div class=nav> <p>View the <a href="'.$PHP_SELF.'?wsdl">WSDL</a> for the service. Click on an operation name to view it&apos;s details.</p> <ul>'; foreach($this->getOperations() as $op => $data){ $b .= "<li><a href='#' onclick=\"popout();popup('$op')\">$op</a></li>"; // create hidden div $b .= "<div id='$op' class='hidden'> <a href='#' onclick='popout()'><font color='#ffffff'>Close</font></a><br><br>"; foreach($data as $donnie => $marie){ // loop through opdata if($donnie == 'input' || $donnie == 'output'){ // show input/output data $b .= "<font color='white'>".ucfirst($donnie).':</font><br>'; foreach($marie as $captain => $tenille){ // loop through data if($captain == 'parts'){ // loop thru parts $b .= "&nbsp;&nbsp;$captain:<br>"; //if(is_array($tenille)){ foreach($tenille as $joanie => $chachi){ $b .= "&nbsp;&nbsp;&nbsp;&nbsp;$joanie: $chachi<br>"; } //} } else { $b .= "&nbsp;&nbsp;$captain: $tenille<br>"; } } } else { $b .= "<font color='white'>".ucfirst($donnie).":</font> $marie<br>"; } } $b .= '</div>'; } $b .= ' <ul> </div> </div></body></html>'; return $b; } /** * serialize the parsed wsdl * * @param mixed $debug whether to put debug=1 in endpoint URL * @return string serialization of WSDL * @access public */ function serialize($debug = 0) { $xml = '<?xml version="1.0" encoding="ISO-8859-1"?>'; $xml .= "\n<definitions"; foreach($this->namespaces as $k => $v) { $xml .= " xmlns:$k=\"$v\""; } // 10.9.02 - add poulter fix for wsdl and tns declarations if (isset($this->namespaces['wsdl'])) { $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; } if (isset($this->namespaces['tns'])) { $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; } $xml .= '>'; // imports if (sizeof($this->import) > 0) { foreach($this->import as $ns => $list) { foreach ($list as $ii) { if ($ii['location'] != '') { $xml .= '<import location="' . $ii['location'] . '" namespace="' . $ns . '" />'; } else { $xml .= '<import namespace="' . $ns . '" />'; } } } } // types if (count($this->schemas)>=1) { $xml .= "\n<types>"; foreach ($this->schemas as $ns => $list) { foreach ($list as $xs) { $xml .= $xs->serializeSchema(); } } $xml .= '</types>'; } // messages if (count($this->messages) >= 1) { foreach($this->messages as $msgName => $msgParts) { $xml .= "\n<message name=\"" . $msgName . '">'; if(is_array($msgParts)){ foreach($msgParts as $partName => $partType) { // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'<br>'; if (strpos($partType, ':')) { $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { // print 'checking typemap: '.$this->XMLSchemaVersion.'<br>'; $typePrefix = 'xsd'; } else { foreach($this->typemap as $ns => $types) { if (isset($types[$partType])) { $typePrefix = $this->getPrefixFromNamespace($ns); } } if (!isset($typePrefix)) { die("$partType has no namespace!"); } } $ns = $this->getNamespaceFromPrefix($typePrefix); $typeDef = $this->getTypeDef($this->getLocalPart($partType), $ns); if ($typeDef['typeClass'] == 'element') { $elementortype = 'element'; } else { $elementortype = 'type'; } $xml .= '<part name="' . $partName . '" ' . $elementortype . '="' . $typePrefix . ':' . $this->getLocalPart($partType) . '" />'; } } $xml .= '</message>'; } } // bindings & porttypes if (count($this->bindings) >= 1) { $binding_xml = ''; $portType_xml = ''; foreach($this->bindings as $bindingName => $attrs) { $binding_xml .= "\n<binding name=\"" . $bindingName . '" type="tns:' . $attrs['portType'] . '">'; $binding_xml .= '<soap:binding style="' . $attrs['style'] . '" transport="' . $attrs['transport'] . '"/>'; $portType_xml .= "\n<portType name=\"" . $attrs['portType'] . '">'; foreach($attrs['operations'] as $opName => $opParts) { $binding_xml .= '<operation name="' . $opName . '">'; $binding_xml .= '<soap:operation soapAction="' . $opParts['soapAction'] . '" style="'. $opParts['style'] . '"/>'; if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') { $enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"'; } else { $enc_style = ''; } $binding_xml .= '<input><soap:body use="' . $opParts['input']['use'] . '" namespace="' . $opParts['input']['namespace'] . '"' . $enc_style . '/></input>'; if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') { $enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"'; } else { $enc_style = ''; } $binding_xml .= '<output><soap:body use="' . $opParts['output']['use'] . '" namespace="' . $opParts['output']['namespace'] . '"' . $enc_style . '/></output>'; $binding_xml .= '</operation>'; $portType_xml .= '<operation name="' . $opParts['name'] . '"'; if (isset($opParts['parameterOrder'])) { $portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"'; } $portType_xml .= '>'; if(isset($opParts['documentation']) && $opParts['documentation'] != '') { $portType_xml .= '<documentation>' . htmlspecialchars($opParts['documentation']) . '</documentation>'; } $portType_xml .= '<input message="tns:' . $opParts['input']['message'] . '"/>'; $portType_xml .= '<output message="tns:' . $opParts['output']['message'] . '"/>'; $portType_xml .= '</operation>'; } $portType_xml .= '</portType>'; $binding_xml .= '</binding>'; } $xml .= $portType_xml . $binding_xml; } // services $xml .= "\n<service name=\"" . $this->serviceName . '">'; if (count($this->ports) >= 1) { foreach($this->ports as $pName => $attrs) { $xml .= '<port name="' . $pName . '" binding="tns:' . $attrs['binding'] . '">'; $xml .= '<soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . '"/>'; $xml .= '</port>'; } } $xml .= '</service>'; return $xml . "\n</definitions>"; } /** * serialize PHP values according to a WSDL message definition * * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid * * @param string $operation operation name * @param string $direction (input|output) * @param mixed $parameters parameter value(s) * @return mixed parameters serialized as XML or false on error (e.g. operation not found) * @access public */ function serializeRPCParameters($operation, $direction, $parameters) { $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); $this->appendDebug('parameters=' . $this->varDump($parameters)); if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; } if (!$opData = $this->getOperationData($operation)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); return false; } $this->debug('opData:'); $this->appendDebug($this->varDump($opData)); // Get encoding style for output and set to current $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { $encodingStyle = $opData['output']['encodingStyle']; $enc_style = $encodingStyle; } // set input params $xml = ''; if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { $use = $opData[$direction]['use']; $this->debug('have ' . count($opData[$direction]['parts']) . ' part(s) to serialize'); if (is_array($parameters)) { $parametersArrayType = $this->isArraySimpleOrStruct($parameters); $this->debug('have ' . count($parameters) . ' parameter(s) provided as ' . $parametersArrayType . ' to serialize'); foreach($opData[$direction]['parts'] as $name => $type) { $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); // Track encoding style if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; } // NOTE: add error handling here // if serializeType returns false, then catch global error and fault if ($parametersArrayType == 'arraySimple') { $p = array_shift($parameters); $this->debug('calling serializeType w/indexed param'); $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); } elseif (isset($parameters[$name])) { $this->debug('calling serializeType w/named param'); $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); } else { // TODO: only send nillable $this->debug('calling serializeType w/null param'); $xml .= $this->serializeType($name, $type, null, $use, $enc_style); } } } else { $this->debug('no parameters passed.'); } } $this->debug("serializeRPCParameters returning: $xml"); return $xml; } /** * serialize a PHP value according to a WSDL message definition * * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid * * @param string $ type name * @param mixed $ param value * @return mixed new param or false if initial value didn't validate * @access public * @deprecated */ function serializeParameters($operation, $direction, $parameters) { $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); $this->appendDebug('parameters=' . $this->varDump($parameters)); if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; } if (!$opData = $this->getOperationData($operation)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); return false; } $this->debug('opData:'); $this->appendDebug($this->varDump($opData)); // Get encoding style for output and set to current $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { $encodingStyle = $opData['output']['encodingStyle']; $enc_style = $encodingStyle; } // set input params $xml = ''; if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { $use = $opData[$direction]['use']; $this->debug("use=$use"); $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); if (is_array($parameters)) { $parametersArrayType = $this->isArraySimpleOrStruct($parameters); $this->debug('have ' . $parametersArrayType . ' parameters'); foreach($opData[$direction]['parts'] as $name => $type) { $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); // Track encoding style if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; } // NOTE: add error handling here // if serializeType returns false, then catch global error and fault if ($parametersArrayType == 'arraySimple') { $p = array_shift($parameters); $this->debug('calling serializeType w/indexed param'); $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); } elseif (isset($parameters[$name])) { $this->debug('calling serializeType w/named param'); $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); } else { // TODO: only send nillable $this->debug('calling serializeType w/null param'); $xml .= $this->serializeType($name, $type, null, $use, $enc_style); } } } else { $this->debug('no parameters passed.'); } } $this->debug("serializeParameters returning: $xml"); return $xml; } /** * serializes a PHP value according a given type definition * * @param string $name name of value (part or element) * @param string $type XML schema type of value (type or element) * @param mixed $value a native PHP value (parameter value) * @param string $use use for part (encoded|literal) * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) * @param boolean $unqualified a kludge for what should be XML namespace form handling * @return string value serialized as an XML string * @access private */ function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false) { $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified")); $this->appendDebug("value=" . $this->varDump($value)); if($use == 'encoded' && $encodingStyle) { $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"'; } // if a soapval has been supplied, let its type override the WSDL if (is_object($value) && get_class($value) == 'soapval') { if ($value->type_ns) { $type = $value->type_ns . ':' . $value->type; $forceType = true; $this->debug("in serializeType: soapval overrides type to $type"); } elseif ($value->type) { $type = $value->type; $forceType = true; $this->debug("in serializeType: soapval overrides type to $type"); } else { $forceType = false; $this->debug("in serializeType: soapval does not override type"); } $attrs = $value->attributes; $value = $value->value; $this->debug("in serializeType: soapval overrides value to $value"); if ($attrs) { if (!is_array($value)) { $value['!'] = $value; } foreach ($attrs as $n => $v) { $value['!' . $n] = $v; } $this->debug("in serializeType: soapval provides attributes"); } } else { $forceType = false; } $xml = ''; if (strpos($type, ':')) { $uqType = substr($type, strrpos($type, ':') + 1); $ns = substr($type, 0, strrpos($type, ':')); $this->debug("in serializeType: got a prefixed type: $uqType, $ns"); if ($this->getNamespaceFromPrefix($ns)) { $ns = $this->getNamespaceFromPrefix($ns); $this->debug("in serializeType: expanded prefixed type: $uqType, $ns"); } if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){ $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type'); if ($unqualified && $use == 'literal') { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } if (is_null($value)) { if ($use == 'literal') { // TODO: depends on minOccurs $xml = "<$name$elementNS/>"; } else { // TODO: depends on nillable, which should be checked before calling this method $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } if ($uqType == 'boolean') { if ((is_string($value) && $value == 'false') || (! $value)) { $value = 'false'; } else { $value = 'true'; } } if ($uqType == 'string' && gettype($value) == 'string') { $value = $this->expandEntities($value); } if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') { $value = sprintf("%.0lf", $value); } // it's a scalar // TODO: what about null/nil values? // check type isn't a custom type extending xmlschema namespace if (!$this->getTypeDef($uqType, $ns)) { if ($use == 'literal') { if ($forceType) { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>"; } else { $xml = "<$name$elementNS>$value</$name>"; } } else { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)'); } else if ($ns == 'http://xml.apache.org/xml-soap') { $this->debug('in serializeType: appears to be Apache SOAP type'); if ($uqType == 'Map') { $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); if (! $tt_prefix) { $this->debug('in serializeType: Add namespace for Apache SOAP type'); $tt_prefix = 'ns' . rand(1000, 9999); $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap'; // force this to be added to usedNamespaces $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); } $contents = ''; foreach($value as $k => $v) { $this->debug("serializing map element: key $k, value $v"); $contents .= '<item>'; $contents .= $this->serialize_val($k,'key',false,false,false,false,$use); $contents .= $this->serialize_val($v,'value',false,false,false,false,$use); $contents .= '</item>'; } if ($use == 'literal') { if ($forceType) { $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents</$name>"; } else { $xml = "<$name>$contents</$name>"; } } else { $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents</$name>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } $this->debug('in serializeType: Apache SOAP type, but only support Map'); } } else { // TODO: should the type be compared to types in XSD, and the namespace // set to XSD if the type matches? $this->debug("in serializeType: No namespace for type $type"); $ns = ''; $uqType = $type; } if(!$typeDef = $this->getTypeDef($uqType, $ns)){ $this->setError("$type ($uqType) is not a supported type."); $this->debug("in serializeType: $type ($uqType) is not a supported type."); return false; } else { $this->debug("in serializeType: found typeDef"); $this->appendDebug('typeDef=' . $this->varDump($typeDef)); } $phpType = $typeDef['phpType']; $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); // if php type == struct, map value to the <all> element names if ($phpType == 'struct') { if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { $elementName = $uqType; if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { $elementNS = " xmlns=\"$ns\""; } else { $elementNS = " xmlns=\"\""; } } else { $elementName = $name; if ($unqualified) { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } } if (is_null($value)) { if ($use == 'literal') { // TODO: depends on minOccurs $xml = "<$elementName$elementNS/>"; } else { $xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } if (is_object($value)) { $value = get_object_vars($value); } if (is_array($value)) { $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); if ($use == 'literal') { if ($forceType) { $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">"; } else { $xml = "<$elementName$elementNS$elementAttrs>"; } } else { $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>"; } $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); $xml .= "</$elementName>"; } else { $this->debug("in serializeType: phpType is struct, but value is not an array"); $this->setError("phpType is struct, but value is not an array: see debug output for details"); $xml = ''; } } elseif ($phpType == 'array') { if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { $elementNS = " xmlns=\"$ns\""; } else { if ($unqualified) { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } } if (is_null($value)) { if ($use == 'literal') { // TODO: depends on minOccurs $xml = "<$name$elementNS/>"; } else { $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ":Array\" " . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ':arrayType="' . $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . ':' . $this->getLocalPart($typeDef['arrayType'])."[0]\"/>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } if (isset($typeDef['multidimensional'])) { $nv = array(); foreach($value as $v) { $cols = ',' . sizeof($v); $nv = array_merge($nv, $v); } $value = $nv; } else { $cols = ''; } if (is_array($value) && sizeof($value) >= 1) { $rows = sizeof($value); $contents = ''; foreach($value as $k => $v) { $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); //if (strpos($typeDef['arrayType'], ':') ) { if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); } else { $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); } } } else { $rows = 0; $contents = null; } // TODO: for now, an empty value will be serialized as a zero element // array. Revisit this when coding the handling of null/nil values. if ($use == 'literal') { $xml = "<$name$elementNS>" .$contents ."</$name>"; } else { $xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '. $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .':arrayType="' .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">" .$contents ."</$name>"; } } elseif ($phpType == 'scalar') { if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { $elementNS = " xmlns=\"$ns\""; } else { if ($unqualified) { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } } if ($use == 'literal') { if ($forceType) { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>"; } else { $xml = "<$name$elementNS>$value</$name>"; } } else { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>"; } } $this->debug("in serializeType: returning: $xml"); return $xml; } /** * serializes the attributes for a complexType * * @param array $typeDef our internal representation of an XML schema type (or element) * @param mixed $value a native PHP value (parameter value) * @param string $ns the namespace of the type * @param string $uqType the local part of the type * @return string value serialized as an XML string * @access private */ function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) { $xml = ''; if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { $this->debug("serialize attributes for XML Schema type $ns:$uqType"); if (is_array($value)) { $xvalue = $value; } elseif (is_object($value)) { $xvalue = get_object_vars($value); } else { $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); $xvalue = array(); } foreach ($typeDef['attrs'] as $aName => $attrs) { if (isset($xvalue['!' . $aName])) { $xname = '!' . $aName; $this->debug("value provided for attribute $aName with key $xname"); } elseif (isset($xvalue[$aName])) { $xname = $aName; $this->debug("value provided for attribute $aName with key $xname"); } elseif (isset($attrs['default'])) { $xname = '!' . $aName; $xvalue[$xname] = $attrs['default']; $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName); } else { $xname = ''; $this->debug("no value provided for attribute $aName"); } if ($xname) { $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; } } } else { $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); } if (isset($typeDef['extensionBase'])) { $ns = $this->getPrefix($typeDef['extensionBase']); $uqType = $this->getLocalPart($typeDef['extensionBase']); if ($this->getNamespaceFromPrefix($ns)) { $ns = $this->getNamespaceFromPrefix($ns); } if ($typeDef = $this->getTypeDef($uqType, $ns)) { $this->debug("serialize attributes for extension base $ns:$uqType"); $xml .= $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); } else { $this->debug("extension base $ns:$uqType is not a supported type"); } } return $xml; } /** * serializes the elements for a complexType * * @param array $typeDef our internal representation of an XML schema type (or element) * @param mixed $value a native PHP value (parameter value) * @param string $ns the namespace of the type * @param string $uqType the local part of the type * @param string $use use for part (encoded|literal) * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) * @return string value serialized as an XML string * @access private */ function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) { $xml = ''; if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { $this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); if (is_array($value)) { $xvalue = $value; } elseif (is_object($value)) { $xvalue = get_object_vars($value); } else { $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); $xvalue = array(); } // toggle whether all elements are present - ideally should validate against schema if (count($typeDef['elements']) != count($xvalue)){ $optionals = true; } foreach ($typeDef['elements'] as $eName => $attrs) { if (!isset($xvalue[$eName])) { if (isset($attrs['default'])) { $xvalue[$eName] = $attrs['default']; $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName); } } // if user took advantage of a minOccurs=0, then only serialize named parameters if (isset($optionals) && (!isset($xvalue[$eName])) && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') ){ if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { $this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']); } // do nothing $this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing"); } else { // get value if (isset($xvalue[$eName])) { $v = $xvalue[$eName]; } else { $v = null; } if (isset($attrs['form'])) { $unqualified = ($attrs['form'] == 'unqualified'); } else { $unqualified = false; } if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') { $vv = $v; foreach ($vv as $k => $v) { if (isset($attrs['type']) || isset($attrs['ref'])) { // serialize schema-defined type $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); } else { // serialize generic type (can this ever really happen?) $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); } } } else { if (isset($attrs['type']) || isset($attrs['ref'])) { // serialize schema-defined type $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); } else { // serialize generic type (can this ever really happen?) $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); } } } } } else { $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); } if (isset($typeDef['extensionBase'])) { $ns = $this->getPrefix($typeDef['extensionBase']); $uqType = $this->getLocalPart($typeDef['extensionBase']); if ($this->getNamespaceFromPrefix($ns)) { $ns = $this->getNamespaceFromPrefix($ns); } if ($typeDef = $this->getTypeDef($uqType, $ns)) { $this->debug("serialize elements for extension base $ns:$uqType"); $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); } else { $this->debug("extension base $ns:$uqType is not a supported type"); } } return $xml; } /** * adds an XML Schema complex type to the WSDL types * * @param string name * @param string typeClass (complexType|simpleType|attribute) * @param string phpType: currently supported are array and struct (php assoc array) * @param string compositor (all|sequence|choice) * @param string restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param array elements = array ( name => array(name=>'',type=>'') ) * @param array attrs = array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) * @param string arrayType: namespace:name (xsd:string) * @see xmlschema * @access public */ function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { if (count($elements) > 0) { foreach($elements as $n => $e){ // expand each element foreach ($e as $k => $v) { $k = strpos($k,':') ? $this->expandQname($k) : $k; $v = strpos($v,':') ? $this->expandQname($v) : $v; $ee[$k] = $v; } $eElements[$n] = $ee; } $elements = $eElements; } if (count($attrs) > 0) { foreach($attrs as $n => $a){ // expand each attribute foreach ($a as $k => $v) { $k = strpos($k,':') ? $this->expandQname($k) : $k; $v = strpos($v,':') ? $this->expandQname($v) : $v; $aa[$k] = $v; } $eAttrs[$n] = $aa; } $attrs = $eAttrs; } $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType; $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; $this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType); } /** * adds an XML Schema simple type to the WSDL types * * @param string $name * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param string $typeClass (should always be simpleType) * @param string $phpType (should always be scalar) * @param array $enumeration array of values * @see xmlschema * @access public */ function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; $this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration); } /** * adds an element to the WSDL types * * @param array $attrs attributes that must include name and type * @see xmlschema * @access public */ function addElement($attrs) { $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; $this->schemas[$typens][0]->addElement($attrs); } /** * register an operation with the server * * @param string $name operation (method) name * @param array $in assoc array of input values: key = param name, value = param type * @param array $out assoc array of output values: key = param name, value = param type * @param string $namespace optional The namespace for the operation * @param string $soapaction optional The soapaction for the operation * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) * @param string $documentation optional The description to include in the WSDL * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) * @access public */ function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ if ($use == 'encoded' && $encodingStyle == '') { $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; } if ($style == 'document') { $elements = array(); foreach ($in as $n => $t) { $elements[$n] = array('name' => $n, 'type' => $t); } $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements); $this->addElement(array('name' => $name, 'type' => $name . 'RequestType')); $in = array('parameters' => 'tns:' . $name); $elements = array(); foreach ($out as $n => $t) { $elements[$n] = array('name' => $n, 'type' => $t); } $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements); $this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType')); $out = array('parameters' => 'tns:' . $name . 'Response'); } // get binding $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] = array( 'name' => $name, 'binding' => $this->serviceName . 'Binding', 'endpoint' => $this->endpoint, 'soapAction' => $soapaction, 'style' => $style, 'input' => array( 'use' => $use, 'namespace' => $namespace, 'encodingStyle' => $encodingStyle, 'message' => $name . 'Request', 'parts' => $in), 'output' => array( 'use' => $use, 'namespace' => $namespace, 'encodingStyle' => $encodingStyle, 'message' => $name . 'Response', 'parts' => $out), 'namespace' => $namespace, 'transport' => 'http://schemas.xmlsoap.org/soap/http', 'documentation' => $documentation); // add portTypes // add messages if($in) { foreach($in as $pName => $pType) { if(strpos($pType,':')) { $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); } $this->messages[$name.'Request'][$pName] = $pType; } } else { $this->messages[$name.'Request']= '0'; } if($out) { foreach($out as $pName => $pType) { if(strpos($pType,':')) { $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); } $this->messages[$name.'Response'][$pName] = $pType; } } else { $this->messages[$name.'Response']= '0'; } return true; } } ?><?php /** * * soap_parser class parses SOAP XML messages into native PHP values * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soap_parser extends nusoap_base { var $xml = ''; var $xml_encoding = ''; var $method = ''; var $root_struct = ''; var $root_struct_name = ''; var $root_struct_namespace = ''; var $root_header = ''; var $document = ''; // incoming SOAP body (text) // determines where in the message we are (envelope,header,body,method) var $status = ''; var $position = 0; var $depth = 0; var $default_namespace = ''; var $namespaces = array(); var $message = array(); var $parent = ''; var $fault = false; var $fault_code = ''; var $fault_str = ''; var $fault_detail = ''; var $depth_array = array(); var $debug_flag = true; var $soapresponse = NULL; var $responseHeaders = ''; // incoming SOAP headers (text) var $body_position = 0; // for multiref parsing: // array of id => pos var $ids = array(); // array of id => hrefs => pos var $multirefs = array(); // toggle for auto-decoding element content var $decode_utf8 = true; /** * constructor that actually does the parsing * * @param string $xml SOAP message * @param string $encoding character encoding scheme of message * @param string $method method for which XML is parsed (unused?) * @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1 * @access public */ function soap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){ parent::nusoap_base(); $this->xml = $xml; $this->xml_encoding = $encoding; $this->method = $method; $this->decode_utf8 = $decode_utf8; // Check whether content has been read. if(!empty($xml)){ // Check XML encoding $pos_xml = strpos($xml, '<?xml'); if ($pos_xml !== FALSE) { $xml_decl = substr($xml, $pos_xml, strpos($xml, '?>', $pos_xml + 2) - $pos_xml + 1); if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) { $xml_encoding = $res[1]; if (strtoupper($xml_encoding) != $encoding) { $err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'"; $this->debug($err); if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') { $this->setError($err); return; } // when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed } else { $this->debug('Charset from HTTP Content-Type matches encoding from XML declaration'); } } else { $this->debug('No encoding specified in XML declaration'); } } else { $this->debug('No XML declaration'); } $this->debug('Entering soap_parser(), length='.strlen($xml).', encoding='.$encoding); // Create an XML parser - why not xml_parser_create_ns? $this->parser = xml_parser_create($this->xml_encoding); // Set the options for parsing the XML data. //xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding); // Set the object for the parser. xml_set_object($this->parser, $this); // Set the element handlers for the parser. xml_set_element_handler($this->parser, 'start_element','end_element'); xml_set_character_data_handler($this->parser,'character_data'); // Parse the XML file. if(!xml_parse($this->parser,$xml,true)){ // Display an error message. $err = sprintf('XML error parsing SOAP payload on line %d: %s', xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser))); $this->debug($err); $this->debug("XML payload:\n" . $xml); $this->setError($err); } else { $this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name); // get final value $this->soapresponse = $this->message[$this->root_struct]['result']; // get header value: no, because this is documented as XML string // if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){ // $this->responseHeaders = $this->message[$this->root_header]['result']; // } // resolve hrefs/ids if(sizeof($this->multirefs) > 0){ foreach($this->multirefs as $id => $hrefs){ $this->debug('resolving multirefs for id: '.$id); $idVal = $this->buildVal($this->ids[$id]); if (is_array($idVal) && isset($idVal['!id'])) { unset($idVal['!id']); } foreach($hrefs as $refPos => $ref){ $this->debug('resolving href at pos '.$refPos); $this->multirefs[$id][$refPos] = $idVal; } } } } xml_parser_free($this->parser); } else { $this->debug('xml was empty, didn\'t parse!'); $this->setError('xml was empty, didn\'t parse!'); } } /** * start-element handler * * @param resource $parser XML parser object * @param string $name element name * @param array $attrs associative array of attributes * @access private */ function start_element($parser, $name, $attrs) { // position in a total number of elements, starting from 0 // update class level pos $pos = $this->position++; // and set mine $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>''); // depth = how many levels removed from root? // set mine as current global depth and increment global depth value $this->message[$pos]['depth'] = $this->depth++; // else add self as child to whoever the current parent is if($pos != 0){ $this->message[$this->parent]['children'] .= '|'.$pos; } // set my parent $this->message[$pos]['parent'] = $this->parent; // set self as current parent $this->parent = $pos; // set self as current value for this depth $this->depth_array[$this->depth] = $pos; // get element prefix if(strpos($name,':')){ // get ns prefix $prefix = substr($name,0,strpos($name,':')); // get unqualified name $name = substr(strstr($name,':'),1); } // set status if($name == 'Envelope'){ $this->status = 'envelope'; } elseif($name == 'Header'){ $this->root_header = $pos; $this->status = 'header'; } elseif($name == 'Body'){ $this->status = 'body'; $this->body_position = $pos; // set method } elseif($this->status == 'body' && $pos == ($this->body_position+1)){ $this->status = 'method'; $this->root_struct_name = $name; $this->root_struct = $pos; $this->message[$pos]['type'] = 'struct'; $this->debug("found root struct $this->root_struct_name, pos $this->root_struct"); } // set my status $this->message[$pos]['status'] = $this->status; // set name $this->message[$pos]['name'] = htmlspecialchars($name); // set attrs $this->message[$pos]['attrs'] = $attrs; // loop through atts, logging ns and type declarations $attstr = ''; foreach($attrs as $key => $value){ $key_prefix = $this->getPrefix($key); $key_localpart = $this->getLocalPart($key); // if ns declarations, add to class level array of valid namespaces if($key_prefix == 'xmlns'){ if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){ $this->XMLSchemaVersion = $value; $this->namespaces['xsd'] = $this->XMLSchemaVersion; $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; } $this->namespaces[$key_localpart] = $value; // set method namespace if($name == $this->root_struct_name){ $this->methodNamespace = $value; } // if it's a type declaration, set type } elseif($key_localpart == 'type'){ $value_prefix = $this->getPrefix($value); $value_localpart = $this->getLocalPart($value); $this->message[$pos]['type'] = $value_localpart; $this->message[$pos]['typePrefix'] = $value_prefix; if(isset($this->namespaces[$value_prefix])){ $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix]; } else if(isset($attrs['xmlns:'.$value_prefix])) { $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix]; } // should do something here with the namespace of specified type? } elseif($key_localpart == 'arrayType'){ $this->message[$pos]['type'] = 'array'; /* do arrayType ereg here [1] arrayTypeValue ::= atype asize [2] atype ::= QName rank* [3] rank ::= '[' (',')* ']' [4] asize ::= '[' length~ ']' [5] length ::= nextDimension* Digit+ [6] nextDimension ::= Digit+ ',' */ $expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]'; if(ereg($expr,$value,$regs)){ $this->message[$pos]['typePrefix'] = $regs[1]; $this->message[$pos]['arrayTypePrefix'] = $regs[1]; if (isset($this->namespaces[$regs[1]])) { $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]]; } else if (isset($attrs['xmlns:'.$regs[1]])) { $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]]; } $this->message[$pos]['arrayType'] = $regs[2]; $this->message[$pos]['arraySize'] = $regs[3]; $this->message[$pos]['arrayCols'] = $regs[4]; } // specifies nil value (or not) } elseif ($key_localpart == 'nil'){ $this->message[$pos]['nil'] = ($value == 'true' || $value == '1'); // some other attribute } elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') { $this->message[$pos]['xattrs']['!' . $key] = $value; } if ($key == 'xmlns') { $this->default_namespace = $value; } // log id if($key == 'id'){ $this->ids[$value] = $pos; } // root if($key_localpart == 'root' && $value == 1){ $this->status = 'method'; $this->root_struct_name = $name; $this->root_struct = $pos; $this->debug("found root struct $this->root_struct_name, pos $pos"); } // for doclit $attstr .= " $key=\"$value\""; } // get namespace - must be done after namespace atts are processed if(isset($prefix)){ $this->message[$pos]['namespace'] = $this->namespaces[$prefix]; $this->default_namespace = $this->namespaces[$prefix]; } else { $this->message[$pos]['namespace'] = $this->default_namespace; } if($this->status == 'header'){ if ($this->root_header != $pos) { $this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; } } elseif($this->root_struct_name != ''){ $this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; } } /** * end-element handler * * @param resource $parser XML parser object * @param string $name element name * @access private */ function end_element($parser, $name) { // position of current element is equal to the last value left in depth_array for my depth $pos = $this->depth_array[$this->depth--]; // get element prefix if(strpos($name,':')){ // get ns prefix $prefix = substr($name,0,strpos($name,':')); // get unqualified name $name = substr(strstr($name,':'),1); } // build to native type if(isset($this->body_position) && $pos > $this->body_position){ // deal w/ multirefs if(isset($this->message[$pos]['attrs']['href'])){ // get id $id = substr($this->message[$pos]['attrs']['href'],1); // add placeholder to href array $this->multirefs[$id][$pos] = 'placeholder'; // add set a reference to it as the result value $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; // build complexType values } elseif($this->message[$pos]['children'] != ''){ // if result has already been generated (struct/array) if(!isset($this->message[$pos]['result'])){ $this->message[$pos]['result'] = $this->buildVal($pos); } // build complexType values of attributes and possibly simpleContent } elseif (isset($this->message[$pos]['xattrs'])) { if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { $this->message[$pos]['xattrs']['!'] = null; } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { if (isset($this->message[$pos]['type'])) { $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } else { $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } else { $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata']; } } } $this->message[$pos]['result'] = $this->message[$pos]['xattrs']; // set value of simpleType (or nil complexType) } else { //$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']); if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { $this->message[$pos]['xattrs']['!'] = null; } elseif (isset($this->message[$pos]['type'])) { $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } else { $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } else { $this->message[$pos]['result'] = $this->message[$pos]['cdata']; } } /* add value to parent's result, if parent is struct/array $parent = $this->message[$pos]['parent']; if($this->message[$parent]['type'] != 'map'){ if(strtolower($this->message[$parent]['type']) == 'array'){ $this->message[$parent]['result'][] = $this->message[$pos]['result']; } else { $this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result']; } } */ } } // for doclit if($this->status == 'header'){ if ($this->root_header != $pos) { $this->responseHeaders .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>"; } } elseif($pos >= $this->root_struct){ $this->document .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>"; } // switch status if($pos == $this->root_struct){ $this->status = 'body'; $this->root_struct_namespace = $this->message[$pos]['namespace']; } elseif($name == 'Body'){ $this->status = 'envelope'; } elseif($name == 'Header'){ $this->status = 'envelope'; } elseif($name == 'Envelope'){ // } // set parent back to my parent $this->parent = $this->message[$pos]['parent']; } /** * element content handler * * @param resource $parser XML parser object * @param string $data element content * @access private */ function character_data($parser, $data){ $pos = $this->depth_array[$this->depth]; if ($this->xml_encoding=='UTF-8'){ // TODO: add an option to disable this for folks who want // raw UTF-8 that, e.g., might not map to iso-8859-1 // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); if($this->decode_utf8){ $data = utf8_decode($data); } } $this->message[$pos]['cdata'] .= $data; // for doclit if($this->status == 'header'){ $this->responseHeaders .= $data; } else { $this->document .= $data; } } /** * get the parsed message * * @return mixed * @access public */ function get_response(){ return $this->soapresponse; } /** * get the parsed headers * * @return string XML or empty if no headers * @access public */ function getHeaders(){ return $this->responseHeaders; } /** * decodes simple types into PHP variables * * @param string $value value to decode * @param string $type XML type to decode * @param string $typens XML type namespace to decode * @return mixed PHP value * @access private */ function decodeSimple($value, $type, $typens) { // TODO: use the namespace! if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') { return (string) $value; } if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') { return (int) $value; } if ($type == 'float' || $type == 'double' || $type == 'decimal') { return (double) $value; } if ($type == 'boolean') { if (strtolower($value) == 'false' || strtolower($value) == 'f') { return false; } return (boolean) $value; } if ($type == 'base64' || $type == 'base64Binary') { $this->debug('Decode base64 value'); return base64_decode($value); } // obscure numeric types if ($type == 'nonPositiveInteger' || $type == 'negativeInteger' || $type == 'nonNegativeInteger' || $type == 'positiveInteger' || $type == 'unsignedInt' || $type == 'unsignedShort' || $type == 'unsignedByte') { return (int) $value; } // bogus: parser treats array with no elements as a simple type if ($type == 'array') { return array(); } // everything else return (string) $value; } /** * builds response structures for compound values (arrays/structs) * and scalars * * @param integer $pos position in node tree * @return mixed PHP value * @access private */ function buildVal($pos){ if(!isset($this->message[$pos]['type'])){ $this->message[$pos]['type'] = ''; } $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']); // if there are children... if($this->message[$pos]['children'] != ''){ $this->debug('in buildVal, there are children'); $children = explode('|',$this->message[$pos]['children']); array_shift($children); // knock off empty // md array if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){ $r=0; // rowcount $c=0; // colcount foreach($children as $child_pos){ $this->debug("in buildVal, got an MD array element: $r, $c"); $params[$r][] = $this->message[$child_pos]['result']; $c++; if($c == $this->message[$pos]['arrayCols']){ $c = 0; $r++; } } // array } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){ $this->debug('in buildVal, adding array '.$this->message[$pos]['name']); foreach($children as $child_pos){ $params[] = &$this->message[$child_pos]['result']; } // apache Map type: java hashtable } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){ $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']); foreach($children as $child_pos){ $kv = explode("|",$this->message[$child_pos]['children']); $params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result']; } // generic compound type //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') { } else { // Apache Vector type: treat as an array $this->debug('in buildVal, adding Java Vector '.$this->message[$pos]['name']); if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') { $notstruct = 1; } else { $notstruct = 0; } // foreach($children as $child_pos){ if($notstruct){ $params[] = &$this->message[$child_pos]['result']; } else { if (isset($params[$this->message[$child_pos]['name']])) { // de-serialize repeated element name into an array if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) { $params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]); } $params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result']; } else { $params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result']; } } } } if (isset($this->message[$pos]['xattrs'])) { $this->debug('in buildVal, handling attributes'); foreach ($this->message[$pos]['xattrs'] as $n => $v) { $params[$n] = $v; } } // handle simpleContent if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { $this->debug('in buildVal, handling simpleContent'); if (isset($this->message[$pos]['type'])) { $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } else { $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } else { $params['!'] = $this->message[$pos]['cdata']; } } } return is_array($params) ? $params : array(); } else { $this->debug('in buildVal, no children, building scalar'); $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : ''; if (isset($this->message[$pos]['type'])) { return $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { return $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } return $this->message[$pos]['cdata']; } } } ?><?php /** * * soapclient higher level class for easy usage. * * usage: * * // instantiate client with server info * $soapclient = new soapclient( string path [ ,boolean wsdl] ); * * // call method, get results * echo $soapclient->call( string methodname [ ,array parameters] ); * * // bye bye client * unset($soapclient); * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: nusoap.php,v 1.94 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soapclientw extends nusoap_base { var $username = ''; var $password = ''; var $authtype = ''; var $certRequest = array(); var $requestHeaders = false; // SOAP headers in request (text) var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) var $endpoint; var $forceEndpoint = ''; // overrides WSDL endpoint var $proxyhost = ''; var $proxyport = ''; var $proxyusername = ''; var $proxypassword = ''; var $xml_encoding = ''; // character set encoding of incoming (response) messages var $http_encoding = false; var $timeout = 0; // HTTP connection timeout var $response_timeout = 30; // HTTP response timeout var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error var $persistentConnection = false; var $defaultRpcParams = false; // This is no longer used var $request = ''; // HTTP request var $response = ''; // HTTP response var $responseData = ''; // SOAP payload of response var $cookies = array(); // Cookies from response or for request var $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() var $operations = array(); // WSDL operations, empty for WSDL initialization error /* * fault related variables */ /** * @var fault * @access public */ var $fault; /** * @var faultcode * @access public */ var $faultcode; /** * @var faultstring * @access public */ var $faultstring; /** * @var faultdetail * @access public */ var $faultdetail; /** * constructor * * @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) * @param bool $wsdl optional, set to true if using WSDL * @param int $portName optional portName in WSDL document * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @param integer $timeout set the connection timeout * @param integer $response_timeout set the response timeout * @access public */ function soapclientw($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){ parent::nusoap_base(); $this->endpoint = $endpoint; $this->proxyhost = $proxyhost; $this->proxyport = $proxyport; $this->proxyusername = $proxyusername; $this->proxypassword = $proxypassword; $this->timeout = $timeout; $this->response_timeout = $response_timeout; // make values if($wsdl){ if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) { $this->wsdl = $endpoint; $this->endpoint = $this->wsdl->wsdl; $this->wsdlFile = $this->endpoint; $this->debug('existing wsdl instance created from ' . $this->endpoint); } else { $this->wsdlFile = $this->endpoint; // instantiate wsdl object and parse wsdl file $this->debug('instantiating wsdl class with doc: '.$endpoint); $this->wsdl =& new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); // catch errors if($errstr = $this->wsdl->getError()){ $this->debug('got wsdl error: '.$errstr); $this->setError('wsdl error: '.$errstr); } elseif($this->operations = $this->wsdl->getOperations()){ $this->debug( 'got '.count($this->operations).' operations from wsdl '.$this->wsdlFile); $this->endpointType = 'wsdl'; } else { $this->debug( 'getOperations returned false'); $this->setError('no operations defined in the WSDL document!'); } } else { $this->debug("instantiate SOAP with endpoint at $endpoint"); $this->endpointType = 'soap'; } } /** * calls method, returns PHP native type * * @param string $method SOAP server URL or path * @param mixed $params An array, associative or simple, of the parameters * for the method call, or a string that is the XML * for the call. For rpc style, this call will * wrap the XML in a tag named after the method, as * well as the SOAP Envelope and Body. For document * style, this will only wrap with the Envelope and Body. * IMPORTANT: when using an array with document style, * in which case there * is really one parameter, the root of the fragment * used in the call, which encloses what programmers * normally think of parameters. A parameter array * *must* include the wrapper. * @param string $namespace optional method namespace (WSDL can override) * @param string $soapAction optional SOAPAction value (WSDL can override) * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers * @param boolean $rpcParams optional (no longer used) * @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) * @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override) * @return mixed response from SOAP call * @access public */ function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){ $this->operation = $operation; $this->fault = false; $this->setError(''); $this->request = ''; $this->response = ''; $this->responseData = ''; $this->faultstring = ''; $this->faultcode = ''; $this->opData = array(); $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); $this->appendDebug('params=' . $this->varDump($params)); $this->appendDebug('headers=' . $this->varDump($headers)); if ($headers) { $this->requestHeaders = $headers; } // serialize parameters if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ // use WSDL for operation $this->opData = $opData; $this->debug("found operation"); $this->appendDebug('opData=' . $this->varDump($opData)); if (isset($opData['soapAction'])) { $soapAction = $opData['soapAction']; } if (! $this->forceEndpoint) { $this->endpoint = $opData['endpoint']; } else { $this->endpoint = $this->forceEndpoint; } $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace; $style = $opData['style']; $use = $opData['input']['use']; // add ns to ns array if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){ $nsPrefix = 'ns' . rand(1000, 9999); $this->wsdl->namespaces[$nsPrefix] = $namespace; } $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace); // serialize payload if (is_string($params)) { $this->debug("serializing param string for WSDL operation $operation"); $payload = $params; } elseif (is_array($params)) { $this->debug("serializing param array for WSDL operation $operation"); $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params); } else { $this->debug('params must be array or string'); $this->setError('params must be array or string'); return false; } $usedNamespaces = $this->wsdl->usedNamespaces; if (isset($opData['input']['encodingStyle'])) { $encodingStyle = $opData['input']['encodingStyle']; } else { $encodingStyle = ''; } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); if ($errstr = $this->wsdl->getError()) { $this->debug('got wsdl error: '.$errstr); $this->setError('wsdl error: '.$errstr); return false; } } elseif($this->endpointType == 'wsdl') { // operation not in WSDL $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); $this->setError( 'operation '.$operation.' not present.'); $this->debug("operation '$operation' not present."); return false; } else { // no WSDL //$this->namespaces['ns1'] = $namespace; $nsPrefix = 'ns' . rand(1000, 9999); // serialize $payload = ''; if (is_string($params)) { $this->debug("serializing param string for operation $operation"); $payload = $params; } elseif (is_array($params)) { $this->debug("serializing param array for operation $operation"); foreach($params as $k => $v){ $payload .= $this->serialize_val($v,$k,false,false,false,false,$use); } } else { $this->debug('params must be array or string'); $this->setError('params must be array or string'); return false; } $usedNamespaces = array(); if ($use == 'encoded') { $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; } else { $encodingStyle = ''; } } // wrap RPC calls with method element if ($style == 'rpc') { if ($use == 'literal') { $this->debug("wrapping RPC request with literal method element"); if ($namespace) { $payload = "<$operation xmlns=\"$namespace\">" . $payload . "</$operation>"; } else { $payload = "<$operation>" . $payload . "</$operation>"; } } else { $this->debug("wrapping RPC request with encoded method element"); if ($namespace) { $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . $payload . "</$nsPrefix:$operation>"; } else { $payload = "<$operation>" . $payload . "</$operation>"; } } } // serialize envelope $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000)); // send $return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout); if($errstr = $this->getError()){ $this->debug('Error: '.$errstr); return false; } else { $this->return = $return; $this->debug('sent message successfully and got a(n) '.gettype($return)); $this->appendDebug('return=' . $this->varDump($return)); // fault? if(is_array($return) && isset($return['faultcode'])){ $this->debug('got fault'); $this->setError($return['faultcode'].': '.$return['faultstring']); $this->fault = true; foreach($return as $k => $v){ $this->$k = $v; $this->debug("$k = $v<br>"); } return $return; } elseif ($style == 'document') { // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), // we are only going to return the first part here...sorry about that return $return; } else { // array of return values if(is_array($return)){ // multiple 'out' parameters, which we return wrapped up // in the array if(sizeof($return) > 1){ return $return; } // single 'out' parameter (normally the return value) $return = array_shift($return); $this->debug('return shifted value: '); $this->appendDebug($this->varDump($return)); return $return; // nothing returned (ie, echoVoid) } else { return ""; } } } } /** * get available data pertaining to an operation * * @param string $operation operation name * @return array array of data pertaining to the operation * @access public */ function getOperationData($operation){ if(isset($this->operations[$operation])){ return $this->operations[$operation]; } $this->debug("No data for operation: $operation"); } /** * send the SOAP message * * Note: if the operation has multiple return values * the return value of this method will be an array * of those values. * * @param string $msg a SOAPx4 soapmsg object * @param string $soapaction SOAPAction value * @param integer $timeout set connection timeout in seconds * @param integer $response_timeout set response timeout in seconds * @return mixed native PHP types. * @access private */ function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) { $this->checkCookies(); // detect transport switch(true){ // http(s) case ereg('^http',$this->endpoint): $this->debug('transporting via HTTP'); if($this->persistentConnection == true && is_object($this->persistentConnection)){ $http =& $this->persistentConnection; } else { $http = new soap_transport_http($this->endpoint); if ($this->persistentConnection) { $http->usePersistentConnection(); } } $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset()); $http->setSOAPAction($soapaction); if($this->proxyhost && $this->proxyport){ $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); } if($this->authtype != '') { $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); } if($this->http_encoding != ''){ $http->setEncoding($this->http_encoding); } $this->debug('sending message, length='.strlen($msg)); if(ereg('^http:',$this->endpoint)){ //if(strpos($this->endpoint,'http:')){ $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); } elseif(ereg('^https',$this->endpoint)){ //} elseif(strpos($this->endpoint,'https:')){ //if(phpversion() == '4.3.0-dev'){ //$response = $http->send($msg,$timeout,$response_timeout); //$this->request = $http->outgoing_payload; //$this->response = $http->incoming_payload; //} else $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies); } else { $this->setError('no http/s in endpoint url'); } $this->request = $http->outgoing_payload; $this->response = $http->incoming_payload; $this->appendDebug($http->getDebug()); $this->UpdateCookies($http->incoming_cookies); // save transport object if using persistent connections if ($this->persistentConnection) { $http->clearDebug(); if (!is_object($this->persistentConnection)) { $this->persistentConnection = $http; } } if($err = $http->getError()){ $this->setError('HTTP Error: '.$err); return false; } elseif($this->getError()){ return false; } else { $this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']); return $this->parseResponse($http->incoming_headers, $this->responseData); } break; default: $this->setError('no transport found, or selected transport is not yet supported!'); return false; break; } } /** * processes SOAP message returned from server * * @param array $headers The HTTP headers * @param string $data unprocessed response data from server * @return mixed value of the message, decoded into a PHP type * @access private */ function parseResponse($headers, $data) { $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' and type ' . $headers['content-type']); if (!strstr($headers['content-type'], 'text/xml')) { $this->setError('Response not of type text/xml'); return false; } if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating soap_parser'); $parser = new soap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8); // add parser debug data to our debug $this->appendDebug($parser->getDebug()); // if parse errors if($errstr = $parser->getError()){ $this->setError( $errstr); // destroy the parser object unset($parser); return false; } else { // get SOAP headers $this->responseHeaders = $parser->getHeaders(); // get decoded message $return = $parser->get_response(); // add document for doclit support $this->document = $parser->document; // destroy the parser object unset($parser); // return decode message return $return; } } /** * sets the SOAP endpoint, which can override WSDL * * @param $endpoint string The endpoint URL to use, or empty string or false to prevent override * @access public */ function setEndpoint($endpoint) { $this->forceEndpoint = $endpoint; } /** * set the SOAP headers * * @param $headers mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers * @access public */ function setHeaders($headers){ $this->requestHeaders = $headers; } /** * get the SOAP response headers (namespace resolution incomplete) * * @return string * @access public */ function getHeaders(){ return $this->responseHeaders; } /** * set proxy info here * * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @access public */ function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { $this->proxyhost = $proxyhost; $this->proxyport = $proxyport; $this->proxyusername = $proxyusername; $this->proxypassword = $proxypassword; } /** * if authenticating, set user credentials here * * @param string $username * @param string $password * @param string $authtype (basic|digest|certificate) * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) * @access public */ function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { $this->username = $username; $this->password = $password; $this->authtype = $authtype; $this->certRequest = $certRequest; } /** * use HTTP encoding * * @param string $enc * @access public */ function setHTTPEncoding($enc='gzip, deflate'){ $this->http_encoding = $enc; } /** * use HTTP persistent connections if possible * * @access public */ function useHTTPPersistentConnection(){ $this->persistentConnection = true; } /** * gets the default RPC parameter setting. * If true, default is that call params are like RPC even for document style. * Each call() can override this value. * * This is no longer used. * * @return boolean * @access public * @deprecated */ function getDefaultRpcParams() { return $this->defaultRpcParams; } /** * sets the default RPC parameter setting. * If true, default is that call params are like RPC even for document style * Each call() can override this value. * * This is no longer used. * * @param boolean $rpcParams * @access public * @deprecated */ function setDefaultRpcParams($rpcParams) { $this->defaultRpcParams = $rpcParams; } /** * dynamically creates an instance of a proxy class, * allowing user to directly call methods from wsdl * * @return object soap_proxy object * @access public */ function getProxy(){ $r = rand(); $evalStr = $this->_getProxyClassCode($r); //$this->debug("proxy class: $evalStr"; // eval the class eval($evalStr); // instantiate proxy object eval("\$proxy = new soap_proxy_$r('');"); // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice $proxy->endpointType = 'wsdl'; $proxy->wsdlFile = $this->wsdlFile; $proxy->wsdl = $this->wsdl; $proxy->operations = $this->operations; $proxy->defaultRpcParams = $this->defaultRpcParams; // transfer other state $proxy->username = $this->username; $proxy->password = $this->password; $proxy->authtype = $this->authtype; $proxy->proxyhost = $this->proxyhost; $proxy->proxyport = $this->proxyport; $proxy->proxyusername = $this->proxyusername; $proxy->proxypassword = $this->proxypassword; $proxy->timeout = $this->timeout; $proxy->response_timeout = $this->response_timeout; $proxy->http_encoding = $this->http_encoding; $proxy->persistentConnection = $this->persistentConnection; $proxy->requestHeaders = $this->requestHeaders; $proxy->soap_defencoding = $this->soap_defencoding; $proxy->endpoint = $this->endpoint; $proxy->forceEndpoint = $this->forceEndpoint; return $proxy; } /** * dynamically creates proxy class code * * @return string PHP/NuSOAP code for the proxy class * @access private */ function _getProxyClassCode($r) { if ($this->endpointType != 'wsdl') { $evalStr = 'A proxy can only be created for a WSDL client'; $this->setError($evalStr); return $evalStr; } $evalStr = ''; foreach ($this->operations as $operation => $opData) { if ($operation != '') { // create param string and param comment string if (sizeof($opData['input']['parts']) > 0) { $paramStr = ''; $paramArrayStr = ''; $paramCommentStr = ''; foreach ($opData['input']['parts'] as $name => $type) { $paramStr .= "\$$name, "; $paramArrayStr .= "'$name' => \$$name, "; $paramCommentStr .= "$type \$$name, "; } $paramStr = substr($paramStr, 0, strlen($paramStr)-2); $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2); $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2); } else { $paramStr = ''; $paramCommentStr = 'void'; } $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace']; $evalStr .= "// $paramCommentStr function " . str_replace('.', '__', $operation) . "($paramStr) { \$params = array($paramArrayStr); return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."'); } "; unset($paramStr); unset($paramCommentStr); } } $evalStr = 'class soap_proxy_'.$r.' extends soapclientw { '.$evalStr.' }'; return $evalStr; } /** * dynamically creates proxy class code * * @return string PHP/NuSOAP code for the proxy class * @access public */ function getProxyClassCode() { $r = rand(); return $this->_getProxyClassCode($r); } /** * gets the HTTP body for the current request. * * @param string $soapmsg The SOAP payload * @return string The HTTP body, which includes the SOAP payload * @access private */ function getHTTPBody($soapmsg) { return $soapmsg; } /** * gets the HTTP content type for the current request. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type for the current request. * @access private */ function getHTTPContentType() { return 'text/xml'; } /** * gets the HTTP content type charset for the current request. * returns false for non-text content types. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type charset for the current request. * @access private */ function getHTTPContentTypeCharset() { return $this->soap_defencoding; } /* * whether or not parser should decode utf8 element content * * @return always returns true * @access public */ function decodeUTF8($bool){ $this->decode_utf8 = $bool; return true; } /** * adds a new Cookie into $this->cookies array * * @param string $name Cookie Name * @param string $value Cookie Value * @return if cookie-set was successful returns true, else false * @access public */ function setCookie($name, $value) { if (strlen($name) == 0) { return false; } $this->cookies[] = array('name' => $name, 'value' => $value); return true; } /** * gets all Cookies * * @return array with all internal cookies * @access public */ function getCookies() { return $this->cookies; } /** * checks all Cookies and delete those which are expired * * @return always return true * @access private */ function checkCookies() { if (sizeof($this->cookies) == 0) { return true; } $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies'); $curr_cookies = $this->cookies; $this->cookies = array(); foreach ($curr_cookies as $cookie) { if (! is_array($cookie)) { $this->debug('Remove cookie that is not an array'); continue; } if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { if (strtotime($cookie['expires']) > time()) { $this->cookies[] = $cookie; } else { $this->debug('Remove expired cookie ' . $cookie['name']); } } else { $this->cookies[] = $cookie; } } $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array'); return true; } /** * updates the current cookies with a new set * * @param array $cookies new cookies with which to update current ones * @return always return true * @access private */ function UpdateCookies($cookies) { if (sizeof($this->cookies) == 0) { // no existing cookies: take whatever is new if (sizeof($cookies) > 0) { $this->debug('Setting new cookie(s)'); $this->cookies = $cookies; } return true; } if (sizeof($cookies) == 0) { // no new cookies: keep what we've got return true; } // merge foreach ($cookies as $newCookie) { if (!is_array($newCookie)) { continue; } if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) { continue; } $newName = $newCookie['name']; $found = false; for ($i = 0; $i < count($this->cookies); $i++) { $cookie = $this->cookies[$i]; if (!is_array($cookie)) { continue; } if (!isset($cookie['name'])) { continue; } if ($newName != $cookie['name']) { continue; } $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN'; $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN'; if ($newDomain != $domain) { continue; } $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH'; $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH'; if ($newPath != $path) { continue; } $this->cookies[$i] = $newCookie; $found = true; $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']); break; } if (! $found) { $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']); $this->cookies[] = $newCookie; } } return true; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/nusoap.php
PHP
asf20
261,504
<?php function print_a($name, $arr) { echo "$name: "; print_r($arr); echo "<br/>\n"; } class SaxElement { var $parentNode; var $tagName; var $val; var $attrs; var $childs; function SaxElement($tagName) { $this->tagName = $tagName; $this->attrs = array(); $this->childs = array(); } function setParentNode(& $parentNode) { $this->parentNode = & $parentNode; } function setValue($val) { $this->val = $val; } function addAttr($key, $val) { $this->attrs[$key] = $val; } function setAttrs($attrs) { $this->attrs = $attrs; } function addChild(& $element) { array_push($this->childs, &$element); } function getParent() { return $this->parent; } function getChilds() { return $this->childs; } function isRoot() { return $this->parent == NULL; } /** * 得到类XML的结构 */ function getArray() { $arr = array(); $arr['tag'] = $this->tagName; $arr['attrs'] = $this->attrs; if ($this->val != NULL) { $arr['value'] = $this->val; } elseif ( sizeof($this->childs) ) { $arr['childs'] = array(); foreach($this->childs as $childElement) { $arr['childs'][] = $childElement->getArray(); } } return $arr; } /** * 得到简化的结构 */ function getArray2() { $rs = array(); $rs['sname'] = $this->attrs['sname']; $rs['result'] = $this->attrs['result']; foreach($this->childs as $child) { $rt = $child->_getArray2(); $rs[ $rt['key'] ] = $rt['value']; } return $rs; } function _getArray2() { $rt = array(); $name = $this->attrs['name']; $type = $this->attrs['type']; switch ($type) { case 'list': case 'map': $var = array(); foreach($this->childs as $i => $child) { $_rt = $child->_getArray2(); $k = $_rt['key']; $k = ($k==null ? $i : $k); $var[$k] = $_rt['value']; } break; default: $var = $this->val; } $rt['key'] = $name; $rt['value'] = $var; return $rt; } } $rootDom; $stack = array(); function startElement($parser, $name, $attrs) { global $rootDom, $stack; if ( sizeof($stack)==0 ) { // 当栈为空时认为是XML的根节点 $rootDom = new SaxElement($name); $rootDom->setAttrs($attrs); array_push($stack, &$rootDom); } else { $element = new SaxElement($name); $element->setAttrs($attrs); $parent = &$stack[sizeof($stack)-1]; $element->setParentNode($parent); $parent->addChild($element); array_push($stack, &$element); } } function endElement($parser, $name) { global $stack; array_pop($stack); } function characterData($parser, $data) { if ( trim($data)!="" ) { global $stack; $element = &$stack[sizeof($stack)-1]; $element->setValue($data); } } function xml2array($xml) { $xml_parser = xml_parser_create(); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "characterData"); xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 1); if (!xml_parse($xml_parser, $xml)) { die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } xml_parser_free($xml_parser); global $rootDom; return $rootDom->getArray2(); } /* * 测试 $xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <root sname=\"ConsumeService\" result=\"0\"> <node name=\"time\" type=\"date\">2008-01-22</node> <node name=\"merchantid\" type=\"string\">1001</node> <node name=\"ch\" type=\"list\"> <node type=\"int\">22</node> <node type=\"int\">33</node> <node type=\"string\">44</node> </node> <node name=\"mapping\" type=\"map\"> <node name=\"aaa\" type=\"string\">22</node> <node name=\"bbb\" type=\"int\">33</node> <node name=\"ccc\" type=\"int\">44</node> </node> </root>"; $arr = xml2array($xml); print_a('return', $arr); $xml = "<?xml version=\"1.0\" encoding=\"GBK\"?> <cb-xdoc sname=\"ConsumeService\" result=\"E12042000\"><node name=\"_error\" type=\"string\"><![CDATA[银行不允许此交易]]></node><node name=\"error\" type=\"string\"><![CDATA[E12042000]]></node></cb-xdoc>"; $arr = xml2array($xml); print_a('return', $arr); */ ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/chinabank.XmlParser.php
PHP
asf20
5,059
<?php /** * * soap_parser class parses SOAP XML messages into native PHP values * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.soap_parser.php,v 1.36 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soap_parser extends nusoap_base { var $xml = ''; var $xml_encoding = ''; var $method = ''; var $root_struct = ''; var $root_struct_name = ''; var $root_struct_namespace = ''; var $root_header = ''; var $document = ''; // incoming SOAP body (text) // determines where in the message we are (envelope,header,body,method) var $status = ''; var $position = 0; var $depth = 0; var $default_namespace = ''; var $namespaces = array(); var $message = array(); var $parent = ''; var $fault = false; var $fault_code = ''; var $fault_str = ''; var $fault_detail = ''; var $depth_array = array(); var $debug_flag = true; var $soapresponse = NULL; var $responseHeaders = ''; // incoming SOAP headers (text) var $body_position = 0; // for multiref parsing: // array of id => pos var $ids = array(); // array of id => hrefs => pos var $multirefs = array(); // toggle for auto-decoding element content var $decode_utf8 = true; /** * constructor that actually does the parsing * * @param string $xml SOAP message * @param string $encoding character encoding scheme of message * @param string $method method for which XML is parsed (unused?) * @param string $decode_utf8 whether to decode UTF-8 to ISO-8859-1 * @access public */ function soap_parser($xml,$encoding='UTF-8',$method='',$decode_utf8=true){ parent::nusoap_base(); $this->xml = $xml; $this->xml_encoding = $encoding; $this->method = $method; $this->decode_utf8 = $decode_utf8; // Check whether content has been read. if(!empty($xml)){ // Check XML encoding $pos_xml = strpos($xml, '<?xml'); if ($pos_xml !== FALSE) { $xml_decl = substr($xml, $pos_xml, strpos($xml, '?>', $pos_xml + 2) - $pos_xml + 1); if (preg_match("/encoding=[\"']([^\"']*)[\"']/", $xml_decl, $res)) { $xml_encoding = $res[1]; if (strtoupper($xml_encoding) != $encoding) { $err = "Charset from HTTP Content-Type '" . $encoding . "' does not match encoding from XML declaration '" . $xml_encoding . "'"; $this->debug($err); if ($encoding != 'ISO-8859-1' || strtoupper($xml_encoding) != 'UTF-8') { $this->setError($err); return; } // when HTTP says ISO-8859-1 (the default) and XML says UTF-8 (the typical), assume the other endpoint is just sloppy and proceed } else { $this->debug('Charset from HTTP Content-Type matches encoding from XML declaration'); } } else { $this->debug('No encoding specified in XML declaration'); } } else { $this->debug('No XML declaration'); } $this->debug('Entering soap_parser(), length='.strlen($xml).', encoding='.$encoding); // Create an XML parser - why not xml_parser_create_ns? $this->parser = xml_parser_create($this->xml_encoding); // Set the options for parsing the XML data. //xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->xml_encoding); // Set the object for the parser. xml_set_object($this->parser, $this); // Set the element handlers for the parser. xml_set_element_handler($this->parser, 'start_element','end_element'); xml_set_character_data_handler($this->parser,'character_data'); // Parse the XML file. if(!xml_parse($this->parser,$xml,true)){ // Display an error message. $err = sprintf('XML error parsing SOAP payload on line %d: %s', xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser))); $this->debug($err); $this->debug("XML payload:\n" . $xml); $this->setError($err); } else { $this->debug('parsed successfully, found root struct: '.$this->root_struct.' of name '.$this->root_struct_name); // get final value $this->soapresponse = $this->message[$this->root_struct]['result']; // get header value: no, because this is documented as XML string // if($this->root_header != '' && isset($this->message[$this->root_header]['result'])){ // $this->responseHeaders = $this->message[$this->root_header]['result']; // } // resolve hrefs/ids if(sizeof($this->multirefs) > 0){ foreach($this->multirefs as $id => $hrefs){ $this->debug('resolving multirefs for id: '.$id); $idVal = $this->buildVal($this->ids[$id]); if (is_array($idVal) && isset($idVal['!id'])) { unset($idVal['!id']); } foreach($hrefs as $refPos => $ref){ $this->debug('resolving href at pos '.$refPos); $this->multirefs[$id][$refPos] = $idVal; } } } } xml_parser_free($this->parser); } else { $this->debug('xml was empty, didn\'t parse!'); $this->setError('xml was empty, didn\'t parse!'); } } /** * start-element handler * * @param resource $parser XML parser object * @param string $name element name * @param array $attrs associative array of attributes * @access private */ function start_element($parser, $name, $attrs) { // position in a total number of elements, starting from 0 // update class level pos $pos = $this->position++; // and set mine $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>''); // depth = how many levels removed from root? // set mine as current global depth and increment global depth value $this->message[$pos]['depth'] = $this->depth++; // else add self as child to whoever the current parent is if($pos != 0){ $this->message[$this->parent]['children'] .= '|'.$pos; } // set my parent $this->message[$pos]['parent'] = $this->parent; // set self as current parent $this->parent = $pos; // set self as current value for this depth $this->depth_array[$this->depth] = $pos; // get element prefix if(strpos($name,':')){ // get ns prefix $prefix = substr($name,0,strpos($name,':')); // get unqualified name $name = substr(strstr($name,':'),1); } // set status if($name == 'Envelope'){ $this->status = 'envelope'; } elseif($name == 'Header'){ $this->root_header = $pos; $this->status = 'header'; } elseif($name == 'Body'){ $this->status = 'body'; $this->body_position = $pos; // set method } elseif($this->status == 'body' && $pos == ($this->body_position+1)){ $this->status = 'method'; $this->root_struct_name = $name; $this->root_struct = $pos; $this->message[$pos]['type'] = 'struct'; $this->debug("found root struct $this->root_struct_name, pos $this->root_struct"); } // set my status $this->message[$pos]['status'] = $this->status; // set name $this->message[$pos]['name'] = htmlspecialchars($name); // set attrs $this->message[$pos]['attrs'] = $attrs; // loop through atts, logging ns and type declarations $attstr = ''; foreach($attrs as $key => $value){ $key_prefix = $this->getPrefix($key); $key_localpart = $this->getLocalPart($key); // if ns declarations, add to class level array of valid namespaces if($key_prefix == 'xmlns'){ if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){ $this->XMLSchemaVersion = $value; $this->namespaces['xsd'] = $this->XMLSchemaVersion; $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; } $this->namespaces[$key_localpart] = $value; // set method namespace if($name == $this->root_struct_name){ $this->methodNamespace = $value; } // if it's a type declaration, set type } elseif($key_localpart == 'type'){ $value_prefix = $this->getPrefix($value); $value_localpart = $this->getLocalPart($value); $this->message[$pos]['type'] = $value_localpart; $this->message[$pos]['typePrefix'] = $value_prefix; if(isset($this->namespaces[$value_prefix])){ $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix]; } else if(isset($attrs['xmlns:'.$value_prefix])) { $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix]; } // should do something here with the namespace of specified type? } elseif($key_localpart == 'arrayType'){ $this->message[$pos]['type'] = 'array'; /* do arrayType ereg here [1] arrayTypeValue ::= atype asize [2] atype ::= QName rank* [3] rank ::= '[' (',')* ']' [4] asize ::= '[' length~ ']' [5] length ::= nextDimension* Digit+ [6] nextDimension ::= Digit+ ',' */ $expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]'; if(ereg($expr,$value,$regs)){ $this->message[$pos]['typePrefix'] = $regs[1]; $this->message[$pos]['arrayTypePrefix'] = $regs[1]; if (isset($this->namespaces[$regs[1]])) { $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]]; } else if (isset($attrs['xmlns:'.$regs[1]])) { $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]]; } $this->message[$pos]['arrayType'] = $regs[2]; $this->message[$pos]['arraySize'] = $regs[3]; $this->message[$pos]['arrayCols'] = $regs[4]; } // specifies nil value (or not) } elseif ($key_localpart == 'nil'){ $this->message[$pos]['nil'] = ($value == 'true' || $value == '1'); // some other attribute } elseif ($key != 'href' && $key != 'xmlns' && $key_localpart != 'encodingStyle' && $key_localpart != 'root') { $this->message[$pos]['xattrs']['!' . $key] = $value; } if ($key == 'xmlns') { $this->default_namespace = $value; } // log id if($key == 'id'){ $this->ids[$value] = $pos; } // root if($key_localpart == 'root' && $value == 1){ $this->status = 'method'; $this->root_struct_name = $name; $this->root_struct = $pos; $this->debug("found root struct $this->root_struct_name, pos $pos"); } // for doclit $attstr .= " $key=\"$value\""; } // get namespace - must be done after namespace atts are processed if(isset($prefix)){ $this->message[$pos]['namespace'] = $this->namespaces[$prefix]; $this->default_namespace = $this->namespaces[$prefix]; } else { $this->message[$pos]['namespace'] = $this->default_namespace; } if($this->status == 'header'){ if ($this->root_header != $pos) { $this->responseHeaders .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; } } elseif($this->root_struct_name != ''){ $this->document .= "<" . (isset($prefix) ? $prefix . ':' : '') . "$name$attstr>"; } } /** * end-element handler * * @param resource $parser XML parser object * @param string $name element name * @access private */ function end_element($parser, $name) { // position of current element is equal to the last value left in depth_array for my depth $pos = $this->depth_array[$this->depth--]; // get element prefix if(strpos($name,':')){ // get ns prefix $prefix = substr($name,0,strpos($name,':')); // get unqualified name $name = substr(strstr($name,':'),1); } // build to native type if(isset($this->body_position) && $pos > $this->body_position){ // deal w/ multirefs if(isset($this->message[$pos]['attrs']['href'])){ // get id $id = substr($this->message[$pos]['attrs']['href'],1); // add placeholder to href array $this->multirefs[$id][$pos] = 'placeholder'; // add set a reference to it as the result value $this->message[$pos]['result'] =& $this->multirefs[$id][$pos]; // build complexType values } elseif($this->message[$pos]['children'] != ''){ // if result has already been generated (struct/array) if(!isset($this->message[$pos]['result'])){ $this->message[$pos]['result'] = $this->buildVal($pos); } // build complexType values of attributes and possibly simpleContent } elseif (isset($this->message[$pos]['xattrs'])) { if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { $this->message[$pos]['xattrs']['!'] = null; } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { if (isset($this->message[$pos]['type'])) { $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } else { $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { $this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } else { $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata']; } } } $this->message[$pos]['result'] = $this->message[$pos]['xattrs']; // set value of simpleType (or nil complexType) } else { //$this->debug('adding data for scalar value '.$this->message[$pos]['name'].' of value '.$this->message[$pos]['cdata']); if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) { $this->message[$pos]['xattrs']['!'] = null; } elseif (isset($this->message[$pos]['type'])) { $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } else { $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { $this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } else { $this->message[$pos]['result'] = $this->message[$pos]['cdata']; } } /* add value to parent's result, if parent is struct/array $parent = $this->message[$pos]['parent']; if($this->message[$parent]['type'] != 'map'){ if(strtolower($this->message[$parent]['type']) == 'array'){ $this->message[$parent]['result'][] = $this->message[$pos]['result']; } else { $this->message[$parent]['result'][$this->message[$pos]['name']] = $this->message[$pos]['result']; } } */ } } // for doclit if($this->status == 'header'){ if ($this->root_header != $pos) { $this->responseHeaders .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>"; } } elseif($pos >= $this->root_struct){ $this->document .= "</" . (isset($prefix) ? $prefix . ':' : '') . "$name>"; } // switch status if($pos == $this->root_struct){ $this->status = 'body'; $this->root_struct_namespace = $this->message[$pos]['namespace']; } elseif($name == 'Body'){ $this->status = 'envelope'; } elseif($name == 'Header'){ $this->status = 'envelope'; } elseif($name == 'Envelope'){ // } // set parent back to my parent $this->parent = $this->message[$pos]['parent']; } /** * element content handler * * @param resource $parser XML parser object * @param string $data element content * @access private */ function character_data($parser, $data){ $pos = $this->depth_array[$this->depth]; if ($this->xml_encoding=='UTF-8'){ // TODO: add an option to disable this for folks who want // raw UTF-8 that, e.g., might not map to iso-8859-1 // TODO: this can also be handled with xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, "ISO-8859-1"); if($this->decode_utf8){ $data = utf8_decode($data); } } $this->message[$pos]['cdata'] .= $data; // for doclit if($this->status == 'header'){ $this->responseHeaders .= $data; } else { $this->document .= $data; } } /** * get the parsed message * * @return mixed * @access public */ function get_response(){ return $this->soapresponse; } /** * get the parsed headers * * @return string XML or empty if no headers * @access public */ function getHeaders(){ return $this->responseHeaders; } /** * decodes simple types into PHP variables * * @param string $value value to decode * @param string $type XML type to decode * @param string $typens XML type namespace to decode * @return mixed PHP value * @access private */ function decodeSimple($value, $type, $typens) { // TODO: use the namespace! if ((!isset($type)) || $type == 'string' || $type == 'long' || $type == 'unsignedLong') { return (string) $value; } if ($type == 'int' || $type == 'integer' || $type == 'short' || $type == 'byte') { return (int) $value; } if ($type == 'float' || $type == 'double' || $type == 'decimal') { return (double) $value; } if ($type == 'boolean') { if (strtolower($value) == 'false' || strtolower($value) == 'f') { return false; } return (boolean) $value; } if ($type == 'base64' || $type == 'base64Binary') { $this->debug('Decode base64 value'); return base64_decode($value); } // obscure numeric types if ($type == 'nonPositiveInteger' || $type == 'negativeInteger' || $type == 'nonNegativeInteger' || $type == 'positiveInteger' || $type == 'unsignedInt' || $type == 'unsignedShort' || $type == 'unsignedByte') { return (int) $value; } // bogus: parser treats array with no elements as a simple type if ($type == 'array') { return array(); } // everything else return (string) $value; } /** * builds response structures for compound values (arrays/structs) * and scalars * * @param integer $pos position in node tree * @return mixed PHP value * @access private */ function buildVal($pos){ if(!isset($this->message[$pos]['type'])){ $this->message[$pos]['type'] = ''; } $this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message[$pos]['type']); // if there are children... if($this->message[$pos]['children'] != ''){ $this->debug('in buildVal, there are children'); $children = explode('|',$this->message[$pos]['children']); array_shift($children); // knock off empty // md array if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){ $r=0; // rowcount $c=0; // colcount foreach($children as $child_pos){ $this->debug("in buildVal, got an MD array element: $r, $c"); $params[$r][] = $this->message[$child_pos]['result']; $c++; if($c == $this->message[$pos]['arrayCols']){ $c = 0; $r++; } } // array } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){ $this->debug('in buildVal, adding array '.$this->message[$pos]['name']); foreach($children as $child_pos){ $params[] = &$this->message[$child_pos]['result']; } // apache Map type: java hashtable } elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap'){ $this->debug('in buildVal, Java Map '.$this->message[$pos]['name']); foreach($children as $child_pos){ $kv = explode("|",$this->message[$child_pos]['children']); $params[$this->message[$kv[1]]['result']] = &$this->message[$kv[2]]['result']; } // generic compound type //} elseif($this->message[$pos]['type'] == 'SOAPStruct' || $this->message[$pos]['type'] == 'struct') { } else { // Apache Vector type: treat as an array $this->debug('in buildVal, adding Java Vector '.$this->message[$pos]['name']); if ($this->message[$pos]['type'] == 'Vector' && $this->message[$pos]['type_namespace'] == 'http://xml.apache.org/xml-soap') { $notstruct = 1; } else { $notstruct = 0; } // foreach($children as $child_pos){ if($notstruct){ $params[] = &$this->message[$child_pos]['result']; } else { if (isset($params[$this->message[$child_pos]['name']])) { // de-serialize repeated element name into an array if ((!is_array($params[$this->message[$child_pos]['name']])) || (!isset($params[$this->message[$child_pos]['name']][0]))) { $params[$this->message[$child_pos]['name']] = array($params[$this->message[$child_pos]['name']]); } $params[$this->message[$child_pos]['name']][] = &$this->message[$child_pos]['result']; } else { $params[$this->message[$child_pos]['name']] = &$this->message[$child_pos]['result']; } } } } if (isset($this->message[$pos]['xattrs'])) { $this->debug('in buildVal, handling attributes'); foreach ($this->message[$pos]['xattrs'] as $n => $v) { $params[$n] = $v; } } // handle simpleContent if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') { $this->debug('in buildVal, handling simpleContent'); if (isset($this->message[$pos]['type'])) { $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } else { $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { $params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } else { $params['!'] = $this->message[$pos]['cdata']; } } } return is_array($params) ? $params : array(); } else { $this->debug('in buildVal, no children, building scalar'); $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : ''; if (isset($this->message[$pos]['type'])) { return $this->decodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? $this->message[$pos]['type_namespace'] : ''); } $parent = $this->message[$pos]['parent']; if (isset($this->message[$parent]['type']) && ($this->message[$parent]['type'] == 'array') && isset($this->message[$parent]['arrayType'])) { return $this->decodeSimple($cdata, $this->message[$parent]['arrayType'], isset($this->message[$parent]['arrayTypeNamespace']) ? $this->message[$parent]['arrayTypeNamespace'] : ''); } return $this->message[$pos]['cdata']; } } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.soap_parser.php
PHP
asf20
24,261
<?php /* $Id: nusoapmime.php,v 1.7 2005/07/27 19:24:42 snichol Exp $ NuSOAP - Web Services Toolkit for PHP Copyright (c) 2002 NuSphere Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA If you have any questions or comments, please email: Dietrich Ayala dietrich@ganx4.com http://dietrich.ganx4.com/nusoap NuSphere Corporation http://www.nusphere.com */ /*require_once('nusoap.php');*/ /* PEAR Mail_MIME library */ require_once('Mail/mimeDecode.php'); require_once('Mail/mimePart.php'); /** * soapclientmime client supporting MIME attachments defined at * http://www.w3.org/TR/SOAP-attachments. It depends on the PEAR Mail_MIME library. * * @author Scott Nichol <snichol@sourceforge.net> * @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list * @version $Id: nusoapmime.php,v 1.7 2005/07/27 19:24:42 snichol Exp $ * @access public */ class soapclientmime extends soapclientw { /** * @var array Each array element in the return is an associative array with keys * data, filename, contenttype, cid * @access private */ var $requestAttachments = array(); /** * @var array Each array element in the return is an associative array with keys * data, filename, contenttype, cid * @access private */ var $responseAttachments; /** * @var string * @access private */ var $mimeContentType; /** * adds a MIME attachment to the current request. * * If the $data parameter contains an empty string, this method will read * the contents of the file named by the $filename parameter. * * If the $cid parameter is false, this method will generate the cid. * * @param string $data The data of the attachment * @param string $filename The filename of the attachment (default is empty string) * @param string $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) * @param string $cid The content-id (cid) of the attachment (default is false) * @return string The content-id (cid) of the attachment * @access public */ function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = false) { if (! $cid) { $cid = md5(uniqid(time())); } $info['data'] = $data; $info['filename'] = $filename; $info['contenttype'] = $contenttype; $info['cid'] = $cid; $this->requestAttachments[] = $info; return $cid; } /** * clears the MIME attachments for the current request. * * @access public */ function clearAttachments() { $this->requestAttachments = array(); } /** * gets the MIME attachments from the current response. * * Each array element in the return is an associative array with keys * data, filename, contenttype, cid. These keys correspond to the parameters * for addAttachment. * * @return array The attachments. * @access public */ function getAttachments() { return $this->responseAttachments; } /** * gets the HTTP body for the current request. * * @param string $soapmsg The SOAP payload * @return string The HTTP body, which includes the SOAP payload * @access private */ function getHTTPBody($soapmsg) { if (count($this->requestAttachments) > 0) { $params['content_type'] = 'multipart/related; type=text/xml'; $mimeMessage =& new Mail_mimePart('', $params); unset($params); $params['content_type'] = 'text/xml'; $params['encoding'] = '8bit'; $params['charset'] = $this->soap_defencoding; $mimeMessage->addSubpart($soapmsg, $params); foreach ($this->requestAttachments as $att) { unset($params); $params['content_type'] = $att['contenttype']; $params['encoding'] = 'base64'; $params['disposition'] = 'attachment'; $params['dfilename'] = $att['filename']; $params['cid'] = $att['cid']; if ($att['data'] == '' && $att['filename'] <> '') { if ($fd = fopen($att['filename'], 'rb')) { $data = fread($fd, filesize($att['filename'])); fclose($fd); } else { $data = ''; } $mimeMessage->addSubpart($data, $params); } else { $mimeMessage->addSubpart($att['data'], $params); } } $output = $mimeMessage->encode(); $mimeHeaders = $output['headers']; foreach ($mimeHeaders as $k => $v) { $this->debug("MIME header $k: $v"); if (strtolower($k) == 'content-type') { // PHP header() seems to strip leading whitespace starting // the second line, so force everything to one line $this->mimeContentType = str_replace("\r\n", " ", $v); } } return $output['body']; } return parent::getHTTPBody($soapmsg); } /** * gets the HTTP content type for the current request. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type for the current request. * @access private */ function getHTTPContentType() { if (count($this->requestAttachments) > 0) { return $this->mimeContentType; } return parent::getHTTPContentType(); } /** * gets the HTTP content type charset for the current request. * returns false for non-text content types. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type charset for the current request. * @access private */ function getHTTPContentTypeCharset() { if (count($this->requestAttachments) > 0) { return false; } return parent::getHTTPContentTypeCharset(); } /** * processes SOAP message returned from server * * @param array $headers The HTTP headers * @param string $data unprocessed response data from server * @return mixed value of the message, decoded into a PHP type * @access private */ function parseResponse($headers, $data) { $this->debug('Entering parseResponse() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']); $this->responseAttachments = array(); if (strstr($headers['content-type'], 'multipart/related')) { $this->debug('Decode multipart/related'); $input = ''; foreach ($headers as $k => $v) { $input .= "$k: $v\r\n"; } $params['input'] = $input . "\r\n" . $data; $params['include_bodies'] = true; $params['decode_bodies'] = true; $params['decode_headers'] = true; $structure = Mail_mimeDecode::decode($params); foreach ($structure->parts as $part) { if (!isset($part->disposition)) { $this->debug('Have root part of type ' . $part->headers['content-type']); $return = parent::parseResponse($part->headers, $part->body); } else { $this->debug('Have an attachment of type ' . $part->headers['content-type']); $info['data'] = $part->body; $info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : ''; $info['contenttype'] = $part->headers['content-type']; $info['cid'] = $part->headers['content-id']; $this->responseAttachments[] = $info; } } if (isset($return)) { return $return; } $this->setError('No root part found in multipart/related content'); return; } $this->debug('Not multipart/related'); return parent::parseResponse($headers, $data); } } /** * nusoapservermime server supporting MIME attachments defined at * http://www.w3.org/TR/SOAP-attachments. It depends on the PEAR Mail_MIME library. * * @author Scott Nichol <snichol@sourceforge.net> * @author Thanks to Guillaume and Henning Reich for posting great attachment code to the mail list * @version $Id: nusoapmime.php,v 1.7 2005/07/27 19:24:42 snichol Exp $ * @access public */ class nusoapservermime extends soap_server { /** * @var array Each array element in the return is an associative array with keys * data, filename, contenttype, cid * @access private */ var $requestAttachments = array(); /** * @var array Each array element in the return is an associative array with keys * data, filename, contenttype, cid * @access private */ var $responseAttachments; /** * @var string * @access private */ var $mimeContentType; /** * adds a MIME attachment to the current response. * * If the $data parameter contains an empty string, this method will read * the contents of the file named by the $filename parameter. * * If the $cid parameter is false, this method will generate the cid. * * @param string $data The data of the attachment * @param string $filename The filename of the attachment (default is empty string) * @param string $contenttype The MIME Content-Type of the attachment (default is application/octet-stream) * @param string $cid The content-id (cid) of the attachment (default is false) * @return string The content-id (cid) of the attachment * @access public */ function addAttachment($data, $filename = '', $contenttype = 'application/octet-stream', $cid = false) { if (! $cid) { $cid = md5(uniqid(time())); } $info['data'] = $data; $info['filename'] = $filename; $info['contenttype'] = $contenttype; $info['cid'] = $cid; $this->responseAttachments[] = $info; return $cid; } /** * clears the MIME attachments for the current response. * * @access public */ function clearAttachments() { $this->responseAttachments = array(); } /** * gets the MIME attachments from the current request. * * Each array element in the return is an associative array with keys * data, filename, contenttype, cid. These keys correspond to the parameters * for addAttachment. * * @return array The attachments. * @access public */ function getAttachments() { return $this->requestAttachments; } /** * gets the HTTP body for the current response. * * @param string $soapmsg The SOAP payload * @return string The HTTP body, which includes the SOAP payload * @access private */ function getHTTPBody($soapmsg) { if (count($this->responseAttachments) > 0) { $params['content_type'] = 'multipart/related; type=text/xml'; $mimeMessage =& new Mail_mimePart('', $params); unset($params); $params['content_type'] = 'text/xml'; $params['encoding'] = '8bit'; $params['charset'] = $this->soap_defencoding; $mimeMessage->addSubpart($soapmsg, $params); foreach ($this->responseAttachments as $att) { unset($params); $params['content_type'] = $att['contenttype']; $params['encoding'] = 'base64'; $params['disposition'] = 'attachment'; $params['dfilename'] = $att['filename']; $params['cid'] = $att['cid']; if ($att['data'] == '' && $att['filename'] <> '') { if ($fd = fopen($att['filename'], 'rb')) { $data = fread($fd, filesize($att['filename'])); fclose($fd); } else { $data = ''; } $mimeMessage->addSubpart($data, $params); } else { $mimeMessage->addSubpart($att['data'], $params); } } $output = $mimeMessage->encode(); $mimeHeaders = $output['headers']; foreach ($mimeHeaders as $k => $v) { $this->debug("MIME header $k: $v"); if (strtolower($k) == 'content-type') { // PHP header() seems to strip leading whitespace starting // the second line, so force everything to one line $this->mimeContentType = str_replace("\r\n", " ", $v); } } return $output['body']; } return parent::getHTTPBody($soapmsg); } /** * gets the HTTP content type for the current response. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type for the current response. * @access private */ function getHTTPContentType() { if (count($this->responseAttachments) > 0) { return $this->mimeContentType; } return parent::getHTTPContentType(); } /** * gets the HTTP content type charset for the current response. * returns false for non-text content types. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type charset for the current response. * @access private */ function getHTTPContentTypeCharset() { if (count($this->responseAttachments) > 0) { return false; } return parent::getHTTPContentTypeCharset(); } /** * processes SOAP message received from client * * @param array $headers The HTTP headers * @param string $data unprocessed request data from client * @return mixed value of the message, decoded into a PHP type * @access private */ function parseRequest($headers, $data) { $this->debug('Entering parseRequest() for payload of length ' . strlen($data) . ' and type of ' . $headers['content-type']); $this->requestAttachments = array(); if (strstr($headers['content-type'], 'multipart/related')) { $this->debug('Decode multipart/related'); $input = ''; foreach ($headers as $k => $v) { $input .= "$k: $v\r\n"; } $params['input'] = $input . "\r\n" . $data; $params['include_bodies'] = true; $params['decode_bodies'] = true; $params['decode_headers'] = true; $structure = Mail_mimeDecode::decode($params); foreach ($structure->parts as $part) { if (!isset($part->disposition)) { $this->debug('Have root part of type ' . $part->headers['content-type']); $return = parent::parseRequest($part->headers, $part->body); } else { $this->debug('Have an attachment of type ' . $part->headers['content-type']); $info['data'] = $part->body; $info['filename'] = isset($part->d_parameters['filename']) ? $part->d_parameters['filename'] : ''; $info['contenttype'] = $part->headers['content-type']; $info['cid'] = $part->headers['content-id']; $this->requestAttachments[] = $info; } } if (isset($return)) { return $return; } $this->setError('No root part found in multipart/related content'); return; } $this->debug('Not multipart/related'); return parent::parseRequest($headers, $data); } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/nusoapmime.php
PHP
asf20
14,878
<?php /** * caches instances of the wsdl class * * @author Scott Nichol <snichol@computer.org> * @author Ingo Fischer <ingo@apollon.de> * @version $Id: class.wsdlcache.php,v 1.5 2005/05/20 17:58:17 snichol Exp $ * @access public */ class wsdlcache { /** * @var resource * @access private */ var $fplock; /** * @var integer * @access private */ var $cache_lifetime; /** * @var string * @access private */ var $cache_dir; /** * @var string * @access public */ var $debug_str = ''; /** * constructor * * @param string $cache_dir directory for cache-files * @param integer $cache_lifetime lifetime for caching-files in seconds or 0 for unlimited * @access public */ function wsdlcache($cache_dir='.', $cache_lifetime=0) { $this->fplock = array(); $this->cache_dir = $cache_dir != '' ? $cache_dir : '.'; $this->cache_lifetime = $cache_lifetime; } /** * creates the filename used to cache a wsdl instance * * @param string $wsdl The URL of the wsdl instance * @return string The filename used to cache the instance * @access private */ function createFilename($wsdl) { return $this->cache_dir.'/wsdlcache-' . md5($wsdl); } /** * adds debug data to the class level debug string * * @param string $string debug data * @access private */ function debug($string){ $this->debug_str .= get_class($this).": $string\n"; } /** * gets a wsdl instance from the cache * * @param string $wsdl The URL of the wsdl instance * @return object wsdl The cached wsdl instance, null if the instance is not in the cache * @access public */ function get($wsdl) { $filename = $this->createFilename($wsdl); if ($this->obtainMutex($filename, "r")) { // check for expired WSDL that must be removed from the cache if ($this->cache_lifetime > 0) { if (file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) { unlink($filename); $this->debug("Expired $wsdl ($filename) from cache"); $this->releaseMutex($filename); return null; } } // see what there is to return $fp = @fopen($filename, "r"); if ($fp) { $s = implode("", @file($filename)); fclose($fp); $this->debug("Got $wsdl ($filename) from cache"); } else { $s = null; $this->debug("$wsdl ($filename) not in cache"); } $this->releaseMutex($filename); return (!is_null($s)) ? unserialize($s) : null; } else { $this->debug("Unable to obtain mutex for $filename in get"); } return null; } /** * obtains the local mutex * * @param string $filename The Filename of the Cache to lock * @param string $mode The open-mode ("r" or "w") or the file - affects lock-mode * @return boolean Lock successfully obtained ?! * @access private */ function obtainMutex($filename, $mode) { if (isset($this->fplock[md5($filename)])) { $this->debug("Lock for $filename already exists"); return false; } $this->fplock[md5($filename)] = fopen($filename.".lock", "w"); if ($mode == "r") { return flock($this->fplock[md5($filename)], LOCK_SH); } else { return flock($this->fplock[md5($filename)], LOCK_EX); } } /** * adds a wsdl instance to the cache * * @param object wsdl $wsdl_instance The wsdl instance to add * @return boolean WSDL successfully cached * @access public */ function put($wsdl_instance) { $filename = $this->createFilename($wsdl_instance->wsdl); $s = serialize($wsdl_instance); if ($this->obtainMutex($filename, "w")) { $fp = fopen($filename, "w"); fputs($fp, $s); fclose($fp); $this->debug("Put $wsdl_instance->wsdl ($filename) in cache"); $this->releaseMutex($filename); return true; } else { $this->debug("Unable to obtain mutex for $filename in put"); } return false; } /** * releases the local mutex * * @param string $filename The Filename of the Cache to lock * @return boolean Lock successfully released * @access private */ function releaseMutex($filename) { $ret = flock($this->fplock[md5($filename)], LOCK_UN); fclose($this->fplock[md5($filename)]); unset($this->fplock[md5($filename)]); if (! $ret) { $this->debug("Not able to release lock for $filename"); } return $ret; } /** * removes a wsdl instance from the cache * * @param string $wsdl The URL of the wsdl instance * @return boolean Whether there was an instance to remove * @access public */ function remove($wsdl) { $filename = $this->createFilename($wsdl); // ignore errors obtaining mutex $this->obtainMutex($filename, "w"); $ret = unlink($filename); $this->debug("Removed ($ret) $wsdl ($filename) from cache"); $this->releaseMutex($filename); return $ret; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.wsdlcache.php
PHP
asf20
4,874
<?php /** * * soapclient higher level class for easy usage. * * usage: * * // instantiate client with server info * $soapclient = new soapclient( string path [ ,boolean wsdl] ); * * // call method, get results * echo $soapclient->call( string methodname [ ,array parameters] ); * * // bye bye client * unset($soapclient); * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.soapclient.php,v 1.52 2005/07/27 19:24:42 snichol Exp $ * @access public */ class soapclientw extends nusoap_base { var $username = ''; var $password = ''; var $authtype = ''; var $certRequest = array(); var $requestHeaders = false; // SOAP headers in request (text) var $responseHeaders = ''; // SOAP headers from response (incomplete namespace resolution) (text) var $document = ''; // SOAP body response portion (incomplete namespace resolution) (text) var $endpoint; var $forceEndpoint = ''; // overrides WSDL endpoint var $proxyhost = ''; var $proxyport = ''; var $proxyusername = ''; var $proxypassword = ''; var $xml_encoding = ''; // character set encoding of incoming (response) messages var $http_encoding = false; var $timeout = 0; // HTTP connection timeout var $response_timeout = 30; // HTTP response timeout var $endpointType = ''; // soap|wsdl, empty for WSDL initialization error var $persistentConnection = false; var $defaultRpcParams = false; // This is no longer used var $request = ''; // HTTP request var $response = ''; // HTTP response var $responseData = ''; // SOAP payload of response var $cookies = array(); // Cookies from response or for request var $decode_utf8 = true; // toggles whether the parser decodes element content w/ utf8_decode() var $operations = array(); // WSDL operations, empty for WSDL initialization error /* * fault related variables */ /** * @var fault * @access public */ var $fault; /** * @var faultcode * @access public */ var $faultcode; /** * @var faultstring * @access public */ var $faultstring; /** * @var faultdetail * @access public */ var $faultdetail; /** * constructor * * @param mixed $endpoint SOAP server or WSDL URL (string), or wsdl instance (object) * @param bool $wsdl optional, set to true if using WSDL * @param int $portName optional portName in WSDL document * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @param integer $timeout set the connection timeout * @param integer $response_timeout set the response timeout * @access public */ function soapclientw($endpoint,$wsdl = false,$proxyhost = false,$proxyport = false,$proxyusername = false, $proxypassword = false, $timeout = 0, $response_timeout = 30){ parent::nusoap_base(); $this->endpoint = $endpoint; $this->proxyhost = $proxyhost; $this->proxyport = $proxyport; $this->proxyusername = $proxyusername; $this->proxypassword = $proxypassword; $this->timeout = $timeout; $this->response_timeout = $response_timeout; // make values if($wsdl){ if (is_object($endpoint) && (get_class($endpoint) == 'wsdl')) { $this->wsdl = $endpoint; $this->endpoint = $this->wsdl->wsdl; $this->wsdlFile = $this->endpoint; $this->debug('existing wsdl instance created from ' . $this->endpoint); } else { $this->wsdlFile = $this->endpoint; // instantiate wsdl object and parse wsdl file $this->debug('instantiating wsdl class with doc: '.$endpoint); $this->wsdl =& new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); // catch errors if($errstr = $this->wsdl->getError()){ $this->debug('got wsdl error: '.$errstr); $this->setError('wsdl error: '.$errstr); } elseif($this->operations = $this->wsdl->getOperations()){ $this->debug( 'got '.count($this->operations).' operations from wsdl '.$this->wsdlFile); $this->endpointType = 'wsdl'; } else { $this->debug( 'getOperations returned false'); $this->setError('no operations defined in the WSDL document!'); } } else { $this->debug("instantiate SOAP with endpoint at $endpoint"); $this->endpointType = 'soap'; } } /** * calls method, returns PHP native type * * @param string $method SOAP server URL or path * @param mixed $params An array, associative or simple, of the parameters * for the method call, or a string that is the XML * for the call. For rpc style, this call will * wrap the XML in a tag named after the method, as * well as the SOAP Envelope and Body. For document * style, this will only wrap with the Envelope and Body. * IMPORTANT: when using an array with document style, * in which case there * is really one parameter, the root of the fragment * used in the call, which encloses what programmers * normally think of parameters. A parameter array * *must* include the wrapper. * @param string $namespace optional method namespace (WSDL can override) * @param string $soapAction optional SOAPAction value (WSDL can override) * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers * @param boolean $rpcParams optional (no longer used) * @param string $style optional (rpc|document) the style to use when serializing parameters (WSDL can override) * @param string $use optional (encoded|literal) the use when serializing parameters (WSDL can override) * @return mixed response from SOAP call * @access public */ function call($operation,$params=array(),$namespace='http://tempuri.org',$soapAction='',$headers=false,$rpcParams=null,$style='rpc',$use='encoded'){ $this->operation = $operation; $this->fault = false; $this->setError(''); $this->request = ''; $this->response = ''; $this->responseData = ''; $this->faultstring = ''; $this->faultcode = ''; $this->opData = array(); $this->debug("call: operation=$operation, namespace=$namespace, soapAction=$soapAction, rpcParams=$rpcParams, style=$style, use=$use, endpointType=$this->endpointType"); $this->appendDebug('params=' . $this->varDump($params)); $this->appendDebug('headers=' . $this->varDump($headers)); if ($headers) { $this->requestHeaders = $headers; } // serialize parameters if($this->endpointType == 'wsdl' && $opData = $this->getOperationData($operation)){ // use WSDL for operation $this->opData = $opData; $this->debug("found operation"); $this->appendDebug('opData=' . $this->varDump($opData)); if (isset($opData['soapAction'])) { $soapAction = $opData['soapAction']; } if (! $this->forceEndpoint) { $this->endpoint = $opData['endpoint']; } else { $this->endpoint = $this->forceEndpoint; } $namespace = isset($opData['input']['namespace']) ? $opData['input']['namespace'] : $namespace; $style = $opData['style']; $use = $opData['input']['use']; // add ns to ns array if($namespace != '' && !isset($this->wsdl->namespaces[$namespace])){ $nsPrefix = 'ns' . rand(1000, 9999); $this->wsdl->namespaces[$nsPrefix] = $namespace; } $nsPrefix = $this->wsdl->getPrefixFromNamespace($namespace); // serialize payload if (is_string($params)) { $this->debug("serializing param string for WSDL operation $operation"); $payload = $params; } elseif (is_array($params)) { $this->debug("serializing param array for WSDL operation $operation"); $payload = $this->wsdl->serializeRPCParameters($operation,'input',$params); } else { $this->debug('params must be array or string'); $this->setError('params must be array or string'); return false; } $usedNamespaces = $this->wsdl->usedNamespaces; if (isset($opData['input']['encodingStyle'])) { $encodingStyle = $opData['input']['encodingStyle']; } else { $encodingStyle = ''; } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); if ($errstr = $this->wsdl->getError()) { $this->debug('got wsdl error: '.$errstr); $this->setError('wsdl error: '.$errstr); return false; } } elseif($this->endpointType == 'wsdl') { // operation not in WSDL $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); $this->setError( 'operation '.$operation.' not present.'); $this->debug("operation '$operation' not present."); return false; } else { // no WSDL //$this->namespaces['ns1'] = $namespace; $nsPrefix = 'ns' . rand(1000, 9999); // serialize $payload = ''; if (is_string($params)) { $this->debug("serializing param string for operation $operation"); $payload = $params; } elseif (is_array($params)) { $this->debug("serializing param array for operation $operation"); foreach($params as $k => $v){ $payload .= $this->serialize_val($v,$k,false,false,false,false,$use); } } else { $this->debug('params must be array or string'); $this->setError('params must be array or string'); return false; } $usedNamespaces = array(); if ($use == 'encoded') { $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; } else { $encodingStyle = ''; } } // wrap RPC calls with method element if ($style == 'rpc') { if ($use == 'literal') { $this->debug("wrapping RPC request with literal method element"); if ($namespace) { $payload = "<$operation xmlns=\"$namespace\">" . $payload . "</$operation>"; } else { $payload = "<$operation>" . $payload . "</$operation>"; } } else { $this->debug("wrapping RPC request with encoded method element"); if ($namespace) { $payload = "<$nsPrefix:$operation xmlns:$nsPrefix=\"$namespace\">" . $payload . "</$nsPrefix:$operation>"; } else { $payload = "<$operation>" . $payload . "</$operation>"; } } } // serialize envelope $soapmsg = $this->serializeEnvelope($payload,$this->requestHeaders,$usedNamespaces,$style,$use,$encodingStyle); $this->debug("endpoint=$this->endpoint, soapAction=$soapAction, namespace=$namespace, style=$style, use=$use, encodingStyle=$encodingStyle"); $this->debug('SOAP message length=' . strlen($soapmsg) . ' contents (max 1000 bytes)=' . substr($soapmsg, 0, 1000)); // send $return = $this->send($this->getHTTPBody($soapmsg),$soapAction,$this->timeout,$this->response_timeout); if($errstr = $this->getError()){ $this->debug('Error: '.$errstr); return false; } else { $this->return = $return; $this->debug('sent message successfully and got a(n) '.gettype($return)); $this->appendDebug('return=' . $this->varDump($return)); // fault? if(is_array($return) && isset($return['faultcode'])){ $this->debug('got fault'); $this->setError($return['faultcode'].': '.$return['faultstring']); $this->fault = true; foreach($return as $k => $v){ $this->$k = $v; $this->debug("$k = $v<br>"); } return $return; } elseif ($style == 'document') { // NOTE: if the response is defined to have multiple parts (i.e. unwrapped), // we are only going to return the first part here...sorry about that return $return; } else { // array of return values if(is_array($return)){ // multiple 'out' parameters, which we return wrapped up // in the array if(sizeof($return) > 1){ return $return; } // single 'out' parameter (normally the return value) $return = array_shift($return); $this->debug('return shifted value: '); $this->appendDebug($this->varDump($return)); return $return; // nothing returned (ie, echoVoid) } else { return ""; } } } } /** * get available data pertaining to an operation * * @param string $operation operation name * @return array array of data pertaining to the operation * @access public */ function getOperationData($operation){ if(isset($this->operations[$operation])){ return $this->operations[$operation]; } $this->debug("No data for operation: $operation"); } /** * send the SOAP message * * Note: if the operation has multiple return values * the return value of this method will be an array * of those values. * * @param string $msg a SOAPx4 soapmsg object * @param string $soapaction SOAPAction value * @param integer $timeout set connection timeout in seconds * @param integer $response_timeout set response timeout in seconds * @return mixed native PHP types. * @access private */ function send($msg, $soapaction = '', $timeout=0, $response_timeout=30) { $this->checkCookies(); // detect transport switch(true){ // http(s) case ereg('^http',$this->endpoint): $this->debug('transporting via HTTP'); if($this->persistentConnection == true && is_object($this->persistentConnection)){ $http =& $this->persistentConnection; } else { $http = new soap_transport_http($this->endpoint); if ($this->persistentConnection) { $http->usePersistentConnection(); } } $http->setContentType($this->getHTTPContentType(), $this->getHTTPContentTypeCharset()); $http->setSOAPAction($soapaction); if($this->proxyhost && $this->proxyport){ $http->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); } if($this->authtype != '') { $http->setCredentials($this->username, $this->password, $this->authtype, array(), $this->certRequest); } if($this->http_encoding != ''){ $http->setEncoding($this->http_encoding); } $this->debug('sending message, length='.strlen($msg)); if(ereg('^http:',$this->endpoint)){ //if(strpos($this->endpoint,'http:')){ $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); } elseif(ereg('^https',$this->endpoint)){ //} elseif(strpos($this->endpoint,'https:')){ //if(phpversion() == '4.3.0-dev'){ //$response = $http->send($msg,$timeout,$response_timeout); //$this->request = $http->outgoing_payload; //$this->response = $http->incoming_payload; //} else $this->responseData = $http->sendHTTPS($msg,$timeout,$response_timeout,$this->cookies); } else { $this->setError('no http/s in endpoint url'); } $this->request = $http->outgoing_payload; $this->response = $http->incoming_payload; $this->appendDebug($http->getDebug()); $this->UpdateCookies($http->incoming_cookies); // save transport object if using persistent connections if ($this->persistentConnection) { $http->clearDebug(); if (!is_object($this->persistentConnection)) { $this->persistentConnection = $http; } } if($err = $http->getError()){ $this->setError('HTTP Error: '.$err); return false; } elseif($this->getError()){ return false; } else { $this->debug('got response, length='. strlen($this->responseData).' type='.$http->incoming_headers['content-type']); return $this->parseResponse($http->incoming_headers, $this->responseData); } break; default: $this->setError('no transport found, or selected transport is not yet supported!'); return false; break; } } /** * processes SOAP message returned from server * * @param array $headers The HTTP headers * @param string $data unprocessed response data from server * @return mixed value of the message, decoded into a PHP type * @access private */ function parseResponse($headers, $data) { $this->debug('Entering parseResponse() for data of length ' . strlen($data) . ' and type ' . $headers['content-type']); if (!strstr($headers['content-type'], 'text/xml')) { $this->setError('Response not of type text/xml'); return false; } if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating soap_parser'); $parser = new soap_parser($data,$this->xml_encoding,$this->operation,$this->decode_utf8); // add parser debug data to our debug $this->appendDebug($parser->getDebug()); // if parse errors if($errstr = $parser->getError()){ $this->setError( $errstr); // destroy the parser object unset($parser); return false; } else { // get SOAP headers $this->responseHeaders = $parser->getHeaders(); // get decoded message $return = $parser->get_response(); // add document for doclit support $this->document = $parser->document; // destroy the parser object unset($parser); // return decode message return $return; } } /** * sets the SOAP endpoint, which can override WSDL * * @param $endpoint string The endpoint URL to use, or empty string or false to prevent override * @access public */ function setEndpoint($endpoint) { $this->forceEndpoint = $endpoint; } /** * set the SOAP headers * * @param $headers mixed String of XML with SOAP header content, or array of soapval objects for SOAP headers * @access public */ function setHeaders($headers){ $this->requestHeaders = $headers; } /** * get the SOAP response headers (namespace resolution incomplete) * * @return string * @access public */ function getHeaders(){ return $this->responseHeaders; } /** * set proxy info here * * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @access public */ function setHTTPProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { $this->proxyhost = $proxyhost; $this->proxyport = $proxyport; $this->proxyusername = $proxyusername; $this->proxypassword = $proxypassword; } /** * if authenticating, set user credentials here * * @param string $username * @param string $password * @param string $authtype (basic|digest|certificate) * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) * @access public */ function setCredentials($username, $password, $authtype = 'basic', $certRequest = array()) { $this->username = $username; $this->password = $password; $this->authtype = $authtype; $this->certRequest = $certRequest; } /** * use HTTP encoding * * @param string $enc * @access public */ function setHTTPEncoding($enc='gzip, deflate'){ $this->http_encoding = $enc; } /** * use HTTP persistent connections if possible * * @access public */ function useHTTPPersistentConnection(){ $this->persistentConnection = true; } /** * gets the default RPC parameter setting. * If true, default is that call params are like RPC even for document style. * Each call() can override this value. * * This is no longer used. * * @return boolean * @access public * @deprecated */ function getDefaultRpcParams() { return $this->defaultRpcParams; } /** * sets the default RPC parameter setting. * If true, default is that call params are like RPC even for document style * Each call() can override this value. * * This is no longer used. * * @param boolean $rpcParams * @access public * @deprecated */ function setDefaultRpcParams($rpcParams) { $this->defaultRpcParams = $rpcParams; } /** * dynamically creates an instance of a proxy class, * allowing user to directly call methods from wsdl * * @return object soap_proxy object * @access public */ function getProxy(){ $r = rand(); $evalStr = $this->_getProxyClassCode($r); //$this->debug("proxy class: $evalStr"; // eval the class eval($evalStr); // instantiate proxy object eval("\$proxy = new soap_proxy_$r('');"); // transfer current wsdl data to the proxy thereby avoiding parsing the wsdl twice $proxy->endpointType = 'wsdl'; $proxy->wsdlFile = $this->wsdlFile; $proxy->wsdl = $this->wsdl; $proxy->operations = $this->operations; $proxy->defaultRpcParams = $this->defaultRpcParams; // transfer other state $proxy->username = $this->username; $proxy->password = $this->password; $proxy->authtype = $this->authtype; $proxy->proxyhost = $this->proxyhost; $proxy->proxyport = $this->proxyport; $proxy->proxyusername = $this->proxyusername; $proxy->proxypassword = $this->proxypassword; $proxy->timeout = $this->timeout; $proxy->response_timeout = $this->response_timeout; $proxy->http_encoding = $this->http_encoding; $proxy->persistentConnection = $this->persistentConnection; $proxy->requestHeaders = $this->requestHeaders; $proxy->soap_defencoding = $this->soap_defencoding; $proxy->endpoint = $this->endpoint; $proxy->forceEndpoint = $this->forceEndpoint; return $proxy; } /** * dynamically creates proxy class code * * @return string PHP/NuSOAP code for the proxy class * @access private */ function _getProxyClassCode($r) { if ($this->endpointType != 'wsdl') { $evalStr = 'A proxy can only be created for a WSDL client'; $this->setError($evalStr); return $evalStr; } $evalStr = ''; foreach ($this->operations as $operation => $opData) { if ($operation != '') { // create param string and param comment string if (sizeof($opData['input']['parts']) > 0) { $paramStr = ''; $paramArrayStr = ''; $paramCommentStr = ''; foreach ($opData['input']['parts'] as $name => $type) { $paramStr .= "\$$name, "; $paramArrayStr .= "'$name' => \$$name, "; $paramCommentStr .= "$type \$$name, "; } $paramStr = substr($paramStr, 0, strlen($paramStr)-2); $paramArrayStr = substr($paramArrayStr, 0, strlen($paramArrayStr)-2); $paramCommentStr = substr($paramCommentStr, 0, strlen($paramCommentStr)-2); } else { $paramStr = ''; $paramCommentStr = 'void'; } $opData['namespace'] = !isset($opData['namespace']) ? 'http://testuri.com' : $opData['namespace']; $evalStr .= "// $paramCommentStr function " . str_replace('.', '__', $operation) . "($paramStr) { \$params = array($paramArrayStr); return \$this->call('$operation', \$params, '".$opData['namespace']."', '".(isset($opData['soapAction']) ? $opData['soapAction'] : '')."'); } "; unset($paramStr); unset($paramCommentStr); } } $evalStr = 'class soap_proxy_'.$r.' extends soapclientw { '.$evalStr.' }'; return $evalStr; } /** * dynamically creates proxy class code * * @return string PHP/NuSOAP code for the proxy class * @access public */ function getProxyClassCode() { $r = rand(); return $this->_getProxyClassCode($r); } /** * gets the HTTP body for the current request. * * @param string $soapmsg The SOAP payload * @return string The HTTP body, which includes the SOAP payload * @access private */ function getHTTPBody($soapmsg) { return $soapmsg; } /** * gets the HTTP content type for the current request. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type for the current request. * @access private */ function getHTTPContentType() { return 'text/xml'; } /** * gets the HTTP content type charset for the current request. * returns false for non-text content types. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type charset for the current request. * @access private */ function getHTTPContentTypeCharset() { return $this->soap_defencoding; } /* * whether or not parser should decode utf8 element content * * @return always returns true * @access public */ function decodeUTF8($bool){ $this->decode_utf8 = $bool; return true; } /** * adds a new Cookie into $this->cookies array * * @param string $name Cookie Name * @param string $value Cookie Value * @return if cookie-set was successful returns true, else false * @access public */ function setCookie($name, $value) { if (strlen($name) == 0) { return false; } $this->cookies[] = array('name' => $name, 'value' => $value); return true; } /** * gets all Cookies * * @return array with all internal cookies * @access public */ function getCookies() { return $this->cookies; } /** * checks all Cookies and delete those which are expired * * @return always return true * @access private */ function checkCookies() { if (sizeof($this->cookies) == 0) { return true; } $this->debug('checkCookie: check ' . sizeof($this->cookies) . ' cookies'); $curr_cookies = $this->cookies; $this->cookies = array(); foreach ($curr_cookies as $cookie) { if (! is_array($cookie)) { $this->debug('Remove cookie that is not an array'); continue; } if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { if (strtotime($cookie['expires']) > time()) { $this->cookies[] = $cookie; } else { $this->debug('Remove expired cookie ' . $cookie['name']); } } else { $this->cookies[] = $cookie; } } $this->debug('checkCookie: '.sizeof($this->cookies).' cookies left in array'); return true; } /** * updates the current cookies with a new set * * @param array $cookies new cookies with which to update current ones * @return always return true * @access private */ function UpdateCookies($cookies) { if (sizeof($this->cookies) == 0) { // no existing cookies: take whatever is new if (sizeof($cookies) > 0) { $this->debug('Setting new cookie(s)'); $this->cookies = $cookies; } return true; } if (sizeof($cookies) == 0) { // no new cookies: keep what we've got return true; } // merge foreach ($cookies as $newCookie) { if (!is_array($newCookie)) { continue; } if ((!isset($newCookie['name'])) || (!isset($newCookie['value']))) { continue; } $newName = $newCookie['name']; $found = false; for ($i = 0; $i < count($this->cookies); $i++) { $cookie = $this->cookies[$i]; if (!is_array($cookie)) { continue; } if (!isset($cookie['name'])) { continue; } if ($newName != $cookie['name']) { continue; } $newDomain = isset($newCookie['domain']) ? $newCookie['domain'] : 'NODOMAIN'; $domain = isset($cookie['domain']) ? $cookie['domain'] : 'NODOMAIN'; if ($newDomain != $domain) { continue; } $newPath = isset($newCookie['path']) ? $newCookie['path'] : 'NOPATH'; $path = isset($cookie['path']) ? $cookie['path'] : 'NOPATH'; if ($newPath != $path) { continue; } $this->cookies[$i] = $newCookie; $found = true; $this->debug('Update cookie ' . $newName . '=' . $newCookie['value']); break; } if (! $found) { $this->debug('Add cookie ' . $newName . '=' . $newCookie['value']); $this->cookies[] = $newCookie; } } return true; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.soapclient.php
PHP
asf20
28,502
<?php /** * Contains information for a SOAP fault. * Mainly used for returning faults from deployed functions * in a server instance. * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.soap_fault.php,v 1.12 2005/07/27 19:24:42 snichol Exp $ * @access public */ class soap_fault extends nusoap_base { /** * The fault code (client|server) * @var string * @access private */ var $faultcode; /** * The fault actor * @var string * @access private */ var $faultactor; /** * The fault string, a description of the fault * @var string * @access private */ var $faultstring; /** * The fault detail, typically a string or array of string * @var mixed * @access private */ var $faultdetail; /** * constructor * * @param string $faultcode (client | server) * @param string $faultactor only used when msg routed between multiple actors * @param string $faultstring human readable error message * @param mixed $faultdetail detail, typically a string or array of string */ function soap_fault($faultcode,$faultactor='',$faultstring='',$faultdetail=''){ parent::nusoap_base(); $this->faultcode = $faultcode; $this->faultactor = $faultactor; $this->faultstring = $faultstring; $this->faultdetail = $faultdetail; } /** * serialize a fault * * @return string The serialization of the fault instance. * @access public */ function serialize(){ $ns_string = ''; foreach($this->namespaces as $k => $v){ $ns_string .= "\n xmlns:$k=\"$v\""; } $return_msg = '<?xml version="1.0" encoding="'.$this->soap_defencoding.'"?>'. '<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"'.$ns_string.">\n". '<SOAP-ENV:Body>'. '<SOAP-ENV:Fault>'. $this->serialize_val($this->faultcode, 'faultcode'). $this->serialize_val($this->faultactor, 'faultactor'). $this->serialize_val($this->faultstring, 'faultstring'). $this->serialize_val($this->faultdetail, 'detail'). '</SOAP-ENV:Fault>'. '</SOAP-ENV:Body>'. '</SOAP-ENV:Envelope>'; return $return_msg; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.soap_fault.php
PHP
asf20
2,208
<?php /** * transport class for sending/receiving data via HTTP and HTTPS * NOTE: PHP must be compiled with the CURL extension for HTTPS support * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.soap_transport_http.php,v 1.57 2005/07/27 19:24:42 snichol Exp $ * @access public */ class soap_transport_http extends nusoap_base { var $url = ''; var $uri = ''; var $digest_uri = ''; var $scheme = ''; var $host = ''; var $port = ''; var $path = ''; var $request_method = 'POST'; var $protocol_version = '1.0'; var $encoding = ''; var $outgoing_headers = array(); var $incoming_headers = array(); var $incoming_cookies = array(); var $outgoing_payload = ''; var $incoming_payload = ''; var $useSOAPAction = true; var $persistentConnection = false; var $ch = false; // cURL handle var $username = ''; var $password = ''; var $authtype = ''; var $digestRequest = array(); var $certRequest = array(); // keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional) // cainfofile: certificate authority file, e.g. '$pathToPemFiles/rootca.pem' // sslcertfile: SSL certificate file, e.g. '$pathToPemFiles/mycert.pem' // sslkeyfile: SSL key file, e.g. '$pathToPemFiles/mykey.pem' // passphrase: SSL key password/passphrase // verifypeer: default is 1 // verifyhost: default is 1 /** * constructor */ function soap_transport_http($url){ parent::nusoap_base(); $this->setURL($url); ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')'; $this->debug('set User-Agent: ' . $this->outgoing_headers['User-Agent']); } function setURL($url) { $this->url = $url; $u = parse_url($url); foreach($u as $k => $v){ $this->debug("$k = $v"); $this->$k = $v; } // add any GET params to path if(isset($u['query']) && $u['query'] != ''){ $this->path .= '?' . $u['query']; } // set default port if(!isset($u['port'])){ if($u['scheme'] == 'https'){ $this->port = 443; } else { $this->port = 80; } } $this->uri = $this->path; $this->digest_uri = $this->uri; // build headers if (!isset($u['port'])) { $this->outgoing_headers['Host'] = $this->host; } else { $this->outgoing_headers['Host'] = $this->host.':'.$this->port; } $this->debug('set Host: ' . $this->outgoing_headers['Host']); if (isset($u['user']) && $u['user'] != '') { $this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : ''); } } function connect($connection_timeout=0,$response_timeout=30){ // For PHP 4.3 with OpenSSL, change https scheme to ssl, then treat like // "regular" socket. // TODO: disabled for now because OpenSSL must be *compiled* in (not just // loaded), and until PHP5 stream_get_wrappers is not available. // if ($this->scheme == 'https') { // if (version_compare(phpversion(), '4.3.0') >= 0) { // if (extension_loaded('openssl')) { // $this->scheme = 'ssl'; // $this->debug('Using SSL over OpenSSL'); // } // } // } $this->debug("connect connection_timeout $connection_timeout, response_timeout $response_timeout, scheme $this->scheme, host $this->host, port $this->port"); if ($this->scheme == 'http' || $this->scheme == 'ssl') { // use persistent connection if($this->persistentConnection && isset($this->fp) && is_resource($this->fp)){ if (!feof($this->fp)) { $this->debug('Re-use persistent connection'); return true; } fclose($this->fp); $this->debug('Closed persistent connection at EOF'); } // munge host if using OpenSSL if ($this->scheme == 'ssl') { $host = 'ssl://' . $this->host; } else { $host = $this->host; } $this->debug('calling fsockopen with host ' . $host . ' connection_timeout ' . $connection_timeout); // open socket if($connection_timeout > 0){ $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str, $connection_timeout); } else { $this->fp = @fsockopen( $host, $this->port, $this->errno, $this->error_str); } // test pointer if(!$this->fp) { $msg = 'Couldn\'t open socket connection to server ' . $this->url; if ($this->errno) { $msg .= ', Error ('.$this->errno.'): '.$this->error_str; } else { $msg .= ' prior to connect(). This is often a problem looking up the host name.'; } $this->debug($msg); $this->setError($msg); return false; } // set response timeout $this->debug('set response timeout to ' . $response_timeout); socket_set_timeout( $this->fp, $response_timeout); $this->debug('socket connected'); return true; } else if ($this->scheme == 'https') { if (!extension_loaded('curl')) { $this->setError('CURL Extension, or OpenSSL extension w/ PHP version >= 4.3 is required for HTTPS'); return false; } $this->debug('connect using https'); // init CURL $this->ch = curl_init(); // set url $hostURL = ($this->port != '') ? "https://$this->host:$this->port" : "https://$this->host"; // add path $hostURL .= $this->path; curl_setopt($this->ch, CURLOPT_URL, $hostURL); // follow location headers (re-directs) curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, 1); // ask for headers in the response output curl_setopt($this->ch, CURLOPT_HEADER, 1); // ask for the response output as the return value curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1); // encode // We manage this ourselves through headers and encoding // if(function_exists('gzuncompress')){ // curl_setopt($this->ch, CURLOPT_ENCODING, 'deflate'); // } // persistent connection if ($this->persistentConnection) { // The way we send data, we cannot use persistent connections, since // there will be some "junk" at the end of our request. //curl_setopt($this->ch, CURL_HTTP_VERSION_1_1, true); $this->persistentConnection = false; $this->outgoing_headers['Connection'] = 'close'; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); } // set timeout if ($connection_timeout != 0) { curl_setopt($this->ch, CURLOPT_TIMEOUT, $connection_timeout); } // TODO: cURL has added a connection timeout separate from the response timeout //if ($connection_timeout != 0) { // curl_setopt($this->ch, CURLOPT_CONNECTIONTIMEOUT, $connection_timeout); //} //if ($response_timeout != 0) { // curl_setopt($this->ch, CURLOPT_TIMEOUT, $response_timeout); //} // recent versions of cURL turn on peer/host checking by default, // while PHP binaries are not compiled with a default location for the // CA cert bundle, so disable peer/host checking. //curl_setopt($this->ch, CURLOPT_CAINFO, 'f:\php-4.3.2-win32\extensions\curl-ca-bundle.crt'); curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0); // support client certificates (thanks Tobias Boes, Doug Anarino, Eryan Ariobowo) if ($this->authtype == 'certificate') { if (isset($this->certRequest['cainfofile'])) { curl_setopt($this->ch, CURLOPT_CAINFO, $this->certRequest['cainfofile']); } if (isset($this->certRequest['verifypeer'])) { curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, $this->certRequest['verifypeer']); } else { curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 1); } if (isset($this->certRequest['verifyhost'])) { curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, $this->certRequest['verifyhost']); } else { curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 1); } if (isset($this->certRequest['sslcertfile'])) { curl_setopt($this->ch, CURLOPT_SSLCERT, $this->certRequest['sslcertfile']); } if (isset($this->certRequest['sslkeyfile'])) { curl_setopt($this->ch, CURLOPT_SSLKEY, $this->certRequest['sslkeyfile']); } if (isset($this->certRequest['passphrase'])) { curl_setopt($this->ch, CURLOPT_SSLKEYPASSWD , $this->certRequest['passphrase']); } } $this->debug('cURL connection set up'); return true; } else { $this->setError('Unknown scheme ' . $this->scheme); $this->debug('Unknown scheme ' . $this->scheme); return false; } } /** * send the SOAP message via HTTP * * @param string $data message data * @param integer $timeout set connection timeout in seconds * @param integer $response_timeout set response timeout in seconds * @param array $cookies cookies to send * @return string data * @access public */ function send($data, $timeout=0, $response_timeout=30, $cookies=NULL) { $this->debug('entered send() with data of length: '.strlen($data)); $this->tryagain = true; $tries = 0; while ($this->tryagain) { $this->tryagain = false; if ($tries++ < 2) { // make connnection if (!$this->connect($timeout, $response_timeout)){ return false; } // send request if (!$this->sendRequest($data, $cookies)){ return false; } // get response $respdata = $this->getResponse(); } else { $this->setError('Too many tries to get an OK response'); } } $this->debug('end of send()'); return $respdata; } /** * send the SOAP message via HTTPS 1.0 using CURL * * @param string $msg message data * @param integer $timeout set connection timeout in seconds * @param integer $response_timeout set response timeout in seconds * @param array $cookies cookies to send * @return string data * @access public */ function sendHTTPS($data, $timeout=0, $response_timeout=30, $cookies) { return $this->send($data, $timeout, $response_timeout, $cookies); } /** * if authenticating, set user credentials here * * @param string $username * @param string $password * @param string $authtype (basic, digest, certificate) * @param array $digestRequest (keys must be nonce, nc, realm, qop) * @param array $certRequest (keys must be cainfofile (optional), sslcertfile, sslkeyfile, passphrase, verifypeer (optional), verifyhost (optional): see corresponding options in cURL docs) * @access public */ function setCredentials($username, $password, $authtype = 'basic', $digestRequest = array(), $certRequest = array()) { $this->debug("Set credentials for authtype $authtype"); // cf. RFC 2617 if ($authtype == 'basic') { $this->outgoing_headers['Authorization'] = 'Basic '.base64_encode(str_replace(':','',$username).':'.$password); } elseif ($authtype == 'digest') { if (isset($digestRequest['nonce'])) { $digestRequest['nc'] = isset($digestRequest['nc']) ? $digestRequest['nc']++ : 1; // calculate the Digest hashes (calculate code based on digest implementation found at: http://www.rassoc.com/gregr/weblog/stories/2002/07/09/webServicesSecurityHttpDigestAuthenticationWithoutActiveDirectory.html) // A1 = unq(username-value) ":" unq(realm-value) ":" passwd $A1 = $username. ':' . (isset($digestRequest['realm']) ? $digestRequest['realm'] : '') . ':' . $password; // H(A1) = MD5(A1) $HA1 = md5($A1); // A2 = Method ":" digest-uri-value $A2 = 'POST:' . $this->digest_uri; // H(A2) $HA2 = md5($A2); // KD(secret, data) = H(concat(secret, ":", data)) // if qop == auth: // request-digest = <"> < KD ( H(A1), unq(nonce-value) // ":" nc-value // ":" unq(cnonce-value) // ":" unq(qop-value) // ":" H(A2) // ) <"> // if qop is missing, // request-digest = <"> < KD ( H(A1), unq(nonce-value) ":" H(A2) ) > <"> $unhashedDigest = ''; $nonce = isset($digestRequest['nonce']) ? $digestRequest['nonce'] : ''; $cnonce = $nonce; if ($digestRequest['qop'] != '') { $unhashedDigest = $HA1 . ':' . $nonce . ':' . sprintf("%08d", $digestRequest['nc']) . ':' . $cnonce . ':' . $digestRequest['qop'] . ':' . $HA2; } else { $unhashedDigest = $HA1 . ':' . $nonce . ':' . $HA2; } $hashedDigest = md5($unhashedDigest); $this->outgoing_headers['Authorization'] = 'Digest username="' . $username . '", realm="' . $digestRequest['realm'] . '", nonce="' . $nonce . '", uri="' . $this->digest_uri . '", cnonce="' . $cnonce . '", nc=' . sprintf("%08x", $digestRequest['nc']) . ', qop="' . $digestRequest['qop'] . '", response="' . $hashedDigest . '"'; } } elseif ($authtype == 'certificate') { $this->certRequest = $certRequest; } $this->username = $username; $this->password = $password; $this->authtype = $authtype; $this->digestRequest = $digestRequest; if (isset($this->outgoing_headers['Authorization'])) { $this->debug('set Authorization: ' . substr($this->outgoing_headers['Authorization'], 0, 12) . '...'); } else { $this->debug('Authorization header not set'); } } /** * set the soapaction value * * @param string $soapaction * @access public */ function setSOAPAction($soapaction) { $this->outgoing_headers['SOAPAction'] = '"' . $soapaction . '"'; $this->debug('set SOAPAction: ' . $this->outgoing_headers['SOAPAction']); } /** * use http encoding * * @param string $enc encoding style. supported values: gzip, deflate, or both * @access public */ function setEncoding($enc='gzip, deflate') { if (function_exists('gzdeflate')) { $this->protocol_version = '1.1'; $this->outgoing_headers['Accept-Encoding'] = $enc; $this->debug('set Accept-Encoding: ' . $this->outgoing_headers['Accept-Encoding']); if (!isset($this->outgoing_headers['Connection'])) { $this->outgoing_headers['Connection'] = 'close'; $this->persistentConnection = false; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); } set_magic_quotes_runtime(0); // deprecated $this->encoding = $enc; } } /** * set proxy info here * * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @access public */ function setProxy($proxyhost, $proxyport, $proxyusername = '', $proxypassword = '') { $this->uri = $this->url; $this->host = $proxyhost; $this->port = $proxyport; if ($proxyusername != '' && $proxypassword != '') { $this->outgoing_headers['Proxy-Authorization'] = ' Basic '.base64_encode($proxyusername.':'.$proxypassword); $this->debug('set Proxy-Authorization: ' . $this->outgoing_headers['Proxy-Authorization']); } } /** * decode a string that is encoded w/ "chunked' transfer encoding * as defined in RFC2068 19.4.6 * * @param string $buffer * @param string $lb * @returns string * @access public * @deprecated */ function decodeChunked($buffer, $lb){ // length := 0 $length = 0; $new = ''; // read chunk-size, chunk-extension (if any) and CRLF // get the position of the linebreak $chunkend = strpos($buffer, $lb); if ($chunkend == FALSE) { $this->debug('no linebreak found in decodeChunked'); return $new; } $temp = substr($buffer,0,$chunkend); $chunk_size = hexdec( trim($temp) ); $chunkstart = $chunkend + strlen($lb); // while (chunk-size > 0) { while ($chunk_size > 0) { $this->debug("chunkstart: $chunkstart chunk_size: $chunk_size"); $chunkend = strpos( $buffer, $lb, $chunkstart + $chunk_size); // Just in case we got a broken connection if ($chunkend == FALSE) { $chunk = substr($buffer,$chunkstart); // append chunk-data to entity-body $new .= $chunk; $length += strlen($chunk); break; } // read chunk-data and CRLF $chunk = substr($buffer,$chunkstart,$chunkend-$chunkstart); // append chunk-data to entity-body $new .= $chunk; // length := length + chunk-size $length += strlen($chunk); // read chunk-size and CRLF $chunkstart = $chunkend + strlen($lb); $chunkend = strpos($buffer, $lb, $chunkstart) + strlen($lb); if ($chunkend == FALSE) { break; //Just in case we got a broken connection } $temp = substr($buffer,$chunkstart,$chunkend-$chunkstart); $chunk_size = hexdec( trim($temp) ); $chunkstart = $chunkend; } return $new; } /* * Writes payload, including HTTP headers, to $this->outgoing_payload. */ function buildPayload($data, $cookie_str = '') { // add content-length header $this->outgoing_headers['Content-Length'] = strlen($data); $this->debug('set Content-Length: ' . $this->outgoing_headers['Content-Length']); // start building outgoing payload: $req = "$this->request_method $this->uri HTTP/$this->protocol_version"; $this->debug("HTTP request: $req"); $this->outgoing_payload = "$req\r\n"; // loop thru headers, serializing foreach($this->outgoing_headers as $k => $v){ $hdr = $k.': '.$v; $this->debug("HTTP header: $hdr"); $this->outgoing_payload .= "$hdr\r\n"; } // add any cookies if ($cookie_str != '') { $hdr = 'Cookie: '.$cookie_str; $this->debug("HTTP header: $hdr"); $this->outgoing_payload .= "$hdr\r\n"; } // header/body separator $this->outgoing_payload .= "\r\n"; // add data $this->outgoing_payload .= $data; } function sendRequest($data, $cookies = NULL) { // build cookie string $cookie_str = $this->getCookiesForRequest($cookies, (($this->scheme == 'ssl') || ($this->scheme == 'https'))); // build payload $this->buildPayload($data, $cookie_str); if ($this->scheme == 'http' || $this->scheme == 'ssl') { // send payload if(!fputs($this->fp, $this->outgoing_payload, strlen($this->outgoing_payload))) { $this->setError('couldn\'t write message data to socket'); $this->debug('couldn\'t write message data to socket'); return false; } $this->debug('wrote data to socket, length = ' . strlen($this->outgoing_payload)); return true; } else if ($this->scheme == 'https') { // set payload // TODO: cURL does say this should only be the verb, and in fact it // turns out that the URI and HTTP version are appended to this, which // some servers refuse to work with //curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $this->outgoing_payload); foreach($this->outgoing_headers as $k => $v){ $curl_headers[] = "$k: $v"; } if ($cookie_str != '') { $curl_headers[] = 'Cookie: ' . $cookie_str; } curl_setopt($this->ch, CURLOPT_HTTPHEADER, $curl_headers); if ($this->request_method == "POST") { curl_setopt($this->ch, CURLOPT_POST, 1); curl_setopt($this->ch, CURLOPT_POSTFIELDS, $data); } else { } $this->debug('set cURL payload'); return true; } } function getResponse(){ $this->incoming_payload = ''; if ($this->scheme == 'http' || $this->scheme == 'ssl') { // loop until headers have been retrieved $data = ''; while (!isset($lb)){ // We might EOF during header read. if(feof($this->fp)) { $this->incoming_payload = $data; $this->debug('found no headers before EOF after length ' . strlen($data)); $this->debug("received before EOF:\n" . $data); $this->setError('server failed to send headers'); return false; } $tmp = fgets($this->fp, 256); $tmplen = strlen($tmp); $this->debug("read line of $tmplen bytes: " . trim($tmp)); if ($tmplen == 0) { $this->incoming_payload = $data; $this->debug('socket read of headers timed out after length ' . strlen($data)); $this->debug("read before timeout: " . $data); $this->setError('socket read of headers timed out'); return false; } $data .= $tmp; $pos = strpos($data,"\r\n\r\n"); if($pos > 1){ $lb = "\r\n"; } else { $pos = strpos($data,"\n\n"); if($pos > 1){ $lb = "\n"; } } // remove 100 header if(isset($lb) && ereg('^HTTP/1.1 100',$data)){ unset($lb); $data = ''; }// } // store header data $this->incoming_payload .= $data; $this->debug('found end of headers after length ' . strlen($data)); // process headers $header_data = trim(substr($data,0,$pos)); $header_array = explode($lb,$header_data); $this->incoming_headers = array(); $this->incoming_cookies = array(); foreach($header_array as $header_line){ $arr = explode(':',$header_line, 2); if(count($arr) > 1){ $header_name = strtolower(trim($arr[0])); $this->incoming_headers[$header_name] = trim($arr[1]); if ($header_name == 'set-cookie') { // TODO: allow multiple cookies from parseCookie $cookie = $this->parseCookie(trim($arr[1])); if ($cookie) { $this->incoming_cookies[] = $cookie; $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); } else { $this->debug('did not find cookie in ' . trim($arr[1])); } } } else if (isset($header_name)) { // append continuation line to previous header $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; } } // loop until msg has been received if (isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked') { $content_length = 2147483647; // ignore any content-length header $chunked = true; $this->debug("want to read chunked content"); } elseif (isset($this->incoming_headers['content-length'])) { $content_length = $this->incoming_headers['content-length']; $chunked = false; $this->debug("want to read content of length $content_length"); } else { $content_length = 2147483647; $chunked = false; $this->debug("want to read content to EOF"); } $data = ''; do { if ($chunked) { $tmp = fgets($this->fp, 256); $tmplen = strlen($tmp); $this->debug("read chunk line of $tmplen bytes"); if ($tmplen == 0) { $this->incoming_payload = $data; $this->debug('socket read of chunk length timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of chunk length timed out'); return false; } $content_length = hexdec(trim($tmp)); $this->debug("chunk length $content_length"); } $strlen = 0; while (($strlen < $content_length) && (!feof($this->fp))) { $readlen = min(8192, $content_length - $strlen); $tmp = fread($this->fp, $readlen); $tmplen = strlen($tmp); $this->debug("read buffer of $tmplen bytes"); if (($tmplen == 0) && (!feof($this->fp))) { $this->incoming_payload = $data; $this->debug('socket read of body timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of body timed out'); return false; } $strlen += $tmplen; $data .= $tmp; } if ($chunked && ($content_length > 0)) { $tmp = fgets($this->fp, 256); $tmplen = strlen($tmp); $this->debug("read chunk terminator of $tmplen bytes"); if ($tmplen == 0) { $this->incoming_payload = $data; $this->debug('socket read of chunk terminator timed out after length ' . strlen($data)); $this->debug("read before timeout:\n" . $data); $this->setError('socket read of chunk terminator timed out'); return false; } } } while ($chunked && ($content_length > 0) && (!feof($this->fp))); if (feof($this->fp)) { $this->debug('read to EOF'); } $this->debug('read body of length ' . strlen($data)); $this->incoming_payload .= $data; $this->debug('received a total of '.strlen($this->incoming_payload).' bytes of data from server'); // close filepointer if( (isset($this->incoming_headers['connection']) && strtolower($this->incoming_headers['connection']) == 'close') || (! $this->persistentConnection) || feof($this->fp)){ fclose($this->fp); $this->fp = false; $this->debug('closed socket'); } // connection was closed unexpectedly if($this->incoming_payload == ''){ $this->setError('no response from server'); return false; } // decode transfer-encoding // if(isset($this->incoming_headers['transfer-encoding']) && strtolower($this->incoming_headers['transfer-encoding']) == 'chunked'){ // if(!$data = $this->decodeChunked($data, $lb)){ // $this->setError('Decoding of chunked data failed'); // return false; // } //print "<pre>\nde-chunked:\n---------------\n$data\n\n---------------\n</pre>"; // set decoded payload // $this->incoming_payload = $header_data.$lb.$lb.$data; // } } else if ($this->scheme == 'https') { // send and receive $this->debug('send and receive with cURL'); $this->incoming_payload = curl_exec($this->ch); $data = $this->incoming_payload; $cErr = curl_error($this->ch); if ($cErr != '') { $err = 'cURL ERROR: '.curl_errno($this->ch).': '.$cErr.'<br>'; // TODO: there is a PHP bug that can cause this to SEGV for CURLINFO_CONTENT_TYPE foreach(curl_getinfo($this->ch) as $k => $v){ $err .= "$k: $v<br>"; } $this->debug($err); $this->setError($err); curl_close($this->ch); return false; } else { //echo '<pre>'; //var_dump(curl_getinfo($this->ch)); //echo '</pre>'; } // close curl $this->debug('No cURL error, closing cURL'); curl_close($this->ch); // remove 100 header(s) while (ereg('^HTTP/1.1 100',$data)) { if ($pos = strpos($data,"\r\n\r\n")) { $data = ltrim(substr($data,$pos)); } elseif($pos = strpos($data,"\n\n") ) { $data = ltrim(substr($data,$pos)); } } // separate content from HTTP headers if ($pos = strpos($data,"\r\n\r\n")) { $lb = "\r\n"; } elseif( $pos = strpos($data,"\n\n")) { $lb = "\n"; } else { $this->debug('no proper separation of headers and document'); $this->setError('no proper separation of headers and document'); return false; } $header_data = trim(substr($data,0,$pos)); $header_array = explode($lb,$header_data); $data = ltrim(substr($data,$pos)); $this->debug('found proper separation of headers and document'); $this->debug('cleaned data, stringlen: '.strlen($data)); // clean headers foreach ($header_array as $header_line) { $arr = explode(':',$header_line,2); if(count($arr) > 1){ $header_name = strtolower(trim($arr[0])); $this->incoming_headers[$header_name] = trim($arr[1]); if ($header_name == 'set-cookie') { // TODO: allow multiple cookies from parseCookie $cookie = $this->parseCookie(trim($arr[1])); if ($cookie) { $this->incoming_cookies[] = $cookie; $this->debug('found cookie: ' . $cookie['name'] . ' = ' . $cookie['value']); } else { $this->debug('did not find cookie in ' . trim($arr[1])); } } } else if (isset($header_name)) { // append continuation line to previous header $this->incoming_headers[$header_name] .= $lb . ' ' . $header_line; } } } $arr = explode(' ', $header_array[0], 3); $http_version = $arr[0]; $http_status = intval($arr[1]); $http_reason = count($arr) > 2 ? $arr[2] : ''; // see if we need to resend the request with http digest authentication if (isset($this->incoming_headers['location']) && $http_status == 301) { $this->debug("Got 301 $http_reason with Location: " . $this->incoming_headers['location']); $this->setURL($this->incoming_headers['location']); $this->tryagain = true; return false; } // see if we need to resend the request with http digest authentication if (isset($this->incoming_headers['www-authenticate']) && $http_status == 401) { $this->debug("Got 401 $http_reason with WWW-Authenticate: " . $this->incoming_headers['www-authenticate']); if (strstr($this->incoming_headers['www-authenticate'], "Digest ")) { $this->debug('Server wants digest authentication'); // remove "Digest " from our elements $digestString = str_replace('Digest ', '', $this->incoming_headers['www-authenticate']); // parse elements into array $digestElements = explode(',', $digestString); foreach ($digestElements as $val) { $tempElement = explode('=', trim($val), 2); $digestRequest[$tempElement[0]] = str_replace("\"", '', $tempElement[1]); } // should have (at least) qop, realm, nonce if (isset($digestRequest['nonce'])) { $this->setCredentials($this->username, $this->password, 'digest', $digestRequest); $this->tryagain = true; return false; } } $this->debug('HTTP authentication failed'); $this->setError('HTTP authentication failed'); return false; } if ( ($http_status >= 300 && $http_status <= 307) || ($http_status >= 400 && $http_status <= 417) || ($http_status >= 501 && $http_status <= 505) ) { $this->setError("Unsupported HTTP response status $http_status $http_reason (soapclientw->response has contents of the response)"); return false; } // decode content-encoding if(isset($this->incoming_headers['content-encoding']) && $this->incoming_headers['content-encoding'] != ''){ if(strtolower($this->incoming_headers['content-encoding']) == 'deflate' || strtolower($this->incoming_headers['content-encoding']) == 'gzip'){ // if decoding works, use it. else assume data wasn't gzencoded if(function_exists('gzinflate')){ //$timer->setMarker('starting decoding of gzip/deflated content'); // IIS 5 requires gzinflate instead of gzuncompress (similar to IE 5 and gzdeflate v. gzcompress) // this means there are no Zlib headers, although there should be $this->debug('The gzinflate function exists'); $datalen = strlen($data); if ($this->incoming_headers['content-encoding'] == 'deflate') { if ($degzdata = @gzinflate($data)) { $data = $degzdata; $this->debug('The payload has been inflated to ' . strlen($data) . ' bytes'); if (strlen($data) < $datalen) { // test for the case that the payload has been compressed twice $this->debug('The inflated payload is smaller than the gzipped one; try again'); if ($degzdata = @gzinflate($data)) { $data = $degzdata; $this->debug('The payload has been inflated again to ' . strlen($data) . ' bytes'); } } } else { $this->debug('Error using gzinflate to inflate the payload'); $this->setError('Error using gzinflate to inflate the payload'); } } elseif ($this->incoming_headers['content-encoding'] == 'gzip') { if ($degzdata = @gzinflate(substr($data, 10))) { // do our best $data = $degzdata; $this->debug('The payload has been un-gzipped to ' . strlen($data) . ' bytes'); if (strlen($data) < $datalen) { // test for the case that the payload has been compressed twice $this->debug('The un-gzipped payload is smaller than the gzipped one; try again'); if ($degzdata = @gzinflate(substr($data, 10))) { $data = $degzdata; $this->debug('The payload has been un-gzipped again to ' . strlen($data) . ' bytes'); } } } else { $this->debug('Error using gzinflate to un-gzip the payload'); $this->setError('Error using gzinflate to un-gzip the payload'); } } //$timer->setMarker('finished decoding of gzip/deflated content'); //print "<xmp>\nde-inflated:\n---------------\n$data\n-------------\n</xmp>"; // set decoded payload $this->incoming_payload = $header_data.$lb.$lb.$data; } else { $this->debug('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); $this->setError('The server sent compressed data. Your php install must have the Zlib extension compiled in to support this.'); } } else { $this->debug('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); $this->setError('Unsupported Content-Encoding ' . $this->incoming_headers['content-encoding']); } } else { $this->debug('No Content-Encoding header'); } if(strlen($data) == 0){ $this->debug('no data after headers!'); $this->setError('no data present after HTTP headers'); return false; } return $data; } function setContentType($type, $charset = false) { $this->outgoing_headers['Content-Type'] = $type . ($charset ? '; charset=' . $charset : ''); $this->debug('set Content-Type: ' . $this->outgoing_headers['Content-Type']); } function usePersistentConnection(){ if (isset($this->outgoing_headers['Accept-Encoding'])) { return false; } $this->protocol_version = '1.1'; $this->persistentConnection = true; $this->outgoing_headers['Connection'] = 'Keep-Alive'; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); return true; } /** * parse an incoming Cookie into it's parts * * @param string $cookie_str content of cookie * @return array with data of that cookie * @access private */ /* * TODO: allow a Set-Cookie string to be parsed into multiple cookies */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; $data = split(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; $start = strpos($cookie_str, $cookie_param); if ($start > 0) { $domain = substr($cookie_str, $start + strlen($cookie_param)); $domain = substr($domain, 0, strpos($domain, ';')); } else { $domain = ''; } $cookie_param = 'expires='; $start = strpos($cookie_str, $cookie_param); if ($start > 0) { $expires = substr($cookie_str, $start + strlen($cookie_param)); $expires = substr($expires, 0, strpos($expires, ';')); } else { $expires = ''; } $cookie_param = 'path='; $start = strpos($cookie_str, $cookie_param); if ( $start > 0 ) { $path = substr($cookie_str, $start + strlen($cookie_param)); $path = substr($path, 0, strpos($path, ';')); } else { $path = '/'; } $cookie_param = ';secure;'; if (strpos($cookie_str, $cookie_param) !== FALSE) { $secure = true; } else { $secure = false; } $sep_pos = strpos($value_str, '='); if ($sep_pos) { $name = substr($value_str, 0, $sep_pos); $value = substr($value_str, $sep_pos + 1); $cookie= array( 'name' => $name, 'value' => $value, 'domain' => $domain, 'path' => $path, 'expires' => $expires, 'secure' => $secure ); return $cookie; } return false; } /** * sort out cookies for the current request * * @param array $cookies array with all cookies * @param boolean $secure is the send-content secure or not? * @return string for Cookie-HTTP-Header * @access private */ function getCookiesForRequest($cookies, $secure=false) { $cookie_str = ''; if ((! is_null($cookies)) && (is_array($cookies))) { foreach ($cookies as $cookie) { if (! is_array($cookie)) { continue; } $this->debug("check cookie for validity: ".$cookie['name'].'='.$cookie['value']); if ((isset($cookie['expires'])) && (! empty($cookie['expires']))) { if (strtotime($cookie['expires']) <= time()) { $this->debug('cookie has expired'); continue; } } if ((isset($cookie['domain'])) && (! empty($cookie['domain']))) { $domain = preg_quote($cookie['domain']); if (! preg_match("'.*$domain$'i", $this->host)) { $this->debug('cookie has different domain'); continue; } } if ((isset($cookie['path'])) && (! empty($cookie['path']))) { $path = preg_quote($cookie['path']); if (! preg_match("'^$path.*'i", $this->path)) { $this->debug('cookie is for a different path'); continue; } } if ((! $secure) && (isset($cookie['secure'])) && ($cookie['secure'])) { $this->debug('cookie is secure, transport is not'); continue; } $cookie_str .= $cookie['name'] . '=' . $cookie['value'] . '; '; $this->debug('add cookie to Cookie-String: ' . $cookie['name'] . '=' . $cookie['value']); } } return $cookie_str; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.soap_transport_http.php
PHP
asf20
37,124
<?php /** * parses a WSDL file, allows access to it's data, other utility methods * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.wsdl.php,v 1.56 2005/08/04 01:27:42 snichol Exp $ * @access public */ class wsdl extends nusoap_base { // URL or filename of the root of this WSDL var $wsdl; // define internal arrays of bindings, ports, operations, messages, etc. var $schemas = array(); var $currentSchema; var $message = array(); var $complexTypes = array(); var $messages = array(); var $currentMessage; var $currentOperation; var $portTypes = array(); var $currentPortType; var $bindings = array(); var $currentBinding; var $ports = array(); var $currentPort; var $opData = array(); var $status = ''; var $documentation = false; var $endpoint = ''; // array of wsdl docs to import var $import = array(); // parser vars var $parser; var $position = 0; var $depth = 0; var $depth_array = array(); // for getting wsdl var $proxyhost = ''; var $proxyport = ''; var $proxyusername = ''; var $proxypassword = ''; var $timeout = 0; var $response_timeout = 30; /** * constructor * * @param string $wsdl WSDL document URL * @param string $proxyhost * @param string $proxyport * @param string $proxyusername * @param string $proxypassword * @param integer $timeout set the connection timeout * @param integer $response_timeout set the response timeout * @access public */ function wsdl($wsdl = '',$proxyhost=false,$proxyport=false,$proxyusername=false,$proxypassword=false,$timeout=0,$response_timeout=30){ parent::nusoap_base(); $this->wsdl = $wsdl; $this->proxyhost = $proxyhost; $this->proxyport = $proxyport; $this->proxyusername = $proxyusername; $this->proxypassword = $proxypassword; $this->timeout = $timeout; $this->response_timeout = $response_timeout; // parse wsdl file if ($wsdl != "") { $this->debug('initial wsdl URL: ' . $wsdl); $this->parseWSDL($wsdl); } // imports // TODO: handle imports more properly, grabbing them in-line and nesting them $imported_urls = array(); $imported = 1; while ($imported > 0) { $imported = 0; // Schema imports foreach ($this->schemas as $ns => $list) { foreach ($list as $xs) { $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! foreach ($xs->imports as $ns2 => $list2) { for ($ii = 0; $ii < count($list2); $ii++) { if (! $list2[$ii]['loaded']) { $this->schemas[$ns]->imports[$ns2][$ii]['loaded'] = true; $url = $list2[$ii]['location']; if ($url != '') { $urlparts = parse_url($url); if (!isset($urlparts['host'])) { $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' .$wsdlparts['port'] : '') . substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; } if (! in_array($url, $imported_urls)) { $this->parseWSDL($url); $imported++; $imported_urls[] = $url; } } else { $this->debug("Unexpected scenario: empty URL for unloaded import"); } } } } } } // WSDL imports $wsdlparts = parse_url($this->wsdl); // this is bogusly simple! foreach ($this->import as $ns => $list) { for ($ii = 0; $ii < count($list); $ii++) { if (! $list[$ii]['loaded']) { $this->import[$ns][$ii]['loaded'] = true; $url = $list[$ii]['location']; if ($url != '') { $urlparts = parse_url($url); if (!isset($urlparts['host'])) { $url = $wsdlparts['scheme'] . '://' . $wsdlparts['host'] . (isset($wsdlparts['port']) ? ':' . $wsdlparts['port'] : '') . substr($wsdlparts['path'],0,strrpos($wsdlparts['path'],'/') + 1) .$urlparts['path']; } if (! in_array($url, $imported_urls)) { $this->parseWSDL($url); $imported++; $imported_urls[] = $url; } } else { $this->debug("Unexpected scenario: empty URL for unloaded import"); } } } } } // add new data to operation data foreach($this->bindings as $binding => $bindingData) { if (isset($bindingData['operations']) && is_array($bindingData['operations'])) { foreach($bindingData['operations'] as $operation => $data) { $this->debug('post-parse data gathering for ' . $operation); $this->bindings[$binding]['operations'][$operation]['input'] = isset($this->bindings[$binding]['operations'][$operation]['input']) ? array_merge($this->bindings[$binding]['operations'][$operation]['input'], $this->portTypes[ $bindingData['portType'] ][$operation]['input']) : $this->portTypes[ $bindingData['portType'] ][$operation]['input']; $this->bindings[$binding]['operations'][$operation]['output'] = isset($this->bindings[$binding]['operations'][$operation]['output']) ? array_merge($this->bindings[$binding]['operations'][$operation]['output'], $this->portTypes[ $bindingData['portType'] ][$operation]['output']) : $this->portTypes[ $bindingData['portType'] ][$operation]['output']; if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ])){ $this->bindings[$binding]['operations'][$operation]['input']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['input']['message'] ]; } if(isset($this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ])){ $this->bindings[$binding]['operations'][$operation]['output']['parts'] = $this->messages[ $this->bindings[$binding]['operations'][$operation]['output']['message'] ]; } if (isset($bindingData['style'])) { $this->bindings[$binding]['operations'][$operation]['style'] = $bindingData['style']; } $this->bindings[$binding]['operations'][$operation]['transport'] = isset($bindingData['transport']) ? $bindingData['transport'] : ''; $this->bindings[$binding]['operations'][$operation]['documentation'] = isset($this->portTypes[ $bindingData['portType'] ][$operation]['documentation']) ? $this->portTypes[ $bindingData['portType'] ][$operation]['documentation'] : ''; $this->bindings[$binding]['operations'][$operation]['endpoint'] = isset($bindingData['endpoint']) ? $bindingData['endpoint'] : ''; } } } } /** * parses the wsdl document * * @param string $wsdl path or URL * @access private */ function parseWSDL($wsdl = '') { if ($wsdl == '') { $this->debug('no wsdl passed to parseWSDL()!!'); $this->setError('no wsdl passed to parseWSDL()!!'); return false; } // parse $wsdl for url format $wsdl_props = parse_url($wsdl); if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'http' || $wsdl_props['scheme'] == 'https')) { $this->debug('getting WSDL http(s) URL ' . $wsdl); // get wsdl $tr = new soap_transport_http($wsdl); $tr->request_method = 'GET'; $tr->useSOAPAction = false; if($this->proxyhost && $this->proxyport){ $tr->setProxy($this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword); } $tr->setEncoding('gzip, deflate'); $wsdl_string = $tr->send('', $this->timeout, $this->response_timeout); //$this->debug("WSDL request\n" . $tr->outgoing_payload); //$this->debug("WSDL response\n" . $tr->incoming_payload); $this->appendDebug($tr->getDebug()); // catch errors if($err = $tr->getError() ){ $errstr = 'HTTP ERROR: '.$err; $this->debug($errstr); $this->setError($errstr); unset($tr); return false; } unset($tr); $this->debug("got WSDL URL"); } else { // $wsdl is not http(s), so treat it as a file URL or plain file path if (isset($wsdl_props['scheme']) && ($wsdl_props['scheme'] == 'file') && isset($wsdl_props['path'])) { $path = isset($wsdl_props['host']) ? ($wsdl_props['host'] . ':' . $wsdl_props['path']) : $wsdl_props['path']; } else { $path = $wsdl; } $this->debug('getting WSDL file ' . $path); if ($fp = @fopen($path, 'r')) { $wsdl_string = ''; while ($data = fread($fp, 32768)) { $wsdl_string .= $data; } fclose($fp); } else { $errstr = "Bad path to WSDL file $path"; $this->debug($errstr); $this->setError($errstr); return false; } } $this->debug('Parse WSDL'); // end new code added // Create an XML parser. $this->parser = xml_parser_create(); // Set the options for parsing the XML data. // xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // Set the object for the parser. xml_set_object($this->parser, $this); // Set the element handlers for the parser. xml_set_element_handler($this->parser, 'start_element', 'end_element'); xml_set_character_data_handler($this->parser, 'character_data'); // Parse the XML file. if (!xml_parse($this->parser, $wsdl_string, true)) { // Display an error message. $errstr = sprintf( 'XML error parsing WSDL from %s on line %d: %s', $wsdl, xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser)) ); $this->debug($errstr); $this->debug("XML payload:\n" . $wsdl_string); $this->setError($errstr); return false; } // free the parser xml_parser_free($this->parser); $this->debug('Parsing WSDL done'); // catch wsdl parse errors if($this->getError()){ return false; } return true; } /** * start-element handler * * @param string $parser XML parser object * @param string $name element name * @param string $attrs associative array of attributes * @access private */ function start_element($parser, $name, $attrs) { if ($this->status == 'schema') { $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); } elseif (ereg('schema$', $name)) { $this->debug('Parsing WSDL schema'); // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); $this->status = 'schema'; $this->currentSchema = new xmlschema('', '', $this->namespaces); $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); } else { // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; $this->message[$pos] = array('cdata' => ''); // process attributes if (count($attrs) > 0) { // register namespace declarations foreach($attrs as $k => $v) { if (ereg("^xmlns", $k)) { if ($ns_prefix = substr(strrchr($k, ':'), 1)) { $this->namespaces[$ns_prefix] = $v; } else { $this->namespaces['ns' . (count($this->namespaces) + 1)] = $v; } if ($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema') { $this->XMLSchemaVersion = $v; $this->namespaces['xsi'] = $v . '-instance'; } } } // expand each attribute prefix to its namespace foreach($attrs as $k => $v) { $k = strpos($k, ':') ? $this->expandQname($k) : $k; if ($k != 'location' && $k != 'soapAction' && $k != 'namespace') { $v = strpos($v, ':') ? $this->expandQname($v) : $v; } $eAttrs[$k] = $v; } $attrs = $eAttrs; } else { $attrs = array(); } // get element prefix, namespace and name if (ereg(':', $name)) { // get ns prefix $prefix = substr($name, 0, strpos($name, ':')); // get ns $namespace = isset($this->namespaces[$prefix]) ? $this->namespaces[$prefix] : ''; // get unqualified name $name = substr(strstr($name, ':'), 1); } // process attributes, expanding any prefixes to namespaces // find status, register data switch ($this->status) { case 'message': if ($name == 'part') { if (isset($attrs['type'])) { $this->debug("msg " . $this->currentMessage . ": found part $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['type']; } if (isset($attrs['element'])) { $this->debug("msg " . $this->currentMessage . ": found part $attrs[name]: " . implode(',', $attrs)); $this->messages[$this->currentMessage][$attrs['name']] = $attrs['element']; } } break; case 'portType': switch ($name) { case 'operation': $this->currentPortOperation = $attrs['name']; $this->debug("portType $this->currentPortType operation: $this->currentPortOperation"); if (isset($attrs['parameterOrder'])) { $this->portTypes[$this->currentPortType][$attrs['name']]['parameterOrder'] = $attrs['parameterOrder']; } break; case 'documentation': $this->documentation = true; break; // merge input/output data default: $m = isset($attrs['message']) ? $this->getLocalPart($attrs['message']) : ''; $this->portTypes[$this->currentPortType][$this->currentPortOperation][$name]['message'] = $m; break; } break; case 'binding': switch ($name) { case 'binding': // get ns prefix if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['prefix'] = $prefix; } $this->bindings[$this->currentBinding] = array_merge($this->bindings[$this->currentBinding], $attrs); break; case 'header': $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus]['headers'][] = $attrs; break; case 'operation': if (isset($attrs['soapAction'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['soapAction'] = $attrs['soapAction']; } if (isset($attrs['style'])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['style'] = $attrs['style']; } if (isset($attrs['name'])) { $this->currentOperation = $attrs['name']; $this->debug("current binding operation: $this->currentOperation"); $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['name'] = $attrs['name']; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['binding'] = $this->currentBinding; $this->bindings[$this->currentBinding]['operations'][$this->currentOperation]['endpoint'] = isset($this->bindings[$this->currentBinding]['endpoint']) ? $this->bindings[$this->currentBinding]['endpoint'] : ''; } break; case 'input': $this->opStatus = 'input'; break; case 'output': $this->opStatus = 'output'; break; case 'body': if (isset($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus])) { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = array_merge($this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus], $attrs); } else { $this->bindings[$this->currentBinding]['operations'][$this->currentOperation][$this->opStatus] = $attrs; } break; } break; case 'service': switch ($name) { case 'port': $this->currentPort = $attrs['name']; $this->debug('current port: ' . $this->currentPort); $this->ports[$this->currentPort]['binding'] = $this->getLocalPart($attrs['binding']); break; case 'address': $this->ports[$this->currentPort]['location'] = $attrs['location']; $this->ports[$this->currentPort]['bindingType'] = $namespace; $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['bindingType'] = $namespace; $this->bindings[ $this->ports[$this->currentPort]['binding'] ]['endpoint'] = $attrs['location']; break; } break; } // set status switch ($name) { case 'import': if (isset($attrs['location'])) { $this->import[$attrs['namespace']][] = array('location' => $attrs['location'], 'loaded' => false); $this->debug('parsing import ' . $attrs['namespace']. ' - ' . $attrs['location'] . ' (' . count($this->import[$attrs['namespace']]).')'); } else { $this->import[$attrs['namespace']][] = array('location' => '', 'loaded' => true); if (! $this->getPrefixFromNamespace($attrs['namespace'])) { $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; } $this->debug('parsing import ' . $attrs['namespace']. ' - [no location] (' . count($this->import[$attrs['namespace']]).')'); } break; //wait for schema //case 'types': // $this->status = 'schema'; // break; case 'message': $this->status = 'message'; $this->messages[$attrs['name']] = array(); $this->currentMessage = $attrs['name']; break; case 'portType': $this->status = 'portType'; $this->portTypes[$attrs['name']] = array(); $this->currentPortType = $attrs['name']; break; case "binding": if (isset($attrs['name'])) { // get binding name if (strpos($attrs['name'], ':')) { $this->currentBinding = $this->getLocalPart($attrs['name']); } else { $this->currentBinding = $attrs['name']; } $this->status = 'binding'; $this->bindings[$this->currentBinding]['portType'] = $this->getLocalPart($attrs['type']); $this->debug("current binding: $this->currentBinding of portType: " . $attrs['type']); } break; case 'service': $this->serviceName = $attrs['name']; $this->status = 'service'; $this->debug('current service: ' . $this->serviceName); break; case 'definitions': foreach ($attrs as $name => $value) { $this->wsdl_info[$name] = $value; } break; } } } /** * end-element handler * * @param string $parser XML parser object * @param string $name element name * @access private */ function end_element($parser, $name){ // unset schema status if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) { $this->status = ""; $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); $this->schemas[$this->currentSchema->schemaTargetNamespace][] = $this->currentSchema; $this->debug('Parsing WSDL schema done'); } if ($this->status == 'schema') { $this->currentSchema->schemaEndElement($parser, $name); } else { // bring depth down a notch $this->depth--; } // end documentation if ($this->documentation) { //TODO: track the node to which documentation should be assigned; it can be a part, message, etc. //$this->portTypes[$this->currentPortType][$this->currentPortOperation]['documentation'] = $this->documentation; $this->documentation = false; } } /** * element content handler * * @param string $parser XML parser object * @param string $data element content * @access private */ function character_data($parser, $data) { $pos = isset($this->depth_array[$this->depth]) ? $this->depth_array[$this->depth] : 0; if (isset($this->message[$pos]['cdata'])) { $this->message[$pos]['cdata'] .= $data; } if ($this->documentation) { $this->documentation .= $data; } } function getBindingData($binding) { if (is_array($this->bindings[$binding])) { return $this->bindings[$binding]; } } /** * returns an assoc array of operation names => operation data * * @param string $bindingType eg: soap, smtp, dime (only soap is currently supported) * @return array * @access public */ function getOperations($bindingType = 'soap') { $ops = array(); if ($bindingType == 'soap') { $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; } // loop thru ports foreach($this->ports as $port => $portData) { // binding type of port matches parameter if ($portData['bindingType'] == $bindingType) { //$this->debug("getOperations for port $port"); //$this->debug("port data: " . $this->varDump($portData)); //$this->debug("bindings: " . $this->varDump($this->bindings[ $portData['binding'] ])); // merge bindings if (isset($this->bindings[ $portData['binding'] ]['operations'])) { $ops = array_merge ($ops, $this->bindings[ $portData['binding'] ]['operations']); } } } return $ops; } /** * returns an associative array of data necessary for calling an operation * * @param string $operation , name of operation * @param string $bindingType , type of binding eg: soap * @return array * @access public */ function getOperationData($operation, $bindingType = 'soap') { if ($bindingType == 'soap') { $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; } // loop thru ports foreach($this->ports as $port => $portData) { // binding type of port matches parameter if ($portData['bindingType'] == $bindingType) { // get binding //foreach($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { foreach(array_keys($this->bindings[ $portData['binding'] ]['operations']) as $bOperation) { // note that we could/should also check the namespace here if ($operation == $bOperation) { $opData = $this->bindings[ $portData['binding'] ]['operations'][$operation]; return $opData; } } } } } /** * returns an associative array of data necessary for calling an operation * * @param string $soapAction soapAction for operation * @param string $bindingType type of binding eg: soap * @return array * @access public */ function getOperationDataForSoapAction($soapAction, $bindingType = 'soap') { if ($bindingType == 'soap') { $bindingType = 'http://schemas.xmlsoap.org/wsdl/soap/'; } // loop thru ports foreach($this->ports as $port => $portData) { // binding type of port matches parameter if ($portData['bindingType'] == $bindingType) { // loop through operations for the binding foreach ($this->bindings[ $portData['binding'] ]['operations'] as $bOperation => $opData) { if ($opData['soapAction'] == $soapAction) { return $opData; } } } } } /** * returns an array of information about a given type * returns false if no type exists by the given name * * typeDef = array( * 'elements' => array(), // refs to elements array * 'restrictionBase' => '', * 'phpType' => '', * 'order' => '(sequence|all)', * 'attrs' => array() // refs to attributes array * ) * * @param $type string the type * @param $ns string namespace (not prefix) of the type * @return mixed * @access public * @see xmlschema */ function getTypeDef($type, $ns) { $this->debug("in getTypeDef: type=$type, ns=$ns"); if ((! $ns) && isset($this->namespaces['tns'])) { $ns = $this->namespaces['tns']; $this->debug("in getTypeDef: type namespace forced to $ns"); } if (isset($this->schemas[$ns])) { $this->debug("in getTypeDef: have schema for namespace $ns"); for ($i = 0; $i < count($this->schemas[$ns]); $i++) { $xs = &$this->schemas[$ns][$i]; $t = $xs->getTypeDef($type); $this->appendDebug($xs->getDebug()); $xs->clearDebug(); if ($t) { if (!isset($t['phpType'])) { // get info for type to tack onto the element $uqType = substr($t['type'], strrpos($t['type'], ':') + 1); $ns = substr($t['type'], 0, strrpos($t['type'], ':')); $etype = $this->getTypeDef($uqType, $ns); if ($etype) { $this->debug("found type for [element] $type:"); $this->debug($this->varDump($etype)); if (isset($etype['phpType'])) { $t['phpType'] = $etype['phpType']; } if (isset($etype['elements'])) { $t['elements'] = $etype['elements']; } if (isset($etype['attrs'])) { $t['attrs'] = $etype['attrs']; } } } return $t; } } } else { $this->debug("in getTypeDef: do not have schema for namespace $ns"); } return false; } /** * prints html description of services * * @access private */ function webDescription(){ global $HTTP_SERVER_VARS; if (isset($_SERVER)) { $PHP_SELF = $_SERVER['PHP_SELF']; } elseif (isset($HTTP_SERVER_VARS)) { $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF']; } else { $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); } $b = ' <html><head><title>NuSOAP: '.$this->serviceName.'</title> <style type="text/css"> body { font-family: arial; color: #000000; background-color: #ffffff; margin: 0px 0px 0px 0px; } p { font-family: arial; color: #000000; margin-top: 0px; margin-bottom: 12px; } pre { background-color: silver; padding: 5px; font-family: Courier New; font-size: x-small; color: #000000;} ul { margin-top: 10px; margin-left: 20px; } li { list-style-type: none; margin-top: 10px; color: #000000; } .content{ margin-left: 0px; padding-bottom: 2em; } .nav { padding-top: 10px; padding-bottom: 10px; padding-left: 15px; font-size: .70em; margin-top: 10px; margin-left: 0px; color: #000000; background-color: #ccccff; width: 20%; margin-left: 20px; margin-top: 20px; } .title { font-family: arial; font-size: 26px; color: #ffffff; background-color: #999999; width: 105%; margin-left: 0px; padding-top: 10px; padding-bottom: 10px; padding-left: 15px;} .hidden { position: absolute; visibility: hidden; z-index: 200; left: 250px; top: 100px; font-family: arial; overflow: hidden; width: 600; padding: 20px; font-size: 10px; background-color: #999999; layer-background-color:#FFFFFF; } a,a:active { color: charcoal; font-weight: bold; } a:visited { color: #666666; font-weight: bold; } a:hover { color: cc3300; font-weight: bold; } </style> <script language="JavaScript" type="text/javascript"> <!-- // POP-UP CAPTIONS... function lib_bwcheck(){ //Browsercheck (needed) this.ver=navigator.appVersion this.agent=navigator.userAgent this.dom=document.getElementById?1:0 this.opera5=this.agent.indexOf("Opera 5")>-1 this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0; this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0; this.ie4=(document.all && !this.dom && !this.opera5)?1:0; this.ie=this.ie4||this.ie5||this.ie6 this.mac=this.agent.indexOf("Mac")>-1 this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; this.ns4=(document.layers && !this.dom)?1:0; this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5) return this } var bw = new lib_bwcheck() //Makes crossbrowser object. function makeObj(obj){ this.evnt=bw.dom? document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?document.layers[obj]:0; if(!this.evnt) return false this.css=bw.dom||bw.ie4?this.evnt.style:bw.ns4?this.evnt:0; this.wref=bw.dom||bw.ie4?this.evnt:bw.ns4?this.css.document:0; this.writeIt=b_writeIt; return this } // A unit of measure that will be added when setting the position of a layer. //var px = bw.ns4||window.opera?"":"px"; function b_writeIt(text){ if (bw.ns4){this.wref.write(text);this.wref.close()} else this.wref.innerHTML = text } //Shows the messages var oDesc; function popup(divid){ if(oDesc = new makeObj(divid)){ oDesc.css.visibility = "visible" } } function popout(){ // Hides message if(oDesc) oDesc.css.visibility = "hidden" } //--> </script> </head> <body> <div class=content> <br><br> <div class=title>'.$this->serviceName.'</div> <div class=nav> <p>View the <a href="'.$PHP_SELF.'?wsdl">WSDL</a> for the service. Click on an operation name to view it&apos;s details.</p> <ul>'; foreach($this->getOperations() as $op => $data){ $b .= "<li><a href='#' onclick=\"popout();popup('$op')\">$op</a></li>"; // create hidden div $b .= "<div id='$op' class='hidden'> <a href='#' onclick='popout()'><font color='#ffffff'>Close</font></a><br><br>"; foreach($data as $donnie => $marie){ // loop through opdata if($donnie == 'input' || $donnie == 'output'){ // show input/output data $b .= "<font color='white'>".ucfirst($donnie).':</font><br>'; foreach($marie as $captain => $tenille){ // loop through data if($captain == 'parts'){ // loop thru parts $b .= "&nbsp;&nbsp;$captain:<br>"; //if(is_array($tenille)){ foreach($tenille as $joanie => $chachi){ $b .= "&nbsp;&nbsp;&nbsp;&nbsp;$joanie: $chachi<br>"; } //} } else { $b .= "&nbsp;&nbsp;$captain: $tenille<br>"; } } } else { $b .= "<font color='white'>".ucfirst($donnie).":</font> $marie<br>"; } } $b .= '</div>'; } $b .= ' <ul> </div> </div></body></html>'; return $b; } /** * serialize the parsed wsdl * * @param mixed $debug whether to put debug=1 in endpoint URL * @return string serialization of WSDL * @access public */ function serialize($debug = 0) { $xml = '<?xml version="1.0" encoding="ISO-8859-1"?>'; $xml .= "\n<definitions"; foreach($this->namespaces as $k => $v) { $xml .= " xmlns:$k=\"$v\""; } // 10.9.02 - add poulter fix for wsdl and tns declarations if (isset($this->namespaces['wsdl'])) { $xml .= " xmlns=\"" . $this->namespaces['wsdl'] . "\""; } if (isset($this->namespaces['tns'])) { $xml .= " targetNamespace=\"" . $this->namespaces['tns'] . "\""; } $xml .= '>'; // imports if (sizeof($this->import) > 0) { foreach($this->import as $ns => $list) { foreach ($list as $ii) { if ($ii['location'] != '') { $xml .= '<import location="' . $ii['location'] . '" namespace="' . $ns . '" />'; } else { $xml .= '<import namespace="' . $ns . '" />'; } } } } // types if (count($this->schemas)>=1) { $xml .= "\n<types>"; foreach ($this->schemas as $ns => $list) { foreach ($list as $xs) { $xml .= $xs->serializeSchema(); } } $xml .= '</types>'; } // messages if (count($this->messages) >= 1) { foreach($this->messages as $msgName => $msgParts) { $xml .= "\n<message name=\"" . $msgName . '">'; if(is_array($msgParts)){ foreach($msgParts as $partName => $partType) { // print 'serializing '.$partType.', sv: '.$this->XMLSchemaVersion.'<br>'; if (strpos($partType, ':')) { $typePrefix = $this->getPrefixFromNamespace($this->getPrefix($partType)); } elseif (isset($this->typemap[$this->namespaces['xsd']][$partType])) { // print 'checking typemap: '.$this->XMLSchemaVersion.'<br>'; $typePrefix = 'xsd'; } else { foreach($this->typemap as $ns => $types) { if (isset($types[$partType])) { $typePrefix = $this->getPrefixFromNamespace($ns); } } if (!isset($typePrefix)) { die("$partType has no namespace!"); } } $ns = $this->getNamespaceFromPrefix($typePrefix); $typeDef = $this->getTypeDef($this->getLocalPart($partType), $ns); if ($typeDef['typeClass'] == 'element') { $elementortype = 'element'; } else { $elementortype = 'type'; } $xml .= '<part name="' . $partName . '" ' . $elementortype . '="' . $typePrefix . ':' . $this->getLocalPart($partType) . '" />'; } } $xml .= '</message>'; } } // bindings & porttypes if (count($this->bindings) >= 1) { $binding_xml = ''; $portType_xml = ''; foreach($this->bindings as $bindingName => $attrs) { $binding_xml .= "\n<binding name=\"" . $bindingName . '" type="tns:' . $attrs['portType'] . '">'; $binding_xml .= '<soap:binding style="' . $attrs['style'] . '" transport="' . $attrs['transport'] . '"/>'; $portType_xml .= "\n<portType name=\"" . $attrs['portType'] . '">'; foreach($attrs['operations'] as $opName => $opParts) { $binding_xml .= '<operation name="' . $opName . '">'; $binding_xml .= '<soap:operation soapAction="' . $opParts['soapAction'] . '" style="'. $opParts['style'] . '"/>'; if (isset($opParts['input']['encodingStyle']) && $opParts['input']['encodingStyle'] != '') { $enc_style = ' encodingStyle="' . $opParts['input']['encodingStyle'] . '"'; } else { $enc_style = ''; } $binding_xml .= '<input><soap:body use="' . $opParts['input']['use'] . '" namespace="' . $opParts['input']['namespace'] . '"' . $enc_style . '/></input>'; if (isset($opParts['output']['encodingStyle']) && $opParts['output']['encodingStyle'] != '') { $enc_style = ' encodingStyle="' . $opParts['output']['encodingStyle'] . '"'; } else { $enc_style = ''; } $binding_xml .= '<output><soap:body use="' . $opParts['output']['use'] . '" namespace="' . $opParts['output']['namespace'] . '"' . $enc_style . '/></output>'; $binding_xml .= '</operation>'; $portType_xml .= '<operation name="' . $opParts['name'] . '"'; if (isset($opParts['parameterOrder'])) { $portType_xml .= ' parameterOrder="' . $opParts['parameterOrder'] . '"'; } $portType_xml .= '>'; if(isset($opParts['documentation']) && $opParts['documentation'] != '') { $portType_xml .= '<documentation>' . htmlspecialchars($opParts['documentation']) . '</documentation>'; } $portType_xml .= '<input message="tns:' . $opParts['input']['message'] . '"/>'; $portType_xml .= '<output message="tns:' . $opParts['output']['message'] . '"/>'; $portType_xml .= '</operation>'; } $portType_xml .= '</portType>'; $binding_xml .= '</binding>'; } $xml .= $portType_xml . $binding_xml; } // services $xml .= "\n<service name=\"" . $this->serviceName . '">'; if (count($this->ports) >= 1) { foreach($this->ports as $pName => $attrs) { $xml .= '<port name="' . $pName . '" binding="tns:' . $attrs['binding'] . '">'; $xml .= '<soap:address location="' . $attrs['location'] . ($debug ? '?debug=1' : '') . '"/>'; $xml .= '</port>'; } } $xml .= '</service>'; return $xml . "\n</definitions>"; } /** * serialize PHP values according to a WSDL message definition * * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid * * @param string $operation operation name * @param string $direction (input|output) * @param mixed $parameters parameter value(s) * @return mixed parameters serialized as XML or false on error (e.g. operation not found) * @access public */ function serializeRPCParameters($operation, $direction, $parameters) { $this->debug("in serializeRPCParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); $this->appendDebug('parameters=' . $this->varDump($parameters)); if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; } if (!$opData = $this->getOperationData($operation)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); return false; } $this->debug('opData:'); $this->appendDebug($this->varDump($opData)); // Get encoding style for output and set to current $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { $encodingStyle = $opData['output']['encodingStyle']; $enc_style = $encodingStyle; } // set input params $xml = ''; if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { $use = $opData[$direction]['use']; $this->debug('have ' . count($opData[$direction]['parts']) . ' part(s) to serialize'); if (is_array($parameters)) { $parametersArrayType = $this->isArraySimpleOrStruct($parameters); $this->debug('have ' . count($parameters) . ' parameter(s) provided as ' . $parametersArrayType . ' to serialize'); foreach($opData[$direction]['parts'] as $name => $type) { $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); // Track encoding style if (isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; } // NOTE: add error handling here // if serializeType returns false, then catch global error and fault if ($parametersArrayType == 'arraySimple') { $p = array_shift($parameters); $this->debug('calling serializeType w/indexed param'); $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); } elseif (isset($parameters[$name])) { $this->debug('calling serializeType w/named param'); $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); } else { // TODO: only send nillable $this->debug('calling serializeType w/null param'); $xml .= $this->serializeType($name, $type, null, $use, $enc_style); } } } else { $this->debug('no parameters passed.'); } } $this->debug("serializeRPCParameters returning: $xml"); return $xml; } /** * serialize a PHP value according to a WSDL message definition * * TODO * - multi-ref serialization * - validate PHP values against type definitions, return errors if invalid * * @param string $ type name * @param mixed $ param value * @return mixed new param or false if initial value didn't validate * @access public * @deprecated */ function serializeParameters($operation, $direction, $parameters) { $this->debug("in serializeParameters: operation=$operation, direction=$direction, XMLSchemaVersion=$this->XMLSchemaVersion"); $this->appendDebug('parameters=' . $this->varDump($parameters)); if ($direction != 'input' && $direction != 'output') { $this->debug('The value of the \$direction argument needs to be either "input" or "output"'); $this->setError('The value of the \$direction argument needs to be either "input" or "output"'); return false; } if (!$opData = $this->getOperationData($operation)) { $this->debug('Unable to retrieve WSDL data for operation: ' . $operation); $this->setError('Unable to retrieve WSDL data for operation: ' . $operation); return false; } $this->debug('opData:'); $this->appendDebug($this->varDump($opData)); // Get encoding style for output and set to current $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; if(($direction == 'input') && isset($opData['output']['encodingStyle']) && ($opData['output']['encodingStyle'] != $encodingStyle)) { $encodingStyle = $opData['output']['encodingStyle']; $enc_style = $encodingStyle; } // set input params $xml = ''; if (isset($opData[$direction]['parts']) && sizeof($opData[$direction]['parts']) > 0) { $use = $opData[$direction]['use']; $this->debug("use=$use"); $this->debug('got ' . count($opData[$direction]['parts']) . ' part(s)'); if (is_array($parameters)) { $parametersArrayType = $this->isArraySimpleOrStruct($parameters); $this->debug('have ' . $parametersArrayType . ' parameters'); foreach($opData[$direction]['parts'] as $name => $type) { $this->debug('serializing part "'.$name.'" of type "'.$type.'"'); // Track encoding style if(isset($opData[$direction]['encodingStyle']) && $encodingStyle != $opData[$direction]['encodingStyle']) { $encodingStyle = $opData[$direction]['encodingStyle']; $enc_style = $encodingStyle; } else { $enc_style = false; } // NOTE: add error handling here // if serializeType returns false, then catch global error and fault if ($parametersArrayType == 'arraySimple') { $p = array_shift($parameters); $this->debug('calling serializeType w/indexed param'); $xml .= $this->serializeType($name, $type, $p, $use, $enc_style); } elseif (isset($parameters[$name])) { $this->debug('calling serializeType w/named param'); $xml .= $this->serializeType($name, $type, $parameters[$name], $use, $enc_style); } else { // TODO: only send nillable $this->debug('calling serializeType w/null param'); $xml .= $this->serializeType($name, $type, null, $use, $enc_style); } } } else { $this->debug('no parameters passed.'); } } $this->debug("serializeParameters returning: $xml"); return $xml; } /** * serializes a PHP value according a given type definition * * @param string $name name of value (part or element) * @param string $type XML schema type of value (type or element) * @param mixed $value a native PHP value (parameter value) * @param string $use use for part (encoded|literal) * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) * @param boolean $unqualified a kludge for what should be XML namespace form handling * @return string value serialized as an XML string * @access private */ function serializeType($name, $type, $value, $use='encoded', $encodingStyle=false, $unqualified=false) { $this->debug("in serializeType: name=$name, type=$type, use=$use, encodingStyle=$encodingStyle, unqualified=" . ($unqualified ? "unqualified" : "qualified")); $this->appendDebug("value=" . $this->varDump($value)); if($use == 'encoded' && $encodingStyle) { $encodingStyle = ' SOAP-ENV:encodingStyle="' . $encodingStyle . '"'; } // if a soapval has been supplied, let its type override the WSDL if (is_object($value) && get_class($value) == 'soapval') { if ($value->type_ns) { $type = $value->type_ns . ':' . $value->type; $forceType = true; $this->debug("in serializeType: soapval overrides type to $type"); } elseif ($value->type) { $type = $value->type; $forceType = true; $this->debug("in serializeType: soapval overrides type to $type"); } else { $forceType = false; $this->debug("in serializeType: soapval does not override type"); } $attrs = $value->attributes; $value = $value->value; $this->debug("in serializeType: soapval overrides value to $value"); if ($attrs) { if (!is_array($value)) { $value['!'] = $value; } foreach ($attrs as $n => $v) { $value['!' . $n] = $v; } $this->debug("in serializeType: soapval provides attributes"); } } else { $forceType = false; } $xml = ''; if (strpos($type, ':')) { $uqType = substr($type, strrpos($type, ':') + 1); $ns = substr($type, 0, strrpos($type, ':')); $this->debug("in serializeType: got a prefixed type: $uqType, $ns"); if ($this->getNamespaceFromPrefix($ns)) { $ns = $this->getNamespaceFromPrefix($ns); $this->debug("in serializeType: expanded prefixed type: $uqType, $ns"); } if($ns == $this->XMLSchemaVersion || $ns == 'http://schemas.xmlsoap.org/soap/encoding/'){ $this->debug('in serializeType: type namespace indicates XML Schema or SOAP Encoding type'); if ($unqualified && $use == 'literal') { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } if (is_null($value)) { if ($use == 'literal') { // TODO: depends on minOccurs $xml = "<$name$elementNS/>"; } else { // TODO: depends on nillable, which should be checked before calling this method $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } if ($uqType == 'boolean') { if ((is_string($value) && $value == 'false') || (! $value)) { $value = 'false'; } else { $value = 'true'; } } if ($uqType == 'string' && gettype($value) == 'string') { $value = $this->expandEntities($value); } if (($uqType == 'long' || $uqType == 'unsignedLong') && gettype($value) == 'double') { $value = sprintf("%.0lf", $value); } // it's a scalar // TODO: what about null/nil values? // check type isn't a custom type extending xmlschema namespace if (!$this->getTypeDef($uqType, $ns)) { if ($use == 'literal') { if ($forceType) { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>"; } else { $xml = "<$name$elementNS>$value</$name>"; } } else { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } $this->debug('custom type extends XML Schema or SOAP Encoding namespace (yuck)'); } else if ($ns == 'http://xml.apache.org/xml-soap') { $this->debug('in serializeType: appears to be Apache SOAP type'); if ($uqType == 'Map') { $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); if (! $tt_prefix) { $this->debug('in serializeType: Add namespace for Apache SOAP type'); $tt_prefix = 'ns' . rand(1000, 9999); $this->namespaces[$tt_prefix] = 'http://xml.apache.org/xml-soap'; // force this to be added to usedNamespaces $tt_prefix = $this->getPrefixFromNamespace('http://xml.apache.org/xml-soap'); } $contents = ''; foreach($value as $k => $v) { $this->debug("serializing map element: key $k, value $v"); $contents .= '<item>'; $contents .= $this->serialize_val($k,'key',false,false,false,false,$use); $contents .= $this->serialize_val($v,'value',false,false,false,false,$use); $contents .= '</item>'; } if ($use == 'literal') { if ($forceType) { $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\">$contents</$name>"; } else { $xml = "<$name>$contents</$name>"; } } else { $xml = "<$name xsi:type=\"" . $tt_prefix . ":$uqType\"$encodingStyle>$contents</$name>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } $this->debug('in serializeType: Apache SOAP type, but only support Map'); } } else { // TODO: should the type be compared to types in XSD, and the namespace // set to XSD if the type matches? $this->debug("in serializeType: No namespace for type $type"); $ns = ''; $uqType = $type; } if(!$typeDef = $this->getTypeDef($uqType, $ns)){ $this->setError("$type ($uqType) is not a supported type."); $this->debug("in serializeType: $type ($uqType) is not a supported type."); return false; } else { $this->debug("in serializeType: found typeDef"); $this->appendDebug('typeDef=' . $this->varDump($typeDef)); } $phpType = $typeDef['phpType']; $this->debug("in serializeType: uqType: $uqType, ns: $ns, phptype: $phpType, arrayType: " . (isset($typeDef['arrayType']) ? $typeDef['arrayType'] : '') ); // if php type == struct, map value to the <all> element names if ($phpType == 'struct') { if (isset($typeDef['typeClass']) && $typeDef['typeClass'] == 'element') { $elementName = $uqType; if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { $elementNS = " xmlns=\"$ns\""; } else { $elementNS = " xmlns=\"\""; } } else { $elementName = $name; if ($unqualified) { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } } if (is_null($value)) { if ($use == 'literal') { // TODO: depends on minOccurs $xml = "<$elementName$elementNS/>"; } else { $xml = "<$elementName$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"/>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } if (is_object($value)) { $value = get_object_vars($value); } if (is_array($value)) { $elementAttrs = $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); if ($use == 'literal') { if ($forceType) { $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">"; } else { $xml = "<$elementName$elementNS$elementAttrs>"; } } else { $xml = "<$elementName$elementNS$elementAttrs xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>"; } $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); $xml .= "</$elementName>"; } else { $this->debug("in serializeType: phpType is struct, but value is not an array"); $this->setError("phpType is struct, but value is not an array: see debug output for details"); $xml = ''; } } elseif ($phpType == 'array') { if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { $elementNS = " xmlns=\"$ns\""; } else { if ($unqualified) { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } } if (is_null($value)) { if ($use == 'literal') { // TODO: depends on minOccurs $xml = "<$name$elementNS/>"; } else { $xml = "<$name$elementNS xsi:nil=\"true\" xsi:type=\"" . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ":Array\" " . $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') . ':arrayType="' . $this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) . ':' . $this->getLocalPart($typeDef['arrayType'])."[0]\"/>"; } $this->debug("in serializeType: returning: $xml"); return $xml; } if (isset($typeDef['multidimensional'])) { $nv = array(); foreach($value as $v) { $cols = ',' . sizeof($v); $nv = array_merge($nv, $v); } $value = $nv; } else { $cols = ''; } if (is_array($value) && sizeof($value) >= 1) { $rows = sizeof($value); $contents = ''; foreach($value as $k => $v) { $this->debug("serializing array element: $k, $v of type: $typeDef[arrayType]"); //if (strpos($typeDef['arrayType'], ':') ) { if (!in_array($typeDef['arrayType'],$this->typemap['http://www.w3.org/2001/XMLSchema'])) { $contents .= $this->serializeType('item', $typeDef['arrayType'], $v, $use); } else { $contents .= $this->serialize_val($v, 'item', $typeDef['arrayType'], null, $this->XMLSchemaVersion, false, $use); } } } else { $rows = 0; $contents = null; } // TODO: for now, an empty value will be serialized as a zero element // array. Revisit this when coding the handling of null/nil values. if ($use == 'literal') { $xml = "<$name$elementNS>" .$contents ."</$name>"; } else { $xml = "<$name$elementNS xsi:type=\"".$this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/').':Array" '. $this->getPrefixFromNamespace('http://schemas.xmlsoap.org/soap/encoding/') .':arrayType="' .$this->getPrefixFromNamespace($this->getPrefix($typeDef['arrayType'])) .":".$this->getLocalPart($typeDef['arrayType'])."[$rows$cols]\">" .$contents ."</$name>"; } } elseif ($phpType == 'scalar') { if (isset($typeDef['form']) && ($typeDef['form'] == 'qualified')) { $elementNS = " xmlns=\"$ns\""; } else { if ($unqualified) { $elementNS = " xmlns=\"\""; } else { $elementNS = ''; } } if ($use == 'literal') { if ($forceType) { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\">$value</$name>"; } else { $xml = "<$name$elementNS>$value</$name>"; } } else { $xml = "<$name$elementNS xsi:type=\"" . $this->getPrefixFromNamespace($ns) . ":$uqType\"$encodingStyle>$value</$name>"; } } $this->debug("in serializeType: returning: $xml"); return $xml; } /** * serializes the attributes for a complexType * * @param array $typeDef our internal representation of an XML schema type (or element) * @param mixed $value a native PHP value (parameter value) * @param string $ns the namespace of the type * @param string $uqType the local part of the type * @return string value serialized as an XML string * @access private */ function serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType) { $xml = ''; if (isset($typeDef['attrs']) && is_array($typeDef['attrs'])) { $this->debug("serialize attributes for XML Schema type $ns:$uqType"); if (is_array($value)) { $xvalue = $value; } elseif (is_object($value)) { $xvalue = get_object_vars($value); } else { $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); $xvalue = array(); } foreach ($typeDef['attrs'] as $aName => $attrs) { if (isset($xvalue['!' . $aName])) { $xname = '!' . $aName; $this->debug("value provided for attribute $aName with key $xname"); } elseif (isset($xvalue[$aName])) { $xname = $aName; $this->debug("value provided for attribute $aName with key $xname"); } elseif (isset($attrs['default'])) { $xname = '!' . $aName; $xvalue[$xname] = $attrs['default']; $this->debug('use default value of ' . $xvalue[$aName] . ' for attribute ' . $aName); } else { $xname = ''; $this->debug("no value provided for attribute $aName"); } if ($xname) { $xml .= " $aName=\"" . $this->expandEntities($xvalue[$xname]) . "\""; } } } else { $this->debug("no attributes to serialize for XML Schema type $ns:$uqType"); } if (isset($typeDef['extensionBase'])) { $ns = $this->getPrefix($typeDef['extensionBase']); $uqType = $this->getLocalPart($typeDef['extensionBase']); if ($this->getNamespaceFromPrefix($ns)) { $ns = $this->getNamespaceFromPrefix($ns); } if ($typeDef = $this->getTypeDef($uqType, $ns)) { $this->debug("serialize attributes for extension base $ns:$uqType"); $xml .= $this->serializeComplexTypeAttributes($typeDef, $value, $ns, $uqType); } else { $this->debug("extension base $ns:$uqType is not a supported type"); } } return $xml; } /** * serializes the elements for a complexType * * @param array $typeDef our internal representation of an XML schema type (or element) * @param mixed $value a native PHP value (parameter value) * @param string $ns the namespace of the type * @param string $uqType the local part of the type * @param string $use use for part (encoded|literal) * @param string $encodingStyle SOAP encoding style for the value (if different than the enclosing style) * @return string value serialized as an XML string * @access private */ function serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use='encoded', $encodingStyle=false) { $xml = ''; if (isset($typeDef['elements']) && is_array($typeDef['elements'])) { $this->debug("in serializeComplexTypeElements, serialize elements for XML Schema type $ns:$uqType"); if (is_array($value)) { $xvalue = $value; } elseif (is_object($value)) { $xvalue = get_object_vars($value); } else { $this->debug("value is neither an array nor an object for XML Schema type $ns:$uqType"); $xvalue = array(); } // toggle whether all elements are present - ideally should validate against schema if (count($typeDef['elements']) != count($xvalue)){ $optionals = true; } foreach ($typeDef['elements'] as $eName => $attrs) { if (!isset($xvalue[$eName])) { if (isset($attrs['default'])) { $xvalue[$eName] = $attrs['default']; $this->debug('use default value of ' . $xvalue[$eName] . ' for element ' . $eName); } } // if user took advantage of a minOccurs=0, then only serialize named parameters if (isset($optionals) && (!isset($xvalue[$eName])) && ( (!isset($attrs['nillable'])) || $attrs['nillable'] != 'true') ){ if (isset($attrs['minOccurs']) && $attrs['minOccurs'] <> '0') { $this->debug("apparent error: no value provided for element $eName with minOccurs=" . $attrs['minOccurs']); } // do nothing $this->debug("no value provided for complexType element $eName and element is not nillable, so serialize nothing"); } else { // get value if (isset($xvalue[$eName])) { $v = $xvalue[$eName]; } else { $v = null; } if (isset($attrs['form'])) { $unqualified = ($attrs['form'] == 'unqualified'); } else { $unqualified = false; } if (isset($attrs['maxOccurs']) && ($attrs['maxOccurs'] == 'unbounded' || $attrs['maxOccurs'] > 1) && isset($v) && is_array($v) && $this->isArraySimpleOrStruct($v) == 'arraySimple') { $vv = $v; foreach ($vv as $k => $v) { if (isset($attrs['type']) || isset($attrs['ref'])) { // serialize schema-defined type $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); } else { // serialize generic type (can this ever really happen?) $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); } } } else { if (isset($attrs['type']) || isset($attrs['ref'])) { // serialize schema-defined type $xml .= $this->serializeType($eName, isset($attrs['type']) ? $attrs['type'] : $attrs['ref'], $v, $use, $encodingStyle, $unqualified); } else { // serialize generic type (can this ever really happen?) $this->debug("calling serialize_val() for $v, $eName, false, false, false, false, $use"); $xml .= $this->serialize_val($v, $eName, false, false, false, false, $use); } } } } } else { $this->debug("no elements to serialize for XML Schema type $ns:$uqType"); } if (isset($typeDef['extensionBase'])) { $ns = $this->getPrefix($typeDef['extensionBase']); $uqType = $this->getLocalPart($typeDef['extensionBase']); if ($this->getNamespaceFromPrefix($ns)) { $ns = $this->getNamespaceFromPrefix($ns); } if ($typeDef = $this->getTypeDef($uqType, $ns)) { $this->debug("serialize elements for extension base $ns:$uqType"); $xml .= $this->serializeComplexTypeElements($typeDef, $value, $ns, $uqType, $use, $encodingStyle); } else { $this->debug("extension base $ns:$uqType is not a supported type"); } } return $xml; } /** * adds an XML Schema complex type to the WSDL types * * @param string name * @param string typeClass (complexType|simpleType|attribute) * @param string phpType: currently supported are array and struct (php assoc array) * @param string compositor (all|sequence|choice) * @param string restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param array elements = array ( name => array(name=>'',type=>'') ) * @param array attrs = array(array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'xsd:string[]')) * @param string arrayType: namespace:name (xsd:string) * @see xmlschema * @access public */ function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType='') { if (count($elements) > 0) { foreach($elements as $n => $e){ // expand each element foreach ($e as $k => $v) { $k = strpos($k,':') ? $this->expandQname($k) : $k; $v = strpos($v,':') ? $this->expandQname($v) : $v; $ee[$k] = $v; } $eElements[$n] = $ee; } $elements = $eElements; } if (count($attrs) > 0) { foreach($attrs as $n => $a){ // expand each attribute foreach ($a as $k => $v) { $k = strpos($k,':') ? $this->expandQname($k) : $k; $v = strpos($v,':') ? $this->expandQname($v) : $v; $aa[$k] = $v; } $eAttrs[$n] = $aa; } $attrs = $eAttrs; } $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; $arrayType = strpos($arrayType,':') ? $this->expandQname($arrayType) : $arrayType; $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; $this->schemas[$typens][0]->addComplexType($name,$typeClass,$phpType,$compositor,$restrictionBase,$elements,$attrs,$arrayType); } /** * adds an XML Schema simple type to the WSDL types * * @param string $name * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param string $typeClass (should always be simpleType) * @param string $phpType (should always be scalar) * @param array $enumeration array of values * @see xmlschema * @access public */ function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { $restrictionBase = strpos($restrictionBase,':') ? $this->expandQname($restrictionBase) : $restrictionBase; $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; $this->schemas[$typens][0]->addSimpleType($name, $restrictionBase, $typeClass, $phpType, $enumeration); } /** * adds an element to the WSDL types * * @param array $attrs attributes that must include name and type * @see xmlschema * @access public */ function addElement($attrs) { $typens = isset($this->namespaces['types']) ? $this->namespaces['types'] : $this->namespaces['tns']; $this->schemas[$typens][0]->addElement($attrs); } /** * register an operation with the server * * @param string $name operation (method) name * @param array $in assoc array of input values: key = param name, value = param type * @param array $out assoc array of output values: key = param name, value = param type * @param string $namespace optional The namespace for the operation * @param string $soapaction optional The soapaction for the operation * @param string $style (rpc|document) optional The style for the operation Note: when 'document' is specified, parameter and return wrappers are created for you automatically * @param string $use (encoded|literal) optional The use for the parameters (cannot mix right now) * @param string $documentation optional The description to include in the WSDL * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) * @access public */ function addOperation($name, $in = false, $out = false, $namespace = false, $soapaction = false, $style = 'rpc', $use = 'encoded', $documentation = '', $encodingStyle = ''){ if ($use == 'encoded' && $encodingStyle == '') { $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; } if ($style == 'document') { $elements = array(); foreach ($in as $n => $t) { $elements[$n] = array('name' => $n, 'type' => $t); } $this->addComplexType($name . 'RequestType', 'complexType', 'struct', 'all', '', $elements); $this->addElement(array('name' => $name, 'type' => $name . 'RequestType')); $in = array('parameters' => 'tns:' . $name); $elements = array(); foreach ($out as $n => $t) { $elements[$n] = array('name' => $n, 'type' => $t); } $this->addComplexType($name . 'ResponseType', 'complexType', 'struct', 'all', '', $elements); $this->addElement(array('name' => $name . 'Response', 'type' => $name . 'ResponseType')); $out = array('parameters' => 'tns:' . $name . 'Response'); } // get binding $this->bindings[ $this->serviceName . 'Binding' ]['operations'][$name] = array( 'name' => $name, 'binding' => $this->serviceName . 'Binding', 'endpoint' => $this->endpoint, 'soapAction' => $soapaction, 'style' => $style, 'input' => array( 'use' => $use, 'namespace' => $namespace, 'encodingStyle' => $encodingStyle, 'message' => $name . 'Request', 'parts' => $in), 'output' => array( 'use' => $use, 'namespace' => $namespace, 'encodingStyle' => $encodingStyle, 'message' => $name . 'Response', 'parts' => $out), 'namespace' => $namespace, 'transport' => 'http://schemas.xmlsoap.org/soap/http', 'documentation' => $documentation); // add portTypes // add messages if($in) { foreach($in as $pName => $pType) { if(strpos($pType,':')) { $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); } $this->messages[$name.'Request'][$pName] = $pType; } } else { $this->messages[$name.'Request']= '0'; } if($out) { foreach($out as $pName => $pType) { if(strpos($pType,':')) { $pType = $this->getNamespaceFromPrefix($this->getPrefix($pType)).":".$this->getLocalPart($pType); } $this->messages[$name.'Response'][$pName] = $pType; } } else { $this->messages[$name.'Response']= '0'; } return true; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.wsdl.php
PHP
asf20
70,349
<?php /** * * soap_server allows the user to create a SOAP server * that is capable of receiving messages and returning responses * * NOTE: WSDL functionality is experimental * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.soap_server.php,v 1.48 2005/08/04 01:27:42 snichol Exp $ * @access public */ class soap_server extends nusoap_base { /** * HTTP headers of request * @var array * @access private */ var $headers = array(); /** * HTTP request * @var string * @access private */ var $request = ''; /** * SOAP headers from request (incomplete namespace resolution; special characters not escaped) (text) * @var string * @access public */ var $requestHeaders = ''; /** * SOAP body request portion (incomplete namespace resolution; special characters not escaped) (text) * @var string * @access public */ var $document = ''; /** * SOAP payload for request (text) * @var string * @access public */ var $requestSOAP = ''; /** * requested method namespace URI * @var string * @access private */ var $methodURI = ''; /** * name of method requested * @var string * @access private */ var $methodname = ''; /** * method parameters from request * @var array * @access private */ var $methodparams = array(); /** * SOAP Action from request * @var string * @access private */ var $SOAPAction = ''; /** * character set encoding of incoming (request) messages * @var string * @access public */ var $xml_encoding = ''; /** * toggles whether the parser decodes element content w/ utf8_decode() * @var boolean * @access public */ var $decode_utf8 = true; /** * HTTP headers of response * @var array * @access public */ var $outgoing_headers = array(); /** * HTTP response * @var string * @access private */ var $response = ''; /** * SOAP headers for response (text) * @var string * @access public */ var $responseHeaders = ''; /** * SOAP payload for response (text) * @var string * @access private */ var $responseSOAP = ''; /** * method return value to place in response * @var mixed * @access private */ var $methodreturn = false; /** * whether $methodreturn is a string of literal XML * @var boolean * @access public */ var $methodreturnisliteralxml = false; /** * SOAP fault for response (or false) * @var mixed * @access private */ var $fault = false; /** * text indication of result (for debugging) * @var string * @access private */ var $result = 'successful'; /** * assoc array of operations => opData; operations are added by the register() * method or by parsing an external WSDL definition * @var array * @access private */ var $operations = array(); /** * wsdl instance (if one) * @var mixed * @access private */ var $wsdl = false; /** * URL for WSDL (if one) * @var mixed * @access private */ var $externalWSDLURL = false; /** * whether to append debug to response as XML comment * @var boolean * @access public */ var $debug_flag = false; /** * constructor * the optional parameter is a path to a WSDL file that you'd like to bind the server instance to. * * @param mixed $wsdl file path or URL (string), or wsdl instance (object) * @access public */ function soap_server($wsdl=false){ parent::nusoap_base(); // turn on debugging? global $debug; global $HTTP_SERVER_VARS; if (isset($_SERVER)) { $this->debug("_SERVER is defined:"); $this->appendDebug($this->varDump($_SERVER)); } elseif (isset($HTTP_SERVER_VARS)) { $this->debug("HTTP_SERVER_VARS is defined:"); $this->appendDebug($this->varDump($HTTP_SERVER_VARS)); } else { $this->debug("Neither _SERVER nor HTTP_SERVER_VARS is defined."); } if (isset($debug)) { $this->debug("In soap_server, set debug_flag=$debug based on global flag"); $this->debug_flag = $debug; } elseif (isset($_SERVER['QUERY_STRING'])) { $qs = explode('&', $_SERVER['QUERY_STRING']); foreach ($qs as $v) { if (substr($v, 0, 6) == 'debug=') { $this->debug("In soap_server, set debug_flag=" . substr($v, 6) . " based on query string #1"); $this->debug_flag = substr($v, 6); } } } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $qs = explode('&', $HTTP_SERVER_VARS['QUERY_STRING']); foreach ($qs as $v) { if (substr($v, 0, 6) == 'debug=') { $this->debug("In soap_server, set debug_flag=" . substr($v, 6) . " based on query string #2"); $this->debug_flag = substr($v, 6); } } } // wsdl if($wsdl){ $this->debug("In soap_server, WSDL is specified"); if (is_object($wsdl) && (get_class($wsdl) == 'wsdl')) { $this->wsdl = $wsdl; $this->externalWSDLURL = $this->wsdl->wsdl; $this->debug('Use existing wsdl instance from ' . $this->externalWSDLURL); } else { $this->debug('Create wsdl from ' . $wsdl); $this->wsdl = new wsdl($wsdl); $this->externalWSDLURL = $wsdl; } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); if($err = $this->wsdl->getError()){ die('WSDL ERROR: '.$err); } } } /** * processes request and returns response * * @param string $data usually is the value of $HTTP_RAW_POST_DATA * @access public */ function service($data){ global $HTTP_SERVER_VARS; if (isset($_SERVER['QUERY_STRING'])) { $qs = $_SERVER['QUERY_STRING']; } elseif (isset($HTTP_SERVER_VARS['QUERY_STRING'])) { $qs = $HTTP_SERVER_VARS['QUERY_STRING']; } else { $qs = ''; } $this->debug("In service, query string=$qs"); if (ereg('wsdl', $qs) ){ $this->debug("In service, this is a request for WSDL"); if($this->externalWSDLURL){ if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL header('Location: '.$this->externalWSDLURL); } else { // assume file header("Content-Type: text/xml\r\n"); $fp = fopen($this->externalWSDLURL, 'r'); fpassthru($fp); } } elseif ($this->wsdl) { header("Content-Type: text/xml; charset=ISO-8859-1\r\n"); print $this->wsdl->serialize($this->debug_flag); if ($this->debug_flag) { $this->debug('wsdl:'); $this->appendDebug($this->varDump($this->wsdl)); print $this->getDebugAsXMLComment(); } } else { header("Content-Type: text/html; charset=ISO-8859-1\r\n"); print "This service does not provide WSDL"; } } elseif ($data == '' && $this->wsdl) { $this->debug("In service, there is no data, so return Web description"); print $this->wsdl->webDescription(); } else { $this->debug("In service, invoke the request"); $this->parse_request($data); if (! $this->fault) { $this->invoke_method(); } if (! $this->fault) { $this->serialize_return(); } $this->send_response(); } } /** * parses HTTP request headers. * * The following fields are set by this function (when successful) * * headers * request * xml_encoding * SOAPAction * * @access private */ function parse_http_headers() { global $HTTP_SERVER_VARS; $this->request = ''; $this->SOAPAction = ''; if(function_exists('getallheaders')){ $this->debug("In parse_http_headers, use getallheaders"); $headers = getallheaders(); foreach($headers as $k=>$v){ $k = strtolower($k); $this->headers[$k] = $v; $this->request .= "$k: $v\r\n"; $this->debug("$k: $v"); } // get SOAPAction header if(isset($this->headers['soapaction'])){ $this->SOAPAction = str_replace('"','',$this->headers['soapaction']); } // get the character encoding of the incoming request if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } } elseif(isset($_SERVER) && is_array($_SERVER)){ $this->debug("In parse_http_headers, use _SERVER"); foreach ($_SERVER as $k => $v) { if (substr($k, 0, 5) == 'HTTP_') { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); } else { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); } if ($k == 'soapaction') { // get SOAPAction header $k = 'SOAPAction'; $v = str_replace('"', '', $v); $v = str_replace('\\', '', $v); $this->SOAPAction = $v; } else if ($k == 'content-type') { // get the character encoding of the incoming request if (strpos($v, '=')) { $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } } $this->headers[$k] = $v; $this->request .= "$k: $v\r\n"; $this->debug("$k: $v"); } } elseif (is_array($HTTP_SERVER_VARS)) { $this->debug("In parse_http_headers, use HTTP_SERVER_VARS"); foreach ($HTTP_SERVER_VARS as $k => $v) { if (substr($k, 0, 5) == 'HTTP_') { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', substr($k, 5)))); $k = strtolower(substr($k, 5)); } else { $k = str_replace(' ', '-', strtolower(str_replace('_', ' ', $k))); $k = strtolower($k); } if ($k == 'soapaction') { // get SOAPAction header $k = 'SOAPAction'; $v = str_replace('"', '', $v); $v = str_replace('\\', '', $v); $this->SOAPAction = $v; } else if ($k == 'content-type') { // get the character encoding of the incoming request if (strpos($v, '=')) { $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } } $this->headers[$k] = $v; $this->request .= "$k: $v\r\n"; $this->debug("$k: $v"); } } else { $this->debug("In parse_http_headers, HTTP headers not accessible"); $this->setError("HTTP headers not accessible"); } } /** * parses a request * * The following fields are set by this function (when successful) * * headers * request * xml_encoding * SOAPAction * request * requestSOAP * methodURI * methodname * methodparams * requestHeaders * document * * This sets the fault field on error * * @param string $data XML string * @access private */ function parse_request($data='') { $this->debug('entering parse_request()'); $this->parse_http_headers(); $this->debug('got character encoding: '.$this->xml_encoding); // uncompress if necessary if (isset($this->headers['content-encoding']) && $this->headers['content-encoding'] != '') { $this->debug('got content encoding: ' . $this->headers['content-encoding']); if ($this->headers['content-encoding'] == 'deflate' || $this->headers['content-encoding'] == 'gzip') { // if decoding works, use it. else assume data wasn't gzencoded if (function_exists('gzuncompress')) { if ($this->headers['content-encoding'] == 'deflate' && $degzdata = @gzuncompress($data)) { $data = $degzdata; } elseif ($this->headers['content-encoding'] == 'gzip' && $degzdata = gzinflate(substr($data, 10))) { $data = $degzdata; } else { $this->fault('Client', 'Errors occurred when trying to decode the data'); return; } } else { $this->fault('Client', 'This Server does not support compressed data'); return; } } } $this->request .= "\r\n".$data; $data = $this->parseRequest($this->headers, $data); $this->requestSOAP = $data; $this->debug('leaving parse_request'); } /** * invokes a PHP function for the requested SOAP method * * The following fields are set by this function (when successful) * * methodreturn * * Note that the PHP function that is called may also set the following * fields to affect the response sent to the client * * responseHeaders * outgoing_headers * * This sets the fault field on error * * @access private */ function invoke_method() { $this->debug('in invoke_method, methodname=' . $this->methodname . ' methodURI=' . $this->methodURI . ' SOAPAction=' . $this->SOAPAction); if ($this->wsdl) { if ($this->opData = $this->wsdl->getOperationData($this->methodname)) { $this->debug('in invoke_method, found WSDL operation=' . $this->methodname); $this->appendDebug('opData=' . $this->varDump($this->opData)); } elseif ($this->opData = $this->wsdl->getOperationDataForSoapAction($this->SOAPAction)) { // Note: hopefully this case will only be used for doc/lit, since rpc services should have wrapper element $this->debug('in invoke_method, found WSDL soapAction=' . $this->SOAPAction . ' for operation=' . $this->opData['name']); $this->appendDebug('opData=' . $this->varDump($this->opData)); $this->methodname = $this->opData['name']; } else { $this->debug('in invoke_method, no WSDL for operation=' . $this->methodname); $this->fault('Client', "Operation '" . $this->methodname . "' is not defined in the WSDL for this service"); return; } } else { $this->debug('in invoke_method, no WSDL to validate method'); } // if a . is present in $this->methodname, we see if there is a class in scope, // which could be referred to. We will also distinguish between two deliminators, // to allow methods to be called a the class or an instance $class = ''; $method = ''; if (strpos($this->methodname, '..') > 0) { $delim = '..'; } else if (strpos($this->methodname, '.') > 0) { $delim = '.'; } else { $delim = ''; } if (strlen($delim) > 0 && substr_count($this->methodname, $delim) == 1 && class_exists(substr($this->methodname, 0, strpos($this->methodname, $delim)))) { // get the class and method name $class = substr($this->methodname, 0, strpos($this->methodname, $delim)); $method = substr($this->methodname, strpos($this->methodname, $delim) + strlen($delim)); $this->debug("in invoke_method, class=$class method=$method delim=$delim"); } // does method exist? if ($class == '') { if (!function_exists($this->methodname)) { $this->debug("in invoke_method, function '$this->methodname' not found!"); $this->result = 'fault: method not found'; $this->fault('Client',"method '$this->methodname' not defined in service"); return; } } else { $method_to_compare = (substr(phpversion(), 0, 2) == '4.') ? strtolower($method) : $method; if (!in_array($method_to_compare, get_class_methods($class))) { $this->debug("in invoke_method, method '$this->methodname' not found in class '$class'!"); $this->result = 'fault: method not found'; $this->fault('Client',"method '$this->methodname' not defined in service"); return; } } // evaluate message, getting back parameters // verify that request parameters match the method's signature if(! $this->verify_method($this->methodname,$this->methodparams)){ // debug $this->debug('ERROR: request not verified against method signature'); $this->result = 'fault: request failed validation against method signature'; // return fault $this->fault('Client',"Operation '$this->methodname' not defined in service."); return; } // if there are parameters to pass $this->debug('in invoke_method, params:'); $this->appendDebug($this->varDump($this->methodparams)); $this->debug("in invoke_method, calling '$this->methodname'"); if (!function_exists('call_user_func_array')) { if ($class == '') { $this->debug('in invoke_method, calling function using eval()'); $funcCall = "\$this->methodreturn = $this->methodname("; } else { if ($delim == '..') { $this->debug('in invoke_method, calling class method using eval()'); $funcCall = "\$this->methodreturn = ".$class."::".$method."("; } else { $this->debug('in invoke_method, calling instance method using eval()'); // generate unique instance name $instname = "\$inst_".time(); $funcCall = $instname." = new ".$class."(); "; $funcCall .= "\$this->methodreturn = ".$instname."->".$method."("; } } if ($this->methodparams) { foreach ($this->methodparams as $param) { if (is_array($param)) { $this->fault('Client', 'NuSOAP does not handle complexType parameters correctly when using eval; call_user_func_array must be available'); return; } $funcCall .= "\"$param\","; } $funcCall = substr($funcCall, 0, -1); } $funcCall .= ');'; $this->debug('in invoke_method, function call: '.$funcCall); @eval($funcCall); } else { if ($class == '') { $this->debug('in invoke_method, calling function using call_user_func_array()'); $call_arg = "$this->methodname"; // straight assignment changes $this->methodname to lower case after call_user_func_array() } elseif ($delim == '..') { $this->debug('in invoke_method, calling class method using call_user_func_array()'); $call_arg = array ($class, $method); } else { $this->debug('in invoke_method, calling instance method using call_user_func_array()'); $instance = new $class (); $call_arg = array(&$instance, $method); } $this->methodreturn = call_user_func_array($call_arg, $this->methodparams); } $this->debug('in invoke_method, methodreturn:'); $this->appendDebug($this->varDump($this->methodreturn)); $this->debug("in invoke_method, called method $this->methodname, received $this->methodreturn of type ".gettype($this->methodreturn)); } /** * serializes the return value from a PHP function into a full SOAP Envelope * * The following fields are set by this function (when successful) * * responseSOAP * * This sets the fault field on error * * @access private */ function serialize_return() { $this->debug('Entering serialize_return methodname: ' . $this->methodname . ' methodURI: ' . $this->methodURI); // if fault if (isset($this->methodreturn) && (get_class($this->methodreturn) == 'soap_fault')) { $this->debug('got a fault object from method'); $this->fault = $this->methodreturn; return; } elseif ($this->methodreturnisliteralxml) { $return_val = $this->methodreturn; // returned value(s) } else { $this->debug('got a(n) '.gettype($this->methodreturn).' from method'); $this->debug('serializing return value'); if($this->wsdl){ // weak attempt at supporting multiple output params if(sizeof($this->opData['output']['parts']) > 1){ $opParams = $this->methodreturn; } else { // TODO: is this really necessary? $opParams = array($this->methodreturn); } $return_val = $this->wsdl->serializeRPCParameters($this->methodname,'output',$opParams); $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); if($errstr = $this->wsdl->getError()){ $this->debug('got wsdl error: '.$errstr); $this->fault('Server', 'unable to serialize result'); return; } } else { if (isset($this->methodreturn)) { $return_val = $this->serialize_val($this->methodreturn, 'return'); } else { $return_val = ''; $this->debug('in absence of WSDL, assume void return for backward compatibility'); } } } $this->debug('return value:'); $this->appendDebug($this->varDump($return_val)); $this->debug('serializing response'); if ($this->wsdl) { $this->debug('have WSDL for serialization: style is ' . $this->opData['style']); if ($this->opData['style'] == 'rpc') { $this->debug('style is rpc for serialization: use is ' . $this->opData['output']['use']); if ($this->opData['output']['use'] == 'literal') { $payload = '<'.$this->methodname.'Response xmlns="'.$this->methodURI.'">'.$return_val.'</'.$this->methodname."Response>"; } else { $payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>"; } } else { $this->debug('style is not rpc for serialization: assume document'); $payload = $return_val; } } else { $this->debug('do not have WSDL for serialization: assume rpc/encoded'); $payload = '<ns1:'.$this->methodname.'Response xmlns:ns1="'.$this->methodURI.'">'.$return_val.'</ns1:'.$this->methodname."Response>"; } $this->result = 'successful'; if($this->wsdl){ //if($this->debug_flag){ $this->appendDebug($this->wsdl->getDebug()); // } if (isset($opData['output']['encodingStyle'])) { $encodingStyle = $opData['output']['encodingStyle']; } else { $encodingStyle = ''; } // Added: In case we use a WSDL, return a serialized env. WITH the usedNamespaces. $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders,$this->wsdl->usedNamespaces,$this->opData['style'],$encodingStyle); } else { $this->responseSOAP = $this->serializeEnvelope($payload,$this->responseHeaders); } $this->debug("Leaving serialize_return"); } /** * sends an HTTP response * * The following fields are set by this function (when successful) * * outgoing_headers * response * * @access private */ function send_response() { $this->debug('Enter send_response'); if ($this->fault) { $payload = $this->fault->serialize(); $this->outgoing_headers[] = "HTTP/1.0 500 Internal Server Error"; $this->outgoing_headers[] = "Status: 500 Internal Server Error"; } else { $payload = $this->responseSOAP; // Some combinations of PHP+Web server allow the Status // to come through as a header. Since OK is the default // just do nothing. // $this->outgoing_headers[] = "HTTP/1.0 200 OK"; // $this->outgoing_headers[] = "Status: 200 OK"; } // add debug data if in debug mode if(isset($this->debug_flag) && $this->debug_flag){ $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; $payload = $this->getHTTPBody($payload); $type = $this->getHTTPContentType(); $charset = $this->getHTTPContentTypeCharset(); $this->outgoing_headers[] = "Content-Type: $type" . ($charset ? '; charset=' . $charset : ''); //begin code to compress payload - by John // NOTE: there is no way to know whether the Web server will also compress // this data. if (strlen($payload) > 1024 && isset($this->headers) && isset($this->headers['accept-encoding'])) { if (strstr($this->headers['accept-encoding'], 'gzip')) { if (function_exists('gzencode')) { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content being gzipped -->"; } $this->outgoing_headers[] = "Content-Encoding: gzip"; $payload = gzencode($payload); } else { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content will not be gzipped: no gzencode -->"; } } } elseif (strstr($this->headers['accept-encoding'], 'deflate')) { // Note: MSIE requires gzdeflate output (no Zlib header and checksum), // instead of gzcompress output, // which conflicts with HTTP 1.1 spec (http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.5) if (function_exists('gzdeflate')) { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content being deflated -->"; } $this->outgoing_headers[] = "Content-Encoding: deflate"; $payload = gzdeflate($payload); } else { if (isset($this->debug_flag) && $this->debug_flag) { $payload .= "<!-- Content will not be deflated: no gzcompress -->"; } } } } //end code $this->outgoing_headers[] = "Content-Length: ".strlen($payload); reset($this->outgoing_headers); foreach($this->outgoing_headers as $hdr){ header($hdr, false); } print $payload; $this->response = join("\r\n",$this->outgoing_headers)."\r\n\r\n".$payload; } /** * takes the value that was created by parsing the request * and compares to the method's signature, if available. * * @param string $operation The operation to be invoked * @param array $request The array of parameter values * @return boolean Whether the operation was found * @access private */ function verify_method($operation,$request){ if(isset($this->wsdl) && is_object($this->wsdl)){ if($this->wsdl->getOperationData($operation)){ return true; } } elseif(isset($this->operations[$operation])){ return true; } return false; } /** * processes SOAP message received from client * * @param array $headers The HTTP headers * @param string $data unprocessed request data from client * @return mixed value of the message, decoded into a PHP type * @access private */ function parseRequest($headers, $data) { $this->debug('Entering parseRequest() for data of length ' . strlen($data) . ' and type ' . $headers['content-type']); if (!strstr($headers['content-type'], 'text/xml')) { $this->setError('Request not of type text/xml'); return false; } if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; } } else { // should be US-ASCII for HTTP 1.0 or ISO-8859-1 for HTTP 1.1 $this->xml_encoding = 'ISO-8859-1'; } $this->debug('Use encoding: ' . $this->xml_encoding . ' when creating soap_parser'); // parse response, get soap parser obj $parser = new soap_parser($data,$this->xml_encoding,'',$this->decode_utf8); // parser debug $this->debug("parser debug: \n".$parser->getDebug()); // if fault occurred during message parsing if($err = $parser->getError()){ $this->result = 'fault: error in msg parsing: '.$err; $this->fault('Client',"error in msg parsing:\n".$err); // else successfully parsed request into soapval object } else { // get/set methodname $this->methodURI = $parser->root_struct_namespace; $this->methodname = $parser->root_struct_name; $this->debug('methodname: '.$this->methodname.' methodURI: '.$this->methodURI); $this->debug('calling parser->get_response()'); $this->methodparams = $parser->get_response(); // get SOAP headers $this->requestHeaders = $parser->getHeaders(); // add document for doclit support $this->document = $parser->document; } } /** * gets the HTTP body for the current response. * * @param string $soapmsg The SOAP payload * @return string The HTTP body, which includes the SOAP payload * @access private */ function getHTTPBody($soapmsg) { return $soapmsg; } /** * gets the HTTP content type for the current response. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type for the current response. * @access private */ function getHTTPContentType() { return 'text/xml'; } /** * gets the HTTP content type charset for the current response. * returns false for non-text content types. * * Note: getHTTPBody must be called before this. * * @return string the HTTP content type charset for the current response. * @access private */ function getHTTPContentTypeCharset() { return $this->soap_defencoding; } /** * add a method to the dispatch map (this has been replaced by the register method) * * @param string $methodname * @param string $in array of input values * @param string $out array of output values * @access public * @deprecated */ function add_to_map($methodname,$in,$out){ $this->operations[$methodname] = array('name' => $methodname,'in' => $in,'out' => $out); } /** * register a service function with the server * * @param string $name the name of the PHP function, class.method or class..method * @param array $in assoc array of input values: key = param name, value = param type * @param array $out assoc array of output values: key = param name, value = param type * @param mixed $namespace the element namespace for the method or false * @param mixed $soapaction the soapaction for the method or false * @param mixed $style optional (rpc|document) or false Note: when 'document' is specified, parameter and return wrappers are created for you automatically * @param mixed $use optional (encoded|literal) or false * @param string $documentation optional Description to include in WSDL * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) * @access public */ function register($name,$in=array(),$out=array(),$namespace=false,$soapaction=false,$style=false,$use=false,$documentation='',$encodingStyle=''){ global $HTTP_SERVER_VARS; if($this->externalWSDLURL){ die('You cannot bind to an external WSDL file, and register methods outside of it! Please choose either WSDL or no WSDL.'); } if (! $name) { die('You must specify a name when you register an operation'); } if (!is_array($in)) { die('You must provide an array for operation inputs'); } if (!is_array($out)) { die('You must provide an array for operation outputs'); } if(false == $namespace) { } if(false == $soapaction) { if (isset($_SERVER)) { $SERVER_NAME = $_SERVER['SERVER_NAME']; $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; } elseif (isset($HTTP_SERVER_VARS)) { $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; } else { $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); } $soapaction = "http://$SERVER_NAME$SCRIPT_NAME/$name"; } if(false == $style) { $style = "rpc"; } if(false == $use) { $use = "encoded"; } if ($use == 'encoded' && $encodingStyle = '') { $encodingStyle = 'http://schemas.xmlsoap.org/soap/encoding/'; } $this->operations[$name] = array( 'name' => $name, 'in' => $in, 'out' => $out, 'namespace' => $namespace, 'soapaction' => $soapaction, 'style' => $style); if($this->wsdl){ $this->wsdl->addOperation($name,$in,$out,$namespace,$soapaction,$style,$use,$documentation,$encodingStyle); } return true; } /** * Specify a fault to be returned to the client. * This also acts as a flag to the server that a fault has occured. * * @param string $faultcode * @param string $faultstring * @param string $faultactor * @param string $faultdetail * @access public */ function fault($faultcode,$faultstring,$faultactor='',$faultdetail=''){ if ($faultdetail == '' && $this->debug_flag) { $faultdetail = $this->getDebug(); } $this->fault = new soap_fault($faultcode,$faultactor,$faultstring,$faultdetail); $this->fault->soap_defencoding = $this->soap_defencoding; } /** * Sets up wsdl object. * Acts as a flag to enable internal WSDL generation * * @param string $serviceName, name of the service * @param mixed $namespace optional 'tns' service namespace or false * @param mixed $endpoint optional URL of service endpoint or false * @param string $style optional (rpc|document) WSDL style (also specified by operation) * @param string $transport optional SOAP transport * @param mixed $schemaTargetNamespace optional 'types' targetNamespace for service schema or false */ function configureWSDL($serviceName,$namespace = false,$endpoint = false,$style='rpc', $transport = 'http://schemas.xmlsoap.org/soap/http', $schemaTargetNamespace = false) { global $HTTP_SERVER_VARS; if (isset($_SERVER)) { $SERVER_NAME = $_SERVER['SERVER_NAME']; $SERVER_PORT = $_SERVER['SERVER_PORT']; $SCRIPT_NAME = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']; $HTTPS = $_SERVER['HTTPS']; } elseif (isset($HTTP_SERVER_VARS)) { $SERVER_NAME = $HTTP_SERVER_VARS['SERVER_NAME']; $SERVER_PORT = $HTTP_SERVER_VARS['SERVER_PORT']; $SCRIPT_NAME = isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']; $HTTPS = $HTTP_SERVER_VARS['HTTPS']; } else { $this->setError("Neither _SERVER nor HTTP_SERVER_VARS is available"); } if ($SERVER_PORT == 80) { $SERVER_PORT = ''; } else { $SERVER_PORT = ':' . $SERVER_PORT; } if(false == $namespace) { $namespace = "http://$SERVER_NAME/soap/$serviceName"; } if(false == $endpoint) { if ($HTTPS == '1' || $HTTPS == 'on') { $SCHEME = 'https'; } else { $SCHEME = 'http'; } $endpoint = "$SCHEME://$SERVER_NAME$SERVER_PORT$SCRIPT_NAME"; } if(false == $schemaTargetNamespace) { $schemaTargetNamespace = $namespace; } $this->wsdl = new wsdl; $this->wsdl->serviceName = $serviceName; $this->wsdl->endpoint = $endpoint; $this->wsdl->namespaces['tns'] = $namespace; $this->wsdl->namespaces['soap'] = 'http://schemas.xmlsoap.org/wsdl/soap/'; $this->wsdl->namespaces['wsdl'] = 'http://schemas.xmlsoap.org/wsdl/'; if ($schemaTargetNamespace != $namespace) { $this->wsdl->namespaces['types'] = $schemaTargetNamespace; } $this->wsdl->schemas[$schemaTargetNamespace][0] = new xmlschema('', '', $this->wsdl->namespaces); $this->wsdl->schemas[$schemaTargetNamespace][0]->schemaTargetNamespace = $schemaTargetNamespace; $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/soap/encoding/'][0] = array('location' => '', 'loaded' => true); $this->wsdl->schemas[$schemaTargetNamespace][0]->imports['http://schemas.xmlsoap.org/wsdl/'][0] = array('location' => '', 'loaded' => true); $this->wsdl->bindings[$serviceName.'Binding'] = array( 'name'=>$serviceName.'Binding', 'style'=>$style, 'transport'=>$transport, 'portType'=>$serviceName.'PortType'); $this->wsdl->ports[$serviceName.'Port'] = array( 'binding'=>$serviceName.'Binding', 'location'=>$endpoint, 'bindingType'=>'http://schemas.xmlsoap.org/wsdl/soap/'); } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.soap_server.php
PHP
asf20
36,568
<?php /** * For creating serializable abstractions of native PHP types. This class * allows element name/namespace, XSD type, and XML attributes to be * associated with a value. This is extremely useful when WSDL is not * used, but is also useful when WSDL is used with polymorphic types, including * xsd:anyType and user-defined types. * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.soap_val.php,v 1.9 2005/07/27 19:24:42 snichol Exp $ * @access public */ class soapval extends nusoap_base { /** * The XML element name * * @var string * @access private */ var $name; /** * The XML type name (string or false) * * @var mixed * @access private */ var $type; /** * The PHP value * * @var mixed * @access private */ var $value; /** * The XML element namespace (string or false) * * @var mixed * @access private */ var $element_ns; /** * The XML type namespace (string or false) * * @var mixed * @access private */ var $type_ns; /** * The XML element attributes (array or false) * * @var mixed * @access private */ var $attributes; /** * constructor * * @param string $name optional name * @param mixed $type optional type name * @param mixed $value optional value * @param mixed $element_ns optional namespace of value * @param mixed $type_ns optional namespace of type * @param mixed $attributes associative array of attributes to add to element serialization * @access public */ function soapval($name='soapval',$type=false,$value=-1,$element_ns=false,$type_ns=false,$attributes=false) { parent::nusoap_base(); $this->name = $name; $this->type = $type; $this->value = $value; $this->element_ns = $element_ns; $this->type_ns = $type_ns; $this->attributes = $attributes; } /** * return serialized value * * @param string $use The WSDL use value (encoded|literal) * @return string XML data * @access public */ function serialize($use='encoded') { return $this->serialize_val($this->value,$this->name,$this->type,$this->element_ns,$this->type_ns,$this->attributes,$use); } /** * decodes a soapval object into a PHP native type * * @return mixed * @access public */ function decode(){ return $this->value; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.soap_val.php
PHP
asf20
2,393
<?php class CreateXML { /** * 编码 * @access private * @var array1 */ //var $encoding; /** * @access private * @var array1 */ var $_tree; var $encoding="GBK"; /** * Constructor */ function CBCreateXML($encoding = 'GBK') { $this->encoding = $encoding; $this->_tree = array(); } /** * 建立根节点 */ function createRoot($sname, $sversion) { $tree = array(); $tree['tag'] = 'cb-xdoc'; $tree['attrs'] = array( 'sname' => $sname, 'sversion' => $sversion ); /* $tree['att.sname'] = $sname; $tree['att.sversion'] = $sversion; */ $this->_tree = $tree; } /** * 建立普通节点 */ function addNode($name, $type, $val) { $node = array(); $node['tag'] = 'node'; $node['attrs'] = array( 'name' => $name, 'type' => $type ); switch ($type) { case 'list': case 'map': $node['node'] = array(); foreach($val as $k=>$v) { $node['node'][] = $this->_recursionGetNode($k, $v); } break; default: $node['val'] = $val; } /* $node['att.name'] = $name; $node['att.type'] = $type; if ($type = 'money') { $node['att.currency'] = 'CNY'; } $node['val'] = $val; */ $this->_tree['node'][] = $node; } function _recursionGetNode($name, $val) { $node = array(); $node['tag'] = 'node'; $node['attrs'] = array('name' => $name); $type = gettype($val); switch ($type) { case "array": $node['attrs']['type'] = 'map'; foreach($val as $k=>$v) { $node['node'][] = $this->_recursionGetNode($k, $v); } break; case "integer": $node['attrs']['type'] = 'int'; $node['val'] = $val; break; default: $node['attrs']['type'] = 'string'; $node['val'] = $val; } return $node; } function getTree() { return $this->_tree; } function getString() { $tree = $this->_tree; $strxml = "<?xml version=\"1.0\" encoding=\"{$this->encoding}\"?>\n"; $strxml .= "<{$tree['tag']} sname=\"{$tree['attrs']['sname']}\" sversion=\"{$tree['attrs']['sversion']}\">\n"; foreach ($tree['node'] as $node) { $strxml .= $this->_2str($node); } $strxml .= "</{$tree['tag']}>\n"; return $strxml; } function _2str($node, $sp=" ") { $tag = $node['tag']; $name = $node['attrs']['name']; $type = $node['attrs']['type']; $val = $node['val']; // 开始 <node> if ($type == 'money') { $str = "$sp<$tag name=\"$name\" type=\"$type\" currency=\"{$node['att.currency']}\">\n"; } else { $str = "$sp<$tag name=\"$name\" type=\"$type\">\n"; } /** if ($type == 'string') { $str .= '<![CDATA[' . $val . ']]>'; } else { $str .= $val; }*/ // 值 switch($type) { case 'NULL': return ''; case 'string': $str .= "$sp <![CDATA[$val]]>\n"; break; case 'list': case 'map': if (array_key_exists('node', $node)) { foreach ($node['node'] as $n) { $str .= $this->_2str($n, $sp." "); } } break; default: $str .= "$sp $val\n"; } // 关闭 </node> $str .= "$sp</$tag>\n"; return $str; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/chinabank.CreateXML.php
PHP
asf20
3,788
<?php /** * 网银在线 MOTO客户端接口 * 版本: 2.5(php) * 开发者:ch.tommy@gmail.com */ require_once('nusoap.php'); require_once('chinabank.CreateXML.php'); require_once('chinabank.XmlParser.php'); class MOTOConstant { // 固定参数 var $encoding ="GBK"; //编码格式 var $soap_method= 'invoke02'; //方法名称 var $version = '2.5(PHP)'; //版本 var $type = 'md5'; //加密类型 // 可配参数 var $soap_url = 'http://motopay5.chinabank.com.cn/webservice/motoPHP';// 服务路径 var $merchantid = '30000650'; //商户号 var $terminalid = '00000001'; //终端号 var $md5key = 'dreams-travelmzl'; //传输密钥 /** * 以下是常量定义 */ // 错误代码 var $MOTO_RET_SUCCESS = "0"; // 交易成功 var $MOTO_RET_SUCCESS_ING = "1"; // 交易处理中 var $MOTO_RET_FAILURE = "E12041000"; // 交易失败 var $MOTO_RET_ERROR = "E12041001"; // 内部错误 var $MOTO_RET_NET = "E12041002"; // 通讯错误 var $MOTO_RET_DB = "E12041003"; // 数据库错误 var $MOTO_RET_AUTH = "E12041004"; // 安全验证失败 var $MOTO_RET_OID = "E12041005"; // 交易号格式错误 var $MOTO_RET_CARD = "E12041006"; // 信用卡格式错误 var $MOTO_RET_CARDEXP = "E12041007"; // 信用卡有效期格式错误 var $MOTO_RET_AMOUNT = "E12041008"; // 交易金额格式错误 var $MOTO_RET_NAME = "E12041009"; // 持卡人姓名格式错误 var $MOTO_RET_IDCARD = "E12041010"; // 持卡人证件格式错误 var $MOTO_RET_MOBILE = "E12041011"; // 持卡人电话格式错误 var $MOTO_RET_NOTE = "E12041012"; // 备注格式错误 var $MOTO_RET_MERCHANT = "E12041013"; // 商户号错误 var $MOTO_RET_TERMINAL = "E12041014"; // 终端号错误 var $MOTO_RET_MERCHANTEX = "E12041015"; // 商户信息不完整 var $MOTO_RET_PURVIEW_XF = "E12041016"; // 终端没有消费权限 var $MOTO_RET_PURVIEW_XFCX = "E12041017"; // 终端没有撤销消费权限 var $MOTO_RET_PURVIEW_SQ = "E12041018"; // 终端没有预授权权限 var $MOTO_RET_PURVIEW_SQCX = "E12041019"; // 终端没有撤销预授权权限 var $MOTO_RET_PURVIEW_QR = "E12041020"; // 终端没有预授权确认权限 var $MOTO_RET_PURVIEW_QRCX = "E12041021"; // 终端没有撤销预授权确认权限 var $MOTO_RET_PURVIEW_TK = "E12041022"; // 终端没有退款权限 var $MOTO_RET_SING_LIMIT = "E12041023"; // 超出单笔交易限额 var $MOTO_RET_MOTO_CARD = "E12041024"; // MOTO不支持此信用卡 var $MOTO_RET_MERCHANT_CARD = "E12041025"; // 商户不支持此信用卡 var $MOTO_RET_DAY_NUM = "E12041026"; // 信用卡日交易次数限制 var $MOTO_RET_DAY_DATE = "E12041027"; // 信用卡日交易有效期错误次数限制 var $MOTO_RET_DAY_AMOUNT = "E12041028"; // 信用卡日交易金额上限错误次数限制 var $MOTO_RET_DAY_LIMIT = "E12041029"; // 超出日交易限额 var $MOTO_RET_ORDERID = "E12041030"; // 商户交易号重复 var $MOTO_RET_OORDER = "E12041031"; // 原交易不存在 var $MOTO_RET_OCARD = "E12041032"; // 信用卡原交易不符 var $MOTO_RET_OAMOUNT = "E12041033"; // 金额原交易不符 var $MOTO_RET_OSTATE = "E12041034"; // 原交易不允许此操作 var $MOTO_RET_OOORDER = "E12041035"; // 原原交易不存在 var $MOTO_RET_FLOAT = "E12041036"; // 超出预授权金额浮动范围 var $MOTO_RET_REFUND = "E12041037"; // 退款金额不正确 var $MOTO_RET_ORDER = "E12041038"; // 查询无此交易 var $MOTO_RET_PURVIEW = "E12041039"; // 无此交易查询权限 var $MOTO_RET_XML = "E12041040"; // 消费成功 / 状态失败 var $MOTO_RET_TERMINAL_TYPE = "E12041041"; // 终端接入方式错误 var $MOTO_RET_BANK = "E12041042"; // 此卡不允许做此交易 var $MOTO_RET_MAIL = "E12041043"; // 持卡人邮件格式不正确 var $MOTO_RET_VERSION = "E12041044"; // 客户端版本号不正确 var $MOTO_RET_CVV2 = "E12041045"; // CVV2不允许为空 或者cvv2错 var $MOTO_RET_WS_IP = "E12041046"; // IP校检失败 var $MOTO_RET_BLACKCARD = "E12041047"; // 此卡为风险卡 var $MOTO_CLIENT_AUTH = "E12042004"; // php客户端安全验证错误 // 关键字 var $MOTO_KEY_ENCODE = "encode"; // 密文 var $MOTO_KEY_SIGN = "sign"; // 签名 var $MOTO_KEY_CLIENT = "client"; // 客户端 var $MOTO_KEY_TYPE = "type"; // 交易类型 var $MOTO_KEY_OID = "oid"; // 交易号 var $MOTO_KEY_OOID = "ooid"; // 原交易号 var $MOTO_KEY_CARD = "card"; // 信用卡号 var $MOTO_KEY_CARDEXP = "cardexp"; // 信用卡有效期 var $MOTO_KEY_AMOUNT = "amount"; // 金额 var $MOTO_KEY_EXTEND = "extend"; // 附加参数 var $MOTO_KEY_TIME = "time"; // 远程时间 var $MOTO_KEY_MERCHANT = "merchant"; // 商户号 var $MOTO_KEY_TERMINAL = "terminal"; // 终端号 var $MOTO_KEY_AUTHID = "authid"; // 银行授权号 var $MOTO_KEY_BANKNAME = "bankname"; // 银行名称 var $MOTO_KEY_CARDNAME = "cardname"; // 信用卡名称 var $MOTO_KEY_ERROR = "error"; // 错误信息 var $MOTO_KEY_ERROR_CN = "_error"; // 错误信息解释 // 附加参数关键字 var $MOTO_KEY_EXTEND_NAME = "name"; // 持卡人姓名 var $MOTO_KEY_EXTEND_IDCARD = "idcard"; // 持卡人证件号 var $MOTO_KEY_EXTEND_MOBILE = "mobile"; // 持卡人手机号 var $MOTO_KEY_EXTEND_MAIL = "mail"; // 持卡人E-Mail var $MOTO_KEY_EXTEND_NOTE = "note"; // 备注 var $MOTO_KEY_EXTEND_CVV2 = "cvv2"; // cvv2 // 查询结果 var $MOTO_SEARCH_OID = "_oid"; // 交易号 var $MOTO_SEARCH_AID = "_aid"; // 授权号 var $MOTO_SEARCH_TYPE = "_type"; // 交易类型 var $MOTO_SEARCH_TYPECODE = "_typecode"; // 交易类型码 var $MOTO_SEARCH_CARD = "_card"; // 信用卡号 var $MOTO_SEARCH_AMOUNT = "_amount"; // 交易金额 var $MOTO_SEARCH_DATE = "_date"; // 交易日期 var $MOTO_SEARCH_STATE = "_state"; // 交易状态 var $MOTO_SEARCH_STATECODE = "_statecode"; // 交易状态码 var $MOTO_SEARCH_CODE = "_code"; // 交易结果 var $MOTO_SEARCH_BANKNAME = "_bankname"; // 银行名称 var $MOTO_SEARCH_CARDNAME = "_cardname"; // 信用卡名称 var $MOTO_SEARCH_SETTLE = "_settle"; // 结算标识 var $MOTO_SEARCH_RECEIVE = "_receive"; // 是否受理卡 var $MOTO_SEARCH_RECCARD = "_reccard"; // 商户受理卡 var $MOTO_SEARCH_RECCARDCB = "_reccardcb"; // 网银受理卡 // 远程调用服务名称 var $MOTO_REMOTE_CONSUME = "ConsumeService"; // 消费交易 var $MOTO_REMOTE_CONSUME_REVOKE = "ConsumeRevokeService"; // 撤销消费 var $MOTO_REMOTE_AUTHORIZE = "AuthorizeService"; // 预授权交易 var $MOTO_REMOTE_AUTHORIZE_REVOKE = "AuthorizeRevokeService"; // 撤销预授权交易 var $MOTO_REMOTE_CONFIRM = "ConfirmService"; // 确认交易 var $MOTO_REMOTE_CONFIRM_REVOKE = "ConfirmRevokeService"; // 撤销确认交易 var $MOTO_REMOTE_REFUND = "RefundService"; // 退款申请 var $MOTO_REMOTE_SEARCH = "SearchService"; // 交易查询 var $MOTO_REMOTE_REVERSE = "ReverseService"; // 冲正交易 var $MOTO_REMOTE_SEARCHCARD = "SearchCardService"; // 查询受理卡 } class MotoClient extends MOTOConstant { function CBInterface($encoding = 'GBK') { $this->encoding=$encoding ; //初始化编码格式 } /** * 函数功能:设置商户号 终端号 和 传输密钥 * 说 明:当商户使用多个MOTO商户号时可使用此函数设置每次交易的商户号和传输密钥 */ function setMerchantTerminalAndKey($merchantid, $terminalid, $md5key) { $this->merchantid = $merchantid; $this->terminalid = $terminalid; $this->md5key = $md5key; } /** * 函数功能:原创调用适配 */ function remoteInvoke($service, $parameter) { // 合成XML $xdoc = new CreateXML($this->encoding); $xdoc->createRoot($service, $this->version); foreach($parameter as $key => $val) { $xdoc->addNode($key, $val['type'], $val['value']); } // 加密 签名 $xstr = $xdoc->getString(); // echo "xstr: $xstr"; $req_sign = strtoupper(md5($xstr.$this->md5key)); $req_code = base64_encode ($xstr); // 远程调用 //生成SOAP调用是的参数 $param = array( 'service' => $service, //服务名 'merchant' => $this->merchantid, //服务名 'encoding' => $this->encoding, //编码类型 'type' => $this->type, //加密类型(采用什么方式进行加密的) 'code' => $req_code, //经过BASE64编码的明文 'sign' => $req_sign //加密后的数据 ); // print_r($param); //调用网银提供的soap方法 $soap_client = new soapclientw($this->soap_url, true); $rs = $soap_client->call($this->soap_method, $param); //echo "-----------------------------<br/>\n"; //print_a('rs', $rs); // 处理返回值 $rtcode = $rs['string'][0]; $rtmsg = base64_decode( $rs['string'][1] ); //echo "code: $rtmsg<br\>\n"; if ( strtoupper(md5($rtmsg.$this->md5key)) == $rs['string'][2] ) { echo "return sign OK! <br>\n"; // 解码 echo $rtmsg; return xml2array($rtmsg); } else { echo "Chinabank Soap SIGN ERR! <br>\n"; return array( 'sname' => $service, 'result' => $this->MOTO_CLIENT_AUTH, 'error' => $this->MOTO_CLIENT_AUTH, '_error' => 'SING ERR'); } } function consume2($orderid, $card, $cardexp, $amount, $extend) { $service = 'ConsumeService'; $today = getdate(); $parameter = array(); $parameter['oid'] = array('type' => 'string', 'value' => ($orderid==null ? '' : $orderid) ); $parameter['card'] = array('type' => 'string', 'value' => $card); $parameter['cardexp'] = array('type' => 'string', 'value' => $cardexp); $parameter['amount'] = array('type' => 'int', 'value' => $amount); $parameter['merchant'] = array('type' => 'string', 'value' => $this->merchantid); $parameter['terminal'] = array('type' => 'string', 'value' => $this->terminalid); $parameter['time'] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter['extend'] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function consume($orderid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_CONSUME; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function consumeRevoke($orderid, $oldid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_CONSUME_REVOKE; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_OOID] = array('type' => 'string', 'value' => ($oldid == null ? '' : $oldid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } // 预授权 function authorize($orderid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_AUTHORIZE; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function authorizeRevoke($orderid, $oldid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_AUTHORIZE_REVOKE; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_OOID] = array('type' => 'string', 'value' => ($oldid == null ? '' : $oldid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function authorizeCfm($orderid, $oldid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_CONFIRM; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_OOID] = array('type' => 'string', 'value' => ($oldid == null ? '' : $oldid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function authorizeCfmRevoke($orderid, $oldid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_CONFIRM_REVOKE; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_OOID] = array('type' => 'string', 'value' => ($oldid == null ? '' : $oldid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function refundment($orderid, $oldid, $card, $cardexp, $amount, $extend) { $service = $this->MOTO_REMOTE_REFUND; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => ($orderid == null ? '' : $orderid) ); $parameter[$this->MOTO_KEY_OOID] = array('type' => 'string', 'value' => ($oldid == null ? '' : $oldid) ); $parameter[$this->MOTO_KEY_CARD] = array('type' => 'string', 'value' => $card); $parameter[$this->MOTO_KEY_CARDEXP] = array('type' => 'string', 'value' => $cardexp); $parameter[$this->MOTO_KEY_AMOUNT] = array('type' => 'int', 'value' => $amount); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_TIME] = array('type' => 'date', 'value' => date('Y-m-d H:i:s', $today[0]) ); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function search($orderid) { $service = $this->MOTO_REMOTE_SEARCH; $today = getdate(); $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => $orderid); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } function reverse($orderid) { $service = $this->MOTO_REMOTE_REVERSE; $parameter = array(); $parameter[$this->MOTO_KEY_OID] = array('type' => 'string', 'value' => $orderid); $parameter[$this->MOTO_KEY_MERCHANT] = array('type' => 'string', 'value' => $this->merchantid); $parameter[$this->MOTO_KEY_TERMINAL] = array('type' => 'string', 'value' => $this->terminalid); $parameter[$this->MOTO_KEY_EXTEND] = array('type' => 'map', 'value' => ($extend==null ? array() : $extend) ); return $this->remoteInvoke($service, $parameter); } } class CBResult { var $rtcode; var $map; function CBResult($rtcode) { $this->rtcode = $rtcode; $this->map = array(); } function getRtcode() { return $this->rtcode; } function setRtcode($rtcode) { $this->rtcode = $rtcode; } function getValue($key) { return $this->map[$key]; } function setValue($key, $value) { $this->map[$key] = $value; } function setMap($map) { $this->map = $map; } function getMap() { return $this->map; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/chinabank.MotoClient.php
PHP
asf20
23,483
<?php /* $Id: class.nusoap_base.php,v 1.43 2005/08/04 01:27:42 snichol Exp $ NuSOAP - Web Services Toolkit for PHP Copyright (c) 2002 NuSphere Corporation This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA If you have any questions or comments, please email: Dietrich Ayala dietrich@ganx4.com http://dietrich.ganx4.com/nusoap NuSphere Corporation http://www.nusphere.com */ /* load classes // necessary classes require_once('class.soapclientw.php'); require_once('class.soap_val.php'); require_once('class.soap_parser.php'); require_once('class.soap_fault.php'); // transport classes require_once('class.soap_transport_http.php'); // optional add-on classes require_once('class.xmlschema.php'); require_once('class.wsdl.php'); // server class require_once('class.soap_server.php');*/ // class variable emulation // cf. http://www.webkreator.com/php/techniques/php-static-class-variables.html $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = 9; /** * * nusoap_base * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.nusoap_base.php,v 1.43 2005/08/04 01:27:42 snichol Exp $ * @access public */ class nusoap_base { /** * Identification for HTTP headers. * * @var string * @access private */ var $title = 'NuSOAP'; /** * Version for HTTP headers. * * @var string * @access private */ var $version = '0.7.2'; /** * CVS revision for HTTP headers. * * @var string * @access private */ var $revision = '$Revision: 1.43 $'; /** * Current error string (manipulated by getError/setError) * * @var string * @access private */ var $error_str = ''; /** * Current debug string (manipulated by debug/appendDebug/clearDebug/getDebug/getDebugAsXMLComment) * * @var string * @access private */ var $debug_str = ''; /** * toggles automatic encoding of special characters as entities * (should always be true, I think) * * @var boolean * @access private */ var $charencoding = true; /** * the debug level for this instance * * @var integer * @access private */ var $debugLevel; /** * set schema version * * @var string * @access public */ var $XMLSchemaVersion = 'http://www.w3.org/2001/XMLSchema'; /** * charset encoding for outgoing messages * * @var string * @access public */ var $soap_defencoding = 'ISO-8859-1'; //var $soap_defencoding = 'UTF-8'; /** * namespaces in an array of prefix => uri * * this is "seeded" by a set of constants, but it may be altered by code * * @var array * @access public */ var $namespaces = array( 'SOAP-ENV' => 'http://schemas.xmlsoap.org/soap/envelope/', 'xsd' => 'http://www.w3.org/2001/XMLSchema', 'xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/' ); /** * namespaces used in the current context, e.g. during serialization * * @var array * @access private */ var $usedNamespaces = array(); /** * XML Schema types in an array of uri => (array of xml type => php type) * is this legacy yet? * no, this is used by the xmlschema class to verify type => namespace mappings. * @var array * @access public */ var $typemap = array( 'http://www.w3.org/2001/XMLSchema' => array( 'string'=>'string','boolean'=>'boolean','float'=>'double','double'=>'double','decimal'=>'double', 'duration'=>'','dateTime'=>'string','time'=>'string','date'=>'string','gYearMonth'=>'', 'gYear'=>'','gMonthDay'=>'','gDay'=>'','gMonth'=>'','hexBinary'=>'string','base64Binary'=>'string', // abstract "any" types 'anyType'=>'string','anySimpleType'=>'string', // derived datatypes 'normalizedString'=>'string','token'=>'string','language'=>'','NMTOKEN'=>'','NMTOKENS'=>'','Name'=>'','NCName'=>'','ID'=>'', 'IDREF'=>'','IDREFS'=>'','ENTITY'=>'','ENTITIES'=>'','integer'=>'integer','nonPositiveInteger'=>'integer', 'negativeInteger'=>'integer','long'=>'integer','int'=>'integer','short'=>'integer','byte'=>'integer','nonNegativeInteger'=>'integer', 'unsignedLong'=>'','unsignedInt'=>'','unsignedShort'=>'','unsignedByte'=>'','positiveInteger'=>''), 'http://www.w3.org/2000/10/XMLSchema' => array( 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', 'float'=>'double','dateTime'=>'string', 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), 'http://www.w3.org/1999/XMLSchema' => array( 'i4'=>'','int'=>'integer','boolean'=>'boolean','string'=>'string','double'=>'double', 'float'=>'double','dateTime'=>'string', 'timeInstant'=>'string','base64Binary'=>'string','base64'=>'string','ur-type'=>'array'), 'http://soapinterop.org/xsd' => array('SOAPStruct'=>'struct'), 'http://schemas.xmlsoap.org/soap/encoding/' => array('base64'=>'string','array'=>'array','Array'=>'array'), 'http://xml.apache.org/xml-soap' => array('Map') ); /** * XML entities to convert * * @var array * @access public * @deprecated * @see expandEntities */ var $xmlEntities = array('quot' => '"','amp' => '&', 'lt' => '<','gt' => '>','apos' => "'"); /** * constructor * * @access public */ function nusoap_base() { $this->debugLevel = $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel; } /** * gets the global debug level, which applies to future instances * * @return integer Debug level 0-9, where 0 turns off * @access public */ function getGlobalDebugLevel() { return $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel; } /** * sets the global debug level, which applies to future instances * * @param int $level Debug level 0-9, where 0 turns off * @access public */ function setGlobalDebugLevel($level) { $GLOBALS['_transient']['static']['nusoap_base']->globalDebugLevel = $level; } /** * gets the debug level for this instance * * @return int Debug level 0-9, where 0 turns off * @access public */ function getDebugLevel() { return $this->debugLevel; } /** * sets the debug level for this instance * * @param int $level Debug level 0-9, where 0 turns off * @access public */ function setDebugLevel($level) { $this->debugLevel = $level; } /** * adds debug data to the instance debug string with formatting * * @param string $string debug data * @access private */ function debug($string){ if ($this->debugLevel > 0) { $this->appendDebug($this->getmicrotime().' '.get_class($this).": $string\n"); } } /** * adds debug data to the instance debug string without formatting * * @param string $string debug data * @access public */ function appendDebug($string){ if ($this->debugLevel > 0) { // it would be nice to use a memory stream here to use // memory more efficiently $this->debug_str .= $string; } } /** * clears the current debug data for this instance * * @access public */ function clearDebug() { // it would be nice to use a memory stream here to use // memory more efficiently $this->debug_str = ''; } /** * gets the current debug data for this instance * * @return debug data * @access public */ function &getDebug() { // it would be nice to use a memory stream here to use // memory more efficiently return $this->debug_str; } /** * gets the current debug data for this instance as an XML comment * this may change the contents of the debug data * * @return debug data as an XML comment * @access public */ function &getDebugAsXMLComment() { // it would be nice to use a memory stream here to use // memory more efficiently while (strpos($this->debug_str, '--')) { $this->debug_str = str_replace('--', '- -', $this->debug_str); } return "<!--\n" . $this->debug_str . "\n-->"; } /** * expands entities, e.g. changes '<' to '&lt;'. * * @param string $val The string in which to expand entities. * @access private */ function expandEntities($val) { if ($this->charencoding) { $val = str_replace('&', '&amp;', $val); $val = str_replace("'", '&apos;', $val); $val = str_replace('"', '&quot;', $val); $val = str_replace('<', '&lt;', $val); $val = str_replace('>', '&gt;', $val); } return $val; } /** * returns error string if present * * @return mixed error string or false * @access public */ function getError(){ if($this->error_str != ''){ return $this->error_str; } return false; } /** * sets error string * * @return boolean $string error string * @access private */ function setError($str){ $this->error_str = $str; } /** * detect if array is a simple array or a struct (associative array) * * @param mixed $val The PHP array * @return string (arraySimple|arrayStruct) * @access private */ function isArraySimpleOrStruct($val) { $keyList = array_keys($val); foreach ($keyList as $keyListValue) { if (!is_int($keyListValue)) { return 'arrayStruct'; } } return 'arraySimple'; } /** * serializes PHP values in accordance w/ section 5. Type information is * not serialized if $use == 'literal'. * * @param mixed $val The value to serialize * @param string $name The name (local part) of the XML element * @param string $type The XML schema type (local part) for the element * @param string $name_ns The namespace for the name of the XML element * @param string $type_ns The namespace for the type of the element * @param array $attributes The attributes to serialize as name=>value pairs * @param string $use The WSDL "use" (encoded|literal) * @return string The serialized element, possibly with child elements * @access public */ function serialize_val($val,$name=false,$type=false,$name_ns=false,$type_ns=false,$attributes=false,$use='encoded'){ $this->debug("in serialize_val: name=$name, type=$type, name_ns=$name_ns, type_ns=$type_ns, use=$use"); $this->appendDebug('value=' . $this->varDump($val)); $this->appendDebug('attributes=' . $this->varDump($attributes)); if(is_object($val) && get_class($val) == 'soapval'){ return $val->serialize($use); } // force valid name if necessary if (is_numeric($name)) { $name = '__numeric_' . $name; } elseif (! $name) { $name = 'noname'; } // if name has ns, add ns prefix to name $xmlns = ''; if($name_ns){ $prefix = 'nu'.rand(1000,9999); $name = $prefix.':'.$name; $xmlns .= " xmlns:$prefix=\"$name_ns\""; } // if type is prefixed, create type prefix if($type_ns != '' && $type_ns == $this->namespaces['xsd']){ // need to fix this. shouldn't default to xsd if no ns specified // w/o checking against typemap $type_prefix = 'xsd'; } elseif($type_ns){ $type_prefix = 'ns'.rand(1000,9999); $xmlns .= " xmlns:$type_prefix=\"$type_ns\""; } // serialize attributes if present $atts = ''; if($attributes){ foreach($attributes as $k => $v){ $atts .= " $k=\"".$this->expandEntities($v).'"'; } } // serialize null value if (is_null($val)) { if ($use == 'literal') { // TODO: depends on minOccurs return "<$name$xmlns $atts/>"; } else { if (isset($type) && isset($type_prefix)) { $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = ''; } return "<$name$xmlns$type_str $atts xsi:nil=\"true\"/>"; } } // serialize if an xsd built-in primitive type if($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])){ if (is_bool($val)) { if ($type == 'boolean') { $val = $val ? 'true' : 'false'; } elseif (! $val) { $val = 0; } } else if (is_string($val)) { $val = $this->expandEntities($val); } if ($use == 'literal') { return "<$name$xmlns $atts>$val</$name>"; } else { return "<$name$xmlns $atts xsi:type=\"xsd:$type\">$val</$name>"; } } // detect type and serialize $xml = ''; switch(true) { case (is_bool($val) || $type == 'boolean'): if ($type == 'boolean') { $val = $val ? 'true' : 'false'; } elseif (! $val) { $val = 0; } if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:boolean\"$atts>$val</$name>"; } break; case (is_int($val) || is_long($val) || $type == 'int'): if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:int\"$atts>$val</$name>"; } break; case (is_float($val)|| is_double($val) || $type == 'float'): if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:float\"$atts>$val</$name>"; } break; case (is_string($val) || $type == 'string'): $val = $this->expandEntities($val); if ($use == 'literal') { $xml .= "<$name$xmlns $atts>$val</$name>"; } else { $xml .= "<$name$xmlns xsi:type=\"xsd:string\"$atts>$val</$name>"; } break; case is_object($val): if (! $name) { $name = get_class($val); $this->debug("In serialize_val, used class name $name as element name"); } else { $this->debug("In serialize_val, do not override name $name for element name for class " . get_class($val)); } foreach(get_object_vars($val) as $k => $v){ $pXml = isset($pXml) ? $pXml.$this->serialize_val($v,$k,false,false,false,false,$use) : $this->serialize_val($v,$k,false,false,false,false,$use); } $xml .= '<'.$name.'>'.$pXml.'</'.$name.'>'; break; break; case (is_array($val) || $type): // detect if struct or array $valueType = $this->isArraySimpleOrStruct($val); if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){ $i = 0; if(is_array($val) && count($val)> 0){ foreach($val as $v){ if(is_object($v) && get_class($v) == 'soapval'){ $tt_ns = $v->type_ns; $tt = $v->type; } elseif (is_array($v)) { $tt = $this->isArraySimpleOrStruct($v); } else { $tt = gettype($v); } $array_types[$tt] = 1; // TODO: for literal, the name should be $name $xml .= $this->serialize_val($v,'item',false,false,false,false,$use); ++$i; } if(count($array_types) > 1){ $array_typename = 'xsd:anyType'; } elseif(isset($tt) && isset($this->typemap[$this->XMLSchemaVersion][$tt])) { if ($tt == 'integer') { $tt = 'int'; } $array_typename = 'xsd:'.$tt; } elseif(isset($tt) && $tt == 'arraySimple'){ $array_typename = 'SOAP-ENC:Array'; } elseif(isset($tt) && $tt == 'arrayStruct'){ $array_typename = 'unnamed_struct_use_soapval'; } else { // if type is prefixed, create type prefix if ($tt_ns != '' && $tt_ns == $this->namespaces['xsd']){ $array_typename = 'xsd:' . $tt; } elseif ($tt_ns) { $tt_prefix = 'ns' . rand(1000, 9999); $array_typename = "$tt_prefix:$tt"; $xmlns .= " xmlns:$tt_prefix=\"$tt_ns\""; } else { $array_typename = $tt; } } $array_type = $i; if ($use == 'literal') { $type_str = ''; } else if (isset($type) && isset($type_prefix)) { $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"".$array_typename."[$array_type]\""; } // empty array } else { if ($use == 'literal') { $type_str = ''; } else if (isset($type) && isset($type_prefix)) { $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = " xsi:type=\"SOAP-ENC:Array\" SOAP-ENC:arrayType=\"xsd:anyType[0]\""; } } // TODO: for array in literal, there is no wrapper here $xml = "<$name$xmlns$type_str$atts>".$xml."</$name>"; } else { // got a struct if(isset($type) && isset($type_prefix)){ $type_str = " xsi:type=\"$type_prefix:$type\""; } else { $type_str = ''; } if ($use == 'literal') { $xml .= "<$name$xmlns $atts>"; } else { $xml .= "<$name$xmlns$type_str$atts>"; } foreach($val as $k => $v){ // Apache Map if ($type == 'Map' && $type_ns == 'http://xml.apache.org/xml-soap') { $xml .= '<item>'; $xml .= $this->serialize_val($k,'key',false,false,false,false,$use); $xml .= $this->serialize_val($v,'value',false,false,false,false,$use); $xml .= '</item>'; } else { $xml .= $this->serialize_val($v,$k,false,false,false,false,$use); } } $xml .= "</$name>"; } break; default: $xml .= 'not detected, got '.gettype($val).' for '.$val; break; } return $xml; } /** * serializes a message * * @param string $body the XML of the SOAP body * @param mixed $headers optional string of XML with SOAP header content, or array of soapval objects for SOAP headers * @param array $namespaces optional the namespaces used in generating the body and headers * @param string $style optional (rpc|document) * @param string $use optional (encoded|literal) * @param string $encodingStyle optional (usually 'http://schemas.xmlsoap.org/soap/encoding/' for encoded) * @return string the message * @access public */ function serializeEnvelope($body,$headers=false,$namespaces=array(),$style='rpc',$use='encoded',$encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'){ // TODO: add an option to automatically run utf8_encode on $body and $headers // if $this->soap_defencoding is UTF-8. Not doing this automatically allows // one to send arbitrary UTF-8 characters, not just characters that map to ISO-8859-1 $this->debug("In serializeEnvelope length=" . strlen($body) . " body (max 1000 characters)=" . substr($body, 0, 1000) . " style=$style use=$use encodingStyle=$encodingStyle"); $this->debug("headers:"); $this->appendDebug($this->varDump($headers)); $this->debug("namespaces:"); $this->appendDebug($this->varDump($namespaces)); // serialize namespaces $ns_string = ''; foreach(array_merge($this->namespaces,$namespaces) as $k => $v){ $ns_string .= " xmlns:$k=\"$v\""; } if($encodingStyle) { $ns_string = " SOAP-ENV:encodingStyle=\"$encodingStyle\"$ns_string"; } // serialize headers if($headers){ if (is_array($headers)) { $xml = ''; foreach ($headers as $header) { $xml .= $this->serialize_val($header, false, false, false, false, false, $use); } $headers = $xml; $this->debug("In serializeEnvelope, serialzied array of headers to $headers"); } $headers = "<SOAP-ENV:Header>".$headers."</SOAP-ENV:Header>"; } // serialize envelope return '<?xml version="1.0" encoding="'.$this->soap_defencoding .'"?'.">". '<SOAP-ENV:Envelope'.$ns_string.">". $headers. "<SOAP-ENV:Body>". $body. "</SOAP-ENV:Body>". "</SOAP-ENV:Envelope>"; } /** * formats a string to be inserted into an HTML stream * * @param string $str The string to format * @return string The formatted string * @access public * @deprecated */ function formatDump($str){ $str = htmlspecialchars($str); return nl2br($str); } /** * contracts (changes namespace to prefix) a qualified name * * @param string $qname qname * @return string contracted qname * @access private */ function contractQname($qname){ // get element namespace //$this->xdebug("Contract $qname"); if (strrpos($qname, ':')) { // get unqualified name $name = substr($qname, strrpos($qname, ':') + 1); // get ns $ns = substr($qname, 0, strrpos($qname, ':')); $p = $this->getPrefixFromNamespace($ns); if ($p) { return $p . ':' . $name; } return $qname; } else { return $qname; } } /** * expands (changes prefix to namespace) a qualified name * * @param string $string qname * @return string expanded qname * @access private */ function expandQname($qname){ // get element prefix if(strpos($qname,':') && !ereg('^http://',$qname)){ // get unqualified name $name = substr(strstr($qname,':'),1); // get ns prefix $prefix = substr($qname,0,strpos($qname,':')); if(isset($this->namespaces[$prefix])){ return $this->namespaces[$prefix].':'.$name; } else { return $qname; } } else { return $qname; } } /** * returns the local part of a prefixed string * returns the original string, if not prefixed * * @param string $str The prefixed string * @return string The local part * @access public */ function getLocalPart($str){ if($sstr = strrchr($str,':')){ // get unqualified name return substr( $sstr, 1 ); } else { return $str; } } /** * returns the prefix part of a prefixed string * returns false, if not prefixed * * @param string $str The prefixed string * @return mixed The prefix or false if there is no prefix * @access public */ function getPrefix($str){ if($pos = strrpos($str,':')){ // get prefix return substr($str,0,$pos); } return false; } /** * pass it a prefix, it returns a namespace * * @param string $prefix The prefix * @return mixed The namespace, false if no namespace has the specified prefix * @access public */ function getNamespaceFromPrefix($prefix){ if (isset($this->namespaces[$prefix])) { return $this->namespaces[$prefix]; } //$this->setError("No namespace registered for prefix '$prefix'"); return false; } /** * returns the prefix for a given namespace (or prefix) * or false if no prefixes registered for the given namespace * * @param string $ns The namespace * @return mixed The prefix, false if the namespace has no prefixes * @access public */ function getPrefixFromNamespace($ns) { foreach ($this->namespaces as $p => $n) { if ($ns == $n || $ns == $p) { $this->usedNamespaces[$p] = $n; return $p; } } return false; } /** * returns the time in ODBC canonical form with microseconds * * @return string The time in ODBC canonical form with microseconds * @access public */ function getmicrotime() { if (function_exists('gettimeofday')) { $tod = gettimeofday(); $sec = $tod['sec']; $usec = $tod['usec']; } else { $sec = time(); $usec = 0; } return strftime('%Y-%m-%d %H:%M:%S', $sec) . '.' . sprintf('%06d', $usec); } /** * Returns a string with the output of var_dump * * @param mixed $data The variable to var_dump * @return string The output of var_dump * @access public */ function varDump($data) { ob_start(); var_dump($data); $ret_val = ob_get_contents(); ob_end_clean(); return $ret_val; } } // XML Schema Datatype Helper Functions //xsd:dateTime helpers /** * convert unix timestamp to ISO 8601 compliant date string * * @param string $timestamp Unix time stamp * @access public */ function timestamp_to_iso8601($timestamp,$utc=true){ $datestr = date('Y-m-d\TH:i:sO',$timestamp); if($utc){ $eregStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD 'T'. // separator T '([0-9]{2}):'. // hours hh: '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's if(ereg($eregStr,$datestr,$regs)){ return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); } return false; } else { return $datestr; } } /** * convert ISO 8601 compliant date string to unix timestamp * * @param string $datestr ISO 8601 compliant date string * @access public */ function iso8601_to_timestamp($datestr){ $eregStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD 'T'. // separator T '([0-9]{2}):'. // hours hh: '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's if(ereg($eregStr,$datestr,$regs)){ // not utc if($regs[8] != 'Z'){ $op = substr($regs[8],0,1); $h = substr($regs[8],1,2); $m = substr($regs[8],strlen($regs[8])-2,2); if($op == '-'){ $regs[4] = $regs[4] + $h; $regs[5] = $regs[5] + $m; } elseif($op == '+'){ $regs[4] = $regs[4] - $h; $regs[5] = $regs[5] - $m; } } return strtotime("$regs[1]-$regs[2]-$regs[3] $regs[4]:$regs[5]:$regs[6]Z"); } else { return false; } } /** * sleeps some number of microseconds * * @param string $usec the number of microseconds to sleep * @access public * @deprecated */ function usleepWindows($usec) { $start = gettimeofday(); do { $stop = gettimeofday(); $timePassed = 1000000 * ($stop['sec'] - $start['sec']) + $stop['usec'] - $start['usec']; } while ($timePassed < $usec); } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.nusoap_base.php
PHP
asf20
26,697
<?php /* +----------------------------------------------------------------------+ | Sofee Framework For PHP4 | +----------------------------------------------------------------------+ | Copyright (c) 2004-2005 The Sofee Development Team | +----------------------------------------------------------------------+ | This source file is subject to the GNU Lesser Public License (LGPL), | | that is bundled with this package in the file LICENSE, and is | | available at through the world-wide-web at | | http://www.fsf.org/copyleft/lesser.html | | If you did not receive a copy of the LGPL and are unable to | | obtain it through the world-wide-web, you can get it by writing the | | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, | | MA 02111-1307, USA. | +----------------------------------------------------------------------+ | Author: Justin Wu <ezdevelop@gmail.com> | +----------------------------------------------------------------------+ */ /* $Id: SofeeXmlParser.php,v 1.3 2005/05/30 06:30:14 wenlong Exp $ */ /** * Sofee XML Parser class - This is an XML parser based on PHP's "xml" extension. * * The SofeeXmlParser class provides a very simple and easily usable toolset to convert XML * to an array that can be processed with array iterators. * * @package SofeeFramework * @access public * @version $Revision: 1.1 $ * @author Justin Wu <wenlong@php.net> * @homepage http://www.sofee.cn * @copyright Copyright (c) 2004-2005 Sofee Development Team.(http://www.sofee.cn) * @since 2005-05-30 * @see PEAR:XML_Parser | SimpleXML extension */ class SofeeXmlParser { /** * XML parser handle * * @var resource * @see xml_parser_create() */ var $parser; /** * source encoding * * @var string */ var $srcenc; /** * target encoding * * @var string */ var $dstenc; /** * the original struct * * @access private * @var array1 */ var $_struct = array(); /** * Constructor * * @access public * @param mixed [$srcenc] source encoding * @param mixed [$dstenc] target encoding * @return void * @since */ function SofeeXmlParser($srcenc = null, $dstenc = null) { $this->srcenc = $srcenc; $this->dstenc = $dstenc; // initialize the variable. $this->parser = null; $this->_struct = array(); } /** * Free the resources * * @access public * @return void **/ function free() { if (isset($this->parser) && is_resource($this->parser)) { xml_parser_free($this->parser); unset($this->parser); } } /** * Parses the XML file * * @access public * @param string [$file] the XML file name * @return void * @since */ function parseFile($file) { $data = @file_get_contents($file) or die("Can't open file $file for reading!"); $this->parseString($data); } /** * Parses a string. * * @access public * @param string [$data] XML data * @return void */ function parseString($data) { if ($this->srcenc === null) { $this->parser = @xml_parser_create() or die('Unable to create XML parser resource.'); } else { $this->parser = @xml_parser_create($this->srcenc) or die('Unable to create XML parser resource with '. $this->srcenc .' encoding.'); } if ($this->dstenc !== null) { @xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $this->dstenc) or die('Invalid target encoding'); } xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // lowercase tags xml_parser_set_option($this->parser, XML_OPTION_SKIP_WHITE, 1); // skip empty tags if (!xml_parse_into_struct($this->parser, $data, &$this->_struct)) { printf("XML error: %s at line %d", xml_error_string(xml_get_error_code($this->parser)), xml_get_current_line_number($this->parser) ); $this->free(); exit(); } $this->_count = count($this->_struct); $this->free(); } /** * return the data struction * * @access public * @return array */ function getTree() { $i = 0; $tree = array(); $tree = $this->addNode( $tree, $this->_struct[$i]['tag'], (isset($this->_struct[$i]['value'])) ? $this->_struct[$i]['value'] : '', (isset($this->_struct[$i]['attributes'])) ? $this->_struct[$i]['attributes'] : '', $this->getChild($i) ); unset($this->_struct); return ($tree); } /** * recursion the children node data * * @access public * @param integer [$i] the last struct index * @return array */ function getChild(&$i) { // contain node data $children = array(); // loop while (++$i < $this->_count) { // node tag name $tagname = $this->_struct[$i]['tag']; $value = isset($this->_struct[$i]['value']) ? $this->_struct[$i]['value'] : ''; $attributes = isset($this->_struct[$i]['attributes']) ? $this->_struct[$i]['attributes'] : ''; switch ($this->_struct[$i]['type']) { case 'open': // node has more children $child = $this->getChild($i); // append the children data to the current node $children = $this->addNode($children, $tagname, $value, $attributes, $child); break; case 'complete': // at end of current branch $children = $this->addNode($children, $tagname, $value, $attributes); break; case 'cdata': // node has CDATA after one of it's children $children['value'] .= $value; break; case 'close': // end of node, return collected data return $children; break; } } //return $children; } /** * Appends some values to an array * * @access public * @param array [$target] * @param string [$key] * @param string [$value] * @param array [$attributes] * @param array [$child] the children * @return void * @since */ function addNode($target, $key, $value = '', $attributes = '', $child = '') { if (!isset($target[$key]['value']) && !isset($target[$key][0])) { if ($child != '') { $target[$key] = $child; } if ($attributes != '') { foreach ($attributes as $k => $v) { $target[$key][$k] = $v; } } $target[$key]['value'] = $value; } else { if (!isset($target[$key][0])) { // is string or other $oldvalue = $target[$key]; $target[$key] = array(); $target[$key][0] = $oldvalue; $index = 1; } else { // is array $index = count($target[$key]); } if ($child != '') { $target[$key][$index] = $child; } if ($attributes != '') { foreach ($attributes as $k => $v) { $target[$key][$index][$k] = $v; } } $target[$key][$index]['value'] = $value; } return $target; } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/SofeeXmlParser.php
PHP
asf20
7,051
<? require "../../../global.php";?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php require_once('chinabank.MotoClient.php'); // 消费 $motoClient = new MotoClient(); $cardid =trim($_POST["cardid"]); // 信用卡卡号 $month =trim($_POST["month"]); // 月 $year =trim($_POST["year"]); // 年 $year_month = $year.$month; $cvv =trim($_POST["cvv"]); // 年 $money =trim($_POST["money"]); // 金额 单位元 $name =trim($_POST["name"]); // 持卡人姓名 $idcard =trim($_POST["idcard"]); // 证件号 $type1 =trim($_POST["type1"]); //支付款项类型 $orderid=trim($_POST[ "orderid" ]); if($idcard=="") { $idcard="999999"; } $result = $motoClient->consume( $_POST[ "orderid" ], $cardid, $year_month, $money*100, array("name"=>$name, "idcard"=>$idcard, "cvv2"=>$cvv, 'mobile'=>'139','type1'=>$type1, 'note'=>'nothing')); //echo $result[$motoClient->MOTO_SEARCH_AMOUNT] . "<br />"; //print_a("RESULT Array", $result); //echo "oid: {$result[$motoClient->MOTO_KEY_OID]},<br/> authcode: {$result[$motoClient->MOTO_KEY_AUTHID]},<br/>"; echo "result: {$result[result]}<br/>"; if($result[result]==0 and !strstr($result[result],"E"))//当返回0时表示支付成功 { //更改数据库里的订单状态 require RootDir."/inc/dabase_mysql.php"; $mydb=new YYBDB(); if(strstr($type1,"dj")) { $sql2=",earnestmoney=".$money.",paytimeearnestmoney=".time().","; $paytype="dj"; } else { $sql2=",balance=".$money.",paytimebalance=".time().","; $paytype="wk"; } $sql="update ".$SystemConest[7]."orderpaylist set paytype='信用卡' ".$sql2." earnbizhong='RMB',isconfim=1 where orderno='".$orderid."'"; $mydb->db_query($sql); $rs=$mydb->db_query("select * from ".$SystemConest[7]."tourorder where orderno='".$orderid."'"); //支付成功,执行发送邮件操作 echo "<iframe src='/dszSendMail_sendMailInfo_type_paysuss_orderno_".$orderid."_paytype_".$paytype."_email_".$rs["nuseremail"]."' frameborder=0 scrolling=no width=1 height=1></iframe>"; unset($rs); } elseif($result[result]==1) { echo "<br>您的卡是非实时交易卡,请稍后请进入<a href='http://www.dreams-travel.com/pay/order/find_order.asp'>订单查询页面查询</a><br>"; } else { //支付失败时 echo "你的信用卡不能在本系统支付,或者你的信用卡设置了密码,或者卡号不对,所以不能支付!<br>请换一张信用卡或者换一种支付方式!"; } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/ChinaBankPay.php
PHP
asf20
2,792
<?php /** * parses an XML Schema, allows access to it's data, other utility methods * no validation... yet. * very experimental and limited. As is discussed on XML-DEV, I'm one of the people * that just doesn't have time to read the spec(s) thoroughly, and just have a couple of trusty * tutorials I refer to :) * * @author Dietrich Ayala <dietrich@ganx4.com> * @version $Id: class.xmlschema.php,v 1.39 2005/08/04 01:27:42 snichol Exp $ * @access public */ class XMLSchema extends nusoap_base { // files var $schema = ''; var $xml = ''; // namespaces var $enclosingNamespaces; // schema info var $schemaInfo = array(); var $schemaTargetNamespace = ''; // types, elements, attributes defined by the schema var $attributes = array(); var $complexTypes = array(); var $complexTypeStack = array(); var $currentComplexType = null; var $elements = array(); var $elementStack = array(); var $currentElement = null; var $simpleTypes = array(); var $simpleTypeStack = array(); var $currentSimpleType = null; // imports var $imports = array(); // parser vars var $parser; var $position = 0; var $depth = 0; var $depth_array = array(); var $message = array(); var $defaultNamespace = array(); /** * constructor * * @param string $schema schema document URI * @param string $xml xml document URI * @param string $namespaces namespaces defined in enclosing XML * @access public */ function XMLSchema($schema='',$xml='',$namespaces=array()){ parent::nusoap_base(); $this->debug('xmlschema class instantiated, inside constructor'); // files $this->schema = $schema; $this->xml = $xml; // namespaces $this->enclosingNamespaces = $namespaces; $this->namespaces = array_merge($this->namespaces, $namespaces); // parse schema file if($schema != ''){ $this->debug('initial schema file: '.$schema); $this->parseFile($schema, 'schema'); } // parse xml file if($xml != ''){ $this->debug('initial xml file: '.$xml); $this->parseFile($xml, 'xml'); } } /** * parse an XML file * * @param string $xml, path/URL to XML file * @param string $type, (schema | xml) * @return boolean * @access public */ function parseFile($xml,$type){ // parse xml file if($xml != ""){ $xmlStr = @join("",@file($xml)); if($xmlStr == ""){ $msg = 'Error reading XML from '.$xml; $this->setError($msg); $this->debug($msg); return false; } else { $this->debug("parsing $xml"); $this->parseString($xmlStr,$type); $this->debug("done parsing $xml"); return true; } } return false; } /** * parse an XML string * * @param string $xml path or URL * @param string $type, (schema|xml) * @access private */ function parseString($xml,$type){ // parse xml string if($xml != ""){ // Create an XML parser. $this->parser = xml_parser_create(); // Set the options for parsing the XML data. xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0); // Set the object for the parser. xml_set_object($this->parser, $this); // Set the element handlers for the parser. if($type == "schema"){ xml_set_element_handler($this->parser, 'schemaStartElement','schemaEndElement'); xml_set_character_data_handler($this->parser,'schemaCharacterData'); } elseif($type == "xml"){ xml_set_element_handler($this->parser, 'xmlStartElement','xmlEndElement'); xml_set_character_data_handler($this->parser,'xmlCharacterData'); } // Parse the XML file. if(!xml_parse($this->parser,$xml,true)){ // Display an error message. $errstr = sprintf('XML error parsing XML schema on line %d: %s', xml_get_current_line_number($this->parser), xml_error_string(xml_get_error_code($this->parser)) ); $this->debug($errstr); $this->debug("XML payload:\n" . $xml); $this->setError($errstr); } xml_parser_free($this->parser); } else{ $this->debug('no xml passed to parseString()!!'); $this->setError('no xml passed to parseString()!!'); } } /** * start-element handler * * @param string $parser XML parser object * @param string $name element name * @param string $attrs associative array of attributes * @access private */ function schemaStartElement($parser, $name, $attrs) { // position in the total number of elements, starting from 0 $pos = $this->position++; $depth = $this->depth++; // set self as current value for this depth $this->depth_array[$depth] = $pos; $this->message[$pos] = array('cdata' => ''); if ($depth > 0) { $this->defaultNamespace[$pos] = $this->defaultNamespace[$this->depth_array[$depth - 1]]; } else { $this->defaultNamespace[$pos] = false; } // get element prefix if($prefix = $this->getPrefix($name)){ // get unqualified name $name = $this->getLocalPart($name); } else { $prefix = ''; } // loop thru attributes, expanding, and registering namespace declarations if(count($attrs) > 0){ foreach($attrs as $k => $v){ // if ns declarations, add to class level array of valid namespaces if(ereg("^xmlns",$k)){ //$this->xdebug("$k: $v"); //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); if($ns_prefix = substr(strrchr($k,':'),1)){ //$this->xdebug("Add namespace[$ns_prefix] = $v"); $this->namespaces[$ns_prefix] = $v; } else { $this->defaultNamespace[$pos] = $v; if (! $this->getPrefixFromNamespace($v)) { $this->namespaces['ns'.(count($this->namespaces)+1)] = $v; } } if($v == 'http://www.w3.org/2001/XMLSchema' || $v == 'http://www.w3.org/1999/XMLSchema' || $v == 'http://www.w3.org/2000/10/XMLSchema'){ $this->XMLSchemaVersion = $v; $this->namespaces['xsi'] = $v.'-instance'; } } } foreach($attrs as $k => $v){ // expand each attribute $k = strpos($k,':') ? $this->expandQname($k) : $k; $v = strpos($v,':') ? $this->expandQname($v) : $v; $eAttrs[$k] = $v; } $attrs = $eAttrs; } else { $attrs = array(); } // find status, register data switch($name){ case 'all': // (optional) compositor content for a complexType case 'choice': case 'group': case 'sequence': //$this->xdebug("compositor $name for currentComplexType: $this->currentComplexType and currentElement: $this->currentElement"); $this->complexTypes[$this->currentComplexType]['compositor'] = $name; //if($name == 'all' || $name == 'sequence'){ // $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; //} break; case 'attribute': // complexType attribute //$this->xdebug("parsing attribute $attrs[name] $attrs[ref] of value: ".$attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']); $this->xdebug("parsing attribute:"); $this->appendDebug($this->varDump($attrs)); if (!isset($attrs['form'])) { $attrs['form'] = $this->schemaInfo['attributeFormDefault']; } if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; if (!strpos($v, ':')) { // no namespace in arrayType attribute value... if ($this->defaultNamespace[$pos]) { // ...so use the default $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'] = $this->defaultNamespace[$pos] . ':' . $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; } } } if(isset($attrs['name'])){ $this->attributes[$attrs['name']] = $attrs; $aname = $attrs['name']; } elseif(isset($attrs['ref']) && $attrs['ref'] == 'http://schemas.xmlsoap.org/soap/encoding/:arrayType'){ if (isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])) { $aname = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; } else { $aname = ''; } } elseif(isset($attrs['ref'])){ $aname = $attrs['ref']; $this->attributes[$attrs['ref']] = $attrs; } if($this->currentComplexType){ // This should *always* be $this->complexTypes[$this->currentComplexType]['attrs'][$aname] = $attrs; } // arrayType attribute if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']) || $this->getLocalPart($aname) == 'arrayType'){ $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; $prefix = $this->getPrefix($aname); if(isset($attrs['http://schemas.xmlsoap.org/wsdl/:arrayType'])){ $v = $attrs['http://schemas.xmlsoap.org/wsdl/:arrayType']; } else { $v = ''; } if(strpos($v,'[,]')){ $this->complexTypes[$this->currentComplexType]['multidimensional'] = true; } $v = substr($v,0,strpos($v,'[')); // clip the [] if(!strpos($v,':') && isset($this->typemap[$this->XMLSchemaVersion][$v])){ $v = $this->XMLSchemaVersion.':'.$v; } $this->complexTypes[$this->currentComplexType]['arrayType'] = $v; } break; case 'complexContent': // (optional) content for a complexType break; case 'complexType': array_push($this->complexTypeStack, $this->currentComplexType); if(isset($attrs['name'])){ $this->xdebug('processing named complexType '.$attrs['name']); //$this->currentElement = false; $this->currentComplexType = $attrs['name']; $this->complexTypes[$this->currentComplexType] = $attrs; $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; // This is for constructs like // <complexType name="ListOfString" base="soap:Array"> // <sequence> // <element name="string" type="xsd:string" // minOccurs="0" maxOccurs="unbounded" /> // </sequence> // </complexType> if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; } }else{ $this->xdebug('processing unnamed complexType for element '.$this->currentElement); $this->currentComplexType = $this->currentElement . '_ContainedType'; //$this->currentElement = false; $this->complexTypes[$this->currentComplexType] = $attrs; $this->complexTypes[$this->currentComplexType]['typeClass'] = 'complexType'; // This is for constructs like // <complexType name="ListOfString" base="soap:Array"> // <sequence> // <element name="string" type="xsd:string" // minOccurs="0" maxOccurs="unbounded" /> // </sequence> // </complexType> if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { $this->complexTypes[$this->currentComplexType]['phpType'] = 'struct'; } } break; case 'element': array_push($this->elementStack, $this->currentElement); // elements defined as part of a complex type should // not really be added to $this->elements, but for some // reason, they are if (!isset($attrs['form'])) { $attrs['form'] = $this->schemaInfo['elementFormDefault']; } if(isset($attrs['type'])){ $this->xdebug("processing typed element ".$attrs['name']." of type ".$attrs['type']); if (! $this->getPrefix($attrs['type'])) { if ($this->defaultNamespace[$pos]) { $attrs['type'] = $this->defaultNamespace[$pos] . ':' . $attrs['type']; $this->xdebug('used default namespace to make type ' . $attrs['type']); } } // This is for constructs like // <complexType name="ListOfString" base="soap:Array"> // <sequence> // <element name="string" type="xsd:string" // minOccurs="0" maxOccurs="unbounded" /> // </sequence> // </complexType> if ($this->currentComplexType && $this->complexTypes[$this->currentComplexType]['phpType'] == 'array') { $this->xdebug('arrayType for unusual array is ' . $attrs['type']); $this->complexTypes[$this->currentComplexType]['arrayType'] = $attrs['type']; } $this->currentElement = $attrs['name']; $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; $ename = $attrs['name']; } elseif(isset($attrs['ref'])){ $this->xdebug("processing element as ref to ".$attrs['ref']); $this->currentElement = "ref to ".$attrs['ref']; $ename = $this->getLocalPart($attrs['ref']); } else { $this->xdebug("processing untyped element ".$attrs['name']); $this->currentElement = $attrs['name']; $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['name'] . '_ContainedType'; $this->elements[ $attrs['name'] ]['type'] = $attrs['type']; $ename = $attrs['name']; } if(isset($ename) && $this->currentComplexType){ $this->complexTypes[$this->currentComplexType]['elements'][$ename] = $attrs; } break; case 'enumeration': // restriction value list member $this->xdebug('enumeration ' . $attrs['value']); if ($this->currentSimpleType) { $this->simpleTypes[$this->currentSimpleType]['enumeration'][] = $attrs['value']; } elseif ($this->currentComplexType) { $this->complexTypes[$this->currentComplexType]['enumeration'][] = $attrs['value']; } break; case 'extension': // simpleContent or complexContent type extension $this->xdebug('extension ' . $attrs['base']); if ($this->currentComplexType) { $this->complexTypes[$this->currentComplexType]['extensionBase'] = $attrs['base']; } break; case 'import': if (isset($attrs['schemaLocation'])) { //$this->xdebug('import namespace ' . $attrs['namespace'] . ' from ' . $attrs['schemaLocation']); $this->imports[$attrs['namespace']][] = array('location' => $attrs['schemaLocation'], 'loaded' => false); } else { //$this->xdebug('import namespace ' . $attrs['namespace']); $this->imports[$attrs['namespace']][] = array('location' => '', 'loaded' => true); if (! $this->getPrefixFromNamespace($attrs['namespace'])) { $this->namespaces['ns'.(count($this->namespaces)+1)] = $attrs['namespace']; } } break; case 'list': // simpleType value list break; case 'restriction': // simpleType, simpleContent or complexContent value restriction $this->xdebug('restriction ' . $attrs['base']); if($this->currentSimpleType){ $this->simpleTypes[$this->currentSimpleType]['type'] = $attrs['base']; } elseif($this->currentComplexType){ $this->complexTypes[$this->currentComplexType]['restrictionBase'] = $attrs['base']; if(strstr($attrs['base'],':') == ':Array'){ $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } } break; case 'schema': $this->schemaInfo = $attrs; $this->schemaInfo['schemaVersion'] = $this->getNamespaceFromPrefix($prefix); if (isset($attrs['targetNamespace'])) { $this->schemaTargetNamespace = $attrs['targetNamespace']; } if (!isset($attrs['elementFormDefault'])) { $this->schemaInfo['elementFormDefault'] = 'unqualified'; } if (!isset($attrs['attributeFormDefault'])) { $this->schemaInfo['attributeFormDefault'] = 'unqualified'; } break; case 'simpleContent': // (optional) content for a complexType break; case 'simpleType': array_push($this->simpleTypeStack, $this->currentSimpleType); if(isset($attrs['name'])){ $this->xdebug("processing simpleType for name " . $attrs['name']); $this->currentSimpleType = $attrs['name']; $this->simpleTypes[ $attrs['name'] ] = $attrs; $this->simpleTypes[ $attrs['name'] ]['typeClass'] = 'simpleType'; $this->simpleTypes[ $attrs['name'] ]['phpType'] = 'scalar'; } else { $this->xdebug('processing unnamed simpleType for element '.$this->currentElement); $this->currentSimpleType = $this->currentElement . '_ContainedType'; //$this->currentElement = false; $this->simpleTypes[$this->currentSimpleType] = $attrs; $this->simpleTypes[$this->currentSimpleType]['phpType'] = 'scalar'; } break; case 'union': // simpleType type list break; default: //$this->xdebug("do not have anything to do for element $name"); } } /** * end-element handler * * @param string $parser XML parser object * @param string $name element name * @access private */ function schemaEndElement($parser, $name) { // bring depth down a notch $this->depth--; // position of current element is equal to the last value left in depth_array for my depth if(isset($this->depth_array[$this->depth])){ $pos = $this->depth_array[$this->depth]; } // get element prefix if ($prefix = $this->getPrefix($name)){ // get unqualified name $name = $this->getLocalPart($name); } else { $prefix = ''; } // move on... if($name == 'complexType'){ $this->xdebug('done processing complexType ' . ($this->currentComplexType ? $this->currentComplexType : '(unknown)')); $this->currentComplexType = array_pop($this->complexTypeStack); //$this->currentElement = false; } if($name == 'element'){ $this->xdebug('done processing element ' . ($this->currentElement ? $this->currentElement : '(unknown)')); $this->currentElement = array_pop($this->elementStack); } if($name == 'simpleType'){ $this->xdebug('done processing simpleType ' . ($this->currentSimpleType ? $this->currentSimpleType : '(unknown)')); $this->currentSimpleType = array_pop($this->simpleTypeStack); } } /** * element content handler * * @param string $parser XML parser object * @param string $data element content * @access private */ function schemaCharacterData($parser, $data){ $pos = $this->depth_array[$this->depth - 1]; $this->message[$pos]['cdata'] .= $data; } /** * serialize the schema * * @access public */ function serializeSchema(){ $schemaPrefix = $this->getPrefixFromNamespace($this->XMLSchemaVersion); $xml = ''; // imports if (sizeof($this->imports) > 0) { foreach($this->imports as $ns => $list) { foreach ($list as $ii) { if ($ii['location'] != '') { $xml .= " <$schemaPrefix:import location=\"" . $ii['location'] . '" namespace="' . $ns . "\" />\n"; } else { $xml .= " <$schemaPrefix:import namespace=\"" . $ns . "\" />\n"; } } } } // complex types foreach($this->complexTypes as $typeName => $attrs){ $contentStr = ''; // serialize child elements if(isset($attrs['elements']) && (count($attrs['elements']) > 0)){ foreach($attrs['elements'] as $element => $eParts){ if(isset($eParts['ref'])){ $contentStr .= " <$schemaPrefix:element ref=\"$element\"/>\n"; } else { $contentStr .= " <$schemaPrefix:element name=\"$element\" type=\"" . $this->contractQName($eParts['type']) . "\""; foreach ($eParts as $aName => $aValue) { // handle, e.g., abstract, default, form, minOccurs, maxOccurs, nillable if ($aName != 'name' && $aName != 'type') { $contentStr .= " $aName=\"$aValue\""; } } $contentStr .= "/>\n"; } } // compositor wraps elements if (isset($attrs['compositor']) && ($attrs['compositor'] != '')) { $contentStr = " <$schemaPrefix:$attrs[compositor]>\n".$contentStr." </$schemaPrefix:$attrs[compositor]>\n"; } } // attributes if(isset($attrs['attrs']) && (count($attrs['attrs']) >= 1)){ foreach($attrs['attrs'] as $attr => $aParts){ $contentStr .= " <$schemaPrefix:attribute"; foreach ($aParts as $a => $v) { if ($a == 'ref' || $a == 'type') { $contentStr .= " $a=\"".$this->contractQName($v).'"'; } elseif ($a == 'http://schemas.xmlsoap.org/wsdl/:arrayType') { $this->usedNamespaces['wsdl'] = $this->namespaces['wsdl']; $contentStr .= ' wsdl:arrayType="'.$this->contractQName($v).'"'; } else { $contentStr .= " $a=\"$v\""; } } $contentStr .= "/>\n"; } } // if restriction if (isset($attrs['restrictionBase']) && $attrs['restrictionBase'] != ''){ $contentStr = " <$schemaPrefix:restriction base=\"".$this->contractQName($attrs['restrictionBase'])."\">\n".$contentStr." </$schemaPrefix:restriction>\n"; // complex or simple content if ((isset($attrs['elements']) && count($attrs['elements']) > 0) || (isset($attrs['attrs']) && count($attrs['attrs']) > 0)){ $contentStr = " <$schemaPrefix:complexContent>\n".$contentStr." </$schemaPrefix:complexContent>\n"; } } // finalize complex type if($contentStr != ''){ $contentStr = " <$schemaPrefix:complexType name=\"$typeName\">\n".$contentStr." </$schemaPrefix:complexType>\n"; } else { $contentStr = " <$schemaPrefix:complexType name=\"$typeName\"/>\n"; } $xml .= $contentStr; } // simple types if(isset($this->simpleTypes) && count($this->simpleTypes) > 0){ foreach($this->simpleTypes as $typeName => $eParts){ $xml .= " <$schemaPrefix:simpleType name=\"$typeName\">\n <$schemaPrefix:restriction base=\"".$this->contractQName($eParts['type'])."\"/>\n"; if (isset($eParts['enumeration'])) { foreach ($eParts['enumeration'] as $e) { $xml .= " <$schemaPrefix:enumeration value=\"$e\"/>\n"; } } $xml .= " </$schemaPrefix:simpleType>"; } } // elements if(isset($this->elements) && count($this->elements) > 0){ foreach($this->elements as $element => $eParts){ $xml .= " <$schemaPrefix:element name=\"$element\" type=\"".$this->contractQName($eParts['type'])."\"/>\n"; } } // attributes if(isset($this->attributes) && count($this->attributes) > 0){ foreach($this->attributes as $attr => $aParts){ $xml .= " <$schemaPrefix:attribute name=\"$attr\" type=\"".$this->contractQName($aParts['type'])."\"\n/>"; } } // finish 'er up $el = "<$schemaPrefix:schema targetNamespace=\"$this->schemaTargetNamespace\"\n"; foreach (array_diff($this->usedNamespaces, $this->enclosingNamespaces) as $nsp => $ns) { $el .= " xmlns:$nsp=\"$ns\"\n"; } $xml = $el . ">\n".$xml."</$schemaPrefix:schema>\n"; return $xml; } /** * adds debug data to the clas level debug string * * @param string $string debug data * @access private */ function xdebug($string){ $this->debug('<' . $this->schemaTargetNamespace . '> '.$string); } /** * get the PHP type of a user defined type in the schema * PHP type is kind of a misnomer since it actually returns 'struct' for assoc. arrays * returns false if no type exists, or not w/ the given namespace * else returns a string that is either a native php type, or 'struct' * * @param string $type, name of defined type * @param string $ns, namespace of type * @return mixed * @access public * @deprecated */ function getPHPType($type,$ns){ if(isset($this->typemap[$ns][$type])){ //print "found type '$type' and ns $ns in typemap<br>"; return $this->typemap[$ns][$type]; } elseif(isset($this->complexTypes[$type])){ //print "getting type '$type' and ns $ns from complexTypes array<br>"; return $this->complexTypes[$type]['phpType']; } return false; } /** * returns an associative array of information about a given type * returns false if no type exists by the given name * * For a complexType typeDef = array( * 'restrictionBase' => '', * 'phpType' => '', * 'compositor' => '(sequence|all)', * 'elements' => array(), // refs to elements array * 'attrs' => array() // refs to attributes array * ... and so on (see addComplexType) * ) * * For simpleType or element, the array has different keys. * * @param string * @return mixed * @access public * @see addComplexType * @see addSimpleType * @see addElement */ function getTypeDef($type){ //$this->debug("in getTypeDef for type $type"); if(isset($this->complexTypes[$type])){ $this->xdebug("in getTypeDef, found complexType $type"); return $this->complexTypes[$type]; } elseif(isset($this->simpleTypes[$type])){ $this->xdebug("in getTypeDef, found simpleType $type"); if (!isset($this->simpleTypes[$type]['phpType'])) { // get info for type to tack onto the simple type // TODO: can this ever really apply (i.e. what is a simpleType really?) $uqType = substr($this->simpleTypes[$type]['type'], strrpos($this->simpleTypes[$type]['type'], ':') + 1); $ns = substr($this->simpleTypes[$type]['type'], 0, strrpos($this->simpleTypes[$type]['type'], ':')); $etype = $this->getTypeDef($uqType); if ($etype) { $this->xdebug("in getTypeDef, found type for simpleType $type:"); $this->xdebug($this->varDump($etype)); if (isset($etype['phpType'])) { $this->simpleTypes[$type]['phpType'] = $etype['phpType']; } if (isset($etype['elements'])) { $this->simpleTypes[$type]['elements'] = $etype['elements']; } } } return $this->simpleTypes[$type]; } elseif(isset($this->elements[$type])){ $this->xdebug("in getTypeDef, found element $type"); if (!isset($this->elements[$type]['phpType'])) { // get info for type to tack onto the element $uqType = substr($this->elements[$type]['type'], strrpos($this->elements[$type]['type'], ':') + 1); $ns = substr($this->elements[$type]['type'], 0, strrpos($this->elements[$type]['type'], ':')); $etype = $this->getTypeDef($uqType); if ($etype) { $this->xdebug("in getTypeDef, found type for element $type:"); $this->xdebug($this->varDump($etype)); if (isset($etype['phpType'])) { $this->elements[$type]['phpType'] = $etype['phpType']; } if (isset($etype['elements'])) { $this->elements[$type]['elements'] = $etype['elements']; } } elseif ($ns == 'http://www.w3.org/2001/XMLSchema') { $this->xdebug("in getTypeDef, element $type is an XSD type"); $this->elements[$type]['phpType'] = 'scalar'; } } return $this->elements[$type]; } elseif(isset($this->attributes[$type])){ $this->xdebug("in getTypeDef, found attribute $type"); return $this->attributes[$type]; } elseif (ereg('_ContainedType$', $type)) { $this->xdebug("in getTypeDef, have an untyped element $type"); $typeDef['typeClass'] = 'simpleType'; $typeDef['phpType'] = 'scalar'; $typeDef['type'] = 'http://www.w3.org/2001/XMLSchema:string'; return $typeDef; } $this->xdebug("in getTypeDef, did not find $type"); return false; } /** * returns a sample serialization of a given type, or false if no type by the given name * * @param string $type, name of type * @return mixed * @access public * @deprecated */ function serializeTypeDef($type){ //print "in sTD() for type $type<br>"; if($typeDef = $this->getTypeDef($type)){ $str .= '<'.$type; if(is_array($typeDef['attrs'])){ foreach($attrs as $attName => $data){ $str .= " $attName=\"{type = ".$data['type']."}\""; } } $str .= " xmlns=\"".$this->schema['targetNamespace']."\""; if(count($typeDef['elements']) > 0){ $str .= ">"; foreach($typeDef['elements'] as $element => $eData){ $str .= $this->serializeTypeDef($element); } $str .= "</$type>"; } elseif($typeDef['typeClass'] == 'element') { $str .= "></$type>"; } else { $str .= "/>"; } return $str; } return false; } /** * returns HTML form elements that allow a user * to enter values for creating an instance of the given type. * * @param string $name, name for type instance * @param string $type, name of type * @return string * @access public * @deprecated */ function typeToForm($name,$type){ // get typedef if($typeDef = $this->getTypeDef($type)){ // if struct if($typeDef['phpType'] == 'struct'){ $buffer .= '<table>'; foreach($typeDef['elements'] as $child => $childDef){ $buffer .= " <tr><td align='right'>$childDef[name] (type: ".$this->getLocalPart($childDef['type'])."):</td> <td><input type='text' name='parameters[".$name."][$childDef[name]]'></td></tr>"; } $buffer .= '</table>'; // if array } elseif($typeDef['phpType'] == 'array'){ $buffer .= '<table>'; for($i=0;$i < 3; $i++){ $buffer .= " <tr><td align='right'>array item (type: $typeDef[arrayType]):</td> <td><input type='text' name='parameters[".$name."][]'></td></tr>"; } $buffer .= '</table>'; // if scalar } else { $buffer .= "<input type='text' name='parameters[$name]'>"; } } else { $buffer .= "<input type='text' name='parameters[$name]'>"; } return $buffer; } /** * adds a complex type to the schema * * example: array * * addType( * 'ArrayOfstring', * 'complexType', * 'array', * '', * 'SOAP-ENC:Array', * array('ref'=>'SOAP-ENC:arrayType','wsdl:arrayType'=>'string[]'), * 'xsd:string' * ); * * example: PHP associative array ( SOAP Struct ) * * addType( * 'SOAPStruct', * 'complexType', * 'struct', * 'all', * array('myVar'=> array('name'=>'myVar','type'=>'string') * ); * * @param name * @param typeClass (complexType|simpleType|attribute) * @param phpType: currently supported are array and struct (php assoc array) * @param compositor (all|sequence|choice) * @param restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param elements = array ( name = array(name=>'',type=>'') ) * @param attrs = array( * array( * 'ref' => "http://schemas.xmlsoap.org/soap/encoding/:arrayType", * "http://schemas.xmlsoap.org/wsdl/:arrayType" => "string[]" * ) * ) * @param arrayType: namespace:name (http://www.w3.org/2001/XMLSchema:string) * @access public * @see getTypeDef */ function addComplexType($name,$typeClass='complexType',$phpType='array',$compositor='',$restrictionBase='',$elements=array(),$attrs=array(),$arrayType=''){ $this->complexTypes[$name] = array( 'name' => $name, 'typeClass' => $typeClass, 'phpType' => $phpType, 'compositor'=> $compositor, 'restrictionBase' => $restrictionBase, 'elements' => $elements, 'attrs' => $attrs, 'arrayType' => $arrayType ); $this->xdebug("addComplexType $name:"); $this->appendDebug($this->varDump($this->complexTypes[$name])); } /** * adds a simple type to the schema * * @param string $name * @param string $restrictionBase namespace:name (http://schemas.xmlsoap.org/soap/encoding/:Array) * @param string $typeClass (should always be simpleType) * @param string $phpType (should always be scalar) * @param array $enumeration array of values * @access public * @see xmlschema * @see getTypeDef */ function addSimpleType($name, $restrictionBase='', $typeClass='simpleType', $phpType='scalar', $enumeration=array()) { $this->simpleTypes[$name] = array( 'name' => $name, 'typeClass' => $typeClass, 'phpType' => $phpType, 'type' => $restrictionBase, 'enumeration' => $enumeration ); $this->xdebug("addSimpleType $name:"); $this->appendDebug($this->varDump($this->simpleTypes[$name])); } /** * adds an element to the schema * * @param array $attrs attributes that must include name and type * @see xmlschema * @access public */ function addElement($attrs) { if (! $this->getPrefix($attrs['type'])) { $attrs['type'] = $this->schemaTargetNamespace . ':' . $attrs['type']; } $this->elements[ $attrs['name'] ] = $attrs; $this->elements[ $attrs['name'] ]['typeClass'] = 'element'; $this->xdebug("addElement " . $attrs['name']); $this->appendDebug($this->varDump($this->elements[ $attrs['name'] ])); } } ?>
10npsite
trunk/Index/Lib/Order/CardOnlineChinaBankRmb/class.xmlschema.php
PHP
asf20
33,539
<?php header("Content-type:text/html; charset=utf-8"); //商户订单号 $pBillNo = date('YmdHis') . mt_rand(100000,999999); //商户交易日期 $pDate = date('Ymd'); //商户返回地址 $url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://'; $url .= str_ireplace('localhost', '127.0.0.1', $_SERVER['HTTP_HOST']) . $_SERVER['SCRIPT_NAME']; $url = str_ireplace('orderpay', 'OrderReturn', $url); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-Type" content="text/html; charset=utf-8" /> <title>标准商户订单支付接口(新接口)</title> <style type="text/css"> <!-- TD {FONT-SIZE: 9pt} SELECT {FONT-SIZE: 9pt} OPTION {COLOR: #5040aa; FONT-SIZE: 9pt} INPUT {FONT-SIZE: 9pt} --> </style> <script language="javascript"> function show(zhilian) { var obj = document.getElementById("tb1"); if(zhilian == "1") { for(i=14; i<20; i++) { obj.rows[i].style.display = "block"; } obj.rows[20].style.display = "none"; obj.rows[21].style.display = "none"; } else { for(i=14; i<20; i++) { obj.rows[i].style.display = "none"; } obj.rows[20].style.display = "block"; obj.rows[21].style.display = "block"; } } </script> </head> <body> <form id="form1" action="redirect.php" method="post" target="_blank" > <table id="tb1" width="400" border="1" cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF" bordercolorlight="#333333" bgcolor="#F0F0FF" align="center"> <tr bgcolor="#8070FF"> <td colspan="2" align="center"> <font color="#FFFF00"><b>商户模拟测试(模拟交易接口)</b></font> </td> </tr> <tr> <td>商户号</td> <td> <input type="text" name="pMerCode" size="18" value="120039" /><!--测试商户号--> </td> </tr> <tr> <td>订单号</td> <td> <input type="text" name="pBillNo" size="24" value="<?php echo $pBillNo; ?>" /> </td> </tr> <tr> <td>支付币种</td> <td> <input type="text" name="pCurrency" size="16" value="RMB" /> </td> </tr> <tr> <td>语言</td> <td> <select name="pLang" style="width:115px"> <option value="GB">GB中文</option> <option value="EN">英语</option> </select> </td> </tr> <tr> <td>金&nbsp;&nbsp;额</td> <td> <input type="text" name="pAmount" size="16" value="0.10" /> </td> </tr> <tr> <td>日&nbsp;&nbsp;期</td> <td> <input type="text" name="pDate" size="16" value="<?php echo $pDate; ?>" /> </td> </tr> <tr> <td>订单有效期(小时)</td> <td> <input type="text" name="pBillEXP" size="16" value="1" /> </td> </tr> <tr> <td>访问者权限</td> <td> <input type="text" name="pAuthority" size="16" value="" /> </td> </tr> <tr> <td>持卡人姓名</td> <td> <input type="text" name="pName" size="16" value="Dale" /> </td> </tr> <tr> <td>持卡人证件类型</td> <td> <select name="pIDType"> <option value="1" selected="selected">身份证</option> <option value="2">护照</option> <option value="3">军官证</option> <option value="4">回乡证</option> <option value="5">台胞证</option> <option value="6">港澳通行证</option> <option value="7">国际海员证</option> <option value="8">外国人永久居住证</option> <option value="9">其他</option> </select> </td> </tr> <tr> <td>持卡人证件号码</td> <td> <input type="text" name="pIDNum" size="24" value="123456789012345678" /> </td> </tr> <tr> <td>持卡人电话</td> <td> <input type="text" name="pTel" size="16" value="62107829" /> </td> </tr> <tr> <td>是否直连</td> <td> <select name="pDirect" style="width:115px" onchange="show(this.value)"> <option value="1">直连</option> <option value="" selected="selected">非直连</option> </select> </td> </tr> <tr> <td>网关号</td> <td> <input type="text" name="pCardType" size="16" value="" /> </td> </tr> <tr> <td>发卡行</td> <td> <input type="text" name="pIssueBank" size="16" value="" /> </td> </tr> <tr> <td>发卡行国家</td> <td> <input type="text" name="pIssueCountry" size="16" value="" /> </td> </tr> <tr> <td>信用卡号</td> <td> <input type="text" name="pCardNum" size="20" value="" /> </td> </tr> <tr> <td>信用卡有效期(MM/YY)</td> <td> <input type="text" name="pCardExp" size="16" value="" /> </td> </tr> <tr> <td>CVV2</td> <td> <input type="text" name="pCVV" size="3" value="" /> </td> </tr> <tr> <td>授权录入成功返回地址</td> <td> <input type="text" name="pAuthSuccessUrl" size="35" value="<?php echo $url; ?>" /> </td> </tr> <tr> <td>授权录入失败返回地址</td> <td> <input type="text" name="pAuthFailureUrl" size="35" value="" /> </td> </tr> <tr> <td>网关类型</td> <td> <select name="pGateWayType" style="width:115px"> <option value="1">国内信用卡</option> <option value="2">国际信用卡</option> </select> </td> </tr> <tr> <td>订单加密方式</td> <td> <select name="pOrderEncodeType" style="width:115px"> <option value="1" selected="selected">RSA</option> <option value="2">3DES</option> </select> </td> </tr> <tr> <td>商品信息(名称|摘要)</td> <td> <input type="text" name="pGoodsInfo" size="16" value="测试商品|测试摘要" /> </td> </tr> <tr> <td>商户附加信息</td> <td> <input type="text" name="pAttach" size="16" value="test" /> </td> </tr> <tr> <td colspan=2 align=center> <font color=red>以下是新增的接口参数</font> </td> </tr> <tr> <td>交易返回加密方式</td> <td> <select name="pRetEncodeType" style="width:115px"> <option value="11">md5withRsa</option> <option value="12" selected="selected">md5摘要</option> </select> </td> </tr> <tr> <td>错误信息返回地址</td> <td> <input type="text" name="pErrorUrl" size="35" value="" /> </td> </tr> <tr> <td>成功返回的商户URL</td> <td> <input type="text" name="pReturnUrl" size="35" value="<?php echo $url; ?>" /> </td> </tr> <tr> <td colspan="2" align="center"><input type="submit" value="submit" /></td> </tr> </table> </form> <script language="javascript"> show(""); </script> </body> </html>
10npsite
trunk/Index/Lib/Order/IPSCATphp/demo/OrderPay.php
PHP
asf20
8,165