PHP 文件代码着色 V1.2
程序制作: 暖阳
E-mail: faisun@sina.com
网站:
http://www.softpure.com
请输入源代码,支持
HTML
、
CSS
、
Javascript
、
PHP
、
ASP(VBScript)
:
<? /* this is a comment */ require("../class/mysqldb.inc.php"); include_once("../class/page.php"); $db=new mysqldb(); require("../class/info.php"); $in=new info(); require("../class/use.php"); $use=new useclass(); include("../inc/global.php"); if (isset($_REQUEST['cata'])){$cata=intval($_REQUEST['cata']);} else{$cata=1;} $cata_query=$db->query("select * from hy_product_sort where id='$cata'"); $cata_tresult=$db->get_data(); if(!$cata_tresult) $cata_tresult[0][sortname] = "最新产品"; $where=" 1 "; if($_REQUEST[dosearch]){ if(trim($_REQUEST[sortid])){ $where .= " and pro_sort like '".trim($_REQUEST[sortid])."%' "; } if(trim($_REQUEST[xinghao])){ $where .= " and pro3 like '".trim($_REQUEST[xinghao])."' "; } if(trim($_REQUEST[jiage])){ $jiage_arr = explode("-",trim($_REQUEST[jiage])); if(count($jiage_arr)==2){ $where .= " and pro2>=".floatval($jiage_arr[0])." and pro2<=".floatval($jiage_arr[1])." "; }else{ $where .= " and pro2=".floatval($jiage_arr[0])." "; } } if(trim($_REQUEST[keywords])){ $where .= " and (0"; $search_rownames = array("pro_name","pro_content"); foreach($search_rownames as $rowname){ $where .= " or `$rowname` like '%".trim($_REQUEST[keywords])."%'"; } $where .= ")"; } $cata_tresult[0][sortname] = "搜索结果"; } $page = new ShowPage; $page->PageSize = 8; $totalnumsql = "select a.id from hy_product as a, hy_product_sort as b where $where and a.pro_sort=b.id and a.pro_sort like '$cata%' order by a.displayorder,a.pro_time desc,a.id desc"; $db->query($totalnumsql); $recordcount = $db->get_num1(); $page->Total = $recordcount; $page->LinkAry = array("cata"=>$cata,"keywords"=>$keywords); $pro_sql1="select a.*,b.sortname from hy_product as a, hy_product_sort as b where $where and a.pro_sort=b.id and a.pro_sort like '$cata%' order by a.displayorder,a.pro_time desc,a.id desc limit ".$page->OffSet(); $db->query($pro_sql1); $pro_result1=$db->get_data(); $pro_num1=$db->get_num1(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>雪贝尔</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <style type="text/css"> <!-- body { background-image: url(); } --> </style> <script language="JavaScript" type="text/JavaScript"> <!-- /* this is a comment */ function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <script type="text/javascript"> <!-- var omitformtags=["input", "textarea", "select"] omitformtags=omitformtags.join("|") function disableselect(e){ if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1) return false } function reEnable(){ return true } if (typeof document.onselectstart!="undefined") document.onselectstart=new Function ("return false") else{ document.onmousedown=disableselect document.onmouseup=reEnable } //--> </script> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); //--> </script> <link href="../shaber.css" rel="stylesheet" type="text/css"> </head> <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" oncontextmenu="return alert('>');"> <table width="1002" height="346" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="197" height="346" valign="top" bgcolor="#FAF3D7"><table width="197" height="573" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="214" valign="top" bgcolor="#F9F2D5"><table width="214" height="123" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><img src="images/logo_03.jpg" width="214" height="123"></td> </tr> </table> <table width="214" height="41" border="0" cellpadding="0" cellspacing="0"> <tr> <td background="images/product_02_01.jpg"><table width="100%" height="25" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="25" valign="bottom" class="product">产品展示</td> </tr> </table></td> </tr> </table> <table width="214" height="671" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" background="images/di.jpg" align="center"> <? include ("product_let.php"); ?><br><iframe src="../inc_tuijian.php" width="214" height="86" frameborder="0" scrolling="no"></iframe> </td> </tr> </table></td> </tr> </table></td> <td width="740" valign="top"><table width="740" height="123" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="740" height="123"> <param name="movie" value="../banner2.swf"> <param name="quality" value="high"> <embed src="../banner2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="740" height="123"></embed> </object></td> </tr> </table> <table width="740" height="41" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="40" valign="top" background="images/product_top.jpg"> </td> </tr> </table> <table width="740" height="760" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="17" height="760" valign="top" bgcolor="#F9F2D5"><table width="17" height="549" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" background="images/product_let.jpg"> </td> </tr> </table></td> <td width="715" valign="top"><? include("../include/product.php"); ?> <table width="715" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="715" height="2"><img src="images/product_xian.jpg" width="715" height="1"></td> </tr> </table> <table width="715" height="38" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="42" height="38"> </td> <td width="14" class="news_english_top"><img src="images/product_dian.jpg" width="6" height="29"></td> <td class="news_english_top">您当前位置: <a href="../index01.php" class="news_english_top">首页</a> <span class="news_english_top">></span> <a href="index.php" class="news_english_top">产品展示</a> <? $in->CN_Location($cata,'index.php','hy_product_sort');?></td> </tr> </table> <table width="715" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="715" height="2"><img src="images/product_xian.jpg" width="715" height="1"></td> </tr> </table> <table width="715" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="715" valign="top"><img src="images/product_yin.jpg" width="715" height="13"></td> </tr> </table> <table width="100%" height="38" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="7%"> </td> <td width="25%" class="NewProduct"><img src="images/dian.jpg" width="13" height="13"> <span class="abouts_top"><?php echo $cata_tresult[0][sortname]; ?></span></td> <td width="68%" class="NewProduct"><table border="0" align="right" cellpadding="0" cellspacing="0"> <form name="searchform" method="get" action="../product/index.php"> <tr> <td width="115"> <script language="javascript"> function sortselect(obj){ if(obj.options[obj.selectedIndex].value==116){ document.searchform.xinghao.disabled=false; }else{ document.searchform.xinghao.disabled=true; document.searchform.xinghao.selectedIndex = 0; } } </script> <select name="sortid" class="show2" id="sortid" onChange="sortselect(this);"> <option value="">产品类型</option> <? $query = $db->query("select * from hy_product_sort where parentid=1 "); while($result=$db->fetch_array($query)){ echo "<option value='$result[id]'>$result[sortname]</option>"; } ?> </select></td> <td width="79" ><select name="xinghao" class="show2" id="xinghao" disabled> <option value="" selected>蛋糕型号</option> <option value="A">A</option> <option value="B">B</option> <option value="C">C</option> <option value="Cd">Cd</option> <option value="D">D</option> <option value="E">E</option> </select></td> <td width="92" align="left"><select name="jiage" class="show2" id="jiage" align="center"> <option value="" selected>产品价格</option> <option value="0.1-0.5">0.1-0.5 元</option> <option value="0.5-1">0.5-1 元</option> <option value="1-3">1.0-3.0 元</option> <option value="3-5">3.0-5.0 元</option> <option value="5-10">5.0-10 元</option> <option value="10-20">10-20 元</option> <option value="20-50">20-50 元</option> <option value="50-100">50-100 元</option> <option value="100-99999999">100元以上</option> </select></td> <td width="78" align="left" > <div align="center"> <input name="dosearch" type="submit" id="dosearch" value="搜 索"> </div></td> <td width="30" align="left" > </td> </tr> </form> </table></td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="2"><img src="images/product_xian.jpg" width="715" height="1"></td> </tr> <tr> <td> </td> </tr> </table> <? if ($pro_num1>0){ $line_num = 2; $k = 0; for($b=0;$b<$pro_num1;$b++){ $k++; if($k==1){ ?> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td width="30"> </td> <? } ?> <td width="355"> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="160" align="center" valign="top"><table border="0" cellpadding="0" cellspacing="0"> <tr> <td height="4"></td> </tr> <tr> <td align="center" valign="middle" background="images/product_kuan.jpg" width="143" height="118"><? if($pro_result1[$b]['pro_pic']!=""){?><a href="details.php?pid=<? echo $pro_result1[$b]['id'];?>"><img src="../showimage.php?imagename=<?="uploadfile/product/{$pro_result1[$b][pro_pic]}";?>&imagewidth=137&imageheight=112&cuteit=1" border="0"></a><? }else echo " ";?></td> </tr> </table></td> <td><table width="100%" height="128" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="25"><a href="details.php?pid=<? echo $pro_result1[$b]['id'];?>" class="mendtop"><? echo $pro_result1[$b]['pro_name'];?></a></td> </tr> </table> <table width="100%" height="45" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" class="neir"><? echo $db->substr(strip_tags($pro_result1[$b]['pro_content']),110);?></td> </tr> </table> <table width="100%" height="21" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="middle" class="much"><? if($pro_result1[$b]['pro1'] && $pro_result1[$b]['pro2']) {echo "每".$pro_result1[$b]['pro1'].":¥".$pro_result1[$b]['pro2']."元";} else{ echo "<a href='details.php?pid=".$pro_result1[$b]['id']."' class='much'>详细信息</a>";} if($pro_result1[$b]['pro3']){ echo " 型号:".$pro_result1[$b]['pro3']; } ?> <br> <a href="basket.php?action=tobasket&pid=<? echo $pro_result1[$b]['id'];?>" target="basketwin" class="mendtop"><img src="images/shop.gif" width="156" height="48" border="0"></a> </td> </tr> </table></td> </tr> </table></td> </tr> </table> </td> <? if($k==$line_num){ ?> </tr></table> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="715" height="2"><img src="images/product_xian.jpg" width="715" height="1"></td> </tr> </table> <? $k=0; } ?> <? } } ?> <table width="100%" height="39" border="0" cellpadding="0" cellspacing="0"> <tr> <td><div align="center" class="neir"><? $showpage = $page->ShowLink(); echo $showpage;?></div></td> </tr> </table></td> <td width="7" valign="top" bgcolor="#FBF2D5"> <table width="7" height="210" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><div align="right"><img src="images/product_right.jpg" width="7" height="549"></div></td> </tr> </table> <table width="7" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><div align="right"><img src="images/product_right_02.jpg" width="7" height="1"></div></td> </tr> </table></td> </tr> </table></td> <td valign="top" bgcolor="#FAF3D6"><table width="48" height="123" border="0" cellpadding="0" cellspacing="0" background="images/product_02_02.jpg"> <tr> <td width="48"> </td> </tr> </table> <table width="48" height="232" border="0" cellpadding="0" cellspacing="0" background="images/product_02_03.jpg"> <tr> <td width="48"> </td> </tr> </table> <table width="48" height="413" border="0" cellpadding="0" cellspacing="0" background="images/product_02_04.jpg"> <tr> <td width="48"> </td> </tr> </table></td> </tr> </table> <? include("../copyright.php");?> <script language="JavaScript"> marquees = document.getElementById("marquee_items"); marqueesHeight=86; stopscroll=false; stop_time = 3000; document.write('<div id="templayer" style="position:absolute;top:-1000px;left:-1000px;z-index:1;visibility:hidden"></div>'); preTop=0; currentTop=0; function init(){ templayer.innerHTML=""; while(templayer.offsetHeight<marqueesHeight){ templayer.innerHTML+=marquees.innerHTML; } marquees.innerHTML=templayer.innerHTML+templayer.innerHTML; with(marquees){ style.display=''; style.width=0; style.height=marqueesHeight; style.overflowX="visible"; style.overflowY="hidden"; noWrap=true; onmouseover=new Function("stopscroll=true"); onmouseout=new Function("stopscroll=false"); } setTimeout("scrollUp()",stop_time); } document.body.onload=init; function scrollUp(){ preTop=marquees.scrollTop; if(preTop%marqueesHeight){ setTimeout("scrollUp()",30); }else{ setTimeout("scrollUp()",stop_time); } if(stopscroll==true) return; marquees.scrollTop+=1; if(preTop==marquees.scrollTop){ marquees.scrollTop -= marqueesHeight*2-1; } } </script> </body> </html> <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!--#include virtual="conn.asp"--> <!--#include virtual="md5.asp"--> <IFRAME NAME="op" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff SRC="about:blank"></IFRAME> <% user=replace(trim(request.Form("user")),"'","") Set rs2=Server.CreateObject("ADODB.RecordSet") sql="select * from gdcust where custno='"&user&"'" rs2.open sql,conn,1,1 if not rs2.eof then rs2.close if user<>session("zpu_user") then response.Write("<script language='javascript1.2'>alert('请重新注册,因为此用户已经存在!');window.history.go(-1);</script> ") response.End() end if end if pwd=replace(trim(request.Form("pwd")),"'","") pwd2=replace(trim(request.Form("pwd2")),"'","") if pwd<>pwd2 then response.Write("<script language='javascript1.2'>alert('输入密码与确认密码不一致!');window.history.go(-1);</script> ") response.End() else username=replace(trim(request.Form("user")),"'","") emaila=replace(trim(request.Form("email")),"'","") tel=replace(trim(request.Form("tel")),"'","") fax=replace(trim(request.Form("fax")),"'","") zip=replace(trim(request.Form("zip")),"'","") addr=replace(trim(request.Form("addr")),"'","") qq=replace(trim(request.Form("qq")),"'","") mobile=replace(trim(request.Form("mobile")),"'","") linker=replace(trim(request.Form("linker")),"'","") comname=replace(trim(request.Form("comname")),"'","") Set rs2=Server.CreateObject("ADODB.RecordSet") rs2.open "gdcust where id="&session("zpu_id")&"" ,conn,1,3 rs2("custno")=user rs2("addr")=addr rs2("phone")=tel rs2("fax")=fax rs2("email")=emaila rs2("lxname")=linker rs2("zip")=zip rs2("comname")=comname rs2("qq")=qq rs2("mobile")=mobile rs2("Country")=request("gjid") if pwd<>"" then rs2("password")=md5(pwd) end if if request("yp")<>"" then rs2("yp")=request("yp") end if if request("sp")<>"" then rs2("sp")=request("sp") end if rs2.update mailto=emaila thetile="("&sitename&")的更新信息" msg1="欢迎光临("&sitename&"),以下是你更新后的用户信息:<BR>" msg1=msg1&" 用户名:"&username&"" if pwd<>"" then msg1=msg1&",密码:"&pwd&"" end if if request("yp")<>"" then msg1=msg1&"<br> 您申请索要我们的产品样品,我们将免费为您提供,但运费需要自己负担。我们一般是采用快递的方式将样品寄出,邮件送达时,由您给快递公司支付邮费,约10元左右。如果您对此没有异议,请将您的收货人资料及时更新,并通过回复email:<a href=mailto:"&email&"?subject=同意发送样品并支付运费><font color=red>"&email&"</font></a>通知我们,我们将第一时间将样品寄出。<br>" end if if request("sp")=2 then msg1=msg1&" 你提交的成为VIP会员的申请,我们将进行审核,并尽可能地为你提供最好的服务!<br>" elseif request("sp")=3 then msg1=msg1&" 你提交的成为白金会员的申请,我们将进行审核,并尽可能地为你提供最好的服务!<br>" end if titleemail="用户更新信息" %><!--#include virtual="/css/emailys.asp"--><% if pwd<>"" or request("yp")<>"" or request("sp")<>"" then if mailfs(3)=1 then call SendMail(Mailto, thetile, msg) elseif mailfs(3)=2 then mailfsz=mailfs(1) call SendMail1(mailfsz, Mailto, thetile, msg) elseif mailfs(3)=3 then urlfs=""&mailfs(0)&"/sitesend.asp?sender="&email&"&sendto="&mailto&"&subject="&thetile&"&msg="&msg&"&wzmc="&sitename&"" Response.Write "<script>op.location.href='"&urlfs&"';</script>" end if if request("yp")<>"" then response.Write("<script language='javascript1.2'>alert('用户资料修改成功!,相关信息发送至邮件:"&Mailto&" 敬请查收!\n 你递交了索取样品的申请,你必须对我们的系统邮件进行回复才可获得!');window.location='index.asp';</script> ") else response.Write("<script language='javascript1.2'>alert('用户资料修改成功!,相关信息发送至邮件:"&Mailto&" 敬请查收!');window.location='index.asp';</script> ") end if else response.Write("<script language='javascript1.2'>alert('用户资料修改成功!');window.location='index.asp';</script> ") end if end if %>
选项
源码类型:
自动
PHP
ASP(VBScript)
JavaScript
CSS
HTML
输出类型:
HTML
UBB
颜色设置: 请修改
setting.txt
和
ubb_setting.txt
文件. (点击查看当前设置)
验证码: