線上書籍

Home

[991]PHP網站開發 進階應用技巧2

<?php
include "setup.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
  <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title></title>
  <link rel="stylesheet" type="text/css" href="dhtmlxSuite/dhtmlxMenu/codebase/skins/dhtmlxmenu_dhx_skyblue.css">
<script src="dhtmlxSuite/dhtmlxMenu/codebase/dhtmlxcommon.js"></script>
<script src="dhtmlxSuite/dhtmlxMenu/codebase/dhtmlxmenu.js"></script>

    <style>
        html, body {
            width: 100%;
            height: 100%;
            margin: 0px;
            padding: 0px;
            overflow: hidden;
        }
    </style>
   
<script>
    var menu;
    function initMenu() {
        menu = new dhtmlXMenuObject("menuObj");
        menu.setIconsPath("icons/");
        menu.loadXML("menu.xml");
    }
</script>   


  </head>
  <body onload="initMenu();">
<div id="menuObj"></div>
  <?php
  if(!empty($_GET['sn'])){
    $sql = "select * from note where sn='{$_GET['sn']}'";
    $result=mysql_query($sql);
    list($sn,$title,$content,$post_date)=mysql_fetch_row($result);
    echo "<h1>$title</h1><p>$content</p>";
  }else{
    echo "尚無指定文章";
  }
?>

  </body>
</html>