——此文章摘自《完全手册PHP网络开发详解》定价
¥
特价
¥
详细>>http://track
linktech
cn/?m_id=dangdang&a_id=A
&l=
&l_type
=
width=
height=
border=
nosave>
网站的首页HTML代码存放在模板文件中代码如下所示
<! 模板文件templates/default/indexincphp >
<html>
<head>
<title>欢迎<?php echo $_SESSION[MM_Username]; ?>使用
<?php echo $row_rs_config[website_name]; ?></title>
<meta httpequiv=ContentType content=text/html; charset=gb>
<style type=text/css>
<!
style {
fontsize: px;
fontweight: bold;
}
>
</style>
</head>
<body>
<div align=center>
<p class=style>欢迎<?php echo $_SESSION[MM_Username]; ?>使用
<?php echo $row_rs_config[website_name]; ?></p>
<HR>
<table width= border= cellspacing= cellpadding=>
<tr>
<td width= align=left valign=top><?php do { ?>
<a href=listphp?type_id=<?php echo $row_rs_types[type_id]; ?>>
<?php echo $row_rs_types[type_name]; ?></a><BR>
<?php } while ($row_rs_types = mysql_fetch_assoc($rs_types)); ?> </td>
<td width= align=left><?php do { ?>
* <a href=showphp?article_id=<?php echo $row_rs_articles [article_
id]; ?>>
<?php echo $row_rs_articles[title]; ?></a>(<?php echo $row_rs_articles
[author]; ?>|
<?php echo $row_rs_articles[last_upt_time]; ?>) <BR>
<?php } while ($row_rs_articles = mysql_fetch_assoc($rs_articles)); ?> </td>
<td width= valign=top>
<?php
if(!isset($_SESSION[MM_Username])) {
?> <form name=form method=POST action=<?php echo $loginFormAction; ?>>
<p align=center>登录</p>
<table width= border= cellspacing= cellpadding=>
<tr>
<td>用户名</td>
<td><input name=username type=text id=username></td>
</tr>
<tr>
<td>密码</td>
<td><input name=password type=password id=password></td>
</tr>
</table>
<p align=center>
right>[] [http://developcsaicn/web/htm>] [http://developcsaicn/web/htm>] [http://developcsaicn/web/htm>]