Skip to content

Commit

Permalink
增加了菜单模块,修改了CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
cforth committed Feb 24, 2014
1 parent 04f475b commit 7ba0c41
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 28 deletions.
4 changes: 3 additions & 1 deletion module/footer.php
@@ -1,8 +1,10 @@
</div>

<div id="footer">
<hr />
<p>©2013-2014 <a href="http://cfishacker.com/">chaif87</a>. All rights reserved.</p>
</div>
</div>

</body>
</html>
13 changes: 12 additions & 1 deletion module/header.php
Expand Up @@ -11,4 +11,15 @@
<div id="header">
<h1>股 票 模 拟 交 易</h1>
</div>
<div id="text">
<div id="page">
<div id="menu">
<h2>菜单</h2>
<br />
<ul>
<li><a href="home.php">主页面</a></li>
<li><a href="business.php">交易</a></li>
</ul>
</div>
<div id="main">
7 changes: 2 additions & 5 deletions public/business.php
Expand Up @@ -45,7 +45,7 @@
require '../module/header.php';
?>

<h1>交易</h1>
<h2>交易</h2>

<form action="<?php print($_SERVER["PHP_SELF"]) ?>" method="post">
<select name="wtfx">
Expand All @@ -68,16 +68,13 @@
</tr>
<tr>
<td></td>
<td><input type="submit" value="委托"></td>
<td><input type="submit" class="push" value="委托"></td>
</tr>
</table>
</form>

<p><?php print($prompt) ?></p>

<ul>
<li><a href="home.php">回主页面</a></li>
</ul>

<h2>历史委托明细:</h2>
<?php
Expand Down
37 changes: 32 additions & 5 deletions public/css/mystyle.css
Expand Up @@ -4,25 +4,44 @@
}

div#header {
height:50px;
margin:0 auto;
width:800px;
border:0;
height:65px;
background-color:#F1F1F1;
color:#0066CC;
border-style:none;
text-align:center;
/*text-indent:10px;*/
margin-bottom:10px;
}

div#text {
div#page {
width:800px;
margin:10px;
margin:0 auto;
border-style:none;
}

div#menu {
width:150px;
margin:0 auto;
float:left;
height:auto!important;
min-height:800px;
}

div#main {
width:650px;
margin:0 auto;
float:left;
height:auto!important;
min-height:800px;
}

div#footer {
width:800px;
border:0;
text-align:center;
background-color:#F1F1F1;
}

body {
Expand Down Expand Up @@ -50,13 +69,21 @@ a:hover {
text-decoration:underline;
}

h1 {
font-size:45px;
}

ul {
margin:0;
}

li {
list-style:none;
font-size:25px;
font-size:20px;
}

input.push {
padding:5px;
width:60px;
margin:5px;
}
5 changes: 2 additions & 3 deletions public/home.php
Expand Up @@ -4,14 +4,13 @@
require '../module/header.php';
?>
<?php if (isset($_SESSION["authenticated"])) { ?>
<h1>欢迎您, <?php print($_SESSION['user']) ?> !</h1>
<h2>欢迎您, <?php print($_SESSION['user']) ?> !</h2>
<br />
<ul>
<li><a href="logout.php">注销</a></li>
<li><a href="business.php">交易</a></li>
</ul>
<?php } else { ?>
<h1>请登录或注册新用户!</h1>
<h2>请登录或注册新用户!</h2>
<ul>
<li><a href="login.php">登陆</a></li>
<li><a href="register.php">注册</a></li>
Expand Down
7 changes: 2 additions & 5 deletions public/login.php
Expand Up @@ -46,6 +46,7 @@
require '../module/header.php';
?>

<br />
<form action="<?php print($_SERVER["PHP_SELF"]) ?>" method="post">
<table>
<tr>
Expand All @@ -59,16 +60,12 @@
</tr>
<tr>
<td></td>
<td><input type="submit" value="登陆"></td>
<td><input type="submit" class="push" value="登陆"></td>
</tr>
</table>
<p><?php print($prompt) ?></p>
</form>

<ul>
<li><a href="home.php">回主页面</a></li>
</ul>

<?php
require '../module/footer.php';
?>
5 changes: 1 addition & 4 deletions public/logout.php
Expand Up @@ -12,10 +12,7 @@
require '../module/header.php'
?>

<h1>您已经登出!</h1>
<ul>
<li><a href="home.php">回主页面</a></li>
</ul>
<h2>您已经登出!</h2>

<?php
require '../module/footer.php';
Expand Down
6 changes: 2 additions & 4 deletions public/register.php
Expand Up @@ -50,6 +50,7 @@
require '../module/header.php';
?>

<br />
<form action="<?php print($_SERVER["PHP_SELF"]) ?>" method="post">
<table>
<tr>
Expand All @@ -63,16 +64,13 @@
</tr>
<tr>
<td></td>
<td><input type="submit" value="注册"></td>
<td><input type="submit" class="push" value="注册"></td>
</tr>
</table>
</form>

<p><?php print($prompt) ?></p>

<ul>
<li><a href="home.php">回主页面</a></li>
</ul>

<?php
require '../module/footer.php';
Expand Down

0 comments on commit 7ba0c41

Please sign in to comment.