網站登入功能<?PHP///=====================================================================================///注意事項///=====================================================================================/****<form>標籤中的 action 屬性,設為空白。 即 <form name="form1" action="" method="post" >****/ ///=====================================================================================///區塊一///插入位置:在最頂端///=====================================================================================session_start();session_register('sid');$account="admin"; ///←輸入帳號$password="pass"; ///←輸入密碼$form_acc="Username"; ///←輸入帳號的文字欄位$form_pwd="Password"; ///←輸入密碼的文字欄位$form_url="url"; ///←輸入連結網址的變數$form_show="show"; ///←輸入顯示的視窗是原視窗還是新視窗的變數if($_POST['hdnGoBack']){ $back_url=$_POST['hdnGoBack'];}else{ $back_url=getenv('HTTP_REFERER');}$p_acc=$_POST[$form_acc];$p_pwd=$_POST[$form_pwd];$p_url=$_REQUEST[$form_url];$p_show=$_REQUEST[$form_show]; if($_SESSION["sid"] || ($p_acc==$account && $p_pwd==$password) ){ $_SESSION["sid"]=session_id(); $pass="gopass"; ///header("LOCATION:{$p_url}");}///=====================================================================================?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><SCRIPT LANGUAGE="JavaScript"><!--<!-- Beginfunction formHandler(form) {var windowprops = "location=yes,scrollbars=yes,toolbar=yes,menubar=yes,resizable=yes,";var URL = form.site.options[form.site.selectedIndex].value;popup = window.open(URL,"MenuPopup",windowprops);}// End -->//--></SCRIPT> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>CHUAN LIH FA MACHINERY WORKS CO., LTD.</title><style type="text/css"><!--body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-image: url();}--></style><link href="css/clf.css" rel="stylesheet" type="text/css"><style type="text/css"><!--.style4 {color: #990000}.style1 {color: #544436}--></style><!-------------------------------------------------------------------------------------><!---/// 區塊二 ///---><!---///插入位置:在</head>之前///---><!-------------------------------------------------------------------------------------><?PHP$js="<script language='JavaScript'> var pass = '{$pass}'; var back_url= '{$back_url}'; var p_show='{$p_show}'; var p_url='{$p_url}'; if(pass=='gopass'){ switch(p_show){ case 'blank': win=window.open(p_url,''); location.href=back_url; break; case 'self': location.href=p_url; break; default: break; } } </script>";echo $js; ?><!-------------------------------------------------------------------------------------></head><body> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="447" valign="top" bgcolor="#000000"><table width="447" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="447"><img src="other/company-word.gif" width="447" height="34"></td> </tr> <tr> <td height="116"><img src="other/login-dd.jpg" width="447" height="116"></td> </tr> </table></td> <td width="20%" height="116" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td height="34" background="other/centact-top.gif"> </td> </tr> </table> <table width="100%" height="116" border="0" cellpadding="0" cellspacing="0"> <tr> <td background="other/ligh-dd.gif"> </td> </tr> </table></td> <td width="325" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="other/company-word2.gif" width="325" height="34" border="0" usemap="#MapMapMapMap"></td> </tr> <tr> <td background="other/cfl-dd.gif"><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="325" height="116"> <param name="movie" value="flash/customer.swf"> <param name="quality" value="high"> <param name="wmode" value="transparent"> <embed src="flash/customer.swf" width="325" height="116" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed> </object></td> </tr> </table></td> <td width="20%" rowspan="3" background="other/dd2-1.gif"><map name="MapMapMapMap"> <area shape="rect" coords="170,5,227,29" href="../taiwan/index.htm"> <area shape="rect" coords="232,4,285,28" href="index.htm"> </map></td> </tr> <tr> <td height="30" colspan="3" valign="middle" background="other/button-dd.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="other/00.gif" width="21" height="8"></td> <td><a href="c-2.htm" class="button-link">About Us </a><img src="other/+.gif" width="28" height="7"></td> <td><div align="left"></div> <a href="product.htm" class="button-link">Machines</a><img src="other/+.gif" width="28" height="7"></td> <td><a href="worldwide.htm" class="button-link">Worldwide</a><img src="other/+.gif" width="28" height="7"></td> <td><a href="support.htm" class="button-link">Support</a><img src="other/+.gif" width="28" height="7"></td> <td><a href="login.php?url=http://www.clf.com.tw/english/e-catalog/chuanlihfa/index.html&show=blank" target="_self" class="button-link">E-catalog</a><img src="other/+.gif" width="28" height="7"></td> <td><a href="contact.htm" class="button-link">Contact Us</a><img src="other/+.gif" width="28" height="7"></td> <td><a href="news.htm" class="button-link">Hot News</a></td> <td><img src="other/+.gif" width="28" height="7" align="absmiddle"></td> <td valign="top"><a href="login.php" class="button-link">Sitemap</a></td> <td><div align="right"><img src="other/00.gif" width="20" height="8"></div></td> </tr> </table></td> </tr> <tr> <td height="100%" colspan="3" valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"><table width="100%" height="100%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="34"><img src="other/frame-1.gif" width="34" height="35"></td> <td background="other/frame-5.gif"> </td> <td width="65"><img src="other/frame-2.gif" width="65" height="35"></td> </tr> <tr> <td width="34" rowspan="2" background="other/frame-7.gif"> </td> <td rowspan="2" valign="top" background="other/frame-10.gif"><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="other/customer-word.gif" width="177" height="54"></td> </tr> <tr> <td><div align="center"> <form action="" method="post" name="form1" id="form1"> <table width="296" height="261" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td background="other/login.gif"><p> </p> <br> <br> <br> <br> <br> <br> <table width="227" border="0" align="center"> <tr> <td width="86" height="26" valign="bottom" class="p11"><strong><font color="#000000">User Name </font></strong></td> <td width="112" valign="bottom"><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"> <input type="text" name="Username" size="15" maxlength="10"></font></td> <td width="15"> </td> </tr> <tr> <td class="p11"><strong>password</strong></td> <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"> <input type="password" name="Password" size="15" maxlength="10"></font></td> <td> </td> </tr> <tr> <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"> </font> <div align="right"><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"> </font></div></td> <td><font color="#000000" size="2" face="Arial, Helvetica, sans-serif"> <input name="submit2" type="submit" class="button" value="Login"> <img src="other/00.gif" width="5" height="5"> <input name="Submit22" type="submit" class="button" value="Reset"> </font></td> <td> </td> </tr> </table> <br></td> </tr> <tr> <td background="other/login.gif"></td> </tr> </table> <table width="100%" height="38" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="p11"><div align="center"> <a href="need.htm" class="style4">Contact Us for Account Password </a></div></td> </tr> </table><!-------------------------------------------------------------------------------------><!---/// 區塊三 ///---><!---///插入位置:在</form>之前///---><!-------------------------------------------------------------------------------------> <input type="hidden" name="hdnGoBack"><!-------------------------------------------------------------------------------------> </form> </div></td> </tr> </table> <div align="right"></div></td> <td width="65" valign="top" background="other/frame-9.gif" bgcolor="#FFFFFF"><img src="other/frame-8.gif" width="65" height="173"></td> </tr> <tr> <td valign="bottom" background="other/frame-9.gif" bgcolor="#FFFFFF"><a href="#" class="p10"><strong><br> </strong></a></td> </tr> <tr> <td valign="top"><img src="other/frame-3.gif" width="34" height="30"></td> <td valign="bottom" background="other/frame-6.gif"> </td> <td valign="top"><img src="other/frame-4.gif" width="65" height="30"></td> </tr> </table></td> </tr> <tr> <td width="3%" height="100%"> </td> <td><table width="100%" height="126" border="0" cellpadding="0" cellspacing="0"> <tr> <td valign="top" class="p10"><strong>CHUAN LIH FA MACHINERY WORKS CO., LTD. </strong><br> No. 17, Lane 360, Chung Cheng S. Road, Yuen Kang City, Tainan Hsien, 710 <strong>Taiwan</strong><br> Tel:+886-6-2532111 <img src="other/00.gif" width="49" height="8"> Fx:+886-6-2533311,2548859<br> http:www.clf.com.tw <img src="other/00.gif" width="65" height="8">E-mail:<a href="contact.htm" class="p10">clf@clf.com.tw</a></td> </tr> <tr> <td valign="top" class="p10"><span class="style1"><strong>ZHONG-SHAN CHUAN LIH FA MACHINERY CO., LTD.<br> </strong>No. 3, Nan-Ton Blvd., Nan-Tou Town, Zhong-Shan <br> City, Guang-Dong Province, <strong>China</strong><br> Tel:+86-760-3116801-5 <img src="other/00.gif" width="16" height="8">Fax:+886-760-3116806</span> </td> </tr> </table></td> </tr> </table></td> </tr> </table></td> </tr> </table><!-------------------------------------------------------------------------------------><!---/// 區塊四 ///---><!---///插入位置:在</body>之前///---><!-------------------------------------------------------------------------------------><?PHP$js2="<script language='JavaScript'> document.form1.elements['hdnGoBack'].value=back_url; </script>";echo $js2; ?><!-------------------------------------------------------------------------------------> </body></html> .msgcontent .wsharing ul li { text-indent: 0; } 分享 Facebook Plurk YAHOO! .
- May 23 Wed 2012 16:53
網站登入功能
close
全站熱搜
留言列表
禁止留言