本文整理汇总了PHP中iACP类的典型用法代码示例。如果您正苦于以下问题:PHP iACP类的具体用法?PHP iACP怎么用?PHP iACP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了iACP类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: do_iCMS
function do_iCMS()
{
$filter = $this->setting->get(0, 'word.filter');
$disable = $this->setting->get(0, 'word.disable');
foreach ((array) $filter as $k => $val) {
$filterArray[$k] = implode("=", (array) $val);
}
include iACP::view("filter");
}
开发者ID:World3D,项目名称:iCMS,代码行数:9,代码来源:filter.app.php
示例2: do_iCMS
function do_iCMS()
{
$res = iFS::folder('template', array('htm', 'css', 'js', 'png', 'jpg', 'gif'));
$dirRs = $res['DirArray'];
$fileRs = $res['FileArray'];
$pwd = $res['pwd'];
$parent = $res['parent'];
$URI = $res['URI'];
$navbar = true;
$file_edit = true;
include iACP::view("files.explorer");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:12,代码来源:template.app.php
示例3: do_iCMS
function do_iCMS()
{
if ($_GET['keywords']) {
$sql = " WHERE `keyword` REGEXP '{$_GET['keywords']}'";
}
$orderby = $_GET['orderby'] ? $_GET['orderby'] : "id DESC";
$maxperpage = $_GET['perpage'] > 0 ? (int) $_GET['perpage'] : 20;
$total = iPHP::total(false, "SELECT count(*) FROM `#iCMS@__keywords` {$sql}", "G");
iPHP::pagenav($total, $maxperpage, "个关键词");
$rs = iDB::all("SELECT * FROM `#iCMS@__keywords` {$sql} order by {$orderby} LIMIT " . iPHP::$offset . " , {$maxperpage}");
$_count = count($rs);
include iACP::view("keywords.manage");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:13,代码来源:keywords.app.php
示例4: do_save
function do_save()
{
$uid = (int) $_POST['uid'];
$gender = (int) $_POST['gender'];
$type = $_POST['type'];
$username = iS::escapeStr($_POST['uname']);
$nickname = iS::escapeStr($_POST['nickname']);
$realname = iS::escapeStr($_POST['realname']);
$power = $_POST['power'] ? json_encode($_POST['power']) : '';
$cpower = $_POST['cpower'] ? json_encode($_POST['cpower']) : '';
$gid = 0;
$info = array();
$info['icq'] = iS::escapeStr($_POST['icq']);
$info['home'] = iS::escapeStr($_POST['home']);
$info['year'] = intval($_POST['year']);
$info['month'] = intval($_POST['month']);
$info['day'] = intval($_POST['day']);
$info['from'] = iS::escapeStr($_POST['from']);
$info['signature'] = iS::escapeStr($_POST['signature']);
$info = addslashes(serialize($info));
$_POST['pwd'] && ($password = md5($_POST['pwd']));
$username or iPHP::alert('账号不能为空');
if (iACP::is_superadmin()) {
$gid = (int) $_POST['gid'];
} else {
isset($_POST['gid']) && iPHP::alert('您没有权限更改角色');
}
$fields = array('gid', 'gender', 'username', 'nickname', 'realname', 'power', 'cpower', 'info');
$data = compact($fields);
if (empty($uid)) {
iDB::value("SELECT `uid` FROM `#iCMS@__members` where `username` ='{$username}' LIMIT 1") && iPHP::alert('该账号已经存在');
$_data = compact(array('password', 'regtime', 'lastip', 'lastlogintime', 'logintimes', 'post', 'type', 'status'));
$_data['regtime'] = time();
$_data['lastip'] = iPHP::getIp();
$_data['lastlogintime'] = time();
$_data['status'] = '1';
$data = array_merge($data, $_data);
iDB::insert('members', $data);
$msg = "账号添加完成!";
} else {
iDB::value("SELECT `uid` FROM `#iCMS@__members` where `username` ='{$username}' AND `uid` !='{$uid}' LIMIT 1") && iPHP::alert('该账号已经存在');
iDB::update('members', $data, array('uid' => $uid));
$password && iDB::query("UPDATE `#iCMS@__members` SET `password`='{$password}' WHERE `uid` ='" . $uid . "'");
$msg = "账号修改完成!";
}
iPHP::success($msg, 'url:' . APP_URI);
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:47,代码来源:account.app.php
示例5: do_iCMS
function do_iCMS()
{
//数据统计
$rs = iDB::all("SHOW FULL TABLES FROM `" . iPHP_DB_NAME . "` WHERE table_type = 'BASE TABLE';");
foreach ($rs as $k => $val) {
if (strstr(iPHP_DB_PREFIX, $val['Tables_in_' . iPHP_DB_NAME]) === false) {
$iTable[] = strtoupper($val['Tables_in_' . iPHP_DB_NAME]);
} else {
$oTable[] = $val['Tables_in_' . iPHP_DB_NAME];
}
}
$content_datasize = 0;
$tables = iDB::all("SHOW TABLE STATUS");
$_count = count($tables);
for ($i = 0; $i < $_count; $i++) {
$tableName = strtoupper($tables[$i]['Name']);
if (in_array($tableName, $iTable)) {
$datasize += $tables[$i]['Data_length'];
$indexsize += $tables[$i]['Index_length'];
if (stristr(strtoupper(iPHP_DB_PREFIX . "article," . iPHP_DB_PREFIX . "category," . iPHP_DB_PREFIX . "comment," . iPHP_DB_PREFIX . "article_data"), $tableName)) {
$content_datasize += $tables[$i]['Data_length'] + $tables[$i]['Index_length'];
}
}
}
$acc = iDB::value("SELECT count(*) FROM `#iCMS@__category` WHERE `appid`='" . iCMS_APP_ARTICLE . "'");
$tac = iDB::value("SELECT count(*) FROM `#iCMS@__category` WHERE `appid`='" . iCMS_APP_TAG . "'");
$pac = iDB::value("SELECT count(*) FROM `#iCMS@__category` WHERE `appid`='" . iCMS_APP_PUSH . "'");
$ac = iDB::value("SELECT count(*) FROM `#iCMS@__article`");
$ac0 = iDB::value("SELECT count(*) FROM `#iCMS@__article` WHERE `status`='0'");
$ac2 = iDB::value("SELECT count(*) FROM `#iCMS@__article` WHERE `status`='2'");
$ctc = iDB::value("SELECT count(*) FROM `#iCMS@__comment`");
$tc = iDB::value("SELECT count(*) FROM `#iCMS@__tags`");
$kc = iDB::value("SELECT count(*) FROM `#iCMS@__keywords`");
$pc = iDB::value("SELECT count(*) FROM `#iCMS@__push`");
$uc = iDB::value("SELECT count(*) FROM `#iCMS@__user`");
$fdc = iDB::value("SELECT count(*) FROM `#iCMS@__filedata`");
$lc = iDB::value("SELECT count(*) FROM `#iCMS@__links`");
include iACP::view("home");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:39,代码来源:home.app.php
示例6:
</ul>
</div>
<div id="<?php
echo iACP::$app_name;
?>
-cpower" class="tab-pane hide">
<div class="input-prepend input-append"><span class="add-on">全选</span><span class="add-on">
<input type="checkbox" class="checkAll checkbox" data-target="#<?php
echo iACP::$app_name;
?>
-cpower"/>
</span><button class="btn btn-primary" type="submit"><i class="fa fa-check"></i> 提交</button>
</div>
<div class="clearfloat mb10"></div>
<div class="input-prepend input-append">
<span class="add-on"><i class="fa fa-cog"></i> 全局权限</span>
<span class="add-on">::</span>
<span class="add-on">允许添加顶级栏目</span>
<span class="add-on"><input type="checkbox" name="cpower[]" value="0:a" /></span>
</div>
<div class="clearfloat mb10"></div>
<span class="label label-important">注:只有文章类型的栏目才有内容权限</span>
<div id="cpower_treecontrol"> <a style="display:none;"></a> <a style="display:none;"></a> <a class="btn btn-mini btn-info" href="javascript:;">展开/收缩</a></div>
<ul id="cpower_tree">
<?php
echo iACP::app('category', 'all')->power_tree();
?>
</ul>
</div>
开发者ID:sunhk25,项目名称:iCMS,代码行数:29,代码来源:admincp.power.php
示例7: do_save
function do_save()
{
$id = (int) $_POST['id'];
$cid = (int) $_POST['cid'];
$_cid = (int) $_POST['_cid'];
$userid = (int) $_POST['userid'];
$pid = (int) $_POST['pid'];
$editor = iS::escapeStr($_POST['editor']);
$ordernum = _int($_POST['ordernum']);
$addtime = iPHP::str2time($_POST['addtime']);
$title = iS::escapeStr($_POST['title']);
$pic = $this->getpic($_POST['pic']);
$description = iS::escapeStr($_POST['description']);
$url = iS::escapeStr($_POST['url']);
$title2 = iS::escapeStr($_POST['title2']);
$pic2 = $this->getpic($_POST['pic2']);
$description2 = iS::escapeStr($_POST['description2']);
$url2 = iS::escapeStr($_POST['url2']);
$title3 = iS::escapeStr($_POST['title3']);
$pic3 = $this->getpic($_POST['pic3']);
$description3 = iS::escapeStr($_POST['description3']);
$url3 = iS::escapeStr($_POST['url3']);
$metadata = iS::escapeStr($_POST['metadata']);
$metadata = $metadata ? addslashes(serialize($metadata)) : '';
empty($userid) && ($userid = iMember::$userid);
empty($title) && iPHP::alert('1.标题必填');
empty($cid) && iPHP::alert('请选择所属栏目');
$haspic = empty($pic) ? 0 : 1;
$status = 1;
$fields = array('cid', 'rootid', 'pid', 'haspic', 'editor', 'userid', 'title', 'pic', 'url', 'description', 'title2', 'pic2', 'url2', 'description2', 'title3', 'pic3', 'url3', 'description3', 'ordernum', 'metadata', 'addtime', 'hits', 'status');
$data = compact($fields);
if (empty($id)) {
iDB::insert('push', $data);
iDB::query("UPDATE `#iCMS@__category` SET `count` = count+1 WHERE `cid` ='{$cid}' LIMIT 1 ");
$msg = '推送完成';
} else {
iDB::update('push', $data, array('id' => $id));
if ($_cid != $cid) {
iDB::query("UPDATE `#iCMS@__category` SET `count` = count-1 WHERE `cid` ='{$_cid}' and `count`>0 LIMIT 1 ");
iDB::query("UPDATE `#iCMS@__category` SET `count` = count+1 WHERE `cid` ='{$cid}' LIMIT 1 ");
}
$msg = '编辑完成!';
}
iACP::callback($id, $this);
if ($this->callback['code']) {
return array("code" => $this->callback['code'], 'indexid' => $id);
}
iPHP::success($msg, 'url:' . APP_URI);
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:49,代码来源:push.app.php
示例8: do_batch
function do_batch()
{
$idArray = (array) $_POST['id'];
$idArray or iPHP::alert("请选择要操作的标签");
$ids = implode(',', $idArray);
$batch = $_POST['batch'];
switch ($batch) {
case 'dels':
iPHP::$break = false;
foreach ($idArray as $id) {
$this->do_del($id, false);
}
iPHP::$break = true;
iPHP::success('标签全部删除完成!', 'js:1');
break;
case 'move':
$_POST['cid'] or iPHP::alert("请选择目标栏目!");
iPHP::import(iPHP_APP_CORE . '/iMAP.class.php');
map::init('category', $this->appid);
$cid = (int) $_POST['cid'];
foreach ($idArray as $id) {
$_cid = iDB::value("SELECT `cid` FROM `#iCMS@__tags` where `id` ='{$id}'");
iDB::update("tags", compact('cid'), compact('id'));
if ($_cid != $cid) {
map::diff($cid, $_cid, $id);
$this->categoryApp->update_count_one($_cid, '-');
$this->categoryApp->update_count_one($cid);
}
}
iPHP::success('成功移动到目标栏目!', 'js:1');
break;
case 'mvtcid':
$_POST['tcid'] or iPHP::alert("请选择目标分类!");
iPHP::import(iPHP_APP_CORE . '/iMAP.class.php');
map::init('category', $this->appid);
$tcid = (int) $_POST['tcid'];
foreach ($idArray as $id) {
$_tcid = iDB::value("SELECT `tcid` FROM `#iCMS@__tags` where `id` ='{$id}'");
iDB::update("tags", compact('tcid'), compact('id'));
if ($_tcid != $tcid) {
map::diff($tcid, $_tcid, $id);
$this->categoryApp->update_count_one($_tcid, '-');
$this->categoryApp->update_count_one($tcid);
}
}
iPHP::success('成功移动到目标分类!', 'js:1');
break;
case 'prop':
iPHP::import(iPHP_APP_CORE . '/iMAP.class.php');
map::init('prop', $this->appid);
$pid = implode(',', (array) $_POST['pid']);
foreach ((array) $_POST['id'] as $id) {
$_pid = iDB::value("SELECT pid FROM `#iCMS@__tags` WHERE `id`='{$id}'");
iDB::update("tags", compact('pid'), compact('id'));
map::diff($pid, $_pid, $id);
}
iPHP::success('属性设置完成!', 'js:1');
break;
case 'weight':
$weight = _int($_POST['mweight']);
$sql = "`weight` = '{$weight}'";
break;
case 'tpl':
$tpl = iS::escapeStr($_POST['mtpl']);
$sql = "`tpl` = '{$tpl}'";
break;
case 'keyword':
if ($_POST['pattern'] == 'replace') {
$sql = "`keywords` = '" . iS::escapeStr($_POST['mkeyword']) . "'";
} elseif ($_POST['pattern'] == 'addto') {
foreach ($idArray as $id) {
$keywords = iDB::value("SELECT keywords FROM `#iCMS@__tags` WHERE `id`='{$id}'");
$sql = "`keywords` = '" . ($keywords ? $keywords . ',' . iS::escapeStr($_POST['mkeyword']) : iS::escapeStr($_POST['mkeyword'])) . "'";
iDB::query("UPDATE `#iCMS@__tags` SET {$sql} WHERE `id`='{$id}'");
}
iPHP::success('关键字更改完成!', 'js:1');
}
break;
case 'tag':
if ($_POST['pattern'] == 'replace') {
$sql = "`related` = '" . iS::escapeStr($_POST['mtag']) . "'";
} elseif ($_POST['pattern'] == 'addto') {
foreach ($idArray as $id) {
$keywords = iDB::value("SELECT related FROM `#iCMS@__tags` WHERE `id`='{$id}'");
$sql = "`related` = '" . ($keywords ? $keywords . ',' . iS::escapeStr($_POST['mtag']) : iS::escapeStr($_POST['mtag'])) . "'";
iDB::query("UPDATE `#iCMS@__tags` SET {$sql} WHERE `id`='{$id}'");
}
iPHP::success('相关标签更改完成!', 'js:1');
}
break;
default:
if (strpos($batch, ':')) {
$data = iACP::fields($batch);
foreach ($idArray as $id) {
$data && iDB::update("tags", $data, array('id' => $id));
}
iPHP::success('操作成功!', 'js:1');
} else {
iPHP::alert('请选择要操作项!', 'js:1');
}
//.........这里部分代码省略.........
开发者ID:sunhk25,项目名称:iCMS,代码行数:101,代码来源:tags.app.php
示例9: do_addproject
function do_addproject()
{
$rs = array();
$this->pid && ($rs = spider::project($this->pid));
$cid = empty($rs['cid']) ? $this->cid : $rs['cid'];
$categoryApp = iACP::app('category', iCMS_APP_ARTICLE);
$cata_option = $categoryApp->select(false, $cid);
$rule_option = $this->rule_opt($rs['rid']);
$post_option = $this->post_opt($rs['poid']);
//$rs['sleep'] OR $rs['sleep'] = 30;
include iACP::view("spider.addproject");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:12,代码来源:spider.app.php
示例10: article_data
function article_data($bodyArray, $aid = 0, $haspic = 0)
{
if (isset($_POST['ischapter']) || is_array($_POST['adid'])) {
$adidArray = $_POST['adid'];
$chaptertitle = $_POST['chaptertitle'];
$chapter = count($bodyArray);
foreach ($bodyArray as $key => $body) {
$adid = (int) $adidArray[$key];
$subtitle = iS::escapeStr($chaptertitle[$key]);
$this->body($body, $subtitle, $aid, $adid, $haspic);
}
articleTable::update(compact('chapter'), array('id' => $aid));
} else {
$adid = (int) $_POST['adid'];
$subtitle = iS::escapeStr($_POST['subtitle']);
$body = implode('#--iCMS.PageBreak--#', $bodyArray);
$this->body($body, $subtitle, $aid, $adid, $haspic);
}
iACP::callback($aid, $this, 'data');
}
开发者ID:Junred,项目名称:iCMS,代码行数:20,代码来源:article.app.php
示例11: do_manage
function do_manage($doType = null)
{
$cid = (int) $_GET['cid'];
$sql = " where ";
switch ($doType) {
//status:[0:草稿][1:正常][2:回收][3:审核][4:不合格]
case 'inbox':
//草稿
$sql .= "`status` ='0'";
// if(iMember::$data->gid!=1){
// $sql.=" AND `userid`='".iMember::$userid."'";
// }
$position = "草稿";
break;
case 'trash':
//回收站
$sql .= "`status` ='2'";
$position = "回收站";
break;
case 'examine':
//审核
$sql .= "`status` ='3'";
$position = "已审核";
break;
case 'off':
//未通过
$sql .= "`status` ='4'";
$position = "未通过";
break;
default:
$sql .= " `status` ='1'";
$cid && ($position = $this->category[$cid]['name']);
}
if ($_GET['keywords']) {
$sql .= " AND CONCAT(title,title2,title3) REGEXP '{$_GET['keywords']}'";
}
$sql .= $this->categoryApp->search_sql($cid);
isset($_GET['nopic']) && ($sql .= " AND `haspic` ='0'");
$_GET['starttime'] && ($sql .= " and `addtime`>=UNIX_TIMESTAMP('" . $_GET['starttime'] . " 00:00:00')");
$_GET['endtime'] && ($sql .= " and `addtime`<=UNIX_TIMESTAMP('" . $_GET['endtime'] . " 23:59:59')");
isset($_GET['userid']) && ($uri .= '&userid=' . (int) $_GET['userid']);
isset($_GET['keyword']) && ($uri .= '&keyword=' . $_GET['keyword']);
isset($_GET['pid']) && ($uri .= '&pid=' . $_GET['pid']);
isset($_GET['cid']) && ($uri .= '&cid=' . $_GET['cid']);
isset($_GET['pid']) && $_GET['pid'] != '-1' && ($uri .= '&pid=' . $_GET['at']);
$orderby = $_GET['orderby'] ? $_GET['orderby'] : "id DESC";
$maxperpage = $_GET['perpage'] > 0 ? (int) $_GET['perpage'] : 20;
$total = iPHP::total(false, "SELECT count(*) FROM `#iCMS@__push` {$sql}", "G");
iPHP::pagenav($total, $maxperpage, "条记录");
$rs = iDB::all("SELECT * FROM `#iCMS@__push` {$sql} order by {$orderby} LIMIT " . iPHP::$offset . " , {$maxperpage}");
$_count = count($rs);
include iACP::view("push.manage");
}
开发者ID:World3D,项目名称:iCMS,代码行数:53,代码来源:push.app.php
示例12: do_replace
function do_replace()
{
include iACP::view("database.replace");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:4,代码来源:database.app.php
示例13: do_delfile
function do_delfile()
{
iACP::MP('FILE.DELETE', 'alert');
$_GET['path'] or iPHP::alert("请选择要删除的文件");
strpos($_GET['path'], '..') !== false && iPHP::alert("文件路径中带有..");
$hash = md5($_GET['path']);
$FileRootPath = iFS::fp($_GET['path'], '+iPATH');
if (iFS::del($FileRootPath)) {
$msg = 'success:#:check:#:文件删除完成!';
$_GET['ajax'] && iPHP::json(array('code' => 1, 'msg' => $msg));
} else {
$msg = 'warning:#:warning:#:找不到相关文件,文件删除失败!';
$_GET['ajax'] && iPHP::json(array('code' => 0, 'msg' => $msg));
}
iPHP::dialog($msg, 'js:parent.$("#' . $hash . '").remove();');
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:16,代码来源:files.app.php
示例14:
<?php
if (iACP::MP('FILE.BROWSE')) {
?>
<li><a href="<?php
echo __ADMINCP__;
?>
=files&do=browse&from=modal&click=file&callback=<?php
echo $callback;
?>
" data-toggle="modal" title="从网站选择"><i class="fa fa-search"></i> 从网站选择</a></li>
<li class="divider"></li>
<?php
}
?>
<?php
if (iACP::MP('FILE.EDIT')) {
?>
<li><a href="<?php
echo __ADMINCP__;
?>
=files&do=editpic&from=modal&callback=<?php
echo $callback;
?>
" data-toggle="modal" title="使用美图秀秀编辑图片" class="modal_photo_<?php
echo $unid;
?>
tip"><i class="fa fa-edit"></i> 编辑</a></li>
<li class="divider"></li>
<?php
if ($indexid) {
?>
开发者ID:sunhk25,项目名称:iCMS,代码行数:31,代码来源:admincp.picBtnGroup.php
示例15: publish
public static function publish($work = null)
{
$_POST = spiderData::crawl();
if (spider::$work == 'shell') {
if (empty($_POST['title'])) {
echo "标题不能为空\n";
return false;
}
if (empty($_POST['body'])) {
echo "内容不能为空\n";
return false;
}
}
$checker = spider::checker($work, spider::$pid, $_POST['reurl'], $_POST['title']);
if ($checker !== true) {
return $checker;
}
$project = spider::project(spider::$pid);
if (!isset($_POST['cid'])) {
$_POST['cid'] = $project['cid'];
}
$postArgs = spider::postArgs($project['poid']);
if ($_GET['indexid']) {
$aid = (int) $_GET['indexid'];
$_POST['aid'] = $aid;
$_POST['adid'] = iDB::value("SELECT `id` FROM `#iCMS@__article_data` WHERE aid='{$aid}'");
}
$title = iS::escapeStr($_POST['title']);
$url = iS::escapeStr($_POST['reurl']);
$hash = md5($url);
if (empty(spider::$sid)) {
$spider_url = iDB::row("SELECT `id`,`publish`,`indexid` FROM `#iCMS@__spider_url` where `url`='{$url}'", ARRAY_A);
if (empty($spider_url)) {
$spider_url_data = array('cid' => $project['cid'], 'rid' => spider::$rid, 'pid' => spider::$pid, 'title' => addslashes($title), 'url' => $url, 'hash' => $hash, 'status' => '1', 'addtime' => time(), 'publish' => '0', 'indexid' => '0', 'pubdate' => '');
$suid = iDB::insert('spider_url', $spider_url_data);
} else {
if ($spider_url['indexid']) {
$_POST['aid'] = $spider_url['indexid'];
$_POST['adid'] = iDB::value("SELECT `id` FROM `#iCMS@__article_data` WHERE aid='" . $spider_url['indexid'] . "'");
}
$suid = $spider_url['id'];
}
} else {
$suid = spider::$sid;
}
if (spider::$callback['post'] && is_callable(spider::$callback['post'])) {
$_POST = call_user_func_array(spider::$callback['post'], array($_POST));
}
iS::slashes($_POST);
$app = iACP::app($postArgs->app);
$fun = $postArgs->fun;
$app->callback['code'] = '1001';
/**
* 主表 回调 更新关联ID
*/
$app->callback['primary'] = array(array('spider', 'update_spider_url_indexid'), array('suid' => $suid));
/**
* 数据表 回调 成功发布
*/
$app->callback['data'] = array(array('spider', 'update_spider_url_publish'), array('suid' => $suid));
$callback = $app->{$fun}();
if ($callback['code'] == $app->callback['code']) {
if (spider::$sid) {
$work === NULL && iPHP::success("发布成功!", 'js:1');
} else {
$work === NULL && iPHP::success("发布成功!", 'js:parent.$("#' . $hash . '").remove();');
}
}
if ($work == "shell" || $work == "WEB@AUTO") {
$callback['work'] = $work;
return $callback;
}
}
开发者ID:Junred,项目名称:iCMS,代码行数:73,代码来源:iSpider.class.php
示例16: do_manage
function do_manage($doType = null)
{
include iACP::view("menu.manage");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:4,代码来源:menu.app.php
示例17: li
function li($mType, $id, $level = 1)
{
if (!iACP::MP($id)) {
return false;
}
$a = $this->menu_array[$id];
if ($a['app'] == "separator") {
return '<li class="' . $a['class'] . '"></li>';
}
$a['href'] && ($href = __ADMINCP__ . '=' . $a['href']);
$a['target'] == 'iPHP_FRAME' && ($href .= '&frame=iPHP');
if (strstr($a['href'], 'http://') || strstr($a['href'], '#')) {
$href = $a['href'];
}
$a['href'] == '__SELF__' && ($href = __SELF__);
$a['href'] == '#' && ($href = 'javascript:;');
$isSM = count($this->root_array[$id]);
if ($isSM && $level && $mType == 'nav') {
$a['class'] = 'dropdown-submenu';
}
if ($mType == 'sidebar' && $isSM && $level == 1) {
$href = 'javascript:;';
$a['class'] = 'submenu';
$label = '<span class="label">' . $this->subcount($id) . '</span>';
}
if ($mType == 'tab') {
$href = "#" . $a['href'];
}
$li = '<li class="' . $a['class'] . '" title="' . $a['name'] . '" data-level="' . $level . '" data-menu="m' . $id . '">';
$link = '<a href="' . $href . '"';
$a['title'] && ($link .= ' title="' . $a['title'] . '"');
$a['a_class'] && ($link .= ' class="' . $a['a_class'] . '"');
$a['target'] && ($link .= ' target="' . $a['target'] . '"');
if ($mType == 'sidebar' && $a['data-toggle'] == 'modal') {
$link .= ' data-toggle="' . $a['data-toggle'] . '"';
} elseif ($mType == 'nav') {
$a['data-toggle'] && ($link .= ' data-toggle="' . $a['data-toggle'] . '"');
} elseif ($mType == 'tab') {
$link .= ' data-toggle="tab"';
}
$a['data-target'] && ($link .= ' data-target="' . $a['data-target'] . '"');
$a['data-meta'] && ($link .= " data-meta='" . $a['data-meta'] . "'");
$link .= ">";
$li .= $link;
$a['icon'] && ($li .= '<i class="' . $a['icon'] . '"></i> ');
$li .= '<span>' . $a['name'] . '</span>' . $label;
$a['caret'] && ($li .= $a['caret']);
$li .= '</a>';
if ($isSM) {
$SMli = '';
foreach ((array) $this->root_array[$id] as $rootid => $M) {
$SMli .= $this->li($mType, $M['id'], $level + 1);
}
$mType == 'nav' && ($SMul = '<ul class="dropdown-menu">' . $SMli . '</ul>');
if ($mType == 'sidebar') {
$SMul = $level > 1 ? $SMli : '<ul style="display: none;">' . $SMli . '</ul>';
}
}
$li .= $SMul . '</li>';
return $li;
}
开发者ID:World3D,项目名称:iCMS,代码行数:61,代码来源:iMenu.class.php
示例18: define
<?php
/**
* iCMS - i Content Management System
* Copyright (c) 2007-2012 idreamsoft.com iiimon Inc. All rights reserved.
*
* @author coolmoo <[email protected]>
* @site http://www.idreamsoft.com
* @licence http://www.idreamsoft.com/license.php
* @version 6.0.0
* @$Id: admincp.php 2365 2014-02-23 16:26:27Z coolmoo $
*/
define('iPHP_DEBUG', true);
define('iPHP_SESSION', 'SESSION');
require dirname(__FILE__) . '/iCMS.php';
require iPHP_APP_CORE . '/iACP.class.php';
iACP::run();
开发者ID:Junred,项目名称:iCMS,代码行数:17,代码来源:admincp.php
示例19: do_iCMS
function do_iCMS()
{
$sql = " where 1=1";
// $cid = (int)$_GET['cid'];
//
// if($cid) {
// $cids = $_GET['sub']?iCMS::get_category_ids($cid,true):$cid;
// $cids OR $cids = $vars['cid'];
// $sql.= iPHP::where($cids,'cid');
// }
$_GET['field'] && ($sql .= " AND `field`='" . $_GET['field'] . "'");
$_GET['field'] && ($uri .= '&field=' . $_GET['field']);
$_GET['type'] && ($sql .= " AND `type`='" . $_GET['type'] . "'");
$_GET['type'] && ($uri .= '&type=' . $_GET['type']);
$_GET['cid'] && ($sql .= " AND `cid`='" . $_GET['cid'] . "'");
$_GET['cid'] && ($uri .= '&cid=' . $_GET['cid']);
$maxperpage = $_GET['perpage'] > 0 ? (int) $_GET['perpage'] : 20;
$total = iPHP::total(false, "SELECT count(*) FROM `#iCMS@__prop` {$sql}", "G");
iPHP::pagenav($total, $maxperpage, "个属性");
$rs = iDB::all("SELECT * FROM `#iCMS@__prop` {$sql} order by pid DESC LIMIT " . iPHP::$offset . " , {$maxperpage}");
$_count = count($rs);
include iACP::view("prop.manage");
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:23,代码来源:prop.app.php
示例20: article_data
function article_data($bodyArray, $aid = 0, $haspic = 0)
{
$id = (int) $_POST['adid'];
$subtitle = iS::escapeStr($_POST['subtitle']);
$body = implode('#--iCMS.PageBreak--#', $bodyArray);
$body = preg_replace(array('/<script.+?<\\/script>/is', '/<form.+?<\\/form>/is'), '', $body);
isset($_POST['dellink']) && ($body = preg_replace("/<a[^>].*?>(.*?)<\\/a>/si", "\\1", $body));
if (isset($_POST['markdown'])) {
$body = '#--iCMS.Markdown--#' . $body;
} else {
iCMS::$config['publish']['autoformat'] && ($body = addslashes(autoformat($body)));
}
articleTable::$ID = $aid;
$fields = articleTable::data_fields($id);
$data = compact($fields);
if ($id) {
articleTable::data_update($data, compact('id'));
} else {
$id = articleTable::data_insert($data);
}
iACP::callback($aid, $this, 'data');
$_POST['isredirect'] && (iFS::$redirect = true);
$_POST['iswatermark'] && (iFS::$watermark = false);
if (isset($_POST['remote'])) {
$body = $this->remotepic($body, true, $aid);
$body = $this->remotepic($body, true, $aid);
$body = $this->remotepic($body, true, $aid);
if ($body && $id) {
articleTable::data_update(array('body' => $body), compact('id'));
}
}
if (isset($_POST['autopic']) && empty($haspic)) {
$picurl = $this->remotepic($body, 'autopic', $aid);
$this->pic($picurl, $aid);
}
$this->pic_indexid($body, $aid);
}
开发者ID:sunhk25,项目名称:iCMS,代码行数:37,代码来源:article.app.php
注:本文中的iACP类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论