/[LeafOK_CVS]/fenglin/www/site_reg.php
ViewVC logotype

Contents of /fenglin/www/site_reg.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Fri Mar 28 11:28:09 2025 UTC (11 months, 2 weeks ago) by sysadm
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +0 -0 lines
FILE REMOVED
Remove legacy code

1 <?
2 require_once "../lib/db_open.inc.php";
3 ?>
4 <html>
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7 <title>枫林在线</title>
8 <link rel="stylesheet" href="css/default.css" type="text/css">
9 </head>
10 <body>
11 <center>
12 <?
13 include "./head.inc.php";
14 ?>
15 <table width="760" border="0" cellpadding="0" cellspacing="0">
16 <tr height=20 bgcolor=#F3F9FC>
17 <td width="20">&nbsp;</td>
18 <td>枫林在线 &gt;&gt; <a href="search.php">搜索</a> &gt;&gt; 网站登录</td>
19 <td width="20">&nbsp;</td>
20 </tr>
21 <tr>
22 <td colspan=3 height=1 bgcolor=gray></td>
23 </tr>
24 <tr height=5>
25 <td>&nbsp;</td>
26 </tr>
27 </table>
28 <table width="760" border="0" cellpadding="0" cellspacing="0">
29 <tr>
30 <td width="10%"></td>
31 <td width="80%" align="center" class="td4">
32 <table width="95%" border="0" cellpadding="0" cellspacing="0">
33 <tr height="10">
34 <td></td>
35 </tr>
36 <tr>
37 <td>
38 <?
39 if (isset($_POST["sitename"]))
40 $sitename=trim($_POST["sitename"]);
41 else
42 $sitename="";
43 if (isset($_POST["url"]))
44 $url=trim($_POST["url"]);
45 else
46 $url="";
47 if (isset($_POST["class"]))
48 $class=trim($_POST["class"]);
49 else
50 $class="";
51 if (isset($_POST["location"]))
52 $location=trim($_POST["location"]);
53 else
54 $location="";
55 if (isset($_POST["description"]))
56 $description=trim($_POST["description"]);
57 else
58 $description="";
59 if (isset($_POST["name"]))
60 $name=trim($_POST["name"]);
61 else
62 $name="";
63 if (isset($_POST["email"]))
64 $email=trim($_POST["email"]);
65 else
66 $email="";
67
68 $sitename=addslashes($sitename);
69 $url=addslashes($url);
70 switch($class)
71 {
72 case "WWW":
73 case "FTP":
74 case "TELNET":
75 case "BC":
76 case "MMS":
77 break;
78 default:
79 $class="WWW";
80 }
81 switch($location)
82 {
83 case "LAN":
84 case "INTERNET":
85 break;
86 default:
87 $type="INTERNET";
88 }
89 $description=addslashes($description);
90 $name=addslashes($name);
91 $email=addslashes($email);
92
93 if ($sitename=="" || $description=="" || $name=="" || $email=="")
94 {
95 echo ("资料填写不完整!");
96 }
97 else
98 {
99 $rs=mysql_query("select ID from s_e where enable=1 and url='$url'")
100 or die("Query data error!");
101 if (mysql_num_rows($rs))
102 {
103 echo ("网址已存在!");
104 }
105 else
106 {
107 mysql_query("insert into s_e (sitename,url,class,location,description,name,".
108 "email,ip) values('$sitename','$url','$class','$location','$description','$name',".
109 "'$email','".client_addr()."')")
110 or die("Add data error!");
111 echo ("资料提交完成,我们将在两个工作日内办理。<br>\n");
112 echo("感谢您的支持!\n");
113 }
114 mysql_free_result($rs);
115 mysql_close($db_conn);
116 }
117 ?>
118 </td>
119 </tr>
120 <tr height="10">
121 <td></td>
122 </tr>
123 </table>
124 </td>
125 <td width="10%"></td>
126 </tr>
127 </table>
128 <?
129 include "./foot.inc.php";
130 ?>
131 </center>
132 </body>
133 </html>

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1