function listbtn($rs) { $a = '<a href="' . iURL::get('category', $rs)->href . '" class="btn btn-small"><i class="fa fa-link"></i> 访问</a> '; iACP::CP($rs['cid'], 'ca') && ($a .= '<a href="' . __ADMINCP__ . '=' . $this->_app . '&do=add&' . $this->_app_cid . '=' . $rs['cid'] . '" class="btn btn-small"><i class="fa fa-edit"></i> 添加' . $this->_app_name . '</a> '); iACP::CP($rs['cid'], 'cs') && ($a .= '<a href="' . __ADMINCP__ . '=' . $this->_app . '&' . $this->_app_cid . '=' . $rs['cid'] . '&sub=on" class="btn btn-small"><i class="fa fa-list-alt"></i> ' . $this->_app_name . '管理</a> '); return $a; }
<form action="<?php echo APP_FURI; ?> &do=save" method="post" class="form-inline" id="iCMS-pushcategory" target="iPHP_FRAME"> <input name="status" type="hidden" value="<?php echo $rs['status']; ?> " /> <input name="cid" type="hidden" value="<?php echo $rs['cid']; ?> " /> <div id="pushcategory-add" class="tab-content"> <div class="input-prepend"> <span class="add-on">上级版块</span> <?php if (iACP::CP($rootid) || empty($rootid)) { ?> <select name="rootid" class="chosen-select"> <option value="0">======顶级版块=====</option> <?php echo $this->select('ca', $rootid, 0, 1, true); ?> </select> <?php } else { ?> <input name="rootid" id="rootid" type="hidden" value="<?php echo $rootid; ?> " /> <input readonly="true" value="<?php
function delArticle($id, $uid = '0', $postype = '1') { $id = (int) $id; $id or iPHP::alert("请选择要删除的文章"); $uid && ($sql = "and `userid`='{$uid}' and `postype`='{$postype}'"); $art = articleTable::row($id, 'cid,pic,tags', $sql); iACP::CP($art['cid'], 'cd', 'alert'); $frs = articleTable::select_filedata_indexid($id); for ($i = 0; $i < count($frs); $i++) { if ($frs[$i]) { $path = $frs[$i]['path'] . '/' . $frs[$i]['filename'] . '.' . $frs[$i]['ext']; iFS::del(iFS::fp($frs[$i]['path'], '+iPATH')); $msg .= $this->del_msg($path . ' 文件删除'); } } if ($art['tags']) { iPHP::app('tag.class', 'static'); $msg .= tag::del($art['tags']); } iDB::query("DELETE FROM `#iCMS@__category_map` WHERE `iid` = '{$id}' AND `appid` = '" . $this->appid . "';"); iDB::query("DELETE FROM `#iCMS@__prop_map` WHERE `iid` = '{$id}' AND `appid` = '" . $this->appid . "' ;"); articleTable::del_filedata($id, 'indexid'); $msg .= $this->del_msg('相关文件数据删除'); articleTable::del_comment($id); $msg .= $this->del_msg('评论数据删除'); articleTable::del($id); articleTable::del_data($id); $msg .= $this->del_msg('文章数据删除'); $this->categoryApp->update_count_one($art['cid'], '-'); $msg .= $this->del_msg('栏目数据更新'); $msg .= $this->del_msg('删除完成'); return $msg; }
" class="btn btn-primary btn-mini">+章节</a> --> <?php if (iACP::CP($value['cid'], 'ce')) { ?> <a href="<?php echo APP_URI; ?> &do=add&id=<?php echo $value['id']; ?> " class="btn btn-primary btn-mini">编辑</a> <?php } ?> <?php if (in_array($value['status'], array("1", "0")) && iACP::CP($value['cid'], 'cd')) { ?> <a href="<?php echo APP_FURI; ?> &do=update&id=<?php echo $value['id']; ?> &iDT=status:2" target="iPHP_FRAME" class="del btn btn-danger btn-mini" title="移动此文章到回收站" />删除</a> <?php } ?> <?php if ($value['status'] == "2") { ?> <a href="<?php
?> <?php if (iACP::CP($rs[$i]['cid'], 'e')) { ?> <a href="<?php echo $this->category_uri; ?> &do=add&cid=<?php echo $rs[$i]['cid']; ?> " class="btn btn-small"><i class="fa fa-edit"></i> 编辑</a> <?php } ?> <?php if (iACP::CP($rs[$i]['cid'], 'd')) { ?> <a href="<?php echo $this->category_furi; ?> &do=del&cid=<?php echo $rs[$i]['cid']; ?> " target="iPHP_FRAME" class="del btn btn-small" title='永久删除' onclick="return confirm('确定要删除?');"/><i class="fa fa-trash-o"></i> 删除</a></td> <?php } ?> </tr> <?php } ?>