您现在的位置: 军旅同心 >> 读书赏析 >> 学习园地 >> 电脑网络 >> 技术文章 >> 文章正文
PHP+MYSQL的文章管理系统(二)
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005-9-10 14:29:59
t;</td>
    <td>
<form> 跳转到:
        <select name="page" onchange="top.location='<? echo $php_self;?>?page='+document.forms[1].elements[0].value+'&type=<?echo $type;?>';" class="border">
          <?
  for($i=0;$i<$total_page;$i++)
    {
     $p=$i+1;
     echo "<option value=$i";
     if($page==$i) echo " selected" ;
     echo ">第".$p."页</option>n";
     }
?>
        </select> </form>
</td>
<td>
<form >选择栏目:
        <select name="type"  onchange="top.location='<? echo $php_self;?>?type='+document.forms[2].elements[0].value<?if($comm) echo"+'&comm=1'";?>;" >
          <? $typ=file("list.txt");
$num=count($typ);
for($i=0;$i<$num;$i++)
{
  echo"<option value=$typ[$i] "; if(trim($typ[$i])==$type) {  echo "  selected"; } echo ">$typ[$i]</option>";}
      ?>
        </select>
    </form>
</td><td><form method="post" action=<? echo $PHP_SELF;?>?type=<?echo $type;?> target="_balnk"><input type="submit" name="comm" value="精品文章" class=border></form></td>
</tr>
</table>
<?require "./inc/footer.inc";?>
#####################read_article.php#########################
<?
require"./inc/func.php";
if(!$id)
{
  echo"<script>window.close();</script>";
   exit();
}
mscon();
$query="select * from $table where id='$id'";
$res=mysql_db_query("$database",$query);
if(!$res)
  {
    echo "this article has been deleted or no this article!!";
    exit();
  }
$data=mysql_fetch_array($res);
add_hits($data[id]);
$pre=$data[id]-1;
$next=$data[id]+1;
?>
<HTML>
<HEAD>
<TITLE>
<?   echo "$data[title]--[$data[type]]";?>
</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<style type=text/css>
<!--
body,table,td,input,textarea {  font-family: "宋体"; font-size: 9pt}
select {  font-family: "宋体"; font-size: 9pt}
code {font-family: "Courier" ; font-size: 10pt}
a {  color: #005500}
a:hover {  color: #CC0000}
.border {border: 1px #000000 solid; background-color:transparent; list-style-position: inside; list-style-type: square}
-->
</style>
<script language="javascript">
function name()
{
  var theResult = true;
  var elem4 = null;

  if (document.forms[0].elements[0].value == "" || document.forms[0].elements[0].value == "undefined" || document.forms[0].elements[0].value == "null")
  {
    elem4 = prompt("请输入您的姓名:","");
    theResult = false;
    document.forms[0].elements[0].value = elem4;
  }
  return theResult;
}
function mail()
{
  var theResult = true;
  var elem1 = null
  if ((document.forms[0].elements[1].value.indexOf('@') == -1 || document.forms[0].elements[1].value == "" || document.forms[0].elements[1].value.indexOf('.') == -1))
  {
    elem1 = prompt("请输入您的正确的电子邮件地址。谢谢!!","");
    theResult = false;
    document.forms[0].elements[1].value = elem1;
  }
  return theResult;
}
function go()
{
var theResult=true;
theResult = name()&&mail();
return theResult;
}
</script>
</HEAD>
<BODY text=#000000 bgColor=#ffffff>
<TABLE borderColor=#339933 cellSpacing=0 borderColorDark=#ffffff
cellPadding=0 align=center borderColorLight=#000000 border=1 width=545>
  <TBODY>
  <TR vAlign=center bgColor=#009900>
    <TD background=images/third-back3.gif>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
          <TD width=17>&nbsp;</TD>
          <TD width=590>
            <TABLE width="36%" align=center border=0>
              <TBODY>
              <TR>
                <TD bgcolor="#009900">
                  <DIV align=center><FONT face="Verdana, Arial, Helvetica, sans-serif" color=#ffffff><b>
                    <? echo $data[title];?>
                    </b></FONT></DIV>
                </TD></TR></TBODY></TABLE></TD>
          <TD width=19>
            <DIV align=center><A href="javascript:window.close()"><IMG height=17
            src="images/third-close.gif" width=17 align=absMiddle
            border=0 name=content_r03_c28></A></DIV>
          </TD></TR></TBODY></TABLE></TD></TR>
  <TR vAlign=center align=left bgColor=#cccccc>
    <TD>
      <TABLE cellSpacing=0 cellPadding=0 border=0 align="center" width="100%">
        <TBODY>
        <TR>
          <TD>
            <DIV align=left><A class=whitetxt
            href="read_article.php?id=<? echo  $pre;?>"><img src="images/prethread.gif" width="48" height="12" border="0"></A></DIV>
          </TD>
          <TD>
            <DIV align=left><a class=whitetxt
            href="read_article.php?id=<? echo $next;?>"><img src="images/nextthread.gif" width="48" height="12" border="0"></a></DIV>
          </TD>
          <TD><IMG
            height=16 src="images/mail.gif" width=16></TD>
          <TD class=myfont><A class=redtxt
            href="commend.php?id=<? echo "$data[id]&title=$data[title]";?>">推荐给朋友</A></TD>
          <TD> 发表时间:
            <? echo $data[time];?>
            阅读次数:
            <? echo $data[hits];?>
          </TD>
          <TD>&nbsp; </TD>
 &nb

上一页  [1] [2] [3] 下一页


 
免责声明:作品版权归所属媒体与作者所有!!本站刊载此文不代表同意其说法或描述,仅为提供更多信息。如果您认为我们侵犯了您的版权,请告知!本站立即删除。有异议请联系我们。
文章录入:烟灰缸    责任编辑:烟灰缸 
网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
| 设为首页 | 加入收藏 | 联系站长 | 友情链接 | 版权申明 | 网站公告 | 管理登录 |