本文整理匯總了PHP中iACP::CP方法的典型用法代碼示例。如果您正苦於以下問題:PHP iACP::CP方法的具體用法?PHP iACP::CP怎麽用?PHP iACP::CP使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類iACP
的用法示例。
在下文中一共展示了iACP::CP方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: listbtn
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;
}
示例2:
<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
示例3: delArticle
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;
}
示例4:
" 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
示例5: confirm
?>
<?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
}
?>