<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<form method="post" action="admincp.php?action=<?=$action?>&file=<?=$file?>&op=list&">
    <input type="hidden" name="action" value="<?=$action?>" />
    <div class="space">
        <div class="subtitle">调用管理</div>
        <table class="maintable" border="0" cellspacing="0" cellpadding="0">
            <tr class="altbg2"><th colspan="9">
                <ul class="subtab">
                    <li<?=!$module?' class="current"':''?>><a href="admincp.php?action=<?=$action?>&file=<?=$file?>&op=<?=$op?>">全部模块</a></li>
                    <?foreach($_modules as $key => $val) {?>
                    <li<?=$module==$key?' class="current"':''?>><a href="admincp.php?action=<?=$action?>&file=<?=$file?>&op=<?=$op?>&module=<?=$key?>"><?=$val['name']?></a></li>
                    <?}?>
                </ul>
            </th></tr>
            <tr class="altbg1">
                <td width="20">删?</td>
                <td width="20">ID</td>
                <td width="*">名称</td>
                <td width="100">模块</td>
                <td width="100">调用函数</td>
                <td width="150">调用模板</td>
                <td width="60">缓存(秒)</td>
                <td width="60">代码</td>
                <td width="50">操作</td>
            </tr>
            <?if($total > 0){?>
            <?while($row=$db->fetch_array($query)) {
                $exp = unserialize($row['expression']);
            ?>
            <tr>
                <td><input type="checkbox" name="callids[]" value="<?=$row['callid']?>" /></td>
                <td><?=$row['callid']?></td>
                <td><?=$row['name']?></td>
                <td><?=$row['module']?></td>
                <td><?=$row['fun']?></td>
                <td><?=$row['tplname']?></td>
                <td><?=$exp['cachetime']?></td>
                <td><a href="admincp.php?action=<?=$action?>&file=<?=$file?>&op=code&callid=<?=$row['callid']?>">查看代码</a>
                <td><a href="admincp.php?action=<?=$action?>&file=<?=$file?>&op=<?=$row['calltype']=='fun'?'edit':'editsql'?>&callid=<?=$row['callid']?>">编辑</a></td>
            </tr>
            <?}?>
            <tr class="altbg1">
                <td colspan="9">
                    <button type="button" onclick="checkbox_checked('callids[]');" class="btn2" />全选</button>&nbsp;
                    <button type="button" onclick="window.location.href='admincp.php?action=modoer&file=datacall&op=add'" class="btn2" />新增函数调用</button>&nbsp;
                    <button type="button" onclick="window.location.href='admincp.php?action=modoer&file=datacall&op=addsql'" class="btn2" />新增SQL调用</button>&nbsp;
                    
                </td>
            </tr>
            <?} else {?>
                <td colspan="9">暂无信息。</td>
            <?}?>
        </table>
        <?if($total > 0){?>
        <?if($multipage){?><div class="multipage"><?=$multipage?></div><?}?>
        <center><input type="submit" name="datacallsubmit" value="删除所选" class="btn" /></center>
        <?}?>
    </div>
</form>
</div>