<?php }else if(trim($_GET[action])=="myorder"){
require("model/page.class.php");
$sql_p="select * from qh_orderlist where uid='$_SESSION[uid]'";
$query_all=mysql_query($sql_p);
$total=mysql_num_rows($query_all);
if(!empty($total)){
$page=new Page($total, $num="3");
$page1=$page->fpage(array(4,5,6));
$page2=$page->fpage(array(0,1));
}
$orderlist=sel("select * from qh_orderlist where uid='$_SESSION[uid]' order by paystatus asc,id desc {$page->limit}");
?>
<div class="abouts_r">
<div class="abouts_ra">我的订单</div>
<?php }else if(trim($_GET[action])=="mypaid"){
?>
<div id="paid" class="wdingd">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr class="trd">
<td rowspan="4">已购买课程</td>
<td>课程名称</td>
<td>价格</td>
<td>已购买课程</td>
</tr>
<tr>
<td>公益启蒙篇</td>
<td >68元</td>
<td></td>
</tr>
<tr >
<td>提高篇</td>
<td>128元</td>
<td></td>
</tr>
<tr >
<td>应用篇</td>
<td>398元</td>
<td></td>
</tr>
</table>
</div>
<?php
if($orderlist){
foreach($orderlist as $val){
$ordetail=sel("select * from qh_orderdetail where oid='$val[id]' order by id desc");
?>
<ul>
<li><a id="mykc" href="/user_center.php?action=mykc" onclick="ac('mykc')" >我的课程</a></li>
<li><a id="myorder" href="/user_center.php?action=myorder" class="a6" onclick="ac('myorder')" id="myorder">我的订单</a></li>
<li><a id="usecard" href="/user_center.php?action=usecard" class="a2" onclick="ac('usecard')" style="color:red">激活课程卡</a></li>
<!--<li><a href="#" class="a2">账户设置</a></li>-->
<li><a id="safe" href="/user_center.php?action=safe" class="a3" onclick="ac('safe')" >安全中心</a></li>
<li><a id="moddata" href="/user_center.php?action=moddata" class="a4" onclick="ac('moddata')" >修改资料</a></li>
<li><a id="coupon" href="/user_center.php?action=mypaid" class="a5" onclick="ac('mypaid')" >已购买课程</a></li>
<!--<li><a id="modpass" href="/user_center.php?action=modpass" class="a5" onclick="ac('modpass')" >修改密码</a></li>-->
<!--<li><a href="/user_center.php?action=findpass" class="a5">找回密码</a></li>-->
</ul>
我想让mypaid即可以在myorder里显示,也可以通过自己点击显示,应该用什么逻辑,或者是我放错位置了吗,应该怎么改呢,求指导。
pardon110