Giúp mình bài tập lập trình web

tieuquynd

C O N T R A
Lão Làng GVN
Tham gia ngày
6/10/05
Bài viết
1,871
Reaction score
3,515
Mình đang làm bài tập môn lập trình web và gặp chút lỗi trong việc liên kết đường dẫn menu. Không hiểu sao mình chạy trên localhost thì liên kết rất ngon lành nhưng khi đưa lên host để chạy trên mạng thì click vào đâu nó cũng vẫn cứ ở trang chủ mà không chuyển đến trang khác. Các bạn xem dùm mình xem nên sửa như thế nào với.
Đây là trang của mình http://nicol.byethost15.com
Còn đây là CODE của trang index.php:
Mã:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Trường Cao đẳng Công nghiệp Nam Định</title>
</head>

<body>

<table border="0" width="100%" cellspacing="1" cellpadding="1" id="table1">
	<tr>
		<td colspan="3" valign="top" width="100%"><?php include("header.php"); ?> </td>
	</tr>
	<tr>
		<td valign="top" width="18%" bgcolor=#FFCCCC>
		<?php include("menu.php"); ?>
		<p> </p>
		<?php include("anh.php"); ?>
		</td>
		
		<td valign="top" width="64%">
		<?php
		switch ($act) {
	case "lichsutruong":
		include("lichsutruong.php");
        break;
    case "thanhtichtruong":
		include("thanhtichtruong.php");
        break;
    case "cosovatchat":
		include("cosovatchat.php");
        break;
    case "bangiamhieu":
		include("bangiamhieu.php");
		break;
    case "tracuudiem":
		include("tracuudiem.php");
        break;
    case "thoikhoabieu":
		include("thoikhoabieu.php");
        break;
    case "giaotrinh":
		include("giaotrinh.php");
        break;
    case "lienhe":
		include("lienhe.php");
        break;
    case "tuyensinh":
        include("tuyensinh.php");
        break;
    case "hocphi":
        include("hocphi.php");
        break;
    case "miengiamhocphi":
        include("miengiamhocphi.php");
        break;
    case "tttn":
        include("tttn.php");
        break;
    case "dangnhap":
        include("dangnhap.php");
        break;
    case "dangky":
        include("dangky.php");
        break;
        } ?>
        <?php if ($act=="") {?>
        <?php include ("trangchu.php"); ?>
        <?php } ?>
		</td>
		
		<td valign="top" width="18%" bgcolor=#FFCCCC>
		<?php include("tintuc.php"); ?>
		</td>
	</tr>
	
	<tr>
		<td colspan="3"><?php include("footer.php"); ?> </td>
	</tr>
</table>

</body>

</html>

Code của trang menu.php

Mã:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>New Page 1</title>

<script type="text/javascript" src="_pgtres/stmenu.js"></script></head>

<body>

<p><!-- Sothink Widgets Begin, Do not edit it -->
<script id="sothink_widgets:_pgtres-40603.3939351852_PageletServer.DynamicMenu.pgt" type="text/javascript">
<!--
stm_bm(&#91;"menu3b81",900,"","_pgtres/blank.gif",0,"","",0,0,250,200,1000,1,0,0,"","",0,0,1,2,"default","hand","",1,25&#93;,this);
stm_bp("p0",&#91;1,4,0,0,0,2,10,7,100,"",-2,"",-2,50,0,0,"#999999","transparent","_pgtres/line.gif",3,0,0,"#000000","_pgtres/up.gif",23,210,0,"transparent","",3,"",-1,-1,0,"transparent","_pgtres/rightline.gif",3,"_pgtres/down.gif",22,210,0,"transparent","",3,"",-1,-1,0,"transparent","_pgtres/leftline.gif",3,"_pgtres/leftup.gif","_pgtres/rightup.gif","_pgtres/rightdown.gif","_pgtres/leftdown.gif",19,23,18,23,18,22,19,22&#93;);
stm_ai("p0i0",&#91;0,"Trang chủ","","",-1,-1,0,"index.php","_self","","","_pgtres/dian.gif","_pgtres/dianmove.gif",10,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#C1E7F4",0,"","",3,3,0,0,"#C8E5EE","#000000","#0000CC","#FF0000","bold 13pt 'Times New Roman','Times','serif'","bold 13pt 'Times New Roman','Times','serif'",0,0,"","","","",0,0,0&#93;,206,0);
stm_aix("p0i1","p0i0",&#91;0,"Diễn đàn","","",-1,-1,0,"http://localhost/nicol/forum.php"&#93;,206,0);
stm_aix("p0i2","p0i0",&#91;0,"Giới thiệu về trường","","",-1,-1,0,"","_self","","","_pgtres/dian.gif","_pgtres/dianmove.gif",10,7,0,"_pgtres/black-r.gif","_pgtres/red1-r.gif",7,7&#93;,206,0);
stm_bpx("p1","p0",&#91;1,2,20,0,4,1,10,0,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0,motion=forward,enabled=0,Duration=0.30)",6,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0,motion=reverse,enabled=0,Duration=0.30)",7,80,0,0,"#999999","#CCE8F0","",3,0,0,"#999999","_pgtres/up.gif",23,140,0,"transparent","",3,"",-1,-1,0,"transparent","_pgtres/rightline.gif",3,"_pgtres/down.gif",22,140&#93;);
stm_aix("p1i0","p0i0",&#91;0,"Lịch sử phát triển","","",-1,-1,0,"index.php?act=lichsutruong","_self","","","_pgtres/dian1.gif","_pgtres/dianmove.gif",10,7,0,"","",0,0,0,0,1,"#FFFFF7",1,"#FFFFFF",0,"","",3,3,0,0,"#C8E5EE","#000000","#0000CC","#FF0000","bold 10pt 'Times New Roman','Times','serif'","bold 10pt 'Times New Roman','Times','serif'"&#93;,130,0);
stm_aix("p1i1","p1i0",&#91;0,"Thành tích đạt được","","",-1,-1,0,"index.php?act=thanhtichtruong"&#93;,130,0);
stm_aix("p1i2","p1i0",&#91;0,"Cơ sở vật chất","","",-1,-1,0,"index.php?act=cosovatchat"&#93;,130,0);
stm_aix("p1i3","p1i0",&#91;0,"Ban giám hiệu","","",-1,-1,0,"index.php?act=bangiamhieu"&#93;,130,0);
stm_ep();
stm_aix("p0i3","p0i2",&#91;0,"Các phòng ban"&#93;,206,0);
stm_bpx("p2","p1",&#91;&#93;);
stm_aix("p2i0","p1i0",&#91;0,"Tổ chức hành chính","","",-1,-1,0,"#"&#93;,130,0);
stm_aix("p2i1","p2i0",&#91;0,"Phòng đào tạo"&#93;,130,0);
stm_aix("p2i2","p2i0",&#91;0,"Tài chính kế toán"&#93;,130,0);
stm_aix("p2i3","p2i0",&#91;0,"Quản trị vật tư"&#93;,130,0);
stm_aix("p2i4","p2i0",&#91;0,"Phòng công tác HSSV"&#93;,130,0);
stm_aix("p2i5","p1i0",&#91;0,"Phòng tuyển sinh","","",-1,-1,0,""&#93;,130,0);
stm_aix("p2i6","p2i5",&#91;0,"Ban thanh tra"&#93;,130,0);
stm_ep();
stm_aix("p0i4","p0i2",&#91;0,"Khoa đào tạo"&#93;,206,0);
stm_bpx("p3","p1",&#91;1,2,20,0,4,1,10,0,100,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0,motion=forward,enabled=0,Duration=0.30)",6,"progid:DXImageTransform.Microsoft.Wipe(GradientSize=1.0,wipeStyle=0,motion=reverse,enabled=0,Duration=0.30)",7,80,0,0,"#999999","#C1E7F4"&#93;);
stm_aix("p3i0","p2i0",&#91;0,"Công nghệ thông tin"&#93;,130,0);
stm_aix("p3i1","p2i0",&#91;0,"Cơ khí - Động lực"&#93;,130,0);
stm_aix("p3i2","p2i0",&#91;0,"Điện - Điện tử"&#93;,130,0);
stm_aix("p3i3","p2i0",&#91;0,"May thời trang"&#93;,130,0);
stm_aix("p3i4","p2i0",&#91;0,"Kinh tế"&#93;,130,0);
stm_ep();
stm_aix("p0i5","p0i0",&#91;0,"Tra cứu điểm","","",-1,-1,0,"index.php?act=tracuudiem"&#93;,206,0);
stm_aix("p0i6","p0i0",&#91;0,"Thời khóa biểu","","",-1,-1,0,"index.php?act=thoikhoabieu"&#93;,206,0);
stm_aix("p0i7","p0i0",&#91;0,"Giáo trình & tài liệu","","",-1,-1,0,"index.php?act=giaotrinh"&#93;,206,0);
stm_aix("p0i8","p0i0",&#91;0,"Đóng góp ý kiến","","",-1,-1,0,"index.php?act=lienhe"&#93;,206,0);
stm_ep();
stm_em();
//-->
</script>

</p>

</body>

</html>
 
Có ai giúp mình không :(( ?
 
cái $act ở trang index kia khai báo và lấy giá trị ở trang nào, thiếu $act = $_GET["act"] chăng :-/
 
Ừm đúng rồi mình thiếu cái đó. Chỉ cần thêm dòng đó vào là được phải ko bạn? Để mình vè thử xem.
 
Mình đã làm được rồi. Cám ơn bạn nhiều nhé :)! Hi.
Xong việc rồi mod đóng topic và dọn đi hộ mình nhé.
 
Back
Top